Version 2.10.0-7.1.beta

Merge commit 'f073f8d7497e2031489eaabdc3b099cbb7ddf869' into beta
diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json
index 25d9592..706d694 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-29T11:21:54.984521",
+  "generated": "2020-08-07T16:47:24.963156",
   "generator": "tools/generate_package_config.dart",
   "packages": [
     {
@@ -21,6 +21,41 @@
       "languageVersion": "2.2"
     },
     {
+      "name": "_fe_analyzer_shared_assigned_variables",
+      "rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/assigned_variables",
+      "packageUri": ".nonexisting/"
+    },
+    {
+      "name": "_fe_analyzer_shared_definite_assignment",
+      "rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/definite_assignment",
+      "packageUri": ".nonexisting/"
+    },
+    {
+      "name": "_fe_analyzer_shared_definite_unassignment",
+      "rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/definite_unassignment",
+      "packageUri": ".nonexisting/"
+    },
+    {
+      "name": "_fe_analyzer_shared_inheritance",
+      "rootUri": "../pkg/_fe_analyzer_shared/test/inheritance",
+      "packageUri": ".nonexisting/"
+    },
+    {
+      "name": "_fe_analyzer_shared_nullability",
+      "rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/nullability",
+      "packageUri": ".nonexisting/"
+    },
+    {
+      "name": "_fe_analyzer_shared_reachability",
+      "rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/reachability",
+      "packageUri": ".nonexisting/"
+    },
+    {
+      "name": "_fe_analyzer_shared_type_promotion",
+      "rootUri": "../pkg/_fe_analyzer_shared/test/flow_analysis/type_promotion",
+      "packageUri": ".nonexisting/"
+    },
+    {
       "name": "_js_interop_checks",
       "rootUri": "../pkg/_js_interop_checks",
       "packageUri": "lib/",
@@ -48,7 +83,7 @@
       "name": "analyzer",
       "rootUri": "../pkg/analyzer",
       "packageUri": "lib/",
-      "languageVersion": "2.6"
+      "languageVersion": "2.7"
     },
     {
       "name": "analyzer_cli",
@@ -72,7 +107,7 @@
       "name": "async",
       "rootUri": "../third_party/pkg/async",
       "packageUri": "lib/",
-      "languageVersion": "2.2"
+      "languageVersion": "2.10"
     },
     {
       "name": "async_helper",
@@ -83,19 +118,19 @@
       "name": "bazel_worker",
       "rootUri": "../third_party/pkg/bazel_worker",
       "packageUri": "lib/",
-      "languageVersion": "2.1"
+      "languageVersion": "2.3"
     },
     {
       "name": "benchmark_harness",
       "rootUri": "../third_party/pkg/benchmark_harness",
       "packageUri": "lib/",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "boolean_selector",
       "rootUri": "../third_party/pkg/boolean_selector",
       "packageUri": "lib/",
-      "languageVersion": "2.4"
+      "languageVersion": "2.10"
     },
     {
       "name": "build_integration",
@@ -107,7 +142,7 @@
       "name": "charcode",
       "rootUri": "../third_party/pkg/charcode",
       "packageUri": "lib/",
-      "languageVersion": "2.0"
+      "languageVersion": "2.9"
     },
     {
       "name": "cli_util",
@@ -119,7 +154,7 @@
       "name": "collection",
       "rootUri": "../third_party/pkg/collection",
       "packageUri": "lib/",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "compiler",
@@ -131,7 +166,7 @@
       "name": "convert",
       "rootUri": "../third_party/pkg/convert",
       "packageUri": "lib/",
-      "languageVersion": "2.0"
+      "languageVersion": "2.10"
     },
     {
       "name": "crypto",
@@ -225,7 +260,7 @@
       "name": "fixnum",
       "rootUri": "../third_party/pkg/fixnum",
       "packageUri": "lib/",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "front_end",
@@ -327,7 +362,7 @@
       "name": "js",
       "rootUri": "../pkg/js",
       "packageUri": "lib/",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "js_ast",
@@ -339,7 +374,7 @@
       "name": "js_runtime",
       "rootUri": "../sdk/lib/_internal/js_runtime",
       "packageUri": "lib/",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "json_rpc_2",
@@ -354,6 +389,11 @@
       "languageVersion": "2.2"
     },
     {
+      "name": "language_versioning_2.7_test",
+      "rootUri": "../pkg/language_versioning_2.7_test",
+      "languageVersion": "2.7"
+    },
+    {
       "name": "linter",
       "rootUri": "../third_party/pkg/linter",
       "packageUri": "lib/",
@@ -369,19 +409,19 @@
       "name": "markdown",
       "rootUri": "../third_party/pkg/markdown",
       "packageUri": "lib/",
-      "languageVersion": "2.2"
+      "languageVersion": "2.6"
     },
     {
       "name": "matcher",
       "rootUri": "../third_party/pkg/matcher",
       "packageUri": "lib/",
-      "languageVersion": "2.4"
+      "languageVersion": "2.10"
     },
     {
       "name": "meta",
       "rootUri": "../pkg/meta",
       "packageUri": "lib/",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "mime",
@@ -446,19 +486,19 @@
       "name": "path",
       "rootUri": "../third_party/pkg/path",
       "packageUri": "lib/",
-      "languageVersion": "2.0"
+      "languageVersion": "2.10"
     },
     {
       "name": "pedantic",
       "rootUri": "../third_party/pkg/pedantic",
       "packageUri": "lib/",
-      "languageVersion": "2.1"
+      "languageVersion": "2.10"
     },
     {
       "name": "pool",
       "rootUri": "../third_party/pkg/pool",
       "packageUri": "lib/",
-      "languageVersion": "2.0"
+      "languageVersion": "2.10"
     },
     {
       "name": "protobuf",
@@ -494,7 +534,7 @@
       "name": "sdk_library_metadata",
       "rootUri": "../sdk/lib/_internal/sdk_library_metadata",
       "packageUri": "lib/",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "shelf",
@@ -536,19 +576,19 @@
       "name": "source_map_stack_trace",
       "rootUri": "../third_party/pkg/source_map_stack_trace",
       "packageUri": "lib/",
-      "languageVersion": "2.7"
+      "languageVersion": "2.10"
     },
     {
       "name": "source_maps",
       "rootUri": "../third_party/pkg/source_maps",
       "packageUri": "lib/",
-      "languageVersion": "2.0"
+      "languageVersion": "2.10"
     },
     {
       "name": "source_span",
       "rootUri": "../third_party/pkg/source_span",
       "packageUri": "lib/",
-      "languageVersion": "2.6"
+      "languageVersion": "2.10"
     },
     {
       "name": "sourcemap_testing",
@@ -557,10 +597,16 @@
       "languageVersion": "2.1"
     },
     {
+      "name": "sse",
+      "rootUri": "../third_party/pkg/sse",
+      "packageUri": "lib/",
+      "languageVersion": "2.2"
+    },
+    {
       "name": "stack_trace",
       "rootUri": "../third_party/pkg/stack_trace",
       "packageUri": "lib/",
-      "languageVersion": "2.0"
+      "languageVersion": "2.10"
     },
     {
       "name": "stagehand",
@@ -578,12 +624,18 @@
       "name": "stream_channel",
       "rootUri": "../third_party/pkg/stream_channel",
       "packageUri": "lib/",
-      "languageVersion": "2.2"
+      "languageVersion": "2.10"
     },
     {
       "name": "string_scanner",
       "rootUri": "../third_party/pkg/string_scanner",
       "packageUri": "lib/",
+      "languageVersion": "2.10"
+    },
+    {
+      "name": "sync_http",
+      "rootUri": "../third_party/pkg/sync_http",
+      "packageUri": "lib/",
       "languageVersion": "2.0"
     },
     {
@@ -596,25 +648,25 @@
       "name": "term_glyph",
       "rootUri": "../third_party/pkg/term_glyph",
       "packageUri": "lib/",
-      "languageVersion": "1.8"
+      "languageVersion": "2.10"
     },
     {
       "name": "test",
       "rootUri": "../third_party/pkg/test/pkgs/test",
       "packageUri": "lib/",
-      "languageVersion": "2.7"
+      "languageVersion": "2.10"
     },
     {
       "name": "test_api",
       "rootUri": "../third_party/pkg/test/pkgs/test_api",
       "packageUri": "lib/",
-      "languageVersion": "2.7"
+      "languageVersion": "2.10"
     },
     {
       "name": "test_core",
       "rootUri": "../third_party/pkg/test/pkgs/test_core",
       "packageUri": "lib/",
-      "languageVersion": "2.7"
+      "languageVersion": "2.10"
     },
     {
       "name": "test_descriptor",
@@ -656,7 +708,7 @@
       "name": "typed_data",
       "rootUri": "../third_party/pkg/typed_data",
       "packageUri": "lib/",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "usage",
@@ -665,6 +717,12 @@
       "languageVersion": "2.0"
     },
     {
+      "name": "vector_math",
+      "rootUri": "../third_party/pkg/vector_math",
+      "packageUri": "lib/",
+      "languageVersion": "2.10"
+    },
+    {
       "name": "vm",
       "rootUri": "../pkg/vm",
       "packageUri": "lib/",
@@ -701,10 +759,16 @@
       "languageVersion": "2.0"
     },
     {
+      "name": "webdriver",
+      "rootUri": "../third_party/pkg/webdriver",
+      "packageUri": "lib/",
+      "languageVersion": "2.0"
+    },
+    {
       "name": "yaml",
       "rootUri": "../third_party/pkg/yaml",
       "packageUri": "lib/",
       "languageVersion": "2.4"
     }
   ]
-}
+}
\ No newline at end of file
diff --git a/.packages b/.packages
index 2b486aa..ee073a7 100644
--- a/.packages
+++ b/.packages
@@ -92,11 +92,13 @@
 sourcemap_testing:pkg/sourcemap_testing/lib
 source_maps:third_party/pkg/source_maps/lib
 source_span:third_party/pkg/source_span/lib
+sse:third_party/pkg/sse/lib
 stack_trace:third_party/pkg/stack_trace/lib
 stagehand:third_party/pkg/stagehand/lib
 status_file:pkg/status_file/lib
 stream_channel:third_party/pkg/stream_channel/lib
 string_scanner:third_party/pkg/string_scanner/lib
+sync_http:third_party/pkg/sync_http/lib
 telemetry:pkg/telemetry/lib
 term_glyph:third_party/pkg/term_glyph/lib
 test:third_party/pkg/test/pkgs/test/lib
@@ -110,10 +112,12 @@
 tflite_native:third_party/pkg/tflite_native/lib
 typed_data:third_party/pkg/typed_data/lib
 usage:third_party/pkg/usage/lib
+vector_math:third_party/pkg/vector_math/lib
 vm:pkg/vm/lib
 vm_service:pkg/vm_service/lib
 vm_snapshot_analysis:pkg/vm_snapshot_analysis/lib
 watcher:third_party/pkg/watcher/lib
+webdriver:third_party/pkg/webdriver/lib
 web_components:third_party/pkg/web_components/lib
 web_socket_channel:third_party/pkg/web_socket_channel/lib
 yaml:third_party/pkg/yaml/lib
diff --git a/BUILD.gn b/BUILD.gn
index c758c49..d59ce8e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -61,7 +61,10 @@
   # TODO(bkonyi): this dep causes a segfault on Android XARM_X64 builds.
   # See issue #41776.
   if (dart_target_arch != "arm") {
-    deps += [ "utils/dartdev:dartdev" ]
+    deps += [
+      "utils/dartdev:dartdev",
+      "utils/dds:dds",
+    ]
   }
 }
 
@@ -149,3 +152,66 @@
 group("compressed_observatory_archive") {
   deps = [ "runtime/observatory:copy_compressed_observatory_archive" ]
 }
+
+if (is_fuchsia) {
+  import("third_party/fuchsia/sdk/linux/build/component.gni")
+  import("third_party/fuchsia/sdk/linux/build/package.gni")
+
+  fuchsia_component("fuchsia_test_component") {
+    testonly = true
+    data_deps = [ "runtime/bin:dart" ]
+    manifest = "build/fuchsia/dart.cmx"
+
+    resource_files = [
+      ".dart_tool/package_config.json",
+      "pkg/testing/test/hello_test.dart",
+      "tools/addlatexhash.dart",
+    ]
+    resource_dirs = [
+      "tests/standalone_2",
+      "pkg/async_helper",
+      "pkg/expect",
+      "pkg/meta",
+      "pkg/native_stack_traces",
+      "pkg/smith",
+      "third_party/pkg/args",
+      "third_party/pkg/async",
+      "third_party/pkg/charcode",
+      "third_party/pkg/collection",
+      "third_party/pkg/convert",
+      "third_party/pkg/crypto",
+      "third_party/pkg/http",
+      "third_party/pkg/http_parser",
+      "third_party/pkg/path",
+      "third_party/pkg/pool",
+      "third_party/pkg/stack_trace",
+      "third_party/pkg/string_scanner",
+      "third_party/pkg/typed_data",
+    ]
+
+    resources = []
+    foreach(file, resource_files) {
+      resources += [
+        {
+          path = file
+          dest = "data/" + file
+        },
+      ]
+    }
+    resources +=
+        exec_script("tools/fuchsia/find_resources.py", resource_dirs, "json")
+  }
+
+  fuchsia_package("fuchsia_test_package") {
+    package_name = "dart_test_"
+    if (is_debug) {
+      package_name += "debug"
+    } else if (is_release) {
+      package_name += "release"
+    } else if (is_product) {
+      package_name += "product"
+    }
+    testonly = true
+    deps = [ ":fuchsia_test_component" ]
+  }
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 725055b..a03d376 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,35 @@
-## 2.9.0
+## 2.10.0
+
+### Core libraries
+
+#### `dart:typed_data`
+
+*   Class `BytesBuilder` is moved from `dart:io` to `dart:typed_data`.
+    It's temporarily being exported from `dart:io` as well.
+
+### Dart VM
+
+*   Introduces `Dart_FinalizableHandle`s. They do auto-delete, and the weakly
+    referred object cannot be accessed through them.
+
+### Tools
+
+#### Linter
+
+Updated the Linter to `0.1.118`, which includes:
+
+* New lint: `unnecessary_nullable_for_final_variable_declarations`.
+* Fixed NPE in `prefer_asserts_in_initializer_lists`.
+* Fixed range error in `unnecessary_string_escapes`.
+* `unsafe_html` updated to support unique error codes.
+* Updates to `diagnostic_describe_all_properties` to check for `Diagnosticable`s (not `DiagnosticableMixin`s).
+* New lint: `use_late`.
+* Fixed `unnecessary_lambdas` to respect deferred imports.
+* Updated `public_member_api_docs` to check mixins.
+* Updated `unnecessary_statements` to skip `as` expressions.
+* Fixed `prefer_relative_imports` to work with path dependencies.
+
+## 2.9.0 - 2020-08-05
 
 ### Language
 
@@ -116,19 +147,27 @@
 ### Pub
 * `pub run` and `pub global run` accepts a `--enable-experiment` flag enabling
   experiments in the Dart VM (and language).
+* Warn when publishing the first null-safe version of a package.
+* `pub outdated`:
+  * Introduce `--mode=null-safety` flag that will report which of your
+    dependencies you can upgrade to fully support null safety.
+  * If the current version of a dependency is a prerelease
+    version, use prereleases for latest if there is no newer stable.
+  * Don't require a `pubspec.lock` file. When the lockfile is missing, the
+    **Current** column is empty.
+* `pub upgrade`: Show summary count of outdated packages after running.
+  It will also only show newer packages if they are not prereleases or
+  the package is already a prerelease.
 * Publishing Flutter plugins using the old plugin format is no longer allowed.
   Plugins using the old plugin format can still be consumed.
-* Introduce `pub outdated --mode=null-safety` that will report which of your
-  dependencies you can upgrade to fully support null safety.
-* Fix `pub run` precompilation with relative `PUB_CACHE` paths (#2486)
-* 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)
+* `pub run`: Fix precompilation with relative `PUB_CACHE` paths
+  ([#2486](https://github.com/dart-lang/pub/pull/2486)).
+* Preserve Windows line endings in `pubspec.lock` if they are already there
+  ([#2489](https://github.com/dart-lang/pub/pull/2489)).
 * Better terminal color-detection. Use colors in terminals on Windows.
-* `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.
-* `pub upgrade`: Show summary count of outdated packages after running.
+* Fix git folder names in cache, allowing for ssh-style git
+  dependencies.
+* Fix: Avoid precompilation of dependencies of global packages.
 
 ## 2.8.4 - 2020-06-04
 
diff --git a/DEPS b/DEPS
index 4110d3e..e03a4be 100644
--- a/DEPS
+++ b/DEPS
@@ -39,25 +39,25 @@
 
   # Checked-in SDK version. The checked-in SDK is a Dart SDK distribution in a
   # cipd package used to run Dart scripts in the build and test infrastructure.
-  "sdk_tag": "version:2.9.0-18.0.dev",
+  "sdk_tag": "version:2.10.0-3.0.dev",
 
   # 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": "4035c66f0cacb70064395473cb54d810c046c225",
-  "co19_2_rev": "620c1148c8b7a3d7f74afacf348c46f109eb64f2",
+  "co19_rev": "74eec903ea06fa09dc8799b0552d55b581a82996",
+  "co19_2_rev": "e48b3090826cf40b8037648f19d211e8eab1b4b6",
 
   # The internal benchmarks to use. See go/dart-benchmarks-internal
-  "benchmarks_internal_rev": "88af52754f272e7a4c5737b7e003c2ed9e8a754f",
+  "benchmarks_internal_rev": "991d4cb32af0e914763ebbdeced91395bed874d8",
   "checkout_benchmarks_internal": False,
 
   # As Flutter does, we use Fuchsia's GN and Clang toolchain. These revision
   # should be kept up to date with the revisions pulled by the Flutter engine.
   # The list of revisions for these tools comes from Fuchsia, here:
-  # https://fuchsia.googlesource.com/buildtools/+/master/fuchsia.ensure
+  # https://fuchsia.googlesource.com/integration/+/HEAD/prebuilts
   # If there are problems with the toolchain, contact fuchsia-toolchain@.
   "clang_revision": "7e9747b50bcb1be28d4a3236571e8050835497a6",
-  "gn_revision": "239533d2d91a04b3317ca9101cf7189f4e651e4d",
+  "gn_revision": "1e3fd10c5df6b704fc764ee388149e4f32862823",
 
   # Scripts that make 'git cl format' work.
   "clang_format_scripts_rev": "c09c8deeac31f05bd801995c475e7c8070f9ecda",
@@ -66,20 +66,20 @@
 
   # Revisions of /third_party/* dependencies.
   "args_tag": "1.6.0",
-  "async_rev": "e0c41e0c1fb70ba606dc81335c981af7c00987c6",
+  "async_rev": "128c461a97dbdbd9336ba000ba5a5c02e79b8651",
   "bazel_worker_rev": "26680d5e249b249c7216ab2fed0ac8ed4ee285c5",
-  "benchmark_harness_rev": "81641290dea44c34138a109a37e215482f405f81",
-  "boolean_selector_rev": "1309eabed510cc3b7536fd4367d39b97ebee3d69",
+  "benchmark_harness_rev": "ec6b646f5443faa871e126ac1ba248c94ca06257",
+  "boolean_selector_rev": "665e6921ab246569420376f827bff4585dff0b14",
   "boringssl_gen_rev": "429ccb1877f7987a6f3988228bc2440e61293499",
   "boringssl_rev" : "4dfd5af70191b068aebe567b8e29ce108cee85ce",
   "browser-compat-data_tag": "v1.0.22",
-  "charcode_rev": "9085e6b6127f084d66c0a94810a808121459012a",
+  "charcode_rev": "af1e2d59a9c383da94f99ea51dac4b93fb0626c4",
   "chrome_rev" : "19997",
-  "cli_util_tag" : "0.1.4",
-  "collection_rev": "80f5b6de8a8d8d584732a71bb59912da3e44883b",
-  "convert_rev": "49bde5b371eb5c2c8e721557cf762f17c75e49fc",
+  "cli_util_tag" : "0.2.0",
+  "collection_rev": "583693680fc067e34ca5b72503df25e8b80579f9",
+  "convert_rev": "c1b01f832835d3d8a06b0b246a361c0eaab35d3c",
   "crypto_rev": "7422fb2f6584fe1839eb30bc4ca56e9f9760b801",
-  "csslib_rev": "bf372d4fdc6dfa232ad93f77a0a3de0891edd04c",
+  "csslib_rev": "451448a9ac03f87a8d0377fc0b411d8c388a6cb4",
   "dart2js_info_tag" : "0.6.0",
 
   # Note: Updates to dart_style have to be coordinated with the infrastructure
@@ -96,38 +96,39 @@
   # For more details, see https://github.com/dart-lang/sdk/issues/30164
   "dart_style_tag": "1.3.6",  # Please see the note above before updating.
 
-  "dartdoc_tag" : "v0.32.1",
+  "chromedriver_tag": "83.0.4103.39",
+  "dartdoc_rev" : "6d5396c2b4bc415ab9cb3d8212b87ecffd90a272",
   "ffi_rev": "454ab0f9ea6bd06942a983238d8a6818b1357edb",
-  "fixnum_rev": "9b38f49f6679654d66a363e69e48173cca07e882",
+  "fixnum_rev": "300c3f025e94a72b7b6770e15f76a4de15f77668",
   "glob_rev": "e9f4e6b7ae8abe5071461cf8f47191bb19cf7ef6",
   "html_rev": "083a36cd801a4b787ba156b7c6e4c8b2e2daed4a",
   "http_io_rev": "2fa188caf7937e313026557713f7feffedd4978b",
   "http_multi_server_rev" : "ea269f79321d659208402088f3297e8920a88ee6",
   "http_parser_rev": "6e63a97b5aaa2b4d1215fe01683e51fb73258e54",
   "http_retry_tag": "0.1.1",
-  "http_rev": "a131e563c09349f624d5421237183a06fb10552d",
+  "http_rev": "7b55a2c62a5f6fb680ad7a4607bab7281a235563",
   "http_throttle_tag" : "1.0.2",
   "icu_rev" : "79326efe26e5440f530963704c3c0ff965b3a4ac",
   "idl_parser_rev": "5fb1ebf49d235b5a70c9f49047e83b0654031eb7",
   "intl_tag": "0.16.1",
   "jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
   "json_rpc_2_rev": "d589e635d8ccb7cda6a804bd571f88abbabab146",
-  "linter_tag": "0.1.117",
+  "linter_tag": "0.1.118",
   "logging_rev": "9561ba016ae607747ae69b846c0e10958ca58ed4",
   "markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
-  "markdown_rev": "dd150bb64c5f3b41d31f20f399ae2a855f7f8c00",
-  "matcher_rev": "af4fe7daf8e94a46981e4f072872be550a6969e9",
+  "markdown_rev": "acaddfe74217f62498b5cf0cf5429efa6a700be3",
+  "matcher_rev": "9cae8faa7868bf3a88a7ba45eb0bd128e66ac515",
   "mime_rev": "179b5e6a88f4b63f36dc1b8fcbc1e83e5e0cd3a7",
   "mockito_rev": "d39ac507483b9891165e422ec98d9fb480037c8b",
   "mustache_rev": "664737ecad027e6b96d0d1e627257efa0e46fcb1",
   "oauth2_tag": "1.6.0",
   "package_config_rev": "9c586d04bd26fef01215fd10e7ab96a3050cfa64",
-  "path_rev": "4f3bb71843fe5493ba490828a1721821d7b33746",
-  "pedantic_tag": "v1.9.0",
+  "path_rev": "62ecd5a78ffe5734d14ed0df76d20309084cd04a",
+  "pedantic_rev": "24b38df72430d7e21cb4257828580becb9a39c72",
   "ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
-  "pool_rev": "86fbb2cde9bbc66c8d159909d2f65a5981ea5b50",
+  "pool_rev": "eedbd5fde84f9a1a8da643b475305a81841da599",
   "protobuf_rev": "3746c8fd3f2b0147623a8e3db89c3ff4330de760",
-  "pub_rev": "85bdb898aeb2ac7cea76489ba0bf4e52ff7a79bf",
+  "pub_rev": "04b054b62cc437cf23451785fdc50e49cd9de139",
   "pub_semver_tag": "v1.4.4",
   "quiver-dart_tag": "246e754fe45cecb6aa5f3f13b4ed61037ff0d784",
   "resource_rev": "f8e37558a1c4f54550aa463b88a6a831e3e33cd6",
@@ -138,23 +139,27 @@
   "shelf_proxy_tag": "0.1.0+7",
   "shelf_tag": "0.7.3+3",
   "shelf_web_socket_tag": "0.2.2+3",
-  "source_map_stack_trace_tag": "2.0.0",
+  "source_map_stack_trace_rev": "1c3026f69d9771acf2f8c176a1ab750463309cce",
   "source_maps-0.9.4_rev": "38524",
-  "source_maps_rev": "87b4fd9027378bbd51b02e9d7df794eee8a82b7a",
-  "source_span_tag": "1.7.0",
-  "stack_trace_tag": "56811dbb2530d823b764fe167ec335879a4adb32",
+  "source_maps_rev": "53eb92ccfe6e64924054f83038a534b959b12b3e",
+  "source_span_rev": "94833d6cbf4552ebe5d2aa6714acecd93834e53a",
+  "sse_tag": "e5cf68975e8e87171a3dc297577aa073454a91dc",
+  "stack_trace_tag": "d3813ca0a77348e0faf0d6af0cc17913e36afa39",
   "stagehand_tag": "v3.3.9",
-  "stream_channel_tag": "70433d577be02c48cb16d72d65654f3b4d82c6ed",
-  "string_scanner_rev": "a918e7371af6b6e73bfd534ff9da6084741c1f99",
+  "stream_channel_tag": "c446774fd077c9bdbd6235a7aadc661ef60a9727",
+  "string_scanner_rev": "1b63e6e5db5933d7be0a45da6e1129fe00262734",
+  "sync_http_rev": "a85d7ec764ea485cbbc49f3f3e7f1b43f87a1c74",
   "test_descriptor_tag": "1.1.1",
   "test_process_tag": "1.0.3",
-  "term_glyph_rev": "b3da31e9684a99cfe5f192b89914492018b44da7",
+  "term_glyph_rev": "6a0f9b6fb645ba75e7a00a4e20072678327a0347",
   "test_reflective_loader_tag": "0.1.9",
-  "test_rev": "718fe6f93c4655208460f28e89d887c5ef4144c5",
+  "test_rev": "c6b3fe63eda87da1687580071cad1eefd575f851",
   "tflite_native_rev": "3c777c40608a2a9f1427bfe0028ab48e7116b4c1",
-  "typed_data_tag": "0c369b73a9b7ebf042c06512951bfe5b52b84a5f",
+  "typed_data_tag": "f94fc57b8e8c0e4fe4ff6cfd8290b94af52d3719",
   "usage_tag": "3.4.0",
+  "vector_math_rev": "0c9f5d68c047813a6dcdeb88ba7a42daddf25025",
   "watcher_rev": "fc3c9aae5d31d707b3013b42634dde8d8a1161b4",
+  "webdriver_rev": "5a8d6805d9cf8a3cbb4fcd64849b538b7491e50e",
   "web_components_rev": "8f57dac273412a7172c8ade6f361b407e2e4ed02",
   "web_socket_channel_rev": "490061ef0e22d3c8460ad2802f9948219365ad6b",
   "WebCore_rev": "fb11e887f77919450e497344da570d780e078bc8",
@@ -167,7 +172,7 @@
   # Pinned browser versions used by the testing infrastructure. These are not
   # meant to be downloaded by users for local testing.
   "download_chrome": False,
-  "chrome_tag": "81",
+  "chrome_tag": "84",
   "download_firefox": False,
   "firefox_tag": "67",
 
@@ -321,7 +326,7 @@
   Var("dart_root") + "/third_party/pkg/dart2js_info":
       Var("dart_git") + "dart2js_info.git" + "@" + Var("dart2js_info_tag"),
   Var("dart_root") + "/third_party/pkg/dartdoc":
-      Var("dart_git") + "dartdoc.git" + "@" + Var("dartdoc_tag"),
+      Var("dart_git") + "dartdoc.git" + "@" + Var("dartdoc_rev"),
   Var("dart_root") + "/third_party/pkg/ffi":
       Var("dart_git") + "ffi.git" + "@" + Var("ffi_rev"),
   Var("dart_root") + "/third_party/pkg/fixnum":
@@ -373,7 +378,7 @@
   Var("dart_root") + "/third_party/pkg/path":
       Var("dart_git") + "path.git" + "@" + Var("path_rev"),
   Var("dart_root") + "/third_party/pkg/pedantic":
-      Var("dart_git") + "pedantic.git" + "@" + Var("pedantic_tag"),
+      Var("dart_git") + "pedantic.git" + "@" + Var("pedantic_rev"),
   Var("dart_root") + "/third_party/pkg/pool":
       Var("dart_git") + "pool.git" + "@" + Var("pool_rev"),
   Var("dart_root") + "/third_party/pkg/protobuf":
@@ -403,10 +408,12 @@
   Var("dart_root") + "/third_party/pkg/source_maps":
       Var("dart_git") + "source_maps.git" + "@" + Var("source_maps_rev"),
   Var("dart_root") + "/third_party/pkg/source_span":
-      Var("dart_git") + "source_span.git" + "@" + Var("source_span_tag"),
+      Var("dart_git") + "source_span.git" + "@" + Var("source_span_rev"),
   Var("dart_root") + "/third_party/pkg/source_map_stack_trace":
       Var("dart_git") + "source_map_stack_trace.git" +
-      "@" + Var("source_map_stack_trace_tag"),
+      "@" + Var("source_map_stack_trace_rev"),
+  Var("dart_root") + "/third_party/pkg/sse":
+      Var("dart_git") + "sse.git" + "@" + Var("sse_tag"),
   Var("dart_root") + "/third_party/pkg/stack_trace":
       Var("dart_git") + "stack_trace.git" + "@" + Var("stack_trace_tag"),
   Var("dart_root") + "/third_party/pkg/stagehand":
@@ -417,6 +424,8 @@
   Var("dart_root") + "/third_party/pkg/string_scanner":
       Var("dart_git") + "string_scanner.git" +
       "@" + Var("string_scanner_rev"),
+  Var("dart_root") + "/third_party/pkg/sync_http":
+      Var("dart_git") + "sync_http.git" + "@" + Var("sync_http_rev"),
   Var("dart_root") + "/third_party/pkg/term_glyph":
       Var("dart_git") + "term_glyph.git" + "@" + Var("term_glyph_rev"),
   Var("dart_root") + "/third_party/pkg/test":
@@ -434,11 +443,18 @@
       Var("dart_git") + "typed_data.git" + "@" + Var("typed_data_tag"),
   Var("dart_root") + "/third_party/pkg/usage":
       Var("dart_git") + "usage.git" + "@" + Var("usage_tag"),
+  Var("dart_root") + "/third_party/pkg/vector_math":
+      Var("dart_git") + "external/github.com/google/vector_math.dart.git" +
+      "@" + Var("vector_math_rev"),
   Var("dart_root") + "/third_party/pkg/watcher":
       Var("dart_git") + "watcher.git" + "@" + Var("watcher_rev"),
   Var("dart_root") + "/third_party/pkg/web_components":
       Var("dart_git") + "web-components.git" +
       "@" + Var("web_components_rev"),
+  Var("dart_root") + "/third_party/pkg/webdriver":
+      Var("dart_git") + "external/github.com/google/webdriver.dart.git" +
+      "@" + Var("webdriver_rev"),
+
   Var("dart_root") + "/third_party/pkg/web_socket_channel":
       Var("dart_git") + "web_socket_channel.git" +
       "@" + Var("web_socket_channel_rev"),
@@ -456,6 +472,17 @@
       "dep_type": "cipd",
   },
 
+  Var("dart_root") + "/third_party/webdriver/chrome": {
+    "packages": [
+      {
+        "package": "dart/third_party/chromedriver/${{platform}}",
+        "version": "version:" + Var("chromedriver_tag"),
+      }
+    ],
+    "condition": "host_cpu == 'x64'",
+    "dep_type": "cipd",
+  },
+
   Var("dart_root") + "/pkg/analysis_server/language_model": {
     "packages": [
       {
@@ -512,7 +539,7 @@
     "packages": [
       {
         "package": "dart/cfe/dart2js_dills",
-        "version": "binary_version:43_2",
+        "version": "binary_version:44_2",
       }
     ],
     "dep_type": "cipd",
@@ -650,12 +677,6 @@
     'pattern': '.',
     'action': ['python', 'sdk/build/vs_toolchain.py', 'update'],
   },
-  {
-    # Download dill files for all supported ABI versions, if necessary.
-    'name': 'abiversions',
-    'pattern': '.',
-    'action': ['python', 'sdk/tools/download_abi_dills.py'],
-  },
 ]
 
 hooks_os = {
diff --git a/benchmarks/IsolateSpawn/dart/helloworld.dart b/benchmarks/IsolateSpawn/dart/helloworld.dart
index 8977e0f..01af7fa 100644
--- a/benchmarks/IsolateSpawn/dart/helloworld.dart
+++ b/benchmarks/IsolateSpawn/dart/helloworld.dart
@@ -1,3 +1,3 @@
-main() {
+void main() {
   print('Hello, world!');
 }
diff --git a/benchmarks/IsolateSpawn/dart2/helloworld.dart b/benchmarks/IsolateSpawn/dart2/helloworld.dart
index 8977e0f..01af7fa 100644
--- a/benchmarks/IsolateSpawn/dart2/helloworld.dart
+++ b/benchmarks/IsolateSpawn/dart2/helloworld.dart
@@ -1,3 +1,3 @@
-main() {
+void main() {
   print('Hello, world!');
 }
diff --git a/benchmarks/IsolateSpawnMemory/dart/helloworld.dart b/benchmarks/IsolateSpawnMemory/dart/helloworld.dart
index 8977e0f..01af7fa 100644
--- a/benchmarks/IsolateSpawnMemory/dart/helloworld.dart
+++ b/benchmarks/IsolateSpawnMemory/dart/helloworld.dart
@@ -1,3 +1,3 @@
-main() {
+void main() {
   print('Hello, world!');
 }
diff --git a/benchmarks/IsolateSpawnMemory/dart2/helloworld.dart b/benchmarks/IsolateSpawnMemory/dart2/helloworld.dart
index 8977e0f..01af7fa 100644
--- a/benchmarks/IsolateSpawnMemory/dart2/helloworld.dart
+++ b/benchmarks/IsolateSpawnMemory/dart2/helloworld.dart
@@ -1,3 +1,3 @@
-main() {
+void main() {
   print('Hello, world!');
 }
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 10a97c7..336445e 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -258,6 +258,12 @@
         [ "//build/config/gcc:symbol_visibility_hidden" ]
   }
 }
+if (is_fuchsia) {
+  _native_compiler_configs += [
+    "//third_party/fuchsia/sdk/linux/build/config:compiler",
+    "//third_party/fuchsia/sdk/linux/build/config:runtime_library",
+  ]
+}
 
 if (is_linux) {
   _native_compiler_configs += [ "//build/config/linux:sdk" ]
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 2db2871..3e06c16 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -377,7 +377,7 @@
 #   configs -= [ "//build/config/compiler:clang_stackrealign" ]
 # See https://crbug.com/556393 for details of where it must be avoided.
 config("clang_stackrealign") {
-  if (is_clang && current_cpu == "x86" && !is_nacl) {
+  if (is_clang && current_cpu == "x86" && !is_nacl && !is_win) {
     cflags = [
       # Align the stack on 16-byte boundaries, http://crbug.com/418554.
       "-mstack-alignment=16",
@@ -516,14 +516,14 @@
 
   if (is_clang) {
     default_warning_flags += [
-      "-Wno-deprecated-declarations", # crashpad
-      "-Wno-ignored-pragma-optimize", # icu, double-conversion
-      "-Wno-implicit-int-float-conversion", # icu
+      "-Wno-deprecated-declarations",  # crashpad
+      "-Wno-ignored-pragma-optimize",  # icu, double-conversion
+      "-Wno-implicit-int-float-conversion",  # icu
       "-Wno-macro-redefined",
       "-Wno-microsoft-cast",
       "-Wno-microsoft-unqualified-friend",
-      "-Wno-unknown-argument", # icu
-      "-Wno-unused-value", # crashpad
+      "-Wno-unknown-argument",  # icu
+      "-Wno-unused-value",  # crashpad
     ]
   } else {
     default_warning_flags += [
diff --git a/build/dart/dart_action.gni b/build/dart/dart_action.gni
index 2058f033..c357aad 100644
--- a/build/dart/dart_action.gni
+++ b/build/dart/dart_action.gni
@@ -288,6 +288,10 @@
 #  script:
 #    The un-rebased path to the Dart script.
 #
+#  dfe (optional):
+#    Sets the DFE file used by Dart. If not set the VM will attempt to load it
+#    from a snapshot, or fall back on its built-in kernel.
+#
 #  vm_args (optional):
 #    Arguments to pass to the Dart VM.
 #
@@ -323,6 +327,17 @@
                                "visibility",
                                "vm_args",
                              ])
+
+      # Dart has an implicit dependency on the kernel service so unless DFE is
+      # passed, we need to add this dep.
+      if (defined(invoker.dfe)) {
+        vm_args += [ "--dfe=" + rebase_path(invoker.dfe) ]
+      } else {
+        if (!defined(invoker.deps)) {
+          deps = []
+        }
+        deps += [ "$_dart_root/utils/kernel-service:kernel-service" ]
+      }
     }
   } else {
     prebuilt_dart_action(target_name) {
diff --git a/build/fuchsia/config/clang/BUILD.gn b/build/fuchsia/config/clang/BUILD.gn
new file mode 100644
index 0000000..be74d08
--- /dev/null
+++ b/build/fuchsia/config/clang/BUILD.gn
@@ -0,0 +1,31 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/fuchsia/config/clang/clang.gni")
+
+# This adds the runtime deps for C++ for usage when cross compiling.
+group("c++-runtime-deps") {
+  data_deps = [
+    ":clang-runtime-libs",
+  ]
+}
+
+copy("clang-runtime-libs") {
+  if (target_cpu == "arm64") {
+    arch = "aarch64"
+  } else if (target_cpu == "x64") {
+    arch = "x86_64"
+  }
+  vendor = "unknown"
+
+  sys = target_os
+  sources = [
+    "${clang_base_path}/lib/${arch}-${vendor}-${sys}/c++/libc++.so.2.0",
+    "${clang_base_path}/lib/${arch}-${vendor}-${sys}/c++/libc++abi.so.1.0",
+    "${clang_base_path}/lib/${arch}-${vendor}-${sys}/c++/libunwind.so.1.0",
+  ]
+  outputs = [
+    "${root_out_dir}/lib/{{source_name_part}}",
+  ]
+}
diff --git a/build/fuchsia/config/clang/clang.gni b/build/fuchsia/config/clang/clang.gni
new file mode 100644
index 0000000..8617aa5
--- /dev/null
+++ b/build/fuchsia/config/clang/clang.gni
@@ -0,0 +1,7 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+declare_args() {
+  clang_base_path = "//buildtools/linux-x64/clang"
+}
diff --git a/build/fuchsia/dart.cmx b/build/fuchsia/dart.cmx
new file mode 100644
index 0000000..f8f5750
--- /dev/null
+++ b/build/fuchsia/dart.cmx
@@ -0,0 +1,28 @@
+{
+  "program": {
+    "binary": "exe.stripped/dart"
+  },
+  "sandbox": {
+    "features": [
+      "config-data",
+      "deprecated-ambient-replace-as-executable",
+      "root-ssl-certificates",
+      "isolated-cache-storage",
+      "isolated-persistent-storage",
+      "isolated-temp"
+    ],
+    "services": [
+      "fuchsia.deprecatedtimezone.Timezone",
+      "fuchsia.device.NameProvider",
+      "fuchsia.feedback.CrashReporter",
+      "fuchsia.intl.PropertyProvider",
+      "fuchsia.logger.LogSink",
+      "fuchsia.net.NameLookup",
+      "fuchsia.netstack.Netstack",
+      "fuchsia.posix.socket.Provider",
+      "fuchsia.sysmem.Allocator",
+      "fuchsia.timezone.Timezone",
+      "fuchsia.tracing.provider.Registry"
+    ]
+  }
+}
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 2c1839f..c6f28d3 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -130,7 +130,7 @@
       temporary_tocname = dylib + ".tmp"
 
       does_reexport_command = "[ ! -e $dylib -o ! -e $tocname ] || otool -l $dylib | grep -q LC_REEXPORT_DYLIB"
-      link_command = "$ld -shared $sysroot_flags $toolchain_flags {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}}"
+      link_command = "$ld -shared $sysroot_flags $toolchain_flags {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}} {{frameworks}}"
       replace_command = "if ! cmp -s $temporary_tocname $tocname; then mv $temporary_tocname $tocname"
       extract_toc_command = "{ otool -l $dylib | grep LC_ID_DYLIB -A 5; nm -gP $dylib | cut -f1-2 -d' ' | grep -v U\$\$; true; }"
 
@@ -171,7 +171,7 @@
         stripped_outfile = "{{root_out_dir}}/exe.stripped/$exename"
       }
 
-      command = "$ld $sysroot_flags $toolchain_flags {{ldflags}} -Xlinker -rpath -Xlinker @executable_path/Frameworks -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}}"
+      command = "$ld $sysroot_flags $toolchain_flags {{ldflags}} -Xlinker -rpath -Xlinker @executable_path/Frameworks -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}} {{frameworks}}"
       if (defined(invoker.strip)) {
         strip = invoker.strip
         strip_command = "${strip} -x -o $stripped_outfile $outfile"
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 6893a79..82c40dc 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
@@ -576,9 +576,6 @@
 
   /// Retrieves the type that the [variable] is promoted to, if the [variable]
   /// is currently promoted.  Otherwise returns `null`.
-  ///
-  /// For testing only.  Please use [variableRead] instead.
-  @visibleForTesting
   Type promotedType(Variable variable);
 
   /// Call this method just before visiting one of the cases in the body of a
@@ -1512,24 +1509,32 @@
     }
 
     List<Type> newPromotedTypes = info.promotedTypes;
+    bool newReachable = reachable;
     if (promotedType != null) {
       newPromotedTypes =
           VariableModel._addToPromotedTypes(info.promotedTypes, promotedType);
+      if (typeOperations.isNever(promotedType)) {
+        newReachable = false;
+      }
     }
 
     return identical(newTested, info.tested) &&
-            identical(newPromotedTypes, info.promotedTypes)
+            identical(newPromotedTypes, info.promotedTypes) &&
+            newReachable == reachable
         ? this
         : _updateVariableInfo(
             variable,
             new VariableModel<Variable, Type>(newPromotedTypes, newTested,
-                info.assigned, info.unassigned, info.writeCaptured));
+                info.assigned, info.unassigned, info.writeCaptured),
+            reachable: newReachable);
   }
 
   /// Returns a new [FlowModel] where the information for [variable] is replaced
   /// with [model].
   FlowModel<Variable, Type> _updateVariableInfo(
-      Variable variable, VariableModel<Variable, Type> model) {
+      Variable variable, VariableModel<Variable, Type> model,
+      {bool reachable}) {
+    reachable ??= this.reachable;
     Map<Variable, VariableModel<Variable, Type>> newVariableInfo =
         new Map<Variable, VariableModel<Variable, Type>>.from(variableInfo);
     newVariableInfo[variable] = model;
@@ -1667,6 +1672,14 @@
   /// initializer).
   bool isLocalVariableWithoutDeclaredType(Variable variable);
 
+  /// Determines whether the given [type] is equivalent to the `Never` type.
+  ///
+  /// A type is equivalent to `Never` if it:
+  /// (a) is the `Never` type itself.
+  /// (b) is a type variable that extends `Never`, OR
+  /// (c) is a type variable that has been promoted to `Never`
+  bool isNever(Type type);
+
   /// Returns `true` if [type1] and [type2] are the same type.
   bool isSameType(Type type1, Type type2);
 
@@ -1804,7 +1817,10 @@
     bool newUnassigned = unassigned && otherModel.unassigned;
     bool newWriteCaptured = writeCaptured || otherModel.writeCaptured;
     List<Type> newPromotedTypes;
-    if (unsafe) {
+    if (newWriteCaptured) {
+      // Write-captured variables can't be promoted
+      newPromotedTypes = null;
+    } else if (unsafe) {
       // There was an assignment to the variable in the "this" path, so none of
       // the promotions from the "other" path can be used.
       newPromotedTypes = thisPromotedTypes;
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 309004e..7ee3d3f 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -46,6 +46,53 @@
         r"""Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeAbstractExtensionField = messageAbstractExtensionField;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageAbstractExtensionField = const MessageCode(
+    "AbstractExtensionField",
+    message: r"""Extension fields can't be declared 'abstract'.""",
+    tip: r"""Try removing the 'abstract' keyword.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeAbstractExternalField = messageAbstractExternalField;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageAbstractExternalField = const MessageCode(
+    "AbstractExternalField",
+    message: r"""Fields can't be declared both 'abstract' and 'external'.""",
+    tip: r"""Try removing the 'abstract' or 'external' keyword.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeAbstractFieldConstructorInitializer =
+    messageAbstractFieldConstructorInitializer;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageAbstractFieldConstructorInitializer = const MessageCode(
+    "AbstractFieldConstructorInitializer",
+    message: r"""Abstract fields cannot have initializers.""",
+    tip:
+        r"""Try removing the field initializer or the 'abstract' keyword from the field declaration.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeAbstractFieldInitializer = messageAbstractFieldInitializer;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageAbstractFieldInitializer = const MessageCode(
+    "AbstractFieldInitializer",
+    message: r"""Abstract fields cannot have initializers.""",
+    tip: r"""Try removing the initializer or the 'abstract' keyword.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeAbstractLateField = messageAbstractLateField;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageAbstractLateField = const MessageCode(
+    "AbstractLateField",
+    message: r"""Abstract fields cannot be late.""",
+    tip: r"""Try removing the 'abstract' or 'late' keyword.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeAbstractNotSync = messageAbstractNotSync;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -82,6 +129,15 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeAbstractStaticField = messageAbstractStaticField;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageAbstractStaticField = const MessageCode(
+    "AbstractStaticField",
+    message: r"""Static fields can't be declared 'abstract'.""",
+    tip: r"""Try removing the 'abstract' or 'static' keyword.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(String name)> templateAccessError =
     const Template<Message Function(String name)>(
         messageTemplate: r"""Access error: '#name'.""",
@@ -1253,6 +1309,14 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalNonNull = messageConstEvalNonNull;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalNonNull = const MessageCode(
+    "ConstEvalNonNull",
+    message: r"""Constant expression must be non-null.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeConstEvalNotListOrSetInSpread =
     messageConstEvalNotListOrSetInSpread;
 
@@ -2244,95 +2308,6 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name)> templateDuplicatedLibraryExport =
-    const Template<Message Function(String name)>(
-        messageTemplate:
-            r"""A library with name '#name' is exported more than once.""",
-        withArguments: _withArgumentsDuplicatedLibraryExport);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name)> codeDuplicatedLibraryExport =
-    const Code<Message Function(String name)>(
-        "DuplicatedLibraryExport", templateDuplicatedLibraryExport,
-        analyzerCodes: <String>["EXPORT_DUPLICATED_LIBRARY_NAMED"]);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsDuplicatedLibraryExport(String name) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  return new Message(codeDuplicatedLibraryExport,
-      message: """A library with name '${name}' is exported more than once.""",
-      arguments: {'name': name});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name)>
-    templateDuplicatedLibraryExportContext =
-    const Template<Message Function(String name)>(
-        messageTemplate: r"""'#name' is also exported here.""",
-        withArguments: _withArgumentsDuplicatedLibraryExportContext);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name)> codeDuplicatedLibraryExportContext =
-    const Code<Message Function(String name)>("DuplicatedLibraryExportContext",
-        templateDuplicatedLibraryExportContext,
-        severity: Severity.context);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsDuplicatedLibraryExportContext(String name) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  return new Message(codeDuplicatedLibraryExportContext,
-      message: """'${name}' is also exported here.""",
-      arguments: {'name': name});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name)> templateDuplicatedLibraryImport =
-    const Template<Message Function(String name)>(
-        messageTemplate:
-            r"""A library with name '#name' is imported more than once.""",
-        withArguments: _withArgumentsDuplicatedLibraryImport);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name)> codeDuplicatedLibraryImport =
-    const Code<Message Function(String name)>(
-        "DuplicatedLibraryImport", templateDuplicatedLibraryImport,
-        analyzerCodes: <String>["IMPORT_DUPLICATED_LIBRARY_NAMED"],
-        severity: Severity.warning);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsDuplicatedLibraryImport(String name) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  return new Message(codeDuplicatedLibraryImport,
-      message: """A library with name '${name}' is imported more than once.""",
-      arguments: {'name': name});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name)>
-    templateDuplicatedLibraryImportContext =
-    const Template<Message Function(String name)>(
-        messageTemplate: r"""'#name' is also imported here.""",
-        withArguments: _withArgumentsDuplicatedLibraryImportContext);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name)> codeDuplicatedLibraryImportContext =
-    const Code<Message Function(String name)>("DuplicatedLibraryImportContext",
-        templateDuplicatedLibraryImportContext,
-        severity: Severity.context);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsDuplicatedLibraryImportContext(String name) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  return new Message(codeDuplicatedLibraryImportContext,
-      message: """'${name}' is also imported here.""",
-      arguments: {'name': name});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(Token token)> templateDuplicatedModifier =
     const Template<Message Function(Token token)>(
         messageTemplate: r"""The modifier '#lexeme' was already specified.""",
@@ -3271,6 +3246,35 @@
         r"""Try removing the keyword 'external', or replacing the field by an external getter and/or setter.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeExternalFieldConstructorInitializer =
+    messageExternalFieldConstructorInitializer;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageExternalFieldConstructorInitializer = const MessageCode(
+    "ExternalFieldConstructorInitializer",
+    message: r"""External fields cannot have initializers.""",
+    tip:
+        r"""Try removing the field initializer or the 'external' keyword from the field declaration.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeExternalFieldInitializer = messageExternalFieldInitializer;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageExternalFieldInitializer = const MessageCode(
+    "ExternalFieldInitializer",
+    message: r"""External fields cannot have initializers.""",
+    tip: r"""Try removing the initializer or the 'external' keyword.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeExternalLateField = messageExternalLateField;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageExternalLateField = const MessageCode(
+    "ExternalLateField",
+    message: r"""External fields cannot be late.""",
+    tip: r"""Try removing the 'external' or 'late' keyword.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeExternalMethodWithBody = messageExternalMethodWithBody;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5406,6 +5410,38 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeJsInteropAnonymousFactoryPositionalParameters =
+    messageJsInteropAnonymousFactoryPositionalParameters;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageJsInteropAnonymousFactoryPositionalParameters =
+    const MessageCode("JsInteropAnonymousFactoryPositionalParameters",
+        message:
+            r"""Factory constructors for @anonymous JS interop classes should not contain any positional parameters.""",
+        tip: r"""Try replacing them with named parameters instead.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeJsInteropEnclosingClassJSAnnotation =
+    messageJsInteropEnclosingClassJSAnnotation;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageJsInteropEnclosingClassJSAnnotation = const MessageCode(
+    "JsInteropEnclosingClassJSAnnotation",
+    message:
+        r"""Member has a JS interop annotation but the enclosing class does not.""",
+    tip: r"""Try adding the annotation to the enclosing class.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeJsInteropEnclosingClassJSAnnotationContext =
+    messageJsInteropEnclosingClassJSAnnotationContext;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageJsInteropEnclosingClassJSAnnotationContext =
+    const MessageCode("JsInteropEnclosingClassJSAnnotationContext",
+        severity: Severity.context,
+        message: r"""This is the enclosing class.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeJsInteropIndexNotSupported =
     messageJsInteropIndexNotSupported;
 
@@ -5417,6 +5453,16 @@
     tip: r"""Try replacing with a normal method.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeJsInteropNamedParameters = messageJsInteropNamedParameters;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageJsInteropNamedParameters = const MessageCode(
+    "JsInteropNamedParameters",
+    message:
+        r"""Named parameters for JS interop functions are only allowed in a factory constructor of an @anonymous JS class.""",
+    tip: r"""Try replacing them with normal or optional parameters.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeJsInteropNonExternalConstructor =
     messageJsInteropNonExternalConstructor;
 
@@ -6277,14 +6323,6 @@
     message: r"""Can only use type variables in instance methods.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Null> codeNonNullAwareSpreadIsNull = messageNonNullAwareSpreadIsNull;
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const MessageCode messageNonNullAwareSpreadIsNull = const MessageCode(
-    "NonNullAwareSpreadIsNull",
-    message: r"""Can't spread a value with static type Null.""");
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(String name)>
     templateNonNullableLateDefinitelyAssignedError =
     const Template<Message Function(String name)>(
@@ -7873,6 +7911,46 @@
         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 Template<
+    Message Function(
+        List<String>
+            _names)> templateStrongModeNNBDPackageOptOut = const Template<
+        Message Function(List<String> _names)>(
+    messageTemplate:
+        r"""Cannot run with sound null safety as one or more dependencies do not
+support null safety:
+
+#names
+
+Run 'pub outdated --mode=null-safety' to determine if versions of your
+dependencies supporting null safety are available.""",
+    withArguments: _withArgumentsStrongModeNNBDPackageOptOut);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(List<String> _names)>
+    codeStrongModeNNBDPackageOptOut =
+    const Code<Message Function(List<String> _names)>(
+  "StrongModeNNBDPackageOptOut",
+  templateStrongModeNNBDPackageOptOut,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsStrongModeNNBDPackageOptOut(List<String> _names) {
+  if (_names.isEmpty) throw 'No names provided';
+  String names = itemizeNames(_names);
+  return new Message(codeStrongModeNNBDPackageOptOut,
+      message:
+          """Cannot run with sound null safety as one or more dependencies do not
+support null safety:
+
+${names}
+
+Run 'pub outdated --mode=null-safety' to determine if versions of your
+dependencies supporting null safety are available.""",
+      arguments: {'names': _names});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeSuperAsExpression = messageSuperAsExpression;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart b/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart
index c738205..2a728d5 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart
@@ -535,6 +535,7 @@
 
   @override
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -543,8 +544,16 @@
       int count,
       Token beginToken,
       Token endToken) {
-    listener?.endClassFields(externalToken, staticToken, covariantToken,
-        lateToken, varFinalOrConst, count, beginToken, endToken);
+    listener?.endClassFields(
+        abstractToken,
+        externalToken,
+        staticToken,
+        covariantToken,
+        lateToken,
+        varFinalOrConst,
+        count,
+        beginToken,
+        endToken);
   }
 
   @override
@@ -648,6 +657,7 @@
 
   @override
   void endExtensionFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -656,8 +666,16 @@
       int count,
       Token beginToken,
       Token endToken) {
-    listener?.endExtensionFields(externalToken, staticToken, covariantToken,
-        lateToken, varFinalOrConst, count, beginToken, endToken);
+    listener?.endExtensionFields(
+        abstractToken,
+        externalToken,
+        staticToken,
+        covariantToken,
+        lateToken,
+        varFinalOrConst,
+        count,
+        beginToken,
+        endToken);
   }
 
   @override
@@ -875,6 +893,7 @@
 
   @override
   void endMixinFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -883,8 +902,16 @@
       int count,
       Token beginToken,
       Token endToken) {
-    listener?.endMixinFields(externalToken, staticToken, covariantToken,
-        lateToken, varFinalOrConst, count, beginToken, endToken);
+    listener?.endMixinFields(
+        abstractToken,
+        externalToken,
+        staticToken,
+        covariantToken,
+        lateToken,
+        varFinalOrConst,
+        count,
+        beginToken,
+        endToken);
   }
 
   @override
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart b/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
index 479289a..53906bc 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
@@ -367,6 +367,7 @@
   ///
   /// Doesn't have a corresponding begin event, use [beginMember] instead.
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -386,6 +387,7 @@
   ///
   /// Doesn't have a corresponding begin event, use [beginMember] instead.
   void endMixinFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -395,8 +397,8 @@
       Token beginToken,
       Token endToken) {
     // TODO(danrubel): push implementation into subclasses
-    endClassFields(externalToken, staticToken, covariantToken, lateToken,
-        varFinalOrConst, count, beginToken, endToken);
+    endClassFields(abstractToken, externalToken, staticToken, covariantToken,
+        lateToken, varFinalOrConst, count, beginToken, endToken);
   }
 
   /// Handle the end of a extension field declaration.  Substructures:
@@ -407,6 +409,7 @@
   ///
   /// Doesn't have a corresponding begin event, use [beginMember] instead.
   void endExtensionFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -416,8 +419,8 @@
       Token beginToken,
       Token endToken) {
     // TODO(danrubel): push implementation into subclasses
-    endClassFields(externalToken, staticToken, covariantToken, lateToken,
-        varFinalOrConst, count, beginToken, endToken);
+    endClassFields(abstractToken, externalToken, staticToken, covariantToken,
+        lateToken, varFinalOrConst, count, beginToken, endToken);
   }
 
   /// Marks that the grammar term `forInitializerStatement` has been parsed and
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/modifier_context.dart b/pkg/_fe_analyzer_shared/lib/src/parser/modifier_context.dart
index 1ab8699..904871b 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/modifier_context.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/modifier_context.dart
@@ -97,10 +97,6 @@
   /// Parse modifiers for class methods and fields.
   Token parseClassMemberModifiers(Token token) {
     token = parseModifiers(token);
-    if (abstractToken != null) {
-      parser.reportRecoverableError(
-          abstractToken, codes.messageAbstractClassMember);
-    }
     reportExtraneousModifier(requiredToken);
     return token;
   }
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
index e994086..53e40dd 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
@@ -2464,6 +2464,7 @@
     }
     return parseFields(
         beforeStart,
+        /* abstractToken = */ null,
         externalToken,
         /* staticToken = */ null,
         /* covariantToken = */ null,
@@ -2479,6 +2480,7 @@
 
   Token parseFields(
       Token beforeStart,
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -2509,6 +2511,9 @@
         reportRecoverableError(varFinalOrConst, codes.messageTypeAfterVar);
       }
     }
+    if (abstractToken != null && externalToken != null) {
+      reportRecoverableError(abstractToken, codes.messageAbstractExternalField);
+    }
 
     Token token = typeInfo.parseType(beforeType, this);
     assert(token.next == name || token.next.isEof);
@@ -2532,12 +2537,12 @@
     }
 
     int fieldCount = 1;
-    token = parseFieldInitializerOpt(name, name, lateToken, externalToken,
-        varFinalOrConst, kind, enclosingDeclarationName);
+    token = parseFieldInitializerOpt(name, name, lateToken, abstractToken,
+        externalToken, varFinalOrConst, kind, enclosingDeclarationName);
     while (optional(',', token.next)) {
       name = ensureIdentifier(token.next, context);
-      token = parseFieldInitializerOpt(name, name, lateToken, externalToken,
-          varFinalOrConst, kind, enclosingDeclarationName);
+      token = parseFieldInitializerOpt(name, name, lateToken, abstractToken,
+          externalToken, varFinalOrConst, kind, enclosingDeclarationName);
       ++fieldCount;
     }
     Token semicolon = token.next;
@@ -2563,24 +2568,53 @@
     }
     switch (kind) {
       case DeclarationKind.TopLevel:
+        assert(abstractToken == null);
         listener.endTopLevelFields(externalToken, staticToken, covariantToken,
             lateToken, varFinalOrConst, fieldCount, beforeStart.next, token);
         break;
       case DeclarationKind.Class:
-        listener.endClassFields(externalToken, staticToken, covariantToken,
-            lateToken, varFinalOrConst, fieldCount, beforeStart.next, token);
+        listener.endClassFields(
+            abstractToken,
+            externalToken,
+            staticToken,
+            covariantToken,
+            lateToken,
+            varFinalOrConst,
+            fieldCount,
+            beforeStart.next,
+            token);
         break;
       case DeclarationKind.Mixin:
-        listener.endMixinFields(externalToken, staticToken, covariantToken,
-            lateToken, varFinalOrConst, fieldCount, beforeStart.next, token);
+        listener.endMixinFields(
+            abstractToken,
+            externalToken,
+            staticToken,
+            covariantToken,
+            lateToken,
+            varFinalOrConst,
+            fieldCount,
+            beforeStart.next,
+            token);
         break;
       case DeclarationKind.Extension:
+        if (abstractToken != null) {
+          reportRecoverableError(
+              firstName, codes.messageAbstractExtensionField);
+        }
         if (staticToken == null && externalToken == null) {
           reportRecoverableError(
               firstName, codes.messageExtensionDeclaresInstanceField);
         }
-        listener.endExtensionFields(externalToken, staticToken, covariantToken,
-            lateToken, varFinalOrConst, fieldCount, beforeStart.next, token);
+        listener.endExtensionFields(
+            abstractToken,
+            externalToken,
+            staticToken,
+            covariantToken,
+            lateToken,
+            varFinalOrConst,
+            fieldCount,
+            beforeStart.next,
+            token);
         break;
     }
     return token;
@@ -2655,6 +2689,7 @@
       Token token,
       Token name,
       Token lateToken,
+      Token abstractToken,
       Token externalToken,
       Token varFinalOrConst,
       DeclarationKind kind,
@@ -2678,6 +2713,7 @@
         } else if (kind == DeclarationKind.TopLevel &&
             optional("final", varFinalOrConst) &&
             lateToken == null &&
+            abstractToken == null &&
             externalToken == null) {
           reportRecoverableError(
               name,
@@ -2697,7 +2733,7 @@
       token = parseExpression(assignment);
       listener.endVariableInitializer(assignment);
     } else {
-      listener.handleNoVariableInitializer(token.next);
+      listener.handleNoVariableInitializer(token);
     }
     return token;
   }
@@ -3193,6 +3229,7 @@
     Token beforeStart = token = parseMetadataStar(token);
 
     Token covariantToken;
+    Token abstractToken;
     Token externalToken;
     Token lateToken;
     Token staticToken;
@@ -3203,6 +3240,9 @@
       if (optional('external', next)) {
         externalToken = token = next;
         next = token.next;
+      } else if (optional('abstract', next)) {
+        abstractToken = token = next;
+        next = token.next;
       }
       if (isModifier(next)) {
         if (optional('static', next)) {
@@ -3236,7 +3276,8 @@
               ..externalToken = externalToken
               ..lateToken = lateToken
               ..staticToken = staticToken
-              ..varFinalOrConst = varFinalOrConst;
+              ..varFinalOrConst = varFinalOrConst
+              ..abstractToken = abstractToken;
 
             token = context.parseClassMemberModifiers(token);
             next = token.next;
@@ -3246,6 +3287,7 @@
             lateToken = context.lateToken;
             staticToken = context.staticToken;
             varFinalOrConst = context.varFinalOrConst;
+            abstractToken = context.abstractToken;
 
             context = null;
           }
@@ -3285,6 +3327,10 @@
           if (beforeType != token) {
             reportRecoverableError(token, codes.messageTypeBeforeFactory);
           }
+          if (abstractToken != null) {
+            reportRecoverableError(
+                abstractToken, codes.messageAbstractClassMember);
+          }
           token = parseFactoryMethod(token, kind, beforeStart, externalToken,
               staticToken ?? covariantToken, varFinalOrConst);
           listener.endMember();
@@ -3299,6 +3345,7 @@
         if (next2.isUserDefinableOperator && typeParam == noTypeParamOrArg) {
           token = parseMethod(
               beforeStart,
+              abstractToken,
               externalToken,
               staticToken,
               covariantToken,
@@ -3321,6 +3368,7 @@
           // Recovery: Invalid operator
           return parseInvalidOperatorDeclaration(
               beforeStart,
+              abstractToken,
               externalToken,
               staticToken,
               covariantToken,
@@ -3333,6 +3381,7 @@
           // Recovery
           token = parseMethod(
               beforeStart,
+              abstractToken,
               externalToken,
               staticToken,
               covariantToken,
@@ -3353,10 +3402,15 @@
           (identical(value, 'typedef') &&
               token == beforeStart &&
               next.next.isIdentifier)) {
+        if (abstractToken != null) {
+          reportRecoverableError(
+              abstractToken, codes.messageAbstractClassMember);
+        }
         // Recovery
         return recoverFromInvalidMember(
             token,
             beforeStart,
+            abstractToken,
             externalToken,
             staticToken,
             covariantToken,
@@ -3378,6 +3432,7 @@
           // Recovery: Missing `operator` keyword
           return parseInvalidOperatorDeclaration(
               beforeStart,
+              abstractToken,
               externalToken,
               staticToken,
               covariantToken,
@@ -3411,6 +3466,7 @@
         identical(value, '=>')) {
       token = parseMethod(
           beforeStart,
+          abstractToken,
           externalToken,
           staticToken,
           covariantToken,
@@ -3430,6 +3486,7 @@
       }
       token = parseFields(
           beforeStart,
+          abstractToken,
           externalToken,
           staticToken,
           covariantToken,
@@ -3448,6 +3505,7 @@
 
   Token parseMethod(
       Token beforeStart,
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -3460,6 +3518,9 @@
       DeclarationKind kind,
       String enclosingDeclarationName,
       bool nameIsRecovered) {
+    if (abstractToken != null) {
+      reportRecoverableError(abstractToken, codes.messageAbstractClassMember);
+    }
     if (lateToken != null) {
       reportRecoverableErrorWithToken(
           lateToken, codes.templateExtraneousModifier);
@@ -5655,7 +5716,7 @@
     if (typeInfo.isNullable) {
       Token next = typeInfo.skipType(token).next;
       if (!isOneOfOrEof(
-          next, const [')', '?', '??', ',', ';', ':', 'is', 'as'])) {
+          next, const [')', '?', '??', ',', ';', ':', 'is', 'as', '..'])) {
         // TODO(danrubel): investigate other situations
         // where `?` should be considered part of the type info
         // rather than the start of a conditional expression.
@@ -6898,6 +6959,7 @@
   /// (and events have already been generated).
   Token parseInvalidOperatorDeclaration(
       Token beforeStart,
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -6945,6 +7007,7 @@
 
     Token token = parseMethod(
         beforeStart,
+        abstractToken,
         externalToken,
         staticToken,
         covariantToken,
@@ -6967,6 +7030,7 @@
   Token recoverFromInvalidMember(
       Token token,
       Token beforeStart,
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -6989,6 +7053,7 @@
     } else if (next.isOperator && next.endGroup == null) {
       return parseInvalidOperatorDeclaration(
           beforeStart,
+          abstractToken,
           externalToken,
           staticToken,
           covariantToken,
@@ -7005,6 +7070,7 @@
         identical(value, '{')) {
       token = parseMethod(
           beforeStart,
+          abstractToken,
           externalToken,
           staticToken,
           covariantToken,
@@ -7028,6 +7094,7 @@
     } else {
       token = parseFields(
           beforeStart,
+          abstractToken,
           externalToken,
           staticToken,
           covariantToken,
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart
index ec8e355..d05ecbc 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart
@@ -486,10 +486,10 @@
 
     final List<Token> typeVariableEndGroups = <Token>[];
     for (Link<Token> t = typeVariableStarters; t.isNotEmpty; t = t.tail) {
+      parser.listener.beginFunctionType(start);
       typeVariableEndGroups.add(
           computeTypeParamOrArg(t.head, /* inDeclaration = */ true)
               .parseVariables(t.head, parser));
-      parser.listener.beginFunctionType(start);
     }
 
     if (gftHasReturnType == false) {
diff --git a/pkg/_fe_analyzer_shared/lib/src/testing/id_testing.dart b/pkg/_fe_analyzer_shared/lib/src/testing/id_testing.dart
index 79879cc..04ae6f3 100644
--- a/pkg/_fe_analyzer_shared/lib/src/testing/id_testing.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/testing/id_testing.dart
@@ -643,6 +643,20 @@
     Map<String, List<String>> skipMap,
     Uri nullUri});
 
+/// Compute the file: URI of the file located at `path`, where `path` is
+/// relative to the root of the SDK repository.
+///
+/// We find the root of the SDK repository by looking for the parent of the
+/// directory named `pkg`.
+Uri _fileUriFromSdkRoot(String path) {
+  Uri uri = Platform.script;
+  List<String> pathSegments = uri.pathSegments;
+  return uri.replace(pathSegments: [
+    ...pathSegments.sublist(0, pathSegments.lastIndexOf('pkg')),
+    ...path.split('/')
+  ]);
+}
+
 class MarkerOptions {
   final Map<String, Uri> markers;
 
@@ -669,7 +683,7 @@
       }
       String marker = line.substring(0, eqPos);
       String tester = line.substring(eqPos + 1);
-      File testerFile = new File(tester);
+      File testerFile = new File.fromUri(_fileUriFromSdkRoot(tester));
       if (!testerFile.existsSync()) {
         throw new ArgumentError(
             "Tester '$tester' does not exist for marker '$marker' in "
@@ -712,6 +726,14 @@
   }
 }
 
+String getTestName(FileSystemEntity entity) {
+  if (entity is Directory) {
+    return entity.uri.pathSegments[entity.uri.pathSegments.length - 2];
+  } else {
+    return entity.uri.pathSegments.last;
+  }
+}
+
 /// Check code for all tests in [dataDir] using [runTest].
 Future<void> runTests<T>(Directory dataDir,
     {List<String> args: const <String>[],
@@ -752,16 +774,14 @@
           !entity.path.endsWith('~') && !entity.path.endsWith('marker.options'))
       .toList();
   if (shards > 1) {
+    entities.sort((a, b) => getTestName(a).compareTo(getTestName(b)));
     int start = entities.length * shardIndex ~/ shards;
     int end = entities.length * (shardIndex + 1) ~/ shards;
     entities = entities.sublist(start, end);
   }
   int testCount = 0;
   for (FileSystemEntity entity in entities) {
-    String name = entity.uri.pathSegments.last;
-    if (entity is Directory) {
-      name = entity.uri.pathSegments[entity.uri.pathSegments.length - 2];
-    }
+    String name = getTestName(entity);
     if (args.isNotEmpty && !args.contains(name) && !continued) continue;
     if (shouldContinue) continued = true;
     testCount++;
diff --git a/pkg/_fe_analyzer_shared/pubspec.yaml b/pkg/_fe_analyzer_shared/pubspec.yaml
index ac83ab7..f7c4d16 100644
--- a/pkg/_fe_analyzer_shared/pubspec.yaml
+++ b/pkg/_fe_analyzer_shared/pubspec.yaml
@@ -1,5 +1,5 @@
 name: _fe_analyzer_shared
-version: 5.0.0
+version: 6.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/constants/data/function.dart b/pkg/_fe_analyzer_shared/test/constants/data/function.dart
index 7cc9119..296f250 100644
--- a/pkg/_fe_analyzer_shared/test/constants/data/function.dart
+++ b/pkg/_fe_analyzer_shared/test/constants/data/function.dart
@@ -16,16 +16,16 @@
 main() {
   print(
       /*cfe|dart2js.Function(method1)*/
-      /*analyzer.Function(method1,type=T Function<T>(T))*/
+      /*analyzer.Function(method1,type=T* Function<T>(T*)*)*/
       function0);
   print(
       /*cfe.Instantiation(method1<int>)*/
       /*dart2js.Instantiation(method1<int*>)*/
-      /*analyzer.Function(method1,type=int Function(int))*/
+      /*analyzer.Function(method1,type=int* Function(int*)*)*/
       instantiation0);
   print(
       /*cfe.Instantiation(method2<String,int>)*/
       /*dart2js.Instantiation(method2<String*,int*>)*/
-      /*analyzer.Function(method2,type=Map<String, int> Function(String, int))*/
+      /*analyzer.Function(method2,type=Map<String*, int*>* Function(String*, int*)*)*/
       instantiation1);
 }
diff --git a/pkg/_fe_analyzer_shared/test/constants/data/list.dart b/pkg/_fe_analyzer_shared/test/constants/data/list.dart
index 50f3caa..b31cfb5 100644
--- a/pkg/_fe_analyzer_shared/test/constants/data/list.dart
+++ b/pkg/_fe_analyzer_shared/test/constants/data/list.dart
@@ -15,13 +15,13 @@
 const list4 = /*cfe.List<int>(Int(42),Int(87))*/ [42, 87];
 
 main() {
-  print(/*List<dynamic>()*/ list0);
+  print(/*analyzer.List<dynamic>*()*/ /*cfe|dart2js.List<dynamic>()*/ list0);
   print(
-      /*cfe|analyzer.List<int>()*/ /*dart2js.List<int*>()*/ list1);
+      /*analyzer.List<int*>*()*/ /*cfe.List<int>()*/ /*dart2js.List<int*>()*/ list1);
   print(
-      /*cfe|analyzer.List<int>()*/ /*dart2js.List<int*>()*/ list2);
+      /*analyzer.List<int*>*()*/ /*cfe.List<int>()*/ /*dart2js.List<int*>()*/ list2);
   print(
-      /*cfe|analyzer.List<int>(Int(42))*/ /*dart2js.List<int*>(Int(42))*/ list3);
+      /*analyzer.List<int*>*(Int(42))*/ /*cfe.List<int>(Int(42))*/ /*dart2js.List<int*>(Int(42))*/ list3);
   print(
-      /*cfe|analyzer.List<int>(Int(42),Int(87))*/ /*dart2js.List<int*>(Int(42),Int(87))*/ list4);
+      /*analyzer.List<int*>*(Int(42),Int(87))*/ /*cfe.List<int>(Int(42),Int(87))*/ /*dart2js.List<int*>(Int(42),Int(87))*/ list4);
 }
diff --git a/pkg/_fe_analyzer_shared/test/constants/data/map.dart b/pkg/_fe_analyzer_shared/test/constants/data/map.dart
index 1f96470..c9aafc63 100644
--- a/pkg/_fe_analyzer_shared/test/constants/data/map.dart
+++ b/pkg/_fe_analyzer_shared/test/constants/data/map.dart
@@ -16,13 +16,14 @@
     {'foo': 42, 'bar': 87};
 
 main() {
-  print(/*Map<dynamic,dynamic>()*/ map0);
   print(
-      /*cfe|analyzer.Map<String,int>()*/ /*dart2js.Map<String*,int*>()*/ map1);
+      /*analyzer.Map<dynamic, dynamic>*()*/ /*cfe|dart2js.Map<dynamic,dynamic>()*/ map0);
   print(
-      /*cfe|analyzer.Map<String,int>()*/ /*dart2js.Map<String*,int*>()*/ map2);
+      /*analyzer.Map<String*, int*>*()*/ /*cfe.Map<String,int>()*/ /*dart2js.Map<String*,int*>()*/ map1);
   print(
-      /*cfe|analyzer.Map<String,int>(String(foo):Int(42))*/ /*dart2js.Map<String*,int*>(String(foo):Int(42))*/ map3);
+      /*analyzer.Map<String*, int*>*()*/ /*cfe.Map<String,int>()*/ /*dart2js.Map<String*,int*>()*/ map2);
   print(
-      /*cfe|analyzer.Map<String,int>(String(foo):Int(42),String(bar):Int(87))*/ /*dart2js.Map<String*,int*>(String(foo):Int(42),String(bar):Int(87))*/ map4);
+      /*analyzer.Map<String*, int*>*(String(foo):Int(42))*/ /*cfe.Map<String,int>(String(foo):Int(42))*/ /*dart2js.Map<String*,int*>(String(foo):Int(42))*/ map3);
+  print(
+      /*analyzer.Map<String*, int*>*(String(foo):Int(42),String(bar):Int(87))*/ /*cfe.Map<String,int>(String(foo):Int(42),String(bar):Int(87))*/ /*dart2js.Map<String*,int*>(String(foo):Int(42),String(bar):Int(87))*/ map4);
 }
diff --git a/pkg/_fe_analyzer_shared/test/constants/data/set.dart b/pkg/_fe_analyzer_shared/test/constants/data/set.dart
index e512e8a..5b4a84d 100644
--- a/pkg/_fe_analyzer_shared/test/constants/data/set.dart
+++ b/pkg/_fe_analyzer_shared/test/constants/data/set.dart
@@ -20,13 +20,13 @@
 const set4 = /*cfe.Set<int>(Int(42),Int(87))*/ {42, 87};
 
 main() {
-  print(/*Set<dynamic>()*/ set0);
+  print(/*analyzer.Set<dynamic>*()*/ /*cfe|dart2js.Set<dynamic>()*/ set0);
   print(
-      /*cfe|analyzer.Set<int>()*/ /*dart2js.Set<int*>()*/ set1);
+      /*analyzer.Set<int*>*()*/ /*cfe.Set<int>()*/ /*dart2js.Set<int*>()*/ set1);
   print(
-      /*cfe|analyzer.Set<int>()*/ /*dart2js.Set<int*>()*/ set2);
+      /*analyzer.Set<int*>*()*/ /*cfe.Set<int>()*/ /*dart2js.Set<int*>()*/ set2);
   print(
-      /*cfe|analyzer.Set<int>(Int(42))*/ /*dart2js.Set<int*>(Int(42))*/ set3);
+      /*analyzer.Set<int*>*(Int(42))*/ /*cfe.Set<int>(Int(42))*/ /*dart2js.Set<int*>(Int(42))*/ set3);
   print(
-      /*cfe|analyzer.Set<int>(Int(42),Int(87))*/ /*dart2js.Set<int*>(Int(42),Int(87))*/ set4);
+      /*analyzer.Set<int*>*(Int(42),Int(87))*/ /*cfe.Set<int>(Int(42),Int(87))*/ /*dart2js.Set<int*>(Int(42),Int(87))*/ set4);
 }
diff --git a/pkg/_fe_analyzer_shared/test/constants/data/type_literals.dart b/pkg/_fe_analyzer_shared/test/constants/data/type_literals.dart
index f729673..7d003ae 100644
--- a/pkg/_fe_analyzer_shared/test/constants/data/type_literals.dart
+++ b/pkg/_fe_analyzer_shared/test/constants/data/type_literals.dart
@@ -21,31 +21,37 @@
 
 main() {
   print(
-      /*cfe|analyzer.TypeLiteral(dynamic Function())*/
+      /*analyzer.TypeLiteral(dynamic Function()*)*/
+      /*cfe.TypeLiteral(dynamic Function())*/
       /*dart2js.TypeLiteral(()->dynamic)*/
       typedef);
 
   print(
-      /*cfe|analyzer.TypeLiteral(void Function(dynamic))*/
+      /*analyzer.TypeLiteral(void Function(dynamic)*)*/
+      /*cfe.TypeLiteral(void Function(dynamic))*/
       /*dart2js.TypeLiteral((dynamic)->void)*/
       genericTypedef);
 
   print(
-      /*cfe|analyzer.TypeLiteral(void Function<T>(T))*/
+      /*analyzer.TypeLiteral(void Function<T>(T*)*)*/
+      /*cfe.TypeLiteral(void Function<T>(T))*/
       /*dart2js.TypeLiteral((0)->void)*/
       genericFunctionTypedef);
 
   print(
-      /*cfe|analyzer.TypeLiteral(void Function<T>(FutureOr<T>))*/
+      /*analyzer.TypeLiteral(void Function<T>(FutureOr<T*>*)*)*/
+      /*cfe.TypeLiteral(void Function<T>(FutureOr<T>))*/
       /*dart2js.TypeLiteral((FutureOr<0>)->void)*/
       typedefWithFutureOr);
 
   print(
-      /*cfe|analyzer.TypeLiteral(FutureOr<dynamic>)*/
+      /*analyzer.TypeLiteral(FutureOr<dynamic>*)*/
+      /*cfe.TypeLiteral(FutureOr<dynamic>)*/
       /*dart2js.TypeLiteral(dynamic)*/
       futureOr);
 
   print(
-      /*TypeLiteral(Null)*/
+      /*analyzer.TypeLiteral(Null*)*/
+      /*cfe|dart2js.TypeLiteral(Null)*/
       null_);
 }
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 9a6e31b..a3c666f 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
@@ -1735,6 +1735,7 @@
     var intVar = _Var('x', _Type('int'));
     var intQVar = _Var('x', _Type('int?'));
     var objectQVar = _Var('x', _Type('Object?'));
+    var nullVar = _Var('x', _Type('Null'));
     group('setReachable', () {
       var unreachable = FlowModel<_Var, _Type>(false);
       var reachable = FlowModel<_Var, _Type>(true);
@@ -2368,6 +2369,15 @@
               _matchVariableModel(chain: ['int?', 'int'], ofInterest: ['int?'])
         });
       });
+
+      test('promote to Never', () {
+        var h = _Harness();
+        var s1 = FlowModel<_Var, _Type>(true);
+        var s2 = s1.tryMarkNonNullable(h, nullVar).ifTrue;
+        expect(s2.reachable, false);
+        expect(s2.infoFor(nullVar),
+            _matchVariableModel(chain: ['Never'], ofInterest: []));
+      });
     });
 
     group('joinUnassigned', () {
@@ -3160,6 +3170,7 @@
     'List <: Object': true,
     'Never <: int': true,
     'Never <: int?': true,
+    'Never <: Null': true,
     'Never? <: int': false,
     'Never? <: int?': true,
     'Never? <: num?': true,
@@ -3334,6 +3345,11 @@
     return variable.isLocalVariableWithoutDeclaredType;
   }
 
+  @override
+  bool isNever(_Type type) {
+    return type.type == 'Never';
+  }
+
   /// Creates a [LazyExpression] representing an `is!` check, checking whether
   /// [subExpression] has the given [type].
   LazyExpression isNotType(LazyExpression subExpression, String type) {
@@ -3428,6 +3444,8 @@
   _Type promoteToNonNull(_Type type) {
     if (type.type.endsWith('?')) {
       return _Type(type.type.substring(0, type.type.length - 1));
+    } else if (type.type == 'Null') {
+      return _Type('Never');
     } else {
       return type;
     }
diff --git a/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/null_aware_access.dart b/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/null_aware_access.dart
index 586dcd2..cd4bc48 100644
--- a/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/null_aware_access.dart
+++ b/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/null_aware_access.dart
@@ -35,68 +35,68 @@
 }
 
 void indexGetterCall(C? c) {
-  c?.[/*nonNullable*/ c];
+  c?[/*nonNullable*/ c];
 }
 
 void indexSetterCall(C? c) {
-  c?.[/*nonNullable*/ c] = /*nonNullable*/ c;
+  c?[/*nonNullable*/ c] = /*nonNullable*/ c;
 }
 
 void indexCompoundAssign(C? c) {
-  c?.[/*nonNullable*/ c] += /*nonNullable*/ c;
+  c?[/*nonNullable*/ c] += /*nonNullable*/ c;
 }
 
 void indexNullAwareAssign(C? c) {
-  c?.[/*nonNullable*/ c] ??= /*nonNullable*/ c;
+  c?[/*nonNullable*/ c] ??= /*nonNullable*/ c;
 }
 
 void setterCall_nullShorting(C? c, D? d) {
   c?.getterReturningC.setter = /*nonNullable*/ c;
   c?.getterReturningNullableC?.setter = /*nonNullable*/ c;
-  c?.[0].setter = /*nonNullable*/ c;
-  d?.[0]?.setter = /*nonNullable*/ d;
+  c?[0].setter = /*nonNullable*/ c;
+  d?[0]?.setter = /*nonNullable*/ d;
 }
 
 void compoundAssign_nullShorting(C? c, D? d) {
   c?.getterReturningC.getterSetter += /*nonNullable*/ c;
   c?.getterReturningNullableC?.getterSetter += /*nonNullable*/ c;
-  c?.[0].getterSetter += /*nonNullable*/ c;
-  d?.[0]?.getterSetter += /*nonNullable*/ d;
+  c?[0].getterSetter += /*nonNullable*/ c;
+  d?[0]?.getterSetter += /*nonNullable*/ d;
 }
 
 void nullAwareAssign_nullShorting(C? c, D? d) {
   c?.getterReturningC.getterSetter ??= /*nonNullable*/ c;
   c?.getterReturningNullableC?.getterSetter ??= /*nonNullable*/ c;
-  c?.[0].getterSetter ??= /*nonNullable*/ c;
-  d?.[0]?.getterSetter ??= /*nonNullable*/ d;
+  c?[0].getterSetter ??= /*nonNullable*/ c;
+  d?[0]?.getterSetter ??= /*nonNullable*/ d;
 }
 
 void indexGetterCall_nullShorting(C? c, D? d) {
   c?.getterReturningC[/*nonNullable*/ c];
-  c?.getterReturningNullableC?.[/*nonNullable*/ c];
-  c?.[0][/*nonNullable*/ c];
-  d?.[0]?.[/*nonNullable*/ d];
+  c?.getterReturningNullableC?[/*nonNullable*/ c];
+  c?[0][/*nonNullable*/ c];
+  d?[0]?[/*nonNullable*/ d];
 }
 
 void indexSetterCall_nullShorting(C? c, D? d) {
   c?.getterReturningC[/*nonNullable*/ c] = /*nonNullable*/ c;
-  c?.getterReturningNullableC?.[/*nonNullable*/ c] = /*nonNullable*/ c;
-  c?.[0][/*nonNullable*/ c] = /*nonNullable*/ c;
-  d?.[0]?.[/*nonNullable*/ d] = /*nonNullable*/ d;
+  c?.getterReturningNullableC?[/*nonNullable*/ c] = /*nonNullable*/ c;
+  c?[0][/*nonNullable*/ c] = /*nonNullable*/ c;
+  d?[0]?[/*nonNullable*/ d] = /*nonNullable*/ d;
 }
 
 void indexCompoundAssign_nullShorting(C? c, D? d) {
   c?.getterReturningC[/*nonNullable*/ c] += /*nonNullable*/ c;
-  c?.getterReturningNullableC?.[/*nonNullable*/ c] += /*nonNullable*/ c;
-  c?.[0][/*nonNullable*/ c] += /*nonNullable*/ c;
-  d?.[0]?.[/*nonNullable*/ d] += /*nonNullable*/ d;
+  c?.getterReturningNullableC?[/*nonNullable*/ c] += /*nonNullable*/ c;
+  c?[0][/*nonNullable*/ c] += /*nonNullable*/ c;
+  d?[0]?[/*nonNullable*/ d] += /*nonNullable*/ d;
 }
 
 void indexNullAwareAssign_nullShorting(C? c, D? d) {
   c?.getterReturningC[/*nonNullable*/ c] ??= /*nonNullable*/ c;
-  c?.getterReturningNullableC?.[/*nonNullable*/ c] ??= /*nonNullable*/ c;
-  c?.[0][/*nonNullable*/ c] ??= /*nonNullable*/ c;
-  d?.[0]?.[/*nonNullable*/ d] ??= /*nonNullable*/ d;
+  c?.getterReturningNullableC?[/*nonNullable*/ c] ??= /*nonNullable*/ c;
+  c?[0][/*nonNullable*/ c] ??= /*nonNullable*/ c;
+  d?[0]?[/*nonNullable*/ d] ??= /*nonNullable*/ d;
 }
 
 void null_aware_cascades_do_not_promote_target(C? c) {
diff --git a/pkg/_fe_analyzer_shared/test/flow_analysis/reachability/data/issue41981.dart b/pkg/_fe_analyzer_shared/test/flow_analysis/reachability/data/issue41981.dart
new file mode 100644
index 0000000..f7ce9d2
--- /dev/null
+++ b/pkg/_fe_analyzer_shared/test/flow_analysis/reachability/data/issue41981.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.
+
+void testNotNull(Null n) {
+  0;
+  if (n != null)
+    /*stmt: unreachable*/ 1;
+  2;
+}
+
+void testIsNullableNever(Object? n) {
+  0;
+  if (n is Never?) 1;
+  2;
+}
+
+void testIsNever(Object? n) {
+  0;
+  if (n is Never)
+    /*stmt: unreachable*/ 1;
+  2;
+}
+
+void testIsNullableNeverTypeVariable<T extends Never?>(Object? n) {
+  0;
+  if (n is T) 1;
+  2;
+}
+
+void testIsNeverTypeVariable<T extends Never>(Object? n) {
+  0;
+  if (n is T)
+    /*stmt: unreachable*/ 1;
+  2;
+}
diff --git a/pkg/_fe_analyzer_shared/test/flow_analysis/type_promotion/data/bug42066.dart b/pkg/_fe_analyzer_shared/test/flow_analysis/type_promotion/data/bug42066.dart
new file mode 100644
index 0000000..25956d5
--- /dev/null
+++ b/pkg/_fe_analyzer_shared/test/flow_analysis/type_promotion/data/bug42066.dart
@@ -0,0 +1,15 @@
+// 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.
+
+f() {
+  num par2;
+  par2 = 0;
+  if (par2 is! int) return;
+  try {} catch (exception) {
+    throw 'x';
+    () {
+      par2 = 1;
+    };
+  } finally {}
+}
diff --git a/pkg/_js_interop_checks/LICENSE b/pkg/_js_interop_checks/LICENSE
new file mode 100644
index 0000000..18daf2b
--- /dev/null
+++ b/pkg/_js_interop_checks/LICENSE
@@ -0,0 +1,26 @@
+Copyright 2020, the Dart project authors. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+    * Neither the name of Google Inc. nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/_js_interop_checks/lib/js_interop_checks.dart b/pkg/_js_interop_checks/lib/js_interop_checks.dart
index ef93efe..2355b50 100644
--- a/pkg/_js_interop_checks/lib/js_interop_checks.dart
+++ b/pkg/_js_interop_checks/lib/js_interop_checks.dart
@@ -8,7 +8,11 @@
     show
         Message,
         LocatedMessage,
+        messageJsInteropAnonymousFactoryPositionalParameters,
+        messageJsInteropEnclosingClassJSAnnotation,
+        messageJsInteropEnclosingClassJSAnnotationContext,
         messageJsInteropIndexNotSupported,
+        messageJsInteropNamedParameters,
         messageJsInteropNonExternalConstructor;
 
 import 'src/js_interop.dart';
@@ -19,25 +23,52 @@
   JsInteropChecks(this._diagnosticsReporter);
 
   @override
-  void visitClass(Class c) {
-    if (!hasJSInteropAnnotation(c)) return;
-    super.visitClass(c);
+  void defaultMember(Member member) {
+    _checkMemberJSInteropAnnotation(member);
+    super.defaultMember(member);
   }
 
   @override
   void visitProcedure(Procedure procedure) {
-    if (procedure.isStatic) return;
-    if (procedure.name.name == '[]=' || procedure.name.name == '[]') {
+    _checkMemberJSInteropAnnotation(procedure);
+
+    if (!procedure.isExternal || !isJSInteropMember(procedure)) return;
+
+    if (!procedure.isStatic &&
+        (procedure.name.name == '[]=' || procedure.name.name == '[]')) {
       _diagnosticsReporter.report(
           messageJsInteropIndexNotSupported,
           procedure.fileOffset,
           procedure.name.name.length,
           procedure.location.file);
     }
+
+    var isAnonymousFactory =
+        isAnonymousClassMember(procedure) && procedure.isFactory;
+
+    if (isAnonymousFactory) {
+      if (procedure.function != null &&
+          !procedure.function.positionalParameters.isEmpty) {
+        var firstPositionalParam = procedure.function.positionalParameters[0];
+        _diagnosticsReporter.report(
+            messageJsInteropAnonymousFactoryPositionalParameters,
+            firstPositionalParam.fileOffset,
+            firstPositionalParam.name.length,
+            firstPositionalParam.location.file);
+      }
+    } else {
+      // Only factory constructors for anonymous classes are allowed to have
+      // named parameters.
+      _checkNoNamedParameters(procedure.function);
+    }
   }
 
   @override
   void visitConstructor(Constructor constructor) {
+    _checkMemberJSInteropAnnotation(constructor);
+
+    if (!isJSInteropMember(constructor)) return;
+
     if (!constructor.isExternal && !constructor.isSynthetic) {
       _diagnosticsReporter.report(
           messageJsInteropNonExternalConstructor,
@@ -45,5 +76,36 @@
           constructor.name.name.length,
           constructor.location.file);
     }
+
+    _checkNoNamedParameters(constructor.function);
+  }
+
+  /// Reports an error if [functionNode] has named parameters.
+  void _checkNoNamedParameters(FunctionNode functionNode) {
+    if (functionNode != null && !functionNode.namedParameters.isEmpty) {
+      var firstNamedParam = functionNode.namedParameters[0];
+      _diagnosticsReporter.report(
+          messageJsInteropNamedParameters,
+          firstNamedParam.fileOffset,
+          firstNamedParam.name.length,
+          firstNamedParam.location.file);
+    }
+  }
+
+  /// Reports an error if [m] has a JS interop annotation and is part of a class
+  /// that does not.
+  void _checkMemberJSInteropAnnotation(Member m) {
+    if (!hasJSInteropAnnotation(m)) return;
+    var enclosingClass = m.enclosingClass;
+    if (enclosingClass != null && !hasJSInteropAnnotation(enclosingClass)) {
+      _diagnosticsReporter.report(messageJsInteropEnclosingClassJSAnnotation,
+          m.fileOffset, m.name.name.length, m.location.file,
+          context: <LocatedMessage>[
+            messageJsInteropEnclosingClassJSAnnotationContext.withLocation(
+                enclosingClass.location.file,
+                enclosingClass.fileOffset,
+                enclosingClass.name.length)
+          ]);
+    }
   }
 }
diff --git a/pkg/_js_interop_checks/lib/src/js_interop.dart b/pkg/_js_interop_checks/lib/src/js_interop.dart
index 24ceac4..f8ea46f 100644
--- a/pkg/_js_interop_checks/lib/src/js_interop.dart
+++ b/pkg/_js_interop_checks/lib/src/js_interop.dart
@@ -4,15 +4,34 @@
 
 import 'package:kernel/kernel.dart';
 
-/// Returns true iff the class has an `@JS(...)` annotation from `package:js`
-/// or from the internal `dart:_js_annotations`.
-bool hasJSInteropAnnotation(Class c) =>
-    c.annotations.any(_isPublicJSAnnotation);
+/// Returns true iff the node has an `@JS(...)` annotation from `package:js` or
+/// from the internal `dart:_js_annotations`.
+bool hasJSInteropAnnotation(Annotatable a) =>
+    a.annotations.any(_isPublicJSAnnotation);
+
+/// Returns true if [m] belongs to a JS interop context. Checks if either the
+/// member or the surrounding context has a JS interop annotation.
+bool isJSInteropMember(Member m) {
+  if (hasJSInteropAnnotation(m)) return true;
+  var enclosingClass = m.enclosingClass;
+  if (enclosingClass != null) return hasJSInteropAnnotation(enclosingClass);
+  var enclosingLibrary = m.enclosingLibrary;
+  if (enclosingLibrary != null) return hasJSInteropAnnotation(enclosingLibrary);
+  return false;
+}
+
+/// Returns true if [m] belongs to an anonymous class.
+bool isAnonymousClassMember(Member m) {
+  var enclosingClass = m.enclosingClass;
+  if (enclosingClass == null) return false;
+  return enclosingClass.annotations.any(_isAnonymousAnnotation);
+}
 
 final _packageJs = Uri.parse('package:js/js.dart');
 final _internalJs = Uri.parse('dart:_js_annotations');
 
-/// Returns [true] if [e] is the `JS` annotation from `package:js`.
+/// Returns true if [value] is the `JS` annotation from `package:js` or from
+/// `dart:_js_annotations`.
 bool _isPublicJSAnnotation(Expression value) {
   var c = _annotationClass(value);
   return c != null &&
@@ -21,6 +40,16 @@
           c.enclosingLibrary.importUri == _internalJs);
 }
 
+/// Returns true if [value] is the `anyonymous` annotation from `package:js` or
+/// from `dart:_js_annotations`.
+bool _isAnonymousAnnotation(Expression value) {
+  var c = _annotationClass(value);
+  return c != null &&
+      c.name == '_Anonymous' &&
+      (c.enclosingLibrary.importUri == _packageJs ||
+          c.enclosingLibrary.importUri == _internalJs);
+}
+
 /// Returns the class of the instance referred to by metadata annotation [node].
 ///
 /// For example:
diff --git a/pkg/analysis_server/benchmark/benchmarks.dart b/pkg/analysis_server/benchmark/benchmarks.dart
index 788ab0f..f43c4e6 100644
--- a/pkg/analysis_server/benchmark/benchmarks.dart
+++ b/pkg/analysis_server/benchmark/benchmarks.dart
@@ -224,8 +224,6 @@
         benchmarks.firstWhere((b) => b.id == benchmarkId, orElse: () {
       print("Benchmark '$benchmarkId' not found.");
       exit(1);
-      // Never reached.
-      return null;
     });
 
     var actualIterations = repeatCount;
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index 3f5c00c..7e5dc01 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -2083,6 +2083,7 @@
   
   
   
+  
 <h3>Requests</h3><dl><dt class="request"><a name="request_edit.format">edit.format</a></dt><dd><div class="box"><pre>request: {
   "id": String
   "method": "edit.format"
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
index b8f7eb1..8842cc5 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart
@@ -22,6 +22,7 @@
 import 'package:analysis_server/src/protocol/protocol_internal.dart'
     show listEqual, mapEqual;
 import 'package:analyzer/src/generated/utilities_general.dart';
+import 'package:meta/meta.dart';
 
 const jsonEncoder = JsonEncoder.withIndent('    ');
 
@@ -29,14 +30,14 @@
   static const jsonHandler = LspJsonHandler(
       AnalyzerStatusParams.canParse, AnalyzerStatusParams.fromJson);
 
-  AnalyzerStatusParams(this.isAnalyzing) {
+  AnalyzerStatusParams({@required this.isAnalyzing}) {
     if (isAnalyzing == null) {
       throw 'isAnalyzing is required but was not provided';
     }
   }
   static AnalyzerStatusParams fromJson(Map<String, dynamic> json) {
     final isAnalyzing = json['isAnalyzing'];
-    return AnalyzerStatusParams(isAnalyzing);
+    return AnalyzerStatusParams(isAnalyzing: isAnalyzing);
   }
 
   final bool isAnalyzing;
@@ -98,7 +99,7 @@
   static const jsonHandler =
       LspJsonHandler(ClosingLabel.canParse, ClosingLabel.fromJson);
 
-  ClosingLabel(this.range, this.label) {
+  ClosingLabel({@required this.range, @required this.label}) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
@@ -109,7 +110,7 @@
   static ClosingLabel fromJson(Map<String, dynamic> json) {
     final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final label = json['label'];
-    return ClosingLabel(range, label);
+    return ClosingLabel(range: range, label: label);
   }
 
   final String label;
@@ -190,8 +191,13 @@
       CompletionItemResolutionInfo.canParse,
       CompletionItemResolutionInfo.fromJson);
 
-  CompletionItemResolutionInfo(this.file, this.offset, this.libId,
-      this.displayUri, this.rOffset, this.rLength) {
+  CompletionItemResolutionInfo(
+      {@required this.file,
+      @required this.offset,
+      @required this.libId,
+      @required this.displayUri,
+      @required this.rOffset,
+      @required this.rLength}) {
     if (file == null) {
       throw 'file is required but was not provided';
     }
@@ -219,7 +225,12 @@
     final rOffset = json['rOffset'];
     final rLength = json['rLength'];
     return CompletionItemResolutionInfo(
-        file, offset, libId, displayUri, rOffset, rLength);
+        file: file,
+        offset: offset,
+        libId: libId,
+        displayUri: displayUri,
+        rOffset: rOffset,
+        rLength: rLength);
   }
 
   final String displayUri;
@@ -389,14 +400,14 @@
   static const jsonHandler = LspJsonHandler(
       DartDiagnosticServer.canParse, DartDiagnosticServer.fromJson);
 
-  DartDiagnosticServer(this.port) {
+  DartDiagnosticServer({@required this.port}) {
     if (port == null) {
       throw 'port is required but was not provided';
     }
   }
   static DartDiagnosticServer fromJson(Map<String, dynamic> json) {
     final port = json['port'];
-    return DartDiagnosticServer(port);
+    return DartDiagnosticServer(port: port);
   }
 
   final num port;
@@ -456,8 +467,13 @@
 class Element implements ToJsonable {
   static const jsonHandler = LspJsonHandler(Element.canParse, Element.fromJson);
 
-  Element(this.range, this.name, this.kind, this.parameters,
-      this.typeParameters, this.returnType) {
+  Element(
+      {this.range,
+      @required this.name,
+      @required this.kind,
+      this.parameters,
+      this.typeParameters,
+      this.returnType}) {
     if (name == null) {
       throw 'name is required but was not provided';
     }
@@ -472,7 +488,13 @@
     final parameters = json['parameters'];
     final typeParameters = json['typeParameters'];
     final returnType = json['returnType'];
-    return Element(range, name, kind, parameters, typeParameters, returnType);
+    return Element(
+        range: range,
+        name: name,
+        kind: kind,
+        parameters: parameters,
+        typeParameters: typeParameters,
+        returnType: returnType);
   }
 
   final String kind;
@@ -616,15 +638,15 @@
       LspJsonHandler(FlutterOutline.canParse, FlutterOutline.fromJson);
 
   FlutterOutline(
-      this.kind,
+      {@required this.kind,
       this.label,
       this.className,
       this.variableName,
       this.attributes,
       this.dartElement,
-      this.range,
-      this.codeRange,
-      this.children) {
+      @required this.range,
+      @required this.codeRange,
+      this.children}) {
     if (kind == null) {
       throw 'kind is required but was not provided';
     }
@@ -655,8 +677,16 @@
         ?.map((item) => item != null ? FlutterOutline.fromJson(item) : null)
         ?.cast<FlutterOutline>()
         ?.toList();
-    return FlutterOutline(kind, label, className, variableName, attributes,
-        dartElement, range, codeRange, children);
+    return FlutterOutline(
+        kind: kind,
+        label: label,
+        className: className,
+        variableName: variableName,
+        attributes: attributes,
+        dartElement: dartElement,
+        range: range,
+        codeRange: codeRange,
+        children: children);
   }
 
   final List<FlutterOutlineAttribute> attributes;
@@ -862,7 +892,8 @@
   static const jsonHandler = LspJsonHandler(
       FlutterOutlineAttribute.canParse, FlutterOutlineAttribute.fromJson);
 
-  FlutterOutlineAttribute(this.name, this.label, this.valueRange) {
+  FlutterOutlineAttribute(
+      {@required this.name, @required this.label, this.valueRange}) {
     if (name == null) {
       throw 'name is required but was not provided';
     }
@@ -875,7 +906,8 @@
     final label = json['label'];
     final valueRange =
         json['valueRange'] != null ? Range.fromJson(json['valueRange']) : null;
-    return FlutterOutlineAttribute(name, label, valueRange);
+    return FlutterOutlineAttribute(
+        name: name, label: label, valueRange: valueRange);
   }
 
   final String label;
@@ -973,7 +1005,11 @@
 class Outline implements ToJsonable {
   static const jsonHandler = LspJsonHandler(Outline.canParse, Outline.fromJson);
 
-  Outline(this.element, this.range, this.codeRange, this.children) {
+  Outline(
+      {@required this.element,
+      @required this.range,
+      @required this.codeRange,
+      this.children}) {
     if (element == null) {
       throw 'element is required but was not provided';
     }
@@ -994,7 +1030,11 @@
         ?.map((item) => item != null ? Outline.fromJson(item) : null)
         ?.cast<Outline>()
         ?.toList();
-    return Outline(element, range, codeRange, children);
+    return Outline(
+        element: element,
+        range: range,
+        codeRange: codeRange,
+        children: children);
   }
 
   final List<Outline> children;
@@ -1118,7 +1158,7 @@
   static const jsonHandler = LspJsonHandler(
       PublishClosingLabelsParams.canParse, PublishClosingLabelsParams.fromJson);
 
-  PublishClosingLabelsParams(this.uri, this.labels) {
+  PublishClosingLabelsParams({@required this.uri, @required this.labels}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -1132,7 +1172,7 @@
         ?.map((item) => item != null ? ClosingLabel.fromJson(item) : null)
         ?.cast<ClosingLabel>()
         ?.toList();
-    return PublishClosingLabelsParams(uri, labels);
+    return PublishClosingLabelsParams(uri: uri, labels: labels);
   }
 
   final List<ClosingLabel> labels;
@@ -1219,7 +1259,7 @@
       PublishFlutterOutlineParams.canParse,
       PublishFlutterOutlineParams.fromJson);
 
-  PublishFlutterOutlineParams(this.uri, this.outline) {
+  PublishFlutterOutlineParams({@required this.uri, @required this.outline}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -1232,7 +1272,7 @@
     final outline = json['outline'] != null
         ? FlutterOutline.fromJson(json['outline'])
         : null;
-    return PublishFlutterOutlineParams(uri, outline);
+    return PublishFlutterOutlineParams(uri: uri, outline: outline);
   }
 
   final FlutterOutline outline;
@@ -1314,7 +1354,7 @@
   static const jsonHandler = LspJsonHandler(
       PublishOutlineParams.canParse, PublishOutlineParams.fromJson);
 
-  PublishOutlineParams(this.uri, this.outline) {
+  PublishOutlineParams({@required this.uri, @required this.outline}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -1326,7 +1366,7 @@
     final uri = json['uri'];
     final outline =
         json['outline'] != null ? Outline.fromJson(json['outline']) : null;
-    return PublishOutlineParams(uri, outline);
+    return PublishOutlineParams(uri: uri, outline: outline);
   }
 
   final Outline outline;
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
index 39e2e89..1a6a820 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
@@ -22,6 +22,7 @@
 import 'package:analysis_server/src/protocol/protocol_internal.dart'
     show listEqual, mapEqual;
 import 'package:analyzer/src/generated/utilities_general.dart';
+import 'package:meta/meta.dart';
 
 const jsonEncoder = JsonEncoder.withIndent('    ');
 
@@ -29,7 +30,7 @@
   static const jsonHandler = LspJsonHandler(
       ApplyWorkspaceEditParams.canParse, ApplyWorkspaceEditParams.fromJson);
 
-  ApplyWorkspaceEditParams(this.label, this.edit) {
+  ApplyWorkspaceEditParams({this.label, @required this.edit}) {
     if (edit == null) {
       throw 'edit is required but was not provided';
     }
@@ -38,7 +39,7 @@
     final label = json['label'];
     final edit =
         json['edit'] != null ? WorkspaceEdit.fromJson(json['edit']) : null;
-    return ApplyWorkspaceEditParams(label, edit);
+    return ApplyWorkspaceEditParams(label: label, edit: edit);
   }
 
   /// The edits to apply.
@@ -117,7 +118,7 @@
   static const jsonHandler = LspJsonHandler(
       ApplyWorkspaceEditResponse.canParse, ApplyWorkspaceEditResponse.fromJson);
 
-  ApplyWorkspaceEditResponse(this.applied, this.failureReason) {
+  ApplyWorkspaceEditResponse({@required this.applied, this.failureReason}) {
     if (applied == null) {
       throw 'applied is required but was not provided';
     }
@@ -125,7 +126,8 @@
   static ApplyWorkspaceEditResponse fromJson(Map<String, dynamic> json) {
     final applied = json['applied'];
     final failureReason = json['failureReason'];
-    return ApplyWorkspaceEditResponse(applied, failureReason);
+    return ApplyWorkspaceEditResponse(
+        applied: applied, failureReason: failureReason);
   }
 
   /// Indicates whether the edit was applied or not.
@@ -208,7 +210,7 @@
   static const jsonHandler =
       LspJsonHandler(CancelParams.canParse, CancelParams.fromJson);
 
-  CancelParams(this.id) {
+  CancelParams({@required this.id}) {
     if (id == null) {
       throw 'id is required but was not provided';
     }
@@ -219,7 +221,7 @@
         : (json['id'] is String
             ? Either2<num, String>.t2(json['id'])
             : (throw '''${json['id']} was not one of (num, String)'''));
-    return CancelParams(id);
+    return CancelParams(id: id);
   }
 
   /// The request id to cancel.
@@ -280,16 +282,24 @@
   static const jsonHandler =
       LspJsonHandler(ClientCapabilities.canParse, ClientCapabilities.fromJson);
 
-  ClientCapabilities(this.workspace, this.textDocument, this.experimental);
+  ClientCapabilities(
+      {this.workspace, this.textDocument, this.window, this.experimental});
   static ClientCapabilities fromJson(Map<String, dynamic> json) {
     final workspace = json['workspace'] != null
-        ? WorkspaceClientCapabilities.fromJson(json['workspace'])
+        ? ClientCapabilitiesWorkspace.fromJson(json['workspace'])
         : null;
     final textDocument = json['textDocument'] != null
         ? TextDocumentClientCapabilities.fromJson(json['textDocument'])
         : null;
+    final window = json['window'] != null
+        ? ClientCapabilitiesWindow.fromJson(json['window'])
+        : null;
     final experimental = json['experimental'];
-    return ClientCapabilities(workspace, textDocument, experimental);
+    return ClientCapabilities(
+        workspace: workspace,
+        textDocument: textDocument,
+        window: window,
+        experimental: experimental);
   }
 
   /// Experimental client capabilities.
@@ -298,8 +308,11 @@
   /// Text document specific client capabilities.
   final TextDocumentClientCapabilities textDocument;
 
+  /// Window specific client capabilities.
+  final ClientCapabilitiesWindow window;
+
   /// Workspace specific client capabilities.
-  final WorkspaceClientCapabilities workspace;
+  final ClientCapabilitiesWorkspace workspace;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
@@ -309,6 +322,9 @@
     if (textDocument != null) {
       __result['textDocument'] = textDocument;
     }
+    if (window != null) {
+      __result['window'] = window;
+    }
     if (experimental != null) {
       __result['experimental'] = experimental;
     }
@@ -320,9 +336,9 @@
       reporter.push('workspace');
       try {
         if (obj['workspace'] != null &&
-            !(WorkspaceClientCapabilities.canParse(
+            !(ClientCapabilitiesWorkspace.canParse(
                 obj['workspace'], reporter))) {
-          reporter.reportError('must be of type WorkspaceClientCapabilities');
+          reporter.reportError('must be of type ClientCapabilitiesWorkspace');
           return false;
         }
       } finally {
@@ -340,6 +356,16 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('window');
+      try {
+        if (obj['window'] != null &&
+            !(ClientCapabilitiesWindow.canParse(obj['window'], reporter))) {
+          reporter.reportError('must be of type ClientCapabilitiesWindow');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('experimental');
       try {
         if (obj['experimental'] != null && !(true)) {
@@ -362,6 +388,7 @@
         other.runtimeType == ClientCapabilities) {
       return workspace == other.workspace &&
           textDocument == other.textDocument &&
+          window == other.window &&
           experimental == other.experimental &&
           true;
     }
@@ -373,6 +400,7 @@
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, workspace.hashCode);
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, window.hashCode);
     hash = JenkinsSmiHash.combine(hash, experimental.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
@@ -381,6 +409,308 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class ClientCapabilitiesWindow implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      ClientCapabilitiesWindow.canParse, ClientCapabilitiesWindow.fromJson);
+
+  ClientCapabilitiesWindow({this.workDoneProgress});
+  static ClientCapabilitiesWindow fromJson(Map<String, dynamic> json) {
+    final workDoneProgress = json['workDoneProgress'];
+    return ClientCapabilitiesWindow(workDoneProgress: workDoneProgress);
+  }
+
+  /// Whether client supports handling progress notifications. If set servers
+  /// are allowed to report in `workDoneProgress` property in the request
+  /// specific server capabilities.
+  ///
+  /// Since 3.15.0
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ClientCapabilitiesWindow');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ClientCapabilitiesWindow &&
+        other.runtimeType == ClientCapabilitiesWindow) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ClientCapabilitiesWorkspace implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      ClientCapabilitiesWorkspace.canParse,
+      ClientCapabilitiesWorkspace.fromJson);
+
+  ClientCapabilitiesWorkspace(
+      {this.applyEdit,
+      this.workspaceEdit,
+      this.didChangeConfiguration,
+      this.didChangeWatchedFiles,
+      this.symbol,
+      this.executeCommand,
+      this.workspaceFolders,
+      this.configuration});
+  static ClientCapabilitiesWorkspace fromJson(Map<String, dynamic> json) {
+    final applyEdit = json['applyEdit'];
+    final workspaceEdit = json['workspaceEdit'] != null
+        ? WorkspaceEditClientCapabilities.fromJson(json['workspaceEdit'])
+        : null;
+    final didChangeConfiguration = json['didChangeConfiguration'] != null
+        ? DidChangeConfigurationClientCapabilities.fromJson(
+            json['didChangeConfiguration'])
+        : null;
+    final didChangeWatchedFiles = json['didChangeWatchedFiles'] != null
+        ? DidChangeWatchedFilesClientCapabilities.fromJson(
+            json['didChangeWatchedFiles'])
+        : null;
+    final symbol = json['symbol'] != null
+        ? WorkspaceSymbolClientCapabilities.fromJson(json['symbol'])
+        : null;
+    final executeCommand = json['executeCommand'] != null
+        ? ExecuteCommandClientCapabilities.fromJson(json['executeCommand'])
+        : null;
+    final workspaceFolders = json['workspaceFolders'];
+    final configuration = json['configuration'];
+    return ClientCapabilitiesWorkspace(
+        applyEdit: applyEdit,
+        workspaceEdit: workspaceEdit,
+        didChangeConfiguration: didChangeConfiguration,
+        didChangeWatchedFiles: didChangeWatchedFiles,
+        symbol: symbol,
+        executeCommand: executeCommand,
+        workspaceFolders: workspaceFolders,
+        configuration: configuration);
+  }
+
+  /// The client supports applying batch edits to the workspace by supporting
+  /// the request 'workspace/applyEdit'
+  final bool applyEdit;
+
+  /// The client supports `workspace/configuration` requests.
+  ///
+  /// Since 3.6.0
+  final bool configuration;
+
+  /// Capabilities specific to the `workspace/didChangeConfiguration`
+  /// notification.
+  final DidChangeConfigurationClientCapabilities didChangeConfiguration;
+
+  /// Capabilities specific to the `workspace/didChangeWatchedFiles`
+  /// notification.
+  final DidChangeWatchedFilesClientCapabilities didChangeWatchedFiles;
+
+  /// Capabilities specific to the `workspace/executeCommand` request.
+  final ExecuteCommandClientCapabilities executeCommand;
+
+  /// Capabilities specific to the `workspace/symbol` request.
+  final WorkspaceSymbolClientCapabilities symbol;
+
+  /// Capabilities specific to `WorkspaceEdit`s
+  final WorkspaceEditClientCapabilities workspaceEdit;
+
+  /// The client has support for workspace folders.
+  ///
+  /// Since 3.6.0
+  final bool workspaceFolders;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (applyEdit != null) {
+      __result['applyEdit'] = applyEdit;
+    }
+    if (workspaceEdit != null) {
+      __result['workspaceEdit'] = workspaceEdit;
+    }
+    if (didChangeConfiguration != null) {
+      __result['didChangeConfiguration'] = didChangeConfiguration;
+    }
+    if (didChangeWatchedFiles != null) {
+      __result['didChangeWatchedFiles'] = didChangeWatchedFiles;
+    }
+    if (symbol != null) {
+      __result['symbol'] = symbol;
+    }
+    if (executeCommand != null) {
+      __result['executeCommand'] = executeCommand;
+    }
+    if (workspaceFolders != null) {
+      __result['workspaceFolders'] = workspaceFolders;
+    }
+    if (configuration != null) {
+      __result['configuration'] = configuration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('applyEdit');
+      try {
+        if (obj['applyEdit'] != null && !(obj['applyEdit'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workspaceEdit');
+      try {
+        if (obj['workspaceEdit'] != null &&
+            !(WorkspaceEditClientCapabilities.canParse(
+                obj['workspaceEdit'], reporter))) {
+          reporter
+              .reportError('must be of type WorkspaceEditClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('didChangeConfiguration');
+      try {
+        if (obj['didChangeConfiguration'] != null &&
+            !(DidChangeConfigurationClientCapabilities.canParse(
+                obj['didChangeConfiguration'], reporter))) {
+          reporter.reportError(
+              'must be of type DidChangeConfigurationClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('didChangeWatchedFiles');
+      try {
+        if (obj['didChangeWatchedFiles'] != null &&
+            !(DidChangeWatchedFilesClientCapabilities.canParse(
+                obj['didChangeWatchedFiles'], reporter))) {
+          reporter.reportError(
+              'must be of type DidChangeWatchedFilesClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('symbol');
+      try {
+        if (obj['symbol'] != null &&
+            !(WorkspaceSymbolClientCapabilities.canParse(
+                obj['symbol'], reporter))) {
+          reporter
+              .reportError('must be of type WorkspaceSymbolClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('executeCommand');
+      try {
+        if (obj['executeCommand'] != null &&
+            !(ExecuteCommandClientCapabilities.canParse(
+                obj['executeCommand'], reporter))) {
+          reporter
+              .reportError('must be of type ExecuteCommandClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workspaceFolders');
+      try {
+        if (obj['workspaceFolders'] != null &&
+            !(obj['workspaceFolders'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('configuration');
+      try {
+        if (obj['configuration'] != null && !(obj['configuration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ClientCapabilitiesWorkspace');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ClientCapabilitiesWorkspace &&
+        other.runtimeType == ClientCapabilitiesWorkspace) {
+      return applyEdit == other.applyEdit &&
+          workspaceEdit == other.workspaceEdit &&
+          didChangeConfiguration == other.didChangeConfiguration &&
+          didChangeWatchedFiles == other.didChangeWatchedFiles &&
+          symbol == other.symbol &&
+          executeCommand == other.executeCommand &&
+          workspaceFolders == other.workspaceFolders &&
+          configuration == other.configuration &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, applyEdit.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workspaceEdit.hashCode);
+    hash = JenkinsSmiHash.combine(hash, didChangeConfiguration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, didChangeWatchedFiles.hashCode);
+    hash = JenkinsSmiHash.combine(hash, symbol.hashCode);
+    hash = JenkinsSmiHash.combine(hash, executeCommand.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workspaceFolders.hashCode);
+    hash = JenkinsSmiHash.combine(hash, configuration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// A code action represents a change that can be performed in code, e.g. to fix
 /// a problem or to refactor code.
 ///
@@ -390,7 +720,13 @@
   static const jsonHandler =
       LspJsonHandler(CodeAction.canParse, CodeAction.fromJson);
 
-  CodeAction(this.title, this.kind, this.diagnostics, this.edit, this.command) {
+  CodeAction(
+      {@required this.title,
+      this.kind,
+      this.diagnostics,
+      this.isPreferred,
+      this.edit,
+      this.command}) {
     if (title == null) {
       throw 'title is required but was not provided';
     }
@@ -403,11 +739,18 @@
         ?.map((item) => item != null ? Diagnostic.fromJson(item) : null)
         ?.cast<Diagnostic>()
         ?.toList();
+    final isPreferred = json['isPreferred'];
     final edit =
         json['edit'] != null ? WorkspaceEdit.fromJson(json['edit']) : null;
     final command =
         json['command'] != null ? Command.fromJson(json['command']) : null;
-    return CodeAction(title, kind, diagnostics, edit, command);
+    return CodeAction(
+        title: title,
+        kind: kind,
+        diagnostics: diagnostics,
+        isPreferred: isPreferred,
+        edit: edit,
+        command: command);
   }
 
   /// A command this code action executes. If a code action provides an edit and
@@ -420,6 +763,15 @@
   /// The workspace edit this code action performs.
   final WorkspaceEdit edit;
 
+  /// Marks this as a preferred action. Preferred actions are used by the `auto
+  /// fix` command and can be targeted by keybindings.
+  ///
+  /// A quick fix should be marked preferred if it properly addresses the
+  /// underlying error. A refactoring should be marked preferred if it is the
+  /// most reasonable choice of actions to take.
+  ///  @since 3.15.0
+  final bool isPreferred;
+
   /// The kind of the code action.
   ///
   /// Used to filter code actions.
@@ -437,6 +789,9 @@
     if (diagnostics != null) {
       __result['diagnostics'] = diagnostics;
     }
+    if (isPreferred != null) {
+      __result['isPreferred'] = isPreferred;
+    }
     if (edit != null) {
       __result['edit'] = edit;
     }
@@ -487,6 +842,15 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('isPreferred');
+      try {
+        if (obj['isPreferred'] != null && !(obj['isPreferred'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('edit');
       try {
         if (obj['edit'] != null &&
@@ -521,6 +885,7 @@
           kind == other.kind &&
           listEqual(diagnostics, other.diagnostics,
               (Diagnostic a, Diagnostic b) => a == b) &&
+          isPreferred == other.isPreferred &&
           edit == other.edit &&
           command == other.command &&
           true;
@@ -534,6 +899,7 @@
     hash = JenkinsSmiHash.combine(hash, title.hashCode);
     hash = JenkinsSmiHash.combine(hash, kind.hashCode);
     hash = JenkinsSmiHash.combine(hash, lspHashCode(diagnostics));
+    hash = JenkinsSmiHash.combine(hash, isPreferred.hashCode);
     hash = JenkinsSmiHash.combine(hash, edit.hashCode);
     hash = JenkinsSmiHash.combine(hash, command.hashCode);
     return JenkinsSmiHash.finish(hash);
@@ -543,13 +909,291 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class CodeActionClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      CodeActionClientCapabilities.canParse,
+      CodeActionClientCapabilities.fromJson);
+
+  CodeActionClientCapabilities(
+      {this.dynamicRegistration,
+      this.codeActionLiteralSupport,
+      this.isPreferredSupport});
+  static CodeActionClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final codeActionLiteralSupport = json['codeActionLiteralSupport'] != null
+        ? CodeActionClientCapabilitiesCodeActionLiteralSupport.fromJson(
+            json['codeActionLiteralSupport'])
+        : null;
+    final isPreferredSupport = json['isPreferredSupport'];
+    return CodeActionClientCapabilities(
+        dynamicRegistration: dynamicRegistration,
+        codeActionLiteralSupport: codeActionLiteralSupport,
+        isPreferredSupport: isPreferredSupport);
+  }
+
+  /// The client supports code action literals as a valid response of the
+  /// `textDocument/codeAction` request.
+  ///  @since 3.8.0
+  final CodeActionClientCapabilitiesCodeActionLiteralSupport
+      codeActionLiteralSupport;
+
+  /// Whether code action supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// Whether code action supports the `isPreferred` property. @since 3.15.0
+  final bool isPreferredSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (codeActionLiteralSupport != null) {
+      __result['codeActionLiteralSupport'] = codeActionLiteralSupport;
+    }
+    if (isPreferredSupport != null) {
+      __result['isPreferredSupport'] = isPreferredSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('codeActionLiteralSupport');
+      try {
+        if (obj['codeActionLiteralSupport'] != null &&
+            !(CodeActionClientCapabilitiesCodeActionLiteralSupport.canParse(
+                obj['codeActionLiteralSupport'], reporter))) {
+          reporter.reportError(
+              'must be of type CodeActionClientCapabilitiesCodeActionLiteralSupport');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('isPreferredSupport');
+      try {
+        if (obj['isPreferredSupport'] != null &&
+            !(obj['isPreferredSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type CodeActionClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is CodeActionClientCapabilities &&
+        other.runtimeType == CodeActionClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          codeActionLiteralSupport == other.codeActionLiteralSupport &&
+          isPreferredSupport == other.isPreferredSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, codeActionLiteralSupport.hashCode);
+    hash = JenkinsSmiHash.combine(hash, isPreferredSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class CodeActionClientCapabilitiesCodeActionKind implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      CodeActionClientCapabilitiesCodeActionKind.canParse,
+      CodeActionClientCapabilitiesCodeActionKind.fromJson);
+
+  CodeActionClientCapabilitiesCodeActionKind({@required this.valueSet}) {
+    if (valueSet == null) {
+      throw 'valueSet is required but was not provided';
+    }
+  }
+  static CodeActionClientCapabilitiesCodeActionKind fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? CodeActionKind.fromJson(item) : null)
+        ?.cast<CodeActionKind>()
+        ?.toList();
+    return CodeActionClientCapabilitiesCodeActionKind(valueSet: valueSet);
+  }
+
+  /// The code action kind values the client supports. When this property exists
+  /// the client also guarantees that it will handle values outside its set
+  /// gracefully and falls back to a default value when unknown.
+  final List<CodeActionKind> valueSet;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['valueSet'] =
+        valueSet ?? (throw 'valueSet is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('valueSet');
+      try {
+        if (!obj.containsKey('valueSet')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['valueSet'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!((obj['valueSet'] is List &&
+            (obj['valueSet']
+                .every((item) => CodeActionKind.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<CodeActionKind>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type CodeActionClientCapabilitiesCodeActionKind');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is CodeActionClientCapabilitiesCodeActionKind &&
+        other.runtimeType == CodeActionClientCapabilitiesCodeActionKind) {
+      return listEqual(valueSet, other.valueSet,
+              (CodeActionKind a, CodeActionKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class CodeActionClientCapabilitiesCodeActionLiteralSupport
+    implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      CodeActionClientCapabilitiesCodeActionLiteralSupport.canParse,
+      CodeActionClientCapabilitiesCodeActionLiteralSupport.fromJson);
+
+  CodeActionClientCapabilitiesCodeActionLiteralSupport(
+      {@required this.codeActionKind}) {
+    if (codeActionKind == null) {
+      throw 'codeActionKind is required but was not provided';
+    }
+  }
+  static CodeActionClientCapabilitiesCodeActionLiteralSupport fromJson(
+      Map<String, dynamic> json) {
+    final codeActionKind = json['codeActionKind'] != null
+        ? CodeActionClientCapabilitiesCodeActionKind.fromJson(
+            json['codeActionKind'])
+        : null;
+    return CodeActionClientCapabilitiesCodeActionLiteralSupport(
+        codeActionKind: codeActionKind);
+  }
+
+  /// The code action kind is supported with the following value set.
+  final CodeActionClientCapabilitiesCodeActionKind codeActionKind;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['codeActionKind'] =
+        codeActionKind ?? (throw 'codeActionKind is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('codeActionKind');
+      try {
+        if (!obj.containsKey('codeActionKind')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['codeActionKind'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(CodeActionClientCapabilitiesCodeActionKind.canParse(
+            obj['codeActionKind'], reporter))) {
+          reporter.reportError(
+              'must be of type CodeActionClientCapabilitiesCodeActionKind');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type CodeActionClientCapabilitiesCodeActionLiteralSupport');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is CodeActionClientCapabilitiesCodeActionLiteralSupport &&
+        other.runtimeType ==
+            CodeActionClientCapabilitiesCodeActionLiteralSupport) {
+      return codeActionKind == other.codeActionKind && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, codeActionKind.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// Contains additional diagnostic information about the context in which a code
 /// action is run.
 class CodeActionContext implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(CodeActionContext.canParse, CodeActionContext.fromJson);
 
-  CodeActionContext(this.diagnostics, this.only) {
+  CodeActionContext({@required this.diagnostics, this.only}) {
     if (diagnostics == null) {
       throw 'diagnostics is required but was not provided';
     }
@@ -563,10 +1207,15 @@
         ?.map((item) => item != null ? CodeActionKind.fromJson(item) : null)
         ?.cast<CodeActionKind>()
         ?.toList();
-    return CodeActionContext(diagnostics, only);
+    return CodeActionContext(diagnostics: diagnostics, only: only);
   }
 
-  /// An array of diagnostics.
+  /// An array of diagnostics known on the client side overlapping the range
+  /// provided to the `textDocument/codeAction` request. They are provided so
+  /// that the server knows which errors are currently presented to the user for
+  /// the given range. There is no guarantee that these accurately reflect the
+  /// error state of the resource. The primary parameter to compute code actions
+  /// is the provided range.
   final List<Diagnostic> diagnostics;
 
   /// Requested kind of actions to return.
@@ -649,7 +1298,7 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-/// A set of predefined code action kinds
+/// A set of predefined code action kinds.
 class CodeActionKind {
   const CodeActionKind(this._value);
   const CodeActionKind.fromJson(this._value);
@@ -663,13 +1312,13 @@
   /// Empty kind.
   static const Empty = CodeActionKind('');
 
-  /// Base kind for quickfix actions: 'quickfix'
+  /// Base kind for quickfix actions: 'quickfix'.
   static const QuickFix = CodeActionKind('quickfix');
 
-  /// Base kind for refactoring actions: 'refactor'
+  /// Base kind for refactoring actions: 'refactor'.
   static const Refactor = CodeActionKind('refactor');
 
-  /// Base kind for refactoring extraction actions: 'refactor.extract'
+  /// Base kind for refactoring extraction actions: 'refactor.extract'.
   ///
   /// Example extract actions:
   ///
@@ -680,7 +1329,7 @@
   /// - ...
   static const RefactorExtract = CodeActionKind('refactor.extract');
 
-  /// Base kind for refactoring inline actions: 'refactor.inline'
+  /// Base kind for refactoring inline actions: 'refactor.inline'.
   ///
   /// Example inline actions:
   ///
@@ -690,7 +1339,7 @@
   /// - ...
   static const RefactorInline = CodeActionKind('refactor.inline');
 
-  /// Base kind for refactoring rewrite actions: 'refactor.rewrite'
+  /// Base kind for refactoring rewrite actions: 'refactor.rewrite'.
   ///
   /// Example rewrite actions:
   ///
@@ -702,12 +1351,12 @@
   /// - ...
   static const RefactorRewrite = CodeActionKind('refactor.rewrite');
 
-  /// Base kind for source actions: `source`
+  /// Base kind for source actions: `source`.
   ///
   /// Source code actions apply to the entire file.
   static const Source = CodeActionKind('source');
 
-  /// Base kind for an organize imports source action: `source.organizeImports`
+  /// Base kind for an organize imports source action: `source.organizeImports`.
   static const SourceOrganizeImports = CodeActionKind('source.organizeImports');
 
   Object toJson() => _value;
@@ -721,12 +1370,11 @@
   bool operator ==(Object o) => o is CodeActionKind && o._value == _value;
 }
 
-/// Code Action options.
-class CodeActionOptions implements ToJsonable {
+class CodeActionOptions implements WorkDoneProgressOptions, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(CodeActionOptions.canParse, CodeActionOptions.fromJson);
 
-  CodeActionOptions(this.codeActionKinds);
+  CodeActionOptions({this.codeActionKinds, this.workDoneProgress});
   static CodeActionOptions fromJson(Map<String, dynamic> json) {
     if (CodeActionRegistrationOptions.canParse(json, nullLspJsonReporter)) {
       return CodeActionRegistrationOptions.fromJson(json);
@@ -735,7 +1383,9 @@
         ?.map((item) => item != null ? CodeActionKind.fromJson(item) : null)
         ?.cast<CodeActionKind>()
         ?.toList();
-    return CodeActionOptions(codeActionKinds);
+    final workDoneProgress = json['workDoneProgress'];
+    return CodeActionOptions(
+        codeActionKinds: codeActionKinds, workDoneProgress: workDoneProgress);
   }
 
   /// CodeActionKinds that this server may return.
@@ -743,12 +1393,16 @@
   /// The list of kinds may be generic, such as `CodeActionKind.Refactor`, or
   /// the server may list out every specific kind they provide.
   final List<CodeActionKind> codeActionKinds;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     if (codeActionKinds != null) {
       __result['codeActionKinds'] = codeActionKinds;
     }
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
@@ -766,6 +1420,16 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type CodeActionOptions');
@@ -778,6 +1442,7 @@
     if (other is CodeActionOptions && other.runtimeType == CodeActionOptions) {
       return listEqual(codeActionKinds, other.codeActionKinds,
               (CodeActionKind a, CodeActionKind b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -787,6 +1452,7 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, lspHashCode(codeActionKinds));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -795,11 +1461,17 @@
 }
 
 /// Params for the CodeActionRequest
-class CodeActionParams implements ToJsonable {
+class CodeActionParams
+    implements WorkDoneProgressParams, PartialResultParams, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(CodeActionParams.canParse, CodeActionParams.fromJson);
 
-  CodeActionParams(this.textDocument, this.range, this.context) {
+  CodeActionParams(
+      {@required this.textDocument,
+      @required this.range,
+      @required this.context,
+      this.workDoneToken,
+      this.partialResultToken}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -818,18 +1490,44 @@
     final context = json['context'] != null
         ? CodeActionContext.fromJson(json['context'])
         : null;
-    return CodeActionParams(textDocument, range, context);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return CodeActionParams(
+        textDocument: textDocument,
+        range: range,
+        context: context,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
   }
 
   /// Context carrying additional information.
   final CodeActionContext context;
 
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
   /// The range for which the command was invoked.
   final Range range;
 
   /// The document in which the command was invoked.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['textDocument'] =
@@ -837,6 +1535,12 @@
     __result['range'] = range ?? (throw 'range is required but was not set');
     __result['context'] =
         context ?? (throw 'context is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
     return __result;
   }
 
@@ -893,6 +1597,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type CodeActionParams');
@@ -906,6 +1632,8 @@
       return textDocument == other.textDocument &&
           range == other.range &&
           context == other.context &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
           true;
     }
     return false;
@@ -917,6 +1645,8 @@
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
     hash = JenkinsSmiHash.combine(hash, range.hashCode);
     hash = JenkinsSmiHash.combine(hash, context.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -930,7 +1660,8 @@
       CodeActionRegistrationOptions.canParse,
       CodeActionRegistrationOptions.fromJson);
 
-  CodeActionRegistrationOptions(this.documentSelector, this.codeActionKinds);
+  CodeActionRegistrationOptions(
+      {this.documentSelector, this.codeActionKinds, this.workDoneProgress});
   static CodeActionRegistrationOptions fromJson(Map<String, dynamic> json) {
     final documentSelector = json['documentSelector']
         ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
@@ -940,7 +1671,11 @@
         ?.map((item) => item != null ? CodeActionKind.fromJson(item) : null)
         ?.cast<CodeActionKind>()
         ?.toList();
-    return CodeActionRegistrationOptions(documentSelector, codeActionKinds);
+    final workDoneProgress = json['workDoneProgress'];
+    return CodeActionRegistrationOptions(
+        documentSelector: documentSelector,
+        codeActionKinds: codeActionKinds,
+        workDoneProgress: workDoneProgress);
   }
 
   /// CodeActionKinds that this server may return.
@@ -952,6 +1687,7 @@
   /// A document selector to identify the scope of the registration. If set to
   /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
@@ -959,6 +1695,9 @@
     if (codeActionKinds != null) {
       __result['codeActionKinds'] = codeActionKinds;
     }
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
@@ -992,6 +1731,16 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type CodeActionRegistrationOptions');
@@ -1007,6 +1756,7 @@
               (DocumentFilter a, DocumentFilter b) => a == b) &&
           listEqual(codeActionKinds, other.codeActionKinds,
               (CodeActionKind a, CodeActionKind b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -1017,6 +1767,7 @@
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
     hash = JenkinsSmiHash.combine(hash, lspHashCode(codeActionKinds));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -1034,7 +1785,7 @@
   static const jsonHandler =
       LspJsonHandler(CodeLens.canParse, CodeLens.fromJson);
 
-  CodeLens(this.range, this.command, this.data) {
+  CodeLens({@required this.range, this.command, this.data}) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
@@ -1044,7 +1795,7 @@
     final command =
         json['command'] != null ? Command.fromJson(json['command']) : null;
     final data = json['data'];
-    return CodeLens(range, command, data);
+    return CodeLens(range: range, command: command, data: data);
   }
 
   /// The command this code lens represents.
@@ -1139,25 +1890,93 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Code Lens options.
-class CodeLensOptions implements ToJsonable {
+class CodeLensClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      CodeLensClientCapabilities.canParse, CodeLensClientCapabilities.fromJson);
+
+  CodeLensClientCapabilities({this.dynamicRegistration});
+  static CodeLensClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return CodeLensClientCapabilities(dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Whether code lens supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type CodeLensClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is CodeLensClientCapabilities &&
+        other.runtimeType == CodeLensClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class CodeLensOptions implements WorkDoneProgressOptions, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(CodeLensOptions.canParse, CodeLensOptions.fromJson);
 
-  CodeLensOptions(this.resolveProvider);
+  CodeLensOptions({this.resolveProvider, this.workDoneProgress});
   static CodeLensOptions fromJson(Map<String, dynamic> json) {
+    if (CodeLensRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return CodeLensRegistrationOptions.fromJson(json);
+    }
     final resolveProvider = json['resolveProvider'];
-    return CodeLensOptions(resolveProvider);
+    final workDoneProgress = json['workDoneProgress'];
+    return CodeLensOptions(
+        resolveProvider: resolveProvider, workDoneProgress: workDoneProgress);
   }
 
   /// Code lens has a resolve provider as well.
   final bool resolveProvider;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     if (resolveProvider != null) {
       __result['resolveProvider'] = resolveProvider;
     }
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
@@ -1173,6 +1992,16 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type CodeLensOptions');
@@ -1183,7 +2012,9 @@
   @override
   bool operator ==(Object other) {
     if (other is CodeLensOptions && other.runtimeType == CodeLensOptions) {
-      return resolveProvider == other.resolveProvider && true;
+      return resolveProvider == other.resolveProvider &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
     }
     return false;
   }
@@ -1192,6 +2023,7 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -1199,11 +2031,15 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class CodeLensParams implements ToJsonable {
+class CodeLensParams
+    implements WorkDoneProgressParams, PartialResultParams, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(CodeLensParams.canParse, CodeLensParams.fromJson);
 
-  CodeLensParams(this.textDocument) {
+  CodeLensParams(
+      {@required this.textDocument,
+      this.workDoneToken,
+      this.partialResultToken}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -1212,16 +2048,46 @@
     final textDocument = json['textDocument'] != null
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    return CodeLensParams(textDocument);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return CodeLensParams(
+        textDocument: textDocument,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
   }
 
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
   /// The document to request code lens for.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['textDocument'] =
         textDocument ?? (throw 'textDocument is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
     return __result;
   }
 
@@ -1244,6 +2110,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type CodeLensParams');
@@ -1254,7 +2142,10 @@
   @override
   bool operator ==(Object other) {
     if (other is CodeLensParams && other.runtimeType == CodeLensParams) {
-      return textDocument == other.textDocument && true;
+      return textDocument == other.textDocument &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
     }
     return false;
   }
@@ -1263,6 +2154,8 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -1271,19 +2164,24 @@
 }
 
 class CodeLensRegistrationOptions
-    implements TextDocumentRegistrationOptions, ToJsonable {
+    implements TextDocumentRegistrationOptions, CodeLensOptions, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       CodeLensRegistrationOptions.canParse,
       CodeLensRegistrationOptions.fromJson);
 
-  CodeLensRegistrationOptions(this.resolveProvider, this.documentSelector);
+  CodeLensRegistrationOptions(
+      {this.documentSelector, this.resolveProvider, this.workDoneProgress});
   static CodeLensRegistrationOptions fromJson(Map<String, dynamic> json) {
-    final resolveProvider = json['resolveProvider'];
     final documentSelector = json['documentSelector']
         ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
-    return CodeLensRegistrationOptions(resolveProvider, documentSelector);
+    final resolveProvider = json['resolveProvider'];
+    final workDoneProgress = json['workDoneProgress'];
+    return CodeLensRegistrationOptions(
+        documentSelector: documentSelector,
+        resolveProvider: resolveProvider,
+        workDoneProgress: workDoneProgress);
   }
 
   /// A document selector to identify the scope of the registration. If set to
@@ -1292,28 +2190,22 @@
 
   /// Code lens has a resolve provider as well.
   final bool resolveProvider;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
     if (resolveProvider != null) {
       __result['resolveProvider'] = resolveProvider;
     }
-    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
-      reporter.push('resolveProvider');
-      try {
-        if (obj['resolveProvider'] != null &&
-            !(obj['resolveProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
       reporter.push('documentSelector');
       try {
         if (!obj.containsKey('documentSelector')) {
@@ -1330,6 +2222,26 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('resolveProvider');
+      try {
+        if (obj['resolveProvider'] != null &&
+            !(obj['resolveProvider'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type CodeLensRegistrationOptions');
@@ -1341,9 +2253,10 @@
   bool operator ==(Object other) {
     if (other is CodeLensRegistrationOptions &&
         other.runtimeType == CodeLensRegistrationOptions) {
-      return resolveProvider == other.resolveProvider &&
-          listEqual(documentSelector, other.documentSelector,
+      return listEqual(documentSelector, other.documentSelector,
               (DocumentFilter a, DocumentFilter b) => a == b) &&
+          resolveProvider == other.resolveProvider &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -1352,8 +2265,9 @@
   @override
   int get hashCode {
     var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -1365,7 +2279,11 @@
 class Color implements ToJsonable {
   static const jsonHandler = LspJsonHandler(Color.canParse, Color.fromJson);
 
-  Color(this.red, this.green, this.blue, this.alpha) {
+  Color(
+      {@required this.red,
+      @required this.green,
+      @required this.blue,
+      @required this.alpha}) {
     if (red == null) {
       throw 'red is required but was not provided';
     }
@@ -1384,7 +2302,7 @@
     final green = json['green'];
     final blue = json['blue'];
     final alpha = json['alpha'];
-    return Color(red, green, blue, alpha);
+    return Color(red: red, green: green, blue: blue, alpha: alpha);
   }
 
   /// The alpha component of this color in the range [0-1].
@@ -1515,7 +2433,7 @@
   static const jsonHandler =
       LspJsonHandler(ColorInformation.canParse, ColorInformation.fromJson);
 
-  ColorInformation(this.range, this.color) {
+  ColorInformation({@required this.range, @required this.color}) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
@@ -1526,7 +2444,7 @@
   static ColorInformation fromJson(Map<String, dynamic> json) {
     final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final color = json['color'] != null ? Color.fromJson(json['color']) : null;
-    return ColorInformation(range, color);
+    return ColorInformation(range: range, color: color);
   }
 
   /// The actual color value for this color range.
@@ -1609,7 +2527,8 @@
   static const jsonHandler =
       LspJsonHandler(ColorPresentation.canParse, ColorPresentation.fromJson);
 
-  ColorPresentation(this.label, this.textEdit, this.additionalTextEdits) {
+  ColorPresentation(
+      {@required this.label, this.textEdit, this.additionalTextEdits}) {
     if (label == null) {
       throw 'label is required but was not provided';
     }
@@ -1622,7 +2541,10 @@
         ?.map((item) => item != null ? TextEdit.fromJson(item) : null)
         ?.cast<TextEdit>()
         ?.toList();
-    return ColorPresentation(label, textEdit, additionalTextEdits);
+    return ColorPresentation(
+        label: label,
+        textEdit: textEdit,
+        additionalTextEdits: additionalTextEdits);
   }
 
   /// An optional array of additional text edits ([TextEdit]) that are applied
@@ -1725,11 +2647,17 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class ColorPresentationParams implements ToJsonable {
+class ColorPresentationParams
+    implements WorkDoneProgressParams, PartialResultParams, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       ColorPresentationParams.canParse, ColorPresentationParams.fromJson);
 
-  ColorPresentationParams(this.textDocument, this.color, this.range) {
+  ColorPresentationParams(
+      {@required this.textDocument,
+      @required this.color,
+      @required this.range,
+      this.workDoneToken,
+      this.partialResultToken}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -1746,24 +2674,56 @@
         : null;
     final color = json['color'] != null ? Color.fromJson(json['color']) : null;
     final range = json['range'] != null ? Range.fromJson(json['range']) : null;
-    return ColorPresentationParams(textDocument, color, range);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return ColorPresentationParams(
+        textDocument: textDocument,
+        color: color,
+        range: range,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
   }
 
   /// The color information to request presentations for.
   final Color color;
 
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
   /// The range where the color would be inserted. Serves as a context.
   final Range range;
 
   /// The text document.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['textDocument'] =
         textDocument ?? (throw 'textDocument is required but was not set');
     __result['color'] = color ?? (throw 'color is required but was not set');
     __result['range'] = range ?? (throw 'range is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
     return __result;
   }
 
@@ -1820,6 +2780,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type ColorPresentationParams');
@@ -1834,6 +2816,8 @@
       return textDocument == other.textDocument &&
           color == other.color &&
           range == other.range &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
           true;
     }
     return false;
@@ -1845,48 +2829,8 @@
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
     hash = JenkinsSmiHash.combine(hash, color.hashCode);
     hash = JenkinsSmiHash.combine(hash, range.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-/// Color provider options.
-class ColorProviderOptions implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      ColorProviderOptions.canParse, ColorProviderOptions.fromJson);
-
-  static ColorProviderOptions fromJson(Map<String, dynamic> json) {
-    return ColorProviderOptions();
-  }
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      return true;
-    } else {
-      reporter.reportError('must be of type ColorProviderOptions');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is ColorProviderOptions &&
-        other.runtimeType == ColorProviderOptions) {
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -1897,7 +2841,7 @@
 class Command implements ToJsonable {
   static const jsonHandler = LspJsonHandler(Command.canParse, Command.fromJson);
 
-  Command(this.title, this.command, this.arguments) {
+  Command({@required this.title, @required this.command, this.arguments}) {
     if (title == null) {
       throw 'title is required but was not provided';
     }
@@ -1910,7 +2854,7 @@
     final command = json['command'];
     final arguments =
         json['arguments']?.map((item) => item)?.cast<dynamic>()?.toList();
-    return Command(title, command, arguments);
+    return Command(title: title, command: command, arguments: arguments);
   }
 
   /// Arguments that the command handler should be invoked with.
@@ -2012,13 +2956,494 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class CompletionClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      CompletionClientCapabilities.canParse,
+      CompletionClientCapabilities.fromJson);
+
+  CompletionClientCapabilities(
+      {this.dynamicRegistration,
+      this.completionItem,
+      this.completionItemKind,
+      this.contextSupport});
+  static CompletionClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final completionItem = json['completionItem'] != null
+        ? CompletionClientCapabilitiesCompletionItem.fromJson(
+            json['completionItem'])
+        : null;
+    final completionItemKind = json['completionItemKind'] != null
+        ? CompletionClientCapabilitiesCompletionItemKind.fromJson(
+            json['completionItemKind'])
+        : null;
+    final contextSupport = json['contextSupport'];
+    return CompletionClientCapabilities(
+        dynamicRegistration: dynamicRegistration,
+        completionItem: completionItem,
+        completionItemKind: completionItemKind,
+        contextSupport: contextSupport);
+  }
+
+  /// The client supports the following `CompletionItem` specific capabilities.
+  final CompletionClientCapabilitiesCompletionItem completionItem;
+  final CompletionClientCapabilitiesCompletionItemKind completionItemKind;
+
+  /// The client supports to send additional context information for a
+  /// `textDocument/completion` request.
+  final bool contextSupport;
+
+  /// Whether completion supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (completionItem != null) {
+      __result['completionItem'] = completionItem;
+    }
+    if (completionItemKind != null) {
+      __result['completionItemKind'] = completionItemKind;
+    }
+    if (contextSupport != null) {
+      __result['contextSupport'] = contextSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('completionItem');
+      try {
+        if (obj['completionItem'] != null &&
+            !(CompletionClientCapabilitiesCompletionItem.canParse(
+                obj['completionItem'], reporter))) {
+          reporter.reportError(
+              'must be of type CompletionClientCapabilitiesCompletionItem');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('completionItemKind');
+      try {
+        if (obj['completionItemKind'] != null &&
+            !(CompletionClientCapabilitiesCompletionItemKind.canParse(
+                obj['completionItemKind'], reporter))) {
+          reporter.reportError(
+              'must be of type CompletionClientCapabilitiesCompletionItemKind');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('contextSupport');
+      try {
+        if (obj['contextSupport'] != null && !(obj['contextSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type CompletionClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is CompletionClientCapabilities &&
+        other.runtimeType == CompletionClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          completionItem == other.completionItem &&
+          completionItemKind == other.completionItemKind &&
+          contextSupport == other.contextSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, completionItem.hashCode);
+    hash = JenkinsSmiHash.combine(hash, completionItemKind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, contextSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class CompletionClientCapabilitiesCompletionItem implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      CompletionClientCapabilitiesCompletionItem.canParse,
+      CompletionClientCapabilitiesCompletionItem.fromJson);
+
+  CompletionClientCapabilitiesCompletionItem(
+      {this.snippetSupport,
+      this.commitCharactersSupport,
+      this.documentationFormat,
+      this.deprecatedSupport,
+      this.preselectSupport,
+      this.tagSupport});
+  static CompletionClientCapabilitiesCompletionItem fromJson(
+      Map<String, dynamic> json) {
+    final snippetSupport = json['snippetSupport'];
+    final commitCharactersSupport = json['commitCharactersSupport'];
+    final documentationFormat = json['documentationFormat']
+        ?.map((item) => item != null ? MarkupKind.fromJson(item) : null)
+        ?.cast<MarkupKind>()
+        ?.toList();
+    final deprecatedSupport = json['deprecatedSupport'];
+    final preselectSupport = json['preselectSupport'];
+    final tagSupport = json['tagSupport'] != null
+        ? CompletionClientCapabilitiesTagSupport.fromJson(json['tagSupport'])
+        : null;
+    return CompletionClientCapabilitiesCompletionItem(
+        snippetSupport: snippetSupport,
+        commitCharactersSupport: commitCharactersSupport,
+        documentationFormat: documentationFormat,
+        deprecatedSupport: deprecatedSupport,
+        preselectSupport: preselectSupport,
+        tagSupport: tagSupport);
+  }
+
+  /// Client supports commit characters on a completion item.
+  final bool commitCharactersSupport;
+
+  /// Client supports the deprecated property on a completion item.
+  final bool deprecatedSupport;
+
+  /// Client supports the follow content formats for the documentation property.
+  /// The order describes the preferred format of the client.
+  final List<MarkupKind> documentationFormat;
+
+  /// Client supports the preselect property on a completion item.
+  final bool preselectSupport;
+
+  /// Client supports snippets as insert text.
+  ///
+  /// A snippet can define tab stops and placeholders with `$1`, `$2` and
+  /// `${3:foo}`. `$0` defines the final tab stop, it defaults to the end of the
+  /// snippet. Placeholders with equal identifiers are linked, that is typing in
+  /// one will update others too.
+  final bool snippetSupport;
+
+  /// Client supports the tag property on a completion item. Clients supporting
+  /// tags have to handle unknown tags gracefully. Clients especially need to
+  /// preserve unknown tags when sending a completion item back to the server in
+  /// a resolve call.
+  ///  @since 3.15.0
+  final CompletionClientCapabilitiesTagSupport tagSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (snippetSupport != null) {
+      __result['snippetSupport'] = snippetSupport;
+    }
+    if (commitCharactersSupport != null) {
+      __result['commitCharactersSupport'] = commitCharactersSupport;
+    }
+    if (documentationFormat != null) {
+      __result['documentationFormat'] = documentationFormat;
+    }
+    if (deprecatedSupport != null) {
+      __result['deprecatedSupport'] = deprecatedSupport;
+    }
+    if (preselectSupport != null) {
+      __result['preselectSupport'] = preselectSupport;
+    }
+    if (tagSupport != null) {
+      __result['tagSupport'] = tagSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('snippetSupport');
+      try {
+        if (obj['snippetSupport'] != null && !(obj['snippetSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('commitCharactersSupport');
+      try {
+        if (obj['commitCharactersSupport'] != null &&
+            !(obj['commitCharactersSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('documentationFormat');
+      try {
+        if (obj['documentationFormat'] != null &&
+            !((obj['documentationFormat'] is List &&
+                (obj['documentationFormat']
+                    .every((item) => MarkupKind.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<MarkupKind>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('deprecatedSupport');
+      try {
+        if (obj['deprecatedSupport'] != null &&
+            !(obj['deprecatedSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('preselectSupport');
+      try {
+        if (obj['preselectSupport'] != null &&
+            !(obj['preselectSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('tagSupport');
+      try {
+        if (obj['tagSupport'] != null &&
+            !(CompletionClientCapabilitiesTagSupport.canParse(
+                obj['tagSupport'], reporter))) {
+          reporter.reportError(
+              'must be of type CompletionClientCapabilitiesTagSupport');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type CompletionClientCapabilitiesCompletionItem');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is CompletionClientCapabilitiesCompletionItem &&
+        other.runtimeType == CompletionClientCapabilitiesCompletionItem) {
+      return snippetSupport == other.snippetSupport &&
+          commitCharactersSupport == other.commitCharactersSupport &&
+          listEqual(documentationFormat, other.documentationFormat,
+              (MarkupKind a, MarkupKind b) => a == b) &&
+          deprecatedSupport == other.deprecatedSupport &&
+          preselectSupport == other.preselectSupport &&
+          tagSupport == other.tagSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, snippetSupport.hashCode);
+    hash = JenkinsSmiHash.combine(hash, commitCharactersSupport.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentationFormat));
+    hash = JenkinsSmiHash.combine(hash, deprecatedSupport.hashCode);
+    hash = JenkinsSmiHash.combine(hash, preselectSupport.hashCode);
+    hash = JenkinsSmiHash.combine(hash, tagSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class CompletionClientCapabilitiesCompletionItemKind implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      CompletionClientCapabilitiesCompletionItemKind.canParse,
+      CompletionClientCapabilitiesCompletionItemKind.fromJson);
+
+  CompletionClientCapabilitiesCompletionItemKind({this.valueSet});
+  static CompletionClientCapabilitiesCompletionItemKind fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? CompletionItemKind.fromJson(item) : null)
+        ?.cast<CompletionItemKind>()
+        ?.toList();
+    return CompletionClientCapabilitiesCompletionItemKind(valueSet: valueSet);
+  }
+
+  /// The completion item kind values the client supports. When this property
+  /// exists the client also guarantees that it will handle values outside its
+  /// set gracefully and falls back to a default value when unknown.
+  ///
+  /// If this property is not present the client only supports the completion
+  /// items kinds from `Text` to `Reference` as defined in the initial version
+  /// of the protocol.
+  final List<CompletionItemKind> valueSet;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (valueSet != null) {
+      __result['valueSet'] = valueSet;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('valueSet');
+      try {
+        if (obj['valueSet'] != null &&
+            !((obj['valueSet'] is List &&
+                (obj['valueSet'].every(
+                    (item) => CompletionItemKind.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<CompletionItemKind>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type CompletionClientCapabilitiesCompletionItemKind');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is CompletionClientCapabilitiesCompletionItemKind &&
+        other.runtimeType == CompletionClientCapabilitiesCompletionItemKind) {
+      return listEqual(valueSet, other.valueSet,
+              (CompletionItemKind a, CompletionItemKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class CompletionClientCapabilitiesTagSupport implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      CompletionClientCapabilitiesTagSupport.canParse,
+      CompletionClientCapabilitiesTagSupport.fromJson);
+
+  CompletionClientCapabilitiesTagSupport({@required this.valueSet}) {
+    if (valueSet == null) {
+      throw 'valueSet is required but was not provided';
+    }
+  }
+  static CompletionClientCapabilitiesTagSupport fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? CompletionItemTag.fromJson(item) : null)
+        ?.cast<CompletionItemTag>()
+        ?.toList();
+    return CompletionClientCapabilitiesTagSupport(valueSet: valueSet);
+  }
+
+  /// The tags supported by the client.
+  final List<CompletionItemTag> valueSet;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['valueSet'] =
+        valueSet ?? (throw 'valueSet is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('valueSet');
+      try {
+        if (!obj.containsKey('valueSet')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['valueSet'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!((obj['valueSet'] is List &&
+            (obj['valueSet'].every(
+                (item) => CompletionItemTag.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<CompletionItemTag>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type CompletionClientCapabilitiesTagSupport');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is CompletionClientCapabilitiesTagSupport &&
+        other.runtimeType == CompletionClientCapabilitiesTagSupport) {
+      return listEqual(valueSet, other.valueSet,
+              (CompletionItemTag a, CompletionItemTag b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// Contains additional information about the context in which a completion
 /// request is triggered.
 class CompletionContext implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(CompletionContext.canParse, CompletionContext.fromJson);
 
-  CompletionContext(this.triggerKind, this.triggerCharacter) {
+  CompletionContext({@required this.triggerKind, this.triggerCharacter}) {
     if (triggerKind == null) {
       throw 'triggerKind is required but was not provided';
     }
@@ -2028,7 +3453,8 @@
         ? CompletionTriggerKind.fromJson(json['triggerKind'])
         : null;
     final triggerCharacter = json['triggerCharacter'];
-    return CompletionContext(triggerKind, triggerCharacter);
+    return CompletionContext(
+        triggerKind: triggerKind, triggerCharacter: triggerCharacter);
   }
 
   /// The trigger character (a single character) that has trigger code complete.
@@ -2111,8 +3537,9 @@
       LspJsonHandler(CompletionItem.canParse, CompletionItem.fromJson);
 
   CompletionItem(
-      this.label,
+      {@required this.label,
       this.kind,
+      this.tags,
       this.detail,
       this.documentation,
       this.deprecated,
@@ -2125,7 +3552,7 @@
       this.additionalTextEdits,
       this.commitCharacters,
       this.command,
-      this.data) {
+      this.data}) {
     if (label == null) {
       throw 'label is required but was not provided';
     }
@@ -2134,6 +3561,10 @@
     final label = json['label'];
     final kind =
         json['kind'] != null ? CompletionItemKind.fromJson(json['kind']) : null;
+    final tags = json['tags']
+        ?.map((item) => item != null ? CompletionItemTag.fromJson(item) : null)
+        ?.cast<CompletionItemTag>()
+        ?.toList();
     final detail = json['detail'];
     final documentation = json['documentation'] is String
         ? Either2<String, MarkupContent>.t1(json['documentation'])
@@ -2166,21 +3597,22 @@
         ? CompletionItemResolutionInfo.fromJson(json['data'])
         : null;
     return CompletionItem(
-        label,
-        kind,
-        detail,
-        documentation,
-        deprecated,
-        preselect,
-        sortText,
-        filterText,
-        insertText,
-        insertTextFormat,
-        textEdit,
-        additionalTextEdits,
-        commitCharacters,
-        command,
-        data);
+        label: label,
+        kind: kind,
+        tags: tags,
+        detail: detail,
+        documentation: documentation,
+        deprecated: deprecated,
+        preselect: preselect,
+        sortText: sortText,
+        filterText: filterText,
+        insertText: insertText,
+        insertTextFormat: insertTextFormat,
+        textEdit: textEdit,
+        additionalTextEdits: additionalTextEdits,
+        commitCharacters: commitCharacters,
+        command: command,
+        data: data);
   }
 
   /// An optional array of additional text edits that are applied when selecting
@@ -2208,6 +3640,8 @@
   final CompletionItemResolutionInfo data;
 
   /// Indicates if this item is deprecated.
+  ///  @deprecated Use `tags` instead if supported.
+  @core.deprecated
   final bool deprecated;
 
   /// A human-readable string with additional information about this item, like
@@ -2233,7 +3667,7 @@
   final String insertText;
 
   /// The format of the insert text. The format applies to both the `insertText`
-  /// property and the `newText` property of a provided `textEdit`. If ommitted
+  /// property and the `newText` property of a provided `textEdit`. If omitted
   /// defaults to `InsertTextFormat.PlainText`.
   final InsertTextFormat insertTextFormat;
 
@@ -2257,6 +3691,10 @@
   /// When `falsy` the label is used.
   final String sortText;
 
+  /// Tags for this completion item.
+  ///  @since 3.15.0
+  final List<CompletionItemTag> tags;
+
   /// An edit which is applied to a document when selecting this completion.
   /// When an edit is provided the value of `insertText` is ignored.
   ///
@@ -2270,6 +3708,9 @@
     if (kind != null) {
       __result['kind'] = kind;
     }
+    if (tags != null) {
+      __result['tags'] = tags;
+    }
     if (detail != null) {
       __result['detail'] = detail;
     }
@@ -2341,6 +3782,18 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('tags');
+      try {
+        if (obj['tags'] != null &&
+            !((obj['tags'] is List &&
+                (obj['tags'].every(
+                    (item) => CompletionItemTag.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<CompletionItemTag>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('detail');
       try {
         if (obj['detail'] != null && !(obj['detail'] is String)) {
@@ -2482,6 +3935,8 @@
     if (other is CompletionItem && other.runtimeType == CompletionItem) {
       return label == other.label &&
           kind == other.kind &&
+          listEqual(tags, other.tags,
+              (CompletionItemTag a, CompletionItemTag b) => a == b) &&
           detail == other.detail &&
           documentation == other.documentation &&
           deprecated == other.deprecated &&
@@ -2507,6 +3962,7 @@
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, label.hashCode);
     hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(tags));
     hash = JenkinsSmiHash.combine(hash, detail.hashCode);
     hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
     hash = JenkinsSmiHash.combine(hash, deprecated.hashCode);
@@ -2575,13 +4031,40 @@
   bool operator ==(Object o) => o is CompletionItemKind && o._value == _value;
 }
 
+/// Completion item tags are extra annotations that tweak the rendering of a
+/// completion item.
+///  @since 3.15.0
+class CompletionItemTag {
+  const CompletionItemTag(this._value);
+  const CompletionItemTag.fromJson(this._value);
+
+  final num _value;
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    return obj is num;
+  }
+
+  /// Render a completion as obsolete, usually using a strike-out.
+  static const Deprecated = CompletionItemTag(1);
+
+  Object toJson() => _value;
+
+  @override
+  String toString() => _value.toString();
+
+  @override
+  int get hashCode => _value.hashCode;
+
+  bool operator ==(Object o) => o is CompletionItemTag && o._value == _value;
+}
+
 /// Represents a collection of completion items ([CompletionItem]) to be
 /// presented in the editor.
 class CompletionList implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(CompletionList.canParse, CompletionList.fromJson);
 
-  CompletionList(this.isIncomplete, this.items) {
+  CompletionList({@required this.isIncomplete, @required this.items}) {
     if (isIncomplete == null) {
       throw 'isIncomplete is required but was not provided';
     }
@@ -2595,7 +4078,7 @@
         ?.map((item) => item != null ? CompletionItem.fromJson(item) : null)
         ?.cast<CompletionItem>()
         ?.toList();
-    return CompletionList(isIncomplete, items);
+    return CompletionList(isIncomplete: isIncomplete, items: items);
   }
 
   /// This list it not complete. Further typing should result in recomputing
@@ -2682,40 +4165,105 @@
 }
 
 /// Completion options.
-class CompletionOptions implements ToJsonable {
+class CompletionOptions implements WorkDoneProgressOptions, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(CompletionOptions.canParse, CompletionOptions.fromJson);
 
-  CompletionOptions(this.resolveProvider, this.triggerCharacters);
+  CompletionOptions(
+      {this.triggerCharacters,
+      this.allCommitCharacters,
+      this.resolveProvider,
+      this.workDoneProgress});
   static CompletionOptions fromJson(Map<String, dynamic> json) {
-    final resolveProvider = json['resolveProvider'];
+    if (CompletionRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return CompletionRegistrationOptions.fromJson(json);
+    }
     final triggerCharacters = json['triggerCharacters']
         ?.map((item) => item)
         ?.cast<String>()
         ?.toList();
-    return CompletionOptions(resolveProvider, triggerCharacters);
+    final allCommitCharacters = json['allCommitCharacters']
+        ?.map((item) => item)
+        ?.cast<String>()
+        ?.toList();
+    final resolveProvider = json['resolveProvider'];
+    final workDoneProgress = json['workDoneProgress'];
+    return CompletionOptions(
+        triggerCharacters: triggerCharacters,
+        allCommitCharacters: allCommitCharacters,
+        resolveProvider: resolveProvider,
+        workDoneProgress: workDoneProgress);
   }
 
+  /// The list of all possible characters that commit a completion. This field
+  /// can be used if clients don't support individual commit characters per
+  /// completion item. See
+  /// `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`.
+  ///
+  /// If a server provides both `allCommitCharacters` and commit characters on
+  /// an individual completion item the ones on the completion item win.
+  ///  @since 3.2.0
+  final List<String> allCommitCharacters;
+
   /// The server provides support to resolve additional information for a
   /// completion item.
   final bool resolveProvider;
 
-  /// The characters that trigger completion automatically.
+  /// Most tools trigger completion request automatically without explicitly
+  /// requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they
+  /// do so when the user starts to type an identifier. For example if the user
+  /// types `c` in a JavaScript file code complete will automatically pop up
+  /// present `console` besides others as a completion item. Characters that
+  /// make up identifiers don't need to be listed here.
+  ///
+  /// If code complete should automatically be trigger on characters not being
+  /// valid inside an identifier (for example `.` in JavaScript) list them in
+  /// `triggerCharacters`.
   final List<String> triggerCharacters;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    if (triggerCharacters != null) {
+      __result['triggerCharacters'] = triggerCharacters;
+    }
+    if (allCommitCharacters != null) {
+      __result['allCommitCharacters'] = allCommitCharacters;
+    }
     if (resolveProvider != null) {
       __result['resolveProvider'] = resolveProvider;
     }
-    if (triggerCharacters != null) {
-      __result['triggerCharacters'] = triggerCharacters;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
     }
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
+      reporter.push('triggerCharacters');
+      try {
+        if (obj['triggerCharacters'] != null &&
+            !((obj['triggerCharacters'] is List &&
+                (obj['triggerCharacters'].every((item) => item is String))))) {
+          reporter.reportError('must be of type List<String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('allCommitCharacters');
+      try {
+        if (obj['allCommitCharacters'] != null &&
+            !((obj['allCommitCharacters'] is List &&
+                (obj['allCommitCharacters']
+                    .every((item) => item is String))))) {
+          reporter.reportError('must be of type List<String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('resolveProvider');
       try {
         if (obj['resolveProvider'] != null &&
@@ -2726,12 +4274,11 @@
       } finally {
         reporter.pop();
       }
-      reporter.push('triggerCharacters');
+      reporter.push('workDoneProgress');
       try {
-        if (obj['triggerCharacters'] != null &&
-            !((obj['triggerCharacters'] is List &&
-                (obj['triggerCharacters'].every((item) => item is String))))) {
-          reporter.reportError('must be of type List<String>');
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
           return false;
         }
       } finally {
@@ -2747,9 +4294,12 @@
   @override
   bool operator ==(Object other) {
     if (other is CompletionOptions && other.runtimeType == CompletionOptions) {
-      return resolveProvider == other.resolveProvider &&
-          listEqual(triggerCharacters, other.triggerCharacters,
+      return listEqual(triggerCharacters, other.triggerCharacters,
               (String a, String b) => a == b) &&
+          listEqual(allCommitCharacters, other.allCommitCharacters,
+              (String a, String b) => a == b) &&
+          resolveProvider == other.resolveProvider &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -2758,8 +4308,10 @@
   @override
   int get hashCode {
     var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, lspHashCode(triggerCharacters));
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(allCommitCharacters));
+    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -2767,11 +4319,21 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class CompletionParams implements TextDocumentPositionParams, ToJsonable {
+class CompletionParams
+    implements
+        TextDocumentPositionParams,
+        WorkDoneProgressParams,
+        PartialResultParams,
+        ToJsonable {
   static const jsonHandler =
       LspJsonHandler(CompletionParams.canParse, CompletionParams.fromJson);
 
-  CompletionParams(this.context, this.textDocument, this.position) {
+  CompletionParams(
+      {this.context,
+      @required this.textDocument,
+      @required this.position,
+      this.workDoneToken,
+      this.partialResultToken}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -2788,7 +4350,26 @@
         : null;
     final position =
         json['position'] != null ? Position.fromJson(json['position']) : null;
-    return CompletionParams(context, textDocument, position);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return CompletionParams(
+        context: context,
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
   }
 
   /// The completion context. This is only available if the client specifies to
@@ -2796,12 +4377,19 @@
   /// === true`
   final CompletionContext context;
 
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
   /// The position inside the text document.
   final Position position;
 
   /// The text document.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     if (context != null) {
@@ -2811,6 +4399,12 @@
         textDocument ?? (throw 'textDocument is required but was not set');
     __result['position'] =
         position ?? (throw 'position is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
     return __result;
   }
 
@@ -2860,6 +4454,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type CompletionParams');
@@ -2873,6 +4489,8 @@
       return context == other.context &&
           textDocument == other.textDocument &&
           position == other.position &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
           true;
     }
     return false;
@@ -2884,6 +4502,8 @@
     hash = JenkinsSmiHash.combine(hash, context.hashCode);
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
     hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -2892,14 +4512,22 @@
 }
 
 class CompletionRegistrationOptions
-    implements TextDocumentRegistrationOptions, ToJsonable {
+    implements TextDocumentRegistrationOptions, CompletionOptions, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       CompletionRegistrationOptions.canParse,
       CompletionRegistrationOptions.fromJson);
 
-  CompletionRegistrationOptions(this.triggerCharacters,
-      this.allCommitCharacters, this.resolveProvider, this.documentSelector);
+  CompletionRegistrationOptions(
+      {this.documentSelector,
+      this.triggerCharacters,
+      this.allCommitCharacters,
+      this.resolveProvider,
+      this.workDoneProgress});
   static CompletionRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
     final triggerCharacters = json['triggerCharacters']
         ?.map((item) => item)
         ?.cast<String>()
@@ -2909,23 +4537,23 @@
         ?.cast<String>()
         ?.toList();
     final resolveProvider = json['resolveProvider'];
-    final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
-        ?.cast<DocumentFilter>()
-        ?.toList();
-    return CompletionRegistrationOptions(triggerCharacters, allCommitCharacters,
-        resolveProvider, documentSelector);
+    final workDoneProgress = json['workDoneProgress'];
+    return CompletionRegistrationOptions(
+        documentSelector: documentSelector,
+        triggerCharacters: triggerCharacters,
+        allCommitCharacters: allCommitCharacters,
+        resolveProvider: resolveProvider,
+        workDoneProgress: workDoneProgress);
   }
 
   /// The list of all possible characters that commit a completion. This field
-  /// can be used if clients don't support individual commmit characters per
+  /// can be used if clients don't support individual commit characters per
   /// completion item. See
   /// `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`.
   ///
   /// If a server provides both `allCommitCharacters` and commit characters on
   /// an individual completion item the ones on the completion item win.
-  ///
-  /// Since 3.2.0
+  ///  @since 3.2.0
   final List<String> allCommitCharacters;
 
   /// A document selector to identify the scope of the registration. If set to
@@ -2947,9 +4575,11 @@
   /// valid inside an identifier (for example `.` in JavaScript) list them in
   /// `triggerCharacters`.
   final List<String> triggerCharacters;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
     if (triggerCharacters != null) {
       __result['triggerCharacters'] = triggerCharacters;
     }
@@ -2959,12 +4589,30 @@
     if (resolveProvider != null) {
       __result['resolveProvider'] = resolveProvider;
     }
-    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('triggerCharacters');
       try {
         if (obj['triggerCharacters'] != null &&
@@ -2998,17 +4646,11 @@
       } finally {
         reporter.pop();
       }
-      reporter.push('documentSelector');
+      reporter.push('workDoneProgress');
       try {
-        if (!obj.containsKey('documentSelector')) {
-          reporter.reportError('must not be undefined');
-          return false;
-        }
-        if (obj['documentSelector'] != null &&
-            !((obj['documentSelector'] is List &&
-                (obj['documentSelector'].every(
-                    (item) => DocumentFilter.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<DocumentFilter>');
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
           return false;
         }
       } finally {
@@ -3025,13 +4667,14 @@
   bool operator ==(Object other) {
     if (other is CompletionRegistrationOptions &&
         other.runtimeType == CompletionRegistrationOptions) {
-      return listEqual(triggerCharacters, other.triggerCharacters,
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          listEqual(triggerCharacters, other.triggerCharacters,
               (String a, String b) => a == b) &&
           listEqual(allCommitCharacters, other.allCommitCharacters,
               (String a, String b) => a == b) &&
           resolveProvider == other.resolveProvider &&
-          listEqual(documentSelector, other.documentSelector,
-              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -3040,10 +4683,11 @@
   @override
   int get hashCode {
     var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
     hash = JenkinsSmiHash.combine(hash, lspHashCode(triggerCharacters));
     hash = JenkinsSmiHash.combine(hash, lspHashCode(allCommitCharacters));
     hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -3095,11 +4739,11 @@
   static const jsonHandler =
       LspJsonHandler(ConfigurationItem.canParse, ConfigurationItem.fromJson);
 
-  ConfigurationItem(this.scopeUri, this.section);
+  ConfigurationItem({this.scopeUri, this.section});
   static ConfigurationItem fromJson(Map<String, dynamic> json) {
     final scopeUri = json['scopeUri'];
     final section = json['section'];
-    return ConfigurationItem(scopeUri, section);
+    return ConfigurationItem(scopeUri: scopeUri, section: section);
   }
 
   /// The scope to get the configuration section for.
@@ -3170,7 +4814,7 @@
   static const jsonHandler = LspJsonHandler(
       ConfigurationParams.canParse, ConfigurationParams.fromJson);
 
-  ConfigurationParams(this.items) {
+  ConfigurationParams({@required this.items}) {
     if (items == null) {
       throw 'items is required but was not provided';
     }
@@ -3180,7 +4824,7 @@
         ?.map((item) => item != null ? ConfigurationItem.fromJson(item) : null)
         ?.cast<ConfigurationItem>()
         ?.toList();
-    return ConfigurationParams(items);
+    return ConfigurationParams(items: items);
   }
 
   final List<ConfigurationItem> items;
@@ -3246,7 +4890,7 @@
   static const jsonHandler =
       LspJsonHandler(CreateFile.canParse, CreateFile.fromJson);
 
-  CreateFile(this.kind, this.uri, this.options) {
+  CreateFile({@required this.kind, @required this.uri, this.options}) {
     if (kind == null) {
       throw 'kind is required but was not provided';
     }
@@ -3260,7 +4904,7 @@
     final options = json['options'] != null
         ? CreateFileOptions.fromJson(json['options'])
         : null;
-    return CreateFile(kind, uri, options);
+    return CreateFile(kind: kind, uri: uri, options: options);
   }
 
   /// A create
@@ -3364,11 +5008,12 @@
   static const jsonHandler =
       LspJsonHandler(CreateFileOptions.canParse, CreateFileOptions.fromJson);
 
-  CreateFileOptions(this.overwrite, this.ignoreIfExists);
+  CreateFileOptions({this.overwrite, this.ignoreIfExists});
   static CreateFileOptions fromJson(Map<String, dynamic> json) {
     final overwrite = json['overwrite'];
     final ignoreIfExists = json['ignoreIfExists'];
-    return CreateFileOptions(overwrite, ignoreIfExists);
+    return CreateFileOptions(
+        overwrite: overwrite, ignoreIfExists: ignoreIfExists);
   }
 
   /// Ignore if exists.
@@ -3437,12 +5082,840 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class DeclarationClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DeclarationClientCapabilities.canParse,
+      DeclarationClientCapabilities.fromJson);
+
+  DeclarationClientCapabilities({this.dynamicRegistration, this.linkSupport});
+  static DeclarationClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final linkSupport = json['linkSupport'];
+    return DeclarationClientCapabilities(
+        dynamicRegistration: dynamicRegistration, linkSupport: linkSupport);
+  }
+
+  /// Whether declaration supports dynamic registration. If this is set to
+  /// `true` the client supports the new `DeclarationRegistrationOptions` return
+  /// value for the corresponding server capability as well.
+  final bool dynamicRegistration;
+
+  /// The client supports additional metadata in the form of declaration links.
+  final bool linkSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (linkSupport != null) {
+      __result['linkSupport'] = linkSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('linkSupport');
+      try {
+        if (obj['linkSupport'] != null && !(obj['linkSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DeclarationClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DeclarationClientCapabilities &&
+        other.runtimeType == DeclarationClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          linkSupport == other.linkSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DeclarationOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler =
+      LspJsonHandler(DeclarationOptions.canParse, DeclarationOptions.fromJson);
+
+  DeclarationOptions({this.workDoneProgress});
+  static DeclarationOptions fromJson(Map<String, dynamic> json) {
+    if (DeclarationRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DeclarationRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return DeclarationOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DeclarationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DeclarationOptions &&
+        other.runtimeType == DeclarationOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DeclarationParams
+    implements
+        TextDocumentPositionParams,
+        WorkDoneProgressParams,
+        PartialResultParams,
+        ToJsonable {
+  static const jsonHandler =
+      LspJsonHandler(DeclarationParams.canParse, DeclarationParams.fromJson);
+
+  DeclarationParams(
+      {@required this.textDocument,
+      @required this.position,
+      this.workDoneToken,
+      this.partialResultToken}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (position == null) {
+      throw 'position is required but was not provided';
+    }
+  }
+  static DeclarationParams fromJson(Map<String, dynamic> json) {
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return DeclarationParams(
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
+  }
+
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
+  /// The position inside the text document.
+  final Position position;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    __result['position'] =
+        position ?? (throw 'position is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('position');
+      try {
+        if (!obj.containsKey('position')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['position'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Position.canParse(obj['position'], reporter))) {
+          reporter.reportError('must be of type Position');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DeclarationParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DeclarationParams && other.runtimeType == DeclarationParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DeclarationRegistrationOptions
+    implements
+        DeclarationOptions,
+        TextDocumentRegistrationOptions,
+        StaticRegistrationOptions,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DeclarationRegistrationOptions.canParse,
+      DeclarationRegistrationOptions.fromJson);
+
+  DeclarationRegistrationOptions(
+      {this.workDoneProgress, this.documentSelector, this.id});
+  static DeclarationRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final workDoneProgress = json['workDoneProgress'];
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final id = json['id'];
+    return DeclarationRegistrationOptions(
+        workDoneProgress: workDoneProgress,
+        documentSelector: documentSelector,
+        id: id);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+
+  /// The id used to register the request. The id can be used to deregister the
+  /// request again. See also Registration#id.
+  final String id;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    __result['documentSelector'] = documentSelector;
+    if (id != null) {
+      __result['id'] = id;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('id');
+      try {
+        if (obj['id'] != null && !(obj['id'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DeclarationRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DeclarationRegistrationOptions &&
+        other.runtimeType == DeclarationRegistrationOptions) {
+      return workDoneProgress == other.workDoneProgress &&
+          listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          id == other.id &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DefinitionClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DefinitionClientCapabilities.canParse,
+      DefinitionClientCapabilities.fromJson);
+
+  DefinitionClientCapabilities({this.dynamicRegistration, this.linkSupport});
+  static DefinitionClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final linkSupport = json['linkSupport'];
+    return DefinitionClientCapabilities(
+        dynamicRegistration: dynamicRegistration, linkSupport: linkSupport);
+  }
+
+  /// Whether definition supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// The client supports additional metadata in the form of definition links.
+  ///  @since 3.14.0
+  final bool linkSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (linkSupport != null) {
+      __result['linkSupport'] = linkSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('linkSupport');
+      try {
+        if (obj['linkSupport'] != null && !(obj['linkSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DefinitionClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DefinitionClientCapabilities &&
+        other.runtimeType == DefinitionClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          linkSupport == other.linkSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DefinitionOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler =
+      LspJsonHandler(DefinitionOptions.canParse, DefinitionOptions.fromJson);
+
+  DefinitionOptions({this.workDoneProgress});
+  static DefinitionOptions fromJson(Map<String, dynamic> json) {
+    if (DefinitionRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DefinitionRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return DefinitionOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DefinitionOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DefinitionOptions && other.runtimeType == DefinitionOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DefinitionParams
+    implements
+        TextDocumentPositionParams,
+        WorkDoneProgressParams,
+        PartialResultParams,
+        ToJsonable {
+  static const jsonHandler =
+      LspJsonHandler(DefinitionParams.canParse, DefinitionParams.fromJson);
+
+  DefinitionParams(
+      {@required this.textDocument,
+      @required this.position,
+      this.workDoneToken,
+      this.partialResultToken}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (position == null) {
+      throw 'position is required but was not provided';
+    }
+  }
+  static DefinitionParams fromJson(Map<String, dynamic> json) {
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return DefinitionParams(
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
+  }
+
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
+  /// The position inside the text document.
+  final Position position;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    __result['position'] =
+        position ?? (throw 'position is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('position');
+      try {
+        if (!obj.containsKey('position')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['position'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Position.canParse(obj['position'], reporter))) {
+          reporter.reportError('must be of type Position');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DefinitionParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DefinitionParams && other.runtimeType == DefinitionParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DefinitionRegistrationOptions
+    implements TextDocumentRegistrationOptions, DefinitionOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DefinitionRegistrationOptions.canParse,
+      DefinitionRegistrationOptions.fromJson);
+
+  DefinitionRegistrationOptions({this.documentSelector, this.workDoneProgress});
+  static DefinitionRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    return DefinitionRegistrationOptions(
+        documentSelector: documentSelector, workDoneProgress: workDoneProgress);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DefinitionRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DefinitionRegistrationOptions &&
+        other.runtimeType == DefinitionRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// Delete file operation
 class DeleteFile implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(DeleteFile.canParse, DeleteFile.fromJson);
 
-  DeleteFile(this.kind, this.uri, this.options) {
+  DeleteFile({@required this.kind, @required this.uri, this.options}) {
     if (kind == null) {
       throw 'kind is required but was not provided';
     }
@@ -3456,7 +5929,7 @@
     final options = json['options'] != null
         ? DeleteFileOptions.fromJson(json['options'])
         : null;
-    return DeleteFile(kind, uri, options);
+    return DeleteFile(kind: kind, uri: uri, options: options);
   }
 
   /// A delete
@@ -3560,11 +6033,12 @@
   static const jsonHandler =
       LspJsonHandler(DeleteFileOptions.canParse, DeleteFileOptions.fromJson);
 
-  DeleteFileOptions(this.recursive, this.ignoreIfNotExists);
+  DeleteFileOptions({this.recursive, this.ignoreIfNotExists});
   static DeleteFileOptions fromJson(Map<String, dynamic> json) {
     final recursive = json['recursive'];
     final ignoreIfNotExists = json['ignoreIfNotExists'];
-    return DeleteFileOptions(recursive, ignoreIfNotExists);
+    return DeleteFileOptions(
+        recursive: recursive, ignoreIfNotExists: ignoreIfNotExists);
   }
 
   /// Ignore the operation if the file doesn't exist.
@@ -3638,8 +6112,14 @@
   static const jsonHandler =
       LspJsonHandler(Diagnostic.canParse, Diagnostic.fromJson);
 
-  Diagnostic(this.range, this.severity, this.code, this.source, this.message,
-      this.relatedInformation) {
+  Diagnostic(
+      {@required this.range,
+      this.severity,
+      this.code,
+      this.source,
+      @required this.message,
+      this.tags,
+      this.relatedInformation}) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
@@ -3655,13 +6135,23 @@
     final code = json['code'];
     final source = json['source'];
     final message = json['message'];
+    final tags = json['tags']
+        ?.map((item) => item != null ? DiagnosticTag.fromJson(item) : null)
+        ?.cast<DiagnosticTag>()
+        ?.toList();
     final relatedInformation = json['relatedInformation']
         ?.map((item) =>
             item != null ? DiagnosticRelatedInformation.fromJson(item) : null)
         ?.cast<DiagnosticRelatedInformation>()
         ?.toList();
     return Diagnostic(
-        range, severity, code, source, message, relatedInformation);
+        range: range,
+        severity: severity,
+        code: code,
+        source: source,
+        message: message,
+        tags: tags,
+        relatedInformation: relatedInformation);
   }
 
   /// The diagnostic's code, which might appear in the user interface.
@@ -3685,6 +6175,10 @@
   /// 'typescript' or 'super lint'.
   final String source;
 
+  /// Additional metadata about the diagnostic.
+  ///  @since 3.15.0
+  final List<DiagnosticTag> tags;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['range'] = range ?? (throw 'range is required but was not set');
@@ -3699,6 +6193,9 @@
     }
     __result['message'] =
         message ?? (throw 'message is required but was not set');
+    if (tags != null) {
+      __result['tags'] = tags;
+    }
     if (relatedInformation != null) {
       __result['relatedInformation'] = relatedInformation;
     }
@@ -3769,6 +6266,18 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('tags');
+      try {
+        if (obj['tags'] != null &&
+            !((obj['tags'] is List &&
+                (obj['tags'].every(
+                    (item) => DiagnosticTag.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DiagnosticTag>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('relatedInformation');
       try {
         if (obj['relatedInformation'] != null &&
@@ -3798,6 +6307,8 @@
           source == other.source &&
           message == other.message &&
           listEqual(
+              tags, other.tags, (DiagnosticTag a, DiagnosticTag b) => a == b) &&
+          listEqual(
               relatedInformation,
               other.relatedInformation,
               (DiagnosticRelatedInformation a,
@@ -3816,6 +6327,7 @@
     hash = JenkinsSmiHash.combine(hash, code.hashCode);
     hash = JenkinsSmiHash.combine(hash, source.hashCode);
     hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(tags));
     hash = JenkinsSmiHash.combine(hash, lspHashCode(relatedInformation));
     return JenkinsSmiHash.finish(hash);
   }
@@ -3825,14 +6337,15 @@
 }
 
 /// Represents a related message and source code location for a diagnostic. This
-/// should be used to point to code locations that cause or related to a
+/// should be used to point to code locations that cause or are related to a
 /// diagnostics, e.g when duplicating a symbol in a scope.
 class DiagnosticRelatedInformation implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DiagnosticRelatedInformation.canParse,
       DiagnosticRelatedInformation.fromJson);
 
-  DiagnosticRelatedInformation(this.location, this.message) {
+  DiagnosticRelatedInformation(
+      {@required this.location, @required this.message}) {
     if (location == null) {
       throw 'location is required but was not provided';
     }
@@ -3844,7 +6357,7 @@
     final location =
         json['location'] != null ? Location.fromJson(json['location']) : null;
     final message = json['message'];
-    return DiagnosticRelatedInformation(location, message);
+    return DiagnosticRelatedInformation(location: location, message: message);
   }
 
   /// The location of this related diagnostic information.
@@ -3959,15 +6472,113 @@
   bool operator ==(Object o) => o is DiagnosticSeverity && o._value == _value;
 }
 
+/// The diagnostic tags.
+///  @since 3.15.0
+class DiagnosticTag {
+  const DiagnosticTag(this._value);
+  const DiagnosticTag.fromJson(this._value);
+
+  final num _value;
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    return obj is num;
+  }
+
+  /// Unused or unnecessary code.
+  ///
+  /// Clients are allowed to render diagnostics with this tag faded out instead
+  /// of having an error squiggle.
+  static const Unnecessary = DiagnosticTag(1);
+
+  /// Deprecated or obsolete code.
+  ///
+  /// Clients are allowed to rendered diagnostics with this tag strike through.
+  static const Deprecated = DiagnosticTag(2);
+
+  Object toJson() => _value;
+
+  @override
+  String toString() => _value.toString();
+
+  @override
+  int get hashCode => _value.hashCode;
+
+  bool operator ==(Object o) => o is DiagnosticTag && o._value == _value;
+}
+
+class DidChangeConfigurationClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DidChangeConfigurationClientCapabilities.canParse,
+      DidChangeConfigurationClientCapabilities.fromJson);
+
+  DidChangeConfigurationClientCapabilities({this.dynamicRegistration});
+  static DidChangeConfigurationClientCapabilities fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return DidChangeConfigurationClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Did change configuration notification supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type DidChangeConfigurationClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DidChangeConfigurationClientCapabilities &&
+        other.runtimeType == DidChangeConfigurationClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class DidChangeConfigurationParams implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DidChangeConfigurationParams.canParse,
       DidChangeConfigurationParams.fromJson);
 
-  DidChangeConfigurationParams(this.settings);
+  DidChangeConfigurationParams({this.settings});
   static DidChangeConfigurationParams fromJson(Map<String, dynamic> json) {
     final settings = json['settings'];
-    return DidChangeConfigurationParams(settings);
+    return DidChangeConfigurationParams(settings: settings);
   }
 
   /// The actual changed settings
@@ -4026,7 +6637,8 @@
       DidChangeTextDocumentParams.canParse,
       DidChangeTextDocumentParams.fromJson);
 
-  DidChangeTextDocumentParams(this.textDocument, this.contentChanges) {
+  DidChangeTextDocumentParams(
+      {@required this.textDocument, @required this.contentChanges}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -4039,17 +6651,42 @@
         ? VersionedTextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final contentChanges = json['contentChanges']
-        ?.map((item) =>
-            item != null ? TextDocumentContentChangeEvent.fromJson(item) : null)
-        ?.cast<TextDocumentContentChangeEvent>()
+        ?.map((item) => TextDocumentContentChangeEvent1.canParse(
+                item, nullLspJsonReporter)
+            ? Either2<TextDocumentContentChangeEvent1, TextDocumentContentChangeEvent2>.t1(
+                item != null
+                    ? TextDocumentContentChangeEvent1.fromJson(item)
+                    : null)
+            : (TextDocumentContentChangeEvent2.canParse(item, nullLspJsonReporter)
+                ? Either2<TextDocumentContentChangeEvent1,
+                        TextDocumentContentChangeEvent2>.t2(
+                    item != null
+                        ? TextDocumentContentChangeEvent2.fromJson(item)
+                        : null)
+                : (throw '''${item} was not one of (TextDocumentContentChangeEvent1, TextDocumentContentChangeEvent2)''')))
+        ?.cast<Either2<TextDocumentContentChangeEvent1, TextDocumentContentChangeEvent2>>()
         ?.toList();
-    return DidChangeTextDocumentParams(textDocument, contentChanges);
+    return DidChangeTextDocumentParams(
+        textDocument: textDocument, contentChanges: contentChanges);
   }
 
   /// The actual content changes. The content changes describe single state
-  /// changes to the document. So if there are two content changes c1 and c2 for
-  /// a document in state S then c1 move the document to S' and c2 to S''.
-  final List<TextDocumentContentChangeEvent> contentChanges;
+  /// changes to the document. So if there are two content changes c1 (at array
+  /// index 0) and c2 (at array index 1) for a document in state S then c1 moves
+  /// the document from S to S' and c2 from S' to S''. So c1 is computed on the
+  /// state S and c2 is computed on the state S'.
+  ///
+  /// To mirror the content of a document using change events use the following
+  /// approach:
+  /// - start with the same initial content
+  /// - apply the 'textDocument/didChange' notifications in the order you
+  /// recevie them.
+  /// - apply the `TextDocumentContentChangeEvent`s in a single notification in
+  /// the order
+  ///   you receive them.
+  final List<
+      Either2<TextDocumentContentChangeEvent1,
+          TextDocumentContentChangeEvent2>> contentChanges;
 
   /// The document that did change. The version number points to the version
   /// after all provided content changes have been applied.
@@ -4097,9 +6734,11 @@
         }
         if (!((obj['contentChanges'] is List &&
             (obj['contentChanges'].every((item) =>
-                TextDocumentContentChangeEvent.canParse(item, reporter)))))) {
+                (TextDocumentContentChangeEvent1.canParse(item, reporter) ||
+                    TextDocumentContentChangeEvent2.canParse(
+                        item, reporter))))))) {
           reporter.reportError(
-              'must be of type List<TextDocumentContentChangeEvent>');
+              'must be of type List<Either2<TextDocumentContentChangeEvent1, TextDocumentContentChangeEvent2>>');
           return false;
         }
       } finally {
@@ -4120,8 +6759,12 @@
           listEqual(
               contentChanges,
               other.contentChanges,
-              (TextDocumentContentChangeEvent a,
-                      TextDocumentContentChangeEvent b) =>
+              (Either2<TextDocumentContentChangeEvent1,
+                              TextDocumentContentChangeEvent2>
+                          a,
+                      Either2<TextDocumentContentChangeEvent1,
+                              TextDocumentContentChangeEvent2>
+                          b) =>
                   a == b) &&
           true;
     }
@@ -4140,12 +6783,78 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class DidChangeWatchedFilesClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DidChangeWatchedFilesClientCapabilities.canParse,
+      DidChangeWatchedFilesClientCapabilities.fromJson);
+
+  DidChangeWatchedFilesClientCapabilities({this.dynamicRegistration});
+  static DidChangeWatchedFilesClientCapabilities fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return DidChangeWatchedFilesClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Did change watched files notification supports dynamic registration.
+  /// Please note that the current protocol doesn't support static configuration
+  /// for file changes from the server side.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type DidChangeWatchedFilesClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DidChangeWatchedFilesClientCapabilities &&
+        other.runtimeType == DidChangeWatchedFilesClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class DidChangeWatchedFilesParams implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DidChangeWatchedFilesParams.canParse,
       DidChangeWatchedFilesParams.fromJson);
 
-  DidChangeWatchedFilesParams(this.changes) {
+  DidChangeWatchedFilesParams({@required this.changes}) {
     if (changes == null) {
       throw 'changes is required but was not provided';
     }
@@ -4155,7 +6864,7 @@
         ?.map((item) => item != null ? FileEvent.fromJson(item) : null)
         ?.cast<FileEvent>()
         ?.toList();
-    return DidChangeWatchedFilesParams(changes);
+    return DidChangeWatchedFilesParams(changes: changes);
   }
 
   /// The actual file events.
@@ -4224,7 +6933,7 @@
       DidChangeWatchedFilesRegistrationOptions.canParse,
       DidChangeWatchedFilesRegistrationOptions.fromJson);
 
-  DidChangeWatchedFilesRegistrationOptions(this.watchers) {
+  DidChangeWatchedFilesRegistrationOptions({@required this.watchers}) {
     if (watchers == null) {
       throw 'watchers is required but was not provided';
     }
@@ -4235,7 +6944,7 @@
         ?.map((item) => item != null ? FileSystemWatcher.fromJson(item) : null)
         ?.cast<FileSystemWatcher>()
         ?.toList();
-    return DidChangeWatchedFilesRegistrationOptions(watchers);
+    return DidChangeWatchedFilesRegistrationOptions(watchers: watchers);
   }
 
   /// The watchers to register.
@@ -4304,7 +7013,7 @@
       DidChangeWorkspaceFoldersParams.canParse,
       DidChangeWorkspaceFoldersParams.fromJson);
 
-  DidChangeWorkspaceFoldersParams(this.event) {
+  DidChangeWorkspaceFoldersParams({@required this.event}) {
     if (event == null) {
       throw 'event is required but was not provided';
     }
@@ -4313,7 +7022,7 @@
     final event = json['event'] != null
         ? WorkspaceFoldersChangeEvent.fromJson(json['event'])
         : null;
-    return DidChangeWorkspaceFoldersParams(event);
+    return DidChangeWorkspaceFoldersParams(event: event);
   }
 
   /// The actual workspace folder change event.
@@ -4375,7 +7084,7 @@
   static const jsonHandler = LspJsonHandler(
       DidCloseTextDocumentParams.canParse, DidCloseTextDocumentParams.fromJson);
 
-  DidCloseTextDocumentParams(this.textDocument) {
+  DidCloseTextDocumentParams({@required this.textDocument}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -4384,7 +7093,7 @@
     final textDocument = json['textDocument'] != null
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    return DidCloseTextDocumentParams(textDocument);
+    return DidCloseTextDocumentParams(textDocument: textDocument);
   }
 
   /// The document that was closed.
@@ -4447,7 +7156,7 @@
   static const jsonHandler = LspJsonHandler(
       DidOpenTextDocumentParams.canParse, DidOpenTextDocumentParams.fromJson);
 
-  DidOpenTextDocumentParams(this.textDocument) {
+  DidOpenTextDocumentParams({@required this.textDocument}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -4456,7 +7165,7 @@
     final textDocument = json['textDocument'] != null
         ? TextDocumentItem.fromJson(json['textDocument'])
         : null;
-    return DidOpenTextDocumentParams(textDocument);
+    return DidOpenTextDocumentParams(textDocument: textDocument);
   }
 
   /// The document that was opened.
@@ -4519,7 +7228,7 @@
   static const jsonHandler = LspJsonHandler(
       DidSaveTextDocumentParams.canParse, DidSaveTextDocumentParams.fromJson);
 
-  DidSaveTextDocumentParams(this.textDocument, this.text) {
+  DidSaveTextDocumentParams({@required this.textDocument, this.text}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -4529,7 +7238,7 @@
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final text = json['text'];
-    return DidSaveTextDocumentParams(textDocument, text);
+    return DidSaveTextDocumentParams(textDocument: textDocument, text: text);
   }
 
   /// Optional the content when saved. Depends on the includeText value when the
@@ -4605,16 +7314,389 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class DocumentColorClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentColorClientCapabilities.canParse,
+      DocumentColorClientCapabilities.fromJson);
+
+  DocumentColorClientCapabilities({this.dynamicRegistration});
+  static DocumentColorClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return DocumentColorClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Whether document color supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentColorClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentColorClientCapabilities &&
+        other.runtimeType == DocumentColorClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentColorOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentColorOptions.canParse, DocumentColorOptions.fromJson);
+
+  DocumentColorOptions({this.workDoneProgress});
+  static DocumentColorOptions fromJson(Map<String, dynamic> json) {
+    if (DocumentColorRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentColorRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentColorOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentColorOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentColorOptions &&
+        other.runtimeType == DocumentColorOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentColorParams
+    implements WorkDoneProgressParams, PartialResultParams, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentColorParams.canParse, DocumentColorParams.fromJson);
+
+  DocumentColorParams(
+      {@required this.textDocument,
+      this.workDoneToken,
+      this.partialResultToken}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+  }
+  static DocumentColorParams fromJson(Map<String, dynamic> json) {
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return DocumentColorParams(
+        textDocument: textDocument,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
+  }
+
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentColorParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentColorParams &&
+        other.runtimeType == DocumentColorParams) {
+      return textDocument == other.textDocument &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentColorRegistrationOptions
+    implements
+        TextDocumentRegistrationOptions,
+        StaticRegistrationOptions,
+        DocumentColorOptions,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentColorRegistrationOptions.canParse,
+      DocumentColorRegistrationOptions.fromJson);
+
+  DocumentColorRegistrationOptions(
+      {this.documentSelector, this.id, this.workDoneProgress});
+  static DocumentColorRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final id = json['id'];
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentColorRegistrationOptions(
+        documentSelector: documentSelector,
+        id: id,
+        workDoneProgress: workDoneProgress);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+
+  /// The id used to register the request. The id can be used to deregister the
+  /// request again. See also Registration#id.
+  final String id;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (id != null) {
+      __result['id'] = id;
+    }
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('id');
+      try {
+        if (obj['id'] != null && !(obj['id'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentColorRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentColorRegistrationOptions &&
+        other.runtimeType == DocumentColorRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          id == other.id &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class DocumentFilter implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(DocumentFilter.canParse, DocumentFilter.fromJson);
 
-  DocumentFilter(this.language, this.scheme, this.pattern);
+  DocumentFilter({this.language, this.scheme, this.pattern});
   static DocumentFilter fromJson(Map<String, dynamic> json) {
     final language = json['language'];
     final scheme = json['scheme'];
     final pattern = json['pattern'];
-    return DocumentFilter(language, scheme, pattern);
+    return DocumentFilter(language: language, scheme: scheme, pattern: pattern);
   }
 
   /// A language id, like `typescript`.
@@ -4712,11 +7794,141 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class DocumentFormattingParams implements ToJsonable {
+class DocumentFormattingClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentFormattingClientCapabilities.canParse,
+      DocumentFormattingClientCapabilities.fromJson);
+
+  DocumentFormattingClientCapabilities({this.dynamicRegistration});
+  static DocumentFormattingClientCapabilities fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return DocumentFormattingClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Whether formatting supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter
+          .reportError('must be of type DocumentFormattingClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentFormattingClientCapabilities &&
+        other.runtimeType == DocumentFormattingClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentFormattingOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentFormattingOptions.canParse, DocumentFormattingOptions.fromJson);
+
+  DocumentFormattingOptions({this.workDoneProgress});
+  static DocumentFormattingOptions fromJson(Map<String, dynamic> json) {
+    if (DocumentFormattingRegistrationOptions.canParse(
+        json, nullLspJsonReporter)) {
+      return DocumentFormattingRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentFormattingOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentFormattingOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentFormattingOptions &&
+        other.runtimeType == DocumentFormattingOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentFormattingParams implements WorkDoneProgressParams, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DocumentFormattingParams.canParse, DocumentFormattingParams.fromJson);
 
-  DocumentFormattingParams(this.textDocument, this.options) {
+  DocumentFormattingParams(
+      {@required this.textDocument,
+      @required this.options,
+      this.workDoneToken}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -4731,7 +7943,17 @@
     final options = json['options'] != null
         ? FormattingOptions.fromJson(json['options'])
         : null;
-    return DocumentFormattingParams(textDocument, options);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    return DocumentFormattingParams(
+        textDocument: textDocument,
+        options: options,
+        workDoneToken: workDoneToken);
   }
 
   /// The format options.
@@ -4740,12 +7962,18 @@
   /// The document to format.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['textDocument'] =
         textDocument ?? (throw 'textDocument is required but was not set');
     __result['options'] =
         options ?? (throw 'options is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
     return __result;
   }
 
@@ -4785,6 +8013,17 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type DocumentFormattingParams');
@@ -4798,6 +8037,7 @@
         other.runtimeType == DocumentFormattingParams) {
       return textDocument == other.textDocument &&
           options == other.options &&
+          workDoneToken == other.workDoneToken &&
           true;
     }
     return false;
@@ -4808,6 +8048,103 @@
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
     hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentFormattingRegistrationOptions
+    implements
+        TextDocumentRegistrationOptions,
+        DocumentFormattingOptions,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentFormattingRegistrationOptions.canParse,
+      DocumentFormattingRegistrationOptions.fromJson);
+
+  DocumentFormattingRegistrationOptions(
+      {this.documentSelector, this.workDoneProgress});
+  static DocumentFormattingRegistrationOptions fromJson(
+      Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentFormattingRegistrationOptions(
+        documentSelector: documentSelector, workDoneProgress: workDoneProgress);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter
+          .reportError('must be of type DocumentFormattingRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentFormattingRegistrationOptions &&
+        other.runtimeType == DocumentFormattingRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -4822,7 +8159,7 @@
   static const jsonHandler =
       LspJsonHandler(DocumentHighlight.canParse, DocumentHighlight.fromJson);
 
-  DocumentHighlight(this.range, this.kind) {
+  DocumentHighlight({@required this.range, this.kind}) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
@@ -4832,7 +8169,7 @@
     final kind = json['kind'] != null
         ? DocumentHighlightKind.fromJson(json['kind'])
         : null;
-    return DocumentHighlight(range, kind);
+    return DocumentHighlight(range: range, kind: kind);
   }
 
   /// The highlight kind, default is DocumentHighlightKind.Text.
@@ -4906,6 +8243,70 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class DocumentHighlightClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentHighlightClientCapabilities.canParse,
+      DocumentHighlightClientCapabilities.fromJson);
+
+  DocumentHighlightClientCapabilities({this.dynamicRegistration});
+  static DocumentHighlightClientCapabilities fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return DocumentHighlightClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Whether document highlight supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter
+          .reportError('must be of type DocumentHighlightClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentHighlightClientCapabilities &&
+        other.runtimeType == DocumentHighlightClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// A document highlight kind.
 class DocumentHighlightKind {
   const DocumentHighlightKind(this._value);
@@ -4938,13 +8339,340 @@
       o is DocumentHighlightKind && o._value == _value;
 }
 
+class DocumentHighlightOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentHighlightOptions.canParse, DocumentHighlightOptions.fromJson);
+
+  DocumentHighlightOptions({this.workDoneProgress});
+  static DocumentHighlightOptions fromJson(Map<String, dynamic> json) {
+    if (DocumentHighlightRegistrationOptions.canParse(
+        json, nullLspJsonReporter)) {
+      return DocumentHighlightRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentHighlightOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentHighlightOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentHighlightOptions &&
+        other.runtimeType == DocumentHighlightOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentHighlightParams
+    implements
+        TextDocumentPositionParams,
+        WorkDoneProgressParams,
+        PartialResultParams,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentHighlightParams.canParse, DocumentHighlightParams.fromJson);
+
+  DocumentHighlightParams(
+      {@required this.textDocument,
+      @required this.position,
+      this.workDoneToken,
+      this.partialResultToken}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (position == null) {
+      throw 'position is required but was not provided';
+    }
+  }
+  static DocumentHighlightParams fromJson(Map<String, dynamic> json) {
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return DocumentHighlightParams(
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
+  }
+
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
+  /// The position inside the text document.
+  final Position position;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    __result['position'] =
+        position ?? (throw 'position is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('position');
+      try {
+        if (!obj.containsKey('position')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['position'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Position.canParse(obj['position'], reporter))) {
+          reporter.reportError('must be of type Position');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentHighlightParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentHighlightParams &&
+        other.runtimeType == DocumentHighlightParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentHighlightRegistrationOptions
+    implements
+        TextDocumentRegistrationOptions,
+        DocumentHighlightOptions,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentHighlightRegistrationOptions.canParse,
+      DocumentHighlightRegistrationOptions.fromJson);
+
+  DocumentHighlightRegistrationOptions(
+      {this.documentSelector, this.workDoneProgress});
+  static DocumentHighlightRegistrationOptions fromJson(
+      Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentHighlightRegistrationOptions(
+        documentSelector: documentSelector, workDoneProgress: workDoneProgress);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter
+          .reportError('must be of type DocumentHighlightRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentHighlightRegistrationOptions &&
+        other.runtimeType == DocumentHighlightRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// A document link is a range in a text document that links to an internal or
 /// external resource, like another text document or a web site.
 class DocumentLink implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(DocumentLink.canParse, DocumentLink.fromJson);
 
-  DocumentLink(this.range, this.target, this.data) {
+  DocumentLink({@required this.range, this.target, this.tooltip, this.data}) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
@@ -4952,8 +8680,10 @@
   static DocumentLink fromJson(Map<String, dynamic> json) {
     final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final target = json['target'];
+    final tooltip = json['tooltip'];
     final data = json['data'];
-    return DocumentLink(range, target, data);
+    return DocumentLink(
+        range: range, target: target, tooltip: tooltip, data: data);
   }
 
   /// A data entry field that is preserved on a document link between a
@@ -4966,12 +8696,24 @@
   /// The uri this link points to. If missing a resolve request is sent later.
   final String target;
 
+  /// The tooltip text when you hover over this link.
+  ///
+  /// If a tooltip is provided, is will be displayed in a string that includes
+  /// instructions on how to trigger the link, such as `{0} (ctrl + click)`. The
+  /// specific instructions vary depending on OS, user settings, and
+  /// localization.
+  ///  @since 3.15.0
+  final String tooltip;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['range'] = range ?? (throw 'range is required but was not set');
     if (target != null) {
       __result['target'] = target;
     }
+    if (tooltip != null) {
+      __result['tooltip'] = tooltip;
+    }
     if (data != null) {
       __result['data'] = data;
     }
@@ -5006,6 +8748,15 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('tooltip');
+      try {
+        if (obj['tooltip'] != null && !(obj['tooltip'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('data');
       try {
         if (obj['data'] != null && !(true)) {
@@ -5027,6 +8778,7 @@
     if (other is DocumentLink && other.runtimeType == DocumentLink) {
       return range == other.range &&
           target == other.target &&
+          tooltip == other.tooltip &&
           data == other.data &&
           true;
     }
@@ -5038,6 +8790,7 @@
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, range.hashCode);
     hash = JenkinsSmiHash.combine(hash, target.hashCode);
+    hash = JenkinsSmiHash.combine(hash, tooltip.hashCode);
     hash = JenkinsSmiHash.combine(hash, data.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
@@ -5046,25 +8799,117 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Document link options.
-class DocumentLinkOptions implements ToJsonable {
+class DocumentLinkClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentLinkClientCapabilities.canParse,
+      DocumentLinkClientCapabilities.fromJson);
+
+  DocumentLinkClientCapabilities(
+      {this.dynamicRegistration, this.tooltipSupport});
+  static DocumentLinkClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final tooltipSupport = json['tooltipSupport'];
+    return DocumentLinkClientCapabilities(
+        dynamicRegistration: dynamicRegistration,
+        tooltipSupport: tooltipSupport);
+  }
+
+  /// Whether document link supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// Whether the client supports the `tooltip` property on `DocumentLink`.
+  ///  @since 3.15.0
+  final bool tooltipSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (tooltipSupport != null) {
+      __result['tooltipSupport'] = tooltipSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('tooltipSupport');
+      try {
+        if (obj['tooltipSupport'] != null && !(obj['tooltipSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentLinkClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentLinkClientCapabilities &&
+        other.runtimeType == DocumentLinkClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          tooltipSupport == other.tooltipSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, tooltipSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentLinkOptions implements WorkDoneProgressOptions, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DocumentLinkOptions.canParse, DocumentLinkOptions.fromJson);
 
-  DocumentLinkOptions(this.resolveProvider);
+  DocumentLinkOptions({this.resolveProvider, this.workDoneProgress});
   static DocumentLinkOptions fromJson(Map<String, dynamic> json) {
+    if (DocumentLinkRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentLinkRegistrationOptions.fromJson(json);
+    }
     final resolveProvider = json['resolveProvider'];
-    return DocumentLinkOptions(resolveProvider);
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentLinkOptions(
+        resolveProvider: resolveProvider, workDoneProgress: workDoneProgress);
   }
 
   /// Document links have a resolve provider as well.
   final bool resolveProvider;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     if (resolveProvider != null) {
       __result['resolveProvider'] = resolveProvider;
     }
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
@@ -5080,6 +8925,16 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type DocumentLinkOptions');
@@ -5091,7 +8946,9 @@
   bool operator ==(Object other) {
     if (other is DocumentLinkOptions &&
         other.runtimeType == DocumentLinkOptions) {
-      return resolveProvider == other.resolveProvider && true;
+      return resolveProvider == other.resolveProvider &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
     }
     return false;
   }
@@ -5100,6 +8957,7 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -5107,11 +8965,15 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class DocumentLinkParams implements ToJsonable {
+class DocumentLinkParams
+    implements WorkDoneProgressParams, PartialResultParams, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(DocumentLinkParams.canParse, DocumentLinkParams.fromJson);
 
-  DocumentLinkParams(this.textDocument) {
+  DocumentLinkParams(
+      {@required this.textDocument,
+      this.workDoneToken,
+      this.partialResultToken}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -5120,16 +8982,46 @@
     final textDocument = json['textDocument'] != null
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    return DocumentLinkParams(textDocument);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return DocumentLinkParams(
+        textDocument: textDocument,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
   }
 
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
   /// The document to provide document links for.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['textDocument'] =
         textDocument ?? (throw 'textDocument is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
     return __result;
   }
 
@@ -5152,6 +9044,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type DocumentLinkParams');
@@ -5163,7 +9077,10 @@
   bool operator ==(Object other) {
     if (other is DocumentLinkParams &&
         other.runtimeType == DocumentLinkParams) {
-      return textDocument == other.textDocument && true;
+      return textDocument == other.textDocument &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
     }
     return false;
   }
@@ -5172,6 +9089,8 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -5180,19 +9099,27 @@
 }
 
 class DocumentLinkRegistrationOptions
-    implements TextDocumentRegistrationOptions, ToJsonable {
+    implements
+        TextDocumentRegistrationOptions,
+        DocumentLinkOptions,
+        ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DocumentLinkRegistrationOptions.canParse,
       DocumentLinkRegistrationOptions.fromJson);
 
-  DocumentLinkRegistrationOptions(this.resolveProvider, this.documentSelector);
+  DocumentLinkRegistrationOptions(
+      {this.documentSelector, this.resolveProvider, this.workDoneProgress});
   static DocumentLinkRegistrationOptions fromJson(Map<String, dynamic> json) {
-    final resolveProvider = json['resolveProvider'];
     final documentSelector = json['documentSelector']
         ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
-    return DocumentLinkRegistrationOptions(resolveProvider, documentSelector);
+    final resolveProvider = json['resolveProvider'];
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentLinkRegistrationOptions(
+        documentSelector: documentSelector,
+        resolveProvider: resolveProvider,
+        workDoneProgress: workDoneProgress);
   }
 
   /// A document selector to identify the scope of the registration. If set to
@@ -5201,28 +9128,22 @@
 
   /// Document links have a resolve provider as well.
   final bool resolveProvider;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
     if (resolveProvider != null) {
       __result['resolveProvider'] = resolveProvider;
     }
-    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
-      reporter.push('resolveProvider');
-      try {
-        if (obj['resolveProvider'] != null &&
-            !(obj['resolveProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
       reporter.push('documentSelector');
       try {
         if (!obj.containsKey('documentSelector')) {
@@ -5239,6 +9160,26 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('resolveProvider');
+      try {
+        if (obj['resolveProvider'] != null &&
+            !(obj['resolveProvider'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type DocumentLinkRegistrationOptions');
@@ -5250,9 +9191,10 @@
   bool operator ==(Object other) {
     if (other is DocumentLinkRegistrationOptions &&
         other.runtimeType == DocumentLinkRegistrationOptions) {
-      return resolveProvider == other.resolveProvider &&
-          listEqual(documentSelector, other.documentSelector,
+      return listEqual(documentSelector, other.documentSelector,
               (DocumentFilter a, DocumentFilter b) => a == b) &&
+          resolveProvider == other.resolveProvider &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -5261,8 +9203,9 @@
   @override
   int get hashCode {
     var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -5270,26 +9213,94 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Format document on type options.
+class DocumentOnTypeFormattingClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentOnTypeFormattingClientCapabilities.canParse,
+      DocumentOnTypeFormattingClientCapabilities.fromJson);
+
+  DocumentOnTypeFormattingClientCapabilities({this.dynamicRegistration});
+  static DocumentOnTypeFormattingClientCapabilities fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return DocumentOnTypeFormattingClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Whether on type formatting supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type DocumentOnTypeFormattingClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentOnTypeFormattingClientCapabilities &&
+        other.runtimeType == DocumentOnTypeFormattingClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class DocumentOnTypeFormattingOptions implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DocumentOnTypeFormattingOptions.canParse,
       DocumentOnTypeFormattingOptions.fromJson);
 
   DocumentOnTypeFormattingOptions(
-      this.firstTriggerCharacter, this.moreTriggerCharacter) {
+      {@required this.firstTriggerCharacter, this.moreTriggerCharacter}) {
     if (firstTriggerCharacter == null) {
       throw 'firstTriggerCharacter is required but was not provided';
     }
   }
   static DocumentOnTypeFormattingOptions fromJson(Map<String, dynamic> json) {
+    if (DocumentOnTypeFormattingRegistrationOptions.canParse(
+        json, nullLspJsonReporter)) {
+      return DocumentOnTypeFormattingRegistrationOptions.fromJson(json);
+    }
     final firstTriggerCharacter = json['firstTriggerCharacter'];
     final moreTriggerCharacter = json['moreTriggerCharacter']
         ?.map((item) => item)
         ?.cast<String>()
         ?.toList();
     return DocumentOnTypeFormattingOptions(
-        firstTriggerCharacter, moreTriggerCharacter);
+        firstTriggerCharacter: firstTriggerCharacter,
+        moreTriggerCharacter: moreTriggerCharacter);
   }
 
   /// A character on which formatting should be triggered, like `}`.
@@ -5370,37 +9381,45 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class DocumentOnTypeFormattingParams implements ToJsonable {
+class DocumentOnTypeFormattingParams
+    implements TextDocumentPositionParams, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DocumentOnTypeFormattingParams.canParse,
       DocumentOnTypeFormattingParams.fromJson);
 
   DocumentOnTypeFormattingParams(
-      this.textDocument, this.position, this.ch, this.options) {
-    if (textDocument == null) {
-      throw 'textDocument is required but was not provided';
-    }
-    if (position == null) {
-      throw 'position is required but was not provided';
-    }
+      {@required this.ch,
+      @required this.options,
+      @required this.textDocument,
+      @required this.position}) {
     if (ch == null) {
       throw 'ch is required but was not provided';
     }
     if (options == null) {
       throw 'options is required but was not provided';
     }
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (position == null) {
+      throw 'position is required but was not provided';
+    }
   }
   static DocumentOnTypeFormattingParams fromJson(Map<String, dynamic> json) {
+    final ch = json['ch'];
+    final options = json['options'] != null
+        ? FormattingOptions.fromJson(json['options'])
+        : null;
     final textDocument = json['textDocument'] != null
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final position =
         json['position'] != null ? Position.fromJson(json['position']) : null;
-    final ch = json['ch'];
-    final options = json['options'] != null
-        ? FormattingOptions.fromJson(json['options'])
-        : null;
-    return DocumentOnTypeFormattingParams(textDocument, position, ch, options);
+    return DocumentOnTypeFormattingParams(
+        ch: ch,
+        options: options,
+        textDocument: textDocument,
+        position: position);
   }
 
   /// The character that has been typed.
@@ -5409,60 +9428,26 @@
   /// The format options.
   final FormattingOptions options;
 
-  /// The position at which this request was sent.
+  /// The position inside the text document.
   final Position position;
 
-  /// The document to format.
+  /// The text document.
   final TextDocumentIdentifier textDocument;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    __result['ch'] = ch ?? (throw 'ch is required but was not set');
+    __result['options'] =
+        options ?? (throw 'options is required but was not set');
     __result['textDocument'] =
         textDocument ?? (throw 'textDocument is required but was not set');
     __result['position'] =
         position ?? (throw 'position is required but was not set');
-    __result['ch'] = ch ?? (throw 'ch is required but was not set');
-    __result['options'] =
-        options ?? (throw 'options is required but was not set');
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
-      reporter.push('textDocument');
-      try {
-        if (!obj.containsKey('textDocument')) {
-          reporter.reportError('must not be undefined');
-          return false;
-        }
-        if (obj['textDocument'] == null) {
-          reporter.reportError('must not be null');
-          return false;
-        }
-        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
-          reporter.reportError('must be of type TextDocumentIdentifier');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('position');
-      try {
-        if (!obj.containsKey('position')) {
-          reporter.reportError('must not be undefined');
-          return false;
-        }
-        if (obj['position'] == null) {
-          reporter.reportError('must not be null');
-          return false;
-        }
-        if (!(Position.canParse(obj['position'], reporter))) {
-          reporter.reportError('must be of type Position');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
       reporter.push('ch');
       try {
         if (!obj.containsKey('ch')) {
@@ -5497,6 +9482,40 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('position');
+      try {
+        if (!obj.containsKey('position')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['position'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Position.canParse(obj['position'], reporter))) {
+          reporter.reportError('must be of type Position');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type DocumentOnTypeFormattingParams');
@@ -5508,10 +9527,10 @@
   bool operator ==(Object other) {
     if (other is DocumentOnTypeFormattingParams &&
         other.runtimeType == DocumentOnTypeFormattingParams) {
-      return textDocument == other.textDocument &&
-          position == other.position &&
-          ch == other.ch &&
+      return ch == other.ch &&
           options == other.options &&
+          textDocument == other.textDocument &&
+          position == other.position &&
           true;
     }
     return false;
@@ -5520,10 +9539,10 @@
   @override
   int get hashCode {
     var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
-    hash = JenkinsSmiHash.combine(hash, position.hashCode);
     hash = JenkinsSmiHash.combine(hash, ch.hashCode);
     hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -5532,30 +9551,37 @@
 }
 
 class DocumentOnTypeFormattingRegistrationOptions
-    implements TextDocumentRegistrationOptions, ToJsonable {
+    implements
+        TextDocumentRegistrationOptions,
+        DocumentOnTypeFormattingOptions,
+        ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DocumentOnTypeFormattingRegistrationOptions.canParse,
       DocumentOnTypeFormattingRegistrationOptions.fromJson);
 
-  DocumentOnTypeFormattingRegistrationOptions(this.firstTriggerCharacter,
-      this.moreTriggerCharacter, this.documentSelector) {
+  DocumentOnTypeFormattingRegistrationOptions(
+      {this.documentSelector,
+      @required this.firstTriggerCharacter,
+      this.moreTriggerCharacter}) {
     if (firstTriggerCharacter == null) {
       throw 'firstTriggerCharacter is required but was not provided';
     }
   }
   static DocumentOnTypeFormattingRegistrationOptions fromJson(
       Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
     final firstTriggerCharacter = json['firstTriggerCharacter'];
     final moreTriggerCharacter = json['moreTriggerCharacter']
         ?.map((item) => item)
         ?.cast<String>()
         ?.toList();
-    final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
-        ?.cast<DocumentFilter>()
-        ?.toList();
     return DocumentOnTypeFormattingRegistrationOptions(
-        firstTriggerCharacter, moreTriggerCharacter, documentSelector);
+        documentSelector: documentSelector,
+        firstTriggerCharacter: firstTriggerCharacter,
+        moreTriggerCharacter: moreTriggerCharacter);
   }
 
   /// A document selector to identify the scope of the registration. If set to
@@ -5570,17 +9596,33 @@
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
     __result['firstTriggerCharacter'] = firstTriggerCharacter ??
         (throw 'firstTriggerCharacter is required but was not set');
     if (moreTriggerCharacter != null) {
       __result['moreTriggerCharacter'] = moreTriggerCharacter;
     }
-    __result['documentSelector'] = documentSelector;
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('firstTriggerCharacter');
       try {
         if (!obj.containsKey('firstTriggerCharacter')) {
@@ -5610,22 +9652,6 @@
       } finally {
         reporter.pop();
       }
-      reporter.push('documentSelector');
-      try {
-        if (!obj.containsKey('documentSelector')) {
-          reporter.reportError('must not be undefined');
-          return false;
-        }
-        if (obj['documentSelector'] != null &&
-            !((obj['documentSelector'] is List &&
-                (obj['documentSelector'].every(
-                    (item) => DocumentFilter.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<DocumentFilter>');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
       return true;
     } else {
       reporter.reportError(
@@ -5638,11 +9664,11 @@
   bool operator ==(Object other) {
     if (other is DocumentOnTypeFormattingRegistrationOptions &&
         other.runtimeType == DocumentOnTypeFormattingRegistrationOptions) {
-      return firstTriggerCharacter == other.firstTriggerCharacter &&
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          firstTriggerCharacter == other.firstTriggerCharacter &&
           listEqual(moreTriggerCharacter, other.moreTriggerCharacter,
               (String a, String b) => a == b) &&
-          listEqual(documentSelector, other.documentSelector,
-              (DocumentFilter a, DocumentFilter b) => a == b) &&
           true;
     }
     return false;
@@ -5651,9 +9677,9 @@
   @override
   int get hashCode {
     var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
     hash = JenkinsSmiHash.combine(hash, firstTriggerCharacter.hashCode);
     hash = JenkinsSmiHash.combine(hash, lspHashCode(moreTriggerCharacter));
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -5661,12 +9687,146 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class DocumentRangeFormattingParams implements ToJsonable {
+class DocumentRangeFormattingClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentRangeFormattingClientCapabilities.canParse,
+      DocumentRangeFormattingClientCapabilities.fromJson);
+
+  DocumentRangeFormattingClientCapabilities({this.dynamicRegistration});
+  static DocumentRangeFormattingClientCapabilities fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return DocumentRangeFormattingClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Whether formatting supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type DocumentRangeFormattingClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentRangeFormattingClientCapabilities &&
+        other.runtimeType == DocumentRangeFormattingClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentRangeFormattingOptions
+    implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentRangeFormattingOptions.canParse,
+      DocumentRangeFormattingOptions.fromJson);
+
+  DocumentRangeFormattingOptions({this.workDoneProgress});
+  static DocumentRangeFormattingOptions fromJson(Map<String, dynamic> json) {
+    if (DocumentRangeFormattingRegistrationOptions.canParse(
+        json, nullLspJsonReporter)) {
+      return DocumentRangeFormattingRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentRangeFormattingOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentRangeFormattingOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentRangeFormattingOptions &&
+        other.runtimeType == DocumentRangeFormattingOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentRangeFormattingParams
+    implements WorkDoneProgressParams, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DocumentRangeFormattingParams.canParse,
       DocumentRangeFormattingParams.fromJson);
 
-  DocumentRangeFormattingParams(this.textDocument, this.range, this.options) {
+  DocumentRangeFormattingParams(
+      {@required this.textDocument,
+      @required this.range,
+      @required this.options,
+      this.workDoneToken}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -5685,7 +9845,18 @@
     final options = json['options'] != null
         ? FormattingOptions.fromJson(json['options'])
         : null;
-    return DocumentRangeFormattingParams(textDocument, range, options);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    return DocumentRangeFormattingParams(
+        textDocument: textDocument,
+        range: range,
+        options: options,
+        workDoneToken: workDoneToken);
   }
 
   /// The format options
@@ -5697,6 +9868,9 @@
   /// The document to format.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['textDocument'] =
@@ -5704,6 +9878,9 @@
     __result['range'] = range ?? (throw 'range is required but was not set');
     __result['options'] =
         options ?? (throw 'options is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
     return __result;
   }
 
@@ -5760,6 +9937,17 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type DocumentRangeFormattingParams');
@@ -5774,6 +9962,7 @@
       return textDocument == other.textDocument &&
           range == other.range &&
           options == other.options &&
+          workDoneToken == other.workDoneToken &&
           true;
     }
     return false;
@@ -5785,6 +9974,103 @@
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
     hash = JenkinsSmiHash.combine(hash, range.hashCode);
     hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentRangeFormattingRegistrationOptions
+    implements
+        TextDocumentRegistrationOptions,
+        DocumentRangeFormattingOptions,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentRangeFormattingRegistrationOptions.canParse,
+      DocumentRangeFormattingRegistrationOptions.fromJson);
+
+  DocumentRangeFormattingRegistrationOptions(
+      {this.documentSelector, this.workDoneProgress});
+  static DocumentRangeFormattingRegistrationOptions fromJson(
+      Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentRangeFormattingRegistrationOptions(
+        documentSelector: documentSelector, workDoneProgress: workDoneProgress);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type DocumentRangeFormattingRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentRangeFormattingRegistrationOptions &&
+        other.runtimeType == DocumentRangeFormattingRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -5800,8 +10086,14 @@
   static const jsonHandler =
       LspJsonHandler(DocumentSymbol.canParse, DocumentSymbol.fromJson);
 
-  DocumentSymbol(this.name, this.detail, this.kind, this.deprecated, this.range,
-      this.selectionRange, this.children) {
+  DocumentSymbol(
+      {@required this.name,
+      this.detail,
+      @required this.kind,
+      this.deprecated,
+      @required this.range,
+      @required this.selectionRange,
+      this.children}) {
     if (name == null) {
       throw 'name is required but was not provided';
     }
@@ -5830,7 +10122,13 @@
         ?.cast<DocumentSymbol>()
         ?.toList();
     return DocumentSymbol(
-        name, detail, kind, deprecated, range, selectionRange, children);
+        name: name,
+        detail: detail,
+        kind: kind,
+        deprecated: deprecated,
+        range: range,
+        selectionRange: selectionRange,
+        children: children);
   }
 
   /// Children of this symbol, e.g. properties of a class.
@@ -6019,11 +10317,268 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class DocumentSymbolParams implements ToJsonable {
+class DocumentSymbolClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentSymbolClientCapabilities.canParse,
+      DocumentSymbolClientCapabilities.fromJson);
+
+  DocumentSymbolClientCapabilities(
+      {this.dynamicRegistration,
+      this.symbolKind,
+      this.hierarchicalDocumentSymbolSupport});
+  static DocumentSymbolClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final symbolKind = json['symbolKind'] != null
+        ? DocumentSymbolClientCapabilitiesSymbolKind.fromJson(
+            json['symbolKind'])
+        : null;
+    final hierarchicalDocumentSymbolSupport =
+        json['hierarchicalDocumentSymbolSupport'];
+    return DocumentSymbolClientCapabilities(
+        dynamicRegistration: dynamicRegistration,
+        symbolKind: symbolKind,
+        hierarchicalDocumentSymbolSupport: hierarchicalDocumentSymbolSupport);
+  }
+
+  /// Whether document symbol supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// The client supports hierarchical document symbols.
+  final bool hierarchicalDocumentSymbolSupport;
+
+  /// Specific capabilities for the `SymbolKind` in the
+  /// `textDocument/documentSymbol` request.
+  final DocumentSymbolClientCapabilitiesSymbolKind symbolKind;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (symbolKind != null) {
+      __result['symbolKind'] = symbolKind;
+    }
+    if (hierarchicalDocumentSymbolSupport != null) {
+      __result['hierarchicalDocumentSymbolSupport'] =
+          hierarchicalDocumentSymbolSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('symbolKind');
+      try {
+        if (obj['symbolKind'] != null &&
+            !(DocumentSymbolClientCapabilitiesSymbolKind.canParse(
+                obj['symbolKind'], reporter))) {
+          reporter.reportError(
+              'must be of type DocumentSymbolClientCapabilitiesSymbolKind');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('hierarchicalDocumentSymbolSupport');
+      try {
+        if (obj['hierarchicalDocumentSymbolSupport'] != null &&
+            !(obj['hierarchicalDocumentSymbolSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentSymbolClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentSymbolClientCapabilities &&
+        other.runtimeType == DocumentSymbolClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          symbolKind == other.symbolKind &&
+          hierarchicalDocumentSymbolSupport ==
+              other.hierarchicalDocumentSymbolSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, symbolKind.hashCode);
+    hash = JenkinsSmiHash.combine(
+        hash, hierarchicalDocumentSymbolSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentSymbolClientCapabilitiesSymbolKind implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentSymbolClientCapabilitiesSymbolKind.canParse,
+      DocumentSymbolClientCapabilitiesSymbolKind.fromJson);
+
+  DocumentSymbolClientCapabilitiesSymbolKind({this.valueSet});
+  static DocumentSymbolClientCapabilitiesSymbolKind fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? SymbolKind.fromJson(item) : null)
+        ?.cast<SymbolKind>()
+        ?.toList();
+    return DocumentSymbolClientCapabilitiesSymbolKind(valueSet: valueSet);
+  }
+
+  /// The symbol kind values the client supports. When this property exists the
+  /// client also guarantees that it will handle values outside its set
+  /// gracefully and falls back to a default value when unknown.
+  ///
+  /// If this property is not present the client only supports the symbol kinds
+  /// from `File` to `Array` as defined in the initial version of the protocol.
+  final List<SymbolKind> valueSet;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (valueSet != null) {
+      __result['valueSet'] = valueSet;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('valueSet');
+      try {
+        if (obj['valueSet'] != null &&
+            !((obj['valueSet'] is List &&
+                (obj['valueSet']
+                    .every((item) => SymbolKind.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<SymbolKind>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type DocumentSymbolClientCapabilitiesSymbolKind');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentSymbolClientCapabilitiesSymbolKind &&
+        other.runtimeType == DocumentSymbolClientCapabilitiesSymbolKind) {
+      return listEqual(valueSet, other.valueSet,
+              (SymbolKind a, SymbolKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentSymbolOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentSymbolOptions.canParse, DocumentSymbolOptions.fromJson);
+
+  DocumentSymbolOptions({this.workDoneProgress});
+  static DocumentSymbolOptions fromJson(Map<String, dynamic> json) {
+    if (DocumentSymbolRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentSymbolRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentSymbolOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentSymbolOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentSymbolOptions &&
+        other.runtimeType == DocumentSymbolOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentSymbolParams
+    implements WorkDoneProgressParams, PartialResultParams, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       DocumentSymbolParams.canParse, DocumentSymbolParams.fromJson);
 
-  DocumentSymbolParams(this.textDocument) {
+  DocumentSymbolParams(
+      {@required this.textDocument,
+      this.workDoneToken,
+      this.partialResultToken}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -6032,16 +10587,46 @@
     final textDocument = json['textDocument'] != null
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    return DocumentSymbolParams(textDocument);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return DocumentSymbolParams(
+        textDocument: textDocument,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
   }
 
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
   /// The text document.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['textDocument'] =
         textDocument ?? (throw 'textDocument is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
     return __result;
   }
 
@@ -6064,6 +10649,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type DocumentSymbolParams');
@@ -6075,7 +10682,10 @@
   bool operator ==(Object other) {
     if (other is DocumentSymbolParams &&
         other.runtimeType == DocumentSymbolParams) {
-      return textDocument == other.textDocument && true;
+      return textDocument == other.textDocument &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
     }
     return false;
   }
@@ -6084,6 +10694,102 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class DocumentSymbolRegistrationOptions
+    implements
+        TextDocumentRegistrationOptions,
+        DocumentSymbolOptions,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      DocumentSymbolRegistrationOptions.canParse,
+      DocumentSymbolRegistrationOptions.fromJson);
+
+  DocumentSymbolRegistrationOptions(
+      {this.documentSelector, this.workDoneProgress});
+  static DocumentSymbolRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    return DocumentSymbolRegistrationOptions(
+        documentSelector: documentSelector, workDoneProgress: workDoneProgress);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type DocumentSymbolRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is DocumentSymbolRegistrationOptions &&
+        other.runtimeType == DocumentSymbolRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -6127,29 +10833,99 @@
   bool operator ==(Object o) => o is ErrorCodes && o._value == _value;
 }
 
-/// Execute command options.
-class ExecuteCommandOptions implements ToJsonable {
+class ExecuteCommandClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      ExecuteCommandClientCapabilities.canParse,
+      ExecuteCommandClientCapabilities.fromJson);
+
+  ExecuteCommandClientCapabilities({this.dynamicRegistration});
+  static ExecuteCommandClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return ExecuteCommandClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Execute command supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ExecuteCommandClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ExecuteCommandClientCapabilities &&
+        other.runtimeType == ExecuteCommandClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ExecuteCommandOptions implements WorkDoneProgressOptions, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       ExecuteCommandOptions.canParse, ExecuteCommandOptions.fromJson);
 
-  ExecuteCommandOptions(this.commands) {
+  ExecuteCommandOptions({@required this.commands, this.workDoneProgress}) {
     if (commands == null) {
       throw 'commands is required but was not provided';
     }
   }
   static ExecuteCommandOptions fromJson(Map<String, dynamic> json) {
+    if (ExecuteCommandRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return ExecuteCommandRegistrationOptions.fromJson(json);
+    }
     final commands =
         json['commands']?.map((item) => item)?.cast<String>()?.toList();
-    return ExecuteCommandOptions(commands);
+    final workDoneProgress = json['workDoneProgress'];
+    return ExecuteCommandOptions(
+        commands: commands, workDoneProgress: workDoneProgress);
   }
 
   /// The commands to be executed on the server
   final List<String> commands;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['commands'] =
         commands ?? (throw 'commands is required but was not set');
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
@@ -6173,6 +10949,16 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type ExecuteCommandOptions');
@@ -6186,6 +10972,7 @@
         other.runtimeType == ExecuteCommandOptions) {
       return listEqual(
               commands, other.commands, (String a, String b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -6195,6 +10982,7 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, lspHashCode(commands));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -6202,11 +10990,12 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class ExecuteCommandParams implements ToJsonable {
+class ExecuteCommandParams implements WorkDoneProgressParams, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       ExecuteCommandParams.canParse, ExecuteCommandParams.fromJson);
 
-  ExecuteCommandParams(this.command, this.arguments) {
+  ExecuteCommandParams(
+      {@required this.command, this.arguments, this.workDoneToken}) {
     if (command == null) {
       throw 'command is required but was not provided';
     }
@@ -6215,7 +11004,15 @@
     final command = json['command'];
     final arguments =
         json['arguments']?.map((item) => item)?.cast<dynamic>()?.toList();
-    return ExecuteCommandParams(command, arguments);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    return ExecuteCommandParams(
+        command: command, arguments: arguments, workDoneToken: workDoneToken);
   }
 
   /// Arguments that the command should be invoked with.
@@ -6224,6 +11021,9 @@
   /// The identifier of the actual command handler.
   final String command;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['command'] =
@@ -6231,6 +11031,9 @@
     if (arguments != null) {
       __result['arguments'] = arguments;
     }
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
     return __result;
   }
 
@@ -6264,6 +11067,17 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type ExecuteCommandParams');
@@ -6278,6 +11092,7 @@
       return command == other.command &&
           listEqual(
               arguments, other.arguments, (dynamic a, dynamic b) => a == b) &&
+          workDoneToken == other.workDoneToken &&
           true;
     }
     return false;
@@ -6288,6 +11103,7 @@
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, command.hashCode);
     hash = JenkinsSmiHash.combine(hash, lspHashCode(arguments));
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -6296,12 +11112,14 @@
 }
 
 /// Execute command registration options.
-class ExecuteCommandRegistrationOptions implements ToJsonable {
+class ExecuteCommandRegistrationOptions
+    implements ExecuteCommandOptions, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       ExecuteCommandRegistrationOptions.canParse,
       ExecuteCommandRegistrationOptions.fromJson);
 
-  ExecuteCommandRegistrationOptions(this.commands) {
+  ExecuteCommandRegistrationOptions(
+      {@required this.commands, this.workDoneProgress}) {
     if (commands == null) {
       throw 'commands is required but was not provided';
     }
@@ -6309,16 +11127,22 @@
   static ExecuteCommandRegistrationOptions fromJson(Map<String, dynamic> json) {
     final commands =
         json['commands']?.map((item) => item)?.cast<String>()?.toList();
-    return ExecuteCommandRegistrationOptions(commands);
+    final workDoneProgress = json['workDoneProgress'];
+    return ExecuteCommandRegistrationOptions(
+        commands: commands, workDoneProgress: workDoneProgress);
   }
 
   /// The commands to be executed on the server
   final List<String> commands;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['commands'] =
         commands ?? (throw 'commands is required but was not set');
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
@@ -6342,6 +11166,16 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type ExecuteCommandRegistrationOptions');
@@ -6355,6 +11189,7 @@
         other.runtimeType == ExecuteCommandRegistrationOptions) {
       return listEqual(
               commands, other.commands, (String a, String b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -6364,6 +11199,7 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, lspHashCode(commands));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -6393,18 +11229,18 @@
   /// executed.
   static const Abort = FailureHandlingKind._('abort');
 
-  /// All operations are executed transactionally. That means they either all
+  /// All operations are executed transactional. That means they either all
   /// succeed or no changes at all are applied to the workspace.
   static const Transactional = FailureHandlingKind._('transactional');
 
   /// If the workspace edit contains only textual file changes they are executed
-  /// transactionally. If resource changes (create, rename or delete file) are
+  /// transactional. If resource changes (create, rename or delete file) are
   /// part of the change the failure handling strategy is abort.
   static const TextOnlyTransactional =
       FailureHandlingKind._('textOnlyTransactional');
 
   /// The client tries to undo the operations already executed. But there is no
-  /// guarantee that this succeeds.
+  /// guarantee that this is succeeding.
   static const Undo = FailureHandlingKind._('undo');
 
   Object toJson() => _value;
@@ -6454,7 +11290,7 @@
   static const jsonHandler =
       LspJsonHandler(FileEvent.canParse, FileEvent.fromJson);
 
-  FileEvent(this.uri, this.type) {
+  FileEvent({@required this.uri, @required this.type}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -6465,7 +11301,7 @@
   static FileEvent fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
     final type = json['type'];
-    return FileEvent(uri, type);
+    return FileEvent(uri: uri, type: type);
   }
 
   /// The change type.
@@ -6548,7 +11384,7 @@
   static const jsonHandler =
       LspJsonHandler(FileSystemWatcher.canParse, FileSystemWatcher.fromJson);
 
-  FileSystemWatcher(this.globPattern, this.kind) {
+  FileSystemWatcher({@required this.globPattern, this.kind}) {
     if (globPattern == null) {
       throw 'globPattern is required but was not provided';
     }
@@ -6556,7 +11392,7 @@
   static FileSystemWatcher fromJson(Map<String, dynamic> json) {
     final globPattern = json['globPattern'];
     final kind = json['kind'] != null ? WatchKind.fromJson(json['kind']) : null;
-    return FileSystemWatcher(globPattern, kind);
+    return FileSystemWatcher(globPattern: globPattern, kind: kind);
   }
 
   /// The  glob pattern to watch.
@@ -6649,8 +11485,12 @@
   static const jsonHandler =
       LspJsonHandler(FoldingRange.canParse, FoldingRange.fromJson);
 
-  FoldingRange(this.startLine, this.startCharacter, this.endLine,
-      this.endCharacter, this.kind) {
+  FoldingRange(
+      {@required this.startLine,
+      this.startCharacter,
+      @required this.endLine,
+      this.endCharacter,
+      this.kind}) {
     if (startLine == null) {
       throw 'startLine is required but was not provided';
     }
@@ -6665,7 +11505,12 @@
     final endCharacter = json['endCharacter'];
     final kind =
         json['kind'] != null ? FoldingRangeKind.fromJson(json['kind']) : null;
-    return FoldingRange(startLine, startCharacter, endLine, endCharacter, kind);
+    return FoldingRange(
+        startLine: startLine,
+        startCharacter: startCharacter,
+        endLine: endLine,
+        endCharacter: endCharacter,
+        kind: kind);
   }
 
   /// The zero-based character offset before the folded range ends. If not
@@ -6805,6 +11650,116 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class FoldingRangeClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      FoldingRangeClientCapabilities.canParse,
+      FoldingRangeClientCapabilities.fromJson);
+
+  FoldingRangeClientCapabilities(
+      {this.dynamicRegistration, this.rangeLimit, this.lineFoldingOnly});
+  static FoldingRangeClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final rangeLimit = json['rangeLimit'];
+    final lineFoldingOnly = json['lineFoldingOnly'];
+    return FoldingRangeClientCapabilities(
+        dynamicRegistration: dynamicRegistration,
+        rangeLimit: rangeLimit,
+        lineFoldingOnly: lineFoldingOnly);
+  }
+
+  /// Whether implementation supports dynamic registration for folding range
+  /// providers. If this is set to `true` the client supports the new
+  /// `FoldingRangeRegistrationOptions` return value for the corresponding
+  /// server capability as well.
+  final bool dynamicRegistration;
+
+  /// If set, the client signals that it only supports folding complete lines.
+  /// If set, client will ignore specified `startCharacter` and `endCharacter`
+  /// properties in a FoldingRange.
+  final bool lineFoldingOnly;
+
+  /// The maximum number of folding ranges that the client prefers to receive
+  /// per document. The value serves as a hint, servers are free to follow the
+  /// limit.
+  final num rangeLimit;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (rangeLimit != null) {
+      __result['rangeLimit'] = rangeLimit;
+    }
+    if (lineFoldingOnly != null) {
+      __result['lineFoldingOnly'] = lineFoldingOnly;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('rangeLimit');
+      try {
+        if (obj['rangeLimit'] != null && !(obj['rangeLimit'] is num)) {
+          reporter.reportError('must be of type num');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('lineFoldingOnly');
+      try {
+        if (obj['lineFoldingOnly'] != null &&
+            !(obj['lineFoldingOnly'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type FoldingRangeClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is FoldingRangeClientCapabilities &&
+        other.runtimeType == FoldingRangeClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          rangeLimit == other.rangeLimit &&
+          lineFoldingOnly == other.lineFoldingOnly &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rangeLimit.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lineFoldingOnly.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// Enum of known range kinds
 class FoldingRangeKind {
   const FoldingRangeKind(this._value);
@@ -6836,11 +11791,77 @@
   bool operator ==(Object o) => o is FoldingRangeKind && o._value == _value;
 }
 
-class FoldingRangeParams implements ToJsonable {
+class FoldingRangeOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      FoldingRangeOptions.canParse, FoldingRangeOptions.fromJson);
+
+  FoldingRangeOptions({this.workDoneProgress});
+  static FoldingRangeOptions fromJson(Map<String, dynamic> json) {
+    if (FoldingRangeRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return FoldingRangeRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return FoldingRangeOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type FoldingRangeOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is FoldingRangeOptions &&
+        other.runtimeType == FoldingRangeOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class FoldingRangeParams
+    implements WorkDoneProgressParams, PartialResultParams, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(FoldingRangeParams.canParse, FoldingRangeParams.fromJson);
 
-  FoldingRangeParams(this.textDocument) {
+  FoldingRangeParams(
+      {@required this.textDocument,
+      this.workDoneToken,
+      this.partialResultToken}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -6849,16 +11870,46 @@
     final textDocument = json['textDocument'] != null
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    return FoldingRangeParams(textDocument);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return FoldingRangeParams(
+        textDocument: textDocument,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
   }
 
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
   /// The text document.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['textDocument'] =
         textDocument ?? (throw 'textDocument is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
     return __result;
   }
 
@@ -6881,6 +11932,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type FoldingRangeParams');
@@ -6892,7 +11965,10 @@
   bool operator ==(Object other) {
     if (other is FoldingRangeParams &&
         other.runtimeType == FoldingRangeParams) {
-      return textDocument == other.textDocument && true;
+      return textDocument == other.textDocument &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
     }
     return false;
   }
@@ -6901,6 +11977,8 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -6908,35 +11986,105 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Folding range provider options.
-class FoldingRangeProviderOptions implements ToJsonable {
+class FoldingRangeRegistrationOptions
+    implements
+        TextDocumentRegistrationOptions,
+        FoldingRangeOptions,
+        StaticRegistrationOptions,
+        ToJsonable {
   static const jsonHandler = LspJsonHandler(
-      FoldingRangeProviderOptions.canParse,
-      FoldingRangeProviderOptions.fromJson);
+      FoldingRangeRegistrationOptions.canParse,
+      FoldingRangeRegistrationOptions.fromJson);
 
-  static FoldingRangeProviderOptions fromJson(Map<String, dynamic> json) {
-    return FoldingRangeProviderOptions();
+  FoldingRangeRegistrationOptions(
+      {this.documentSelector, this.workDoneProgress, this.id});
+  static FoldingRangeRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    final id = json['id'];
+    return FoldingRangeRegistrationOptions(
+        documentSelector: documentSelector,
+        workDoneProgress: workDoneProgress,
+        id: id);
   }
 
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+
+  /// The id used to register the request. The id can be used to deregister the
+  /// request again. See also Registration#id.
+  final String id;
+  final bool workDoneProgress;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    if (id != null) {
+      __result['id'] = id;
+    }
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('id');
+      try {
+        if (obj['id'] != null && !(obj['id'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
-      reporter.reportError('must be of type FoldingRangeProviderOptions');
+      reporter.reportError('must be of type FoldingRangeRegistrationOptions');
       return false;
     }
   }
 
   @override
   bool operator ==(Object other) {
-    if (other is FoldingRangeProviderOptions &&
-        other.runtimeType == FoldingRangeProviderOptions) {
-      return true;
+    if (other is FoldingRangeRegistrationOptions &&
+        other.runtimeType == FoldingRangeRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          id == other.id &&
+          true;
     }
     return false;
   }
@@ -6944,6 +12092,9 @@
   @override
   int get hashCode {
     var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -6956,7 +12107,12 @@
   static const jsonHandler =
       LspJsonHandler(FormattingOptions.canParse, FormattingOptions.fromJson);
 
-  FormattingOptions(this.tabSize, this.insertSpaces) {
+  FormattingOptions(
+      {@required this.tabSize,
+      @required this.insertSpaces,
+      this.trimTrailingWhitespace,
+      this.insertFinalNewline,
+      this.trimFinalNewlines}) {
     if (tabSize == null) {
       throw 'tabSize is required but was not provided';
     }
@@ -6967,21 +12123,50 @@
   static FormattingOptions fromJson(Map<String, dynamic> json) {
     final tabSize = json['tabSize'];
     final insertSpaces = json['insertSpaces'];
-    return FormattingOptions(tabSize, insertSpaces);
+    final trimTrailingWhitespace = json['trimTrailingWhitespace'];
+    final insertFinalNewline = json['insertFinalNewline'];
+    final trimFinalNewlines = json['trimFinalNewlines'];
+    return FormattingOptions(
+        tabSize: tabSize,
+        insertSpaces: insertSpaces,
+        trimTrailingWhitespace: trimTrailingWhitespace,
+        insertFinalNewline: insertFinalNewline,
+        trimFinalNewlines: trimFinalNewlines);
   }
 
+  /// Insert a newline character at the end of the file if one does not exist.
+  ///  @since 3.15.0
+  final bool insertFinalNewline;
+
   /// Prefer spaces over tabs.
   final bool insertSpaces;
 
   /// Size of a tab in spaces.
   final num tabSize;
 
+  /// Trim all newlines after the final newline at the end of the file.
+  ///  @since 3.15.0
+  final bool trimFinalNewlines;
+
+  /// Trim trailing whitespace on a line.
+  ///  @since 3.15.0
+  final bool trimTrailingWhitespace;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['tabSize'] =
         tabSize ?? (throw 'tabSize is required but was not set');
     __result['insertSpaces'] =
         insertSpaces ?? (throw 'insertSpaces is required but was not set');
+    if (trimTrailingWhitespace != null) {
+      __result['trimTrailingWhitespace'] = trimTrailingWhitespace;
+    }
+    if (insertFinalNewline != null) {
+      __result['insertFinalNewline'] = insertFinalNewline;
+    }
+    if (trimFinalNewlines != null) {
+      __result['trimFinalNewlines'] = trimFinalNewlines;
+    }
     return __result;
   }
 
@@ -7021,6 +12206,36 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('trimTrailingWhitespace');
+      try {
+        if (obj['trimTrailingWhitespace'] != null &&
+            !(obj['trimTrailingWhitespace'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('insertFinalNewline');
+      try {
+        if (obj['insertFinalNewline'] != null &&
+            !(obj['insertFinalNewline'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('trimFinalNewlines');
+      try {
+        if (obj['trimFinalNewlines'] != null &&
+            !(obj['trimFinalNewlines'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type FormattingOptions');
@@ -7033,6 +12248,9 @@
     if (other is FormattingOptions && other.runtimeType == FormattingOptions) {
       return tabSize == other.tabSize &&
           insertSpaces == other.insertSpaces &&
+          trimTrailingWhitespace == other.trimTrailingWhitespace &&
+          insertFinalNewline == other.insertFinalNewline &&
+          trimFinalNewlines == other.trimFinalNewlines &&
           true;
     }
     return false;
@@ -7043,6 +12261,9 @@
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, tabSize.hashCode);
     hash = JenkinsSmiHash.combine(hash, insertSpaces.hashCode);
+    hash = JenkinsSmiHash.combine(hash, trimTrailingWhitespace.hashCode);
+    hash = JenkinsSmiHash.combine(hash, insertFinalNewline.hashCode);
+    hash = JenkinsSmiHash.combine(hash, trimFinalNewlines.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -7054,7 +12275,7 @@
 class Hover implements ToJsonable {
   static const jsonHandler = LspJsonHandler(Hover.canParse, Hover.fromJson);
 
-  Hover(this.contents, this.range) {
+  Hover({@required this.contents, this.range}) {
     if (contents == null) {
       throw 'contents is required but was not provided';
     }
@@ -7068,7 +12289,7 @@
                 : null)
             : (throw '''${json['contents']} was not one of (String, MarkupContent)'''));
     final range = json['range'] != null ? Range.fromJson(json['range']) : null;
-    return Hover(contents, range);
+    return Hover(contents: contents, range: range);
   }
 
   /// The hover's content
@@ -7145,24 +12366,832 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class InitializeParams implements ToJsonable {
+class HoverClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      HoverClientCapabilities.canParse, HoverClientCapabilities.fromJson);
+
+  HoverClientCapabilities({this.dynamicRegistration, this.contentFormat});
+  static HoverClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final contentFormat = json['contentFormat']
+        ?.map((item) => item != null ? MarkupKind.fromJson(item) : null)
+        ?.cast<MarkupKind>()
+        ?.toList();
+    return HoverClientCapabilities(
+        dynamicRegistration: dynamicRegistration, contentFormat: contentFormat);
+  }
+
+  /// Client supports the follow content formats for the content property. The
+  /// order describes the preferred format of the client.
+  final List<MarkupKind> contentFormat;
+
+  /// Whether hover supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (contentFormat != null) {
+      __result['contentFormat'] = contentFormat;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('contentFormat');
+      try {
+        if (obj['contentFormat'] != null &&
+            !((obj['contentFormat'] is List &&
+                (obj['contentFormat']
+                    .every((item) => MarkupKind.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<MarkupKind>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type HoverClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is HoverClientCapabilities &&
+        other.runtimeType == HoverClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          listEqual(contentFormat, other.contentFormat,
+              (MarkupKind a, MarkupKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(contentFormat));
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class HoverOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler =
+      LspJsonHandler(HoverOptions.canParse, HoverOptions.fromJson);
+
+  HoverOptions({this.workDoneProgress});
+  static HoverOptions fromJson(Map<String, dynamic> json) {
+    if (HoverRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return HoverRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return HoverOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type HoverOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is HoverOptions && other.runtimeType == HoverOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class HoverParams
+    implements TextDocumentPositionParams, WorkDoneProgressParams, ToJsonable {
+  static const jsonHandler =
+      LspJsonHandler(HoverParams.canParse, HoverParams.fromJson);
+
+  HoverParams(
+      {@required this.textDocument,
+      @required this.position,
+      this.workDoneToken}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (position == null) {
+      throw 'position is required but was not provided';
+    }
+  }
+  static HoverParams fromJson(Map<String, dynamic> json) {
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    return HoverParams(
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken);
+  }
+
+  /// The position inside the text document.
+  final Position position;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    __result['position'] =
+        position ?? (throw 'position is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('position');
+      try {
+        if (!obj.containsKey('position')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['position'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Position.canParse(obj['position'], reporter))) {
+          reporter.reportError('must be of type Position');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type HoverParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is HoverParams && other.runtimeType == HoverParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          workDoneToken == other.workDoneToken &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class HoverRegistrationOptions
+    implements TextDocumentRegistrationOptions, HoverOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      HoverRegistrationOptions.canParse, HoverRegistrationOptions.fromJson);
+
+  HoverRegistrationOptions({this.documentSelector, this.workDoneProgress});
+  static HoverRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    return HoverRegistrationOptions(
+        documentSelector: documentSelector, workDoneProgress: workDoneProgress);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type HoverRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is HoverRegistrationOptions &&
+        other.runtimeType == HoverRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ImplementationClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      ImplementationClientCapabilities.canParse,
+      ImplementationClientCapabilities.fromJson);
+
+  ImplementationClientCapabilities(
+      {this.dynamicRegistration, this.linkSupport});
+  static ImplementationClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final linkSupport = json['linkSupport'];
+    return ImplementationClientCapabilities(
+        dynamicRegistration: dynamicRegistration, linkSupport: linkSupport);
+  }
+
+  /// Whether implementation supports dynamic registration. If this is set to
+  /// `true` the client supports the new `ImplementationRegistrationOptions`
+  /// return value for the corresponding server capability as well.
+  final bool dynamicRegistration;
+
+  /// The client supports additional metadata in the form of definition links.
+  ///  @since 3.14.0
+  final bool linkSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (linkSupport != null) {
+      __result['linkSupport'] = linkSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('linkSupport');
+      try {
+        if (obj['linkSupport'] != null && !(obj['linkSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ImplementationClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ImplementationClientCapabilities &&
+        other.runtimeType == ImplementationClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          linkSupport == other.linkSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ImplementationOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      ImplementationOptions.canParse, ImplementationOptions.fromJson);
+
+  ImplementationOptions({this.workDoneProgress});
+  static ImplementationOptions fromJson(Map<String, dynamic> json) {
+    if (ImplementationRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return ImplementationRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return ImplementationOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ImplementationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ImplementationOptions &&
+        other.runtimeType == ImplementationOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ImplementationParams
+    implements
+        TextDocumentPositionParams,
+        WorkDoneProgressParams,
+        PartialResultParams,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      ImplementationParams.canParse, ImplementationParams.fromJson);
+
+  ImplementationParams(
+      {@required this.textDocument,
+      @required this.position,
+      this.workDoneToken,
+      this.partialResultToken}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (position == null) {
+      throw 'position is required but was not provided';
+    }
+  }
+  static ImplementationParams fromJson(Map<String, dynamic> json) {
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return ImplementationParams(
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
+  }
+
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
+  /// The position inside the text document.
+  final Position position;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    __result['position'] =
+        position ?? (throw 'position is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('position');
+      try {
+        if (!obj.containsKey('position')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['position'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Position.canParse(obj['position'], reporter))) {
+          reporter.reportError('must be of type Position');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ImplementationParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ImplementationParams &&
+        other.runtimeType == ImplementationParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ImplementationRegistrationOptions
+    implements
+        TextDocumentRegistrationOptions,
+        ImplementationOptions,
+        StaticRegistrationOptions,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      ImplementationRegistrationOptions.canParse,
+      ImplementationRegistrationOptions.fromJson);
+
+  ImplementationRegistrationOptions(
+      {this.documentSelector, this.workDoneProgress, this.id});
+  static ImplementationRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    final id = json['id'];
+    return ImplementationRegistrationOptions(
+        documentSelector: documentSelector,
+        workDoneProgress: workDoneProgress,
+        id: id);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+
+  /// The id used to register the request. The id can be used to deregister the
+  /// request again. See also Registration#id.
+  final String id;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    if (id != null) {
+      __result['id'] = id;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('id');
+      try {
+        if (obj['id'] != null && !(obj['id'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ImplementationRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ImplementationRegistrationOptions &&
+        other.runtimeType == ImplementationRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          id == other.id &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class InitializeParams implements WorkDoneProgressParams, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(InitializeParams.canParse, InitializeParams.fromJson);
 
   InitializeParams(
-      this.processId,
+      {this.processId,
+      this.clientInfo,
       this.rootPath,
       this.rootUri,
       this.initializationOptions,
-      this.capabilities,
+      @required this.capabilities,
       this.trace,
-      this.workspaceFolders) {
+      this.workspaceFolders,
+      this.workDoneToken}) {
     if (capabilities == null) {
       throw 'capabilities is required but was not provided';
     }
   }
   static InitializeParams fromJson(Map<String, dynamic> json) {
     final processId = json['processId'];
+    final clientInfo = json['clientInfo'] != null
+        ? InitializeParamsClientInfo.fromJson(json['clientInfo'])
+        : null;
     final rootPath = json['rootPath'];
     final rootUri = json['rootUri'];
     final initializationOptions = json['initializationOptions'];
@@ -7174,13 +13203,32 @@
         ?.map((item) => item != null ? WorkspaceFolder.fromJson(item) : null)
         ?.cast<WorkspaceFolder>()
         ?.toList();
-    return InitializeParams(processId, rootPath, rootUri, initializationOptions,
-        capabilities, trace, workspaceFolders);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    return InitializeParams(
+        processId: processId,
+        clientInfo: clientInfo,
+        rootPath: rootPath,
+        rootUri: rootUri,
+        initializationOptions: initializationOptions,
+        capabilities: capabilities,
+        trace: trace,
+        workspaceFolders: workspaceFolders,
+        workDoneToken: workDoneToken);
   }
 
   /// The capabilities provided by the client (editor or tool)
   final ClientCapabilities capabilities;
 
+  /// Information about the client
+  ///  @since 3.15.0
+  final InitializeParamsClientInfo clientInfo;
+
   /// User provided initialization options.
   final dynamic initializationOptions;
 
@@ -7202,17 +13250,22 @@
   /// The initial trace setting. If omitted trace is disabled ('off').
   final String trace;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   /// The workspace folders configured in the client when the server starts.
   /// This property is only available if the client supports workspace folders.
   /// It can be `null` if the client supports workspace folders but none are
   /// configured.
-  ///
-  /// Since 3.6.0
+  ///  @since 3.6.0
   final List<WorkspaceFolder> workspaceFolders;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['processId'] = processId;
+    if (clientInfo != null) {
+      __result['clientInfo'] = clientInfo;
+    }
     if (rootPath != null) {
       __result['rootPath'] = rootPath;
     }
@@ -7228,6 +13281,9 @@
     if (workspaceFolders != null) {
       __result['workspaceFolders'] = workspaceFolders;
     }
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
     return __result;
   }
 
@@ -7246,6 +13302,17 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('clientInfo');
+      try {
+        if (obj['clientInfo'] != null &&
+            !(InitializeParamsClientInfo.canParse(
+                obj['clientInfo'], reporter))) {
+          reporter.reportError('must be of type InitializeParamsClientInfo');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('rootPath');
       try {
         if (obj['rootPath'] != null && !(obj['rootPath'] is String)) {
@@ -7315,6 +13382,17 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type InitializeParams');
@@ -7326,6 +13404,7 @@
   bool operator ==(Object other) {
     if (other is InitializeParams && other.runtimeType == InitializeParams) {
       return processId == other.processId &&
+          clientInfo == other.clientInfo &&
           rootPath == other.rootPath &&
           rootUri == other.rootUri &&
           initializationOptions == other.initializationOptions &&
@@ -7333,6 +13412,7 @@
           trace == other.trace &&
           listEqual(workspaceFolders, other.workspaceFolders,
               (WorkspaceFolder a, WorkspaceFolder b) => a == b) &&
+          workDoneToken == other.workDoneToken &&
           true;
     }
     return false;
@@ -7342,12 +13422,100 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, processId.hashCode);
+    hash = JenkinsSmiHash.combine(hash, clientInfo.hashCode);
     hash = JenkinsSmiHash.combine(hash, rootPath.hashCode);
     hash = JenkinsSmiHash.combine(hash, rootUri.hashCode);
     hash = JenkinsSmiHash.combine(hash, initializationOptions.hashCode);
     hash = JenkinsSmiHash.combine(hash, capabilities.hashCode);
     hash = JenkinsSmiHash.combine(hash, trace.hashCode);
     hash = JenkinsSmiHash.combine(hash, lspHashCode(workspaceFolders));
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class InitializeParamsClientInfo implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      InitializeParamsClientInfo.canParse, InitializeParamsClientInfo.fromJson);
+
+  InitializeParamsClientInfo({@required this.name, this.version}) {
+    if (name == null) {
+      throw 'name is required but was not provided';
+    }
+  }
+  static InitializeParamsClientInfo fromJson(Map<String, dynamic> json) {
+    final name = json['name'];
+    final version = json['version'];
+    return InitializeParamsClientInfo(name: name, version: version);
+  }
+
+  /// The name of the client as defined by the client.
+  final String name;
+
+  /// The client's version as defined by the client.
+  final String version;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['name'] = name ?? (throw 'name is required but was not set');
+    if (version != null) {
+      __result['version'] = version;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('name');
+      try {
+        if (!obj.containsKey('name')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['name'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(obj['name'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('version');
+      try {
+        if (obj['version'] != null && !(obj['version'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type InitializeParamsClientInfo');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is InitializeParamsClientInfo &&
+        other.runtimeType == InitializeParamsClientInfo) {
+      return name == other.name && version == other.version && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    hash = JenkinsSmiHash.combine(hash, version.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -7359,7 +13527,7 @@
   static const jsonHandler =
       LspJsonHandler(InitializeResult.canParse, InitializeResult.fromJson);
 
-  InitializeResult(this.capabilities) {
+  InitializeResult({@required this.capabilities, this.serverInfo}) {
     if (capabilities == null) {
       throw 'capabilities is required but was not provided';
     }
@@ -7368,16 +13536,26 @@
     final capabilities = json['capabilities'] != null
         ? ServerCapabilities.fromJson(json['capabilities'])
         : null;
-    return InitializeResult(capabilities);
+    final serverInfo = json['serverInfo'] != null
+        ? InitializeResultServerInfo.fromJson(json['serverInfo'])
+        : null;
+    return InitializeResult(capabilities: capabilities, serverInfo: serverInfo);
   }
 
   /// The capabilities the language server provides.
   final ServerCapabilities capabilities;
 
+  /// Information about the server.
+  ///  @since 3.15.0
+  final InitializeResultServerInfo serverInfo;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['capabilities'] =
         capabilities ?? (throw 'capabilities is required but was not set');
+    if (serverInfo != null) {
+      __result['serverInfo'] = serverInfo;
+    }
     return __result;
   }
 
@@ -7400,6 +13578,17 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('serverInfo');
+      try {
+        if (obj['serverInfo'] != null &&
+            !(InitializeResultServerInfo.canParse(
+                obj['serverInfo'], reporter))) {
+          reporter.reportError('must be of type InitializeResultServerInfo');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type InitializeResult');
@@ -7410,7 +13599,9 @@
   @override
   bool operator ==(Object other) {
     if (other is InitializeResult && other.runtimeType == InitializeResult) {
-      return capabilities == other.capabilities && true;
+      return capabilities == other.capabilities &&
+          serverInfo == other.serverInfo &&
+          true;
     }
     return false;
   }
@@ -7419,6 +13610,93 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, capabilities.hashCode);
+    hash = JenkinsSmiHash.combine(hash, serverInfo.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class InitializeResultServerInfo implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      InitializeResultServerInfo.canParse, InitializeResultServerInfo.fromJson);
+
+  InitializeResultServerInfo({@required this.name, this.version}) {
+    if (name == null) {
+      throw 'name is required but was not provided';
+    }
+  }
+  static InitializeResultServerInfo fromJson(Map<String, dynamic> json) {
+    final name = json['name'];
+    final version = json['version'];
+    return InitializeResultServerInfo(name: name, version: version);
+  }
+
+  /// The name of the server as defined by the server.
+  final String name;
+
+  /// The server's version as defined by the server.
+  final String version;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['name'] = name ?? (throw 'name is required but was not set');
+    if (version != null) {
+      __result['version'] = version;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('name');
+      try {
+        if (!obj.containsKey('name')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['name'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(obj['name'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('version');
+      try {
+        if (obj['version'] != null && !(obj['version'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type InitializeResultServerInfo');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is InitializeResultServerInfo &&
+        other.runtimeType == InitializeResultServerInfo) {
+      return name == other.name && version == other.version && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    hash = JenkinsSmiHash.combine(hash, version.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -7509,7 +13787,7 @@
   static const jsonHandler =
       LspJsonHandler(Location.canParse, Location.fromJson);
 
-  Location(this.uri, this.range) {
+  Location({@required this.uri, @required this.range}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -7520,7 +13798,7 @@
   static Location fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
     final range = json['range'] != null ? Range.fromJson(json['range']) : null;
-    return Location(uri, range);
+    return Location(uri: uri, range: range);
   }
 
   final Range range;
@@ -7600,8 +13878,11 @@
   static const jsonHandler =
       LspJsonHandler(LocationLink.canParse, LocationLink.fromJson);
 
-  LocationLink(this.originSelectionRange, this.targetUri, this.targetRange,
-      this.targetSelectionRange) {
+  LocationLink(
+      {this.originSelectionRange,
+      @required this.targetUri,
+      @required this.targetRange,
+      @required this.targetSelectionRange}) {
     if (targetUri == null) {
       throw 'targetUri is required but was not provided';
     }
@@ -7624,7 +13905,10 @@
         ? Range.fromJson(json['targetSelectionRange'])
         : null;
     return LocationLink(
-        originSelectionRange, targetUri, targetRange, targetSelectionRange);
+        originSelectionRange: originSelectionRange,
+        targetUri: targetUri,
+        targetRange: targetRange,
+        targetSelectionRange: targetSelectionRange);
   }
 
   /// Span of the origin of this link.
@@ -7761,7 +14045,7 @@
   static const jsonHandler =
       LspJsonHandler(LogMessageParams.canParse, LogMessageParams.fromJson);
 
-  LogMessageParams(this.type, this.message) {
+  LogMessageParams({@required this.type, @required this.message}) {
     if (type == null) {
       throw 'type is required but was not provided';
     }
@@ -7773,7 +14057,7 @@
     final type =
         json['type'] != null ? MessageType.fromJson(json['type']) : null;
     final message = json['message'];
-    return LogMessageParams(type, message);
+    return LogMessageParams(type: type, message: message);
   }
 
   /// The actual message
@@ -7879,7 +14163,7 @@
   static const jsonHandler =
       LspJsonHandler(MarkupContent.canParse, MarkupContent.fromJson);
 
-  MarkupContent(this.kind, this.value) {
+  MarkupContent({@required this.kind, @required this.value}) {
     if (kind == null) {
       throw 'kind is required but was not provided';
     }
@@ -7891,7 +14175,7 @@
     final kind =
         json['kind'] != null ? MarkupKind.fromJson(json['kind']) : null;
     final value = json['value'];
-    return MarkupContent(kind, value);
+    return MarkupContent(kind: kind, value: value);
   }
 
   /// The type of the Markup
@@ -8010,7 +14294,7 @@
 class Message implements ToJsonable {
   static const jsonHandler = LspJsonHandler(Message.canParse, Message.fromJson);
 
-  Message(this.jsonrpc) {
+  Message({@required this.jsonrpc}) {
     if (jsonrpc == null) {
       throw 'jsonrpc is required but was not provided';
     }
@@ -8026,7 +14310,7 @@
       return NotificationMessage.fromJson(json);
     }
     final jsonrpc = json['jsonrpc'];
-    return Message(jsonrpc);
+    return Message(jsonrpc: jsonrpc);
   }
 
   final String jsonrpc;
@@ -8087,14 +14371,14 @@
   static const jsonHandler =
       LspJsonHandler(MessageActionItem.canParse, MessageActionItem.fromJson);
 
-  MessageActionItem(this.title) {
+  MessageActionItem({@required this.title}) {
     if (title == null) {
       throw 'title is required but was not provided';
     }
   }
   static MessageActionItem fromJson(Map<String, dynamic> json) {
     final title = json['title'];
-    return MessageActionItem(title);
+    return MessageActionItem(title: title);
   }
 
   /// A short title like 'Retry', 'Open Log' etc.
@@ -8198,6 +14482,9 @@
   /// Constant for the '$/cancelRequest' method.
   static const cancelRequest = Method(r'$/cancelRequest');
 
+  /// Constant for the '$/progress' method.
+  static const progress = Method(r'$/progress');
+
   /// Constant for the 'initialize' method.
   static const initialize = Method(r'initialize');
 
@@ -8219,6 +14506,14 @@
   /// Constant for the 'window/logMessage' method.
   static const window_logMessage = Method(r'window/logMessage');
 
+  /// Constant for the 'window/workDoneProgress/create' method.
+  static const window_workDoneProgress_create =
+      Method(r'window/workDoneProgress/create');
+
+  /// Constant for the 'window/workDoneProgress/cancel' method.
+  static const window_workDoneProgress_cancel =
+      Method(r'window/workDoneProgress/cancel');
+
   /// Constant for the 'telemetry/event' method.
   static const telemetry_event = Method(r'telemetry/event');
 
@@ -8270,6 +14565,9 @@
   static const textDocument_willSaveWaitUntil =
       Method(r'textDocument/willSaveWaitUntil');
 
+  /// Constant for the 'textDocument/didSave' method.
+  static const textDocument_didSave = Method(r'textDocument/didSave');
+
   /// Constant for the 'textDocument/didClose' method.
   static const textDocument_didClose = Method(r'textDocument/didClose');
 
@@ -8359,6 +14657,10 @@
   /// Constant for the 'textDocument/foldingRange' method.
   static const textDocument_foldingRange = Method(r'textDocument/foldingRange');
 
+  /// Constant for the 'textDocument/selectionRange' method.
+  static const textDocument_selectionRange =
+      Method(r'textDocument/selectionRange');
+
   Object toJson() => _value;
 
   @override
@@ -8374,7 +14676,8 @@
   static const jsonHandler = LspJsonHandler(
       NotificationMessage.canParse, NotificationMessage.fromJson);
 
-  NotificationMessage(this.method, this.params, this.jsonrpc) {
+  NotificationMessage(
+      {@required this.method, this.params, @required this.jsonrpc}) {
     if (method == null) {
       throw 'method is required but was not provided';
     }
@@ -8387,7 +14690,8 @@
         json['method'] != null ? Method.fromJson(json['method']) : null;
     final params = json['params'];
     final jsonrpc = json['jsonrpc'];
-    return NotificationMessage(method, params, jsonrpc);
+    return NotificationMessage(
+        method: method, params: params, jsonrpc: jsonrpc);
   }
 
   final String jsonrpc;
@@ -8492,7 +14796,7 @@
   static const jsonHandler = LspJsonHandler(
       ParameterInformation.canParse, ParameterInformation.fromJson);
 
-  ParameterInformation(this.label, this.documentation) {
+  ParameterInformation({@required this.label, this.documentation}) {
     if (label == null) {
       throw 'label is required but was not provided';
     }
@@ -8508,7 +14812,7 @@
             : (json['documentation'] == null
                 ? null
                 : (throw '''${json['documentation']} was not one of (String, MarkupContent)''')));
-    return ParameterInformation(label, documentation);
+    return ParameterInformation(label: label, documentation: documentation);
   }
 
   /// The human-readable doc-comment of this parameter. Will be shown in the UI
@@ -8597,11 +14901,127 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class PartialResultParams implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      PartialResultParams.canParse, PartialResultParams.fromJson);
+
+  PartialResultParams({this.partialResultToken});
+  static PartialResultParams fromJson(Map<String, dynamic> json) {
+    if (WorkspaceSymbolParams.canParse(json, nullLspJsonReporter)) {
+      return WorkspaceSymbolParams.fromJson(json);
+    }
+    if (CompletionParams.canParse(json, nullLspJsonReporter)) {
+      return CompletionParams.fromJson(json);
+    }
+    if (DeclarationParams.canParse(json, nullLspJsonReporter)) {
+      return DeclarationParams.fromJson(json);
+    }
+    if (DefinitionParams.canParse(json, nullLspJsonReporter)) {
+      return DefinitionParams.fromJson(json);
+    }
+    if (TypeDefinitionParams.canParse(json, nullLspJsonReporter)) {
+      return TypeDefinitionParams.fromJson(json);
+    }
+    if (ImplementationParams.canParse(json, nullLspJsonReporter)) {
+      return ImplementationParams.fromJson(json);
+    }
+    if (ReferenceParams.canParse(json, nullLspJsonReporter)) {
+      return ReferenceParams.fromJson(json);
+    }
+    if (DocumentHighlightParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentHighlightParams.fromJson(json);
+    }
+    if (DocumentSymbolParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentSymbolParams.fromJson(json);
+    }
+    if (CodeActionParams.canParse(json, nullLspJsonReporter)) {
+      return CodeActionParams.fromJson(json);
+    }
+    if (CodeLensParams.canParse(json, nullLspJsonReporter)) {
+      return CodeLensParams.fromJson(json);
+    }
+    if (DocumentLinkParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentLinkParams.fromJson(json);
+    }
+    if (DocumentColorParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentColorParams.fromJson(json);
+    }
+    if (ColorPresentationParams.canParse(json, nullLspJsonReporter)) {
+      return ColorPresentationParams.fromJson(json);
+    }
+    if (FoldingRangeParams.canParse(json, nullLspJsonReporter)) {
+      return FoldingRangeParams.fromJson(json);
+    }
+    if (SelectionRangeParams.canParse(json, nullLspJsonReporter)) {
+      return SelectionRangeParams.fromJson(json);
+    }
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return PartialResultParams(partialResultToken: partialResultToken);
+  }
+
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type PartialResultParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is PartialResultParams &&
+        other.runtimeType == PartialResultParams) {
+      return partialResultToken == other.partialResultToken && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class Position implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(Position.canParse, Position.fromJson);
 
-  Position(this.line, this.character) {
+  Position({@required this.line, @required this.character}) {
     if (line == null) {
       throw 'line is required but was not provided';
     }
@@ -8612,7 +15032,7 @@
   static Position fromJson(Map<String, dynamic> json) {
     final line = json['line'];
     final character = json['character'];
-    return Position(line, character);
+    return Position(line: line, character: character);
   }
 
   /// Character offset on a line in a document (zero-based). Assuming that the
@@ -8697,11 +15117,406 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class PrepareRenameParams implements TextDocumentPositionParams, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      PrepareRenameParams.canParse, PrepareRenameParams.fromJson);
+
+  PrepareRenameParams({@required this.textDocument, @required this.position}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (position == null) {
+      throw 'position is required but was not provided';
+    }
+  }
+  static PrepareRenameParams fromJson(Map<String, dynamic> json) {
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
+    return PrepareRenameParams(textDocument: textDocument, position: position);
+  }
+
+  /// The position inside the text document.
+  final Position position;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    __result['position'] =
+        position ?? (throw 'position is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('position');
+      try {
+        if (!obj.containsKey('position')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['position'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Position.canParse(obj['position'], reporter))) {
+          reporter.reportError('must be of type Position');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type PrepareRenameParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is PrepareRenameParams &&
+        other.runtimeType == PrepareRenameParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ProgressParams<T> implements ToJsonable {
+  static const jsonHandler =
+      LspJsonHandler(ProgressParams.canParse, ProgressParams.fromJson);
+
+  ProgressParams({@required this.token, @required this.value}) {
+    if (token == null) {
+      throw 'token is required but was not provided';
+    }
+    if (value == null) {
+      throw 'value is required but was not provided';
+    }
+  }
+  static ProgressParams<T> fromJson<T>(Map<String, dynamic> json) {
+    final token = json['token'] is num
+        ? Either2<num, String>.t1(json['token'])
+        : (json['token'] is String
+            ? Either2<num, String>.t2(json['token'])
+            : (throw '''${json['token']} was not one of (num, String)'''));
+    final value = json['value'];
+    return ProgressParams<T>(token: token, value: value);
+  }
+
+  /// The progress token provided by the client or server.
+  final Either2<num, String> token;
+
+  /// The progress data.
+  final T value;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['token'] = token ?? (throw 'token is required but was not set');
+    __result['value'] = value ?? (throw 'value is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('token');
+      try {
+        if (!obj.containsKey('token')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['token'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!((obj['token'] is num || obj['token'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('value');
+      try {
+        if (!obj.containsKey('value')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['value'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(true /* T.canParse(obj['value']) */)) {
+          reporter.reportError('must be of type T');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ProgressParams<T>');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ProgressParams && other.runtimeType == ProgressParams) {
+      return token == other.token && value == other.value && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, token.hashCode);
+    hash = JenkinsSmiHash.combine(hash, value.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class PublishDiagnosticsClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      PublishDiagnosticsClientCapabilities.canParse,
+      PublishDiagnosticsClientCapabilities.fromJson);
+
+  PublishDiagnosticsClientCapabilities(
+      {this.relatedInformation, this.tagSupport, this.versionSupport});
+  static PublishDiagnosticsClientCapabilities fromJson(
+      Map<String, dynamic> json) {
+    final relatedInformation = json['relatedInformation'];
+    final tagSupport = json['tagSupport'] != null
+        ? PublishDiagnosticsClientCapabilitiesTagSupport.fromJson(
+            json['tagSupport'])
+        : null;
+    final versionSupport = json['versionSupport'];
+    return PublishDiagnosticsClientCapabilities(
+        relatedInformation: relatedInformation,
+        tagSupport: tagSupport,
+        versionSupport: versionSupport);
+  }
+
+  /// Whether the clients accepts diagnostics with related information.
+  final bool relatedInformation;
+
+  /// Client supports the tag property to provide meta data about a diagnostic.
+  /// Clients supporting tags have to handle unknown tags gracefully.
+  ///  @since 3.15.0
+  final PublishDiagnosticsClientCapabilitiesTagSupport tagSupport;
+
+  /// Whether the client interprets the version property of the
+  /// `textDocument/publishDiagnostics` notification's parameter.
+  ///  @since 3.15.0
+  final bool versionSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (relatedInformation != null) {
+      __result['relatedInformation'] = relatedInformation;
+    }
+    if (tagSupport != null) {
+      __result['tagSupport'] = tagSupport;
+    }
+    if (versionSupport != null) {
+      __result['versionSupport'] = versionSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('relatedInformation');
+      try {
+        if (obj['relatedInformation'] != null &&
+            !(obj['relatedInformation'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('tagSupport');
+      try {
+        if (obj['tagSupport'] != null &&
+            !(PublishDiagnosticsClientCapabilitiesTagSupport.canParse(
+                obj['tagSupport'], reporter))) {
+          reporter.reportError(
+              'must be of type PublishDiagnosticsClientCapabilitiesTagSupport');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('versionSupport');
+      try {
+        if (obj['versionSupport'] != null && !(obj['versionSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter
+          .reportError('must be of type PublishDiagnosticsClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is PublishDiagnosticsClientCapabilities &&
+        other.runtimeType == PublishDiagnosticsClientCapabilities) {
+      return relatedInformation == other.relatedInformation &&
+          tagSupport == other.tagSupport &&
+          versionSupport == other.versionSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, relatedInformation.hashCode);
+    hash = JenkinsSmiHash.combine(hash, tagSupport.hashCode);
+    hash = JenkinsSmiHash.combine(hash, versionSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class PublishDiagnosticsClientCapabilitiesTagSupport implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      PublishDiagnosticsClientCapabilitiesTagSupport.canParse,
+      PublishDiagnosticsClientCapabilitiesTagSupport.fromJson);
+
+  PublishDiagnosticsClientCapabilitiesTagSupport({@required this.valueSet}) {
+    if (valueSet == null) {
+      throw 'valueSet is required but was not provided';
+    }
+  }
+  static PublishDiagnosticsClientCapabilitiesTagSupport fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? DiagnosticTag.fromJson(item) : null)
+        ?.cast<DiagnosticTag>()
+        ?.toList();
+    return PublishDiagnosticsClientCapabilitiesTagSupport(valueSet: valueSet);
+  }
+
+  /// The tags supported by the client.
+  final List<DiagnosticTag> valueSet;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['valueSet'] =
+        valueSet ?? (throw 'valueSet is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('valueSet');
+      try {
+        if (!obj.containsKey('valueSet')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['valueSet'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!((obj['valueSet'] is List &&
+            (obj['valueSet']
+                .every((item) => DiagnosticTag.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DiagnosticTag>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type PublishDiagnosticsClientCapabilitiesTagSupport');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is PublishDiagnosticsClientCapabilitiesTagSupport &&
+        other.runtimeType == PublishDiagnosticsClientCapabilitiesTagSupport) {
+      return listEqual(valueSet, other.valueSet,
+              (DiagnosticTag a, DiagnosticTag b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class PublishDiagnosticsParams implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
       PublishDiagnosticsParams.canParse, PublishDiagnosticsParams.fromJson);
 
-  PublishDiagnosticsParams(this.uri, this.diagnostics) {
+  PublishDiagnosticsParams(
+      {@required this.uri, this.version, @required this.diagnostics}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -8711,11 +15526,13 @@
   }
   static PublishDiagnosticsParams fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
+    final version = json['version'];
     final diagnostics = json['diagnostics']
         ?.map((item) => item != null ? Diagnostic.fromJson(item) : null)
         ?.cast<Diagnostic>()
         ?.toList();
-    return PublishDiagnosticsParams(uri, diagnostics);
+    return PublishDiagnosticsParams(
+        uri: uri, version: version, diagnostics: diagnostics);
   }
 
   /// An array of diagnostic information items.
@@ -8724,9 +15541,17 @@
   /// The URI for which diagnostic information is reported.
   final String uri;
 
+  /// Optional the version number of the document the diagnostics are published
+  /// for.
+  ///  @since 3.15.0
+  final num version;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['uri'] = uri ?? (throw 'uri is required but was not set');
+    if (version != null) {
+      __result['version'] = version;
+    }
     __result['diagnostics'] =
         diagnostics ?? (throw 'diagnostics is required but was not set');
     return __result;
@@ -8751,6 +15576,15 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('version');
+      try {
+        if (obj['version'] != null && !(obj['version'] is num)) {
+          reporter.reportError('must be of type num');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('diagnostics');
       try {
         if (!obj.containsKey('diagnostics')) {
@@ -8782,6 +15616,7 @@
     if (other is PublishDiagnosticsParams &&
         other.runtimeType == PublishDiagnosticsParams) {
       return uri == other.uri &&
+          version == other.version &&
           listEqual(diagnostics, other.diagnostics,
               (Diagnostic a, Diagnostic b) => a == b) &&
           true;
@@ -8793,6 +15628,7 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, version.hashCode);
     hash = JenkinsSmiHash.combine(hash, lspHashCode(diagnostics));
     return JenkinsSmiHash.finish(hash);
   }
@@ -8804,7 +15640,7 @@
 class Range implements ToJsonable {
   static const jsonHandler = LspJsonHandler(Range.canParse, Range.fromJson);
 
-  Range(this.start, this.end) {
+  Range({@required this.start, @required this.end}) {
     if (start == null) {
       throw 'start is required but was not provided';
     }
@@ -8816,7 +15652,7 @@
     final start =
         json['start'] != null ? Position.fromJson(json['start']) : null;
     final end = json['end'] != null ? Position.fromJson(json['end']) : null;
-    return Range(start, end);
+    return Range(start: start, end: end);
   }
 
   /// The range's end position.
@@ -8899,7 +15735,7 @@
   static const jsonHandler = LspJsonHandler(
       RangeAndPlaceholder.canParse, RangeAndPlaceholder.fromJson);
 
-  RangeAndPlaceholder(this.range, this.placeholder) {
+  RangeAndPlaceholder({@required this.range, @required this.placeholder}) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
@@ -8910,7 +15746,7 @@
   static RangeAndPlaceholder fromJson(Map<String, dynamic> json) {
     final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final placeholder = json['placeholder'];
-    return RangeAndPlaceholder(range, placeholder);
+    return RangeAndPlaceholder(range: range, placeholder: placeholder);
   }
 
   final String placeholder;
@@ -8988,18 +15824,80 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class ReferenceClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      ReferenceClientCapabilities.canParse,
+      ReferenceClientCapabilities.fromJson);
+
+  ReferenceClientCapabilities({this.dynamicRegistration});
+  static ReferenceClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return ReferenceClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Whether references supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ReferenceClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ReferenceClientCapabilities &&
+        other.runtimeType == ReferenceClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class ReferenceContext implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(ReferenceContext.canParse, ReferenceContext.fromJson);
 
-  ReferenceContext(this.includeDeclaration) {
+  ReferenceContext({@required this.includeDeclaration}) {
     if (includeDeclaration == null) {
       throw 'includeDeclaration is required but was not provided';
     }
   }
   static ReferenceContext fromJson(Map<String, dynamic> json) {
     final includeDeclaration = json['includeDeclaration'];
-    return ReferenceContext(includeDeclaration);
+    return ReferenceContext(includeDeclaration: includeDeclaration);
   }
 
   /// Include the declaration of the current symbol.
@@ -9057,11 +15955,82 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class ReferenceParams implements TextDocumentPositionParams, ToJsonable {
+class ReferenceOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler =
+      LspJsonHandler(ReferenceOptions.canParse, ReferenceOptions.fromJson);
+
+  ReferenceOptions({this.workDoneProgress});
+  static ReferenceOptions fromJson(Map<String, dynamic> json) {
+    if (ReferenceRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return ReferenceRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return ReferenceOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ReferenceOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ReferenceOptions && other.runtimeType == ReferenceOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ReferenceParams
+    implements
+        TextDocumentPositionParams,
+        WorkDoneProgressParams,
+        PartialResultParams,
+        ToJsonable {
   static const jsonHandler =
       LspJsonHandler(ReferenceParams.canParse, ReferenceParams.fromJson);
 
-  ReferenceParams(this.context, this.textDocument, this.position) {
+  ReferenceParams(
+      {@required this.context,
+      @required this.textDocument,
+      @required this.position,
+      this.workDoneToken,
+      this.partialResultToken}) {
     if (context == null) {
       throw 'context is required but was not provided';
     }
@@ -9081,17 +16050,43 @@
         : null;
     final position =
         json['position'] != null ? Position.fromJson(json['position']) : null;
-    return ReferenceParams(context, textDocument, position);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return ReferenceParams(
+        context: context,
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
   }
 
   final ReferenceContext context;
 
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
   /// The position inside the text document.
   final Position position;
 
   /// The text document.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['context'] =
@@ -9100,6 +16095,12 @@
         textDocument ?? (throw 'textDocument is required but was not set');
     __result['position'] =
         position ?? (throw 'position is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
     return __result;
   }
 
@@ -9156,6 +16157,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type ReferenceParams');
@@ -9169,6 +16192,8 @@
       return context == other.context &&
           textDocument == other.textDocument &&
           position == other.position &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
           true;
     }
     return false;
@@ -9180,6 +16205,98 @@
     hash = JenkinsSmiHash.combine(hash, context.hashCode);
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
     hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ReferenceRegistrationOptions
+    implements TextDocumentRegistrationOptions, ReferenceOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      ReferenceRegistrationOptions.canParse,
+      ReferenceRegistrationOptions.fromJson);
+
+  ReferenceRegistrationOptions({this.documentSelector, this.workDoneProgress});
+  static ReferenceRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    return ReferenceRegistrationOptions(
+        documentSelector: documentSelector, workDoneProgress: workDoneProgress);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type ReferenceRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is ReferenceRegistrationOptions &&
+        other.runtimeType == ReferenceRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -9192,7 +16309,8 @@
   static const jsonHandler =
       LspJsonHandler(Registration.canParse, Registration.fromJson);
 
-  Registration(this.id, this.method, this.registerOptions) {
+  Registration(
+      {@required this.id, @required this.method, this.registerOptions}) {
     if (id == null) {
       throw 'id is required but was not provided';
     }
@@ -9204,7 +16322,8 @@
     final id = json['id'];
     final method = json['method'];
     final registerOptions = json['registerOptions'];
-    return Registration(id, method, registerOptions);
+    return Registration(
+        id: id, method: method, registerOptions: registerOptions);
   }
 
   /// The id used to register the request. The id can be used to deregister the
@@ -9307,7 +16426,7 @@
   static const jsonHandler =
       LspJsonHandler(RegistrationParams.canParse, RegistrationParams.fromJson);
 
-  RegistrationParams(this.registrations) {
+  RegistrationParams({@required this.registrations}) {
     if (registrations == null) {
       throw 'registrations is required but was not provided';
     }
@@ -9317,7 +16436,7 @@
         ?.map((item) => item != null ? Registration.fromJson(item) : null)
         ?.cast<Registration>()
         ?.toList();
-    return RegistrationParams(registrations);
+    return RegistrationParams(registrations: registrations);
   }
 
   final List<Registration> registrations;
@@ -9379,12 +16498,99 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class RenameClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      RenameClientCapabilities.canParse, RenameClientCapabilities.fromJson);
+
+  RenameClientCapabilities({this.dynamicRegistration, this.prepareSupport});
+  static RenameClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final prepareSupport = json['prepareSupport'];
+    return RenameClientCapabilities(
+        dynamicRegistration: dynamicRegistration,
+        prepareSupport: prepareSupport);
+  }
+
+  /// Whether rename supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// Client supports testing for validity of rename operations before
+  /// execution.
+  ///  @since version 3.12.0
+  final bool prepareSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (prepareSupport != null) {
+      __result['prepareSupport'] = prepareSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('prepareSupport');
+      try {
+        if (obj['prepareSupport'] != null && !(obj['prepareSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type RenameClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is RenameClientCapabilities &&
+        other.runtimeType == RenameClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          prepareSupport == other.prepareSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, prepareSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// Rename file operation
 class RenameFile implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(RenameFile.canParse, RenameFile.fromJson);
 
-  RenameFile(this.kind, this.oldUri, this.newUri, this.options) {
+  RenameFile(
+      {@required this.kind,
+      @required this.oldUri,
+      @required this.newUri,
+      this.options}) {
     if (kind == null) {
       throw 'kind is required but was not provided';
     }
@@ -9402,7 +16608,8 @@
     final options = json['options'] != null
         ? RenameFileOptions.fromJson(json['options'])
         : null;
-    return RenameFile(kind, oldUri, newUri, options);
+    return RenameFile(
+        kind: kind, oldUri: oldUri, newUri: newUri, options: options);
   }
 
   /// A rename
@@ -9529,11 +16736,12 @@
   static const jsonHandler =
       LspJsonHandler(RenameFileOptions.canParse, RenameFileOptions.fromJson);
 
-  RenameFileOptions(this.overwrite, this.ignoreIfExists);
+  RenameFileOptions({this.overwrite, this.ignoreIfExists});
   static RenameFileOptions fromJson(Map<String, dynamic> json) {
     final overwrite = json['overwrite'];
     final ignoreIfExists = json['ignoreIfExists'];
-    return RenameFileOptions(overwrite, ignoreIfExists);
+    return RenameFileOptions(
+        overwrite: overwrite, ignoreIfExists: ignoreIfExists);
   }
 
   /// Ignores if target exists.
@@ -9602,25 +16810,33 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Rename options
-class RenameOptions implements ToJsonable {
+class RenameOptions implements WorkDoneProgressOptions, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(RenameOptions.canParse, RenameOptions.fromJson);
 
-  RenameOptions(this.prepareProvider);
+  RenameOptions({this.prepareProvider, this.workDoneProgress});
   static RenameOptions fromJson(Map<String, dynamic> json) {
+    if (RenameRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return RenameRegistrationOptions.fromJson(json);
+    }
     final prepareProvider = json['prepareProvider'];
-    return RenameOptions(prepareProvider);
+    final workDoneProgress = json['workDoneProgress'];
+    return RenameOptions(
+        prepareProvider: prepareProvider, workDoneProgress: workDoneProgress);
   }
 
   /// Renames should be checked and tested before being executed.
   final bool prepareProvider;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     if (prepareProvider != null) {
       __result['prepareProvider'] = prepareProvider;
     }
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
@@ -9636,6 +16852,16 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type RenameOptions');
@@ -9646,7 +16872,9 @@
   @override
   bool operator ==(Object other) {
     if (other is RenameOptions && other.runtimeType == RenameOptions) {
-      return prepareProvider == other.prepareProvider && true;
+      return prepareProvider == other.prepareProvider &&
+          workDoneProgress == other.workDoneProgress &&
+          true;
     }
     return false;
   }
@@ -9655,6 +16883,7 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, prepareProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -9662,54 +16891,93 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class RenameParams implements ToJsonable {
+class RenameParams
+    implements TextDocumentPositionParams, WorkDoneProgressParams, ToJsonable {
   static const jsonHandler =
       LspJsonHandler(RenameParams.canParse, RenameParams.fromJson);
 
-  RenameParams(this.textDocument, this.position, this.newName) {
+  RenameParams(
+      {@required this.newName,
+      @required this.textDocument,
+      @required this.position,
+      this.workDoneToken}) {
+    if (newName == null) {
+      throw 'newName is required but was not provided';
+    }
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
     if (position == null) {
       throw 'position is required but was not provided';
     }
-    if (newName == null) {
-      throw 'newName is required but was not provided';
-    }
   }
   static RenameParams fromJson(Map<String, dynamic> json) {
+    final newName = json['newName'];
     final textDocument = json['textDocument'] != null
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final position =
         json['position'] != null ? Position.fromJson(json['position']) : null;
-    final newName = json['newName'];
-    return RenameParams(textDocument, position, newName);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    return RenameParams(
+        newName: newName,
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken);
   }
 
   /// The new name of the symbol. If the given name is not valid the request
   /// must return a [ResponseError] with an appropriate message set.
   final String newName;
 
-  /// The position at which this request was sent.
+  /// The position inside the text document.
   final Position position;
 
-  /// The document to rename.
+  /// The text document.
   final TextDocumentIdentifier textDocument;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    __result['newName'] =
+        newName ?? (throw 'newName is required but was not set');
     __result['textDocument'] =
         textDocument ?? (throw 'textDocument is required but was not set');
     __result['position'] =
         position ?? (throw 'position is required but was not set');
-    __result['newName'] =
-        newName ?? (throw 'newName is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
+      reporter.push('newName');
+      try {
+        if (!obj.containsKey('newName')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['newName'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(obj['newName'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('textDocument');
       try {
         if (!obj.containsKey('textDocument')) {
@@ -9744,18 +17012,12 @@
       } finally {
         reporter.pop();
       }
-      reporter.push('newName');
+      reporter.push('workDoneToken');
       try {
-        if (!obj.containsKey('newName')) {
-          reporter.reportError('must not be undefined');
-          return false;
-        }
-        if (obj['newName'] == null) {
-          reporter.reportError('must not be null');
-          return false;
-        }
-        if (!(obj['newName'] is String)) {
-          reporter.reportError('must be of type String');
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
           return false;
         }
       } finally {
@@ -9771,9 +17033,10 @@
   @override
   bool operator ==(Object other) {
     if (other is RenameParams && other.runtimeType == RenameParams) {
-      return textDocument == other.textDocument &&
+      return newName == other.newName &&
+          textDocument == other.textDocument &&
           position == other.position &&
-          newName == other.newName &&
+          workDoneToken == other.workDoneToken &&
           true;
     }
     return false;
@@ -9782,9 +17045,10 @@
   @override
   int get hashCode {
     var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, newName.hashCode);
     hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
     hash = JenkinsSmiHash.combine(hash, position.hashCode);
-    hash = JenkinsSmiHash.combine(hash, newName.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -9793,48 +17057,47 @@
 }
 
 class RenameRegistrationOptions
-    implements TextDocumentRegistrationOptions, ToJsonable {
+    implements TextDocumentRegistrationOptions, RenameOptions, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       RenameRegistrationOptions.canParse, RenameRegistrationOptions.fromJson);
 
-  RenameRegistrationOptions(this.prepareProvider, this.documentSelector);
+  RenameRegistrationOptions(
+      {this.documentSelector, this.prepareProvider, this.workDoneProgress});
   static RenameRegistrationOptions fromJson(Map<String, dynamic> json) {
-    final prepareProvider = json['prepareProvider'];
     final documentSelector = json['documentSelector']
         ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
-    return RenameRegistrationOptions(prepareProvider, documentSelector);
+    final prepareProvider = json['prepareProvider'];
+    final workDoneProgress = json['workDoneProgress'];
+    return RenameRegistrationOptions(
+        documentSelector: documentSelector,
+        prepareProvider: prepareProvider,
+        workDoneProgress: workDoneProgress);
   }
 
   /// A document selector to identify the scope of the registration. If set to
   /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
 
-  /// Renames should be checked and tested for validity before being executed.
+  /// Renames should be checked and tested before being executed.
   final bool prepareProvider;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
     if (prepareProvider != null) {
       __result['prepareProvider'] = prepareProvider;
     }
-    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
-      reporter.push('prepareProvider');
-      try {
-        if (obj['prepareProvider'] != null &&
-            !(obj['prepareProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
       reporter.push('documentSelector');
       try {
         if (!obj.containsKey('documentSelector')) {
@@ -9851,6 +17114,26 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('prepareProvider');
+      try {
+        if (obj['prepareProvider'] != null &&
+            !(obj['prepareProvider'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type RenameRegistrationOptions');
@@ -9862,9 +17145,10 @@
   bool operator ==(Object other) {
     if (other is RenameRegistrationOptions &&
         other.runtimeType == RenameRegistrationOptions) {
-      return prepareProvider == other.prepareProvider &&
-          listEqual(documentSelector, other.documentSelector,
+      return listEqual(documentSelector, other.documentSelector,
               (DocumentFilter a, DocumentFilter b) => a == b) &&
+          prepareProvider == other.prepareProvider &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -9873,8 +17157,9 @@
   @override
   int get hashCode {
     var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, prepareProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, prepareProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -9886,7 +17171,11 @@
   static const jsonHandler =
       LspJsonHandler(RequestMessage.canParse, RequestMessage.fromJson);
 
-  RequestMessage(this.id, this.method, this.params, this.jsonrpc) {
+  RequestMessage(
+      {@required this.id,
+      @required this.method,
+      this.params,
+      @required this.jsonrpc}) {
     if (id == null) {
       throw 'id is required but was not provided';
     }
@@ -9907,7 +17196,8 @@
         json['method'] != null ? Method.fromJson(json['method']) : null;
     final params = json['params'];
     final jsonrpc = json['jsonrpc'];
-    return RequestMessage(id, method, params, jsonrpc);
+    return RequestMessage(
+        id: id, method: method, params: params, jsonrpc: jsonrpc);
   }
 
   /// The request id.
@@ -10064,11 +17354,11 @@
       o is ResourceOperationKind && o._value == _value;
 }
 
-class ResponseError<D> implements ToJsonable {
+class ResponseError implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(ResponseError.canParse, ResponseError.fromJson);
 
-  ResponseError(this.code, this.message, this.data) {
+  ResponseError({@required this.code, @required this.message, this.data}) {
     if (code == null) {
       throw 'code is required but was not provided';
     }
@@ -10076,12 +17366,12 @@
       throw 'message is required but was not provided';
     }
   }
-  static ResponseError<D> fromJson<D>(Map<String, dynamic> json) {
+  static ResponseError fromJson(Map<String, dynamic> json) {
     final code =
         json['code'] != null ? ErrorCodes.fromJson(json['code']) : null;
     final message = json['message'];
     final data = json['data'];
-    return ResponseError<D>(code, message, data);
+    return ResponseError(code: code, message: message, data: data);
   }
 
   /// A number indicating the error type that occurred.
@@ -10152,7 +17442,7 @@
       }
       return true;
     } else {
-      reporter.reportError('must be of type ResponseError<D>');
+      reporter.reportError('must be of type ResponseError');
       return false;
     }
   }
@@ -10185,7 +17475,7 @@
   static const jsonHandler =
       LspJsonHandler(ResponseMessage.canParse, ResponseMessage.fromJson);
 
-  ResponseMessage(this.id, this.result, this.error, this.jsonrpc) {
+  ResponseMessage({this.id, this.result, this.error, @required this.jsonrpc}) {
     if (jsonrpc == null) {
       throw 'jsonrpc is required but was not provided';
     }
@@ -10199,15 +17489,15 @@
                 ? null
                 : (throw '''${json['id']} was not one of (num, String)''')));
     final result = json['result'];
-    final error = json['error'] != null
-        ? ResponseError.fromJson<dynamic>(json['error'])
-        : null;
+    final error =
+        json['error'] != null ? ResponseError.fromJson(json['error']) : null;
     final jsonrpc = json['jsonrpc'];
-    return ResponseMessage(id, result, error, jsonrpc);
+    return ResponseMessage(
+        id: id, result: result, error: error, jsonrpc: jsonrpc);
   }
 
   /// The error object in case a request fails.
-  final ResponseError<dynamic> error;
+  final ResponseError error;
 
   /// The request id.
   final Either2<num, String> id;
@@ -10260,7 +17550,7 @@
       try {
         if (obj['error'] != null &&
             !(ResponseError.canParse(obj['error'], reporter))) {
-          reporter.reportError('must be of type ResponseError<dynamic>');
+          reporter.reportError('must be of type ResponseError');
           return false;
         }
       } finally {
@@ -10316,15 +17606,14 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Save options.
 class SaveOptions implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(SaveOptions.canParse, SaveOptions.fromJson);
 
-  SaveOptions(this.includeText);
+  SaveOptions({this.includeText});
   static SaveOptions fromJson(Map<String, dynamic> json) {
     final includeText = json['includeText'];
-    return SaveOptions(includeText);
+    return SaveOptions(includeText: includeText);
   }
 
   /// The client is supposed to include the content on save.
@@ -10375,35 +17664,536 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class SelectionRange implements ToJsonable {
+  static const jsonHandler =
+      LspJsonHandler(SelectionRange.canParse, SelectionRange.fromJson);
+
+  SelectionRange({@required this.range, this.parent}) {
+    if (range == null) {
+      throw 'range is required but was not provided';
+    }
+  }
+  static SelectionRange fromJson(Map<String, dynamic> json) {
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
+    final parent =
+        json['parent'] != null ? SelectionRange.fromJson(json['parent']) : null;
+    return SelectionRange(range: range, parent: parent);
+  }
+
+  /// The parent selection range containing this range. Therefore `parent.range`
+  /// must contain `this.range`.
+  final SelectionRange parent;
+
+  /// The range ([Range]) of this selection range.
+  final Range range;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['range'] = range ?? (throw 'range is required but was not set');
+    if (parent != null) {
+      __result['parent'] = parent;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('range');
+      try {
+        if (!obj.containsKey('range')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['range'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Range.canParse(obj['range'], reporter))) {
+          reporter.reportError('must be of type Range');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('parent');
+      try {
+        if (obj['parent'] != null &&
+            !(SelectionRange.canParse(obj['parent'], reporter))) {
+          reporter.reportError('must be of type SelectionRange');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type SelectionRange');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SelectionRange && other.runtimeType == SelectionRange) {
+      return range == other.range && parent == other.parent && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parent.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class SelectionRangeClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      SelectionRangeClientCapabilities.canParse,
+      SelectionRangeClientCapabilities.fromJson);
+
+  SelectionRangeClientCapabilities({this.dynamicRegistration});
+  static SelectionRangeClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return SelectionRangeClientCapabilities(
+        dynamicRegistration: dynamicRegistration);
+  }
+
+  /// Whether implementation supports dynamic registration for selection range
+  /// providers. If this is set to `true` the client supports the new
+  /// `SelectionRangeRegistrationOptions` return value for the corresponding
+  /// server capability as well.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type SelectionRangeClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SelectionRangeClientCapabilities &&
+        other.runtimeType == SelectionRangeClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class SelectionRangeOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      SelectionRangeOptions.canParse, SelectionRangeOptions.fromJson);
+
+  SelectionRangeOptions({this.workDoneProgress});
+  static SelectionRangeOptions fromJson(Map<String, dynamic> json) {
+    if (SelectionRangeRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return SelectionRangeRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return SelectionRangeOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type SelectionRangeOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SelectionRangeOptions &&
+        other.runtimeType == SelectionRangeOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class SelectionRangeParams
+    implements WorkDoneProgressParams, PartialResultParams, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      SelectionRangeParams.canParse, SelectionRangeParams.fromJson);
+
+  SelectionRangeParams(
+      {@required this.textDocument,
+      @required this.positions,
+      this.workDoneToken,
+      this.partialResultToken}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (positions == null) {
+      throw 'positions is required but was not provided';
+    }
+  }
+  static SelectionRangeParams fromJson(Map<String, dynamic> json) {
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final positions = json['positions']
+        ?.map((item) => item != null ? Position.fromJson(item) : null)
+        ?.cast<Position>()
+        ?.toList();
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return SelectionRangeParams(
+        textDocument: textDocument,
+        positions: positions,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
+  }
+
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
+  /// The positions inside the text document.
+  final List<Position> positions;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    __result['positions'] =
+        positions ?? (throw 'positions is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('positions');
+      try {
+        if (!obj.containsKey('positions')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['positions'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!((obj['positions'] is List &&
+            (obj['positions']
+                .every((item) => Position.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<Position>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type SelectionRangeParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SelectionRangeParams &&
+        other.runtimeType == SelectionRangeParams) {
+      return textDocument == other.textDocument &&
+          listEqual(
+              positions, other.positions, (Position a, Position b) => a == b) &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(positions));
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class SelectionRangeRegistrationOptions
+    implements
+        SelectionRangeOptions,
+        TextDocumentRegistrationOptions,
+        StaticRegistrationOptions,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      SelectionRangeRegistrationOptions.canParse,
+      SelectionRangeRegistrationOptions.fromJson);
+
+  SelectionRangeRegistrationOptions(
+      {this.workDoneProgress, this.documentSelector, this.id});
+  static SelectionRangeRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final workDoneProgress = json['workDoneProgress'];
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final id = json['id'];
+    return SelectionRangeRegistrationOptions(
+        workDoneProgress: workDoneProgress,
+        documentSelector: documentSelector,
+        id: id);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+
+  /// The id used to register the request. The id can be used to deregister the
+  /// request again. See also Registration#id.
+  final String id;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    __result['documentSelector'] = documentSelector;
+    if (id != null) {
+      __result['id'] = id;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('id');
+      try {
+        if (obj['id'] != null && !(obj['id'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type SelectionRangeRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SelectionRangeRegistrationOptions &&
+        other.runtimeType == SelectionRangeRegistrationOptions) {
+      return workDoneProgress == other.workDoneProgress &&
+          listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          id == other.id &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class ServerCapabilities implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(ServerCapabilities.canParse, ServerCapabilities.fromJson);
 
   ServerCapabilities(
-      this.textDocumentSync,
-      this.hoverProvider,
+      {this.textDocumentSync,
       this.completionProvider,
+      this.hoverProvider,
       this.signatureHelpProvider,
+      this.declarationProvider,
       this.definitionProvider,
       this.typeDefinitionProvider,
       this.implementationProvider,
       this.referencesProvider,
       this.documentHighlightProvider,
       this.documentSymbolProvider,
-      this.workspaceSymbolProvider,
       this.codeActionProvider,
       this.codeLensProvider,
+      this.documentLinkProvider,
+      this.colorProvider,
       this.documentFormattingProvider,
       this.documentRangeFormattingProvider,
       this.documentOnTypeFormattingProvider,
       this.renameProvider,
-      this.documentLinkProvider,
-      this.colorProvider,
       this.foldingRangeProvider,
-      this.declarationProvider,
       this.executeCommandProvider,
+      this.selectionRangeProvider,
+      this.workspaceSymbolProvider,
       this.workspace,
-      this.experimental);
+      this.experimental});
   static ServerCapabilities fromJson(Map<String, dynamic> json) {
     final textDocumentSync = TextDocumentSyncOptions.canParse(
             json['textDocumentSync'], nullLspJsonReporter)
@@ -10416,20 +18206,124 @@
             : (json['textDocumentSync'] == null
                 ? null
                 : (throw '''${json['textDocumentSync']} was not one of (TextDocumentSyncOptions, num)''')));
-    final hoverProvider = json['hoverProvider'];
     final completionProvider = json['completionProvider'] != null
         ? CompletionOptions.fromJson(json['completionProvider'])
         : null;
+    final hoverProvider = json['hoverProvider'] is bool
+        ? Either2<bool, HoverOptions>.t1(json['hoverProvider'])
+        : (HoverOptions.canParse(json['hoverProvider'], nullLspJsonReporter)
+            ? Either2<bool, HoverOptions>.t2(json['hoverProvider'] != null
+                ? HoverOptions.fromJson(json['hoverProvider'])
+                : null)
+            : (json['hoverProvider'] == null
+                ? null
+                : (throw '''${json['hoverProvider']} was not one of (bool, HoverOptions)''')));
     final signatureHelpProvider = json['signatureHelpProvider'] != null
         ? SignatureHelpOptions.fromJson(json['signatureHelpProvider'])
         : null;
-    final definitionProvider = json['definitionProvider'];
-    final typeDefinitionProvider = json['typeDefinitionProvider'];
-    final implementationProvider = json['implementationProvider'];
-    final referencesProvider = json['referencesProvider'];
-    final documentHighlightProvider = json['documentHighlightProvider'];
-    final documentSymbolProvider = json['documentSymbolProvider'];
-    final workspaceSymbolProvider = json['workspaceSymbolProvider'];
+    final declarationProvider = json['declarationProvider'] is bool
+        ? Either3<bool, DeclarationOptions, DeclarationRegistrationOptions>.t1(
+            json['declarationProvider'])
+        : (DeclarationOptions.canParse(
+                json['declarationProvider'], nullLspJsonReporter)
+            ? Either3<bool, DeclarationOptions, DeclarationRegistrationOptions>.t2(
+                json['declarationProvider'] != null
+                    ? DeclarationOptions.fromJson(json['declarationProvider'])
+                    : null)
+            : (DeclarationRegistrationOptions.canParse(
+                    json['declarationProvider'], nullLspJsonReporter)
+                ? Either3<bool, DeclarationOptions, DeclarationRegistrationOptions>.t3(
+                    json['declarationProvider'] != null
+                        ? DeclarationRegistrationOptions.fromJson(
+                            json['declarationProvider'])
+                        : null)
+                : (json['declarationProvider'] == null
+                    ? null
+                    : (throw '''${json['declarationProvider']} was not one of (bool, DeclarationOptions, DeclarationRegistrationOptions)'''))));
+    final definitionProvider = json['definitionProvider'] is bool
+        ? Either2<bool, DefinitionOptions>.t1(json['definitionProvider'])
+        : (DefinitionOptions.canParse(
+                json['definitionProvider'], nullLspJsonReporter)
+            ? Either2<bool, DefinitionOptions>.t2(
+                json['definitionProvider'] != null
+                    ? DefinitionOptions.fromJson(json['definitionProvider'])
+                    : null)
+            : (json['definitionProvider'] == null
+                ? null
+                : (throw '''${json['definitionProvider']} was not one of (bool, DefinitionOptions)''')));
+    final typeDefinitionProvider = json['typeDefinitionProvider'] is bool
+        ? Either3<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>.t1(
+            json['typeDefinitionProvider'])
+        : (TypeDefinitionOptions.canParse(
+                json['typeDefinitionProvider'], nullLspJsonReporter)
+            ? Either3<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>.t2(json['typeDefinitionProvider'] != null
+                ? TypeDefinitionOptions.fromJson(json['typeDefinitionProvider'])
+                : null)
+            : (TypeDefinitionRegistrationOptions.canParse(
+                    json['typeDefinitionProvider'], nullLspJsonReporter)
+                ? Either3<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>.t3(
+                    json['typeDefinitionProvider'] != null
+                        ? TypeDefinitionRegistrationOptions.fromJson(
+                            json['typeDefinitionProvider'])
+                        : null)
+                : (json['typeDefinitionProvider'] == null
+                    ? null
+                    : (throw '''${json['typeDefinitionProvider']} was not one of (bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions)'''))));
+    final implementationProvider = json['implementationProvider'] is bool
+        ? Either3<bool, ImplementationOptions, ImplementationRegistrationOptions>.t1(
+            json['implementationProvider'])
+        : (ImplementationOptions.canParse(
+                json['implementationProvider'], nullLspJsonReporter)
+            ? Either3<bool, ImplementationOptions, ImplementationRegistrationOptions>.t2(json['implementationProvider'] != null
+                ? ImplementationOptions.fromJson(json['implementationProvider'])
+                : null)
+            : (ImplementationRegistrationOptions.canParse(
+                    json['implementationProvider'], nullLspJsonReporter)
+                ? Either3<bool, ImplementationOptions, ImplementationRegistrationOptions>.t3(
+                    json['implementationProvider'] != null
+                        ? ImplementationRegistrationOptions.fromJson(
+                            json['implementationProvider'])
+                        : null)
+                : (json['implementationProvider'] == null
+                    ? null
+                    : (throw '''${json['implementationProvider']} was not one of (bool, ImplementationOptions, ImplementationRegistrationOptions)'''))));
+    final referencesProvider = json['referencesProvider'] is bool
+        ? Either2<bool, ReferenceOptions>.t1(json['referencesProvider'])
+        : (ReferenceOptions.canParse(
+                json['referencesProvider'], nullLspJsonReporter)
+            ? Either2<bool, ReferenceOptions>.t2(
+                json['referencesProvider'] != null
+                    ? ReferenceOptions.fromJson(json['referencesProvider'])
+                    : null)
+            : (json['referencesProvider'] == null
+                ? null
+                : (throw '''${json['referencesProvider']} was not one of (bool, ReferenceOptions)''')));
+    final documentHighlightProvider = json['documentHighlightProvider'] is bool
+        ? Either2<bool, DocumentHighlightOptions>.t1(
+            json['documentHighlightProvider'])
+        : (DocumentHighlightOptions.canParse(
+                json['documentHighlightProvider'], nullLspJsonReporter)
+            ? Either2<bool, DocumentHighlightOptions>.t2(
+                json['documentHighlightProvider'] != null
+                    ? DocumentHighlightOptions.fromJson(
+                        json['documentHighlightProvider'])
+                    : null)
+            : (json['documentHighlightProvider'] == null
+                ? null
+                : (throw '''${json['documentHighlightProvider']} was not one of (bool, DocumentHighlightOptions)''')));
+    final documentSymbolProvider = json['documentSymbolProvider'] is bool
+        ? Either2<bool, DocumentSymbolOptions>.t1(
+            json['documentSymbolProvider'])
+        : (DocumentSymbolOptions.canParse(
+                json['documentSymbolProvider'], nullLspJsonReporter)
+            ? Either2<bool, DocumentSymbolOptions>.t2(
+                json['documentSymbolProvider'] != null
+                    ? DocumentSymbolOptions.fromJson(
+                        json['documentSymbolProvider'])
+                    : null)
+            : (json['documentSymbolProvider'] == null
+                ? null
+                : (throw '''${json['documentSymbolProvider']} was not one of (bool, DocumentSymbolOptions)''')));
     final codeActionProvider = json['codeActionProvider'] is bool
         ? Either2<bool, CodeActionOptions>.t1(json['codeActionProvider'])
         : (CodeActionOptions.canParse(
@@ -10444,9 +18338,56 @@
     final codeLensProvider = json['codeLensProvider'] != null
         ? CodeLensOptions.fromJson(json['codeLensProvider'])
         : null;
-    final documentFormattingProvider = json['documentFormattingProvider'];
-    final documentRangeFormattingProvider =
-        json['documentRangeFormattingProvider'];
+    final documentLinkProvider = json['documentLinkProvider'] != null
+        ? DocumentLinkOptions.fromJson(json['documentLinkProvider'])
+        : null;
+    final colorProvider = json['colorProvider'] is bool
+        ? Either3<bool, DocumentColorOptions, DocumentColorRegistrationOptions>.t1(
+            json['colorProvider'])
+        : (DocumentColorOptions.canParse(
+                json['colorProvider'], nullLspJsonReporter)
+            ? Either3<bool, DocumentColorOptions, DocumentColorRegistrationOptions>.t2(
+                json['colorProvider'] != null
+                    ? DocumentColorOptions.fromJson(json['colorProvider'])
+                    : null)
+            : (DocumentColorRegistrationOptions.canParse(
+                    json['colorProvider'], nullLspJsonReporter)
+                ? Either3<bool, DocumentColorOptions, DocumentColorRegistrationOptions>.t3(
+                    json['colorProvider'] != null
+                        ? DocumentColorRegistrationOptions.fromJson(
+                            json['colorProvider'])
+                        : null)
+                : (json['colorProvider'] == null
+                    ? null
+                    : (throw '''${json['colorProvider']} was not one of (bool, DocumentColorOptions, DocumentColorRegistrationOptions)'''))));
+    final documentFormattingProvider = json['documentFormattingProvider']
+            is bool
+        ? Either2<bool, DocumentFormattingOptions>.t1(
+            json['documentFormattingProvider'])
+        : (DocumentFormattingOptions.canParse(
+                json['documentFormattingProvider'], nullLspJsonReporter)
+            ? Either2<bool, DocumentFormattingOptions>.t2(
+                json['documentFormattingProvider'] != null
+                    ? DocumentFormattingOptions.fromJson(
+                        json['documentFormattingProvider'])
+                    : null)
+            : (json['documentFormattingProvider'] == null
+                ? null
+                : (throw '''${json['documentFormattingProvider']} was not one of (bool, DocumentFormattingOptions)''')));
+    final documentRangeFormattingProvider = json[
+            'documentRangeFormattingProvider'] is bool
+        ? Either2<bool, DocumentRangeFormattingOptions>.t1(
+            json['documentRangeFormattingProvider'])
+        : (DocumentRangeFormattingOptions.canParse(
+                json['documentRangeFormattingProvider'], nullLspJsonReporter)
+            ? Either2<bool, DocumentRangeFormattingOptions>.t2(
+                json['documentRangeFormattingProvider'] != null
+                    ? DocumentRangeFormattingOptions.fromJson(
+                        json['documentRangeFormattingProvider'])
+                    : null)
+            : (json['documentRangeFormattingProvider'] == null
+                ? null
+                : (throw '''${json['documentRangeFormattingProvider']} was not one of (bool, DocumentRangeFormattingOptions)''')));
     final documentOnTypeFormattingProvider =
         json['documentOnTypeFormattingProvider'] != null
             ? DocumentOnTypeFormattingOptions.fromJson(
@@ -10461,44 +18402,77 @@
             : (json['renameProvider'] == null
                 ? null
                 : (throw '''${json['renameProvider']} was not one of (bool, RenameOptions)''')));
-    final documentLinkProvider = json['documentLinkProvider'] != null
-        ? DocumentLinkOptions.fromJson(json['documentLinkProvider'])
-        : null;
-    final colorProvider = json['colorProvider'];
-    final foldingRangeProvider = json['foldingRangeProvider'];
-    final declarationProvider = json['declarationProvider'];
+    final foldingRangeProvider = json['foldingRangeProvider'] is bool
+        ? Either3<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>.t1(
+            json['foldingRangeProvider'])
+        : (FoldingRangeOptions.canParse(
+                json['foldingRangeProvider'], nullLspJsonReporter)
+            ? Either3<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>.t2(
+                json['foldingRangeProvider'] != null
+                    ? FoldingRangeOptions.fromJson(json['foldingRangeProvider'])
+                    : null)
+            : (FoldingRangeRegistrationOptions.canParse(
+                    json['foldingRangeProvider'], nullLspJsonReporter)
+                ? Either3<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>.t3(
+                    json['foldingRangeProvider'] != null
+                        ? FoldingRangeRegistrationOptions.fromJson(
+                            json['foldingRangeProvider'])
+                        : null)
+                : (json['foldingRangeProvider'] == null
+                    ? null
+                    : (throw '''${json['foldingRangeProvider']} was not one of (bool, FoldingRangeOptions, FoldingRangeRegistrationOptions)'''))));
     final executeCommandProvider = json['executeCommandProvider'] != null
         ? ExecuteCommandOptions.fromJson(json['executeCommandProvider'])
         : null;
+    final selectionRangeProvider = json['selectionRangeProvider'] is bool
+        ? Either3<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>.t1(
+            json['selectionRangeProvider'])
+        : (SelectionRangeOptions.canParse(
+                json['selectionRangeProvider'], nullLspJsonReporter)
+            ? Either3<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>.t2(json['selectionRangeProvider'] != null
+                ? SelectionRangeOptions.fromJson(json['selectionRangeProvider'])
+                : null)
+            : (SelectionRangeRegistrationOptions.canParse(
+                    json['selectionRangeProvider'], nullLspJsonReporter)
+                ? Either3<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>.t3(
+                    json['selectionRangeProvider'] != null
+                        ? SelectionRangeRegistrationOptions.fromJson(
+                            json['selectionRangeProvider'])
+                        : null)
+                : (json['selectionRangeProvider'] == null
+                    ? null
+                    : (throw '''${json['selectionRangeProvider']} was not one of (bool, SelectionRangeOptions, SelectionRangeRegistrationOptions)'''))));
+    final workspaceSymbolProvider = json['workspaceSymbolProvider'];
     final workspace = json['workspace'] != null
         ? ServerCapabilitiesWorkspace.fromJson(json['workspace'])
         : null;
     final experimental = json['experimental'];
     return ServerCapabilities(
-        textDocumentSync,
-        hoverProvider,
-        completionProvider,
-        signatureHelpProvider,
-        definitionProvider,
-        typeDefinitionProvider,
-        implementationProvider,
-        referencesProvider,
-        documentHighlightProvider,
-        documentSymbolProvider,
-        workspaceSymbolProvider,
-        codeActionProvider,
-        codeLensProvider,
-        documentFormattingProvider,
-        documentRangeFormattingProvider,
-        documentOnTypeFormattingProvider,
-        renameProvider,
-        documentLinkProvider,
-        colorProvider,
-        foldingRangeProvider,
-        declarationProvider,
-        executeCommandProvider,
-        workspace,
-        experimental);
+        textDocumentSync: textDocumentSync,
+        completionProvider: completionProvider,
+        hoverProvider: hoverProvider,
+        signatureHelpProvider: signatureHelpProvider,
+        declarationProvider: declarationProvider,
+        definitionProvider: definitionProvider,
+        typeDefinitionProvider: typeDefinitionProvider,
+        implementationProvider: implementationProvider,
+        referencesProvider: referencesProvider,
+        documentHighlightProvider: documentHighlightProvider,
+        documentSymbolProvider: documentSymbolProvider,
+        codeActionProvider: codeActionProvider,
+        codeLensProvider: codeLensProvider,
+        documentLinkProvider: documentLinkProvider,
+        colorProvider: colorProvider,
+        documentFormattingProvider: documentFormattingProvider,
+        documentRangeFormattingProvider: documentRangeFormattingProvider,
+        documentOnTypeFormattingProvider: documentOnTypeFormattingProvider,
+        renameProvider: renameProvider,
+        foldingRangeProvider: foldingRangeProvider,
+        executeCommandProvider: executeCommandProvider,
+        selectionRangeProvider: selectionRangeProvider,
+        workspaceSymbolProvider: workspaceSymbolProvider,
+        workspace: workspace,
+        experimental: experimental);
   }
 
   /// The server provides code actions. The `CodeActionOptions` return type is
@@ -10510,26 +18484,26 @@
   final CodeLensOptions codeLensProvider;
 
   /// The server provides color provider support.
-  ///
-  /// Since 3.6.0
-  final dynamic colorProvider;
+  ///  @since 3.6.0
+  final Either3<bool, DocumentColorOptions, DocumentColorRegistrationOptions>
+      colorProvider;
 
   /// The server provides completion support.
   final CompletionOptions completionProvider;
 
   /// The server provides go to declaration support.
-  ///
-  /// Since 3.14.0
-  final dynamic declarationProvider;
+  ///  @since 3.14.0
+  final Either3<bool, DeclarationOptions, DeclarationRegistrationOptions>
+      declarationProvider;
 
   /// The server provides goto definition support.
-  final bool definitionProvider;
+  final Either2<bool, DefinitionOptions> definitionProvider;
 
   /// The server provides document formatting.
-  final bool documentFormattingProvider;
+  final Either2<bool, DocumentFormattingOptions> documentFormattingProvider;
 
   /// The server provides document highlight support.
-  final bool documentHighlightProvider;
+  final Either2<bool, DocumentHighlightOptions> documentHighlightProvider;
 
   /// The server provides document link support.
   final DocumentLinkOptions documentLinkProvider;
@@ -10538,10 +18512,11 @@
   final DocumentOnTypeFormattingOptions documentOnTypeFormattingProvider;
 
   /// The server provides document range formatting.
-  final bool documentRangeFormattingProvider;
+  final Either2<bool, DocumentRangeFormattingOptions>
+      documentRangeFormattingProvider;
 
   /// The server provides document symbol support.
-  final bool documentSymbolProvider;
+  final Either2<bool, DocumentSymbolOptions> documentSymbolProvider;
 
   /// The server provides execute command support.
   final ExecuteCommandOptions executeCommandProvider;
@@ -10550,26 +18525,31 @@
   final dynamic experimental;
 
   /// The server provides folding provider support.
-  ///
-  /// Since 3.10.0
-  final dynamic foldingRangeProvider;
+  ///  @since 3.10.0
+  final Either3<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>
+      foldingRangeProvider;
 
   /// The server provides hover support.
-  final bool hoverProvider;
+  final Either2<bool, HoverOptions> hoverProvider;
 
-  /// The server provides Goto Implementation support.
-  ///
-  /// Since 3.6.0
-  final dynamic implementationProvider;
+  /// The server provides goto implementation support.
+  ///  @since 3.6.0
+  final Either3<bool, ImplementationOptions, ImplementationRegistrationOptions>
+      implementationProvider;
 
   /// The server provides find references support.
-  final bool referencesProvider;
+  final Either2<bool, ReferenceOptions> referencesProvider;
 
   /// The server provides rename support. RenameOptions may only be specified if
   /// the client states that it supports `prepareSupport` in its initial
   /// `initialize` request.
   final Either2<bool, RenameOptions> renameProvider;
 
+  /// The server provides selection range support.
+  ///  @since 3.15.0
+  final Either3<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>
+      selectionRangeProvider;
+
   /// The server provides signature help support.
   final SignatureHelpOptions signatureHelpProvider;
 
@@ -10579,10 +18559,10 @@
   /// `TextDocumentSyncKind.None`.
   final Either2<TextDocumentSyncOptions, num> textDocumentSync;
 
-  /// The server provides Goto Type Definition support.
-  ///
-  /// Since 3.6.0
-  final dynamic typeDefinitionProvider;
+  /// The server provides goto type definition support.
+  ///  @since 3.6.0
+  final Either3<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>
+      typeDefinitionProvider;
 
   /// Workspace specific server capabilities
   final ServerCapabilitiesWorkspace workspace;
@@ -10595,15 +18575,18 @@
     if (textDocumentSync != null) {
       __result['textDocumentSync'] = textDocumentSync;
     }
-    if (hoverProvider != null) {
-      __result['hoverProvider'] = hoverProvider;
-    }
     if (completionProvider != null) {
       __result['completionProvider'] = completionProvider;
     }
+    if (hoverProvider != null) {
+      __result['hoverProvider'] = hoverProvider;
+    }
     if (signatureHelpProvider != null) {
       __result['signatureHelpProvider'] = signatureHelpProvider;
     }
+    if (declarationProvider != null) {
+      __result['declarationProvider'] = declarationProvider;
+    }
     if (definitionProvider != null) {
       __result['definitionProvider'] = definitionProvider;
     }
@@ -10622,15 +18605,18 @@
     if (documentSymbolProvider != null) {
       __result['documentSymbolProvider'] = documentSymbolProvider;
     }
-    if (workspaceSymbolProvider != null) {
-      __result['workspaceSymbolProvider'] = workspaceSymbolProvider;
-    }
     if (codeActionProvider != null) {
       __result['codeActionProvider'] = codeActionProvider;
     }
     if (codeLensProvider != null) {
       __result['codeLensProvider'] = codeLensProvider;
     }
+    if (documentLinkProvider != null) {
+      __result['documentLinkProvider'] = documentLinkProvider;
+    }
+    if (colorProvider != null) {
+      __result['colorProvider'] = colorProvider;
+    }
     if (documentFormattingProvider != null) {
       __result['documentFormattingProvider'] = documentFormattingProvider;
     }
@@ -10645,21 +18631,18 @@
     if (renameProvider != null) {
       __result['renameProvider'] = renameProvider;
     }
-    if (documentLinkProvider != null) {
-      __result['documentLinkProvider'] = documentLinkProvider;
-    }
-    if (colorProvider != null) {
-      __result['colorProvider'] = colorProvider;
-    }
     if (foldingRangeProvider != null) {
       __result['foldingRangeProvider'] = foldingRangeProvider;
     }
-    if (declarationProvider != null) {
-      __result['declarationProvider'] = declarationProvider;
-    }
     if (executeCommandProvider != null) {
       __result['executeCommandProvider'] = executeCommandProvider;
     }
+    if (selectionRangeProvider != null) {
+      __result['selectionRangeProvider'] = selectionRangeProvider;
+    }
+    if (workspaceSymbolProvider != null) {
+      __result['workspaceSymbolProvider'] = workspaceSymbolProvider;
+    }
     if (workspace != null) {
       __result['workspace'] = workspace;
     }
@@ -10684,15 +18667,6 @@
       } finally {
         reporter.pop();
       }
-      reporter.push('hoverProvider');
-      try {
-        if (obj['hoverProvider'] != null && !(obj['hoverProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
       reporter.push('completionProvider');
       try {
         if (obj['completionProvider'] != null &&
@@ -10704,6 +18678,17 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('hoverProvider');
+      try {
+        if (obj['hoverProvider'] != null &&
+            !((obj['hoverProvider'] is bool ||
+                HoverOptions.canParse(obj['hoverProvider'], reporter)))) {
+          reporter.reportError('must be of type Either2<bool, HoverOptions>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('signatureHelpProvider');
       try {
         if (obj['signatureHelpProvider'] != null &&
@@ -10715,11 +18700,29 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('declarationProvider');
+      try {
+        if (obj['declarationProvider'] != null &&
+            !((obj['declarationProvider'] is bool ||
+                DeclarationOptions.canParse(
+                    obj['declarationProvider'], reporter) ||
+                DeclarationRegistrationOptions.canParse(
+                    obj['declarationProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either3<bool, DeclarationOptions, DeclarationRegistrationOptions>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('definitionProvider');
       try {
         if (obj['definitionProvider'] != null &&
-            !(obj['definitionProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
+            !((obj['definitionProvider'] is bool ||
+                DefinitionOptions.canParse(
+                    obj['definitionProvider'], reporter)))) {
+          reporter
+              .reportError('must be of type Either2<bool, DefinitionOptions>');
           return false;
         }
       } finally {
@@ -10727,8 +18730,14 @@
       }
       reporter.push('typeDefinitionProvider');
       try {
-        if (obj['typeDefinitionProvider'] != null && !(true)) {
-          reporter.reportError('must be of type dynamic');
+        if (obj['typeDefinitionProvider'] != null &&
+            !((obj['typeDefinitionProvider'] is bool ||
+                TypeDefinitionOptions.canParse(
+                    obj['typeDefinitionProvider'], reporter) ||
+                TypeDefinitionRegistrationOptions.canParse(
+                    obj['typeDefinitionProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either3<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>');
           return false;
         }
       } finally {
@@ -10736,8 +18745,14 @@
       }
       reporter.push('implementationProvider');
       try {
-        if (obj['implementationProvider'] != null && !(true)) {
-          reporter.reportError('must be of type dynamic');
+        if (obj['implementationProvider'] != null &&
+            !((obj['implementationProvider'] is bool ||
+                ImplementationOptions.canParse(
+                    obj['implementationProvider'], reporter) ||
+                ImplementationRegistrationOptions.canParse(
+                    obj['implementationProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either3<bool, ImplementationOptions, ImplementationRegistrationOptions>');
           return false;
         }
       } finally {
@@ -10746,8 +18761,11 @@
       reporter.push('referencesProvider');
       try {
         if (obj['referencesProvider'] != null &&
-            !(obj['referencesProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
+            !((obj['referencesProvider'] is bool ||
+                ReferenceOptions.canParse(
+                    obj['referencesProvider'], reporter)))) {
+          reporter
+              .reportError('must be of type Either2<bool, ReferenceOptions>');
           return false;
         }
       } finally {
@@ -10756,8 +18774,11 @@
       reporter.push('documentHighlightProvider');
       try {
         if (obj['documentHighlightProvider'] != null &&
-            !(obj['documentHighlightProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
+            !((obj['documentHighlightProvider'] is bool ||
+                DocumentHighlightOptions.canParse(
+                    obj['documentHighlightProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either2<bool, DocumentHighlightOptions>');
           return false;
         }
       } finally {
@@ -10766,18 +18787,11 @@
       reporter.push('documentSymbolProvider');
       try {
         if (obj['documentSymbolProvider'] != null &&
-            !(obj['documentSymbolProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('workspaceSymbolProvider');
-      try {
-        if (obj['workspaceSymbolProvider'] != null &&
-            !(obj['workspaceSymbolProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
+            !((obj['documentSymbolProvider'] is bool ||
+                DocumentSymbolOptions.canParse(
+                    obj['documentSymbolProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either2<bool, DocumentSymbolOptions>');
           return false;
         }
       } finally {
@@ -10806,11 +18820,39 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('documentLinkProvider');
+      try {
+        if (obj['documentLinkProvider'] != null &&
+            !(DocumentLinkOptions.canParse(
+                obj['documentLinkProvider'], reporter))) {
+          reporter.reportError('must be of type DocumentLinkOptions');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('colorProvider');
+      try {
+        if (obj['colorProvider'] != null &&
+            !((obj['colorProvider'] is bool ||
+                DocumentColorOptions.canParse(obj['colorProvider'], reporter) ||
+                DocumentColorRegistrationOptions.canParse(
+                    obj['colorProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either3<bool, DocumentColorOptions, DocumentColorRegistrationOptions>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('documentFormattingProvider');
       try {
         if (obj['documentFormattingProvider'] != null &&
-            !(obj['documentFormattingProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
+            !((obj['documentFormattingProvider'] is bool ||
+                DocumentFormattingOptions.canParse(
+                    obj['documentFormattingProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either2<bool, DocumentFormattingOptions>');
           return false;
         }
       } finally {
@@ -10819,8 +18861,11 @@
       reporter.push('documentRangeFormattingProvider');
       try {
         if (obj['documentRangeFormattingProvider'] != null &&
-            !(obj['documentRangeFormattingProvider'] is bool)) {
-          reporter.reportError('must be of type bool');
+            !((obj['documentRangeFormattingProvider'] is bool ||
+                DocumentRangeFormattingOptions.canParse(
+                    obj['documentRangeFormattingProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either2<bool, DocumentRangeFormattingOptions>');
           return false;
         }
       } finally {
@@ -10849,39 +18894,16 @@
       } finally {
         reporter.pop();
       }
-      reporter.push('documentLinkProvider');
-      try {
-        if (obj['documentLinkProvider'] != null &&
-            !(DocumentLinkOptions.canParse(
-                obj['documentLinkProvider'], reporter))) {
-          reporter.reportError('must be of type DocumentLinkOptions');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('colorProvider');
-      try {
-        if (obj['colorProvider'] != null && !(true)) {
-          reporter.reportError('must be of type dynamic');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
       reporter.push('foldingRangeProvider');
       try {
-        if (obj['foldingRangeProvider'] != null && !(true)) {
-          reporter.reportError('must be of type dynamic');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('declarationProvider');
-      try {
-        if (obj['declarationProvider'] != null && !(true)) {
-          reporter.reportError('must be of type dynamic');
+        if (obj['foldingRangeProvider'] != null &&
+            !((obj['foldingRangeProvider'] is bool ||
+                FoldingRangeOptions.canParse(
+                    obj['foldingRangeProvider'], reporter) ||
+                FoldingRangeRegistrationOptions.canParse(
+                    obj['foldingRangeProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either3<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>');
           return false;
         }
       } finally {
@@ -10898,6 +18920,31 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('selectionRangeProvider');
+      try {
+        if (obj['selectionRangeProvider'] != null &&
+            !((obj['selectionRangeProvider'] is bool ||
+                SelectionRangeOptions.canParse(
+                    obj['selectionRangeProvider'], reporter) ||
+                SelectionRangeRegistrationOptions.canParse(
+                    obj['selectionRangeProvider'], reporter)))) {
+          reporter.reportError(
+              'must be of type Either3<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workspaceSymbolProvider');
+      try {
+        if (obj['workspaceSymbolProvider'] != null &&
+            !(obj['workspaceSymbolProvider'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       reporter.push('workspace');
       try {
         if (obj['workspace'] != null &&
@@ -10930,29 +18977,30 @@
     if (other is ServerCapabilities &&
         other.runtimeType == ServerCapabilities) {
       return textDocumentSync == other.textDocumentSync &&
-          hoverProvider == other.hoverProvider &&
           completionProvider == other.completionProvider &&
+          hoverProvider == other.hoverProvider &&
           signatureHelpProvider == other.signatureHelpProvider &&
+          declarationProvider == other.declarationProvider &&
           definitionProvider == other.definitionProvider &&
           typeDefinitionProvider == other.typeDefinitionProvider &&
           implementationProvider == other.implementationProvider &&
           referencesProvider == other.referencesProvider &&
           documentHighlightProvider == other.documentHighlightProvider &&
           documentSymbolProvider == other.documentSymbolProvider &&
-          workspaceSymbolProvider == other.workspaceSymbolProvider &&
           codeActionProvider == other.codeActionProvider &&
           codeLensProvider == other.codeLensProvider &&
+          documentLinkProvider == other.documentLinkProvider &&
+          colorProvider == other.colorProvider &&
           documentFormattingProvider == other.documentFormattingProvider &&
           documentRangeFormattingProvider ==
               other.documentRangeFormattingProvider &&
           documentOnTypeFormattingProvider ==
               other.documentOnTypeFormattingProvider &&
           renameProvider == other.renameProvider &&
-          documentLinkProvider == other.documentLinkProvider &&
-          colorProvider == other.colorProvider &&
           foldingRangeProvider == other.foldingRangeProvider &&
-          declarationProvider == other.declarationProvider &&
           executeCommandProvider == other.executeCommandProvider &&
+          selectionRangeProvider == other.selectionRangeProvider &&
+          workspaceSymbolProvider == other.workspaceSymbolProvider &&
           workspace == other.workspace &&
           experimental == other.experimental &&
           true;
@@ -10964,29 +19012,30 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, textDocumentSync.hashCode);
-    hash = JenkinsSmiHash.combine(hash, hoverProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, completionProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, hoverProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, signatureHelpProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, declarationProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, definitionProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, typeDefinitionProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, implementationProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, referencesProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, documentHighlightProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, documentSymbolProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workspaceSymbolProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, codeActionProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, codeLensProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentLinkProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, colorProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, documentFormattingProvider.hashCode);
     hash =
         JenkinsSmiHash.combine(hash, documentRangeFormattingProvider.hashCode);
     hash =
         JenkinsSmiHash.combine(hash, documentOnTypeFormattingProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, renameProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, documentLinkProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, colorProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, foldingRangeProvider.hashCode);
-    hash = JenkinsSmiHash.combine(hash, declarationProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, executeCommandProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selectionRangeProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workspaceSymbolProvider.hashCode);
     hash = JenkinsSmiHash.combine(hash, workspace.hashCode);
     hash = JenkinsSmiHash.combine(hash, experimental.hashCode);
     return JenkinsSmiHash.finish(hash);
@@ -11001,18 +19050,17 @@
       ServerCapabilitiesWorkspace.canParse,
       ServerCapabilitiesWorkspace.fromJson);
 
-  ServerCapabilitiesWorkspace(this.workspaceFolders);
+  ServerCapabilitiesWorkspace({this.workspaceFolders});
   static ServerCapabilitiesWorkspace fromJson(Map<String, dynamic> json) {
     final workspaceFolders = json['workspaceFolders'] != null
-        ? ServerCapabilitiesWorkspaceFolders.fromJson(json['workspaceFolders'])
+        ? WorkspaceFoldersServerCapabilities.fromJson(json['workspaceFolders'])
         : null;
-    return ServerCapabilitiesWorkspace(workspaceFolders);
+    return ServerCapabilitiesWorkspace(workspaceFolders: workspaceFolders);
   }
 
   /// The server supports workspace folder.
-  ///
-  /// Since 3.6.0
-  final ServerCapabilitiesWorkspaceFolders workspaceFolders;
+  ///  @since 3.6.0
+  final WorkspaceFoldersServerCapabilities workspaceFolders;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
@@ -11027,10 +19075,10 @@
       reporter.push('workspaceFolders');
       try {
         if (obj['workspaceFolders'] != null &&
-            !(ServerCapabilitiesWorkspaceFolders.canParse(
+            !(WorkspaceFoldersServerCapabilities.canParse(
                 obj['workspaceFolders'], reporter))) {
           reporter.reportError(
-              'must be of type ServerCapabilitiesWorkspaceFolders');
+              'must be of type WorkspaceFoldersServerCapabilities');
           return false;
         }
       } finally {
@@ -11063,98 +19111,11 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class ServerCapabilitiesWorkspaceFolders implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      ServerCapabilitiesWorkspaceFolders.canParse,
-      ServerCapabilitiesWorkspaceFolders.fromJson);
-
-  ServerCapabilitiesWorkspaceFolders(this.supported, this.changeNotifications);
-  static ServerCapabilitiesWorkspaceFolders fromJson(
-      Map<String, dynamic> json) {
-    final supported = json['supported'];
-    final changeNotifications = json['changeNotifications'];
-    return ServerCapabilitiesWorkspaceFolders(supported, changeNotifications);
-  }
-
-  /// Whether the server wants to receive workspace folder change notifications.
-  ///
-  /// If a strings is provided the string is treated as a ID under which the
-  /// notification is registered on the client side. The ID can be used to
-  /// unregister for these events using the `client/unregisterCapability`
-  /// request.
-  final bool changeNotifications;
-
-  /// The server has support for workspace folders
-  final bool supported;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (supported != null) {
-      __result['supported'] = supported;
-    }
-    if (changeNotifications != null) {
-      __result['changeNotifications'] = changeNotifications;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('supported');
-      try {
-        if (obj['supported'] != null && !(obj['supported'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('changeNotifications');
-      try {
-        if (obj['changeNotifications'] != null &&
-            !(obj['changeNotifications'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter
-          .reportError('must be of type ServerCapabilitiesWorkspaceFolders');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is ServerCapabilitiesWorkspaceFolders &&
-        other.runtimeType == ServerCapabilitiesWorkspaceFolders) {
-      return supported == other.supported &&
-          changeNotifications == other.changeNotifications &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, supported.hashCode);
-    hash = JenkinsSmiHash.combine(hash, changeNotifications.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
 class ShowMessageParams implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(ShowMessageParams.canParse, ShowMessageParams.fromJson);
 
-  ShowMessageParams(this.type, this.message) {
+  ShowMessageParams({@required this.type, @required this.message}) {
     if (type == null) {
       throw 'type is required but was not provided';
     }
@@ -11166,7 +19127,7 @@
     final type =
         json['type'] != null ? MessageType.fromJson(json['type']) : null;
     final message = json['message'];
-    return ShowMessageParams(type, message);
+    return ShowMessageParams(type: type, message: message);
   }
 
   /// The actual message.
@@ -11250,7 +19211,8 @@
   static const jsonHandler = LspJsonHandler(
       ShowMessageRequestParams.canParse, ShowMessageRequestParams.fromJson);
 
-  ShowMessageRequestParams(this.type, this.message, this.actions) {
+  ShowMessageRequestParams(
+      {@required this.type, @required this.message, this.actions}) {
     if (type == null) {
       throw 'type is required but was not provided';
     }
@@ -11266,7 +19228,8 @@
         ?.map((item) => item != null ? MessageActionItem.fromJson(item) : null)
         ?.cast<MessageActionItem>()
         ?.toList();
-    return ShowMessageRequestParams(type, message, actions);
+    return ShowMessageRequestParams(
+        type: type, message: message, actions: actions);
   }
 
   /// The message action items to present.
@@ -11376,7 +19339,8 @@
   static const jsonHandler =
       LspJsonHandler(SignatureHelp.canParse, SignatureHelp.fromJson);
 
-  SignatureHelp(this.signatures, this.activeSignature, this.activeParameter) {
+  SignatureHelp(
+      {@required this.signatures, this.activeSignature, this.activeParameter}) {
     if (signatures == null) {
       throw 'signatures is required but was not provided';
     }
@@ -11389,7 +19353,10 @@
         ?.toList();
     final activeSignature = json['activeSignature'];
     final activeParameter = json['activeParameter'];
-    return SignatureHelp(signatures, activeSignature, activeParameter);
+    return SignatureHelp(
+        signatures: signatures,
+        activeSignature: activeSignature,
+        activeParameter: activeParameter);
   }
 
   /// The active parameter of the active signature. If omitted or the value lies
@@ -11401,14 +19368,18 @@
   final num activeParameter;
 
   /// The active signature. If omitted or the value lies outside the range of
-  /// `signatures` the value defaults to zero or is ignored if
-  /// `signatures.length === 0`. Whenever possible implementors should make an
-  /// active decision about the active signature and shouldn't rely on a default
-  /// value. In future version of the protocol this property might become
-  /// mandatory to better express this.
+  /// `signatures` the value defaults to zero or is ignore if the
+  /// `SignatureHelp` as no signatures.
+  ///
+  /// Whenever possible implementors should make an active decision about the
+  /// active signature and shouldn't rely on a default value.
+  ///
+  /// In future version of the protocol this property might become mandatory to
+  /// better express this.
   final num activeSignature;
 
-  /// One or more signatures.
+  /// One or more signatures. If no signaures are availabe the signature help
+  /// request should return `null`.
   final List<SignatureInformation> signatures;
 
   Map<String, dynamic> toJson() {
@@ -11497,28 +19468,504 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Signature help options.
-class SignatureHelpOptions implements ToJsonable {
+class SignatureHelpClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      SignatureHelpClientCapabilities.canParse,
+      SignatureHelpClientCapabilities.fromJson);
+
+  SignatureHelpClientCapabilities(
+      {this.dynamicRegistration,
+      this.signatureInformation,
+      this.contextSupport});
+  static SignatureHelpClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final signatureInformation = json['signatureInformation'] != null
+        ? SignatureHelpClientCapabilitiesSignatureInformation.fromJson(
+            json['signatureInformation'])
+        : null;
+    final contextSupport = json['contextSupport'];
+    return SignatureHelpClientCapabilities(
+        dynamicRegistration: dynamicRegistration,
+        signatureInformation: signatureInformation,
+        contextSupport: contextSupport);
+  }
+
+  /// The client supports to send additional context information for a
+  /// `textDocument/signatureHelp` request. A client that opts into
+  /// contextSupport will also support the `retriggerCharacters` on
+  /// `SignatureHelpOptions`.
+  ///  @since 3.15.0
+  final bool contextSupport;
+
+  /// Whether signature help supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// The client supports the following `SignatureInformation` specific
+  /// properties.
+  final SignatureHelpClientCapabilitiesSignatureInformation
+      signatureInformation;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (signatureInformation != null) {
+      __result['signatureInformation'] = signatureInformation;
+    }
+    if (contextSupport != null) {
+      __result['contextSupport'] = contextSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('signatureInformation');
+      try {
+        if (obj['signatureInformation'] != null &&
+            !(SignatureHelpClientCapabilitiesSignatureInformation.canParse(
+                obj['signatureInformation'], reporter))) {
+          reporter.reportError(
+              'must be of type SignatureHelpClientCapabilitiesSignatureInformation');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('contextSupport');
+      try {
+        if (obj['contextSupport'] != null && !(obj['contextSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type SignatureHelpClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SignatureHelpClientCapabilities &&
+        other.runtimeType == SignatureHelpClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          signatureInformation == other.signatureInformation &&
+          contextSupport == other.contextSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, signatureInformation.hashCode);
+    hash = JenkinsSmiHash.combine(hash, contextSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class SignatureHelpClientCapabilitiesParameterInformation
+    implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      SignatureHelpClientCapabilitiesParameterInformation.canParse,
+      SignatureHelpClientCapabilitiesParameterInformation.fromJson);
+
+  SignatureHelpClientCapabilitiesParameterInformation(
+      {this.labelOffsetSupport});
+  static SignatureHelpClientCapabilitiesParameterInformation fromJson(
+      Map<String, dynamic> json) {
+    final labelOffsetSupport = json['labelOffsetSupport'];
+    return SignatureHelpClientCapabilitiesParameterInformation(
+        labelOffsetSupport: labelOffsetSupport);
+  }
+
+  /// The client supports processing label offsets instead of a simple label
+  /// string.
+  ///  @since 3.14.0
+  final bool labelOffsetSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (labelOffsetSupport != null) {
+      __result['labelOffsetSupport'] = labelOffsetSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('labelOffsetSupport');
+      try {
+        if (obj['labelOffsetSupport'] != null &&
+            !(obj['labelOffsetSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type SignatureHelpClientCapabilitiesParameterInformation');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SignatureHelpClientCapabilitiesParameterInformation &&
+        other.runtimeType ==
+            SignatureHelpClientCapabilitiesParameterInformation) {
+      return labelOffsetSupport == other.labelOffsetSupport && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, labelOffsetSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class SignatureHelpClientCapabilitiesSignatureInformation
+    implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      SignatureHelpClientCapabilitiesSignatureInformation.canParse,
+      SignatureHelpClientCapabilitiesSignatureInformation.fromJson);
+
+  SignatureHelpClientCapabilitiesSignatureInformation(
+      {this.documentationFormat, this.parameterInformation});
+  static SignatureHelpClientCapabilitiesSignatureInformation fromJson(
+      Map<String, dynamic> json) {
+    final documentationFormat = json['documentationFormat']
+        ?.map((item) => item != null ? MarkupKind.fromJson(item) : null)
+        ?.cast<MarkupKind>()
+        ?.toList();
+    final parameterInformation = json['parameterInformation'] != null
+        ? SignatureHelpClientCapabilitiesParameterInformation.fromJson(
+            json['parameterInformation'])
+        : null;
+    return SignatureHelpClientCapabilitiesSignatureInformation(
+        documentationFormat: documentationFormat,
+        parameterInformation: parameterInformation);
+  }
+
+  /// Client supports the follow content formats for the documentation property.
+  /// The order describes the preferred format of the client.
+  final List<MarkupKind> documentationFormat;
+
+  /// Client capabilities specific to parameter information.
+  final SignatureHelpClientCapabilitiesParameterInformation
+      parameterInformation;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (documentationFormat != null) {
+      __result['documentationFormat'] = documentationFormat;
+    }
+    if (parameterInformation != null) {
+      __result['parameterInformation'] = parameterInformation;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentationFormat');
+      try {
+        if (obj['documentationFormat'] != null &&
+            !((obj['documentationFormat'] is List &&
+                (obj['documentationFormat']
+                    .every((item) => MarkupKind.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<MarkupKind>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('parameterInformation');
+      try {
+        if (obj['parameterInformation'] != null &&
+            !(SignatureHelpClientCapabilitiesParameterInformation.canParse(
+                obj['parameterInformation'], reporter))) {
+          reporter.reportError(
+              'must be of type SignatureHelpClientCapabilitiesParameterInformation');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type SignatureHelpClientCapabilitiesSignatureInformation');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SignatureHelpClientCapabilitiesSignatureInformation &&
+        other.runtimeType ==
+            SignatureHelpClientCapabilitiesSignatureInformation) {
+      return listEqual(documentationFormat, other.documentationFormat,
+              (MarkupKind a, MarkupKind b) => a == b) &&
+          parameterInformation == other.parameterInformation &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentationFormat));
+    hash = JenkinsSmiHash.combine(hash, parameterInformation.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+/// Additional information about the context in which a signature help request
+/// was triggered.
+///  @since 3.15.0
+class SignatureHelpContext implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      SignatureHelpContext.canParse, SignatureHelpContext.fromJson);
+
+  SignatureHelpContext(
+      {@required this.triggerKind,
+      this.triggerCharacter,
+      @required this.isRetrigger,
+      this.activeSignatureHelp}) {
+    if (triggerKind == null) {
+      throw 'triggerKind is required but was not provided';
+    }
+    if (isRetrigger == null) {
+      throw 'isRetrigger is required but was not provided';
+    }
+  }
+  static SignatureHelpContext fromJson(Map<String, dynamic> json) {
+    final triggerKind = json['triggerKind'] != null
+        ? SignatureHelpTriggerKind.fromJson(json['triggerKind'])
+        : null;
+    final triggerCharacter = json['triggerCharacter'];
+    final isRetrigger = json['isRetrigger'];
+    final activeSignatureHelp = json['activeSignatureHelp'] != null
+        ? SignatureHelp.fromJson(json['activeSignatureHelp'])
+        : null;
+    return SignatureHelpContext(
+        triggerKind: triggerKind,
+        triggerCharacter: triggerCharacter,
+        isRetrigger: isRetrigger,
+        activeSignatureHelp: activeSignatureHelp);
+  }
+
+  /// The currently active `SignatureHelp`.
+  ///
+  /// The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field
+  /// updated based on the user navigating through available signatures.
+  final SignatureHelp activeSignatureHelp;
+
+  /// `true` if signature help was already showing when it was triggered.
+  ///
+  /// Retriggers occur when the signature help is already active and can be
+  /// caused by actions such as typing a trigger character, a cursor move, or
+  /// document content changes.
+  final bool isRetrigger;
+
+  /// Character that caused signature help to be triggered.
+  ///
+  /// This is undefined when `triggerKind !==
+  /// SignatureHelpTriggerKind.TriggerCharacter`
+  final String triggerCharacter;
+
+  /// Action that caused signature help to be triggered.
+  final SignatureHelpTriggerKind triggerKind;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['triggerKind'] =
+        triggerKind ?? (throw 'triggerKind is required but was not set');
+    if (triggerCharacter != null) {
+      __result['triggerCharacter'] = triggerCharacter;
+    }
+    __result['isRetrigger'] =
+        isRetrigger ?? (throw 'isRetrigger is required but was not set');
+    if (activeSignatureHelp != null) {
+      __result['activeSignatureHelp'] = activeSignatureHelp;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('triggerKind');
+      try {
+        if (!obj.containsKey('triggerKind')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['triggerKind'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(SignatureHelpTriggerKind.canParse(
+            obj['triggerKind'], reporter))) {
+          reporter.reportError('must be of type SignatureHelpTriggerKind');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('triggerCharacter');
+      try {
+        if (obj['triggerCharacter'] != null &&
+            !(obj['triggerCharacter'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('isRetrigger');
+      try {
+        if (!obj.containsKey('isRetrigger')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['isRetrigger'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(obj['isRetrigger'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('activeSignatureHelp');
+      try {
+        if (obj['activeSignatureHelp'] != null &&
+            !(SignatureHelp.canParse(obj['activeSignatureHelp'], reporter))) {
+          reporter.reportError('must be of type SignatureHelp');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type SignatureHelpContext');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SignatureHelpContext &&
+        other.runtimeType == SignatureHelpContext) {
+      return triggerKind == other.triggerKind &&
+          triggerCharacter == other.triggerCharacter &&
+          isRetrigger == other.isRetrigger &&
+          activeSignatureHelp == other.activeSignatureHelp &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, triggerKind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, triggerCharacter.hashCode);
+    hash = JenkinsSmiHash.combine(hash, isRetrigger.hashCode);
+    hash = JenkinsSmiHash.combine(hash, activeSignatureHelp.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class SignatureHelpOptions implements WorkDoneProgressOptions, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       SignatureHelpOptions.canParse, SignatureHelpOptions.fromJson);
 
-  SignatureHelpOptions(this.triggerCharacters);
+  SignatureHelpOptions(
+      {this.triggerCharacters,
+      this.retriggerCharacters,
+      this.workDoneProgress});
   static SignatureHelpOptions fromJson(Map<String, dynamic> json) {
+    if (SignatureHelpRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return SignatureHelpRegistrationOptions.fromJson(json);
+    }
     final triggerCharacters = json['triggerCharacters']
         ?.map((item) => item)
         ?.cast<String>()
         ?.toList();
-    return SignatureHelpOptions(triggerCharacters);
+    final retriggerCharacters = json['retriggerCharacters']
+        ?.map((item) => item)
+        ?.cast<String>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    return SignatureHelpOptions(
+        triggerCharacters: triggerCharacters,
+        retriggerCharacters: retriggerCharacters,
+        workDoneProgress: workDoneProgress);
   }
 
+  /// List of characters that re-trigger signature help.
+  ///
+  /// These trigger characters are only active when signature help is already
+  /// showing. All trigger characters are also counted as re-trigger characters.
+  ///  @since 3.15.0
+  final List<String> retriggerCharacters;
+
   /// The characters that trigger signature help automatically.
   final List<String> triggerCharacters;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     if (triggerCharacters != null) {
       __result['triggerCharacters'] = triggerCharacters;
     }
+    if (retriggerCharacters != null) {
+      __result['retriggerCharacters'] = retriggerCharacters;
+    }
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
@@ -11535,6 +19982,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('retriggerCharacters');
+      try {
+        if (obj['retriggerCharacters'] != null &&
+            !((obj['retriggerCharacters'] is List &&
+                (obj['retriggerCharacters']
+                    .every((item) => item is String))))) {
+          reporter.reportError('must be of type List<String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type SignatureHelpOptions');
@@ -11548,6 +20017,9 @@
         other.runtimeType == SignatureHelpOptions) {
       return listEqual(triggerCharacters, other.triggerCharacters,
               (String a, String b) => a == b) &&
+          listEqual(retriggerCharacters, other.retriggerCharacters,
+              (String a, String b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -11557,6 +20029,169 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, lspHashCode(triggerCharacters));
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(retriggerCharacters));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class SignatureHelpParams
+    implements TextDocumentPositionParams, WorkDoneProgressParams, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      SignatureHelpParams.canParse, SignatureHelpParams.fromJson);
+
+  SignatureHelpParams(
+      {this.context,
+      @required this.textDocument,
+      @required this.position,
+      this.workDoneToken}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (position == null) {
+      throw 'position is required but was not provided';
+    }
+  }
+  static SignatureHelpParams fromJson(Map<String, dynamic> json) {
+    final context = json['context'] != null
+        ? SignatureHelpContext.fromJson(json['context'])
+        : null;
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    return SignatureHelpParams(
+        context: context,
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken);
+  }
+
+  /// The signature help context. This is only available if the client specifies
+  /// to send this using the client capability
+  /// `textDocument.signatureHelp.contextSupport === true`
+  ///  @since 3.15.0
+  final SignatureHelpContext context;
+
+  /// The position inside the text document.
+  final Position position;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (context != null) {
+      __result['context'] = context;
+    }
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    __result['position'] =
+        position ?? (throw 'position is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('context');
+      try {
+        if (obj['context'] != null &&
+            !(SignatureHelpContext.canParse(obj['context'], reporter))) {
+          reporter.reportError('must be of type SignatureHelpContext');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('position');
+      try {
+        if (!obj.containsKey('position')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['position'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Position.canParse(obj['position'], reporter))) {
+          reporter.reportError('must be of type Position');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type SignatureHelpParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is SignatureHelpParams &&
+        other.runtimeType == SignatureHelpParams) {
+      return context == other.context &&
+          textDocument == other.textDocument &&
+          position == other.position &&
+          workDoneToken == other.workDoneToken &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, context.hashCode);
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -11565,55 +20200,72 @@
 }
 
 class SignatureHelpRegistrationOptions
-    implements TextDocumentRegistrationOptions, ToJsonable {
+    implements
+        TextDocumentRegistrationOptions,
+        SignatureHelpOptions,
+        ToJsonable {
   static const jsonHandler = LspJsonHandler(
       SignatureHelpRegistrationOptions.canParse,
       SignatureHelpRegistrationOptions.fromJson);
 
   SignatureHelpRegistrationOptions(
-      this.triggerCharacters, this.documentSelector);
+      {this.documentSelector,
+      this.triggerCharacters,
+      this.retriggerCharacters,
+      this.workDoneProgress});
   static SignatureHelpRegistrationOptions fromJson(Map<String, dynamic> json) {
-    final triggerCharacters = json['triggerCharacters']
-        ?.map((item) => item)
-        ?.cast<String>()
-        ?.toList();
     final documentSelector = json['documentSelector']
         ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
+    final triggerCharacters = json['triggerCharacters']
+        ?.map((item) => item)
+        ?.cast<String>()
+        ?.toList();
+    final retriggerCharacters = json['retriggerCharacters']
+        ?.map((item) => item)
+        ?.cast<String>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
     return SignatureHelpRegistrationOptions(
-        triggerCharacters, documentSelector);
+        documentSelector: documentSelector,
+        triggerCharacters: triggerCharacters,
+        retriggerCharacters: retriggerCharacters,
+        workDoneProgress: workDoneProgress);
   }
 
   /// A document selector to identify the scope of the registration. If set to
   /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
 
+  /// List of characters that re-trigger signature help.
+  ///
+  /// These trigger characters are only active when signature help is already
+  /// showing. All trigger characters are also counted as re-trigger characters.
+  ///  @since 3.15.0
+  final List<String> retriggerCharacters;
+
   /// The characters that trigger signature help automatically.
   final List<String> triggerCharacters;
+  final bool workDoneProgress;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
     if (triggerCharacters != null) {
       __result['triggerCharacters'] = triggerCharacters;
     }
-    __result['documentSelector'] = documentSelector;
+    if (retriggerCharacters != null) {
+      __result['retriggerCharacters'] = retriggerCharacters;
+    }
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
-      reporter.push('triggerCharacters');
-      try {
-        if (obj['triggerCharacters'] != null &&
-            !((obj['triggerCharacters'] is List &&
-                (obj['triggerCharacters'].every((item) => item is String))))) {
-          reporter.reportError('must be of type List<String>');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
       reporter.push('documentSelector');
       try {
         if (!obj.containsKey('documentSelector')) {
@@ -11630,6 +20282,39 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('triggerCharacters');
+      try {
+        if (obj['triggerCharacters'] != null &&
+            !((obj['triggerCharacters'] is List &&
+                (obj['triggerCharacters'].every((item) => item is String))))) {
+          reporter.reportError('must be of type List<String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('retriggerCharacters');
+      try {
+        if (obj['retriggerCharacters'] != null &&
+            !((obj['retriggerCharacters'] is List &&
+                (obj['retriggerCharacters']
+                    .every((item) => item is String))))) {
+          reporter.reportError('must be of type List<String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type SignatureHelpRegistrationOptions');
@@ -11641,10 +20326,13 @@
   bool operator ==(Object other) {
     if (other is SignatureHelpRegistrationOptions &&
         other.runtimeType == SignatureHelpRegistrationOptions) {
-      return listEqual(triggerCharacters, other.triggerCharacters,
-              (String a, String b) => a == b) &&
-          listEqual(documentSelector, other.documentSelector,
+      return listEqual(documentSelector, other.documentSelector,
               (DocumentFilter a, DocumentFilter b) => a == b) &&
+          listEqual(triggerCharacters, other.triggerCharacters,
+              (String a, String b) => a == b) &&
+          listEqual(retriggerCharacters, other.retriggerCharacters,
+              (String a, String b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
           true;
     }
     return false;
@@ -11653,8 +20341,10 @@
   @override
   int get hashCode {
     var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(triggerCharacters));
     hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(triggerCharacters));
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(retriggerCharacters));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -11662,13 +20352,48 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+/// How a signature help was triggered.
+///  @since 3.15.0
+class SignatureHelpTriggerKind {
+  const SignatureHelpTriggerKind(this._value);
+  const SignatureHelpTriggerKind.fromJson(this._value);
+
+  final num _value;
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    return obj is num;
+  }
+
+  /// Signature help was invoked manually by the user or by a command.
+  static const Invoked = SignatureHelpTriggerKind(1);
+
+  /// Signature help was triggered by a trigger character.
+  static const TriggerCharacter = SignatureHelpTriggerKind(2);
+
+  /// Signature help was triggered by the cursor moving or by the document
+  /// content changing.
+  static const ContentChange = SignatureHelpTriggerKind(3);
+
+  Object toJson() => _value;
+
+  @override
+  String toString() => _value.toString();
+
+  @override
+  int get hashCode => _value.hashCode;
+
+  bool operator ==(Object o) =>
+      o is SignatureHelpTriggerKind && o._value == _value;
+}
+
 /// Represents the signature of something callable. A signature can have a
 /// label, like a function-name, a doc-comment, and a set of parameters.
 class SignatureInformation implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
       SignatureInformation.canParse, SignatureInformation.fromJson);
 
-  SignatureInformation(this.label, this.documentation, this.parameters) {
+  SignatureInformation(
+      {@required this.label, this.documentation, this.parameters}) {
     if (label == null) {
       throw 'label is required but was not provided';
     }
@@ -11689,7 +20414,8 @@
             (item) => item != null ? ParameterInformation.fromJson(item) : null)
         ?.cast<ParameterInformation>()
         ?.toList();
-    return SignatureInformation(label, documentation, parameters);
+    return SignatureInformation(
+        label: label, documentation: documentation, parameters: parameters);
   }
 
   /// The human-readable doc-comment of this signature. Will be shown in the UI
@@ -11795,10 +20521,28 @@
   static const jsonHandler = LspJsonHandler(
       StaticRegistrationOptions.canParse, StaticRegistrationOptions.fromJson);
 
-  StaticRegistrationOptions(this.id);
+  StaticRegistrationOptions({this.id});
   static StaticRegistrationOptions fromJson(Map<String, dynamic> json) {
+    if (DeclarationRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DeclarationRegistrationOptions.fromJson(json);
+    }
+    if (TypeDefinitionRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return TypeDefinitionRegistrationOptions.fromJson(json);
+    }
+    if (ImplementationRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return ImplementationRegistrationOptions.fromJson(json);
+    }
+    if (DocumentColorRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentColorRegistrationOptions.fromJson(json);
+    }
+    if (FoldingRangeRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return FoldingRangeRegistrationOptions.fromJson(json);
+    }
+    if (SelectionRangeRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return SelectionRangeRegistrationOptions.fromJson(json);
+    }
     final id = json['id'];
-    return StaticRegistrationOptions(id);
+    return StaticRegistrationOptions(id: id);
   }
 
   /// The id used to register the request. The id can be used to deregister the
@@ -11857,8 +20601,12 @@
   static const jsonHandler =
       LspJsonHandler(SymbolInformation.canParse, SymbolInformation.fromJson);
 
-  SymbolInformation(this.name, this.kind, this.deprecated, this.location,
-      this.containerName) {
+  SymbolInformation(
+      {@required this.name,
+      @required this.kind,
+      this.deprecated,
+      @required this.location,
+      this.containerName}) {
     if (name == null) {
       throw 'name is required but was not provided';
     }
@@ -11877,7 +20625,12 @@
     final location =
         json['location'] != null ? Location.fromJson(json['location']) : null;
     final containerName = json['containerName'];
-    return SymbolInformation(name, kind, deprecated, location, containerName);
+    return SymbolInformation(
+        name: name,
+        kind: kind,
+        deprecated: deprecated,
+        location: location,
+        containerName: containerName);
   }
 
   /// The name of the symbol containing this symbol. This information is for
@@ -12084,7 +20837,8 @@
       TextDocumentChangeRegistrationOptions.canParse,
       TextDocumentChangeRegistrationOptions.fromJson);
 
-  TextDocumentChangeRegistrationOptions(this.syncKind, this.documentSelector) {
+  TextDocumentChangeRegistrationOptions(
+      {@required this.syncKind, this.documentSelector}) {
     if (syncKind == null) {
       throw 'syncKind is required but was not provided';
     }
@@ -12098,7 +20852,8 @@
         ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
-    return TextDocumentChangeRegistrationOptions(syncKind, documentSelector);
+    return TextDocumentChangeRegistrationOptions(
+        syncKind: syncKind, documentSelector: documentSelector);
   }
 
   /// A document selector to identify the scope of the registration. If set to
@@ -12191,199 +20946,196 @@
       TextDocumentClientCapabilities.fromJson);
 
   TextDocumentClientCapabilities(
-      this.synchronization,
+      {this.synchronization,
       this.completion,
       this.hover,
       this.signatureHelp,
-      this.references,
-      this.documentHighlight,
-      this.documentSymbol,
-      this.formatting,
-      this.rangeFormatting,
-      this.onTypeFormatting,
       this.declaration,
       this.definition,
       this.typeDefinition,
       this.implementation,
+      this.references,
+      this.documentHighlight,
+      this.documentSymbol,
       this.codeAction,
       this.codeLens,
       this.documentLink,
       this.colorProvider,
+      this.formatting,
+      this.rangeFormatting,
+      this.onTypeFormatting,
       this.rename,
       this.publishDiagnostics,
-      this.foldingRange);
+      this.foldingRange,
+      this.selectionRange});
   static TextDocumentClientCapabilities fromJson(Map<String, dynamic> json) {
     final synchronization = json['synchronization'] != null
-        ? TextDocumentClientCapabilitiesSynchronization.fromJson(
-            json['synchronization'])
+        ? TextDocumentSyncClientCapabilities.fromJson(json['synchronization'])
         : null;
     final completion = json['completion'] != null
-        ? TextDocumentClientCapabilitiesCompletion.fromJson(json['completion'])
+        ? CompletionClientCapabilities.fromJson(json['completion'])
         : null;
     final hover = json['hover'] != null
-        ? TextDocumentClientCapabilitiesHover.fromJson(json['hover'])
+        ? HoverClientCapabilities.fromJson(json['hover'])
         : null;
     final signatureHelp = json['signatureHelp'] != null
-        ? TextDocumentClientCapabilitiesSignatureHelp.fromJson(
-            json['signatureHelp'])
+        ? SignatureHelpClientCapabilities.fromJson(json['signatureHelp'])
+        : null;
+    final declaration = json['declaration'] != null
+        ? DeclarationClientCapabilities.fromJson(json['declaration'])
+        : null;
+    final definition = json['definition'] != null
+        ? DefinitionClientCapabilities.fromJson(json['definition'])
+        : null;
+    final typeDefinition = json['typeDefinition'] != null
+        ? TypeDefinitionClientCapabilities.fromJson(json['typeDefinition'])
+        : null;
+    final implementation = json['implementation'] != null
+        ? ImplementationClientCapabilities.fromJson(json['implementation'])
         : null;
     final references = json['references'] != null
-        ? TextDocumentClientCapabilitiesReferences.fromJson(json['references'])
+        ? ReferenceClientCapabilities.fromJson(json['references'])
         : null;
     final documentHighlight = json['documentHighlight'] != null
-        ? TextDocumentClientCapabilitiesDocumentHighlight.fromJson(
+        ? DocumentHighlightClientCapabilities.fromJson(
             json['documentHighlight'])
         : null;
     final documentSymbol = json['documentSymbol'] != null
-        ? TextDocumentClientCapabilitiesDocumentSymbol.fromJson(
-            json['documentSymbol'])
+        ? DocumentSymbolClientCapabilities.fromJson(json['documentSymbol'])
+        : null;
+    final codeAction = json['codeAction'] != null
+        ? CodeActionClientCapabilities.fromJson(json['codeAction'])
+        : null;
+    final codeLens = json['codeLens'] != null
+        ? CodeLensClientCapabilities.fromJson(json['codeLens'])
+        : null;
+    final documentLink = json['documentLink'] != null
+        ? DocumentLinkClientCapabilities.fromJson(json['documentLink'])
+        : null;
+    final colorProvider = json['colorProvider'] != null
+        ? DocumentColorClientCapabilities.fromJson(json['colorProvider'])
         : null;
     final formatting = json['formatting'] != null
-        ? TextDocumentClientCapabilitiesFormatting.fromJson(json['formatting'])
+        ? DocumentFormattingClientCapabilities.fromJson(json['formatting'])
         : null;
     final rangeFormatting = json['rangeFormatting'] != null
-        ? TextDocumentClientCapabilitiesRangeFormatting.fromJson(
+        ? DocumentRangeFormattingClientCapabilities.fromJson(
             json['rangeFormatting'])
         : null;
     final onTypeFormatting = json['onTypeFormatting'] != null
-        ? TextDocumentClientCapabilitiesOnTypeFormatting.fromJson(
+        ? DocumentOnTypeFormattingClientCapabilities.fromJson(
             json['onTypeFormatting'])
         : null;
-    final declaration = json['declaration'] != null
-        ? TextDocumentClientCapabilitiesDeclaration.fromJson(
-            json['declaration'])
-        : null;
-    final definition = json['definition'] != null
-        ? TextDocumentClientCapabilitiesDefinition.fromJson(json['definition'])
-        : null;
-    final typeDefinition = json['typeDefinition'] != null
-        ? TextDocumentClientCapabilitiesTypeDefinition.fromJson(
-            json['typeDefinition'])
-        : null;
-    final implementation = json['implementation'] != null
-        ? TextDocumentClientCapabilitiesImplementation.fromJson(
-            json['implementation'])
-        : null;
-    final codeAction = json['codeAction'] != null
-        ? TextDocumentClientCapabilitiesCodeAction.fromJson(json['codeAction'])
-        : null;
-    final codeLens = json['codeLens'] != null
-        ? TextDocumentClientCapabilitiesCodeLens.fromJson(json['codeLens'])
-        : null;
-    final documentLink = json['documentLink'] != null
-        ? TextDocumentClientCapabilitiesDocumentLink.fromJson(
-            json['documentLink'])
-        : null;
-    final colorProvider = json['colorProvider'] != null
-        ? TextDocumentClientCapabilitiesColorProvider.fromJson(
-            json['colorProvider'])
-        : null;
     final rename = json['rename'] != null
-        ? TextDocumentClientCapabilitiesRename.fromJson(json['rename'])
+        ? RenameClientCapabilities.fromJson(json['rename'])
         : null;
     final publishDiagnostics = json['publishDiagnostics'] != null
-        ? TextDocumentClientCapabilitiesPublishDiagnostics.fromJson(
+        ? PublishDiagnosticsClientCapabilities.fromJson(
             json['publishDiagnostics'])
         : null;
     final foldingRange = json['foldingRange'] != null
-        ? TextDocumentClientCapabilitiesFoldingRange.fromJson(
-            json['foldingRange'])
+        ? FoldingRangeClientCapabilities.fromJson(json['foldingRange'])
+        : null;
+    final selectionRange = json['selectionRange'] != null
+        ? SelectionRangeClientCapabilities.fromJson(json['selectionRange'])
         : null;
     return TextDocumentClientCapabilities(
-        synchronization,
-        completion,
-        hover,
-        signatureHelp,
-        references,
-        documentHighlight,
-        documentSymbol,
-        formatting,
-        rangeFormatting,
-        onTypeFormatting,
-        declaration,
-        definition,
-        typeDefinition,
-        implementation,
-        codeAction,
-        codeLens,
-        documentLink,
-        colorProvider,
-        rename,
-        publishDiagnostics,
-        foldingRange);
+        synchronization: synchronization,
+        completion: completion,
+        hover: hover,
+        signatureHelp: signatureHelp,
+        declaration: declaration,
+        definition: definition,
+        typeDefinition: typeDefinition,
+        implementation: implementation,
+        references: references,
+        documentHighlight: documentHighlight,
+        documentSymbol: documentSymbol,
+        codeAction: codeAction,
+        codeLens: codeLens,
+        documentLink: documentLink,
+        colorProvider: colorProvider,
+        formatting: formatting,
+        rangeFormatting: rangeFormatting,
+        onTypeFormatting: onTypeFormatting,
+        rename: rename,
+        publishDiagnostics: publishDiagnostics,
+        foldingRange: foldingRange,
+        selectionRange: selectionRange);
   }
 
-  /// Capabilities specific to the `textDocument/codeAction`
-  final TextDocumentClientCapabilitiesCodeAction codeAction;
+  /// Capabilities specific to the `textDocument/codeAction` request.
+  final CodeActionClientCapabilities codeAction;
 
-  /// Capabilities specific to the `textDocument/codeLens`
-  final TextDocumentClientCapabilitiesCodeLens codeLens;
+  /// Capabilities specific to the `textDocument/codeLens` request.
+  final CodeLensClientCapabilities codeLens;
 
   /// Capabilities specific to the `textDocument/documentColor` and the
   /// `textDocument/colorPresentation` request.
-  ///
-  /// Since 3.6.0
-  final TextDocumentClientCapabilitiesColorProvider colorProvider;
+  ///  @since 3.6.0
+  final DocumentColorClientCapabilities colorProvider;
 
-  /// Capabilities specific to the `textDocument/completion`
-  final TextDocumentClientCapabilitiesCompletion completion;
+  /// Capabilities specific to the `textDocument/completion` request.
+  final CompletionClientCapabilities completion;
 
-  /// Capabilities specific to the `textDocument/declaration`
-  final TextDocumentClientCapabilitiesDeclaration declaration;
+  /// Capabilities specific to the `textDocument/declaration` request.
+  ///  @since 3.14.0
+  final DeclarationClientCapabilities declaration;
 
-  /// Capabilities specific to the `textDocument/definition`.
-  ///
-  /// Since 3.14.0
-  final TextDocumentClientCapabilitiesDefinition definition;
+  /// Capabilities specific to the `textDocument/definition` request.
+  final DefinitionClientCapabilities definition;
 
-  /// Capabilities specific to the `textDocument/documentHighlight`
-  final TextDocumentClientCapabilitiesDocumentHighlight documentHighlight;
+  /// Capabilities specific to the `textDocument/documentHighlight` request.
+  final DocumentHighlightClientCapabilities documentHighlight;
 
-  /// Capabilities specific to the `textDocument/documentLink`
-  final TextDocumentClientCapabilitiesDocumentLink documentLink;
+  /// Capabilities specific to the `textDocument/documentLink` request.
+  final DocumentLinkClientCapabilities documentLink;
 
-  /// Capabilities specific to the `textDocument/documentSymbol`
-  final TextDocumentClientCapabilitiesDocumentSymbol documentSymbol;
+  /// Capabilities specific to the `textDocument/documentSymbol` request.
+  final DocumentSymbolClientCapabilities documentSymbol;
 
-  /// Capabilities specific to `textDocument/foldingRange` requests.
-  ///
-  /// Since 3.10.0
-  final TextDocumentClientCapabilitiesFoldingRange foldingRange;
+  /// Capabilities specific to the `textDocument/foldingRange` request.
+  ///  @since 3.10.0
+  final FoldingRangeClientCapabilities foldingRange;
 
-  /// Capabilities specific to the `textDocument/formatting`
-  final TextDocumentClientCapabilitiesFormatting formatting;
+  /// Capabilities specific to the `textDocument/formatting` request.
+  final DocumentFormattingClientCapabilities formatting;
 
-  /// Capabilities specific to the `textDocument/hover`
-  final TextDocumentClientCapabilitiesHover hover;
+  /// Capabilities specific to the `textDocument/hover` request.
+  final HoverClientCapabilities hover;
 
-  /// Capabilities specific to the `textDocument/implementation`.
-  ///
-  /// Since 3.6.0
-  final TextDocumentClientCapabilitiesImplementation implementation;
+  /// Capabilities specific to the `textDocument/implementation` request.
+  ///  @since 3.6.0
+  final ImplementationClientCapabilities implementation;
 
-  /// Capabilities specific to the `textDocument/onTypeFormatting`
-  final TextDocumentClientCapabilitiesOnTypeFormatting onTypeFormatting;
+  /// request. Capabilities specific to the `textDocument/onTypeFormatting`
+  /// request.
+  final DocumentOnTypeFormattingClientCapabilities onTypeFormatting;
 
-  /// Capabilities specific to `textDocument/publishDiagnostics`.
-  final TextDocumentClientCapabilitiesPublishDiagnostics publishDiagnostics;
+  /// Capabilities specific to the `textDocument/publishDiagnostics`
+  /// notification.
+  final PublishDiagnosticsClientCapabilities publishDiagnostics;
 
-  /// Capabilities specific to the `textDocument/rangeFormatting`
-  final TextDocumentClientCapabilitiesRangeFormatting rangeFormatting;
+  /// Capabilities specific to the `textDocument/rangeFormatting` request.
+  final DocumentRangeFormattingClientCapabilities rangeFormatting;
 
-  /// Capabilities specific to the `textDocument/references`
-  final TextDocumentClientCapabilitiesReferences references;
+  /// Capabilities specific to the `textDocument/references` request.
+  final ReferenceClientCapabilities references;
 
-  /// Capabilities specific to the `textDocument/rename`
-  final TextDocumentClientCapabilitiesRename rename;
+  /// Capabilities specific to the `textDocument/rename` request.
+  final RenameClientCapabilities rename;
 
-  /// Capabilities specific to the `textDocument/signatureHelp`
-  final TextDocumentClientCapabilitiesSignatureHelp signatureHelp;
-  final TextDocumentClientCapabilitiesSynchronization synchronization;
+  /// Capabilities specific to the `textDocument/selectionRange` request.
+  ///  @since 3.15.0
+  final SelectionRangeClientCapabilities selectionRange;
 
-  /// Capabilities specific to the `textDocument/typeDefinition`
-  ///
-  /// Since 3.6.0
-  final TextDocumentClientCapabilitiesTypeDefinition typeDefinition;
+  /// Capabilities specific to the `textDocument/signatureHelp` request.
+  final SignatureHelpClientCapabilities signatureHelp;
+  final TextDocumentSyncClientCapabilities synchronization;
+
+  /// Capabilities specific to the `textDocument/typeDefinition` request.
+  ///  @since 3.6.0
+  final TypeDefinitionClientCapabilities typeDefinition;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
@@ -12399,24 +21151,6 @@
     if (signatureHelp != null) {
       __result['signatureHelp'] = signatureHelp;
     }
-    if (references != null) {
-      __result['references'] = references;
-    }
-    if (documentHighlight != null) {
-      __result['documentHighlight'] = documentHighlight;
-    }
-    if (documentSymbol != null) {
-      __result['documentSymbol'] = documentSymbol;
-    }
-    if (formatting != null) {
-      __result['formatting'] = formatting;
-    }
-    if (rangeFormatting != null) {
-      __result['rangeFormatting'] = rangeFormatting;
-    }
-    if (onTypeFormatting != null) {
-      __result['onTypeFormatting'] = onTypeFormatting;
-    }
     if (declaration != null) {
       __result['declaration'] = declaration;
     }
@@ -12429,6 +21163,15 @@
     if (implementation != null) {
       __result['implementation'] = implementation;
     }
+    if (references != null) {
+      __result['references'] = references;
+    }
+    if (documentHighlight != null) {
+      __result['documentHighlight'] = documentHighlight;
+    }
+    if (documentSymbol != null) {
+      __result['documentSymbol'] = documentSymbol;
+    }
     if (codeAction != null) {
       __result['codeAction'] = codeAction;
     }
@@ -12441,6 +21184,15 @@
     if (colorProvider != null) {
       __result['colorProvider'] = colorProvider;
     }
+    if (formatting != null) {
+      __result['formatting'] = formatting;
+    }
+    if (rangeFormatting != null) {
+      __result['rangeFormatting'] = rangeFormatting;
+    }
+    if (onTypeFormatting != null) {
+      __result['onTypeFormatting'] = onTypeFormatting;
+    }
     if (rename != null) {
       __result['rename'] = rename;
     }
@@ -12450,6 +21202,9 @@
     if (foldingRange != null) {
       __result['foldingRange'] = foldingRange;
     }
+    if (selectionRange != null) {
+      __result['selectionRange'] = selectionRange;
+    }
     return __result;
   }
 
@@ -12458,10 +21213,10 @@
       reporter.push('synchronization');
       try {
         if (obj['synchronization'] != null &&
-            !(TextDocumentClientCapabilitiesSynchronization.canParse(
+            !(TextDocumentSyncClientCapabilities.canParse(
                 obj['synchronization'], reporter))) {
           reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesSynchronization');
+              'must be of type TextDocumentSyncClientCapabilities');
           return false;
         }
       } finally {
@@ -12470,10 +21225,9 @@
       reporter.push('completion');
       try {
         if (obj['completion'] != null &&
-            !(TextDocumentClientCapabilitiesCompletion.canParse(
+            !(CompletionClientCapabilities.canParse(
                 obj['completion'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesCompletion');
+          reporter.reportError('must be of type CompletionClientCapabilities');
           return false;
         }
       } finally {
@@ -12482,10 +21236,8 @@
       reporter.push('hover');
       try {
         if (obj['hover'] != null &&
-            !(TextDocumentClientCapabilitiesHover.canParse(
-                obj['hover'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesHover');
+            !(HoverClientCapabilities.canParse(obj['hover'], reporter))) {
+          reporter.reportError('must be of type HoverClientCapabilities');
           return false;
         }
       } finally {
@@ -12494,82 +21246,10 @@
       reporter.push('signatureHelp');
       try {
         if (obj['signatureHelp'] != null &&
-            !(TextDocumentClientCapabilitiesSignatureHelp.canParse(
+            !(SignatureHelpClientCapabilities.canParse(
                 obj['signatureHelp'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesSignatureHelp');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('references');
-      try {
-        if (obj['references'] != null &&
-            !(TextDocumentClientCapabilitiesReferences.canParse(
-                obj['references'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesReferences');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('documentHighlight');
-      try {
-        if (obj['documentHighlight'] != null &&
-            !(TextDocumentClientCapabilitiesDocumentHighlight.canParse(
-                obj['documentHighlight'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesDocumentHighlight');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('documentSymbol');
-      try {
-        if (obj['documentSymbol'] != null &&
-            !(TextDocumentClientCapabilitiesDocumentSymbol.canParse(
-                obj['documentSymbol'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesDocumentSymbol');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('formatting');
-      try {
-        if (obj['formatting'] != null &&
-            !(TextDocumentClientCapabilitiesFormatting.canParse(
-                obj['formatting'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesFormatting');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('rangeFormatting');
-      try {
-        if (obj['rangeFormatting'] != null &&
-            !(TextDocumentClientCapabilitiesRangeFormatting.canParse(
-                obj['rangeFormatting'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesRangeFormatting');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('onTypeFormatting');
-      try {
-        if (obj['onTypeFormatting'] != null &&
-            !(TextDocumentClientCapabilitiesOnTypeFormatting.canParse(
-                obj['onTypeFormatting'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesOnTypeFormatting');
+          reporter
+              .reportError('must be of type SignatureHelpClientCapabilities');
           return false;
         }
       } finally {
@@ -12578,10 +21258,9 @@
       reporter.push('declaration');
       try {
         if (obj['declaration'] != null &&
-            !(TextDocumentClientCapabilitiesDeclaration.canParse(
+            !(DeclarationClientCapabilities.canParse(
                 obj['declaration'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesDeclaration');
+          reporter.reportError('must be of type DeclarationClientCapabilities');
           return false;
         }
       } finally {
@@ -12590,10 +21269,9 @@
       reporter.push('definition');
       try {
         if (obj['definition'] != null &&
-            !(TextDocumentClientCapabilitiesDefinition.canParse(
+            !(DefinitionClientCapabilities.canParse(
                 obj['definition'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesDefinition');
+          reporter.reportError('must be of type DefinitionClientCapabilities');
           return false;
         }
       } finally {
@@ -12602,10 +21280,10 @@
       reporter.push('typeDefinition');
       try {
         if (obj['typeDefinition'] != null &&
-            !(TextDocumentClientCapabilitiesTypeDefinition.canParse(
+            !(TypeDefinitionClientCapabilities.canParse(
                 obj['typeDefinition'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesTypeDefinition');
+          reporter
+              .reportError('must be of type TypeDefinitionClientCapabilities');
           return false;
         }
       } finally {
@@ -12614,10 +21292,45 @@
       reporter.push('implementation');
       try {
         if (obj['implementation'] != null &&
-            !(TextDocumentClientCapabilitiesImplementation.canParse(
+            !(ImplementationClientCapabilities.canParse(
                 obj['implementation'], reporter))) {
+          reporter
+              .reportError('must be of type ImplementationClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('references');
+      try {
+        if (obj['references'] != null &&
+            !(ReferenceClientCapabilities.canParse(
+                obj['references'], reporter))) {
+          reporter.reportError('must be of type ReferenceClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('documentHighlight');
+      try {
+        if (obj['documentHighlight'] != null &&
+            !(DocumentHighlightClientCapabilities.canParse(
+                obj['documentHighlight'], reporter))) {
           reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesImplementation');
+              'must be of type DocumentHighlightClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('documentSymbol');
+      try {
+        if (obj['documentSymbol'] != null &&
+            !(DocumentSymbolClientCapabilities.canParse(
+                obj['documentSymbol'], reporter))) {
+          reporter
+              .reportError('must be of type DocumentSymbolClientCapabilities');
           return false;
         }
       } finally {
@@ -12626,10 +21339,9 @@
       reporter.push('codeAction');
       try {
         if (obj['codeAction'] != null &&
-            !(TextDocumentClientCapabilitiesCodeAction.canParse(
+            !(CodeActionClientCapabilities.canParse(
                 obj['codeAction'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesCodeAction');
+          reporter.reportError('must be of type CodeActionClientCapabilities');
           return false;
         }
       } finally {
@@ -12638,10 +21350,8 @@
       reporter.push('codeLens');
       try {
         if (obj['codeLens'] != null &&
-            !(TextDocumentClientCapabilitiesCodeLens.canParse(
-                obj['codeLens'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesCodeLens');
+            !(CodeLensClientCapabilities.canParse(obj['codeLens'], reporter))) {
+          reporter.reportError('must be of type CodeLensClientCapabilities');
           return false;
         }
       } finally {
@@ -12650,10 +21360,10 @@
       reporter.push('documentLink');
       try {
         if (obj['documentLink'] != null &&
-            !(TextDocumentClientCapabilitiesDocumentLink.canParse(
+            !(DocumentLinkClientCapabilities.canParse(
                 obj['documentLink'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesDocumentLink');
+          reporter
+              .reportError('must be of type DocumentLinkClientCapabilities');
           return false;
         }
       } finally {
@@ -12662,10 +21372,46 @@
       reporter.push('colorProvider');
       try {
         if (obj['colorProvider'] != null &&
-            !(TextDocumentClientCapabilitiesColorProvider.canParse(
+            !(DocumentColorClientCapabilities.canParse(
                 obj['colorProvider'], reporter))) {
+          reporter
+              .reportError('must be of type DocumentColorClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('formatting');
+      try {
+        if (obj['formatting'] != null &&
+            !(DocumentFormattingClientCapabilities.canParse(
+                obj['formatting'], reporter))) {
           reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesColorProvider');
+              'must be of type DocumentFormattingClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('rangeFormatting');
+      try {
+        if (obj['rangeFormatting'] != null &&
+            !(DocumentRangeFormattingClientCapabilities.canParse(
+                obj['rangeFormatting'], reporter))) {
+          reporter.reportError(
+              'must be of type DocumentRangeFormattingClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('onTypeFormatting');
+      try {
+        if (obj['onTypeFormatting'] != null &&
+            !(DocumentOnTypeFormattingClientCapabilities.canParse(
+                obj['onTypeFormatting'], reporter))) {
+          reporter.reportError(
+              'must be of type DocumentOnTypeFormattingClientCapabilities');
           return false;
         }
       } finally {
@@ -12674,10 +21420,8 @@
       reporter.push('rename');
       try {
         if (obj['rename'] != null &&
-            !(TextDocumentClientCapabilitiesRename.canParse(
-                obj['rename'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesRename');
+            !(RenameClientCapabilities.canParse(obj['rename'], reporter))) {
+          reporter.reportError('must be of type RenameClientCapabilities');
           return false;
         }
       } finally {
@@ -12686,10 +21430,10 @@
       reporter.push('publishDiagnostics');
       try {
         if (obj['publishDiagnostics'] != null &&
-            !(TextDocumentClientCapabilitiesPublishDiagnostics.canParse(
+            !(PublishDiagnosticsClientCapabilities.canParse(
                 obj['publishDiagnostics'], reporter))) {
           reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesPublishDiagnostics');
+              'must be of type PublishDiagnosticsClientCapabilities');
           return false;
         }
       } finally {
@@ -12698,10 +21442,22 @@
       reporter.push('foldingRange');
       try {
         if (obj['foldingRange'] != null &&
-            !(TextDocumentClientCapabilitiesFoldingRange.canParse(
+            !(FoldingRangeClientCapabilities.canParse(
                 obj['foldingRange'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesFoldingRange');
+          reporter
+              .reportError('must be of type FoldingRangeClientCapabilities');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('selectionRange');
+      try {
+        if (obj['selectionRange'] != null &&
+            !(SelectionRangeClientCapabilities.canParse(
+                obj['selectionRange'], reporter))) {
+          reporter
+              .reportError('must be of type SelectionRangeClientCapabilities');
           return false;
         }
       } finally {
@@ -12722,23 +21478,24 @@
           completion == other.completion &&
           hover == other.hover &&
           signatureHelp == other.signatureHelp &&
-          references == other.references &&
-          documentHighlight == other.documentHighlight &&
-          documentSymbol == other.documentSymbol &&
-          formatting == other.formatting &&
-          rangeFormatting == other.rangeFormatting &&
-          onTypeFormatting == other.onTypeFormatting &&
           declaration == other.declaration &&
           definition == other.definition &&
           typeDefinition == other.typeDefinition &&
           implementation == other.implementation &&
+          references == other.references &&
+          documentHighlight == other.documentHighlight &&
+          documentSymbol == other.documentSymbol &&
           codeAction == other.codeAction &&
           codeLens == other.codeLens &&
           documentLink == other.documentLink &&
           colorProvider == other.colorProvider &&
+          formatting == other.formatting &&
+          rangeFormatting == other.rangeFormatting &&
+          onTypeFormatting == other.onTypeFormatting &&
           rename == other.rename &&
           publishDiagnostics == other.publishDiagnostics &&
           foldingRange == other.foldingRange &&
+          selectionRange == other.selectionRange &&
           true;
     }
     return false;
@@ -12751,23 +21508,24 @@
     hash = JenkinsSmiHash.combine(hash, completion.hashCode);
     hash = JenkinsSmiHash.combine(hash, hover.hashCode);
     hash = JenkinsSmiHash.combine(hash, signatureHelp.hashCode);
-    hash = JenkinsSmiHash.combine(hash, references.hashCode);
-    hash = JenkinsSmiHash.combine(hash, documentHighlight.hashCode);
-    hash = JenkinsSmiHash.combine(hash, documentSymbol.hashCode);
-    hash = JenkinsSmiHash.combine(hash, formatting.hashCode);
-    hash = JenkinsSmiHash.combine(hash, rangeFormatting.hashCode);
-    hash = JenkinsSmiHash.combine(hash, onTypeFormatting.hashCode);
     hash = JenkinsSmiHash.combine(hash, declaration.hashCode);
     hash = JenkinsSmiHash.combine(hash, definition.hashCode);
     hash = JenkinsSmiHash.combine(hash, typeDefinition.hashCode);
     hash = JenkinsSmiHash.combine(hash, implementation.hashCode);
+    hash = JenkinsSmiHash.combine(hash, references.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentHighlight.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSymbol.hashCode);
     hash = JenkinsSmiHash.combine(hash, codeAction.hashCode);
     hash = JenkinsSmiHash.combine(hash, codeLens.hashCode);
     hash = JenkinsSmiHash.combine(hash, documentLink.hashCode);
     hash = JenkinsSmiHash.combine(hash, colorProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, formatting.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rangeFormatting.hashCode);
+    hash = JenkinsSmiHash.combine(hash, onTypeFormatting.hashCode);
     hash = JenkinsSmiHash.combine(hash, rename.hashCode);
     hash = JenkinsSmiHash.combine(hash, publishDiagnostics.hashCode);
     hash = JenkinsSmiHash.combine(hash, foldingRange.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selectionRange.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -12775,2441 +21533,42 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class TextDocumentClientCapabilitiesCodeAction implements ToJsonable {
+class TextDocumentContentChangeEvent1 implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesCodeAction.canParse,
-      TextDocumentClientCapabilitiesCodeAction.fromJson);
+      TextDocumentContentChangeEvent1.canParse,
+      TextDocumentContentChangeEvent1.fromJson);
 
-  TextDocumentClientCapabilitiesCodeAction(
-      this.dynamicRegistration, this.codeActionLiteralSupport);
-  static TextDocumentClientCapabilitiesCodeAction fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final codeActionLiteralSupport = json['codeActionLiteralSupport'] != null
-        ? TextDocumentClientCapabilitiesCodeActionLiteralSupport.fromJson(
-            json['codeActionLiteralSupport'])
-        : null;
-    return TextDocumentClientCapabilitiesCodeAction(
-        dynamicRegistration, codeActionLiteralSupport);
-  }
-
-  /// The client support code action literals as a valid response of the
-  /// `textDocument/codeAction` request.
-  ///
-  /// Since 3.8.0
-  final TextDocumentClientCapabilitiesCodeActionLiteralSupport
-      codeActionLiteralSupport;
-
-  /// Whether code action supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (codeActionLiteralSupport != null) {
-      __result['codeActionLiteralSupport'] = codeActionLiteralSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('codeActionLiteralSupport');
-      try {
-        if (obj['codeActionLiteralSupport'] != null &&
-            !(TextDocumentClientCapabilitiesCodeActionLiteralSupport.canParse(
-                obj['codeActionLiteralSupport'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesCodeActionLiteralSupport');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesCodeAction');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesCodeAction &&
-        other.runtimeType == TextDocumentClientCapabilitiesCodeAction) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          codeActionLiteralSupport == other.codeActionLiteralSupport &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, codeActionLiteralSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesCodeActionKind implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesCodeActionKind.canParse,
-      TextDocumentClientCapabilitiesCodeActionKind.fromJson);
-
-  TextDocumentClientCapabilitiesCodeActionKind(this.valueSet) {
-    if (valueSet == null) {
-      throw 'valueSet is required but was not provided';
-    }
-  }
-  static TextDocumentClientCapabilitiesCodeActionKind fromJson(
-      Map<String, dynamic> json) {
-    final valueSet = json['valueSet']
-        ?.map((item) => item != null ? CodeActionKind.fromJson(item) : null)
-        ?.cast<CodeActionKind>()
-        ?.toList();
-    return TextDocumentClientCapabilitiesCodeActionKind(valueSet);
-  }
-
-  /// The code action kind values the client supports. When this property exists
-  /// the client also guarantees that it will handle values outside its set
-  /// gracefully and falls back to a default value when unknown.
-  final List<CodeActionKind> valueSet;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    __result['valueSet'] =
-        valueSet ?? (throw 'valueSet is required but was not set');
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('valueSet');
-      try {
-        if (!obj.containsKey('valueSet')) {
-          reporter.reportError('must not be undefined');
-          return false;
-        }
-        if (obj['valueSet'] == null) {
-          reporter.reportError('must not be null');
-          return false;
-        }
-        if (!((obj['valueSet'] is List &&
-            (obj['valueSet']
-                .every((item) => CodeActionKind.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<CodeActionKind>');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesCodeActionKind');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesCodeActionKind &&
-        other.runtimeType == TextDocumentClientCapabilitiesCodeActionKind) {
-      return listEqual(valueSet, other.valueSet,
-              (CodeActionKind a, CodeActionKind b) => a == b) &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesCodeActionLiteralSupport
-    implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesCodeActionLiteralSupport.canParse,
-      TextDocumentClientCapabilitiesCodeActionLiteralSupport.fromJson);
-
-  TextDocumentClientCapabilitiesCodeActionLiteralSupport(this.codeActionKind) {
-    if (codeActionKind == null) {
-      throw 'codeActionKind is required but was not provided';
-    }
-  }
-  static TextDocumentClientCapabilitiesCodeActionLiteralSupport fromJson(
-      Map<String, dynamic> json) {
-    final codeActionKind = json['codeActionKind'] != null
-        ? TextDocumentClientCapabilitiesCodeActionKind.fromJson(
-            json['codeActionKind'])
-        : null;
-    return TextDocumentClientCapabilitiesCodeActionLiteralSupport(
-        codeActionKind);
-  }
-
-  /// The code action kind is support with the following value set.
-  final TextDocumentClientCapabilitiesCodeActionKind codeActionKind;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    __result['codeActionKind'] =
-        codeActionKind ?? (throw 'codeActionKind is required but was not set');
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('codeActionKind');
-      try {
-        if (!obj.containsKey('codeActionKind')) {
-          reporter.reportError('must not be undefined');
-          return false;
-        }
-        if (obj['codeActionKind'] == null) {
-          reporter.reportError('must not be null');
-          return false;
-        }
-        if (!(TextDocumentClientCapabilitiesCodeActionKind.canParse(
-            obj['codeActionKind'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesCodeActionKind');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesCodeActionLiteralSupport');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesCodeActionLiteralSupport &&
-        other.runtimeType ==
-            TextDocumentClientCapabilitiesCodeActionLiteralSupport) {
-      return codeActionKind == other.codeActionKind && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, codeActionKind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesCodeLens implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesCodeLens.canParse,
-      TextDocumentClientCapabilitiesCodeLens.fromJson);
-
-  TextDocumentClientCapabilitiesCodeLens(this.dynamicRegistration);
-  static TextDocumentClientCapabilitiesCodeLens fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return TextDocumentClientCapabilitiesCodeLens(dynamicRegistration);
-  }
-
-  /// Whether code lens supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesCodeLens');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesCodeLens &&
-        other.runtimeType == TextDocumentClientCapabilitiesCodeLens) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesColorProvider implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesColorProvider.canParse,
-      TextDocumentClientCapabilitiesColorProvider.fromJson);
-
-  TextDocumentClientCapabilitiesColorProvider(this.dynamicRegistration);
-  static TextDocumentClientCapabilitiesColorProvider fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return TextDocumentClientCapabilitiesColorProvider(dynamicRegistration);
-  }
-
-  /// Whether colorProvider supports dynamic registration. If this is set to
-  /// `true` the client supports the new `(ColorProviderOptions &
-  /// TextDocumentRegistrationOptions & StaticRegistrationOptions)` return value
-  /// for the corresponding server capability as well.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesColorProvider');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesColorProvider &&
-        other.runtimeType == TextDocumentClientCapabilitiesColorProvider) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesCompletion implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesCompletion.canParse,
-      TextDocumentClientCapabilitiesCompletion.fromJson);
-
-  TextDocumentClientCapabilitiesCompletion(this.dynamicRegistration,
-      this.completionItem, this.completionItemKind, this.contextSupport);
-  static TextDocumentClientCapabilitiesCompletion fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final completionItem = json['completionItem'] != null
-        ? TextDocumentClientCapabilitiesCompletionItem.fromJson(
-            json['completionItem'])
-        : null;
-    final completionItemKind = json['completionItemKind'] != null
-        ? TextDocumentClientCapabilitiesCompletionItemKind.fromJson(
-            json['completionItemKind'])
-        : null;
-    final contextSupport = json['contextSupport'];
-    return TextDocumentClientCapabilitiesCompletion(dynamicRegistration,
-        completionItem, completionItemKind, contextSupport);
-  }
-
-  /// The client supports the following `CompletionItem` specific capabilities.
-  final TextDocumentClientCapabilitiesCompletionItem completionItem;
-  final TextDocumentClientCapabilitiesCompletionItemKind completionItemKind;
-
-  /// The client supports to send additional context information for a
-  /// `textDocument/completion` request.
-  final bool contextSupport;
-
-  /// Whether completion supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (completionItem != null) {
-      __result['completionItem'] = completionItem;
-    }
-    if (completionItemKind != null) {
-      __result['completionItemKind'] = completionItemKind;
-    }
-    if (contextSupport != null) {
-      __result['contextSupport'] = contextSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('completionItem');
-      try {
-        if (obj['completionItem'] != null &&
-            !(TextDocumentClientCapabilitiesCompletionItem.canParse(
-                obj['completionItem'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesCompletionItem');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('completionItemKind');
-      try {
-        if (obj['completionItemKind'] != null &&
-            !(TextDocumentClientCapabilitiesCompletionItemKind.canParse(
-                obj['completionItemKind'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesCompletionItemKind');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('contextSupport');
-      try {
-        if (obj['contextSupport'] != null && !(obj['contextSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesCompletion');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesCompletion &&
-        other.runtimeType == TextDocumentClientCapabilitiesCompletion) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          completionItem == other.completionItem &&
-          completionItemKind == other.completionItemKind &&
-          contextSupport == other.contextSupport &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, completionItem.hashCode);
-    hash = JenkinsSmiHash.combine(hash, completionItemKind.hashCode);
-    hash = JenkinsSmiHash.combine(hash, contextSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesCompletionItem implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesCompletionItem.canParse,
-      TextDocumentClientCapabilitiesCompletionItem.fromJson);
-
-  TextDocumentClientCapabilitiesCompletionItem(
-      this.snippetSupport,
-      this.commitCharactersSupport,
-      this.documentationFormat,
-      this.deprecatedSupport,
-      this.preselectSupport);
-  static TextDocumentClientCapabilitiesCompletionItem fromJson(
-      Map<String, dynamic> json) {
-    final snippetSupport = json['snippetSupport'];
-    final commitCharactersSupport = json['commitCharactersSupport'];
-    final documentationFormat = json['documentationFormat']
-        ?.map((item) => item != null ? MarkupKind.fromJson(item) : null)
-        ?.cast<MarkupKind>()
-        ?.toList();
-    final deprecatedSupport = json['deprecatedSupport'];
-    final preselectSupport = json['preselectSupport'];
-    return TextDocumentClientCapabilitiesCompletionItem(
-        snippetSupport,
-        commitCharactersSupport,
-        documentationFormat,
-        deprecatedSupport,
-        preselectSupport);
-  }
-
-  /// The client supports commit characters on a completion item.
-  final bool commitCharactersSupport;
-
-  /// The client supports the deprecated property on a completion item.
-  final bool deprecatedSupport;
-
-  /// The client supports the following content formats for the documentation
-  /// property. The order describes the preferred format of the client.
-  final List<MarkupKind> documentationFormat;
-
-  /// The client supports the preselect property on a completion item.
-  final bool preselectSupport;
-
-  /// The client supports snippets as insert text.
-  ///
-  /// A snippet can define tab stops and placeholders with `$1`, `$2` and
-  /// `${3:foo}`. `$0` defines the final tab stop, it defaults to the end of the
-  /// snippet. Placeholders with equal identifiers are linked, that is typing in
-  /// one will update others too.
-  final bool snippetSupport;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (snippetSupport != null) {
-      __result['snippetSupport'] = snippetSupport;
-    }
-    if (commitCharactersSupport != null) {
-      __result['commitCharactersSupport'] = commitCharactersSupport;
-    }
-    if (documentationFormat != null) {
-      __result['documentationFormat'] = documentationFormat;
-    }
-    if (deprecatedSupport != null) {
-      __result['deprecatedSupport'] = deprecatedSupport;
-    }
-    if (preselectSupport != null) {
-      __result['preselectSupport'] = preselectSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('snippetSupport');
-      try {
-        if (obj['snippetSupport'] != null && !(obj['snippetSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('commitCharactersSupport');
-      try {
-        if (obj['commitCharactersSupport'] != null &&
-            !(obj['commitCharactersSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('documentationFormat');
-      try {
-        if (obj['documentationFormat'] != null &&
-            !((obj['documentationFormat'] is List &&
-                (obj['documentationFormat']
-                    .every((item) => MarkupKind.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<MarkupKind>');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('deprecatedSupport');
-      try {
-        if (obj['deprecatedSupport'] != null &&
-            !(obj['deprecatedSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('preselectSupport');
-      try {
-        if (obj['preselectSupport'] != null &&
-            !(obj['preselectSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesCompletionItem');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesCompletionItem &&
-        other.runtimeType == TextDocumentClientCapabilitiesCompletionItem) {
-      return snippetSupport == other.snippetSupport &&
-          commitCharactersSupport == other.commitCharactersSupport &&
-          listEqual(documentationFormat, other.documentationFormat,
-              (MarkupKind a, MarkupKind b) => a == b) &&
-          deprecatedSupport == other.deprecatedSupport &&
-          preselectSupport == other.preselectSupport &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, snippetSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, commitCharactersSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentationFormat));
-    hash = JenkinsSmiHash.combine(hash, deprecatedSupport.hashCode);
-    hash = JenkinsSmiHash.combine(hash, preselectSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesCompletionItemKind implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesCompletionItemKind.canParse,
-      TextDocumentClientCapabilitiesCompletionItemKind.fromJson);
-
-  TextDocumentClientCapabilitiesCompletionItemKind(this.valueSet);
-  static TextDocumentClientCapabilitiesCompletionItemKind fromJson(
-      Map<String, dynamic> json) {
-    final valueSet = json['valueSet']
-        ?.map((item) => item != null ? CompletionItemKind.fromJson(item) : null)
-        ?.cast<CompletionItemKind>()
-        ?.toList();
-    return TextDocumentClientCapabilitiesCompletionItemKind(valueSet);
-  }
-
-  /// The completion item kind values the client supports. When this property
-  /// exists the client also guarantees that it will handle values outside its
-  /// set gracefully and falls back to a default value when unknown.
-  ///
-  /// If this property is not present the client only supports the completion
-  /// items kinds from `Text` to `Reference` as defined in the initial version
-  /// of the protocol.
-  final List<CompletionItemKind> valueSet;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (valueSet != null) {
-      __result['valueSet'] = valueSet;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('valueSet');
-      try {
-        if (obj['valueSet'] != null &&
-            !((obj['valueSet'] is List &&
-                (obj['valueSet'].every(
-                    (item) => CompletionItemKind.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<CompletionItemKind>');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesCompletionItemKind');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesCompletionItemKind &&
-        other.runtimeType == TextDocumentClientCapabilitiesCompletionItemKind) {
-      return listEqual(valueSet, other.valueSet,
-              (CompletionItemKind a, CompletionItemKind b) => a == b) &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesDeclaration implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesDeclaration.canParse,
-      TextDocumentClientCapabilitiesDeclaration.fromJson);
-
-  TextDocumentClientCapabilitiesDeclaration(
-      this.dynamicRegistration, this.linkSupport);
-  static TextDocumentClientCapabilitiesDeclaration fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final linkSupport = json['linkSupport'];
-    return TextDocumentClientCapabilitiesDeclaration(
-        dynamicRegistration, linkSupport);
-  }
-
-  /// Whether declaration supports dynamic registration. If this is set to
-  /// `true` the client supports the new `(TextDocumentRegistrationOptions &
-  /// StaticRegistrationOptions)` return value for the corresponding server
-  /// capability as well.
-  final bool dynamicRegistration;
-
-  /// The client supports additional metadata in the form of declaration links.
-  ///
-  /// Since 3.14.0
-  final bool linkSupport;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (linkSupport != null) {
-      __result['linkSupport'] = linkSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('linkSupport');
-      try {
-        if (obj['linkSupport'] != null && !(obj['linkSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesDeclaration');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesDeclaration &&
-        other.runtimeType == TextDocumentClientCapabilitiesDeclaration) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          linkSupport == other.linkSupport &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesDefinition implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesDefinition.canParse,
-      TextDocumentClientCapabilitiesDefinition.fromJson);
-
-  TextDocumentClientCapabilitiesDefinition(
-      this.dynamicRegistration, this.linkSupport);
-  static TextDocumentClientCapabilitiesDefinition fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final linkSupport = json['linkSupport'];
-    return TextDocumentClientCapabilitiesDefinition(
-        dynamicRegistration, linkSupport);
-  }
-
-  /// Whether definition supports dynamic registration.
-  final bool dynamicRegistration;
-
-  /// The client supports additional metadata in the form of definition links.
-  final bool linkSupport;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (linkSupport != null) {
-      __result['linkSupport'] = linkSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('linkSupport');
-      try {
-        if (obj['linkSupport'] != null && !(obj['linkSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesDefinition');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesDefinition &&
-        other.runtimeType == TextDocumentClientCapabilitiesDefinition) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          linkSupport == other.linkSupport &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesDocumentHighlight implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesDocumentHighlight.canParse,
-      TextDocumentClientCapabilitiesDocumentHighlight.fromJson);
-
-  TextDocumentClientCapabilitiesDocumentHighlight(this.dynamicRegistration);
-  static TextDocumentClientCapabilitiesDocumentHighlight fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return TextDocumentClientCapabilitiesDocumentHighlight(dynamicRegistration);
-  }
-
-  /// Whether document highlight supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesDocumentHighlight');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesDocumentHighlight &&
-        other.runtimeType == TextDocumentClientCapabilitiesDocumentHighlight) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesDocumentLink implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesDocumentLink.canParse,
-      TextDocumentClientCapabilitiesDocumentLink.fromJson);
-
-  TextDocumentClientCapabilitiesDocumentLink(this.dynamicRegistration);
-  static TextDocumentClientCapabilitiesDocumentLink fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return TextDocumentClientCapabilitiesDocumentLink(dynamicRegistration);
-  }
-
-  /// Whether document link supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesDocumentLink');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesDocumentLink &&
-        other.runtimeType == TextDocumentClientCapabilitiesDocumentLink) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesDocumentSymbol implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesDocumentSymbol.canParse,
-      TextDocumentClientCapabilitiesDocumentSymbol.fromJson);
-
-  TextDocumentClientCapabilitiesDocumentSymbol(this.dynamicRegistration,
-      this.symbolKind, this.hierarchicalDocumentSymbolSupport);
-  static TextDocumentClientCapabilitiesDocumentSymbol fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final symbolKind = json['symbolKind'] != null
-        ? TextDocumentClientCapabilitiesSymbolKind.fromJson(json['symbolKind'])
-        : null;
-    final hierarchicalDocumentSymbolSupport =
-        json['hierarchicalDocumentSymbolSupport'];
-    return TextDocumentClientCapabilitiesDocumentSymbol(
-        dynamicRegistration, symbolKind, hierarchicalDocumentSymbolSupport);
-  }
-
-  /// Whether document symbol supports dynamic registration.
-  final bool dynamicRegistration;
-
-  /// The client supports hierarchical document symbols.
-  final bool hierarchicalDocumentSymbolSupport;
-
-  /// Specific capabilities for the `SymbolKind`.
-  final TextDocumentClientCapabilitiesSymbolKind symbolKind;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (symbolKind != null) {
-      __result['symbolKind'] = symbolKind;
-    }
-    if (hierarchicalDocumentSymbolSupport != null) {
-      __result['hierarchicalDocumentSymbolSupport'] =
-          hierarchicalDocumentSymbolSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('symbolKind');
-      try {
-        if (obj['symbolKind'] != null &&
-            !(TextDocumentClientCapabilitiesSymbolKind.canParse(
-                obj['symbolKind'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesSymbolKind');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('hierarchicalDocumentSymbolSupport');
-      try {
-        if (obj['hierarchicalDocumentSymbolSupport'] != null &&
-            !(obj['hierarchicalDocumentSymbolSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesDocumentSymbol');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesDocumentSymbol &&
-        other.runtimeType == TextDocumentClientCapabilitiesDocumentSymbol) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          symbolKind == other.symbolKind &&
-          hierarchicalDocumentSymbolSupport ==
-              other.hierarchicalDocumentSymbolSupport &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, symbolKind.hashCode);
-    hash = JenkinsSmiHash.combine(
-        hash, hierarchicalDocumentSymbolSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesFoldingRange implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesFoldingRange.canParse,
-      TextDocumentClientCapabilitiesFoldingRange.fromJson);
-
-  TextDocumentClientCapabilitiesFoldingRange(
-      this.dynamicRegistration, this.rangeLimit, this.lineFoldingOnly);
-  static TextDocumentClientCapabilitiesFoldingRange fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final rangeLimit = json['rangeLimit'];
-    final lineFoldingOnly = json['lineFoldingOnly'];
-    return TextDocumentClientCapabilitiesFoldingRange(
-        dynamicRegistration, rangeLimit, lineFoldingOnly);
-  }
-
-  /// Whether implementation supports dynamic registration for folding range
-  /// providers. If this is set to `true` the client supports the new
-  /// `(FoldingRangeProviderOptions & TextDocumentRegistrationOptions &
-  /// StaticRegistrationOptions)` return value for the corresponding server
-  /// capability as well.
-  final bool dynamicRegistration;
-
-  /// If set, the client signals that it only supports folding complete lines.
-  /// If set, client will ignore specified `startCharacter` and `endCharacter`
-  /// properties in a FoldingRange.
-  final bool lineFoldingOnly;
-
-  /// The maximum number of folding ranges that the client prefers to receive
-  /// per document. The value serves as a hint, servers are free to follow the
-  /// limit.
-  final num rangeLimit;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (rangeLimit != null) {
-      __result['rangeLimit'] = rangeLimit;
-    }
-    if (lineFoldingOnly != null) {
-      __result['lineFoldingOnly'] = lineFoldingOnly;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('rangeLimit');
-      try {
-        if (obj['rangeLimit'] != null && !(obj['rangeLimit'] is num)) {
-          reporter.reportError('must be of type num');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('lineFoldingOnly');
-      try {
-        if (obj['lineFoldingOnly'] != null &&
-            !(obj['lineFoldingOnly'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesFoldingRange');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesFoldingRange &&
-        other.runtimeType == TextDocumentClientCapabilitiesFoldingRange) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          rangeLimit == other.rangeLimit &&
-          lineFoldingOnly == other.lineFoldingOnly &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, rangeLimit.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lineFoldingOnly.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesFormatting implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesFormatting.canParse,
-      TextDocumentClientCapabilitiesFormatting.fromJson);
-
-  TextDocumentClientCapabilitiesFormatting(this.dynamicRegistration);
-  static TextDocumentClientCapabilitiesFormatting fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return TextDocumentClientCapabilitiesFormatting(dynamicRegistration);
-  }
-
-  /// Whether formatting supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesFormatting');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesFormatting &&
-        other.runtimeType == TextDocumentClientCapabilitiesFormatting) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesHover implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesHover.canParse,
-      TextDocumentClientCapabilitiesHover.fromJson);
-
-  TextDocumentClientCapabilitiesHover(
-      this.dynamicRegistration, this.contentFormat);
-  static TextDocumentClientCapabilitiesHover fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final contentFormat = json['contentFormat']
-        ?.map((item) => item != null ? MarkupKind.fromJson(item) : null)
-        ?.cast<MarkupKind>()
-        ?.toList();
-    return TextDocumentClientCapabilitiesHover(
-        dynamicRegistration, contentFormat);
-  }
-
-  /// The client supports the follow content formats for the content property.
-  /// The order describes the preferred format of the client.
-  final List<MarkupKind> contentFormat;
-
-  /// Whether hover supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (contentFormat != null) {
-      __result['contentFormat'] = contentFormat;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('contentFormat');
-      try {
-        if (obj['contentFormat'] != null &&
-            !((obj['contentFormat'] is List &&
-                (obj['contentFormat']
-                    .every((item) => MarkupKind.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<MarkupKind>');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter
-          .reportError('must be of type TextDocumentClientCapabilitiesHover');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesHover &&
-        other.runtimeType == TextDocumentClientCapabilitiesHover) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          listEqual(contentFormat, other.contentFormat,
-              (MarkupKind a, MarkupKind b) => a == b) &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(contentFormat));
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesImplementation implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesImplementation.canParse,
-      TextDocumentClientCapabilitiesImplementation.fromJson);
-
-  TextDocumentClientCapabilitiesImplementation(
-      this.dynamicRegistration, this.linkSupport);
-  static TextDocumentClientCapabilitiesImplementation fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final linkSupport = json['linkSupport'];
-    return TextDocumentClientCapabilitiesImplementation(
-        dynamicRegistration, linkSupport);
-  }
-
-  /// Whether implementation supports dynamic registration. If this is set to
-  /// `true` the client supports the new `(TextDocumentRegistrationOptions &
-  /// StaticRegistrationOptions)` return value for the corresponding server
-  /// capability as well.
-  final bool dynamicRegistration;
-
-  /// The client supports additional metadata in the form of definition links.
-  ///
-  /// Since 3.14.0
-  final bool linkSupport;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (linkSupport != null) {
-      __result['linkSupport'] = linkSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('linkSupport');
-      try {
-        if (obj['linkSupport'] != null && !(obj['linkSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesImplementation');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesImplementation &&
-        other.runtimeType == TextDocumentClientCapabilitiesImplementation) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          linkSupport == other.linkSupport &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesOnTypeFormatting implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesOnTypeFormatting.canParse,
-      TextDocumentClientCapabilitiesOnTypeFormatting.fromJson);
-
-  TextDocumentClientCapabilitiesOnTypeFormatting(this.dynamicRegistration);
-  static TextDocumentClientCapabilitiesOnTypeFormatting fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return TextDocumentClientCapabilitiesOnTypeFormatting(dynamicRegistration);
-  }
-
-  /// Whether on type formatting supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesOnTypeFormatting');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesOnTypeFormatting &&
-        other.runtimeType == TextDocumentClientCapabilitiesOnTypeFormatting) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesParameterInformation implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesParameterInformation.canParse,
-      TextDocumentClientCapabilitiesParameterInformation.fromJson);
-
-  TextDocumentClientCapabilitiesParameterInformation(this.labelOffsetSupport);
-  static TextDocumentClientCapabilitiesParameterInformation fromJson(
-      Map<String, dynamic> json) {
-    final labelOffsetSupport = json['labelOffsetSupport'];
-    return TextDocumentClientCapabilitiesParameterInformation(
-        labelOffsetSupport);
-  }
-
-  /// The client supports processing label offsets instead of a simple label
-  /// string.
-  ///
-  /// Since 3.14.0
-  final bool labelOffsetSupport;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (labelOffsetSupport != null) {
-      __result['labelOffsetSupport'] = labelOffsetSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('labelOffsetSupport');
-      try {
-        if (obj['labelOffsetSupport'] != null &&
-            !(obj['labelOffsetSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesParameterInformation');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesParameterInformation &&
-        other.runtimeType ==
-            TextDocumentClientCapabilitiesParameterInformation) {
-      return labelOffsetSupport == other.labelOffsetSupport && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, labelOffsetSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesPublishDiagnostics implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesPublishDiagnostics.canParse,
-      TextDocumentClientCapabilitiesPublishDiagnostics.fromJson);
-
-  TextDocumentClientCapabilitiesPublishDiagnostics(this.relatedInformation);
-  static TextDocumentClientCapabilitiesPublishDiagnostics fromJson(
-      Map<String, dynamic> json) {
-    final relatedInformation = json['relatedInformation'];
-    return TextDocumentClientCapabilitiesPublishDiagnostics(relatedInformation);
-  }
-
-  /// Whether the clients accepts diagnostics with related information.
-  final bool relatedInformation;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (relatedInformation != null) {
-      __result['relatedInformation'] = relatedInformation;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('relatedInformation');
-      try {
-        if (obj['relatedInformation'] != null &&
-            !(obj['relatedInformation'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesPublishDiagnostics');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesPublishDiagnostics &&
-        other.runtimeType == TextDocumentClientCapabilitiesPublishDiagnostics) {
-      return relatedInformation == other.relatedInformation && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, relatedInformation.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesRangeFormatting implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesRangeFormatting.canParse,
-      TextDocumentClientCapabilitiesRangeFormatting.fromJson);
-
-  TextDocumentClientCapabilitiesRangeFormatting(this.dynamicRegistration);
-  static TextDocumentClientCapabilitiesRangeFormatting fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return TextDocumentClientCapabilitiesRangeFormatting(dynamicRegistration);
-  }
-
-  /// Whether range formatting supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesRangeFormatting');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesRangeFormatting &&
-        other.runtimeType == TextDocumentClientCapabilitiesRangeFormatting) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesReferences implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesReferences.canParse,
-      TextDocumentClientCapabilitiesReferences.fromJson);
-
-  TextDocumentClientCapabilitiesReferences(this.dynamicRegistration);
-  static TextDocumentClientCapabilitiesReferences fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return TextDocumentClientCapabilitiesReferences(dynamicRegistration);
-  }
-
-  /// Whether references supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesReferences');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesReferences &&
-        other.runtimeType == TextDocumentClientCapabilitiesReferences) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesRename implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesRename.canParse,
-      TextDocumentClientCapabilitiesRename.fromJson);
-
-  TextDocumentClientCapabilitiesRename(
-      this.dynamicRegistration, this.prepareSupport);
-  static TextDocumentClientCapabilitiesRename fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final prepareSupport = json['prepareSupport'];
-    return TextDocumentClientCapabilitiesRename(
-        dynamicRegistration, prepareSupport);
-  }
-
-  /// Whether rename supports dynamic registration.
-  final bool dynamicRegistration;
-
-  /// The client supports testing for validity of rename operations before
-  /// execution.
-  final bool prepareSupport;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (prepareSupport != null) {
-      __result['prepareSupport'] = prepareSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('prepareSupport');
-      try {
-        if (obj['prepareSupport'] != null && !(obj['prepareSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter
-          .reportError('must be of type TextDocumentClientCapabilitiesRename');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesRename &&
-        other.runtimeType == TextDocumentClientCapabilitiesRename) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          prepareSupport == other.prepareSupport &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, prepareSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesSignatureHelp implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesSignatureHelp.canParse,
-      TextDocumentClientCapabilitiesSignatureHelp.fromJson);
-
-  TextDocumentClientCapabilitiesSignatureHelp(
-      this.dynamicRegistration, this.signatureInformation);
-  static TextDocumentClientCapabilitiesSignatureHelp fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final signatureInformation = json['signatureInformation'] != null
-        ? TextDocumentClientCapabilitiesSignatureInformation.fromJson(
-            json['signatureInformation'])
-        : null;
-    return TextDocumentClientCapabilitiesSignatureHelp(
-        dynamicRegistration, signatureInformation);
-  }
-
-  /// Whether signature help supports dynamic registration.
-  final bool dynamicRegistration;
-
-  /// The client supports the following `SignatureInformation` specific
-  /// properties.
-  final TextDocumentClientCapabilitiesSignatureInformation signatureInformation;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (signatureInformation != null) {
-      __result['signatureInformation'] = signatureInformation;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('signatureInformation');
-      try {
-        if (obj['signatureInformation'] != null &&
-            !(TextDocumentClientCapabilitiesSignatureInformation.canParse(
-                obj['signatureInformation'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesSignatureInformation');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesSignatureHelp');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesSignatureHelp &&
-        other.runtimeType == TextDocumentClientCapabilitiesSignatureHelp) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          signatureInformation == other.signatureInformation &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, signatureInformation.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesSignatureInformation implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesSignatureInformation.canParse,
-      TextDocumentClientCapabilitiesSignatureInformation.fromJson);
-
-  TextDocumentClientCapabilitiesSignatureInformation(
-      this.documentationFormat, this.parameterInformation);
-  static TextDocumentClientCapabilitiesSignatureInformation fromJson(
-      Map<String, dynamic> json) {
-    final documentationFormat = json['documentationFormat']
-        ?.map((item) => item != null ? MarkupKind.fromJson(item) : null)
-        ?.cast<MarkupKind>()
-        ?.toList();
-    final parameterInformation = json['parameterInformation'] != null
-        ? TextDocumentClientCapabilitiesParameterInformation.fromJson(
-            json['parameterInformation'])
-        : null;
-    return TextDocumentClientCapabilitiesSignatureInformation(
-        documentationFormat, parameterInformation);
-  }
-
-  /// The client supports the follow content formats for the documentation
-  /// property. The order describes the preferred format of the client.
-  final List<MarkupKind> documentationFormat;
-
-  /// Client capabilities specific to parameter information.
-  final TextDocumentClientCapabilitiesParameterInformation parameterInformation;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (documentationFormat != null) {
-      __result['documentationFormat'] = documentationFormat;
-    }
-    if (parameterInformation != null) {
-      __result['parameterInformation'] = parameterInformation;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('documentationFormat');
-      try {
-        if (obj['documentationFormat'] != null &&
-            !((obj['documentationFormat'] is List &&
-                (obj['documentationFormat']
-                    .every((item) => MarkupKind.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<MarkupKind>');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('parameterInformation');
-      try {
-        if (obj['parameterInformation'] != null &&
-            !(TextDocumentClientCapabilitiesParameterInformation.canParse(
-                obj['parameterInformation'], reporter))) {
-          reporter.reportError(
-              'must be of type TextDocumentClientCapabilitiesParameterInformation');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesSignatureInformation');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesSignatureInformation &&
-        other.runtimeType ==
-            TextDocumentClientCapabilitiesSignatureInformation) {
-      return listEqual(documentationFormat, other.documentationFormat,
-              (MarkupKind a, MarkupKind b) => a == b) &&
-          parameterInformation == other.parameterInformation &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentationFormat));
-    hash = JenkinsSmiHash.combine(hash, parameterInformation.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesSymbolKind implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesSymbolKind.canParse,
-      TextDocumentClientCapabilitiesSymbolKind.fromJson);
-
-  TextDocumentClientCapabilitiesSymbolKind(this.valueSet);
-  static TextDocumentClientCapabilitiesSymbolKind fromJson(
-      Map<String, dynamic> json) {
-    final valueSet = json['valueSet']
-        ?.map((item) => item != null ? SymbolKind.fromJson(item) : null)
-        ?.cast<SymbolKind>()
-        ?.toList();
-    return TextDocumentClientCapabilitiesSymbolKind(valueSet);
-  }
-
-  /// The symbol kind values the client supports. When this property exists the
-  /// client also guarantees that it will handle values outside its set
-  /// gracefully and falls back to a default value when unknown.
-  ///
-  /// If this property is not present the client only supports the symbol kinds
-  /// from `File` to `Array` as defined in the initial version of the protocol.
-  final List<SymbolKind> valueSet;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (valueSet != null) {
-      __result['valueSet'] = valueSet;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('valueSet');
-      try {
-        if (obj['valueSet'] != null &&
-            !((obj['valueSet'] is List &&
-                (obj['valueSet']
-                    .every((item) => SymbolKind.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<SymbolKind>');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesSymbolKind');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesSymbolKind &&
-        other.runtimeType == TextDocumentClientCapabilitiesSymbolKind) {
-      return listEqual(valueSet, other.valueSet,
-              (SymbolKind a, SymbolKind b) => a == b) &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesSynchronization implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesSynchronization.canParse,
-      TextDocumentClientCapabilitiesSynchronization.fromJson);
-
-  TextDocumentClientCapabilitiesSynchronization(this.dynamicRegistration,
-      this.willSave, this.willSaveWaitUntil, this.didSave);
-  static TextDocumentClientCapabilitiesSynchronization fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final willSave = json['willSave'];
-    final willSaveWaitUntil = json['willSaveWaitUntil'];
-    final didSave = json['didSave'];
-    return TextDocumentClientCapabilitiesSynchronization(
-        dynamicRegistration, willSave, willSaveWaitUntil, didSave);
-  }
-
-  /// The client supports did save notifications.
-  final bool didSave;
-
-  /// Whether text document synchronization supports dynamic registration.
-  final bool dynamicRegistration;
-
-  /// The client supports sending will save notifications.
-  final bool willSave;
-
-  /// The client supports sending a will save request and waits for a response
-  /// providing text edits which will be applied to the document before it is
-  /// saved.
-  final bool willSaveWaitUntil;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (willSave != null) {
-      __result['willSave'] = willSave;
-    }
-    if (willSaveWaitUntil != null) {
-      __result['willSaveWaitUntil'] = willSaveWaitUntil;
-    }
-    if (didSave != null) {
-      __result['didSave'] = didSave;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('willSave');
-      try {
-        if (obj['willSave'] != null && !(obj['willSave'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('willSaveWaitUntil');
-      try {
-        if (obj['willSaveWaitUntil'] != null &&
-            !(obj['willSaveWaitUntil'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('didSave');
-      try {
-        if (obj['didSave'] != null && !(obj['didSave'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesSynchronization');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesSynchronization &&
-        other.runtimeType == TextDocumentClientCapabilitiesSynchronization) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          willSave == other.willSave &&
-          willSaveWaitUntil == other.willSaveWaitUntil &&
-          didSave == other.didSave &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willSave.hashCode);
-    hash = JenkinsSmiHash.combine(hash, willSaveWaitUntil.hashCode);
-    hash = JenkinsSmiHash.combine(hash, didSave.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class TextDocumentClientCapabilitiesTypeDefinition implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentClientCapabilitiesTypeDefinition.canParse,
-      TextDocumentClientCapabilitiesTypeDefinition.fromJson);
-
-  TextDocumentClientCapabilitiesTypeDefinition(
-      this.dynamicRegistration, this.linkSupport);
-  static TextDocumentClientCapabilitiesTypeDefinition fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final linkSupport = json['linkSupport'];
-    return TextDocumentClientCapabilitiesTypeDefinition(
-        dynamicRegistration, linkSupport);
-  }
-
-  /// Whether typeDefinition supports dynamic registration. If this is set to
-  /// `true` the client supports the new `(TextDocumentRegistrationOptions &
-  /// StaticRegistrationOptions)` return value for the corresponding server
-  /// capability as well.
-  final bool dynamicRegistration;
-
-  /// The client supports additional metadata in the form of definition links.
-  ///
-  /// Since 3.14.0
-  final bool linkSupport;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (linkSupport != null) {
-      __result['linkSupport'] = linkSupport;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('linkSupport');
-      try {
-        if (obj['linkSupport'] != null && !(obj['linkSupport'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type TextDocumentClientCapabilitiesTypeDefinition');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is TextDocumentClientCapabilitiesTypeDefinition &&
-        other.runtimeType == TextDocumentClientCapabilitiesTypeDefinition) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          linkSupport == other.linkSupport &&
-          true;
+  TextDocumentContentChangeEvent1(
+      {@required this.range, this.rangeLength, @required this.text}) {
+    if (range == null) {
+      throw 'range is required but was not provided';
     }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-/// An event describing a change to a text document. If range and rangeLength
-/// are omitted the new text is considered to be the full content of the
-/// document.
-class TextDocumentContentChangeEvent implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      TextDocumentContentChangeEvent.canParse,
-      TextDocumentContentChangeEvent.fromJson);
-
-  TextDocumentContentChangeEvent(this.range, this.rangeLength, this.text) {
     if (text == null) {
       throw 'text is required but was not provided';
     }
   }
-  static TextDocumentContentChangeEvent fromJson(Map<String, dynamic> json) {
+  static TextDocumentContentChangeEvent1 fromJson(Map<String, dynamic> json) {
     final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final rangeLength = json['rangeLength'];
     final text = json['text'];
-    return TextDocumentContentChangeEvent(range, rangeLength, text);
+    return TextDocumentContentChangeEvent1(
+        range: range, rangeLength: rangeLength, text: text);
   }
 
   /// The range of the document that changed.
   final Range range;
 
-  /// The length of the range that got replaced.
+  /// The optional length of the range that got replaced.
+  ///  @deprecated use range instead.
+  @core.deprecated
   final num rangeLength;
 
-  /// The new text of the range/document.
+  /// The new text for the provided range.
   final String text;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
-    if (range != null) {
-      __result['range'] = range;
-    }
+    __result['range'] = range ?? (throw 'range is required but was not set');
     if (rangeLength != null) {
       __result['rangeLength'] = rangeLength;
     }
@@ -15221,7 +21580,15 @@
     if (obj is Map<String, dynamic>) {
       reporter.push('range');
       try {
-        if (obj['range'] != null && !(Range.canParse(obj['range'], reporter))) {
+        if (!obj.containsKey('range')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['range'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Range.canParse(obj['range'], reporter))) {
           reporter.reportError('must be of type Range');
           return false;
         }
@@ -15256,15 +21623,15 @@
       }
       return true;
     } else {
-      reporter.reportError('must be of type TextDocumentContentChangeEvent');
+      reporter.reportError('must be of type TextDocumentContentChangeEvent1');
       return false;
     }
   }
 
   @override
   bool operator ==(Object other) {
-    if (other is TextDocumentContentChangeEvent &&
-        other.runtimeType == TextDocumentContentChangeEvent) {
+    if (other is TextDocumentContentChangeEvent1 &&
+        other.runtimeType == TextDocumentContentChangeEvent1) {
       return range == other.range &&
           rangeLength == other.rangeLength &&
           text == other.text &&
@@ -15286,11 +21653,81 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class TextDocumentContentChangeEvent2 implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      TextDocumentContentChangeEvent2.canParse,
+      TextDocumentContentChangeEvent2.fromJson);
+
+  TextDocumentContentChangeEvent2({@required this.text}) {
+    if (text == null) {
+      throw 'text is required but was not provided';
+    }
+  }
+  static TextDocumentContentChangeEvent2 fromJson(Map<String, dynamic> json) {
+    final text = json['text'];
+    return TextDocumentContentChangeEvent2(text: text);
+  }
+
+  /// The new text of the whole document.
+  final String text;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['text'] = text ?? (throw 'text is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('text');
+      try {
+        if (!obj.containsKey('text')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['text'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(obj['text'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type TextDocumentContentChangeEvent2');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is TextDocumentContentChangeEvent2 &&
+        other.runtimeType == TextDocumentContentChangeEvent2) {
+      return text == other.text && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, text.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class TextDocumentEdit implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(TextDocumentEdit.canParse, TextDocumentEdit.fromJson);
 
-  TextDocumentEdit(this.textDocument, this.edits) {
+  TextDocumentEdit({@required this.textDocument, @required this.edits}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -15306,7 +21743,7 @@
         ?.map((item) => item != null ? TextEdit.fromJson(item) : null)
         ?.cast<TextEdit>()
         ?.toList();
-    return TextDocumentEdit(textDocument, edits);
+    return TextDocumentEdit(textDocument: textDocument, edits: edits);
   }
 
   /// The edits to be applied.
@@ -15396,7 +21833,7 @@
   static const jsonHandler = LspJsonHandler(
       TextDocumentIdentifier.canParse, TextDocumentIdentifier.fromJson);
 
-  TextDocumentIdentifier(this.uri) {
+  TextDocumentIdentifier({@required this.uri}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -15406,7 +21843,7 @@
       return VersionedTextDocumentIdentifier.fromJson(json);
     }
     final uri = json['uri'];
-    return TextDocumentIdentifier(uri);
+    return TextDocumentIdentifier(uri: uri);
   }
 
   /// The text document's URI.
@@ -15468,7 +21905,11 @@
   static const jsonHandler =
       LspJsonHandler(TextDocumentItem.canParse, TextDocumentItem.fromJson);
 
-  TextDocumentItem(this.uri, this.languageId, this.version, this.text) {
+  TextDocumentItem(
+      {@required this.uri,
+      @required this.languageId,
+      @required this.version,
+      @required this.text}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -15487,7 +21928,8 @@
     final languageId = json['languageId'];
     final version = json['version'];
     final text = json['text'];
-    return TextDocumentItem(uri, languageId, version, text);
+    return TextDocumentItem(
+        uri: uri, languageId: languageId, version: version, text: text);
   }
 
   /// The text document's language identifier.
@@ -15621,7 +22063,8 @@
   static const jsonHandler = LspJsonHandler(
       TextDocumentPositionParams.canParse, TextDocumentPositionParams.fromJson);
 
-  TextDocumentPositionParams(this.textDocument, this.position) {
+  TextDocumentPositionParams(
+      {@required this.textDocument, @required this.position}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -15633,15 +22076,46 @@
     if (CompletionParams.canParse(json, nullLspJsonReporter)) {
       return CompletionParams.fromJson(json);
     }
+    if (HoverParams.canParse(json, nullLspJsonReporter)) {
+      return HoverParams.fromJson(json);
+    }
+    if (SignatureHelpParams.canParse(json, nullLspJsonReporter)) {
+      return SignatureHelpParams.fromJson(json);
+    }
+    if (DeclarationParams.canParse(json, nullLspJsonReporter)) {
+      return DeclarationParams.fromJson(json);
+    }
+    if (DefinitionParams.canParse(json, nullLspJsonReporter)) {
+      return DefinitionParams.fromJson(json);
+    }
+    if (TypeDefinitionParams.canParse(json, nullLspJsonReporter)) {
+      return TypeDefinitionParams.fromJson(json);
+    }
+    if (ImplementationParams.canParse(json, nullLspJsonReporter)) {
+      return ImplementationParams.fromJson(json);
+    }
     if (ReferenceParams.canParse(json, nullLspJsonReporter)) {
       return ReferenceParams.fromJson(json);
     }
+    if (DocumentHighlightParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentHighlightParams.fromJson(json);
+    }
+    if (DocumentOnTypeFormattingParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentOnTypeFormattingParams.fromJson(json);
+    }
+    if (RenameParams.canParse(json, nullLspJsonReporter)) {
+      return RenameParams.fromJson(json);
+    }
+    if (PrepareRenameParams.canParse(json, nullLspJsonReporter)) {
+      return PrepareRenameParams.fromJson(json);
+    }
     final textDocument = json['textDocument'] != null
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final position =
         json['position'] != null ? Position.fromJson(json['position']) : null;
-    return TextDocumentPositionParams(textDocument, position);
+    return TextDocumentPositionParams(
+        textDocument: textDocument, position: position);
   }
 
   /// The position inside the text document.
@@ -15725,12 +22199,13 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+/// General text document registration options.
 class TextDocumentRegistrationOptions implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
       TextDocumentRegistrationOptions.canParse,
       TextDocumentRegistrationOptions.fromJson);
 
-  TextDocumentRegistrationOptions(this.documentSelector);
+  TextDocumentRegistrationOptions({this.documentSelector});
   static TextDocumentRegistrationOptions fromJson(Map<String, dynamic> json) {
     if (TextDocumentChangeRegistrationOptions.canParse(
         json, nullLspJsonReporter)) {
@@ -15743,9 +22218,34 @@
     if (CompletionRegistrationOptions.canParse(json, nullLspJsonReporter)) {
       return CompletionRegistrationOptions.fromJson(json);
     }
+    if (HoverRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return HoverRegistrationOptions.fromJson(json);
+    }
     if (SignatureHelpRegistrationOptions.canParse(json, nullLspJsonReporter)) {
       return SignatureHelpRegistrationOptions.fromJson(json);
     }
+    if (DeclarationRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DeclarationRegistrationOptions.fromJson(json);
+    }
+    if (DefinitionRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DefinitionRegistrationOptions.fromJson(json);
+    }
+    if (TypeDefinitionRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return TypeDefinitionRegistrationOptions.fromJson(json);
+    }
+    if (ImplementationRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return ImplementationRegistrationOptions.fromJson(json);
+    }
+    if (ReferenceRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return ReferenceRegistrationOptions.fromJson(json);
+    }
+    if (DocumentHighlightRegistrationOptions.canParse(
+        json, nullLspJsonReporter)) {
+      return DocumentHighlightRegistrationOptions.fromJson(json);
+    }
+    if (DocumentSymbolRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentSymbolRegistrationOptions.fromJson(json);
+    }
     if (CodeActionRegistrationOptions.canParse(json, nullLspJsonReporter)) {
       return CodeActionRegistrationOptions.fromJson(json);
     }
@@ -15755,6 +22255,17 @@
     if (DocumentLinkRegistrationOptions.canParse(json, nullLspJsonReporter)) {
       return DocumentLinkRegistrationOptions.fromJson(json);
     }
+    if (DocumentColorRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentColorRegistrationOptions.fromJson(json);
+    }
+    if (DocumentFormattingRegistrationOptions.canParse(
+        json, nullLspJsonReporter)) {
+      return DocumentFormattingRegistrationOptions.fromJson(json);
+    }
+    if (DocumentRangeFormattingRegistrationOptions.canParse(
+        json, nullLspJsonReporter)) {
+      return DocumentRangeFormattingRegistrationOptions.fromJson(json);
+    }
     if (DocumentOnTypeFormattingRegistrationOptions.canParse(
         json, nullLspJsonReporter)) {
       return DocumentOnTypeFormattingRegistrationOptions.fromJson(json);
@@ -15762,11 +22273,17 @@
     if (RenameRegistrationOptions.canParse(json, nullLspJsonReporter)) {
       return RenameRegistrationOptions.fromJson(json);
     }
+    if (FoldingRangeRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return FoldingRangeRegistrationOptions.fromJson(json);
+    }
+    if (SelectionRangeRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return SelectionRangeRegistrationOptions.fromJson(json);
+    }
     final documentSelector = json['documentSelector']
         ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
-    return TextDocumentRegistrationOptions(documentSelector);
+    return TextDocumentRegistrationOptions(documentSelector: documentSelector);
   }
 
   /// A document selector to identify the scope of the registration. If set to
@@ -15865,7 +22382,8 @@
       TextDocumentSaveRegistrationOptions.canParse,
       TextDocumentSaveRegistrationOptions.fromJson);
 
-  TextDocumentSaveRegistrationOptions(this.includeText, this.documentSelector);
+  TextDocumentSaveRegistrationOptions(
+      {this.includeText, this.documentSelector});
   static TextDocumentSaveRegistrationOptions fromJson(
       Map<String, dynamic> json) {
     final includeText = json['includeText'];
@@ -15873,7 +22391,8 @@
         ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
-    return TextDocumentSaveRegistrationOptions(includeText, documentSelector);
+    return TextDocumentSaveRegistrationOptions(
+        includeText: includeText, documentSelector: documentSelector);
   }
 
   /// A document selector to identify the scope of the registration. If set to
@@ -15951,6 +22470,135 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class TextDocumentSyncClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      TextDocumentSyncClientCapabilities.canParse,
+      TextDocumentSyncClientCapabilities.fromJson);
+
+  TextDocumentSyncClientCapabilities(
+      {this.dynamicRegistration,
+      this.willSave,
+      this.willSaveWaitUntil,
+      this.didSave});
+  static TextDocumentSyncClientCapabilities fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final willSave = json['willSave'];
+    final willSaveWaitUntil = json['willSaveWaitUntil'];
+    final didSave = json['didSave'];
+    return TextDocumentSyncClientCapabilities(
+        dynamicRegistration: dynamicRegistration,
+        willSave: willSave,
+        willSaveWaitUntil: willSaveWaitUntil,
+        didSave: didSave);
+  }
+
+  /// The client supports did save notifications.
+  final bool didSave;
+
+  /// Whether text document synchronization supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// The client supports sending will save notifications.
+  final bool willSave;
+
+  /// The client supports sending a will save request and waits for a response
+  /// providing text edits which will be applied to the document before it is
+  /// saved.
+  final bool willSaveWaitUntil;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (willSave != null) {
+      __result['willSave'] = willSave;
+    }
+    if (willSaveWaitUntil != null) {
+      __result['willSaveWaitUntil'] = willSaveWaitUntil;
+    }
+    if (didSave != null) {
+      __result['didSave'] = didSave;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('willSave');
+      try {
+        if (obj['willSave'] != null && !(obj['willSave'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('willSaveWaitUntil');
+      try {
+        if (obj['willSaveWaitUntil'] != null &&
+            !(obj['willSaveWaitUntil'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('didSave');
+      try {
+        if (obj['didSave'] != null && !(obj['didSave'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter
+          .reportError('must be of type TextDocumentSyncClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is TextDocumentSyncClientCapabilities &&
+        other.runtimeType == TextDocumentSyncClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          willSave == other.willSave &&
+          willSaveWaitUntil == other.willSaveWaitUntil &&
+          didSave == other.didSave &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, willSave.hashCode);
+    hash = JenkinsSmiHash.combine(hash, willSaveWaitUntil.hashCode);
+    hash = JenkinsSmiHash.combine(hash, didSave.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// Defines how the host (editor) should sync document changes to the language
 /// server.
 class TextDocumentSyncKind {
@@ -15988,8 +22636,12 @@
   static const jsonHandler = LspJsonHandler(
       TextDocumentSyncOptions.canParse, TextDocumentSyncOptions.fromJson);
 
-  TextDocumentSyncOptions(this.openClose, this.change, this.willSave,
-      this.willSaveWaitUntil, this.save);
+  TextDocumentSyncOptions(
+      {this.openClose,
+      this.change,
+      this.willSave,
+      this.willSaveWaitUntil,
+      this.save});
   static TextDocumentSyncOptions fromJson(Map<String, dynamic> json) {
     final openClose = json['openClose'];
     final change = json['change'] != null
@@ -15997,10 +22649,21 @@
         : null;
     final willSave = json['willSave'];
     final willSaveWaitUntil = json['willSaveWaitUntil'];
-    final save =
-        json['save'] != null ? SaveOptions.fromJson(json['save']) : null;
+    final save = json['save'] is bool
+        ? Either2<bool, SaveOptions>.t1(json['save'])
+        : (SaveOptions.canParse(json['save'], nullLspJsonReporter)
+            ? Either2<bool, SaveOptions>.t2(json['save'] != null
+                ? SaveOptions.fromJson(json['save'])
+                : null)
+            : (json['save'] == null
+                ? null
+                : (throw '''${json['save']} was not one of (bool, SaveOptions)''')));
     return TextDocumentSyncOptions(
-        openClose, change, willSave, willSaveWaitUntil, save);
+        openClose: openClose,
+        change: change,
+        willSave: willSave,
+        willSaveWaitUntil: willSaveWaitUntil,
+        save: save);
   }
 
   /// Change notifications are sent to the server. See
@@ -16015,7 +22678,7 @@
 
   /// If present save notifications are sent to the server. If omitted the
   /// notification should not be sent.
-  final SaveOptions save;
+  final Either2<bool, SaveOptions> save;
 
   /// If present will save notifications are sent to the server. If omitted the
   /// notification should not be sent.
@@ -16088,8 +22751,9 @@
       reporter.push('save');
       try {
         if (obj['save'] != null &&
-            !(SaveOptions.canParse(obj['save'], reporter))) {
-          reporter.reportError('must be of type SaveOptions');
+            !((obj['save'] is bool ||
+                SaveOptions.canParse(obj['save'], reporter)))) {
+          reporter.reportError('must be of type Either2<bool, SaveOptions>');
           return false;
         }
       } finally {
@@ -16135,7 +22799,7 @@
   static const jsonHandler =
       LspJsonHandler(TextEdit.canParse, TextEdit.fromJson);
 
-  TextEdit(this.range, this.newText) {
+  TextEdit({@required this.range, @required this.newText}) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
@@ -16146,7 +22810,7 @@
   static TextEdit fromJson(Map<String, dynamic> json) {
     final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final newText = json['newText'];
-    return TextEdit(range, newText);
+    return TextEdit(range: range, newText: newText);
   }
 
   /// The string to be inserted. For delete operations use an empty string.
@@ -16227,12 +22891,443 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class TypeDefinitionClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      TypeDefinitionClientCapabilities.canParse,
+      TypeDefinitionClientCapabilities.fromJson);
+
+  TypeDefinitionClientCapabilities(
+      {this.dynamicRegistration, this.linkSupport});
+  static TypeDefinitionClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final linkSupport = json['linkSupport'];
+    return TypeDefinitionClientCapabilities(
+        dynamicRegistration: dynamicRegistration, linkSupport: linkSupport);
+  }
+
+  /// Whether implementation supports dynamic registration. If this is set to
+  /// `true` the client supports the new `TypeDefinitionRegistrationOptions`
+  /// return value for the corresponding server capability as well.
+  final bool dynamicRegistration;
+
+  /// The client supports additional metadata in the form of definition links.
+  ///  @since 3.14.0
+  final bool linkSupport;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (linkSupport != null) {
+      __result['linkSupport'] = linkSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('linkSupport');
+      try {
+        if (obj['linkSupport'] != null && !(obj['linkSupport'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type TypeDefinitionClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is TypeDefinitionClientCapabilities &&
+        other.runtimeType == TypeDefinitionClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          linkSupport == other.linkSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TypeDefinitionOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      TypeDefinitionOptions.canParse, TypeDefinitionOptions.fromJson);
+
+  TypeDefinitionOptions({this.workDoneProgress});
+  static TypeDefinitionOptions fromJson(Map<String, dynamic> json) {
+    if (TypeDefinitionRegistrationOptions.canParse(json, nullLspJsonReporter)) {
+      return TypeDefinitionRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return TypeDefinitionOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type TypeDefinitionOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is TypeDefinitionOptions &&
+        other.runtimeType == TypeDefinitionOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TypeDefinitionParams
+    implements
+        TextDocumentPositionParams,
+        WorkDoneProgressParams,
+        PartialResultParams,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      TypeDefinitionParams.canParse, TypeDefinitionParams.fromJson);
+
+  TypeDefinitionParams(
+      {@required this.textDocument,
+      @required this.position,
+      this.workDoneToken,
+      this.partialResultToken}) {
+    if (textDocument == null) {
+      throw 'textDocument is required but was not provided';
+    }
+    if (position == null) {
+      throw 'position is required but was not provided';
+    }
+  }
+  static TypeDefinitionParams fromJson(Map<String, dynamic> json) {
+    final textDocument = json['textDocument'] != null
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
+        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return TypeDefinitionParams(
+        textDocument: textDocument,
+        position: position,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
+  }
+
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
+  /// The position inside the text document.
+  final Position position;
+
+  /// The text document.
+  final TextDocumentIdentifier textDocument;
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['textDocument'] =
+        textDocument ?? (throw 'textDocument is required but was not set');
+    __result['position'] =
+        position ?? (throw 'position is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('textDocument');
+      try {
+        if (!obj.containsKey('textDocument')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['textDocument'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(TextDocumentIdentifier.canParse(obj['textDocument'], reporter))) {
+          reporter.reportError('must be of type TextDocumentIdentifier');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('position');
+      try {
+        if (!obj.containsKey('position')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['position'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(Position.canParse(obj['position'], reporter))) {
+          reporter.reportError('must be of type Position');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type TypeDefinitionParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is TypeDefinitionParams &&
+        other.runtimeType == TypeDefinitionParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TypeDefinitionRegistrationOptions
+    implements
+        TextDocumentRegistrationOptions,
+        TypeDefinitionOptions,
+        StaticRegistrationOptions,
+        ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      TypeDefinitionRegistrationOptions.canParse,
+      TypeDefinitionRegistrationOptions.fromJson);
+
+  TypeDefinitionRegistrationOptions(
+      {this.documentSelector, this.workDoneProgress, this.id});
+  static TypeDefinitionRegistrationOptions fromJson(Map<String, dynamic> json) {
+    final documentSelector = json['documentSelector']
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
+        ?.cast<DocumentFilter>()
+        ?.toList();
+    final workDoneProgress = json['workDoneProgress'];
+    final id = json['id'];
+    return TypeDefinitionRegistrationOptions(
+        documentSelector: documentSelector,
+        workDoneProgress: workDoneProgress,
+        id: id);
+  }
+
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
+  final List<DocumentFilter> documentSelector;
+
+  /// The id used to register the request. The id can be used to deregister the
+  /// request again. See also Registration#id.
+  final String id;
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['documentSelector'] = documentSelector;
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    if (id != null) {
+      __result['id'] = id;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentSelector');
+      try {
+        if (!obj.containsKey('documentSelector')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['documentSelector'] != null &&
+            !((obj['documentSelector'] is List &&
+                (obj['documentSelector'].every(
+                    (item) => DocumentFilter.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<DocumentFilter>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('id');
+      try {
+        if (obj['id'] != null && !(obj['id'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type TypeDefinitionRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is TypeDefinitionRegistrationOptions &&
+        other.runtimeType == TypeDefinitionRegistrationOptions) {
+      return listEqual(documentSelector, other.documentSelector,
+              (DocumentFilter a, DocumentFilter b) => a == b) &&
+          workDoneProgress == other.workDoneProgress &&
+          id == other.id &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(documentSelector));
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// General parameters to unregister a capability.
 class Unregistration implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(Unregistration.canParse, Unregistration.fromJson);
 
-  Unregistration(this.id, this.method) {
+  Unregistration({@required this.id, @required this.method}) {
     if (id == null) {
       throw 'id is required but was not provided';
     }
@@ -16243,7 +23338,7 @@
   static Unregistration fromJson(Map<String, dynamic> json) {
     final id = json['id'];
     final method = json['method'];
-    return Unregistration(id, method);
+    return Unregistration(id: id, method: method);
   }
 
   /// The id used to unregister the request or notification. Usually an id
@@ -16327,7 +23422,7 @@
   static const jsonHandler = LspJsonHandler(
       UnregistrationParams.canParse, UnregistrationParams.fromJson);
 
-  UnregistrationParams(this.unregisterations) {
+  UnregistrationParams({@required this.unregisterations}) {
     if (unregisterations == null) {
       throw 'unregisterations is required but was not provided';
     }
@@ -16337,9 +23432,12 @@
         ?.map((item) => item != null ? Unregistration.fromJson(item) : null)
         ?.cast<Unregistration>()
         ?.toList();
-    return UnregistrationParams(unregisterations);
+    return UnregistrationParams(unregisterations: unregisterations);
   }
 
+  /// This should correctly be named `unregistrations`. However changing this //
+  /// is a breaking change and needs to wait until we deliver a 4.x version //
+  /// of the specification.
   final List<Unregistration> unregisterations;
 
   Map<String, dynamic> toJson() {
@@ -16405,7 +23503,7 @@
       VersionedTextDocumentIdentifier.canParse,
       VersionedTextDocumentIdentifier.fromJson);
 
-  VersionedTextDocumentIdentifier(this.version, this.uri) {
+  VersionedTextDocumentIdentifier({this.version, @required this.uri}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -16413,7 +23511,7 @@
   static VersionedTextDocumentIdentifier fromJson(Map<String, dynamic> json) {
     final version = json['version'];
     final uri = json['uri'];
-    return VersionedTextDocumentIdentifier(version, uri);
+    return VersionedTextDocumentIdentifier(version: version, uri: uri);
   }
 
   /// The text document's URI.
@@ -16423,7 +23521,7 @@
   /// identifier is sent from the server to the client and the file is not open
   /// in the editor (the server has not received an open notification before)
   /// the server can send `null` to indicate that the version is known and the
-  /// content on disk is the truth (as speced with document content ownership).
+  /// content on disk is the master (as speced with document content ownership).
   ///
   /// The version number of a document will increase after each change,
   /// including undo/redo. The number doesn't need to be consecutive.
@@ -16531,7 +23629,8 @@
   static const jsonHandler = LspJsonHandler(
       WillSaveTextDocumentParams.canParse, WillSaveTextDocumentParams.fromJson);
 
-  WillSaveTextDocumentParams(this.textDocument, this.reason) {
+  WillSaveTextDocumentParams(
+      {@required this.textDocument, @required this.reason}) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
     }
@@ -16544,7 +23643,8 @@
         ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final reason = json['reason'];
-    return WillSaveTextDocumentParams(textDocument, reason);
+    return WillSaveTextDocumentParams(
+        textDocument: textDocument, reason: reason);
   }
 
   /// The 'TextDocumentSaveReason'.
@@ -16627,568 +23727,138 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Workspace specific client capabilities.
-class WorkspaceClientCapabilities implements ToJsonable {
+class WorkDoneProgressBegin implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
-      WorkspaceClientCapabilities.canParse,
-      WorkspaceClientCapabilities.fromJson);
+      WorkDoneProgressBegin.canParse, WorkDoneProgressBegin.fromJson);
 
-  WorkspaceClientCapabilities(
-      this.applyEdit,
-      this.workspaceEdit,
-      this.didChangeConfiguration,
-      this.didChangeWatchedFiles,
-      this.symbol,
-      this.executeCommand,
-      this.workspaceFolders,
-      this.configuration);
-  static WorkspaceClientCapabilities fromJson(Map<String, dynamic> json) {
-    final applyEdit = json['applyEdit'];
-    final workspaceEdit = json['workspaceEdit'] != null
-        ? WorkspaceClientCapabilitiesWorkspaceEdit.fromJson(
-            json['workspaceEdit'])
-        : null;
-    final didChangeConfiguration = json['didChangeConfiguration'] != null
-        ? WorkspaceClientCapabilitiesDidChangeConfiguration.fromJson(
-            json['didChangeConfiguration'])
-        : null;
-    final didChangeWatchedFiles = json['didChangeWatchedFiles'] != null
-        ? WorkspaceClientCapabilitiesDidChangeWatchedFiles.fromJson(
-            json['didChangeWatchedFiles'])
-        : null;
-    final symbol = json['symbol'] != null
-        ? WorkspaceClientCapabilitiesSymbol.fromJson(json['symbol'])
-        : null;
-    final executeCommand = json['executeCommand'] != null
-        ? WorkspaceClientCapabilitiesExecuteCommand.fromJson(
-            json['executeCommand'])
-        : null;
-    final workspaceFolders = json['workspaceFolders'];
-    final configuration = json['configuration'];
-    return WorkspaceClientCapabilities(
-        applyEdit,
-        workspaceEdit,
-        didChangeConfiguration,
-        didChangeWatchedFiles,
-        symbol,
-        executeCommand,
-        workspaceFolders,
-        configuration);
+  WorkDoneProgressBegin(
+      {@required this.kind,
+      @required this.title,
+      this.cancellable,
+      this.message,
+      this.percentage}) {
+    if (kind == null) {
+      throw 'kind is required but was not provided';
+    }
+    if (title == null) {
+      throw 'title is required but was not provided';
+    }
+  }
+  static WorkDoneProgressBegin fromJson(Map<String, dynamic> json) {
+    final kind = json['kind'];
+    final title = json['title'];
+    final cancellable = json['cancellable'];
+    final message = json['message'];
+    final percentage = json['percentage'];
+    return WorkDoneProgressBegin(
+        kind: kind,
+        title: title,
+        cancellable: cancellable,
+        message: message,
+        percentage: percentage);
   }
 
-  /// The client supports applying batch edits to the workspace by supporting
-  /// the request 'workspace/applyEdit'
-  final bool applyEdit;
+  /// Controls if a cancel button should show to allow the user to cancel the
+  /// long running operation. Clients that don't support cancellation are
+  /// allowed to ignore the setting.
+  final bool cancellable;
+  final String kind;
 
-  /// The client supports `workspace/configuration` requests.
+  /// Optional, more detailed associated progress message. Contains
+  /// complementary information to the `title`.
   ///
-  /// Since 3.6.0
-  final bool configuration;
+  /// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". If
+  /// unset, the previous progress message (if any) is still valid.
+  final String message;
 
-  /// Capabilities specific to the `workspace/didChangeConfiguration`
-  /// notification.
-  final WorkspaceClientCapabilitiesDidChangeConfiguration
-      didChangeConfiguration;
-
-  /// Capabilities specific to the `workspace/didChangeWatchedFiles`
-  /// notification.
-  final WorkspaceClientCapabilitiesDidChangeWatchedFiles didChangeWatchedFiles;
-
-  /// Capabilities specific to the `workspace/executeCommand` request.
-  final WorkspaceClientCapabilitiesExecuteCommand executeCommand;
-
-  /// Capabilities specific to the `workspace/symbol` request.
-  final WorkspaceClientCapabilitiesSymbol symbol;
-
-  /// Capabilities specific to `WorkspaceEdit`s
-  final WorkspaceClientCapabilitiesWorkspaceEdit workspaceEdit;
-
-  /// The client has support for workspace folders.
+  /// Optional progress percentage to display (value 100 is considered 100%). If
+  /// not provided infinite progress is assumed and clients are allowed to
+  /// ignore the `percentage` value in subsequent in report notifications.
   ///
-  /// Since 3.6.0
-  final bool workspaceFolders;
+  /// The value should be steadily rising. Clients are free to ignore values
+  /// that are not following this rule.
+  final num percentage;
 
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (applyEdit != null) {
-      __result['applyEdit'] = applyEdit;
-    }
-    if (workspaceEdit != null) {
-      __result['workspaceEdit'] = workspaceEdit;
-    }
-    if (didChangeConfiguration != null) {
-      __result['didChangeConfiguration'] = didChangeConfiguration;
-    }
-    if (didChangeWatchedFiles != null) {
-      __result['didChangeWatchedFiles'] = didChangeWatchedFiles;
-    }
-    if (symbol != null) {
-      __result['symbol'] = symbol;
-    }
-    if (executeCommand != null) {
-      __result['executeCommand'] = executeCommand;
-    }
-    if (workspaceFolders != null) {
-      __result['workspaceFolders'] = workspaceFolders;
-    }
-    if (configuration != null) {
-      __result['configuration'] = configuration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('applyEdit');
-      try {
-        if (obj['applyEdit'] != null && !(obj['applyEdit'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('workspaceEdit');
-      try {
-        if (obj['workspaceEdit'] != null &&
-            !(WorkspaceClientCapabilitiesWorkspaceEdit.canParse(
-                obj['workspaceEdit'], reporter))) {
-          reporter.reportError(
-              'must be of type WorkspaceClientCapabilitiesWorkspaceEdit');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('didChangeConfiguration');
-      try {
-        if (obj['didChangeConfiguration'] != null &&
-            !(WorkspaceClientCapabilitiesDidChangeConfiguration.canParse(
-                obj['didChangeConfiguration'], reporter))) {
-          reporter.reportError(
-              'must be of type WorkspaceClientCapabilitiesDidChangeConfiguration');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('didChangeWatchedFiles');
-      try {
-        if (obj['didChangeWatchedFiles'] != null &&
-            !(WorkspaceClientCapabilitiesDidChangeWatchedFiles.canParse(
-                obj['didChangeWatchedFiles'], reporter))) {
-          reporter.reportError(
-              'must be of type WorkspaceClientCapabilitiesDidChangeWatchedFiles');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('symbol');
-      try {
-        if (obj['symbol'] != null &&
-            !(WorkspaceClientCapabilitiesSymbol.canParse(
-                obj['symbol'], reporter))) {
-          reporter
-              .reportError('must be of type WorkspaceClientCapabilitiesSymbol');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('executeCommand');
-      try {
-        if (obj['executeCommand'] != null &&
-            !(WorkspaceClientCapabilitiesExecuteCommand.canParse(
-                obj['executeCommand'], reporter))) {
-          reporter.reportError(
-              'must be of type WorkspaceClientCapabilitiesExecuteCommand');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('workspaceFolders');
-      try {
-        if (obj['workspaceFolders'] != null &&
-            !(obj['workspaceFolders'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('configuration');
-      try {
-        if (obj['configuration'] != null && !(obj['configuration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError('must be of type WorkspaceClientCapabilities');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is WorkspaceClientCapabilities &&
-        other.runtimeType == WorkspaceClientCapabilities) {
-      return applyEdit == other.applyEdit &&
-          workspaceEdit == other.workspaceEdit &&
-          didChangeConfiguration == other.didChangeConfiguration &&
-          didChangeWatchedFiles == other.didChangeWatchedFiles &&
-          symbol == other.symbol &&
-          executeCommand == other.executeCommand &&
-          workspaceFolders == other.workspaceFolders &&
-          configuration == other.configuration &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, applyEdit.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workspaceEdit.hashCode);
-    hash = JenkinsSmiHash.combine(hash, didChangeConfiguration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, didChangeWatchedFiles.hashCode);
-    hash = JenkinsSmiHash.combine(hash, symbol.hashCode);
-    hash = JenkinsSmiHash.combine(hash, executeCommand.hashCode);
-    hash = JenkinsSmiHash.combine(hash, workspaceFolders.hashCode);
-    hash = JenkinsSmiHash.combine(hash, configuration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class WorkspaceClientCapabilitiesDidChangeConfiguration implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      WorkspaceClientCapabilitiesDidChangeConfiguration.canParse,
-      WorkspaceClientCapabilitiesDidChangeConfiguration.fromJson);
-
-  WorkspaceClientCapabilitiesDidChangeConfiguration(this.dynamicRegistration);
-  static WorkspaceClientCapabilitiesDidChangeConfiguration fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return WorkspaceClientCapabilitiesDidChangeConfiguration(
-        dynamicRegistration);
-  }
-
-  /// Did change configuration notification supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type WorkspaceClientCapabilitiesDidChangeConfiguration');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is WorkspaceClientCapabilitiesDidChangeConfiguration &&
-        other.runtimeType ==
-            WorkspaceClientCapabilitiesDidChangeConfiguration) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class WorkspaceClientCapabilitiesDidChangeWatchedFiles implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      WorkspaceClientCapabilitiesDidChangeWatchedFiles.canParse,
-      WorkspaceClientCapabilitiesDidChangeWatchedFiles.fromJson);
-
-  WorkspaceClientCapabilitiesDidChangeWatchedFiles(this.dynamicRegistration);
-  static WorkspaceClientCapabilitiesDidChangeWatchedFiles fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return WorkspaceClientCapabilitiesDidChangeWatchedFiles(
-        dynamicRegistration);
-  }
-
-  /// Did change watched files notification supports dynamic registration.
-  /// Please note that the current protocol doesn't support static configuration
-  /// for file changes from the server side.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type WorkspaceClientCapabilitiesDidChangeWatchedFiles');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is WorkspaceClientCapabilitiesDidChangeWatchedFiles &&
-        other.runtimeType == WorkspaceClientCapabilitiesDidChangeWatchedFiles) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class WorkspaceClientCapabilitiesExecuteCommand implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      WorkspaceClientCapabilitiesExecuteCommand.canParse,
-      WorkspaceClientCapabilitiesExecuteCommand.fromJson);
-
-  WorkspaceClientCapabilitiesExecuteCommand(this.dynamicRegistration);
-  static WorkspaceClientCapabilitiesExecuteCommand fromJson(
-      Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    return WorkspaceClientCapabilitiesExecuteCommand(dynamicRegistration);
-  }
-
-  /// Execute command supports dynamic registration.
-  final bool dynamicRegistration;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError(
-          'must be of type WorkspaceClientCapabilitiesExecuteCommand');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is WorkspaceClientCapabilitiesExecuteCommand &&
-        other.runtimeType == WorkspaceClientCapabilitiesExecuteCommand) {
-      return dynamicRegistration == other.dynamicRegistration && true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class WorkspaceClientCapabilitiesSymbol implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      WorkspaceClientCapabilitiesSymbol.canParse,
-      WorkspaceClientCapabilitiesSymbol.fromJson);
-
-  WorkspaceClientCapabilitiesSymbol(this.dynamicRegistration, this.symbolKind);
-  static WorkspaceClientCapabilitiesSymbol fromJson(Map<String, dynamic> json) {
-    final dynamicRegistration = json['dynamicRegistration'];
-    final symbolKind = json['symbolKind'] != null
-        ? WorkspaceClientCapabilitiesSymbolKind.fromJson(json['symbolKind'])
-        : null;
-    return WorkspaceClientCapabilitiesSymbol(dynamicRegistration, symbolKind);
-  }
-
-  /// Symbol request supports dynamic registration.
-  final bool dynamicRegistration;
-
-  /// Specific capabilities for the `SymbolKind` in the `workspace/symbol`
-  /// request.
-  final WorkspaceClientCapabilitiesSymbolKind symbolKind;
-
-  Map<String, dynamic> toJson() {
-    var __result = <String, dynamic>{};
-    if (dynamicRegistration != null) {
-      __result['dynamicRegistration'] = dynamicRegistration;
-    }
-    if (symbolKind != null) {
-      __result['symbolKind'] = symbolKind;
-    }
-    return __result;
-  }
-
-  static bool canParse(Object obj, LspJsonReporter reporter) {
-    if (obj is Map<String, dynamic>) {
-      reporter.push('dynamicRegistration');
-      try {
-        if (obj['dynamicRegistration'] != null &&
-            !(obj['dynamicRegistration'] is bool)) {
-          reporter.reportError('must be of type bool');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('symbolKind');
-      try {
-        if (obj['symbolKind'] != null &&
-            !(WorkspaceClientCapabilitiesSymbolKind.canParse(
-                obj['symbolKind'], reporter))) {
-          reporter.reportError(
-              'must be of type WorkspaceClientCapabilitiesSymbolKind');
-          return false;
-        }
-      } finally {
-        reporter.pop();
-      }
-      return true;
-    } else {
-      reporter.reportError('must be of type WorkspaceClientCapabilitiesSymbol');
-      return false;
-    }
-  }
-
-  @override
-  bool operator ==(Object other) {
-    if (other is WorkspaceClientCapabilitiesSymbol &&
-        other.runtimeType == WorkspaceClientCapabilitiesSymbol) {
-      return dynamicRegistration == other.dynamicRegistration &&
-          symbolKind == other.symbolKind &&
-          true;
-    }
-    return false;
-  }
-
-  @override
-  int get hashCode {
-    var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
-    hash = JenkinsSmiHash.combine(hash, symbolKind.hashCode);
-    return JenkinsSmiHash.finish(hash);
-  }
-
-  @override
-  String toString() => jsonEncoder.convert(toJson());
-}
-
-class WorkspaceClientCapabilitiesSymbolKind implements ToJsonable {
-  static const jsonHandler = LspJsonHandler(
-      WorkspaceClientCapabilitiesSymbolKind.canParse,
-      WorkspaceClientCapabilitiesSymbolKind.fromJson);
-
-  WorkspaceClientCapabilitiesSymbolKind(this.valueSet);
-  static WorkspaceClientCapabilitiesSymbolKind fromJson(
-      Map<String, dynamic> json) {
-    final valueSet = json['valueSet']
-        ?.map((item) => item != null ? SymbolKind.fromJson(item) : null)
-        ?.cast<SymbolKind>()
-        ?.toList();
-    return WorkspaceClientCapabilitiesSymbolKind(valueSet);
-  }
-
-  /// The symbol kind values the client supports. When this property exists the
-  /// client also guarantees that it will handle values outside its set
-  /// gracefully and falls back to a default value when unknown.
+  /// Mandatory title of the progress operation. Used to briefly inform about
+  /// the kind of operation being performed.
   ///
-  /// If this property is not present the client only supports the symbol kinds
-  /// from `File` to `Array` as defined in the initial version of the protocol.
-  final List<SymbolKind> valueSet;
+  /// Examples: "Indexing" or "Linking dependencies".
+  final String title;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
-    if (valueSet != null) {
-      __result['valueSet'] = valueSet;
+    __result['kind'] = kind ?? (throw 'kind is required but was not set');
+    __result['title'] = title ?? (throw 'title is required but was not set');
+    if (cancellable != null) {
+      __result['cancellable'] = cancellable;
+    }
+    if (message != null) {
+      __result['message'] = message;
+    }
+    if (percentage != null) {
+      __result['percentage'] = percentage;
     }
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
-      reporter.push('valueSet');
+      reporter.push('kind');
       try {
-        if (obj['valueSet'] != null &&
-            !((obj['valueSet'] is List &&
-                (obj['valueSet']
-                    .every((item) => SymbolKind.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<SymbolKind>');
+        if (!obj.containsKey('kind')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['kind'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(obj['kind'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('title');
+      try {
+        if (!obj.containsKey('title')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['title'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(obj['title'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('cancellable');
+      try {
+        if (obj['cancellable'] != null && !(obj['cancellable'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('message');
+      try {
+        if (obj['message'] != null && !(obj['message'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('percentage');
+      try {
+        if (obj['percentage'] != null && !(obj['percentage'] is num)) {
+          reporter.reportError('must be of type num');
           return false;
         }
       } finally {
@@ -17196,18 +23866,20 @@
       }
       return true;
     } else {
-      reporter
-          .reportError('must be of type WorkspaceClientCapabilitiesSymbolKind');
+      reporter.reportError('must be of type WorkDoneProgressBegin');
       return false;
     }
   }
 
   @override
   bool operator ==(Object other) {
-    if (other is WorkspaceClientCapabilitiesSymbolKind &&
-        other.runtimeType == WorkspaceClientCapabilitiesSymbolKind) {
-      return listEqual(valueSet, other.valueSet,
-              (SymbolKind a, SymbolKind b) => a == b) &&
+    if (other is WorkDoneProgressBegin &&
+        other.runtimeType == WorkDoneProgressBegin) {
+      return kind == other.kind &&
+          title == other.title &&
+          cancellable == other.cancellable &&
+          message == other.message &&
+          percentage == other.percentage &&
           true;
     }
     return false;
@@ -17216,7 +23888,11 @@
   @override
   int get hashCode {
     var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, title.hashCode);
+    hash = JenkinsSmiHash.combine(hash, cancellable.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, percentage.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -17224,82 +23900,48 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
-class WorkspaceClientCapabilitiesWorkspaceEdit implements ToJsonable {
+class WorkDoneProgressCancelParams implements ToJsonable {
   static const jsonHandler = LspJsonHandler(
-      WorkspaceClientCapabilitiesWorkspaceEdit.canParse,
-      WorkspaceClientCapabilitiesWorkspaceEdit.fromJson);
+      WorkDoneProgressCancelParams.canParse,
+      WorkDoneProgressCancelParams.fromJson);
 
-  WorkspaceClientCapabilitiesWorkspaceEdit(
-      this.documentChanges, this.resourceOperations, this.failureHandling);
-  static WorkspaceClientCapabilitiesWorkspaceEdit fromJson(
-      Map<String, dynamic> json) {
-    final documentChanges = json['documentChanges'];
-    final resourceOperations = json['resourceOperations']
-        ?.map((item) =>
-            item != null ? ResourceOperationKind.fromJson(item) : null)
-        ?.cast<ResourceOperationKind>()
-        ?.toList();
-    final failureHandling = json['failureHandling'] != null
-        ? FailureHandlingKind.fromJson(json['failureHandling'])
-        : null;
-    return WorkspaceClientCapabilitiesWorkspaceEdit(
-        documentChanges, resourceOperations, failureHandling);
+  WorkDoneProgressCancelParams({@required this.token}) {
+    if (token == null) {
+      throw 'token is required but was not provided';
+    }
+  }
+  static WorkDoneProgressCancelParams fromJson(Map<String, dynamic> json) {
+    final token = json['token'] is num
+        ? Either2<num, String>.t1(json['token'])
+        : (json['token'] is String
+            ? Either2<num, String>.t2(json['token'])
+            : (throw '''${json['token']} was not one of (num, String)'''));
+    return WorkDoneProgressCancelParams(token: token);
   }
 
-  /// The client supports versioned document changes in `WorkspaceEdit`s
-  final bool documentChanges;
-
-  /// The failure handling strategy of a client if applying the workspace edit
-  /// fails.
-  final FailureHandlingKind failureHandling;
-
-  /// The resource operations the client supports. Clients should at least
-  /// support 'create', 'rename' and 'delete' files and folders.
-  final List<ResourceOperationKind> resourceOperations;
+  /// The token to be used to report progress.
+  final Either2<num, String> token;
 
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
-    if (documentChanges != null) {
-      __result['documentChanges'] = documentChanges;
-    }
-    if (resourceOperations != null) {
-      __result['resourceOperations'] = resourceOperations;
-    }
-    if (failureHandling != null) {
-      __result['failureHandling'] = failureHandling;
-    }
+    __result['token'] = token ?? (throw 'token is required but was not set');
     return __result;
   }
 
   static bool canParse(Object obj, LspJsonReporter reporter) {
     if (obj is Map<String, dynamic>) {
-      reporter.push('documentChanges');
+      reporter.push('token');
       try {
-        if (obj['documentChanges'] != null &&
-            !(obj['documentChanges'] is bool)) {
-          reporter.reportError('must be of type bool');
+        if (!obj.containsKey('token')) {
+          reporter.reportError('must not be undefined');
           return false;
         }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('resourceOperations');
-      try {
-        if (obj['resourceOperations'] != null &&
-            !((obj['resourceOperations'] is List &&
-                (obj['resourceOperations'].every((item) =>
-                    ResourceOperationKind.canParse(item, reporter)))))) {
-          reporter.reportError('must be of type List<ResourceOperationKind>');
+        if (obj['token'] == null) {
+          reporter.reportError('must not be null');
           return false;
         }
-      } finally {
-        reporter.pop();
-      }
-      reporter.push('failureHandling');
-      try {
-        if (obj['failureHandling'] != null &&
-            !(FailureHandlingKind.canParse(obj['failureHandling'], reporter))) {
-          reporter.reportError('must be of type FailureHandlingKind');
+        if (!((obj['token'] is num || obj['token'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
           return false;
         }
       } finally {
@@ -17307,20 +23949,570 @@
       }
       return true;
     } else {
-      reporter.reportError(
-          'must be of type WorkspaceClientCapabilitiesWorkspaceEdit');
+      reporter.reportError('must be of type WorkDoneProgressCancelParams');
       return false;
     }
   }
 
   @override
   bool operator ==(Object other) {
-    if (other is WorkspaceClientCapabilitiesWorkspaceEdit &&
-        other.runtimeType == WorkspaceClientCapabilitiesWorkspaceEdit) {
-      return documentChanges == other.documentChanges &&
-          listEqual(resourceOperations, other.resourceOperations,
-              (ResourceOperationKind a, ResourceOperationKind b) => a == b) &&
-          failureHandling == other.failureHandling &&
+    if (other is WorkDoneProgressCancelParams &&
+        other.runtimeType == WorkDoneProgressCancelParams) {
+      return token == other.token && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, token.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkDoneProgressCreateParams implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkDoneProgressCreateParams.canParse,
+      WorkDoneProgressCreateParams.fromJson);
+
+  WorkDoneProgressCreateParams({@required this.token}) {
+    if (token == null) {
+      throw 'token is required but was not provided';
+    }
+  }
+  static WorkDoneProgressCreateParams fromJson(Map<String, dynamic> json) {
+    final token = json['token'] is num
+        ? Either2<num, String>.t1(json['token'])
+        : (json['token'] is String
+            ? Either2<num, String>.t2(json['token'])
+            : (throw '''${json['token']} was not one of (num, String)'''));
+    return WorkDoneProgressCreateParams(token: token);
+  }
+
+  /// The token to be used to report progress.
+  final Either2<num, String> token;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['token'] = token ?? (throw 'token is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('token');
+      try {
+        if (!obj.containsKey('token')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['token'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!((obj['token'] is num || obj['token'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type WorkDoneProgressCreateParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkDoneProgressCreateParams &&
+        other.runtimeType == WorkDoneProgressCreateParams) {
+      return token == other.token && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, token.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkDoneProgressEnd implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkDoneProgressEnd.canParse, WorkDoneProgressEnd.fromJson);
+
+  WorkDoneProgressEnd({@required this.kind, this.message}) {
+    if (kind == null) {
+      throw 'kind is required but was not provided';
+    }
+  }
+  static WorkDoneProgressEnd fromJson(Map<String, dynamic> json) {
+    final kind = json['kind'];
+    final message = json['message'];
+    return WorkDoneProgressEnd(kind: kind, message: message);
+  }
+
+  final String kind;
+
+  /// Optional, a final message indicating to for example indicate the outcome
+  /// of the operation.
+  final String message;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['kind'] = kind ?? (throw 'kind is required but was not set');
+    if (message != null) {
+      __result['message'] = message;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('kind');
+      try {
+        if (!obj.containsKey('kind')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['kind'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(obj['kind'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('message');
+      try {
+        if (obj['message'] != null && !(obj['message'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type WorkDoneProgressEnd');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkDoneProgressEnd &&
+        other.runtimeType == WorkDoneProgressEnd) {
+      return kind == other.kind && message == other.message && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkDoneProgressOptions implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkDoneProgressOptions.canParse, WorkDoneProgressOptions.fromJson);
+
+  WorkDoneProgressOptions({this.workDoneProgress});
+  static WorkDoneProgressOptions fromJson(Map<String, dynamic> json) {
+    if (WorkspaceSymbolOptions.canParse(json, nullLspJsonReporter)) {
+      return WorkspaceSymbolOptions.fromJson(json);
+    }
+    if (ExecuteCommandOptions.canParse(json, nullLspJsonReporter)) {
+      return ExecuteCommandOptions.fromJson(json);
+    }
+    if (CompletionOptions.canParse(json, nullLspJsonReporter)) {
+      return CompletionOptions.fromJson(json);
+    }
+    if (HoverOptions.canParse(json, nullLspJsonReporter)) {
+      return HoverOptions.fromJson(json);
+    }
+    if (SignatureHelpOptions.canParse(json, nullLspJsonReporter)) {
+      return SignatureHelpOptions.fromJson(json);
+    }
+    if (DeclarationOptions.canParse(json, nullLspJsonReporter)) {
+      return DeclarationOptions.fromJson(json);
+    }
+    if (DefinitionOptions.canParse(json, nullLspJsonReporter)) {
+      return DefinitionOptions.fromJson(json);
+    }
+    if (TypeDefinitionOptions.canParse(json, nullLspJsonReporter)) {
+      return TypeDefinitionOptions.fromJson(json);
+    }
+    if (ImplementationOptions.canParse(json, nullLspJsonReporter)) {
+      return ImplementationOptions.fromJson(json);
+    }
+    if (ReferenceOptions.canParse(json, nullLspJsonReporter)) {
+      return ReferenceOptions.fromJson(json);
+    }
+    if (DocumentHighlightOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentHighlightOptions.fromJson(json);
+    }
+    if (DocumentSymbolOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentSymbolOptions.fromJson(json);
+    }
+    if (CodeActionOptions.canParse(json, nullLspJsonReporter)) {
+      return CodeActionOptions.fromJson(json);
+    }
+    if (CodeLensOptions.canParse(json, nullLspJsonReporter)) {
+      return CodeLensOptions.fromJson(json);
+    }
+    if (DocumentLinkOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentLinkOptions.fromJson(json);
+    }
+    if (DocumentColorOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentColorOptions.fromJson(json);
+    }
+    if (DocumentFormattingOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentFormattingOptions.fromJson(json);
+    }
+    if (DocumentRangeFormattingOptions.canParse(json, nullLspJsonReporter)) {
+      return DocumentRangeFormattingOptions.fromJson(json);
+    }
+    if (RenameOptions.canParse(json, nullLspJsonReporter)) {
+      return RenameOptions.fromJson(json);
+    }
+    if (FoldingRangeOptions.canParse(json, nullLspJsonReporter)) {
+      return FoldingRangeOptions.fromJson(json);
+    }
+    if (SelectionRangeOptions.canParse(json, nullLspJsonReporter)) {
+      return SelectionRangeOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return WorkDoneProgressOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type WorkDoneProgressOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkDoneProgressOptions &&
+        other.runtimeType == WorkDoneProgressOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkDoneProgressParams implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkDoneProgressParams.canParse, WorkDoneProgressParams.fromJson);
+
+  WorkDoneProgressParams({this.workDoneToken});
+  static WorkDoneProgressParams fromJson(Map<String, dynamic> json) {
+    if (InitializeParams.canParse(json, nullLspJsonReporter)) {
+      return InitializeParams.fromJson(json);
+    }
+    if (WorkspaceSymbolParams.canParse(json, nullLspJsonReporter)) {
+      return WorkspaceSymbolParams.fromJson(json);
+    }
+    if (ExecuteCommandParams.canParse(json, nullLspJsonReporter)) {
+      return ExecuteCommandParams.fromJson(json);
+    }
+    if (CompletionParams.canParse(json, nullLspJsonReporter)) {
+      return CompletionParams.fromJson(json);
+    }
+    if (HoverParams.canParse(json, nullLspJsonReporter)) {
+      return HoverParams.fromJson(json);
+    }
+    if (SignatureHelpParams.canParse(json, nullLspJsonReporter)) {
+      return SignatureHelpParams.fromJson(json);
+    }
+    if (DeclarationParams.canParse(json, nullLspJsonReporter)) {
+      return DeclarationParams.fromJson(json);
+    }
+    if (DefinitionParams.canParse(json, nullLspJsonReporter)) {
+      return DefinitionParams.fromJson(json);
+    }
+    if (TypeDefinitionParams.canParse(json, nullLspJsonReporter)) {
+      return TypeDefinitionParams.fromJson(json);
+    }
+    if (ImplementationParams.canParse(json, nullLspJsonReporter)) {
+      return ImplementationParams.fromJson(json);
+    }
+    if (ReferenceParams.canParse(json, nullLspJsonReporter)) {
+      return ReferenceParams.fromJson(json);
+    }
+    if (DocumentHighlightParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentHighlightParams.fromJson(json);
+    }
+    if (DocumentSymbolParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentSymbolParams.fromJson(json);
+    }
+    if (CodeActionParams.canParse(json, nullLspJsonReporter)) {
+      return CodeActionParams.fromJson(json);
+    }
+    if (CodeLensParams.canParse(json, nullLspJsonReporter)) {
+      return CodeLensParams.fromJson(json);
+    }
+    if (DocumentLinkParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentLinkParams.fromJson(json);
+    }
+    if (DocumentColorParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentColorParams.fromJson(json);
+    }
+    if (ColorPresentationParams.canParse(json, nullLspJsonReporter)) {
+      return ColorPresentationParams.fromJson(json);
+    }
+    if (DocumentFormattingParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentFormattingParams.fromJson(json);
+    }
+    if (DocumentRangeFormattingParams.canParse(json, nullLspJsonReporter)) {
+      return DocumentRangeFormattingParams.fromJson(json);
+    }
+    if (RenameParams.canParse(json, nullLspJsonReporter)) {
+      return RenameParams.fromJson(json);
+    }
+    if (FoldingRangeParams.canParse(json, nullLspJsonReporter)) {
+      return FoldingRangeParams.fromJson(json);
+    }
+    if (SelectionRangeParams.canParse(json, nullLspJsonReporter)) {
+      return SelectionRangeParams.fromJson(json);
+    }
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    return WorkDoneProgressParams(workDoneToken: workDoneToken);
+  }
+
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type WorkDoneProgressParams');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkDoneProgressParams &&
+        other.runtimeType == WorkDoneProgressParams) {
+      return workDoneToken == other.workDoneToken && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkDoneProgressReport implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkDoneProgressReport.canParse, WorkDoneProgressReport.fromJson);
+
+  WorkDoneProgressReport(
+      {@required this.kind, this.cancellable, this.message, this.percentage}) {
+    if (kind == null) {
+      throw 'kind is required but was not provided';
+    }
+  }
+  static WorkDoneProgressReport fromJson(Map<String, dynamic> json) {
+    final kind = json['kind'];
+    final cancellable = json['cancellable'];
+    final message = json['message'];
+    final percentage = json['percentage'];
+    return WorkDoneProgressReport(
+        kind: kind,
+        cancellable: cancellable,
+        message: message,
+        percentage: percentage);
+  }
+
+  /// Controls enablement state of a cancel button. This property is only valid
+  /// if a cancel button got requested in the `WorkDoneProgressStart` payload.
+  ///
+  /// Clients that don't support cancellation or don't support control the
+  /// button's enablement state are allowed to ignore the setting.
+  final bool cancellable;
+  final String kind;
+
+  /// Optional, more detailed associated progress message. Contains
+  /// complementary information to the `title`.
+  ///
+  /// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". If
+  /// unset, the previous progress message (if any) is still valid.
+  final String message;
+
+  /// Optional progress percentage to display (value 100 is considered 100%). If
+  /// not provided infinite progress is assumed and clients are allowed to
+  /// ignore the `percentage` value in subsequent in report notifications.
+  ///
+  /// The value should be steadily rising. Clients are free to ignore values
+  /// that are not following this rule.
+  final num percentage;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    __result['kind'] = kind ?? (throw 'kind is required but was not set');
+    if (cancellable != null) {
+      __result['cancellable'] = cancellable;
+    }
+    if (message != null) {
+      __result['message'] = message;
+    }
+    if (percentage != null) {
+      __result['percentage'] = percentage;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('kind');
+      try {
+        if (!obj.containsKey('kind')) {
+          reporter.reportError('must not be undefined');
+          return false;
+        }
+        if (obj['kind'] == null) {
+          reporter.reportError('must not be null');
+          return false;
+        }
+        if (!(obj['kind'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('cancellable');
+      try {
+        if (obj['cancellable'] != null && !(obj['cancellable'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('message');
+      try {
+        if (obj['message'] != null && !(obj['message'] is String)) {
+          reporter.reportError('must be of type String');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('percentage');
+      try {
+        if (obj['percentage'] != null && !(obj['percentage'] is num)) {
+          reporter.reportError('must be of type num');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type WorkDoneProgressReport');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkDoneProgressReport &&
+        other.runtimeType == WorkDoneProgressReport) {
+      return kind == other.kind &&
+          cancellable == other.cancellable &&
+          message == other.message &&
+          percentage == other.percentage &&
           true;
     }
     return false;
@@ -17329,9 +24521,10 @@
   @override
   int get hashCode {
     var hash = 0;
-    hash = JenkinsSmiHash.combine(hash, documentChanges.hashCode);
-    hash = JenkinsSmiHash.combine(hash, lspHashCode(resourceOperations));
-    hash = JenkinsSmiHash.combine(hash, failureHandling.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, cancellable.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, percentage.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
@@ -17343,7 +24536,7 @@
   static const jsonHandler =
       LspJsonHandler(WorkspaceEdit.canParse, WorkspaceEdit.fromJson);
 
-  WorkspaceEdit(this.changes, this.documentChanges);
+  WorkspaceEdit({this.changes, this.documentChanges});
   static WorkspaceEdit fromJson(Map<String, dynamic> json) {
     final changes = json['changes']
         ?.map((key, value) => MapEntry(
@@ -17371,7 +24564,7 @@
                 ?.cast<Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>>()
                 ?.toList())
             : (json['documentChanges'] == null ? null : (throw '''${json['documentChanges']} was not one of (List<TextDocumentEdit>, List<Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>>)''')));
-    return WorkspaceEdit(changes, documentChanges);
+    return WorkspaceEdit(changes: changes, documentChanges: documentChanges);
   }
 
   /// Holds changes to existing resources.
@@ -17474,11 +24667,128 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class WorkspaceEditClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkspaceEditClientCapabilities.canParse,
+      WorkspaceEditClientCapabilities.fromJson);
+
+  WorkspaceEditClientCapabilities(
+      {this.documentChanges, this.resourceOperations, this.failureHandling});
+  static WorkspaceEditClientCapabilities fromJson(Map<String, dynamic> json) {
+    final documentChanges = json['documentChanges'];
+    final resourceOperations = json['resourceOperations']
+        ?.map((item) =>
+            item != null ? ResourceOperationKind.fromJson(item) : null)
+        ?.cast<ResourceOperationKind>()
+        ?.toList();
+    final failureHandling = json['failureHandling'] != null
+        ? FailureHandlingKind.fromJson(json['failureHandling'])
+        : null;
+    return WorkspaceEditClientCapabilities(
+        documentChanges: documentChanges,
+        resourceOperations: resourceOperations,
+        failureHandling: failureHandling);
+  }
+
+  /// The client supports versioned document changes in `WorkspaceEdit`s
+  final bool documentChanges;
+
+  /// The failure handling strategy of a client if applying the workspace edit
+  /// fails.
+  ///  @since 3.13.0
+  final FailureHandlingKind failureHandling;
+
+  /// The resource operations the client supports. Clients should at least
+  /// support 'create', 'rename' and 'delete' files and folders.
+  ///  @since 3.13.0
+  final List<ResourceOperationKind> resourceOperations;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (documentChanges != null) {
+      __result['documentChanges'] = documentChanges;
+    }
+    if (resourceOperations != null) {
+      __result['resourceOperations'] = resourceOperations;
+    }
+    if (failureHandling != null) {
+      __result['failureHandling'] = failureHandling;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('documentChanges');
+      try {
+        if (obj['documentChanges'] != null &&
+            !(obj['documentChanges'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('resourceOperations');
+      try {
+        if (obj['resourceOperations'] != null &&
+            !((obj['resourceOperations'] is List &&
+                (obj['resourceOperations'].every((item) =>
+                    ResourceOperationKind.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<ResourceOperationKind>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('failureHandling');
+      try {
+        if (obj['failureHandling'] != null &&
+            !(FailureHandlingKind.canParse(obj['failureHandling'], reporter))) {
+          reporter.reportError('must be of type FailureHandlingKind');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type WorkspaceEditClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkspaceEditClientCapabilities &&
+        other.runtimeType == WorkspaceEditClientCapabilities) {
+      return documentChanges == other.documentChanges &&
+          listEqual(resourceOperations, other.resourceOperations,
+              (ResourceOperationKind a, ResourceOperationKind b) => a == b) &&
+          failureHandling == other.failureHandling &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, documentChanges.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(resourceOperations));
+    hash = JenkinsSmiHash.combine(hash, failureHandling.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 class WorkspaceFolder implements ToJsonable {
   static const jsonHandler =
       LspJsonHandler(WorkspaceFolder.canParse, WorkspaceFolder.fromJson);
 
-  WorkspaceFolder(this.uri, this.name) {
+  WorkspaceFolder({@required this.uri, @required this.name}) {
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
@@ -17489,7 +24799,7 @@
   static WorkspaceFolder fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
     final name = json['name'];
-    return WorkspaceFolder(uri, name);
+    return WorkspaceFolder(uri: uri, name: name);
   }
 
   /// The name of the workspace folder. Used to refer to this workspace folder
@@ -17575,7 +24885,7 @@
       WorkspaceFoldersChangeEvent.canParse,
       WorkspaceFoldersChangeEvent.fromJson);
 
-  WorkspaceFoldersChangeEvent(this.added, this.removed) {
+  WorkspaceFoldersChangeEvent({@required this.added, @required this.removed}) {
     if (added == null) {
       throw 'added is required but was not provided';
     }
@@ -17592,7 +24902,7 @@
         ?.map((item) => item != null ? WorkspaceFolder.fromJson(item) : null)
         ?.cast<WorkspaceFolder>()
         ?.toList();
-    return WorkspaceFoldersChangeEvent(added, removed);
+    return WorkspaceFoldersChangeEvent(added: added, removed: removed);
   }
 
   /// The array of added workspace folders
@@ -17681,27 +24991,383 @@
   String toString() => jsonEncoder.convert(toJson());
 }
 
+class WorkspaceFoldersServerCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkspaceFoldersServerCapabilities.canParse,
+      WorkspaceFoldersServerCapabilities.fromJson);
+
+  WorkspaceFoldersServerCapabilities(
+      {this.supported, this.changeNotifications});
+  static WorkspaceFoldersServerCapabilities fromJson(
+      Map<String, dynamic> json) {
+    final supported = json['supported'];
+    final changeNotifications = json['changeNotifications'] is String
+        ? Either2<String, bool>.t1(json['changeNotifications'])
+        : (json['changeNotifications'] is bool
+            ? Either2<String, bool>.t2(json['changeNotifications'])
+            : (json['changeNotifications'] == null
+                ? null
+                : (throw '''${json['changeNotifications']} was not one of (String, bool)''')));
+    return WorkspaceFoldersServerCapabilities(
+        supported: supported, changeNotifications: changeNotifications);
+  }
+
+  /// Whether the server wants to receive workspace folder change notifications.
+  ///
+  /// If a string is provided, the string is treated as an ID under which the
+  /// notification is registered on the client side. The ID can be used to
+  /// unregister for these events using the `client/unregisterCapability`
+  /// request.
+  final Either2<String, bool> changeNotifications;
+
+  /// The server has support for workspace folders
+  final bool supported;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (supported != null) {
+      __result['supported'] = supported;
+    }
+    if (changeNotifications != null) {
+      __result['changeNotifications'] = changeNotifications;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('supported');
+      try {
+        if (obj['supported'] != null && !(obj['supported'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('changeNotifications');
+      try {
+        if (obj['changeNotifications'] != null &&
+            !((obj['changeNotifications'] is String ||
+                obj['changeNotifications'] is bool))) {
+          reporter.reportError('must be of type Either2<String, bool>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter
+          .reportError('must be of type WorkspaceFoldersServerCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkspaceFoldersServerCapabilities &&
+        other.runtimeType == WorkspaceFoldersServerCapabilities) {
+      return supported == other.supported &&
+          changeNotifications == other.changeNotifications &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, supported.hashCode);
+    hash = JenkinsSmiHash.combine(hash, changeNotifications.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceSymbolClientCapabilities implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkspaceSymbolClientCapabilities.canParse,
+      WorkspaceSymbolClientCapabilities.fromJson);
+
+  WorkspaceSymbolClientCapabilities(
+      {this.dynamicRegistration, this.symbolKind});
+  static WorkspaceSymbolClientCapabilities fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final symbolKind = json['symbolKind'] != null
+        ? WorkspaceSymbolClientCapabilitiesSymbolKind.fromJson(
+            json['symbolKind'])
+        : null;
+    return WorkspaceSymbolClientCapabilities(
+        dynamicRegistration: dynamicRegistration, symbolKind: symbolKind);
+  }
+
+  /// Symbol request supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// Specific capabilities for the `SymbolKind` in the `workspace/symbol`
+  /// request.
+  final WorkspaceSymbolClientCapabilitiesSymbolKind symbolKind;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (symbolKind != null) {
+      __result['symbolKind'] = symbolKind;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('dynamicRegistration');
+      try {
+        if (obj['dynamicRegistration'] != null &&
+            !(obj['dynamicRegistration'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('symbolKind');
+      try {
+        if (obj['symbolKind'] != null &&
+            !(WorkspaceSymbolClientCapabilitiesSymbolKind.canParse(
+                obj['symbolKind'], reporter))) {
+          reporter.reportError(
+              'must be of type WorkspaceSymbolClientCapabilitiesSymbolKind');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type WorkspaceSymbolClientCapabilities');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkspaceSymbolClientCapabilities &&
+        other.runtimeType == WorkspaceSymbolClientCapabilities) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          symbolKind == other.symbolKind &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, symbolKind.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceSymbolClientCapabilitiesSymbolKind implements ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkspaceSymbolClientCapabilitiesSymbolKind.canParse,
+      WorkspaceSymbolClientCapabilitiesSymbolKind.fromJson);
+
+  WorkspaceSymbolClientCapabilitiesSymbolKind({this.valueSet});
+  static WorkspaceSymbolClientCapabilitiesSymbolKind fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? SymbolKind.fromJson(item) : null)
+        ?.cast<SymbolKind>()
+        ?.toList();
+    return WorkspaceSymbolClientCapabilitiesSymbolKind(valueSet: valueSet);
+  }
+
+  /// The symbol kind values the client supports. When this property exists the
+  /// client also guarantees that it will handle values outside its set
+  /// gracefully and falls back to a default value when unknown.
+  ///
+  /// If this property is not present the client only supports the symbol kinds
+  /// from `File` to `Array` as defined in the initial version of the protocol.
+  final List<SymbolKind> valueSet;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (valueSet != null) {
+      __result['valueSet'] = valueSet;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('valueSet');
+      try {
+        if (obj['valueSet'] != null &&
+            !((obj['valueSet'] is List &&
+                (obj['valueSet']
+                    .every((item) => SymbolKind.canParse(item, reporter)))))) {
+          reporter.reportError('must be of type List<SymbolKind>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError(
+          'must be of type WorkspaceSymbolClientCapabilitiesSymbolKind');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkspaceSymbolClientCapabilitiesSymbolKind &&
+        other.runtimeType == WorkspaceSymbolClientCapabilitiesSymbolKind) {
+      return listEqual(valueSet, other.valueSet,
+              (SymbolKind a, SymbolKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lspHashCode(valueSet));
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceSymbolOptions implements WorkDoneProgressOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkspaceSymbolOptions.canParse, WorkspaceSymbolOptions.fromJson);
+
+  WorkspaceSymbolOptions({this.workDoneProgress});
+  static WorkspaceSymbolOptions fromJson(Map<String, dynamic> json) {
+    if (WorkspaceSymbolRegistrationOptions.canParse(
+        json, nullLspJsonReporter)) {
+      return WorkspaceSymbolRegistrationOptions.fromJson(json);
+    }
+    final workDoneProgress = json['workDoneProgress'];
+    return WorkspaceSymbolOptions(workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter.reportError('must be of type WorkspaceSymbolOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkspaceSymbolOptions &&
+        other.runtimeType == WorkspaceSymbolOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
 /// The parameters of a Workspace Symbol Request.
-class WorkspaceSymbolParams implements ToJsonable {
+class WorkspaceSymbolParams
+    implements WorkDoneProgressParams, PartialResultParams, ToJsonable {
   static const jsonHandler = LspJsonHandler(
       WorkspaceSymbolParams.canParse, WorkspaceSymbolParams.fromJson);
 
-  WorkspaceSymbolParams(this.query) {
+  WorkspaceSymbolParams(
+      {@required this.query, this.workDoneToken, this.partialResultToken}) {
     if (query == null) {
       throw 'query is required but was not provided';
     }
   }
   static WorkspaceSymbolParams fromJson(Map<String, dynamic> json) {
     final query = json['query'];
-    return WorkspaceSymbolParams(query);
+    final workDoneToken = json['workDoneToken'] is num
+        ? Either2<num, String>.t1(json['workDoneToken'])
+        : (json['workDoneToken'] is String
+            ? Either2<num, String>.t2(json['workDoneToken'])
+            : (json['workDoneToken'] == null
+                ? null
+                : (throw '''${json['workDoneToken']} was not one of (num, String)''')));
+    final partialResultToken = json['partialResultToken'] is num
+        ? Either2<num, String>.t1(json['partialResultToken'])
+        : (json['partialResultToken'] is String
+            ? Either2<num, String>.t2(json['partialResultToken'])
+            : (json['partialResultToken'] == null
+                ? null
+                : (throw '''${json['partialResultToken']} was not one of (num, String)''')));
+    return WorkspaceSymbolParams(
+        query: query,
+        workDoneToken: workDoneToken,
+        partialResultToken: partialResultToken);
   }
 
-  /// A non-empty query string
+  /// An optional token that a server can use to report partial results (e.g.
+  /// streaming) to the client.
+  final Either2<num, String> partialResultToken;
+
+  /// A query string to filter symbols by. Clients may send an empty string here
+  /// to request all symbols.
   final String query;
 
+  /// An optional token that a server can use to report work done progress.
+  final Either2<num, String> workDoneToken;
+
   Map<String, dynamic> toJson() {
     var __result = <String, dynamic>{};
     __result['query'] = query ?? (throw 'query is required but was not set');
+    if (workDoneToken != null) {
+      __result['workDoneToken'] = workDoneToken;
+    }
+    if (partialResultToken != null) {
+      __result['partialResultToken'] = partialResultToken;
+    }
     return __result;
   }
 
@@ -17724,6 +25390,28 @@
       } finally {
         reporter.pop();
       }
+      reporter.push('workDoneToken');
+      try {
+        if (obj['workDoneToken'] != null &&
+            !((obj['workDoneToken'] is num ||
+                obj['workDoneToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      reporter.push('partialResultToken');
+      try {
+        if (obj['partialResultToken'] != null &&
+            !((obj['partialResultToken'] is num ||
+                obj['partialResultToken'] is String))) {
+          reporter.reportError('must be of type Either2<num, String>');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
       return true;
     } else {
       reporter.reportError('must be of type WorkspaceSymbolParams');
@@ -17735,7 +25423,10 @@
   bool operator ==(Object other) {
     if (other is WorkspaceSymbolParams &&
         other.runtimeType == WorkspaceSymbolParams) {
-      return query == other.query && true;
+      return query == other.query &&
+          workDoneToken == other.workDoneToken &&
+          partialResultToken == other.partialResultToken &&
+          true;
     }
     return false;
   }
@@ -17744,6 +25435,72 @@
   int get hashCode {
     var hash = 0;
     hash = JenkinsSmiHash.combine(hash, query.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workDoneToken.hashCode);
+    hash = JenkinsSmiHash.combine(hash, partialResultToken.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceSymbolRegistrationOptions
+    implements WorkspaceSymbolOptions, ToJsonable {
+  static const jsonHandler = LspJsonHandler(
+      WorkspaceSymbolRegistrationOptions.canParse,
+      WorkspaceSymbolRegistrationOptions.fromJson);
+
+  WorkspaceSymbolRegistrationOptions({this.workDoneProgress});
+  static WorkspaceSymbolRegistrationOptions fromJson(
+      Map<String, dynamic> json) {
+    final workDoneProgress = json['workDoneProgress'];
+    return WorkspaceSymbolRegistrationOptions(
+        workDoneProgress: workDoneProgress);
+  }
+
+  final bool workDoneProgress;
+
+  Map<String, dynamic> toJson() {
+    var __result = <String, dynamic>{};
+    if (workDoneProgress != null) {
+      __result['workDoneProgress'] = workDoneProgress;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj, LspJsonReporter reporter) {
+    if (obj is Map<String, dynamic>) {
+      reporter.push('workDoneProgress');
+      try {
+        if (obj['workDoneProgress'] != null &&
+            !(obj['workDoneProgress'] is bool)) {
+          reporter.reportError('must be of type bool');
+          return false;
+        }
+      } finally {
+        reporter.pop();
+      }
+      return true;
+    } else {
+      reporter
+          .reportError('must be of type WorkspaceSymbolRegistrationOptions');
+      return false;
+    }
+  }
+
+  @override
+  bool operator ==(Object other) {
+    if (other is WorkspaceSymbolRegistrationOptions &&
+        other.runtimeType == WorkspaceSymbolRegistrationOptions) {
+      return workDoneProgress == other.workDoneProgress && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workDoneProgress.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
index 21a84d3..bd9b513 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
@@ -17,7 +17,7 @@
     error(ErrorCodes.RequestCancelled, 'Request was cancelled', null);
 
 ErrorOr<R> error<R>(ErrorCodes code, String message, [String data]) =>
-    ErrorOr<R>.error(ResponseError(code, message, data));
+    ErrorOr<R>.error(ResponseError(code: code, message: message, data: data));
 
 ErrorOr<R> failure<R>(ErrorOr<dynamic> error) => ErrorOr<R>.error(error.error);
 
diff --git a/pkg/analysis_server/lib/protocol/protocol_constants.dart b/pkg/analysis_server/lib/protocol/protocol_constants.dart
index 2a888ca..2ba9eea 100644
--- a/pkg/analysis_server/lib/protocol/protocol_constants.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_constants.dart
@@ -164,6 +164,8 @@
 const String DIAGNOSTIC_REQUEST_GET_SERVER_PORT = 'diagnostic.getServerPort';
 const String DIAGNOSTIC_RESPONSE_GET_DIAGNOSTICS_CONTEXTS = 'contexts';
 const String DIAGNOSTIC_RESPONSE_GET_SERVER_PORT_PORT = 'port';
+const String EDIT_REQUEST_BULK_FIXES = 'edit.bulkFixes';
+const String EDIT_REQUEST_BULK_FIXES_INCLUDED = 'included';
 const String EDIT_REQUEST_DARTFIX = 'edit.dartfix';
 const String EDIT_REQUEST_DARTFIX_EXCLUDED_FIXES = 'excludedFixes';
 const String EDIT_REQUEST_DARTFIX_INCLUDED = 'included';
@@ -220,6 +222,7 @@
 const String EDIT_REQUEST_ORGANIZE_DIRECTIVES_FILE = 'file';
 const String EDIT_REQUEST_SORT_MEMBERS = 'edit.sortMembers';
 const String EDIT_REQUEST_SORT_MEMBERS_FILE = 'file';
+const String EDIT_RESPONSE_BULK_FIXES_EDITS = 'edits';
 const String EDIT_RESPONSE_DARTFIX_DETAILS = 'details';
 const String EDIT_RESPONSE_DARTFIX_EDITS = 'edits';
 const String EDIT_RESPONSE_DARTFIX_HAS_ERRORS = 'hasErrors';
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index c6fe18d..51ece87 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -7115,6 +7115,180 @@
   }
 }
 
+/// edit.bulkFixes params
+///
+/// {
+///   "included": List<FilePath>
+/// }
+///
+/// Clients may not extend, implement or mix-in this class.
+class EditBulkFixesParams implements RequestParams {
+  List<String> _included;
+
+  /// A list of the files and directories for which edits should be suggested.
+  ///
+  /// If a request is made with a path that is invalid, e.g. is not absolute
+  /// and normalized, an error of type INVALID_FILE_PATH_FORMAT will be
+  /// generated. If a request is made for a file which does not exist, or which
+  /// is not currently subject to analysis (e.g. because it is not associated
+  /// with any analysis root specified to analysis.setAnalysisRoots), an error
+  /// of type FILE_NOT_ANALYZED will be generated.
+  List<String> get included => _included;
+
+  /// A list of the files and directories for which edits should be suggested.
+  ///
+  /// If a request is made with a path that is invalid, e.g. is not absolute
+  /// and normalized, an error of type INVALID_FILE_PATH_FORMAT will be
+  /// generated. If a request is made for a file which does not exist, or which
+  /// is not currently subject to analysis (e.g. because it is not associated
+  /// with any analysis root specified to analysis.setAnalysisRoots), an error
+  /// of type FILE_NOT_ANALYZED will be generated.
+  set included(List<String> value) {
+    assert(value != null);
+    _included = value;
+  }
+
+  EditBulkFixesParams(List<String> included) {
+    this.included = included;
+  }
+
+  factory EditBulkFixesParams.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    json ??= {};
+    if (json is Map) {
+      List<String> included;
+      if (json.containsKey('included')) {
+        included = jsonDecoder.decodeList(
+            jsonPath + '.included', json['included'], jsonDecoder.decodeString);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, 'included');
+      }
+      return EditBulkFixesParams(included);
+    } else {
+      throw jsonDecoder.mismatch(jsonPath, 'edit.bulkFixes params', json);
+    }
+  }
+
+  factory EditBulkFixesParams.fromRequest(Request request) {
+    return EditBulkFixesParams.fromJson(
+        RequestDecoder(request), 'params', request.params);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    var result = <String, dynamic>{};
+    result['included'] = included;
+    return result;
+  }
+
+  @override
+  Request toRequest(String id) {
+    return Request(id, 'edit.bulkFixes', toJson());
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is EditBulkFixesParams) {
+      return listEqual(
+          included, other.included, (String a, String b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, included.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/// edit.bulkFixes result
+///
+/// {
+///   "edits": List<SourceFileEdit>
+/// }
+///
+/// Clients may not extend, implement or mix-in this class.
+class EditBulkFixesResult implements ResponseResult {
+  List<SourceFileEdit> _edits;
+
+  /// A list of source edits to apply the recommended changes.
+  List<SourceFileEdit> get edits => _edits;
+
+  /// A list of source edits to apply the recommended changes.
+  set edits(List<SourceFileEdit> value) {
+    assert(value != null);
+    _edits = value;
+  }
+
+  EditBulkFixesResult(List<SourceFileEdit> edits) {
+    this.edits = edits;
+  }
+
+  factory EditBulkFixesResult.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    json ??= {};
+    if (json is Map) {
+      List<SourceFileEdit> edits;
+      if (json.containsKey('edits')) {
+        edits = jsonDecoder.decodeList(
+            jsonPath + '.edits',
+            json['edits'],
+            (String jsonPath, Object json) =>
+                SourceFileEdit.fromJson(jsonDecoder, jsonPath, json));
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, 'edits');
+      }
+      return EditBulkFixesResult(edits);
+    } else {
+      throw jsonDecoder.mismatch(jsonPath, 'edit.bulkFixes result', json);
+    }
+  }
+
+  factory EditBulkFixesResult.fromResponse(Response response) {
+    return EditBulkFixesResult.fromJson(
+        ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
+        'result',
+        response.result);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    var result = <String, dynamic>{};
+    result['edits'] =
+        edits.map((SourceFileEdit value) => value.toJson()).toList();
+    return result;
+  }
+
+  @override
+  Response toResponse(String id) {
+    return Response(id, result: toJson());
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is EditBulkFixesResult) {
+      return listEqual(
+          edits, other.edits, (SourceFileEdit a, SourceFileEdit b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
 /// edit.dartfix params
 ///
 /// {
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index c4c69f8..c0d5406 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -299,14 +299,6 @@
     flutterWidgetDescriptions.flush();
   }
 
-  /// Read all files, resolve all URIs, and perform required analysis in
-  /// all current analysis drivers.
-  void reanalyze() {
-    for (var driver in driverMap.values) {
-      driver.resetUriResolution();
-    }
-  }
-
   /// Send the given [notification] to the client.
   void sendNotification(Notification notification) {
     channel.sendNotification(notification);
@@ -480,7 +472,8 @@
     // during normal analysis (for example dot folders are skipped over in
     // _handleWatchEventImpl).
     return contextManager.isInAnalysisRoot(file) &&
-        !contextManager.isContainedInDotFolder(file);
+        !contextManager.isContainedInDotFolder(file) &&
+        !contextManager.isIgnored(file);
   }
 
   Future<void> shutdown() {
@@ -654,7 +647,7 @@
 
   /// Return `true` if the new relevance computations should be used when
   /// computing code completion suggestions.
-  bool useNewRelevance = false;
+  bool useNewRelevance = true;
 
   /// The set of enabled features.
   FeatureSet featureSet = FeatureSet();
diff --git a/pkg/analysis_server/lib/src/analysis_server_abstract.dart b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
index 966baae..06cc63c 100644
--- a/pkg/analysis_server/lib/src/analysis_server_abstract.dart
+++ b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
@@ -412,6 +412,14 @@
   /// given [path] was changed - added, updated, or removed.
   void notifyFlutterWidgetDescriptions(String path) {}
 
+  /// Read all files, resolve all URIs, and perform required analysis in
+  /// all current analysis drivers.
+  void reanalyze() {
+    for (var driver in driverMap.values) {
+      driver.resetUriResolution();
+    }
+  }
+
   /// Sends an error notification to the user.
   void sendServerErrorNotification(
     String message,
diff --git a/pkg/analysis_server/lib/src/cider/completion.dart b/pkg/analysis_server/lib/src/cider/completion.dart
index a3049d34..fac8c25 100644
--- a/pkg/analysis_server/lib/src/cider/completion.dart
+++ b/pkg/analysis_server/lib/src/cider/completion.dart
@@ -11,6 +11,7 @@
 import 'package:analysis_server/src/services/completion/dart/local_library_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
 import 'package:analysis_server/src/services/completion/filtering/fuzzy_matcher.dart';
+import 'package:analyzer/dart/analysis/results.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/resolve_file.dart';
@@ -56,28 +57,25 @@
     @required String path,
     @required int line,
     @required int column,
+    @visibleForTesting void Function(ResolvedUnitResult) testResolvedUnit,
   }) async {
     return _performanceRoot.runAsync('completion', (performance) async {
-      var fileContext = _logger.run('Get file $path', () {
-        return _fileResolver.getFileContext(
-          path: path,
-          performance: performance,
-        );
-      });
-
-      var file = fileContext.file;
-
-      var lineInfo = file.lineInfo;
-      var offset = lineInfo.getOffsetOfLine(line) + column;
-
       var resolvedUnit = performance.run('resolution', (performance) {
         return _fileResolver.resolve(
-          completionOffset: offset,
+          completionLine: line,
+          completionColumn: column,
           path: path,
           performance: performance,
         );
       });
 
+      if (testResolvedUnit != null) {
+        testResolvedUnit(resolvedUnit);
+      }
+
+      var lineInfo = resolvedUnit.lineInfo;
+      var offset = lineInfo.getOffsetOfLine(line) + column;
+
       var completionRequest = CompletionRequestImpl(
         resolvedUnit,
         offset,
@@ -105,10 +103,12 @@
             return await manager.computeSuggestions(
               performance,
               completionRequest,
+              enableOverrideContributor: false,
               enableUriContributor: false,
             );
           });
 
+          performance.getDataInt('count').add(result.length);
           return result;
         },
       );
@@ -139,14 +139,16 @@
 
       performance.run('filter', (performance) {
         _logger.run('Filter suggestions', () {
+          performance.getDataInt('count').add(suggestions.length);
           suggestions = filter.perform();
+          performance.getDataInt('matchCount').add(suggestions.length);
         });
       });
 
       var result = CiderCompletionResult._(
         suggestions: suggestions,
         performance: CiderCompletionPerformance._(
-          file: performance.getChild('fileContext').elapsed,
+          file: Duration.zero,
           imports: performance.getChild('imports').elapsed,
           resolution: performance.getChild('resolution').elapsed,
           suggestions: performance.getChild('suggestions').elapsed,
@@ -195,6 +197,7 @@
       );
       suggestions.addAll(importedSuggestions);
     }
+    performance.getDataInt('count').add(suggestions.length);
     return suggestions;
   }
 
@@ -204,6 +207,8 @@
     @required LibraryElement element,
     @required OperationPerformanceImpl performance,
   }) {
+    performance.getDataInt('libraryCount').increment();
+
     var path = element.source.fullName;
     var signature = _fileResolver.getLibraryLinkedSignature(
       path: path,
@@ -212,6 +217,7 @@
 
     var cacheEntry = _cache._importedLibraries[path];
     if (cacheEntry == null || cacheEntry.signature != signature) {
+      performance.getDataInt('libraryCompute').increment();
       computedImportedLibraries.add(path);
       var suggestions = _librarySuggestions(element);
       cacheEntry = _CiderImportedLibrarySuggestions(
@@ -239,15 +245,19 @@
 
 class CiderCompletionPerformance {
   /// The elapsed time for file access.
+  @Deprecated('This operation is not performed anymore')
   final Duration file;
 
   /// The elapsed time to compute import suggestions.
+  @Deprecated("Use 'operations' instead")
   final Duration imports;
 
   /// The elapsed time for resolution.
+  @Deprecated("Use 'operations' instead")
   final Duration resolution;
 
   /// The elapsed time to compute suggestions.
+  @Deprecated("Use 'operations' instead")
   final Duration suggestions;
 
   /// The tree of operation performances.
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index a0d7ff9..3d4a474 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -474,6 +474,8 @@
 
   @override
   void visitFieldDeclaration(FieldDeclaration node) {
+    computer._addRegion_token(
+        node.abstractKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.staticKeyword, HighlightRegionType.BUILT_IN);
     super.visitFieldDeclaration(node);
   }
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
index 4178ea1..ada8fc5 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
@@ -565,6 +565,8 @@
 
   @override
   void visitFieldDeclaration(FieldDeclaration node) {
+    computer._addRegion_token(
+        node.abstractKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.staticKeyword, HighlightRegionType.BUILT_IN);
     super.visitFieldDeclaration(node);
   }
diff --git a/pkg/analysis_server/lib/src/computer/computer_hover.dart b/pkg/analysis_server/lib/src/computer/computer_hover.dart
index 506cab6..3207fbf 100644
--- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
@@ -74,7 +74,7 @@
         if (element.enclosingElement is! ExecutableElement) {
           // containing class
           var containingClass = element.thisOrAncestorOfType<ClassElement>();
-          if (containingClass != null) {
+          if (containingClass != null && containingClass != element) {
             hover.containingClassDescription = containingClass.displayName;
           }
           // containing library
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart
index d2be4fc..b1abe78 100644
--- a/pkg/analysis_server/lib/src/computer/computer_outline.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -16,10 +16,8 @@
 class DartUnitOutlineComputer {
   final ResolvedUnitResult resolvedUnit;
   final bool withBasicFlutter;
-  final Flutter flutter;
 
-  DartUnitOutlineComputer(this.resolvedUnit, {this.withBasicFlutter = false})
-      : flutter = Flutter.of(resolvedUnit);
+  DartUnitOutlineComputer(this.resolvedUnit, {this.withBasicFlutter = false});
 
   /// Returns the computed outline, not `null`.
   Outline compute() {
@@ -409,6 +407,8 @@
 
   _FunctionBodyOutlinesVisitor(this.outlineComputer, this.contents);
 
+  Flutter get _flutter => Flutter.instance;
+
   /// Return `true` if the given [element] is the method 'group' defined in the
   /// test package.
   bool isGroup(engine.ExecutableElement element) {
@@ -438,13 +438,12 @@
 
   @override
   void visitInstanceCreationExpression(InstanceCreationExpression node) {
-    if (outlineComputer.withBasicFlutter &&
-        outlineComputer.flutter.isWidgetCreation(node)) {
+    if (outlineComputer.withBasicFlutter && _flutter.isWidgetCreation(node)) {
       var children = <Outline>[];
       node.argumentList
           .accept(_FunctionBodyOutlinesVisitor(outlineComputer, children));
 
-      var text = outlineComputer.flutter.getWidgetPresentationText(node);
+      var text = _flutter.getWidgetPresentationText(node);
       var element = Element(ElementKind.CONSTRUCTOR_INVOCATION, text, 0,
           location: outlineComputer._getLocationOffsetLength(node.offset, 0));
 
diff --git a/pkg/analysis_server/lib/src/computer/import_elements_computer.dart b/pkg/analysis_server/lib/src/computer/import_elements_computer.dart
index 6383a22..f0a7bba 100644
--- a/pkg/analysis_server/lib/src/computer/import_elements_computer.dart
+++ b/pkg/analysis_server/lib/src/computer/import_elements_computer.dart
@@ -16,7 +16,7 @@
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 /// An object used to compute a set of edits to add imports to a given library
@@ -49,9 +49,8 @@
       }
     }
 
-    var builder = DartChangeBuilder(libraryResult.session);
-    await builder.addFileEdit(libraryResult.path,
-        (DartFileEditBuilder builder) {
+    var builder = ChangeBuilder(session: libraryResult.session);
+    await builder.addDartFileEdit(libraryResult.path, (builder) {
       for (var importedElements in filteredImportedElements) {
         var matchingImports =
             _findMatchingImports(existingImports, importedElements);
@@ -65,7 +64,7 @@
           var importedSource = importedFile.createSource(uri);
           var importUri = _getLibrarySourceUri(libraryElement, importedSource);
           var description = _getInsertionDescription(importUri);
-          builder.addInsertion(description.offset, (DartEditBuilder builder) {
+          builder.addInsertion(description.offset, (builder) {
             for (var i = 0; i < description.newLinesBefore; i++) {
               builder.writeln();
             }
@@ -154,8 +153,7 @@
               } else if (combinator is ShowCombinator &&
                   namesToShow.isNotEmpty) {
                 // TODO(brianwilkerson) Add the names in alphabetic order.
-                builder.addInsertion(combinator.shownNames.last.end,
-                    (DartEditBuilder builder) {
+                builder.addInsertion(combinator.shownNames.last.end, (builder) {
                   for (var nameToShow in namesToShow) {
                     builder.write(', ');
                     builder.write(nameToShow);
@@ -246,7 +244,7 @@
   List<ImportedElements> _filterImportedElements(
       List<ImportedElements> originalList) {
     var libraryElement = libraryResult.libraryElement;
-    var libraryScope = LibraryScope(libraryElement);
+    var libraryScope = libraryElement.scope;
     AstFactory factory = AstFactoryImpl();
     var filteredList = <ImportedElements>[];
     for (var elements in originalList) {
@@ -261,7 +259,7 @@
           Token period = SimpleToken(TokenType.PERIOD, -1);
           identifier = factory.prefixedIdentifier(prefix, period, identifier);
         }
-        var element = libraryScope.lookup(identifier, libraryElement);
+        var element = libraryScope.lookupIdentifier(identifier);
         if (element != null) {
           filteredElements.remove(name);
         }
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index cd9cb94..2d0f0b1 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -26,7 +26,7 @@
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 
 /// Instances of the class [CompletionDomainHandler] implement a
 /// [RequestHandler] that handles requests in the completion domain.
@@ -104,11 +104,7 @@
         await perf.runAsync(contributorTag, (performance) async {
           try {
             suggestions.addAll(
-              await manager.computeSuggestions(
-                performance,
-                request,
-                enableUriContributor: true,
-              ),
+              await manager.computeSuggestions(performance, request),
             );
           } on AbortCompletion {
             suggestions.clear();
@@ -188,8 +184,8 @@
         var session = analysisDriver.currentSession;
 
         var completion = params.label;
-        var builder = DartChangeBuilder(session);
-        await builder.addFileEdit(file, (builder) {
+        var builder = ChangeBuilder(session: session);
+        await builder.addDartFileEdit(file, (builder) {
           var result = builder.importLibraryElement(library.uri);
           if (result.prefix != null) {
             completion = '${result.prefix}.$completion';
diff --git a/pkg/analysis_server/lib/src/domains/execution/completion.dart b/pkg/analysis_server/lib/src/domains/execution/completion.dart
index bf6d781..ff2796b 100644
--- a/pkg/analysis_server/lib/src/domains/execution/completion.dart
+++ b/pkg/analysis_server/lib/src/domains/execution/completion.dart
@@ -17,7 +17,7 @@
 import 'package:analyzer/file_system/overlay_file_system.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 
 class RuntimeCompletionComputer {
   final OverlayResourceProvider resourceProvider;
@@ -49,9 +49,9 @@
     const codeMarker = '__code_\_';
 
     // Insert the code being completed at the context offset.
-    var changeBuilder = DartChangeBuilder(session);
+    var changeBuilder = ChangeBuilder(session: session);
     var nextImportPrefixIndex = 0;
-    await changeBuilder.addFileEdit(contextPath, (builder) {
+    await changeBuilder.addDartFileEdit(contextPath, (builder) {
       builder.addInsertion(contextOffset, (builder) {
         builder.writeln('{');
 
@@ -96,7 +96,6 @@
         return await contributor.computeSuggestions(
           performance,
           request,
-          enableUriContributor: true,
         );
       },
     );
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index 760da48..8ce7662 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -15,11 +15,13 @@
 import 'package:analysis_server/src/edit/fix/dartfix_info.dart' show allFixes;
 import 'package:analysis_server/src/plugin/plugin_manager.dart';
 import 'package:analysis_server/src/plugin/result_converter.dart';
-import 'package:analysis_server/src/protocol_server.dart' hide Element;
+import 'package:analysis_server/src/protocol_server.dart'
+    hide AnalysisError, Element;
 import 'package:analysis_server/src/services/completion/postfix/postfix_completion.dart';
 import 'package:analysis_server/src/services/completion/statement/statement_completion.dart';
 import 'package:analysis_server/src/services/correction/assist.dart';
 import 'package:analysis_server/src/services/correction/assist_internal.dart';
+import 'package:analysis_server/src/services/correction/bulk_fix_processor.dart';
 import 'package:analysis_server/src/services/correction/change_workspace.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analysis_server/src/services/correction/fix/analysis_options/fix_generator.dart';
@@ -38,15 +40,13 @@
 import 'package:analyzer/error/error.dart' as engine;
 import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/file_system/file_system.dart';
-// ignore: deprecated_member_use
-import 'package:analyzer/source/analysis_options_provider.dart';
 import 'package:analyzer/source/line_info.dart';
-import 'package:analyzer/src/dart/analysis/library_context.dart'
-    show LibraryCycleLinkException;
+import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
 import 'package:analyzer/src/dart/analysis/results.dart' as engine;
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart' as engine;
 import 'package:analyzer/src/error/codes.dart' as engine;
+import 'package:analyzer/src/exception/exception.dart';
 import 'package:analyzer/src/generated/engine.dart' as engine;
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart' as engine;
@@ -93,6 +93,36 @@
     _newRefactoringManager();
   }
 
+  Future bulkFixes(Request request) async {
+    //
+    // Compute bulk fixes
+    //
+    try {
+      var params = EditBulkFixesParams.fromRequest(request);
+      for (var file in params.included) {
+        if (server.sendResponseErrorIfInvalidFilePath(request, file)) {
+          return;
+        }
+      }
+
+      var paths = <String>[];
+      for (var include in params.included) {
+        var resource = server.resourceProvider.getResource(include);
+        resource.collectDartFilePaths(paths);
+      }
+
+      var workspace = DartChangeWorkspace(server.currentSessions);
+      var processor = BulkFixProcessor(workspace);
+      var changeBuilder = await processor.fixErrorsInLibraries(paths);
+      var response = EditBulkFixesResult(changeBuilder.sourceChange.edits)
+          .toResponse(request.id);
+      server.sendResponse(response);
+    } catch (exception, stackTrace) {
+      server.sendServerErrorNotification('Exception while getting bulk fixes',
+          CaughtException(exception, stackTrace), stackTrace);
+    }
+  }
+
   Future dartfix(Request request) async {
     // TODO(danrubel): Add support for dartfix plugins
 
@@ -357,6 +387,9 @@
         return Response.DELAYED_RESPONSE;
       } else if (requestName == EDIT_REQUEST_GET_AVAILABLE_REFACTORINGS) {
         return _getAvailableRefactorings(request);
+      } else if (requestName == EDIT_REQUEST_BULK_FIXES) {
+        bulkFixes(request);
+        return Response.DELAYED_RESPONSE;
       } else if (requestName == EDIT_REQUEST_GET_DARTFIX_INFO) {
         return getDartfixInfo(request);
       } else if (requestName == EDIT_REQUEST_GET_FIXES) {
@@ -619,8 +652,7 @@
 error: $error
 error.errorCode: ${error.errorCode}
 ''';
-            // TODO(scheglov) Use CaughtExceptionWithFiles when patch changed.
-            throw LibraryCycleLinkException(exception, stackTrace, {
+            throw CaughtExceptionWithFiles(exception, stackTrace, {
               file: result.content,
               'parameters': parametersFile,
             });
@@ -1277,3 +1309,15 @@
 /// [_RefactoringManager] throws instances of this class internally to stop
 /// processing in a manager that was reset.
 class _ResetError {}
+
+extension ResourceExtension on Resource {
+  void collectDartFilePaths(List<String> paths) {
+    if (this is File && AnalysisEngine.isDartFileName(path)) {
+      paths.add(path);
+    } else if (this is Folder) {
+      for (var child in (this as Folder).getChildren()) {
+        child.collectDartFilePaths(paths);
+      }
+    }
+  }
+}
diff --git a/pkg/analysis_server/lib/src/edit/fix/fix_error_task.dart b/pkg/analysis_server/lib/src/edit/fix/fix_error_task.dart
index 7fc3e1e..d15e724 100644
--- a/pkg/analysis_server/lib/src/edit/fix/fix_error_task.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/fix_error_task.dart
@@ -65,7 +65,7 @@
   static void fixNamedConstructorTypeArgs(DartFixRegistrar registrar,
       DartFixListener listener, EditDartfixParams params) {
     registrar.registerErrorTask(
-        StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
+        CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
         FixErrorTask(listener));
   }
 }
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
index 9e9990d..b2540c6 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
@@ -13,20 +13,19 @@
 /// Computer for Flutter specific outlines.
 class FlutterOutlineComputer {
   final ResolvedUnitResult resolvedUnit;
-  Flutter flutter;
 
   final List<protocol.FlutterOutline> _depthFirstOrder = [];
 
   FlutterOutlineComputer(this.resolvedUnit);
 
+  Flutter get _flutter => Flutter.instance;
+
   protocol.FlutterOutline compute() {
     var dartOutline = DartUnitOutlineComputer(
       resolvedUnit,
       withBasicFlutter: false,
     ).compute();
 
-    flutter = Flutter.of(resolvedUnit);
-
     // Convert Dart outlines into Flutter outlines.
     var flutterDartOutline = _convert(dartOutline);
 
@@ -131,7 +130,7 @@
   /// a widget reference outline item.
   protocol.FlutterOutline _createOutline(Expression node, bool withGeneric) {
     var type = node.staticType;
-    if (!flutter.isWidgetType(type)) {
+    if (!_flutter.isWidgetType(type)) {
       return null;
     }
     var className = type.element.displayName;
@@ -140,9 +139,9 @@
       var attributes = <protocol.FlutterOutlineAttribute>[];
       var children = <protocol.FlutterOutline>[];
       for (var argument in node.argumentList.arguments) {
-        var isWidgetArgument = flutter.isWidgetType(argument.staticType);
+        var isWidgetArgument = _flutter.isWidgetType(argument.staticType);
         var isWidgetListArgument =
-            flutter.isListOfWidgetsType(argument.staticType);
+            _flutter.isListOfWidgetsType(argument.staticType);
 
         String parentAssociationLabel;
         Expression childrenExpression;
diff --git a/pkg/analysis_server/lib/src/lsp/channel/lsp_byte_stream_channel.dart b/pkg/analysis_server/lib/src/lsp/channel/lsp_byte_stream_channel.dart
index 4fb256c..e05cec2 100644
--- a/pkg/analysis_server/lib/src/lsp/channel/lsp_byte_stream_channel.dart
+++ b/pkg/analysis_server/lib/src/lsp/channel/lsp_byte_stream_channel.dart
@@ -119,10 +119,9 @@
 
   void _sendParseError() {
     final error = ResponseMessage(
-        null,
-        null,
-        ResponseError(ErrorCodes.ParseError, 'Unable to parse message', null),
-        jsonRpcVersion);
+        error: ResponseError(
+            code: ErrorCodes.ParseError, message: 'Unable to parse message'),
+        jsonrpc: jsonRpcVersion);
     sendResponse(error);
   }
 
diff --git a/pkg/analysis_server/lib/src/lsp/client_configuration.dart b/pkg/analysis_server/lib/src/lsp/client_configuration.dart
index 9b554c7..fbca273 100644
--- a/pkg/analysis_server/lib/src/lsp/client_configuration.dart
+++ b/pkg/analysis_server/lib/src/lsp/client_configuration.dart
@@ -8,6 +8,7 @@
   final Map<String, dynamic> _settings = <String, dynamic>{};
 
   bool get enableSdkFormatter => _settings['enableSdkFormatter'] ?? true;
+  int get lineLength => _settings['lineLength'];
 
   void replace(Map<String, dynamic> newConfig) {
     _settings
diff --git a/pkg/analysis_server/lib/src/lsp/constants.dart b/pkg/analysis_server/lib/src/lsp/constants.dart
index ba91e4b..93bf55a 100644
--- a/pkg/analysis_server/lib/src/lsp/constants.dart
+++ b/pkg/analysis_server/lib/src/lsp/constants.dart
@@ -53,6 +53,7 @@
 
 abstract class CustomMethods {
   static const DiagnosticServer = Method('dart/diagnosticServer');
+  static const Reanalyze = Method('dart/reanalyze');
   static const PublishClosingLabels =
       Method('dart/textDocument/publishClosingLabels');
   static const PublishOutline = Method('dart/textDocument/publishOutline');
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 3bf5324..b7e4b62 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
@@ -21,9 +21,9 @@
   Future<ErrorOr<void>> handle(List<dynamic> arguments) async {
     if (arguments == null || arguments.length != 1 || arguments[0] is! String) {
       return ErrorOr.error(ResponseError(
-        ServerErrorCodes.InvalidCommandArguments,
-        '$commandName requires a single String parameter containing the path of a Dart file',
-        null,
+        code: ServerErrorCodes.InvalidCommandArguments,
+        message:
+            '$commandName requires a single String parameter containing the path of a Dart file',
       ));
     }
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/perform_refactor.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/perform_refactor.dart
index 6b7fa5e..ec0df60 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/perform_refactor.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/perform_refactor.dart
@@ -33,9 +33,9 @@
         (arguments[5] != null && arguments[5] is! Map<String, dynamic>)) {
       // length
       return ErrorOr.error(ResponseError(
-        ServerErrorCodes.InvalidCommandArguments,
-        '$commandName requires 6 parameters: RefactoringKind, docVersion, filePath, offset, length, options (optional)',
-        null,
+        code: ServerErrorCodes.InvalidCommandArguments,
+        message:
+            '$commandName requires 6 parameters: RefactoringKind, docVersion, filePath, offset, length, options (optional)',
       ));
     }
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/send_workspace_edit.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/send_workspace_edit.dart
index 2d33f52..9cdb105 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/send_workspace_edit.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/send_workspace_edit.dart
@@ -29,9 +29,9 @@
         arguments.length != 1 ||
         arguments[0] is! Map<String, dynamic>) {
       return ErrorOr.error(ResponseError(
-        ServerErrorCodes.InvalidCommandArguments,
-        '$commandName requires a single List argument of WorkspaceEdit',
-        null,
+        code: ServerErrorCodes.InvalidCommandArguments,
+        message:
+            '$commandName requires a single List argument of WorkspaceEdit',
       ));
     }
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/simple_edit_handler.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/simple_edit_handler.dart
index a5a96b2..1dd999b 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/simple_edit_handler.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/simple_edit_handler.dart
@@ -52,7 +52,7 @@
     // Send the edit to the client via a applyEdit request (this is a request
     // from server -> client and the client will provide a response).
     final editResponse = await server.sendRequest(Method.workspace_applyEdit,
-        ApplyWorkspaceEditParams(commandName, workspaceEdit));
+        ApplyWorkspaceEditParams(label: commandName, edit: workspaceEdit));
 
     if (editResponse.error != null) {
       return error(
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart
index a632440..06de050 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart
@@ -21,9 +21,9 @@
   Future<ErrorOr<void>> handle(List<dynamic> arguments) async {
     if (arguments == null || arguments.length != 1 || arguments[0] is! String) {
       return ErrorOr.error(ResponseError(
-        ServerErrorCodes.InvalidCommandArguments,
-        '$commandName requires a single String parameter containing the path of a Dart file',
-        null,
+        code: ServerErrorCodes.InvalidCommandArguments,
+        message:
+            '$commandName requires a single String parameter containing the path of a Dart file',
       ));
     }
 
@@ -37,9 +37,8 @@
     final result = await driver?.parseFile(path);
     if (result == null) {
       return ErrorOr.error(ResponseError(
-        ServerErrorCodes.FileNotAnalyzed,
-        '$commandName is only available for analyzed files',
-        null,
+        code: ServerErrorCodes.FileNotAnalyzed,
+        message: '$commandName is only available for analyzed files',
       ));
     }
     final code = result.content;
@@ -47,9 +46,10 @@
 
     if (hasScanParseErrors(result.errors)) {
       return ErrorOr.error(ResponseError(
-        ServerErrorCodes.FileHasErrors,
-        'Unable to $commandName because the file contains parse errors',
-        path,
+        code: ServerErrorCodes.FileHasErrors,
+        message:
+            'Unable to $commandName because the file contains parse errors',
+        data: path,
       ));
     }
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart
index 28fbb76..facc544 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart
@@ -24,6 +24,6 @@
   Future<ErrorOr<DartDiagnosticServer>> handle(
       void _, CancellationToken token) async {
     final port = await server.diagnosticServer.getServerPort();
-    return success(DartDiagnosticServer(port));
+    return success(DartDiagnosticServer(port: port));
   }
 }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_reanalyze.dart b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_reanalyze.dart
new file mode 100644
index 0000000..ad5c1b3
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_reanalyze.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.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+
+class ReanalyzeHandler extends MessageHandler<void, void> {
+  ReanalyzeHandler(LspAnalysisServer server) : super(server);
+  @override
+  Method get handlesMessage => CustomMethods.Reanalyze;
+
+  @override
+  LspJsonHandler<void> get jsonHandler => NullJsonHandler;
+
+  @override
+  Future<ErrorOr<void>> handle(void _, CancellationToken token) async {
+    server.reanalyze();
+    return success();
+  }
+}
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 da57ee1..2358cee 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
@@ -45,16 +45,21 @@
       return success(const []);
     }
 
-    final capabilities = server?.clientCapabilities?.textDocument?.codeAction;
+    final capabilities = server?.clientCapabilities?.textDocument;
 
     final clientSupportsWorkspaceApplyEdit =
         server?.clientCapabilities?.workspace?.applyEdit == true;
 
     final clientSupportsLiteralCodeActions =
-        capabilities?.codeActionLiteralSupport != null;
+        capabilities?.codeAction?.codeActionLiteralSupport != null;
 
     final clientSupportedCodeActionKinds = HashSet<CodeActionKind>.of(
-        capabilities?.codeActionLiteralSupport?.codeActionKind?.valueSet ?? []);
+        capabilities?.codeAction?.codeActionLiteralSupport?.codeActionKind
+                ?.valueSet ??
+            []);
+
+    final clientSupportedDiagnosticTags = HashSet<DiagnosticTag>.of(
+        capabilities?.publishDiagnostics?.tagSupport?.valueSet ?? []);
 
     final path = pathOfDoc(params.textDocument);
     final unit = await path.mapResult(requireResolvedUnit);
@@ -70,6 +75,7 @@
               clientSupportedCodeActionKinds,
               clientSupportsLiteralCodeActions,
               clientSupportsWorkspaceApplyEdit,
+              clientSupportedDiagnosticTags,
               path.result,
               params.range,
               offset,
@@ -89,7 +95,7 @@
   ) {
     return clientSupportsLiteralCodeActions
         ? Either2<Command, CodeAction>.t2(
-            CodeAction(command.title, kind, null, null, command),
+            CodeAction(title: command.title, kind: kind, command: command),
           )
         : Either2<Command, CodeAction>.t1(command);
   }
@@ -100,11 +106,10 @@
   /// before the version number is read.
   CodeAction _createAssistAction(Assist assist) {
     return CodeAction(
-      assist.change.message,
-      toCodeActionKind(assist.change.id, CodeActionKind.Refactor),
-      const [],
-      createWorkspaceEdit(server, assist.change.edits),
-      null,
+      title: assist.change.message,
+      kind: toCodeActionKind(assist.change.id, CodeActionKind.Refactor),
+      diagnostics: const [],
+      edit: createWorkspaceEdit(server, assist.change.edits),
     );
   }
 
@@ -114,11 +119,10 @@
   /// before the version number is read.
   CodeAction _createFixAction(Fix fix, Diagnostic diagnostic) {
     return CodeAction(
-      fix.change.message,
-      toCodeActionKind(fix.change.id, CodeActionKind.QuickFix),
-      [diagnostic],
-      createWorkspaceEdit(server, fix.change.edits),
-      null,
+      title: fix.change.message,
+      kind: toCodeActionKind(fix.change.id, CodeActionKind.QuickFix),
+      diagnostics: [diagnostic],
+      edit: createWorkspaceEdit(server, fix.change.edits),
     );
   }
 
@@ -137,12 +141,12 @@
       // Build a new CodeAction that merges the diagnostics from each same
       // code action onto a single one.
       return CodeAction(
-          first.title,
-          first.kind,
+          title: first.title,
+          kind: first.kind,
           // Merge diagnostics from all of the CodeActions.
-          groups[edit].expand((r) => r.diagnostics).toList(),
-          first.edit,
-          first.command);
+          diagnostics: groups[edit].expand((r) => r.diagnostics).toList(),
+          edit: first.edit,
+          command: first.command);
     }).toList();
   }
 
@@ -187,6 +191,7 @@
     HashSet<CodeActionKind> kinds,
     bool supportsLiterals,
     bool supportsWorkspaceApplyEdit,
+    HashSet<DiagnosticTag> supportedDiagnosticTags,
     String path,
     Range range,
     int offset,
@@ -198,7 +203,8 @@
           kinds, supportsLiterals, supportsWorkspaceApplyEdit, path),
       _getAssistActions(kinds, supportsLiterals, offset, length, unit),
       _getRefactorActions(kinds, supportsLiterals, path, offset, length, unit),
-      _getFixActions(kinds, supportsLiterals, range, unit),
+      _getFixActions(
+          kinds, supportsLiterals, supportedDiagnosticTags, range, unit),
     ]);
     final flatResults = results.expand((x) => x).toList();
 
@@ -208,6 +214,7 @@
   Future<List<Either2<Command, CodeAction>>> _getFixActions(
     HashSet<CodeActionKind> clientSupportedCodeActionKinds,
     bool clientSupportsLiteralCodeActions,
+    HashSet<DiagnosticTag> supportedDiagnosticTags,
     Range range,
     ResolvedUnitResult unit,
   ) async {
@@ -239,7 +246,11 @@
           if (fixes.isNotEmpty) {
             fixes.sort(Fix.SORT_BY_RELEVANCE);
 
-            final diagnostic = toDiagnostic(unit, error);
+            final diagnostic = toDiagnostic(
+              unit,
+              error,
+              supportedTags: supportedDiagnosticTags,
+            );
             codeActions.addAll(
               fixes.map((fix) => _createFixAction(fix, diagnostic)),
             );
@@ -291,14 +302,18 @@
       return _commandOrCodeAction(
           clientSupportsLiteralCodeActions,
           actionKind,
-          Command(name, Commands.performRefactor, [
-            refactorKind.toJson(),
-            path,
-            server.getVersionedDocumentIdentifier(path).version,
-            offset,
-            length,
-            options,
-          ]));
+          Command(
+            title: name,
+            command: Commands.performRefactor,
+            arguments: [
+              refactorKind.toJson(),
+              path,
+              server.getVersionedDocumentIdentifier(path).version,
+              offset,
+              length,
+              options,
+            ],
+          ));
     }
 
     try {
@@ -357,12 +372,18 @@
       _commandOrCodeAction(
         clientSupportsLiteralCodeActions,
         DartCodeActionKind.SortMembers,
-        Command('Sort Members', Commands.sortMembers, [path]),
+        Command(
+            title: 'Sort Members',
+            command: Commands.sortMembers,
+            arguments: [path]),
       ),
       _commandOrCodeAction(
         clientSupportsLiteralCodeActions,
         CodeActionKind.SourceOrganizeImports,
-        Command('Organize Imports', Commands.organizeImports, [path]),
+        Command(
+            title: 'Organize Imports',
+            command: Commands.organizeImports,
+            arguments: [path]),
       ),
     ];
   }
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 cc4b415..272057f 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
@@ -154,7 +154,7 @@
       '$name/$declaringUri';
 
   Future<ErrorOr<List<CompletionItem>>> _getPluginResults(
-    TextDocumentClientCapabilitiesCompletion completionCapabilities,
+    CompletionClientCapabilities completionCapabilities,
     HashSet<CompletionItemKind> clientSupportedCompletionKinds,
     LineInfo lineInfo,
     String path,
@@ -177,7 +177,7 @@
   }
 
   Future<ErrorOr<List<CompletionItem>>> _getServerItems(
-    TextDocumentClientCapabilitiesCompletion completionCapabilities,
+    CompletionClientCapabilities completionCapabilities,
     HashSet<CompletionItemKind> clientSupportedCompletionKinds,
     bool includeSuggestionSets,
     ResolvedUnitResult unit,
@@ -217,7 +217,6 @@
         final serverSuggestions = await contributor.computeSuggestions(
           perf,
           completionRequest,
-          enableUriContributor: true,
         );
 
         if (token.isCancellationRequested) {
@@ -340,7 +339,7 @@
   }
 
   Iterable<CompletionItem> _pluginResultsToItems(
-    TextDocumentClientCapabilitiesCompletion completionCapabilities,
+    CompletionClientCapabilities completionCapabilities,
     HashSet<CompletionItemKind> clientSupportedCompletionKinds,
     LineInfo lineInfo,
     List<plugin.CompletionGetSuggestionsResult> pluginResults,
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart
index e6a8cfe..63ce7d0 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion_resolve.dart
@@ -13,7 +13,7 @@
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/element/element.dart' as analyzer;
 import 'package:analyzer/src/util/comment.dart' as analyzer;
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 
 class CompletionResolveHandler
     extends MessageHandler<CompletionItem, CompletionItem> {
@@ -111,8 +111,8 @@
         }
 
         var newInsertText = item.insertText ?? item.label;
-        final builder = DartChangeBuilder(session);
-        await builder.addFileEdit(data.file, (builder) {
+        final builder = ChangeBuilder(session: session);
+        await builder.addDartFileEdit(data.file, (builder) {
           final result = builder.importLibraryElement(library.uri);
           if (result.prefix != null) {
             newInsertText = '${result.prefix}.$newInsertText';
@@ -135,7 +135,9 @@
         if (otherFilesChanges.isNotEmpty) {
           final workspaceEdit = createWorkspaceEdit(server, otherFilesChanges);
           command = Command(
-              'Add import', Commands.sendWorkspaceEdit, [workspaceEdit]);
+              title: 'Add import',
+              command: Commands.sendWorkspaceEdit,
+              arguments: [workspaceEdit]);
         }
 
         // Documentation is added on during resolve for LSP.
@@ -146,32 +148,36 @@
         final documentation = asStringOrMarkupContent(formats, dartDoc);
 
         return success(CompletionItem(
-          item.label,
-          item.kind,
-          data.displayUri != null && thisFilesChanges.isNotEmpty
+          label: item.label,
+          kind: item.kind,
+          tags: item.tags,
+          detail: data.displayUri != null && thisFilesChanges.isNotEmpty
               ? "Auto import from '${data.displayUri}'\n\n${item.detail ?? ''}"
                   .trim()
               : item.detail,
-          documentation,
-          item.deprecated,
-          item.preselect,
-          item.sortText,
-          item.filterText,
-          newInsertText,
-          item.insertTextFormat,
-          TextEdit(
+          documentation: documentation,
+          // The deprecated field is deprecated, but we should still supply it
+          // for clients that have not adopted CompletionItemTags.
+          // ignore: deprecated_member_use_from_same_package
+          deprecated: item.deprecated,
+          preselect: item.preselect,
+          sortText: item.sortText,
+          filterText: item.filterText,
+          insertText: newInsertText,
+          insertTextFormat: item.insertTextFormat,
+          textEdit: TextEdit(
             // TODO(dantup): If `clientSupportsSnippets == true` then we should map
             // `selection` in to a snippet (see how Dart Code does this).
-            toRange(lineInfo, item.data.rOffset, item.data.rLength),
-            newInsertText,
+            range: toRange(lineInfo, item.data.rOffset, item.data.rLength),
+            newText: newInsertText,
           ),
-          thisFilesChanges
+          additionalTextEdits: thisFilesChanges
               .expand((change) =>
                   change.edits.map((edit) => toTextEdit(lineInfo, edit)))
               .toList(),
-          item.commitCharacters,
-          command ?? item.command,
-          item.data,
+          commitCharacters: item.commitCharacters,
+          command: command ?? item.command,
+          data: item.data,
         ));
       } on InconsistentAnalysisException {
         // Loop around to try again.
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart
index f4f8968..eaba645 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart
@@ -80,14 +80,15 @@
     Outline outline,
   ) {
     return DocumentSymbol(
-      toElementName(outline.element),
-      outline.element.parameters,
-      elementKindToSymbolKind(clientSupportedSymbolKinds, outline.element.kind),
-      outline.element.isDeprecated,
-      toRange(lineInfo, outline.codeOffset, outline.codeLength),
-      toRange(lineInfo, outline.element.location.offset,
+      name: toElementName(outline.element),
+      detail: outline.element.parameters,
+      kind: elementKindToSymbolKind(
+          clientSupportedSymbolKinds, outline.element.kind),
+      deprecated: outline.element.isDeprecated,
+      range: toRange(lineInfo, outline.codeOffset, outline.codeLength),
+      selectionRange: toRange(lineInfo, outline.element.location.offset,
           outline.element.location.length),
-      outline.children
+      children: outline.children
           ?.map((child) =>
               _asDocumentSymbol(clientSupportedSymbolKinds, lineInfo, child))
           ?.toList(),
@@ -102,15 +103,16 @@
     Outline outline,
   ) {
     return SymbolInformation(
-      toElementName(outline.element),
-      elementKindToSymbolKind(clientSupportedSymbolKinds, outline.element.kind),
-      outline.element.isDeprecated,
-      Location(
-        documentUri,
-        toRange(lineInfo, outline.element.location.offset,
+      name: toElementName(outline.element),
+      kind: elementKindToSymbolKind(
+          clientSupportedSymbolKinds, outline.element.kind),
+      deprecated: outline.element.isDeprecated,
+      location: Location(
+        uri: documentUri,
+        range: toRange(lineInfo, outline.element.location.offset,
             outline.element.location.length),
       ),
-      containerName,
+      containerName: containerName,
     );
   }
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart
index 1ec00e8..22e60af 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart
@@ -29,7 +29,8 @@
     }
 
     final unformattedSource = file.readAsStringSync();
-    return success(generateEditsForFormatting(unformattedSource));
+    return success(generateEditsForFormatting(
+        unformattedSource, server.clientConfiguration.lineLength));
   }
 
   @override
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart
index f159056..2ca27ef 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart
@@ -29,7 +29,8 @@
     }
 
     final unformattedSource = file.readAsStringSync();
-    return success(generateEditsForFormatting(unformattedSource));
+    return success(generateEditsForFormatting(
+        unformattedSource, server.clientConfiguration.lineLength));
   }
 
   @override
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
index 00941d4..72bc4d6 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
@@ -78,8 +78,9 @@
     final formats =
         server?.clientCapabilities?.textDocument?.hover?.contentFormat;
     return Hover(
-      asStringOrMarkupContent(formats, content.toString().trimRight()),
-      toRange(lineInfo, hover.offset, hover.length),
+      contents:
+          asStringOrMarkupContent(formats, content.toString().trimRight()),
+      range: toRange(lineInfo, hover.offset, hover.length),
     );
   }
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_implementation.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_implementation.dart
index 235abff..ee143e7 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_implementation.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_implementation.dart
@@ -82,8 +82,9 @@
           item.memberElement?.location ?? item.classElement?.location;
       final lineInfo = server.getLineInfo(elementLocation.file);
       return Location(
-        Uri.file(elementLocation.file).toString(),
-        toRange(lineInfo, elementLocation.offset, elementLocation.length),
+        uri: Uri.file(elementLocation.file).toString(),
+        range:
+            toRange(lineInfo, elementLocation.offset, elementLocation.length),
       );
     }).toList();
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
index 7df227a..4ee1e1a 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.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 'dart:io';
+
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_states.dart';
@@ -55,6 +57,18 @@
 
     server.capabilities = server.capabilitiesComputer
         .computeServerCapabilities(params.capabilities);
-    return success(InitializeResult(server.capabilities));
+
+    var sdkVersion = Platform.version;
+    if (sdkVersion.contains(' ')) {
+      sdkVersion = sdkVersion.substring(0, sdkVersion.indexOf(' '));
+    }
+
+    return success(InitializeResult(
+      capabilities: server.capabilities,
+      serverInfo: InitializeResultServerInfo(
+        name: 'Dart SDK LSP Analysis Server',
+        version: sdkVersion,
+      ),
+    ));
   }
 }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_rename.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_rename.dart
index 44b8c85..a0daa67 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_rename.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_rename.dart
@@ -55,7 +55,7 @@
       }
 
       return success(RangeAndPlaceholder(
-        toRange(
+        range: toRange(
           unit.result.lineInfo,
           // If the offset is set to -1 it means there is no location for the
           // old name. However since we must provide a range for LSP, we'll use
@@ -64,7 +64,7 @@
           refactorDetails.offset == -1 ? offset : refactorDetails.offset,
           refactorDetails.length,
         ),
-        refactoring.oldName,
+        placeholder: refactoring.oldName,
       ));
     });
   }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
index 48c5ec010..acecc86 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
@@ -8,6 +8,7 @@
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/lsp/constants.dart';
 import 'package:analysis_server/src/lsp/handlers/custom/handler_diagnostic_server.dart';
+import 'package:analysis_server/src/lsp/handlers/custom/handler_reanalyze.dart';
 import 'package:analysis_server/src/lsp/handlers/custom/handler_super.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_change_workspace_folders.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_code_actions.dart';
@@ -102,6 +103,7 @@
     registerHandler(DiagnosticServerHandler(server));
     registerHandler(WorkspaceSymbolHandler(server));
     registerHandler(WorkspaceDidChangeConfigurationMessageHandler(server));
+    registerHandler(ReanalyzeHandler(server));
   }
 }
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart
index 0c3a3a8..6a4b026 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart
@@ -149,8 +149,8 @@
       // We don't get a VersionedTextDocumentIdentifier with a didOpen but we
       // do get the necessary info to create one.
       server.documentVersions[path] = VersionedTextDocumentIdentifier(
-        params.textDocument.version,
-        params.textDocument.uri,
+        version: params.textDocument.version,
+        uri: params.textDocument.uri,
       );
       server.onOverlayCreated(path, doc.text);
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_workspace_symbols.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_workspace_symbols.dart
index 4ad092f..c1cce0a 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_workspace_symbols.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_workspace_symbols.dart
@@ -93,8 +93,8 @@
       declaration.codeLength,
     );
     final location = Location(
-      Uri.file(filePath).toString(),
-      range,
+      uri: Uri.file(filePath).toString(),
+      range: range,
     );
 
     final hasParameters =
@@ -103,10 +103,10 @@
         hasParameters ? (declaration.parameters == '()' ? '()' : '(…)') : '';
 
     return SymbolInformation(
-        '${declaration.name}$nameSuffix',
-        kind,
-        null, // We don't have easy access to isDeprecated here.
-        location,
-        declaration.className ?? declaration.mixinName);
+        name: '${declaration.name}$nameSuffix',
+        kind: kind,
+        deprecated: null, // We don't have easy access to isDeprecated here.
+        location: location,
+        containerName: declaration.className ?? declaration.mixinName);
   }
 }
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
index 64bb954..e875cfa 100644
--- a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
@@ -182,8 +182,8 @@
       // others (for example "flutter").
       final response = await sendRequest(
           Method.workspace_configuration,
-          ConfigurationParams([
-            ConfigurationItem(null, 'dart'),
+          ConfigurationParams(items: [
+            ConfigurationItem(section: 'dart'),
           ]));
 
       final result = response.result;
@@ -218,7 +218,7 @@
   /// version is not known.
   VersionedTextDocumentIdentifier getVersionedDocumentIdentifier(String path) {
     return documentVersions[path] ??
-        VersionedTextDocumentIdentifier(null, Uri.file(path).toString());
+        VersionedTextDocumentIdentifier(uri: Uri.file(path).toString());
   }
 
   void handleClientConnection(
@@ -269,7 +269,9 @@
               sendErrorResponse(message, result.error);
             } else {
               channel.sendResponse(ResponseMessage(
-                  message.id, result.result, null, jsonRpcVersion));
+                  id: message.id,
+                  result: result.result,
+                  jsonrpc: jsonRpcVersion));
             }
           } else if (message is NotificationMessage) {
             final result = await messageHandler.handleMessage(message);
@@ -290,9 +292,8 @@
           sendErrorResponse(
               message,
               ResponseError(
-                ServerErrorCodes.UnhandledError,
-                errorMessage,
-                null,
+                code: ServerErrorCodes.UnhandledError,
+                message: errorMessage,
               ));
           logException(errorMessage, error, stackTrace);
         }
@@ -303,9 +304,9 @@
   /// Logs the error on the client using window/logMessage.
   void logErrorToClient(String message) {
     channel.sendNotification(NotificationMessage(
-      Method.window_logMessage,
-      LogMessageParams(MessageType.Error, message),
-      jsonRpcVersion,
+      method: Method.window_logMessage,
+      params: LogMessageParams(type: MessageType.Error, message: message),
+      jsonrpc: jsonRpcVersion,
     ));
   }
 
@@ -335,7 +336,8 @@
   }
 
   void onOverlayCreated(String path, String content) {
-    resourceProvider.setOverlay(path, content: content, modificationStamp: 0);
+    resourceProvider.setOverlay(path,
+        content: content, modificationStamp: overlayModificationStamp++);
 
     _afterOverlayChanged(path, plugin.AddContentOverlay(content));
   }
@@ -360,49 +362,51 @@
     }
 
     resourceProvider.setOverlay(path,
-        content: newContent, modificationStamp: 0);
+        content: newContent, modificationStamp: overlayModificationStamp++);
 
     _afterOverlayChanged(path, plugin.ChangeContentOverlay(edits));
   }
 
   void publishClosingLabels(String path, List<ClosingLabel> labels) {
-    final params =
-        PublishClosingLabelsParams(Uri.file(path).toString(), labels);
+    final params = PublishClosingLabelsParams(
+        uri: Uri.file(path).toString(), labels: labels);
     final message = NotificationMessage(
-      CustomMethods.PublishClosingLabels,
-      params,
-      jsonRpcVersion,
+      method: CustomMethods.PublishClosingLabels,
+      params: params,
+      jsonrpc: jsonRpcVersion,
     );
     sendNotification(message);
   }
 
   void publishDiagnostics(String path, List<Diagnostic> errors) {
-    final params = PublishDiagnosticsParams(Uri.file(path).toString(), errors);
+    final params = PublishDiagnosticsParams(
+        uri: Uri.file(path).toString(), diagnostics: errors);
     final message = NotificationMessage(
-      Method.textDocument_publishDiagnostics,
-      params,
-      jsonRpcVersion,
+      method: Method.textDocument_publishDiagnostics,
+      params: params,
+      jsonrpc: jsonRpcVersion,
     );
     sendNotification(message);
   }
 
   void publishFlutterOutline(String path, FlutterOutline outline) {
-    final params =
-        PublishFlutterOutlineParams(Uri.file(path).toString(), outline);
+    final params = PublishFlutterOutlineParams(
+        uri: Uri.file(path).toString(), outline: outline);
     final message = NotificationMessage(
-      CustomMethods.PublishFlutterOutline,
-      params,
-      jsonRpcVersion,
+      method: CustomMethods.PublishFlutterOutline,
+      params: params,
+      jsonrpc: jsonRpcVersion,
     );
     sendNotification(message);
   }
 
   void publishOutline(String path, Outline outline) {
-    final params = PublishOutlineParams(Uri.file(path).toString(), outline);
+    final params =
+        PublishOutlineParams(uri: Uri.file(path).toString(), outline: outline);
     final message = NotificationMessage(
-      CustomMethods.PublishOutline,
-      params,
-      jsonRpcVersion,
+      method: CustomMethods.PublishOutline,
+      params: params,
+      jsonrpc: jsonRpcVersion,
     );
     sendNotification(message);
   }
@@ -417,8 +421,8 @@
 
   void sendErrorResponse(Message message, ResponseError error) {
     if (message is RequestMessage) {
-      channel.sendResponse(
-          ResponseMessage(message.id, null, error, jsonRpcVersion));
+      channel.sendResponse(ResponseMessage(
+          id: message.id, error: error, jsonrpc: jsonRpcVersion));
     } else if (message is ResponseMessage) {
       // For bad response messages where we can't respond with an error, send it
       // as show instead of log.
@@ -455,10 +459,10 @@
     completers[requestId] = completer;
 
     channel.sendRequest(RequestMessage(
-      Either2<num, String>.t1(requestId),
-      method,
-      params,
-      jsonRpcVersion,
+      id: Either2<num, String>.t1(requestId),
+      method: method,
+      params: params,
+      jsonrpc: jsonRpcVersion,
     ));
 
     return completer.future;
@@ -484,9 +488,9 @@
   /// the [status] information.
   void sendStatusNotification(nd.AnalysisStatus status) {
     channel.sendNotification(NotificationMessage(
-      CustomMethods.AnalyzerStatus,
-      AnalyzerStatusParams(status.isAnalyzing),
-      jsonRpcVersion,
+      method: CustomMethods.AnalyzerStatus,
+      params: AnalyzerStatusParams(isAnalyzing: status.isAnalyzing),
+      jsonrpc: jsonRpcVersion,
     ));
   }
 
@@ -515,7 +519,8 @@
     // during normal analysis (for example dot folders are skipped over in
     // _handleWatchEventImpl).
     return contextManager.isInAnalysisRoot(file) &&
-        !contextManager.isContainedInDotFolder(file);
+        !contextManager.isContainedInDotFolder(file) &&
+        !contextManager.isIgnored(file);
   }
 
   /// Returns `true` if Flutter outlines should be sent for [file] with the
@@ -538,9 +543,9 @@
 
   void showMessageToUser(MessageType type, String message) {
     channel.sendNotification(NotificationMessage(
-      Method.window_showMessage,
-      ShowMessageParams(type, message),
-      jsonRpcVersion,
+      method: Method.window_showMessage,
+      params: ShowMessageParams(type: type, message: message),
+      jsonrpc: jsonRpcVersion,
     ));
   }
 
@@ -657,6 +662,11 @@
       Folder folder, ContextRoot contextRoot, AnalysisOptions options) {
     var builder = createContextBuilder(folder, options);
     var analysisDriver = builder.buildDriver(contextRoot);
+    final textDocumentCapabilities =
+        analysisServer.clientCapabilities?.textDocument;
+    final supportedDiagnosticTags = HashSet<DiagnosticTag>.of(
+        textDocumentCapabilities?.publishDiagnostics?.tagSupport?.valueSet ??
+            []);
     analysisDriver.results.listen((result) {
       var path = result.path;
       if (analysisServer.shouldSendErrorsNotificationFor(path)) {
@@ -665,7 +675,12 @@
             result.errors
                 .where((e) => e.errorCode.type != ErrorType.TODO)
                 .toList(),
-            toDiagnostic);
+            (result, error, [severity]) => toDiagnostic(
+                  result,
+                  error,
+                  supportedTags: supportedDiagnosticTags,
+                  errorSeverity: severity,
+                ));
 
         analysisServer.publishDiagnostics(result.path, serverErrors);
       }
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_socket_server.dart b/pkg/analysis_server/lib/src/lsp/lsp_socket_server.dart
index 3c49e8a..ae00fb8 100644
--- a/pkg/analysis_server/lib/src/lsp/lsp_socket_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/lsp_socket_server.dart
@@ -45,19 +45,20 @@
   /// given serverChannel.
   void createAnalysisServer(LspServerCommunicationChannel serverChannel) {
     if (analysisServer != null) {
-      ResponseError error = ResponseError<void>(
-          ServerErrorCodes.ServerAlreadyStarted,
-          'Server already started',
-          null);
+      final error = ResponseError(
+        code: ServerErrorCodes.ServerAlreadyStarted,
+        message: 'Server already started',
+      );
       serverChannel.sendNotification(NotificationMessage(
-        Method.window_showMessage,
-        ShowMessageParams(MessageType.Error, error.message),
-        jsonRpcVersion,
+        method: Method.window_showMessage,
+        params:
+            ShowMessageParams(type: MessageType.Error, message: error.message),
+        jsonrpc: jsonRpcVersion,
       ));
       serverChannel.listen((Message message) {
         if (message is RequestMessage) {
-          serverChannel.sendResponse(
-              ResponseMessage(message.id, null, error, jsonRpcVersion));
+          serverChannel.sendResponse(ResponseMessage(
+              id: message.id, error: error, jsonrpc: jsonRpcVersion));
         }
       });
       return;
diff --git a/pkg/analysis_server/lib/src/lsp/mapping.dart b/pkg/analysis_server/lib/src/lsp/mapping.dart
index 198f463..6249c90 100644
--- a/pkg/analysis_server/lib/src/lsp/mapping.dart
+++ b/pkg/analysis_server/lib/src/lsp/mapping.dart
@@ -28,11 +28,25 @@
 import 'package:analyzer/diagnostic/diagnostic.dart' as analyzer;
 import 'package:analyzer/error/error.dart' as server;
 import 'package:analyzer/source/line_info.dart' as server;
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/source.dart' as server;
 import 'package:analyzer/src/services/available_declarations.dart';
 import 'package:analyzer/src/services/available_declarations.dart' as dec;
 import 'package:analyzer_plugin/protocol/protocol_common.dart' as plugin;
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart' as server;
+import 'package:meta/meta.dart';
+
+const diagnosticTagsForErrorCode = <server.ErrorCode, List<lsp.DiagnosticTag>>{
+  HintCode.DEAD_CODE: [lsp.DiagnosticTag.Unnecessary],
+  HintCode.DEPRECATED_MEMBER_USE: [lsp.DiagnosticTag.Deprecated],
+  HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE: [
+    lsp.DiagnosticTag.Deprecated
+  ],
+  HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE: [
+    lsp.DiagnosticTag.Deprecated
+  ],
+  HintCode.DEPRECATED_MEMBER_USE_WITH_MESSAGE: [lsp.DiagnosticTag.Deprecated],
+};
 
 const languageSourceName = 'dart';
 
@@ -175,7 +189,7 @@
 }
 
 lsp.CompletionItem declarationToCompletionItem(
-  lsp.TextDocumentClientCapabilitiesCompletion completionCapabilities,
+  lsp.CompletionClientCapabilities completionCapabilities,
   HashSet<lsp.CompletionItemKind> supportedCompletionItemKinds,
   String file,
   int offset,
@@ -224,8 +238,12 @@
       label = declaration.name;
   }
 
-  final useDeprecated =
+  final supportsDeprecatedFlag =
       completionCapabilities?.completionItem?.deprecatedSupport == true;
+  final supportedTags =
+      completionCapabilities?.completionItem?.tagSupport?.valueSet ?? const [];
+  final supportsDeprecatedTag =
+      supportedTags.contains(lsp.CompletionItemTag.Deprecated);
 
   final completionKind = declarationKindToCompletionItemKind(
       supportedCompletionItemKinds, declaration.kind);
@@ -241,33 +259,38 @@
   // the generated JSON as much as possible - for example using nulls in place
   // of empty lists/false where possible.
   return lsp.CompletionItem(
-    label,
-    completionKind,
-    getDeclarationCompletionDetail(declaration, completionKind, useDeprecated),
-    null, // documentation - will be added during resolve.
-    useDeprecated && declaration.isDeprecated ? true : null,
-    null, // preselect
+    label: label,
+    kind: completionKind,
+    tags: supportedTags.isNotEmpty
+        ? [
+            if (supportsDeprecatedTag && declaration.isDeprecated)
+              lsp.CompletionItemTag.Deprecated
+          ]
+        : null,
+    detail: getDeclarationCompletionDetail(declaration, completionKind,
+        supportsDeprecatedFlag || supportsDeprecatedTag),
+    deprecated:
+        supportsDeprecatedFlag && declaration.isDeprecated ? true : null,
     // Relevance is a number, highest being best. LSP does text sort so subtract
     // from a large number so that a text sort will result in the correct order.
     // 555 -> 999455
     //  10 -> 999990
     //   1 -> 999999
-    (1000000 - itemRelevance).toString(),
-    filterText != label ? filterText : null, // filterText uses label if not set
-    insertText != label ? insertText : null, // insertText uses label if not set
-    null, // insertTextFormat (we always use plain text so can ommit this)
-    null, // textEdit - added on during resolve
-    null, // additionalTextEdits, used for adding imports, etc.
-    null, // commitCharacters
-    null, // command
+    sortText: (1000000 - itemRelevance).toString(),
+    filterText: filterText != label
+        ? filterText
+        : null, // filterText uses label if not set
+    insertText: insertText != label
+        ? insertText
+        : null, // insertText uses label if not set
     // data, used for completionItem/resolve.
-    lsp.CompletionItemResolutionInfo(
-        file,
-        offset,
-        includedSuggestionSet.id,
-        includedSuggestionSet.displayUri ?? library.uri?.toString(),
-        replacementOffset,
-        replacementLength),
+    data: lsp.CompletionItemResolutionInfo(
+        file: file,
+        offset: offset,
+        libId: includedSuggestionSet.id,
+        displayUri: includedSuggestionSet.displayUri ?? library.uri?.toString(),
+        rOffset: replacementOffset,
+        rLength: replacementLength),
   );
 }
 
@@ -499,6 +522,19 @@
   }
 }
 
+List<lsp.DiagnosticTag> getDiagnosticTags(
+    HashSet<lsp.DiagnosticTag> supportedTags, server.AnalysisError error) {
+  if (supportedTags == null) {
+    return null;
+  }
+
+  final tags = diagnosticTagsForErrorCode[error.errorCode]
+      ?.where(supportedTags.contains)
+      ?.toList();
+
+  return tags != null && tags.isNotEmpty ? tags : null;
+}
+
 bool isDartDocument(lsp.TextDocumentIdentifier doc) =>
     doc?.uri?.endsWith('.dart');
 
@@ -509,8 +545,8 @@
   }
 
   return lsp.Location(
-    Uri.file(targetFilePath).toString(),
-    toRange(lineInfo, target.offset, target.length),
+    uri: Uri.file(targetFilePath).toString(),
+    range: toRange(lineInfo, target.offset, target.length),
   );
 }
 
@@ -526,16 +562,17 @@
 ErrorOr<String> pathOfUri(Uri uri) {
   if (uri == null) {
     return ErrorOr<String>.error(ResponseError(
-        lsp.ServerErrorCodes.InvalidFilePath,
-        'Document URI was not supplied',
-        null));
+      code: lsp.ServerErrorCodes.InvalidFilePath,
+      message: 'Document URI was not supplied',
+    ));
   }
   final isValidFileUri = (uri?.isScheme('file') ?? false);
   if (!isValidFileUri) {
     return ErrorOr<String>.error(ResponseError(
-        lsp.ServerErrorCodes.InvalidFilePath,
-        'URI was not a valid file:// URI',
-        uri.toString()));
+      code: lsp.ServerErrorCodes.InvalidFilePath,
+      message: 'URI was not a valid file:// URI',
+      data: uri.toString(),
+    ));
   }
   try {
     return ErrorOr<String>.success(uri.toFilePath());
@@ -543,9 +580,9 @@
     // Even if tryParse() works and file == scheme, toFilePath() can throw on
     // Windows if there are invalid characters.
     return ErrorOr<String>.error(ResponseError(
-        lsp.ServerErrorCodes.InvalidFilePath,
-        'File URI did not contain a valid file path',
-        uri.toString()));
+        code: lsp.ServerErrorCodes.InvalidFilePath,
+        message: 'File URI did not contain a valid file path',
+        data: uri.toString()));
   }
 }
 
@@ -568,12 +605,12 @@
 
   var lineInfo = getLineInfo(error.location.file);
   return lsp.Diagnostic(
-    toRange(lineInfo, error.location.offset, error.location.length),
-    pluginToDiagnosticSeverity(error.severity),
-    error.code,
-    languageSourceName,
-    message,
-    relatedInformation,
+    range: toRange(lineInfo, error.location.offset, error.location.length),
+    severity: pluginToDiagnosticSeverity(error.severity),
+    code: error.code,
+    source: languageSourceName,
+    message: message,
+    relatedInformation: relatedInformation,
   );
 }
 
@@ -583,15 +620,15 @@
   var file = message.location.file;
   var lineInfo = getLineInfo(file);
   return lsp.DiagnosticRelatedInformation(
-      lsp.Location(
-        Uri.file(file).toString(),
-        toRange(
+      location: lsp.Location(
+        uri: Uri.file(file).toString(),
+        range: toRange(
           lineInfo,
           message.location.offset,
           message.location.length,
         ),
       ),
-      message.message);
+      message: message.message);
 }
 
 lsp.DiagnosticSeverity pluginToDiagnosticSeverity(
@@ -621,8 +658,8 @@
   }
 
   return lsp.Location(
-    Uri.file(result.location.file).toString(),
-    toRange(lineInfo, location.offset, location.length),
+    uri: Uri.file(result.location.file).toString(),
+    range: toRange(lineInfo, location.offset, location.length),
   );
 }
 
@@ -675,7 +712,8 @@
 lsp.ClosingLabel toClosingLabel(
         server.LineInfo lineInfo, server.ClosingLabel label) =>
     lsp.ClosingLabel(
-        toRange(lineInfo, label.offset, label.length), label.label);
+        range: toRange(lineInfo, label.offset, label.length),
+        label: label.label);
 
 CodeActionKind toCodeActionKind(String id, lsp.CodeActionKind fallback) {
   if (id == null) {
@@ -692,7 +730,7 @@
 }
 
 lsp.CompletionItem toCompletionItem(
-  lsp.TextDocumentClientCapabilitiesCompletion completionCapabilities,
+  lsp.CompletionClientCapabilities completionCapabilities,
   HashSet<lsp.CompletionItemKind> supportedCompletionItemKinds,
   server.LineInfo lineInfo,
   server.CompletionSuggestion suggestion,
@@ -721,8 +759,12 @@
     }
   }
 
-  final useDeprecated =
+  final supportsDeprecatedFlag =
       completionCapabilities?.completionItem?.deprecatedSupport == true;
+  final supportedTags =
+      completionCapabilities?.completionItem?.tagSupport?.valueSet ?? const [];
+  final supportsDeprecatedTag =
+      supportedTags.contains(lsp.CompletionItemTag.Deprecated);
   final formats = completionCapabilities?.completionItem?.documentationFormat;
   final supportsSnippets =
       completionCapabilities?.completionItem?.snippetSupport == true;
@@ -747,37 +789,47 @@
   // the generated JSON as much as possible - for example using nulls in place
   // of empty lists/false where possible.
   return lsp.CompletionItem(
-    label,
-    completionKind,
-    getCompletionDetail(suggestion, completionKind, useDeprecated),
-    asStringOrMarkupContent(formats, cleanDartdoc(suggestion.docComplete)),
-    useDeprecated && suggestion.isDeprecated ? true : null,
-    null, // preselect
+    label: label,
+    kind: completionKind,
+    tags: supportedTags.isNotEmpty
+        ? [
+            if (supportsDeprecatedTag && suggestion.isDeprecated)
+              lsp.CompletionItemTag.Deprecated
+          ]
+        : null,
+    detail: getCompletionDetail(suggestion, completionKind,
+        supportsDeprecatedFlag || supportsDeprecatedTag),
+    documentation:
+        asStringOrMarkupContent(formats, cleanDartdoc(suggestion.docComplete)),
+    deprecated: supportsDeprecatedFlag && suggestion.isDeprecated ? true : null,
     // Relevance is a number, highest being best. LSP does text sort so subtract
     // from a large number so that a text sort will result in the correct order.
     // 555 -> 999455
     //  10 -> 999990
     //   1 -> 999999
-    (1000000 - suggestion.relevance).toString(),
-    filterText != label ? filterText : null, // filterText uses label if not set
-    insertText != label ? insertText : null, // insertText uses label if not set
-    insertTextFormat != lsp.InsertTextFormat.PlainText
+    sortText: (1000000 - suggestion.relevance).toString(),
+    filterText: filterText != label
+        ? filterText
+        : null, // filterText uses label if not set
+    insertText: insertText != label
+        ? insertText
+        : null, // insertText uses label if not set
+    insertTextFormat: insertTextFormat != lsp.InsertTextFormat.PlainText
         ? insertTextFormat
         : null, // Defaults to PlainText if not supplied
-    lsp.TextEdit(
-      toRange(lineInfo, replacementOffset, replacementLength),
-      insertText,
+    textEdit: lsp.TextEdit(
+      range: toRange(lineInfo, replacementOffset, replacementLength),
+      newText: insertText,
     ),
-    null, // additionalTextEdits, used for adding imports, etc.
-    null, // commitCharacters
-    null, // command
-    null, // data, useful for if using lazy resolve, this comes back to us
   );
 }
 
 lsp.Diagnostic toDiagnostic(
-    server.ResolvedUnitResult result, server.AnalysisError error,
-    [server.ErrorSeverity errorSeverity]) {
+  server.ResolvedUnitResult result,
+  server.AnalysisError error, {
+  @required HashSet<lsp.DiagnosticTag> supportedTags,
+  server.ErrorSeverity errorSeverity,
+}) {
   var errorCode = error.errorCode;
 
   // Default to the error's severity if none is specified.
@@ -796,12 +848,13 @@
   }
 
   return lsp.Diagnostic(
-    toRange(result.lineInfo, error.offset, error.length),
-    toDiagnosticSeverity(errorSeverity),
-    errorCode.name.toLowerCase(),
-    languageSourceName,
-    message,
-    relatedInformation,
+    range: toRange(result.lineInfo, error.offset, error.length),
+    severity: toDiagnosticSeverity(errorSeverity),
+    code: errorCode.name.toLowerCase(),
+    source: languageSourceName,
+    message: message,
+    tags: getDiagnosticTags(supportedTags, error),
+    relatedInformation: relatedInformation,
   );
 }
 
@@ -810,15 +863,15 @@
   var file = message.filePath;
   var lineInfo = result.session.getFile(file).lineInfo;
   return lsp.DiagnosticRelatedInformation(
-      lsp.Location(
-        Uri.file(file).toString(),
-        toRange(
+      location: lsp.Location(
+        uri: Uri.file(file).toString(),
+        range: toRange(
           lineInfo,
           message.offset,
           message.length,
         ),
       ),
-      message.message);
+      message: message.message);
 }
 
 lsp.DiagnosticSeverity toDiagnosticSeverity(server.ErrorSeverity severity) {
@@ -840,14 +893,14 @@
 
 lsp.Element toElement(server.LineInfo lineInfo, server.Element element) =>
     lsp.Element(
-      element.location != null
+      range: element.location != null
           ? toRange(lineInfo, element.location.offset, element.location.length)
           : null,
-      toElementName(element),
-      element.kind.name,
-      element.parameters,
-      element.typeParameters,
-      element.returnType,
+      name: toElementName(element),
+      kind: element.kind.name,
+      parameters: element.parameters,
+      typeParameters: element.typeParameters,
+      returnType: element.returnType,
     );
 
 String toElementName(server.Element element) {
@@ -861,22 +914,22 @@
 lsp.FlutterOutline toFlutterOutline(
         server.LineInfo lineInfo, server.FlutterOutline outline) =>
     lsp.FlutterOutline(
-      outline.kind.name,
-      outline.label,
-      outline.className,
-      outline.variableName,
-      outline.attributes != null
+      kind: outline.kind.name,
+      label: outline.label,
+      className: outline.className,
+      variableName: outline.variableName,
+      attributes: outline.attributes != null
           ? outline.attributes
               .map(
                   (attribute) => toFlutterOutlineAttribute(lineInfo, attribute))
               .toList()
           : null,
-      outline.dartElement != null
+      dartElement: outline.dartElement != null
           ? toElement(lineInfo, outline.dartElement)
           : null,
-      toRange(lineInfo, outline.offset, outline.length),
-      toRange(lineInfo, outline.codeOffset, outline.codeLength),
-      outline.children != null
+      range: toRange(lineInfo, outline.offset, outline.length),
+      codeRange: toRange(lineInfo, outline.codeOffset, outline.codeLength),
+      children: outline.children != null
           ? outline.children.map((c) => toFlutterOutline(lineInfo, c)).toList()
           : null,
     );
@@ -884,9 +937,9 @@
 lsp.FlutterOutlineAttribute toFlutterOutlineAttribute(
         server.LineInfo lineInfo, server.FlutterOutlineAttribute attribute) =>
     lsp.FlutterOutlineAttribute(
-        attribute.name,
-        attribute.label,
-        attribute.valueLocation != null
+        name: attribute.name,
+        label: attribute.label,
+        valueRange: attribute.valueLocation != null
             ? toRange(lineInfo, attribute.valueLocation.offset,
                 attribute.valueLocation.length)
             : null);
@@ -894,8 +947,12 @@
 lsp.FoldingRange toFoldingRange(
     server.LineInfo lineInfo, server.FoldingRegion region) {
   final range = toRange(lineInfo, region.offset, region.length);
-  return lsp.FoldingRange(range.start.line, range.start.character,
-      range.end.line, range.end.character, toFoldingRangeKind(region.kind));
+  return lsp.FoldingRange(
+      startLine: range.start.line,
+      startCharacter: range.start.character,
+      endLine: range.end.line,
+      endCharacter: range.end.character,
+      kind: toFoldingRangeKind(region.kind));
 }
 
 lsp.FoldingRangeKind toFoldingRangeKind(server.FoldingKind kind) {
@@ -917,14 +974,14 @@
     server.LineInfo lineInfo, server.Occurrences occurrences) {
   return occurrences.offsets
       .map((offset) => lsp.DocumentHighlight(
-          toRange(lineInfo, offset, occurrences.length), null))
+          range: toRange(lineInfo, offset, occurrences.length)))
       .toList();
 }
 
 lsp.Location toLocation(server.Location location, server.LineInfo lineInfo) =>
     lsp.Location(
-      Uri.file(location.file).toString(),
-      toRange(
+      uri: Uri.file(location.file).toString(),
+      range: toRange(
         lineInfo,
         location.offset,
         location.length,
@@ -938,11 +995,11 @@
 }) {
   if (pos.line > lineInfo.lineCount) {
     return ErrorOr<int>.error(lsp.ResponseError(
-        failureIsCritial
+        code: failureIsCritial
             ? lsp.ServerErrorCodes.ClientServerInconsistentState
             : lsp.ServerErrorCodes.InvalidFileLineCol,
-        'Invalid line number',
-        pos.line.toString()));
+        message: 'Invalid line number',
+        data: pos.line.toString()));
   }
   // TODO(dantup): Is there any way to validate the character? We could ensure
   // it's less than the offset of the next line, but that would only work for
@@ -953,17 +1010,18 @@
 
 lsp.Outline toOutline(server.LineInfo lineInfo, server.Outline outline) =>
     lsp.Outline(
-      toElement(lineInfo, outline.element),
-      toRange(lineInfo, outline.offset, outline.length),
-      toRange(lineInfo, outline.codeOffset, outline.codeLength),
-      outline.children != null
+      element: toElement(lineInfo, outline.element),
+      range: toRange(lineInfo, outline.offset, outline.length),
+      codeRange: toRange(lineInfo, outline.codeOffset, outline.codeLength),
+      children: outline.children != null
           ? outline.children.map((c) => toOutline(lineInfo, c)).toList()
           : null,
     );
 
 lsp.Position toPosition(server.CharacterLocation location) {
   // LSP is zero-based, but analysis server is 1-based.
-  return lsp.Position(location.lineNumber - 1, location.columnNumber - 1);
+  return lsp.Position(
+      line: location.lineNumber - 1, character: location.columnNumber - 1);
 }
 
 lsp.Range toRange(server.LineInfo lineInfo, int offset, int length) {
@@ -971,8 +1029,8 @@
   server.CharacterLocation end = lineInfo.getLocation(offset + length);
 
   return lsp.Range(
-    toPosition(start),
-    toPosition(end),
+    start: toPosition(start),
+    end: toPosition(end),
   );
 }
 
@@ -1019,20 +1077,20 @@
     // to guess based on substrings). We should check the
     // signatureHelp.signatureInformation.parameterInformation.labelOffsetSupport
     // capability when deciding to send that.
-    return lsp.ParameterInformation(getParamLabel(param), null);
+    return lsp.ParameterInformation(label: getParamLabel(param));
   }
 
   final cleanDoc = cleanDartdoc(signature.dartdoc);
 
   return lsp.SignatureHelp(
-    [
+    signatures: [
       lsp.SignatureInformation(
-        getSignatureLabel(signature),
-        asStringOrMarkupContent(preferredFormats, cleanDoc),
-        signature.parameters.map(toParameterInfo).toList(),
+        label: getSignatureLabel(signature),
+        documentation: asStringOrMarkupContent(preferredFormats, cleanDoc),
+        parameters: signature.parameters.map(toParameterInfo).toList(),
       ),
     ],
-    0, // activeSignature
+    activeSignature: 0, // activeSignature
     // TODO(dantup): The LSP spec says this value will default to 0 if it's
     // not supplied or outside of the value range. However, setting -1 results
     // in no parameters being selected in VS Code, whereas null/0 will select the first.
@@ -1041,42 +1099,41 @@
     // (because you could also be on param 5 of an invalid call to a function
     // taking only 3 arguments) here:
     // https://github.com/Microsoft/language-server-protocol/issues/456#issuecomment-452318297
-    -1, // activeParameter
+    activeParameter: -1, // activeParameter
   );
 }
 
 lsp.TextDocumentEdit toTextDocumentEdit(FileEditInformation edit) {
   return lsp.TextDocumentEdit(
-    edit.doc,
-    edit.edits.map((e) => toTextEdit(edit.lineInfo, e)).toList(),
+    textDocument: edit.doc,
+    edits: edit.edits.map((e) => toTextEdit(edit.lineInfo, e)).toList(),
   );
 }
 
 lsp.TextEdit toTextEdit(server.LineInfo lineInfo, server.SourceEdit edit) {
   return lsp.TextEdit(
-    toRange(lineInfo, edit.offset, edit.length),
-    edit.replacement,
+    range: toRange(lineInfo, edit.offset, edit.length),
+    newText: edit.replacement,
   );
 }
 
 lsp.WorkspaceEdit toWorkspaceEdit(
-  lsp.WorkspaceClientCapabilities capabilities,
+  lsp.ClientCapabilitiesWorkspace capabilities,
   List<FileEditInformation> edits,
 ) {
   final clientSupportsTextDocumentEdits =
       capabilities?.workspaceEdit?.documentChanges == true;
   if (clientSupportsTextDocumentEdits) {
     return lsp.WorkspaceEdit(
-        null,
-        Either2<
+        documentChanges: Either2<
             List<lsp.TextDocumentEdit>,
             List<
                 Either4<lsp.TextDocumentEdit, lsp.CreateFile, lsp.RenameFile,
                     lsp.DeleteFile>>>.t1(
-          edits.map(toTextDocumentEdit).toList(),
-        ));
+      edits.map(toTextDocumentEdit).toList(),
+    ));
   } else {
-    return lsp.WorkspaceEdit(toWorkspaceEditChanges(edits), null);
+    return lsp.WorkspaceEdit(changes: toWorkspaceEditChanges(edits));
   }
 }
 
@@ -1114,5 +1171,5 @@
       ? lsp.MarkupKind.PlainText
       : lsp.MarkupKind.Markdown;
 
-  return lsp.MarkupContent(format, content);
+  return lsp.MarkupContent(kind: format, value: content);
 }
diff --git a/pkg/analysis_server/lib/src/lsp/notification_manager.dart b/pkg/analysis_server/lib/src/lsp/notification_manager.dart
index 242cba5..068b5ef 100644
--- a/pkg/analysis_server/lib/src/lsp/notification_manager.dart
+++ b/pkg/analysis_server/lib/src/lsp/notification_manager.dart
@@ -32,12 +32,12 @@
         .map((error) => pluginToDiagnostic(server.getLineInfo, error))
         .toList();
 
-    final params =
-        PublishDiagnosticsParams(Uri.file(filePath).toString(), diagnostics);
+    final params = PublishDiagnosticsParams(
+        uri: Uri.file(filePath).toString(), diagnostics: diagnostics);
     final message = NotificationMessage(
-      Method.textDocument_publishDiagnostics,
-      params,
-      jsonRpcVersion,
+      method: Method.textDocument_publishDiagnostics,
+      params: params,
+      jsonrpc: jsonRpcVersion,
     );
 
     channel.sendNotification(message);
diff --git a/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart b/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart
index fd345d1..617a6f6 100644
--- a/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart
+++ b/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart
@@ -116,77 +116,93 @@
     // list of what files types we support (and allows them to avoid sending
     // requests where we have only partial support for some types).
     return ServerCapabilities(
-        dynamicRegistrations.textSync
-            ? null
-            : Either2<TextDocumentSyncOptions, num>.t1(TextDocumentSyncOptions(
-                // The open/close and sync kind flags are registered dynamically if the
-                // client supports them, so these static registrations are based on whether
-                // the client supports dynamic registration.
-                true,
-                TextDocumentSyncKind.Incremental,
-                false,
-                false,
-                null,
-              )),
-        dynamicRegistrations.hover ? null : true, // hoverProvider
-        dynamicRegistrations.completion
-            ? null
-            : CompletionOptions(
-                true, // resolveProvider
-                dartCompletionTriggerCharacters,
-              ),
-        dynamicRegistrations.signatureHelp
-            ? null
-            : SignatureHelpOptions(
-                dartSignatureHelpTriggerCharacters,
-              ),
-        dynamicRegistrations.definition ? null : true, // definitionProvider
-        null,
-        dynamicRegistrations.implementation
-            ? null
-            : true, // implementationProvider
-        dynamicRegistrations.references ? null : true, // referencesProvider
-        dynamicRegistrations.documentHighlights
-            ? null
-            : true, // documentHighlightProvider
-        dynamicRegistrations.documentSymbol
-            ? null
-            : true, // documentSymbolProvider
-        true, // workspaceSymbolProvider
-        // "The `CodeActionOptions` return type is only valid if the client
-        // signals code action literal support via the property
-        // `textDocument.codeAction.codeActionLiteralSupport`."
-        dynamicRegistrations.codeActions
-            ? null
-            : codeActionLiteralSupport != null
-                ? Either2<bool, CodeActionOptions>.t2(
-                    CodeActionOptions(DartCodeActionKind.serverSupportedKinds))
-                : Either2<bool, CodeActionOptions>.t1(true),
-        null,
-        dynamicRegistrations.formatting
-            ? null
-            : enableFormatter, // documentFormattingProvider
-        false, // documentRangeFormattingProvider
-        dynamicRegistrations.typeFormatting
-            ? null
-            : enableFormatter
-                ? DocumentOnTypeFormattingOptions(
-                    dartTypeFormattingCharacters.first,
-                    dartTypeFormattingCharacters.skip(1).toList())
-                : null,
-        dynamicRegistrations.rename
-            ? null
-            : renameOptionsSupport
-                ? Either2<bool, RenameOptions>.t2(RenameOptions(true))
-                : Either2<bool, RenameOptions>.t1(true),
-        null,
-        null,
-        dynamicRegistrations.folding ? null : true, // foldingRangeProvider
-        null, // declarationProvider
-        ExecuteCommandOptions(Commands.serverSupportedCommands),
-        ServerCapabilitiesWorkspace(
-            ServerCapabilitiesWorkspaceFolders(true, true)),
-        null);
+      textDocumentSync: dynamicRegistrations.textSync
+          ? null
+          : Either2<TextDocumentSyncOptions, num>.t1(TextDocumentSyncOptions(
+              // The open/close and sync kind flags are registered dynamically if the
+              // client supports them, so these static registrations are based on whether
+              // the client supports dynamic registration.
+              openClose: true,
+              change: TextDocumentSyncKind.Incremental,
+              willSave: false,
+              willSaveWaitUntil: false,
+              save: null,
+            )),
+      completionProvider: dynamicRegistrations.completion
+          ? null
+          : CompletionOptions(
+              triggerCharacters: dartCompletionTriggerCharacters,
+              resolveProvider: true,
+            ),
+      hoverProvider: dynamicRegistrations.hover
+          ? null
+          : Either2<bool, HoverOptions>.t1(true),
+      signatureHelpProvider: dynamicRegistrations.signatureHelp
+          ? null
+          : SignatureHelpOptions(
+              triggerCharacters: dartSignatureHelpTriggerCharacters,
+            ),
+      definitionProvider: dynamicRegistrations.definition
+          ? null
+          : Either2<bool, DefinitionOptions>.t1(true),
+      implementationProvider: dynamicRegistrations.implementation
+          ? null
+          : Either3<bool, ImplementationOptions,
+              ImplementationRegistrationOptions>.t1(
+              true,
+            ),
+      referencesProvider: dynamicRegistrations.references
+          ? null
+          : Either2<bool, ReferenceOptions>.t1(true),
+      documentHighlightProvider: dynamicRegistrations.documentHighlights
+          ? null
+          : Either2<bool, DocumentHighlightOptions>.t1(true),
+      documentSymbolProvider: dynamicRegistrations.documentSymbol
+          ? null
+          : Either2<bool, DocumentSymbolOptions>.t1(true),
+      // "The `CodeActionOptions` return type is only valid if the client
+      // signals code action literal support via the property
+      // `textDocument.codeAction.codeActionLiteralSupport`."
+      codeActionProvider: dynamicRegistrations.codeActions
+          ? null
+          : codeActionLiteralSupport != null
+              ? Either2<bool, CodeActionOptions>.t2(CodeActionOptions(
+                  codeActionKinds: DartCodeActionKind.serverSupportedKinds,
+                ))
+              : Either2<bool, CodeActionOptions>.t1(true),
+      documentFormattingProvider: dynamicRegistrations.formatting
+          ? null
+          : Either2<bool, DocumentFormattingOptions>.t1(enableFormatter),
+      documentOnTypeFormattingProvider: dynamicRegistrations.typeFormatting
+          ? null
+          : enableFormatter
+              ? DocumentOnTypeFormattingOptions(
+                  firstTriggerCharacter: dartTypeFormattingCharacters.first,
+                  moreTriggerCharacter:
+                      dartTypeFormattingCharacters.skip(1).toList())
+              : null,
+      renameProvider: dynamicRegistrations.rename
+          ? null
+          : renameOptionsSupport
+              ? Either2<bool, RenameOptions>.t2(
+                  RenameOptions(prepareProvider: true))
+              : Either2<bool, RenameOptions>.t1(true),
+      foldingRangeProvider: dynamicRegistrations.folding
+          ? null
+          : Either3<bool, FoldingRangeOptions,
+              FoldingRangeRegistrationOptions>.t1(
+              true,
+            ),
+      executeCommandProvider: ExecuteCommandOptions(
+        commands: Commands.serverSupportedCommands,
+      ),
+      workspaceSymbolProvider: true,
+      workspace: ServerCapabilitiesWorkspace(
+          workspaceFolders: WorkspaceFoldersServerCapabilities(
+        supported: true,
+        changeNotifications: Either2<String, bool>.t2(true),
+      )),
+    );
   }
 
   /// If the client supports dynamic registrations we can tell it what methods
@@ -197,17 +213,18 @@
   /// support and it will be up to them to decide which file types they will
   /// send requests for.
   Future<void> performDynamicRegistration() async {
-    final dartFiles = DocumentFilter('dart', 'file', null);
-    final pubspecFile = DocumentFilter('yaml', 'file', '**/pubspec.yaml');
-    final analysisOptionsFile =
-        DocumentFilter('yaml', 'file', '**/analysis_options.yaml');
+    final dartFiles = DocumentFilter(language: 'dart', scheme: 'file');
+    final pubspecFile = DocumentFilter(
+        language: 'yaml', scheme: 'file', pattern: '**/pubspec.yaml');
+    final analysisOptionsFile = DocumentFilter(
+        language: 'yaml', scheme: 'file', pattern: '**/analysis_options.yaml');
 
     final pluginTypes = _server.pluginManager.plugins
         .expand((plugin) => plugin.currentSession?.interestingFiles ?? const [])
         // All published plugins use something like `*.extension` as
         // interestingFiles. Prefix a `**/` so that the glob matches nested
         // folders as well.
-        .map((glob) => DocumentFilter(null, 'file', '**/$glob'));
+        .map((glob) => DocumentFilter(scheme: 'file', pattern: '**/$glob'));
 
     final allTypes = {dartFiles, ...pluginTypes}.toList();
 
@@ -230,7 +247,9 @@
     void register(bool condition, Method method, [ToJsonable options]) {
       if (condition == true) {
         registrations.add(Registration(
-            (_lastRegistrationId++).toString(), method.toJson(), options));
+            id: (_lastRegistrationId++).toString(),
+            method: method.toJson(),
+            registerOptions: options));
       }
     }
 
@@ -240,94 +259,99 @@
     register(
       dynamicRegistrations.textSync,
       Method.textDocument_didOpen,
-      TextDocumentRegistrationOptions(allSynchronisedTypes),
+      TextDocumentRegistrationOptions(documentSelector: allSynchronisedTypes),
     );
     register(
       dynamicRegistrations.textSync,
       Method.textDocument_didClose,
-      TextDocumentRegistrationOptions(allSynchronisedTypes),
+      TextDocumentRegistrationOptions(documentSelector: allSynchronisedTypes),
     );
     register(
       dynamicRegistrations.textSync,
       Method.textDocument_didChange,
       TextDocumentChangeRegistrationOptions(
-          TextDocumentSyncKind.Incremental, allSynchronisedTypes),
+          syncKind: TextDocumentSyncKind.Incremental,
+          documentSelector: allSynchronisedTypes),
     );
     register(
       dynamicRegistrations.completion,
       Method.textDocument_completion,
       CompletionRegistrationOptions(
-        dartCompletionTriggerCharacters,
-        null,
-        true,
-        allTypes,
+        documentSelector: allTypes,
+        triggerCharacters: dartCompletionTriggerCharacters,
+        resolveProvider: true,
       ),
     );
     register(
       dynamicRegistrations.hover,
       Method.textDocument_hover,
-      TextDocumentRegistrationOptions(allTypes),
+      TextDocumentRegistrationOptions(documentSelector: allTypes),
     );
     register(
       dynamicRegistrations.signatureHelp,
       Method.textDocument_signatureHelp,
       SignatureHelpRegistrationOptions(
-          dartSignatureHelpTriggerCharacters, allTypes),
+        documentSelector: allTypes,
+        triggerCharacters: dartSignatureHelpTriggerCharacters,
+      ),
     );
     register(
       dynamicRegistrations.references,
       Method.textDocument_references,
-      TextDocumentRegistrationOptions(allTypes),
+      TextDocumentRegistrationOptions(documentSelector: allTypes),
     );
     register(
       dynamicRegistrations.documentHighlights,
       Method.textDocument_documentHighlight,
-      TextDocumentRegistrationOptions(allTypes),
+      TextDocumentRegistrationOptions(documentSelector: allTypes),
     );
     register(
       dynamicRegistrations.documentSymbol,
       Method.textDocument_documentSymbol,
-      TextDocumentRegistrationOptions(allTypes),
+      TextDocumentRegistrationOptions(documentSelector: allTypes),
     );
     register(
       enableFormatter && dynamicRegistrations.formatting,
       Method.textDocument_formatting,
-      TextDocumentRegistrationOptions(allTypes),
+      TextDocumentRegistrationOptions(documentSelector: allTypes),
     );
     register(
       enableFormatter && dynamicRegistrations.typeFormatting,
       Method.textDocument_onTypeFormatting,
       DocumentOnTypeFormattingRegistrationOptions(
-        dartTypeFormattingCharacters.first,
-        dartTypeFormattingCharacters.skip(1).toList(),
-        [dartFiles], // This one is currently Dart-specific
+        documentSelector: [dartFiles], // This one is currently Dart-specific
+        firstTriggerCharacter: dartTypeFormattingCharacters.first,
+        moreTriggerCharacter: dartTypeFormattingCharacters.skip(1).toList(),
       ),
     );
     register(
       dynamicRegistrations.definition,
       Method.textDocument_definition,
-      TextDocumentRegistrationOptions(allTypes),
+      TextDocumentRegistrationOptions(documentSelector: allTypes),
     );
     register(
       dynamicRegistrations.implementation,
       Method.textDocument_implementation,
-      TextDocumentRegistrationOptions(allTypes),
+      TextDocumentRegistrationOptions(documentSelector: allTypes),
     );
     register(
       dynamicRegistrations.codeActions,
       Method.textDocument_codeAction,
       CodeActionRegistrationOptions(
-          allTypes, DartCodeActionKind.serverSupportedKinds),
+        documentSelector: allTypes,
+        codeActionKinds: DartCodeActionKind.serverSupportedKinds,
+      ),
     );
     register(
       dynamicRegistrations.rename,
       Method.textDocument_rename,
-      RenameRegistrationOptions(true, allTypes),
+      RenameRegistrationOptions(
+          documentSelector: allTypes, prepareProvider: true),
     );
     register(
       dynamicRegistrations.folding,
       Method.textDocument_foldingRange,
-      TextDocumentRegistrationOptions(allTypes),
+      TextDocumentRegistrationOptions(documentSelector: allTypes),
     );
     register(
       dynamicRegistrations.didChangeConfiguration,
@@ -358,8 +382,8 @@
           registration.registerOptions;
 
       if (entryRemovedOrChanged) {
-        removedRegistrations
-            .add(Unregistration(registration.id, registration.method));
+        removedRegistrations.add(
+            Unregistration(id: registration.id, method: registration.method));
       } else {
         // Replace the registration in our new set with the original registration
         // so that we retain the original ID sent to the client (otherwise we
@@ -373,7 +397,7 @@
 
     if (removedRegistrations.isNotEmpty) {
       await _server.sendRequest(Method.client_unregisterCapability,
-          UnregistrationParams(removedRegistrations));
+          UnregistrationParams(unregisterations: removedRegistrations));
     }
 
     // Only send the registration request if we have at least one (since
@@ -381,7 +405,7 @@
     if (additionalRegistrations.isNotEmpty) {
       final registrationResponse = await _server.sendRequest(
         Method.client_registerCapability,
-        RegistrationParams(additionalRegistrations),
+        RegistrationParams(registrations: additionalRegistrations),
       );
 
       if (registrationResponse.error != null) {
diff --git a/pkg/analysis_server/lib/src/lsp/source_edits.dart b/pkg/analysis_server/lib/src/lsp/source_edits.dart
index e3bfb8a..167fc49 100644
--- a/pkg/analysis_server/lib/src/lsp/source_edits.dart
+++ b/pkg/analysis_server/lib/src/lsp/source_edits.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer_plugin/utilities/pair.dart';
 import 'package:dart_style/dart_style.dart';
 
-final DartFormatter formatter = DartFormatter();
+DartFormatter formatter = DartFormatter();
 
 /// Transforms a sequence of LSP document change events to a sequence of source
 /// edits used by analysis plugins.
@@ -17,45 +17,66 @@
 /// changes into account, this will also apply the edits to [oldContent].
 ErrorOr<Pair<String, List<plugin.SourceEdit>>> applyAndConvertEditsToServer(
   String oldContent,
-  List<TextDocumentContentChangeEvent> changes, {
+  List<
+          Either2<TextDocumentContentChangeEvent1,
+              TextDocumentContentChangeEvent2>>
+      changes, {
   failureIsCritical = false,
 }) {
   var newContent = oldContent;
   final serverEdits = <server.SourceEdit>[];
 
   for (var change in changes) {
-    if (change.range == null && change.rangeLength == null) {
-      serverEdits
-        ..clear()
-        ..add(server.SourceEdit(0, newContent.length, change.text));
-      newContent = change.text;
-    } else {
-      final lines = LineInfo.fromContent(newContent);
-      final offsetStart = toOffset(lines, change.range.start,
-          failureIsCritial: failureIsCritical);
-      final offsetEnd = toOffset(lines, change.range.end,
-          failureIsCritial: failureIsCritical);
-      if (offsetStart.isError) {
-        return ErrorOr.error(offsetStart.error);
-      }
-      if (offsetEnd.isError) {
-        return ErrorOr.error(offsetEnd.error);
-      }
-      newContent = newContent.replaceRange(
-          offsetStart.result, offsetEnd.result, change.text);
-      serverEdits.add(server.SourceEdit(offsetStart.result,
-          offsetEnd.result - offsetStart.result, change.text));
+    // Change is a union that may/may not include a range. If no range
+    // is provided (t2 of the union) the whole document should be replaced.
+    final result = change.map(
+      // TextDocumentContentChangeEvent1
+      // {range, text}
+      (change) {
+        final lines = LineInfo.fromContent(newContent);
+        final offsetStart = toOffset(lines, change.range.start,
+            failureIsCritial: failureIsCritical);
+        final offsetEnd = toOffset(lines, change.range.end,
+            failureIsCritial: failureIsCritical);
+        if (offsetStart.isError) {
+          return ErrorOr.error(offsetStart.error);
+        }
+        if (offsetEnd.isError) {
+          return ErrorOr.error(offsetEnd.error);
+        }
+        newContent = newContent.replaceRange(
+            offsetStart.result, offsetEnd.result, change.text);
+        serverEdits.add(server.SourceEdit(offsetStart.result,
+            offsetEnd.result - offsetStart.result, change.text));
+      },
+      // TextDocumentContentChangeEvent2
+      // {text}
+      (change) {
+        serverEdits
+          ..clear()
+          ..add(server.SourceEdit(0, newContent.length, change.text));
+        newContent = change.text;
+      },
+    );
+    // If any change fails, immediately return the error.
+    if (result?.isError ?? false) {
+      return ErrorOr.error(result.error);
     }
   }
   return ErrorOr.success(Pair(newContent, serverEdits));
 }
 
-List<TextEdit> generateEditsForFormatting(String unformattedSource) {
+List<TextEdit> generateEditsForFormatting(
+    String unformattedSource, int lineLength) {
   final lineInfo = LineInfo.fromContent(unformattedSource);
   final code =
       SourceCode(unformattedSource, uri: null, isCompilationUnit: true);
   SourceCode formattedResult;
   try {
+    // If the lineLength has changed, recreate the formatter with the new setting.
+    if (lineLength != formatter.pageWidth) {
+      formatter = DartFormatter(pageWidth: lineLength);
+    }
     formattedResult = formatter.formatSource(code);
   } on FormatterException {
     // If the document fails to parse, just return no edits to avoid the the
@@ -75,8 +96,9 @@
   final end = lineInfo.getLocation(unformattedSource.length);
   return [
     TextEdit(
-      Range(Position(0, 0), toPosition(end)),
-      formattedSource,
+      range:
+          Range(start: Position(line: 0, character: 0), end: toPosition(end)),
+      newText: formattedSource,
     )
   ];
 }
diff --git a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
index 50456a7..2b23663 100644
--- a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
+++ b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
@@ -122,10 +122,7 @@
   /// currently being executed.
   PluginSession currentSession;
 
-  /// The exception that occurred that prevented the plugin from being started,
-  /// or `null` if there was no exception (possibly because no attempt has yet
-  /// been made to start the plugin).
-  CaughtException exception;
+  CaughtException _exception;
 
   /// Initialize the newly created information about a plugin.
   PluginInfo(this.notificationManager, this.instrumentationService);
@@ -140,6 +137,11 @@
   PluginData get data =>
       PluginData(pluginId, currentSession?.name, currentSession?.version);
 
+  /// The exception that occurred that prevented the plugin from being started,
+  /// or `null` if there was no exception (possibly because no attempt has yet
+  /// been made to start the plugin).
+  CaughtException get exception => _exception;
+
   /// Return the id of this plugin, used to identify the plugin to users.
   String get pluginId;
 
@@ -184,6 +186,12 @@
     }
   }
 
+  void reportException(CaughtException exception) {
+    _exception = exception;
+    instrumentationService.logPluginException(
+        data, exception.exception, exception.stackTrace);
+  }
+
   /// If the plugin is currently running, send a request based on the given
   /// [params] to the plugin. If the plugin is not running, the request will
   /// silently be dropped.
@@ -209,6 +217,10 @@
   /// Request that the plugin shutdown.
   Future<void> stop() {
     if (currentSession == null) {
+      if (_exception != null) {
+        // Plugin crashed, nothing to do.
+        return Future<void>.value(null);
+      }
       throw StateError('Cannot stop a plugin that is not running.');
     }
     var doneFuture = currentSession.stop();
@@ -306,7 +318,7 @@
       } catch (exception, stackTrace) {
         plugin = DiscoveredPluginInfo(
             path, null, null, notificationManager, instrumentationService);
-        plugin.exception = CaughtException(exception, stackTrace);
+        plugin.reportException(CaughtException(exception, stackTrace));
         _pluginMap[path] = plugin;
         return;
       }
@@ -323,7 +335,7 @@
         } catch (exception, stackTrace) {
           // Record the exception (for debugging purposes) and record the fact
           // that we should not try to communicate with the plugin.
-          plugin.exception = CaughtException(exception, stackTrace);
+          plugin.reportException(CaughtException(exception, stackTrace));
           isNew = false;
         }
       }
@@ -459,7 +471,7 @@
       var pluginPath = path.join(hostPackageName, 'tools', 'analyzer_plugin');
       var plugin = DiscoveredPluginInfo(
           pluginPath, null, null, notificationManager, instrumentationService);
-      plugin.exception = CaughtException(exception, stackTrace);
+      plugin.reportException(CaughtException(exception, stackTrace));
       _pluginMap[pluginPath] = plugin;
     }
   }
@@ -843,9 +855,8 @@
   void handleOnError(dynamic error) {
     var errorPair = (error as List).cast<String>();
     var stackTrace = StackTrace.fromString(errorPair[1]);
-    info.exception = CaughtException(PluginException(errorPair[0]), stackTrace);
-    info.instrumentationService
-        .logPluginException(info.data, errorPair[0], stackTrace);
+    info.reportException(
+        CaughtException(PluginException(errorPair[0]), stackTrace));
   }
 
   /// Handle a [response] from the plugin by completing the future that was
@@ -903,13 +914,13 @@
       throw StateError('Missing byte store path');
     }
     if (!isCompatible) {
-      info.exception =
-          CaughtException(PluginException('Plugin is not compatible.'), null);
+      info.reportException(
+          CaughtException(PluginException('Plugin is not compatible.'), null));
       return false;
     }
     if (!info.canBeStarted) {
-      info.exception =
-          CaughtException(PluginException('Plugin cannot be started.'), null);
+      info.reportException(
+          CaughtException(PluginException('Plugin cannot be started.'), null));
       return false;
     }
     channel = info._createChannel();
@@ -920,8 +931,9 @@
     if (channel == null) {
       // If there is an error when starting the isolate, the channel will invoke
       // handleOnDone, which will cause `channel` to be set to `null`.
-      info.exception ??= CaughtException(
-          PluginException('Unrecorded error while starting the plugin.'), null);
+      info.reportException(CaughtException(
+          PluginException('Unrecorded error while starting the plugin.'),
+          null));
       return false;
     }
     var response = await sendRequest(PluginVersionCheckParams(
@@ -934,8 +946,8 @@
     version = result.version;
     if (!isCompatible) {
       sendRequest(PluginShutdownParams());
-      info.exception =
-          CaughtException(PluginException('Plugin is not compatible.'), null);
+      info.reportException(
+          CaughtException(PluginException('Plugin is not compatible.'), null));
       return false;
     }
     return true;
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index cc0f406..44939fc 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -38,6 +38,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:args/args.dart';
+import 'package:cli_util/cli_util.dart';
 import 'package:linter/src/rules.dart' as linter;
 import 'package:path/path.dart' as path;
 import 'package:telemetry/crash_reporting.dart';
@@ -326,6 +327,14 @@
     analysisServerOptions.newAnalysisDriverLog =
         results[NEW_ANALYSIS_DRIVER_LOG];
     analysisServerOptions.clientId = results[CLIENT_ID];
+    analysisServerOptions.useLanguageServerProtocol = results[USE_LSP];
+    // For clients that don't supply their own identifier, use a default based on
+    // whether the server will run in LSP mode or not.
+    analysisServerOptions.clientId ??=
+        analysisServerOptions.useLanguageServerProtocol
+            ? 'unknown.client.lsp'
+            : 'unknown.client.classic';
+
     analysisServerOptions.clientVersion = results[CLIENT_VERSION];
     analysisServerOptions.cacheFolder = results[CACHE_FOLDER];
     if (results.wasParsed(ENABLE_EXPERIMENT_OPTION)) {
@@ -333,7 +342,6 @@
           (results[ENABLE_EXPERIMENT_OPTION] as List).cast<String>().toList();
     }
     analysisServerOptions.useFastaParser = results[USE_FASTA_PARSER];
-    analysisServerOptions.useLanguageServerProtocol = results[USE_LSP];
     analysisServerOptions.useNewRelevance = results[USE_NEW_RELEVANCE];
 
     // Read in any per-SDK overrides specified in <sdk>/config/settings.json.
@@ -341,7 +349,12 @@
     analysisServerOptions.configurationOverrides = sdkConfig;
 
     // ML model configuration.
-    final bool enableCompletionModel = results[ENABLE_COMPLETION_MODEL];
+    // TODO(brianwilkerson) Uncomment the line below and delete the second line
+    //  when there is a new completion model to query. Until then we ignore the
+    //  flag to enable the model so that we can't try to read from a file that
+    //  doesn't exist.
+//    final bool enableCompletionModel = results[ENABLE_COMPLETION_MODEL];
+    final enableCompletionModel = false;
     analysisServerOptions.completionModelFolder =
         results[COMPLETION_MODEL_FOLDER];
     if (results.wasParsed(ENABLE_COMPLETION_MODEL) && !enableCompletionModel) {
@@ -382,8 +395,7 @@
     analysisServerOptions.analytics = analytics;
 
     // Record the client name as the application installer ID.
-    analytics.setSessionValue(
-        'aiid', analysisServerOptions.clientId ?? 'not-set');
+    analytics.setSessionValue('aiid', analysisServerOptions.clientId);
     if (analysisServerOptions.clientVersion != null) {
       analytics.setSessionValue('cd1', analysisServerOptions.clientVersion);
     }
@@ -463,13 +475,14 @@
         MulticastInstrumentationService(allInstrumentationServices);
 
     instrumentationService.logVersion(
-        results[TRAIN_USING] != null
-            ? 'training-0'
-            : _readUuid(instrumentationService),
-        analysisServerOptions.clientId,
-        analysisServerOptions.clientVersion,
-        PROTOCOL_VERSION,
-        defaultSdk.sdkVersion);
+      results[TRAIN_USING] != null
+          ? 'training-0'
+          : _readUuid(instrumentationService),
+      analysisServerOptions.clientId,
+      analysisServerOptions.clientVersion,
+      PROTOCOL_VERSION,
+      defaultSdk.languageVersion.toString(),
+    );
     AnalysisEngine.instance.instrumentationService = instrumentationService;
 
     int diagnosticServerPort;
@@ -820,6 +833,7 @@
     // Temporary flags.
     //
     parser.addFlag(USE_NEW_RELEVANCE,
+        defaultsTo: true,
         help: 'Use the new relevance computation for code completion.');
 
     return parser;
@@ -844,11 +858,7 @@
     if (args[SDK_OPTION] != null) {
       return args[SDK_OPTION];
     } else {
-      // No path to the SDK was provided.
-      // Use FolderBasedDartSdk.defaultSdkDirectory, which will make a guess.
-      return FolderBasedDartSdk.defaultSdkDirectory(
-        PhysicalResourceProvider.INSTANCE,
-      ).path;
+      return getSdkPath();
     }
   }
 
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
index 14fbe05..cc88ab0 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
@@ -163,7 +163,7 @@
   }
 
   bool _isInFlutterCreation() {
-    var flutter = Flutter.of(request.result);
+    var flutter = Flutter.instance;
     var containingNode = request.target?.containingNode;
     var newExpr = containingNode != null
         ? flutter.identifyNewExpression(containingNode.parent)
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 1118ce0..1e64f55 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
@@ -27,6 +27,7 @@
 import 'package:analysis_server/src/services/completion/dart/local_reference_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/named_constructor_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/override_contributor.dart';
+import 'package:analysis_server/src/services/completion/dart/relevance_tables.g.dart';
 import 'package:analysis_server/src/services/completion/dart/static_member_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
 import 'package:analysis_server/src/services/completion/dart/type_member_contributor.dart';
@@ -50,7 +51,6 @@
 import 'package:analyzer_plugin/protocol/protocol_common.dart' as protocol;
 import 'package:analyzer_plugin/src/utilities/completion/completion_target.dart';
 import 'package:analyzer_plugin/src/utilities/completion/optype.dart';
-import 'package:meta/meta.dart';
 
 /// [DartCompletionManager] determines if a completion request is Dart specific
 /// and forwards those requests to all [DartCompletionContributor]s.
@@ -102,7 +102,8 @@
   Future<List<CompletionSuggestion>> computeSuggestions(
     OperationPerformanceImpl performance,
     CompletionRequest request, {
-    @required bool enableUriContributor,
+    bool enableOverrideContributor = true,
+    bool enableUriContributor = true,
   }) async {
     request.checkAborted();
     if (!AnalysisEngine.isDartFileName(request.result.path)) {
@@ -145,7 +146,7 @@
       LocalLibraryContributor(),
       LocalReferenceContributor(),
       NamedConstructorContributor(),
-      OverrideContributor(),
+      if (enableOverrideContributor) OverrideContributor(),
       StaticMemberContributor(),
       TypeMemberContributor(),
       if (enableUriContributor) UriContributor(),
@@ -242,9 +243,25 @@
   }
 
   void _addIncludedSuggestionRelevanceTags(DartCompletionRequestImpl request) {
-    if (request.inConstantContext && request.useNewRelevance) {
-      includedSuggestionRelevanceTags.add(IncludedSuggestionRelevanceTag(
-          'isConst', RelevanceBoost.constInConstantContext));
+    if (request.useNewRelevance) {
+      var location = request.opType.completionLocation;
+      if (location != null) {
+        var locationTable = elementKindRelevance[location];
+        if (locationTable != null) {
+          var inConstantContext = request.inConstantContext;
+          for (var entry in locationTable.entries) {
+            var kind = entry.key.toString();
+            var elementBoost = (entry.value.upper * 100).floor();
+            includedSuggestionRelevanceTags
+                .add(IncludedSuggestionRelevanceTag(kind, elementBoost));
+            if (inConstantContext) {
+              includedSuggestionRelevanceTags.add(
+                  IncludedSuggestionRelevanceTag(
+                      '$kind+const', elementBoost + 100));
+            }
+          }
+        }
+      }
     }
 
     var type = request.contextType;
@@ -262,6 +279,12 @@
           ),
         );
       } else {
+        // TODO(brianwilkerson) This was previously used to boost exact type
+        //  matches. For example, if the context type was `Foo`, then the class
+        //  `Foo` and it's constructors would be given this boost. Now this
+        //  boost will almost always be ignored because the element boost will
+        //  be bigger. Find a way to use this boost without negating the element
+        //  boost, which is how we get constructors to come before classes.
         var relevance = request.useNewRelevance
             ? RelevanceBoost.availableDeclaration
             : DART_RELEVANCE_BOOST_AVAILABLE_DECLARATION;
@@ -385,11 +408,11 @@
     while (entity is AstNode) {
       if (entity is SimpleIdentifier) {
         var identifier = entity.name;
-        if (offset >= entity.offset &&
-            offset - entity.offset < identifier.length) {
+        if (offset >= entity.offset && offset < entity.end) {
           return identifier.substring(0, offset - entity.offset);
+        } else if (offset == entity.end) {
+          return identifier;
         }
-        return identifier;
       }
       var children = (entity as AstNode).childEntities;
       entity = children.isEmpty ? null : children.first;
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/extension_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/extension_member_contributor.dart
index 3ad8d5b..c2b2573 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/extension_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/extension_member_contributor.dart
@@ -98,15 +98,19 @@
 
   void _addExtensionMembers(LibraryElement containingLibrary, DartType type) {
     var typeSystem = containingLibrary.typeSystem;
-    var nameScope = LibraryScope(containingLibrary);
+    var nameScope = containingLibrary.scope;
     for (var extension in nameScope.extensions) {
       var extendedType =
           _resolveExtendedType(containingLibrary, extension, type);
       if (extendedType != null && typeSystem.isSubtypeOf(type, extendedType)) {
         double inheritanceDistance;
         if (memberBuilder.request.useNewRelevance) {
-          inheritanceDistance = memberBuilder.request.featureComputer
-              .inheritanceDistanceFeature(type.element, extendedType.element);
+          if (type is InterfaceType && extendedType is InterfaceType) {
+            inheritanceDistance = memberBuilder.request.featureComputer
+                .inheritanceDistanceFeature(type.element, extendedType.element);
+          } else {
+            inheritanceDistance = -1;
+          }
         }
         // TODO(brianwilkerson) We might want to apply the substitution to the
         //  members of the extension for display purposes.
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
index fa4ff8f..0e66786 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
@@ -306,6 +306,9 @@
     if (variables.isEmpty || request.offset > variables.first.beginToken.end) {
       return;
     }
+    if (node.abstractKeyword == null) {
+      _addSuggestion(Keyword.ABSTRACT);
+    }
     if (node.covariantKeyword == null) {
       _addSuggestion(Keyword.COVARIANT);
     }
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 6e3ebea..6583dcd 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
@@ -23,7 +23,7 @@
 import 'package:analyzer/dart/element/nullability_suffix.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/util/comment.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 import 'package:meta/meta.dart';
 
@@ -164,17 +164,12 @@
   /// computed. In the latter case, [_hasContainingMemberName] will be `false`.
   String _cachedContainingMemberName;
 
-  /// The cached instance of the flutter utilities, or `null` if it hasn't been
-  /// created yet.
-  Flutter _flutter;
-
   /// Initialize a newly created suggestion builder to build suggestions for the
   /// given [request].
   SuggestionBuilder(this.request, {this.listener});
 
-  /// Return an object that can answer questions about Flutter code based on the
-  /// flavor of Flutter being used.
-  Flutter get flutter => _flutter ??= Flutter.of(request.result);
+  /// Return an object that can answer questions about Flutter code.
+  Flutter get flutter => Flutter.instance;
 
   /// Return an iterable that can be used to access the completion suggestions
   /// that have been built.
@@ -803,8 +798,7 @@
     // todo (pq): revisit this special casing; likely it can be generalized away
     var element = parameter.enclosingElement;
     if (element is ConstructorElement) {
-      var flutter = Flutter.of(request.result);
-      if (flutter.isWidget(element.enclosingElement)) {
+      if (Flutter.instance.isWidget(element.enclosingElement)) {
         var defaultValue = getDefaultStringParameterValue(parameter);
         // TODO(devoncarew): Should we remove the check here? We would then
         // suggest values for param types like closures.
@@ -856,8 +850,8 @@
   Future<void> suggestOverride(SimpleIdentifier targetId,
       ExecutableElement element, bool invokeSuper) async {
     var displayTextBuffer = StringBuffer();
-    var builder = DartChangeBuilder(request.result.session);
-    await builder.addFileEdit(request.result.path, (builder) {
+    var builder = ChangeBuilder(session: request.result.session);
+    await builder.addDartFileEdit(request.result.path, (builder) {
       builder.addReplacement(range.node(targetId), (builder) {
         builder.writeOverride(
           element,
diff --git a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
index 4d2409c..b743ff3 100644
--- a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
@@ -16,7 +16,7 @@
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 /// An enumeration of possible postfix completion kinds.
@@ -288,9 +288,9 @@
       return null;
     }
 
-    var changeBuilder = DartChangeBuilder(session);
-    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(expr), (DartEditBuilder builder) {
+    var changeBuilder = ChangeBuilder(session: session);
+    await changeBuilder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(expr), (builder) {
         String newSrc = sourcer(expr);
         if (newSrc == null) {
           return null;
@@ -322,8 +322,8 @@
     if (stmt == null) {
       return null;
     }
-    var changeBuilder = DartChangeBuilder(session);
-    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+    var changeBuilder = ChangeBuilder(session: session);
+    await changeBuilder.addDartFileEdit(file, (builder) {
       // Embed the full line(s) of the statement in the try block.
       var startLine = lineInfo.getLocation(stmt.offset).lineNumber - 1;
       var endLine = lineInfo.getLocation(stmt.end).lineNumber - 1;
@@ -335,7 +335,7 @@
       var src = utils.getText(startOffset, endOffset - startOffset);
       var indent = utils.getLinePrefix(stmt.offset);
       builder.addReplacement(range.startOffsetEndOffset(startOffset, endOffset),
-          (DartEditBuilder builder) {
+          (builder) {
         builder.write(indent);
         builder.write('try {');
         builder.write(eol);
@@ -500,7 +500,7 @@
       .searchWithin(completionContext.resolveResult.unit);
 
   void _setCompletionFromBuilder(
-      DartChangeBuilder builder, PostfixCompletionKind kind,
+      ChangeBuilder builder, PostfixCompletionKind kind,
       [List args]) {
     var change = builder.sourceChange;
     if (change.edits.isEmpty) {
diff --git a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
index 6b19e69..6c0dc57 100644
--- a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
@@ -975,7 +975,7 @@
       if (catchNode.onKeyword != null) {
         if (catchNode.exceptionType.length == 0 ||
             null !=
-                _findError(StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE,
+                _findError(CompileTimeErrorCode.NON_TYPE_IN_CATCH_CLAUSE,
                     partialMatch: "name 'catch")) {
           var src = utils.getNodeText(catchNode);
           if (src.startsWith(RegExp(r'on[ \t]+'))) {
diff --git a/pkg/analysis_server/lib/src/services/correction/assist.dart b/pkg/analysis_server/lib/src/services/correction/assist.dart
index 88f78e0..50910b8 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist.dart
@@ -149,6 +149,8 @@
       AssistKind('dart.assist.flutter.wrap.padding', 32, 'Wrap with Padding');
   static const FLUTTER_WRAP_ROW =
       AssistKind('dart.assist.flutter.wrap.row', 32, 'Wrap with Row');
+  static const FLUTTER_WRAP_SIZED_BOX =
+      AssistKind('dart.assist.flutter.wrap.sizedBox', 32, 'Wrap with SizedBox');
   static const FLUTTER_WRAP_STREAM_BUILDER = AssistKind(
       'dart.assist.flutter.wrap.streamBuilder', 32, 'Wrap with StreamBuilder');
 
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index f0074a511..2f3c330 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -72,10 +72,9 @@
 import 'package:analysis_server/src/services/correction/dart/use_curly_braces.dart';
 import 'package:analysis_server/src/services/correction/fix_internal.dart';
 import 'package:analyzer/src/generated/java_core.dart';
-import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/assist/assist.dart'
     hide AssistContributor;
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 
 /// The computer for Dart assists.
 class AssistProcessor extends BaseProcessor {
@@ -195,7 +194,7 @@
     Future<void> compute(CorrectionProducer producer) async {
       producer.configure(context);
 
-      var builder = DartChangeBuilderImpl.forWorkspace(context.workspace);
+      var builder = ChangeBuilder(workspace: context.workspace);
       await producer.compute(builder);
 
       _addAssistFromBuilder(builder, producer.assistKind,
@@ -217,7 +216,7 @@
     return assists;
   }
 
-  void _addAssistFromBuilder(DartChangeBuilder builder, AssistKind kind,
+  void _addAssistFromBuilder(ChangeBuilder builder, AssistKind kind,
       {List<Object> args}) {
     if (builder == null) {
       return;
@@ -249,7 +248,7 @@
         var producer = generator();
         producer.configure(context);
 
-        var builder = DartChangeBuilderImpl.forWorkspace(context.workspace);
+        var builder = ChangeBuilder(workspace: context.workspace);
         await producer.compute(builder);
         _addAssistFromBuilder(builder, producer.assistKind,
             args: producer.assistArguments);
@@ -259,7 +258,7 @@
       var multiProducer = multiGenerator();
       multiProducer.configure(context);
       for (var producer in multiProducer.producers) {
-        var builder = DartChangeBuilderImpl.forWorkspace(context.workspace);
+        var builder = ChangeBuilder(workspace: context.workspace);
         producer.configure(context);
         await producer.compute(builder);
         _addAssistFromBuilder(builder, producer.assistKind,
diff --git a/pkg/analysis_server/lib/src/services/correction/base_processor.dart b/pkg/analysis_server/lib/src/services/correction/base_processor.dart
index 0bb0cff..836467a 100644
--- a/pkg/analysis_server/lib/src/services/correction/base_processor.dart
+++ b/pkg/analysis_server/lib/src/services/correction/base_processor.dart
@@ -23,7 +23,6 @@
   final String file;
 
   final TypeProvider typeProvider;
-  final Flutter flutter;
 
   final AnalysisSession session;
   final AnalysisSessionHelper sessionHelper;
@@ -38,13 +37,14 @@
     @required this.resolvedResult,
     @required this.workspace,
   })  : file = resolvedResult.path,
-        flutter = Flutter.of(resolvedResult),
         session = resolvedResult.session,
         sessionHelper = AnalysisSessionHelper(resolvedResult.session),
         typeProvider = resolvedResult.typeProvider,
         selectionEnd = (selectionOffset ?? 0) + (selectionLength ?? 0),
         utils = CorrectionUtils(resolvedResult);
 
+  Flutter get flutter => Flutter.instance;
+
   @protected
   bool setupCompute() {
     final locator = NodeLocator(selectionOffset, selectionEnd);
diff --git a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
new file mode 100644
index 0000000..ce9d943
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
@@ -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.
+
+import 'dart:async';
+import 'dart:core';
+
+import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
+import 'package:analysis_server/src/services/correction/dart/add_override.dart';
+import 'package:analysis_server/src/services/correction/dart/convert_add_all_to_spread.dart';
+import 'package:analysis_server/src/services/correction/dart/convert_conditional_expression_to_if_element.dart';
+import 'package:analysis_server/src/services/correction/dart/convert_documentation_into_line.dart';
+import 'package:analysis_server/src/services/correction/dart/convert_quotes.dart';
+import 'package:analysis_server/src/services/correction/dart/convert_to_contains.dart';
+import 'package:analysis_server/src/services/correction/dart/create_method.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_argument.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_await.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_const.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_duplicate_case.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_empty_catch.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_empty_constructor_body.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_empty_else.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_empty_statement.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_initializer.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_method_declaration.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_operator.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_this_expression.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_type_annotation.dart';
+import 'package:analysis_server/src/services/correction/dart/remove_unnecessary_new.dart';
+import 'package:analysis_server/src/services/correction/dart/replace_cascade_with_dot.dart';
+import 'package:analysis_server/src/services/correction/dart/replace_colon_with_equals.dart';
+import 'package:analysis_server/src/services/correction/dart/replace_null_with_closure.dart';
+import 'package:analysis_server/src/services/correction/dart/replace_with_conditional_assignment.dart';
+import 'package:analysis_server/src/services/correction/dart/replace_with_is_empty.dart';
+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/use_curly_braces.dart';
+import 'package:analysis_server/src/services/correction/dart/use_is_not_empty.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+
+/// A fix producer that produces changes to fix multiple diagnostics.
+class BulkFixProcessor {
+  /// A map from the name of a lint rule to a generator used to create the
+  /// correction producer used to build a fix for that diagnostic. The
+  /// generators used for non-lint diagnostics are in the [nonLintProducerMap].
+  static const Map<String, ProducerGenerator> lintProducerMap = {
+    LintNames.annotate_overrides: AddOverride.newInstance,
+    LintNames.avoid_annotating_with_dynamic: RemoveTypeAnnotation.newInstance,
+    LintNames.avoid_empty_else: RemoveEmptyElse.newInstance,
+    LintNames.avoid_init_to_null: RemoveInitializer.newInstance,
+    LintNames.avoid_redundant_argument_values: RemoveArgument.newInstance,
+    LintNames.avoid_return_types_on_setters: RemoveTypeAnnotation.newInstance,
+    LintNames.avoid_single_cascade_in_expression_statements:
+        ReplaceCascadeWithDot.newInstance,
+    LintNames.avoid_types_on_closure_parameters:
+        RemoveTypeAnnotation.newInstance,
+    LintNames.await_only_futures: RemoveAwait.newInstance,
+    LintNames.curly_braces_in_flow_control_structures:
+        UseCurlyBraces.newInstance,
+    LintNames.empty_catches: RemoveEmptyCatch.newInstance,
+    LintNames.empty_constructor_bodies: RemoveEmptyConstructorBody.newInstance,
+    LintNames.empty_statements: RemoveEmptyStatement.newInstance,
+    LintNames.hash_and_equals: CreateMethod.equalsOrHashCode,
+    LintNames.no_duplicate_case_values: RemoveDuplicateCase.newInstance,
+    LintNames.null_closures: ReplaceNullWithClosure.newInstance,
+    LintNames.omit_local_variable_types: ReplaceWithVar.newInstance,
+    LintNames.prefer_adjacent_string_concatenation: RemoveOperator.newInstance,
+    LintNames.prefer_conditional_assignment:
+        ReplaceWithConditionalAssignment.newInstance,
+    LintNames.prefer_contains: ConvertToContains.newInstance,
+    LintNames.prefer_equal_for_default_values:
+        ReplaceColonWithEquals.newInstance,
+    LintNames.prefer_if_elements_to_conditional_expressions:
+        ConvertConditionalExpressionToIfElement.newInstance,
+    LintNames.prefer_is_empty: ReplaceWithIsEmpty.newInstance,
+    LintNames.prefer_is_not_empty: UesIsNotEmpty.newInstance,
+    LintNames.prefer_single_quotes: ConvertToSingleQuotes.newInstance,
+    LintNames.prefer_spread_collections: ConvertAddAllToSpread.newInstance,
+    LintNames.slash_for_doc_comments: ConvertDocumentationIntoLine.newInstance,
+    LintNames.type_init_formals: RemoveTypeAnnotation.newInstance,
+    LintNames.unnecessary_const: RemoveUnnecessaryConst.newInstance,
+    LintNames.unnecessary_lambdas: ReplaceWithTearOff.newInstance,
+    LintNames.unnecessary_new: RemoveUnnecessaryNew.newInstance,
+    LintNames.unnecessary_overrides: RemoveMethodDeclaration.newInstance,
+    LintNames.unnecessary_this: RemoveThisExpression.newInstance,
+  };
+
+  /// A map from an error code to a generator used to create the correction
+  /// producer used to build a fix for that diagnostic. The generators used for
+  /// lint rules are in the [lintProducerMap].
+  static const Map<ErrorCode, ProducerGenerator> nonLintProducerMap = {};
+
+  final DartChangeWorkspace workspace;
+
+  /// The change builder used to build the changes required to fix the
+  /// diagnostics.
+  ChangeBuilder builder;
+
+  BulkFixProcessor(this.workspace) {
+    builder = ChangeBuilder(workspace: workspace);
+  }
+
+  Future<ChangeBuilder> fixErrorsInLibraries(List<String> libraryPaths) async {
+    for (var path in libraryPaths) {
+      var session = workspace.getSession(path);
+      var libraryResult = await session.getResolvedLibrary(path);
+      await _fixErrorsInLibrary(libraryResult);
+    }
+    return builder;
+  }
+
+  Future<void> _fixErrorsInLibrary(ResolvedLibraryResult libraryResult) async {
+    for (var unitResult in libraryResult.units) {
+      final fixContext = DartFixContextImpl(
+        workspace,
+        unitResult,
+        null,
+        (name) => [],
+      );
+      for (var error in unitResult.errors) {
+        await _fixSingleError(fixContext, unitResult, error);
+      }
+    }
+  }
+
+  Future<void> _fixSingleError(DartFixContext fixContext,
+      ResolvedUnitResult unitResult, AnalysisError error) async {
+    var context = CorrectionProducerContext(
+      dartFixContext: fixContext,
+      diagnostic: error,
+      resolvedResult: unitResult,
+      selectionOffset: error.offset,
+      selectionLength: error.length,
+      workspace: workspace,
+    );
+
+    var setupSuccess = context.setupCompute();
+    if (!setupSuccess) {
+      return;
+    }
+
+    Future<void> compute(CorrectionProducer producer) async {
+      producer.configure(context);
+      await producer.compute(builder);
+    }
+
+    var errorCode = error.errorCode;
+    if (errorCode is LintCode) {
+      var generator = lintProducerMap[errorCode.name];
+      if (generator != null) {
+        await compute(generator());
+      }
+    } else {
+      var generator = nonLintProducerMap[errorCode];
+      if (generator != null) {
+        await compute(generator());
+      }
+    }
+  }
+}
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 bf2c9f2..cb91e3b 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
@@ -24,47 +24,18 @@
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 import 'package:meta/meta.dart';
 
-/// An object that can compute a correction (fix or assist).
-abstract class CorrectionProducer extends _AbstractCorrectionProducer {
-  /// Return the arguments that should be used when composing the message for an
-  /// assist, or `null` if the assist message has no parameters or if this
-  /// producer doesn't support assists.
-  List<Object> get assistArguments => null;
-
-  /// Return the assist kind that should be used to build an assist, or `null`
-  /// if this producer doesn't support assists.
-  AssistKind get assistKind => null;
-
+/// An object that can compute a correction (fix or assist) in a Dart file.
+abstract class CorrectionProducer extends SingleCorrectionProducer {
   /// Return the type for the class `bool` from `dart:core`.
   DartType get coreTypeBool => resolvedResult.typeProvider.boolType;
 
-  /// Return the length of the error message being fixed, or `null` if there is
-  /// no diagnostic.
-  int get errorLength => diagnostic?.problemMessage?.length;
-
-  /// Return the text of the error message being fixed, or `null` if there is
-  /// no diagnostic.
-  String get errorMessage => diagnostic?.problemMessage?.message;
-
-  /// Return the offset of the error message being fixed, or `null` if there is
-  /// no diagnostic.
-  int get errorOffset => diagnostic?.problemMessage?.offset;
-
-  /// Return the arguments that should be used when composing the message for a
-  /// fix, or `null` if the fix message has no parameters or if this producer
-  /// doesn't support fixes.
-  List<Object> get fixArguments => null;
-
-  /// Return the fix kind that should be used to build a fix, or `null` if this
-  /// producer doesn't support fixes.
-  FixKind get fixKind => null;
-
   /// Returns `true` if [node] is in a static context.
   bool get inStaticContext {
     // constructor initializer cannot reference "this"
@@ -80,7 +51,7 @@
     return method != null && method.isStatic;
   }
 
-  Future<void> compute(DartChangeBuilder builder);
+  Future<void> compute(ChangeBuilder builder);
 
   /// Return the class, enum or mixin declaration for the given [element].
   Future<ClassOrMixinDeclaration> getClassOrMixinDeclaration(
@@ -252,7 +223,6 @@
   final String file;
 
   final TypeProvider typeProvider;
-  final Flutter flutter;
 
   final AnalysisSession session;
   final AnalysisSessionHelper sessionHelper;
@@ -272,7 +242,6 @@
     this.selectionOffset = -1,
     this.selectionLength = 0,
   })  : file = resolvedResult.path,
-        flutter = Flutter.of(resolvedResult),
         session = resolvedResult.session,
         sessionHelper = AnalysisSessionHelper(resolvedResult.session),
         typeProvider = resolvedResult.typeProvider,
@@ -302,6 +271,39 @@
   Iterable<CorrectionProducer> get producers;
 }
 
+/// An object that can compute a correction (fix or assist) in a Dart file.
+abstract class SingleCorrectionProducer extends _AbstractCorrectionProducer {
+  /// Return the arguments that should be used when composing the message for an
+  /// assist, or `null` if the assist message has no parameters or if this
+  /// producer doesn't support assists.
+  List<Object> get assistArguments => null;
+
+  /// Return the assist kind that should be used to build an assist, or `null`
+  /// if this producer doesn't support assists.
+  AssistKind get assistKind => null;
+
+  /// Return the length of the error message being fixed, or `null` if there is
+  /// no diagnostic.
+  int get errorLength => diagnostic?.problemMessage?.length;
+
+  /// Return the text of the error message being fixed, or `null` if there is
+  /// no diagnostic.
+  String get errorMessage => diagnostic?.problemMessage?.message;
+
+  /// Return the offset of the error message being fixed, or `null` if there is
+  /// no diagnostic.
+  int get errorOffset => diagnostic?.problemMessage?.offset;
+
+  /// Return the arguments that should be used when composing the message for a
+  /// fix, or `null` if the fix message has no parameters or if this producer
+  /// doesn't support fixes.
+  List<Object> get fixArguments => null;
+
+  /// Return the fix kind that should be used to build a fix, or `null` if this
+  /// producer doesn't support fixes.
+  FixKind get fixKind => null;
+}
+
 /// The behavior shared by [CorrectionProducer] and [MultiCorrectionProducer].
 abstract class _AbstractCorrectionProducer {
   /// The context used to produce corrections.
@@ -344,7 +346,7 @@
 
   String get file => _context.file;
 
-  Flutter get flutter => _context.flutter;
+  Flutter get flutter => Flutter.instance;
 
   /// Return the library element for the library in which a correction is being
   /// produced.
@@ -381,6 +383,11 @@
     _context = context;
   }
 
+  /// Return the text that should be displayed to users when referring to the
+  /// given [type].
+  String displayStringForType(DartType type) => type.getDisplayString(
+      withNullability: libraryElement.isNonNullableByDefault);
+
   /// Return the function body of the most deeply nested method or function that
   /// encloses the [node], or `null` if the node is not in a method or function.
   FunctionBody getEnclosingFunctionBody() {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_async.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_async.dart
index 69dd645..ef18db3 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_async.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_async.dart
@@ -5,24 +5,24 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
-class AddSync extends CorrectionProducer {
+class AddAsync extends CorrectionProducer {
   @override
   FixKind get fixKind => DartFixKind.ADD_ASYNC;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var body = node.thisOrAncestorOfType<FunctionBody>();
     if (body != null && body.keyword == null) {
       var typeProvider = this.typeProvider;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.convertFunctionFromSyncToAsync(body, typeProvider);
       });
     }
   }
 
   /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  static AddSync newInstance() => AddSync();
+  static AddAsync newInstance() => AddAsync();
 }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_await.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_await.dart
index aa4fa5c..3089665 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_await.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_await.dart
@@ -4,7 +4,7 @@
 
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddAwait extends CorrectionProducer {
@@ -12,8 +12,8 @@
   FixKind get fixKind => DartFixKind.ADD_AWAIT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleInsertion(node.offset, 'await ');
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_const.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_const.dart
index 05fb681..170cdef 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_const.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_const.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddConst extends CorrectionProducer {
@@ -13,13 +13,13 @@
   FixKind get fixKind => DartFixKind.ADD_CONST;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is SimpleIdentifier) {
       node = node.parent;
     }
     if (node is ConstructorDeclaration) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         final offset = (node as ConstructorDeclaration)
             .firstTokenAfterCommentAndMetadata
             .offset;
@@ -35,7 +35,7 @@
     }
     if (node is InstanceCreationExpression) {
       if ((node as InstanceCreationExpression).keyword == null) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addSimpleInsertion(node.offset, 'const ');
         });
       }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
index 2451a7c..30ae5ef 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
@@ -9,6 +9,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:meta/meta.dart';
@@ -21,11 +22,18 @@
   FixKind get fixKind => DartFixKind.ADD_DIAGNOSTIC_PROPERTY_REFERENCE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     final node = this.node;
     if (node is! SimpleIdentifier) {
       return;
     }
+
+    var classDeclaration = node.thisOrAncestorOfType<ClassOrMixinDeclaration>();
+    if (classDeclaration == null ||
+        !flutter.isDiagnosticable(classDeclaration.declaredElement.thisType)) {
+      return;
+    }
+
     SimpleIdentifier name = node;
     final parent = node.parent;
 
@@ -97,15 +105,13 @@
       builder.writeln("$constructorName('${name.name}', ${name.name}));");
     }
 
-    final classDeclaration = parent.thisOrAncestorOfType<ClassDeclaration>();
     final debugFillProperties =
         classDeclaration.getMethod('debugFillProperties');
     if (debugFillProperties == null) {
       final insertOffset =
           utils.prepareNewMethodLocation(classDeclaration).offset;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addInsertion(utils.getLineNext(insertOffset),
-            (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addInsertion(utils.getLineNext(insertOffset), (builder) {
           final declPrefix =
               utils.getLinePrefix(classDeclaration.offset) + utils.getIndent(1);
           final bodyPrefix = declPrefix + utils.getIndent(1);
@@ -154,9 +160,8 @@
         return null;
       }
 
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addInsertion(utils.getLineNext(offset),
-            (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addInsertion(utils.getLineNext(offset), (builder) {
           writePropertyReference(builder,
               prefix: prefix, builderName: propertiesBuilderName);
         });
@@ -188,25 +193,7 @@
   }
 
   bool _isIterable(DartType type) {
-    if (type is! InterfaceType) {
-      return false;
-    }
-
-    ClassElement element = type.element;
-
-    bool isExactIterable(ClassElement element) {
-      return element?.name == 'Iterable' && element.library.isDartCore;
-    }
-
-    if (isExactIterable(element)) {
-      return true;
-    }
-    for (var type in element.allSupertypes) {
-      if (isExactIterable(type.element)) {
-        return true;
-      }
-    }
-    return false;
+    return type.asInstanceOf(typeProvider.iterableElement) != null;
   }
 
   /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_explicit_cast.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_explicit_cast.dart
index 5793f60..2af769a 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_explicit_cast.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_explicit_cast.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/precedence.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddExplicitCast extends CorrectionProducer {
@@ -16,7 +16,7 @@
   FixKind get fixKind => DartFixKind.ADD_EXPLICIT_CAST;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     Expression target;
     if (coveredNode is Expression) {
       target = coveredNode;
@@ -25,8 +25,17 @@
     }
 
     var fromType = target.staticType;
+    if (fromType == typeProvider.nullType) {
+      // There would only be a diagnostic if the `toType` is not nullable, in
+      // which case a cast won't fix the problem.
+      return;
+    }
     DartType toType;
     var parent = target.parent;
+    if (parent is CascadeExpression && target == parent.target) {
+      target = parent;
+      parent = target.parent;
+    }
     if (parent is AssignmentExpression && target == parent.rightHandSide) {
       toType = parent.leftHandSide.staticType;
     } else if (parent is VariableDeclaration && target == parent.initializer) {
@@ -35,6 +44,12 @@
       // TODO(brianwilkerson) Handle function arguments.
       return;
     }
+    if (typeSystem.isAssignableTo(
+        toType, typeSystem.promoteToNonNull(fromType))) {
+      // The only reason that `fromType` can't be assigned to `toType` is
+      // because it's nullable, in which case a cast won't fix the problem.
+      return;
+    }
     // TODO(brianwilkerson) Handle `toSet` in a manner similar to the below.
     if (target.isToListMethodInvocation) {
       var targetTarget = (target as MethodInvocation).target;
@@ -62,11 +77,11 @@
         // `cast` invocation.
         return;
       }
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         if (needsParentheses) {
           builder.addSimpleInsertion(target.offset, '(');
         }
-        builder.addInsertion(target.end, (DartEditBuilder builder) {
+        builder.addInsertion(target.end, (builder) {
           if (needsParentheses) {
             builder.write(')');
           }
@@ -81,11 +96,11 @@
         // `cast` invocation.
         return;
       }
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         if (needsParentheses) {
           builder.addSimpleInsertion(target.offset, '(');
         }
-        builder.addInsertion(target.end, (DartEditBuilder builder) {
+        builder.addInsertion(target.end, (builder) {
           if (needsParentheses) {
             builder.write(')');
           }
@@ -97,11 +112,11 @@
         });
       });
     } else {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         if (needsParentheses) {
           builder.addSimpleInsertion(target.offset, '(');
         }
-        builder.addInsertion(target.end, (DartEditBuilder builder) {
+        builder.addInsertion(target.end, (builder) {
           if (needsParentheses) {
             builder.write(')');
           }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_field_formal_parameters.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_field_formal_parameters.dart
index 133873f..6a23e04 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_field_formal_parameters.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_field_formal_parameters.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/generated/error_verifier.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddFieldFormalParameters extends CorrectionProducer {
@@ -15,7 +15,7 @@
   FixKind get fixKind => DartFixKind.ADD_FIELD_FORMAL_PARAMETERS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier || node.parent is! ConstructorDeclaration) {
       return;
     }
@@ -38,7 +38,7 @@
     if (flutter.isExactlyStatelessWidgetType(superType) ||
         flutter.isExactlyStatefulWidgetType(superType)) {
       if (parameters.isNotEmpty && parameters.last.isNamed) {
-        await builder.addFileEdit(file, (builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addSimpleInsertion(
             parameters.last.end,
             ', $fieldParametersCode',
@@ -56,7 +56,7 @@
       }
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       if (lastRequiredParameter != null) {
         builder.addSimpleInsertion(
           lastRequiredParameter.end,
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_late.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_late.dart
index c1de45b..a8ec84f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_late.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_late.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddLate extends CorrectionProducer {
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.ADD_LATE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (!libraryElement.isNonNullableByDefault) {
       return;
     }
@@ -44,8 +44,8 @@
     }
   }
 
-  void _insertAt(DartChangeBuilder builder, int offset) async {
-    await builder.addFileEdit(file, (builder) {
+  void _insertAt(ChangeBuilder builder, int offset) async {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleInsertion(offset, 'late ');
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_enum_case_clauses.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_enum_case_clauses.dart
index 678e8a8..d4426a0 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_enum_case_clauses.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_enum_case_clauses.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddMissingEnumCaseClauses extends CorrectionProducer {
@@ -15,8 +15,12 @@
   FixKind get fixKind => DartFixKind.ADD_MISSING_ENUM_CASE_CLAUSES;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
+    if (node is! SwitchStatement) {
+      return;
+    }
     var statement = node as SwitchStatement;
+
     String enumName;
     var enumConstantNames = <String>[];
     var expressionType = statement.expression.staticType;
@@ -52,7 +56,7 @@
     var statementIndent = utils.getLinePrefix(statement.offset);
     var singleIndent = utils.getIndent(1);
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addInsertion(utils.getLineThis(statement.end), (builder) {
         for (var constantName in enumConstantNames) {
           builder.write(statementIndent);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter.dart
index 7638459..5c29355 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/executable_parameters.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddMissingParameter extends MultiCorrectionProducer {
@@ -43,7 +43,7 @@
   FixKind get fixKind => DartFixKind.ADD_MISSING_PARAMETER_POSITIONAL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var prefix = context.required.isNotEmpty ? ', [' : '[';
     if (context.required.isNotEmpty) {
       var prevNode = await context.getParameterNode(context.required.last);
@@ -63,8 +63,8 @@
 
   _AddMissingParameter(this.context);
 
-  Future<void> _addParameter(DartChangeBuilder builder, int offset,
-      String prefix, String suffix) async {
+  Future<void> _addParameter(
+      ChangeBuilder builder, int offset, String prefix, String suffix) async {
     ArgumentList argumentList = node;
     List<Expression> arguments = argumentList.arguments;
     var numRequired = context.required.length;
@@ -73,7 +73,7 @@
     }
     var argument = arguments[numRequired];
     if (offset != null) {
-      await builder.addFileEdit(context.file, (builder) {
+      await builder.addDartFileEdit(context.file, (builder) {
         builder.addInsertion(offset, (builder) {
           builder.write(prefix);
           builder.writeParameterMatchingArgument(
@@ -95,7 +95,7 @@
   FixKind get fixKind => DartFixKind.ADD_MISSING_PARAMETER_REQUIRED;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (context.required.isNotEmpty) {
       var prevNode = await context.getParameterNode(context.required.last);
       await _addParameter(builder, prevNode?.end, ', ', '');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter_named.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter_named.dart
index fa835e8..93ab6ad 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter_named.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter_named.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/executable_parameters.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddMissingParameterNamed extends CorrectionProducer {
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.ADD_MISSING_PARAMETER_NAMED;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // Prepare the name of the missing parameter.
     if (this.node is! SimpleIdentifier) {
       return;
@@ -52,7 +52,7 @@
 
     Future<void> addParameter(int offset, String prefix, String suffix) async {
       if (offset != null) {
-        await builder.addFileEdit(context.file, (builder) {
+        await builder.addDartFileEdit(context.file, (builder) {
           builder.addInsertion(offset, (builder) {
             builder.write(prefix);
             builder
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_required_argument.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_required_argument.dart
index 21e2950..065deff 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_required_argument.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_required_argument.dart
@@ -8,7 +8,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddMissingRequiredArgument extends CorrectionProducer {
@@ -22,12 +22,12 @@
   FixKind get fixKind => DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     InstanceCreationExpression creation;
     Element targetElement;
     ArgumentList argumentList;
 
-    if (node is SimpleIdentifier) {
+    if (node is SimpleIdentifier || node is ConstructorName) {
       var invocation = node.parent;
       if (invocation is MethodInvocation) {
         targetElement = invocation.methodName.staticElement;
@@ -79,8 +79,8 @@
         }
       }
 
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addInsertion(offset, (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addInsertion(offset, (builder) {
           if (arguments.isNotEmpty && !insertBetweenParams) {
             builder.write(', ');
           }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_ne_null.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_ne_null.dart
index b75fd4f0..69ba3a9 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_ne_null.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_ne_null.dart
@@ -4,7 +4,7 @@
 
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddNeNull extends CorrectionProducer {
@@ -12,9 +12,9 @@
   FixKind get fixKind => DartFixKind.ADD_NE_NULL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var problemMessage = diagnostic.problemMessage;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleInsertion(
           problemMessage.offset + problemMessage.length, ' != null');
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_not_null_assert.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_not_null_assert.dart
index 05c17eb..7ce7207 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_not_null_assert.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_not_null_assert.dart
@@ -9,14 +9,14 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 
 class AddNotNullAssert extends CorrectionProducer {
   @override
   AssistKind get assistKind => DartAssistKind.ADD_NOT_NULL_ASSERT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     final identifier = node;
     if (identifier is SimpleIdentifier) {
       if (identifier.parent is FormalParameter) {
@@ -47,7 +47,7 @@
             }
           }
 
-          await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+          await builder.addDartFileEdit(file, (builder) {
             final id = identifier.name;
             final prefix = utils.getNodePrefix(exp);
             final indent = utils.getIndent(1);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_null_check.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_null_check.dart
new file mode 100644
index 0000000..c66d036
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_null_check.dart
@@ -0,0 +1,70 @@
+// 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:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/precedence.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+
+class AddNullCheck extends CorrectionProducer {
+  @override
+  FixKind get fixKind => DartFixKind.ADD_NULL_CHECK;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    if (!unit.featureSet.isEnabled(Feature.non_nullable)) {
+      // Don't suggest a feature that isn't supported.
+      return;
+    }
+    Expression target;
+    if (coveredNode is Expression) {
+      target = coveredNode;
+    } else {
+      return;
+    }
+
+    var fromType = target.staticType;
+    if (fromType == typeProvider.nullType) {
+      // Adding a null check after an explicit `null` is pointless.
+      return;
+    }
+    DartType toType;
+    var parent = target.parent;
+    if (parent is AssignmentExpression && target == parent.rightHandSide) {
+      toType = parent.leftHandSide.staticType;
+    } else if (parent is VariableDeclaration && target == parent.initializer) {
+      toType = parent.declaredElement.type;
+    } else if (parent is ArgumentList) {
+      toType = target.staticParameterElement.type;
+    } else {
+      return;
+    }
+    if (!typeSystem.isAssignableTo(
+        toType, typeSystem.promoteToNonNull(fromType))) {
+      // The reason that `fromType` can't be assigned to `toType` is more than
+      // just because it's nullable, in which case a null check won't fix the
+      // problem.
+      return;
+    }
+    var needsParentheses = target.precedence < Precedence.postfix;
+    await builder.addDartFileEdit(file, (builder) {
+      if (needsParentheses) {
+        builder.addSimpleInsertion(target.offset, '(');
+      }
+      builder.addInsertion(target.end, (builder) {
+        if (needsParentheses) {
+          builder.write(')');
+        }
+        builder.write('!');
+      });
+    });
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static AddNullCheck newInstance() => AddNullCheck();
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_override.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_override.dart
index 2faac70..8dfac60 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_override.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_override.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -16,7 +16,7 @@
   FixKind get fixKind => DartFixKind.ADD_OVERRIDE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var member = node.thisOrAncestorOfType<ClassMember>();
     if (member == null) {
       return;
@@ -32,7 +32,7 @@
 
     var exitPosition = Position(file, token.offset - 1);
     var indent = utils.getIndent(1);
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
           range.startLength(token, 0), '@override$eol$indent');
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_required.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_required.dart
index 3ccea52..ed474b4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_required.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_required.dart
@@ -4,7 +4,7 @@
 
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddRequired extends CorrectionProducer {
@@ -12,8 +12,8 @@
   FixKind get fixKind => DartFixKind.ADD_REQUIRED;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleInsertion(node.parent.offset, '@required ');
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_required_keyword.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_required_keyword.dart
index ca26be2..bc71685 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_required_keyword.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_required_keyword.dart
@@ -4,7 +4,7 @@
 
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddRequiredKeyword extends CorrectionProducer {
@@ -12,8 +12,8 @@
   FixKind get fixKind => DartFixKind.ADD_REQUIRED2;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleInsertion(node.parent.offset, 'required ');
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_return_type.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_return_type.dart
index 7ff6f15..b4d5d8d 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_return_type.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_return_type.dart
@@ -12,7 +12,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_system.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddReturnType extends CorrectionProducer {
@@ -23,7 +23,7 @@
   FixKind get fixKind => DartFixKind.ADD_RETURN_TYPE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     SyntacticEntity insertBeforeEntity;
     FunctionBody body;
     if (node is SimpleIdentifier) {
@@ -58,7 +58,7 @@
       return null;
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addInsertion(insertBeforeEntity.offset, (builder) {
         if (returnType.isDynamic) {
           builder.write('dynamic');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_static.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_static.dart
index 27b7abf..6f3fa92 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_static.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_static.dart
@@ -5,17 +5,17 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddStatic extends CorrectionProducer {
   @override
-  FixKind get fixKind => DartFixKind.ADD_STATIC; // TODO
+  FixKind get fixKind => DartFixKind.ADD_STATIC;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var declaration = node.thisOrAncestorOfType<FieldDeclaration>();
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       var offset = declaration.firstTokenAfterCommentAndMetadata.offset;
       builder.addSimpleInsertion(offset, 'static ');
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_super_constructor_invocation.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_super_constructor_invocation.dart
index f191214..3911cf4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_super_constructor_invocation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_super_constructor_invocation.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer_plugin/src/utilities/string_utilities.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class AddSuperConstructorInvocation extends MultiCorrectionProducer {
@@ -77,10 +77,10 @@
   FixKind get fixKind => DartFixKind.ADD_SUPER_CONSTRUCTOR_INVOCATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var constructorName = _constructor.displayName;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addInsertion(_insertOffset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addInsertion(_insertOffset, (builder) {
         builder.write(_prefix);
         // add super constructor name
         builder.write('super');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_type_annotation.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_type_annotation.dart
index 5361b82..98e2195 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_type_annotation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_type_annotation.dart
@@ -8,9 +8,9 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_core.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -22,7 +22,7 @@
   FixKind get fixKind => DartFixKind.ADD_TYPE_ANNOTATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is SimpleIdentifier) {
       var parent = node.parent;
@@ -68,7 +68,7 @@
   }
 
   Future<void> _forDeclaredIdentifier(
-      DartChangeBuilder builder, DeclaredIdentifier declaredIdentifier) async {
+      ChangeBuilder builder, DeclaredIdentifier declaredIdentifier) async {
     // Ensure that there isn't already a type annotation.
     if (declaredIdentifier.type != null) {
       return;
@@ -79,18 +79,16 @@
     }
     _configureTargetLocation(node);
 
-    Future<bool> applyChange(DartChangeBuilder builder) async {
+    Future<bool> applyChange(ChangeBuilder builder) async {
       var validChange = true;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         var keyword = declaredIdentifier.keyword;
         if (keyword.keyword == Keyword.VAR) {
-          builder.addReplacement(range.token(keyword),
-              (DartEditBuilder builder) {
+          builder.addReplacement(range.token(keyword), (builder) {
             validChange = builder.writeType(type);
           });
         } else {
-          builder.addInsertion(declaredIdentifier.identifier.offset,
-              (DartEditBuilder builder) {
+          builder.addInsertion(declaredIdentifier.identifier.offset, (builder) {
             validChange = builder.writeType(type);
             builder.write(' ');
           });
@@ -104,7 +102,7 @@
     }
   }
 
-  Future<void> _forSimpleFormalParameter(DartChangeBuilder builder,
+  Future<void> _forSimpleFormalParameter(ChangeBuilder builder,
       SimpleIdentifier name, SimpleFormalParameter parameter) async {
     // Ensure that there isn't already a type annotation.
     if (parameter.type != null) {
@@ -121,10 +119,10 @@
     }
     _configureTargetLocation(node);
 
-    Future<bool> applyChange(DartChangeBuilder builder) async {
+    Future<bool> applyChange(ChangeBuilder builder) async {
       var validChange = true;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addInsertion(name.offset, (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addInsertion(name.offset, (builder) {
           validChange = builder.writeType(type);
           if (validChange) {
             builder.write(' ');
@@ -139,8 +137,8 @@
     }
   }
 
-  Future<void> _forVariableDeclaration(DartChangeBuilder builder,
-      VariableDeclarationList declarationList) async {
+  Future<void> _forVariableDeclaration(
+      ChangeBuilder builder, VariableDeclarationList declarationList) async {
     // Ensure that there isn't already a type annotation.
     if (declarationList.type != null) {
       return;
@@ -168,17 +166,16 @@
     }
     _configureTargetLocation(node);
 
-    Future<bool> applyChange(DartChangeBuilder builder) async {
+    Future<bool> applyChange(ChangeBuilder builder) async {
       var validChange = true;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         var keyword = declarationList.keyword;
         if (keyword?.keyword == Keyword.VAR) {
-          builder.addReplacement(range.token(keyword),
-              (DartEditBuilder builder) {
+          builder.addReplacement(range.token(keyword), (builder) {
             validChange = builder.writeType(type);
           });
         } else {
-          builder.addInsertion(variable.offset, (DartEditBuilder builder) {
+          builder.addInsertion(variable.offset, (builder) {
             validChange = builder.writeType(type);
             builder.write(' ');
           });
@@ -192,9 +189,8 @@
     }
   }
 
-  DartChangeBuilder _temporaryBuilder(DartChangeBuilder builder) =>
-      DartChangeBuilderImpl.forWorkspace(
-          (builder as DartChangeBuilderImpl).workspace);
+  ChangeBuilder _temporaryBuilder(ChangeBuilder builder) =>
+      ChangeBuilder(workspace: (builder as ChangeBuilderImpl).workspace);
 
   /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
   static AddTypeAnnotation newInstance() => AddTypeAnnotation();
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/assign_to_local_variable.dart b/pkg/analysis_server/lib/src/services/correction/dart/assign_to_local_variable.dart
index 956a58c..4ecdfcf 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/assign_to_local_variable.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/assign_to_local_variable.dart
@@ -9,14 +9,14 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.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_builder_core.dart';
 
 class AssignToLocalVariable extends CorrectionProducer {
   @override
   AssistKind get assistKind => DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // prepare enclosing ExpressionStatement
     ExpressionStatement expressionStatement;
     // ignore: unnecessary_this
@@ -32,7 +32,8 @@
         return;
       }
     }
-    if (expressionStatement == null) {
+    if (expressionStatement == null ||
+        _hasPrecedingStatementRecovery(expressionStatement)) {
       return;
     }
     // prepare expression
@@ -52,7 +53,7 @@
         getVariableNameSuggestionsForExpression(type, expression, excluded);
 
     if (suggestions.isNotEmpty) {
-      await builder.addFileEdit(file, (builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addInsertion(offset, (builder) {
           builder.write('var ');
           builder.addSimpleLinkedEdit('NAME', suggestions[0],
@@ -66,4 +67,25 @@
 
   /// Return an instance of this class. Used as a tear-off in `AssistProcessor`.
   static AssignToLocalVariable newInstance() => AssignToLocalVariable();
+
+  /// Return `true` if the given [statement] resulted from a recovery case that
+  /// would make the change create even worse errors than the original code.
+  static bool _hasPrecedingStatementRecovery(Statement statement) {
+    var parent = statement.parent;
+    if (parent is Block) {
+      var statements = parent.statements;
+      var index = statements.indexOf(statement);
+      if (index > 0) {
+        var precedingStatement = statements[index - 1];
+        if (precedingStatement is ExpressionStatement &&
+            precedingStatement.semicolon.isSynthetic) {
+          return true;
+        } else if (precedingStatement is VariableDeclarationStatement &&
+            precedingStatement.semicolon.isSynthetic) {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
 }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/change_argument_name.dart b/pkg/analysis_server/lib/src/services/correction/dart/change_argument_name.dart
index 005278e..34f81c7 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/change_argument_name.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/change_argument_name.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analysis_server/src/services/correction/levenshtein.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -82,8 +82,8 @@
   FixKind get fixKind => DartFixKind.CHANGE_ARGUMENT_NAME;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.node(_argumentName), _proposedName);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/change_to.dart b/pkg/analysis_server/lib/src/services/correction/dart/change_to.dart
index 048191c..b4a176f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/change_to.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/change_to.dart
@@ -9,7 +9,7 @@
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -34,7 +34,7 @@
   FixKind get fixKind => DartFixKind.CHANGE_TO;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // TODO(brianwilkerson) Unify these separate methods as much as is
     //  reasonably possible.
     // TODO(brianwilkerson) Consider proposing all of the names within a
@@ -52,7 +52,7 @@
     }
   }
 
-  Future<void> _proposeAnnotation(DartChangeBuilder builder) async {
+  Future<void> _proposeAnnotation(ChangeBuilder builder) async {
     var node = this.node;
     if (node is Annotation) {
       var name = node.name;
@@ -64,8 +64,7 @@
     }
   }
 
-  Future<void> _proposeClassOrMixin(
-      DartChangeBuilder builder, AstNode node) async {
+  Future<void> _proposeClassOrMixin(ChangeBuilder builder, AstNode node) async {
     // Prepare the optional import prefix name.
     String prefixName;
     if (node is PrefixedIdentifier &&
@@ -97,7 +96,7 @@
       if (finder._element != null) {
         _proposedName = finder._element.name;
         if (_proposedName != null) {
-          await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+          await builder.addDartFileEdit(file, (builder) {
             builder.addSimpleReplacement(range.node(node), _proposedName);
           });
         }
@@ -105,7 +104,7 @@
     }
   }
 
-  Future<void> _proposeClassOrMixinMember(DartChangeBuilder builder,
+  Future<void> _proposeClassOrMixinMember(ChangeBuilder builder,
       Expression target, _ElementPredicate predicate) async {
     if (node is SimpleIdentifier) {
       var name = (node as SimpleIdentifier).name;
@@ -131,14 +130,14 @@
       // if we have close enough element, suggest to use it
       if (finder._element != null) {
         _proposedName = finder._element.displayName;
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addSimpleReplacement(range.node(node), _proposedName);
         });
       }
     }
   }
 
-  Future<void> _proposeFunction(DartChangeBuilder builder) async {
+  Future<void> _proposeFunction(ChangeBuilder builder) async {
     var node = this.node;
     if (node is SimpleIdentifier) {
       // Prepare the optional import prefix name.
@@ -172,14 +171,14 @@
       // If we have a close enough element, suggest to use it.
       if (finder._element != null) {
         _proposedName = finder._element.name;
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addSimpleReplacement(range.node(node), _proposedName);
         });
       }
     }
   }
 
-  Future<void> _proposeGetterOrSetter(DartChangeBuilder builder) async {
+  Future<void> _proposeGetterOrSetter(ChangeBuilder builder) async {
     var node = this.node;
     if (node is SimpleIdentifier) {
       // prepare target
@@ -206,7 +205,7 @@
     }
   }
 
-  Future<void> _proposeMethod(DartChangeBuilder builder) async {
+  Future<void> _proposeMethod(ChangeBuilder builder) async {
     if (node.parent is MethodInvocation) {
       var invocation = node.parent as MethodInvocation;
       await _proposeClassOrMixinMember(builder, invocation.realTarget,
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/change_to_nearest_precise_value.dart b/pkg/analysis_server/lib/src/services/correction/dart/change_to_nearest_precise_value.dart
index fc5559c..5caea4e 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/change_to_nearest_precise_value.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/change_to_nearest_precise_value.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -21,14 +21,14 @@
   FixKind get fixKind => DartFixKind.CHANGE_TO_NEAREST_PRECISE_VALUE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     IntegerLiteral integer = node;
     var lexeme = integer.literal.lexeme;
     var precise = BigInt.from(IntegerLiteralImpl.nearestValidDouble(lexeme));
     _correction = lexeme.toLowerCase().contains('x')
         ? '0x${precise.toRadixString(16).toUpperCase()}'
         : precise.toString();
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.node(integer), _correction);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/change_to_static_access.dart b/pkg/analysis_server/lib/src/services/correction/dart/change_to_static_access.dart
index bf0ba1d..02b291f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/change_to_static_access.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/change_to_static_access.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,7 +20,7 @@
   FixKind get fixKind => DartFixKind.CHANGE_TO_STATIC_ACCESS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     Expression target;
     Element invokedElement;
     if (node is SimpleIdentifier && node.parent is MethodInvocation) {
@@ -40,8 +40,8 @@
       return;
     }
     var declaringElement = invokedElement.enclosingElement;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(target), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(target), (builder) {
         builder.writeReference(declaringElement);
       });
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/change_type_annotation.dart b/pkg/analysis_server/lib/src/services/correction/dart/change_type_annotation.dart
index 712ed76..0dfea8a 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/change_type_annotation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/change_type_annotation.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -22,7 +22,7 @@
   FixKind get fixKind => DartFixKind.CHANGE_TYPE_ANNOTATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var declaration = coveredNode?.parent;
     if (declaration is VariableDeclaration &&
         declaration.initializer == coveredNode) {
@@ -34,12 +34,10 @@
           Expression initializer = coveredNode;
           var newType = initializer.staticType;
           if (newType is InterfaceType || newType is FunctionType) {
-            _oldAnnotation =
-                typeNode.type.getDisplayString(withNullability: false);
-            _newAnnotation = newType.getDisplayString(withNullability: false);
-            await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-              builder.addReplacement(range.node(typeNode),
-                  (DartEditBuilder builder) {
+            _oldAnnotation = displayStringForType(typeNode.type);
+            _newAnnotation = displayStringForType(newType);
+            await builder.addDartFileEdit(file, (builder) {
+              builder.addReplacement(range.node(typeNode), (builder) {
                 builder.writeType(newType);
               });
             });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_add_all_to_spread.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_add_all_to_spread.dart
index f123391..d4269d4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_add_all_to_spread.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_add_all_to_spread.dart
@@ -8,7 +8,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -37,7 +37,7 @@
       : DartFixKind.CONVERT_TO_SPREAD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is! SimpleIdentifier || node.parent is! MethodInvocation) {
       return;
@@ -98,7 +98,7 @@
     }
     elementText ??= '...${utils.getNodeText(argument)}';
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       if (list.elements.isNotEmpty) {
         // ['a']..addAll(['b', 'c']);
         builder.addSimpleInsertion(list.elements.last.end, ', $elementText');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_class_to_mixin.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_class_to_mixin.dart
index 52e5f04..00a5ef9 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_class_to_mixin.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_class_to_mixin.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertClassToMixin extends CorrectionProducer {
@@ -17,7 +17,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_CLASS_TO_MIXIN;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var classDeclaration = node.thisOrAncestorOfType<ClassDeclaration>();
     if (classDeclaration == null) {
       return;
@@ -54,7 +54,7 @@
     }
     interfaces.addAll(classElement.interfaces);
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addReplacement(
           range.startStart(
               classDeclaration.abstractKeyword ?? classDeclaration.classKeyword,
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_conditional_expression_to_if_element.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_conditional_expression_to_if_element.dart
index b545497..6fc0b90 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_conditional_expression_to_if_element.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_conditional_expression_to_if_element.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_IF_ELEMENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     AstNode node = this.node.thisOrAncestorOfType<ConditionalExpression>();
     if (node == null) {
       return null;
@@ -36,9 +36,8 @@
       var thenExpression = conditional.thenExpression.unParenthesized;
       var elseExpression = conditional.elseExpression.unParenthesized;
 
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addReplacement(range.node(nodeToReplace),
-            (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addReplacement(range.node(nodeToReplace), (builder) {
           builder.write('if (');
           builder.write(utils.getNodeText(condition));
           builder.write(') ');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_block.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_block.dart
index c24612c..7068e136 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_block.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_block.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertDocumentationIntoBlock extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_DOCUMENTATION_INTO_BLOCK;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var comment = node.thisOrAncestorOfType<Comment>();
     if (comment == null || !comment.isDocumentation) {
       return;
@@ -29,8 +29,8 @@
     }
     var prefix = utils.getNodePrefix(comment);
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(comment), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(comment), (builder) {
         builder.writeln('/**');
         for (var token in comment.tokens) {
           builder.write(prefix);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_line.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_line.dart
index 3288b0c..7459fdb 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_line.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_documentation_into_line.dart
@@ -8,7 +8,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,7 +20,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_LINE_COMMENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var comment = node.thisOrAncestorOfType<Comment>();
     if (comment == null ||
         !comment.isDocumentation ||
@@ -67,8 +67,8 @@
       }
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(comment), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(comment), (builder) {
         for (var newLine in newLines) {
           builder.write(newLine);
         }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_flutter_child.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_flutter_child.dart
index a6029d6..3556de0 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_flutter_child.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_flutter_child.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_FLUTTER_CHILD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var named = flutter.findNamedExpression(node, 'child');
     if (named == null) {
       return;
@@ -23,7 +23,7 @@
     // child: widget
     var expression = named.expression;
     if (flutter.isWidgetExpression(expression)) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         flutter.convertChildToChildren2(
             builder,
             expression,
@@ -41,7 +41,7 @@
     // child: [widget1, widget2]
     if (expression is ListLiteral &&
         expression.elements.every(flutter.isWidgetExpression)) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleReplacement(range.node(named.name), 'children:');
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_flutter_children.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_flutter_children.dart
index df8469f..29fd8d0 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_flutter_children.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_flutter_children.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_FLUTTER_CHILDREN;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is SimpleIdentifier &&
         node.name == 'children' &&
@@ -29,7 +29,7 @@
           var indentNew = utils.getLinePrefix(named.offset);
           widgetText = _replaceSourceIndent(widgetText, indentOld, indentNew);
 
-          await builder.addFileEdit(file, (builder) {
+          await builder.addDartFileEdit(file, (builder) {
             builder.addReplacement(range.node(named), (builder) {
               builder.write('child: ');
               builder.write(widgetText);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_async_body.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_async_body.dart
index 5b5dffb..1ccaff4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_async_body.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_async_body.dart
@@ -6,14 +6,14 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 
 class ConvertIntoAsyncBody extends CorrectionProducer {
   @override
   AssistKind get assistKind => DartAssistKind.CONVERT_INTO_ASYNC_BODY;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var body = getEnclosingFunctionBody();
     if (body == null ||
         body is EmptyFunctionBody ||
@@ -38,7 +38,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.convertFunctionFromSyncToAsync(body, typeProvider);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_block_body.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_block_body.dart
index 5a64e75..629db9d 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_block_body.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_block_body.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertIntoBlockBody extends CorrectionProducer {
@@ -14,7 +14,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_INTO_BLOCK_BODY;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var body = getEnclosingFunctionBody();
     // prepare expression body
     if (body is! ExpressionFunctionBody || body.isGenerator) {
@@ -35,8 +35,8 @@
     var prefix = utils.getNodePrefix(body.parent);
     var indent = utils.getIndent(1);
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(body), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(body), (builder) {
         if (body.isAsynchronous) {
           builder.write('async ');
         }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_final_field.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_final_field.dart
index 10162a1..9523790 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_final_field.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_final_field.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertIntoFinalField extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_INTO_FINAL_FIELD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // Find the enclosing getter.
     MethodDeclaration getter;
     for (var n = node; n != null; n = n.parent) {
@@ -75,7 +75,7 @@
       code += ';';
       var replacementRange =
           range.startEnd(getter.returnType ?? getter.propertyKeyword, getter);
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleReplacement(replacementRange, code);
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_for_index.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_for_index.dart
index 8859bcb..eee7b51 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_for_index.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_for_index.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertIntoForIndex extends CorrectionProducer {
@@ -16,7 +16,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_INTO_FOR_INDEX;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // find enclosing ForEachStatement
     var forEachStatement = node.thisOrAncestorMatching(
             (node) => node is ForStatement && node.forLoopParts is ForEachParts)
@@ -78,7 +78,7 @@
     var indent = utils.getIndent(1);
     var firstBlockLine = utils.getLineContentEnd(body.leftBracket.end);
     // add change
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       // TODO(brianwilkerson) Create linked positions for the loop variable.
       builder.addSimpleReplacement(
           range.startEnd(forEachStatement, forEachStatement.rightParenthesis),
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_getter.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_getter.dart
index ac1a37d..437bb0b 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_getter.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_getter.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertIntoGetter extends CorrectionProducer {
@@ -14,7 +14,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_INTO_GETTER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // Find the enclosing field declaration.
     FieldDeclaration fieldDeclaration;
     for (var n = node; n != null; n = n.parent) {
@@ -55,7 +55,7 @@
     code += ' => ' + utils.getNodeText(initializer);
     code += ';';
     var replacementRange = range.startEnd(fieldList.keyword, fieldDeclaration);
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(replacementRange, code);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not.dart
index 8a2fd09..114f8d8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/dart/ast/precedence.dart';
 import 'package:analyzer/dart/ast/token.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertIntoIsNot extends CorrectionProducer {
@@ -17,7 +17,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_INTO_IS_NOT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // Find the is expression
     var isExpression = node.thisOrAncestorOfType<IsExpression>();
     if (isExpression == null) {
@@ -55,7 +55,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       if (getExpressionParentPrecedence(prefExpression) >=
           Precedence.relational) {
         builder.addDeletion(range.token(prefExpression.operator));
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not_empty.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not_empty.dart
index 2b82a89..98edb9b 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not_empty.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_into_is_not_empty.dart
@@ -8,7 +8,7 @@
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertIntoIsNotEmpty extends CorrectionProducer {
@@ -16,7 +16,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_INTO_IS_NOT_EMPTY;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // prepare "expr.isEmpty"
     AstNode isEmptyAccess;
     SimpleIdentifier isEmptyIdentifier;
@@ -58,7 +58,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(
           range.startStart(prefixExpression, prefixExpression.operand));
       builder.addSimpleReplacement(range.node(isEmptyIdentifier), 'isNotEmpty');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_map_from_iterable_to_for_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_map_from_iterable_to_for_literal.dart
index dcfa395..fd31707 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_map_from_iterable_to_for_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_map_from_iterable_to_for_literal.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_FOR_ELEMENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Ensure that the selection is inside an invocation of Map.fromIterable.
     //
@@ -155,8 +155,8 @@
     //
     // Construct the edit.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(creation), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(creation), (builder) {
         builder.write('{ for (var ');
         builder.write(loopVariableName);
         builder.write(' in ');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_part_of_to_uri.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_part_of_to_uri.dart
index 22a647e..246a7e3 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_part_of_to_uri.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_part_of_to_uri.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 import 'package:path/path.dart';
 
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_PART_OF_TO_URI;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var directive = node.thisOrAncestorOfType<PartOfDirective>();
     if (directive == null || directive.libraryName == null) {
       return;
@@ -25,7 +25,7 @@
     var relativePath = relative(libraryPath, from: dirname(partPath));
     var uri = Uri.file(relativePath).toString();
     var replacementRange = range.node(directive.libraryName);
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(replacementRange, "'$uri'");
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_quotes.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_quotes.dart
index b9ee86a..b9db2b2 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_quotes.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_quotes.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/source/source_range.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 abstract class ConvertQuotes extends CorrectionProducer {
@@ -19,7 +19,7 @@
   bool get _fromDouble;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is SimpleStringLiteral) {
       SimpleStringLiteral literal = node;
       if (_fromDouble ? !literal.isSingleQuoted : literal.isSingleQuoted) {
@@ -29,7 +29,7 @@
         var quoteLength = literal.isMultiline ? 3 : 1;
         var lexeme = literal.literal.lexeme;
         if (!lexeme.contains(newQuote)) {
-          await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+          await builder.addDartFileEdit(file, (builder) {
             builder.addSimpleReplacement(
                 SourceRange(
                     literal.offset + (literal.isRaw ? 1 : 0), quoteLength),
@@ -56,7 +56,7 @@
             }
           }
         }
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addSimpleReplacement(
               SourceRange(parent.offset + (parent.isRaw ? 1 : 0), quoteLength),
               newQuote);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_contains.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_contains.dart
index 8f52fed..b4699fe 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_contains.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_contains.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,7 +15,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_CONTAINS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var comparison = node.thisOrAncestorOfType<BinaryExpression>();
     if (comparison == null) {
       return;
@@ -34,7 +34,7 @@
         notOffset = leftOperand.offset;
       }
 
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         if (notOffset > 0) {
           builder.addSimpleInsertion(notOffset, '!');
         }
@@ -54,7 +54,7 @@
         notOffset = rightOperand.offset;
       }
 
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(deletionRange);
         if (notOffset > 0) {
           builder.addSimpleInsertion(notOffset, '!');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_expression_function_body.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_expression_function_body.dart
index 0e4b2c9..767c412 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_expression_function_body.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_expression_function_body.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_INTO_EXPRESSION_BODY;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // prepare current body
     var body = getEnclosingFunctionBody();
     if (body is! BlockFunctionBody || body.isGenerator) {
@@ -48,8 +48,8 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(body), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(body), (builder) {
         if (body.isAsynchronous) {
           builder.write('async ');
         }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_field_parameter.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_field_parameter.dart
index 0223626..886c599 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_field_parameter.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_field_parameter.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertToFieldParameter extends CorrectionProducer {
@@ -16,7 +16,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_FIELD_PARAMETER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node == null) {
       return;
     }
@@ -75,7 +75,7 @@
       }
       var fieldName = parameterInitializer.fieldName.name;
 
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         // replace parameter
         builder.addSimpleReplacement(range.node(parameter), 'this.$fieldName');
         // remove initializer
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_generic_function_syntax.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_generic_function_syntax.dart
index d62d9eb..ed860a2 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_generic_function_syntax.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_generic_function_syntax.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,7 +20,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_GENERIC_FUNCTION_SYNTAX;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     while (node != null) {
       if (node is FunctionTypeAlias) {
@@ -55,7 +55,7 @@
   }
 
   Future<void> _convertFunctionTypeAlias(
-      DartChangeBuilder builder, FunctionTypeAlias node) async {
+      ChangeBuilder builder, FunctionTypeAlias node) async {
     if (!_allParametersHaveTypes(node.parameters)) {
       return;
     }
@@ -73,7 +73,7 @@
       replacement = '$functionName = $returnType Function$parameters';
     }
     // add change
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
           range.startStart(node.typedefKeyword.next, node.semicolon),
           replacement);
@@ -81,7 +81,7 @@
   }
 
   Future<void> _convertFunctionTypedFormalParameter(
-      DartChangeBuilder builder, FunctionTypedFormalParameter node) async {
+      ChangeBuilder builder, FunctionTypedFormalParameter node) async {
     if (!_allParametersHaveTypes(node.parameters)) {
       return;
     }
@@ -99,7 +99,7 @@
       replacement = '$returnType Function$parameters $functionName';
     }
     // add change
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.node(node), replacement);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_if_null.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_if_null.dart
index e18304d..8455340 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_if_null.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_if_null.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,7 +15,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_IF_NULL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var conditional = node.thisOrAncestorOfType<ConditionalExpression>();
     if (conditional == null) {
       return;
@@ -30,7 +30,7 @@
       nullableExpression = conditional.thenExpression;
       defaultExpression = conditional.elseExpression;
     }
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addReplacement(range.node(conditional), (builder) {
         builder.write(utils.getNodeText(nullableExpression));
         builder.write(' ?? ');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_int_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_int_literal.dart
index 72d1338..7682a76 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_int_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_int_literal.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/source/source_range.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class ConvertToIntLiteral extends CorrectionProducer {
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_INT_LITERAL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! DoubleLiteral) {
       return;
     }
@@ -34,9 +34,9 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addReplacement(SourceRange(literal.offset, literal.length),
-          (DartEditBuilder builder) {
+          (builder) {
         builder.write('$intValue');
       });
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_list_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_list_literal.dart
index c3ecab5..acd756c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_list_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_list_literal.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_LIST_LITERAL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Ensure that this is the default constructor defined on `List`.
     //
@@ -38,8 +38,8 @@
     //
     // Build the edit.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(creation), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(creation), (builder) {
         if (constructorTypeArguments != null) {
           builder.write(utils.getNodeText(constructorTypeArguments));
         }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_map_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_map_literal.dart
index daccb53..5db3377 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_map_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_map_literal.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,7 +20,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_MAP_LITERAL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Ensure that this is the default constructor defined on either `Map` or
     // `LinkedHashMap`.
@@ -40,8 +40,8 @@
     //
     // Build the edit.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(creation), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(creation), (builder) {
         if (constructorTypeArguments != null) {
           builder.write(utils.getNodeText(constructorTypeArguments));
         }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_multiline_string.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_multiline_string.dart
index bf43b16..15a289f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_multiline_string.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_multiline_string.dart
@@ -7,14 +7,14 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/source/source_range.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_builder_core.dart';
 
 class ConvertToMutilineString extends CorrectionProducer {
   @override
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_MULTILINE_STRING;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is InterpolationElement) {
       node = (node as InterpolationElement).parent;
@@ -22,7 +22,7 @@
     if (node is SingleStringLiteral) {
       var literal = node;
       if (!literal.isMultiline) {
-        await builder.addFileEdit(file, (builder) {
+        await builder.addDartFileEdit(file, (builder) {
           var newQuote = literal.isSingleQuoted ? "'''" : '"""';
           builder.addReplacement(
             SourceRange(literal.offset + (literal.isRaw ? 1 : 0), 1),
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_named_arguments.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_named_arguments.dart
index b7ce175..ce315d9 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_named_arguments.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_named_arguments.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class ConvertToNamedArguments extends CorrectionProducer {
@@ -15,7 +15,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_NAMED_ARGUMENTS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var argumentList = node;
     if (argumentList is ArgumentList) {
       // Prepare parameters.
@@ -80,7 +80,7 @@
         return;
       }
 
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         for (var argument in argumentToParameter.keys) {
           var parameter = argumentToParameter[argument];
           builder.addSimpleInsertion(argument.offset, '${parameter.name}: ');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_normal_parameter.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_normal_parameter.dart
index d3c13e5..9e488f2 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_normal_parameter.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_normal_parameter.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ConvertToNormalParameter extends CorrectionProducer {
@@ -14,7 +14,7 @@
   AssistKind get assistKind => DartAssistKind.CONVERT_TO_NORMAL_PARAMETER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is SimpleIdentifier &&
         node.parent is FieldFormalParameter &&
         node.parent.parent is FormalParameterList &&
@@ -27,13 +27,12 @@
       // prepare type
       var type = parameterElement.type;
 
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         // replace parameter
         if (type.isDynamic) {
           builder.addSimpleReplacement(range.node(parameter), name);
         } else {
-          builder.addReplacement(range.node(parameter),
-              (DartEditBuilder builder) {
+          builder.addReplacement(range.node(parameter), (builder) {
             builder.writeType(type);
             builder.write(' ');
             builder.write(name);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_null_aware.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_null_aware.dart
index 18604d3..403a6c4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_null_aware.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_null_aware.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_NULL_AWARE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node.parent is BinaryExpression &&
         node.parent.parent is ConditionalExpression) {
@@ -95,7 +95,7 @@
       }
       periodOffset = operator.offset;
 
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.startStart(node, nonNullExpression));
         builder.addSimpleInsertion(periodOffset, '?');
         builder.addDeletion(range.endEnd(nonNullExpression, node));
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_on_type.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_on_type.dart
index 2df2ee0..470c614 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_on_type.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_on_type.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -17,7 +17,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_ON_TYPE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var exceptionParameter = node;
     if (exceptionParameter is SimpleIdentifier) {
       var catchClause = exceptionParameter.parent;
@@ -26,7 +26,7 @@
           catchClause.exceptionParameter == exceptionParameter) {
         var exceptionTypeName = exceptionParameter.name;
         fixArguments.add(exceptionTypeName);
-        await builder.addFileEdit(file, (builder) {
+        await builder.addDartFileEdit(file, (builder) {
           if (catchClause.stackTraceParameter != null) {
             builder.addSimpleReplacement(
               range.startStart(
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_package_import.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_package_import.dart
index 7856391..28bbe9e 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_package_import.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_package_import.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_PACKAGE_IMPORT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is StringLiteral) {
       node = node.parent;
@@ -47,7 +47,7 @@
         return;
       }
 
-      await builder.addFileEdit(file, (builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleReplacement(
           range.node(importDirective.uri),
           "'$importUri'",
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_relative_import.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_relative_import.dart
index eea6658..d927238 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_relative_import.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_relative_import.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 import 'package:path/path.dart' as path;
@@ -20,7 +20,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_RELATIVE_IMPORT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is StringLiteral) {
       node = node.parent;
@@ -70,7 +70,7 @@
       from: path.dirname(sourceUri.path),
     );
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
         range.node(importDirective.uri).getExpanded(-1),
         relativePath,
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_set_literal.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_set_literal.dart
index dde8458..f374346 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_set_literal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_set_literal.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/source/source_range.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,7 +20,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_SET_LITERAL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Check whether this is an invocation of `toSet` on a list literal.
     //
@@ -36,7 +36,7 @@
       //
       // Build the change and return the assist.
       //
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         if (hasTypeArgs || _listHasUnambiguousElement(target)) {
           builder.addSimpleReplacement(openRange, '{');
         } else {
@@ -85,8 +85,8 @@
       //
       // Build the edit.
       //
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addReplacement(range.node(creation), (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addReplacement(range.node(creation), (builder) {
           if (constructorTypeArguments != null) {
             builder.write(utils.getNodeText(constructorTypeArguments));
           } else if (elementTypeArguments != null) {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_where_type.dart b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_where_type.dart
index 7d66b0e..2753a81 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/convert_to_where_type.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/convert_to_where_type.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.CONVERT_TO_WHERE_TYPE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is! SimpleIdentifier || node.parent is! MethodInvocation) {
       return;
@@ -47,7 +47,7 @@
     }
     var targetType = isExpression.type;
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addReplacement(range.startEnd(methodName, invocation), (builder) {
         builder.write('whereType<');
         builder.write(utils.getNodeText(targetType));
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_class.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_class.dart
index 0a91c00..90624ae 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_class.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_class.dart
@@ -7,7 +7,7 @@
 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_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.CREATE_CLASS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     Element prefixElement;
     SimpleIdentifier nameNode;
@@ -92,8 +92,8 @@
     if (offset < 0) {
       return;
     }
-    await builder.addFileEdit(filePath, (DartFileEditBuilder builder) {
-      builder.addInsertion(offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(filePath, (builder) {
+      builder.addInsertion(offset, (builder) {
         builder.write(prefix);
         if (arguments == null) {
           builder.writeClassDeclaration(className, nameGroupName: 'NAME');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_constructor.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_constructor.dart
index 95bd4ba..af90fd1 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_constructor.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_constructor.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -23,7 +23,7 @@
   FixKind get fixKind => DartFixKind.CREATE_CONSTRUCTOR;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is ArgumentList && node.parent is InstanceCreationExpression) {
       await _proposeFromInstanceCreation(builder);
     } else {
@@ -31,7 +31,7 @@
     }
   }
 
-  Future<void> _proposeFromConstructorName(DartChangeBuilder builder) async {
+  Future<void> _proposeFromConstructorName(ChangeBuilder builder) async {
     SimpleIdentifier name;
     InstanceCreationExpression instanceCreation;
     if (node is SimpleIdentifier) {
@@ -65,18 +65,18 @@
     // prepare target ClassDeclaration
     ClassElement targetElement = targetType.element;
     var targetResult = await sessionHelper.getElementDeclaration(targetElement);
-    if (targetResult.node is! ClassOrMixinDeclaration) {
+    var targetNode = targetResult.node;
+    if (targetNode is! ClassDeclaration) {
       return;
     }
-    ClassOrMixinDeclaration targetNode = targetResult.node;
 
     // prepare location
     var targetLocation = CorrectionUtils(targetResult.resolvedUnit)
         .prepareNewConstructorLocation(targetNode);
 
     var targetFile = targetElement.source.fullName;
-    await builder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
-      builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(targetFile, (builder) {
+      builder.addInsertion(targetLocation.offset, (builder) {
         builder.write(targetLocation.prefix);
         builder.writeConstructorDeclaration(targetElement.name,
             argumentList: instanceCreation.argumentList,
@@ -90,7 +90,7 @@
     });
   }
 
-  Future<void> _proposeFromInstanceCreation(DartChangeBuilder builder) async {
+  Future<void> _proposeFromInstanceCreation(ChangeBuilder builder) async {
     InstanceCreationExpression instanceCreation = node.parent;
     _constructorName = instanceCreation.constructorName;
     // should be synthetic default constructor
@@ -108,10 +108,10 @@
     // prepare target ClassDeclaration
     var targetElement = constructorElement.enclosingElement;
     var targetResult = await sessionHelper.getElementDeclaration(targetElement);
-    if (targetResult.node is! ClassOrMixinDeclaration) {
+    var targetNode = targetResult.node;
+    if (targetNode is! ClassDeclaration) {
       return;
     }
-    ClassOrMixinDeclaration targetNode = targetResult.node;
 
     // prepare location
     var targetLocation = CorrectionUtils(targetResult.resolvedUnit)
@@ -119,8 +119,8 @@
 
     var targetSource = targetElement.source;
     var targetFile = targetSource.fullName;
-    await builder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
-      builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(targetFile, (builder) {
+      builder.addInsertion(targetLocation.offset, (builder) {
         builder.write(targetLocation.prefix);
         builder.writeConstructorDeclaration(targetElement.name,
             argumentList: instanceCreation.argumentList);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_for_final_fields.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_for_final_fields.dart
index 56e71e2..07a9f44 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_for_final_fields.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_for_final_fields.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class CreateConstructorForFinalFields extends CorrectionProducer {
@@ -17,7 +17,7 @@
   bool get _isNonNullable => unit.featureSet.isEnabled(Feature.non_nullable);
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier || node.parent is! VariableDeclaration) {
       return;
     }
@@ -48,8 +48,8 @@
         flutter.isExactlyStatefulWidgetType(superType)) {
       // Specialize for Flutter widgets.
       var keyClass = await sessionHelper.getClass(flutter.widgetsUri, 'Key');
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addInsertion(targetLocation.offset, (builder) {
           builder.write(targetLocation.prefix);
           builder.write('const ');
           builder.write(className);
@@ -83,8 +83,8 @@
         });
       });
     } else {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addInsertion(targetLocation.offset, (builder) {
           builder.write(targetLocation.prefix);
           builder.writeConstructorDeclaration(className,
               fieldNames: fieldNames);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_super.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_super.dart
index 53c642c..23223ba 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_super.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_super.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/util.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class CreateConstructorSuper extends MultiCorrectionProducer {
@@ -64,12 +64,12 @@
   FixKind get fixKind => DartFixKind.CREATE_CONSTRUCTOR_SUPER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var constructorName = _constructor.name;
     var requiredParameters = _constructor.parameters
         .where((parameter) => parameter.isRequiredPositional);
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addInsertion(_targetLocation.offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addInsertion(_targetLocation.offset, (builder) {
         void writeParameters(bool includeType) {
           var firstParameter = true;
           for (var parameter in requiredParameters) {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_field.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_field.dart
index c9bee55..1a72275 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_field.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_field.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/util.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class CreateField extends CorrectionProducer {
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.CREATE_FIELD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var parameter = node.thisOrAncestorOfType<FieldFormalParameter>();
     if (parameter != null) {
       await _proposeFromFieldFormalParameter(builder, parameter);
@@ -31,7 +31,7 @@
   }
 
   Future<void> _proposeFromFieldFormalParameter(
-      DartChangeBuilder builder, FieldFormalParameter parameter) async {
+      ChangeBuilder builder, FieldFormalParameter parameter) async {
     var targetClassNode = parameter.thisOrAncestorOfType<ClassDeclaration>();
     if (targetClassNode == null) {
       return;
@@ -42,9 +42,9 @@
     //
     // Add proposal.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       var fieldType = parameter.type?.type;
-      builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
+      builder.addInsertion(targetLocation.offset, (builder) {
         builder.write(targetLocation.prefix);
         builder.writeFieldDeclaration(_fieldName,
             nameGroupName: 'NAME', type: fieldType, typeGroupName: 'TYPE');
@@ -53,7 +53,7 @@
     });
   }
 
-  Future<void> _proposeFromIdentifier(DartChangeBuilder builder) async {
+  Future<void> _proposeFromIdentifier(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier) {
       return;
     }
@@ -110,10 +110,10 @@
     // build field source
     var targetSource = targetClassElement.source;
     var targetFile = targetSource.fullName;
-    await builder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(targetFile, (builder) {
       var fieldTypeNode = climbPropertyAccess(nameNode);
       var fieldType = inferUndefinedExpressionType(fieldTypeNode);
-      builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
+      builder.addInsertion(targetLocation.offset, (builder) {
         builder.write(targetLocation.prefix);
         builder.writeFieldDeclaration(_fieldName,
             isStatic: staticModifier,
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_file.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_file.dart
index 5b5f3f4..e4d15a2 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_file.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_file.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class CreateFile extends CorrectionProducer {
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.CREATE_FILE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // TODO(brianwilkerson) Generalize this to allow other valid string literals.
     if (node is SimpleStringLiteral) {
       var parent = node.parent;
@@ -31,7 +31,7 @@
           var fullName = source.fullName;
           if (resourceProvider.pathContext.isAbsolute(fullName) &&
               AnalysisEngine.isDartFileName(fullName)) {
-            await builder.addFileEdit(fullName, (builder) {
+            await builder.addDartFileEdit(fullName, (builder) {
               builder.addSimpleInsertion(0, '// TODO Implement this library.');
             });
             _fileName = source.shortName;
@@ -41,8 +41,7 @@
         var source = parent.uriSource;
         if (source != null) {
           var libName = resolvedResult.libraryElement.name;
-          await builder.addFileEdit(source.fullName,
-              (DartFileEditBuilder builder) {
+          await builder.addDartFileEdit(source.fullName, (builder) {
             // TODO(brianwilkerson) Consider using the URI rather than name.
             builder.addSimpleInsertion(0, 'part of $libName;$eol$eol');
           });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_function.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_function.dart
index e5a3616..05a71da 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_function.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_function.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.CREATE_FUNCTION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // should be the name of the invocation
     if (node is SimpleIdentifier && node.parent is MethodInvocation) {
     } else {
@@ -41,8 +41,8 @@
     sourcePrefix = '$eol$eol';
     utils.targetClassElement = null;
     // build method source
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addInsertion(insertOffset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addInsertion(insertOffset, (builder) {
         builder.write(sourcePrefix);
         // append return type
         {
@@ -52,7 +52,7 @@
           }
         }
         // append name
-        builder.addLinkedEdit('NAME', (DartLinkedEditBuilder builder) {
+        builder.addLinkedEdit('NAME', (builder) {
           builder.write(_functionName);
         });
         builder.write('(');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_getter.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_getter.dart
index 8947281..5b38e57 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_getter.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_getter.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class CreateGetter extends CorrectionProducer {
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.CREATE_GETTER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier) {
       return;
     }
@@ -90,8 +90,8 @@
     // build method source
     var targetSource = targetElement.source;
     var targetFile = targetSource.fullName;
-    await builder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
-      builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(targetFile, (builder) {
+      builder.addInsertion(targetLocation.offset, (builder) {
         var fieldTypeNode = climbPropertyAccess(nameNode);
         var fieldType = inferUndefinedExpressionType(fieldTypeNode);
         builder.write(targetLocation.prefix);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_local_variable.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_local_variable.dart
index 8a809bf..08cb4f8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_local_variable.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_local_variable.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.CREATE_LOCAL_VARIABLE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier) {
       return;
     }
@@ -33,7 +33,7 @@
       if (assignment.leftHandSide == node &&
           assignment.operator.type == TokenType.EQ &&
           assignment.parent is ExpressionStatement) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addSimpleInsertion(node.offset, 'var ');
         });
         return;
@@ -51,8 +51,8 @@
       return;
     }
     // build variable declaration source
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addInsertion(target.offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addInsertion(target.offset, (builder) {
         builder.writeLocalVariableDeclaration(_variableName,
             nameGroupName: 'NAME', type: type, typeGroupName: 'TYPE');
         builder.write(eol);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_method.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_method.dart
index 20b80bb..4cf4b5c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_method.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_method.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' show Position;
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -27,7 +27,7 @@
   FixKind get fixKind => DartFixKind.CREATE_METHOD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (_kind == _MethodKind.equalsOrHashCode) {
       await createEqualsOrHashCode(builder);
     } else if (_kind == _MethodKind.method) {
@@ -35,7 +35,7 @@
     }
   }
 
-  Future<void> createEqualsOrHashCode(DartChangeBuilder builder) async {
+  Future<void> createEqualsOrHashCode(ChangeBuilder builder) async {
     final methodDecl = node.thisOrAncestorOfType<MethodDeclaration>();
     final classDecl = methodDecl.thisOrAncestorOfType<ClassDeclaration>();
     if (methodDecl != null && classDecl != null) {
@@ -55,7 +55,7 @@
       final location =
           utils.prepareNewClassMemberLocation(classDecl, (_) => true);
 
-      await builder.addFileEdit(file, (fileBuilder) {
+      await builder.addDartFileEdit(file, (fileBuilder) {
         fileBuilder.addInsertion(location.offset, (builder) {
           builder.write(location.prefix);
           builder.writeOverride(element, invokeSuper: true);
@@ -67,7 +67,7 @@
     }
   }
 
-  Future<void> createMethod(DartChangeBuilder builder) async {
+  Future<void> createMethod(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier || node.parent is! MethodInvocation) {
       return;
     }
@@ -131,8 +131,8 @@
     var targetLocation = utils.prepareNewMethodLocation(targetNode);
     var targetFile = targetElement.source.fullName;
     // build method source
-    await builder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
-      builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(targetFile, (builder) {
+      builder.addInsertion(targetLocation.offset, (builder) {
         builder.write(targetLocation.prefix);
         // maybe "static"
         if (staticModifier) {
@@ -146,7 +146,7 @@
           }
         }
         // append name
-        builder.addLinkedEdit('NAME', (DartLinkedEditBuilder builder) {
+        builder.addLinkedEdit('NAME', (builder) {
           builder.write(_memberName);
         });
         builder.write('(');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart
index 97160ba..c92e700 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart
@@ -10,7 +10,7 @@
 import 'package:analyzer/dart/element/nullability_suffix.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -26,7 +26,7 @@
   FixKind get fixKind => _fixKind;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is SimpleIdentifier) {
       var nameNode = node as SimpleIdentifier;
       // prepare argument expression (to get parameter)
@@ -81,7 +81,7 @@
   /// Prepares proposal for creating function corresponding to the given
   /// [FunctionType].
   Future<void> _createExecutable(
-      DartChangeBuilder builder,
+      ChangeBuilder builder,
       FunctionType functionType,
       String name,
       String targetFile,
@@ -92,8 +92,8 @@
       String sourceSuffix,
       Element target) async {
     // build method source
-    await builder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
-      builder.addInsertion(insertOffset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(targetFile, (builder) {
+      builder.addInsertion(insertOffset, (builder) {
         builder.write(sourcePrefix);
         builder.write(prefix);
         // may be static
@@ -106,7 +106,7 @@
           builder.write(' ');
         }
         // append name
-        builder.addLinkedEdit('NAME', (DartLinkedEditBuilder builder) {
+        builder.addLinkedEdit('NAME', (builder) {
           builder.write(name);
         });
         // append parameters
@@ -124,7 +124,7 @@
   /// Adds proposal for creating method corresponding to the given
   /// [FunctionType] in the given [ClassElement].
   Future<void> _createFunction(
-      DartChangeBuilder builder, FunctionType functionType) async {
+      ChangeBuilder builder, FunctionType functionType) async {
     var name = (node as SimpleIdentifier).name;
     // prepare environment
     var insertOffset = unit.end;
@@ -140,7 +140,7 @@
 
   /// Adds proposal for creating method corresponding to the given
   /// [FunctionType] in the given [ClassElement].
-  Future<void> _createMethod(DartChangeBuilder builder,
+  Future<void> _createMethod(ChangeBuilder builder,
       ClassElement targetClassElement, FunctionType functionType) async {
     var name = (node as SimpleIdentifier).name;
     // prepare environment
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_missing_overrides.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_missing_overrides.dart
index c6d5e59..d0fac46 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_missing_overrides.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_missing_overrides.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/error/inheritance_override.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' show Position;
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class CreateMissingOverrides extends CorrectionProducer {
@@ -22,7 +22,7 @@
   FixKind get fixKind => DartFixKind.CREATE_MISSING_OVERRIDES;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node.parent is! ClassDeclaration) {
       return;
     }
@@ -48,8 +48,8 @@
         utils.prepareNewClassMemberLocation(targetClass, (_) => true);
 
     var prefix = utils.getIndent(1);
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addInsertion(location.offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addInsertion(location.offset, (builder) {
         // Separator management.
         var numOfMembersWritten = 0;
         void addSeparatorBetweenDeclarations() {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_mixin.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_mixin.dart
index 78d9e6a..c4a8131 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_mixin.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_mixin.dart
@@ -7,7 +7,7 @@
 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_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.CREATE_MIXIN;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     Element prefixElement;
     SimpleIdentifier nameNode;
     if (node is SimpleIdentifier) {
@@ -91,8 +91,8 @@
     if (offset < 0) {
       return;
     }
-    await builder.addFileEdit(filePath, (DartFileEditBuilder builder) {
-      builder.addInsertion(offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(filePath, (builder) {
+      builder.addInsertion(offset, (builder) {
         builder.write(prefix);
         builder.writeMixinDeclaration(_mixinName, nameGroupName: 'NAME');
         builder.write(suffix);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_no_such_method.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_no_such_method.dart
index 53174e0..aa62503 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_no_such_method.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_no_such_method.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class CreateNoSuchMethod extends CorrectionProducer {
@@ -13,7 +13,7 @@
   FixKind get fixKind => DartFixKind.CREATE_NO_SUCH_METHOD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node.parent is! ClassDeclaration) {
       return;
     }
@@ -21,8 +21,8 @@
     // prepare environment
     var prefix = utils.getIndent(1);
     var insertOffset = targetClass.end - 1;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addInsertion(insertOffset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addInsertion(insertOffset, (builder) {
         builder.selectHere();
         // insert empty line before existing member
         if (targetClass.members.isNotEmpty) {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_setter.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_setter.dart
index be6d0bf..c89701f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_setter.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_setter.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class CreateSetter extends CorrectionProducer {
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.CREATE_SETTER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier) {
       return;
     }
@@ -90,8 +90,8 @@
     var targetSource = targetElement.source;
     var targetFile = targetSource.fullName;
     _setterName = nameNode.name;
-    await builder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
-      builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(targetFile, (builder) {
+      builder.addInsertion(targetLocation.offset, (builder) {
         var parameterTypeNode = climbPropertyAccess(nameNode);
         var parameterType = inferUndefinedExpressionType(parameterTypeNode);
         builder.write(targetLocation.prefix);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart b/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart
new file mode 100644
index 0000000..62ff87c
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart
@@ -0,0 +1,91 @@
+// 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/fix/data_driven/transform.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/transform_set.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:meta/meta.dart';
+
+class DataDriven extends MultiCorrectionProducer {
+  /// The transform sets used by the current test.
+  @visibleForTesting
+  static List<TransformSet> transformSetsForTests;
+
+  @override
+  Iterable<CorrectionProducer> get producers sync* {
+    var name = _name;
+    var importedUris = <String>[];
+    var library = resolvedResult.libraryElement;
+    for (var importElement in library.imports) {
+      // TODO(brianwilkerson) Filter based on combinators to help avoid making
+      //  invalid suggestions.
+      importedUris.add(importElement.uri);
+    }
+    for (var set in _availableTransformSets) {
+      for (var transform in set.transformsFor(name, importedUris)) {
+        yield DataDrivenFix(transform);
+      }
+    }
+  }
+
+  List<TransformSet> get _availableTransformSets {
+    if (transformSetsForTests != null) {
+      return transformSetsForTests;
+    }
+    // TODO(brianwilkerson) This data needs to be cached somewhere and updated
+    //  when the `package_config.json` file for an analysis context is modified.
+    return <TransformSet>[];
+  }
+
+  /// Return the name that was changed.
+  String get _name {
+    var node = this.node;
+    if (node is SimpleIdentifier) {
+      return node.name;
+    } else if (node is ConstructorName) {
+      return node.name.name;
+    }
+    return null;
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static DataDriven newInstance() => DataDriven();
+}
+
+/// A correction processor that can make one of the possible change computed by
+/// the [DataDriven] producer.
+class DataDrivenFix extends CorrectionProducer {
+  /// The transform being applied to implement this fix.
+  final Transform _transform;
+
+  DataDrivenFix(this._transform);
+
+  @override
+  List<Object> get fixArguments => [_transform.title];
+
+  @override
+  FixKind get fixKind => DartFixKind.DATA_DRIVEN;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    var changes = _transform.changes;
+    var data = <Object>[];
+    for (var change in changes) {
+      var result = change.validate(this);
+      if (result == null) {
+        return;
+      }
+      data.add(result);
+    }
+    await builder.addDartFileEdit(file, (builder) {
+      for (var i = 0; i < changes.length; i++) {
+        changes[i].apply(builder, this, data[i]);
+      }
+    });
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/encapsulate_field.dart b/pkg/analysis_server/lib/src/services/correction/dart/encapsulate_field.dart
index 3c7106d..6f1065a 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/encapsulate_field.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/encapsulate_field.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class EncapsulateField extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.ENCAPSULATE_FIELD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // find FieldDeclaration
     var fieldDeclaration = node.thisOrAncestorOfType<FieldDeclaration>();
     if (fieldDeclaration == null) {
@@ -51,7 +51,7 @@
     if (nameNode != node) {
       return;
     }
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       // rename field
       builder.addSimpleReplacement(range.node(nameNode), '_$name');
       // update references in constructors
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/exchange_operands.dart b/pkg/analysis_server/lib/src/services/correction/dart/exchange_operands.dart
index 7c6a269..54bbe13 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/exchange_operands.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/exchange_operands.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ExchangeOperands extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.EXCHANGE_OPERANDS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // check that user invokes quick assist on binary expression
     if (node is! BinaryExpression) {
       return;
@@ -54,7 +54,7 @@
       newOperator = '<=';
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(leftRange, getRangeText(rightRange));
       builder.addSimpleReplacement(rightRange, getRangeText(leftRange));
       // Optionally replace the operator.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/extend_class_for_mixin.dart b/pkg/analysis_server/lib/src/services/correction/dart/extend_class_for_mixin.dart
index 78a4869..a2233818 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/extend_class_for_mixin.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/extend_class_for_mixin.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class ExtendClassForMixin extends CorrectionProducer {
@@ -18,7 +18,7 @@
   FixKind get fixKind => DartFixKind.EXTEND_CLASS_FOR_MIXIN;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var declaration = node.thisOrAncestorOfType<ClassDeclaration>();
     if (declaration != null && declaration.extendsClause == null) {
       // TODO(brianwilkerson) Find a way to pass in the name of the class
@@ -27,7 +27,7 @@
       var endIndex = message.lastIndexOf("'");
       var startIndex = message.lastIndexOf("'", endIndex - 1) + 1;
       _typeName = message.substring(startIndex, endIndex);
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleInsertion(
             declaration.typeParameters?.end ?? declaration.name.end,
             ' extends $_typeName');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_children.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_children.dart
index 08e28d1..2025838 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_children.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_children.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class FlutterConvertToChildren extends CorrectionProducer {
@@ -14,7 +14,7 @@
   AssistKind get assistKind => DartAssistKind.FLUTTER_CONVERT_TO_CHILDREN;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // Find "child: widget" under selection.
     NamedExpression namedExp;
     {
@@ -33,7 +33,7 @@
       }
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       _convertFlutterChildToChildren(namedExp, eol, utils.getNodeText,
           utils.getLinePrefix, utils.getIndent, utils.getText, builder);
     });
@@ -46,7 +46,7 @@
       Function getLinePrefix,
       Function getIndent,
       Function getText,
-      DartFileEditBuilder builder) {
+      FileEditBuilder builder) {
     var childArg = namedExp.expression;
     var childLoc = namedExp.offset + 'child'.length;
     builder.addSimpleInsertion(childLoc, 'ren');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_stateful_widget.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_stateful_widget.dart
index b535b69..21325d1 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_stateful_widget.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_stateful_widget.dart
@@ -11,7 +11,7 @@
 import 'package:analyzer/source/source_range.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
 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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class FlutterConvertToStatefulWidget extends CorrectionProducer {
@@ -20,7 +20,7 @@
       DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var widgetClass = node.thisOrAncestorOfType<ClassDeclaration>();
     var superclass = widgetClass?.extendsClause?.superclass;
     if (widgetClass == null || superclass == null) {
@@ -116,7 +116,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addReplacement(range.node(superclass), (builder) {
         builder.writeReference(statefulWidgetClass);
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_move_down.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_move_down.dart
index dd16b00..1e2fa0f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_move_down.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_move_down.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class FlutterMoveDown extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.FLUTTER_MOVE_DOWN;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var widget = flutter.identifyWidgetExpression(node);
     if (widget == null) {
       return;
@@ -26,7 +26,7 @@
       List<CollectionElement> parentElements = parentList.elements;
       var index = parentElements.indexOf(widget);
       if (index != parentElements.length - 1) {
-        await builder.addFileEdit(file, (fileBuilder) {
+        await builder.addDartFileEdit(file, (fileBuilder) {
           var nextWidget = parentElements[index + 1];
           var nextRange = range.node(nextWidget);
           var nextText = utils.getRangeText(nextRange);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_move_up.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_move_up.dart
index eabb367..8513af7 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_move_up.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_move_up.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class FlutterMoveUp extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.FLUTTER_MOVE_UP;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var widget = flutter.identifyWidgetExpression(node);
     if (widget == null) {
       return;
@@ -26,7 +26,7 @@
       List<CollectionElement> parentElements = parentList.elements;
       var index = parentElements.indexOf(widget);
       if (index > 0) {
-        await builder.addFileEdit(file, (fileBuilder) {
+        await builder.addDartFileEdit(file, (fileBuilder) {
           var previousWidget = parentElements[index - 1];
           var previousRange = range.node(previousWidget);
           var previousText = utils.getRangeText(previousRange);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_remove_widget.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_remove_widget.dart
index 4e9ea67..c260fac 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_remove_widget.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_remove_widget.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class FlutterRemoveWidget extends CorrectionProducer {
@@ -14,7 +14,7 @@
   AssistKind get assistKind => DartAssistKind.FLUTTER_REMOVE_WIDGET;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var widgetCreation = flutter.identifyNewExpression(node);
     if (widgetCreation == null) {
       return;
@@ -38,12 +38,12 @@
   }
 
   Future<void> _removeChild(
-      DartChangeBuilder builder,
+      ChangeBuilder builder,
       InstanceCreationExpression widgetCreation,
       NamedExpression childArgument) async {
     // child: ThisWidget(child: ourChild)
     // children: [foo, ThisWidget(child: ourChild), bar]
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       var childExpression = childArgument.expression;
       var childText = utils.getNodeText(childExpression);
       var indentOld = utils.getLinePrefix(childExpression.offset);
@@ -54,7 +54,7 @@
   }
 
   Future<void> _removeChildren(
-      DartChangeBuilder builder,
+      ChangeBuilder builder,
       InstanceCreationExpression widgetCreation,
       List<CollectionElement> childrenExpressions) async {
     // We can inline the list of our children only into another list.
@@ -63,7 +63,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       var firstChild = childrenExpressions.first;
       var lastChild = childrenExpressions.last;
       var childText = utils.getRangeText(range.startEnd(firstChild, lastChild));
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_swap_with_child.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_swap_with_child.dart
index af9c47b..c5442e8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_swap_with_child.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_swap_with_child.dart
@@ -6,12 +6,12 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 abstract class FlutterParentAndChild extends CorrectionProducer {
   Future<void> swapParentAndChild(
-      DartChangeBuilder builder,
+      ChangeBuilder builder,
       InstanceCreationExpression parent,
       InstanceCreationExpression child) async {
     // The child must have its own child.
@@ -19,7 +19,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addReplacement(range.node(parent), (builder) {
         var childArgs = child.argumentList;
         var parentArgs = parent.argumentList;
@@ -96,7 +96,7 @@
   AssistKind get assistKind => DartAssistKind.FLUTTER_SWAP_WITH_CHILD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var parent = flutter.identifyNewExpression(node);
     if (!flutter.isWidgetCreation(parent)) {
       return;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_swap_with_parent.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_swap_with_parent.dart
index e385a15..cfb62b0 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_swap_with_parent.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_swap_with_parent.dart
@@ -6,14 +6,14 @@
 import 'package:analysis_server/src/services/correction/dart/flutter_swap_with_child.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 
 class FlutterSwapWithParent extends FlutterParentAndChild {
   @override
   AssistKind get assistKind => DartAssistKind.FLUTTER_SWAP_WITH_PARENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var child = flutter.identifyNewExpression(node);
     if (!flutter.isWidgetCreation(child)) {
       return;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap.dart
index f03127c..c8c935b 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap.dart
@@ -8,8 +8,9 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/source/source_range.dart';
+import 'package:analyzer/src/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class FlutterWrap extends MultiCorrectionProducer {
@@ -28,6 +29,9 @@
       if (!flutter.isExactWidgetTypePadding(widgetType)) {
         yield _FlutterWrapPadding(widgetExpr);
       }
+      if (!flutter.isExactWidgetTypeSizedBox(widgetType)) {
+        yield _FlutterWrapSizedBox(widgetExpr);
+      }
     }
     yield* _wrapMultipleWidgets();
   }
@@ -138,7 +142,11 @@
   AssistKind get assistKind => DartAssistKind.FLUTTER_WRAP_PADDING;
 
   @override
-  List<String> get _leadingLines => ['padding: const EdgeInsets.all(8.0),'];
+  List<String> get _leadingLines {
+    var keyword =
+        (widgetExpr as ExpressionImpl).inConstantContext ? '' : ' const';
+    return ['padding:$keyword EdgeInsets.all(8.0),'];
+  }
 
   @override
   String get _parentClassName => 'Padding';
@@ -162,6 +170,21 @@
 
 /// A correction processor that can make one of the possible change computed by
 /// the [FlutterWrap] producer.
+class _FlutterWrapSizedBox extends _WrapSingleWidget {
+  _FlutterWrapSizedBox(Expression widgetExpr) : super(widgetExpr);
+
+  @override
+  AssistKind get assistKind => DartAssistKind.FLUTTER_WRAP_SIZED_BOX;
+
+  @override
+  String get _parentClassName => 'SizedBox';
+
+  @override
+  String get _parentLibraryUri => flutter.widgetsUri;
+}
+
+/// A correction processor that can make one of the possible change computed by
+/// the [FlutterWrap] producer.
 abstract class _WrapMultipleWidgets extends CorrectionProducer {
   final Expression firstWidget;
 
@@ -174,7 +197,7 @@
   String get _parentLibraryUri => flutter.widgetsUri;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var selectedRange = range.startEnd(firstWidget, lastWidget);
     var src = utils.getRangeText(selectedRange);
     var parentClassElement =
@@ -185,8 +208,8 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(selectedRange, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(selectedRange, (builder) {
         builder.writeReference(parentClassElement);
         builder.write('(');
 
@@ -231,7 +254,7 @@
   String get _parentLibraryUri => null;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var widgetSrc = utils.getNodeText(widgetExpr);
 
     // If the wrapper class is specified, find its element.
@@ -246,8 +269,8 @@
       }
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(widgetExpr), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(widgetExpr), (builder) {
         if (parentClassElement == null) {
           builder.addSimpleLinkedEdit('WIDGET', 'widget');
         } else {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap_generic.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap_generic.dart
index 3eaec41..6b0ac1a 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap_generic.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap_generic.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class FlutterWrapGeneric extends CorrectionProducer {
@@ -14,7 +14,7 @@
   AssistKind get assistKind => DartAssistKind.FLUTTER_WRAP_GENERIC;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! ListLiteral) {
       return;
     }
@@ -32,8 +32,8 @@
     var indentArg = '$indentOld${utils.getIndent(1)}';
     var indentList = '$indentOld${utils.getIndent(2)}';
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(range.node(node), (DartEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(range.node(node), (builder) {
         builder.write('[');
         builder.write(eol);
         builder.write(indentArg);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap_stream_builder.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap_stream_builder.dart
index aad39af..4e5535a 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap_stream_builder.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap_stream_builder.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/assist.dart';
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class FlutterWrapStreamBuilder extends CorrectionProducer {
@@ -13,7 +13,7 @@
   AssistKind get assistKind => DartAssistKind.FLUTTER_WRAP_STREAM_BUILDER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var widgetExpr = flutter.identifyWidgetExpression(node);
     if (widgetExpr == null) {
       return;
@@ -31,7 +31,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addReplacement(range.node(widgetExpr), (builder) {
         builder.writeReference(streamBuilderElement);
 
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/import_add_show.dart b/pkg/analysis_server/lib/src/services/correction/dart/import_add_show.dart
index c820844..b667ed8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/import_add_show.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/import_add_show.dart
@@ -11,14 +11,14 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.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_builder_core.dart';
 
 class ImportAddShow extends CorrectionProducer {
   @override
   AssistKind get assistKind => DartAssistKind.IMPORT_ADD_SHOW;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // prepare ImportDirective
     var importDirective = node.thisOrAncestorOfType<ImportDirective>();
     if (importDirective == null) {
@@ -42,7 +42,7 @@
     if (referencedNames.isEmpty) {
       return;
     }
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       var showCombinator = ' show ${referencedNames.join(', ')}';
       builder.addSimpleInsertion(importDirective.end - 1, showCombinator);
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/import_library.dart b/pkg/analysis_server/lib/src/services/correction/dart/import_library.dart
index 3f8754c..da36857 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/import_library.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/import_library.dart
@@ -12,7 +12,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/source/source_range.dart';
 import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -274,8 +274,8 @@
   FixKind get fixKind => _fixKind;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
       _uriText = builder.importLibrary(_library);
     });
   }
@@ -307,12 +307,12 @@
   FixKind get fixKind => DartFixKind.IMPORT_LIBRARY_PREFIX;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var libraryElement = _importElement.importedLibrary;
     var prefix = _importElement.prefix;
     _libraryName = libraryElement.displayName;
     _prefixName = prefix.displayName;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.startLength(node, 0), '$_prefixName.');
     });
   }
@@ -336,12 +336,12 @@
   FixKind get fixKind => DartFixKind.IMPORT_LIBRARY_SHOW;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var newShowCode = 'show ${_showNames.join(', ')}';
     var offset = _showCombinator.offset;
     var length = _showCombinator.end - offset;
     var libraryFile = resolvedResult.libraryElement.source.fullName;
-    await builder.addFileEdit(libraryFile, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(libraryFile, (builder) {
       builder.addSimpleReplacement(SourceRange(offset, length), newShowCode);
     });
   }
@@ -363,8 +363,8 @@
   FixKind get fixKind => _fixKind;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
       if (builder is DartFileEditBuilderImpl) {
         builder.importLibraryWithRelativeUri(_relativeURI);
       }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/inline_invocation.dart b/pkg/analysis_server/lib/src/services/correction/dart/inline_invocation.dart
index 1788e09..7e57e93 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/inline_invocation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/inline_invocation.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -25,7 +25,7 @@
   FixKind get fixKind => DartFixKind.INLINE_INVOCATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is! SimpleIdentifier || node.parent is! MethodInvocation) {
       return;
@@ -49,7 +49,7 @@
     var argument = invocation.argumentList.arguments[0];
     var elementText = utils.getNodeText(argument);
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       if (list.elements.isNotEmpty) {
         // ['a']..add(e);
         builder.addSimpleInsertion(list.elements.last.end, ', $elementText');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/inline_typedef.dart b/pkg/analysis_server/lib/src/services/correction/dart/inline_typedef.dart
index 5d83225..b310414 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/inline_typedef.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/inline_typedef.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.INLINE_TYPEDEF;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Extract the information needed to build the edit.
     //
@@ -55,10 +55,9 @@
     //
     // Build the edit.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(utils.getLinesRange(range.node(parent)));
-      builder.addReplacement(range.node(finder.reference),
-          (DartEditBuilder builder) {
+      builder.addReplacement(range.node(finder.reference), (builder) {
         if (returnType != null) {
           builder.write(utils.getNodeText(returnType));
           builder.write(' ');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/insert_semicolon.dart b/pkg/analysis_server/lib/src/services/correction/dart/insert_semicolon.dart
index caa2555..04ba0b4 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/insert_semicolon.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/insert_semicolon.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class InsertSemicolon extends CorrectionProducer {
@@ -13,14 +13,14 @@
   FixKind get fixKind => DartFixKind.INSERT_SEMICOLON;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var message = diagnostic.problemMessage;
     if (message.message.contains("';'")) {
       if (_isAwaitNode()) {
         return;
       }
       var insertOffset = message.offset + message.length;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleInsertion(insertOffset, ';');
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/introduce_local_cast_type.dart b/pkg/analysis_server/lib/src/services/correction/dart/introduce_local_cast_type.dart
index 30bf94a..af8eb02 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/introduce_local_cast_type.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/introduce_local_cast_type.dart
@@ -9,14 +9,14 @@
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.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_builder_core.dart';
 
 class IntroduceLocalCastType extends CorrectionProducer {
   @override
   AssistKind get assistKind => DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is IfStatement) {
       node = (node as IfStatement).condition;
@@ -65,8 +65,8 @@
         getVariableNameSuggestionsForExpression(castType, null, excluded);
 
     if (suggestions.isNotEmpty) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addInsertion(offset, (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addInsertion(offset, (builder) {
           builder.write(eol + prefix + statementPrefix);
           builder.write(castTypeCode);
           builder.write(' ');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/invert_if_statement.dart b/pkg/analysis_server/lib/src/services/correction/dart/invert_if_statement.dart
index b632c3d..38e35f2 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/invert_if_statement.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/invert_if_statement.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class InvertIfStatement extends CorrectionProducer {
@@ -14,7 +14,7 @@
   AssistKind get assistKind => DartAssistKind.INVERT_IF_STATEMENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! IfStatement) {
       return;
     }
@@ -31,7 +31,7 @@
     var thenSource = utils.getNodeText(thenStatement);
     var elseSource = utils.getNodeText(elseStatement);
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.node(condition), invertedCondition);
       builder.addSimpleReplacement(range.node(thenStatement), elseSource);
       builder.addSimpleReplacement(range.node(elseStatement), thenSource);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/join_if_with_inner.dart b/pkg/analysis_server/lib/src/services/correction/dart/join_if_with_inner.dart
index 82f33e7..0c55e56 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/join_if_with_inner.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/join_if_with_inner.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/util.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class JoinIfWithInner extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.JOIN_IF_WITH_INNER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // climb up condition to the (supposedly) "if" statement
     var node = this.node;
     while (node is Expression) {
@@ -60,7 +60,7 @@
     var oldSource = utils.getRangeText(lineRanges);
     var newSource = utils.indentSourceLeftRight(oldSource);
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.node(targetIfStatement),
           'if ($condition) {$eol$newSource$prefix}');
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/join_if_with_outer.dart b/pkg/analysis_server/lib/src/services/correction/dart/join_if_with_outer.dart
index 5f61bae..1e5ca88 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/join_if_with_outer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/join_if_with_outer.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/util.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class JoinIfWithOuter extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.JOIN_IF_WITH_OUTER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // climb up condition to the (supposedly) "if" statement
     var node = this.node;
     while (node is Expression) {
@@ -65,7 +65,7 @@
     var oldSource = utils.getRangeText(lineRanges);
     var newSource = utils.indentSourceLeftRight(oldSource);
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.node(outerIfStatement),
           'if ($condition) {$eol$newSource$prefix}');
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/join_variable_declaration.dart b/pkg/analysis_server/lib/src/services/correction/dart/join_variable_declaration.dart
index bba3f14..dfa9305 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/join_variable_declaration.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/join_variable_declaration.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class JoinVariableDeclaration extends CorrectionProducer {
@@ -16,7 +16,7 @@
   AssistKind get assistKind => DartAssistKind.JOIN_VARIABLE_DECLARATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is SimpleIdentifier) {
       var parent = node.parent;
       if (parent is AssignmentExpression &&
@@ -35,7 +35,7 @@
   /// Join the declaration when the variable is on the left-hand side of an
   /// assignment.
   Future<void> _joinOnAssignment(
-      DartChangeBuilder builder, AssignmentExpression assignExpression) async {
+      ChangeBuilder builder, AssignmentExpression assignExpression) async {
     // Check that assignment is not a compound assignment.
     if (assignExpression.operator.type != TokenType.EQ) {
       return;
@@ -83,7 +83,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
           range.endStart(declNode, assignExpression.operator), ' ');
     });
@@ -92,7 +92,7 @@
   /// Join the declaration when the variable is on the left-hand side of an
   /// assignment.
   Future<void> _joinOnDeclaration(
-      DartChangeBuilder builder, VariableDeclarationList declList) async {
+      ChangeBuilder builder, VariableDeclarationList declList) async {
     // prepare enclosing VariableDeclarationList
     var decl = declList.variables[0];
     // already initialized
@@ -134,7 +134,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
           range.endStart(decl.name, assignExpression.operator), ' ');
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_class_abstract.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_class_abstract.dart
index d94a50a..c585b2e 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/make_class_abstract.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_class_abstract.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class MakeClassAbstract extends CorrectionProducer {
@@ -18,13 +18,13 @@
   FixKind get fixKind => DartFixKind.MAKE_CLASS_ABSTRACT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var enclosingClass = node.thisOrAncestorOfType<ClassDeclaration>();
     if (enclosingClass == null) {
       return;
     }
     _className = enclosingClass.name.name;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleInsertion(
           enclosingClass.classKeyword.offset, 'abstract ');
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_field_not_final.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_field_not_final.dart
index 168e961..59e8499 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/make_field_not_final.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_field_not_final.dart
@@ -7,7 +7,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_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -21,7 +21,7 @@
   FixKind get fixKind => DartFixKind.MAKE_FIELD_NOT_FINAL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is SimpleIdentifier &&
         node.staticElement is PropertyAccessorElement) {
@@ -41,14 +41,13 @@
           var keywordToken = declarationList.keyword;
           if (declarationList.variables.length == 1 &&
               keywordToken.keyword == Keyword.FINAL) {
-            await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+            await builder.addDartFileEdit(file, (builder) {
               if (declarationList.type != null) {
-                builder.addReplacement(
-                    range.startStart(keywordToken, declarationList.type),
-                    (DartEditBuilder builder) {});
+                builder.addDeletion(
+                    range.startStart(keywordToken, declarationList.type));
               } else {
                 builder.addReplacement(range.startStart(keywordToken, variable),
-                    (DartEditBuilder builder) {
+                    (builder) {
                   builder.write('var ');
                 });
               }
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 33d3b0f..6db5457 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
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,13 +15,13 @@
   FixKind get fixKind => DartFixKind.MAKE_FINAL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     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) {
+      await builder.addDartFileEdit(file, (builder) {
         if (declaration.keyword?.keyword == Keyword.VAR) {
           builder.addSimpleReplacement(
               range.token(declaration.keyword), 'final');
@@ -42,7 +42,7 @@
     }
     if (list != null) {
       if (list.variables.length == 1) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           if (list.keyword?.keyword == Keyword.VAR) {
             builder.addSimpleReplacement(range.token(list.keyword), 'final');
           } else if (list.lateKeyword != null) {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_return_type_nullable.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_return_type_nullable.dart
new file mode 100644
index 0000000..5fdea07
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_return_type_nullable.dart
@@ -0,0 +1,63 @@
+// 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:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+
+class MakeReturnTypeNullable extends CorrectionProducer {
+  @override
+  FixKind get fixKind => DartFixKind.MAKE_RETURN_TYPE_NULLABLE;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    if (!unit.featureSet.isEnabled(Feature.non_nullable)) {
+      return;
+    }
+    if (node is! Expression) {
+      return;
+    }
+    var body = node.thisOrAncestorOfType<FunctionBody>();
+    TypeAnnotation returnType;
+    var function = body.parent;
+    if (function is FunctionExpression) {
+      function = function.parent;
+    }
+    if (function is MethodDeclaration) {
+      returnType = function.returnType;
+    } else if (function is FunctionDeclaration) {
+      returnType = function.returnType;
+    } else {
+      return;
+    }
+    if (body.isAsynchronous || body.isGenerator) {
+      if (returnType is! NamedType) {
+        return null;
+      }
+      var typeArguments = (returnType as NamedType).typeArguments;
+      if (typeArguments == null) {
+        return null;
+      }
+      var arguments = typeArguments.arguments;
+      if (arguments.length != 1) {
+        return null;
+      }
+      returnType = arguments[0];
+    }
+    if (node is! NullLiteral &&
+        !typeSystem.isAssignableTo(returnType.type,
+            typeSystem.promoteToNonNull((node as Expression).staticType))) {
+      return;
+    }
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addSimpleInsertion(returnType.end, '?');
+    });
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static MakeReturnTypeNullable newInstance() => MakeReturnTypeNullable();
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_variable_not_final.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_variable_not_final.dart
index 7679185..276549b 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/make_variable_not_final.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_variable_not_final.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -22,7 +22,7 @@
   FixKind get fixKind => DartFixKind.MAKE_VARIABLE_NOT_FINAL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is SimpleIdentifier &&
         node.staticElement is LocalVariableElement) {
@@ -35,7 +35,7 @@
         var keywordToken = declarationList.keyword;
         if (declarationList.variables.length == 1 &&
             keywordToken.keyword == Keyword.FINAL) {
-          await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+          await builder.addDartFileEdit(file, (builder) {
             if (declarationList.type != null) {
               builder.addDeletion(
                   range.startStart(keywordToken, declarationList.type));
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/move_type_arguments_to_class.dart b/pkg/analysis_server/lib/src/services/correction/dart/move_type_arguments_to_class.dart
index 05a35e3..8381a75 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/move_type_arguments_to_class.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/move_type_arguments_to_class.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,7 +15,7 @@
   FixKind get fixKind => DartFixKind.MOVE_TYPE_ARGUMENTS_TO_CLASS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (coveredNode is TypeArgumentList) {
       TypeArgumentList typeArguments = coveredNode;
       if (typeArguments.parent is! InstanceCreationExpression) {
@@ -30,7 +30,7 @@
       if (element is ClassElement &&
           element.typeParameters != null &&
           element.typeParameters.length == typeArguments.arguments.length) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           var argumentText = utils.getNodeText(typeArguments);
           builder.addSimpleInsertion(typeName.end, argumentText);
           builder.addDeletion(range.node(typeArguments));
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
index bb09e08..4c17e69 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/organize_imports.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/organize_imports.dart
@@ -6,7 +6,7 @@
 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/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class OrganizeImports extends CorrectionProducer {
@@ -14,13 +14,13 @@
   FixKind get fixKind => DartFixKind.ORGANIZE_IMPORTS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder 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) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleReplacement(
             SourceRange(edit.offset, edit.length), edit.replacement);
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/qualify_reference.dart b/pkg/analysis_server/lib/src/services/correction/dart/qualify_reference.dart
index 5cb54ce..fd81e75 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/qualify_reference.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/qualify_reference.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class QualifyReference extends CorrectionProducer {
@@ -18,7 +18,7 @@
   FixKind get fixKind => DartFixKind.QUALIFY_REFERENCE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier) {
       return;
     }
@@ -42,7 +42,7 @@
       return;
     }
     var containerName = enclosingElement.name;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleInsertion(node.offset, '$containerName.');
     });
     _qualifiedName = '$containerName.${memberName.name}';
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_annotation.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_annotation.dart
index c6e79ef..d40a8a5 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_annotation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_annotation.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,14 +20,14 @@
   FixKind get fixKind => DartFixKind.REMOVE_ANNOTATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     void addFix(Annotation node) async {
       if (node == null) {
         return;
       }
       var followingToken = node.endToken.next;
       followingToken = followingToken.precedingComments ?? followingToken;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.startStart(node, followingToken));
       });
       _annotationName = node.name.name;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_argument.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_argument.dart
index 4ae3553..807a069 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_argument.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_argument.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,14 +14,14 @@
   FixKind get fixKind => DartFixKind.REMOVE_ARGUMENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var arg = node;
     if (arg.parent is NamedExpression) {
       arg = arg.parent;
     }
     var argumentList = arg.parent.thisOrAncestorOfType<ArgumentList>();
     if (argumentList != null) {
-      await builder.addFileEdit(file, (builder) {
+      await builder.addDartFileEdit(file, (builder) {
         final sourceRange = range.nodeInList(argumentList.arguments, arg);
         builder.addDeletion(sourceRange);
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_await.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_await.dart
index ddde92d..1ba9eed 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_await.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_await.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,11 +14,11 @@
   FixKind get fixKind => DartFixKind.REMOVE_AWAIT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     final awaitExpression = node;
     if (awaitExpression is AwaitExpression) {
       final awaitToken = awaitExpression.awaitKeyword;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.startStart(awaitToken, awaitToken.next));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_const.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_const.dart
index 9a4baf9..b51dcef 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_const.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_const.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -19,17 +19,17 @@
   static RemoveConst newInstance() => RemoveConst();
 }
 
-class RemoveUnnecesaryConst extends _RemoveConst {
+class RemoveUnnecessaryConst extends _RemoveConst {
   @override
   FixKind get fixKind => DartFixKind.REMOVE_UNNECESSARY_CONST;
 
   /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  static RemoveUnnecesaryConst newInstance() => RemoveUnnecesaryConst();
+  static RemoveUnnecessaryConst newInstance() => RemoveUnnecessaryConst();
 }
 
 abstract class _RemoveConst extends CorrectionProducer {
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     final expression = node;
 
     Token constToken;
@@ -44,7 +44,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(range.startStart(constToken, constToken.next));
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_dead_code.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_dead_code.dart
index 94cc3a2..bf9b3f1 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_dead_code.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_dead_code.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/source/source_range.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,13 +15,13 @@
   FixKind get fixKind => DartFixKind.REMOVE_DEAD_CODE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var coveringNode = coveredNode;
     if (coveringNode is Expression) {
       var parent = coveredNode.parent;
       if (parent is BinaryExpression) {
         if (parent.rightOperand == coveredNode) {
-          await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+          await builder.addDartFileEdit(file, (builder) {
             builder.addDeletion(range.endEnd(parent.leftOperand, coveredNode));
           });
         }
@@ -39,14 +39,14 @@
       }
       if (statementsToRemove.isNotEmpty) {
         var rangeToRemove = utils.getLinesRangeStatements(statementsToRemove);
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addDeletion(rangeToRemove);
         });
       }
     } else if (coveringNode is Statement) {
       var rangeToRemove =
           utils.getLinesRangeStatements(<Statement>[coveringNode]);
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(rangeToRemove);
       });
     } else if (coveringNode is CatchClause) {
@@ -54,7 +54,7 @@
       var catchClauses = tryStatement.catchClauses;
       var index = catchClauses.indexOf(coveringNode);
       var previous = index == 0 ? tryStatement.body : catchClauses[index - 1];
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.endEnd(previous, coveringNode));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_dead_if_null.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_dead_if_null.dart
index 830007a..bf576ec 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_dead_if_null.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_dead_if_null.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,7 +15,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_IF_NULL_OPERATOR;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Find the dead if-null expression.
     //
@@ -46,7 +46,7 @@
     //
     // Build the edit.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(sourceRange);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_duplicate_case.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_duplicate_case.dart
index ee6d03e..3ef7bda 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_duplicate_case.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_duplicate_case.dart
@@ -5,7 +5,8 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer/source/source_range.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,10 +15,20 @@
   FixKind get fixKind => DartFixKind.REMOVE_DUPLICATE_CASE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    if (coveredNode is SwitchCase) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addDeletion(utils.getLinesRange(range.node(coveredNode)));
+  Future<void> compute(ChangeBuilder builder) async {
+    var node = coveredNode;
+    if (node is SwitchCase) {
+      var parent = node.parent as SwitchStatement;
+      var members = parent.members;
+      var index = members.indexOf(node);
+      await builder.addDartFileEdit(file, (builder) {
+        SourceRange deletionRange;
+        if (index > 0 && members[index - 1].statements.isNotEmpty) {
+          deletionRange = range.node(node);
+        } else {
+          deletionRange = range.startEnd(node, node.colon);
+        }
+        builder.addDeletion(utils.getLinesRange(deletionRange));
       });
     }
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_catch.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_catch.dart
index ae79f6c..5118cc8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_catch.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_catch.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_EMPTY_CATCH;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node.parent is! CatchClause) {
       return;
     }
@@ -29,7 +29,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(utils.getLinesRange(range.node(catchClause)));
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_constructor_body.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_constructor_body.dart
index 67fa65a..b07fa5c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_constructor_body.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_constructor_body.dart
@@ -4,7 +4,8 @@
 
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -13,10 +14,14 @@
   FixKind get fixKind => DartFixKind.REMOVE_EMPTY_CONSTRUCTOR_BODY;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addSimpleReplacement(
-          utils.getLinesRange(range.node(node.parent)), ';');
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
+      if (node is Block && node.parent is BlockFunctionBody) {
+        builder.addSimpleReplacement(
+          utils.getLinesRange(range.node(node.parent)),
+          ';',
+        );
+      }
     });
   }
 
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_else.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_else.dart
index d915e1f..d3acc75 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_else.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_else.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,10 +14,10 @@
   FixKind get fixKind => DartFixKind.REMOVE_EMPTY_ELSE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var parent = node.parent;
     if (parent is IfStatement) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(utils.getLinesRange(
             range.startEnd(parent.elseKeyword, parent.elseStatement)));
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_statement.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_statement.dart
index 0a1f98e..321f447 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_statement.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_empty_statement.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,9 +14,9 @@
   FixKind get fixKind => DartFixKind.REMOVE_EMPTY_STATEMENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is EmptyStatement && node.parent is Block) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(utils.getLinesRange(range.node(node)));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_if_null_operator.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_if_null_operator.dart
index 4491682..ebf5ded 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_if_null_operator.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_if_null_operator.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/source/source_range.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,7 +15,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_IF_NULL_OPERATOR;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var expression = node.thisOrAncestorOfType<BinaryExpression>();
     if (expression == null) {
       return;
@@ -30,7 +30,7 @@
     } else {
       return;
     }
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(sourceRange);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_initializer.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_initializer.dart
index 809a5fe..142a418 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_initializer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_initializer.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,11 +14,11 @@
   FixKind get fixKind => DartFixKind.REMOVE_INITIALIZER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var parameter = node.thisOrAncestorOfType<DefaultFormalParameter>();
     if (parameter != null) {
       // Handle formal parameters with default values.
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(
             range.endEnd(parameter.identifier, parameter.defaultValue));
       });
@@ -26,7 +26,7 @@
       // Handle variable declarations with default values.
       var variable = node.thisOrAncestorOfType<VariableDeclaration>();
       if (variable != null) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder
               .addDeletion(range.endEnd(variable.name, variable.initializer));
         });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_interpolation_braces.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_interpolation_braces.dart
index 1420230..0364c14 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_interpolation_braces.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_interpolation_braces.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,12 +14,12 @@
   FixKind get fixKind => DartFixKind.REMOVE_INTERPOLATION_BRACES;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is InterpolationExpression) {
       var right = node.rightBracket;
       if (node.expression != null && right != null) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addSimpleReplacement(
               range.startStart(node, node.expression), r'$');
           builder.addDeletion(range.token(right));
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_method_declaration.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_method_declaration.dart
index 675d2ca..c4e3c2d 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_method_declaration.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_method_declaration.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,10 +14,10 @@
   FixKind get fixKind => DartFixKind.REMOVE_METHOD_DECLARATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var declaration = node.thisOrAncestorOfType<MethodDeclaration>();
     if (declaration != null) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(utils.getLinesRange(range.node(declaration)));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_name_from_combinator.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_name_from_combinator.dart
index 0b44db3..e0cde53 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_name_from_combinator.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_name_from_combinator.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/source/source_range.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,7 +20,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_NAME_FROM_COMBINATOR;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     SourceRange rangeForCombinator(Combinator combinator) {
       var parent = combinator.parent;
       if (parent is NamespaceDirective) {
@@ -74,7 +74,7 @@
         if (rangeToRemove == null) {
           return;
         }
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addDeletion(rangeToRemove);
         });
         _combinatorKind = parent is HideCombinator ? 'hide' : 'show';
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_operator.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_operator.dart
index 256b063..5d0053a 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_operator.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_operator.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,12 +14,12 @@
   FixKind get fixKind => DartFixKind.REMOVE_OPERATOR;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is BinaryExpression) {
       var expression = node as BinaryExpression;
       var operator = expression.operator;
       var rightOperand = expression.rightOperand;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.startStart(operator, rightOperand));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_parameters_in_getter_declaration.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_parameters_in_getter_declaration.dart
index 8112a2e..281e9a6 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_parameters_in_getter_declaration.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_parameters_in_getter_declaration.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,20 +14,20 @@
   FixKind get fixKind => DartFixKind.REMOVE_PARAMETERS_IN_GETTER_DECLARATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is MethodDeclaration) {
       // Support for the analyzer error.
       var method = node as MethodDeclaration;
       var name = method.name;
       var body = method.body;
       if (name != null && body != null) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addSimpleReplacement(range.endStart(name, body), ' ');
         });
       }
     } else if (node is FormalParameterList) {
       // Support for the fasta error.
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.node(node));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_parentheses_in_getter_invocation.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_parentheses_in_getter_invocation.dart
index 20ec8de..97e5d0f8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_parentheses_in_getter_invocation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_parentheses_in_getter_invocation.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,10 +14,10 @@
   FixKind get fixKind => DartFixKind.REMOVE_PARENTHESIS_IN_GETTER_INVOCATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var invocation = coveredNode?.parent;
     if (invocation is FunctionExpressionInvocation) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.node(invocation.argumentList));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_question_mark.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_question_mark.dart
index 860f571..18acf3d 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_question_mark.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_question_mark.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_QUESTION_MARK;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! TypeName) {
       return;
     }
@@ -23,7 +23,7 @@
     if (questionMark == null) {
       return;
     }
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(range.token(questionMark));
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_this_expression.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_this_expression.dart
index 3b82f5c..4ce4ad0 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_this_expression.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_this_expression.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,23 +14,23 @@
   FixKind get fixKind => DartFixKind.REMOVE_THIS_EXPRESSION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is ConstructorFieldInitializer) {
       var thisKeyword = node.thisKeyword;
       if (thisKeyword != null) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           var fieldName = node.fieldName;
           builder.addDeletion(range.startStart(thisKeyword, fieldName));
         });
       }
       return;
     } else if (node is PropertyAccess && node.target is ThisExpression) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.startEnd(node, node.operator));
       });
     } else if (node is MethodInvocation && node.target is ThisExpression) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.startEnd(node, node.operator));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_type_annotation.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_type_annotation.dart
index aa4f045..cd84ee6 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_type_annotation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_type_annotation.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_TYPE_ANNOTATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     for (var node = this.node; node != null; node = node.parent) {
       if (node is DeclaredIdentifier) {
         return _removeFromDeclaredIdentifier(builder, node);
@@ -36,8 +36,8 @@
     }
   }
 
-  Future<void> _removeFromDeclarationList(DartChangeBuilder builder,
-      VariableDeclarationList declarationList) async {
+  Future<void> _removeFromDeclarationList(
+      ChangeBuilder builder, VariableDeclarationList declarationList) async {
     // we need a type
     var typeNode = declarationList.type;
     if (typeNode == null) {
@@ -59,7 +59,7 @@
       return;
     }
     var keyword = declarationList.keyword;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       var typeRange = range.startStart(typeNode, firstVariable);
       if (keyword != null && keyword.lexeme != 'var') {
         builder.addSimpleReplacement(typeRange, '');
@@ -70,14 +70,14 @@
   }
 
   Future<void> _removeFromDeclaredIdentifier(
-      DartChangeBuilder builder, DeclaredIdentifier declaration) async {
+      ChangeBuilder builder, DeclaredIdentifier declaration) async {
     var typeNode = declaration.type;
     if (typeNode == null) {
       return;
     }
     var keyword = declaration.keyword;
     var variableName = declaration.identifier;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       var typeRange = range.startStart(typeNode, variableName);
       if (keyword != null && keyword.lexeme != 'var') {
         builder.addSimpleReplacement(typeRange, '');
@@ -88,12 +88,12 @@
   }
 
   Future<void> _removeTypeAnnotation(
-      DartChangeBuilder builder, TypeAnnotation type) async {
+      ChangeBuilder builder, TypeAnnotation type) async {
     if (type == null) {
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(range.startStart(type, type.endToken.next));
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_type_arguments.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_type_arguments.dart
index e47e502..815154e 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_type_arguments.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_type_arguments.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,10 +14,10 @@
   FixKind get fixKind => DartFixKind.REMOVE_TYPE_ARGUMENTS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (coveredNode is TypeArgumentList) {
       TypeArgumentList typeArguments = coveredNode;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.node(typeArguments));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_cast.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_cast.dart
index c3a26c0..009e950 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_cast.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_cast.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,14 +14,14 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNNECESSARY_CAST;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (coveredNode is! AsExpression) {
       return;
     }
     var asExpression = coveredNode as AsExpression;
     var expression = asExpression.expression;
     // remove 'as T' from 'e as T'
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(range.endEnd(expression, asExpression));
       builder.removeEnclosingParentheses(asExpression);
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_new.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_new.dart
index a5aca38..a2654d3 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_new.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_new.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,11 +14,11 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNNECESSARY_NEW;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     final instanceCreationExpression = node;
     if (instanceCreationExpression is InstanceCreationExpression) {
       final newToken = instanceCreationExpression.keyword;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.startStart(newToken, newToken.next));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused.dart
index 9559f6d..d90106e 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/source/source_range.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -18,7 +18,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNUSED_ELEMENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     final sourceRanges = <SourceRange>[];
     final referencedNode = node.parent;
     if (referencedNode is ClassDeclaration ||
@@ -48,7 +48,7 @@
       }
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       for (var sourceRange in sourceRanges) {
         builder.addDeletion(sourceRange);
       }
@@ -64,7 +64,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNUSED_FIELD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     final declaration = node.parent;
     if (declaration is! VariableDeclaration) {
       return;
@@ -100,7 +100,7 @@
       sourceRanges.add(sourceRange);
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       for (var sourceRange in sourceRanges) {
         builder.addDeletion(sourceRange);
       }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_catch_clause.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_catch_clause.dart
index f783e62..078124e 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_catch_clause.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_catch_clause.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,12 +14,12 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNUSED_CATCH_CLAUSE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is SimpleIdentifier) {
       var catchClause = node.parent;
       if (catchClause is CatchClause &&
           catchClause.exceptionParameter == node) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addDeletion(
               range.startStart(catchClause.catchKeyword, catchClause.body));
         });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_catch_stack.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_catch_stack.dart
index 0f43ef3..a757788 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_catch_stack.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_catch_stack.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,13 +14,13 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNUSED_CATCH_STACK;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is SimpleIdentifier) {
       var catchClause = node.parent;
       if (catchClause is CatchClause &&
           catchClause.stackTraceParameter == node &&
           catchClause.exceptionParameter != null) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder
               .addDeletion(range.endEnd(catchClause.exceptionParameter, node));
         });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_import.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_import.dart
index 7a007a9..bb5bf5a 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_import.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_import.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,14 +14,14 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNUSED_IMPORT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // prepare ImportDirective
     var importDirective = node.thisOrAncestorOfType<ImportDirective>();
     if (importDirective == null) {
       return;
     }
     // remove the whole line with import
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(utils.getLinesRange(range.node(importDirective)));
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_label.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_label.dart
index 69675fd..86e508c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_label.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_label.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,10 +14,10 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNUSED_LABEL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is Label) {
       var nextToken = node.endToken.next;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addDeletion(range.startStart(node, nextToken));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_local_variable.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_local_variable.dart
index c6b654c..5120c45 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_local_variable.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_local_variable.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/source/source_range.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -17,7 +17,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNUSED_LOCAL_VARIABLE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     final declaration = node.parent;
     if (!(declaration is VariableDeclaration && declaration.name == node)) {
       return;
@@ -53,7 +53,7 @@
       sourceRanges.add(sourceRange);
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       for (var sourceRange in sourceRanges) {
         builder.addDeletion(sourceRange);
       }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_parameter.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_parameter.dart
index 00a254b..62037ee 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_parameter.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unused_parameter.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,7 +15,7 @@
   FixKind get fixKind => DartFixKind.REMOVE_UNUSED_PARAMETER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is FormalParameter) {
       var parameter = node as FormalParameter;
       if (parameter.parent is DefaultFormalParameter) {
@@ -25,7 +25,7 @@
       var parameterList = parameter.parent as FormalParameterList;
       var parameters = parameterList.parameters;
       var index = parameters.indexOf(parameter);
-      await builder.addFileEdit(file, (builder) {
+      await builder.addDartFileEdit(file, (builder) {
         if (index == 0) {
           // Remove the first parameter in the list.
           if (parameters.length == 1) {
@@ -40,8 +40,13 @@
               // The parameter to be removed and the following parameter are not
               // of the same kind, so there is a delimiter between them that we
               // can't delete.
-              builder.addDeletion(
-                  range.startStart(parameter, parameterList.leftDelimiter));
+              var leftDelimiter = parameterList.leftDelimiter;
+              if (leftDelimiter != null) {
+                builder.addDeletion(range.startStart(parameter, leftDelimiter));
+              } else {
+                // Invalid code `C(foo, bar = 1)`.
+                builder.addDeletion(range.startStart(parameter, following));
+              }
             } else {
               // The parameter to be removed and the following parameter are of
               // the same kind, so there is no delimiter between them.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/rename_to_camel_case.dart b/pkg/analysis_server/lib/src/services/correction/dart/rename_to_camel_case.dart
index afb6973..acb1201 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/rename_to_camel_case.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/rename_to_camel_case.dart
@@ -8,7 +8,7 @@
 import 'package:analysis_server/src/utilities/strings.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -23,7 +23,7 @@
   FixKind get fixKind => DartFixKind.RENAME_TO_CAMEL_CASE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier) {
       return;
     }
@@ -55,7 +55,7 @@
     }
 
     // Compute the change.
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       for (var reference in references) {
         builder.addSimpleReplacement(range.node(reference), _newName);
       }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_boolean_with_bool.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_boolean_with_bool.dart
index 68c0905..0e8935f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_boolean_with_bool.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_boolean_with_bool.dart
@@ -4,7 +4,7 @@
 
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -13,8 +13,8 @@
   FixKind get fixKind => DartFixKind.REPLACE_BOOLEAN_WITH_BOOL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.error(diagnostic), 'bool');
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_cascade_with_dot.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_cascade_with_dot.dart
new file mode 100644
index 0000000..8e9ede9
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_cascade_with_dot.dart
@@ -0,0 +1,74 @@
+// 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:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:analyzer_plugin/utilities/range_factory.dart';
+
+class ReplaceCascadeWithDot extends CorrectionProducer {
+  static final Map<TokenType, String> _indexReplacement = {
+    TokenType.PERIOD_PERIOD: '',
+    TokenType.QUESTION_PERIOD_PERIOD: '?',
+  };
+
+  static final Map<TokenType, String> _propertyReplacement = {
+    TokenType.PERIOD_PERIOD: '.',
+    TokenType.QUESTION_PERIOD_PERIOD: '?.',
+  };
+
+  @override
+  FixKind get fixKind => DartFixKind.REPLACE_CASCADE_WITH_DOT;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    var node = this.node;
+    if (node is CascadeExpression) {
+      var sections = node.cascadeSections;
+      if (sections.length == 1) {
+        await _replaceFor(builder, sections[0]);
+      }
+    }
+  }
+
+  Future<void> _replaceFor(ChangeBuilder builder, Expression section) async {
+    if (section is AssignmentExpression) {
+      return _replaceFor(builder, section.leftHandSide);
+    }
+
+    if (section is IndexExpression) {
+      if (section.period != null) {
+        return _replaceToken(builder, section.period, _indexReplacement);
+      }
+      return _replaceFor(builder, section.target);
+    }
+
+    if (section is MethodInvocation) {
+      return _replaceToken(builder, section.operator, _propertyReplacement);
+    }
+
+    if (section is PropertyAccess) {
+      return _replaceToken(builder, section.operator, _propertyReplacement);
+    }
+  }
+
+  Future<void> _replaceToken(
+    ChangeBuilder builder,
+    Token token,
+    Map<TokenType, String> map,
+  ) async {
+    var replacement = map[token.type];
+    if (replacement != null) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addSimpleReplacement(range.token(token), replacement);
+      });
+    }
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static ReplaceCascadeWithDot newInstance() => ReplaceCascadeWithDot();
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_colon_with_equals.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_colon_with_equals.dart
index 49973fb..92076a5 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_colon_with_equals.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_colon_with_equals.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,9 +14,9 @@
   FixKind get fixKind => DartFixKind.REPLACE_COLON_WITH_EQUALS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is DefaultFormalParameter) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleReplacement(
             range.token((node as DefaultFormalParameter).separator), ' =');
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_conditional_with_if_else.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_conditional_with_if_else.dart
index 1ee5fb7..ea19bac 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_conditional_with_if_else.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_conditional_with_if_else.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ReplaceConditionalWithIfElse extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.REPLACE_CONDITIONAL_WITH_IF_ELSE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     ConditionalExpression conditional;
     // may be on Statement with Conditional
     var statement = node.thisOrAncestorOfType<Statement>();
@@ -61,7 +61,7 @@
     var prefix = utils.getNodePrefix(statement);
 
     if (inVariable || inAssignment || inReturn) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         // Type v = Conditional;
         if (inVariable) {
           var variable = conditional.parent as VariableDeclaration;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_const.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_const.dart
index 5043c39..3204819 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_const.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_final_with_const.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,9 +14,9 @@
   FixKind get fixKind => DartFixKind.REPLACE_FINAL_WITH_CONST;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is VariableDeclarationList) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleReplacement(
             range.token((node as VariableDeclarationList).keyword), 'const');
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_if_else_with_conditional.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_if_else_with_conditional.dart
index afeaf2d..da0961c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_if_else_with_conditional.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_if_else_with_conditional.dart
@@ -8,7 +8,7 @@
 import 'package:analysis_server/src/services/correction/util.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class ReplaceIfElseWithConditional extends CorrectionProducer {
@@ -16,7 +16,7 @@
   AssistKind get assistKind => DartAssistKind.REPLACE_IF_ELSE_WITH_CONDITIONAL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // should be "if"
     if (node is! IfStatement) {
       return;
@@ -48,7 +48,7 @@
     }
 
     if (hasReturnStatements || hasExpressionStatements) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         // returns
         if (hasReturnStatements) {
           var conditionSrc = utils.getNodeText(ifStatement.condition);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_new_with_const.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_new_with_const.dart
index c7ebaf9..56bb894 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_new_with_const.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_new_with_const.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.REPLACE_NEW_WITH_CONST;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = this.node;
     if (node is ConstructorName) {
       node = node.parent;
@@ -22,7 +22,7 @@
     if (node is InstanceCreationExpression) {
       final keyword = node.keyword;
       if (keyword != null) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           builder.addSimpleReplacement(range.token(keyword), 'const');
         });
       }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_null_with_closure.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_null_with_closure.dart
index f9a6020..7adfbe7 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_null_with_closure.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_null_with_closure.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -16,7 +16,7 @@
   FixKind get fixKind => DartFixKind.REPLACE_NULL_WITH_CLOSURE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var nodeToFix;
     var parameters = const <ParameterElement>[];
     if (coveredNode is NamedExpression) {
@@ -37,9 +37,8 @@
     }
 
     if (nodeToFix != null) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addReplacement(range.node(nodeToFix),
-            (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addReplacement(range.node(nodeToFix), (builder) {
           builder.writeParameters(parameters);
           builder.write(' => null');
         });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_return_type_future.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_return_type_future.dart
index a133a81..6af3d1f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_return_type_future.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_return_type_future.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class ReplaceReturnTypeFuture extends CorrectionProducer {
@@ -13,11 +13,11 @@
   FixKind get fixKind => DartFixKind.REPLACE_RETURN_TYPE_FUTURE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // prepare the existing type
     var typeName = node.thisOrAncestorOfType<TypeAnnotation>();
     var typeProvider = this.typeProvider;
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.replaceTypeWithFuture(typeName, typeProvider);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_var_with_dynamic.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_var_with_dynamic.dart
index e29ca07..d0176ed 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_var_with_dynamic.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_var_with_dynamic.dart
@@ -4,7 +4,7 @@
 
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -13,8 +13,8 @@
   FixKind get fixKind => DartFixKind.REPLACE_VAR_WITH_DYNAMIC;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.error(diagnostic), 'dynamic');
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_brackets.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_brackets.dart
index d2e6840..0b7daad 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_brackets.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_brackets.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,9 +14,9 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_BRACKETS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is EmptyStatement && node.parent is! Block) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         var previous = node.findPrevious(node.beginToken);
         if (previous != null) {
           builder.addSimpleReplacement(range.endEnd(previous, node), ' {}');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_conditional_assignment.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_conditional_assignment.dart
index bd6f0c1..83ff3ba 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_conditional_assignment.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_conditional_assignment.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_CONDITIONAL_ASSIGNMENT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     IfStatement ifStatement =
         node is IfStatement ? node : node.thisOrAncestorOfType<IfStatement>();
     if (ifStatement == null) {
@@ -32,9 +32,8 @@
     if (thenStatement is ExpressionStatement) {
       final expression = thenStatement.expression.unParenthesized;
       if (expression is AssignmentExpression) {
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-          builder.addReplacement(range.node(ifStatement),
-              (DartEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
+          builder.addReplacement(range.node(ifStatement), (builder) {
             builder.write(utils.getNodeText(expression.leftHandSide));
             builder.write(' ??= ');
             builder.write(utils.getNodeText(expression.rightHandSide));
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_eight_digit_hex.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_eight_digit_hex.dart
index 171639b..863bc23 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_eight_digit_hex.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_eight_digit_hex.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,7 +20,7 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_EIGHT_DIGIT_HEX;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Extract the information needed to build the edit.
     //
@@ -32,7 +32,7 @@
     //
     // Build the edit.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.node(node), _replacement);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_extension_name.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_extension_name.dart
index a52370f..5ebc324 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_extension_name.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_extension_name.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -19,13 +19,13 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_EXTENSION_NAME;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier) {
       return;
     }
     var target = _getTarget(node.parent);
     if (target is ExtensionOverride) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleReplacement(
             range.node(target), utils.getNodeText(target.extensionName));
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_filled.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_filled.dart
index c369441..860e620 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_filled.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_filled.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class ReplaceWithFilled extends CorrectionProducer {
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_FILLED;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var typeName = node is SimpleIdentifier ? node.parent : node;
     var creation = typeName?.parent?.parent;
     if (typeName is TypeName && creation is InstanceCreationExpression) {
@@ -22,7 +22,7 @@
       if (typeSystem.isNullable(elementType)) {
         var argumentList = creation.argumentList;
         if (argumentList.arguments.length == 1) {
-          await builder.addFileEdit(file, (builder) {
+          await builder.addDartFileEdit(file, (builder) {
             builder.addSimpleInsertion(argumentList.offset, '.filled');
             builder.addSimpleInsertion(
                 argumentList.arguments[0].end, ', null, growable: false');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_identifier.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_identifier.dart
index 2b810b2..bacc3b3 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_identifier.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_identifier.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,11 +14,11 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_IDENTIFIER;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var functionTyped =
         node.thisOrAncestorOfType<FunctionTypedFormalParameter>();
     if (functionTyped != null) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleReplacement(range.node(functionTyped),
             utils.getNodeText(functionTyped.identifier));
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_interpolation.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_interpolation.dart
index 6842ebb..aaafcb8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_interpolation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_interpolation.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 import 'package:meta/meta.dart';
@@ -16,7 +16,7 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_INTERPOLATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Validate the fix.
     //
@@ -41,7 +41,7 @@
     //
     // Build the edit.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.node(binary), interpolation);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_is_empty.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_is_empty.dart
index f32b089..5abb0e9 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_is_empty.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_is_empty.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,7 +15,7 @@
   FixKind fixKind;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     /// Return the value of an integer literal or prefix expression with a
     /// minus and then an integer literal. For anything else, returns `null`.
     int getIntValue(Expression expressions) {
@@ -101,7 +101,7 @@
       return;
     }
     var target = utils.getNodeText(lengthTarget);
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(range.node(binary), '$target.$getter');
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_not_null_aware.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_not_null_aware.dart
new file mode 100644
index 0000000..75d20bcb
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_not_null_aware.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.
+
+import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:analyzer_plugin/utilities/range_factory.dart';
+
+class ReplaceWithNotNullAware extends CorrectionProducer {
+  /// The operator that will replace the existing operator.
+  String _newOperator;
+
+  @override
+  List<Object> get fixArguments => [_newOperator];
+
+  @override
+  FixKind get fixKind => DartFixKind.REPLACE_WITH_NOT_NULL_AWARE;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    var node = coveredNode;
+    if (node is MethodInvocation) {
+      _newOperator =
+          node.operator.type == TokenType.QUESTION_PERIOD ? '.' : '..';
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addSimpleReplacement(range.token(node.operator), _newOperator);
+      });
+    } else if (node is PropertyAccess) {
+      _newOperator =
+          node.operator.type == TokenType.QUESTION_PERIOD ? '.' : '..';
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addSimpleReplacement(range.token(node.operator), _newOperator);
+      });
+    } else if (node is IndexExpression) {
+      if (node.period != null) {
+        _newOperator = '..';
+        await builder.addDartFileEdit(file, (builder) {
+          builder.addSimpleReplacement(range.token(node.period), '..');
+        });
+      } else if (node.question != null) {
+        _newOperator = '[';
+        await builder.addDartFileEdit(file, (builder) {
+          builder.addDeletion(range.token(node.question));
+        });
+      }
+    } else if (node is SpreadElement) {
+      _newOperator = '...';
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addSimpleReplacement(
+            range.token(node.spreadOperator), _newOperator);
+      });
+    }
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static ReplaceWithNotNullAware newInstance() => ReplaceWithNotNullAware();
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_null_aware.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_null_aware.dart
index 2699b40..20aeeb9 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_null_aware.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_null_aware.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,10 +14,10 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_NULL_AWARE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var node = coveredNode;
     if (node is Expression) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         var parent = node.parent;
         while (parent != null) {
           if (parent is MethodInvocation && parent.target == node) {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_tear_off.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_tear_off.dart
index da55b5e..d638789 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_tear_off.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_tear_off.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,14 +14,14 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_TEAR_OFF;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var ancestor = node.thisOrAncestorOfType<FunctionExpression>();
     if (ancestor == null) {
       return;
     }
     Future<void> addFixOfExpression(InvocationExpression expression) async {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addReplacement(range.node(ancestor), (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addReplacement(range.node(ancestor), (builder) {
           if (expression is MethodInvocation && expression.target != null) {
             builder.write(utils.getNodeText(expression.target));
             builder.write('.');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_var.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_var.dart
index 7f034c3..270bb86 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/replace_with_var.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_with_var.dart
@@ -6,9 +6,8 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/element/type.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,7 +19,7 @@
   FixKind get fixKind => DartFixKind.REPLACE_WITH_VAR;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var type = _findType(node);
     if (type == null) {
       return;
@@ -63,7 +62,7 @@
         //  this in more places by examining the elements of the collection.
         return;
       }
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         if (parent.isConst || parent.isFinal) {
           builder.addDeletion(range.startStart(type, variables[0]));
         } else {
@@ -84,7 +83,7 @@
           typeArgumentsOffset = iterable.offset;
         }
       }
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         if (parent.isConst || parent.isFinal) {
           builder.addDeletion(range.startStart(type, parent.identifier));
         } else {
@@ -127,12 +126,10 @@
           return false;
         }
         final iterableType = parent.iterable.staticType;
-        if (iterableType is InterfaceTypeImpl) {
-          var instantiatedType =
-              iterableType.asInstanceOf(typeProvider.iterableElement);
-          if (instantiatedType?.typeArguments?.first == staticType) {
-            return true;
-          }
+        var instantiatedType =
+            iterableType.asInstanceOf(typeProvider.iterableElement);
+        if (instantiatedType?.typeArguments?.first == staticType) {
+          return true;
         }
         return false;
       }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/shadow_field.dart b/pkg/analysis_server/lib/src/services/correction/dart/shadow_field.dart
index 21070b4..07a33dc 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/shadow_field.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/shadow_field.dart
@@ -9,14 +9,14 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.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_builder_core.dart';
 
 class ShadowField extends CorrectionProducer {
   @override
   AssistKind get assistKind => DartAssistKind.SHADOW_FIELD;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! SimpleIdentifier) {
       return;
     }
@@ -51,7 +51,7 @@
     //
     // Build the change.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addInsertion(offset, (builder) {
         // TODO(brianwilkerson) Conditionally write a type annotation instead of
         //  'var' when we're able to discover user preferences.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/sort_child_property_last.dart b/pkg/analysis_server/lib/src/services/correction/dart/sort_child_property_last.dart
index 1ce35bc..bbf8d3b 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/sort_child_property_last.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/sort_child_property_last.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -20,7 +20,7 @@
   FixKind get fixKind => DartFixKind.SORT_CHILD_PROPERTY_LAST;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var childProp = _findNamedExpression(node);
     if (childProp == null) {
       return;
@@ -41,7 +41,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (DartFileEditBuilder fileEditBuilder) {
+    await builder.addDartFileEdit(file, (fileEditBuilder) {
       var start = childProp.beginToken.previous.end;
       var end = childProp.endToken.next.end;
       var childRange = range.startOffsetEndOffset(start, end);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/split_and_condition.dart b/pkg/analysis_server/lib/src/services/correction/dart/split_and_condition.dart
index c4fa305..1f38c26 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/split_and_condition.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/split_and_condition.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class SplitAndCondition extends CorrectionProducer {
@@ -16,7 +16,7 @@
   AssistKind get assistKind => DartAssistKind.SPLIT_AND_CONDITION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     // check that user invokes quick assist on binary expression
     if (node is! BinaryExpression) {
       return;
@@ -61,7 +61,7 @@
       rightConditionSource = getRangeText(rightConditionRange);
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       // remove "&& rightCondition"
       builder
           .addDeletion(range.endEnd(binaryExpression.leftOperand, condition));
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/split_variable_declaration.dart b/pkg/analysis_server/lib/src/services/correction/dart/split_variable_declaration.dart
index 088e644..faac0be 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/split_variable_declaration.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/split_variable_declaration.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
 class SplitVariableDeclaration extends CorrectionProducer {
@@ -15,7 +15,7 @@
   AssistKind get assistKind => DartAssistKind.SPLIT_VARIABLE_DECLARATION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var variableList = node?.thisOrAncestorOfType<VariableDeclarationList>();
 
     // Must be a local variable declaration.
@@ -46,7 +46,7 @@
       return;
     }
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       if (variableList.type == null) {
         final type = variable.declaredElement.type;
         if (!type.isDynamic) {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/surround_with.dart b/pkg/analysis_server/lib/src/services/correction/dart/surround_with.dart
index a66877f..90a50c5 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/surround_with.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/surround_with.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/source/source_range.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_builder_core.dart';
 
 class SurroundWith extends MultiCorrectionProducer {
   @override
@@ -93,8 +93,8 @@
   AssistKind get assistKind => DartAssistKind.SURROUND_WITH_BLOCK;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleInsertion(statementsRange.offset, '$indentOld{$eol');
       builder.addSimpleReplacement(
           statementsRange,
@@ -116,9 +116,9 @@
   AssistKind get assistKind => DartAssistKind.SURROUND_WITH_DO_WHILE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(statementsRange, (DartEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(statementsRange, (builder) {
         builder.write(indentOld);
         builder.write('do {');
         builder.write(eol);
@@ -145,9 +145,9 @@
   AssistKind get assistKind => DartAssistKind.SURROUND_WITH_FOR;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(statementsRange, (DartEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(statementsRange, (builder) {
         builder.write(indentOld);
         builder.write('for (var ');
         builder.addSimpleLinkedEdit('VAR', 'v');
@@ -180,9 +180,9 @@
   AssistKind get assistKind => DartAssistKind.SURROUND_WITH_FOR_IN;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(statementsRange, (DartEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(statementsRange, (builder) {
         builder.write(indentOld);
         builder.write('for (var ');
         builder.addSimpleLinkedEdit('NAME', 'item');
@@ -211,9 +211,9 @@
   AssistKind get assistKind => DartAssistKind.SURROUND_WITH_IF;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(statementsRange, (DartEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(statementsRange, (builder) {
         builder.write(indentOld);
         builder.write('if (');
         builder.addSimpleLinkedEdit('CONDITION', 'condition');
@@ -240,12 +240,12 @@
   AssistKind get assistKind => DartAssistKind.SURROUND_WITH_SET_STATE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var classDeclaration = node.parent.thisOrAncestorOfType<ClassDeclaration>();
     if (classDeclaration != null &&
         flutter.isState(classDeclaration.declaredElement)) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addReplacement(statementsRange, (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addReplacement(statementsRange, (builder) {
           builder.write(indentOld);
           builder.writeln('setState(() {');
           builder.write(indentedCode);
@@ -269,9 +269,9 @@
   AssistKind get assistKind => DartAssistKind.SURROUND_WITH_TRY_CATCH;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(statementsRange, (DartEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(statementsRange, (builder) {
         builder.write(indentOld);
         builder.write('try {');
         builder.write(eol);
@@ -308,9 +308,9 @@
   AssistKind get assistKind => DartAssistKind.SURROUND_WITH_TRY_FINALLY;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(statementsRange, (DartEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(statementsRange, (builder) {
         builder.write(indentOld);
         builder.write('try {');
         builder.write(eol);
@@ -345,9 +345,9 @@
   AssistKind get assistKind => DartAssistKind.SURROUND_WITH_WHILE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(statementsRange, (DartEditBuilder builder) {
+  Future<void> compute(ChangeBuilder builder) async {
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addReplacement(statementsRange, (builder) {
         builder.write(indentOld);
         builder.write('while (');
         builder.addSimpleLinkedEdit('CONDITION', 'condition');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/update_sdk_constraints.dart b/pkg/analysis_server/lib/src/services/correction/dart/update_sdk_constraints.dart
index a5522c5..dcf3765 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/update_sdk_constraints.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/update_sdk_constraints.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/source/source_range.dart';
 import 'package:analyzer/src/hint/sdk_constraint_extractor.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 class UpdateSdkConstraints extends CorrectionProducer {
@@ -22,7 +22,7 @@
   FixKind get fixKind => DartFixKind.UPDATE_SDK_CONSTRAINTS;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var context = resourceProvider.pathContext;
     File pubspecFile;
     var folder = resourceProvider.getFolder(context.dirname(file));
@@ -61,7 +61,7 @@
     if (newText == null) {
       return;
     }
-    await builder.addFileEdit(pubspecFile.path, (builder) {
+    await builder.addGenericFileEdit(pubspecFile.path, (builder) {
       builder.addSimpleReplacement(SourceRange(offset, length), newText);
     });
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_const.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_const.dart
index c73a6e6..4ac0dfc 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_const.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_const.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,10 +14,10 @@
   FixKind get fixKind => DartFixKind.USE_CONST;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (coveredNode is InstanceCreationExpression) {
       var instanceCreation = coveredNode as InstanceCreationExpression;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         if (instanceCreation.keyword == null) {
           builder.addSimpleInsertion(
               instanceCreation.constructorName.offset, 'const');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_curly_braces.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_curly_braces.dart
index 620e21e..e6fead3 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_curly_braces.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_curly_braces.dart
@@ -7,7 +7,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.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_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -19,7 +19,7 @@
   FixKind get fixKind => DartFixKind.ADD_CURLY_BRACES;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     var statement = node.thisOrAncestorOfType<Statement>();
     var parent = statement?.parent;
 
@@ -47,14 +47,14 @@
     }
   }
 
-  Future<void> _doStatement(DartChangeBuilder builder, DoStatement node) async {
+  Future<void> _doStatement(ChangeBuilder builder, DoStatement node) async {
     var body = node.body;
     if (body is Block) return null;
 
     var prefix = utils.getLinePrefix(node.offset);
     var indent = prefix + utils.getIndent(1);
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
         range.endStart(node.doKeyword, body),
         ' {$eol$indent',
@@ -66,15 +66,14 @@
     });
   }
 
-  Future<void> _forStatement(
-      DartChangeBuilder builder, ForStatement node) async {
+  Future<void> _forStatement(ChangeBuilder builder, ForStatement node) async {
     var body = node.body;
     if (body is Block) return null;
 
     var prefix = utils.getLinePrefix(node.offset);
     var indent = prefix + utils.getIndent(1);
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
         range.endStart(node.rightParenthesis, body),
         ' {$eol$indent',
@@ -84,11 +83,11 @@
   }
 
   Future<void> _ifStatement(
-      DartChangeBuilder builder, IfStatement node, Statement thenOrElse) async {
+      ChangeBuilder builder, IfStatement node, Statement thenOrElse) async {
     var prefix = utils.getLinePrefix(node.offset);
     var indent = prefix + utils.getIndent(1);
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       var thenStatement = node.thenStatement;
       if (thenStatement is! Block &&
           (thenOrElse == null || thenOrElse == thenStatement)) {
@@ -120,14 +119,14 @@
   }
 
   Future<void> _whileStatement(
-      DartChangeBuilder builder, WhileStatement node) async {
+      ChangeBuilder builder, WhileStatement node) async {
     var body = node.body;
     if (body is Block) return null;
 
     var prefix = utils.getLinePrefix(node.offset);
     var indent = prefix + utils.getIndent(1);
 
-    await builder.addFileEdit(file, (builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
         range.endStart(node.rightParenthesis, body),
         ' {$eol$indent',
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_effective_integer_division.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_effective_integer_division.dart
index 97a1d2a..7c086e3 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_effective_integer_division.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_effective_integer_division.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,13 +14,13 @@
   FixKind get fixKind => DartFixKind.USE_EFFECTIVE_INTEGER_DIVISION;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     for (var n = node; n != null; n = n.parent) {
       if (n is MethodInvocation &&
           n.offset == errorOffset &&
           n.length == errorLength) {
         var target = (n as MethodInvocation).target.unParenthesized;
-        await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        await builder.addDartFileEdit(file, (builder) {
           // replace "/" with "~/"
           var binary = target as BinaryExpression;
           builder.addSimpleReplacement(range.token(binary.operator), '~/');
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_eq_eq_null.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_eq_eq_null.dart
index c51598e..58fa8e6 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_eq_eq_null.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_eq_eq_null.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,13 +14,12 @@
   FixKind get fixKind => DartFixKind.USE_EQ_EQ_NULL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (coveredNode is IsExpression) {
       var isExpression = coveredNode as IsExpression;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder
-            .addReplacement(range.endEnd(isExpression.expression, isExpression),
-                (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addReplacement(
+            range.endEnd(isExpression.expression, isExpression), (builder) {
           builder.write(' == null');
         });
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_is_not_empty.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_is_not_empty.dart
index ec1506f..39ee83b 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_is_not_empty.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_is_not_empty.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -15,7 +15,7 @@
   FixKind get fixKind => DartFixKind.USE_IS_NOT_EMPTY;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (node is! PrefixExpression) {
       return;
     }
@@ -33,7 +33,7 @@
     } else {
       return;
     }
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addDeletion(range.token(negation));
       builder.addSimpleReplacement(range.node(identifier), 'isNotEmpty');
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_not_eq_null.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_not_eq_null.dart
index f699074..12ef5a8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_not_eq_null.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_not_eq_null.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,13 +14,12 @@
   FixKind get fixKind => DartFixKind.USE_NOT_EQ_NULL;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (coveredNode is IsExpression) {
       var isExpression = coveredNode as IsExpression;
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder
-            .addReplacement(range.endEnd(isExpression.expression, isExpression),
-                (DartEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
+        builder.addReplacement(
+            range.endEnd(isExpression.expression, isExpression), (builder) {
           builder.write(' != null');
         });
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/use_rethrow.dart b/pkg/analysis_server/lib/src/services/correction/dart/use_rethrow.dart
index 03861e3..2afd4ed 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/use_rethrow.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/use_rethrow.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,9 +14,9 @@
   FixKind get fixKind => DartFixKind.USE_RETHROW;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     if (coveredNode is ThrowExpression) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+      await builder.addDartFileEdit(file, (builder) {
         builder.addSimpleReplacement(range.node(coveredNode), 'rethrow');
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/wrap_in_future.dart b/pkg/analysis_server/lib/src/services/correction/dart/wrap_in_future.dart
index 62da5e5..1ccd887 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/wrap_in_future.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/wrap_in_future.dart
@@ -5,7 +5,7 @@
 import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -14,7 +14,7 @@
   FixKind get fixKind => DartFixKind.WRAP_IN_FUTURE;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Extract the information needed to build the edit.
     //
@@ -30,7 +30,7 @@
     //
     // Build the edit.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
           range.node(expression), 'Future.value($value)');
     });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/wrap_in_text.dart b/pkg/analysis_server/lib/src/services/correction/dart/wrap_in_text.dart
index fbfc65e..53776c3 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/wrap_in_text.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/wrap_in_text.dart
@@ -6,7 +6,7 @@
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -18,7 +18,7 @@
   FixKind get fixKind => DartFixKind.WRAP_IN_TEXT;
 
   @override
-  Future<void> compute(DartChangeBuilder builder) async {
+  Future<void> compute(ChangeBuilder builder) async {
     //
     // Extract the information needed to build the edit.
     //
@@ -38,7 +38,7 @@
     //
     // Build the edit.
     //
-    await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(file, (builder) {
       builder.addSimpleReplacement(
         range.node(_stringExpression),
         'Text($stringExpressionCode)',
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index 3b11ecc..0f67130 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -14,27 +14,32 @@
 
 /// Return true if this [errorCode] is likely to have a fix associated with it.
 bool hasFix(ErrorCode errorCode) =>
-    errorCode == StaticWarningCode.UNDEFINED_CLASS_BOOLEAN ||
-    errorCode == StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER ||
-    errorCode == StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR ||
+    errorCode == CompileTimeErrorCode.CAST_TO_NON_TYPE ||
+    errorCode == CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER ||
+    errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE ||
+    errorCode == CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER ||
+    errorCode == CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION ||
+    errorCode == CompileTimeErrorCode.NEW_WITH_UNDEFINED_CONSTRUCTOR ||
     errorCode ==
-        StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE ||
+        CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE ||
     errorCode ==
-        StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO ||
+        CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO ||
     errorCode ==
-        StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE ||
+        CompileTimeErrorCode
+            .NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE ||
     errorCode ==
-        StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR ||
+        CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR ||
     errorCode ==
-        StaticWarningCode
+        CompileTimeErrorCode
             .NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS ||
-    errorCode == StaticWarningCode.CAST_TO_NON_TYPE ||
-    errorCode == StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME ||
-    errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED ||
-    errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 ||
-    errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 ||
-    errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS ||
-    errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER ||
+    errorCode == CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT ||
+    errorCode == CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME ||
+    errorCode == CompileTimeErrorCode.FINAL_NOT_INITIALIZED ||
+    errorCode == CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 ||
+    errorCode == CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 ||
+    errorCode ==
+        CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS ||
+    errorCode == CompileTimeErrorCode.UNDEFINED_IDENTIFIER ||
     errorCode ==
         CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE ||
     errorCode == CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE ||
@@ -42,8 +47,13 @@
     errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT ||
     errorCode == CompileTimeErrorCode.PART_OF_NON_PART ||
     errorCode == CompileTimeErrorCode.UNDEFINED_ANNOTATION ||
+    errorCode == CompileTimeErrorCode.UNDEFINED_CLASS_BOOLEAN ||
     errorCode ==
         CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT ||
+    errorCode == CompileTimeErrorCode.UNDEFINED_FUNCTION ||
+    errorCode == CompileTimeErrorCode.UNDEFINED_GETTER ||
+    errorCode == CompileTimeErrorCode.UNDEFINED_METHOD ||
+    errorCode == CompileTimeErrorCode.UNDEFINED_SETTER ||
     errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST ||
     errorCode == CompileTimeErrorCode.URI_HAS_NOT_BEEN_GENERATED ||
     errorCode == HintCode.CAN_BE_NULL_AFTER_NULL_AWARE ||
@@ -58,14 +68,6 @@
     errorCode == ParserErrorCode.EXPECTED_TOKEN ||
     errorCode == ParserErrorCode.GETTER_WITH_PARAMETERS ||
     errorCode == ParserErrorCode.VAR_AS_TYPE_NAME ||
-    errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE ||
-    errorCode == StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER ||
-    errorCode == StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION ||
-    errorCode == StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT ||
-    errorCode == StaticTypeWarningCode.UNDEFINED_FUNCTION ||
-    errorCode == StaticTypeWarningCode.UNDEFINED_GETTER ||
-    errorCode == StaticTypeWarningCode.UNDEFINED_METHOD ||
-    errorCode == StaticTypeWarningCode.UNDEFINED_SETTER ||
     errorCode == CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER ||
     (errorCode is LintCode &&
         (errorCode.name == LintNames.always_require_non_null_named_parameters ||
@@ -174,6 +176,8 @@
       "Add required argument '{0}'");
   static const ADD_NE_NULL = FixKind('dart.fix.add.neNull', 50, 'Add != null',
       appliedTogetherMessage: 'Add != null everywhere in file');
+  static const ADD_NULL_CHECK =
+      FixKind('dart.fix.add.nullCheck', 50, 'Add a null check (!)');
   static const ADD_OVERRIDE =
       FixKind('dart.fix.add.override', 50, "Add '@override' annotation");
   static const ADD_REQUIRED =
@@ -283,6 +287,7 @@
       'dart.fix.create.noSuchMethod', 49, "Create 'noSuchMethod' method");
   static const CREATE_SETTER =
       FixKind('dart.fix.create.setter', 50, "Create setter '{0}'");
+  static const DATA_DRIVEN = FixKind('dart.fix.dataDriven', 50, '{0}');
   static const EXTEND_CLASS_FOR_MIXIN =
       FixKind('dart.fix.extendClassForMixin', 50, "Extend the class '{0}'");
   static const IMPORT_ASYNC =
@@ -310,6 +315,8 @@
   static const MAKE_FIELD_NOT_FINAL =
       FixKind('dart.fix.makeFieldNotFinal', 50, "Make field '{0}' not final");
   static const MAKE_FINAL = FixKind('dart.fix.makeFinal', 50, 'Make final');
+  static const MAKE_RETURN_TYPE_NULLABLE = FixKind(
+      'dart.fix.makeReturnTypeNullable', 50, 'Make the return type nullable');
   static const MOVE_TYPE_ARGUMENTS_TO_CLASS = FixKind(
       'dart.fix.moveTypeArgumentsToClass',
       50,
@@ -407,6 +414,8 @@
   static const REPLACE_BOOLEAN_WITH_BOOL = FixKind(
       'dart.fix.replace.booleanWithBool', 50, "Replace 'boolean' with 'bool'",
       appliedTogetherMessage: "Replace all 'boolean' with 'bool' in file");
+  static const REPLACE_CASCADE_WITH_DOT =
+      FixKind('dart.fix.replace.cascadeWithDot', 50, "Replace '..' with '.'");
   static const REPLACE_COLON_WITH_EQUALS =
       FixKind('dart.fix.replace.colonWithEquals', 50, "Replace ':' with '='");
   static const REPLACE_WITH_FILLED = FixKind(
@@ -439,6 +448,8 @@
       FixKind('dart.fix.replace.withIsEmpty', 50, "Replace with 'isEmpty'");
   static const REPLACE_WITH_IS_NOT_EMPTY = FixKind(
       'dart.fix.replace.withIsNotEmpty', 50, "Replace with 'isNotEmpty'");
+  static const REPLACE_WITH_NOT_NULL_AWARE =
+      FixKind('dart.fix.replace.withNotNullAware', 50, "Replace with '{0}'");
   static const REPLACE_WITH_NULL_AWARE = FixKind(
       'dart.fix.replace.withNullAware',
       50,
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/analysis_options/fix_generator.dart b/pkg/analysis_server/lib/src/services/correction/fix/analysis_options/fix_generator.dart
index c6e25e8..32381fa 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/analysis_options/fix_generator.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/analysis_options/fix_generator.dart
@@ -135,7 +135,7 @@
       deletionRange ??=
           _lines(nodeToDelete.span.start.offset, nodeToDelete.span.end.offset);
       var builder = ChangeBuilder();
-      await builder.addFileEdit(file, (builder) {
+      await builder.addGenericFileEdit(file, (builder) {
         builder.addDeletion(deletionRange);
       });
       _addFixFromBuilder(builder, AnalysisOptionsFixKind.REMOVE_SETTING,
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/change.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/change.dart
new file mode 100644
index 0000000..f73f6ae
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/change.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:analysis_server/src/services/correction/dart/data_driven.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+
+/// The behavior common to all of the changes used to construct a transform.
+abstract class Change<D> {
+  /// Use the [builder] to create a change that is part or all of the fix being
+  /// made by the data-driven [fix]. The [data] is the data returned by the
+  /// [validate] method.
+  void apply(DartFileEditBuilder builder, DataDrivenFix fix, D data);
+
+  /// Validate that this change can be applied. Return the data to be passed to
+  /// [apply] if the change can be applied, or `null` if it can't be applied.
+  D validate(DataDrivenFix fix);
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/convert_argument_to_type_argument_change.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/convert_argument_to_type_argument_change.dart
new file mode 100644
index 0000000..80649d4
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/convert_argument_to_type_argument_change.dart
@@ -0,0 +1,97 @@
+// 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/data_driven.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/change.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/parameter_reference.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/range_factory.dart';
+import 'package:meta/meta.dart';
+
+/// The data related to a function for which one of the `Type` valued arguments
+/// has been converted into a type argument.
+class ConvertArgumentToTypeArgumentChange extends Change<_Data> {
+  /// The index of the argument that was transformed.
+  final ParameterReference parameterReference;
+
+  /// The index of the type argument into which the argument was transformed.
+  final int typeArgumentIndex;
+
+  /// Initialize a newly created transform to describe a conversion of the
+  /// argument at the [argumentIndex] to the type parameter at the
+  /// [typeArgumentIndex] for the function [element].
+  ConvertArgumentToTypeArgumentChange(
+      {@required this.parameterReference, @required this.typeArgumentIndex})
+      : assert(parameterReference != null),
+        assert(typeArgumentIndex >= 0);
+
+  @override
+  void apply(DartFileEditBuilder builder, DataDrivenFix fix, _Data data) {
+    var typeArguments = data.typeArguments;
+    var typeName = data.argumentValue;
+    if (typeArguments == null) {
+      // Adding the first type argument.
+      builder.addSimpleInsertion(
+          data.argumentList.offset, '<${typeName.name}>');
+    } else {
+      if (typeArgumentIndex == 0) {
+        // Inserting the type argument at the beginning of the list.
+        builder.addSimpleInsertion(
+            typeArguments.leftBracket.end, '${typeName.name}, ');
+      } else {
+        // Inserting the type argument after an existing type argument.
+        var previous = typeArguments.arguments[typeArgumentIndex - 1];
+        builder.addSimpleInsertion(previous.end, ', ${typeName.name}');
+      }
+    }
+    builder.addDeletion(range.nodeInList(data.arguments, data.argument));
+  }
+
+  @override
+  _Data validate(DataDrivenFix fix) {
+    var parent = fix.node.parent;
+    if (parent is MethodInvocation) {
+      var argumentList = parent.argumentList;
+      var argument = parameterReference.argumentFrom(argumentList);
+      if (argument is! SimpleIdentifier) {
+        return null;
+      }
+      var typeArguments = parent.typeArguments;
+      var typeArgumentLength =
+          typeArguments == null ? 0 : typeArguments.arguments.length;
+      if (typeArgumentIndex > typeArgumentLength) {
+        return null;
+      }
+      return _Data(argumentList, argument, typeArguments);
+    }
+    return null;
+  }
+}
+
+class _Data {
+  /// The argument list of the invocation.
+  final ArgumentList argumentList;
+
+  /// The value of the argument being moved to the list of type arguments.
+  final Identifier argumentValue;
+
+  /// The list of type arguments for the invocation, or `null` if the invocation
+  /// does not have any type arguments.
+  final TypeArgumentList typeArguments;
+
+  _Data(this.argumentList, this.argumentValue, this.typeArguments);
+
+  /// Return the argument being moved to the list of type arguments.
+  Expression get argument {
+    var parent = argumentValue.parent;
+    if (parent is NamedExpression) {
+      return parent;
+    }
+    return argumentValue;
+  }
+
+  /// The list of invocation arguments.
+  NodeList<Expression> get arguments => argumentList.arguments;
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_descriptor.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_descriptor.dart
new file mode 100644
index 0000000..b8f0b84
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_descriptor.dart
@@ -0,0 +1,33 @@
+// 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 path to an element.
+class ElementDescriptor {
+  /// The URIs of the library in which the element is defined.
+  final List<String> libraryUris;
+
+  /// The components that uniquely identify the element within its library.
+  final List<String> components;
+
+  /// Initialize a newly created element descriptor to describe an element
+  /// accessible via any of the [libraryUris] where the path to the element
+  /// within the library is given by the list of [components].
+  ElementDescriptor({@required this.libraryUris, @required this.components});
+
+  /// Return `true` if this descriptor matches an element with the given [name]
+  /// in a library that imports the [importedUris].
+  bool matches(String name, List<String> importedUris) {
+    if (components.last != name) {
+      return false;
+    }
+    for (var importedUri in importedUris) {
+      if (libraryUris.contains(importedUri)) {
+        return true;
+      }
+    }
+    return false;
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/parameter_reference.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/parameter_reference.dart
new file mode 100644
index 0000000..e67f425
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/parameter_reference.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.
+
+import 'package:analyzer/dart/ast/ast.dart';
+
+/// A reference to a named parameter.
+class NamedParameterReference extends ParameterReference {
+  /// The name of the named parameter.
+  final String name;
+
+  /// Initialize a newly created reference to refer to the named parameter with
+  /// the given [name].
+  NamedParameterReference(this.name) : assert(name.isNotEmpty);
+
+  @override
+  Expression argumentFrom(ArgumentList argumentList) {
+    for (var argument in argumentList.arguments) {
+      if (argument is NamedExpression && argument.name.label.name == name) {
+        return argument.expression;
+      }
+    }
+    return null;
+  }
+}
+
+/// A reference to a formal parameter.
+abstract class ParameterReference {
+  /// Return the expression used to compute the value of the referenced
+  /// parameter, or `null` if there is no argument corresponding to the
+  /// parameter. Note that for named parameters this will be an expression whose
+  /// parent is a named expression.
+  Expression argumentFrom(ArgumentList argumentList);
+}
+
+/// A reference to a positional parameter.
+class PositionalParameterReference extends ParameterReference {
+  /// The index of the positional parameter.
+  final int index;
+
+  /// Initialize a newly created reference to refer to the positional parameter
+  /// with the given [index].
+  PositionalParameterReference(this.index) : assert(index >= 0);
+
+  @override
+  Expression argumentFrom(ArgumentList argumentList) {
+    var arguments = argumentList.arguments;
+    if (index >= arguments.length) {
+      return null;
+    }
+    var argument = arguments[index];
+    if (argument is NamedExpression) {
+      return null;
+    }
+    return argument;
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename_change.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename_change.dart
new file mode 100644
index 0000000..9f761fd
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/rename_change.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:analysis_server/src/services/correction/dart/data_driven.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/change.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/range_factory.dart';
+import 'package:meta/meta.dart';
+
+/// The data related to an element that has been renamed.
+class RenameChange extends Change<SimpleIdentifier> {
+  /// The new name of the element.
+  final String newName;
+
+  /// Initialize a newly created transform to describe a renaming of an element
+  /// to the [newName].
+  RenameChange({@required this.newName});
+
+  @override
+  void apply(DartFileEditBuilder builder, DataDrivenFix fix,
+      SimpleIdentifier nameNode) {
+    builder.addSimpleReplacement(range.node(nameNode), newName);
+  }
+
+  @override
+  SimpleIdentifier validate(DataDrivenFix fix) {
+    var node = fix.node;
+    if (node is SimpleIdentifier) {
+      return node;
+    } else if (node is ConstructorName) {
+      return node.name;
+    }
+    return null;
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform.dart
new file mode 100644
index 0000000..251dcb3
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform.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:analysis_server/src/services/correction/fix/data_driven/change.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/element_descriptor.dart';
+import 'package:meta/meta.dart';
+
+/// The behavior common to all of the data used to construct fixes.
+class Transform {
+  /// The human-readable title describing the transform.
+  final String title;
+
+  /// The element being transformed.
+  final ElementDescriptor element;
+
+  /// A list containing the changes to be applied to affect the transform.
+  final List<Change> changes;
+
+  /// Initialize a newly created transform to describe a transformation of the
+  /// [element].
+  Transform(
+      {@required this.title, @required this.element, @required this.changes});
+
+  /// Return `true` if this transform can be applied to fix an issue related to
+  /// an element with the given [name] in a library that imports the
+  /// [importedUris].
+  bool appliesTo(String name, List<String> importedUris) {
+    return element.matches(name, importedUris);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform_set.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform_set.dart
new file mode 100644
index 0000000..e5c7445
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/transform_set.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.
+
+import 'package:analysis_server/src/services/correction/fix/data_driven/transform.dart';
+
+/// A set of transforms used to aid in the construction of fixes for issues
+/// related to some body of code. Typically there is one set of transforms for
+/// each version of each package used by the code being analyzed.
+class TransformSet {
+  /// The transforms in this set.
+  final List<Transform> _transforms = [];
+
+  /// Add the given [transform] to this set.
+  void addTransform(Transform transform) {
+    _transforms.add(transform);
+  }
+
+  /// Return a list of the transforms that apply for a reference to the given
+  /// [name] in a library that imports the [importedUris].
+  List<Transform> transformsFor(String name, List<String> importedUris) {
+    var result = <Transform>[];
+    for (var transform in _transforms) {
+      if (transform.appliesTo(name, importedUris)) {
+        result.add(transform);
+      }
+    }
+    return result;
+  }
+}
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 6b83c92..ec4ab2e 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -21,6 +21,7 @@
 import 'package:analysis_server/src/services/correction/dart/add_missing_parameter_named.dart';
 import 'package:analysis_server/src/services/correction/dart/add_missing_required_argument.dart';
 import 'package:analysis_server/src/services/correction/dart/add_ne_null.dart';
+import 'package:analysis_server/src/services/correction/dart/add_null_check.dart';
 import 'package:analysis_server/src/services/correction/dart/add_override.dart';
 import 'package:analysis_server/src/services/correction/dart/add_required.dart';
 import 'package:analysis_server/src/services/correction/dart/add_required_keyword.dart';
@@ -69,6 +70,7 @@
 import 'package:analysis_server/src/services/correction/dart/create_mixin.dart';
 import 'package:analysis_server/src/services/correction/dart/create_no_such_method.dart';
 import 'package:analysis_server/src/services/correction/dart/create_setter.dart';
+import 'package:analysis_server/src/services/correction/dart/data_driven.dart';
 import 'package:analysis_server/src/services/correction/dart/extend_class_for_mixin.dart';
 import 'package:analysis_server/src/services/correction/dart/import_library.dart';
 import 'package:analysis_server/src/services/correction/dart/inline_invocation.dart';
@@ -77,6 +79,7 @@
 import 'package:analysis_server/src/services/correction/dart/make_class_abstract.dart';
 import 'package:analysis_server/src/services/correction/dart/make_field_not_final.dart';
 import 'package:analysis_server/src/services/correction/dart/make_final.dart';
+import 'package:analysis_server/src/services/correction/dart/make_return_type_nullable.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';
@@ -115,6 +118,7 @@
 import 'package:analysis_server/src/services/correction/dart/remove_unused_parameter.dart';
 import 'package:analysis_server/src/services/correction/dart/rename_to_camel_case.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_boolean_with_bool.dart';
+import 'package:analysis_server/src/services/correction/dart/replace_cascade_with_dot.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_colon_with_equals.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_final_with_const.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_new_with_const.dart';
@@ -129,6 +133,7 @@
 import 'package:analysis_server/src/services/correction/dart/replace_with_identifier.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_with_interpolation.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_with_is_empty.dart';
+import 'package:analysis_server/src/services/correction/dart/replace_with_not_null_aware.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_with_null_aware.dart';
 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';
@@ -152,7 +157,6 @@
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     hide AnalysisError, Element, ElementKind;
-import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart' hide FixContributor;
 
@@ -300,9 +304,14 @@
       RemoveTypeAnnotation.newInstance,
     ],
     LintNames.avoid_returning_null_for_future: [
-      AddSync.newInstance,
+      AddAsync.newInstance,
       WrapInFuture.newInstance,
     ],
+    LintNames.avoid_single_cascade_in_expression_statements: [
+      // TODO(brianwilkerson) This fix should be applied to some non-lint
+      //  diagnostics and should also be available as an assist.
+      ReplaceCascadeWithDot.newInstance,
+    ],
     LintNames.avoid_types_as_parameter_names: [
       ConvertToOnType.newInstance,
     ],
@@ -451,7 +460,7 @@
       RemoveInterpolationBraces.newInstance,
     ],
     LintNames.unnecessary_const: [
-      RemoveUnnecesaryConst.newInstance,
+      RemoveUnnecessaryConst.newInstance,
     ],
     LintNames.unnecessary_lambdas: [
       ReplaceWithTearOff.newInstance,
@@ -484,6 +493,9 @@
   /// generators used for lint rules are in the [lintMultiProducerMap].
   static const Map<ErrorCode, List<MultiProducerGenerator>>
       nonLintMultiProducerMap = {
+    CompileTimeErrorCode.CAST_TO_NON_TYPE: [
+      ImportLibrary.forType,
+    ],
     CompileTimeErrorCode.CONST_WITH_NON_TYPE: [
       ImportLibrary.forType,
     ],
@@ -506,6 +518,9 @@
     CompileTimeErrorCode.MIXIN_OF_NON_CLASS: [
       ImportLibrary.forType,
     ],
+    CompileTimeErrorCode.NEW_WITH_NON_TYPE: [
+      ImportLibrary.forType,
+    ],
     CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT: [
       AddSuperConstructorInvocation.newInstance,
     ],
@@ -513,6 +528,18 @@
       AddSuperConstructorInvocation.newInstance,
       CreateConstructorSuper.newInstance,
     ],
+    CompileTimeErrorCode.NON_TYPE_IN_CATCH_CLAUSE: [
+      ImportLibrary.forType,
+    ],
+    CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT: [
+      ImportLibrary.forType,
+    ],
+    CompileTimeErrorCode.NOT_A_TYPE: [
+      ImportLibrary.forType,
+    ],
+    CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME: [
+      ImportLibrary.forType,
+    ],
     CompileTimeErrorCode.UNDEFINED_ANNOTATION: [
       ImportLibrary.forTopLevelVariable,
       ImportLibrary.forType,
@@ -523,60 +550,68 @@
     CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT: [
       AddSuperConstructorInvocation.newInstance,
     ],
+    CompileTimeErrorCode.UNDEFINED_FUNCTION: [
+      ImportLibrary.forExtension,
+      ImportLibrary.forFunction,
+      ImportLibrary.forType,
+    ],
+    CompileTimeErrorCode.UNDEFINED_GETTER: [
+      ImportLibrary.forTopLevelVariable,
+      ImportLibrary.forType,
+    ],
+    CompileTimeErrorCode.UNDEFINED_IDENTIFIER: [
+      ImportLibrary.forExtension,
+      ImportLibrary.forFunction,
+      ImportLibrary.forTopLevelVariable,
+      ImportLibrary.forType,
+    ],
+    CompileTimeErrorCode.UNDEFINED_METHOD: [
+      ImportLibrary.forFunction,
+      ImportLibrary.forType,
+    ],
     CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER: [
       ChangeArgumentName.newInstance,
     ],
+    HintCode.DEPRECATED_MEMBER_USE: [
+      DataDriven.newInstance,
+    ],
+    HintCode.DEPRECATED_MEMBER_USE_WITH_MESSAGE: [
+      DataDriven.newInstance,
+    ],
     HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE: [
       ImportLibrary.dartAsync,
     ],
-    StaticWarningCode.CAST_TO_NON_TYPE: [
-      ImportLibrary.forType,
-    ],
-    StaticWarningCode.NEW_WITH_NON_TYPE: [
-      ImportLibrary.forType,
-    ],
-    StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE: [
-      ImportLibrary.forType,
-    ],
-    StaticWarningCode.NOT_A_TYPE: [
-      ImportLibrary.forType,
-    ],
-    StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME: [
-      ImportLibrary.forType,
-    ],
-    StaticWarningCode.UNDEFINED_IDENTIFIER: [
-      ImportLibrary.forExtension,
-      ImportLibrary.forFunction,
-      ImportLibrary.forTopLevelVariable,
-      ImportLibrary.forType,
-    ],
-    StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT: [
-      ImportLibrary.forType,
-    ],
-    StaticTypeWarningCode.UNDEFINED_FUNCTION: [
-      ImportLibrary.forExtension,
-      ImportLibrary.forFunction,
-      ImportLibrary.forType,
-    ],
-    StaticTypeWarningCode.UNDEFINED_GETTER: [
-      ImportLibrary.forTopLevelVariable,
-      ImportLibrary.forType,
-    ],
-    StaticTypeWarningCode.UNDEFINED_METHOD: [
-      ImportLibrary.forFunction,
-      ImportLibrary.forType,
-    ],
   };
 
   /// A map from error codes to a list of generators used to create the
   /// correction producers used to build fixes for those diagnostics. The
   /// generators used for lint rules are in the [lintProducerMap].
   static const Map<ErrorCode, List<ProducerGenerator>> nonLintProducerMap = {
+    CompileTimeErrorCode.ASSIGNMENT_TO_FINAL: [
+      MakeFieldNotFinal.newInstance,
+    ],
+    CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL: [
+      MakeVariableNotFinal.newInstance,
+    ],
+    CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE: [
+      AddNullCheck.newInstance,
+      WrapInText.newInstance,
+    ],
     CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT: [
-      AddSync.newInstance,
+      AddAsync.newInstance,
     ],
     CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT: [
-      AddSync.newInstance,
+      AddAsync.newInstance,
+    ],
+    CompileTimeErrorCode.CAST_TO_NON_TYPE: [
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
+      CreateMixin.newInstance,
+    ],
+    CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER: [
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
     ],
     CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE: [
       UseConst.newInstance,
@@ -607,6 +642,22 @@
       CreateConstructor.newInstance,
       ConvertToNamedArguments.newInstance,
     ],
+    CompileTimeErrorCode.FINAL_NOT_INITIALIZED: [
+      AddLate.newInstance,
+      CreateConstructorForFinalFields.newInstance,
+    ],
+    CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1: [
+      AddFieldFormalParameters.newInstance,
+    ],
+    CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2: [
+      AddFieldFormalParameters.newInstance,
+    ],
+    CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS: [
+      AddFieldFormalParameters.newInstance,
+    ],
+    CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE: [
+      ReplaceReturnTypeFuture.newInstance,
+    ],
     CompileTimeErrorCode.IMPLEMENTS_NON_CLASS: [
       ChangeTo.classOrMixin,
       CreateClass.newInstance,
@@ -614,6 +665,9 @@
     CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD: [
       CreateField.newInstance,
     ],
+    CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER: [
+      ChangeToStaticAccess.newInstance,
+    ],
     CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE: [
       ChangeToNearestPreciseValue.newInstance,
     ],
@@ -621,6 +675,14 @@
       ChangeTo.annotation,
       CreateClass.newInstance,
     ],
+    CompileTimeErrorCode.INVALID_ASSIGNMENT: [
+      AddExplicitCast.newInstance,
+      AddNullCheck.newInstance,
+      ChangeTypeAnnotation.newInstance,
+    ],
+    CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION: [
+      RemoveParenthesesInGetterInvocation.newInstance,
+    ],
     CompileTimeErrorCode.MISSING_DEFAULT_VALUE_FOR_PARAMETER: [
       AddRequiredKeyword.newInstance,
     ],
@@ -631,6 +693,50 @@
       ChangeTo.classOrMixin,
       CreateClass.newInstance,
     ],
+    CompileTimeErrorCode.NEW_WITH_NON_TYPE: [
+      ChangeTo.classOrMixin,
+    ],
+    CompileTimeErrorCode.NEW_WITH_UNDEFINED_CONSTRUCTOR: [
+      CreateConstructor.newInstance,
+    ],
+    CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS:
+        [
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
+    ],
+    CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR: [
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
+    ],
+    CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE: [
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
+    ],
+    CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE: [
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
+    ],
+    CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO: [
+      CreateMissingOverrides.newInstance,
+      CreateNoSuchMethod.newInstance,
+      MakeClassAbstract.newInstance,
+    ],
+    CompileTimeErrorCode.NON_BOOL_CONDITION: [
+      AddNeNull.newInstance,
+    ],
+    CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT: [
+      CreateClass.newInstance,
+      CreateMixin.newInstance,
+    ],
+    CompileTimeErrorCode.NOT_A_TYPE: [
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
+      CreateMixin.newInstance,
+    ],
     CompileTimeErrorCode.NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD: [
       AddLate.newInstance,
     ],
@@ -646,6 +752,17 @@
     CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE: [
       RemoveQuestionMark.newInstance,
     ],
+    CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION: [
+      MakeReturnTypeNullable.newInstance,
+    ],
+    CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD: [
+      MakeReturnTypeNullable.newInstance,
+    ],
+    CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME: [
+      ChangeTo.classOrMixin,
+      CreateClass.newInstance,
+      CreateMixin.newInstance,
+    ],
     CompileTimeErrorCode.UNDEFINED_ANNOTATION: [
       ChangeTo.annotation,
       CreateClass.newInstance,
@@ -655,6 +772,9 @@
       CreateClass.newInstance,
       CreateMixin.newInstance,
     ],
+    CompileTimeErrorCode.UNDEFINED_CLASS_BOOLEAN: [
+      ReplaceBooleanWithBool.newInstance,
+    ],
     CompileTimeErrorCode.UNDEFINED_EXTENSION_GETTER: [
       ChangeTo.getterOrSetter,
       CreateGetter.newInstance,
@@ -667,11 +787,55 @@
       ChangeTo.getterOrSetter,
       CreateSetter.newInstance,
     ],
+    CompileTimeErrorCode.UNDEFINED_FUNCTION: [
+      ChangeTo.function,
+      CreateClass.newInstance,
+      CreateFunction.newInstance,
+    ],
+    CompileTimeErrorCode.UNDEFINED_GETTER: [
+      ChangeTo.getterOrSetter,
+      CreateClass.newInstance,
+      CreateField.newInstance,
+      CreateGetter.newInstance,
+      CreateLocalVariable.newInstance,
+      CreateMethodOrFunction.newInstance,
+      CreateMixin.newInstance,
+    ],
+    CompileTimeErrorCode.UNDEFINED_IDENTIFIER: [
+      ChangeTo.getterOrSetter,
+      CreateClass.newInstance,
+      CreateField.newInstance,
+      CreateGetter.newInstance,
+      CreateLocalVariable.newInstance,
+      CreateMethodOrFunction.newInstance,
+      CreateMixin.newInstance,
+      CreateSetter.newInstance,
+    ],
+    CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT: [
+      AddAsync.newInstance,
+    ],
+    CompileTimeErrorCode.UNDEFINED_METHOD: [
+      ChangeTo.method,
+      CreateClass.newInstance,
+      CreateFunction.newInstance,
+      CreateMethod.method,
+    ],
     CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER: [
       AddMissingParameterNamed.newInstance,
       ConvertFlutterChild.newInstance,
       ConvertFlutterChildren.newInstance,
     ],
+    CompileTimeErrorCode.UNDEFINED_SETTER: [
+      ChangeTo.getterOrSetter,
+      CreateField.newInstance,
+      CreateSetter.newInstance,
+    ],
+    CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER: [
+      // TODO(brianwilkerson) Consider adding fixes to create a field, getter,
+      //  method or setter. The existing _addFix methods would need to be
+      //  updated so that only the appropriate subset is generated.
+      QualifyReference.newInstance,
+    ],
     CompileTimeErrorCode
         .UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE: [
       // TODO(brianwilkerson) Consider adding fixes to create a field, getter,
@@ -682,6 +846,13 @@
     CompileTimeErrorCode.URI_DOES_NOT_EXIST: [
       CreateFile.newInstance,
     ],
+    CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR: [
+      MoveTypeArgumentsToClass.newInstance,
+      RemoveTypeArguments.newInstance,
+    ],
+    CompileTimeErrorCode.YIELD_OF_INVALID_TYPE: [
+      MakeReturnTypeNullable.newInstance,
+    ],
 
     HintCode.CAN_BE_NULL_AFTER_NULL_AWARE: [
       ReplaceWithNullAware.newInstance,
@@ -841,156 +1012,15 @@
     ParserErrorCode.VAR_AS_TYPE_NAME: [
       ReplaceVarWithDynamic.newInstance,
     ],
-    StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE: [
-      ReplaceReturnTypeFuture.newInstance,
-    ],
-    StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER: [
-      ChangeToStaticAccess.newInstance,
-    ],
-    StaticTypeWarningCode.INVALID_ASSIGNMENT: [
-      AddExplicitCast.newInstance,
-      ChangeTypeAnnotation.newInstance,
-    ],
-    StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION: [
-      RemoveParenthesesInGetterInvocation.newInstance,
-    ],
-    StaticTypeWarningCode.NON_BOOL_CONDITION: [
-      AddNeNull.newInstance,
-    ],
-    StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT: [
-      CreateClass.newInstance,
-      CreateMixin.newInstance,
-    ],
-    StaticTypeWarningCode.UNDEFINED_FUNCTION: [
-      ChangeTo.function,
-      CreateClass.newInstance,
-      CreateFunction.newInstance,
-    ],
-    StaticTypeWarningCode.UNDEFINED_GETTER: [
-      ChangeTo.getterOrSetter,
-      CreateClass.newInstance,
-      CreateField.newInstance,
-      CreateGetter.newInstance,
-      CreateLocalVariable.newInstance,
-      CreateMethodOrFunction.newInstance,
-      CreateMixin.newInstance,
-    ],
-    StaticTypeWarningCode.UNDEFINED_METHOD: [
-      ChangeTo.method,
-      CreateClass.newInstance,
-      CreateFunction.newInstance,
-      CreateMethod.method,
-    ],
-    StaticTypeWarningCode.UNDEFINED_SETTER: [
-      ChangeTo.getterOrSetter,
-      CreateField.newInstance,
-      CreateSetter.newInstance,
-    ],
-    StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR: [
-      MoveTypeArgumentsToClass.newInstance,
-      RemoveTypeArguments.newInstance,
-    ],
-    StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER: [
-      // TODO(brianwilkerson) Consider adding fixes to create a field, getter,
-      //  method or setter. The existing _addFix methods would need to be
-      //  updated so that only the appropriate subset is generated.
-      QualifyReference.newInstance,
-    ],
-    StaticWarningCode.ASSIGNMENT_TO_FINAL: [
-      MakeFieldNotFinal.newInstance,
-    ],
-    StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL: [
-      MakeVariableNotFinal.newInstance,
-    ],
-    StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE: [
-      WrapInText.newInstance,
-    ],
-    StaticWarningCode.CAST_TO_NON_TYPE: [
-      ChangeTo.classOrMixin,
-      CreateClass.newInstance,
-      CreateMixin.newInstance,
-    ],
-    StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER: [
-      CreateMissingOverrides.newInstance,
-      CreateNoSuchMethod.newInstance,
-      MakeClassAbstract.newInstance,
-    ],
     StaticWarningCode.DEAD_NULL_AWARE_EXPRESSION: [
       RemoveDeadIfNull.newInstance,
     ],
-    StaticWarningCode.FINAL_NOT_INITIALIZED: [
-      AddLate.newInstance,
-      CreateConstructorForFinalFields.newInstance,
-    ],
-    StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1: [
-      AddFieldFormalParameters.newInstance,
-    ],
-    StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2: [
-      AddFieldFormalParameters.newInstance,
-    ],
-    StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS: [
-      AddFieldFormalParameters.newInstance,
+    StaticWarningCode.INVALID_NULL_AWARE_OPERATOR: [
+      ReplaceWithNotNullAware.newInstance,
     ],
     StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH: [
       AddMissingEnumCaseClauses.newInstance,
     ],
-    StaticWarningCode.NEW_WITH_NON_TYPE: [
-      ChangeTo.classOrMixin,
-    ],
-    StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR: [
-      CreateConstructor.newInstance,
-    ],
-    StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS: [
-      CreateMissingOverrides.newInstance,
-      CreateNoSuchMethod.newInstance,
-      MakeClassAbstract.newInstance,
-    ],
-    StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR: [
-      CreateMissingOverrides.newInstance,
-      CreateNoSuchMethod.newInstance,
-      MakeClassAbstract.newInstance,
-    ],
-    StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE: [
-      CreateMissingOverrides.newInstance,
-      CreateNoSuchMethod.newInstance,
-      MakeClassAbstract.newInstance,
-    ],
-    StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE: [
-      CreateMissingOverrides.newInstance,
-      CreateNoSuchMethod.newInstance,
-      MakeClassAbstract.newInstance,
-    ],
-    StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO: [
-      CreateMissingOverrides.newInstance,
-      CreateNoSuchMethod.newInstance,
-      MakeClassAbstract.newInstance,
-    ],
-    StaticWarningCode.NOT_A_TYPE: [
-      ChangeTo.classOrMixin,
-      CreateClass.newInstance,
-      CreateMixin.newInstance,
-    ],
-    StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME: [
-      ChangeTo.classOrMixin,
-      CreateClass.newInstance,
-      CreateMixin.newInstance,
-    ],
-    StaticWarningCode.UNDEFINED_CLASS_BOOLEAN: [
-      ReplaceBooleanWithBool.newInstance,
-    ],
-    StaticWarningCode.UNDEFINED_IDENTIFIER: [
-      ChangeTo.getterOrSetter,
-      CreateClass.newInstance,
-      CreateField.newInstance,
-      CreateGetter.newInstance,
-      CreateLocalVariable.newInstance,
-      CreateMethodOrFunction.newInstance,
-      CreateMixin.newInstance,
-      CreateSetter.newInstance,
-    ],
-    StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT: [
-      AddSync.newInstance,
-    ],
   };
 
   final DartFixContext fixContext;
@@ -1044,7 +1074,7 @@
 
     Future<void> compute(CorrectionProducer producer) async {
       producer.configure(context);
-      var builder = DartChangeBuilderImpl.forWorkspace(context.workspace);
+      var builder = ChangeBuilder(workspace: context.workspace);
       await producer.compute(builder);
       _addFixFromBuilder(builder, producer.fixKind,
           args: producer.fixArguments);
diff --git a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
index 8d134df..a06b069 100644
--- a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
+++ b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
@@ -198,7 +198,7 @@
     }
   } else if (expression is IndexExpression) {
     name = _getBaseNameFromExpression(expression.realTarget);
-    if (name.endsWith('s')) {
+    if (name != null && name.endsWith('s')) {
       name = name.substring(0, name.length - 1);
     }
   }
diff --git a/pkg/analysis_server/lib/src/services/flutter/property.dart b/pkg/analysis_server/lib/src/services/flutter/property.dart
index 427141a..740ff85 100644
--- a/pkg/analysis_server/lib/src/services/flutter/property.dart
+++ b/pkg/analysis_server/lib/src/services/flutter/property.dart
@@ -13,6 +13,7 @@
 import 'package:analyzer/source/source_range.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/util/comment.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -105,7 +106,7 @@
       return parent._edgeInsetsProperty.changeValue(this, value);
     }
 
-    var changeBuilder = DartChangeBuilder(resolvedUnit.session);
+    var builder = ChangeBuilder(session: resolvedUnit.session);
 
     ClassElement enumClassElement;
     var enumValue = value.enumValue;
@@ -117,7 +118,7 @@
       );
     }
 
-    await changeBuilder.addFileEdit(resolvedUnit.path, (builder) {
+    await builder.addDartFileEdit(resolvedUnit.path, (builder) {
       _changeCode(builder, (builder) {
         if (value.expression != null) {
           builder.write(value.expression);
@@ -133,11 +134,11 @@
       _formatEnclosingFunctionBody(builder);
     });
 
-    return changeBuilder.sourceChange;
+    return builder.sourceChange;
   }
 
   Future<protocol.SourceChange> removeValue() async {
-    var changeBuilder = DartChangeBuilder(resolvedUnit.session);
+    var builder = ChangeBuilder(session: resolvedUnit.session);
 
     if (argumentExpression != null) {
       int endOffset;
@@ -151,14 +152,14 @@
       }
 
       var beginOffset = argumentExpression.offset;
-      await changeBuilder.addFileEdit(resolvedUnit.path, (builder) {
+      await builder.addDartFileEdit(resolvedUnit.path, (builder) {
         builder.addDeletion(
           SourceRange(beginOffset, endOffset - beginOffset),
         );
       });
     }
 
-    return changeBuilder.sourceChange;
+    return builder.sourceChange;
   }
 
   void replaceChild(String name, PropertyDescription newChild) {
@@ -526,9 +527,9 @@
       return property.removeValue();
     }
 
-    var changeBuilder = DartChangeBuilder(property.resolvedUnit.session);
+    var builder = ChangeBuilder(session: property.resolvedUnit.session);
 
-    await changeBuilder.addFileEdit(property.resolvedUnit.path, (builder) {
+    await builder.addDartFileEdit(property.resolvedUnit.path, (builder) {
       property._changeCode(builder, (builder) {
         if (leftCode == rightCode && topCode == bottomCode) {
           builder.writeReference(classEdgeInsets);
@@ -592,7 +593,7 @@
       property._formatEnclosingFunctionBody(builder);
     });
 
-    return changeBuilder.sourceChange;
+    return builder.sourceChange;
   }
 
   PropertyDescription _addNestedProperty({
diff --git a/pkg/analysis_server/lib/src/services/flutter/widget_descriptions.dart b/pkg/analysis_server/lib/src/services/flutter/widget_descriptions.dart
index 174a9a2..6476f46 100644
--- a/pkg/analysis_server/lib/src/services/flutter/widget_descriptions.dart
+++ b/pkg/analysis_server/lib/src/services/flutter/widget_descriptions.dart
@@ -131,9 +131,6 @@
   /// The offset of the widget expression.
   final int widgetOffset;
 
-  /// The instance of [Flutter] support.
-  final Flutter flutter;
-
   ClassElement _classAlignment;
   ClassElement _classAlignmentDirectional;
   ClassElement _classContainer;
@@ -143,11 +140,13 @@
     this.classRegistry,
     this.resolvedUnit,
     this.widgetOffset,
-  ) : flutter = Flutter.of(resolvedUnit);
+  );
+
+  Flutter get _flutter => Flutter.instance;
 
   Future<_WidgetDescription> compute() async {
     var node = NodeLocator2(widgetOffset).searchWithin(resolvedUnit.unit);
-    var instanceCreation = flutter.identifyNewExpression(node);
+    var instanceCreation = _flutter.identifyNewExpression(node);
     if (instanceCreation == null) {
       return null;
     }
@@ -173,7 +172,7 @@
     List<PropertyDescription> properties,
     InstanceCreationExpression widgetCreation,
   ) {
-    if (!flutter.isWidgetCreation(widgetCreation)) {
+    if (!_flutter.isWidgetCreation(widgetCreation)) {
       return;
     }
 
@@ -190,7 +189,7 @@
     }
 
     PropertyDescription containerProperty;
-    if (flutter.isExactlyContainerCreation(parentCreation)) {
+    if (_flutter.isExactlyContainerCreation(parentCreation)) {
       containerProperty = PropertyDescription(
         resolvedUnit: resolvedUnit,
         instanceCreation: parentCreation,
@@ -236,9 +235,9 @@
         classDescription: containerDescription,
       );
 
-      if (flutter.isExactlyAlignCreation(parentCreation) &&
-          flutter.findNamedArgument(parentCreation, 'widthFactor') == null &&
-          flutter.findNamedArgument(parentCreation, 'heightFactor') == null) {
+      if (_flutter.isExactlyAlignCreation(parentCreation) &&
+          _flutter.findNamedArgument(parentCreation, 'widthFactor') == null &&
+          _flutter.findNamedArgument(parentCreation, 'heightFactor') == null) {
         _replaceNestedContainerProperty(
           containerProperty,
           parentCreation,
@@ -246,7 +245,7 @@
         );
       }
 
-      if (flutter.isExactlyPaddingCreation(parentCreation)) {
+      if (_flutter.isExactlyPaddingCreation(parentCreation)) {
         _replaceNestedContainerProperty(
           containerProperty,
           parentCreation,
@@ -347,7 +346,7 @@
     var propertyDescription = PropertyDescription(
       parent: parent,
       resolvedUnit: resolvedUnit,
-      flutter: flutter,
+      flutter: _flutter,
       classDescription: classDescription,
       instanceCreation: instanceCreation,
       argumentExpression: argumentExpression,
@@ -366,7 +365,7 @@
     );
     properties.add(propertyDescription);
 
-    if (flutter.isExactEdgeInsetsGeometryType(parameter.type)) {
+    if (_flutter.isExactEdgeInsetsGeometryType(parameter.type)) {
       propertyDescription.addEdgeInsetsNestedProperties(_classEdgeInsets);
     } else if (valueExpression is InstanceCreationExpression) {
       var type = valueExpression.staticType;
@@ -414,19 +413,19 @@
   Future<void> _fetchClassElements() async {
     var sessionHelper = AnalysisSessionHelper(resolvedUnit.session);
     _classAlignment = await sessionHelper.getClass(
-      flutter.widgetsUri,
+      _flutter.widgetsUri,
       'Alignment',
     );
     _classAlignmentDirectional = await sessionHelper.getClass(
-      flutter.widgetsUri,
+      _flutter.widgetsUri,
       'AlignmentDirectional',
     );
     _classContainer = await sessionHelper.getClass(
-      flutter.widgetsUri,
+      _flutter.widgetsUri,
       'Container',
     );
     _classEdgeInsets = await sessionHelper.getClass(
-      flutter.widgetsUri,
+      _flutter.widgetsUri,
       'EdgeInsets',
     );
   }
@@ -460,7 +459,7 @@
           enumItems: _enumItemsForEnum(classElement),
         );
       }
-      if (flutter.isExactAlignmentGeometry(classElement)) {
+      if (_flutter.isExactAlignmentGeometry(classElement)) {
         var items = <protocol.FlutterWidgetPropertyValueEnumItem>[];
         items.addAll(
           _enumItemsForStaticFields(_classAlignment),
@@ -484,7 +483,7 @@
     InstanceCreationExpression parentCreation,
     String name,
   ) {
-    var argument = flutter.findNamedArgument(parentCreation, name);
+    var argument = _flutter.findNamedArgument(parentCreation, name);
     if (argument != null) {
       var replacements = <PropertyDescription>[];
       _addProperty(
@@ -536,8 +535,8 @@
         if (field is FieldElement && field.isStatic) {
           var enclosingClass = field.enclosingElement as ClassElement;
           if (field.isEnumConstant ||
-              flutter.isExactAlignment(enclosingClass) ||
-              flutter.isExactAlignmentDirectional(enclosingClass)) {
+              _flutter.isExactAlignment(enclosingClass) ||
+              _flutter.isExactAlignmentDirectional(enclosingClass)) {
             return protocol.FlutterWidgetPropertyValue(
               enumValue: _toEnumItem(field),
             );
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 4b2883f..c291cc2 100644
--- a/pkg/analysis_server/lib/src/services/linter/lint_names.dart
+++ b/pkg/analysis_server/lib/src/services/linter/lint_names.dart
@@ -23,6 +23,8 @@
       'avoid_return_types_on_setters';
   static const String avoid_returning_null_for_future =
       'avoid_returning_null_for_future';
+  static const String avoid_single_cascade_in_expression_statements =
+      'avoid_single_cascade_in_expression_statements';
   static const String avoid_types_as_parameter_names =
       'avoid_types_as_parameter_names';
   static const String avoid_types_on_closure_parameters =
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart
index 6726707..d608269 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart
@@ -24,6 +24,7 @@
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart' show SourceRange;
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -37,7 +38,6 @@
   final int length;
 
   CorrectionUtils utils;
-  Flutter flutter;
 
   ClassElement classBuildContext;
   ClassElement classKey;
@@ -78,7 +78,6 @@
       this.searchEngine, this.resolveResult, this.offset, this.length)
       : sessionHelper = AnalysisSessionHelper(resolveResult.session) {
     utils = CorrectionUtils(resolveResult);
-    flutter = Flutter.of(resolveResult);
   }
 
   @override
@@ -90,6 +89,8 @@
     return resolveResult.unit.featureSet;
   }
 
+  Flutter get _flutter => Flutter.instance;
+
   bool get _isNonNullable => _featureSet.isEnabled(Feature.non_nullable);
 
   @override
@@ -142,8 +143,8 @@
 
   @override
   Future<SourceChange> createChange() async {
-    var changeBuilder = DartChangeBuilder(sessionHelper.session);
-    await changeBuilder.addFileEdit(resolveResult.path, (builder) {
+    var builder = ChangeBuilder(session: sessionHelper.session);
+    await builder.addDartFileEdit(resolveResult.path, (builder) {
       if (_expression != null) {
         builder.addReplacement(range.node(_expression), (builder) {
           _writeWidgetInstantiation(builder);
@@ -161,7 +162,7 @@
 
       _writeWidgetDeclaration(builder);
     });
-    return changeBuilder.sourceChange;
+    return builder.sourceChange;
   }
 
   @override
@@ -184,8 +185,8 @@
     _enclosingClassElement = _enclosingClassNode?.declaredElement;
 
     // new MyWidget(...)
-    var newExpression = flutter.identifyNewExpression(node);
-    if (flutter.isWidgetCreation(newExpression)) {
+    var newExpression = _flutter.identifyNewExpression(node);
+    if (_flutter.isWidgetCreation(newExpression)) {
       _expression = newExpression;
       return RefactoringStatus();
     }
@@ -203,7 +204,7 @@
       if (statements.isNotEmpty) {
         var lastStatement = statements.last;
         if (lastStatement is ReturnStatement &&
-            flutter.isWidgetExpression(lastStatement.expression)) {
+            _flutter.isWidgetExpression(lastStatement.expression)) {
           _statements = statements;
           _statementsRange = range.startEnd(statements.first, statements.last);
           return RefactoringStatus();
@@ -221,7 +222,7 @@
       }
       if (node is MethodDeclaration) {
         var returnType = node.returnType?.type;
-        if (flutter.isWidgetType(returnType) && node.body != null) {
+        if (_flutter.isWidgetType(returnType) && node.body != null) {
           _method = node;
           return RefactoringStatus();
         }
@@ -238,10 +239,10 @@
     var result = RefactoringStatus();
 
     Future<ClassElement> getClass(String name) async {
-      var element = await sessionHelper.getClass(flutter.widgetsUri, name);
+      var element = await sessionHelper.getClass(_flutter.widgetsUri, name);
       if (element == null) {
         result.addFatalError(
-          "Unable to find '$name' in ${flutter.widgetsUri}",
+          "Unable to find '$name' in ${_flutter.widgetsUri}",
         );
       }
       return element;
diff --git a/pkg/analysis_server/lib/src/services/refactoring/move_file.dart b/pkg/analysis_server/lib/src/services/refactoring/move_file.dart
index 5de7725..614cc5d 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/move_file.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/move_file.dart
@@ -66,7 +66,7 @@
 
   @override
   Future<SourceChange> createChange() async {
-    var changeBuilder = ChangeBuilder();
+    var changeBuilder = ChangeBuilder(session: resolvedUnit.session);
     var element = resolvedUnit.unit.declaredElement;
     if (element == null) {
       return changeBuilder.sourceChange;
@@ -88,7 +88,7 @@
               .where(
                   (po) => po.uri != null && _isRelativeUri(po.uri.stringValue));
           if (partOfs.isNotEmpty) {
-            await changeBuilder.addFileEdit(
+            await changeBuilder.addDartFileEdit(
                 result.unit.declaredElement.source.fullName, (builder) {
               partOfs.forEach((po) {
                 final oldDir = pathContext.dirname(oldFile);
@@ -107,7 +107,7 @@
         }
       }
 
-      await changeBuilder.addFileEdit(definingUnitResult.path, (builder) {
+      await changeBuilder.addDartFileEdit(definingUnitResult.path, (builder) {
         var oldDir = pathContext.dirname(oldFile);
         var newDir = pathContext.dirname(newFile);
         for (var directive in definingUnitResult.unit.directives) {
@@ -123,7 +123,7 @@
           .where((po) => po.uri != null && _isRelativeUri(po.uri.stringValue));
 
       if (partOfs.isNotEmpty) {
-        await changeBuilder.addFileEdit(element.source.fullName, (builder) {
+        await changeBuilder.addDartFileEdit(element.source.fullName, (builder) {
           partOfs.forEach((po) {
             final oldDir = pathContext.dirname(oldFile);
             final newDir = pathContext.dirname(newFile);
@@ -141,7 +141,7 @@
         await refactoringWorkspace.searchEngine.searchReferences(element);
     var references = getSourceReferences(matches);
     for (var reference in references) {
-      await changeBuilder.addFileEdit(reference.file, (builder) {
+      await changeBuilder.addDartFileEdit(reference.file, (builder) {
         var newUri = _computeNewUri(reference);
         builder.addSimpleReplacement(reference.range, "'$newUri'");
       });
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart
index b3c18ef..b8d9705 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart
@@ -141,8 +141,7 @@
   }
 
   void _findFlutterStateClass() {
-    var flutter = Flutter.of(resolvedUnit);
-    if (flutter.isStatefulWidgetDeclaration(element)) {
+    if (Flutter.instance.isStatefulWidgetDeclaration(element)) {
       var oldStateName = oldName + 'State';
       _flutterWidgetState = element.library.getType(oldStateName) ??
           element.library.getType('_' + oldStateName);
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index 38470ac..de1b34ac 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -441,7 +441,6 @@
   String describe(AnalysisOptionsImpl options) {
     var b = StringBuffer();
 
-    b.write(writeOption('Strong mode', options.strongMode));
     b.write(writeOption('Implicit dynamic', options.implicitDynamic));
     b.write(writeOption('Implicit casts', options.implicitCasts));
     b.write(writeOption('Feature set', options.contextFeatures.toString()));
@@ -1357,7 +1356,7 @@
         var firstTime = lintRegistry.getTimer(first).elapsedMilliseconds;
         var secondTime = lintRegistry.getTimer(second).elapsedMilliseconds;
         if (firstTime == secondTime) {
-          return first.lintCode.name.compareTo(second.lintCode.name);
+          return first.name.compareTo(second.name);
         }
         return secondTime - firstTime;
       });
@@ -1365,7 +1364,7 @@
       _writeRow(['Lint code', 'Time (in ms)'], header: true);
       for (var rule in rules) {
         var time = lintRegistry.getTimer(rule).elapsedMilliseconds;
-        _writeRow([rule.lintCode.name, printMilliseconds(time)]);
+        _writeRow([rule.name, printMilliseconds(time)]);
       }
       buf.write('</table>');
     }
diff --git a/pkg/analysis_server/lib/src/utilities/flutter.dart b/pkg/analysis_server/lib/src/utilities/flutter.dart
index 0a9b690..d5a48c5 100644
--- a/pkg/analysis_server/lib/src/utilities/flutter.dart
+++ b/pkg/analysis_server/lib/src/utilities/flutter.dart
@@ -3,79 +3,55 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/utilities/strings.dart';
-import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 
 class Flutter {
+  static final Flutter instance = Flutter();
+
   static const _nameAlign = 'Align';
   static const _nameCenter = 'Center';
   static const _nameContainer = 'Container';
   static const _namePadding = 'Padding';
+  static const _nameSizedBox = 'SizedBox';
   static const _nameState = 'State';
   static const _nameStatefulWidget = 'StatefulWidget';
   static const _nameStatelessWidget = 'StatelessWidget';
   static const _nameStreamBuilder = 'StreamBuilder';
   static const _nameWidget = 'Widget';
 
-  static final mobile = Flutter._('flutter', 'package:flutter');
-  static final web = Flutter._('flutter_web', 'package:flutter_web');
+  final String widgetsUri = 'package:flutter/widgets.dart';
 
-  static final _uriFlutterMobileWidgets =
-      Uri.parse('package:flutter/widgets.dart');
-
-  static final _uriFlutterWebWidgets =
-      Uri.parse('package:flutter_web/widgets.dart');
-
-  final String packageName;
-  final String widgetsUri;
-
-  final Uri _uriAlignment;
-  final Uri _uriAsync;
-  final Uri _uriBasic;
-  final Uri _uriContainer;
-  final Uri _uriEdgeInsets;
-  final Uri _uriFramework;
-  final Uri _uriWidgetsIcon;
-  final Uri _uriWidgetsText;
-
-  factory Flutter.of(ResolvedUnitResult resolvedUnit) {
-    var uriConverter = resolvedUnit.session.uriConverter;
-    var isMobile = uriConverter.uriToPath(_uriFlutterMobileWidgets) != null;
-    var isWeb = uriConverter.uriToPath(_uriFlutterWebWidgets) != null;
-
-    if (isMobile && isWeb) {
-      var visitor = _IdentifyMobileOrWeb();
-      resolvedUnit.unit.accept(visitor);
-      isMobile = visitor.isMobile;
-      isWeb = visitor.isWeb;
-    }
-
-    if (isMobile) {
-      return mobile;
-    }
-
-    if (isWeb) {
-      return web;
-    }
-
-    return mobile;
-  }
-
-  Flutter._(this.packageName, String uriPrefix)
-      : widgetsUri = '$uriPrefix/widgets.dart',
-        _uriAlignment = Uri.parse('$uriPrefix/src/painting/alignment.dart'),
-        _uriAsync = Uri.parse('$uriPrefix/src/widgets/async.dart'),
-        _uriBasic = Uri.parse('$uriPrefix/src/widgets/basic.dart'),
-        _uriContainer = Uri.parse('$uriPrefix/src/widgets/container.dart'),
-        _uriEdgeInsets = Uri.parse('$uriPrefix/src/painting/edge_insets.dart'),
-        _uriFramework = Uri.parse('$uriPrefix/src/widgets/framework.dart'),
-        _uriWidgetsIcon = Uri.parse('$uriPrefix/src/widgets/icon.dart'),
-        _uriWidgetsText = Uri.parse('$uriPrefix/src/widgets/text.dart');
+  final Uri _uriAlignment = Uri.parse(
+    'package:flutter/src/painting/alignment.dart',
+  );
+  final Uri _uriAsync = Uri.parse(
+    'package:flutter/src/widgets/async.dart',
+  );
+  final Uri _uriBasic = Uri.parse(
+    'package:flutter/src/widgets/basic.dart',
+  );
+  final Uri _uriContainer = Uri.parse(
+    'package:flutter/src/widgets/container.dart',
+  );
+  final Uri _uriDiagnostics = Uri.parse(
+    'package:flutter/src/foundation/diagnostics.dart',
+  );
+  final Uri _uriEdgeInsets = Uri.parse(
+    'package:flutter/src/painting/edge_insets.dart',
+  );
+  final Uri _uriFramework = Uri.parse(
+    'package:flutter/src/widgets/framework.dart',
+  );
+  final Uri _uriWidgetsIcon = Uri.parse(
+    'package:flutter/src/widgets/icon.dart',
+  );
+  final Uri _uriWidgetsText = Uri.parse(
+    'package:flutter/src/widgets/text.dart',
+  );
 
   /// Return the argument with the given [index], or `null` if none.
   Expression argumentByIndex(List<Expression> arguments, int index) {
@@ -365,6 +341,35 @@
     return isColorElement(type.element);
   }
 
+  /// Return `true` if the given [type] is the flutter mixin `Diagnosticable`
+  /// or its subtype.
+  bool isDiagnosticable(DartType type) {
+    if (type is! InterfaceType) {
+      return false;
+    }
+
+    bool isDiagnosticableElement(ClassElement element) {
+      if (element == null) {
+        return false;
+      }
+
+      bool isExactDiagnosticable(ClassElement element) =>
+          element?.name == 'Diagnosticable' &&
+          element.source.uri == _uriDiagnostics;
+      if (isExactDiagnosticable(element)) {
+        return true;
+      }
+      for (var type in element.allSupertypes) {
+        if (isExactDiagnosticable(type.element)) {
+          return true;
+        }
+      }
+      return false;
+    }
+
+    return isDiagnosticableElement(type.element);
+  }
+
   /// Return `true` if the [element] is the Flutter class `Alignment`.
   bool isExactAlignment(ClassElement element) {
     return _isExactWidget(element, 'Alignment', _uriAlignment);
@@ -446,6 +451,12 @@
         _isExactWidget(type.element, _namePadding, _uriBasic);
   }
 
+  /// Return `true` if the given [type] is the Flutter class `SizedBox`.
+  bool isExactWidgetTypeSizedBox(DartType type) {
+    return type is InterfaceType &&
+        _isExactWidget(type.element, _nameSizedBox, _uriBasic);
+  }
+
   /// Return `true` if the given [type] is the Flutter class `StreamBuilder`.
   bool isExactWidgetTypeStreamBuilder(DartType type) {
     return type is InterfaceType &&
@@ -460,8 +471,8 @@
         isWidgetType(type.typeArguments[0]);
   }
 
-  /// Return `true` if the given [type] is the dart.ui class `Color`, or its
-  /// subtype.
+  /// Return `true` if the given [type] is the vector_math_64 class `Matrix4`,
+  /// or its subtype.
   bool isMatrix4(DartType type) {
     if (type is! InterfaceType) {
       return false;
@@ -579,27 +590,3 @@
     return element != null && element.name == type && element.source.uri == uri;
   }
 }
-
-class _IdentifyMobileOrWeb extends GeneralizingAstVisitor<void> {
-  bool isMobile = false;
-  bool isWeb = false;
-
-  @override
-  void visitExpression(Expression node) {
-    if (isMobile || isWeb) {
-      return;
-    }
-
-    if (Flutter.mobile.isWidgetExpression(node)) {
-      isMobile = true;
-      return;
-    }
-
-    if (Flutter.web.isWidgetExpression(node)) {
-      isWeb = true;
-      return;
-    }
-
-    super.visitExpression(node);
-  }
-}
diff --git a/pkg/analysis_server/test/analysis/get_hover_test.dart b/pkg/analysis_server/test/analysis/get_hover_test.dart
index edcae43..c214da5 100644
--- a/pkg/analysis_server/test/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/analysis/get_hover_test.dart
@@ -49,6 +49,7 @@
 class B<T> extends A<T> with M1, M2<int> implements I1<int, String>, I2 {}
 ''');
     var hover = await prepareHover('B<T>');
+    expect(hover.containingClassDescription, null);
     expect(
         hover.elementDescription,
         'class B<T> extends A<T> with M1, M2<int> '
@@ -63,6 +64,7 @@
 abstract class B extends A {}
 ''');
     var hover = await prepareHover('B extends');
+    expect(hover.containingClassDescription, null);
     expect(hover.elementDescription, 'abstract class B extends A');
     expect(hover.staticType, isNull);
     expect(hover.propagatedType, isNull);
@@ -313,6 +315,7 @@
 enum MyEnum {AAA, BBB, CCC}
 ''');
     var hover = await prepareHover('MyEnum');
+    expect(hover.containingClassDescription, null);
     expect(hover.elementDescription, 'enum MyEnum');
     expect(hover.staticType, isNull);
     expect(hover.propagatedType, isNull);
@@ -325,6 +328,7 @@
 extension E on A {}
 ''');
     var hover = await prepareHover('E');
+    expect(hover.containingClassDescription, null);
     expect(hover.elementDescription, 'extension E on A');
     expect(hover.dartdoc, 'Comment');
     expect(hover.staticType, isNull);
diff --git a/pkg/analysis_server/test/analysis/notification_errors_test.dart b/pkg/analysis_server/test/analysis/notification_errors_test.dart
index db65a09..07aa487e 100644
--- a/pkg/analysis_server/test/analysis/notification_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_errors_test.dart
@@ -176,6 +176,35 @@
     expect(filesErrors[brokenFile], isNull);
   }
 
+  Future<void> test_excludedFolder() async {
+    addAnalysisOptionsFile('''
+analyzer:
+  exclude:
+    - excluded/**
+''');
+    createProject();
+    var excludedFile =
+        newFile(join(projectPath, 'excluded/broken.dart'), content: 'err').path;
+
+    // There should be no errors initially.
+    await waitForTasksFinished();
+    await pumpEventQueue(times: 5000);
+    expect(filesErrors[excludedFile], isNull);
+
+    // Triggering the file to be processed should still generate no errors.
+    await waitResponse(AnalysisGetHoverParams(excludedFile, 0).toRequest('0'));
+    await waitForTasksFinished();
+    await pumpEventQueue(times: 5000);
+    expect(filesErrors[excludedFile], isNull);
+
+    // Opening the file should still generate no errors.
+    await waitResponse(
+        AnalysisSetPriorityFilesParams([excludedFile]).toRequest('0'));
+    await waitForTasksFinished();
+    await pumpEventQueue(times: 5000);
+    expect(filesErrors[excludedFile], isNull);
+  }
+
   Future<void> test_importError() async {
     createProject();
 
@@ -397,9 +426,14 @@
   Future<void> test_StaticWarning() async {
     createProject();
     addTestFile('''
-main() {
-  final int foo;
-  print(foo);
+enum E {e1, e2}
+
+void f(E e) {
+  switch (e) {
+    case E.e1:
+      print(0);
+      break;
+  }
 }
 ''');
     await waitForTasksFinished();
@@ -407,7 +441,7 @@
     var errors = filesErrors[testFile];
     expect(errors, hasLength(1));
     var error = errors[0];
-    expect(error.severity, AnalysisErrorSeverity.ERROR);
+    expect(error.severity, AnalysisErrorSeverity.WARNING);
     expect(error.type, AnalysisErrorType.STATIC_WARNING);
   }
 }
diff --git a/pkg/analysis_server/test/analysis/notification_highlights2_test.dart b/pkg/analysis_server/test/analysis/notification_highlights2_test.dart
index 1113017..411e163 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights2_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights2_test.dart
@@ -17,7 +17,7 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(AnalysisNotificationHighlightsTest);
     defineReflectiveTests(HighlightsWithControlFlowCollectionsTest);
-    defineReflectiveTests(HighlightsWithNnbdTest);
+    defineReflectiveTests(HighlightsWithNullSafetyTest);
     defineReflectiveTests(HighlightTypeTest);
   });
 }
@@ -1297,7 +1297,7 @@
 }
 
 @reflectiveTest
-class HighlightsWithNnbdTest extends HighlightsTestSupport {
+class HighlightsWithNullSafetyTest extends HighlightsTestSupport {
   @override
   void createProject({Map<String, String> packageRoots}) {
     addAnalysisOptionsFile('''
diff --git a/pkg/analysis_server/test/analysis/notification_highlights_test.dart b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
index d35cfe3..9432795 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
@@ -17,7 +17,7 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(AnalysisNotificationHighlightsTest);
     defineReflectiveTests(HighlightsWithControlFlowCollectionsTest);
-    defineReflectiveTests(HighlightsWithNnbdTest);
+    defineReflectiveTests(HighlightsWithNullSafetyTest);
     defineReflectiveTests(HighlightTypeTest);
   });
 }
@@ -1145,7 +1145,7 @@
 }
 
 @reflectiveTest
-class HighlightsWithNnbdTest extends HighlightsTestSupport {
+class HighlightsWithNullSafetyTest extends HighlightsTestSupport {
   @override
   void createProject({Map<String, String> packageRoots}) {
     addAnalysisOptionsFile('''
diff --git a/pkg/analysis_server/test/client/completion_driver_test.dart b/pkg/analysis_server/test/client/completion_driver_test.dart
index 2311453..5ee0b8a 100644
--- a/pkg/analysis_server/test/client/completion_driver_test.dart
+++ b/pkg/analysis_server/test/client/completion_driver_test.dart
@@ -587,7 +587,6 @@
             .relevance));
   }
 
-  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/38796')
   Future<void> test_project_suggestionRelevance_constructorsAndTypes() async {
     await addProjectFile('lib/a.dart', r'''
 class A { }
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index 51e813f..b7fbb8b 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -1544,7 +1544,7 @@
   ]);
 
   AnalysisError invalid_assignment_error =
-      AnalysisError(null, 0, 1, StaticTypeWarningCode.INVALID_ASSIGNMENT, [
+      AnalysisError(null, 0, 1, CompileTimeErrorCode.INVALID_ASSIGNMENT, [
     ['x'],
     ['y']
   ]);
@@ -1591,7 +1591,7 @@
     resourceProvider.newFolder(projPath);
     // Create an SDK in the mock file system.
     MockSdk(resourceProvider: resourceProvider);
-    var sdkManager = DartSdkManager(convertPath('/sdk'));
+    var sdkManager = DartSdkManager(convertPath(sdkRoot));
     manager = ContextManagerImpl(
         resourceProvider,
         sdkManager,
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index 35894eb..715556b 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -590,12 +590,16 @@
   }
 
   Future<void> test_invocation_sdk_relevancy_on() {
-    addTestFile('main() {Map m; m.^}');
-    return getSuggestions().then((_) {
-      // Assert that the CommonUsageComputer is working
-      expect(suggestions.any((s) => s.relevance == DART_RELEVANCE_COMMON_USAGE),
-          isTrue);
-    });
+    if (!server.options.useNewRelevance) {
+      addTestFile('main() {Map m; m.^}');
+      return getSuggestions().then((_) {
+        // Assert that the CommonUsageComputer is working
+        expect(
+            suggestions.any((s) => s.relevance == DART_RELEVANCE_COMMON_USAGE),
+            isTrue);
+      });
+    }
+    return Future.value(null);
   }
 
   Future<void> test_invocation_withTrailingStmt() {
diff --git a/pkg/analysis_server/test/domain_completion_util.dart b/pkg/analysis_server/test/domain_completion_util.dart
index 424b3d0..81f936f 100644
--- a/pkg/analysis_server/test/domain_completion_util.dart
+++ b/pkg/analysis_server/test/domain_completion_util.dart
@@ -70,7 +70,9 @@
       fail('expected $expectationText, but found\n $completions');
     }
     expect(cs.kind, equals(kind));
-    expect(cs.relevance, equals(relevance));
+    if (!server.options.useNewRelevance) {
+      expect(cs.relevance, equals(relevance));
+    }
     expect(cs.selectionOffset, selectionOffset ?? completion.length);
     expect(cs.selectionLength, equals(0));
     expect(cs.isDeprecated, equals(isDeprecated));
diff --git a/pkg/analysis_server/test/edit/bulk_fixes_test.dart b/pkg/analysis_server/test/edit/bulk_fixes_test.dart
new file mode 100644
index 0000000..d72f623
--- /dev/null
+++ b/pkg/analysis_server/test/edit/bulk_fixes_test.dart
@@ -0,0 +1,63 @@
+// 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:analysis_server/protocol/protocol_generated.dart';
+import 'package:analysis_server/src/edit/edit_domain.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:linter/src/rules.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../analysis_abstract.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(BulkFixesTest);
+  });
+}
+
+@reflectiveTest
+class BulkFixesTest extends AbstractAnalysisTest {
+  Future<void> assertEditEquals(String expectedSource) async {
+    await waitForTasksFinished();
+    var edits = await _getBulkEdits();
+    expect(edits, hasLength(1));
+    var editedSource = SourceEdit.applySequence(testCode, edits[0].edits);
+    expect(editedSource, expectedSource);
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    registerLintRules();
+    handler = EditDomainHandler(server);
+  }
+
+  Future<void> test_unnecessaryNew() async {
+    createProject();
+    addAnalysisOptionsFile('''
+linter:
+  rules:
+    - unnecessary_new
+''');
+    addTestFile('''
+class A {}
+A f() => new A();
+''');
+
+    await assertEditEquals('''
+class A {}
+A f() => A();
+''');
+  }
+
+  Future<List<SourceFileEdit>> _getBulkEdits() async {
+    var request = EditBulkFixesParams([testFile]).toRequest('0');
+    var response = await waitResponse(request);
+    var result = EditBulkFixesResult.fromResponse(response);
+    return result.edits;
+  }
+}
diff --git a/pkg/analysis_server/test/edit/postfix_completion_test.dart b/pkg/analysis_server/test/edit/postfix_completion_test.dart
index fdd4948..9f55b0f 100644
--- a/pkg/analysis_server/test/edit/postfix_completion_test.dart
+++ b/pkg/analysis_server/test/edit/postfix_completion_test.dart
@@ -36,7 +36,7 @@
 }
 ''');
     await waitForTasksFinished();
-    await _prepareCompletion('.for', atStart: true);
+    await _prepareCompletion('.for');
     _assertHasChange('Expand .for', '''
 main() {
   for (var value in []) {
@@ -88,8 +88,7 @@
     fail('Expected to find |$message| but got: ' + change.message);
   }
 
-  Future<void> _prepareCompletion(String key,
-      {bool atStart = false, bool atEnd = false, int delta = 0}) async {
+  Future<void> _prepareCompletion(String key) async {
     var offset = findOffset(key);
     var src = testCode.replaceFirst(key, '', offset);
     modifyTestFile(src);
diff --git a/pkg/analysis_server/test/edit/test_all.dart b/pkg/analysis_server/test/edit/test_all.dart
index 4f7fa7d..7950e43 100644
--- a/pkg/analysis_server/test/edit/test_all.dart
+++ b/pkg/analysis_server/test/edit/test_all.dart
@@ -5,6 +5,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'assists_test.dart' as assists;
+import 'bulk_fixes_test.dart' as bulk_fixes;
 import 'fixes_test.dart' as fixes;
 import 'format_test.dart' as format;
 import 'organize_directives_test.dart' as organize_directives;
@@ -17,6 +18,7 @@
 void main() {
   defineReflectiveSuite(() {
     assists.main();
+    bulk_fixes.main();
     fixes.main();
     format.main();
     organize_directives.main();
diff --git a/pkg/analysis_server/test/integration/analysis/get_errors_non_standard_sdk_test.dart b/pkg/analysis_server/test/integration/analysis/get_errors_non_standard_sdk_test.dart
index 11cf543..f1fd49a 100644
--- a/pkg/analysis_server/test/integration/analysis/get_errors_non_standard_sdk_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_errors_non_standard_sdk_test.dart
@@ -29,6 +29,8 @@
     Directory(path.join(sdkPath, 'lib', 'async')).createSync(recursive: true);
     Directory(path.join(sdkPath, 'lib', 'fake')).createSync(recursive: true);
 
+    File(path.join(sdkPath, 'version')).writeAsStringSync('2.10.0');
+
     File(path.join(sdkPath, 'lib', 'core', 'core.dart')).writeAsStringSync(r'''
 library dart.core;
 import 'dart:async';
diff --git a/pkg/analysis_server/test/integration/coverage.md b/pkg/analysis_server/test/integration/coverage.md
index 20ee12c..06b628a 100644
--- a/pkg/analysis_server/test/integration/coverage.md
+++ b/pkg/analysis_server/test/integration/coverage.md
@@ -44,6 +44,7 @@
 - [x] diagnostic.getServerPort
 
 ## edit domain
+- [x] edit.bulkFixes
 - [x] edit.dartfix
 - [x] edit.format
 - [x] edit.getAssists
diff --git a/pkg/analysis_server/test/integration/edit/bulk_fixes_test.dart b/pkg/analysis_server/test/integration/edit/bulk_fixes_test.dart
new file mode 100644
index 0000000..922c0c8
--- /dev/null
+++ b/pkg/analysis_server/test/integration/edit/bulk_fixes_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:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../support/integration_tests.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(BulkFixesTest);
+  });
+}
+
+@reflectiveTest
+class BulkFixesTest extends AbstractAnalysisServerIntegrationTest {
+  void setupTarget() {
+    writeFile(sourcePath('test.dart'), '''
+class A {
+  void f() {}
+}
+class B extends A {
+  void f() { }
+}
+''');
+    standardAnalysisSetup();
+  }
+
+  @failingTest
+  Future<void> test_bulk_fix_override() async {
+    setupTarget();
+
+    var result = await sendEditBulkFixes([sourceDirectory.path]);
+    expect(result.edits.length, 1);
+  }
+}
diff --git a/pkg/analysis_server/test/integration/edit/import_elements_test.dart b/pkg/analysis_server/test/integration/edit/import_elements_test.dart
index 790173e..f717356 100644
--- a/pkg/analysis_server/test/integration/edit/import_elements_test.dart
+++ b/pkg/analysis_server/test/integration/edit/import_elements_test.dart
@@ -6,8 +6,8 @@
 
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:cli_util/cli_util.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -85,7 +85,7 @@
     standardAnalysisSetup();
     await analysisFinished;
     var provider = PhysicalResourceProvider.INSTANCE;
-    var sdkPath = FolderBasedDartSdk.defaultSdkDirectory(provider).path;
+    var sdkPath = getSdkPath();
     var mathPath =
         provider.pathContext.join(sdkPath, 'lib', 'math', 'math.dart');
 
@@ -118,7 +118,7 @@
     standardAnalysisSetup();
     await analysisFinished;
     var provider = PhysicalResourceProvider.INSTANCE;
-    var sdkPath = FolderBasedDartSdk.defaultSdkDirectory(provider).path;
+    var sdkPath = getSdkPath();
     var mathPath =
         provider.pathContext.join(sdkPath, 'lib', 'math', 'math.dart');
 
diff --git a/pkg/analysis_server/test/integration/edit/test_all.dart b/pkg/analysis_server/test/integration/edit/test_all.dart
index 3ac606c..5c3a653 100644
--- a/pkg/analysis_server/test/integration/edit/test_all.dart
+++ b/pkg/analysis_server/test/integration/edit/test_all.dart
@@ -4,6 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import 'bulk_fixes_test.dart' as bulk_fixes_test;
 import 'dartfix_test.dart' as dartfix_test;
 import 'format_test.dart' as format_test;
 import 'get_assists_test.dart' as get_assists_test;
@@ -24,6 +25,7 @@
 
 void main() {
   defineReflectiveSuite(() {
+    bulk_fixes_test.main();
     dartfix_test.main();
     format_test.main();
     get_assists_test.main();
diff --git a/pkg/analysis_server/test/integration/lsp_server/initialization_test.dart b/pkg/analysis_server/test/integration/lsp_server/initialization_test.dart
index 7a23822..1759e58 100644
--- a/pkg/analysis_server/test/integration/lsp_server/initialization_test.dart
+++ b/pkg/analysis_server/test/integration/lsp_server/initialization_test.dart
@@ -20,10 +20,10 @@
   Future<void> test_initialize_invalidParams() async {
     final params = {'processId': 'invalid'};
     final request = RequestMessage(
-      Either2<num, String>.t1(1),
-      Method.initialize,
-      params,
-      jsonRpcVersion,
+      id: Either2<num, String>.t1(1),
+      method: Method.initialize,
+      params: params,
+      jsonrpc: jsonRpcVersion,
     );
     final response = await sendRequestToServer(request);
     expect(response.id, equals(request.id));
diff --git a/pkg/analysis_server/test/integration/support/integration_test_methods.dart b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
index 744785a..9799790 100644
--- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
@@ -1562,6 +1562,38 @@
     return EditGetDartfixInfoResult.fromJson(decoder, 'result', result);
   }
 
+  /// Analyze the specified sources for fixes that can be applied in bulk and
+  /// return a set of suggested edits for those sources. These edits may
+  /// include changes to sources outside the set of specified sources if a
+  /// change in a specified source requires it.
+  ///
+  /// Parameters
+  ///
+  /// included: List<FilePath>
+  ///
+  ///   A list of the files and directories for which edits should be
+  ///   suggested.
+  ///
+  ///   If a request is made with a path that is invalid, e.g. is not absolute
+  ///   and normalized, an error of type INVALID_FILE_PATH_FORMAT will be
+  ///   generated. If a request is made for a file which does not exist, or
+  ///   which is not currently subject to analysis (e.g. because it is not
+  ///   associated with any analysis root specified to
+  ///   analysis.setAnalysisRoots), an error of type FILE_NOT_ANALYZED will be
+  ///   generated.
+  ///
+  /// Returns
+  ///
+  /// edits: List<SourceFileEdit>
+  ///
+  ///   A list of source edits to apply the recommended changes.
+  Future<EditBulkFixesResult> sendEditBulkFixes(List<String> included) async {
+    var params = EditBulkFixesParams(included).toJson();
+    var result = await server.send('edit.bulkFixes', params);
+    var decoder = ResponseDecoder(null);
+    return EditBulkFixesResult.fromJson(decoder, 'result', result);
+  }
+
   /// Analyze the specified sources for recommended changes and return a set of
   /// suggested edits for those sources. These edits may include changes to
   /// sources outside the set of specified sources if a change in a specified
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
index 6764831..f4736c1 100644
--- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -2205,6 +2205,22 @@
 final Matcher isDiagnosticGetServerPortResult = LazyMatcher(() =>
     MatchesJsonObject('diagnostic.getServerPort result', {'port': isInt}));
 
+/// edit.bulkFixes params
+///
+/// {
+///   "included": List<FilePath>
+/// }
+final Matcher isEditBulkFixesParams = LazyMatcher(() => MatchesJsonObject(
+    'edit.bulkFixes params', {'included': isListOf(isFilePath)}));
+
+/// edit.bulkFixes result
+///
+/// {
+///   "edits": List<SourceFileEdit>
+/// }
+final Matcher isEditBulkFixesResult = LazyMatcher(() => MatchesJsonObject(
+    'edit.bulkFixes result', {'edits': isListOf(isSourceFileEdit)}));
+
 /// edit.dartfix params
 ///
 /// {
diff --git a/pkg/analysis_server/test/lsp/cancel_request_test.dart b/pkg/analysis_server/test/lsp/cancel_request_test.dart
index 6e065b9..f39dff9 100644
--- a/pkg/analysis_server/test/lsp/cancel_request_test.dart
+++ b/pkg/analysis_server/test/lsp/cancel_request_test.dart
@@ -33,14 +33,13 @@
     final completionRequest = makeRequest(
       Method.textDocument_completion,
       CompletionParams(
-        null,
-        TextDocumentIdentifier(mainFileUri.toString()),
-        positionFromMarker(content),
+        textDocument: TextDocumentIdentifier(uri: mainFileUri.toString()),
+        position: positionFromMarker(content),
       ),
     );
     // And a request to cancel it.
     final cancelNotification = makeNotification(
-        Method.cancelRequest, CancelParams(completionRequest.id));
+        Method.cancelRequest, CancelParams(id: completionRequest.id));
 
     // Send both (without waiting for the results of the first).
     final completionRequestFuture = sendRequestToServer(completionRequest);
diff --git a/pkg/analysis_server/test/lsp/code_actions_abstract.dart b/pkg/analysis_server/test/lsp/code_actions_abstract.dart
index a9b288c..5c3cd8c 100644
--- a/pkg/analysis_server/test/lsp/code_actions_abstract.dart
+++ b/pkg/analysis_server/test/lsp/code_actions_abstract.dart
@@ -105,7 +105,7 @@
         // When the server sends the edit back, just keep a copy and say we
         // applied successfully (it'll be verified below).
         editParams = edit;
-        return ApplyWorkspaceEditResponse(true, null);
+        return ApplyWorkspaceEditResponse(applied: true);
       },
     );
     // Successful edits return an empty success() response.
diff --git a/pkg/analysis_server/test/lsp/code_actions_source_test.dart b/pkg/analysis_server/test/lsp/code_actions_source_test.dart
index 08f227c..d5529b4 100644
--- a/pkg/analysis_server/test/lsp/code_actions_source_test.dart
+++ b/pkg/analysis_server/test/lsp/code_actions_source_test.dart
@@ -281,7 +281,8 @@
       // Claim that we failed tpo apply the edits. This is what the client
       // would do if the edits provided were for an old version of the
       // document.
-      handler: (edit) => ApplyWorkspaceEditResponse(false, 'Document changed'),
+      handler: (edit) => ApplyWorkspaceEditResponse(
+          applied: false, failureReason: 'Document changed'),
     );
 
     // Ensure the request returned an error (error repsonses are thrown by
diff --git a/pkg/analysis_server/test/lsp/completion_test.dart b/pkg/analysis_server/test/lsp/completion_test.dart
index 52cad68..dc2b461 100644
--- a/pkg/analysis_server/test/lsp/completion_test.dart
+++ b/pkg/analysis_server/test/lsp/completion_test.dart
@@ -108,8 +108,9 @@
     final invalidTriggerKind = CompletionTriggerKind.fromJson(-1);
     final request = getCompletion(
       mainFileUri,
-      Position(0, 0),
-      context: CompletionContext(invalidTriggerKind, 'A'),
+      Position(line: 0, character: 0),
+      context: CompletionContext(
+          triggerKind: invalidTriggerKind, triggerCharacter: 'A'),
     );
 
     await expectLater(
@@ -292,13 +293,14 @@
     await openFile(mainFileUri, withoutMarkers(content));
     final res = await getCompletion(mainFileUri, positionFromMarker(content));
     final item = res.singleWhere((c) => c.label == 'abcdefghij');
+    // ignore: deprecated_member_use_from_same_package
     expect(item.deprecated, isNull);
     // If the does not say it supports the deprecated flag, we should show
     // '(deprecated)' in the details.
     expect(item.detail.toLowerCase(), contains('deprecated'));
   }
 
-  Future<void> test_isDeprecated_supported() async {
+  Future<void> test_isDeprecated_supportedFlag() async {
     final content = '''
     class MyClass {
       @deprecated
@@ -312,17 +314,67 @@
     ''';
 
     await initialize(
-        textDocumentCapabilities: withCompletionItemDeprecatedSupport(
+        textDocumentCapabilities: withCompletionItemDeprecatedFlagSupport(
             emptyTextDocumentClientCapabilities));
     await openFile(mainFileUri, withoutMarkers(content));
     final res = await getCompletion(mainFileUri, positionFromMarker(content));
     final item = res.singleWhere((c) => c.label == 'abcdefghij');
+    // ignore: deprecated_member_use_from_same_package
     expect(item.deprecated, isTrue);
     // If the client says it supports the deprecated flag, we should not show
     // deprecated in the details.
     expect(item.detail, isNot(contains('deprecated')));
   }
 
+  Future<void> test_isDeprecated_supportedTag() async {
+    final content = '''
+    class MyClass {
+      @deprecated
+      String abcdefghij;
+    }
+
+    main() {
+      MyClass a;
+      a.abc^
+    }
+    ''';
+
+    await initialize(
+        textDocumentCapabilities: withCompletionItemTagSupport(
+            emptyTextDocumentClientCapabilities,
+            [CompletionItemTag.Deprecated]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+    final item = res.singleWhere((c) => c.label == 'abcdefghij');
+    expect(item.tags, contains(CompletionItemTag.Deprecated));
+    // If the client says it supports the deprecated tag, we should not show
+    // deprecated in the details.
+    expect(item.detail, isNot(contains('deprecated')));
+  }
+
+  Future<void> test_namedArg_offsetBeforeCompletionTarget() async {
+    // This test checks for a previous bug where the completion target was a
+    // symbol far after the cursor offset (`aaaa` here) and caused the whole
+    // identifier to be used as the `targetPrefix` which would filter out
+    // other symbol.
+    // https://github.com/Dart-Code/Dart-Code/issues/2672#issuecomment-666085575
+    final content = '''
+    void main() {
+      myFunction(
+        ^
+        aaaa: '',
+      );
+    }
+
+    void myFunction({String aaaa, String aaab, String aaac}) {}
+    ''';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+    expect(res.any((c) => c.label == 'aaab: '), isTrue);
+  }
+
   Future<void> test_namedArg_plainText() async {
     final content = '''
     class A { const A({int one}); }
@@ -363,7 +415,9 @@
     expect(item.textEdit.newText, equals(r'one: ${1:}'));
     expect(
       item.textEdit.range,
-      equals(Range(positionFromMarker(content), positionFromMarker(content))),
+      equals(Range(
+          start: positionFromMarker(content),
+          end: positionFromMarker(content))),
     );
   }
 
@@ -850,7 +904,7 @@
         // When the server sends the edit back, just keep a copy and say we
         // applied successfully (it'll be verified below).
         editParams = edit;
-        return ApplyWorkspaceEditResponse(true, null);
+        return ApplyWorkspaceEditResponse(applied: true);
       },
     );
     // Successful edits return an empty success() response.
@@ -945,6 +999,41 @@
     '''));
   }
 
+  /// This test reproduces a bug where the pathKey hash used in
+  /// available_declarations.dart would not change with the contents of the file
+  /// (as it always used 0 as the modification stamp) which would prevent
+  /// completion including items from files that were open (had overlays).
+  /// https://github.com/Dart-Code/Dart-Code/issues/2286#issuecomment-658597532
+  Future<void> test_suggestionSets_modifiedFiles() async {
+    final otherFilePath = join(projectFolderPath, 'lib', 'other_file.dart');
+    final otherFileUri = Uri.file(otherFilePath);
+
+    final mainFileContent = 'MyOtherClass^';
+    final initialAnalysis = waitForAnalysisComplete();
+    await initialize(
+        workspaceCapabilities:
+            withApplyEditSupport(emptyWorkspaceClientCapabilities));
+    await openFile(mainFileUri, withoutMarkers(mainFileContent));
+    await initialAnalysis;
+
+    // Start with a blank file.
+    newFile(otherFilePath, content: '');
+    await openFile(otherFileUri, '');
+    await pumpEventQueue(times: 5000);
+
+    // Reopen the file with a class definition.
+    await closeFile(otherFileUri);
+    await openFile(otherFileUri, 'class MyOtherClass {}');
+    await pumpEventQueue(times: 5000);
+
+    // Ensure the class appears in completion.
+    final completions =
+        await getCompletion(mainFileUri, positionFromMarker(mainFileContent));
+    final matching =
+        completions.where((c) => c.label == 'MyOtherClass').toList();
+    expect(matching, hasLength(1));
+  }
+
   Future<void> test_suggestionSets_namedConstructors() async {
     newFile(
       join(projectFolderPath, 'other_file.dart'),
diff --git a/pkg/analysis_server/test/lsp/definition_test.dart b/pkg/analysis_server/test/lsp/definition_test.dart
index 3e3e414..a70f005 100644
--- a/pkg/analysis_server/test/lsp/definition_test.dart
+++ b/pkg/analysis_server/test/lsp/definition_test.dart
@@ -69,12 +69,16 @@
 
     newFile(pluginAnalyzedFilePath);
     await initialize();
-    final res = await getDefinition(pluginAnalyzedFileUri, lsp.Position(0, 0));
+    final res = await getDefinition(
+        pluginAnalyzedFileUri, lsp.Position(line: 0, character: 0));
 
     expect(res, hasLength(1));
     var loc = res.single;
     expect(
-        loc.range, equals(lsp.Range(lsp.Position(0, 0), lsp.Position(0, 5))));
+        loc.range,
+        equals(lsp.Range(
+            start: lsp.Position(line: 0, character: 0),
+            end: lsp.Position(line: 0, character: 5))));
     expect(loc.uri, equals(pluginAnalyzedFileUri.toString()));
   }
 
diff --git a/pkg/analysis_server/test/lsp/diagnostic_test.dart b/pkg/analysis_server/test/lsp/diagnostic_test.dart
index fac84a9..2716301 100644
--- a/pkg/analysis_server/test/lsp/diagnostic_test.dart
+++ b/pkg/analysis_server/test/lsp/diagnostic_test.dart
@@ -127,6 +127,61 @@
     expect(updatedDiagnostics, hasLength(0));
   }
 
+  Future<void> test_diagnosticTag_deprecated() async {
+    newFile(mainFilePath, content: '''
+    @deprecated
+    int dep;
+
+    void main() => print(dep);
+    ''');
+
+    final diagnosticsUpdate = waitForDiagnostics(mainFileUri);
+    await initialize(
+        textDocumentCapabilities: withDiagnosticTagSupport(
+            emptyTextDocumentClientCapabilities, [DiagnosticTag.Deprecated]));
+    final diagnostics = await diagnosticsUpdate;
+    expect(diagnostics, hasLength(1));
+    final diagnostic = diagnostics.first;
+    expect(diagnostic.code, equals('deprecated_member_use_from_same_package'));
+    expect(diagnostic.tags, contains(DiagnosticTag.Deprecated));
+  }
+
+  Future<void> test_diagnosticTag_notSupported() async {
+    newFile(mainFilePath, content: '''
+    @deprecated
+    int dep;
+
+    void main() => print(dep);
+    ''');
+
+    final diagnosticsUpdate = waitForDiagnostics(mainFileUri);
+    await initialize();
+    final diagnostics = await diagnosticsUpdate;
+    expect(diagnostics, hasLength(1));
+    final diagnostic = diagnostics.first;
+    expect(diagnostic.code, equals('deprecated_member_use_from_same_package'));
+    expect(diagnostic.tags, isNull);
+  }
+
+  Future<void> test_diagnosticTag_unnecessary() async {
+    newFile(mainFilePath, content: '''
+    void main() {
+      return;
+      print('unreachable');
+    }
+    ''');
+
+    final diagnosticsUpdate = waitForDiagnostics(mainFileUri);
+    await initialize(
+        textDocumentCapabilities: withDiagnosticTagSupport(
+            emptyTextDocumentClientCapabilities, [DiagnosticTag.Unnecessary]));
+    final diagnostics = await diagnosticsUpdate;
+    expect(diagnostics, hasLength(1));
+    final diagnostic = diagnostics.first;
+    expect(diagnostic.code, equals('dead_code'));
+    expect(diagnostic.tags, contains(DiagnosticTag.Unnecessary));
+  }
+
   Future<void> test_dotFilesExcluded() async {
     var dotFolderFilePath =
         join(projectFolderPath, '.dart_tool', 'tool_file.dart');
@@ -139,7 +194,7 @@
 
     // Send a request for a hover.
     await initialize();
-    await getHover(dotFolderFileUri, Position(0, 0));
+    await getHover(dotFolderFileUri, Position(line: 0, character: 0));
 
     // Ensure that as part of responding to getHover, diagnostics were not
     // transmitted.
diff --git a/pkg/analysis_server/test/lsp/document_changes_test.dart b/pkg/analysis_server/test/lsp/document_changes_test.dart
index b2f6368..7994ae0 100644
--- a/pkg/analysis_server/test/lsp/document_changes_test.dart
+++ b/pkg/analysis_server/test/lsp/document_changes_test.dart
@@ -1,4 +1,5 @@
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/protocol/protocol_internal.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Position;
 import 'package:test/test.dart';
@@ -29,16 +30,20 @@
   Future<void> test_documentChange_notifiesPlugins() async {
     await _initializeAndOpen();
     await changeFile(2, mainFileUri, [
-      TextDocumentContentChangeEvent(
-        Range(Position(0, 6), Position(0, 9)),
-        0,
-        'Bar',
-      ),
-      TextDocumentContentChangeEvent(
-        Range(Position(1, 21), Position(1, 24)),
-        0,
-        'updated',
-      ),
+      Either2<TextDocumentContentChangeEvent1,
+          TextDocumentContentChangeEvent2>.t1(TextDocumentContentChangeEvent1(
+        range: Range(
+            start: Position(line: 0, character: 6),
+            end: Position(line: 0, character: 9)),
+        text: 'Bar',
+      )),
+      Either2<TextDocumentContentChangeEvent1,
+          TextDocumentContentChangeEvent2>.t1(TextDocumentContentChangeEvent1(
+        range: Range(
+            start: Position(line: 1, character: 21),
+            end: Position(line: 1, character: 24)),
+        text: 'updated',
+      )),
     ]);
 
     final notifiedChanges = pluginManager.analysisUpdateContentParams
@@ -53,16 +58,20 @@
   Future<void> test_documentChange_updatesOverlay() async {
     await _initializeAndOpen();
     await changeFile(2, mainFileUri, [
-      TextDocumentContentChangeEvent(
-        Range(Position(0, 6), Position(0, 9)),
-        0,
-        'Bar',
-      ),
-      TextDocumentContentChangeEvent(
-        Range(Position(1, 21), Position(1, 24)),
-        0,
-        'updated',
-      ),
+      Either2<TextDocumentContentChangeEvent1,
+          TextDocumentContentChangeEvent2>.t1(TextDocumentContentChangeEvent1(
+        range: Range(
+            start: Position(line: 0, character: 6),
+            end: Position(line: 0, character: 9)),
+        text: 'Bar',
+      )),
+      Either2<TextDocumentContentChangeEvent1,
+          TextDocumentContentChangeEvent2>.t1(TextDocumentContentChangeEvent1(
+        range: Range(
+            start: Position(line: 1, character: 21),
+            end: Position(line: 1, character: 24)),
+        text: 'updated',
+      )),
     ]);
 
     expect(server.resourceProvider.hasOverlay(mainFilePath), isTrue);
diff --git a/pkg/analysis_server/test/lsp/file_modification_test.dart b/pkg/analysis_server/test/lsp/file_modification_test.dart
index 6063bfd..9afc443 100644
--- a/pkg/analysis_server/test/lsp/file_modification_test.dart
+++ b/pkg/analysis_server/test/lsp/file_modification_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:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -26,11 +27,13 @@
     // to alert the user to something failing.
     final error = await expectErrorNotification<ShowMessageParams>(() async {
       await changeFile(222, mainFileUri, [
-        TextDocumentContentChangeEvent(
-          Range(Position(999, 999), Position(999, 999)),
-          null,
-          '   ',
-        )
+        Either2<TextDocumentContentChangeEvent1,
+            TextDocumentContentChangeEvent2>.t1(TextDocumentContentChangeEvent1(
+          range: Range(
+              start: Position(line: 999, character: 999),
+              end: Position(line: 999, character: 999)),
+          text: '   ',
+        ))
       ]);
     });
 
@@ -58,11 +61,13 @@
     await openFile(mainFileUri, initialContent);
     await changeFile(222, mainFileUri, [
       // Replace line1:5-1:8 with spaces.
-      TextDocumentContentChangeEvent(
-        Range(Position(1, 5), Position(1, 8)),
-        null,
-        '   ',
-      )
+      Either2<TextDocumentContentChangeEvent1,
+          TextDocumentContentChangeEvent2>.t1(TextDocumentContentChangeEvent1(
+        range: Range(
+            start: Position(line: 1, character: 5),
+            end: Position(line: 1, character: 8)),
+        text: '   ',
+      ))
     ]);
     expect(_getOverlay(mainFilePath), equals(expectedUpdatedContent));
 
@@ -74,11 +79,13 @@
     // It's not valid for a client to send a request to modify a file that it
     // has not opened, but Visual Studio has done it in the past so we should
     // ensure it generates an obvious error that the user can understand.
-    final simpleEdit = TextDocumentContentChangeEvent(
-      Range(Position(1, 1), Position(1, 1)),
-      null,
-      'test',
-    );
+    final simpleEdit = Either2<TextDocumentContentChangeEvent1,
+        TextDocumentContentChangeEvent2>.t1(TextDocumentContentChangeEvent1(
+      range: Range(
+          start: Position(line: 1, character: 1),
+          end: Position(line: 1, character: 1)),
+      text: 'test',
+    ));
     await initialize();
     final notificationParams = await expectErrorNotification<ShowMessageParams>(
       () => changeFile(222, mainFileUri, [simpleEdit]),
diff --git a/pkg/analysis_server/test/lsp/flutter_outline_test.dart b/pkg/analysis_server/test/lsp/flutter_outline_test.dart
index f79de6c..8a21287 100644
--- a/pkg/analysis_server/test/lsp/flutter_outline_test.dart
+++ b/pkg/analysis_server/test/lsp/flutter_outline_test.dart
@@ -88,18 +88,33 @@
     expect(outline, isNotNull);
 
     // Root node is entire document
-    expect(outline.range, equals(Range(Position(0, 0), Position(15, 0))));
+    expect(
+        outline.range,
+        equals(Range(
+            start: Position(line: 0, character: 0),
+            end: Position(line: 15, character: 0))));
     expect(outline.children, hasLength(1));
 
     final build = outline.children[0];
     expect(build.kind, equals('DART_ELEMENT'));
-    expect(build.range, equals(Range(Position(2, 0), Position(14, 6))));
-    expect(build.codeRange, equals(Range(Position(3, 0), Position(14, 6))));
+    expect(
+        build.range,
+        equals(Range(
+            start: Position(line: 2, character: 0),
+            end: Position(line: 14, character: 6))));
+    expect(
+        build.codeRange,
+        equals(Range(
+            start: Position(line: 3, character: 0),
+            end: Position(line: 14, character: 6))));
     expect(build.dartElement.kind, equals('FUNCTION'));
     expect(build.dartElement.name, equals('build'));
     expect(build.dartElement.parameters, equals('(BuildContext context)'));
-    expect(build.dartElement.range,
-        equals(Range(Position(3, 7), Position(3, 12))));
+    expect(
+        build.dartElement.range,
+        equals(Range(
+            start: Position(line: 3, character: 7),
+            end: Position(line: 3, character: 12))));
     expect(build.dartElement.returnType, equals('Widget'));
     expect(build.children, hasLength(1));
 
@@ -107,13 +122,20 @@
         build.children[0].children[0].children[0].children[0].children[0];
     expect(icon.kind, equals('NEW_INSTANCE'));
     expect(icon.className, 'Icon');
-    expect(icon.range, equals(Range(Position(8, 31), Position(8, 50))));
+    expect(
+        icon.range,
+        equals(Range(
+            start: Position(line: 8, character: 31),
+            end: Position(line: 8, character: 50))));
     expect(icon.codeRange, equals(icon.range));
     expect(icon.attributes, hasLength(1));
     expect(icon.attributes[0].name, equals('icon'));
     expect(icon.attributes[0].label, equals('Icons.ac_unit'));
-    expect(icon.attributes[0].valueRange,
-        equals(Range(Position(8, 36), Position(8, 49))));
+    expect(
+        icon.attributes[0].valueRange,
+        equals(Range(
+            start: Position(line: 8, character: 36),
+            end: Position(line: 8, character: 49))));
     expect(icon.dartElement, isNull);
     expect(icon.children, hasLength(0));
   }
diff --git a/pkg/analysis_server/test/lsp/folding_test.dart b/pkg/analysis_server/test/lsp/folding_test.dart
index 807a303..1caf00a 100644
--- a/pkg/analysis_server/test/lsp/folding_test.dart
+++ b/pkg/analysis_server/test/lsp/folding_test.dart
@@ -28,11 +28,10 @@
     final range1 = rangeFromMarkers(content);
     final expectedRegions = [
       FoldingRange(
-        range1.start.line,
-        range1.start.character,
-        range1.end.line,
-        range1.end.character,
-        null,
+        startLine: range1.start.line,
+        startCharacter: range1.start.character,
+        endLine: range1.end.line,
+        endCharacter: range1.end.character,
       )
     ];
 
@@ -53,11 +52,11 @@
     final range1 = rangeFromMarkers(content);
     final expectedRegions = [
       FoldingRange(
-        range1.start.line,
-        range1.start.character,
-        range1.end.line,
-        range1.end.character,
-        FoldingRangeKind.Comment,
+        startLine: range1.start.line,
+        startCharacter: range1.start.character,
+        endLine: range1.end.line,
+        endCharacter: range1.end.character,
+        kind: FoldingRangeKind.Comment,
       )
     ];
 
@@ -91,11 +90,10 @@
     final ranges = rangesFromMarkers(content);
     final expectedRegions = ranges
         .map((range) => FoldingRange(
-              range.start.line,
-              range.start.character,
-              range.end.line,
-              range.end.character,
-              null,
+              startLine: range.start.line,
+              startCharacter: range.start.character,
+              endLine: range.end.line,
+              endCharacter: range.end.character,
             ))
         .toList();
 
@@ -219,11 +217,10 @@
     final ranges = rangesFromMarkers(content);
     final expectedRegions = ranges
         .map((range) => FoldingRange(
-              range.start.line,
-              range.start.character,
-              range.end.line,
-              range.end.character,
-              null,
+              startLine: range.start.line,
+              startCharacter: range.start.character,
+              endLine: range.end.line,
+              endCharacter: range.end.character,
             ))
         .toList();
 
@@ -265,11 +262,10 @@
     final ranges = rangesFromMarkers(content);
     final expectedRegions = ranges
         .map((range) => FoldingRange(
-              range.start.line,
-              range.start.character,
-              range.end.line,
-              range.end.character,
-              null,
+              startLine: range.start.line,
+              startCharacter: range.start.character,
+              endLine: range.end.line,
+              endCharacter: range.end.character,
             ))
         .toList();
 
@@ -282,11 +278,11 @@
 
   FoldingRange _toFoldingRange(Range range, FoldingRangeKind kind) {
     return FoldingRange(
-      range.start.line,
-      range.start.character,
-      range.end.line,
-      range.end.character,
-      kind,
+      startLine: range.start.line,
+      startCharacter: range.start.character,
+      endLine: range.end.line,
+      endCharacter: range.end.character,
+      kind: kind,
     );
   }
 }
diff --git a/pkg/analysis_server/test/lsp/format_test.dart b/pkg/analysis_server/test/lsp/format_test.dart
index 8c72af5..5a51229 100644
--- a/pkg/analysis_server/test/lsp/format_test.dart
+++ b/pkg/analysis_server/test/lsp/format_test.dart
@@ -18,6 +18,13 @@
 
 @reflectiveTest
 class FormatTest extends AbstractLspAnalysisServerTest {
+  Future<void> expectFormattedContents(
+      Uri uri, String original, String expected) async {
+    final formatEdits = await formatDocument(uri.toString());
+    final formattedContents = applyTextEdits(original, formatEdits);
+    expect(formattedContents, equals(expected));
+  }
+
   Future<void> test_alreadyFormatted() async {
     const contents = '''main() {
   print('test');
@@ -149,6 +156,32 @@
     expect(formatEdits, isNull);
   }
 
+  Future<void> test_lineLength() async {
+    const contents = '''
+    main() =>
+    print(
+    '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'
+    );
+    ''';
+    final expectedDefault = '''main() => print(
+    '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789');\n''';
+    final expectedLongLines =
+        '''main() => print('123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789');\n''';
+
+    // Initialize with config support, supplying an empty config when requested.
+    await provideConfig(
+      () => initialize(
+          workspaceCapabilities: withDidChangeConfigurationDynamicRegistration(
+              withConfigurationSupport(emptyWorkspaceClientCapabilities))),
+      {}, // empty config
+    );
+    await openFile(mainFileUri, contents);
+
+    await expectFormattedContents(mainFileUri, contents, expectedDefault);
+    await updateConfig({'lineLength': 500});
+    await expectFormattedContents(mainFileUri, contents, expectedLongLines);
+  }
+
   Future<void> test_nonDartFile() async {
     await initialize();
     await openFile(pubspecFileUri, simplePubspecContent);
@@ -201,11 +234,7 @@
 ''';
     await initialize();
     await openFile(mainFileUri, contents);
-
-    final formatEdits = await formatDocument(mainFileUri.toString());
-    expect(formatEdits, isNotNull);
-    final formattedContents = applyTextEdits(contents, formatEdits);
-    expect(formattedContents, equals(expected));
+    await expectFormattedContents(mainFileUri, contents, expected);
   }
 
   Future<void> test_unopenFile() async {
@@ -222,10 +251,6 @@
 ''';
     newFile(mainFilePath, content: contents);
     await initialize();
-
-    final formatEdits = await formatDocument(mainFileUri.toString());
-    expect(formatEdits, isNotNull);
-    final formattedContents = applyTextEdits(contents, formatEdits);
-    expect(formattedContents, equals(expected));
+    await expectFormattedContents(mainFileUri, contents, expected);
   }
 }
diff --git a/pkg/analysis_server/test/lsp/hover_test.dart b/pkg/analysis_server/test/lsp/hover_test.dart
index a20279e..d46f8bb8 100644
--- a/pkg/analysis_server/test/lsp/hover_test.dart
+++ b/pkg/analysis_server/test/lsp/hover_test.dart
@@ -43,7 +43,7 @@
     await initialize();
     await openFile(mainFileUri, '');
     await expectLater(
-      () => getHover(mainFileUri, Position(999, 999)),
+      () => getHover(mainFileUri, Position(line: 999, character: 999)),
       throwsA(isResponseError(ServerErrorCodes.InvalidFileLineCol)),
     );
   }
diff --git a/pkg/analysis_server/test/lsp/implementation_test.dart b/pkg/analysis_server/test/lsp/implementation_test.dart
index ff4a3c8..195b46b 100644
--- a/pkg/analysis_server/test/lsp/implementation_test.dart
+++ b/pkg/analysis_server/test/lsp/implementation_test.dart
@@ -173,7 +173,7 @@
     );
 
     final expectedLocations = rangesFromMarkers(content)
-        .map((r) => Location(mainFileUri.toString(), r));
+        .map((r) => Location(uri: mainFileUri.toString(), range: r));
 
     if (shouldMatch) {
       expect(res, equals(expectedLocations));
diff --git a/pkg/analysis_server/test/lsp/initialization_test.dart b/pkg/analysis_server/test/lsp/initialization_test.dart
index 304ce32..f8bf3d6 100644
--- a/pkg/analysis_server/test/lsp/initialization_test.dart
+++ b/pkg/analysis_server/test/lsp/initialization_test.dart
@@ -45,6 +45,8 @@
     // static registrations for them.
     // https://github.com/dart-lang/sdk/issues/38490
     InitializeResult initResult = initResponse.result;
+    expect(initResult.serverInfo.name, 'Dart SDK LSP Analysis Server');
+    expect(initResult.serverInfo.version, isNotNull);
     expect(initResult.capabilities, isNotNull);
     expect(initResult.capabilities.textDocumentSync, isNull);
 
@@ -235,8 +237,9 @@
 
     final registrations = (request.params as RegistrationParams).registrations;
 
-    final documentFilterSql = DocumentFilter(null, 'file', '**/*.sql');
-    final documentFilterDart = DocumentFilter('dart', 'file', null);
+    final documentFilterSql =
+        DocumentFilter(scheme: 'file', pattern: '**/*.sql');
+    final documentFilterDart = DocumentFilter(language: 'dart', scheme: 'file');
     final expectedFoldingRegistration =
         isA<TextDocumentRegistrationOptions>().having(
       (o) => o.documentSelector,
@@ -277,10 +280,10 @@
   Future<void> test_initialize_invalidParams() async {
     final params = {'processId': 'invalid'};
     final request = RequestMessage(
-      Either2<num, String>.t1(1),
-      Method.initialize,
-      params,
-      jsonRpcVersion,
+      id: Either2<num, String>.t1(1),
+      method: Method.initialize,
+      params: params,
+      jsonrpc: jsonRpcVersion,
     );
     final response = await sendRequestToServer(request);
     expect(response.id, equals(request.id));
diff --git a/pkg/analysis_server/test/lsp/outline_test.dart b/pkg/analysis_server/test/lsp/outline_test.dart
index 26231f3..8ab0aa3 100644
--- a/pkg/analysis_server/test/lsp/outline_test.dart
+++ b/pkg/analysis_server/test/lsp/outline_test.dart
@@ -78,16 +78,32 @@
     expect(outline, isNotNull);
 
     // Root node is entire document
-    expect(outline.range, equals(Range(Position(0, 0), Position(11, 0))));
+    expect(
+        outline.range,
+        equals(Range(
+            start: Position(line: 0, character: 0),
+            end: Position(line: 11, character: 0))));
     expect(outline.children, hasLength(1));
 
     // class A
     final classA = outline.children[0];
     expect(classA.element.name, equals('A'));
     expect(classA.element.kind, equals('CLASS'));
-    expect(classA.element.range, equals(Range(Position(1, 6), Position(1, 7))));
-    expect(classA.range, equals(Range(Position(0, 0), Position(10, 1))));
-    expect(classA.codeRange, equals(Range(Position(1, 0), Position(10, 1))));
+    expect(
+        classA.element.range,
+        equals(Range(
+            start: Position(line: 1, character: 6),
+            end: Position(line: 1, character: 7))));
+    expect(
+        classA.range,
+        equals(Range(
+            start: Position(line: 0, character: 0),
+            end: Position(line: 10, character: 1))));
+    expect(
+        classA.codeRange,
+        equals(Range(
+            start: Position(line: 1, character: 0),
+            end: Position(line: 10, character: 1))));
     expect(classA.children, hasLength(2));
 
     // b()
@@ -95,9 +111,20 @@
     expect(methodB.element.name, equals('b'));
     expect(methodB.element.kind, equals('METHOD'));
     expect(
-        methodB.element.range, equals(Range(Position(3, 2), Position(3, 3))));
-    expect(methodB.range, equals(Range(Position(2, 2), Position(6, 3))));
-    expect(methodB.codeRange, equals(Range(Position(3, 2), Position(6, 3))));
+        methodB.element.range,
+        equals(Range(
+            start: Position(line: 3, character: 2),
+            end: Position(line: 3, character: 3))));
+    expect(
+        methodB.range,
+        equals(Range(
+            start: Position(line: 2, character: 2),
+            end: Position(line: 6, character: 3))));
+    expect(
+        methodB.codeRange,
+        equals(Range(
+            start: Position(line: 3, character: 2),
+            end: Position(line: 6, character: 3))));
     expect(methodB.children, hasLength(1));
 
     // c()
@@ -105,12 +132,23 @@
     expect(methodC.element.name, equals('c'));
     expect(methodC.element.kind, equals('FUNCTION'));
     expect(
-        methodC.element.range, equals(Range(Position(5, 4), Position(5, 5))));
+        methodC.element.range,
+        equals(Range(
+            start: Position(line: 5, character: 4),
+            end: Position(line: 5, character: 5))));
     // TODO(dantup): This one seems to be excluding its dartdoc?
     // should be line 4 for the starting range.
     // https://github.com/dart-lang/sdk/issues/39746
-    expect(methodC.range, equals(Range(Position(5, 4), Position(5, 10))));
-    expect(methodC.codeRange, equals(Range(Position(5, 4), Position(5, 10))));
+    expect(
+        methodC.range,
+        equals(Range(
+            start: Position(line: 5, character: 4),
+            end: Position(line: 5, character: 10))));
+    expect(
+        methodC.codeRange,
+        equals(Range(
+            start: Position(line: 5, character: 4),
+            end: Position(line: 5, character: 10))));
     expect(methodC.children, isNull);
 
     // num get d
@@ -118,9 +156,20 @@
     expect(fieldD.element.name, equals('d'));
     expect(fieldD.element.kind, equals('GETTER'));
     expect(
-        fieldD.element.range, equals(Range(Position(9, 10), Position(9, 11))));
-    expect(fieldD.range, equals(Range(Position(8, 2), Position(9, 17))));
-    expect(fieldD.codeRange, equals(Range(Position(9, 2), Position(9, 17))));
+        fieldD.element.range,
+        equals(Range(
+            start: Position(line: 9, character: 10),
+            end: Position(line: 9, character: 11))));
+    expect(
+        fieldD.range,
+        equals(Range(
+            start: Position(line: 8, character: 2),
+            end: Position(line: 9, character: 17))));
+    expect(
+        fieldD.codeRange,
+        equals(Range(
+            start: Position(line: 9, character: 2),
+            end: Position(line: 9, character: 17))));
     expect(fieldD.children, isNull);
   }
 }
diff --git a/pkg/analysis_server/test/lsp/reanalyze_test.dart b/pkg/analysis_server/test/lsp/reanalyze_test.dart
new file mode 100644
index 0000000..69afce8
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/reanalyze_test.dart
@@ -0,0 +1,38 @@
+// 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/lsp_protocol/protocol_generated.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReanalyzeTest);
+  });
+}
+
+@reflectiveTest
+class ReanalyzeTest extends AbstractLspAnalysisServerTest {
+  Future<void> test_reanalyze() async {
+    const initialContents = 'int a = 1;';
+    newFile(mainFilePath, content: initialContents);
+
+    final initialAnalysis = waitForAnalysisComplete();
+
+    await initialize();
+    await initialAnalysis;
+
+    // Set up futures to wait for the new events.
+    final startNotification = waitForAnalysisStart();
+    final completeNotification = waitForAnalysisComplete();
+
+    final request = makeRequest(Method.fromJson(r'dart/reanalyze'), null);
+    await channel.sendRequestToServer(request);
+
+    // Ensure the notifications come through again.
+    await startNotification;
+    await completeNotification;
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/references_test.dart b/pkg/analysis_server/test/lsp/references_test.dart
index a780df9..350de59 100644
--- a/pkg/analysis_server/test/lsp/references_test.dart
+++ b/pkg/analysis_server/test/lsp/references_test.dart
@@ -54,12 +54,14 @@
     expect(res, hasLength(2));
     expect(
         res,
-        contains(
-            Location(mainFileUri.toString(), rangeFromMarkers(mainContents))));
+        contains(Location(
+            uri: mainFileUri.toString(),
+            range: rangeFromMarkers(mainContents))));
     expect(
         res,
-        contains(Location(referencedFileUri.toString(),
-            rangeFromMarkers(referencedContents))));
+        contains(Location(
+            uri: referencedFileUri.toString(),
+            range: rangeFromMarkers(referencedContents))));
   }
 
   Future<void> test_acrossFiles_withoutDeclaration() async {
@@ -122,7 +124,8 @@
     expect(
       res,
       contains(
-        Location(mainFileUri.toString(), rangeFromMarkers(contents)),
+        Location(
+            uri: mainFileUri.toString(), range: rangeFromMarkers(contents)),
       ),
     );
   }
@@ -142,7 +145,8 @@
     expect(
       res,
       contains(
-        Location(mainFileUri.toString(), rangeFromMarkers(contents)),
+        Location(
+            uri: mainFileUri.toString(), range: rangeFromMarkers(contents)),
       ),
     );
   }
diff --git a/pkg/analysis_server/test/lsp/rename_test.dart b/pkg/analysis_server/test/lsp/rename_test.dart
index 5c1127b..0896bf2 100644
--- a/pkg/analysis_server/test/lsp/rename_test.dart
+++ b/pkg/analysis_server/test/lsp/rename_test.dart
@@ -80,8 +80,8 @@
     final request = makeRequest(
       Method.textDocument_prepareRename,
       TextDocumentPositionParams(
-        TextDocumentIdentifier(mainFileUri.toString()),
-        positionFromMarker(content),
+        textDocument: TextDocumentIdentifier(uri: mainFileUri.toString()),
+        position: positionFromMarker(content),
       ),
     );
     final response = await channel.sendRequestToServer(request);
@@ -296,9 +296,9 @@
     final request = makeRequest(
       Method.textDocument_rename,
       RenameParams(
-        TextDocumentIdentifier(mainFileUri.toString()),
-        positionFromMarker(content),
-        'Object2',
+        newName: 'Object2',
+        textDocument: TextDocumentIdentifier(uri: mainFileUri.toString()),
+        position: positionFromMarker(content),
       ),
     );
     final response = await channel.sendRequestToServer(request);
diff --git a/pkg/analysis_server/test/lsp/server_abstract.dart b/pkg/analysis_server/test/lsp/server_abstract.dart
index a00a44e..2bf40b9 100644
--- a/pkg/analysis_server/test/lsp/server_abstract.dart
+++ b/pkg/analysis_server/test/lsp/server_abstract.dart
@@ -35,7 +35,9 @@
 /// communication to be printed to stdout.
 const debugPrintCommunication = false;
 
-final beginningOfDocument = Range(Position(0, 0), Position(0, 0));
+final beginningOfDocument = Range(
+    start: Position(line: 0, character: 0),
+    end: Position(line: 0, character: 0));
 
 abstract class AbstractLspAnalysisServerTest
     with
@@ -145,31 +147,9 @@
 }
 
 mixin ClientCapabilitiesHelperMixin {
-  final emptyTextDocumentClientCapabilities = TextDocumentClientCapabilities(
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null);
+  final emptyTextDocumentClientCapabilities = TextDocumentClientCapabilities();
 
-  final emptyWorkspaceClientCapabilities = WorkspaceClientCapabilities(
-      null, null, null, null, null, null, null, null);
+  final emptyWorkspaceClientCapabilities = ClientCapabilitiesWorkspace();
 
   TextDocumentClientCapabilities extendTextDocumentCapabilities(
     TextDocumentClientCapabilities source,
@@ -189,8 +169,8 @@
     return TextDocumentClientCapabilities.fromJson(json);
   }
 
-  WorkspaceClientCapabilities extendWorkspaceCapabilities(
-    WorkspaceClientCapabilities source,
+  ClientCapabilitiesWorkspace extendWorkspaceCapabilities(
+    ClientCapabilitiesWorkspace source,
     Map<String, dynamic> workspaceCapabilities,
   ) {
     // TODO(dantup): As above - it seems like this round trip should be
@@ -201,7 +181,7 @@
         json[key] = workspaceCapabilities[key];
       });
     }
-    return WorkspaceClientCapabilities.fromJson(json);
+    return ClientCapabilitiesWorkspace.fromJson(json);
   }
 
   TextDocumentClientCapabilities withAllSupportedDynamicRegistrations(
@@ -228,8 +208,8 @@
     });
   }
 
-  WorkspaceClientCapabilities withApplyEditSupport(
-    WorkspaceClientCapabilities source,
+  ClientCapabilitiesWorkspace withApplyEditSupport(
+    ClientCapabilitiesWorkspace source,
   ) {
     return extendWorkspaceCapabilities(source, {'applyEdit': true});
   }
@@ -247,7 +227,7 @@
     });
   }
 
-  TextDocumentClientCapabilities withCompletionItemDeprecatedSupport(
+  TextDocumentClientCapabilities withCompletionItemDeprecatedFlagSupport(
     TextDocumentClientCapabilities source,
   ) {
     return extendTextDocumentCapabilities(source, {
@@ -280,22 +260,46 @@
     });
   }
 
-  WorkspaceClientCapabilities withConfigurationSupport(
-    WorkspaceClientCapabilities source,
+  TextDocumentClientCapabilities withCompletionItemTagSupport(
+    TextDocumentClientCapabilities source,
+    List<CompletionItemTag> tags,
+  ) {
+    return extendTextDocumentCapabilities(source, {
+      'completion': {
+        'completionItem': {
+          'tagSupport': {'valueSet': tags.map((k) => k.toJson()).toList()}
+        }
+      }
+    });
+  }
+
+  ClientCapabilitiesWorkspace withConfigurationSupport(
+    ClientCapabilitiesWorkspace source,
   ) {
     return extendWorkspaceCapabilities(source, {'configuration': true});
   }
 
-  WorkspaceClientCapabilities withDidChangeConfigurationDynamicRegistration(
-    WorkspaceClientCapabilities source,
+  TextDocumentClientCapabilities withDiagnosticTagSupport(
+    TextDocumentClientCapabilities source,
+    List<DiagnosticTag> tags,
+  ) {
+    return extendTextDocumentCapabilities(source, {
+      'publishDiagnostics': {
+        'tagSupport': {'valueSet': tags.map((k) => k.toJson()).toList()}
+      }
+    });
+  }
+
+  ClientCapabilitiesWorkspace withDidChangeConfigurationDynamicRegistration(
+    ClientCapabilitiesWorkspace source,
   ) {
     return extendWorkspaceCapabilities(source, {
       'didChangeConfiguration': {'dynamicRegistration': true}
     });
   }
 
-  WorkspaceClientCapabilities withDocumentChangesSupport(
-    WorkspaceClientCapabilities source,
+  ClientCapabilitiesWorkspace withDocumentChangesSupport(
+    ClientCapabilitiesWorkspace source,
   ) {
     return extendWorkspaceCapabilities(source, {
       'workspaceEdit': {'documentChanges': true}
@@ -370,8 +374,10 @@
   String projectFolderPath, mainFilePath, pubspecFilePath, analysisOptionsPath;
   Uri projectFolderUri, mainFileUri, pubspecFileUri, analysisOptionsUri;
   final String simplePubspecContent = 'name: my_project';
-  final startOfDocPos = Position(0, 0);
-  final startOfDocRange = Range(Position(0, 0), Position(0, 0));
+  final startOfDocPos = Position(line: 0, character: 0);
+  final startOfDocRange = Range(
+      start: Position(line: 0, character: 0),
+      end: Position(line: 0, character: 0));
 
   /// A stream of [NotificationMessage]s from the server that may be errors.
   Stream<NotificationMessage> get errorNotificationsFromServer {
@@ -514,13 +520,17 @@
   Future changeFile(
     int newVersion,
     Uri uri,
-    List<TextDocumentContentChangeEvent> changes,
+    List<
+            Either2<TextDocumentContentChangeEvent1,
+                TextDocumentContentChangeEvent2>>
+        changes,
   ) async {
     var notification = makeNotification(
       Method.textDocument_didChange,
       DidChangeTextDocumentParams(
-        VersionedTextDocumentIdentifier(newVersion, uri.toString()),
-        changes,
+        textDocument: VersionedTextDocumentIdentifier(
+            version: newVersion, uri: uri.toString()),
+        contentChanges: changes,
       ),
     );
     await sendNotificationToServer(notification);
@@ -530,9 +540,9 @@
     var notification = makeNotification(
       Method.workspace_didChangeWorkspaceFolders,
       DidChangeWorkspaceFoldersParams(
-        WorkspaceFoldersChangeEvent(
-          add?.map(toWorkspaceFolder)?.toList() ?? const [],
-          remove?.map(toWorkspaceFolder)?.toList() ?? const [],
+        event: WorkspaceFoldersChangeEvent(
+          added: add?.map(toWorkspaceFolder)?.toList() ?? const [],
+          removed: remove?.map(toWorkspaceFolder)?.toList() ?? const [],
         ),
       ),
     );
@@ -542,7 +552,8 @@
   Future closeFile(Uri uri) async {
     var notification = makeNotification(
       Method.textDocument_didClose,
-      DidCloseTextDocumentParams(TextDocumentIdentifier(uri.toString())),
+      DidCloseTextDocumentParams(
+          textDocument: TextDocumentIdentifier(uri: uri.toString())),
     );
     await sendNotificationToServer(notification);
   }
@@ -551,8 +562,8 @@
     final request = makeRequest(
       Method.workspace_executeCommand,
       ExecuteCommandParams(
-        command.command,
-        command.arguments,
+        command: command.command,
+        arguments: command.arguments,
       ),
     );
     return expectSuccessfulResponseTo(request);
@@ -646,8 +657,10 @@
     final request = makeRequest(
       Method.textDocument_formatting,
       DocumentFormattingParams(
-        TextDocumentIdentifier(fileUri),
-        FormattingOptions(2, true), // These currently don't do anything
+        textDocument: TextDocumentIdentifier(uri: fileUri),
+        options: FormattingOptions(
+            tabSize: 2,
+            insertSpaces: true), // These currently don't do anything
       ),
     );
     return expectSuccessfulResponseTo(request);
@@ -658,10 +671,12 @@
     final request = makeRequest(
       Method.textDocument_onTypeFormatting,
       DocumentOnTypeFormattingParams(
-        TextDocumentIdentifier(fileUri),
-        pos,
-        character,
-        FormattingOptions(2, true), // These currently don't do anything
+        ch: character,
+        options: FormattingOptions(
+            tabSize: 2,
+            insertSpaces: true), // These currently don't do anything
+        textDocument: TextDocumentIdentifier(uri: fileUri),
+        position: pos,
       ),
     );
     return expectSuccessfulResponseTo(request);
@@ -675,12 +690,13 @@
     final request = makeRequest(
       Method.textDocument_codeAction,
       CodeActionParams(
-          TextDocumentIdentifier(fileUri),
-          range ?? beginningOfDocument,
-          // TODO(dantup): We may need to revise the tests/implementation when
-          // it's clear how we're supposed to handle diagnostics:
-          // https://github.com/Microsoft/language-server-protocol/issues/583
-          CodeActionContext([], kinds)),
+        textDocument: TextDocumentIdentifier(uri: fileUri),
+        range: range ?? beginningOfDocument,
+        // TODO(dantup): We may need to revise the tests/implementation when
+        // it's clear how we're supposed to handle diagnostics:
+        // https://github.com/Microsoft/language-server-protocol/issues/583
+        context: CodeActionContext(diagnostics: [], only: kinds),
+      ),
     );
     return expectSuccessfulResponseTo(request);
   }
@@ -690,9 +706,9 @@
     final request = makeRequest(
       Method.textDocument_completion,
       CompletionParams(
-        context,
-        TextDocumentIdentifier(uri.toString()),
-        pos,
+        context: context,
+        textDocument: TextDocumentIdentifier(uri: uri.toString()),
+        position: pos,
       ),
     );
     return expectSuccessfulResponseTo<List<CompletionItem>>(request);
@@ -702,8 +718,8 @@
     final request = makeRequest(
       Method.textDocument_definition,
       TextDocumentPositionParams(
-        TextDocumentIdentifier(uri.toString()),
-        pos,
+        textDocument: TextDocumentIdentifier(uri: uri.toString()),
+        position: pos,
       ),
     );
     return expectSuccessfulResponseTo<List<Location>>(request);
@@ -721,8 +737,8 @@
     final request = makeRequest(
       Method.textDocument_documentHighlight,
       TextDocumentPositionParams(
-        TextDocumentIdentifier(uri.toString()),
-        pos,
+        textDocument: TextDocumentIdentifier(uri: uri.toString()),
+        position: pos,
       ),
     );
     return expectSuccessfulResponseTo<List<DocumentHighlight>>(request);
@@ -733,7 +749,7 @@
     final request = makeRequest(
       Method.textDocument_documentSymbol,
       DocumentSymbolParams(
-        TextDocumentIdentifier(fileUri),
+        textDocument: TextDocumentIdentifier(uri: fileUri),
       ),
     );
     return expectSuccessfulResponseTo(request);
@@ -742,7 +758,9 @@
   Future<List<FoldingRange>> getFoldingRegions(Uri uri) {
     final request = makeRequest(
       Method.textDocument_foldingRange,
-      FoldingRangeParams(TextDocumentIdentifier(uri.toString())),
+      FoldingRangeParams(
+        textDocument: TextDocumentIdentifier(uri: uri.toString()),
+      ),
     );
     return expectSuccessfulResponseTo<List<FoldingRange>>(request);
   }
@@ -750,7 +768,9 @@
   Future<Hover> getHover(Uri uri, Position pos) {
     final request = makeRequest(
       Method.textDocument_hover,
-      TextDocumentPositionParams(TextDocumentIdentifier(uri.toString()), pos),
+      TextDocumentPositionParams(
+          textDocument: TextDocumentIdentifier(uri: uri.toString()),
+          position: pos),
     );
     return expectSuccessfulResponseTo<Hover>(request);
   }
@@ -763,8 +783,8 @@
     final request = makeRequest(
       Method.textDocument_implementation,
       TextDocumentPositionParams(
-        TextDocumentIdentifier(uri.toString()),
-        pos,
+        textDocument: TextDocumentIdentifier(uri: uri.toString()),
+        position: pos,
       ),
     );
     return expectSuccessfulResponseTo<List<Location>>(request);
@@ -778,9 +798,9 @@
     final request = makeRequest(
       Method.textDocument_references,
       ReferenceParams(
-        ReferenceContext(includeDeclarations),
-        TextDocumentIdentifier(uri.toString()),
-        pos,
+        context: ReferenceContext(includeDeclaration: includeDeclarations),
+        textDocument: TextDocumentIdentifier(uri: uri.toString()),
+        position: pos,
       ),
     );
     return expectSuccessfulResponseTo<List<Location>>(request);
@@ -790,8 +810,8 @@
     final request = makeRequest(
       Method.textDocument_signatureHelp,
       TextDocumentPositionParams(
-        TextDocumentIdentifier(uri.toString()),
-        pos,
+        textDocument: TextDocumentIdentifier(uri: uri.toString()),
+        position: pos,
       ),
     );
     return expectSuccessfulResponseTo<SignatureHelp>(request);
@@ -804,8 +824,8 @@
     final request = makeRequest(
       CustomMethods.Super,
       TextDocumentPositionParams(
-        TextDocumentIdentifier(uri.toString()),
-        pos,
+        textDocument: TextDocumentIdentifier(uri: uri.toString()),
+        position: pos,
       ),
     );
     return expectSuccessfulResponseTo<Location>(request);
@@ -814,7 +834,7 @@
   Future<List<SymbolInformation>> getWorkspaceSymbols(String query) {
     final request = makeRequest(
       Method.workspace_symbol,
-      WorkspaceSymbolParams(query),
+      WorkspaceSymbolParams(query: query),
     );
     return expectSuccessfulResponseTo(request);
   }
@@ -872,7 +892,8 @@
     Uri rootUri,
     List<Uri> workspaceFolders,
     TextDocumentClientCapabilities textDocumentCapabilities,
-    WorkspaceClientCapabilities workspaceCapabilities,
+    ClientCapabilitiesWorkspace workspaceCapabilities,
+    ClientCapabilitiesWindow windowCapabilities,
     Map<String, Object> initializationOptions,
     bool throwOnFailure = true,
   }) async {
@@ -884,17 +905,16 @@
     final request = makeRequest(
         Method.initialize,
         InitializeParams(
-            null,
-            rootPath,
-            rootUri?.toString(),
-            initializationOptions,
-            ClientCapabilities(
-              workspaceCapabilities,
-              textDocumentCapabilities,
-              null,
-            ),
-            null,
-            workspaceFolders?.map(toWorkspaceFolder)?.toList()));
+          rootPath: rootPath,
+          rootUri: rootUri?.toString(),
+          initializationOptions: initializationOptions,
+          capabilities: ClientCapabilities(
+            workspace: workspaceCapabilities,
+            textDocument: textDocumentCapabilities,
+            window: windowCapabilities,
+          ),
+          workspaceFolders: workspaceFolders?.map(toWorkspaceFolder)?.toList(),
+        ));
     final response = await sendRequestToServer(request);
     expect(response.id, equals(request.id));
 
@@ -912,24 +932,27 @@
   }
 
   NotificationMessage makeNotification(Method method, ToJsonable params) {
-    return NotificationMessage(method, params, jsonRpcVersion);
+    return NotificationMessage(
+        method: method, params: params, jsonrpc: jsonRpcVersion);
   }
 
   RequestMessage makeRenameRequest(
       int version, Uri uri, Position pos, String newName) {
     final docIdentifier = version != null
-        ? VersionedTextDocumentIdentifier(version, uri.toString())
-        : TextDocumentIdentifier(uri.toString());
+        ? VersionedTextDocumentIdentifier(version: version, uri: uri.toString())
+        : TextDocumentIdentifier(uri: uri.toString());
     final request = makeRequest(
       Method.textDocument_rename,
-      RenameParams(docIdentifier, pos, newName),
+      RenameParams(
+          newName: newName, textDocument: docIdentifier, position: pos),
     );
     return request;
   }
 
   RequestMessage makeRequest(Method method, ToJsonable params) {
     final id = Either2<num, String>.t1(_id++);
-    return RequestMessage(id, method, params, jsonRpcVersion);
+    return RequestMessage(
+        id: id, method: method, params: params, jsonrpc: jsonRpcVersion);
   }
 
   /// Watches for `client/registerCapability` requests and updates
@@ -968,7 +991,11 @@
     var notification = makeNotification(
       Method.textDocument_didOpen,
       DidOpenTextDocumentParams(
-          TextDocumentItem(uri.toString(), dartLanguageId, version, content)),
+          textDocument: TextDocumentItem(
+              uri: uri.toString(),
+              languageId: dartLanguageId,
+              version: version,
+              text: content)),
     );
     await sendNotificationToServer(notification);
     await pumpEventQueue();
@@ -996,8 +1023,8 @@
     final request = makeRequest(
       Method.textDocument_prepareRename,
       TextDocumentPositionParams(
-        TextDocumentIdentifier(uri.toString()),
-        pos,
+        textDocument: TextDocumentIdentifier(uri: uri.toString()),
+        position: pos,
       ),
     );
     return expectSuccessfulResponseTo<RangeAndPlaceholder>(request);
@@ -1048,9 +1075,9 @@
           throw 'Found unclosed range starting at offset $startMarker';
         }
         yield Range(
-          positionFromOffset(
+          start: positionFromOffset(
               startMarker + offsetForEarlierMarkers, contentsWithoutMarkers),
-          positionFromOffset(
+          end: positionFromOffset(
               endMarker + offsetForEarlierMarkers - rangeMarkerStart.length,
               contentsWithoutMarkers),
         );
@@ -1090,7 +1117,11 @@
     return changeFile(
       newVersion,
       uri,
-      [TextDocumentContentChangeEvent(null, null, content)],
+      [
+        Either2<TextDocumentContentChangeEvent1,
+                TextDocumentContentChangeEvent2>.t2(
+            TextDocumentContentChangeEvent2(text: content))
+      ],
     );
   }
 
@@ -1105,14 +1136,14 @@
   /// Sends [responseParams] to the server as a successful response to
   /// a server-initiated [request].
   void respondTo<T>(RequestMessage request, T responseParams) {
-    sendResponseToServer(
-        ResponseMessage(request.id, responseParams, null, jsonRpcVersion));
+    sendResponseToServer(ResponseMessage(
+        id: request.id, result: responseParams, jsonrpc: jsonRpcVersion));
   }
 
   Future<ResponseMessage> sendDidChangeConfiguration() {
     final request = makeRequest(
       Method.workspace_didChangeConfiguration,
-      DidChangeConfigurationParams(null),
+      DidChangeConfigurationParams(),
     );
     return sendRequestToServer(request);
   }
@@ -1134,7 +1165,10 @@
   }
 
   WorkspaceFolder toWorkspaceFolder(Uri uri) {
-    return WorkspaceFolder(uri.toString(), path.basename(uri.toFilePath()));
+    return WorkspaceFolder(
+      uri: uri.toString(),
+      name: path.basename(uri.toFilePath()),
+    );
   }
 
   /// Tells the server the config has changed, and provides the supplied config
diff --git a/pkg/analysis_server/test/lsp/server_test.dart b/pkg/analysis_server/test/lsp/server_test.dart
index adca252..3e7a202 100644
--- a/pkg/analysis_server/test/lsp/server_test.dart
+++ b/pkg/analysis_server/test/lsp/server_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:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -23,8 +24,13 @@
     // client and server are out of sync and we expect the server to shut down.
     final error = await expectErrorNotification<ShowMessageParams>(() async {
       await changeFile(222, mainFileUri, [
-        TextDocumentContentChangeEvent(
-            Range(Position(99, 99), Position(99, 99)), null, ' '),
+        Either2<TextDocumentContentChangeEvent1,
+                TextDocumentContentChangeEvent2>.t1(
+            TextDocumentContentChangeEvent1(
+                range: Range(
+                    start: Position(line: 99, character: 99),
+                    end: Position(line: 99, character: 99)),
+                text: ' ')),
       ]);
     });
 
diff --git a/pkg/analysis_server/test/lsp/signature_help_test.dart b/pkg/analysis_server/test/lsp/signature_help_test.dart
index c5ef295..64937a9 100644
--- a/pkg/analysis_server/test/lsp/signature_help_test.dart
+++ b/pkg/analysis_server/test/lsp/signature_help_test.dart
@@ -40,8 +40,8 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('int i', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'int i'),
       ],
       expectedFormat: null,
     );
@@ -66,8 +66,8 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('int i', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'int i'),
       ],
       expectedFormat: MarkupKind.Markdown,
     );
@@ -90,8 +90,8 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('int i', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'int i'),
       ],
       expectedFormat: null,
     );
@@ -116,8 +116,8 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('int i', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'int i'),
       ],
       expectedFormat: MarkupKind.PlainText,
     );
@@ -146,8 +146,8 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('int i', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'int i'),
       ],
       expectedFormat: MarkupKind.Markdown,
     );
@@ -182,9 +182,9 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('bool b = true', null),
-        ParameterInformation('bool a', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'bool b = true'),
+        ParameterInformation(label: 'bool a'),
       ],
     );
   }
@@ -209,9 +209,9 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('bool b = true', null),
-        ParameterInformation('bool a', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'bool b = true'),
+        ParameterInformation(label: 'bool a'),
       ],
     );
   }
@@ -236,8 +236,8 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('bool b = true', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'bool b = true'),
       ],
     );
   }
@@ -262,8 +262,8 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('bool b = true', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'bool b = true'),
       ],
     );
   }
@@ -287,8 +287,8 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('int i', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'int i'),
       ],
     );
   }
@@ -312,8 +312,8 @@
       expectedLabel,
       expectedDoc,
       [
-        ParameterInformation('String s', null),
-        ParameterInformation('int i', null),
+        ParameterInformation(label: 'String s'),
+        ParameterInformation(label: 'int i'),
       ],
     );
   }
@@ -345,7 +345,7 @@
       // Plain string.
       expect(doc.valueEquals(expectedDoc), isTrue);
     } else {
-      final expected = MarkupContent(expectedFormat, expectedDoc);
+      final expected = MarkupContent(kind: expectedFormat, value: expectedDoc);
       expect(doc.valueEquals(expected), isTrue);
     }
   }
diff --git a/pkg/analysis_server/test/lsp/super_test.dart b/pkg/analysis_server/test/lsp/super_test.dart
index 0b81f12..b9192d9 100644
--- a/pkg/analysis_server/test/lsp/super_test.dart
+++ b/pkg/analysis_server/test/lsp/super_test.dart
@@ -31,8 +31,10 @@
       positionFromMarker(content),
     );
 
-    expect(res,
-        equals(Location(mainFileUri.toString(), rangeFromMarkers(content))));
+    expect(
+        res,
+        equals(Location(
+            uri: mainFileUri.toString(), range: rangeFromMarkers(content))));
   }
 
   Future<void> test_insideClass() async {
@@ -52,8 +54,10 @@
       positionFromMarker(content),
     );
 
-    expect(res,
-        equals(Location(mainFileUri.toString(), rangeFromMarkers(content))));
+    expect(
+        res,
+        equals(Location(
+            uri: mainFileUri.toString(), range: rangeFromMarkers(content))));
   }
 
   Future<void> test_insideMethod() async {
@@ -78,8 +82,10 @@
       positionFromMarker(content),
     );
 
-    expect(res,
-        equals(Location(mainFileUri.toString(), rangeFromMarkers(content))));
+    expect(
+        res,
+        equals(Location(
+            uri: mainFileUri.toString(), range: rangeFromMarkers(content))));
   }
 
   Future<void> test_methodName() async {
@@ -104,8 +110,10 @@
       positionFromMarker(content),
     );
 
-    expect(res,
-        equals(Location(mainFileUri.toString(), rangeFromMarkers(content))));
+    expect(
+        res,
+        equals(Location(
+            uri: mainFileUri.toString(), range: rangeFromMarkers(content))));
   }
 
   Future<void> test_methodReturnType() async {
@@ -130,7 +138,9 @@
       positionFromMarker(content),
     );
 
-    expect(res,
-        equals(Location(mainFileUri.toString(), rangeFromMarkers(content))));
+    expect(
+        res,
+        equals(Location(
+            uri: mainFileUri.toString(), range: rangeFromMarkers(content))));
   }
 }
diff --git a/pkg/analysis_server/test/lsp/test_all.dart b/pkg/analysis_server/test/lsp/test_all.dart
index 0870436..628b142 100644
--- a/pkg/analysis_server/test/lsp/test_all.dart
+++ b/pkg/analysis_server/test/lsp/test_all.dart
@@ -30,6 +30,7 @@
 import 'mapping_test.dart' as mapping;
 import 'outline_test.dart' as outline;
 import 'priority_files_test.dart' as priority_files;
+import 'reanalyze_test.dart' as reanalyze;
 import 'references_test.dart' as references;
 import 'rename_test.dart' as rename;
 import 'server_test.dart' as server;
@@ -66,6 +67,7 @@
     mapping.main();
     outline.main();
     priority_files.main();
+    reanalyze.main();
     references.main();
     rename.main();
     server.main();
diff --git a/pkg/analysis_server/test/lsp/workspace_symbols_test.dart b/pkg/analysis_server/test/lsp/workspace_symbols_test.dart
index 5138109..4c53c44 100644
--- a/pkg/analysis_server/test/lsp/workspace_symbols_test.dart
+++ b/pkg/analysis_server/test/lsp/workspace_symbols_test.dart
@@ -91,10 +91,10 @@
 
     // Create a request that doesn't supply the query param.
     final request = RequestMessage(
-      Either2<num, String>.t1(1),
-      Method.workspace_symbol,
-      <String, dynamic>{},
-      jsonRpcVersion,
+      id: Either2<num, String>.t1(1),
+      method: Method.workspace_symbol,
+      params: <String, dynamic>{},
+      jsonrpc: jsonRpcVersion,
     );
 
     final response = await sendRequestToServer(request);
diff --git a/pkg/analysis_server/test/mock_packages/flutter/lib/src/foundation/diagnostics.dart b/pkg/analysis_server/test/mock_packages/flutter/lib/src/foundation/diagnostics.dart
index 978d497..c2bae69 100644
--- a/pkg/analysis_server/test/mock_packages/flutter/lib/src/foundation/diagnostics.dart
+++ b/pkg/analysis_server/test/mock_packages/flutter/lib/src/foundation/diagnostics.dart
@@ -2,10 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-abstract class Diagnosticable with DiagnosticableMixin {}
-
+///// todo (pq): remove when linter 0.1.118 is integrated.
 mixin DiagnosticableMixin {}
 
+mixin Diagnosticable {}
+
+abstract class DiagnosticableTree with Diagnosticable {}
+
 class DiagnosticPropertiesBuilder {
   void add(DiagnosticsNode property) {}
 }
diff --git a/pkg/analysis_server/test/mock_packages/flutter/lib/src/widgets/basic.dart b/pkg/analysis_server/test/mock_packages/flutter/lib/src/widgets/basic.dart
index 761a15c..68ecbc6 100644
--- a/pkg/analysis_server/test/mock_packages/flutter/lib/src/widgets/basic.dart
+++ b/pkg/analysis_server/test/mock_packages/flutter/lib/src/widgets/basic.dart
@@ -65,6 +65,30 @@
   const Center({Key key, double heightFactor, Widget child});
 }
 
+class SizedBox extends SingleChildRenderObjectWidget {
+  const SizedBox({Key key, this.width, this.height, Widget child})
+      : super(key: key, child: child);
+
+  const SizedBox.expand({Key key, Widget child})
+      : width = double.infinity,
+        height = double.infinity,
+        super(key: key, child: child);
+
+  const SizedBox.shrink({Key key, Widget child})
+      : width = 0.0,
+        height = 0.0,
+        super(key: key, child: child);
+
+  SizedBox.fromSize({Key key, Widget child, Size size})
+      : width = size?.width,
+        height = size?.height,
+        super(key: key, child: child);
+
+  final double width;
+
+  final double height;
+}
+
 class ClipRect extends SingleChildRenderObjectWidget {
   const ClipRect({Key key, Widget child}) : super(key: key, child: child);
 
diff --git a/pkg/analysis_server/test/mock_packages/flutter/lib/src/widgets/framework.dart b/pkg/analysis_server/test/mock_packages/flutter/lib/src/widgets/framework.dart
index 3bc94fd7..bbe243f 100644
--- a/pkg/analysis_server/test/mock_packages/flutter/lib/src/widgets/framework.dart
+++ b/pkg/analysis_server/test/mock_packages/flutter/lib/src/widgets/framework.dart
@@ -47,7 +47,7 @@
   Widget build(BuildContext context) => null;
 }
 
-class Widget {
+class Widget extends DiagnosticableTree {
   final Key key;
 
   const Widget({this.key});
diff --git a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
index 203a14c..93e5edc 100644
--- a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
@@ -76,7 +76,6 @@
       bool includeColon = true,
       bool includeComma = false}) {
     var expected = <CompletionSuggestion>[];
-    var paramIndex = 0;
     namedArgumentsWithTypes.forEach((String name, String type) {
       var completion = includeColon ? '$name: ' : name;
       // Selection should be before any trailing commas.
@@ -84,12 +83,8 @@
       if (includeComma) {
         completion = '$completion,';
       }
-      var relevance = requiredParamIndices.contains(paramIndex++)
-          ? DART_RELEVANCE_NAMED_PARAMETER_REQUIRED
-          : DART_RELEVANCE_NAMED_PARAMETER;
       expected.add(assertSuggest(completion,
           csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-          relevance: relevance,
           paramName: name,
           paramType: type,
           selectionOffset: selectionOffset));
@@ -106,7 +101,6 @@
           suggestion.endsWith(',') ? suggestion.length - 1 : suggestion.length;
       expected.add(assertSuggest('$suggestion',
           csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-          relevance: DART_RELEVANCE_NAMED_PARAMETER,
           selectionOffset: selectionOffset));
     }
     assertNoOtherSuggestions(expected);
@@ -253,7 +247,6 @@
 
     assertSuggest(
       '(a, b) => ,',
-      relevance: DART_RELEVANCE_HIGH,
       selectionOffset: 10,
     );
 
@@ -349,7 +342,6 @@
 
     assertSuggest(
       '(a, {b, c}) => ,',
-      relevance: DART_RELEVANCE_HIGH,
       selectionOffset: 15,
     );
   }
@@ -382,7 +374,6 @@
 
     assertSuggest(
       '(a, [b, c]) => ,',
-      relevance: DART_RELEVANCE_HIGH,
       selectionOffset: 15,
     );
   }
@@ -402,7 +393,6 @@
 
     assertSuggest('children: [],',
         csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-        relevance: DART_RELEVANCE_NAMED_PARAMETER,
         defaultArgListString: null,
         selectionOffset: 11,
         defaultArgumentListTextRanges: null);
@@ -425,7 +415,6 @@
 
     assertSuggest('backgroundColor: ,',
         csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-        relevance: DART_RELEVANCE_NAMED_PARAMETER,
         defaultArgListString: null, // No default values.
         selectionOffset: 17);
   }
@@ -446,7 +435,6 @@
 
     assertSuggest('children: [],',
         csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-        relevance: DART_RELEVANCE_NAMED_PARAMETER,
         defaultArgListString: null,
         selectionOffset: 11,
         defaultArgumentListTextRanges: null);
@@ -468,7 +456,6 @@
 
     assertSuggest('children: [],',
         csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-        relevance: DART_RELEVANCE_NAMED_PARAMETER,
         defaultArgListString: null,
         selectionOffset: 11,
         defaultArgumentListTextRanges: null);
@@ -496,7 +483,6 @@
 
     assertSuggest('children: [],',
         csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-        relevance: DART_RELEVANCE_NAMED_PARAMETER,
         defaultArgListString: null,
         selectionOffset: 11,
         defaultArgumentListTextRanges: null);
@@ -523,7 +509,6 @@
 
     assertSuggest('children: ,',
         csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-        relevance: DART_RELEVANCE_NAMED_PARAMETER,
         selectionOffset: 10,
         defaultArgListString: null);
   }
@@ -548,7 +533,6 @@
 
     assertSuggest('slivers: [],',
         csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-        relevance: DART_RELEVANCE_NAMED_PARAMETER,
         defaultArgListString: null,
         selectionOffset: 10,
         defaultArgumentListTextRanges: null);
@@ -575,7 +559,6 @@
 
     assertSuggest('children: ',
         csKind: CompletionSuggestionKind.NAMED_ARGUMENT,
-        relevance: DART_RELEVANCE_NAMED_PARAMETER,
         defaultArgListString: null);
   }
 
diff --git a/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
index f984fb0..f5faa6a 100644
--- a/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
@@ -55,15 +55,9 @@
       class X {}''');
 
     await computeSuggestions();
-    assertSuggestClass('A',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
-    assertSuggestClass('B',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
-    assertSuggestClass('PB',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('A', kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('B', kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('PB', kind: CompletionSuggestionKind.IDENTIFIER);
     assertSuggestTopLevelVar('T1', null,
         kind: CompletionSuggestionKind.IDENTIFIER);
     assertSuggestFunction('F1', 'PB',
@@ -104,23 +98,15 @@
       class X {}''');
 
     await computeSuggestions();
-    assertSuggestClass('A',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
-    assertSuggestClass('B',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('A', kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('B', kind: CompletionSuggestionKind.IDENTIFIER);
     assertNotSuggested('_AB');
-    assertSuggestClass('PB',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('PB', kind: CompletionSuggestionKind.IDENTIFIER);
     assertSuggestTopLevelVar('T1', null,
         kind: CompletionSuggestionKind.IDENTIFIER);
     assertSuggestFunction('F1', 'PB',
         kind: CompletionSuggestionKind.IDENTIFIER);
-    assertSuggestClass('Clz',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('Clz', kind: CompletionSuggestionKind.IDENTIFIER);
     assertSuggestFunctionTypeAlias('F2', null,
         kind: CompletionSuggestionKind.IDENTIFIER);
     assertNotSuggested('C');
@@ -147,9 +133,7 @@
 import 'b.dart' show ^;
 ''');
     await computeSuggestions();
-    assertSuggestClass('A',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('A', kind: CompletionSuggestionKind.IDENTIFIER);
     assertNotSuggested('B');
   }
 
@@ -173,11 +157,7 @@
 import "b.dart" show ^;
 ''');
     await computeSuggestions();
-    assertSuggestClass('A',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
-    assertSuggestClass('B',
-        relevance: DART_RELEVANCE_DEFAULT,
-        kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('A', kind: CompletionSuggestionKind.IDENTIFIER);
+    assertSuggestClass('B', kind: CompletionSuggestionKind.IDENTIFIER);
   }
 }
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 2242171..d326ca1 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
@@ -183,7 +183,6 @@
 
   CompletionSuggestion assertSuggest(String completion,
       {CompletionSuggestionKind csKind = CompletionSuggestionKind.INVOCATION,
-      int relevance,
       ElementKind elemKind,
       bool isDeprecated = false,
       bool isPotential = false,
@@ -202,11 +201,6 @@
       failedCompletion('expected $completion $csKind $elemKind', suggestions);
     }
     expect(cs.kind, equals(csKind));
-    // todo (pq): remove when all relevance tests have been migrated
-    // see: https://github.com/dart-lang/sdk/issues/40104
-    if (relevance != null) {
-      expect(cs.relevance, equals(relevance), reason: completion);
-    }
     expect(cs.selectionOffset, equals(selectionOffset ?? completion.length));
     expect(cs.selectionLength, equals(0));
     expect(cs.isDeprecated, equals(isDeprecated));
@@ -241,15 +235,13 @@
   }
 
   CompletionSuggestion assertSuggestClass(String name,
-      {int relevance,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
+      {CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
       bool isDeprecated = false,
       String elemFile,
       String elemName,
       int elemOffset}) {
     var cs = assertSuggest(name,
         csKind: kind,
-        relevance: relevance,
         isDeprecated: isDeprecated,
         elemFile: elemFile,
         elemKind: ElementKind.CLASS,
@@ -265,9 +257,8 @@
   }
 
   CompletionSuggestion assertSuggestClassTypeAlias(String name,
-      {int relevance,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION}) {
-    var cs = assertSuggest(name, csKind: kind, relevance: relevance);
+      {CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION}) {
+    var cs = assertSuggest(name, csKind: kind);
     var element = cs.element;
     expect(element, isNotNull);
     expect(element.kind, equals(ElementKind.CLASS_TYPE_ALIAS));
@@ -279,13 +270,11 @@
   }
 
   CompletionSuggestion assertSuggestConstructor(String name,
-      {int relevance,
-      String elementName,
+      {String elementName,
       int elemOffset,
       String defaultArgListString = _UNCHECKED,
       List<int> defaultArgumentListTextRanges}) {
     var cs = assertSuggest(name,
-        relevance: relevance,
         elemKind: ElementKind.CONSTRUCTOR,
         elemOffset: elemOffset,
         defaultArgListString: defaultArgListString,
@@ -308,19 +297,8 @@
   }
 
   CompletionSuggestion assertSuggestEnumConst(String completion,
-      {int relevance = DART_RELEVANCE_DEFAULT,
-      bool isDeprecated = false,
-      bool hasTypeBoost = false}) {
-    // todo (pq): remove when all relevance tests have been migrated
-    // see: https://github.com/dart-lang/sdk/issues/40104
-    if (isDeprecated) {
-      relevance = DART_RELEVANCE_LOW;
-    }
-    if (hasTypeBoost) {
-      relevance += DART_RELEVANCE_BOOST_TYPE;
-    }
-    var suggestion = assertSuggest(completion,
-        relevance: relevance, isDeprecated: isDeprecated);
+      {bool isDeprecated = false}) {
+    var suggestion = assertSuggest(completion, isDeprecated: isDeprecated);
     expect(suggestion.completion, completion);
     expect(suggestion.isDeprecated, isDeprecated);
     expect(suggestion.element.kind, ElementKind.ENUM_CONSTANT);
@@ -328,14 +306,10 @@
   }
 
   CompletionSuggestion assertSuggestField(String name, String type,
-      {int relevance,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
+      {CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
       bool isDeprecated = false}) {
     var cs = assertSuggest(name,
-        csKind: kind,
-        relevance: relevance,
-        elemKind: ElementKind.FIELD,
-        isDeprecated: isDeprecated);
+        csKind: kind, elemKind: ElementKind.FIELD, isDeprecated: isDeprecated);
     // The returnType represents the type of a field
     expect(cs.returnType, type ?? 'dynamic');
     var element = cs.element;
@@ -352,12 +326,10 @@
   CompletionSuggestion assertSuggestFunction(String name, String returnType,
       {CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
       bool isDeprecated = false,
-      int relevance,
       String defaultArgListString = _UNCHECKED,
       List<int> defaultArgumentListTextRanges}) {
     var cs = assertSuggest(name,
         csKind: kind,
-        relevance: relevance,
         isDeprecated: isDeprecated,
         defaultArgListString: defaultArgListString,
         defaultArgumentListTextRanges: defaultArgumentListTextRanges);
@@ -388,11 +360,9 @@
     String name,
     String returnType, {
     bool isDeprecated = false,
-    int relevance,
     CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
   }) {
-    var cs = assertSuggest(name,
-        csKind: kind, relevance: relevance, isDeprecated: isDeprecated);
+    var cs = assertSuggest(name, csKind: kind, isDeprecated: isDeprecated);
     if (returnType != null) {
       expect(cs.returnType, returnType);
     } else if (isNullExpectedReturnTypeConsideredDynamic) {
@@ -417,14 +387,10 @@
   }
 
   CompletionSuggestion assertSuggestGetter(String name, String returnType,
-      {int relevance,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
+      {CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
       bool isDeprecated = false}) {
     var cs = assertSuggest(name,
-        csKind: kind,
-        relevance: relevance,
-        elemKind: ElementKind.GETTER,
-        isDeprecated: isDeprecated);
+        csKind: kind, elemKind: ElementKind.GETTER, isDeprecated: isDeprecated);
     expect(cs.returnType, returnType ?? 'dynamic');
     var element = cs.element;
     expect(element, isNotNull);
@@ -437,18 +403,9 @@
   }
 
   CompletionSuggestion assertSuggestLocalVariable(
-      String name, String returnType,
-      {int relevance = DART_RELEVANCE_LOCAL_VARIABLE,
-      bool hasTypeBoost = false,
-      bool hasSubtypeBoost = false}) {
-    if (hasTypeBoost) {
-      relevance += DART_RELEVANCE_BOOST_TYPE;
-    } else if (hasSubtypeBoost) {
-      relevance += DART_RELEVANCE_BOOST_SUBTYPE;
-    }
+      String name, String returnType) {
     // Local variables should only be suggested by LocalReferenceContributor
-    var cs = assertSuggest(name,
-        csKind: CompletionSuggestionKind.INVOCATION, relevance: relevance);
+    var cs = assertSuggest(name, csKind: CompletionSuggestionKind.INVOCATION);
     expect(cs.returnType, returnType ?? 'dynamic');
     var element = cs.element;
     expect(element, isNotNull);
@@ -462,15 +419,13 @@
 
   CompletionSuggestion assertSuggestMethod(
       String name, String declaringType, String returnType,
-      {int relevance,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
+      {CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
       bool isDeprecated = false,
       String defaultArgListString = _UNCHECKED,
       List<int> defaultArgumentListTextRanges,
       bool skipLocationCheck = false}) {
     var cs = assertSuggest(name,
         csKind: kind,
-        relevance: relevance,
         isDeprecated: isDeprecated,
         defaultArgListString: defaultArgListString,
         defaultArgumentListTextRanges: defaultArgumentListTextRanges,
@@ -491,15 +446,13 @@
   }
 
   CompletionSuggestion assertSuggestMixin(String name,
-      {int relevance,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
+      {CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
       bool isDeprecated = false,
       String elemFile,
       String elemName,
       int elemOffset}) {
     var cs = assertSuggest(name,
         csKind: kind,
-        relevance: relevance,
         isDeprecated: isDeprecated,
         elemFile: elemFile,
         elemKind: ElementKind.MIXIN,
@@ -515,21 +468,17 @@
   }
 
   CompletionSuggestion assertSuggestName(String name,
-      {int relevance,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.IDENTIFIER,
+      {CompletionSuggestionKind kind = CompletionSuggestionKind.IDENTIFIER,
       bool isDeprecated = false}) {
-    var cs = assertSuggest(name,
-        csKind: kind, relevance: relevance, isDeprecated: isDeprecated);
+    var cs = assertSuggest(name, csKind: kind, isDeprecated: isDeprecated);
     expect(cs.completion, equals(name));
     expect(cs.element, isNull);
     assertHasNoParameterInfo(cs);
     return cs;
   }
 
-  CompletionSuggestion assertSuggestParameter(String name, String returnType,
-      {int relevance = DART_RELEVANCE_PARAMETER}) {
-    var cs = assertSuggest(name,
-        csKind: CompletionSuggestionKind.INVOCATION, relevance: relevance);
+  CompletionSuggestion assertSuggestParameter(String name, String returnType) {
+    var cs = assertSuggest(name, csKind: CompletionSuggestionKind.INVOCATION);
     expect(cs.returnType, returnType ?? 'dynamic');
     var element = cs.element;
     expect(element, isNotNull);
@@ -541,10 +490,8 @@
   }
 
   CompletionSuggestion assertSuggestSetter(String name,
-      {int relevance,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION}) {
-    var cs = assertSuggest(name,
-        csKind: kind, relevance: relevance, elemKind: ElementKind.SETTER);
+      {CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION}) {
+    var cs = assertSuggest(name, csKind: kind, elemKind: ElementKind.SETTER);
     var element = cs.element;
     expect(element, isNotNull);
     expect(element.kind, equals(ElementKind.SETTER));
@@ -562,10 +509,9 @@
   CompletionSuggestion assertSuggestTopLevelVar(
     String name,
     String returnType, {
-    int relevance,
     CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
   }) {
-    var cs = assertSuggest(name, csKind: kind, relevance: relevance);
+    var cs = assertSuggest(name, csKind: kind);
     if (returnType != null) {
       expect(cs.returnType, returnType);
     } else if (isNullExpectedReturnTypeConsideredDynamic) {
@@ -585,10 +531,8 @@
     return cs;
   }
 
-  CompletionSuggestion assertSuggestTypeParameter(String name,
-      {int relevance = DART_RELEVANCE_TYPE_PARAMETER}) {
-    var cs = assertSuggest(name,
-        csKind: CompletionSuggestionKind.IDENTIFIER, relevance: relevance);
+  CompletionSuggestion assertSuggestTypeParameter(String name) {
+    var cs = assertSuggest(name, csKind: CompletionSuggestionKind.IDENTIFIER);
     expect(cs.returnType, isNull);
     var element = cs.element;
     expect(element, isNotNull);
diff --git a/pkg/analysis_server/test/services/completion/dart/extension_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/extension_member_contributor_test.dart
index 1c5cfd9..12a2cad 100644
--- a/pkg/analysis_server/test/services/completion/dart/extension_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/extension_member_contributor_test.dart
@@ -105,6 +105,19 @@
     assertNoSuggestions();
   }
 
+  Future<void> test_extension_onDynamic() async {
+    addTestSource('''
+extension E on dynamic {
+  void e() {}
+}
+void f(String s) {
+  s.^;
+}
+''');
+    await computeSuggestions();
+    assertSuggestMethod('e', null, 'void');
+  }
+
   Future<void> test_extensionOverride_doesNotMatch() async {
     addTestSource('''
 extension E on int {
diff --git a/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
index 9c45414..d28095f 100644
--- a/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
@@ -50,8 +50,8 @@
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestField('b', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestField('_c', 'X', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestField('b', null);
+    assertSuggestField('_c', 'X');
     assertNotSuggested('sb');
     assertNotSuggested('d');
     assertNotSuggested('_e');
@@ -86,8 +86,8 @@
     await computeSuggestions();
     expect(replacementOffset, completionOffset - 1);
     expect(replacementLength, 1);
-    assertSuggestField('b', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestField('_c', 'X', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestField('b', null);
+    assertSuggestField('_c', 'X');
     assertNotSuggested('d');
     assertNotSuggested('_e');
     assertNotSuggested('f');
@@ -121,8 +121,8 @@
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 1);
-    assertSuggestField('b', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestField('_c', 'X', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestField('b', null);
+    assertSuggestField('_c', 'X');
     assertNotSuggested('d');
     assertNotSuggested('_e');
     assertNotSuggested('f');
@@ -157,7 +157,7 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     assertNotSuggested('b');
-    assertSuggestField('_c', 'X', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestField('_c', 'X');
     assertNotSuggested('d');
     assertNotSuggested('_e');
     assertNotSuggested('f');
@@ -186,7 +186,7 @@
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestField('y', 'int', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestField('y', 'int');
     assertNotSuggested('x');
   }
 
@@ -202,7 +202,7 @@
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestField('y', 'int', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestField('y', 'int');
     assertNotSuggested('x');
   }
 }
diff --git a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
index b043bd3..7e7ce51 100644
--- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
@@ -1018,8 +1018,7 @@
     assertNotSuggested('_B');
     // hidden element not suggested
     assertNotSuggested('D');
-    assertSuggestFunction('D1', 'dynamic',
-        isDeprecated: true, relevance: DART_RELEVANCE_LOW);
+    assertSuggestFunction('D1', 'dynamic', isDeprecated: true);
     assertNotSuggested('D2');
     // Not imported, so not suggested
     assertNotSuggested('D3');
@@ -1873,8 +1872,8 @@
     await computeSuggestions();
 
     assertSuggestEnum('E');
-    assertSuggestEnumConst('E.one', hasTypeBoost: true);
-    assertSuggestEnumConst('E.two', hasTypeBoost: true);
+    assertSuggestEnumConst('E.one');
+    assertSuggestEnumConst('E.two');
 
     assertSuggestEnum('F');
     assertSuggestEnumConst('F.three');
@@ -2769,15 +2768,9 @@
 ''');
     await computeSuggestions();
 
-    assertSuggestConstructor('A',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestConstructor('B',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestConstructor('C',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestConstructor('A', elemOffset: -1);
+    assertSuggestConstructor('B', elemOffset: -1);
+    assertSuggestConstructor('C', elemOffset: -1);
     assertSuggestConstructor('D', elemOffset: -1);
   }
 
diff --git a/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
index e6bab18..b651d8a 100644
--- a/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
@@ -16,7 +16,7 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(KeywordContributorTest);
-    defineReflectiveTests(KeywordContributorWithNnbdTest);
+    defineReflectiveTests(KeywordContributorWithNullSafetyTest);
   });
 }
 
@@ -385,7 +385,12 @@
   }
 
   List<Keyword> get staticMember {
-    var keywords = <Keyword>[Keyword.CONST, Keyword.COVARIANT, Keyword.FINAL];
+    var keywords = <Keyword>[
+      Keyword.ABSTRACT,
+      Keyword.CONST,
+      Keyword.COVARIANT,
+      Keyword.FINAL
+    ];
     if (isEnabled(ExperimentalFeatures.non_nullable)) {
       keywords.add(Keyword.LATE);
     }
@@ -393,8 +398,7 @@
   }
 
   void assertSuggestKeywords(Iterable<Keyword> expectedKeywords,
-      {List<String> pseudoKeywords = NO_PSEUDO_KEYWORDS,
-      int relevance = DART_RELEVANCE_KEYWORD}) {
+      {List<String> pseudoKeywords = NO_PSEUDO_KEYWORDS}) {
     var expectedCompletions = <String>{};
     var expectedOffsets = <String, int>{};
     var actualCompletions = <String>{};
@@ -431,16 +435,6 @@
     }
     for (var s in suggestions) {
       if (s.kind == CompletionSuggestionKind.KEYWORD) {
-        if (s.completion.startsWith(Keyword.IMPORT.lexeme)) {
-          var importRelevance = relevance;
-          expect(s.relevance, equals(importRelevance), reason: s.completion);
-        } else {
-          if (s.completion == Keyword.RETHROW.lexeme) {
-            expect(s.relevance, equals(relevance - 1), reason: s.completion);
-          } else {
-            expect(s.relevance, equals(relevance), reason: s.completion);
-          }
-        }
         var expectedOffset = expectedOffsets[s.completion];
         expectedOffset ??= s.completion.length;
         expect(
@@ -467,35 +461,31 @@
   Future<void> test_after_class_noPrefix() async {
     addTestSource('class A {} ^');
     await computeSuggestions();
-    assertSuggestKeywords(declarationKeywords, relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(declarationKeywords);
   }
 
   Future<void> test_after_class_prefix() async {
     addTestSource('class A {} c^');
     await computeSuggestions();
-    assertSuggestKeywords(declarationKeywords, relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(declarationKeywords);
   }
 
   Future<void> test_after_import_noPrefix() async {
     addTestSource('import "foo"; ^');
     await computeSuggestions();
-    assertSuggestKeywords(directiveAndDeclarationKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveAndDeclarationKeywords);
   }
 
   Future<void> test_after_import_prefix() async {
     addTestSource('import "foo"; c^');
     await computeSuggestions();
-    assertSuggestKeywords(directiveAndDeclarationKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveAndDeclarationKeywords);
   }
 
   Future<void> test_anonymous_function_async() async {
     addTestSource('main() {foo(() ^ {}}}');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_anonymous_function_async2() async {
@@ -505,9 +495,7 @@
     // and reports a single function expression argument
     // while analyzer adds the closing paren before the `a`
     // and adds synthetic `;`s making `a` a statement.
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_anonymous_function_async3() async {
@@ -519,8 +507,7 @@
   Future<void> test_anonymous_function_async4() async {
     addTestSource('main() {foo(() ^ => 2}}');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async'], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async']);
   }
 
   Future<void> test_anonymous_function_async5() async {
@@ -533,9 +520,7 @@
   Future<void> test_anonymous_function_async6() async {
     addTestSource('main() {foo("bar", () as^{}}');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_anonymous_function_async7() async {
@@ -543,16 +528,13 @@
     await computeSuggestions();
     assertSuggestKeywords([],
         pseudoKeywords:
-            usingFastaParser ? ['async'] : ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+            usingFastaParser ? ['async'] : ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_anonymous_function_async8() async {
     addTestSource('main() {foo(() ^ {})}}');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_anonymous_function_async9() async {
@@ -560,9 +542,7 @@
     await computeSuggestions();
     // Fasta interprets the argument as a function expression
     // while analyzer adds synthetic `;`s making `a` a statement.
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_argument() async {
@@ -643,8 +623,7 @@
     addTestSource('^ import foo;');
     await computeSuggestions();
     assertSuggestKeywords(
-        [Keyword.EXPORT, Keyword.IMPORT, Keyword.LIBRARY, Keyword.PART],
-        relevance: DART_RELEVANCE_HIGH);
+        [Keyword.EXPORT, Keyword.IMPORT, Keyword.LIBRARY, Keyword.PART]);
   }
 
   Future<void> test_catch_1a() async {
@@ -848,8 +827,7 @@
   Future<void> test_class() async {
     addTestSource('class A e^ { }');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.EXTENDS, Keyword.IMPLEMENTS],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.EXTENDS, Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_class_body() async {
@@ -906,22 +884,19 @@
   Future<void> test_class_extends() async {
     addTestSource('class A extends foo ^');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IMPLEMENTS, Keyword.WITH],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IMPLEMENTS, Keyword.WITH]);
   }
 
   Future<void> test_class_extends2() async {
     addTestSource('class A extends foo i^');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IMPLEMENTS, Keyword.WITH],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IMPLEMENTS, Keyword.WITH]);
   }
 
   Future<void> test_class_extends3() async {
     addTestSource('class A extends foo i^ { }');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IMPLEMENTS, Keyword.WITH],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IMPLEMENTS, Keyword.WITH]);
   }
 
   Future<void> test_class_extends_name() async {
@@ -933,27 +908,23 @@
   Future<void> test_class_implements() async {
     addTestSource('class A ^ implements foo');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.EXTENDS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.EXTENDS]);
   }
 
   Future<void> test_class_implements2() async {
     addTestSource('class A e^ implements foo');
     await computeSuggestions();
-    assertSuggestKeywords(
-        usingFastaParser
-            ? [Keyword.EXTENDS]
-            : [Keyword.EXTENDS, Keyword.IMPLEMENTS],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(usingFastaParser
+        ? [Keyword.EXTENDS]
+        : [Keyword.EXTENDS, Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_class_implements3() async {
     addTestSource('class A e^ implements foo { }');
     await computeSuggestions();
-    assertSuggestKeywords(
-        usingFastaParser
-            ? [Keyword.EXTENDS]
-            : [Keyword.EXTENDS, Keyword.IMPLEMENTS],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(usingFastaParser
+        ? [Keyword.EXTENDS]
+        : [Keyword.EXTENDS, Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_class_implements_name() async {
@@ -991,40 +962,37 @@
   Future<void> test_class_noBody() async {
     addTestSource('class A ^');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.EXTENDS, Keyword.IMPLEMENTS],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.EXTENDS, Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_class_noBody2() async {
     addTestSource('class A e^');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.EXTENDS, Keyword.IMPLEMENTS],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.EXTENDS, Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_class_noBody3() async {
     addTestSource('class A e^ String foo;');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.EXTENDS, Keyword.IMPLEMENTS],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.EXTENDS, Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_class_with() async {
     addTestSource('class A extends foo with bar ^');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IMPLEMENTS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_class_with2() async {
     addTestSource('class A extends foo with bar i^');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IMPLEMENTS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_class_with3() async {
     addTestSource('class A extends foo with bar i^ { }');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IMPLEMENTS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_class_with_name() async {
@@ -1074,22 +1042,19 @@
   Future<void> test_do_break_continue_insideClass() async {
     addTestSource('class A {foo() {do {^} while (true);}}');
     await computeSuggestions();
-    assertSuggestKeywords(statementStartInLoopInClass,
-        relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(statementStartInLoopInClass);
   }
 
   Future<void> test_do_break_continue_outsideClass() async {
     addTestSource('main() {do {^} while (true);}');
     await computeSuggestions();
-    assertSuggestKeywords(statementStartInLoopOutsideClass,
-        relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(statementStartInLoopOutsideClass);
   }
 
   Future<void> test_empty() async {
     addTestSource('^');
     await computeSuggestions();
-    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords);
   }
 
   Future<void> test_extension_body_beginning() async {
@@ -1133,39 +1098,37 @@
   Future<void> test_extension_noBody_named() async {
     addTestSource('extension E ^');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.ON], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.ON]);
   }
 
   Future<void> test_extension_noBody_unnamed() async {
     addTestSource('extension ^');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.ON], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.ON]);
   }
 
   Future<void> test_for_break_continue_insideClass() async {
     addTestSource('class A {foo() {for (int x in myList) {^}}}');
     await computeSuggestions();
-    assertSuggestKeywords(statementStartInLoopInClass,
-        relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(statementStartInLoopInClass);
   }
 
   Future<void> test_for_break_continue_outsideClass() async {
     addTestSource('main() {for (int x in myList) {^}}');
     await computeSuggestions();
-    assertSuggestKeywords(statementStartInLoopOutsideClass,
-        relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(statementStartInLoopOutsideClass);
   }
 
   Future<void> test_for_expression_in() async {
     addTestSource('main() {for (int x i^)}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IN], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IN]);
   }
 
   Future<void> test_for_expression_in2() async {
     addTestSource('main() {for (int x in^)}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IN], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IN]);
   }
 
   Future<void> test_for_expression_in_inInitializer() async {
@@ -1189,47 +1152,39 @@
   Future<void> test_for_initialization_var() async {
     addTestSource('main() {for (^)}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.VAR], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.VAR]);
   }
 
   Future<void> test_function_async() async {
     addTestSource('main()^');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_function_async2() async {
     addTestSource('main()^{}');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_function_async3() async {
     addTestSource('main()a^');
     await computeSuggestions();
     assertSuggestKeywords(declarationKeywords,
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+        pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_function_async4() async {
     addTestSource('main()a^{}');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_function_async5() async {
     addTestSource('main()a^ Foo foo;');
     await computeSuggestions();
     assertSuggestKeywords(declarationKeywords,
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+        pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_function_body_inClass_constructorInitializer() async {
@@ -1399,8 +1354,7 @@
   Future<void> test_if_after_else() async {
     addTestSource('main() { if (true) {} else ^ }');
     await computeSuggestions();
-    assertSuggestKeywords(statementStartOutsideClass,
-        relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(statementStartOutsideClass);
   }
 
   Future<void> test_if_afterThen_nextCloseCurlyBrace0() async {
@@ -1409,7 +1363,7 @@
     var keywords = <Keyword>[];
     keywords.addAll(statementStartOutsideClass);
     keywords.add(Keyword.ELSE);
-    assertSuggestKeywords(keywords, relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(keywords);
   }
 
   Future<void> test_if_afterThen_nextCloseCurlyBrace1() async {
@@ -1418,7 +1372,7 @@
     var keywords = <Keyword>[];
     keywords.addAll(statementStartOutsideClass);
     keywords.add(Keyword.ELSE);
-    assertSuggestKeywords(keywords, relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(keywords);
   }
 
   Future<void> test_if_afterThen_nextStatement0() async {
@@ -1427,19 +1381,19 @@
     var keywords = <Keyword>[];
     keywords.addAll(statementStartOutsideClass);
     keywords.add(Keyword.ELSE);
-    assertSuggestKeywords(keywords, relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(keywords);
   }
 
   Future<void> test_if_condition_isKeyword() async {
     addTestSource('main() { if (v i^) {} }');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IS]);
   }
 
   Future<void> test_if_condition_isKeyword2() async {
     addTestSource('main() { if (v i^ && false) {} }');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IS]);
   }
 
   Future<void> test_if_expression_in_class() async {
@@ -1637,115 +1591,104 @@
   Future<void> test_import() async {
     addTestSource('import "foo" deferred as foo ^;');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['show', 'hide'], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['show', 'hide']);
   }
 
   Future<void> test_import_as() async {
     addTestSource('import "foo" deferred ^;');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.AS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.AS]);
   }
 
   Future<void> test_import_as2() async {
     addTestSource('import "foo" deferred a^;');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.AS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.AS]);
   }
 
   Future<void> test_import_as3() async {
     addTestSource('import "foo" deferred a^');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.AS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.AS]);
   }
 
   Future<void> test_import_deferred() async {
     addTestSource('import "foo" ^ as foo;');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.DEFERRED], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.DEFERRED]);
   }
 
   Future<void> test_import_deferred2() async {
     addTestSource('import "foo" d^ as foo;');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.DEFERRED], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.DEFERRED]);
   }
 
   Future<void> test_import_deferred3() async {
     addTestSource('import "foo" d^ show foo;');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.AS],
-        pseudoKeywords: ['deferred as'], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.AS], pseudoKeywords: ['deferred as']);
   }
 
   Future<void> test_import_deferred4() async {
     addTestSource('import "foo" d^ hide foo;');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.AS],
-        pseudoKeywords: ['deferred as'], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.AS], pseudoKeywords: ['deferred as']);
   }
 
   Future<void> test_import_deferred5() async {
     addTestSource('import "foo" d^');
     await computeSuggestions();
     assertSuggestKeywords([Keyword.AS],
-        pseudoKeywords: ['deferred as', 'show', 'hide'],
-        relevance: DART_RELEVANCE_HIGH);
+        pseudoKeywords: ['deferred as', 'show', 'hide']);
   }
 
   Future<void> test_import_deferred6() async {
     addTestSource('import "foo" d^ import');
     await computeSuggestions();
     assertSuggestKeywords([Keyword.AS],
-        pseudoKeywords: ['deferred as', 'show', 'hide'],
-        relevance: DART_RELEVANCE_HIGH);
+        pseudoKeywords: ['deferred as', 'show', 'hide']);
   }
 
   Future<void> test_import_deferred_as() async {
     addTestSource('import "foo" ^;');
     await computeSuggestions();
     assertSuggestKeywords([Keyword.AS],
-        pseudoKeywords: ['deferred as', 'show', 'hide'],
-        relevance: DART_RELEVANCE_HIGH);
+        pseudoKeywords: ['deferred as', 'show', 'hide']);
   }
 
   Future<void> test_import_deferred_as2() async {
     addTestSource('import "foo" d^;');
     await computeSuggestions();
     assertSuggestKeywords([Keyword.AS],
-        pseudoKeywords: ['deferred as', 'show', 'hide'],
-        relevance: DART_RELEVANCE_HIGH);
+        pseudoKeywords: ['deferred as', 'show', 'hide']);
   }
 
   Future<void> test_import_deferred_as3() async {
     addTestSource('import "foo" ^');
     await computeSuggestions();
     assertSuggestKeywords([Keyword.AS],
-        pseudoKeywords: ['deferred as', 'show', 'hide'],
-        relevance: DART_RELEVANCE_HIGH);
+        pseudoKeywords: ['deferred as', 'show', 'hide']);
   }
 
   Future<void> test_import_deferred_as4() async {
     addTestSource('import "foo" d^');
     await computeSuggestions();
     assertSuggestKeywords([Keyword.AS],
-        pseudoKeywords: ['deferred as', 'show', 'hide'],
-        relevance: DART_RELEVANCE_HIGH);
+        pseudoKeywords: ['deferred as', 'show', 'hide']);
   }
 
   Future<void> test_import_deferred_as5() async {
     addTestSource('import "foo" sh^ import "bar"; import "baz";');
     await computeSuggestions();
     assertSuggestKeywords([Keyword.AS],
-        pseudoKeywords: ['deferred as', 'show', 'hide'],
-        relevance: DART_RELEVANCE_HIGH);
+        pseudoKeywords: ['deferred as', 'show', 'hide']);
   }
 
   Future<void> test_import_deferred_not() async {
     addTestSource('import "foo" as foo ^;');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['show', 'hide'], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['show', 'hide']);
   }
 
   Future<void> test_import_deferred_partial() async {
@@ -1753,7 +1696,7 @@
     await computeSuggestions();
     expect(replacementOffset, 30);
     expect(replacementLength, 3);
-    assertSuggestKeywords([Keyword.DEFERRED], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.DEFERRED]);
     expect(suggestions[0].selectionOffset, 8);
     expect(suggestions[0].selectionLength, 0);
   }
@@ -1770,8 +1713,7 @@
     expect(replacementOffset, 0);
     expect(replacementLength, 3);
     // TODO(danrubel) should not suggest declaration keywords
-    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords);
   }
 
   Future<void> test_import_partial2() async {
@@ -1780,8 +1722,7 @@
     expect(replacementOffset, 0);
     expect(replacementLength, 3);
     // TODO(danrubel) should not suggest declaration keywords
-    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords);
   }
 
   Future<void> test_import_partial3() async {
@@ -1790,8 +1731,7 @@
     expect(replacementOffset, 1);
     expect(replacementLength, 3);
     // TODO(danrubel) should not suggest declaration keywords
-    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords);
   }
 
   Future<void> test_import_partial4() async {
@@ -1800,8 +1740,7 @@
     expect(replacementOffset, 0);
     expect(replacementLength, 0);
     // TODO(danrubel) should not suggest declaration keywords
-    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords);
   }
 
   Future<void> test_import_partial5() async {
@@ -1810,8 +1749,7 @@
     expect(replacementOffset, 14);
     expect(replacementLength, 3);
     // TODO(danrubel) should not suggest declaration keywords
-    assertSuggestKeywords(directiveDeclarationKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveDeclarationKeywords);
   }
 
   Future<void> test_import_partial6() async {
@@ -1821,8 +1759,7 @@
     expect(replacementOffset, 32);
     expect(replacementLength, 3);
     // TODO(danrubel) should not suggest declaration keywords
-    assertSuggestKeywords(directiveDeclarationKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveDeclarationKeywords);
   }
 
   Future<void> test_integerLiteral_inArgumentList() async {
@@ -1840,20 +1777,19 @@
   Future<void> test_is_expression() async {
     addTestSource('main() {if (x is^)}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IS]);
   }
 
   Future<void> test_is_expression_partial() async {
     addTestSource('main() {if (x i^)}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IS]);
   }
 
   Future<void> test_library() async {
     addTestSource('library foo;^');
     await computeSuggestions();
-    assertSuggestKeywords(directiveAndDeclarationKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveAndDeclarationKeywords);
   }
 
   Future<void> test_library_declaration() async {
@@ -1890,9 +1826,7 @@
   Future<void> test_method_async2() async {
     addTestSource('class A { foo() ^{}}');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_method_async3() async {
@@ -1905,9 +1839,7 @@
   Future<void> test_method_async4() async {
     addTestSource('class A { foo() a^{}}');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async', 'async*', 'sync*'],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async', 'async*', 'sync*']);
   }
 
   Future<void> test_method_async5() async {
@@ -1927,8 +1859,7 @@
   Future<void> test_method_async7() async {
     addTestSource('class A { foo() ^ => Foo foo;}');
     await computeSuggestions();
-    assertSuggestKeywords([],
-        pseudoKeywords: ['async'], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([], pseudoKeywords: ['async']);
   }
 
   Future<void> test_method_async8() async {
@@ -2109,14 +2040,13 @@
   Future<void> test_mixin() async {
     addTestSource('mixin M o^ { }');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.ON, Keyword.IMPLEMENTS],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.ON, Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_mixin_afterOnClause() async {
     addTestSource('mixin M on A i^ { } class A {}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.IMPLEMENTS], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.IMPLEMENTS]);
   }
 
   Future<void> test_named_constructor_invocation() async {
@@ -2152,22 +2082,19 @@
   Future<void> test_part_of() async {
     addTestSource('part of foo;^');
     await computeSuggestions();
-    assertSuggestKeywords(directiveAndDeclarationKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveAndDeclarationKeywords);
   }
 
   Future<void> test_partial_class() async {
     addTestSource('cl^');
     await computeSuggestions();
-    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveDeclarationAndLibraryKeywords);
   }
 
   Future<void> test_partial_class2() async {
     addTestSource('library a; cl^');
     await computeSuggestions();
-    assertSuggestKeywords(directiveAndDeclarationKeywords,
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords(directiveAndDeclarationKeywords);
   }
 
   Future<void> test_prefixed_field() async {
@@ -2235,29 +2162,25 @@
   Future<void> test_switch_start() async {
     addTestSource('main() {switch(1) {^}}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT]);
   }
 
   Future<void> test_switch_start2() async {
     addTestSource('main() {switch(1) {^ case 1:}}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT]);
   }
 
   Future<void> test_switch_start3() async {
     addTestSource('main() {switch(1) {^default:}}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT]);
   }
 
   Future<void> test_switch_start4() async {
     addTestSource('main() {switch(1) {^ default:}}');
     await computeSuggestions();
-    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT]);
   }
 
   Future<void> test_switch_start5() async {
@@ -2265,8 +2188,7 @@
     await computeSuggestions();
     expect(replacementOffset, 19);
     expect(replacementLength, 1);
-    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT]);
   }
 
   Future<void> test_switch_start6() async {
@@ -2274,8 +2196,7 @@
     await computeSuggestions();
     expect(replacementOffset, 19);
     expect(replacementLength, 1);
-    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT]);
   }
 
   Future<void> test_switch_start7() async {
@@ -2283,8 +2204,7 @@
     await computeSuggestions();
     expect(replacementOffset, 20);
     expect(replacementLength, 1);
-    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.CASE, Keyword.DEFAULT]);
   }
 
   Future<void> test_switch_statement_case_break_insideClass() async {
@@ -2320,15 +2240,13 @@
   Future<void> test_while_break_continue() async {
     addTestSource('main() {while (true) {^}}');
     await computeSuggestions();
-    assertSuggestKeywords(statementStartInLoopOutsideClass,
-        relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(statementStartInLoopOutsideClass);
   }
 
   Future<void> test_while_break_continue2() async {
     addTestSource('class A {foo() {while (true) {^}}}');
     await computeSuggestions();
-    assertSuggestKeywords(statementStartInLoopInClass,
-        relevance: DART_RELEVANCE_KEYWORD);
+    assertSuggestKeywords(statementStartInLoopInClass);
   }
 
   void _appendCompletions(
@@ -2348,7 +2266,7 @@
 }
 
 @reflectiveTest
-class KeywordContributorWithNnbdTest extends KeywordContributorTest {
+class KeywordContributorWithNullSafetyTest extends KeywordContributorTest {
   @override
   void setupResourceProvider() {
     super.setupResourceProvider();
diff --git a/pkg/analysis_server/test/services/completion/dart/label_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/label_contributor_test.dart
index 7d420a4..6e8832b 100644
--- a/pkg/analysis_server/test/services/completion/dart/label_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/label_contributor_test.dart
@@ -19,9 +19,8 @@
 @reflectiveTest
 class LabelContributorTest extends DartCompletionContributorTest {
   CompletionSuggestion assertSuggestLabel(String name,
-      {int relevance = DART_RELEVANCE_DEFAULT,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.IDENTIFIER}) {
-    var cs = assertSuggest(name, csKind: kind, relevance: relevance);
+      {CompletionSuggestionKind kind = CompletionSuggestionKind.IDENTIFIER}) {
+    var cs = assertSuggest(name, csKind: kind);
     expect(cs.returnType, isNull);
     var element = cs.element;
     expect(element, isNotNull);
diff --git a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
index f9de3eb..1f1a333 100644
--- a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
@@ -121,7 +121,7 @@
     addTestSource('import "b.dart" as foo; main() {foo.^} class C { }');
     await computeSuggestions();
     assertSuggestClass('B');
-    assertSuggestClass('B1', relevance: DART_RELEVANCE_LOW, isDeprecated: true);
+    assertSuggestClass('B1', isDeprecated: true);
     assertSuggestClass('A');
     assertNotSuggested('C');
   }
diff --git a/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart
index 7d13c2d..0cdcb90 100644
--- a/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart
@@ -20,9 +20,8 @@
 class LibraryPrefixContributorTest extends DartCompletionContributorTest {
   void assertSuggestLibraryPrefixes(List<String> expectedPrefixes) {
     for (var prefix in expectedPrefixes) {
-      var cs = assertSuggest(prefix,
-          csKind: CompletionSuggestionKind.IDENTIFIER,
-          relevance: DART_RELEVANCE_DEFAULT);
+      var cs =
+          assertSuggest(prefix, csKind: CompletionSuggestionKind.IDENTIFIER);
       var element = cs.element;
       expect(element, isNotNull);
       expect(element.kind, equals(ElementKind.LIBRARY));
diff --git a/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
index 498d1f2..e6724b6 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
@@ -133,15 +133,9 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     // A is suggested with a higher relevance
-    assertSuggestConstructor('A',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestConstructor('B',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestConstructor('C',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestConstructor('A', elemOffset: -1);
+    assertSuggestConstructor('B', elemOffset: -1);
+    assertSuggestConstructor('C', elemOffset: -1);
     // D has the default relevance
     assertSuggestConstructor('D', elemOffset: -1);
 
@@ -184,15 +178,9 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     // A is suggested with a higher relevance
-    assertSuggestConstructor('A',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestConstructor('B',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestConstructor('C',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestConstructor('A', elemOffset: -1);
+    assertSuggestConstructor('B', elemOffset: -1);
+    assertSuggestConstructor('C', elemOffset: -1);
     // D has the default relevance
     assertSuggestConstructor('D', elemOffset: -1);
 
@@ -235,12 +223,9 @@
     if (suggestConstructorsWithoutNew) {
       assertSuggestConstructor('A');
     }
-    assertSuggestFunction('af', 'int',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    assertSuggestTopLevelVar('m', null,
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
-    assertSuggestFunctionTypeAlias('t1', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('af', 'int');
+    assertSuggestTopLevelVar('m', null);
+    assertSuggestFunctionTypeAlias('t1', null);
     assertNotSuggested('a1');
     assertNotSuggested('a2');
     // Suggested by LocalConstructorContributor
@@ -281,12 +266,9 @@
     if (suggestConstructorsWithoutNew) {
       assertSuggestConstructor('B');
     }
-    assertSuggestFunction('bf', 'int',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    assertSuggestTopLevelVar('n', null,
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
-    assertSuggestFunctionTypeAlias('t1', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('bf', 'int');
+    assertSuggestTopLevelVar('n', null);
+    assertSuggestFunctionTypeAlias('t1', null);
     assertNotSuggested('b1');
     assertNotSuggested('b2');
     // Suggested by ConstructorContributor
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 475f6e5..bb0f9a8 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
@@ -33,7 +33,6 @@
     await computeSuggestions();
 
     assertSuggestFunction('hasLength', 'bool',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION,
         defaultArgListString: 'a, b',
         defaultArgumentListTextRanges: [0, 1, 3, 1]);
   }
@@ -45,9 +44,7 @@
     await computeSuggestions();
 
     assertSuggestFunction('hasLength', 'bool',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION,
-        defaultArgListString: null,
-        defaultArgumentListTextRanges: null);
+        defaultArgListString: null, defaultArgumentListTextRanges: null);
   }
 
   Future<void> test_ArgDefaults_function_with_optional_positional() async {
@@ -60,9 +57,7 @@
     await computeSuggestions();
 
     assertSuggestFunction('foo', 'bool',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION,
-        defaultArgListString: 'bar',
-        defaultArgumentListTextRanges: [0, 3]);
+        defaultArgListString: 'bar', defaultArgumentListTextRanges: [0, 3]);
   }
 
   Future<void> test_ArgDefaults_function_with_required_named() async {
@@ -75,7 +70,6 @@
     await computeSuggestions();
 
     assertSuggestFunction('foo', 'bool',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION,
         defaultArgListString: 'bar, baz: null',
         defaultArgumentListTextRanges: [0, 3, 10, 4]);
   }
@@ -115,7 +109,6 @@
     await computeSuggestions();
 
     assertSuggestMethod('foo', 'A', 'bool',
-        relevance: DART_RELEVANCE_LOCAL_METHOD,
         defaultArgListString: 'bar, baz: null',
         defaultArgumentListTextRanges: [0, 3, 10, 4]);
   }
@@ -135,8 +128,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestFunction('bar', 'String',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('bar', 'String');
     assertNotSuggested('hasLength');
     assertNotSuggested('identical');
     assertSuggestClass('B');
@@ -162,8 +154,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestFunction('bar', 'String',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('bar', 'String');
     assertNotSuggested('hasLength');
     assertNotSuggested('identical');
     assertSuggestClass('B');
@@ -192,8 +183,7 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     assertSuggestFunction('bar', 'String',
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+        kind: CompletionSuggestionKind.IDENTIFIER);
     assertNotSuggested('hasLength');
     assertNotSuggested('identical');
     assertSuggestClass('B', kind: CompletionSuggestionKind.IDENTIFIER);
@@ -223,8 +213,7 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     assertSuggestFunction('bar', 'String',
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+        kind: CompletionSuggestionKind.IDENTIFIER);
     assertNotSuggested('hasLength');
     assertNotSuggested('identical');
     assertSuggestClass('B', kind: CompletionSuggestionKind.IDENTIFIER);
@@ -251,8 +240,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestFunction('bar', 'String',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('bar', 'String');
     assertNotSuggested('hasLength');
     assertNotSuggested('identical');
     assertSuggestClass('B');
@@ -278,8 +266,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestFunction('bar', 'String',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('bar', 'String');
     assertNotSuggested('hasLength');
     assertNotSuggested('identical');
     assertSuggestClass('B');
@@ -307,11 +294,9 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     assertSuggestFunction('bar', 'String',
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+        kind: CompletionSuggestionKind.IDENTIFIER);
     assertSuggestFunction('boo', 'Null',
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+        kind: CompletionSuggestionKind.IDENTIFIER);
     assertNotSuggested('hasLength');
     assertNotSuggested('identical');
     assertSuggestClass('B', kind: CompletionSuggestionKind.IDENTIFIER);
@@ -339,14 +324,16 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestFunction('bar', 'String',
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance:
-            DART_RELEVANCE_LOCAL_FUNCTION + DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestFunction('boo', 'Null',
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance:
-            DART_RELEVANCE_LOCAL_FUNCTION + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestFunction(
+      'bar',
+      'String',
+      kind: CompletionSuggestionKind.IDENTIFIER,
+    );
+    assertSuggestFunction(
+      'boo',
+      'Null',
+      kind: CompletionSuggestionKind.IDENTIFIER,
+    );
     assertNotSuggested('hasLength');
     assertNotSuggested('identical');
     assertSuggestClass('B', kind: CompletionSuggestionKind.IDENTIFIER);
@@ -426,8 +413,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestFunction('bar', 'String',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('bar', 'String');
     assertNotSuggested('hasLength');
     assertNotSuggested('main');
   }
@@ -454,19 +440,11 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestTopLevelVar('a', 'A',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE +
-            DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestTopLevelVar('b', 'B',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE +
-            DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestTopLevelVar('c', 'C',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE +
-            DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestTopLevelVar('d', 'D',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
-    assertSuggestTopLevelVar('e', 'E',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestTopLevelVar('a', 'A');
+    assertSuggestTopLevelVar('b', 'B');
+    assertSuggestTopLevelVar('c', 'C');
+    assertSuggestTopLevelVar('d', 'D');
+    assertSuggestTopLevelVar('e', 'E');
   }
 
   Future<void> test_ArgumentList_namedParam_tear_off() async {
@@ -629,9 +607,8 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestLocalVariable('a', 'int', hasTypeBoost: true);
-    assertSuggestFunction('main', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestLocalVariable('a', 'int');
+    assertSuggestFunction('main', null);
     assertSuggestClass('A');
     assertNotSuggested('Object');
   }
@@ -679,8 +656,7 @@
     // if newline follows first identifier
     // because user is probably starting a new statement
     assertSuggestLocalVariable('a', 'int');
-    assertSuggestFunction('main', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('main', null);
     assertNotSuggested('identical');
   }
 
@@ -727,8 +703,7 @@
     // if newline follows first identifier
     // because user is probably starting a new statement
     assertSuggestLocalVariable('a', 'int');
-    assertSuggestFunction('main', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('main', null);
     assertNotSuggested('identical');
   }
 
@@ -742,8 +717,7 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     assertSuggestLocalVariable('a', 'A');
-    assertSuggestFunction('main', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('main', null);
     assertSuggestClass('A');
     assertNotSuggested('Object');
   }
@@ -760,8 +734,7 @@
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestMethod('y', 'A', 'Future<dynamic>',
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('y', 'A', 'Future<dynamic>');
     assertSuggestClass('A');
     assertNotSuggested('Object');
   }
@@ -804,7 +777,7 @@
     // The reason is that coveringNode is VariableDeclaration, and the
     // entity is BinaryExpression, so the expected type is int.
     // It would be more correct to use BinaryExpression as coveringNode.
-    assertSuggestLocalVariable('a', 'int', hasTypeBoost: true);
+    assertSuggestLocalVariable('a', 'int');
     assertNotSuggested('Object');
     assertNotSuggested('b');
   }
@@ -817,7 +790,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestLocalVariable('a', 'int', hasSubtypeBoost: true);
+    assertSuggestLocalVariable('a', 'int');
     assertNotSuggested('Object');
     assertNotSuggested('b');
     assertNotSuggested('==');
@@ -871,11 +844,9 @@
 
     assertSuggestClass('X', elemFile: testFile);
     assertSuggestClass('Z');
-    assertSuggestMethod('a', 'X', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
-    assertSuggestMethod('b', 'X', 'void',
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
-    assertSuggestFunction('localF', 'Null',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestMethod('a', 'X', null);
+    assertSuggestMethod('b', 'X', 'void');
+    assertSuggestFunction('localF', 'Null');
     assertSuggestLocalVariable('f', null);
     // Don't suggest locals out of scope
     assertNotSuggested('r');
@@ -891,7 +862,7 @@
     //assertNotSuggested('D');
     //assertNotSuggested(
     //    'D1', null, true, COMPLETION_RELEVANCE_LOW);
-    assertSuggestFunction('D2', 'Z', relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('D2', 'Z');
     assertNotSuggested('EE');
     // hidden element suggested as low relevance
     //assertNotSuggested('F');
@@ -904,16 +875,13 @@
     assertNotSuggested('_T2');
     //assertNotSuggested('T3');
     assertNotSuggested('_T4');
-    assertSuggestTopLevelVar('T5', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
-    assertSuggestTopLevelVar('_T6', null, relevance: DART_RELEVANCE_DEFAULT);
+    assertSuggestTopLevelVar('T5', 'int');
+    assertSuggestTopLevelVar('_T6', null);
     assertNotSuggested('==');
-    assertSuggestGetter('T7', 'String',
-        relevance: DART_RELEVANCE_LOCAL_ACCESSOR);
-    assertSuggestSetter('T8', relevance: DART_RELEVANCE_LOCAL_ACCESSOR);
-    assertSuggestGetter('clog', 'int',
-        relevance: DART_RELEVANCE_LOCAL_ACCESSOR);
-    assertSuggestSetter('blog', relevance: DART_RELEVANCE_LOCAL_ACCESSOR);
+    assertSuggestGetter('T7', 'String');
+    assertSuggestSetter('T8');
+    assertSuggestGetter('clog', 'int');
+    assertSuggestSetter('blog');
     // TODO (danrubel) suggest HtmlElement as low relevance
     assertNotSuggested('HtmlElement');
     assertNotSuggested('Uri');
@@ -1269,9 +1237,8 @@
 
     assertSuggestClass('X');
     assertSuggestClass('Z');
-    assertSuggestMethod('a', 'X', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
-    assertSuggestMethod('b', 'X', 'void',
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('a', 'X', null);
+    assertSuggestMethod('b', 'X', 'void');
     assertSuggestLocalVariable('f', null);
     // Don't suggest locals out of scope
     assertNotSuggested('r');
@@ -1284,7 +1251,7 @@
     // hidden element suggested as low relevance
     assertNotSuggested('D');
     assertNotSuggested('D1');
-    assertSuggestFunction('D2', 'Z', relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('D2', 'Z');
     // unimported elements suggested with low relevance
     assertNotSuggested('D3');
     //assertNotSuggested('EE');
@@ -1527,7 +1494,7 @@
 ''');
     await computeSuggestions();
 
-    assertSuggestSetter('foo', relevance: DART_RELEVANCE_LOCAL_ACCESSOR);
+    assertSuggestSetter('foo');
   }
 
   Future<void> test_Block_unimported() async {
@@ -1678,7 +1645,7 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     assertSuggestParameter('e', 'E');
-    assertSuggestMethod('a', 'A', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('a', 'A', null);
     assertNotSuggested('Object');
     assertNotSuggested('x');
   }
@@ -1692,7 +1659,7 @@
     expect(replacementLength, 0);
     assertSuggestParameter('e', null);
     assertSuggestParameter('s', 'StackTrace');
-    assertSuggestMethod('a', 'A', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('a', 'A', null);
     assertNotSuggested('Object');
     assertNotSuggested('x');
   }
@@ -1710,8 +1677,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    var suggestionA = assertSuggestClass('A',
-        relevance: DART_RELEVANCE_LOW, isDeprecated: true);
+    var suggestionA = assertSuggestClass('A', isDeprecated: true);
     if (suggestionA != null) {
       expect(suggestionA.element.isDeprecated, isTrue);
       expect(suggestionA.element.isPrivate, isFalse);
@@ -1924,8 +1890,7 @@
     await computeSuggestions();
 
     // top level results are partially filtered based on first char
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestTopLevelVar('T2', 'int');
     // TODO (danrubel) getter is being suggested instead of top level var
     //assertNotSuggested('T1');
   }
@@ -1946,12 +1911,10 @@
 
     assertNotSuggested('x');
     assertSuggestLocalVariable('f', null);
-    assertSuggestMethod('foo', 'C', null,
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('foo', 'C', null);
     assertSuggestClass('C');
-    assertSuggestFunction('F2', null, relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestFunction('F2', null);
+    assertSuggestTopLevelVar('T2', 'int');
     assertNotSuggested('A');
     assertNotSuggested('F1');
     // TODO (danrubel) getter is being suggested instead of top level var
@@ -1973,8 +1936,7 @@
     await computeSuggestions();
 
     // top level results are partially filtered based on first char
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestTopLevelVar('T2', 'int');
     // TODO (danrubel) getter is being suggested instead of top level var
     //assertNotSuggested('T1');
   }
@@ -1995,12 +1957,10 @@
 
     assertNotSuggested('x');
     assertSuggestLocalVariable('f', null);
-    assertSuggestMethod('foo', 'C', null,
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('foo', 'C', null);
     assertSuggestClass('C');
-    assertSuggestFunction('F2', null, relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestFunction('F2', null);
+    assertSuggestTopLevelVar('T2', 'int');
     assertNotSuggested('A');
     assertNotSuggested('F1');
     // TODO (danrubel) getter is being suggested instead of top level var
@@ -2022,8 +1982,7 @@
     await computeSuggestions();
 
     // top level results are partially filtered based on first char
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestTopLevelVar('T2', 'int');
     // TODO (danrubel) getter is being suggested instead of top level var
     //assertNotSuggested('T1');
   }
@@ -2075,7 +2034,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestField('foo', 'int', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestField('foo', 'int');
   }
 
   Future<void> test_ConstructorFieldInitializer_value() async {
@@ -2091,11 +2050,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestTopLevelVar(
-      'foo',
-      'int',
-      relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE,
-    );
+    assertSuggestTopLevelVar('foo', 'int');
   }
 
   Future<void> test_ConstructorName_importedClass() async {
@@ -2218,9 +2173,8 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestFunction('foo', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    assertSuggestMethod('a', 'A', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestFunction('foo', null);
+    assertSuggestMethod('a', 'A', null);
     assertSuggestClass('A');
     assertNotSuggested('String');
     assertNotSuggested('identical');
@@ -2254,18 +2208,15 @@
 }''');
     await computeSuggestions();
     {
-      var suggestion = assertSuggestField('myField', 'int',
-          relevance: DART_RELEVANCE_LOCAL_FIELD);
+      var suggestion = assertSuggestField('myField', 'int');
       assertDoc(suggestion);
     }
     {
-      var suggestion = assertSuggestMethod('myMethod', 'C', null,
-          relevance: DART_RELEVANCE_LOCAL_METHOD);
+      var suggestion = assertSuggestMethod('myMethod', 'C', null);
       assertDoc(suggestion);
     }
     {
-      var suggestion = assertSuggestGetter('myGetter', 'int',
-          relevance: DART_RELEVANCE_LOCAL_ACCESSOR);
+      var suggestion = assertSuggestGetter('myGetter', 'int');
       assertDoc(suggestion);
     }
   }
@@ -2339,13 +2290,11 @@
       assertDoc(suggestion);
     }
     {
-      var suggestion = assertSuggestFunction('myFunction', 'void',
-          relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+      var suggestion = assertSuggestFunction('myFunction', 'void');
       assertDoc(suggestion);
     }
     {
-      var suggestion = assertSuggestTopLevelVar('myVariable', 'int',
-          relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+      var suggestion = assertSuggestTopLevelVar('myVariable', 'int');
       assertDoc(suggestion);
     }
   }
@@ -2384,8 +2333,8 @@
     await computeSuggestions();
 
     assertSuggestEnum('E');
-    assertSuggestEnumConst('E.one', hasTypeBoost: true);
-    assertSuggestEnumConst('E.two', hasTypeBoost: true);
+    assertSuggestEnumConst('E.one');
+    assertSuggestEnumConst('E.two');
 
     assertSuggestEnum('F');
     assertSuggestEnumConst('F.three');
@@ -2405,8 +2354,8 @@
     await computeSuggestions();
 
     assertSuggestEnum('E');
-    assertSuggestEnumConst('E.one', hasTypeBoost: true);
-    assertSuggestEnumConst('E.two', hasTypeBoost: true);
+    assertSuggestEnumConst('E.one');
+    assertSuggestEnumConst('E.two');
 
     assertSuggestEnum('F');
     assertSuggestEnumConst('F.three');
@@ -2425,8 +2374,8 @@
     await computeSuggestions();
 
     assertSuggestEnum('E');
-    assertSuggestEnumConst('E.one', hasTypeBoost: true);
-    assertSuggestEnumConst('E.two', hasTypeBoost: true);
+    assertSuggestEnumConst('E.one');
+    assertSuggestEnumConst('E.two');
 
     assertSuggestEnum('F');
     assertSuggestEnumConst('F.three');
@@ -2447,8 +2396,8 @@
     await computeSuggestions();
 
     assertSuggestEnum('E');
-    assertSuggestEnumConst('E.one', hasTypeBoost: true);
-    assertSuggestEnumConst('E.two', hasTypeBoost: true);
+    assertSuggestEnumConst('E.one');
+    assertSuggestEnumConst('E.two');
 
     assertSuggestEnum('F');
     assertSuggestEnumConst('F.three');
@@ -2467,8 +2416,8 @@
     await computeSuggestions();
 
     assertSuggestEnum('E');
-    assertSuggestEnumConst('E.one', hasTypeBoost: true);
-    assertSuggestEnumConst('E.two', hasTypeBoost: true);
+    assertSuggestEnumConst('E.one');
+    assertSuggestEnumConst('E.two');
 
     assertSuggestEnum('F');
     assertSuggestEnumConst('F.three');
@@ -2627,10 +2576,8 @@
     assertNotSuggested('A');
     assertNotSuggested('F1');
     assertSuggestClass('C');
-    assertSuggestMethod('foo', 'C', null,
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
-    assertSuggestMethod('bar', 'C', 'void',
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('foo', 'C', null);
+    assertSuggestMethod('bar', 'C', 'void');
     assertSuggestFunctionTypeAlias('F2', 'int');
     assertSuggestClass('Clz');
     assertSuggestClass('C');
@@ -2888,8 +2835,7 @@
     await computeSuggestions();
     // We don't actually use anything from the `for`, and `v` is suggested
     // just because it is a visible top-level declaration.
-    assertSuggestTopLevelVar('v', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestTopLevelVar('v', 'int');
   }
 
   Future<void> test_ForEachStatement() async {
@@ -3092,8 +3038,7 @@
     expect(replacementOffset, completionOffset - 1);
     expect(replacementLength, 1);
     assertSuggestLocalVariable('index', 'int');
-    assertSuggestFunction('main', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('main', null);
     assertNotSuggested('bar');
   }
 
@@ -3105,8 +3050,7 @@
 }
 ''');
     await computeSuggestions();
-    var suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    var suggestion = assertSuggestFunction('m', 'void');
     expect(suggestion.parameterNames, hasLength(2));
     expect(suggestion.parameterNames[0], 'x');
     expect(suggestion.parameterTypes[0], 'dynamic');
@@ -3124,8 +3068,7 @@
 }
 ''');
     await computeSuggestions();
-    var suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    var suggestion = assertSuggestFunction('m', 'void');
     expect(suggestion.parameterNames, hasLength(2));
     expect(suggestion.parameterNames[0], 'x');
     expect(suggestion.parameterTypes[0], 'dynamic');
@@ -3143,8 +3086,7 @@
 }
 ''');
     await computeSuggestions();
-    var suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    var suggestion = assertSuggestFunction('m', 'void');
     expect(suggestion.parameterNames, hasLength(2));
     expect(suggestion.parameterNames[0], 'x');
     expect(suggestion.parameterTypes[0], 'dynamic');
@@ -3162,8 +3104,7 @@
 }
 ''');
     await computeSuggestions();
-    var suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    var suggestion = assertSuggestFunction('m', 'void');
     expect(suggestion.parameterNames, isEmpty);
     expect(suggestion.parameterTypes, isEmpty);
     expect(suggestion.requiredParameterCount, 0);
@@ -3178,8 +3119,7 @@
 }
 ''');
     await computeSuggestions();
-    var suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    var suggestion = assertSuggestFunction('m', 'void');
     expect(suggestion.parameterNames, hasLength(2));
     expect(suggestion.parameterNames[0], 'x');
     expect(suggestion.parameterTypes[0], 'dynamic');
@@ -3197,8 +3137,7 @@
 }
 ''');
     await computeSuggestions();
-    var suggestion = assertSuggestFunction('m', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    var suggestion = assertSuggestFunction('m', 'void');
     expect(suggestion.parameterNames, hasLength(2));
     expect(suggestion.parameterNames[0], 'x');
     expect(suggestion.parameterTypes[0], 'dynamic');
@@ -3326,13 +3265,11 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    var f = assertSuggestFunction('foo', 'String',
-        isDeprecated: false, relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    var f = assertSuggestFunction('foo', 'String', isDeprecated: false);
     if (f != null) {
       expect(f.element.isPrivate, isFalse);
     }
-    assertSuggestFunction('bar', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('bar', 'void');
     assertSuggestParameter('args', 'List<dynamic>');
     assertSuggestParameter('b', 'R');
     assertNotSuggested('Object');
@@ -3387,8 +3324,8 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestField('b', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestField('_c', 'X', relevance: DART_RELEVANCE_DEFAULT);
+    assertSuggestField('b', null);
+    assertSuggestField('_c', 'X');
     assertNotSuggested('Object');
     assertSuggestClass('A');
     assertNotSuggested('==');
@@ -3404,8 +3341,7 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     assertSuggestLocalVariable('a', null);
-    assertSuggestFunction('main', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('main', null);
     assertSuggestClass('A');
     assertNotSuggested('Object');
   }
@@ -3427,8 +3363,8 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestField('b', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestField('_c', 'X', relevance: DART_RELEVANCE_DEFAULT);
+    assertSuggestField('b', null);
+    assertSuggestField('_c', 'X');
     assertNotSuggested('Object');
     assertSuggestClass('A');
     assertNotSuggested('==');
@@ -3451,8 +3387,8 @@
 
     expect(replacementOffset, completionOffset - 1);
     expect(replacementLength, 1);
-    assertSuggestField('b', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestField('_c', 'X', relevance: DART_RELEVANCE_DEFAULT);
+    assertSuggestField('b', null);
+    assertSuggestField('_c', 'X');
     assertNotSuggested('Object');
     assertSuggestClass('A');
     assertNotSuggested('==');
@@ -3506,8 +3442,7 @@
 main(aaa, bbb) {}''');
     await computeSuggestions();
     assertSuggestFunction('main', null,
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+        kind: CompletionSuggestionKind.IDENTIFIER);
   }
 
   Future<void> test_inDartDoc_reference4() async {
@@ -3516,8 +3451,7 @@
 main(aaa, bbb) {}''');
     await computeSuggestions();
     assertSuggestFunction('main', null,
-        kind: CompletionSuggestionKind.IDENTIFIER,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+        kind: CompletionSuggestionKind.IDENTIFIER);
   }
 
   Future<void> test_IndexExpression() async {
@@ -3536,12 +3470,10 @@
 
     assertNotSuggested('x');
     assertSuggestLocalVariable('f', null);
-    assertSuggestMethod('foo', 'C', null,
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('foo', 'C', null);
     assertSuggestClass('C');
-    assertSuggestFunction('F2', null, relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestFunction('F2', null);
+    assertSuggestTopLevelVar('T2', 'int');
     assertNotSuggested('A');
     assertNotSuggested('F1');
     // TODO (danrubel) getter is being suggested instead of top level var
@@ -3563,8 +3495,7 @@
     await computeSuggestions();
 
     // top level results are partially filtered based on first char
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestTopLevelVar('T2', 'int');
     // TODO (danrubel) getter is being suggested instead of top level var
     //assertNotSuggested('T1');
   }
@@ -3700,15 +3631,9 @@
 }''');
     await computeSuggestions();
 
-    assertSuggestConstructor('A',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestConstructor('B',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestConstructor('C',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestConstructor('A', elemOffset: -1);
+    assertSuggestConstructor('B', elemOffset: -1);
+    assertSuggestConstructor('C', elemOffset: -1);
     assertSuggestConstructor('D', elemOffset: -1);
   }
 
@@ -3722,15 +3647,9 @@
 }''');
     await computeSuggestions();
 
-    assertSuggestConstructor('A',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestConstructor('B',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestConstructor('C',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestConstructor('A', elemOffset: -1);
+    assertSuggestConstructor('B', elemOffset: -1);
+    assertSuggestConstructor('C', elemOffset: -1);
     assertSuggestConstructor('D', elemOffset: -1);
   }
 
@@ -3774,12 +3693,8 @@
 }''');
     await computeSuggestions();
 
-    assertSuggestConstructor('A',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestConstructor('B',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestConstructor('A', elemOffset: -1);
+    assertSuggestConstructor('B', elemOffset: -1);
     assertSuggestConstructor('C', elemOffset: -1);
   }
 
@@ -3793,12 +3708,8 @@
 }''');
     await computeSuggestions();
 
-    assertSuggestConstructor('A',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestConstructor('B',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestConstructor('A', elemOffset: -1);
+    assertSuggestConstructor('B', elemOffset: -1);
     assertSuggestConstructor('C', elemOffset: -1);
   }
 
@@ -3823,15 +3734,9 @@
 }''');
     await computeSuggestions();
 
-    assertSuggestConstructor('A',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestConstructor('B',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestConstructor('C',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestConstructor('A', elemOffset: -1);
+    assertSuggestConstructor('B', elemOffset: -1);
+    assertSuggestConstructor('C', elemOffset: -1);
     assertSuggestConstructor('D', elemOffset: -1);
   }
 
@@ -3844,15 +3749,9 @@
 }''');
     await computeSuggestions();
 
-    assertSuggestConstructor('A',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_TYPE);
-    assertSuggestConstructor('B',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
-    assertSuggestConstructor('C',
-        elemOffset: -1,
-        relevance: DART_RELEVANCE_DEFAULT + DART_RELEVANCE_BOOST_SUBTYPE);
+    assertSuggestConstructor('A', elemOffset: -1);
+    assertSuggestConstructor('B', elemOffset: -1);
+    assertSuggestConstructor('C', elemOffset: -1);
     assertSuggestConstructor('D', elemOffset: -1);
   }
 
@@ -3879,9 +3778,8 @@
     assertNotSuggested('F1');
     assertNotSuggested('D1');
     assertNotSuggested('C1');
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
-    assertSuggestFunction('F2', null, relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestTopLevelVar('T2', 'int');
+    assertSuggestFunction('F2', null);
     assertSuggestFunctionTypeAlias('D2', 'dynamic');
     assertSuggestClass('C2');
     assertSuggestLocalVariable('name', 'String');
@@ -3962,10 +3860,8 @@
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
     assertSuggestLocalVariable('a', null);
-    assertSuggestFunction('main', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    assertSuggestFunction('foo', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('main', null);
+    assertSuggestFunction('foo', null);
     assertNotSuggested('bar');
     assertSuggestClass('A');
     assertNotSuggested('Object');
@@ -4068,10 +3964,8 @@
     assertNotSuggested('T1');
     assertNotSuggested('newT1');
     assertNotSuggested('z');
-    assertSuggestTopLevelVar('m', 'dynamic',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
-    assertSuggestFunction('newer', 'String',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestTopLevelVar('m', 'dynamic');
+    assertSuggestFunction('newer', 'String');
   }
 
   Future<void> test_Literal_list() async {
@@ -4222,9 +4116,8 @@
     assertNotSuggested('F1');
     assertNotSuggested('D1');
     assertNotSuggested('C1');
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
-    assertSuggestFunction('F2', null, relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestTopLevelVar('T2', 'int');
+    assertSuggestFunction('F2', null);
     assertSuggestFunctionTypeAlias('D2', 'dynamic');
     assertSuggestClass('C2');
   }
@@ -4248,8 +4141,7 @@
     expect(replacementOffset, completionOffset - 1);
     expect(replacementLength, 1);
     assertNotSuggested('T1');
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestTopLevelVar('T2', 'int');
   }
 
   Future<void> test_MapLiteralEntry2() async {
@@ -4271,8 +4163,7 @@
     expect(replacementOffset, completionOffset - 1);
     expect(replacementLength, 1);
     assertNotSuggested('T1');
-    assertSuggestTopLevelVar('T2', 'int',
-        relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+    assertSuggestTopLevelVar('T2', 'int');
   }
 
   Future<void> test_method_inClass() async {
@@ -4559,20 +4450,17 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    var methodA = assertSuggestMethod('a', 'A', 'Z',
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
+    var methodA = assertSuggestMethod('a', 'A', 'Z');
     if (methodA != null) {
       expect(methodA.element.isDeprecated, isFalse);
       expect(methodA.element.isPrivate, isFalse);
     }
-    var getterF = assertSuggestGetter('f', 'X',
-        relevance: DART_RELEVANCE_LOW, isDeprecated: true);
+    var getterF = assertSuggestGetter('f', 'X', isDeprecated: true);
     if (getterF != null) {
       expect(getterF.element.isDeprecated, isTrue);
       expect(getterF.element.isPrivate, isFalse);
     }
-    var getterG =
-        assertSuggestGetter('_g', null, relevance: DART_RELEVANCE_DEFAULT);
+    var getterG = assertSuggestGetter('_g', null);
     if (getterG != null) {
       expect(getterG.element.isDeprecated, isFalse);
       expect(getterG.element.isPrivate, isTrue);
@@ -4604,9 +4492,8 @@
 
     assertNotSuggested('a1');
     assertNotSuggested('a2');
-    assertSuggestMethod('a3', 'A', null,
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
-    assertSuggestField('a4', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestMethod('a3', 'A', null);
+    assertSuggestField('a4', null);
     assertNotSuggested('b1');
     assertNotSuggested('b2');
     assertNotSuggested('b3');
@@ -4632,22 +4519,19 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    var methodA =
-        assertSuggestMethod('_a', 'A', 'Z', relevance: DART_RELEVANCE_DEFAULT);
+    var methodA = assertSuggestMethod('_a', 'A', 'Z');
     if (methodA != null) {
       expect(methodA.element.isDeprecated, isFalse);
       expect(methodA.element.isPrivate, isTrue);
     }
-    var getterF = assertSuggestField('f', 'X',
-        relevance: DART_RELEVANCE_LOW, isDeprecated: true);
+    var getterF = assertSuggestField('f', 'X', isDeprecated: true);
     if (getterF != null) {
       expect(getterF.element.isDeprecated, isTrue);
       expect(getterF.element.isPrivate, isFalse);
       expect(getterF.element.parameters, isNull);
     }
     // If user did not type '_' then relevance of private members is not raised
-    var getterG =
-        assertSuggestField('_g', null, relevance: DART_RELEVANCE_DEFAULT);
+    var getterG = assertSuggestField('_g', null);
     if (getterG != null) {
       expect(getterG.element.isDeprecated, isFalse);
       expect(getterG.element.isPrivate, isTrue);
@@ -4672,14 +4556,12 @@
 
     expect(replacementOffset, completionOffset - 1);
     expect(replacementLength, 1);
-    var methodA =
-        assertSuggestMethod('_a', 'A', 'Z', relevance: DART_RELEVANCE_DEFAULT);
+    var methodA = assertSuggestMethod('_a', 'A', 'Z');
     if (methodA != null) {
       expect(methodA.element.isDeprecated, isFalse);
       expect(methodA.element.isPrivate, isTrue);
     }
-    var getterF = assertSuggestField('f', 'X',
-        relevance: DART_RELEVANCE_LOW, isDeprecated: true);
+    var getterF = assertSuggestField('f', 'X', isDeprecated: true);
     if (getterF != null) {
       expect(getterF.element.isDeprecated, isTrue);
       expect(getterF.element.isPrivate, isFalse);
@@ -4687,8 +4569,7 @@
     }
     // If user prefixed completion with '_' then suggestion of private members
     // should be the same as public members
-    var getterG =
-        assertSuggestField('_g', null, relevance: DART_RELEVANCE_DEFAULT);
+    var getterG = assertSuggestField('_g', null);
     if (getterG != null) {
       expect(getterG.element.isDeprecated, isFalse);
       expect(getterG.element.isPrivate, isTrue);
@@ -4711,8 +4592,7 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    var methodA = assertSuggestMethod('a', 'A', 'Z',
-        relevance: DART_RELEVANCE_LOW, isDeprecated: true);
+    var methodA = assertSuggestMethod('a', 'A', 'Z', isDeprecated: true);
     if (methodA != null) {
       expect(methodA.element.isDeprecated, isTrue);
       expect(methodA.element.isPrivate, isFalse);
@@ -4739,11 +4619,9 @@
 
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestFunction('foo', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    assertSuggestFunction('bar', 'void',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
-    assertSuggestMethod('a', 'A', 'Z', relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestFunction('foo', null);
+    assertSuggestFunction('bar', 'void');
+    assertSuggestMethod('a', 'A', 'Z');
     assertSuggestParameter('x', 'X');
     assertSuggestParameter('y', 'int');
     assertNotSuggested('String');
@@ -5160,7 +5038,7 @@
 class B extends A {m() {^}}
 ''');
     await computeSuggestions();
-    assertSuggestMethod('m', 'B', null, relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('m', 'B', null);
   }
 
   Future<void> test_parameterName_excludeTypes() async {
@@ -5424,8 +5302,7 @@
     expect(replacementLength, 1);
     assertNotSuggested('A');
     assertSuggestClass('X');
-    assertSuggestMethod('foo', 'X', null,
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('foo', 'X', null);
     assertNotSuggested('bar');
     assertNotSuggested('_B');
   }
@@ -5610,7 +5487,7 @@
   Future<void> test_shadowed_name() async {
     addTestSource('var a; class A { var a; m() { ^ } }');
     await computeSuggestions();
-    assertSuggestField('a', null, relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestField('a', null);
   }
 
   Future<void> test_static_field() async {
@@ -5711,8 +5588,7 @@
     await computeSuggestions();
 
     assertSuggestClass('A');
-    assertSuggestMethod('g', 'A', 'String',
-        relevance: DART_RELEVANCE_LOCAL_METHOD);
+    assertSuggestMethod('g', 'A', 'String');
     assertSuggestLocalVariable('t', null);
     assertNotSuggested('String');
   }
@@ -5722,10 +5598,9 @@
     addTestSource('g(int x) {var t; switch(x) {case 0: var bar; b^}}');
     await computeSuggestions();
 
-    assertSuggestFunction('g', 'dynamic',
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('g', 'dynamic');
     assertSuggestLocalVariable('t', 'dynamic');
-    assertSuggestParameter('x', 'int', relevance: DART_RELEVANCE_PARAMETER);
+    assertSuggestParameter('x', 'int');
     assertSuggestLocalVariable('bar', 'dynamic');
     assertNotSuggested('String');
   }
@@ -6138,8 +6013,7 @@
     assertNotSuggested('X');
     assertNotSuggested('foo1');
     assertNotSuggested('bar1');
-    assertSuggestFunction('foo2', null,
-        relevance: DART_RELEVANCE_LOCAL_FUNCTION);
+    assertSuggestFunction('foo2', null);
     assertNotSuggested('bar2');
     assertNotSuggested('_B');
     assertSuggestClass('Y');
diff --git a/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
index b014fe0..68a9878 100644
--- a/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
@@ -20,9 +20,8 @@
 class NamedConstructorContributorTest extends DartCompletionContributorTest {
   CompletionSuggestion assertSuggestNamedConstructor(
       String name, String returnType,
-      [int relevance = DART_RELEVANCE_DEFAULT,
-      CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION]) {
-    var cs = assertSuggest(name, csKind: kind, relevance: relevance);
+      [CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION]) {
+    var cs = assertSuggest(name, csKind: kind);
     var element = cs.element;
     expect(element, isNotNull);
     expect(element.kind, equals(ElementKind.CONSTRUCTOR));
diff --git a/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
index d0df1f8..7edebfc 100644
--- a/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
@@ -525,7 +525,6 @@
       failedCompletion('expected $completion', suggestions);
     }
     expect(cs.kind, equals(CompletionSuggestionKind.OVERRIDE));
-    expect(cs.relevance, equals(DART_RELEVANCE_HIGH));
     if (selectionOffset != null && selectionLength != null) {
       expect(cs.selectionOffset, selectionOffset);
       expect(cs.selectionLength, selectionLength);
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/named_argument_relevance_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/named_argument_relevance_test.dart
index 21fdd4d..8a51410 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/named_argument_relevance_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/named_argument_relevance_test.dart
@@ -11,7 +11,7 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(NamedArgumentRelevanceTest);
-    defineReflectiveTests(NamedArgumentRelevanceWithNnbdTest);
+    defineReflectiveTests(NamedArgumentRelevanceWithNullSafetyTest);
   });
 }
 
@@ -47,7 +47,8 @@
 }
 
 @reflectiveTest
-class NamedArgumentRelevanceWithNnbdTest extends NamedArgumentRelevanceTest {
+class NamedArgumentRelevanceWithNullSafetyTest
+    extends NamedArgumentRelevanceTest {
   @override
   List<String> get enabledExperiments => ['non-nullable'];
 
diff --git a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
index 0ee70bf..8698dd5 100644
--- a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
@@ -50,8 +50,8 @@
     addTestSource('enum E { one, two } main() {E.^}');
     await computeSuggestions();
     assertNotSuggested('E');
-    assertSuggestEnumConst('one', relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestEnumConst('two', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestEnumConst('one');
+    assertSuggestEnumConst('two');
     assertNotSuggested('index');
     assertSuggestField('values', 'List<E>');
   }
@@ -60,8 +60,8 @@
     addTestSource('enum E { one, two } main() {E.o^}');
     await computeSuggestions();
     assertNotSuggested('E');
-    assertSuggestEnumConst('one', relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestEnumConst('two', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestEnumConst('one');
+    assertSuggestEnumConst('two');
     assertNotSuggested('index');
     assertSuggestField('values', 'List<E>');
   }
@@ -70,8 +70,8 @@
     addTestSource('enum E { one, two } main() {E.^ int g;}');
     await computeSuggestions();
     assertNotSuggested('E');
-    assertSuggestEnumConst('one', relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestEnumConst('two', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestEnumConst('one');
+    assertSuggestEnumConst('two');
     assertNotSuggested('index');
     assertSuggestField('values', 'List<E>');
   }
@@ -86,8 +86,8 @@
     addTestSource('enum E { one, two } main() {E.^.}');
     await computeSuggestions();
     assertNotSuggested('E');
-    assertSuggestEnumConst('one', relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestEnumConst('two', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestEnumConst('one');
+    assertSuggestEnumConst('two');
     assertNotSuggested('index');
     assertSuggestField('values', 'List<E>');
   }
@@ -102,8 +102,8 @@
     addTestSource('enum E { one, two } main() {E.^.o}');
     await computeSuggestions();
     assertNotSuggested('E');
-    assertSuggestEnumConst('one', relevance: DART_RELEVANCE_LOCAL_FIELD);
-    assertSuggestEnumConst('two', relevance: DART_RELEVANCE_LOCAL_FIELD);
+    assertSuggestEnumConst('one');
+    assertSuggestEnumConst('two');
     assertNotSuggested('index');
     assertSuggestField('values', 'List<E>');
   }
diff --git a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
index 3ac6f0f..2d7372c 100644
--- a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
@@ -3053,10 +3053,8 @@
     expect(replacementLength, 0);
     assertSuggestGetter('f', 'X');
     assertSuggestGetter('_g', null);
-    assertSuggestField(r'$p', 'dynamic',
-        relevance: useNewRelevance ? null : DART_RELEVANCE_LOW);
-    assertSuggestMethod(r'$q', 'I', 'void',
-        relevance: useNewRelevance ? null : DART_RELEVANCE_LOW);
+    assertSuggestField(r'$p', 'dynamic');
+    assertSuggestMethod(r'$q', 'I', 'void');
     assertNotSuggested('b');
     assertNotSuggested('_c');
     assertNotSuggested('d');
@@ -3829,8 +3827,7 @@
     assertNotSuggested('fs2');
     assertSuggestMethod('mi2', 'C2', null);
     assertNotSuggested('ms2');
-    assertSuggestMethod('m', 'C2', null,
-        relevance: useNewRelevance ? null : DART_RELEVANCE_HIGH);
+    assertSuggestMethod('m', 'C2', null);
     assertNotSuggested('fi3');
     assertNotSuggested('fs3');
     assertNotSuggested('mi3');
diff --git a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
index bcfffa1..cf86d79 100644
--- a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
@@ -123,8 +123,7 @@
     expect(replacementOffset, completionOffset - 1);
     expect(replacementLength, 1);
     assertSuggest('dart:', csKind: CompletionSuggestionKind.IMPORT);
-    assertSuggest('dart:core',
-        csKind: CompletionSuggestionKind.IMPORT, relevance: DART_RELEVANCE_LOW);
+    assertSuggest('dart:core', csKind: CompletionSuggestionKind.IMPORT);
     assertNotSuggested('dart:_internal');
     assertSuggest('dart:async', csKind: CompletionSuggestionKind.IMPORT);
     assertSuggest('dart:math', csKind: CompletionSuggestionKind.IMPORT);
@@ -136,8 +135,7 @@
     expect(replacementOffset, completionOffset - 1);
     expect(replacementLength, 1);
     assertSuggest('dart:', csKind: CompletionSuggestionKind.IMPORT);
-    assertSuggest('dart:core',
-        csKind: CompletionSuggestionKind.IMPORT, relevance: DART_RELEVANCE_LOW);
+    assertSuggest('dart:core', csKind: CompletionSuggestionKind.IMPORT);
     assertNotSuggested('dart:_internal');
     assertSuggest('dart:async', csKind: CompletionSuggestionKind.IMPORT);
     assertSuggest('dart:math', csKind: CompletionSuggestionKind.IMPORT);
diff --git a/pkg/analysis_server/test/src/cider/completion_test.dart b/pkg/analysis_server/test/src/cider/completion_test.dart
index ddebeae..cef8019 100644
--- a/pkg/analysis_server/test/src/cider/completion_test.dart
+++ b/pkg/analysis_server/test/src/cider/completion_test.dart
@@ -3,7 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/cider/completion.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/test_utilities/function_ast_visitor.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     show CompletionSuggestion, CompletionSuggestionKind, ElementKind;
 import 'package:meta/meta.dart';
@@ -23,11 +25,11 @@
   final CiderCompletionCache _completionCache = CiderCompletionCache();
 
   CiderCompletionComputer _computer;
+  void Function(ResolvedUnitResult) _testResolvedUnit;
+
   CiderCompletionResult _completionResult;
   List<CompletionSuggestion> _suggestions;
 
-  Future<void> test_limitedResolution_;
-
   @override
   void setUp() {
     super.setUp();
@@ -69,25 +71,6 @@
     ]);
   }
 
-  Future<void> test_compute_performance_timers() async {
-    await _compute(r'''
-main() {
-  ^
-}
-''');
-
-    void assertTimerNotEmpty(Duration duration) {
-      expect(duration, isNotNull);
-      expect(duration, isNot(Duration.zero));
-    }
-
-    var performance = _completionResult.performance;
-    assertTimerNotEmpty(performance.file);
-    assertTimerNotEmpty(performance.imports);
-    assertTimerNotEmpty(performance.resolution);
-    assertTimerNotEmpty(performance.suggestions);
-  }
-
   Future<void> test_compute_prefixStart_hasPrefix() async {
     await _compute('''
 class A {
@@ -284,6 +267,22 @@
     _assertHasNamedArgument(name: 'bbb');
   }
 
+  Future<void> test_filterSort_namedArgument_noPrefix_beforeOther() async {
+    await _compute(r'''
+void foo({int aaa = 0, int aab = 0}) {}
+
+voif f() {
+  foo(
+    ^
+    aaa: 0,
+  );
+}
+
+''');
+
+    _assertHasNamedArgument(name: 'aab');
+  }
+
   Future<void> test_filterSort_preferLocal() async {
     await _compute(r'''
 var a = 0;
@@ -314,10 +313,34 @@
     ]);
   }
 
-  Future<void> test_limitedResolution_class_method() async {
+  Future<void> test_limitedResolution_class_field_startWithType() async {
+    _configureToCheckNotResolved(
+      identifiers: {'print'},
+    );
+
+    await _compute(r'''
+class A {
+  void foo() {
+    print(0);
+  }
+
+  Str^
+}
+''');
+
+    _assertHasClass(text: 'String');
+  }
+
+  Future<void> test_limitedResolution_class_method_body() async {
+    _configureToCheckNotResolved(
+      identifiers: {'print'},
+    );
+
     await _compute(r'''
 class A<T> {
-  void foo() {}
+  void foo() {
+    print(0);
+  }
 
   void bar<U>(int a) {
     ^
@@ -342,9 +365,81 @@
     _assertHasTypeParameter(text: 'U');
   }
 
-  Future<void> test_limitedResolution_unit_function() async {
+  Future<void> test_limitedResolution_class_method_parameterType() async {
+    _configureToCheckNotResolved(
+      identifiers: {'print'},
+    );
+
     await _compute(r'''
-void foo() {}
+class A {
+  void foo() {
+    print(0);
+  }
+
+  void bar(Str^) {}
+}
+''');
+
+    _assertHasClass(text: 'String');
+  }
+
+  Future<void>
+      test_limitedResolution_class_method_returnType_hasPartial() async {
+    _configureToCheckNotResolved(
+      identifiers: {'print'},
+    );
+
+    await _compute(r'''
+class A {
+  void foo() {
+    print(0);
+  }
+
+  Str^ bar() {}
+}
+''');
+
+    _assertHasClass(text: 'String');
+  }
+
+  Future<void> test_limitedResolution_hasPart() async {
+    newFile('/workspace/dart/test/lib/a.dart', content: r'''
+class A {}
+''');
+
+    await _compute(r'''
+part 'a.dart';
+^
+''');
+
+    _assertHasClass(text: 'int');
+    _assertHasClass(text: 'A');
+  }
+
+  Future<void> test_limitedResolution_inPart() async {
+    newFile('/workspace/dart/test/lib/a.dart', content: r'''
+part 'test.dart';
+class A {}
+''');
+
+    await _compute(r'''
+part of 'a.dart';
+^
+''');
+
+    _assertHasClass(text: 'int');
+    _assertHasClass(text: 'A');
+  }
+
+  Future<void> test_limitedResolution_unit_function_body() async {
+    _configureToCheckNotResolved(
+      identifiers: {'print'},
+    );
+
+    await _compute(r'''
+void foo() {
+  print(0);
+}
 
 void bar(int a) {
   ^
@@ -555,10 +650,28 @@
       path: convertPath(testPath),
       line: context.line,
       column: context.character,
+      testResolvedUnit: _testResolvedUnit,
     );
     _suggestions = _completionResult.suggestions;
   }
 
+  /// Configure the [CiderCompletionComputer] to check that when resolving
+  /// for completion we don't resolve unnecessary node.
+  void _configureToCheckNotResolved({Set<String> identifiers}) {
+    _testResolvedUnit = (resolvedUnitResult) {
+      var unit = resolvedUnitResult.unit;
+      unit.accept(
+        FunctionAstVisitor(
+          simpleIdentifier: (node) {
+            if (identifiers.contains(node.name) && node.staticElement != null) {
+              fail('Unexpectedly resolved node: $node');
+            }
+          },
+        ),
+      );
+    };
+  }
+
   /// TODO(scheglov) Implement incremental updating
   void _createFileResolver() {
     createFileResolver();
diff --git a/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart b/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart
index 9230187..e66c221 100644
--- a/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart
+++ b/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart
@@ -75,6 +75,7 @@
     "flags": 0
   },
   "relevanceTags": [
+    "ElementKind.CLASS",
     "package:test/a.dart::A",
     "A"
   ]
@@ -101,6 +102,7 @@
   "parameterNames": [],
   "parameterTypes": [],
   "relevanceTags": [
+    "ElementKind.CONSTRUCTOR",
     "package:test/a.dart::A",
     "a"
   ],
@@ -138,6 +140,7 @@
     "flags": 0
   },
   "relevanceTags": [
+    "ElementKind.ENUM",
     "package:test/a.dart::MyEnum",
     "MyEnum"
   ]
@@ -160,6 +163,8 @@
     "flags": 0
   },
   "relevanceTags": [
+    "ElementKind.ENUM_CONSTANT",
+    "ElementKind.ENUM_CONSTANT+const",
     "package:test/a.dart::MyEnum",
     "aaa"
   ]
@@ -182,6 +187,8 @@
     "flags": 0
   },
   "relevanceTags": [
+    "ElementKind.ENUM_CONSTANT",
+    "ElementKind.ENUM_CONSTANT+const",
     "package:test/a.dart::MyEnum",
     "bbb"
   ]
@@ -219,6 +226,7 @@
     "returnType": ""
   },
   "relevanceTags": [
+    "ElementKind.TOP_LEVEL_VARIABLE",
     "dart:core::bool",
     "boolV"
   ]
@@ -242,6 +250,7 @@
     "returnType": ""
   },
   "relevanceTags": [
+    "ElementKind.TOP_LEVEL_VARIABLE",
     "dart:core::int",
     "intV"
   ]
@@ -265,6 +274,7 @@
     "returnType": ""
   },
   "relevanceTags": [
+    "ElementKind.TOP_LEVEL_VARIABLE",
     "dart:core::double",
     "doubleV"
   ]
@@ -288,6 +298,7 @@
     "returnType": ""
   },
   "relevanceTags": [
+    "ElementKind.TOP_LEVEL_VARIABLE",
     "dart:core::String",
     "stringV"
   ]
diff --git a/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart b/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
index e065bb7..8053be5 100644
--- a/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
+++ b/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
@@ -204,6 +204,36 @@
     );
   }
 
+  Future<void> test_relevanceTags_constructorBeforeClass() async {
+    server.options.useNewRelevance = true;
+    addTestFile(r'''
+void foo(List<int> a) {}
+
+main() {
+  foo(); // ref
+}
+''');
+
+    var results = await _getSuggestions(
+      testFile,
+      testCode.indexOf('); // ref'),
+    );
+
+    var includedTags = results.includedSuggestionRelevanceTags;
+    int findBoost(String tag) {
+      for (var includedTag in includedTags) {
+        if (includedTag.tag == tag) {
+          return includedTag.relevanceBoost;
+        }
+      }
+      fail('Missing relevance boost for tag $tag');
+    }
+
+    var classBoost = findBoost('ElementKind.CLASS');
+    var constructorBoost = findBoost('ElementKind.CONSTRUCTOR');
+    expect(constructorBoost, greaterThan(classBoost));
+  }
+
   Future<void> test_relevanceTags_enum() async {
     newFile('/home/test/lib/a.dart', content: r'''
 enum MyEnum {
@@ -223,7 +253,57 @@
       testCode.indexOf(' // ref'),
     );
 
-    assertJsonText(results.includedSuggestionRelevanceTags, r'''
+    if (server.options.useNewRelevance) {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
+[
+  {
+    "tag": "ElementKind.PREFIX",
+    "relevanceBoost": 0
+  },
+  {
+    "tag": "ElementKind.TOP_LEVEL_VARIABLE",
+    "relevanceBoost": 1
+  },
+  {
+    "tag": "ElementKind.FUNCTION",
+    "relevanceBoost": 2
+  },
+  {
+    "tag": "ElementKind.METHOD",
+    "relevanceBoost": 4
+  },
+  {
+    "tag": "ElementKind.ENUM",
+    "relevanceBoost": 9
+  },
+  {
+    "tag": "ElementKind.CLASS",
+    "relevanceBoost": 28
+  },
+  {
+    "tag": "ElementKind.LOCAL_VARIABLE",
+    "relevanceBoost": 40
+  },
+  {
+    "tag": "ElementKind.CONSTRUCTOR",
+    "relevanceBoost": 53
+  },
+  {
+    "tag": "ElementKind.FIELD",
+    "relevanceBoost": 68
+  },
+  {
+    "tag": "ElementKind.PARAMETER",
+    "relevanceBoost": 100
+  },
+  {
+    "tag": "package:test/a.dart::MyEnum",
+    "relevanceBoost": 250
+  }
+]
+''');
+    } else {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
 [
   {
     "tag": "package:test/a.dart::MyEnum",
@@ -231,6 +311,7 @@
   }
 ]
 ''');
+    }
   }
 
   Future<void> test_relevanceTags_location_argumentList_named() async {
@@ -247,7 +328,57 @@
       testCode.indexOf('); // ref'),
     );
 
-    assertJsonText(results.includedSuggestionRelevanceTags, r'''
+    if (server.options.useNewRelevance) {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
+[
+  {
+    "tag": "ElementKind.PREFIX",
+    "relevanceBoost": 0
+  },
+  {
+    "tag": "ElementKind.FUNCTION",
+    "relevanceBoost": 1
+  },
+  {
+    "tag": "ElementKind.METHOD",
+    "relevanceBoost": 1
+  },
+  {
+    "tag": "ElementKind.TOP_LEVEL_VARIABLE",
+    "relevanceBoost": 3
+  },
+  {
+    "tag": "ElementKind.ENUM",
+    "relevanceBoost": 5
+  },
+  {
+    "tag": "ElementKind.CLASS",
+    "relevanceBoost": 20
+  },
+  {
+    "tag": "ElementKind.LOCAL_VARIABLE",
+    "relevanceBoost": 30
+  },
+  {
+    "tag": "ElementKind.FIELD",
+    "relevanceBoost": 41
+  },
+  {
+    "tag": "ElementKind.PARAMETER",
+    "relevanceBoost": 56
+  },
+  {
+    "tag": "ElementKind.CONSTRUCTOR",
+    "relevanceBoost": 100
+  },
+  {
+    "tag": "dart:core::String",
+    "relevanceBoost": 10
+  }
+]
+''');
+    } else {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
 [
   {
     "tag": "dart:core::String",
@@ -255,6 +386,7 @@
   }
 ]
 ''');
+    }
   }
 
   Future<void> test_relevanceTags_location_argumentList_positional() async {
@@ -271,7 +403,65 @@
       testCode.indexOf('); // ref'),
     );
 
-    assertJsonText(results.includedSuggestionRelevanceTags, r'''
+    if (server.options.useNewRelevance) {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
+[
+  {
+    "tag": "ElementKind.MIXIN",
+    "relevanceBoost": 0
+  },
+  {
+    "tag": "ElementKind.TYPE_PARAMETER",
+    "relevanceBoost": 0
+  },
+  {
+    "tag": "ElementKind.PREFIX",
+    "relevanceBoost": 0
+  },
+  {
+    "tag": "ElementKind.ENUM",
+    "relevanceBoost": 3
+  },
+  {
+    "tag": "ElementKind.METHOD",
+    "relevanceBoost": 4
+  },
+  {
+    "tag": "ElementKind.FUNCTION",
+    "relevanceBoost": 9
+  },
+  {
+    "tag": "ElementKind.CLASS",
+    "relevanceBoost": 13
+  },
+  {
+    "tag": "ElementKind.TOP_LEVEL_VARIABLE",
+    "relevanceBoost": 18
+  },
+  {
+    "tag": "ElementKind.CONSTRUCTOR",
+    "relevanceBoost": 27
+  },
+  {
+    "tag": "ElementKind.FIELD",
+    "relevanceBoost": 42
+  },
+  {
+    "tag": "ElementKind.LOCAL_VARIABLE",
+    "relevanceBoost": 60
+  },
+  {
+    "tag": "ElementKind.PARAMETER",
+    "relevanceBoost": 100
+  },
+  {
+    "tag": "dart:core::double",
+    "relevanceBoost": 10
+  }
+]
+''');
+    } else {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
 [
   {
     "tag": "dart:core::double",
@@ -279,6 +469,7 @@
   }
 ]
 ''');
+    }
   }
 
   Future<void> test_relevanceTags_location_assignment() async {
@@ -294,7 +485,57 @@
       testCode.indexOf(' // ref'),
     );
 
-    assertJsonText(results.includedSuggestionRelevanceTags, r'''
+    if (server.options.useNewRelevance) {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
+[
+  {
+    "tag": "ElementKind.PREFIX",
+    "relevanceBoost": 0
+  },
+  {
+    "tag": "ElementKind.TOP_LEVEL_VARIABLE",
+    "relevanceBoost": 1
+  },
+  {
+    "tag": "ElementKind.FUNCTION",
+    "relevanceBoost": 2
+  },
+  {
+    "tag": "ElementKind.METHOD",
+    "relevanceBoost": 4
+  },
+  {
+    "tag": "ElementKind.ENUM",
+    "relevanceBoost": 9
+  },
+  {
+    "tag": "ElementKind.CLASS",
+    "relevanceBoost": 28
+  },
+  {
+    "tag": "ElementKind.LOCAL_VARIABLE",
+    "relevanceBoost": 40
+  },
+  {
+    "tag": "ElementKind.CONSTRUCTOR",
+    "relevanceBoost": 53
+  },
+  {
+    "tag": "ElementKind.FIELD",
+    "relevanceBoost": 68
+  },
+  {
+    "tag": "ElementKind.PARAMETER",
+    "relevanceBoost": 100
+  },
+  {
+    "tag": "dart:core::int",
+    "relevanceBoost": 10
+  }
+]
+''');
+    } else {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
 [
   {
     "tag": "dart:core::int",
@@ -302,6 +543,7 @@
   }
 ]
 ''');
+    }
   }
 
   Future<void> test_relevanceTags_location_initializer() async {
@@ -314,7 +556,65 @@
       testCode.indexOf(' // ref'),
     );
 
-    assertJsonText(results.includedSuggestionRelevanceTags, r'''
+    if (server.options.useNewRelevance) {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
+[
+  {
+    "tag": "ElementKind.MIXIN",
+    "relevanceBoost": 0
+  },
+  {
+    "tag": "ElementKind.TYPE_PARAMETER",
+    "relevanceBoost": 0
+  },
+  {
+    "tag": "ElementKind.PREFIX",
+    "relevanceBoost": 1
+  },
+  {
+    "tag": "ElementKind.ENUM",
+    "relevanceBoost": 1
+  },
+  {
+    "tag": "ElementKind.METHOD",
+    "relevanceBoost": 4
+  },
+  {
+    "tag": "ElementKind.TOP_LEVEL_VARIABLE",
+    "relevanceBoost": 6
+  },
+  {
+    "tag": "ElementKind.FUNCTION",
+    "relevanceBoost": 16
+  },
+  {
+    "tag": "ElementKind.PARAMETER",
+    "relevanceBoost": 26
+  },
+  {
+    "tag": "ElementKind.FIELD",
+    "relevanceBoost": 35
+  },
+  {
+    "tag": "ElementKind.CLASS",
+    "relevanceBoost": 56
+  },
+  {
+    "tag": "ElementKind.LOCAL_VARIABLE",
+    "relevanceBoost": 68
+  },
+  {
+    "tag": "ElementKind.CONSTRUCTOR",
+    "relevanceBoost": 100
+  },
+  {
+    "tag": "dart:core::int",
+    "relevanceBoost": 10
+  }
+]
+''');
+    } else {
+      assertJsonText(results.includedSuggestionRelevanceTags, r'''
 [
   {
     "tag": "dart:core::int",
@@ -322,6 +622,7 @@
   }
 ]
 ''');
+    }
   }
 
   Future<void> test_relevanceTags_location_listLiteral() async {
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 fc8eba5..d8b8b06 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
@@ -38,7 +38,7 @@
     if (expectedType == null) {
       expect(type, null);
     } else {
-      expect(type?.getDisplayString(), expectedType);
+      expect(type?.getDisplayString(withNullability: false), expectedType);
     }
   }
 
diff --git a/pkg/analysis_server/test/src/services/correction/assist/add_diagnostic_property_reference_test.dart b/pkg/analysis_server/test/src/services/correction/assist/add_diagnostic_property_reference_test.dart
index b763bed..ded7a23 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/add_diagnostic_property_reference_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/add_diagnostic_property_reference_test.dart
@@ -21,8 +21,11 @@
 
   /// Full coverage in fix/add_diagnostic_property_reference_test.dart
   Future<void> test_boolField_debugFillProperties() async {
-    verifyNoTestUnitErrors = false;
+    addFlutterPackage();
     await resolveTestUnit('''
+import 'package:flutter/foundation.dart';
+import 'package:flutter/widgets.dart';
+
 class W extends Widget {
   bool /*caret*/property;
   @override
@@ -32,6 +35,9 @@
 }
 ''');
     await assertHasAssist('''
+import 'package:flutter/foundation.dart';
+import 'package:flutter/widgets.dart';
+
 class W extends Widget {
   bool property;
   @override
@@ -42,4 +48,24 @@
 }
 ''');
   }
+
+  Future<void> test_notAvailable_mixin() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+mixin MyMixin {
+  String get foo/*caret*/() {}
+}
+''');
+    await assertNoAssist();
+  }
+
+  Future<void> test_notAvailable_outsideDiagnosticable() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+class C {
+  String get f/*caret*/ => null;
+}
+''');
+    await assertNoAssist();
+  }
 }
diff --git a/pkg/analysis_server/test/src/services/correction/assist/assign_to_local_variable_test.dart b/pkg/analysis_server/test/src/services/correction/assist/assign_to_local_variable_test.dart
index b117de0..936b9fa 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/assign_to_local_variable_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/assign_to_local_variable_test.dart
@@ -79,6 +79,17 @@
     await assertNoAssistAt('345');
   }
 
+  Future<void> test_recovery_splitExpression() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+Future<void> _extractDataForSite() async {
+  final Map<String, Object> data = {};
+  final data['table'][] //marker
+}
+''');
+    assertNoAssistAt('] //marker');
+  }
+
   Future<void> test_throw() async {
     await resolveTestUnit('''
 main() {
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_padding_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_padding_test.dart
index 27cf35b..c457ccf 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_padding_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_padding_test.dart
@@ -57,4 +57,31 @@
 ''');
     await assertNoAssist();
   }
+
+  Future<void> test_inConstantContext() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  Widget build() {
+    return const Center(
+      child: /*caret*/Text('x'),
+    );
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  Widget build() {
+    return const Center(
+      child: Padding(
+        padding: EdgeInsets.all(8.0),
+        child: Text('x'),
+      ),
+    );
+  }
+}
+''');
+  }
 }
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_sized_box.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_sized_box.dart
new file mode 100644
index 0000000..b9b6947
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_sized_box.dart
@@ -0,0 +1,122 @@
+// 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/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+// todo: update for SizedBox
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterWrapSizedBoxTest);
+  });
+}
+
+@reflectiveTest
+class FlutterWrapSizedBoxTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_WRAP_SIZED_BOX;
+
+  Future<void> test_aroundContainer() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return /*caret*/Container();
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return SizedBox(child: Container());
+  }
+}
+''');
+  }
+
+  Future<void> test_aroundNamedConstructor() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  MyWidget.named();
+
+  Widget build(BuildContext context) => null;
+}
+
+main() {
+  return MyWidget./*caret*/named();
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  MyWidget.named();
+
+  Widget build(BuildContext context) => null;
+}
+
+main() {
+  return SizedBox(child: MyWidget.named());
+}
+''');
+  }
+
+  Future<void> test_aroundSizedBox() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return /*caret*/SizedBox();
+  }
+}
+''');
+    await assertNoAssist();
+  }
+
+  Future<void> test_assignment() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+  Widget w;
+  w = /*caret*/Container();
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+main() {
+  Widget w;
+  w = SizedBox(child: Container());
+}
+''');
+  }
+
+  Future<void> test_expressionFunctionBody() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() => /*caret*/Container();
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() => SizedBox(child: Container());
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/shadow_field_test.dart b/pkg/analysis_server/test/src/services/correction/assist/shadow_field_test.dart
index d4c1df0..09acc3d74 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/shadow_field_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/shadow_field_test.dart
@@ -12,7 +12,7 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ShadowFieldTest);
-    defineReflectiveTests(ShadowFieldWithNNBDTest);
+    defineReflectiveTests(ShadowFieldWithNullSafetyTest);
   });
 }
 
@@ -108,7 +108,7 @@
 }
 
 @reflectiveTest
-class ShadowFieldWithNNBDTest extends ShadowFieldTest {
+class ShadowFieldWithNullSafetyTest extends ShadowFieldTest {
   @override
   void setUp() {
     super.setUp();
diff --git a/pkg/analysis_server/test/src/services/correction/assist/test_all.dart b/pkg/analysis_server/test/src/services/correction/assist/test_all.dart
index 18c3539..a521dec 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/test_all.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/test_all.dart
@@ -58,6 +58,7 @@
 import 'flutter_wrap_generic_test.dart' as flutter_wrap_generic;
 import 'flutter_wrap_padding_test.dart' as flutter_wrap_padding;
 import 'flutter_wrap_row_test.dart' as flutter_wrap_row;
+import 'flutter_wrap_sized_box.dart' as flutter_wrap_sized_box;
 import 'flutter_wrap_stream_builder_test.dart' as flutter_wrap_stream_builder;
 import 'import_add_show_test.dart' as import_add_show;
 import 'inline_invocation_test.dart' as inline_invocation;
@@ -135,6 +136,7 @@
     flutter_wrap_generic.main();
     flutter_wrap_padding.main();
     flutter_wrap_row.main();
+    flutter_wrap_sized_box.main();
     flutter_wrap_stream_builder.main();
     import_add_show.main();
     inline_invocation.main();
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart
index 0c2a51a..a7e5fb1 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart
@@ -72,7 +72,7 @@
   return 1;
 }
 ''', errorFilter: (AnalysisError error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT;
+      return error.errorCode == CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT;
     });
   }
 
@@ -91,7 +91,7 @@
 
 void doStuff() => takeFutureCallback(() async => await 1);
 ''', errorFilter: (AnalysisError error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT;
+      return error.errorCode == CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT;
     });
   }
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_diagnostic_property_reference_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_diagnostic_property_reference_test.dart
index 5e8a9e2..b4fdc40 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_diagnostic_property_reference_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_diagnostic_property_reference_test.dart
@@ -31,6 +31,7 @@
   }
 
   Future<void> test_boolField() async {
+    // todo(pq): when linter 0.1.118 is integrated, update DiagnosticableMixin to Diagnosticable
     await resolveTestUnit('''
 import 'package:flutter/foundation.dart';
 import 'package:flutter/widgets.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_explicit_cast_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_explicit_cast_test.dart
index 1f84c34..115d78c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_explicit_cast_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_explicit_cast_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -12,6 +13,7 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AddExplicitCastTest);
+    defineReflectiveTests(AddExplicitCastWithNullSafetyTest);
   });
 }
 
@@ -64,7 +66,7 @@
 class A {}
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(A a) {
   B b, b2;
   b = a as B;
@@ -106,7 +108,7 @@
 class A {}
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(List<A> a) {
   List<B> b, b2;
   b = a.where((e) => e is B).cast<B>().toList();
@@ -148,7 +150,7 @@
 class A {}
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(Map<A, B> a) {
   Map<B, A> b, b2;
   b = a.cast<B, A>();
@@ -196,7 +198,7 @@
 }
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(A a) {
   B b, b2;
   b = (a..m()) as B;
@@ -240,7 +242,7 @@
 class A {}
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(Set<A> a) {
   Set<B> b, b2;
   b = a.cast<B>();
@@ -291,7 +293,7 @@
 class A {}
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(A a) {
   B b = a as B;
   B b2 = a as B;
@@ -329,7 +331,7 @@
 class A {}
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(List<A> a) {
   List<B> b = a.where((e) => e is B).cast<B>().toList();
   List<B> b2 = a.where((e) => e is B).cast<B>().toList();
@@ -367,7 +369,7 @@
 class A {}
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(Map<A, B> a) {
   Map<B, A> b = a.cast<B, A>();
   Map<B, A> b2 = a.cast<B, A>();
@@ -411,7 +413,7 @@
 }
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(A a) {
   B b = (a..m()) as B;
   B b2 = (a..m()) as B;
@@ -451,7 +453,7 @@
 class A {}
 class B {}
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.INVALID_ASSIGNMENT, '''
 f(Set<A> a) {
   Set<B> b = a.cast<B>();
   Set<B> b2 = a.cast<B>();
@@ -469,8 +471,32 @@
 ''');
     await assertNoFix(
       errorFilter: (e) {
-        return e.errorCode == StaticTypeWarningCode.INVALID_ASSIGNMENT;
+        return e.errorCode == CompileTimeErrorCode.INVALID_ASSIGNMENT;
       },
     );
   }
 }
+
+@reflectiveTest
+class AddExplicitCastWithNullSafetyTest extends AddExplicitCastTest {
+  @override
+  List<String> get experiments => [EnableString.non_nullable];
+
+  Future<void> test_assignment_null() async {
+    await resolveTestUnit('''
+void f(int x) {
+  x = null;
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_assignment_nullable() async {
+    await resolveTestUnit('''
+void f(int x, int? y) {
+  x = y;
+}
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart
index 41407c0..09f61ed 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -20,17 +21,21 @@
   @override
   FixKind get kind => DartFixKind.ADD_MISSING_ENUM_CASE_CLAUSES;
 
-  Future<void> assertHasFixWithFilter(String expected) async {
-    var noError = true;
-    await assertHasFix(expected, errorFilter: (error) {
-      if (noError &&
+  bool Function(AnalysisError) get _filter {
+    var hasError = false;
+    return (error) {
+      if (!hasError &&
           error.errorCode ==
               StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH) {
-        noError = false;
+        hasError = true;
         return true;
       }
       return false;
-    });
+    };
+  }
+
+  Future<void> assertHasFixWithFilter(String expected) async {
+    await assertHasFix(expected, errorFilter: _filter);
   }
 
   Future<void> test_empty() async {
@@ -59,6 +64,17 @@
 ''');
   }
 
+  Future<void> test_incomplete_switchStatement() async {
+    await resolveTestUnit(r'''
+enum E {a, b, c}
+
+void f(E e) {
+  switch(e
+}
+''');
+    await assertNoFix(errorFilter: _filter);
+  }
+
   Future<void> test_nonEmpty() async {
     await resolveTestUnit('''
 enum E {a, b, c}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_missing_required_argument_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_missing_required_argument_test.dart
index 49a5dcf..11b0ee0 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_missing_required_argument_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_missing_required_argument_test.dart
@@ -19,7 +19,7 @@
   @override
   FixKind get kind => DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT;
 
-  Future<void> test_cons_flutter_children() async {
+  Future<void> test_constructor_flutter_children() async {
     addFlutterPackage();
     addMetaPackage();
     await resolveTestUnit('''
@@ -48,7 +48,7 @@
 ''');
   }
 
-  Future<void> test_cons_flutter_hasTrailingComma() async {
+  Future<void> test_constructor_flutter_hasTrailingComma() async {
     addFlutterPackage();
     addMetaPackage();
     await resolveTestUnit('''
@@ -77,7 +77,35 @@
 ''');
   }
 
-  Future<void> test_cons_single() async {
+  Future<void> test_constructor_named() async {
+    addMetaPackage();
+    await resolveTestUnit('''
+import 'package:meta/meta.dart';
+
+class A {
+  A.named({@required int a}) {}
+}
+
+void f() {
+  A a = new A.named();
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'package:meta/meta.dart';
+
+class A {
+  A.named({@required int a}) {}
+}
+
+void f() {
+  A a = new A.named(a: null);
+  print(a);
+}
+''');
+  }
+
+  Future<void> test_constructor_single() async {
     addMetaPackage();
     addSource('/home/test/lib/a.dart', r'''
 import 'package:meta/meta.dart';
@@ -104,7 +132,7 @@
 ''');
   }
 
-  Future<void> test_cons_single_closure() async {
+  Future<void> test_constructor_single_closure() async {
     addMetaPackage();
     addSource('/home/test/lib/a.dart', r'''
 import 'package:meta/meta.dart';
@@ -133,7 +161,7 @@
 ''');
   }
 
-  Future<void> test_cons_single_closure_2() async {
+  Future<void> test_constructor_single_closure2() async {
     addMetaPackage();
     addSource('/home/test/lib/a.dart', r'''
 import 'package:meta/meta.dart';
@@ -162,7 +190,7 @@
 ''');
   }
 
-  Future<void> test_cons_single_closure_3() async {
+  Future<void> test_constructor_single_closure3() async {
     addMetaPackage();
     addSource('/home/test/lib/a.dart', r'''
 import 'package:meta/meta.dart';
@@ -191,7 +219,7 @@
 ''');
   }
 
-  Future<void> test_cons_single_closure_4() async {
+  Future<void> test_constructor_single_closure4() async {
     addMetaPackage();
     addSource('/home/test/lib/a.dart', r'''
 import 'package:meta/meta.dart';
@@ -220,7 +248,7 @@
 ''');
   }
 
-  Future<void> test_cons_single_list() async {
+  Future<void> test_constructor_single_list() async {
     addMetaPackage();
     addSource('/home/test/lib/a.dart', r'''
 import 'package:meta/meta.dart';
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_ne_null_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_ne_null_test.dart
index a844e27..657adcc 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_ne_null_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_ne_null_test.dart
@@ -48,7 +48,7 @@
   }
 }
 ''');
-    await assertHasFixAllFix(StaticTypeWarningCode.NON_BOOL_CONDITION, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.NON_BOOL_CONDITION, '''
 main(String p, String q) {
   if (p != null) {
     print(p);
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart
new file mode 100644
index 0000000..67c35f1
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart
@@ -0,0 +1,127 @@
+// 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:analyzer/src/dart/analysis/experiments.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(AddNullCheckTest);
+  });
+}
+
+@reflectiveTest
+class AddNullCheckTest extends FixProcessorTest {
+  @override
+  List<String> get experiments => [EnableString.non_nullable];
+
+  @override
+  FixKind get kind => DartFixKind.ADD_NULL_CHECK;
+
+  Future<void> test_argument() async {
+    await resolveTestUnit('''
+void f(int x) {}
+void g(int? y) {
+  f(y);
+}
+''');
+    await assertHasFix('''
+void f(int x) {}
+void g(int? y) {
+  f(y!);
+}
+''');
+  }
+
+  Future<void> test_argument_differByMoreThanNullability() async {
+    await resolveTestUnit('''
+void f(int x) {}
+void g(String y) {
+  f(y);
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_assignment() async {
+    await resolveTestUnit('''
+void f(int x, int? y) {
+  x = y;
+}
+''');
+    await assertHasFix('''
+void f(int x, int? y) {
+  x = y!;
+}
+''');
+  }
+
+  Future<void>
+      test_assignment_differByMoreThanNullability_nonNullableRight() async {
+    await resolveTestUnit('''
+void f(int x, String y) {
+  x = y;
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void>
+      test_assignment_differByMoreThanNullability_nullableRight() async {
+    await resolveTestUnit('''
+void f(int x, String? y) {
+  x = y;
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_assignment_needsParens() async {
+    await resolveTestUnit('''
+void f(A x) {
+  x = x + x;
+}
+class A {
+  A? operator +(A a) => null;
+}
+''');
+    await assertHasFix('''
+void f(A x) {
+  x = (x + x)!;
+}
+class A {
+  A? operator +(A a) => null;
+}
+''');
+  }
+
+  Future<void> test_initializer() async {
+    await resolveTestUnit('''
+void f(int? x) {
+  int y = x;
+  print(y);
+}
+''');
+    await assertHasFix('''
+void f(int? x) {
+  int y = x!;
+  print(y);
+}
+''');
+  }
+
+  Future<void> test_initializer_differByMoreThanNullability() async {
+    await resolveTestUnit('''
+void f(String x) {
+  int y = x;
+  print(y);
+}
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_required_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_required_test.dart
index c45b6ca..9b90123 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_required_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_required_test.dart
@@ -13,7 +13,7 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AddRequiredTest);
-    defineReflectiveTests(AddRequiredWithNNBDTest);
+    defineReflectiveTests(AddRequiredWithNullSafetyTest);
   });
 }
 
@@ -40,7 +40,7 @@
 }
 
 @reflectiveTest
-class AddRequiredWithNNBDTest extends FixProcessorTest {
+class AddRequiredWithNullSafetyTest extends FixProcessorTest {
   @override
   List<String> get experiments => [EnableString.non_nullable];
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/add_override_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_override_test.dart
new file mode 100644
index 0000000..afd882d
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/add_override_test.dart
@@ -0,0 +1,47 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddOverrideTest);
+  });
+}
+
+@reflectiveTest
+class AddOverrideTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.annotate_overrides;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+class A {
+  void a() {}
+  void aa() {}
+}
+
+class B extends A {
+  void a() {}
+  void aa() {}
+}
+''');
+    await assertHasFix('''
+class A {
+  void a() {}
+  void aa() {}
+}
+
+class B extends A {
+  @override
+  void a() {}
+  @override
+  void aa() {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor.dart
new file mode 100644
index 0000000..6ef1c95
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/bulk_fix_processor.dart
@@ -0,0 +1,77 @@
+// 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:analysis_server/src/services/correction/bulk_fix_processor.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/services/available_declarations.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
+import 'package:test/test.dart';
+
+import '../../../../../abstract_single_unit.dart';
+
+/// A base class defining support for writing bulk fix processor tests.
+abstract class BulkFixProcessorTest extends AbstractSingleUnitTest {
+  /// The source change associated with the fix that was found, or `null` if
+  /// neither [assertHasFix] nor [assertHasFixAllFix] has been invoked.
+  SourceChange change;
+
+  /// The result of applying the [change] to the file content, or `null` if
+  /// neither [assertHasFix] nor [assertHasFixAllFix] has been invoked.
+  String resultCode;
+
+  /// Return a list of the experiments that are to be enabled for tests in this
+  /// class, or `null` if there are no experiments that should be enabled.
+  List<String> get experiments => null;
+
+  /// Return the lint code being tested.
+  String get lintCode => null;
+
+  /// The workspace in which fixes contributor operates.
+  ChangeWorkspace get workspace {
+    return DartChangeWorkspace([session]);
+  }
+
+  Future<void> assertHasFix(String expected) async {
+    change = await _computeFixes();
+
+    // apply to "file"
+    var fileEdits = change.edits;
+    expect(fileEdits, hasLength(1));
+
+    var fileContent = testCode;
+    resultCode = SourceEdit.applySequence(fileContent, change.edits[0].edits);
+    expect(resultCode, expected);
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    verifyNoTestUnitErrors = false;
+    _createAnalysisOptionsFile();
+  }
+
+  /// Computes fixes for the given [error] in [testUnit].
+  Future<SourceChange> _computeFixes() async {
+    var tracker = DeclarationsTracker(MemoryByteStore(), resourceProvider);
+    tracker.addContext(driver.analysisContext);
+    var changeBuilder =
+        await BulkFixProcessor(workspace).fixErrorsInLibraries([testFile]);
+    return changeBuilder.sourceChange;
+  }
+
+  /// Create the analysis options file needed in order to correctly analyze the
+  /// test file.
+  void _createAnalysisOptionsFile() {
+    var code = lintCode;
+    if (code == null) {
+      createAnalysisOptionsFile(experiments: experiments);
+    } else {
+      createAnalysisOptionsFile(experiments: experiments, lints: [code]);
+    }
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_documentation_into_line_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_documentation_into_line_test.dart
new file mode 100644
index 0000000..5a5d169
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_documentation_into_line_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.
+
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertDocumentationIntoLineTest);
+  });
+}
+
+@reflectiveTest
+class ConvertDocumentationIntoLineTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.slash_for_doc_comments;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+/**
+ * C
+ */
+class C {
+  /**
+   * f
+   */
+  int f;
+
+  /**
+   * m
+   */
+  m() {}
+}
+
+/**
+ * f
+ */
+void f() {}
+''');
+    await assertHasFix('''
+/// C
+class C {
+  /// f
+  int f;
+
+  /// m
+  m() {}
+}
+
+/// f
+void f() {}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_contains_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_contains_test.dart
new file mode 100644
index 0000000..5e7445b
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_contains_test.dart
@@ -0,0 +1,41 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToContainsTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToContainsTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.prefer_contains;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+bool f(List<int> list, int value) {
+  return -1 != list.indexOf(value);
+}
+
+bool f2(List<int> list, int value) {
+  return 0 > list.indexOf(value);
+}
+''');
+    await assertHasFix('''
+bool f(List<int> list, int value) {
+  return list.contains(value);
+}
+
+bool f2(List<int> list, int value) {
+  return !list.contains(value);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_element_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_element_test.dart
new file mode 100644
index 0000000..4e3908a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_if_element_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.
+
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToIfElementTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToIfElementTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode =>
+      LintNames.prefer_if_elements_to_conditional_expressions;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+String f(bool b) {
+  return ['a', b ? 'c' : 'd', 'e'];
+}
+
+String f2(bool b) {
+  return {'a', b ? 'c' : 'd', 'e'};
+}
+''');
+    await assertHasFix('''
+String f(bool b) {
+  return ['a', if (b) 'c' else 'd', 'e'];
+}
+
+String f2(bool b) {
+  return {'a', if (b) 'c' else 'd', 'e'};
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_single_quoted_strings_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_single_quoted_strings_test.dart
new file mode 100644
index 0000000..7bc1a30
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_single_quoted_strings_test.dart
@@ -0,0 +1,35 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToSingleQuotedStringTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToSingleQuotedStringTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.prefer_single_quotes;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+main() {
+  print("abc");
+  print("e" + "f" + "g");
+}
+''');
+    await assertHasFix('''
+main() {
+  print('abc');
+  print('e' + 'f' + 'g');
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_spread_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_spread_test.dart
new file mode 100644
index 0000000..59bdc19
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_spread_test.dart
@@ -0,0 +1,47 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToSpreadTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToSpreadTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.prefer_spread_collections;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+f() {
+  var ints = [1, 2, 3];
+  print(['a']..addAll(ints.map((i) => i.toString()))..addAll(['c']));
+}
+
+f2() {
+  bool condition;
+  var things;
+  var l = ['a']..addAll(condition ? things : []);
+}
+''');
+    await assertHasFix('''
+f() {
+  var ints = [1, 2, 3];
+  print(['a', ...ints.map((i) => i.toString())]..addAll(['c']));
+}
+
+f2() {
+  bool condition;
+  var things;
+  var l = ['a', if (condition) ...things];
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/create_method_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/create_method_test.dart
new file mode 100644
index 0000000..5933dbe
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/create_method_test.dart
@@ -0,0 +1,56 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddMissingHashOrEqualsTest);
+  });
+}
+
+@reflectiveTest
+class AddMissingHashOrEqualsTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.hash_and_equals;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+class C {
+  @override
+  int get hashCode => 13;
+}
+
+class D {
+  @override
+  bool operator ==(Object other) => false;
+}
+''');
+    await assertHasFix('''
+class C {
+  @override
+  int get hashCode => 13;
+
+  @override
+  bool operator ==(Object other) {
+    // TODO: implement ==
+    return super == other;
+  }
+}
+
+class D {
+  @override
+  bool operator ==(Object other) => false;
+
+  @override
+  // TODO: implement hashCode
+  int get hashCode => super.hashCode;
+
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_argument_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_argument_test.dart
new file mode 100644
index 0000000..d246cd8
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_argument_test.dart
@@ -0,0 +1,41 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveArgumentTest);
+  });
+}
+
+@reflectiveTest
+class RemoveArgumentTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.avoid_redundant_argument_values;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+void f({bool valWithDefault = true, bool val}) {}
+void f2({bool valWithDefault = true, bool val}) {}
+
+void main() {
+  f(valWithDefault: true);
+  f2(valWithDefault: true, val: false);
+}
+''');
+    await assertHasFix('''
+void f({bool valWithDefault = true, bool val}) {}
+void f2({bool valWithDefault = true, bool val}) {}
+
+void main() {
+  f();
+  f2(val: false);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_await_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_await_test.dart
new file mode 100644
index 0000000..ea4c184
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_await_test.dart
@@ -0,0 +1,41 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveAwaitTest);
+  });
+}
+
+@reflectiveTest
+class RemoveAwaitTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.await_only_futures;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+f() async {
+  print(await 23);
+}
+
+f2() async {
+  print(await 'hola');
+}
+''');
+    await assertHasFix('''
+f() async {
+  print(23);
+}
+
+f2() async {
+  print('hola');
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_duplicate_case_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_duplicate_case_test.dart
new file mode 100644
index 0000000..0ce557d
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_duplicate_case_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 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveDuplicateCaseTest);
+  });
+}
+
+@reflectiveTest
+class RemoveDuplicateCaseTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.no_duplicate_case_values;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+void switchInt() {
+  switch (2) {
+    case 1:
+      print('a');
+      break;
+    case 2:
+    case 2:
+    case 3:
+    case 3:
+    default:
+      print('?');
+  }
+}
+''');
+    await assertHasFix('''
+void switchInt() {
+  switch (2) {
+    case 1:
+      print('a');
+      break;
+    case 2:
+    case 3:
+    default:
+      print('?');
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_catch_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_catch_test.dart
new file mode 100644
index 0000000..2582a53
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_catch_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:analysis_server/src/services/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveEmptyCatchTest);
+  });
+}
+
+@reflectiveTest
+class RemoveEmptyCatchTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.empty_catches;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+void f() {
+  try {
+    try {
+      1;
+    } catch (e) {} finally {}
+  } catch (e) {} finally {}
+}
+
+void f2() {
+  try {} catch (e) {} finally {}
+}
+''');
+    await assertHasFix('''
+void f() {
+  try {
+    try {
+      1;
+    } finally {}
+  } finally {}
+}
+
+void f2() {
+  try {} finally {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_constructor_body_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_constructor_body_test.dart
new file mode 100644
index 0000000..9272e89
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_constructor_body_test.dart
@@ -0,0 +1,41 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveEmptyConstructorBodyTest);
+  });
+}
+
+@reflectiveTest
+class RemoveEmptyConstructorBodyTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.empty_constructor_bodies;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+class C {
+  C() {}
+}
+
+class D {
+  D() {}
+}
+''');
+    await assertHasFix('''
+class C {
+  C();
+}
+
+class D {
+  D();
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_else_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_else_test.dart
new file mode 100644
index 0000000..faf94fc
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_else_test.dart
@@ -0,0 +1,50 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveUnnecessaryElseTest);
+  });
+}
+
+@reflectiveTest
+class RemoveUnnecessaryElseTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.avoid_empty_else;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+void f(bool cond) {
+  if (cond) {
+    //
+  }
+  else ;
+}
+
+void f2(bool cond) {
+  if (cond) {
+    //
+  } else ;
+}
+''');
+    await assertHasFix('''
+void f(bool cond) {
+  if (cond) {
+    //
+  }
+}
+
+void f2(bool cond) {
+  if (cond) {
+    //
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_statement_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_statement_test.dart
new file mode 100644
index 0000000..42227c9
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_empty_statement_test.dart
@@ -0,0 +1,46 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveEmptyStatementTest);
+  });
+}
+
+@reflectiveTest
+class RemoveEmptyStatementTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.empty_statements;
+
+  Future<void> test_singleFile() async {
+    // Note that ReplaceWithEmptyBrackets is not supported.
+    //   for example: `if (true) ;` ...
+    await resolveTestUnit('''
+void f() {
+  while(true) {
+    ;
+  }
+}
+
+void f2() {
+  while(true) { ; }
+}
+''');
+    await assertHasFix('''
+void f() {
+  while(true) {
+  }
+}
+
+void f2() {
+  while(true) { }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_initializer_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_initializer_test.dart
new file mode 100644
index 0000000..446ec84
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_initializer_test.dart
@@ -0,0 +1,41 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveInitializerTest);
+  });
+}
+
+@reflectiveTest
+class RemoveInitializerTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.avoid_init_to_null;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+class T {
+  int x = null;
+}
+
+class T2 {
+  int x = null;
+}
+''');
+    await assertHasFix('''
+class T {
+  int x;
+}
+
+class T2 {
+  int x;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_method_declaration_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_method_declaration_test.dart
new file mode 100644
index 0000000..6389eaf
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_method_declaration_test.dart
@@ -0,0 +1,45 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveMethodDeclarationTest);
+  });
+}
+
+@reflectiveTest
+class RemoveMethodDeclarationTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.unnecessary_overrides;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+class A {
+  int foo;
+  int bar() => 0;
+}
+
+class B extends A {
+  @override
+  int get foo => super.foo;
+  @override
+  int bar() => super.bar();
+}
+''');
+    await assertHasFix('''
+class A {
+  int foo;
+  int bar() => 0;
+}
+
+class B extends A {
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_operator_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_operator_test.dart
new file mode 100644
index 0000000..e8aede6
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_operator_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:analysis_server/src/services/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveOperatorTest);
+  });
+}
+
+@reflectiveTest
+class RemoveOperatorTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.prefer_adjacent_string_concatenation;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+var s = 'a' + 'b';
+var s1 = 'b' + 'c';
+''');
+    await assertHasFix('''
+var s = 'a' 'b';
+var s1 = 'b' 'c';
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_this_expression_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_this_expression_test.dart
new file mode 100644
index 0000000..06f6938
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_this_expression_test.dart
@@ -0,0 +1,41 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveThisExpressionTest);
+  });
+}
+
+@reflectiveTest
+class RemoveThisExpressionTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.unnecessary_this;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+class A {
+  int x;
+  A(int x) : this.x = x;
+  void foo() {
+    this.foo();
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int x;
+  A(int x) : x = x;
+  void foo() {
+    foo();
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_type_annotation_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_type_annotation_test.dart
new file mode 100644
index 0000000..f164e06
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_type_annotation_test.dart
@@ -0,0 +1,109 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveDynamicTypeAnnotationTest);
+    defineReflectiveTests(RemoveSetterReturnTypeAnnotationTest);
+    defineReflectiveTests(RemoveTypeAnnotationOnClosureParamsTest);
+    defineReflectiveTests(TypeInitFormalsTest);
+  });
+}
+
+@reflectiveTest
+class RemoveDynamicTypeAnnotationTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.avoid_annotating_with_dynamic;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+f(void foo(dynamic x)) {
+  return null;
+}
+
+f2({dynamic defaultValue}) {
+  return null;
+}
+''');
+    await assertHasFix('''
+f(void foo(x)) {
+  return null;
+}
+
+f2({defaultValue}) {
+  return null;
+}
+''');
+  }
+}
+
+@reflectiveTest
+class RemoveSetterReturnTypeAnnotationTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.avoid_return_types_on_setters;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+void set s(int s) {}
+void set s2(int s2) {}
+''');
+    await assertHasFix('''
+set s(int s) {}
+set s2(int s2) {}
+''');
+  }
+}
+
+@reflectiveTest
+class RemoveTypeAnnotationOnClosureParamsTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.avoid_types_on_closure_parameters;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+var x = ({Future<int> defaultValue}) => null;
+var y = (Future<int> defaultValue) => null;
+''');
+    await assertHasFix('''
+var x = ({defaultValue}) => null;
+var y = (defaultValue) => null;
+''');
+  }
+}
+
+@reflectiveTest
+class TypeInitFormalsTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.type_init_formals;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+class C {
+  int f;
+  C(int this.f);
+}
+
+class Point {
+  int x, y;
+  Point(int this.x, int this.y);
+}
+''');
+    await assertHasFix('''
+class C {
+  int f;
+  C(this.f);
+}
+
+class Point {
+  int x, y;
+  Point(this.x, this.y);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_const_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_const_test.dart
new file mode 100644
index 0000000..5b6811d
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_const_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:analysis_server/src/services/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveUnnecessaryConstTest);
+  });
+}
+
+@reflectiveTest
+class RemoveUnnecessaryConstTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.unnecessary_const;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+class C { const C(); }
+class D { const D(C c); }
+const c = const C();
+const list = const [];
+var d = const D(const C());
+''');
+    await assertHasFix('''
+class C { const C(); }
+class D { const D(C c); }
+const c = C();
+const list = [];
+var d = const D(C());
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_new_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_new_test.dart
new file mode 100644
index 0000000..6f3b5e2
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/remove_unnecessary_new_test.dart
@@ -0,0 +1,45 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveUnnecessaryNewTest);
+  });
+}
+
+@reflectiveTest
+class RemoveUnnecessaryNewTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.unnecessary_new;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+C f() => new C();
+
+class C {
+  C();
+
+  void m() {
+    new C();
+  }
+}
+''');
+    await assertHasFix('''
+C f() => C();
+
+class C {
+  C();
+
+  void m() {
+    C();
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_colon_with_equals_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_colon_with_equals_test.dart
new file mode 100644
index 0000000..c90d5f7
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_colon_with_equals_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:analysis_server/src/services/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceColonWithEqualsTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceColonWithEqualsTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.prefer_equal_for_default_values;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+void f({int a: 1}) => null;
+
+class C {
+  void m({int a: 1, int b: 2}) => null;
+}
+''');
+    await assertHasFix('''
+void f({int a = 1}) => null;
+
+class C {
+  void m({int a = 1, int b = 2}) => null;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_null_with_closure_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_null_with_closure_test.dart
new file mode 100644
index 0000000..f647efb
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_null_with_closure_test.dart
@@ -0,0 +1,41 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceNullWithClosureTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceNullWithClosureTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.null_closures;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+void f(List<int> l) {
+  l.firstWhere((e) => e.isEven, orElse: null);
+}
+
+void f2(String s) {
+  s.splitMapJoin('', onNonMatch: null);
+}
+''');
+    await assertHasFix('''
+void f(List<int> l) {
+  l.firstWhere((e) => e.isEven, orElse: () => null);
+}
+
+void f2(String s) {
+  s.splitMapJoin('', onNonMatch: (String p1) => null);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_conditional_assignment_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_conditional_assignment_test.dart
new file mode 100644
index 0000000..790ff57
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_conditional_assignment_test.dart
@@ -0,0 +1,50 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithConditionalAssignmentTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithConditionalAssignmentTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.prefer_conditional_assignment;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+class Person {
+  String _fullName;
+  void foo() {
+    if (_fullName == null) {
+      _fullName = getFullUserName(this);
+    }
+  }
+  void bar() {
+    if (_fullName == null)
+      _fullName = getFullUserName(this);
+  }
+  String getFullUserName(Person p) => '';
+}
+''');
+    await assertHasFix('''
+class Person {
+  String _fullName;
+  void foo() {
+    _fullName ??= getFullUserName(this);
+  }
+  void bar() {
+    _fullName ??= getFullUserName(this);
+  }
+  String getFullUserName(Person p) => '';
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_is_empty_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_is_empty_test.dart
new file mode 100644
index 0000000..b7475c3
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_is_empty_test.dart
@@ -0,0 +1,35 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithIsEmptyTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithIsEmptyTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.prefer_is_empty;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+void f(List c) {
+  if (0 == c.length) {}
+  if (1 > c.length) {}
+}
+''');
+    await assertHasFix('''
+void f(List c) {
+  if (c.isEmpty) {}
+  if (c.isEmpty) {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_tear_off_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_tear_off_test.dart
new file mode 100644
index 0000000..5be6f3f
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_tear_off_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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithTearOffTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithTearOffTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.unnecessary_lambdas;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+Function f() => (name) {
+  print(name);
+};
+
+void foo(){}
+Function f2() {
+  return () {
+    foo();
+  };
+}
+''');
+    await assertHasFix('''
+Function f() => print;
+
+void foo(){}
+Function f2() {
+  return foo;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_var_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_var_test.dart
new file mode 100644
index 0000000..63c23a5
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/replace_with_var_test.dart
@@ -0,0 +1,47 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithVarTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithVarTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.omit_local_variable_types;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+List f() {
+  List<int> l = [];
+  return l;
+}
+
+void f2(List<int> list) {
+  for (int i in list) {
+    print(i);
+  }
+}
+''');
+    await assertHasFix('''
+List f() {
+  var l = <int>[];
+  return l;
+}
+
+void f2(List<int> list) {
+  for (var i in list) {
+    print(i);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/test_all.dart
new file mode 100644
index 0000000..25bddfa
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/test_all.dart
@@ -0,0 +1,73 @@
+// 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:test_reflective_loader/test_reflective_loader.dart';
+
+import 'add_override_test.dart' as add_override;
+import 'convert_documentation_into_line_test.dart'
+    as convert_documentation_into_line;
+import 'convert_to_contains_test.dart' as convert_to_contains;
+import 'convert_to_if_element_test.dart' as convert_to_if_element;
+import 'convert_to_single_quoted_strings_test.dart'
+    as convert_to_single_quoted_strings;
+import 'convert_to_spread_test.dart' as convert_to_spread;
+import 'create_method_test.dart' as create_method;
+import 'remove_argument_test.dart' as remove_argument;
+import 'remove_await_test.dart' as remove_await;
+import 'remove_duplicate_case_test.dart' as remove_duplicate_case;
+import 'remove_empty_catch_test.dart' as remove_empty_catch;
+import 'remove_empty_constructor_body_test.dart'
+    as remove_empty_constructor_body;
+import 'remove_empty_else_test.dart' as remove_empty_else;
+import 'remove_empty_statement_test.dart' as remove_empty_statement;
+import 'remove_initializer_test.dart' as remove_initializer;
+import 'remove_method_declaration_test.dart' as remove_method_declaration;
+import 'remove_operator_test.dart' as remove_operator;
+import 'remove_this_expression_test.dart' as remove_this_expression;
+import 'remove_type_annotation_test.dart' as remove_type_annotation;
+import 'remove_unnecessary_const_test.dart' as remove_unnecessary_const;
+import 'remove_unnecessary_new_test.dart' as remove_unnecessary_new;
+import 'replace_colon_with_equals_test.dart' as replace_colon_with_equals;
+import 'replace_null_with_closure_test.dart' as replace_null_with_closure;
+import 'replace_with_conditional_assignment_test.dart'
+    as replace_with_conditional_assignment;
+import 'replace_with_is_empty_test.dart' as replace_with_is_empty;
+import 'replace_with_tear_off_test.dart' as replace_with_tear_off;
+import 'replace_with_var_test.dart' as replace_with_var;
+import 'use_curly_braces_test.dart' as use_curly_braces;
+import 'use_is_not_empty_test.dart' as use_is_not_empty;
+
+void main() {
+  defineReflectiveSuite(() {
+    add_override.main();
+    convert_documentation_into_line.main();
+    convert_to_contains.main();
+    convert_to_if_element.main();
+    convert_to_single_quoted_strings.main();
+    convert_to_spread.main();
+    create_method.main();
+    remove_argument.main();
+    remove_await.main();
+    remove_duplicate_case.main();
+    remove_initializer.main();
+    remove_empty_catch.main();
+    remove_empty_constructor_body.main();
+    remove_empty_else.main();
+    remove_empty_statement.main();
+    remove_method_declaration.main();
+    remove_operator.main();
+    remove_this_expression.main();
+    remove_type_annotation.main();
+    remove_unnecessary_const.main();
+    remove_unnecessary_new.main();
+    replace_with_conditional_assignment.main();
+    replace_colon_with_equals.main();
+    replace_null_with_closure.main();
+    replace_with_is_empty.main();
+    replace_with_tear_off.main();
+    replace_with_var.main();
+    use_curly_braces.main();
+    use_is_not_empty.main();
+  }, name: 'bulk');
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/use_curly_braces_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_curly_braces_test.dart
new file mode 100644
index 0000000..3bce118
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_curly_braces_test.dart
@@ -0,0 +1,45 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UseCurlyBracesTest);
+  });
+}
+
+@reflectiveTest
+class UseCurlyBracesTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.curly_braces_in_flow_control_structures;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+f() {
+  while (true) if (false) print('');
+}
+
+f2() {
+  while (true) print(2);
+}
+''');
+    await assertHasFix('''
+f() {
+  while (true) if (false) {
+    print('');
+  }
+}
+
+f2() {
+  while (true) {
+    print(2);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/use_is_not_empty_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_is_not_empty_test.dart
new file mode 100644
index 0000000..e9010c7
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/use_is_not_empty_test.dart
@@ -0,0 +1,35 @@
+// 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/linter/lint_names.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bulk_fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UseIsNotEmptyTest);
+  });
+}
+
+@reflectiveTest
+class UseIsNotEmptyTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.prefer_is_not_empty;
+
+  Future<void> test_singleFile() async {
+    await resolveTestUnit('''
+void f(List<int> l) {
+  if (!l.isEmpty) {}
+  if (!l.isEmpty || true) {}
+}
+''');
+    await assertHasFix('''
+void f(List<int> l) {
+  if (l.isNotEmpty) {}
+  if (l.isNotEmpty || true) {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/change_type_annotation_test.dart b/pkg/analysis_server/test/src/services/correction/fix/change_type_annotation_test.dart
index b9f2735..91c2321 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/change_type_annotation_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/change_type_annotation_test.dart
@@ -78,7 +78,7 @@
 ''');
     await assertNoFix(
       errorFilter: (e) {
-        return e.errorCode == StaticTypeWarningCode.INVALID_ASSIGNMENT;
+        return e.errorCode == CompileTimeErrorCode.INVALID_ASSIGNMENT;
       },
     );
   }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_class_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_class_test.dart
index 82181b0..10f5a1a 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/create_class_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_class_test.dart
@@ -196,7 +196,7 @@
 class Test {
 }
 ''', errorFilter: (error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER;
+      return error.errorCode == CompileTimeErrorCode.UNDEFINED_IDENTIFIER;
     });
     assertLinkedGroup(change.linkedEditGroups[0], ['Test])', 'Test {']);
   }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_constructor_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_test.dart
index 83eb64c..0512623 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/create_constructor_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -104,6 +105,19 @@
 ''');
   }
 
+  Future<void> test_mixin() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+mixin M {}
+void f() {
+  new M(3);
+}
+''');
+    await assertNoFix(
+        errorFilter: (error) =>
+            error.errorCode != CompileTimeErrorCode.MIXIN_INSTANTIATE);
+  }
+
   Future<void> test_named() async {
     await resolveTestUnit('''
 class A {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_field_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_field_test.dart
index eec3b63..df32308 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/create_field_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_field_test.dart
@@ -379,7 +379,7 @@
 }
 ''');
     await assertNoFix(errorFilter: (e) {
-      return e.errorCode == StaticTypeWarningCode.UNDEFINED_GETTER;
+      return e.errorCode == CompileTimeErrorCode.UNDEFINED_GETTER;
     });
   }
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_function_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_function_test.dart
index e7bb640..ca334c7 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/create_function_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_function_test.dart
@@ -388,6 +388,30 @@
 ''');
   }
 
+  Future<void> test_parameterName_fromIndexExpression() async {
+    await resolveTestUnit('''
+class A {
+  int operator[](int _) => 0;
+
+  void foo() {
+    bar(this[0]);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int operator[](int _) => 0;
+
+  void foo() {
+    bar(this[0]);
+  }
+}
+
+void bar(int i) {
+}
+''');
+  }
+
   Future<void> test_returnType_bool_and_left() async {
     await assert_returnType_bool('test() && b;');
   }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_getter_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_getter_test.dart
index b3e1fe2..c8797e3 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/create_getter_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_getter_test.dart
@@ -322,7 +322,7 @@
 }
 ''');
     await assertNoFix(errorFilter: (e) {
-      return e.errorCode == StaticTypeWarningCode.UNDEFINED_GETTER;
+      return e.errorCode == CompileTimeErrorCode.UNDEFINED_GETTER;
     });
   }
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_mixin_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_mixin_test.dart
index 0fd84b2..3945682 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/create_mixin_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_mixin_test.dart
@@ -134,7 +134,7 @@
 mixin Test {
 }
 ''', errorFilter: (error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER;
+      return error.errorCode == CompileTimeErrorCode.UNDEFINED_IDENTIFIER;
     });
     assertLinkedGroup(change.linkedEditGroups[0], ['Test])', 'Test {']);
   }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_setter_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_setter_test.dart
index 5dc1260..1a984bf 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/create_setter_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_setter_test.dart
@@ -316,7 +316,7 @@
 }
 ''');
     await assertNoFix(errorFilter: (e) {
-      return e.errorCode == StaticTypeWarningCode.UNDEFINED_SETTER;
+      return e.errorCode == CompileTimeErrorCode.UNDEFINED_SETTER;
     });
   }
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/convert_argument_to_type_argument_change_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/convert_argument_to_type_argument_change_test.dart
new file mode 100644
index 0000000..7b5db56
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/convert_argument_to_type_argument_change_test.dart
@@ -0,0 +1,362 @@
+// 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/correction/fix/data_driven/convert_argument_to_type_argument_change.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/element_descriptor.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/parameter_reference.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/rename_change.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/transform.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'data_driven_test_support.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(
+        ConvertArgumentToTypeArgumentChange_DeprecatedMemberUseTest);
+  });
+}
+
+@reflectiveTest
+class ConvertArgumentToTypeArgumentChange_DeprecatedMemberUseTest
+    extends DataDrivenFixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.DATA_DRIVEN;
+
+  Future<void> test_method_named_first_only() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1({Type t, int x}) {}
+  int m2<T>({int x}) {}
+}
+''');
+    setPackageData(_convertNamed(['C', 'm1'], 'm2', 't', 0));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1(t: int, x: 0);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int>(x: 0);
+}
+''');
+  }
+
+  Future<void> test_method_named_last_only() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1({int x, int y, Type t}) {}
+  int m2<T>({int x, int y}) {}
+}
+''');
+    setPackageData(_convertNamed(['C', 'm1'], 'm2', 't', 0));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1(x: 0, y: 1, t: int);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int>(x: 0, y: 1);
+}
+''');
+  }
+
+  Future<void> test_method_named_middle_only() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1({int x, Type t, int y}) {}
+  int m2<T>({int x, int y}) {}
+}
+''');
+    setPackageData(_convertNamed(['C', 'm1'], 'm2', 't', 0));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1(x: 0, t: int, y: 1);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int>(x: 0, y: 1);
+}
+''');
+  }
+
+  Future<void> test_method_named_mixed_only() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1(int x, {Type t, int y}) {}
+  int m2<T>(int x, {int y}) {}
+}
+''');
+    setPackageData(_convertNamed(['C', 'm1'], 'm2', 't', 0));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1(0, t: int, y: 1);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int>(0, y: 1);
+}
+''');
+  }
+
+  Future<void> test_method_positional_first_only() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1(Type t, int x) {}
+  int m2<T>(int x) {}
+}
+''');
+    setPackageData(_convertPositional(['C', 'm1'], 'm2', 0, 0));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1(int, 0);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int>(0);
+}
+''');
+  }
+
+  Future<void> test_method_positional_last_only() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1(int x, int y, Type t) {}
+  int m2<T>(int x, int y) {}
+}
+''');
+    setPackageData(_convertPositional(['C', 'm1'], 'm2', 2, 0));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1(0, 1, int);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int>(0, 1);
+}
+''');
+  }
+
+  Future<void> test_method_positional_middle_only() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1(int x, Type t, int y) {}
+  int m2<T>(int x, int y) {}
+}
+''');
+    setPackageData(_convertPositional(['C', 'm1'], 'm2', 1, 0));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1(0, int, 1);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int>(0, 1);
+}
+''');
+  }
+
+  Future<void> test_method_positional_only_first() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1<T>(Type t) {}
+  int m2<S, T>() {}
+}
+''');
+    setPackageData(_convertPositional(['C', 'm1'], 'm2', 0, 0));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1<int>(String);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<String, int>();
+}
+''');
+  }
+
+  Future<void> test_method_positional_only_last() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1<S, T>(Type t) {}
+  int m2<S, T, U>() {}
+}
+''');
+    setPackageData(_convertPositional(['C', 'm1'], 'm2', 0, 2));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1<int, double>(String);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int, double, String>();
+}
+''');
+  }
+
+  Future<void> test_method_positional_only_middle() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1<S, U>(Type t) {}
+  int m2<S, T, U>() {}
+}
+''');
+    setPackageData(_convertPositional(['C', 'm1'], 'm2', 0, 1));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1<int, double>(String);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int, String, double>();
+}
+''');
+  }
+
+  Future<void> test_method_positional_only_only() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int m1(Type t) {}
+  int m2<T>() {}
+}
+''');
+    setPackageData(_convertPositional(['C', 'm1'], 'm2', 0, 0));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.m1(int);
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.m2<int>();
+}
+''');
+  }
+
+  Transform _convertNamed(List<String> components, String newName,
+          String parameterName, int typeArgumentIndex) =>
+      Transform(
+          title: 'title',
+          element: ElementDescriptor(
+              libraryUris: [importUri], components: components),
+          changes: [
+            RenameChange(newName: newName),
+            ConvertArgumentToTypeArgumentChange(
+                parameterReference: NamedParameterReference(parameterName),
+                typeArgumentIndex: typeArgumentIndex),
+          ]);
+
+  Transform _convertPositional(List<String> components, String newName,
+          int argumentIndex, int typeArgumentIndex) =>
+      Transform(
+          title: 'title',
+          element: ElementDescriptor(
+              libraryUris: [importUri], components: components),
+          changes: [
+            RenameChange(newName: newName),
+            ConvertArgumentToTypeArgumentChange(
+                parameterReference: PositionalParameterReference(argumentIndex),
+                typeArgumentIndex: typeArgumentIndex),
+          ]);
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/data_driven_test_support.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/data_driven_test_support.dart
new file mode 100644
index 0000000..5198cf1
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/data_driven_test_support.dart
@@ -0,0 +1,29 @@
+// 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/data_driven.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/transform.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/transform_set.dart';
+
+import '../fix_processor.dart';
+
+/// A base class defining support for writing fix processor tests for
+/// data-driven fixes.
+abstract class DataDrivenFixProcessorTest extends FixProcessorTest {
+  /// Return the URI used to import the library created by [setPackageContent].
+  String get importUri => 'package:p/lib.dart';
+
+  /// Set the content of the library that defines the element referenced by the
+  /// data on which this test is based.
+  void setPackageContent(String content) {
+    addPackageFile('p', 'lib.dart', content);
+  }
+
+  /// Set the data on which this test is based.
+  void setPackageData(Transform transform) {
+    DataDriven.transformSetsForTests = [
+      TransformSet()..addTransform(transform)
+    ];
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_change_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_change_test.dart
new file mode 100644
index 0000000..87aec0f
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_change_test.dart
@@ -0,0 +1,250 @@
+// 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/correction/fix/data_driven/element_descriptor.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/rename_change.dart';
+import 'package:analysis_server/src/services/correction/fix/data_driven/transform.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'data_driven_test_support.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RenameChange_DeprecatedMemberUseTest);
+  });
+}
+
+@reflectiveTest
+class RenameChange_DeprecatedMemberUseTest extends DataDrivenFixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.DATA_DRIVEN;
+
+  Future<void> test_class() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+@deprecated
+class Old {}
+class New {}
+''');
+    setPackageData(_rename(['Old'], 'New'));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(Old o) {}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(New o) {}
+''');
+  }
+
+  Future<void> test_constructor_named() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  C.old();
+  C.new();
+}
+''');
+    setPackageData(_rename(['C', 'old'], 'new'));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f() {
+  C.old();
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f() {
+  C.new();
+}
+''');
+  }
+
+  Future<void> test_constructor_unnamed() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+@deprecated
+class Old {
+  Old();
+}
+class New {
+  New();
+}
+''');
+    setPackageData(_rename(['Old'], 'New'));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f() {
+  Old();
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f() {
+  New();
+}
+''');
+  }
+
+  Future<void> test_field_instance() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int old;
+  int new;
+}
+''');
+    setPackageData(_rename(['C', 'old'], 'new'));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.old;
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.new;
+}
+''');
+  }
+
+  Future<void> test_field_static() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  static int old;
+  static int new;
+}
+''');
+    setPackageData(_rename(['C', 'old'], 'new'));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f() {
+  C.old;
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f() {
+  C.new;
+}
+''');
+  }
+
+  Future<void> test_method_instance() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  int old() {}
+  int new() {}
+}
+''');
+    setPackageData(_rename(['C', 'old'], 'new'));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f(C c) {
+  c.old();
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f(C c) {
+  c.new();
+}
+''');
+  }
+
+  Future<void> test_method_static() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+class C {
+  @deprecated
+  static int old() {}
+  static int new() {}
+}
+''');
+    setPackageData(_rename(['C', 'old'], 'new'));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f() {
+  C.old();
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f() {
+  C.new();
+}
+''');
+  }
+
+  Future<void> test_topLevelFunction() async {
+    addMetaPackage();
+    setPackageContent('''
+import 'package:meta/meta.dart';
+
+@deprecated
+int old() {}
+int new() {}
+''');
+    setPackageData(_rename(['old'], 'new'));
+    await resolveTestUnit('''
+import '$importUri';
+
+void f() {
+  old();
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f() {
+  new();
+}
+''');
+  }
+
+  Transform _rename(List<String> components, String newName) => Transform(
+          title: 'title',
+          element: ElementDescriptor(
+              libraryUris: [importUri], components: components),
+          changes: [
+            RenameChange(newName: newName),
+          ]);
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/test_all.dart
new file mode 100644
index 0000000..522023a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/test_all.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:test_reflective_loader/test_reflective_loader.dart';
+
+import 'convert_argument_to_type_argument_change_test.dart'
+    as convert_argument_to_type_argument_change;
+import 'rename_change_test.dart' as rename_change;
+
+void main() {
+  defineReflectiveSuite(() {
+    convert_argument_to_type_argument_change.main();
+    rename_change.main();
+  });
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/import_library_sdk_test.dart b/pkg/analysis_server/test/src/services/correction/fix/import_library_sdk_test.dart
index b64f017..600d792 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/import_library_sdk_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/import_library_sdk_test.dart
@@ -211,7 +211,7 @@
 @MyAnnotation(int, const [Completer])
 main() {}
 ''', errorFilter: (error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER;
+      return error.errorCode == CompileTimeErrorCode.UNDEFINED_IDENTIFIER;
     });
   }
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/inline_typedef_test.dart b/pkg/analysis_server/test/src/services/correction/fix/inline_typedef_test.dart
index ceefcc5..3eeb26c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/inline_typedef_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/inline_typedef_test.dart
@@ -13,7 +13,7 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(InlineTypedefTest);
-    defineReflectiveTests(InlineTypedefWithNNBDTest);
+    defineReflectiveTests(InlineTypedefWithNullSafetyTest);
   });
 }
 
@@ -137,7 +137,7 @@
 }
 
 @reflectiveTest
-class InlineTypedefWithNNBDTest extends InlineTypedefTest {
+class InlineTypedefWithNullSafetyTest extends InlineTypedefTest {
   @override
   List<String> get experiments => [EnableString.non_nullable];
 
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 4d4dd62..7486e14 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
@@ -14,7 +14,7 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(PreferFinalInForEachTest);
     defineReflectiveTests(PreferFinalFieldsTest);
-    defineReflectiveTests(PreferFinalFieldsWithNNBDTest);
+    defineReflectiveTests(PreferFinalFieldsWithNullSafetyTest);
   });
 }
 
@@ -58,7 +58,7 @@
 }
 
 @reflectiveTest
-class PreferFinalFieldsWithNNBDTest extends FixProcessorLintTest {
+class PreferFinalFieldsWithNullSafetyTest extends FixProcessorLintTest {
   @override
   List<String> get experiments => [EnableString.non_nullable];
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/make_return_type_nullable_test.dart b/pkg/analysis_server/test/src/services/correction/fix/make_return_type_nullable_test.dart
new file mode 100644
index 0000000..6181ed4
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/make_return_type_nullable_test.dart
@@ -0,0 +1,150 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MakeReturnTypeNullableTest);
+  });
+}
+
+@reflectiveTest
+class MakeReturnTypeNullableTest extends FixProcessorTest {
+  @override
+  List<String> get experiments => [EnableString.non_nullable];
+
+  @override
+  FixKind get kind => DartFixKind.MAKE_RETURN_TYPE_NULLABLE;
+
+  Future<void> test_function_async() async {
+    await resolveTestUnit('''
+Future<String> f(String? s) async {
+  return s;
+}
+''');
+    await assertHasFix('''
+Future<String?> f(String? s) async {
+  return s;
+}
+''');
+  }
+
+  Future<void> test_function_asyncStar() async {
+    await resolveTestUnit('''
+Stream<String> f(String? s) async* {
+  yield s;
+}
+''');
+    await assertHasFix('''
+Stream<String?> f(String? s) async* {
+  yield s;
+}
+''');
+  }
+
+  Future<void> test_function_sync() async {
+    await resolveTestUnit('''
+String f(String? s) {
+  return s;
+}
+''');
+    await assertHasFix('''
+String? f(String? s) {
+  return s;
+}
+''');
+  }
+
+  Future<void> test_function_syncStar() async {
+    await resolveTestUnit('''
+Iterable<String> f(String? s) sync* {
+  yield s;
+}
+''');
+    await assertHasFix('''
+Iterable<String?> f(String? s) sync* {
+  yield s;
+}
+''');
+  }
+
+  Future<void> test_getter_sync() async {
+    await resolveTestUnit('''
+class C {
+  String? f;
+  String get g => f;
+}
+''');
+    await assertHasFix('''
+class C {
+  String? f;
+  String? get g => f;
+}
+''');
+  }
+
+  Future<void> test_incompatibilityIsNotLimitedToNullability() async {
+    await resolveTestUnit('''
+int f() {
+  return '';
+}
+''');
+    await assertNoFix();
+  }
+
+  Future<void> test_localFunction_sync() async {
+    await resolveTestUnit('''
+void f() {
+  String g(String? s) {
+    return s;
+  }
+  g(null);
+}
+''');
+    await assertHasFix('''
+void f() {
+  String? g(String? s) {
+    return s;
+  }
+  g(null);
+}
+''');
+  }
+
+  Future<void> test_method_sync() async {
+    await resolveTestUnit('''
+class C {
+  String m(String? s) {
+    return s;
+  }
+}
+''');
+    await assertHasFix('''
+class C {
+  String? m(String? s) {
+    return s;
+  }
+}
+''');
+  }
+
+  Future<void> test_returnTypeHasTypeArguments() async {
+    await resolveTestUnit('''
+List<String> f() {
+  return null;
+}
+''');
+    await assertHasFix('''
+List<String>? f() {
+  return null;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_duplicate_case_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_duplicate_case_test.dart
index 2317c0f..a010515 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_duplicate_case_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_duplicate_case_test.dart
@@ -23,6 +23,40 @@
   @override
   String get lintCode => LintNames.no_duplicate_case_values;
 
+  Future<void> test_fallThroughFromPrevious() async {
+    await resolveTestUnit('''
+void switchInt() {
+  switch (2) {
+    case 1:
+      print('a');
+      break;
+    case 2:
+    case 3:
+    case 2:
+      print('b');
+      break;
+    default:
+      print('?');
+  }
+}
+''');
+    await assertHasFix('''
+void switchInt() {
+  switch (2) {
+    case 1:
+      print('a');
+      break;
+    case 2:
+    case 3:
+      print('b');
+      break;
+    default:
+      print('?');
+  }
+}
+''');
+  }
+
   Future<void> test_removeIntCase() async {
     await resolveTestUnit('''
 void switchInt() {
@@ -62,7 +96,7 @@
     case 'b':
       print('b');
       break;
-    case 'a' :
+    case 'a':
       print('a');
       break;
     default:
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_empty_constructor_body_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_constructor_body_test.dart
index 3a1a413..6f1bb5e 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_empty_constructor_body_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_constructor_body_test.dart
@@ -4,6 +4,7 @@
 
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -35,4 +36,16 @@
 }
 ''');
   }
+
+  Future<void> test_incompleteComment() async {
+    await resolveTestUnit(r'''
+class A {
+  A() {/*
+''');
+    await assertNoFix(errorFilter: _isInterestingError);
+  }
+
+  static bool _isInterestingError(AnalysisError e) {
+    return e.errorCode.name == LintNames.empty_constructor_bodies;
+  }
 }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_this_expression_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_this_expression_test.dart
index a9e07f1..8949517 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_this_expression_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_this_expression_test.dart
@@ -55,23 +55,6 @@
 ''');
   }
 
-  Future<void> test_methodInvocation_twoCharactersOperator() async {
-    await resolveTestUnit('''
-class A {
-  void foo() {
-    this?.foo();
-  }
-}
-''');
-    await assertHasFix('''
-class A {
-  void foo() {
-    foo();
-  }
-}
-''');
-  }
-
   Future<void> test_propertyAccess_oneCharacterOperator() async {
     await resolveTestUnit('''
 class A {
@@ -90,23 +73,4 @@
 }
 ''');
   }
-
-  Future<void> test_propertyAccess_twoCharactersOperator() async {
-    await resolveTestUnit('''
-class A {
-  int x;
-  void foo() {
-    this?.x = 2;
-  }
-}
-''');
-    await assertHasFix('''
-class A {
-  int x;
-  void foo() {
-    x = 2;
-  }
-}
-''');
-  }
 }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unused_parameter_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_parameter_test.dart
index 30937b9..3d8e7ef 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_unused_parameter_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_parameter_test.dart
@@ -53,6 +53,19 @@
 ''');
   }
 
+  Future<void> test_first_required_second_optionalInvalid() async {
+    await resolveTestUnit('''
+class C {
+  C(int a, int b = 1,);
+}
+''');
+    await assertHasFix('''
+class C {
+  C(int b = 1,);
+}
+''', errorFilter: (e) => e.offset == 14);
+  }
+
   Future<void> test_first_requiredPositional_second_optionalNamed() async {
     await resolveTestUnit('''
 class C {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_boolean_with_bool_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_boolean_with_bool_test.dart
index d3e3acc..a9ad68a 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/replace_boolean_with_bool_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_boolean_with_bool_test.dart
@@ -27,7 +27,7 @@
   boolean w;
 }
 ''');
-    await assertHasFixAllFix(StaticWarningCode.UNDEFINED_CLASS_BOOLEAN, '''
+    await assertHasFixAllFix(CompileTimeErrorCode.UNDEFINED_CLASS_BOOLEAN, '''
 main() {
   bool v;
   bool w;
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_cascade_with_dot_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_cascade_with_dot_test.dart
new file mode 100644
index 0000000..907e168
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_cascade_with_dot_test.dart
@@ -0,0 +1,197 @@
+// 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/src/dart/analysis/experiments.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(ReplaceCascadeWithDotTest);
+    defineReflectiveTests(ReplaceCascadeWithDotWithNullSafetyTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceCascadeWithDotTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_CASCADE_WITH_DOT;
+
+  @override
+  String get lintCode =>
+      LintNames.avoid_single_cascade_in_expression_statements;
+
+  Future<void> test_assignment_index_normalCascade() async {
+    await resolveTestUnit('''
+void f(List<int> l) {
+  l..[0] = 0;
+}
+''');
+    await assertHasFix('''
+void f(List<int> l) {
+  l[0] = 0;
+}
+''');
+  }
+
+  Future<void> test_assignment_index_propertyAccess_normalCascade() async {
+    await resolveTestUnit('''
+class A {
+  void foo() {
+    0..bar[1] = 2;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  void foo() {
+    0.bar[1] = 2;
+  }
+}
+''',
+        errorFilter: (e) =>
+            e.errorCode.name ==
+            LintNames.avoid_single_cascade_in_expression_statements);
+  }
+
+  Future<void> test_assignment_property_normalCascade() async {
+    await resolveTestUnit('''
+void f(C c) {
+  c..s = 0;
+}
+class C {
+  set s(int i) {}
+}
+''');
+    await assertHasFix('''
+void f(C c) {
+  c.s = 0;
+}
+class C {
+  set s(int i) {}
+}
+''');
+  }
+
+  Future<void> test_getter_normalCascade() async {
+    await resolveTestUnit('''
+void f(String s) {
+  s..length;
+}
+''');
+    await assertHasFix('''
+void f(String s) {
+  s.length;
+}
+''');
+  }
+
+  Future<void> test_index_normalCascade() async {
+    await resolveTestUnit('''
+void f(String s) {
+  s..[0];
+}
+''');
+    await assertHasFix('''
+void f(String s) {
+  s[0];
+}
+''');
+  }
+
+  Future<void> test_method_normalCascade() async {
+    await resolveTestUnit('''
+void f(String s) {
+  s..substring(0, 3);
+}
+''');
+    await assertHasFix('''
+void f(String s) {
+  s.substring(0, 3);
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ReplaceCascadeWithDotWithNullSafetyTest
+    extends ReplaceCascadeWithDotTest {
+  @override
+  List<String> get experiments => [EnableString.non_nullable];
+
+  Future<void> test_assignment_index_nullAwareCascade() async {
+    await resolveTestUnit('''
+void f(List<int>? l) {
+  l?..[0] = 0;
+}
+''');
+    await assertHasFix('''
+void f(List<int>? l) {
+  l?[0] = 0;
+}
+''');
+  }
+
+  Future<void> test_assignment_property_nullAwareCascade() async {
+    await resolveTestUnit('''
+void f(C? c) {
+  c?..s = 0;
+}
+class C {
+  set s(int i) {}
+}
+''');
+    await assertHasFix('''
+void f(C? c) {
+  c?.s = 0;
+}
+class C {
+  set s(int i) {}
+}
+''');
+  }
+
+  Future<void> test_getter_nullAwareCascade() async {
+    await resolveTestUnit('''
+void f(String? s) {
+  s?..length;
+}
+''');
+    await assertHasFix('''
+void f(String? s) {
+  s?.length;
+}
+''');
+  }
+
+  Future<void> test_index_nullAwareCascade() async {
+    await resolveTestUnit('''
+void f(String? s) {
+  s?..[0];
+}
+''');
+    await assertHasFix('''
+void f(String? s) {
+  s?[0];
+}
+''');
+  }
+
+  Future<void> test_method_nullAwareCascade() async {
+    await resolveTestUnit('''
+void f(String? s) {
+  s?..substring(0, 3);
+}
+''');
+    await assertHasFix('''
+void f(String? s) {
+  s?.substring(0, 3);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_return_type_future_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_return_type_future_test.dart
index aa333d5..e40a0b2 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/replace_return_type_future_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_return_type_future_test.dart
@@ -29,7 +29,7 @@
 import 'dart:async';
 var v;Future<int> main() async => 0;
 ''', errorFilter: (error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+      return error.errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE;
     });
   }
 
@@ -53,7 +53,7 @@
 Future<List<int>> main() async {
 }
 ''', errorFilter: (error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+      return error.errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE;
     });
   }
 
@@ -69,7 +69,7 @@
 Future<List<int>> main() async {
 }
 ''', errorFilter: (error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+      return error.errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE;
     });
   }
 
@@ -84,7 +84,7 @@
 al.Future<int> main() async {
 }
 ''', errorFilter: (error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+      return error.errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE;
     });
   }
 
@@ -97,7 +97,7 @@
 import 'dart:async';
 Future<int> main() async => 0;
 ''', errorFilter: (error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+      return error.errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE;
     });
   }
 
@@ -111,7 +111,7 @@
 
 Future<int> main() async => 0;
 ''', errorFilter: (error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+      return error.errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE;
     });
   }
 
@@ -128,7 +128,7 @@
 Future<int> main() async {
 }
 ''', errorFilter: (error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+      return error.errorCode == CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE;
     });
   }
 
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_not_null_aware_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_not_null_aware_test.dart
new file mode 100644
index 0000000..64b71ef
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_not_null_aware_test.dart
@@ -0,0 +1,153 @@
+// 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:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithNotNullAwareTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithNotNullAwareTest extends FixProcessorTest {
+  @override
+  List<String> get experiments => ['non-nullable'];
+
+  @override
+  FixKind get kind => DartFixKind.REPLACE_WITH_NOT_NULL_AWARE;
+
+  Future<void> test_getter_cascade() async {
+    await resolveTestUnit('''
+void f(String s) {
+  s?..length;
+}
+''');
+    await assertHasFix('''
+void f(String s) {
+  s..length;
+}
+''');
+  }
+
+  Future<void> test_getter_simple() async {
+    await resolveTestUnit('''
+void f(String s) {
+  s?.length;
+}
+''');
+    await assertHasFix('''
+void f(String s) {
+  s.length;
+}
+''');
+  }
+
+  Future<void> test_index_cascade() async {
+    await resolveTestUnit('''
+void f(List<int> x) {
+  x?..[0];
+}
+''');
+    await assertHasFix('''
+void f(List<int> x) {
+  x..[0];
+}
+''');
+  }
+
+  Future<void> test_index_simple() async {
+    await resolveTestUnit('''
+void f(List<int> x) {
+  x?[0];
+}
+''');
+    await assertHasFix('''
+void f(List<int> x) {
+  x[0];
+}
+''');
+  }
+
+  Future<void> test_method_cascade() async {
+    await resolveTestUnit('''
+void f(String s) {
+  s?..indexOf('a');
+}
+''');
+    await assertHasFix('''
+void f(String s) {
+  s..indexOf('a');
+}
+''');
+  }
+
+  Future<void> test_method_simple() async {
+    await resolveTestUnit('''
+void f(String s) {
+  s?.indexOf('a');
+}
+''');
+    await assertHasFix('''
+void f(String s) {
+  s.indexOf('a');
+}
+''');
+  }
+
+  Future<void> test_setter_cascade() async {
+    await resolveTestUnit('''
+void f(C c) {
+  c?..s = 0;
+}
+class C {
+  set s(int x) {}
+}
+''');
+    await assertHasFix('''
+void f(C c) {
+  c..s = 0;
+}
+class C {
+  set s(int x) {}
+}
+''');
+  }
+
+  Future<void> test_setter_simple() async {
+    await resolveTestUnit('''
+void f(C c) {
+  c?.s = 0;
+}
+class C {
+  set s(int x) {}
+}
+''');
+    await assertHasFix('''
+void f(C c) {
+  c.s = 0;
+}
+class C {
+  set s(int x) {}
+}
+''');
+  }
+
+  Future<void> test_spread() async {
+    await resolveTestUnit('''
+void f(List<int> x) {
+  [...?x];
+}
+''');
+    await assertHasFix('''
+void f(List<int> x) {
+  [...x];
+}
+''');
+  }
+}
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 6e53e11..64dde02 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
@@ -23,6 +23,7 @@
 import 'add_missing_required_argument_test.dart'
     as add_missing_required_argument;
 import 'add_ne_null_test.dart' as add_ne_null;
+import 'add_null_check_test.dart' as add_null_check;
 import 'add_override_test.dart' as add_override;
 import 'add_required_test.dart' as add_required;
 import 'add_return_type_test.dart' as add_return_type;
@@ -31,6 +32,7 @@
     as add_super_constructor_invocation;
 import 'add_type_annotation_test.dart' as add_type_annotation;
 import 'analysis_options/test_all.dart' as analysis_options;
+import 'bulk/test_all.dart' as bulk;
 import 'change_argument_name_test.dart' as change_argument_name;
 import 'change_to_nearest_precise_value_test.dart'
     as change_to_nearest_precise_value;
@@ -76,6 +78,7 @@
 import 'create_mixin_test.dart' as create_mixin;
 import 'create_no_such_method_test.dart' as create_no_such_method;
 import 'create_setter_test.dart' as create_setter;
+import 'data_driven/test_all.dart' as data_driven;
 import 'extend_class_for_mixin_test.dart' as extend_class_for_mixin;
 import 'fix_test.dart' as fix;
 import 'import_async_test.dart' as import_async;
@@ -89,6 +92,7 @@
 import 'make_class_abstract_test.dart' as make_class_abstract;
 import 'make_field_not_final_test.dart' as make_field_not_final;
 import 'make_final_test.dart' as make_final;
+import 'make_return_type_nullable_test.dart' as make_return_type_nullable;
 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;
@@ -131,6 +135,7 @@
 import 'remove_unused_parameter_test.dart' as remove_unused_parameter;
 import 'rename_to_camel_case_test.dart' as rename_to_camel_case;
 import 'replace_boolean_with_bool_test.dart' as replace_boolean_with_bool;
+import 'replace_cascade_with_dot_test.dart' as replace_cascade_with_dot;
 import 'replace_colon_with_equals_test.dart' as replace_colon_with_equals;
 import 'replace_final_with_const_test.dart' as replace_final_with_const;
 import 'replace_new_with_const_test.dart' as replace_new_with_const;
@@ -147,6 +152,7 @@
 import 'replace_with_interpolation_test.dart' as replace_with_interpolation;
 import 'replace_with_is_empty_test.dart' as replace_with_is_empty;
 import 'replace_with_is_not_empty_test.dart' as replace_with_is_not_empty;
+import 'replace_with_not_null_aware_test.dart' as replace_with_not_null_aware;
 import 'replace_with_null_aware_test.dart' as replace_with_null_aware;
 import 'replace_with_tear_off_test.dart' as replace_with_tear_off;
 import 'replace_with_var_test.dart' as replace_with_var;
@@ -178,6 +184,7 @@
     add_missing_parameter_required.main();
     add_missing_required_argument.main();
     add_ne_null.main();
+    add_null_check.main();
     add_override.main();
     add_required.main();
     add_return_type.main();
@@ -185,6 +192,7 @@
     add_super_constructor_invocation.main();
     add_type_annotation.main();
     analysis_options.main();
+    bulk.main();
     change_argument_name.main();
     change_to.main();
     change_to_nearest_precise_value.main();
@@ -225,6 +233,7 @@
     create_mixin.main();
     create_no_such_method.main();
     create_setter.main();
+    data_driven.main();
     extend_class_for_mixin.main();
     fix.main();
     import_async.main();
@@ -238,6 +247,7 @@
     make_class_abstract.main();
     make_field_not_final.main();
     make_final.main();
+    make_return_type_nullable.main();
     make_variable_not_final.main();
     move_type_arguments_to_class.main();
     organize_imports.main();
@@ -277,6 +287,7 @@
     remove_unused_parameter.main();
     rename_to_camel_case.main();
     replace_boolean_with_bool.main();
+    replace_cascade_with_dot.main();
     replace_colon_with_equals.main();
     replace_final_with_const.main();
     replace_new_with_const.main();
@@ -292,6 +303,7 @@
     replace_with_interpolation.main();
     replace_with_is_empty.main();
     replace_with_is_not_empty.main();
+    replace_with_not_null_aware.main();
     replace_with_null_aware.main();
     replace_with_tear_off.main();
     replace_with_var.main();
diff --git a/pkg/analysis_server/test/src/services/flutter/widget_description.dart b/pkg/analysis_server/test/src/services/flutter/widget_description.dart
index 8cda4ec..da82d9c 100644
--- a/pkg/analysis_server/test/src/services/flutter/widget_description.dart
+++ b/pkg/analysis_server/test/src/services/flutter/widget_description.dart
@@ -7,7 +7,6 @@
 import 'package:analysis_server/protocol/protocol_generated.dart' as protocol;
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/services/flutter/widget_descriptions.dart';
-import 'package:analysis_server/src/utilities/flutter.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -15,7 +14,6 @@
 
 @reflectiveTest
 class WidgetDescriptionBase extends AbstractSingleUnitTest {
-  final flutter = Flutter.mobile;
   final descriptions = WidgetDescriptions();
 
   void assertExpectedChange(SetPropertyValueResult result, String expected) {
diff --git a/pkg/analysis_server/test/src/utilities/flutter_test.dart b/pkg/analysis_server/test/src/utilities/flutter_test.dart
index 4e52eff..b7d9636 100644
--- a/pkg/analysis_server/test/src/utilities/flutter_test.dart
+++ b/pkg/analysis_server/test/src/utilities/flutter_test.dart
@@ -17,7 +17,7 @@
 
 @reflectiveTest
 class FlutterTest extends AbstractSingleUnitTest {
-  final flutter = Flutter.mobile;
+  Flutter get _flutter => Flutter.instance;
 
   @override
   void setUp() {
@@ -31,7 +31,7 @@
 var w = const Icon(Icons.book);
 ''');
     var w = _getTopVariableCreation('w');
-    expect(flutter.getWidgetPresentationText(w), 'Icon(Icons.book)');
+    expect(_flutter.getWidgetPresentationText(w), 'Icon(Icons.book)');
   }
 
   Future<void> test_getWidgetPresentationText_icon_withoutArguments() async {
@@ -41,7 +41,7 @@
 var w = const Icon();
 ''');
     var w = _getTopVariableCreation('w');
-    expect(flutter.getWidgetPresentationText(w), 'Icon');
+    expect(_flutter.getWidgetPresentationText(w), 'Icon');
   }
 
   Future<void> test_getWidgetPresentationText_notWidget() async {
@@ -50,7 +50,7 @@
 var w = new Object();
 ''');
     var w = _getTopVariableCreation('w');
-    expect(flutter.getWidgetPresentationText(w), isNull);
+    expect(_flutter.getWidgetPresentationText(w), isNull);
   }
 
   Future<void> test_getWidgetPresentationText_text() async {
@@ -59,7 +59,7 @@
 var w = const Text('foo');
 ''');
     var w = _getTopVariableCreation('w');
-    expect(flutter.getWidgetPresentationText(w), "Text('foo')");
+    expect(_flutter.getWidgetPresentationText(w), "Text('foo')");
   }
 
   Future<void> test_getWidgetPresentationText_text_longText() async {
@@ -69,7 +69,7 @@
 ''');
     var w = _getTopVariableCreation('w');
     expect(
-      flutter.getWidgetPresentationText(w),
+      _flutter.getWidgetPresentationText(w),
       "Text('abcabcabcabcab...cabcabcabcabc')",
     );
   }
@@ -81,7 +81,7 @@
 var w = const Text();
 ''');
     var w = _getTopVariableCreation('w');
-    expect(flutter.getWidgetPresentationText(w), 'Text');
+    expect(_flutter.getWidgetPresentationText(w), 'Text');
   }
 
   Future<void> test_getWidgetPresentationText_unresolved() async {
@@ -91,7 +91,7 @@
 var w = new Foo();
 ''');
     var w = _getTopVariableCreation('w');
-    expect(flutter.getWidgetPresentationText(w), isNull);
+    expect(_flutter.getWidgetPresentationText(w), isNull);
   }
 
   Future<void> test_identifyWidgetExpression_node_instanceCreation() async {
@@ -120,12 +120,12 @@
       var constructorName = creation.constructorName;
       var typeName = constructorName.type;
       var argumentList = creation.argumentList;
-      expect(flutter.identifyWidgetExpression(creation), creation);
-      expect(flutter.identifyWidgetExpression(constructorName), creation);
-      expect(flutter.identifyWidgetExpression(typeName), creation);
-      expect(flutter.identifyWidgetExpression(argumentList), isNull);
+      expect(_flutter.identifyWidgetExpression(creation), creation);
+      expect(_flutter.identifyWidgetExpression(constructorName), creation);
+      expect(_flutter.identifyWidgetExpression(typeName), creation);
+      expect(_flutter.identifyWidgetExpression(argumentList), isNull);
       expect(
-        flutter.identifyWidgetExpression(argumentList.arguments[0]),
+        _flutter.identifyWidgetExpression(argumentList.arguments[0]),
         isNull,
       );
     }
@@ -137,14 +137,14 @@
       var constructorName = creation.constructorName;
       var typeName = constructorName.type;
       var argumentList = creation.argumentList;
-      expect(flutter.identifyWidgetExpression(creation), creation);
-      expect(flutter.identifyWidgetExpression(constructorName), creation);
-      expect(flutter.identifyWidgetExpression(typeName), creation);
-      expect(flutter.identifyWidgetExpression(typeName.name), creation);
-      expect(flutter.identifyWidgetExpression(constructorName.name), creation);
-      expect(flutter.identifyWidgetExpression(argumentList), isNull);
+      expect(_flutter.identifyWidgetExpression(creation), creation);
+      expect(_flutter.identifyWidgetExpression(constructorName), creation);
+      expect(_flutter.identifyWidgetExpression(typeName), creation);
+      expect(_flutter.identifyWidgetExpression(typeName.name), creation);
+      expect(_flutter.identifyWidgetExpression(constructorName.name), creation);
+      expect(_flutter.identifyWidgetExpression(argumentList), isNull);
       expect(
-        flutter.identifyWidgetExpression(argumentList.arguments[0]),
+        _flutter.identifyWidgetExpression(argumentList.arguments[0]),
         isNull,
       );
     }
@@ -165,19 +165,19 @@
     {
       MethodInvocation invocation = findNodeAtString(
           'createEmptyText();', (node) => node is MethodInvocation);
-      expect(flutter.identifyWidgetExpression(invocation), invocation);
+      expect(_flutter.identifyWidgetExpression(invocation), invocation);
       var argumentList = invocation.argumentList;
-      expect(flutter.identifyWidgetExpression(argumentList), isNull);
+      expect(_flutter.identifyWidgetExpression(argumentList), isNull);
     }
 
     {
       MethodInvocation invocation = findNodeAtString(
           "createText('xyz');", (node) => node is MethodInvocation);
-      expect(flutter.identifyWidgetExpression(invocation), invocation);
+      expect(_flutter.identifyWidgetExpression(invocation), invocation);
       var argumentList = invocation.argumentList;
-      expect(flutter.identifyWidgetExpression(argumentList), isNull);
+      expect(_flutter.identifyWidgetExpression(argumentList), isNull);
       expect(
-        flutter.identifyWidgetExpression(argumentList.arguments[0]),
+        _flutter.identifyWidgetExpression(argumentList.arguments[0]),
         isNull,
       );
     }
@@ -194,7 +194,7 @@
 Text createEmptyText() => new Text('');
 ''');
     Expression childExpression = findNodeAtString('child: ');
-    expect(flutter.identifyWidgetExpression(childExpression), isNull);
+    expect(_flutter.identifyWidgetExpression(childExpression), isNull);
   }
 
   Future<void>
@@ -211,7 +211,7 @@
 }
 ''');
     SimpleIdentifier bar = findNodeAtString('bar; // ref');
-    expect(flutter.identifyWidgetExpression(bar), bar.parent);
+    expect(_flutter.identifyWidgetExpression(bar), bar.parent);
   }
 
   Future<void>
@@ -228,7 +228,7 @@
 }
 ''');
     SimpleIdentifier foo = findNodeAtString('foo.bar');
-    expect(flutter.identifyWidgetExpression(foo), foo.parent);
+    expect(_flutter.identifyWidgetExpression(foo), foo.parent);
   }
 
   Future<void> test_identifyWidgetExpression_node_simpleIdentifier() async {
@@ -240,7 +240,7 @@
 }
 ''');
     Expression expression = findNodeAtString('widget; // ref');
-    expect(flutter.identifyWidgetExpression(expression), expression);
+    expect(_flutter.identifyWidgetExpression(expression), expression);
   }
 
   Future<void> test_identifyWidgetExpression_null() async {
@@ -254,15 +254,15 @@
 
 Text createEmptyText() => new Text('');
 ''');
-    expect(flutter.identifyWidgetExpression(null), isNull);
+    expect(_flutter.identifyWidgetExpression(null), isNull);
     {
       Expression expression = findNodeAtString('42;');
-      expect(flutter.identifyWidgetExpression(expression), isNull);
+      expect(_flutter.identifyWidgetExpression(expression), isNull);
     }
 
     {
       Expression expression = findNodeAtString('intVariable;');
-      expect(flutter.identifyWidgetExpression(expression), isNull);
+      expect(_flutter.identifyWidgetExpression(expression), isNull);
     }
   }
 
@@ -278,7 +278,7 @@
 void useWidget(Widget w) {}
 ''');
     Expression expression = findNodeAtString('text); // ref');
-    expect(flutter.identifyWidgetExpression(expression), expression);
+    expect(_flutter.identifyWidgetExpression(expression), expression);
   }
 
   Future<void>
@@ -296,19 +296,19 @@
     // Assignment itself.
     {
       var expression = findNode.simple('text =');
-      expect(flutter.identifyWidgetExpression(expression), isNull);
+      expect(_flutter.identifyWidgetExpression(expression), isNull);
     }
 
     // Left hand side.
     {
       var expression = findNode.assignment('text =');
-      expect(flutter.identifyWidgetExpression(expression), isNull);
+      expect(_flutter.identifyWidgetExpression(expression), isNull);
     }
 
     // Right hand side.
     {
       var expression = findNode.instanceCreation('Text(');
-      expect(flutter.identifyWidgetExpression(expression), expression);
+      expect(_flutter.identifyWidgetExpression(expression), expression);
     }
   }
 
@@ -322,10 +322,10 @@
 }
 ''');
     Expression thenWidget = findNodeAtString('w1 :');
-    expect(flutter.identifyWidgetExpression(thenWidget), thenWidget);
+    expect(_flutter.identifyWidgetExpression(thenWidget), thenWidget);
 
     Expression elseWidget = findNodeAtString('w2;');
-    expect(flutter.identifyWidgetExpression(elseWidget), elseWidget);
+    expect(_flutter.identifyWidgetExpression(elseWidget), elseWidget);
   }
 
   Future<void>
@@ -336,7 +336,7 @@
 main(Widget widget) => widget; // ref
 ''');
     Expression expression = findNodeAtString('widget; // ref');
-    expect(flutter.identifyWidgetExpression(expression), expression);
+    expect(_flutter.identifyWidgetExpression(expression), expression);
   }
 
   Future<void>
@@ -349,7 +349,7 @@
 }
 ''');
     Expression expression = findNodeAtString('widget; // ref');
-    expect(flutter.identifyWidgetExpression(expression), expression);
+    expect(_flutter.identifyWidgetExpression(expression), expression);
   }
 
   Future<void> test_identifyWidgetExpression_parent_forElement() async {
@@ -365,7 +365,7 @@
 void useWidget(Widget w) {}
 ''');
     var expression = findNode.instanceCreation('Container()');
-    expect(flutter.identifyWidgetExpression(expression), expression);
+    expect(_flutter.identifyWidgetExpression(expression), expression);
   }
 
   Future<void> test_identifyWidgetExpression_parent_ifElement() async {
@@ -384,10 +384,10 @@
 void useWidget(Widget w) {}
 ''');
     var thenExpression = findNode.instanceCreation("Text('then')");
-    expect(flutter.identifyWidgetExpression(thenExpression), thenExpression);
+    expect(_flutter.identifyWidgetExpression(thenExpression), thenExpression);
 
     var elseExpression = findNode.instanceCreation("Text('else')");
-    expect(flutter.identifyWidgetExpression(elseExpression), elseExpression);
+    expect(_flutter.identifyWidgetExpression(elseExpression), elseExpression);
   }
 
   Future<void> test_identifyWidgetExpression_parent_listLiteral() async {
@@ -399,7 +399,7 @@
 }
 ''');
     Expression expression = findNodeAtString('widget]; // ref');
-    expect(flutter.identifyWidgetExpression(expression), expression);
+    expect(_flutter.identifyWidgetExpression(expression), expression);
   }
 
   Future<void> test_identifyWidgetExpression_parent_namedExpression() async {
@@ -414,7 +414,7 @@
 void useWidget({Widget child}) {}
 ''');
     Expression expression = findNodeAtString('text); // ref');
-    expect(flutter.identifyWidgetExpression(expression), expression);
+    expect(_flutter.identifyWidgetExpression(expression), expression);
   }
 
   Future<void> test_identifyWidgetExpression_parent_returnStatement() async {
@@ -426,7 +426,7 @@
 }
 ''');
     Expression expression = findNodeAtString('widget; // ref');
-    expect(flutter.identifyWidgetExpression(expression), expression);
+    expect(_flutter.identifyWidgetExpression(expression), expression);
   }
 
   Future<void> test_isWidget() async {
@@ -440,19 +440,19 @@
 class NotWidget extends State {}
 ''');
     var myStatelessWidget = testUnitElement.getType('MyStatelessWidget');
-    expect(flutter.isWidget(myStatelessWidget), isTrue);
+    expect(_flutter.isWidget(myStatelessWidget), isTrue);
 
     var myStatefulWidget = testUnitElement.getType('MyStatefulWidget');
-    expect(flutter.isWidget(myStatefulWidget), isTrue);
+    expect(_flutter.isWidget(myStatefulWidget), isTrue);
 
     var myContainer = testUnitElement.getType('MyContainer');
-    expect(flutter.isWidget(myContainer), isTrue);
+    expect(_flutter.isWidget(myContainer), isTrue);
 
     var notFlutter = testUnitElement.getType('NotFlutter');
-    expect(flutter.isWidget(notFlutter), isFalse);
+    expect(_flutter.isWidget(notFlutter), isFalse);
 
     var notWidget = testUnitElement.getType('NotWidget');
-    expect(flutter.isWidget(notWidget), isFalse);
+    expect(_flutter.isWidget(notWidget), isFalse);
   }
 
   Future<void> test_isWidgetCreation() async {
@@ -462,13 +462,13 @@
 var a = new Object();
 var b = new Text('bbb');
 ''');
-    expect(flutter.isWidgetCreation(null), isFalse);
+    expect(_flutter.isWidgetCreation(null), isFalse);
 
     var a = _getTopVariableCreation('a');
-    expect(flutter.isWidgetCreation(a), isFalse);
+    expect(_flutter.isWidgetCreation(a), isFalse);
 
     var b = _getTopVariableCreation('b');
-    expect(flutter.isWidgetCreation(b), isTrue);
+    expect(_flutter.isWidgetCreation(b), isTrue);
   }
 
   Future<void> test_isWidgetExpression() async {
@@ -493,46 +493,46 @@
 ''');
     {
       Expression expression = findNodeAtString('named(); // use');
-      expect(flutter.isWidgetExpression(expression), isFalse);
+      expect(_flutter.isWidgetExpression(expression), isFalse);
       var creation = expression.parent.parent as InstanceCreationExpression;
-      expect(flutter.isWidgetExpression(creation), isTrue);
+      expect(_flutter.isWidgetExpression(creation), isTrue);
     }
 
     {
       Expression expression = findNodeAtString("new Text('abc')");
-      expect(flutter.isWidgetExpression(expression), isTrue);
+      expect(_flutter.isWidgetExpression(expression), isTrue);
     }
 
     {
       Expression expression = findNodeAtString('text;');
-      expect(flutter.isWidgetExpression(expression), isTrue);
+      expect(_flutter.isWidgetExpression(expression), isTrue);
     }
 
     {
       Expression expression = findNodeAtString(
           'createEmptyText();', (node) => node is MethodInvocation);
-      expect(flutter.isWidgetExpression(expression), isTrue);
+      expect(_flutter.isWidgetExpression(expression), isTrue);
     }
 
     {
       SimpleIdentifier expression = findNodeAtString('Container(');
-      expect(flutter.isWidgetExpression(expression), isFalse);
+      expect(_flutter.isWidgetExpression(expression), isFalse);
     }
 
     {
       NamedExpression expression =
           findNodeAtString('child: ', (n) => n is NamedExpression);
-      expect(flutter.isWidgetExpression(expression), isFalse);
+      expect(_flutter.isWidgetExpression(expression), isFalse);
     }
 
     {
       Expression expression = findNodeAtString('42;');
-      expect(flutter.isWidgetExpression(expression), isFalse);
+      expect(_flutter.isWidgetExpression(expression), isFalse);
     }
 
     {
       Expression expression = findNodeAtString('intVariable;');
-      expect(flutter.isWidgetExpression(expression), isFalse);
+      expect(_flutter.isWidgetExpression(expression), isFalse);
     }
   }
 
diff --git a/pkg/analysis_server/test/stress/completion/completion_runner.dart b/pkg/analysis_server/test/stress/completion/completion_runner.dart
index 19a23db..51c2445 100644
--- a/pkg/analysis_server/test/stress/completion/completion_runner.dart
+++ b/pkg/analysis_server/test/stress/completion/completion_runner.dart
@@ -106,7 +106,6 @@
               return await contributor.computeSuggestions(
                 performance,
                 request,
-                enableUriContributor: true,
               );
             },
           );
diff --git a/pkg/analysis_server/test/stress/replay/replay.dart b/pkg/analysis_server/test/stress/replay/replay.dart
index ce02311..f453567 100644
--- a/pkg/analysis_server/test/stress/replay/replay.dart
+++ b/pkg/analysis_server/test/stress/replay/replay.dart
@@ -129,7 +129,6 @@
       server.printStatistics();
     }
     exit(0);
-    return null;
   }
 
   /// Create and return a parser that can be used to parse the command-line
diff --git a/pkg/analysis_server/test/stress/utilities/server.dart b/pkg/analysis_server/test/stress/utilities/server.dart
index 186743f..9bbafb3 100644
--- a/pkg/analysis_server/test/stress/utilities/server.dart
+++ b/pkg/analysis_server/test/stress/utilities/server.dart
@@ -796,8 +796,7 @@
   }
 
   /// Send a command to the server. An 'id' will be automatically assigned.
-  RequestData _send(String method, Map<String, dynamic> params,
-      {void Function(Response) onResponse}) {
+  RequestData _send(String method, Map<String, dynamic> params) {
     var id = '${_nextId++}';
     var requestData = RequestData(id, method, params, currentTime);
     _requestDataMap[id] = requestData;
diff --git a/pkg/analysis_server/test/tool/lsp_spec/generated_classes_test.dart b/pkg/analysis_server/test/tool/lsp_spec/generated_classes_test.dart
index 2ef1bdc..a506de9 100644
--- a/pkg/analysis_server/test/tool/lsp_spec/generated_classes_test.dart
+++ b/pkg/analysis_server/test/tool/lsp_spec/generated_classes_test.dart
@@ -9,18 +9,20 @@
 void main() {
   group('generated classes', () {
     test('can be checked for equality', () {
-      final a = TextDocumentIdentifier('/a');
-      final b = TextDocumentIdentifier('/a');
+      final a = TextDocumentIdentifier(uri: '/a');
+      final b = TextDocumentIdentifier(uri: '/a');
 
       expect(a, equals(b));
       expect(a.hashCode, equals(b.hashCode));
     });
 
     test('with list fields can be checked for equality', () {
-      final a = TextDocumentClientCapabilitiesCodeActionKind(
-          [CodeActionKind.QuickFix]);
-      final b = TextDocumentClientCapabilitiesCodeActionKind(
-          [CodeActionKind.QuickFix]);
+      final a = CodeActionClientCapabilitiesCodeActionKind(
+        valueSet: [CodeActionKind.QuickFix],
+      );
+      final b = CodeActionClientCapabilitiesCodeActionKind(
+        valueSet: [CodeActionKind.QuickFix],
+      );
 
       expect(a, equals(b));
       expect(a.hashCode, equals(b.hashCode));
@@ -28,21 +30,33 @@
 
     test('with aliased list fields can be checked for equality', () {
       final a = TextDocumentRegistrationOptions(
-          [DocumentFilter('dart', 'file', null)]);
+          documentSelector: [DocumentFilter(language: 'dart', scheme: 'file')]);
       final b = TextDocumentRegistrationOptions(
-          [DocumentFilter('dart', 'file', null)]);
+          documentSelector: [DocumentFilter(language: 'dart', scheme: 'file')]);
 
       expect(a, equals(b));
       expect(a.hashCode, equals(b.hashCode));
     });
 
     test('with map fields can be checked for equality', () {
-      final a = WorkspaceEdit({
-        'a': [TextEdit(Range(Position(0, 0), Position(0, 0)), 'a')]
-      }, null);
-      final b = WorkspaceEdit({
-        'a': [TextEdit(Range(Position(0, 0), Position(0, 0)), 'a')]
-      }, null);
+      final a = WorkspaceEdit(changes: {
+        'a': [
+          TextEdit(
+              range: Range(
+                  start: Position(line: 0, character: 0),
+                  end: Position(line: 0, character: 0)),
+              newText: 'a')
+        ]
+      });
+      final b = WorkspaceEdit(changes: {
+        'a': [
+          TextEdit(
+              range: Range(
+                  start: Position(line: 0, character: 0),
+                  end: Position(line: 0, character: 0)),
+              newText: 'a')
+        ]
+      });
 
       expect(a, equals(b));
       expect(a.hashCode, equals(b.hashCode));
@@ -57,10 +71,14 @@
     });
 
     test('with union fields can be checked for equality', () {
-      final a =
-          SignatureInformation('a', Either2<String, MarkupContent>.t1('a'), []);
-      final b =
-          SignatureInformation('a', Either2<String, MarkupContent>.t1('a'), []);
+      final a = SignatureInformation(
+          label: 'a',
+          documentation: Either2<String, MarkupContent>.t1('a'),
+          parameters: []);
+      final b = SignatureInformation(
+          label: 'a',
+          documentation: Either2<String, MarkupContent>.t1('a'),
+          parameters: []);
 
       expect(a, equals(b));
       expect(a.hashCode, equals(b.hashCode));
@@ -68,9 +86,10 @@
 
     test('consider subclasses when checking for equality', () {
       final a = TextDocumentRegistrationOptions(
-          [DocumentFilter('dart', 'file', null)]);
+          documentSelector: [DocumentFilter(language: 'dart', scheme: 'file')]);
       final b = TextDocumentSaveRegistrationOptions(
-          true, [DocumentFilter('dart', 'file', null)]);
+          includeText: true,
+          documentSelector: [DocumentFilter(language: 'dart', scheme: 'file')]);
 
       expect(a, isNot(equals(b)));
       expect(b, isNot(equals(a)));
diff --git a/pkg/analysis_server/test/tool/lsp_spec/json_test.dart b/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
index 878f36d..da31eff 100644
--- a/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
+++ b/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
@@ -20,15 +20,17 @@
 
     test('returns correct output for union types', () {
       final message = RequestMessage(
-          Either2<num, String>.t1(1), Method.shutdown, null, 'test');
+          id: Either2<num, String>.t1(1),
+          method: Method.shutdown,
+          jsonrpc: 'test');
       final output = json.encode(message.toJson());
       expect(output, equals('{"id":1,"method":"shutdown","jsonrpc":"test"}'));
     });
 
     test('returns correct output for union types containing interface types',
         () {
-      final params = Either2<String, TextDocumentItem>.t2(
-          TextDocumentItem('!uri', '!language', 1, '!text'));
+      final params = Either2<String, TextDocumentItem>.t2(TextDocumentItem(
+          uri: '!uri', languageId: '!language', version: 1, text: '!text'));
       final output = json.encode(params);
       expect(
           output,
@@ -37,17 +39,19 @@
     });
 
     test('returns correct output for types with lists', () {
-      final start = Position(1, 1);
-      final end = Position(2, 2);
-      final range = Range(start, end);
-      final location = Location('y-uri', range);
+      final start = Position(line: 1, character: 1);
+      final end = Position(line: 2, character: 2);
+      final range = Range(start: start, end: end);
+      final location = Location(uri: 'y-uri', range: range);
       final codeAction = Diagnostic(
-        range,
-        DiagnosticSeverity.Error,
-        'test_err',
-        '/tmp/source.dart',
-        'err!!',
-        [DiagnosticRelatedInformation(location, 'message')],
+        range: range,
+        severity: DiagnosticSeverity.Error,
+        code: 'test_err',
+        source: '/tmp/source.dart',
+        message: 'err!!',
+        relatedInformation: [
+          DiagnosticRelatedInformation(location: location, message: 'message')
+        ],
       );
       final output = json.encode(codeAction.toJson());
       final expected = '''{
@@ -77,7 +81,12 @@
     });
 
     test('serialises enums to their underlying values', () {
-      final foldingRange = FoldingRange(1, 2, 3, 4, FoldingRangeKind.Comment);
+      final foldingRange = FoldingRange(
+          startLine: 1,
+          startCharacter: 2,
+          endLine: 3,
+          endCharacter: 4,
+          kind: FoldingRangeKind.Comment);
       final output = json.encode(foldingRange.toJson());
       final expected = '''{
         "startLine":1,
@@ -93,7 +102,8 @@
     test('ResponseMessage does not include an error with a result', () {
       final id = Either2<num, String>.t1(1);
       final result = 'my result';
-      final resp = ResponseMessage(id, result, null, jsonRpcVersion);
+      final resp =
+          ResponseMessage(id: id, result: result, jsonrpc: jsonRpcVersion);
       final jsonMap = resp.toJson();
       expect(jsonMap, contains('result'));
       expect(jsonMap, isNot(contains('error')));
@@ -236,7 +246,7 @@
 
     test('ResponseMessage can include a null result', () {
       final id = Either2<num, String>.t1(1);
-      final resp = ResponseMessage(id, null, null, jsonRpcVersion);
+      final resp = ResponseMessage(id: id, jsonrpc: jsonRpcVersion);
       final jsonMap = resp.toJson();
       expect(jsonMap, contains('result'));
       expect(jsonMap, isNot(contains('error')));
@@ -244,8 +254,10 @@
 
     test('ResponseMessage does not include a result for an error', () {
       final id = Either2<num, String>.t1(1);
-      final error = ResponseError<String>(ErrorCodes.ParseError, 'Error', null);
-      final resp = ResponseMessage(id, null, error, jsonRpcVersion);
+      final error =
+          ResponseError(code: ErrorCodes.ParseError, message: 'Error');
+      final resp =
+          ResponseMessage(id: id, error: error, jsonrpc: jsonRpcVersion);
       final jsonMap = resp.toJson();
       expect(jsonMap, contains('error'));
       expect(jsonMap, isNot(contains('result')));
@@ -254,8 +266,10 @@
     test('ResponseMessage throws if both result and error are non-null', () {
       final id = Either2<num, String>.t1(1);
       final result = 'my result';
-      final error = ResponseError<String>(ErrorCodes.ParseError, 'Error', null);
-      final resp = ResponseMessage(id, result, error, jsonRpcVersion);
+      final error =
+          ResponseError(code: ErrorCodes.ParseError, message: 'Error');
+      final resp = ResponseMessage(
+          id: id, result: result, error: error, jsonrpc: jsonRpcVersion);
       expect(resp.toJson, throwsA(TypeMatcher<String>()));
     });
   });
@@ -295,8 +309,9 @@
       // Create some JSON that includes a VersionedTextDocumentIdenfitier but
       // where the class definition only references a TextDocumentIdemntifier.
       final input = jsonEncode(TextDocumentPositionParams(
-        VersionedTextDocumentIdentifier(111, 'file:///foo/bar.dart'),
-        Position(1, 1),
+        textDocument: VersionedTextDocumentIdentifier(
+            version: 111, uri: 'file:///foo/bar.dart'),
+        position: Position(line: 1, character: 1),
       ).toJson());
       final params = TextDocumentPositionParams.fromJson(jsonDecode(input));
       expect(params.textDocument,
@@ -315,11 +330,18 @@
   });
 
   test('objects with lists can round-trip through to json and back', () {
-    final obj = InitializeParams(1, '!root', null, null,
-        ClientCapabilities(null, null, null), '!trace', [
-      WorkspaceFolder('!uri1', '!name1'),
-      WorkspaceFolder('!uri2', '!name2'),
-    ]);
+    final obj = InitializeParams(
+      processId: 1,
+      clientInfo:
+          InitializeParamsClientInfo(name: 'server name', version: '1.2.3'),
+      rootPath: '!root',
+      capabilities: ClientCapabilities(),
+      trace: '!trace',
+      workspaceFolders: [
+        WorkspaceFolder(uri: '!uri1', name: '!name1'),
+        WorkspaceFolder(uri: '!uri2', name: '!name2'),
+      ],
+    );
     final json = jsonEncode(obj);
     final restoredObj = InitializeParams.fromJson(jsonDecode(json));
 
@@ -334,7 +356,12 @@
   });
 
   test('objects with enums can round-trip through to json and back', () {
-    final obj = FoldingRange(1, 2, 3, 4, FoldingRangeKind.Comment);
+    final obj = FoldingRange(
+        startLine: 1,
+        startCharacter: 2,
+        endLine: 3,
+        endCharacter: 4,
+        kind: FoldingRangeKind.Comment);
     final json = jsonEncode(obj);
     final restoredObj = FoldingRange.fromJson(jsonDecode(json));
 
@@ -346,13 +373,13 @@
   });
 
   test('objects with maps can round-trip through to json and back', () {
-    final start = Position(1, 1);
-    final end = Position(2, 2);
-    final range = Range(start, end);
-    final obj = WorkspaceEdit(<String, List<TextEdit>>{
-      'fileA': [TextEdit(range, 'text A')],
-      'fileB': [TextEdit(range, 'text B')]
-    }, null);
+    final start = Position(line: 1, character: 1);
+    final end = Position(line: 2, character: 2);
+    final range = Range(start: start, end: end);
+    final obj = WorkspaceEdit(changes: <String, List<TextEdit>>{
+      'fileA': [TextEdit(range: range, newText: 'text A')],
+      'fileB': [TextEdit(range: range, newText: 'text B')]
+    });
     final json = jsonEncode(obj);
     final restoredObj = WorkspaceEdit.fromJson(jsonDecode(json));
 
diff --git a/pkg/analysis_server/test/tool/lsp_spec/typescript_test.dart b/pkg/analysis_server/test/tool/lsp_spec/typescript_test.dart
index 45a7fc1..843ac88 100644
--- a/pkg/analysis_server/test/tool/lsp_spec/typescript_test.dart
+++ b/pkg/analysis_server/test/tool/lsp_spec/typescript_test.dart
@@ -242,6 +242,39 @@
       expect(typeAlias.baseType, isArrayOf(isSimpleType('DocumentFilter')));
     });
 
+    test('parses a type alias that is a union of unnamed types', () {
+      final input = '''
+export type NameOrLength = { name: string } | { length: number };
+    ''';
+      final output = parseString(input);
+      expect(output, hasLength(3));
+
+      // Results should be the two inline interfaces followed by the type alias.
+
+      expect(output[0], const TypeMatcher<InlineInterface>());
+      final InlineInterface interface1 = output[0];
+      expect(interface1.name, equals('NameOrLength1'));
+      expect(interface1.members, hasLength(1));
+      expect(interface1.members[0].name, equals('name'));
+
+      expect(output[1], const TypeMatcher<InlineInterface>());
+      final InlineInterface interface2 = output[1];
+      expect(interface2.name, equals('NameOrLength2'));
+      expect(interface2.members, hasLength(1));
+      expect(interface2.members[0].name, equals('length'));
+
+      expect(output[2], const TypeMatcher<TypeAlias>());
+      final TypeAlias typeAlias = output[2];
+      expect(typeAlias.name, equals('NameOrLength'));
+      expect(typeAlias.baseType, const TypeMatcher<UnionType>());
+
+      // The type alias should be a union of the two types above.
+      UnionType union = typeAlias.baseType;
+      expect(union.types, hasLength(2));
+      expect(union.types[0], isSimpleType(interface1.name));
+      expect(union.types[1], isSimpleType(interface2.name));
+    });
+
     test('parses a namespace of constants', () {
       final input = '''
 export namespace ResourceOperationKind {
@@ -284,6 +317,24 @@
           equals('Supports deleting existing files and folders.'));
     });
 
+    test('parses an enum using keywords as identifiers', () {
+      final input = '''
+enum Foo {
+  namespace = 'namespace',
+  class = 'class',
+  enum = 'enum',
+}
+    ''';
+      final output = parseString(input);
+      expect(output, hasLength(1));
+      expect(output.first, const TypeMatcher<Namespace>());
+      final enum_ = output.first as Namespace;
+      expect(enum_.members, hasLength(3));
+      expect(enum_.members[0].name, equals('namespace'));
+      expect(enum_.members[1].name, equals('class'));
+      expect(enum_.members[2].name, equals('enum'));
+    });
+
     test('parses a tuple in an array', () {
       final input = '''
 interface SomeInformation {
@@ -321,5 +372,18 @@
       expect(field.name, equals('label'));
       expect(field.type, isSimpleType('object'));
     });
+
+    test('parses multiple single-line comments into a single token', () {
+      final input = '''
+// This is line 1
+// This is line 2
+interface SomeInformation {
+}
+    ''';
+      final output = parseString(input);
+      expect(output, hasLength(1));
+      expect(output[0].commentNode.token.lexeme, equals('''// This is line 1
+// This is line 2'''));
+    });
   });
 }
diff --git a/pkg/analysis_server/tool/completion_metrics/code_metrics.dart b/pkg/analysis_server/tool/completion_metrics/code_metrics.dart
index cd29795..d0baded 100644
--- a/pkg/analysis_server/tool/completion_metrics/code_metrics.dart
+++ b/pkg/analysis_server/tool/completion_metrics/code_metrics.dart
@@ -563,6 +563,7 @@
     _visitChildren(node, {
       'documentationComment': node.documentationComment,
       'metadata': node.metadata,
+      'abstractKeyword': node.abstractKeyword,
       'covariantKeyword': node.covariantKeyword,
       'staticKeyword': node.staticKeyword,
       'fields': node.fields,
diff --git a/pkg/analysis_server/tool/completion_metrics/completion_metrics.dart b/pkg/analysis_server/tool/completion_metrics/completion_metrics.dart
index 66b4b1e..3e57965 100644
--- a/pkg/analysis_server/tool/completion_metrics/completion_metrics.dart
+++ b/pkg/analysis_server/tool/completion_metrics/completion_metrics.dart
@@ -95,6 +95,11 @@
 /// A flag that causes additional output to be produced.
 const String VERBOSE = 'verbose';
 
+/// A [Counter] to track the performance of the new relevance to the old
+/// relevance.
+Counter oldVsNewComparison =
+    Counter('use old vs new relevance rank comparison');
+
 /// Create a parser that can be used to parse the command-line arguments.
 ArgParser createArgParser() {
   return ArgParser()
@@ -477,6 +482,12 @@
       printMetrics(metricsOldMode);
     }
     printMetrics(metricsNewMode);
+
+    print('');
+    print('====================');
+    oldVsNewComparison.printCounterValues();
+    print('====================');
+
     if (verbose) {
       printWorstResults(metricsNewMode);
       printSlowestResults(metricsNewMode);
@@ -485,7 +496,7 @@
     return resultCode;
   }
 
-  bool forEachExpectedCompletion(
+  int forEachExpectedCompletion(
       CompletionRequestImpl request,
       MetricsSuggestionListener listener,
       ExpectedCompletion expectedCompletion,
@@ -496,14 +507,14 @@
       bool doPrintMissedCompletions) {
     assert(suggestions != null);
 
-    var successfulCompletion;
+    var rank;
 
     var place = placementInSuggestionList(suggestions, expectedCompletion);
 
     metrics.mrrComputer.addRank(place.rank);
 
     if (place.denominator != 0) {
-      successfulCompletion = true;
+      rank = place.rank;
 
       metrics.completionCounter.count('successful');
 
@@ -518,7 +529,7 @@
       metrics.insertionLengthTheoretical
           .addValue(expectedCompletion.completion.length - charsBeforeTop);
     } else {
-      successfulCompletion = false;
+      rank = -1;
 
       metrics.completionCounter.count('unsuccessful');
 
@@ -544,7 +555,7 @@
         print('');
       }
     }
-    return successfulCompletion;
+    return rank;
   }
 
   void printMetrics(CompletionMetrics metrics) {
@@ -710,11 +721,7 @@
       suggestions = await DartCompletionManager(
         dartdocDirectiveInfo: DartdocDirectiveInfo(),
         listener: listener,
-      ).computeSuggestions(
-        performance,
-        request,
-        enableUriContributor: true,
-      );
+      ).computeSuggestions(performance, request);
     } else {
       // available suggestions == true
       var includedElementKinds = <protocol.ElementKind>{};
@@ -728,11 +735,7 @@
         includedElementNames: includedElementNames,
         includedSuggestionRelevanceTags: includedSuggestionRelevanceTagList,
         listener: listener,
-      ).computeSuggestions(
-        performance,
-        request,
-        enableUriContributor: true,
-      );
+      ).computeSuggestions(performance, request);
 
       computeIncludedSetList(declarationsTracker, request.result,
           includedSuggestionSetList, includedElementNames);
@@ -864,7 +867,7 @@
             // and results are collected with varying settings for
             // comparison:
 
-            Future<bool> handleExpectedCompletion(
+            Future<int> handleExpectedCompletion(
                 {MetricsSuggestionListener listener,
                 @required CompletionMetrics metrics,
                 @required bool printMissedCompletions,
@@ -910,9 +913,9 @@
 
             // First we compute the completions useNewRelevance set to
             // false:
-            var oldRelevanceSucceeded = false;
+            var oldRank;
             if (!skipOldRelevance) {
-              oldRelevanceSucceeded = await handleExpectedCompletion(
+              oldRank = await handleExpectedCompletion(
                   metrics: metricsOldMode,
                   printMissedCompletions: false,
                   useNewRelevance: false);
@@ -920,23 +923,29 @@
 
             // And again here with useNewRelevance set to true:
             var listener = MetricsSuggestionListener();
-            var newRelevanceSucceeded = await handleExpectedCompletion(
+            var newRank = await handleExpectedCompletion(
                 listener: listener,
                 metrics: metricsNewMode,
                 printMissedCompletions: verbose,
                 useNewRelevance: true);
 
-            if (!skipOldRelevance &&
-                verbose &&
-                oldRelevanceSucceeded != newRelevanceSucceeded) {
-              if (newRelevanceSucceeded) {
+            if (!skipOldRelevance && newRank != -1 && oldRank != -1) {
+              if (newRank <= oldRank) {
+                oldVsNewComparison.count('new relevance');
+              } else {
+                oldVsNewComparison.count('old relevance');
+              }
+            }
+
+            if (!skipOldRelevance && verbose) {
+              if (newRank > 0 && oldRank < 0) {
                 print('    ===========');
                 print(
                     '    The `useNewRelevance = true` generated a completion that `useNewRelevance = false` did not:');
                 print('    $expectedCompletion');
                 print('    ===========');
                 print('');
-              } else {
+              } else if (newRank < 0 && oldRank > 0) {
                 print('    ===========');
                 print(
                     '    The `useNewRelevance = false` generated a completion that `useNewRelevance = true` did not:');
diff --git a/pkg/analysis_server/tool/completion_metrics/flutter_metrics.dart b/pkg/analysis_server/tool/completion_metrics/flutter_metrics.dart
new file mode 100644
index 0000000..817a3e8
--- /dev/null
+++ b/pkg/analysis_server/tool/completion_metrics/flutter_metrics.dart
@@ -0,0 +1,309 @@
+// 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' as io;
+
+import 'package:analysis_server/src/utilities/flutter.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/context_root.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/diagnostic/diagnostic.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:args/args.dart';
+
+/// Compute and print information about flutter packages.
+Future<void> main(List<String> args) async {
+  var parser = createArgParser();
+  var result = parser.parse(args);
+
+  if (validArguments(parser, result)) {
+    var out = io.stdout;
+    var rootPath = result.rest[0];
+    out.writeln('Analyzing root: "$rootPath"');
+
+    var computer = FlutterMetricsComputer();
+    var stopwatch = Stopwatch()..start();
+    await computer.compute(rootPath);
+    stopwatch.stop();
+    var duration = Duration(milliseconds: stopwatch.elapsedMilliseconds);
+    out.writeln('');
+    out.writeln('Analysis performed in $duration');
+    computer.writeResults(out);
+    await out.flush();
+  }
+  io.exit(0);
+}
+
+/// Create a parser that can be used to parse the command-line arguments.
+ArgParser createArgParser() {
+  var parser = ArgParser();
+  parser.addOption(
+    'help',
+    abbr: 'h',
+    help: 'Print this help message.',
+  );
+  return parser;
+}
+
+/// Print usage information for this tool.
+void printUsage(ArgParser parser, {String error}) {
+  if (error != null) {
+    print(error);
+    print('');
+  }
+  print('usage: dart flutter_metrics.dart [options] packagePath');
+  print('');
+  print('Compute and print information about flutter packages.');
+  print('');
+  print(parser.usage);
+}
+
+/// Return `true` if the command-line arguments (represented by the [result] and
+/// parsed by the [parser]) are valid.
+bool validArguments(ArgParser parser, ArgResults result) {
+  if (result.wasParsed('help')) {
+    printUsage(parser);
+    return false;
+  } else if (result.rest.length != 1) {
+    printUsage(parser, error: 'No directory path specified.');
+    return false;
+  }
+  var rootPath = result.rest[0];
+  if (!io.Directory(rootPath).existsSync()) {
+    printUsage(parser, error: 'The directory "$rootPath" does not exist.');
+    return false;
+  }
+  return true;
+}
+
+/// An object that records the data as it is being computed.
+class FlutterData {
+  /// The total number of widget creation expressions found.
+  int totalWidgetCount = 0;
+
+  /// A table mapping the name of a widget class to the number of times in
+  /// which an instance of that class is created.
+  Map<String, int> widgetCounts = {};
+
+  /// A table mapping the name of a widget class and the name of the parent
+  /// widget to the number of times the widget was created as a child of the
+  /// parent.
+  Map<String, Map<String, int>> parentData = {};
+
+  /// A table mapping the name of the parent widget and the name of a widget
+  /// class to the number of times the parent had a widget of the given kind.
+  Map<String, Map<String, int>> childData = {};
+
+  /// Initialize a newly created set of data to be empty.
+  FlutterData();
+
+  /// Record that an instance of the [childWidget] was created. If the instance
+  /// creation expression is an argument in another widget constructor
+  /// invocation, then the [parentWidget] is the name of the enclosing class.
+  void recordWidgetCreation(String childWidget, String parentWidget) {
+    totalWidgetCount++;
+    widgetCounts[childWidget] = (widgetCounts[childWidget] ?? 0) + 1;
+
+    if (parentWidget != null) {
+      var parentMap = parentData.putIfAbsent(childWidget, () => {});
+      parentMap[parentWidget] = (parentMap[parentWidget] ?? 0) + 1;
+
+      var childMap = childData.putIfAbsent(parentWidget, () => {});
+      childMap[childWidget] = (childMap[childWidget] ?? 0) + 1;
+    }
+  }
+}
+
+/// An object that visits a compilation unit in order to record the data being
+/// collected.
+class FlutterDataCollector extends RecursiveAstVisitor<void> {
+  /// The data being collected.
+  final FlutterData data;
+
+  /// The object used to determine Flutter-specific features.
+  Flutter flutter;
+
+  /// The name of the most deeply widget class whose constructor invocation we
+  /// are within.
+  String parentWidget;
+
+  /// Initialize a newly created collector to add data points to the given
+  /// [data].
+  FlutterDataCollector(this.data);
+
+  @override
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
+    var previousParentWidget = parentWidget;
+    if (flutter.isWidgetCreation(node)) {
+      var element = node.constructorName.staticElement;
+      if (element == null) {
+        throw StateError(
+            'Unresolved constructor name: ${node.constructorName}');
+      }
+      var childWidget = element.enclosingElement.name;
+      if (!element.librarySource.uri
+          .toString()
+          .startsWith('package:flutter/')) {
+        childWidget = 'user-defined';
+      }
+      data.recordWidgetCreation(childWidget, parentWidget);
+      parentWidget = childWidget;
+    }
+    super.visitInstanceCreationExpression(node);
+    parentWidget = previousParentWidget;
+  }
+}
+
+/// An object used to compute metrics for a single file or directory.
+class FlutterMetricsComputer {
+  /// The resource provider used to access the files being analyzed.
+  final PhysicalResourceProvider resourceProvider =
+      PhysicalResourceProvider.INSTANCE;
+
+  /// The data that was computed.
+  final FlutterData data = FlutterData();
+
+  /// Initialize a newly created metrics computer that can compute the metrics
+  /// in one or more files and directories.
+  FlutterMetricsComputer();
+
+  /// Compute the metrics for the file(s) in the [rootPath].
+  void compute(String rootPath) async {
+    final collection = AnalysisContextCollection(
+      includedPaths: [rootPath],
+      resourceProvider: PhysicalResourceProvider.INSTANCE,
+    );
+    final collector = FlutterDataCollector(data);
+    for (var context in collection.contexts) {
+      await _computeInContext(context.contextRoot, collector);
+    }
+  }
+
+  /// Write a report of the metrics that were computed to the [sink].
+  void writeResults(StringSink sink) {
+    _writeWidgetCounts(sink);
+    _writeChildData(sink);
+    _writeParentData(sink);
+  }
+
+  /// Compute the metrics for the files in the context [root], creating a
+  /// separate context collection to prevent accumulating memory. The metrics
+  /// should be captured in the [collector].
+  Future<void> _computeInContext(
+      ContextRoot root, FlutterDataCollector collector) async {
+    // Create a new collection to avoid consuming large quantities of memory.
+    final collection = AnalysisContextCollection(
+      includedPaths: root.includedPaths.toList(),
+      excludedPaths: root.excludedPaths.toList(),
+      resourceProvider: PhysicalResourceProvider.INSTANCE,
+    );
+    var context = collection.contexts[0];
+    for (var filePath in context.contextRoot.analyzedFiles()) {
+      if (AnalysisEngine.isDartFileName(filePath)) {
+        try {
+          var resolvedUnitResult =
+              await context.currentSession.getResolvedUnit(filePath);
+          //
+          // Check for errors that cause the file to be skipped.
+          //
+          if (resolvedUnitResult == null) {
+            print('');
+            print('File $filePath skipped because of an internal error.');
+            continue;
+          } else if (resolvedUnitResult.state != ResultState.VALID) {
+            print('');
+            print('File $filePath skipped because it could not be analyzed.');
+            continue;
+          } else if (hasError(resolvedUnitResult)) {
+            print('');
+            print('File $filePath skipped due to errors:');
+            for (var error in resolvedUnitResult.errors) {
+              print('  ${error.toString()}');
+            }
+            continue;
+          }
+
+          collector.flutter = Flutter.instance;
+          resolvedUnitResult.unit.accept(collector);
+        } catch (exception, stackTrace) {
+          print('');
+          print('Exception caught analyzing: "$filePath"');
+          print(exception);
+          print(stackTrace);
+        }
+      }
+    }
+  }
+
+  /// Compute and format a percentage for the fraction [value] / [total].
+  String _formatPercent(int value, int total) {
+    var percent = ((value / total) * 100).toStringAsFixed(1);
+    if (percent.length == 3) {
+      percent = '  $percent';
+    } else if (percent.length == 4) {
+      percent = ' $percent';
+    }
+    return percent;
+  }
+
+  /// Write the child data to the [sink].
+  void _writeChildData(StringSink sink) {
+    sink.writeln('');
+    sink.writeln('The number of times a widget had a given child.');
+    _writeStructureData(sink, data.childData);
+  }
+
+  /// Write the parent data to the [sink].
+  void _writeParentData(StringSink sink) {
+    sink.writeln('');
+    sink.writeln('The number of times a widget had a given parent.');
+    _writeStructureData(sink, data.parentData);
+  }
+
+  /// Write the structure data in the [structureMap] to the [sink].
+  void _writeStructureData(
+      StringSink sink, Map<String, Map<String, int>> structureMap) {
+    var outerKeys = structureMap.keys.toList()..sort();
+    for (var outerKey in outerKeys) {
+      sink.writeln(outerKey);
+      var innerMap = structureMap[outerKey];
+      var entries = innerMap.entries.toList();
+      entries.sort((first, second) => second.value.compareTo(first.value));
+      var total = entries.fold(
+          0, (previousValue, entry) => previousValue + entry.value);
+      for (var entry in entries) {
+        var percent = _formatPercent(entry.value, total);
+        sink.writeln('  $percent%: ${entry.key} (${entry.value})');
+      }
+    }
+  }
+
+  /// Write the widget count data to the [sink].
+  void _writeWidgetCounts(StringSink sink) {
+    sink.writeln('');
+    sink.writeln('Widget classes by frequency of instantiation');
+
+    var total = data.totalWidgetCount;
+    var entries = data.widgetCounts.entries.toList();
+    entries.sort((first, second) => second.value.compareTo(first.value));
+    for (var entry in entries) {
+      var percent = _formatPercent(entry.value, total);
+      sink.writeln('  $percent%: ${entry.key} (${entry.value})');
+    }
+  }
+
+  /// Return `true` if the [result] contains an error.
+  static bool hasError(ResolvedUnitResult result) {
+    for (var error in result.errors) {
+      if (error.severity == Severity.error) {
+        return true;
+      }
+    }
+    return false;
+  }
+}
diff --git a/pkg/analysis_server/tool/completion_metrics/implicit_type_declarations.dart b/pkg/analysis_server/tool/completion_metrics/implicit_type_declarations.dart
index a2c0c4b..2c51ca3 100644
--- a/pkg/analysis_server/tool/completion_metrics/implicit_type_declarations.dart
+++ b/pkg/analysis_server/tool/completion_metrics/implicit_type_declarations.dart
@@ -111,7 +111,10 @@
       var rhsType = node.initializer?.staticType;
       if (rhsType != null && !rhsType.isDynamic) {
         // Record the name with the type.
-        data.recordImpliedType(node.name.name, rhsType.getDisplayString());
+        data.recordImpliedType(
+          node.name.name,
+          rhsType.getDisplayString(withNullability: false),
+        );
       }
     }
   }
diff --git a/pkg/analysis_server/tool/completion_metrics/relevance_metrics.dart b/pkg/analysis_server/tool/completion_metrics/relevance_metrics.dart
index 4dc6352..d1da6d3 100644
--- a/pkg/analysis_server/tool/completion_metrics/relevance_metrics.dart
+++ b/pkg/analysis_server/tool/completion_metrics/relevance_metrics.dart
@@ -267,9 +267,6 @@
   /// The relevance data being collected.
   final RelevanceData data;
 
-  /// The object used to determine Flutter-specific features.
-  Flutter flutter;
-
   InheritanceManager3 inheritanceManager = InheritanceManager3();
 
   /// The library containing the compilation unit being visited.
@@ -292,11 +289,6 @@
   /// [data].
   RelevanceDataCollector(this.data);
 
-  /// Initialize this collector prior to visiting the unit in the [result].
-  void initializeFrom(ResolvedUnitResult result) {
-    flutter = Flutter.of(result);
-  }
-
   @override
   void visitAdjacentStrings(AdjacentStrings node) {
     // There are no completions.
@@ -314,7 +306,7 @@
     var context = _argumentListContext(node);
     var parent = node.parent;
     var inWidgetConstructor = parent is InstanceCreationExpression &&
-        flutter.isWidgetType(parent.staticType);
+        Flutter.instance.isWidgetType(parent.staticType);
     for (var argument in node.arguments) {
       var realArgument = argument;
       var argumentKind = 'unnamed';
@@ -1981,7 +1973,6 @@
             continue;
           }
 
-          collector.initializeFrom(resolvedUnitResult);
           resolvedUnitResult.unit.accept(collector);
         } catch (exception, stacktrace) {
           print('Exception caught analyzing: "$filePath"');
diff --git a/pkg/analysis_server/tool/completion_metrics/relevance_table_generator.dart b/pkg/analysis_server/tool/completion_metrics/relevance_table_generator.dart
index 4b6d1dc..dacc489 100644
--- a/pkg/analysis_server/tool/completion_metrics/relevance_table_generator.dart
+++ b/pkg/analysis_server/tool/completion_metrics/relevance_table_generator.dart
@@ -215,9 +215,6 @@
   /// The compilation unit in which data is currently being collected.
   CompilationUnit unit;
 
-  /// The object used to determine Flutter-specific features.
-  Flutter flutter;
-
   InheritanceManager3 inheritanceManager = InheritanceManager3();
 
   /// The library containing the compilation unit being visited.
@@ -239,7 +236,6 @@
   /// Initialize this collector prior to visiting the unit in the [result].
   void initializeFrom(ResolvedUnitResult result) {
     unit = result.unit;
-    flutter = Flutter.of(result);
   }
 
   @override
@@ -1203,7 +1199,7 @@
       } else if (parent is FunctionExpressionInvocation) {
         return 'function';
       } else if (parent is InstanceCreationExpression) {
-        if (flutter.isWidgetType(parent.staticType)) {
+        if (Flutter.instance.isWidgetType(parent.staticType)) {
           return 'widgetConstructor';
         }
         return 'constructor';
diff --git a/pkg/analysis_server/tool/completion_metrics/visitors.dart b/pkg/analysis_server/tool/completion_metrics/visitors.dart
index f154a6d..cc8d5ff 100644
--- a/pkg/analysis_server/tool/completion_metrics/visitors.dart
+++ b/pkg/analysis_server/tool/completion_metrics/visitors.dart
@@ -347,6 +347,7 @@
 
   @override
   void visitFieldDeclaration(FieldDeclaration node) {
+    safelyRecordKeywordCompletion(node.abstractKeyword);
     safelyRecordKeywordCompletion(node.covariantKeyword);
     safelyRecordKeywordCompletion(node.staticKeyword);
     return super.visitFieldDeclaration(node);
diff --git a/pkg/analysis_server/tool/lsp_spec/README.md b/pkg/analysis_server/tool/lsp_spec/README.md
index d4890e4..41df728 100644
--- a/pkg/analysis_server/tool/lsp_spec/README.md
+++ b/pkg/analysis_server/tool/lsp_spec/README.md
@@ -30,6 +30,7 @@
 Client workspace settings are requested with `workspace/configuration` during initialization and re-requested whenever the client notifies the server with `workspace/didChangeConfiguration`. This allows the settings to take effect without restarting the server.
 
 - `dart.enableSdkFormatter`: When set to `false`, prevents registration (or unregisters) the SDK formatter. When set to `true` or not supplied, will register/reregister the SDK formatter.
+- `dart.lineLength`: The number of characters the formatter should wrap code at. If unspecified, code will be wrapped at `80` characters.
 
 ## Method Status
 
@@ -98,9 +99,9 @@
 | textDocument/prepareRename | ✅ | ✅ | | ✅ | ✅ |
 | textDocument/foldingRange | ✅ | ✅ | ✅ | ✅ | ✅ |
 
-## Custom Methods
+## Custom Methods and Notifications
 
-The following custom methods are also provided by the Dart LSP server:
+The following custom methods/notifications are also provided by the Dart LSP server:
 
 ### dart/diagnosticServer Method
 
@@ -110,6 +111,14 @@
 
 Starts the analzyer diagnostics server (if not already running) and returns the port number it's listening on.
 
+### dart/reanalyze Method
+
+Direction: Client -> Server
+Params: None
+Returns: None
+
+Forces re-reading of all potentially changed files, re-resolving of all referenced URIs, and corresponding re-analysis of everything affected in the current analysis roots. Clients should not usually need to call this method - needing to do so may indicate a bug in the server.
+
 ### dart/textDocument/super Method
 
 Direction: Client -> Server
diff --git a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
index 6fd1691..cefcce6 100644
--- a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
+++ b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
@@ -36,7 +36,7 @@
 
 String generateDartForTypes(List<AstNode> types) {
   final buffer = IndentableStringBuffer();
-  _getSorted(types).forEach((t) => _writeType(buffer, t));
+  _getSortedUnique(types).forEach((t) => _writeType(buffer, t));
   final formattedCode = _formatCode(buffer.toString());
   return formattedCode.trim() + '\n'; // Ensure a single trailing newline.
 }
@@ -95,9 +95,27 @@
       .toList();
 }
 
-/// Returns a copy of the list sorted by name.
-List<AstNode> _getSorted(List<AstNode> items) {
-  final sortedList = items.toList();
+/// Returns a copy of the list sorted by name with duplicates (by name+type) removed.
+List<AstNode> _getSortedUnique(List<AstNode> items) {
+  final uniqueByName = <String, AstNode>{};
+  items.forEach((item) {
+    // It's fine to have the same name used for different types (eg. namespace +
+    // type alias) but some types are just duplicated entirely in the spec in
+    // different positions which should not be emitted twice.
+    final nameTypeKey = '${item.name}|${item.runtimeType}';
+    if (uniqueByName.containsKey(nameTypeKey)) {
+      // At the time of writing, there were two duplicated types:
+      // - TextDocumentSyncKind (same defintion in both places)
+      // - TextDocumentSyncOptions (first definition is just a subset)
+      // If this list grows, consider handling this better - or try to have the
+      // spec updated to be unambigious.
+      print('WARN: More than one definition for $nameTypeKey.');
+    }
+
+    // Keep the last one as in some cases the first definition is less specific.
+    uniqueByName[nameTypeKey] = item;
+  });
+  final sortedList = uniqueByName.values.toList();
   sortedList.sort((item1, item2) => item1.name.compareTo(item2.name));
   return sortedList;
 }
@@ -115,11 +133,13 @@
 
 /// Maps reserved words and identifiers that cause issues in field names.
 String _makeValidIdentifier(String identifier) {
-  // The SymbolKind class has uses these names which cause issues for code that
-  // uses them as types.
+  // Some identifiers used in LSP are reserved words in Dart, so map them to
+  // other values.
   const map = {
     'Object': 'Obj',
     'String': 'Str',
+    'class': 'class_',
+    'enum': 'enum_',
   };
   return map[identifier] ?? identifier;
 }
@@ -199,7 +219,7 @@
     }
     buffer.write('!(');
     _writeTypeCheckCondition(
-        buffer, "obj['${field.name}']", field.type, 'reporter');
+        buffer, interface, "obj['${field.name}']", field.type, 'reporter');
     buffer
       ..write(')) {')
       ..indent()
@@ -240,9 +260,13 @@
     return;
   }
   buffer
-    ..writeIndented('${interface.name}(')
-    ..write(allFields.map((field) => 'this.${field.name}').join(', '))
-    ..write(')');
+    ..writeIndented('${interface.name}({')
+    ..write(allFields.map((field) {
+      final annotation =
+          !field.allowsNull && !field.allowsUndefined ? '@required' : '';
+      return '$annotation this.${field.name}';
+    }).join(', '))
+    ..write('})');
   final fieldsWithValidation =
       allFields.where((f) => !f.allowsNull && !f.allowsUndefined).toList();
   if (fieldsWithValidation.isNotEmpty) {
@@ -302,7 +326,7 @@
     ..indent();
   if (allowsAnyValue) {
     buffer.writeIndentedln('return ');
-    _writeTypeCheckCondition(buffer, 'obj', typeOfValues, 'reporter');
+    _writeTypeCheckCondition(buffer, null, 'obj', typeOfValues, 'reporter');
     buffer.writeln(';');
   } else {
     buffer
@@ -445,7 +469,8 @@
 
     // Dynamic matches all type checks, so only emit it if required.
     if (!isDynamic) {
-      _writeTypeCheckCondition(buffer, valueCode, type, 'nullLspJsonReporter');
+      _writeTypeCheckCondition(
+          buffer, null, valueCode, type, 'nullLspJsonReporter');
       buffer.write(' ? ');
     }
 
@@ -503,7 +528,7 @@
   }
   buffer
     ..writeIndented('return ${interface.nameWithTypeArgs}(')
-    ..write(allFields.map((field) => '${field.name}').join(', '))
+    ..write(allFields.map((field) => '${field.name}: ${field.name}').join(', '))
     ..writeln(');')
     ..outdent()
     ..writeIndented('}');
@@ -609,7 +634,7 @@
 }
 
 void _writeMembers(IndentableStringBuffer buffer, List<Member> members) {
-  _getSorted(members).forEach((m) => _writeMember(buffer, m));
+  _getSortedUnique(members).forEach((m) => _writeMember(buffer, m));
 }
 
 void _writeToJsonFieldsForResponseMessage(
@@ -685,8 +710,8 @@
   }
 }
 
-void _writeTypeCheckCondition(IndentableStringBuffer buffer, String valueCode,
-    TypeBase type, String reporter) {
+void _writeTypeCheckCondition(IndentableStringBuffer buffer,
+    Interface interface, String valueCode, TypeBase type, String reporter) {
   type = resolveTypeAlias(type);
 
   final dartType = type.dartType;
@@ -703,7 +728,8 @@
       // TODO(dantup): If we're happy to assume we never have two lists in a union
       // we could skip this bit.
       buffer.write(' && ($valueCode.every((item) => ');
-      _writeTypeCheckCondition(buffer, 'item', type.elementType, reporter);
+      _writeTypeCheckCondition(
+          buffer, interface, 'item', type.elementType, reporter);
       buffer.write('))');
     }
     buffer.write(')');
@@ -711,9 +737,11 @@
     buffer.write('($valueCode is Map');
     if (fullDartType != 'dynamic') {
       buffer..write(' && (')..write('$valueCode.keys.every((item) => ');
-      _writeTypeCheckCondition(buffer, 'item', type.indexType, reporter);
+      _writeTypeCheckCondition(
+          buffer, interface, 'item', type.indexType, reporter);
       buffer..write('&& $valueCode.values.every((item) => ');
-      _writeTypeCheckCondition(buffer, 'item', type.valueType, reporter);
+      _writeTypeCheckCondition(
+          buffer, interface, 'item', type.valueType, reporter);
       buffer.write(')))');
     }
     buffer.write(')');
@@ -724,9 +752,18 @@
       if (i != 0) {
         buffer.write(' || ');
       }
-      _writeTypeCheckCondition(buffer, valueCode, type.types[i], reporter);
+      _writeTypeCheckCondition(
+          buffer, interface, valueCode, type.types[i], reporter);
     }
     buffer.write(')');
+  } else if (interface != null &&
+      interface.typeArgs != null &&
+      interface.typeArgs.any((typeArg) => typeArg.lexeme == fullDartType)) {
+    final comment = '/* $fullDartType.canParse($valueCode) */';
+    print(
+        'WARN: Unable to write a type check for $valueCode with generic type $fullDartType. '
+        'Please review the generated code annotated with $comment');
+    buffer.write('true $comment');
   } else {
     throw 'Unable to type check $valueCode against $fullDartType';
   }
diff --git a/pkg/analysis_server/tool/lsp_spec/generate_all.dart b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
index 2ddf84a..2f29b7f 100644
--- a/pkg/analysis_server/tool/lsp_spec/generate_all.dart
+++ b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
@@ -69,7 +69,7 @@
 /// The URI of the version of the spec to generate from. This should be periodically updated as
 /// there's no longer a stable URI for the latest published version.
 final Uri specUri = Uri.parse(
-    'https://raw.githubusercontent.com/microsoft/language-server-protocol/gh-pages/_specifications/specification-3-14.md');
+    'https://raw.githubusercontent.com/microsoft/language-server-protocol/gh-pages/_specifications/specification-3-15.md');
 
 /// Pattern to extract inline types from the `result: {xx, yy }` notes in the spec.
 /// Doesn't parse past full stops as some of these have english sentences tagged on
@@ -176,6 +176,7 @@
 import 'package:analysis_server/src/protocol/protocol_internal.dart'
     show listEqual, mapEqual;
 import 'package:analyzer/src/generated/utilities_general.dart';
+import 'package:meta/meta.dart';
 
 const jsonEncoder = JsonEncoder.withIndent('    ');
 
@@ -297,5 +298,20 @@
     return false;
   }
 
+  // There are some example blocks that just contain arrays with no definitions.
+  // They're most easily noted by ending with `]` which no valid TypeScript blocks
+  // do.
+  if (input.trim().endsWith(']')) {
+    return false;
+  }
+
+  // There's a chunk of typescript that is just a partial snippet from a real
+  // interface declared elsewhere that we can only detect by the leading comment.
+  if (input
+      .replaceAll('\r', '')
+      .startsWith('/**\n\t * Window specific client capabilities.')) {
+    return false;
+  }
+
   return true;
 }
diff --git a/pkg/analysis_server/tool/lsp_spec/lsp_specification.md b/pkg/analysis_server/tool/lsp_spec/lsp_specification.md
index 2d3a9c8..4c8b08d 100644
--- a/pkg/analysis_server/tool/lsp_spec/lsp_specification.md
+++ b/pkg/analysis_server/tool/lsp_spec/lsp_specification.md
@@ -1,5 +1,5 @@
 This is an unmodified copy of the Language Server Protocol Specification,
-downloaded from https://raw.githubusercontent.com/microsoft/language-server-protocol/gh-pages/_specifications/specification-3-14.md. It is the version of the specification that was
+downloaded from https://raw.githubusercontent.com/microsoft/language-server-protocol/gh-pages/_specifications/specification-3-15.md. It is the version of the specification that was
 used to generate a portion of the Dart code used to support the protocol.
 
 To regenerate the generated code, run the script in
@@ -10,8 +10,8 @@
 ---
 
 Copyright (c) Microsoft Corporation.
- 
-All rights reserved. 
+
+All rights reserved.
 
 Distributed under the following terms:
 
@@ -22,34 +22,33 @@
 
 ---
 title: Specification
-shortTitle: 3.14 - Previous
+shortTitle: 3.15 - Current
 layout: specifications
-sectionid: specification-3-14
-toc: specification-3-14-toc
-index: 1
+sectionid: specification-3-15
+toc: specification-3-15-toc
+index: 2
 ---
-# Language Server Protocol Specification - 3.14
+# Language Server Protocol Specification - 3.15
 
-This document describes version 3.14.x of the language server protocol. An implementation for node of the 3.14.x version of the protocol can be found [here](https://github.com/Microsoft/vscode-languageserver-node).
+This document describes the 3.15.x version of the language server protocol. An implementation for node of the 3.15.x version of the protocol can be found [here](https://github.com/Microsoft/vscode-languageserver-node).
 
-The 2.x version of this document can be found [here](https://github.com/Microsoft/language-server-protocol/blob/master/versions/protocol-2-x.md).
-The 1.x version of this document can be found [here](https://github.com/Microsoft/language-server-protocol/blob/master/versions/protocol-1-x.md).
+**Note:** edits to this specification can be made via a pull request against this markdown [document](https://github.com/Microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-15.md).
 
-**Note:** edits to this specification can be made via a pull request against this markdown [document](https://github.com/Microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-14.md).
+## <a href="#whatIsNew" name="whatIsNew" class="anchor"> What's new in 3.15 </a>
 
-## Base Protocol
+All new 3.15 features are tagged with a corresponding since version 3.15 text or in JSDoc using `@since 3.15.0` annotation. Major new feature are:
+
+- [general progress support](#progress), [work done progress](#workDoneProgress) and [partial result progress](#partialResults)
+- support for [selection ranges](#textDocument_selectionRange)
+
+## <a href="#baseProtocol" name="baseProtocol" class="anchor"> Base Protocol </a>
 
 The base protocol consists of a header and a content part (comparable to HTTP). The header and content part are
 separated by a '\r\n'.
 
-### Header Part
+### <a href="#headerPart" name="headerPart" class="anchor"> Header Part </a>
 
-The header part consists of header fields. Each header field is comprised of a name and a value,
-separated by ': ' (a colon and a space).
-Each header field is terminated by '\r\n'.
-Considering the last header field and the overall header itself are each terminated with '\r\n',
-and that at least one header is mandatory, this means that two '\r\n' sequences always
-immediately precede the content part of a message.
+The header part consists of header fields. Each header field is comprised of a name and a value, separated by ': ' (a colon and a space). The structure of header fields conform to the [HTTP semantic](https://tools.ietf.org/html/rfc7230#section-3.2). Each header field is terminated by '\r\n'. Considering the last header field and the overall header itself are each terminated with '\r\n', and that at least one header is mandatory, this means that two '\r\n' sequences always immediately precede the content part of a message.
 
 Currently the following header fields are supported:
 
@@ -61,9 +60,9 @@
 
 The header part is encoded using the 'ascii' encoding. This includes the '\r\n' separating the header and content part.
 
-### Content Part
+### <a href="#contentPart" name="contentPart" class="anchor"> Content Part </a>
 
-Contains the actual content of the message. The content part of a message uses [JSON-RPC](http://www.jsonrpc.org/) to describe requests, responses and notifications. The content part is encoded using the charset provided in the Content-Type field. It defaults to `utf-8`, which is the only encoding supported right now. If a server or client receives a header with a different encoding than `utf-8`, then it should respond with an error.
+Contains the actual content of the message. The content part of a message uses [JSON-RPC](http://www.jsonrpc.org/) to describe requests, responses and notifications. The content part is encoded using the charset provided in the Content-Type field. It defaults to `utf-8`, which is the only encoding supported right now. If a server or client receives a header with a different encoding than `utf-8` it should respond with an error.
 
 (Prior versions of the protocol used the string constant `utf8` which is not a correct encoding constant according to [specification](http://www.iana.org/assignments/character-sets/character-sets.xhtml).) For backwards compatibility it is highly recommended that a client and a server treats the string `utf8` as `utf-8`.
 
@@ -94,7 +93,7 @@
 	jsonrpc: string;
 }
 ```
-#### Request Message
+#### <a href="#requestMessage" name="requestMessage" class="anchor"> Request Message </a>
 
 A request message to describe a request between the client and the server. Every processed request must send a response back to the sender of the request.
 
@@ -114,11 +113,11 @@
 	/**
 	 * The method's params.
 	 */
-	params?: Array<any> | object;
+	params?: array | object;
 }
 ```
 
-#### Response Message
+#### <a href="#responseMessage" name="responseMessage" class="anchor"> Response Message </a>
 
 A Response Message sent as a result of a request. If a request doesn't provide a result value the receiver of a request still needs to return a response message to conform to the JSON RPC specification. The result property of the ResponseMessage should be set to `null` in this case to signal a successful request.
 
@@ -138,10 +137,10 @@
 	/**
 	 * The error object in case a request fails.
 	 */
-	error?: ResponseError<any>;
+	error?: ResponseError;
 }
 
-interface ResponseError<D> {
+interface ResponseError {
 	/**
 	 * A number indicating the error type that occurred.
 	 */
@@ -153,10 +152,10 @@
 	message: string;
 
 	/**
-	 * A Primitive or Structured value that contains additional
+	 * A primitive or structured value that contains additional
 	 * information about the error. Can be omitted.
 	 */
-	data?: D;
+	data?: string | number | boolean | array | object | null;
 }
 
 export namespace ErrorCodes {
@@ -176,7 +175,7 @@
 	export const ContentModified: number = -32801;
 }
 ```
-#### Notification Message
+#### <a href="#notificationMessage" name="notificationMessage" class="anchor"> Notification Message </a>
 
 A notification message. A processed notification message must not send a response back. They work like events.
 
@@ -190,11 +189,11 @@
 	/**
 	 * The notification's params.
 	 */
-	params?: Array<any> | object;
+	params?: array | object;
 }
 ```
 
-#### $ Notifications and Requests
+#### <a href="#dollarRequests" name="dollarRequests" class="anchor"> $ Notifications and Requests </a>
 
 Notification and requests whose methods start with '$/' are messages which are protocol implementation dependent and might not be implementable in all clients or servers. For example if the server implementation uses a single threaded synchronous programming language then there is little a server can do to react to a '$/cancelRequest' notification. If a server or client receives notifications starting with '$/' it is free to ignore the notification. If a server or client receives a requests starting with '$/' it must error the request with error code `MethodNotFound` (e.g. `-32601`).
 
@@ -217,6 +216,35 @@
 
 A request that got canceled still needs to return from the server and send a response back. It can not be left open / hanging. This is in line with the JSON RPC protocol that requires that every request sends a response back. In addition it allows for returning partial results on cancel. If the request returns an error response on cancellation it is advised to set the error code to `ErrorCodes.RequestCancelled`.
 
+#### <a href="#progress" name="progress" class="anchor"> Progress Support (:arrow_right: :arrow_left:)</a>
+
+> *Since version 3.15.0*
+
+The base protocol offers also support to report progress in a generic fashion. This mechanism can be used to report any kind of progress including work done progress (usually used to report progress in the user interface using a progress bar) and partial result progress to support streaming of results.
+
+A progress notification has the following properties:
+
+_Notification_:
+* method: '$/progress'
+* params: `ProgressParams` defined as follows:
+
+```typescript
+type ProgressToken = number | string;
+interface ProgressParams<T> {
+	/**
+	 * The progress token provided by the client or server.
+	 */
+	token: ProgressToken;
+
+	/**
+	 * The progress data.
+	 */
+	value: T;
+}
+```
+
+Progress is reported against a token. The token is different than the request ID which allows to report progress out of band and also for notification.
+
 ## Language Server Protocol
 
 The language server protocol defines a set of JSON-RPC request, response and notification messages which are exchanged using the above base protocol. This section starts describing the basic JSON structures used in the protocol. The document uses TypeScript interfaces to describe these. Based on the basic JSON structures, the actual requests with their responses and the notifications are described.
@@ -227,7 +255,7 @@
 
 ### Basic JSON Structures
 
-#### URI
+#### <a href="#uri" name="uri" class="anchor"> URI </a>
 
 URI's are transferred as strings. The URI's format is defined in [http://tools.ietf.org/html/rfc3986](http://tools.ietf.org/html/rfc3986)
 
@@ -249,17 +277,17 @@
 type DocumentUri = string;
 ```
 
-#### Text Documents
+#### <a href="#textDocuments" name="textDocuments" class="anchor"> Text Documents </a>
 
 The current protocol is tailored for textual documents whose content can be represented as a string. There is currently no support for binary documents. A position inside a document (see Position definition below) is expressed as a zero-based line and character offset. The offsets are based on a UTF-16 string representation. So a string of the form `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀` is 1 and the character offset of b is 3 since `𐐀` is represented using two code units in UTF-16. To ensure that both client and server split the string into the same line representation the protocol specifies the following end-of-line sequences: '\n', '\r\n' and '\r'.
 
-Positions are line end character agnostic. So you can not specify  a position that denotes `\r|\n` or `\n|` where `|` represents the character offset.
+Positions are line end character agnostic. So you can not specify a position that denotes `\r|\n` or `\n|` where `|` represents the character offset.
 
 ```typescript
 export const EOL: string[] = ['\n', '\r\n', '\r'];
 ```
 
-#### Position
+#### <a href="#position" name="position" class="anchor"> Position </a>
 
 Position in a text document expressed as zero-based line and zero-based character offset. A position is between two characters like an 'insert' cursor in a editor. Special values like for example `-1` to denote the end of a line are not supported.
 
@@ -281,13 +309,13 @@
 	character: number;
 }
 ```
-#### Range
+#### <a href="#range" name="range" class="anchor"> Range </a>
 
 A range in a text document expressed as (zero-based) start and end positions. A range is comparable to a selection in an editor. Therefore the end position is exclusive. If you want to specify a range that contains a line including the line ending character(s) then use an end position denoting the start of the next line. For example:
 ```typescript
 {
     start: { line: 5, character: 23 },
-    end : { line 6, character : 0 }
+    end : { line: 6, character: 0 }
 }
 ```
 
@@ -305,7 +333,7 @@
 }
 ```
 
-#### Location
+#### <a href="#location" name="location" class="anchor"> Location </a>
 
 Represents a location inside a resource, such as a line inside a text file.
 ```typescript
@@ -315,7 +343,7 @@
 }
 ```
 
-#### LocationLink
+#### <a href="#locationLink" name="locationLink" class="anchor"> LocationLink </a>
 
 Represents a link between a source and a target location.
 
@@ -350,12 +378,12 @@
 }
 ```
 
-#### Diagnostic
+#### <a href="#diagnostic" name="diagnostic" class="anchor"> Diagnostic </a>
 
 Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.
 
 ```typescript
-interface Diagnostic {
+export interface Diagnostic {
 	/**
 	 * The range at which the message applies.
 	 */
@@ -365,7 +393,7 @@
 	 * The diagnostic's severity. Can be omitted. If omitted it is up to the
 	 * client to interpret diagnostics as error, warning, info or hint.
 	 */
-	severity?: number;
+	severity?: DiagnosticSeverity;
 
 	/**
 	 * The diagnostic's code, which might appear in the user interface.
@@ -384,6 +412,13 @@
 	message: string;
 
 	/**
+	 * Additional metadata about the diagnostic.
+	 *
+	 * @since 3.15.0
+	 */
+	tags?: DiagnosticTag[];
+
+	/**
 	 * An array of related diagnostic information, e.g. when symbol-names within
 	 * a scope collide all definitions can be marked via this property.
 	 */
@@ -391,33 +426,60 @@
 }
 ```
 
-The protocol currently supports the following diagnostic severities:
+The protocol currently supports the following diagnostic severities and tags:
 
 ```typescript
-namespace DiagnosticSeverity {
+export namespace DiagnosticSeverity {
 	/**
 	 * Reports an error.
 	 */
-	export const Error = 1;
+	export const Error: 1 = 1;
 	/**
 	 * Reports a warning.
 	 */
-	export const Warning = 2;
+	export const Warning: 2 = 2;
 	/**
 	 * Reports an information.
 	 */
-	export const Information = 3;
+	export const Information: 3 = 3;
 	/**
 	 * Reports a hint.
 	 */
-	export const Hint = 4;
+	export const Hint: 4 = 4;
 }
+
+export type DiagnosticSeverity = 1 | 2 | 3 | 4;
+
+/**
+ * The diagnostic tags.
+ *
+ * @since 3.15.0
+ */
+export namespace DiagnosticTag {
+    /**
+     * Unused or unnecessary code.
+     *
+     * Clients are allowed to render diagnostics with this tag faded out instead of having
+     * an error squiggle.
+     */
+    export const Unnecessary: 1 = 1;
+    /**
+     * Deprecated or obsolete code.
+     *
+     * Clients are allowed to rendered diagnostics with this tag strike through.
+     */
+    export const Deprecated: 2 = 2;
+}
+
+export type DiagnosticTag = 1 | 2;
 ```
 
+`DiagnosticRelatedInformation` is defined as follows:
+
 ```typescript
 /**
  * Represents a related message and source code location for a diagnostic. This should be
- * used to point to code locations that cause or related to a diagnostics, e.g when duplicating
+ * used to point to code locations that cause or are related to a diagnostics, e.g when duplicating
  * a symbol in a scope.
  */
 export interface DiagnosticRelatedInformation {
@@ -433,7 +495,7 @@
 }
 ```
 
-#### Command
+#### <a href="#command" name="command" class="anchor"> Command </a>
 
 Represents a reference to a command. Provides a title which will be used to represent a command in the UI. Commands are identified by a string identifier. The recommended way to handle commands is to implement their execution on the server side if the client and server provides the corresponding capabilities. Alternatively the tool extension code could handle the command. The protocol currently doesn't specify a set of well-known commands.
 
@@ -455,7 +517,7 @@
 }
 ```
 
-#### TextEdit
+#### <a href="#textEdit" name="textEdit" class="anchor"> TextEdit </a>
 
 A textual edit applicable to a text document.
 
@@ -475,15 +537,15 @@
 }
 ```
 
-#### TextEdit[]
+#### <a href="#textEditArray" name="textEditArray" class="anchor"> TextEdit[] </a>
 
 Complex text manipulations are described with an array of `TextEdit`'s, representing a single change to the document.
 
-All text edits ranges refer to positions in the original document. Text edits ranges must never overlap, that means no part of the original document must be manipulated by more than one edit. However, it is possible that multiple edits have the same start position: multiple inserts, or any number of inserts followed by a single remove or replace edit. If multiple inserts have the same position, the order in the array defines the order in which the inserted strings appear in the resulting text.
+All text edits ranges refer to positions in the document the are computed on. They therefore move a document from state S1 to S2 without describing any intermediate state. Text edits ranges must never overlap, that means no part of the original document must be manipulated by more than one edit. However, it is possible that multiple edits have the same start position: multiple inserts, or any number of inserts followed by a single remove or replace edit. If multiple inserts have the same position, the order in the array defines the order in which the inserted strings appear in the resulting text.
 
-#### TextDocumentEdit
+#### <a href="#textDocumentEdit" name="textDocumentEdit" class="anchor"> TextDocumentEdit </a>
 
-Describes textual changes on a single text document. The text document is referred to as a `VersionedTextDocumentIdentifier` to allow clients to check the text document version before an edit is applied. A `TextDocumentEdit` describes all changes on a version Si and after they are applied move the document to version Si+1. So the creator of a `TextDocumentEdit` doesn't need to sort the array or do any kind of ordering. However the edits must be non overlapping.
+Describes textual changes on a single text document. The text document is referred to as a `VersionedTextDocumentIdentifier` to allow clients to check the text document version before an edit is applied. A `TextDocumentEdit` describes all changes on a version Si and after they are applied move the document to version Si+1. So the creator of a `TextDocumentEdit` doesn't need to sort the array of edits or do any kind of ordering. However the edits must be non overlapping.
 
 ```typescript
 export interface TextDocumentEdit {
@@ -499,7 +561,7 @@
 }
 ```
 
-### File Resource changes
+### <a href="#resourceChanges" name="resourceChanges" class="anchor"> File Resource changes </a>
 
 > New in version 3.13:
 
@@ -607,7 +669,7 @@
 }
 ```
 
-#### WorkspaceEdit
+#### <a href="#workspaceEdit" name="workspaceEdit" class="anchor"> WorkspaceEdit </a>
 
 A workspace edit represents changes to many resources managed in the workspace. The edit should either provide `changes` or `documentChanges`. If the client can handle versioned document edits and if `documentChanges` are present, the latter are preferred over `changes`.
 
@@ -634,7 +696,96 @@
 }
 ```
 
-#### TextDocumentIdentifier
+##### <a href="#workspaceEditClientCapabilities" name="workspaceEditClientCapabilities" class="anchor"> WorkspaceEditClientCapabilities </a>
+
+> New in version 3.13: `ResourceOperationKind` and `FailureHandlingKind` and the client capability `workspace.workspaceEdit.resourceOperations` as well as `workspace.workspaceEdit.failureHandling`.
+
+
+The capabilities of a workspace edit has evolved over the time. Clients can describe their support using the following client capability:
+
+* property path (optional): `workspace.workspaceEdit`
+* property type: `WorkspaceEditClientCapabilities` defined as follows:
+
+```typescript
+export interface WorkspaceEditClientCapabilities {
+	/**
+	 * The client supports versioned document changes in `WorkspaceEdit`s
+	 */
+	documentChanges?: boolean;
+
+	/**
+	 * The resource operations the client supports. Clients should at least
+	 * support 'create', 'rename' and 'delete' files and folders.
+	 *
+	 * @since 3.13.0
+	 */
+	resourceOperations?: ResourceOperationKind[];
+
+	/**
+	 * The failure handling strategy of a client if applying the workspace edit
+	 * fails.
+	 *
+	 * @since 3.13.0
+	 */
+	failureHandling?: FailureHandlingKind;
+}
+
+/**
+ * The kind of resource operations supported by the client.
+ */
+export type ResourceOperationKind = 'create' | 'rename' | 'delete';
+
+export namespace ResourceOperationKind {
+
+	/**
+	 * Supports creating new files and folders.
+	 */
+	export const Create: ResourceOperationKind = 'create';
+
+	/**
+	 * Supports renaming existing files and folders.
+	 */
+	export const Rename: ResourceOperationKind = 'rename';
+
+	/**
+	 * Supports deleting existing files and folders.
+	 */
+	export const Delete: ResourceOperationKind = 'delete';
+}
+
+export type FailureHandlingKind = 'abort' | 'transactional' | 'undo' | 'textOnlyTransactional';
+
+export namespace FailureHandlingKind {
+
+	/**
+	 * Applying the workspace change is simply aborted if one of the changes provided
+	 * fails. All operations executed before the failing operation stay executed.
+	 */
+	export const Abort: FailureHandlingKind = 'abort';
+
+	/**
+	 * All operations are executed transactional. That means they either all
+	 * succeed or no changes at all are applied to the workspace.
+	 */
+	export const Transactional: FailureHandlingKind = 'transactional';
+
+
+	/**
+	 * If the workspace edit contains only textual file changes they are executed transactional.
+	 * If resource changes (create, rename or delete file) are part of the change the failure
+	 * handling strategy is abort.
+	 */
+	export const TextOnlyTransactional: FailureHandlingKind = 'textOnlyTransactional';
+
+	/**
+	 * The client tries to undo the operations already executed. But there is no
+	 * guarantee that this is succeeding.
+	 */
+	export const Undo: FailureHandlingKind = 'undo';
+}
+```
+
+#### <a href="#textDocumentIdentifier" name="textDocumentIdentifier" class="anchor"> TextDocumentIdentifier </a>
 
 Text documents are identified using a URI. On the protocol level, URIs are passed as strings. The corresponding JSON structure looks like this:
 ```typescript
@@ -646,7 +797,7 @@
 }
 ```
 
-#### TextDocumentItem
+#### <a href="#textDocumentItem" name="textDocumentItem" class="anchor"> TextDocumentItem </a>
 
 An item to transfer a text document from the client to the server.
 
@@ -691,6 +842,8 @@
 Diff | `diff`
 Dart | `dart`
 Dockerfile | `dockerfile`
+Elixir | `elixir`
+Erlang | `erlang`
 F# | `fsharp`
 Git | `git-commit` and `git-rebase`
 Go | `go`
@@ -734,7 +887,7 @@
 YAML | `yaml`
 {: .table .table-bordered .table-responsive}
 
-#### VersionedTextDocumentIdentifier
+#### <a href="#versionedTextDocumentIdentifier" name="versionedTextDocumentIdentifier" class="anchor"> VersionedTextDocumentIdentifier </a>
 
 An identifier to denote a specific version of a text document.
 
@@ -745,7 +898,7 @@
 	 * is sent from the server to the client and the file is not open in the editor
 	 * (the server has not received an open notification before) the server can send
 	 * `null` to indicate that the version is known and the content on disk is the
-	 * truth (as speced with document content ownership).
+	 * master (as speced with document content ownership).
 	 *
 	 * The version number of a document will increase after each change, including
 	 * undo/redo. The number doesn't need to be consecutive.
@@ -754,7 +907,7 @@
 }
 ```
 
-#### TextDocumentPositionParams
+#### <a href="#textDocumentPositionParams" name="textDocumentPositionParams" class="anchor"> TextDocumentPositionParams </a>
 
 Was `TextDocumentPosition` in 1.0 with inlined parameters.
 
@@ -774,7 +927,7 @@
 }
 ```
 
-#### DocumentFilter
+#### <a href="#documentFilter" name="documentFilter" class="anchor"> DocumentFilter </a>
 
 A document filter denotes a document through properties like `language`, `scheme` or `pattern`. An example is a filter that applies to TypeScript files on disk. Another example is a filter the applies to JSON files with name `package.json`:
 ```typescript
@@ -815,7 +968,41 @@
 export type DocumentSelector = DocumentFilter[];
 ```
 
-#### MarkupContent
+#### <a href="#staticRegistrationOptions" name="staticRegistrationOptions" class="anchor"> StaticRegistrationOptions </a>
+
+Static registration options can be used to register a feature in the initialize result with a given server control ID to be able to un-register the feature later on.
+
+```typescript
+/**
+ * Static registration options to be returned in the initialize request.
+ */
+export interface StaticRegistrationOptions {
+	/**
+	 * The id used to register the request. The id can be used to deregister
+	 * the request again. See also Registration#id.
+	 */
+	id?: string;
+}
+```
+
+#### <a href="#textDocumentRegistrationOptions" name="textDocumentRegistrationOptions" class="anchor"> TextDocumentRegistrationOptions </a>
+
+Options to dynamically register for requests for a set of text documents.
+
+```typescript
+/**
+ * General text document registration options.
+ */
+export interface TextDocumentRegistrationOptions {
+	/**
+	 * A document selector to identify the scope of the registration. If set to null
+	 * the document selector provided on the client side will be used.
+	 */
+	documentSelector: DocumentSelector | null;
+}
+```
+
+#### <a href="#markupContent" name="markupContent" class="anchor"> MarkupContent </a>
 
  A `MarkupContent` literal represents a string value which content can be represented in different formats. Currently `plaintext` and `markdown` are supported formats. A `MarkupContent` is usually used in documentation properties of result literals like `CompletionItem` or `SignatureInformation`.
 
@@ -877,13 +1064,250 @@
 }
 ```
 
+#### <a href="#workDoneProgress" name="workDoneProgress" class="anchor"> Work Done Progress </a>
+
+> *Since version 3.15.0*
+
+Work done progress is reported using the generic [`$/progress`](#progress) notification. The value payload of a work done progress notification can be of three different forms.
+
+##### <a href="#workDoneProgressBegin" name="workDoneProgressBegin" class="anchor"> Work Done Progress Begin </a>
+
+To start progress reporting a `$/progress` notification with the following payload must be sent:
+
+```typescript
+export interface WorkDoneProgressBegin {
+
+	kind: 'begin';
+
+	/**
+	 * Mandatory title of the progress operation. Used to briefly inform about
+	 * the kind of operation being performed.
+	 *
+	 * Examples: "Indexing" or "Linking dependencies".
+	 */
+	title: string;
+
+	/**
+	 * Controls if a cancel button should show to allow the user to cancel the
+	 * long running operation. Clients that don't support cancellation are allowed
+	 * to ignore the setting.
+	 */
+	cancellable?: boolean;
+
+	/**
+	 * Optional, more detailed associated progress message. Contains
+	 * complementary information to the `title`.
+	 *
+	 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
+	 * If unset, the previous progress message (if any) is still valid.
+	 */
+	message?: string;
+
+	/**
+	 * Optional progress percentage to display (value 100 is considered 100%).
+	 * If not provided infinite progress is assumed and clients are allowed
+	 * to ignore the `percentage` value in subsequent in report notifications.
+	 *
+	 * The value should be steadily rising. Clients are free to ignore values
+	 * that are not following this rule.
+	 */
+	percentage?: number;
+}
+```
+
+##### <a href="#workDoneProgressReport" name="workDoneProgressReport" class="anchor"> Work Done Progress Report </a>
+
+Reporting progress is done using the following payload:
+
+```typescript
+export interface WorkDoneProgressReport {
+
+	kind: 'report';
+
+	/**
+	 * Controls enablement state of a cancel button. This property is only valid if a cancel
+	 * button got requested in the `WorkDoneProgressStart` payload.
+	 *
+	 * Clients that don't support cancellation or don't support control the button's
+	 * enablement state are allowed to ignore the setting.
+	 */
+	cancellable?: boolean;
+
+	/**
+	 * Optional, more detailed associated progress message. Contains
+	 * complementary information to the `title`.
+	 *
+	 * Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
+	 * If unset, the previous progress message (if any) is still valid.
+	 */
+	message?: string;
+
+	/**
+	 * Optional progress percentage to display (value 100 is considered 100%).
+	 * If not provided infinite progress is assumed and clients are allowed
+	 * to ignore the `percentage` value in subsequent in report notifications.
+	 *
+	 * The value should be steadily rising. Clients are free to ignore values
+	 * that are not following this rule.
+	 */
+	percentage?: number;
+}
+```
+
+##### <a href="#workDoneProgressEnd" name="workDoneProgressEnd" class="anchor"> Work Done Progress End </a>
+
+Signaling the end of a progress reporting is done using the following payload:
+
+```typescript
+export interface WorkDoneProgressEnd {
+
+	kind: 'end';
+
+	/**
+	 * Optional, a final message indicating to for example indicate the outcome
+	 * of the operation.
+	 */
+	message?: string;
+}
+```
+
+##### <a href="#initiatingWorkDoneProgress" name="initiatingWorkDoneProgress" class="anchor"> Initiating Work Done Progress </a>
+
+Work Done progress can be initiated in two different ways:
+
+1. by the sender of a request (mostly clients) using the predefined `workDoneToken` property in the requests parameter literal.
+1. by a server using the request `window/workDoneProgress/create`.
+
+Consider a client sending a `textDocument/reference` request to a server and the client accepts work done progress reporting on that request. To signal this to the server the client would add a `workDoneToken` property to the reference request parameters. Something like this:
+
+```json
+{
+	"textDocument": {
+		"uri": "file:///folder/file.ts"
+	},
+	"position": {
+		"line": 9,
+		"character": 5
+	},
+	"context": {
+		"includeDeclaration": true
+	},
+	// The token used to report work done progress.
+	"workDoneToken": "1d546990-40a3-4b77-b134-46622995f6ae"
+}
+```
+
+A server uses the `workDoneToken` to report progress for the specific `textDocument/reference`. For the above request the `$/progress` notification params look like this:
+
+```json
+{
+	"token": "1d546990-40a3-4b77-b134-46622995f6ae",
+	"value": {
+		"kind": "begin",
+		"title": "Finding references for A#foo",
+		"cancellable": false,
+		"message": "Processing file X.ts",
+		"percentage": 0
+	}
+}
+```
+
+Server initiated work done progress works the same. The only difference is that the server requests a progress user interface using the `window/workDoneProgress/create` request providing a token that is afterwards used to report progress.
+
+##### <a href="#signalingWorkDoneProgressReporting" name="signalingWorkDoneProgressReporting" class="anchor"> Signaling Work Done Progress Reporting </a>
+
+To keep the protocol backwards compatible servers are only allowed to use work done progress reporting if the client signals corresponding support using the client capability `window.workDoneProgress`.
+
+To avoid that clients set up a progress monitor user interface before sending a request but the server doesn't actually report any progress a server needs to signal work done progress reporting in the corresponding server capability. For the above find references example a server would signal such a support by setting the `referencesProvider` property in the server capabilities as follows:
+
+```json
+{
+	"referencesProvider": {
+		"workDoneProgress": true
+	}
+}
+```
+
+#### <a href="#workDoneProgressParams" name="workDoneProgressParams" class="anchor"> WorkDoneProgressParams </a>
+
+A parameter literal used to pass a work done progress token.
+
+```typescript
+export interface WorkDoneProgressParams {
+	/**
+	 * An optional token that a server can use to report work done progress.
+	 */
+	workDoneToken?: ProgressToken;
+}
+```
+
+#### <a href="#workDoneProgressOptions" name="workDoneProgressOptions" class="anchor"> WorkDoneProgressOptions </a>
+
+Options to signal work done progress support in server capabilities.
+
+```typescript
+export interface WorkDoneProgressOptions {
+	workDoneProgress?: boolean;
+}
+```
+
+#### <a href="#partialResults" name="partialResults" class="anchor"> Partial Result Progress </a>
+
+> *Since version 3.15.0*
+
+Partial results are also reported using the generic [`$/progress`](#progress) notification. The value payload of a partial result progress notification is in most cases the same as the final result. For example the `workspace/symbol` request has `SymbolInformation[]` as the result type. Partial result is therefore also of type `SymbolInformation[]`. Whether a client accepts partial result notifications for a request is signaled by adding a `partialResultToken` to the request parameter. For example, a `textDocument/reference` request that supports both work done and partial result progress might look like this:
+
+```json
+{
+	"textDocument": {
+		"uri": "file:///folder/file.ts"
+	},
+	"position": {
+		"line": 9,
+		"character": 5
+	},
+	"context": {
+		"includeDeclaration": true
+	},
+	// The token used to report work done progress.
+	"workDoneToken": "1d546990-40a3-4b77-b134-46622995f6ae",
+	// The token used to report partial result progress.
+	"partialResultToken": "5f6f349e-4f81-4a3b-afff-ee04bff96804"
+}
+```
+
+The `partialResultToken` is then used to report partial results for the find references request.
+
+If a server reports partial result via a corresponding `$/progress`, the whole result must be reported using n `$/progress` notifications. The final response has to be empty in terms of result values. This avoids confusion about how the final result should be interpreted, e.g. as another partial result or as a replacing result.
+
+If the response errors the provided partial results should be treated as follows:
+
+- the `code` equals to `RequestCancelled`: the client is free to use the provided results but should make clear that the request got canceled and may be incomplete.
+- in all other cases the provided partial results shouldn't be used.
+
+#### <a href="#partialResultParams" name="partialResultParams" class="anchor"> PartialResultParams </a>
+
+A parameter literal used to pass a partial result token.
+
+```typescript
+export interface PartialResultParams {
+	/**
+	 * An optional token that a server can use to report partial results (e.g. streaming) to
+	 * the client.
+	 */
+	partialResultToken?: ProgressToken;
+}
+```
+
 ### Actual Protocol
 
 This section documents the actual language server protocol. It uses the following format:
 
 * a header describing the request
-* a _Request_: section describing the format of the request sent. The method is a string identifying the request the params are documented using a TypeScript interface
-* a _Response_: section describing the format of the response. The result item describes the returned data in case of a success. The error.data describes the returned data in case of an error. Please remember that in case of a failure the response already contains an error.code and an error.message field. These fields are only spec'd if the protocol forces the use of certain error codes or messages. In cases where the server can decide on these values freely they aren't listed here.
+* an optional _Client capability_ section describing the client capability of the request. This includes the client capabilities property path and JSON structure.
+* an optional _Server Capability_ section describing the server capability of the request. This includes the server capabilities property path and JSON structure.
+* a _Request_ section describing the format of the request sent. The method is a string identifying the request the params are documented using a TypeScript interface. It is also documented whether the request supports work done progress and partial result progress.
+* a _Response_ section describing the format of the response. The result item describes the returned data in case of a success. The optional partial result item describes the returned data of a partial result notification. The error.data describes the returned data in case of an error. Please remember that in case of a failure the response already contains an error.code and an error.message field. These fields are only spec'd if the protocol forces the use of certain error codes or messages. In cases where the server can decide on these values freely they aren't listed here.
 * a _Registration Options_ section describing the registration option if the request or notification supports dynamic capability registration.
 
 #### Request, Notification and Response ordering
@@ -903,7 +1327,7 @@
 * For a request the response should be an error with `code: -32002`. The message can be picked by the server.
 * Notifications should be dropped, except for the exit notification. This will allow the exit of a server without an initialize request.
 
-Until the server has responded to the `initialize` request with an `InitializeResult`, the client must not send any additional requests or notifications to the server. In addition the server is not allowed to send any requests or notifications to the client until it has responded with an `InitializeResult`, with the exception that during the `initialize` request the server is allowed to send the notifications `window/showMessage`, `window/logMessage` and `telemetry/event` as well as the `window/showMessageRequest` request to the client.
+Until the server has responded to the `initialize` request with an `InitializeResult`, the client must not send any additional requests or notifications to the server. In addition the server is not allowed to send any requests or notifications to the client until it has responded with an `InitializeResult`, with the exception that during the `initialize` request the server is allowed to send the notifications `window/showMessage`, `window/logMessage` and `telemetry/event` as well as the `window/showMessageRequest` request to the client. In case the client sets up a progress token in the initialize params (e.g. property `workDoneToken`) the server is also allowed to use that token (and only that token) using the `$/progress` notification sent from the server to the client.
 
 The `initialize` request may only be sent once.
 
@@ -912,7 +1336,7 @@
 * params: `InitializeParams` defined as follows:
 
 ```typescript
-interface InitializeParams {
+interface InitializeParams extends WorkDoneProgressParams {
 	/**
 	 * The process Id of the parent process that started
 	 * the server. Is null if the process has not been started by another process.
@@ -921,6 +1345,23 @@
 	processId: number | null;
 
 	/**
+	 * Information about the client
+	 *
+	 * @since 3.15.0
+	 */
+	clientInfo?: {
+		/**
+		 * The name of the client as defined by the client.
+		 */
+		name: string;
+
+		/**
+		 * The client's version as defined by the client.
+		 */
+		version?: string;
+	};
+
+	/**
 	 * The rootPath of the workspace. Is null
 	 * if no folder is open.
 	 *
@@ -956,179 +1397,13 @@
 	 * It can be `null` if the client supports workspace folders but none are
 	 * configured.
 	 *
-	 * Since 3.6.0
+	 * @since 3.6.0
 	 */
 	workspaceFolders?: WorkspaceFolder[] | null;
 }
 ```
-Where `ClientCapabilities`, `TextDocumentClientCapabilities` and `WorkspaceClientCapabilities` are defined as follows:
+Where `ClientCapabilities` and `TextDocumentClientCapabilities` are defined as follows:
 
-##### `WorkspaceClientCapabilities` define capabilities the editor / tool provides on the workspace:
-
-> New in version 3.13: `ResourceOperationKind` and `FailureHandlingKind` and the client capability `workspace.workspaceEdit.resourceOperations` as well as `workspace.workspaceEdit.failureHandling`.
-
-```typescript
-
-/**
- * The kind of resource operations supported by the client.
- */
-export type ResourceOperationKind = 'create' | 'rename' | 'delete';
-
-export namespace ResourceOperationKind {
-
-	/**
-	 * Supports creating new files and folders.
-	 */
-	export const Create: ResourceOperationKind = 'create';
-
-	/**
-	 * Supports renaming existing files and folders.
-	 */
-	export const Rename: ResourceOperationKind = 'rename';
-
-	/**
-	 * Supports deleting existing files and folders.
-	 */
-	export const Delete: ResourceOperationKind = 'delete';
-}
-
-export type FailureHandlingKind = 'abort' | 'transactional' | 'undo' | 'textOnlyTransactional';
-
-export namespace FailureHandlingKind {
-
-	/**
-	 * Applying the workspace change is simply aborted if one of the changes provided
-	 * fails. All operations executed before the failing operation stay executed.
-	 */
-	export const Abort: FailureHandlingKind = 'abort';
-
-	/**
-	 * All operations are executed transactionally. That means they either all
-	 * succeed or no changes at all are applied to the workspace.
-	 */
-	export const Transactional: FailureHandlingKind = 'transactional';
-
-
-	/**
-	 * If the workspace edit contains only textual file changes they are executed transactionally.
-	 * If resource changes (create, rename or delete file) are part of the change the failure
-	 * handling strategy is abort.
-	 */
-	export const TextOnlyTransactional: FailureHandlingKind = 'textOnlyTransactional';
-
-	/**
-	 * The client tries to undo the operations already executed. But there is no
-	 * guarantee that this succeeds.
-	 */
-	export const Undo: FailureHandlingKind = 'undo';
-}
-
-/**
- * Workspace specific client capabilities.
- */
-export interface WorkspaceClientCapabilities {
-	/**
-	 * The client supports applying batch edits to the workspace by supporting
-	 * the request 'workspace/applyEdit'
-	 */
-	applyEdit?: boolean;
-
-	/**
-	 * Capabilities specific to `WorkspaceEdit`s
-	 */
-	workspaceEdit?: {
-		/**
-		 * The client supports versioned document changes in `WorkspaceEdit`s
-		 */
-		documentChanges?: boolean;
-
-		/**
-		 * The resource operations the client supports. Clients should at least
-		 * support 'create', 'rename' and 'delete' files and folders.
-		 */
-		resourceOperations?: ResourceOperationKind[];
-
-		/**
-		 * The failure handling strategy of a client if applying the workspace edit
-		 * fails.
-		 */
-		failureHandling?: FailureHandlingKind;
-	};
-
-	/**
-	 * Capabilities specific to the `workspace/didChangeConfiguration` notification.
-	 */
-	didChangeConfiguration?: {
-		/**
-		 * Did change configuration notification supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-	};
-
-	/**
-	 * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
-	 */
-	didChangeWatchedFiles?: {
-		/**
-		 * Did change watched files notification supports dynamic registration. Please note
-		 * that the current protocol doesn't support static configuration for file changes
-		 * from the server side.
-		 */
-		dynamicRegistration?: boolean;
-	};
-
-	/**
-	 * Capabilities specific to the `workspace/symbol` request.
-	 */
-	symbol?: {
-		/**
-		 * Symbol request supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
-		 */
-		symbolKind?: {
-			/**
-			 * The symbol kind values the client supports. When this
-			 * property exists the client also guarantees that it will
-			 * handle values outside its set gracefully and falls back
-			 * to a default value when unknown.
-			 *
-			 * If this property is not present the client only supports
-			 * the symbol kinds from `File` to `Array` as defined in
-			 * the initial version of the protocol.
-			 */
-			valueSet?: SymbolKind[];
-		}
-	};
-
-	/**
-	 * Capabilities specific to the `workspace/executeCommand` request.
-	 */
-	executeCommand?: {
-		/**
-		 * Execute command supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-	};
-
-	/**
-	 * The client has support for workspace folders.
-	 *
-	 * Since 3.6.0
-	 */
-	workspaceFolders?: boolean;
-
-	/**
-	 * The client supports `workspace/configuration` requests.
-	 *
-	 * Since 3.6.0
-	 */
-	configuration?: boolean;
-}
-```
 
 ##### `TextDocumentClientCapabilities` define capabilities the editor / tool provides on text documents.
 
@@ -1138,426 +1413,129 @@
  */
 export interface TextDocumentClientCapabilities {
 
-	synchronization?: {
-		/**
-		 * Whether text document synchronization supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * The client supports sending will save notifications.
-		 */
-		willSave?: boolean;
-
-		/**
-		 * The client supports sending a will save request and
-		 * waits for a response providing text edits which will
-		 * be applied to the document before it is saved.
-		 */
-		willSaveWaitUntil?: boolean;
-
-		/**
-		 * The client supports did save notifications.
-		 */
-		didSave?: boolean;
-	}
+	synchronization?: TextDocumentSyncClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/completion`
+	 * Capabilities specific to the `textDocument/completion` request.
 	 */
-	completion?: {
-		/**
-		 * Whether completion supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * The client supports the following `CompletionItem` specific
-		 * capabilities.
-		 */
-		completionItem?: {
-			/**
-			 * The client supports snippets as insert text.
-			 *
-			 * A snippet can define tab stops and placeholders with `$1`, `$2`
-			 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
-			 * the end of the snippet. Placeholders with equal identifiers are linked,
-			 * that is typing in one will update others too.
-			 */
-			snippetSupport?: boolean;
-
-			/**
-			 * The client supports commit characters on a completion item.
-			 */
-			commitCharactersSupport?: boolean
-
-			/**
-			 * The client supports the following content formats for the documentation
-			 * property. The order describes the preferred format of the client.
-			 */
-			documentationFormat?: MarkupKind[];
-
-			/**
-			 * The client supports the deprecated property on a completion item.
-			 */
-			deprecatedSupport?: boolean;
-
-			/**
-			 * The client supports the preselect property on a completion item.
-			 */
-			preselectSupport?: boolean;
-		}
-
-		completionItemKind?: {
-			/**
-			 * The completion item kind values the client supports. When this
-			 * property exists the client also guarantees that it will
-			 * handle values outside its set gracefully and falls back
-			 * to a default value when unknown.
-			 *
-			 * If this property is not present the client only supports
-			 * the completion items kinds from `Text` to `Reference` as defined in
-			 * the initial version of the protocol.
-			 */
-			valueSet?: CompletionItemKind[];
-		},
-
-		/**
-		 * The client supports to send additional context information for a
-		 * `textDocument/completion` request.
-		 */
-		contextSupport?: boolean;
-	};
+	completion?: CompletionClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/hover`
+	 * Capabilities specific to the `textDocument/hover` request.
 	 */
-	hover?: {
-		/**
-		 * Whether hover supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * The client supports the follow content formats for the content
-		 * property. The order describes the preferred format of the client.
-		 */
-		contentFormat?: MarkupKind[];
-	};
+	hover?: HoverClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/signatureHelp`
+	 * Capabilities specific to the `textDocument/signatureHelp` request.
 	 */
-	signatureHelp?: {
-		/**
-		 * Whether signature help supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * The client supports the following `SignatureInformation`
-		 * specific properties.
-		 */
-		signatureInformation?: {
-			/**
-			 * The client supports the follow content formats for the documentation
-			 * property. The order describes the preferred format of the client.
-			 */
-			documentationFormat?: MarkupKind[];
-
-			/**
-			 * Client capabilities specific to parameter information.
-			 */
-			parameterInformation?: {
-				/**
-				 * The client supports processing label offsets instead of a
-				 * simple label string.
-				 *
-				 * Since 3.14.0
-				 */
-				labelOffsetSupport?: boolean;
-			}
-		};
-	};
+	signatureHelp?: SignatureHelpClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/references`
-	 */
-	references?: {
-		/**
-		 * Whether references supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-	};
-
-	/**
-	 * Capabilities specific to the `textDocument/documentHighlight`
-	 */
-	documentHighlight?: {
-		/**
-		 * Whether document highlight supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-	};
-
-	/**
-	 * Capabilities specific to the `textDocument/documentSymbol`
-	 */
-	documentSymbol?: {
-		/**
-		 * Whether document symbol supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * Specific capabilities for the `SymbolKind`.
-		 */
-		symbolKind?: {
-			/**
-			 * The symbol kind values the client supports. When this
-			 * property exists the client also guarantees that it will
-			 * handle values outside its set gracefully and falls back
-			 * to a default value when unknown.
-			 *
-			 * If this property is not present the client only supports
-			 * the symbol kinds from `File` to `Array` as defined in
-			 * the initial version of the protocol.
-			 */
-			valueSet?: SymbolKind[];
-		}
-
-		/**
-		 * The client supports hierarchical document symbols.
-		 */
-		hierarchicalDocumentSymbolSupport?: boolean;
-	};
-
-	/**
-	 * Capabilities specific to the `textDocument/formatting`
-	 */
-	formatting?: {
-		/**
-		 * Whether formatting supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-	};
-
-	/**
-	 * Capabilities specific to the `textDocument/rangeFormatting`
-	 */
-	rangeFormatting?: {
-		/**
-		 * Whether range formatting supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-	};
-
-	/**
-	 * Capabilities specific to the `textDocument/onTypeFormatting`
-	 */
-	onTypeFormatting?: {
-		/**
-		 * Whether on type formatting supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-	};
-
-	/**
-		* Capabilities specific to the `textDocument/declaration`
-		*/
-	declaration?: {
-		/**
-		 * Whether declaration supports dynamic registration. If this is set to `true`
-		 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
-		 * return value for the corresponding server capability as well.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * The client supports additional metadata in the form of declaration links.
-		 *
-		 * Since 3.14.0
-		 */
-		linkSupport?: boolean;
-	};
-
-	/**
-	 * Capabilities specific to the `textDocument/definition`.
+	 * Capabilities specific to the `textDocument/declaration` request.
 	 *
-	 * Since 3.14.0
+	 * @since 3.14.0
 	 */
-	definition?: {
-		/**
-		 * Whether definition supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * The client supports additional metadata in the form of definition links.
-		 */
-		linkSupport?: boolean;
-	};
+	declaration?: DeclarationClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/typeDefinition`
+	 * Capabilities specific to the `textDocument/definition` request.
+	 */
+	definition?: DefinitionClientCapabilities;
+
+	/**
+	 * Capabilities specific to the `textDocument/typeDefinition` request.
 	 *
-	 * Since 3.6.0
+	 * @since 3.6.0
 	 */
-	typeDefinition?: {
-		/**
-		 * Whether typeDefinition supports dynamic registration. If this is set to `true`
-		 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
-		 * return value for the corresponding server capability as well.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * The client supports additional metadata in the form of definition links.
-		 *
-		 * Since 3.14.0
-		 */
-		linkSupport?: boolean;
-	};
+	typeDefinition?: TypeDefinitionClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/implementation`.
+	 * Capabilities specific to the `textDocument/implementation` request.
 	 *
-	 * Since 3.6.0
+	 * @since 3.6.0
 	 */
-	implementation?: {
-		/**
-		 * Whether implementation supports dynamic registration. If this is set to `true`
-		 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
-		 * return value for the corresponding server capability as well.
-		 */
-		dynamicRegistration?: boolean;
-
-		/**
-		 * The client supports additional metadata in the form of definition links.
-		 *
-		 * Since 3.14.0
-		 */
-		linkSupport?: boolean;
-	};
+	implementation?: ImplementationClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/codeAction`
+	 * Capabilities specific to the `textDocument/references` request.
 	 */
-	codeAction?: {
-		/**
-		 * Whether code action supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-		/**
-		 * The client support code action literals as a valid
-		 * response of the `textDocument/codeAction` request.
-		 *
-		 * Since 3.8.0
-		 */
-		codeActionLiteralSupport?: {
-			/**
-			 * The code action kind is support with the following value
-			 * set.
-			 */
-			codeActionKind: {
-
-				/**
-				 * The code action kind values the client supports. When this
-				 * property exists the client also guarantees that it will
-				 * handle values outside its set gracefully and falls back
-				 * to a default value when unknown.
-				 */
-				valueSet: CodeActionKind[];
-			};
-		};
-	};
+	references?: ReferenceClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/codeLens`
+	 * Capabilities specific to the `textDocument/documentHighlight` request.
 	 */
-	codeLens?: {
-		/**
-		 * Whether code lens supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-	};
+	documentHighlight?: DocumentHighlightClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/documentLink`
+	 * Capabilities specific to the `textDocument/documentSymbol` request.
 	 */
-	documentLink?: {
-		/**
-		 * Whether document link supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-	};
+	documentSymbol?: DocumentSymbolClientCapabilities;
+
+	/**
+	 * Capabilities specific to the `textDocument/codeAction` request.
+	 */
+	codeAction?: CodeActionClientCapabilities;
+
+	/**
+	 * Capabilities specific to the `textDocument/codeLens` request.
+	 */
+	codeLens?: CodeLensClientCapabilities;
+
+	/**
+	 * Capabilities specific to the `textDocument/documentLink` request.
+	 */
+	documentLink?: DocumentLinkClientCapabilities;
 
 	/**
 	 * Capabilities specific to the `textDocument/documentColor` and the
 	 * `textDocument/colorPresentation` request.
 	 *
-	 * Since 3.6.0
+	 * @since 3.6.0
 	 */
-	colorProvider?: {
-		/**
-		 * Whether colorProvider supports dynamic registration. If this is set to `true`
-		 * the client supports the new `(ColorProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions)`
-		 * return value for the corresponding server capability as well.
-		 */
-		dynamicRegistration?: boolean;
-	}
+	colorProvider?: DocumentColorClientCapabilities;
 
 	/**
-	 * Capabilities specific to the `textDocument/rename`
+	 * Capabilities specific to the `textDocument/formatting` request.
 	 */
-	rename?: {
-		/**
-		 * Whether rename supports dynamic registration.
-		 */
-		dynamicRegistration?: boolean;
-		/**
-		 * The client supports testing for validity of rename operations
-		 * before execution.
-		 */
-		prepareSupport?: boolean;
-	};
+	formatting?: DocumentFormattingClientCapabilities
 
 	/**
-	 * Capabilities specific to `textDocument/publishDiagnostics`.
+	 * Capabilities specific to the `textDocument/rangeFormatting` request.
 	 */
-	publishDiagnostics?: {
-		/**
-		 * Whether the clients accepts diagnostics with related information.
-		 */
-		relatedInformation?: boolean;
-	};
+	rangeFormatting?: DocumentRangeFormattingClientCapabilities;
+
+	/** request.
+	 * Capabilities specific to the `textDocument/onTypeFormatting` request.
+	 */
+	onTypeFormatting?: DocumentOnTypeFormattingClientCapabilities;
+
 	/**
-	 * Capabilities specific to `textDocument/foldingRange` requests.
+	 * Capabilities specific to the `textDocument/rename` request.
+	 */
+	rename?: RenameClientCapabilities;
+
+	/**
+	 * Capabilities specific to the `textDocument/publishDiagnostics` notification.
+	 */
+	publishDiagnostics?: PublishDiagnosticsClientCapabilities;
+
+	/**
+	 * Capabilities specific to the `textDocument/foldingRange` request.
 	 *
-	 * Since 3.10.0
+	 * @since 3.10.0
 	 */
-	foldingRange?: {
-		/**
-		 * Whether implementation supports dynamic registration for folding range providers. If this is set to `true`
-		 * the client supports the new `(FoldingRangeProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions)`
-		 * return value for the corresponding server capability as well.
-		 */
-		dynamicRegistration?: boolean;
-		/**
-		 * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
-		 * hint, servers are free to follow the limit.
-		 */
-		rangeLimit?: number;
-		/**
-		 * If set, the client signals that it only supports folding complete lines. If set, client will
-		 * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
-		 */
-		lineFoldingOnly?: boolean;
-	};
+	foldingRange?: FoldingRangeClientCapabilities;
+
+	/**
+	 * Capabilities specific to the `textDocument/selectionRange` request.
+	 *
+	 * @since 3.15.0
+	 */
+	selectionRange?: SelectionRangeClientCapabilities;
 }
 ```
 
-`ClientCapabilities` now define capabilities for dynamic registration, workspace and text document features the client supports. The `experimental` can be used to pass experimental capabilities under development. For future compatibility a `ClientCapabilities` object literal can have more properties set than currently defined. Servers receiving a `ClientCapabilities` object literal with unknown properties should ignore these properties. A missing property should be interpreted as an absence of the capability. If a missing property normally defines sub properties, all missing sub properties should be interpreted as an absence of the corresponding capability.
+`ClientCapabilities` define capabilities for dynamic registration, workspace and text document features the client supports. The `experimental` can be used to pass experimental capabilities under development. For future compatibility a `ClientCapabilities` object literal can have more properties set than currently defined. Servers receiving a `ClientCapabilities` object literal with unknown properties should ignore these properties. A missing property should be interpreted as an absence of the capability. If a missing property normally defines sub properties, all missing sub properties should be interpreted as an absence of the corresponding capability.
 
 Client capabilities got introduced with version 3.0 of the protocol. They therefore only describe capabilities that got introduced in 3.x or later. Capabilities that existed in the 2.x version of the protocol are still mandatory for clients. Clients cannot opt out of providing them. So even if a client omits the `ClientCapabilities.textDocument.synchronization` it is still required that the client provides text document synchronization (e.g. open, changed and close notifications).
 
@@ -1566,7 +1544,53 @@
 	/**
 	 * Workspace specific client capabilities.
 	 */
-	workspace?: WorkspaceClientCapabilities;
+	workspace?: {
+		/**
+		* The client supports applying batch edits
+		* to the workspace by supporting the request
+		* 'workspace/applyEdit'
+		*/
+		applyEdit?: boolean;
+
+		/**
+		* Capabilities specific to `WorkspaceEdit`s
+		*/
+		workspaceEdit?: WorkspaceEditClientCapabilities;
+
+		/**
+		* Capabilities specific to the `workspace/didChangeConfiguration` notification.
+		*/
+		didChangeConfiguration?: DidChangeConfigurationClientCapabilities;
+
+		/**
+		* Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
+		*/
+		didChangeWatchedFiles?: DidChangeWatchedFilesClientCapabilities;
+
+		/**
+		* Capabilities specific to the `workspace/symbol` request.
+		*/
+		symbol?: WorkspaceSymbolClientCapabilities;
+
+		/**
+		* Capabilities specific to the `workspace/executeCommand` request.
+		*/
+		executeCommand?: ExecuteCommandClientCapabilities;
+
+		/**
+		* The client has support for workspace folders.
+		*
+		* Since 3.6.0
+		*/
+		workspaceFolders?: boolean;
+
+		/**
+		* The client supports `workspace/configuration` requests.
+		*
+		* Since 3.6.0
+		*/
+		configuration?: boolean;
+	};
 
 	/**
 	 * Text document specific client capabilities.
@@ -1574,6 +1598,19 @@
 	textDocument?: TextDocumentClientCapabilities;
 
 	/**
+	 * Window specific client capabilities.
+	 */
+	window?: {
+		/**
+		 * Whether client supports handling progress notifications. If set servers are allowed to
+		 * report in `workDoneProgress` property in the request specific server capabilities.
+		 *
+		 * Since 3.15.0
+		 */
+		workDoneProgress?: boolean;
+	}
+
+	/**
 	 * Experimental client capabilities.
 	 */
 	experimental?: any;
@@ -1589,6 +1626,23 @@
 	 * The capabilities the language server provides.
 	 */
 	capabilities: ServerCapabilities;
+
+	/**
+	 * Information about the server.
+	 *
+	 * @since 3.15.0
+	 */
+	serverInfo?: {
+		/**
+		 * The name of the server as defined by the server.
+		 */
+		name: string;
+
+		/**
+		 * The server's version as defined by the server.
+		 */
+		version?: string;
+	};
 }
 ```
 * error.code:
@@ -1624,288 +1678,139 @@
 The server can signal the following capabilities:
 
 ```typescript
-/**
- * Defines how the host (editor) should sync document changes to the language server.
- */
-export namespace TextDocumentSyncKind {
-	/**
-	 * Documents should not be synced at all.
-	 */
-	export const None = 0;
-
-	/**
-	 * Documents are synced by always sending the full content
-	 * of the document.
-	 */
-	export const Full = 1;
-
-	/**
-	 * Documents are synced by sending the full content on open.
-	 * After that only incremental updates to the document are
-	 * send.
-	 */
-	export const Incremental = 2;
-}
-
-/**
- * Completion options.
- */
-export interface CompletionOptions {
-	/**
-	 * The server provides support to resolve additional
-	 * information for a completion item.
-	 */
-	resolveProvider?: boolean;
-
-	/**
-	 * The characters that trigger completion automatically.
-	 */
-	triggerCharacters?: string[];
-}
-/**
- * Signature help options.
- */
-export interface SignatureHelpOptions {
-	/**
-	 * The characters that trigger signature help
-	 * automatically.
-	 */
-	triggerCharacters?: string[];
-}
-
-/**
- * Code Action options.
- */
-export interface CodeActionOptions {
-	/**
-	 * CodeActionKinds that this server may return.
-	 *
-	 * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
-	 * may list out every specific kind they provide.
-	 */
-	codeActionKinds?: CodeActionKind[];
-}
-
-/**
- * Code Lens options.
- */
-export interface CodeLensOptions {
-	/**
-	 * Code lens has a resolve provider as well.
-	 */
-	resolveProvider?: boolean;
-}
-
-/**
- * Format document on type options.
- */
-export interface DocumentOnTypeFormattingOptions {
-	/**
-	 * A character on which formatting should be triggered, like `}`.
-	 */
-	firstTriggerCharacter: string;
-
-	/**
-	 * More trigger characters.
-	 */
-	moreTriggerCharacter?: string[];
-}
-
-/**
- * Rename options
- */
-export interface RenameOptions {
-	/**
-	 * Renames should be checked and tested before being executed.
-	 */
-	prepareProvider?: boolean;
-}
-
-/**
- * Document link options.
- */
-export interface DocumentLinkOptions {
-	/**
-	 * Document links have a resolve provider as well.
-	 */
-	resolveProvider?: boolean;
-}
-
-/**
- * Execute command options.
- */
-export interface ExecuteCommandOptions {
-	/**
-	 * The commands to be executed on the server
-	 */
-	commands: string[]
-}
-
-/**
- * Save options.
- */
-export interface SaveOptions {
-	/**
-	 * The client is supposed to include the content on save.
-	 */
-	includeText?: boolean;
-}
-
-/**
- * Color provider options.
- */
-export interface ColorProviderOptions {
-}
-
-/**
- * Folding range provider options.
- */
-export interface FoldingRangeProviderOptions {
-}
-
-export interface TextDocumentSyncOptions {
-	/**
-	 * Open and close notifications are sent to the server. If omitted open close notification should not
-	 * be sent.
-	 */
-	openClose?: boolean;
-	/**
-	 * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
-	 * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
-	 */
-	change?: number;
-	/**
-	 * If present will save notifications are sent to the server. If omitted the notification should not be
-	 * sent.
-	 */
-	willSave?: boolean;
-	/**
-	 * If present will save wait until requests are sent to the server. If omitted the request should not be
-	 * sent.
-	 */
-	willSaveWaitUntil?: boolean;
-	/**
-	 * If present save notifications are sent to the server. If omitted the notification should not be
-	 * sent.
-	 */
-	save?: SaveOptions;
-}
-
-/**
- * Static registration options to be returned in the initialize request.
- */
-interface StaticRegistrationOptions {
-	/**
-	 * The id used to register the request. The id can be used to deregister
-	 * the request again. See also Registration#id.
-	 */
-	id?: string;
-}
-
 interface ServerCapabilities {
 	/**
 	 * Defines how text documents are synced. Is either a detailed structure defining each notification or
 	 * for backwards compatibility the TextDocumentSyncKind number. If omitted it defaults to `TextDocumentSyncKind.None`.
 	 */
 	textDocumentSync?: TextDocumentSyncOptions | number;
-	/**
-	 * The server provides hover support.
-	 */
-	hoverProvider?: boolean;
+
 	/**
 	 * The server provides completion support.
 	 */
 	completionProvider?: CompletionOptions;
+
+	/**
+	 * The server provides hover support.
+	 */
+	hoverProvider?: boolean | HoverOptions;
+
 	/**
 	 * The server provides signature help support.
 	 */
 	signatureHelpProvider?: SignatureHelpOptions;
+
+	/**
+	 * The server provides go to declaration support.
+	 *
+	 * @since 3.14.0
+	 */
+	declarationProvider?: boolean | DeclarationOptions | DeclarationRegistrationOptions;
+
 	/**
 	 * The server provides goto definition support.
 	 */
-	definitionProvider?: boolean;
+	definitionProvider?: boolean | DefinitionOptions;
+
 	/**
-	 * The server provides Goto Type Definition support.
+	 * The server provides goto type definition support.
 	 *
-	 * Since 3.6.0
+	 * @since 3.6.0
 	 */
-	typeDefinitionProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions);
+	typeDefinitionProvider?: boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions;
+
 	/**
-	 * The server provides Goto Implementation support.
+	 * The server provides goto implementation support.
 	 *
-	 * Since 3.6.0
+	 * @since 3.6.0
 	 */
-	implementationProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions);
+	implementationProvider?: boolean | ImplementationOptions | ImplementationRegistrationOptions;
+
 	/**
 	 * The server provides find references support.
 	 */
-	referencesProvider?: boolean;
+	referencesProvider?: boolean | ReferenceOptions;
+
 	/**
 	 * The server provides document highlight support.
 	 */
-	documentHighlightProvider?: boolean;
+	documentHighlightProvider?: boolean | DocumentHighlightOptions;
+
 	/**
 	 * The server provides document symbol support.
 	 */
-	documentSymbolProvider?: boolean;
-	/**
-	 * The server provides workspace symbol support.
-	 */
-	workspaceSymbolProvider?: boolean;
+	documentSymbolProvider?: boolean | DocumentSymbolOptions;
+
 	/**
 	 * The server provides code actions. The `CodeActionOptions` return type is only
 	 * valid if the client signals code action literal support via the property
 	 * `textDocument.codeAction.codeActionLiteralSupport`.
 	 */
 	codeActionProvider?: boolean | CodeActionOptions;
+
 	/**
 	 * The server provides code lens.
 	 */
 	codeLensProvider?: CodeLensOptions;
+
+	/**
+	 * The server provides document link support.
+	 */
+	documentLinkProvider?: DocumentLinkOptions;
+
+	/**
+	 * The server provides color provider support.
+	 *
+	 * @since 3.6.0
+	 */
+	colorProvider?: boolean | DocumentColorOptions | DocumentColorRegistrationOptions;
+
 	/**
 	 * The server provides document formatting.
 	 */
-	documentFormattingProvider?: boolean;
+	documentFormattingProvider?: boolean | DocumentFormattingOptions;
+
 	/**
 	 * The server provides document range formatting.
 	 */
-	documentRangeFormattingProvider?: boolean;
+	documentRangeFormattingProvider?: boolean | DocumentRangeFormattingOptions;
+
 	/**
 	 * The server provides document formatting on typing.
 	 */
 	documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions;
+
 	/**
 	 * The server provides rename support. RenameOptions may only be
 	 * specified if the client states that it supports
 	 * `prepareSupport` in its initial `initialize` request.
 	 */
 	renameProvider?: boolean | RenameOptions;
-	/**
-	 * The server provides document link support.
-	 */
-	documentLinkProvider?: DocumentLinkOptions;
-	/**
-	 * The server provides color provider support.
-	 *
-	 * Since 3.6.0
-	 */
-	colorProvider?: boolean | ColorProviderOptions | (ColorProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions);
+
 	/**
 	 * The server provides folding provider support.
 	 *
-	 * Since 3.10.0
+	 * @since 3.10.0
 	 */
-	foldingRangeProvider?: boolean | FoldingRangeProviderOptions | (FoldingRangeProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions);
-	/**
-	 * The server provides go to declaration support.
-	 *
-	 * Since 3.14.0
-	 */
-	declarationProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions);
+	foldingRangeProvider?: boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions;
+
 	/**
 	 * The server provides execute command support.
 	 */
 	executeCommandProvider?: ExecuteCommandOptions;
+
+	/**
+	 * The server provides selection range support.
+	 *
+	 * @since 3.15.0
+	 */
+	selectionRangeProvider?: boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions;
+
+	/**
+	 * The server provides workspace symbol support.
+	 */
+	workspaceSymbolProvider?: boolean;
+
 	/**
 	 * Workspace specific server capabilities
 	 */
@@ -1913,25 +1818,11 @@
 		/**
 		 * The server supports workspace folder.
 		 *
-		 * Since 3.6.0
+		 * @since 3.6.0
 		 */
-		workspaceFolders?: {
-			/**
-			* The server has support for workspace folders
-			*/
-			supported?: boolean;
-			/**
-			* Whether the server wants to receive workspace folder
-			* change notifications.
-			*
-			* If a strings is provided the string is treated as a ID
-			* under which the notification is registered on the client
-			* side. The ID can be used to unregister for these events
-			* using the `client/unregisterCapability` request.
-			*/
-			changeNotifications?: string | boolean;
-		}
+		workspaceFolders?: WorkspaceFoldersServerCapabilities;
 	}
+
 	/**
 	 * Experimental server capabilities.
 	 */
@@ -1954,7 +1845,7 @@
 
 #### <a href="#shutdown" name="shutdown" class="anchor">Shutdown Request (:leftwards_arrow_with_hook:)</a>
 
-The shutdown request is sent from the client to the server. It asks the server to shut down, but to not exit (otherwise the response might not be delivered correctly to the client). There is a separate exit notification that asks the server to exit. Clients must not send any notifications other than `exit` or requests to a server to which they have sent a shutdown requests. If a server receives requests after a shutdown request those requests should be errored with `InvalidRequest`.
+The shutdown request is sent from the client to the server. It asks the server to shut down, but to not exit (otherwise the response might not be delivered correctly to the client). There is a separate exit notification that asks the server to exit. Clients must not send any notifications other than `exit` or requests to a server to which they have sent a shutdown request. If a server receives requests after a shutdown request those requests should error with `InvalidRequest`.
 
 _Request_:
 * method: 'shutdown'
@@ -2082,7 +1973,46 @@
 }
 ```
 
-Where type is defined as above.
+#### <a href="#window_workDoneProgress_create" name="window_workDoneProgress_create" class="anchor"> Creating Work Done Progress (:arrow_right_hook:)</a>
+
+The `window/workDoneProgress/create` request is sent from the server to the client to ask the client to create a work done progress.
+
+_Request_:
+
+* method: 'window/workDoneProgress/create'
+* params: `WorkDoneProgressCreateParams` defined as follows:
+
+```typescript
+export interface WorkDoneProgressCreateParams {
+	/**
+	 * The token to be used to report progress.
+	 */
+	token: ProgressToken;
+}
+```
+
+_Response_:
+
+* result: void
+* error: code and message set in case an exception happens during the 'window/workDoneProgress/create' request. In case an error occurs a server must not send any progress notification using the token provided in the `WorkDoneProgressCreateParams`.
+
+#### <a href="#window_workDoneProgress_cancel" name="window_workDoneProgress_cancel" class="anchor"> Canceling a Work Done Progress (:arrow_right:)</a>
+
+The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress initiated on the server side using the `window/workDoneProgress/create`.
+
+_Notification_:
+
+* method: 'window/workDoneProgress/cancel'
+* params: `WorkDoneProgressCancelParams` defined as follows:
+
+```typescript
+export interface WorkDoneProgressCancelParams {
+	/**
+	 * The token to be used to report progress.
+	 */
+	token: ProgressToken;
+}
+```
 
 #### <a href="#telemetry_event" name="telemetry_event" class="anchor">Telemetry Notification (:arrow_left:)</a>
 
@@ -2096,6 +2026,8 @@
 
 The `client/registerCapability` request is sent from the server to the client to register for a new capability on the client side. Not all clients need to support dynamic capability registration. A client opts in via the `dynamicRegistration` property on the specific client capabilities. A client can even provide dynamic registration for capability A but not for capability B (see `TextDocumentClientCapabilities` as an example).
 
+Server must not register the same capability both statically through the initialize result and dynamically for the same document selector. If a server wants to support both static and dynamic registration it needs to check the client capability in the initialize request and only register the capability statically if the client doesn't support dynamic registration for that capability.
+
 _Request_:
 * method: 'client/registerCapability'
 * params: `RegistrationParams`
@@ -2129,17 +2061,7 @@
 }
 ```
 
-Since most of the registration options require to specify a document selector there is a base interface that can be used.
-
-```typescript
-export interface TextDocumentRegistrationOptions {
-	/**
-	 * A document selector to identify the scope of the registration. If set to null
-	 * the document selector provided on the client side will be used.
-	 */
-	documentSelector: DocumentSelector | null;
-}
-```
+Since most of the registration options require to specify a document selector there is a base interface that can be used. See `TextDocumentRegistrationOptions`.
 
 An example JSON RPC message to register dynamically for the `textDocument/willSaveWaitUntil` feature on the client side is as follows (only details shown):
 
@@ -2196,6 +2118,9 @@
 }
 
 export interface UnregistrationParams {
+	// This should correctly be named `unregistrations`. However changing this
+	// is a breaking change and needs to wait until we deliver a 4.x version
+	// of the specification.
 	unregisterations: Unregistration[];
 }
 ```
@@ -2227,13 +2152,39 @@
 
 The `workspace/workspaceFolders` request is sent from the server to the client to fetch the current open list of workspace folders. Returns `null` in the response if only a single file is open in the tool. Returns an empty array if a workspace is open but no folders are configured.
 
-_Request_:
+_Client Capability_:
+* property path (optional): `workspace.workspaceFolders`
+* property type: `boolean`
 
+_Server Capability_:
+* property path (optional): `workspace.workspaceFolders`
+* property type: `WorkspaceFoldersServerCapabilities` defined as follows:
+
+```typescript
+export interface WorkspaceFoldersServerCapabilities {
+	/**
+	 * The server has support for workspace folders
+	 */
+	supported?: boolean;
+
+	/**
+	 * Whether the server wants to receive workspace folder
+	 * change notifications.
+	 *
+	 * If a string is provided, the string is treated as an ID
+	 * under which the notification is registered on the client
+	 * side. The ID can be used to unregister for these events
+	 * using the `client/unregisterCapability` request.
+	 */
+	changeNotifications?: string | boolean;
+}
+```
+
+_Request_:
 * method: 'workspace/workspaceFolders'
 * params: none
 
 _Response_:
-
 * result: `WorkspaceFolder[] | null` defined as follows:
 
 ```typescript
@@ -2256,7 +2207,7 @@
 
 > *Since version 3.6.0*
 
-The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server to inform the server about workspace folder configuration changes. The notification is sent by default if both _ServerCapabilities/workspace/workspaceFolders_ and _ClientCapabilities/workspace/workspaceFolders_ are true; or if the server has registered itself to receive this notification. To register for the `workspace/didChangeWorkspaceFolders` send a `client/registerCapability` request from the server to the client. The registration parameter must have a `registrations` item of the following form, where `id` is a unique id used to unregister the capability (the example uses a UUID):
+The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server to inform the server about workspace folder configuration changes. The notification is sent by default if both _client capability_ `workspace.workspaceFolders` and the _server capability_ `workspace.workspaceFolders.supported` are true; or if the server has registered itself to receive this notification. To register for the `workspace/didChangeWorkspaceFolders` send a `client/registerCapability` request from the server to the client. The registration parameter must have a `registrations` item of the following form, where `id` is a unique id used to unregister the capability (the example uses a UUID):
 ```ts
 {
 	id: "28c6150c-bd7b-11e7-abc4-cec278b6b50a",
@@ -2265,7 +2216,6 @@
 ```
 
 _Notification_:
-
 * method: 'workspace/didChangeWorkspaceFolders'
 * params: `DidChangeWorkspaceFoldersParams` defined as follows:
 
@@ -2297,6 +2247,19 @@
 
 A notification sent from the client to the server to signal the change of configuration settings.
 
+_Client Capability_:
+* property path (optional): `workspace.didChangeConfiguration`
+* property type: `DidChangeConfigurationClientCapabilities` defined as follows:
+
+```typescript
+export interface DidChangeConfigurationClientCapabilities {
+	/**
+	 * Did change configuration notification supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
 _Notification_:
 * method: 'workspace/didChangeConfiguration',
 * params: `DidChangeConfigurationParams` defined as follows:
@@ -2318,8 +2281,11 @@
 
 A `ConfigurationItem` consists of the configuration section to ask for and an additional scope URI. The configuration section ask for is defined by the server and doesn't necessarily need to correspond to the configuration store used be the client. So a server might ask for a configuration `cpp.formatterOptions` but the client stores the configuration in a XML store layout differently. It is up to the client to do the necessary conversion. If a scope URI is provided the client should return the setting scoped to the provided resource. If the client for example uses [EditorConfig](http://editorconfig.org/) to manage its settings the configuration should be returned for the passed resource URI. If the client can't provide a configuration setting for a given scope then `null` need to be present in the returned array.
 
-_Request_:
+_Client Capability_:
+* property path (optional): `workspace.configuration`
+* property type: `boolean`
 
+_Request_:
 * method: 'workspace/configuration'
 * params: `ConfigurationParams` defined as follows
 
@@ -2356,58 +2322,22 @@
 - a client usually starts more than one server. If every server runs its own file watching it can become a CPU or memory problem.
 - in general there are more server than client implementations. So this problem is better solved on the client side.
 
-
-_Notification_:
-* method: 'workspace/didChangeWatchedFiles'
-* params: `DidChangeWatchedFilesParams` defined as follows:
+_Client Capability_:
+* property path (optional): `workspace.didChangeWatchedFiles`
+* property type: `DidChangeWatchedFilesClientCapabilities` defined as follows:
 
 ```typescript
-interface DidChangeWatchedFilesParams {
+export interface DidChangeWatchedFilesClientCapabilities {
 	/**
-	 * The actual file events.
+	 * Did change watched files notification supports dynamic registration. Please note
+	 * that the current protocol doesn't support static configuration for file changes
+	 * from the server side.
 	 */
-	changes: FileEvent[];
+	dynamicRegistration?: boolean;
 }
 ```
 
-Where FileEvents are described as follows:
-
-```typescript
-/**
- * An event describing a file change.
- */
-interface FileEvent {
-	/**
-	 * The file's URI.
-	 */
-	uri: DocumentUri;
-	/**
-	 * The change type.
-	 */
-	type: number;
-}
-
-/**
- * The file event type.
- */
-export namespace FileChangeType {
-	/**
-	 * The file got created.
-	 */
-	export const Created = 1;
-	/**
-	 * The file got changed.
-	 */
-	export const Changed = 2;
-	/**
-	 * The file got deleted.
-	 */
-	export const Deleted = 3;
-}
-```
-
-_Registration Options_: `DidChangeWatchedFilesRegistrationOptions` defined as follows
-
+_Registration Options_: `DidChangeWatchedFilesRegistrationOptions` defined as follows:
 ```typescript
 /**
  * Describe options to be used when registering for file system change events.
@@ -2459,10 +2389,104 @@
 }
 ```
 
+_Notification_:
+* method: 'workspace/didChangeWatchedFiles'
+* params: `DidChangeWatchedFilesParams` defined as follows:
+
+```typescript
+interface DidChangeWatchedFilesParams {
+	/**
+	 * The actual file events.
+	 */
+	changes: FileEvent[];
+}
+```
+
+Where FileEvents are described as follows:
+
+```typescript
+/**
+ * An event describing a file change.
+ */
+interface FileEvent {
+	/**
+	 * The file's URI.
+	 */
+	uri: DocumentUri;
+	/**
+	 * The change type.
+	 */
+	type: number;
+}
+
+/**
+ * The file event type.
+ */
+export namespace FileChangeType {
+	/**
+	 * The file got created.
+	 */
+	export const Created = 1;
+	/**
+	 * The file got changed.
+	 */
+	export const Changed = 2;
+	/**
+	 * The file got deleted.
+	 */
+	export const Deleted = 3;
+}
+```
+
 #### <a href="#workspace_symbol" name="workspace_symbol" class="anchor">Workspace Symbols Request (:leftwards_arrow_with_hook:)</a>
 
 The workspace symbol request is sent from the client to the server to list project-wide symbols matching the query string.
 
+_Client Capability_:
+* property path (optional): `workspace.symbol`
+* property type: `WorkspaceSymbolClientCapabilities` defined as follows:
+
+```typescript
+interface WorkspaceSymbolClientCapabilities {
+	/**
+	 * Symbol request supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
+	 */
+	symbolKind?: {
+		/**
+		 * The symbol kind values the client supports. When this
+		 * property exists the client also guarantees that it will
+		 * handle values outside its set gracefully and falls back
+		 * to a default value when unknown.
+		 *
+		 * If this property is not present the client only supports
+		 * the symbol kinds from `File` to `Array` as defined in
+		 * the initial version of the protocol.
+		 */
+		valueSet?: SymbolKind[];
+	}
+}
+```
+
+_Server Capability_:
+* property path (optional): `workspaceSymbolProvider`
+* property type: `boolean | WorkspaceSymbolOptions` where `WorkspaceSymbolOptions` is defined as follows:
+
+```typescript
+export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `WorkspaceSymbolRegistrationOptions` defined as follows:
+```typescript
+export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptions {
+}
+```
+
 _Request_:
 * method: 'workspace/symbol'
 * params: `WorkspaceSymbolParams` defined as follows:
@@ -2471,9 +2495,10 @@
 /**
  * The parameters of a Workspace Symbol Request.
  */
-interface WorkspaceSymbolParams {
+interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialResultParams {
 	/**
-	 * A non-empty query string
+	 * A query string to filter symbols by. Clients may send an empty
+	 * string here to request all symbols.
 	 */
 	query: string;
 }
@@ -2481,23 +2506,56 @@
 
 _Response_:
 * result: `SymbolInformation[]` \| `null` as defined above.
+* partial result: `SymbolInformation[]` as defined above.
 * error: code and message set in case an exception happens during the workspace symbol request.
 
-_Registration Options_: void
-
-
 #### <a href="#workspace_executeCommand" name="workspace_executeCommand" class="anchor">Execute a command (:leftwards_arrow_with_hook:)</a>
 
 The `workspace/executeCommand` request is sent from the client to the server to trigger command execution on the server. In most cases
 the server creates a `WorkspaceEdit` structure and applies the changes to the workspace using the request `workspace/applyEdit` which is
 sent from the server to the client.
 
+_Client Capability_:
+* property path (optional): `workspace.executeCommand`
+* property type: `ExecuteCommandClientCapabilities` defined as follows:
+
+```typescript
+export interface ExecuteCommandClientCapabilities {
+	/**
+	 * Execute command supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
+_Server Capability_:
+* property path (optional): `executeCommandProvider`
+* property type: `ExecuteCommandOptions` defined as follows:
+
+```typescript
+export interface ExecuteCommandOptions extends WorkDoneProgressOptions {
+	/**
+	 * The commands to be executed on the server
+	 */
+	commands: string[]
+}
+```
+
+_Registration Options_: `ExecuteCommandRegistrationOptions` defined as follows:
+```typescript
+/**
+ * Execute command registration options.
+ */
+export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions {
+}
+```
+
 _Request:_
 * method: 'workspace/executeCommand'
 * params: `ExecuteCommandParams` defined as follows:
 
 ```typescript
-export interface ExecuteCommandParams {
+export interface ExecuteCommandParams extends WorkDoneProgressParams {
 
 	/**
 	 * The identifier of the actual command handler.
@@ -2516,25 +2574,16 @@
 * result: `any` \| `null`
 * error: code and message set in case an exception happens during the request.
 
-_Registration Options_: `ExecuteCommandRegistrationOptions` defined as follows:
-
-```typescript
-/**
- * Execute command registration options.
- */
-export interface ExecuteCommandRegistrationOptions {
-	/**
-	 * The commands to be executed on the server
-	 */
-	commands: string[]
-}
-```
-
-
 #### <a href="#workspace_applyEdit" name="workspace_applyEdit" class="anchor">Applies a WorkspaceEdit (:arrow_right_hook:)</a>
 
 The `workspace/applyEdit` request is sent from the server to the client to modify resource on the client side.
 
+_Client Capability_:
+* property path (optional): `workspace.applyEdit`
+* property type: `boolean`
+
+See also the [WorkspaceEditClientCapabilities](#workspaceEditClientCapabilities) for the supported capabilities of a workspace edit.
+
 _Request_:
 * method: 'workspace/applyEdit'
 * params: `ApplyWorkspaceEditParams` defined as follows:
@@ -2576,13 +2625,73 @@
 ```
 * error: code and message set in case an exception happens during the request.
 
+#### <a href="#textDocument_synchronization" name="textDocument_synchronization" class="anchor">Text Document Synchronization</a>
+
+Client support for `textDocument/open`, `textDocument/change` and `textDocument/close` notifications is mandatory in the protocol and clients can not opt out supporting them. This includes both full and incremental syncronization in the `textDocument/change` notification. In addition a server must either implement all three of them or none. Their capabilities are therefore controlled via a combined client and server capability.
+
+<a href="#textDocument_synchronization_cc" name="textDocument_synchronization_cc" class="anchor"></a>_Client Capability_:
+* property path (optional): `textDocument.synchronization.dynamicRegistration`
+* property type: `boolean`
+
+Controls whether text document synchronization supports dynamic registration.
+
+<a href="#textDocument_synchronization_sc" name="textDocument_synchronization_sc" class="anchor"></a>_Server Capability_:
+* property path (optional): `textDocumentSync`
+* property type: `TextDocumentSyncKind | TextDocumentSyncOptions`. The below definition of the `TextDocumentSyncOptions` only covers the properties specific to the open, change and close notifications. A complete definition covering all properties can be found [here](#textDocument_didClose):
+
+```typescript
+/**
+ * Defines how the host (editor) should sync document changes to the language server.
+ */
+export namespace TextDocumentSyncKind {
+	/**
+	 * Documents should not be synced at all.
+	 */
+	export const None = 0;
+
+	/**
+	 * Documents are synced by always sending the full content
+	 * of the document.
+	 */
+	export const Full = 1;
+
+	/**
+	 * Documents are synced by sending the full content on open.
+	 * After that only incremental updates to the document are
+	 * send.
+	 */
+	export const Incremental = 2;
+}
+
+export interface TextDocumentSyncOptions {
+	/**
+	 * Open and close notifications are sent to the server. If omitted open close notification should not
+	 * be sent.
+	 */
+	openClose?: boolean;
+
+	/**
+	 * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
+	 * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
+	 */
+	change?: TextDocumentSyncKind;
+}
+```
 
 #### <a href="#textDocument_didOpen" name="textDocument_didOpen" class="anchor">DidOpenTextDocument Notification (:arrow_right:)</a>
 
-The document open notification is sent from the client to the server to signal newly opened text documents. The document's truth is now managed by the client and the server must not try to read the document's truth using the document's Uri. Open in this sense means it is managed by the client. It doesn't necessarily mean that its content is presented in an editor. An open notification must not be sent more than once without a corresponding close notification send before. This means open and close notification must be balanced and the max open count for a particular textDocument is one. Note that a server's ability to fulfill requests is independent of whether a text document is open or closed.
+The document open notification is sent from the client to the server to signal newly opened text documents. The document's content is now managed by the client and the server must not try to read the document's content using the document's Uri. Open in this sense means it is managed by the client. It doesn't necessarily mean that its content is presented in an editor. An open notification must not be sent more than once without a corresponding close notification send before. This means open and close notification must be balanced and the max open count for a particular textDocument is one. Note that a server's ability to fulfill requests is independent of whether a text document is open or closed.
 
 The `DidOpenTextDocumentParams` contain the language id the document is associated with. If the language Id of a document changes, the client needs to send a `textDocument/didClose` to the server followed by a `textDocument/didOpen` with the new language id if the server handles the new language id as well.
 
+_Client Capability_:
+See general synchronization [client capabilities](#textDocument_synchronization_cc).
+
+_Server Capability_:
+See general synchronization [server capabilities](#textDocument_synchronization_sc).
+
+_Registration Options_: [`TextDocumentRegistrationOptions`](#textDocumentRegistrationOptions)
+
 _Notification_:
 * method: 'textDocument/didOpen'
 * params: `DidOpenTextDocumentParams` defined as follows:
@@ -2596,12 +2705,29 @@
 }
 ```
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
-
 #### <a href="#textDocument_didChange" name="textDocument_didChange" class="anchor">DidChangeTextDocument Notification (:arrow_right:)</a>
 
-The document change notification is sent from the client to the server to signal changes to a text document. In 2.0 the shape of the params has changed to include proper version numbers and language ids.
+The document change notification is sent from the client to the server to signal changes to a text document. Before a client can change a text document it must claim ownership of its content using the `textDocument/didOpen` notification. In 2.0 the shape of the params has changed to include proper version numbers and language ids.
+
+_Client Capability_:
+See general synchronization [client capabilities](#textDocument_synchronization_cc).
+
+_Server Capability_:
+See general synchronization [server capabilities](#textDocument_synchronization_sc).
+
+_Registration Options_: `TextDocumentChangeRegistrationOptions` defined as follows:
+```typescript
+/**
+ * Describe options to be used when registering for text document change events.
+ */
+export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions {
+	/**
+	 * How documents are synced to the server. See TextDocumentSyncKind.Full
+	 * and TextDocumentSyncKind.Incremental.
+	 */
+	syncKind: TextDocumentSyncKind;
+}
+```
 
 _Notification_:
 * method: 'textDocument/didChange'
@@ -2618,8 +2744,16 @@
 
 	/**
 	 * The actual content changes. The content changes describe single state changes
-	 * to the document. So if there are two content changes c1 and c2 for a document
-	 * in state S then c1 move the document to S' and c2 to S''.
+	 * to the document. So if there are two content changes c1 (at array index 0) and
+	 * c2 (at array index 1) for a document in state S then c1 moves the document from
+	 * S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
+	 * on the state S'.
+	 *
+	 * To mirror the content of a document using change events use the following approach:
+	 * - start with the same initial content
+	 * - apply the 'textDocument/didChange' notifications in the order you recevie them.
+	 * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
+	 *   you receive them.
 	 */
 	contentChanges: TextDocumentContentChangeEvent[];
 }
@@ -2628,44 +2762,49 @@
  * An event describing a change to a text document. If range and rangeLength are omitted
  * the new text is considered to be the full content of the document.
  */
-interface TextDocumentContentChangeEvent {
+export type TextDocumentContentChangeEvent = {
 	/**
 	 * The range of the document that changed.
 	 */
-	range?: Range;
+	range: Range;
 
 	/**
-	 * The length of the range that got replaced.
+	 * The optional length of the range that got replaced.
+	 *
+	 * @deprecated use range instead.
 	 */
 	rangeLength?: number;
 
 	/**
-	 * The new text of the range/document.
+	 * The new text for the provided range.
+	 */
+	text: string;
+} | {
+	/**
+	 * The new text of the whole document.
 	 */
 	text: string;
 }
 ```
 
-_Registration Options_: `TextDocumentChangeRegistrationOptions` defined as follows:
-
-```typescript
-/**
- * Describe options to be used when registering for text document change events.
- */
-export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions {
-	/**
-	 * How documents are synced to the server. See TextDocumentSyncKind.Full
-	 * and TextDocumentSyncKind.Incremental.
-	 */
-	syncKind: number;
-}
-```
-
-
 #### <a href="#textDocument_willSave" name="textDocument_willSave" class="anchor">WillSaveTextDocument Notification (:arrow_right:)</a>
 
 The document will save notification is sent from the client to the server before the document is actually saved.
 
+_Client Capability_:
+* property name (optional): `textDocument.synchronization.willSave`
+* property type: `boolean`
+
+The capability indicates that the client supports `textDocument/willSave` notifications.
+
+_Server Capability_:
+* property name (optional): `textDocumentSync.willSave`
+* property type: `boolean`
+
+The capability indicates that the server is interested in `textDocument/willSave` notifications.
+
+_Registration Options_: `TextDocumentRegistrationOptions`
+
 _Notification_:
 * method: 'textDocument/willSave'
 * params: `WillSaveTextDocumentParams` defined as follows:
@@ -2709,13 +2848,24 @@
 }
 ```
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
-
 #### <a href="#textDocument_willSaveWaitUntil" name="textDocument_willSaveWaitUntil" class="anchor">WillSaveWaitUntilTextDocument Request (:leftwards_arrow_with_hook:)</a>
 
 The document will save request is sent from the client to the server before the document is actually saved. The request can return an array of TextEdits which will be applied to the text document before it is saved. Please note that clients might drop results if computing the text edits took too long or if a server constantly fails on this request. This is done to keep the save fast and reliable.
 
+_Client Capability_:
+* property name (optional): `textDocument.synchronization.willSaveWaitUntil`
+* property type: `boolean`
+
+The capability indicates that the client supports `textDocument/willSaveWaitUntil` requests.
+
+_Server Capability_:
+* property name (optional): `textDocumentSync.willSaveWaitUntil`
+* property type: `boolean`
+
+The capability indicates that the server is interested in `textDocument/willSaveWaitUntil` requests.
+
+_Registration Options_: `TextDocumentRegistrationOptions`
+
 _Request_:
 * method: 'textDocument/willSaveWaitUntil'
 * params: `WillSaveTextDocumentParams`
@@ -2724,12 +2874,42 @@
 * result:`TextEdit[]` \| `null`
 * error: code and message set in case an exception happens during the `willSaveWaitUntil` request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_didSave" name="textDocument_didSave" class="anchor">DidSaveTextDocument Notification (:arrow_right:)</a>
 
 The document save notification is sent from the client to the server when the document was saved in the client.
 
+_Client Capability_:
+* property name (optional): `textDocument.synchronization.didSave`
+* property type: `boolean`
+
+The capability indicates that the client supports `textDocument/didSave` notifications.
+
+_Server Capability_:
+* property name (optional): `textDocumentSync.save`
+* property type: `boolean | SaveOptions` where `SaveOptions` is defined as follows:
+
+```typescript
+export interface SaveOptions {
+	/**
+	 * The client is supposed to include the content on save.
+	 */
+	includeText?: boolean;
+}
+```
+
+The capability indicates that the server is interested in `textDocument/didSave` notifications.
+
+_Registration Options_: `TextDocumentSaveRegistrationOptions` defined as follows:
+```typescript
+export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistrationOptions {
+	/**
+	 * The client is supposed to include the content on save.
+	 */
+	includeText?: boolean;
+}
+```
+
+_Notification_:
 * method: 'textDocument/didSave'
 * params: `DidSaveTextDocumentParams` defined as follows:
 
@@ -2748,20 +2928,17 @@
 }
 ```
 
-_Registration Options_: `TextDocumentSaveRegistrationOptions` defined as follows:
-
-```typescript
-export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistrationOptions {
-	/**
-	 * The client is supposed to include the content on save.
-	 */
-	includeText?: boolean;
-}
-```
-
 #### <a href="#textDocument_didClose" name="textDocument_didClose" class="anchor">DidCloseTextDocument Notification (:arrow_right:)</a>
 
-The document close notification is sent from the client to the server when the document got closed in the client. The document's truth now exists where the document's Uri points to (e.g. if the document's Uri is a file Uri the truth now exists on disk). As with the open notification the close notification is about managing the document's content. Receiving a close notification doesn't mean that the document was open in an editor before. A close notification requires a previous open notification to be sent. Note that a server's ability to fulfill requests is independent of whether a text document is open or closed.
+The document close notification is sent from the client to the server when the document got closed in the client. The document's master now exists where the document's Uri points to (e.g. if the document's Uri is a file Uri the master now exists on disk). As with the open notification the close notification is about managing the document's content. Receiving a close notification doesn't mean that the document was open in an editor before. A close notification requires a previous open notification to be sent. Note that a server's ability to fulfill requests is independent of whether a text document is open or closed.
+
+_Client Capability_:
+See general synchronization [client capabilities](#textDocument_synchronization_cc).
+
+_Server Capability_:
+See general synchronization [server capabilities](#textDocument_synchronization_sc).
+
+_Registration Options_: `TextDocumentRegistrationOptions`
 
 _Notification_:
 * method: 'textDocument/didClose'
@@ -2776,8 +2953,84 @@
 }
 ```
 
-_Registration Options_: `TextDocumentRegistrationOptions`
+The final structure of the `TextDocumentSyncClientCapabilities` and the `TextDocumentSyncOptions` server options look like this
 
+```typescript
+export interface TextDocumentSyncClientCapabilities {
+	/**
+	 * Whether text document synchronization supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * The client supports sending will save notifications.
+	 */
+	willSave?: boolean;
+
+	/**
+	 * The client supports sending a will save request and
+	 * waits for a response providing text edits which will
+	 * be applied to the document before it is saved.
+	 */
+	willSaveWaitUntil?: boolean;
+
+	/**
+	 * The client supports did save notifications.
+	 */
+	didSave?: boolean;
+}
+
+/**
+ * Defines how the host (editor) should sync document changes to the language server.
+ */
+export namespace TextDocumentSyncKind {
+	/**
+	 * Documents should not be synced at all.
+	 */
+	export const None = 0;
+
+	/**
+	 * Documents are synced by always sending the full content
+	 * of the document.
+	 */
+	export const Full = 1;
+
+	/**
+	 * Documents are synced by sending the full content on open.
+	 * After that only incremental updates to the document are
+	 * send.
+	 */
+	export const Incremental = 2;
+}
+
+export interface TextDocumentSyncOptions {
+	/**
+	 * Open and close notifications are sent to the server. If omitted open close notification should not
+	 * be sent.
+	 */
+	openClose?: boolean;
+	/**
+	 * Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
+	 * and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
+	 */
+	change?: number;
+	/**
+	 * If present will save notifications are sent to the server. If omitted the notification should not be
+	 * sent.
+	 */
+	willSave?: boolean;
+	/**
+	 * If present will save wait until requests are sent to the server. If omitted the request should not be
+	 * sent.
+	 */
+	willSaveWaitUntil?: boolean;
+	/**
+	 * If present save notifications are sent to the server. If omitted the notification should not be
+	 * sent.
+	 */
+	save?: boolean | SaveOptions;
+}
+```
 
 #### <a href="#textDocument_publishDiagnostics" name="textDocument_publishDiagnostics" class="anchor">PublishDiagnostics Notification (:arrow_left:)</a>
 
@@ -2790,6 +3043,42 @@
 
 When a file changes it is the server's responsibility to re-compute diagnostics and push them to the client. If the computed set is empty it has to push the empty array to clear former diagnostics. Newly pushed diagnostics always replace previously pushed diagnostics. There is no merging that happens on the client side.
 
+See also the [Diagnostic](#diagnostic) section.
+
+_Client Capability_:
+* property name (optional): `textDocument.publishDiagnostics`
+* property type `PublishDiagnosticsClientCapabilities` defined as follows:
+
+```typescript
+export interface PublishDiagnosticsClientCapabilities {
+	/**
+	 * Whether the clients accepts diagnostics with related information.
+	 */
+	relatedInformation?: boolean;
+
+	/**
+	 * Client supports the tag property to provide meta data about a diagnostic.
+	 * Clients supporting tags have to handle unknown tags gracefully.
+	 *
+	 * @since 3.15.0
+	 */
+	tagSupport?: {
+		/**
+		 * The tags supported by the client.
+		 */
+		valueSet: DiagnosticTag[];
+	};
+
+	/**
+	 * Whether the client interprets the version property of the
+	 * `textDocument/publishDiagnostics` notification's parameter.
+	 *
+	 * @since 3.15.0
+	 */
+	versionSupport?: boolean;
+}
+```
+
 _Notification_:
 * method: 'textDocument/publishDiagnostics'
 * params: `PublishDiagnosticsParams` defined as follows:
@@ -2802,6 +3091,13 @@
 	uri: DocumentUri;
 
 	/**
+	 * Optional the version number of the document the diagnostics are published for.
+	 *
+	 * @since 3.15.0
+	 */
+	version?: number;
+
+	/**
 	 * An array of diagnostic information items.
 	 */
 	diagnostics: Diagnostic[];
@@ -2810,15 +3106,146 @@
 
 #### <a href="#textDocument_completion" name="textDocument_completion" class="anchor">Completion Request (:leftwards_arrow_with_hook:)</a>
 
-The Completion request is sent from the client to the server to compute completion items at a given cursor position. Completion items are presented in the [IntelliSense](https://code.visualstudio.com/docs/editor/editingevolved#_intellisense) user interface. If computing full completion items is expensive, servers can additionally provide a handler for the completion item resolve request ('completionItem/resolve'). This request is sent when a completion item is selected in the user interface. A typical use case is for example: the 'textDocument/completion' request doesn't fill in the `documentation` property for returned completion items since it is expensive to compute. When the item is selected in the user interface then a 'completionItem/resolve' request is sent with the selected completion item as a parameter. The returned completion item should have the documentation property filled in. The request can delay the computation of the `detail` and `documentation` properties. However, properties that are needed for the initial sorting and filtering, like `sortText`, `filterText`, `insertText`, and `textEdit` must be provided in the `textDocument/completion` response and must not be changed during resolve.
+The Completion request is sent from the client to the server to compute completion items at a given cursor position. Completion items are presented in the [IntelliSense](https://code.visualstudio.com/docs/editor/editingevolved#_intellisense) user interface. If computing full completion items is expensive, servers can additionally provide a handler for the completion item resolve request ('completionItem/resolve'). This request is sent when a completion item is selected in the user interface. A typical use case is for example: the 'textDocument/completion' request doesn't fill in the `documentation` property for returned completion items since it is expensive to compute. When the item is selected in the user interface then a 'completionItem/resolve' request is sent with the selected completion item as a parameter. The returned completion item should have the documentation property filled in. The request can only delay the computation of the `detail` and `documentation` properties. Other properties like `sortText`, `filterText`, `insertText`, `textEdit` and `additionalTextEdits` must be provided in the `textDocument/completion` response and must not be changed during resolve.
+
+_Client Capability_:
+* property name (optional): `textDocument.completion`
+* property type: `CompletionClientCapabilities` defined as follows:
+
+```typescript
+export interface CompletionClientCapabilities {
+	/**
+	 * Whether completion supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * The client supports the following `CompletionItem` specific
+	 * capabilities.
+	 */
+	completionItem?: {
+		/**
+		 * Client supports snippets as insert text.
+		 *
+		 * A snippet can define tab stops and placeholders with `$1`, `$2`
+		 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
+		 * the end of the snippet. Placeholders with equal identifiers are linked,
+		 * that is typing in one will update others too.
+		 */
+		snippetSupport?: boolean;
+
+		/**
+		 * Client supports commit characters on a completion item.
+		 */
+		commitCharactersSupport?: boolean
+
+		/**
+		 * Client supports the follow content formats for the documentation
+		 * property. The order describes the preferred format of the client.
+		 */
+		documentationFormat?: MarkupKind[];
+
+		/**
+		 * Client supports the deprecated property on a completion item.
+		 */
+		deprecatedSupport?: boolean;
+
+		/**
+		 * Client supports the preselect property on a completion item.
+		 */
+		preselectSupport?: boolean;
+
+		/**
+		 * Client supports the tag property on a completion item. Clients supporting
+		 * tags have to handle unknown tags gracefully. Clients especially need to
+		 * preserve unknown tags when sending a completion item back to the server in
+		 * a resolve call.
+		 *
+		 * @since 3.15.0
+		 */
+		tagSupport?: {
+			/**
+			 * The tags supported by the client.
+			 */
+			valueSet: CompletionItemTag[]
+		}
+	};
+
+	completionItemKind?: {
+		/**
+		 * The completion item kind values the client supports. When this
+		 * property exists the client also guarantees that it will
+		 * handle values outside its set gracefully and falls back
+		 * to a default value when unknown.
+		 *
+		 * If this property is not present the client only supports
+		 * the completion items kinds from `Text` to `Reference` as defined in
+		 * the initial version of the protocol.
+		 */
+		valueSet?: CompletionItemKind[];
+	};
+
+	/**
+	 * The client supports to send additional context information for a
+	 * `textDocument/completion` request.
+	 */
+	contextSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `completionProvider`
+* property type: `CompletionOptions` defined as follows:
+
+```typescript
+/**
+ * Completion options.
+ */
+export interface CompletionOptions extends WorkDoneProgressOptions {
+	/**
+	 * Most tools trigger completion request automatically without explicitly requesting
+	 * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
+	 * starts to type an identifier. For example if the user types `c` in a JavaScript file
+	 * code complete will automatically pop up present `console` besides others as a
+	 * completion item. Characters that make up identifiers don't need to be listed here.
+	 *
+	 * If code complete should automatically be trigger on characters not being valid inside
+	 * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
+	 */
+	triggerCharacters?: string[];
+
+	/**
+	 * The list of all possible characters that commit a completion. This field can be used
+	 * if clients don't support individual commit characters per completion item. See
+	 * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`.
+	 *
+	 * If a server provides both `allCommitCharacters` and commit characters on an individual
+	 * completion item the ones on the completion item win.
+	 *
+	 * @since 3.2.0
+	 */
+	allCommitCharacters?: string[];
+
+	/**
+	 * The server provides support to resolve additional
+	 * information for a completion item.
+	 */
+	resolveProvider?: boolean;
+}
+```
+
+_Registration Options_: `CompletionRegistrationOptions` options defined as follows:
+```typescript
+export interface CompletionRegistrationOptions extends TextDocumentRegistrationOptions, CompletionOptions {
+}
+```
 
 _Request_:
 * method: 'textDocument/completion'
 * params: `CompletionParams` defined as follows:
 
 ```typescript
-export interface CompletionParams extends TextDocumentPositionParams {
-
+export interface CompletionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
 	/**
 	 * The completion context. This is only available if the client specifies
 	 * to send this using `ClientCapabilities.textDocument.completion.contextSupport === true`
@@ -2875,7 +3302,7 @@
  * Represents a collection of [completion items](#CompletionItem) to be presented
  * in the editor.
  */
-interface CompletionList {
+export interface CompletionList {
 	/**
 	 * This list it not complete. Further typing should result in recomputing
 	 * this list.
@@ -2892,7 +3319,7 @@
  * Defines whether the insert text in a completion item should be interpreted as
  * plain text or a snippet.
  */
-namespace InsertTextFormat {
+export namespace InsertTextFormat {
 	/**
 	 * The primary text to be inserted is treated as a plain string.
 	 */
@@ -2909,9 +3336,24 @@
 	export const Snippet = 2;
 }
 
-type InsertTextFormat = 1 | 2;
+export type InsertTextFormat = 1 | 2;
 
-interface CompletionItem {
+/**
+ * Completion item tags are extra annotations that tweak the rendering of a completion
+ * item.
+ *
+ * @since 3.15.0
+ */
+export namespace CompletionItemTag {
+	/**
+	 * Render a completion as obsolete, usually using a strike-out.
+	 */
+	export const Deprecated = 1;
+}
+
+export type CompletionItemTag = 1;
+
+export interface CompletionItem {
 	/**
 	 * The label of this completion item. By default
 	 * also the text that is inserted when selecting
@@ -2927,6 +3369,13 @@
 	kind?: number;
 
 	/**
+	 * Tags for this completion item.
+	 *
+	 * @since 3.15.0
+	 */
+	tags?: CompletionItemTag[];
+
+	/**
 	 * A human-readable string with additional information
 	 * about this item, like type or symbol information.
 	 */
@@ -2939,6 +3388,8 @@
 
 	/**
 	 * Indicates if this item is deprecated.
+	 *
+	 * @deprecated Use `tags` instead if supported.
 	 */
 	deprecated?: boolean;
 
@@ -2978,7 +3429,7 @@
 
 	/**
 	 * The format of the insert text. The format applies to both the `insertText` property
-	 * and the `newText` property of a provided `textEdit`. If ommitted defaults to
+	 * and the `newText` property of a provided `textEdit`. If omitted defaults to
 	 * `InsertTextFormat.PlainText`.
 	 */
 	insertTextFormat?: InsertTextFormat;
@@ -3027,7 +3478,7 @@
 /**
  * The kind of a completion entry.
  */
-namespace CompletionItemKind {
+export namespace CompletionItemKind {
 	export const Text = 1;
 	export const Method = 2;
 	export const Function = 3;
@@ -3055,47 +3506,12 @@
 	export const TypeParameter = 25;
 }
 ```
+* partial result: `CompletionItem[]`  or `CompletionList` followed by `CompletionItem[]`. If the first provided result item is of type `CompletionList` subsequent partial results of `CompletionItem[]` add to the `items` property of the `CompletionList`.
 * error: code and message set in case an exception happens during the completion request.
 
-_Registration Options_: `CompletionRegistrationOptions` options defined as follows:
-
-```typescript
-export interface CompletionRegistrationOptions extends TextDocumentRegistrationOptions {
-	/**
-	 * Most tools trigger completion request automatically without explicitly requesting
-	 * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
-	 * starts to type an identifier. For example if the user types `c` in a JavaScript file
-	 * code complete will automatically pop up present `console` besides others as a
-	 * completion item. Characters that make up identifiers don't need to be listed here.
-	 *
-	 * If code complete should automatically be trigger on characters not being valid inside
-	 * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
-	 */
-	triggerCharacters?: string[];
-
-	/**
-	 * The list of all possible characters that commit a completion. This field can be used
-	 * if clients don't support individual commmit characters per completion item. See
-	 * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`.
-	 *
-	 * If a server provides both `allCommitCharacters` and commit characters on an individual
-	 * completion item the ones on the completion item win.
-	 *
-     * Since 3.2.0
-	 */
-	allCommitCharacters?: string[];
-
-	/**
-	 * The server provides support to resolve additional
-	 * information for a completion item.
-	 */
-	resolveProvider?: boolean;
-}
-```
-
 Completion items support snippets (see `InsertTextFormat.Snippet`). The snippet format is as follows:
 
-##### Snippet Syntax
+##### <a href="#snippet_syntax" name="snippet_syntax" class="anchor">Snippet Syntax</a>
 
 The `body` of a snippet can use special constructs to control cursors and the text being inserted. The following are supported features and their syntaxes:
 
@@ -3191,9 +3607,48 @@
 
 The hover request is sent from the client to the server to request hover information at a given text document position.
 
+_Client Capability_:
+* property name (optional): `textDocument.hover`
+* property type: `HoverClientCapabilities` defined as follows:
+
+```typescript
+export interface HoverClientCapabilities {
+	/**
+	 * Whether hover supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * Client supports the follow content formats for the content
+	 * property. The order describes the preferred format of the client.
+	 */
+	contentFormat?: MarkupKind[];
+}
+```
+
+_Server Capability_:
+* property name (optional): `hoverProvider`
+* property type: `boolean | HoverOptions` where `HoverOptions` is defined as follows:
+
+```typescript
+export interface HoverOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `HoverRegistrationOptions` defined as follows:
+```typescript
+export interface HoverRegistrationOptions extends TextDocumentRegistrationOptions, HoverOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/hover'
-* params: [`TextDocumentPositionParams`](#textdocumentpositionparams)
+* params: `HoverParams` defined as follows:
+
+```typescript
+export interface HoverParams extends TextDocumentPositionParams, WorkDoneProgressParams {
+}
+```
 
 _Response_:
 * result: `Hover` \| `null` defined as follows:
@@ -3202,7 +3657,7 @@
 /**
  * The result of a hover request.
  */
-interface Hover {
+export interface Hover {
 	/**
 	 * The hover's content
 	 */
@@ -3238,15 +3693,159 @@
 
 * error: code and message set in case an exception happens during the hover request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_signatureHelp" name="textDocument_signatureHelp" class="anchor">Signature Help Request (:leftwards_arrow_with_hook:)</a>
 
 The signature help request is sent from the client to the server to request signature information at a given cursor position.
 
+_Client Capability_:
+* property name (optional): `textDocument.signatureHelp`
+* property type: `SignatureHelpClientCapabilities` defined as follows:
+
+```typescript
+export interface SignatureHelpClientCapabilities {
+	/**
+	 * Whether signature help supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * The client supports the following `SignatureInformation`
+	 * specific properties.
+	 */
+	signatureInformation?: {
+		/**
+		 * Client supports the follow content formats for the documentation
+		 * property. The order describes the preferred format of the client.
+		 */
+		documentationFormat?: MarkupKind[];
+
+		/**
+		 * Client capabilities specific to parameter information.
+		 */
+		parameterInformation?: {
+			/**
+			 * The client supports processing label offsets instead of a
+			 * simple label string.
+			 *
+			 * @since 3.14.0
+			 */
+			labelOffsetSupport?: boolean;
+		};
+	};
+
+	/**
+	 * The client supports to send additional context information for a
+	 * `textDocument/signatureHelp` request. A client that opts into
+	 * contextSupport will also support the `retriggerCharacters` on
+	 * `SignatureHelpOptions`.
+	 *
+	 * @since 3.15.0
+	 */
+	contextSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `signatureHelpProvider`
+* property type: `SignatureHelpOptions` defined as follows:
+
+```typescript
+export interface SignatureHelpOptions extends WorkDoneProgressOptions {
+	/**
+	 * The characters that trigger signature help
+	 * automatically.
+	 */
+	triggerCharacters?: string[];
+
+	/**
+	 * List of characters that re-trigger signature help.
+	 *
+	 * These trigger characters are only active when signature help is already showing. All trigger characters
+	 * are also counted as re-trigger characters.
+	 *
+	 * @since 3.15.0
+	 */
+	retriggerCharacters?: string[];
+}
+```
+
+_Registration Options_: `SignatureHelpRegistrationOptions` defined as follows:
+```typescript
+export interface SignatureHelpRegistrationOptions extends TextDocumentRegistrationOptions, SignatureHelpOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/signatureHelp'
-* params: [`TextDocumentPositionParams`](#textdocumentpositionparams)
+* params: `SignatureHelpParams` defined as follows:
+
+```typescript
+export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDoneProgressParams {
+	/**
+	 * The signature help context. This is only available if the client specifies
+	 * to send this using the client capability  `textDocument.signatureHelp.contextSupport === true`
+	 *
+	 * @since 3.15.0
+	 */
+	context?: SignatureHelpContext;
+}
+
+/**
+ * How a signature help was triggered.
+ *
+ * @since 3.15.0
+ */
+export namespace SignatureHelpTriggerKind {
+	/**
+	 * Signature help was invoked manually by the user or by a command.
+	 */
+	export const Invoked: 1 = 1;
+	/**
+	 * Signature help was triggered by a trigger character.
+	 */
+	export const TriggerCharacter: 2 = 2;
+	/**
+	 * Signature help was triggered by the cursor moving or by the document content changing.
+	 */
+	export const ContentChange: 3 = 3;
+}
+export type SignatureHelpTriggerKind = 1 | 2 | 3;
+
+/**
+ * Additional information about the context in which a signature help request was triggered.
+ *
+ * @since 3.15.0
+ */
+export interface SignatureHelpContext {
+	/**
+	 * Action that caused signature help to be triggered.
+	 */
+	triggerKind: SignatureHelpTriggerKind;
+
+	/**
+	 * Character that caused signature help to be triggered.
+	 *
+	 * This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
+	 */
+	triggerCharacter?: string;
+
+	/**
+	 * `true` if signature help was already showing when it was triggered.
+	 *
+	 * Retriggers occur when the signature help is already active and can be caused by actions such as
+	 * typing a trigger character, a cursor move, or document content changes.
+	 */
+	isRetrigger: boolean;
+
+	/**
+	 * The currently active `SignatureHelp`.
+	 *
+	 * The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
+	 * the user navigating through available signatures.
+	 */
+	activeSignatureHelp?: SignatureHelp;
+}
+```
 
 _Response_:
 * result: `SignatureHelp` \| `null` defined as follows:
@@ -3257,18 +3856,21 @@
  * callable. There can be multiple signature but only one
  * active and only one active parameter.
  */
-interface SignatureHelp {
+export interface SignatureHelp {
 	/**
-	 * One or more signatures.
+	 * One or more signatures. If no signaures are availabe the signature help
+	 * request should return `null`.
 	 */
 	signatures: SignatureInformation[];
 
 	/**
 	 * The active signature. If omitted or the value lies outside the
-	 * range of `signatures` the value defaults to zero or is ignored if
-	 * `signatures.length === 0`. Whenever possible implementors should
-	 * make an active decision about the active signature and shouldn't
-	 * rely on a default value.
+	 * range of `signatures` the value defaults to zero or is ignore if
+	 * the `SignatureHelp` as no signatures.
+	 *
+	 * Whenever possible implementors should make an active decision about
+	 * the active signature and shouldn't rely on a default value.
+	 *
 	 * In future version of the protocol this property might become
 	 * mandatory to better express this.
 	 */
@@ -3291,7 +3893,7 @@
  * can have a label, like a function-name, a doc-comment, and
  * a set of parameters.
  */
-interface SignatureInformation {
+export interface SignatureInformation {
 	/**
 	 * The label of this signature. Will be shown in
 	 * the UI.
@@ -3314,7 +3916,7 @@
  * Represents a parameter of a callable-signature. A parameter can
  * have a label and a doc-comment.
  */
-interface ParameterInformation {
+export interface ParameterInformation {
 
 	/**
 	 * The label of this parameter information.
@@ -3338,103 +3940,278 @@
 
 * error: code and message set in case an exception happens during the signature help request.
 
-_Registration Options_: `SignatureHelpRegistrationOptions` defined as follows:
-
-```typescript
-export interface SignatureHelpRegistrationOptions extends TextDocumentRegistrationOptions {
-	/**
-	 * The characters that trigger signature help
-	 * automatically.
-	 */
-	triggerCharacters?: string[];
-}
-```
 #### <a href="#textDocument_declaration" name="textDocument_declaration" class="anchor">Goto Declaration Request (:leftwards_arrow_with_hook:)</a>
 
 > *Since version 3.14.0*
 
 The go to declaration request is sent from the client to the server to resolve the declaration location of a symbol at a given text document position.
 
-The result type [`LocationLink`](#locationlink)[] got introduce with version 3.14.0 and depends in the corresponding client capability `clientCapabilities.textDocument.declaration.linkSupport`.
+The result type [`LocationLink`](#locationLink)[] got introduced with version 3.14.0 and depends on the corresponding client capability `textDocument.declaration.linkSupport`.
+
+_Client Capability_:
+* property name (optional): `textDocument.declaration`
+* property type: `DeclarationClientCapabilities` defined as follows:
+
+```typescript
+export interface DeclarationClientCapabilities {
+	/**
+	 * Whether declaration supports dynamic registration. If this is set to `true`
+	 * the client supports the new `DeclarationRegistrationOptions` return value
+	 * for the corresponding server capability as well.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * The client supports additional metadata in the form of declaration links.
+	 */
+	linkSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `declarationProvider`
+* property type: `boolean | DeclarationOptions | DeclarationRegistrationOptions` where `DeclarationOptions` is defined as follows:
+
+```typescript
+export interface DeclarationOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `DeclarationRegistrationOptions` defined as follows:
+```typescript
+export interface DeclarationRegistrationOptions extends DeclarationOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions  {
+}
+```
 
 _Request_:
 * method: 'textDocument/declaration'
-* params: [`TextDocumentPositionParams`](#textdocumentpositionparams)
+* params: `DeclarationParams` defined as follows:
+
+```typescript
+export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
+}
+```
 
 _Response_:
-* result: [`Location`](#location) \| [`Location`](#location)[] \| [`LocationLink`](#locationlink)[] \|`null`
+* result: [`Location`](#location) \| [`Location`](#location)[] \| [`LocationLink`](#locationLink)[] \|`null`
+* partial result: [`Location`](#location)[] \| [`LocationLink`](#locationLink)[]
 * error: code and message set in case an exception happens during the declaration request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_definition" name="textDocument_definition" class="anchor">Goto Definition Request (:leftwards_arrow_with_hook:)</a>
 
-> *Since version 3.14.0*
-
 The go to definition request is sent from the client to the server to resolve the definition location of a symbol at a given text document position.
 
-The result type [`LocationLink`](#locationlink)[] got introduce with version 3.14.0 and depends in the corresponding client capability `clientCapabilities.textDocument.definition.linkSupport`.
+The result type [`LocationLink`](#locationLink)[] got introduced with version 3.14.0 and depends on the corresponding client capability `textDocument.definition.linkSupport`.
+
+_Client Capability_:
+* property name (optional): `textDocument.definition`
+* property type: `DefinitionClientCapabilities` defined as follows:
+
+```typescript
+export interface DefinitionClientCapabilities {
+	/**
+	 * Whether definition supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * The client supports additional metadata in the form of definition links.
+	 *
+	 * @since 3.14.0
+	 */
+	linkSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `definitionProvider`
+* property type: `boolean | DefinitionOptions` where `DefinitionOptions` is defined as follows:
+
+```typescript
+export interface DefinitionOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `DefinitionRegistrationOptions` defined as follows:
+```typescript
+export interface DefinitionRegistrationOptions extends TextDocumentRegistrationOptions, DefinitionOptions {
+}
+```
 
 _Request_:
 * method: 'textDocument/definition'
-* params: [`TextDocumentPositionParams`](#textdocumentpositionparams)
+* params: `DefinitionParams` defined as follows:
+
+```typescript
+export interface DefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
+}
+```
 
 _Response_:
-* result: [`Location`](#location) \| [`Location`](#location)[] \| [`LocationLink`](#locationlink)[] \| `null`
+* result: [`Location`](#location) \| [`Location`](#location)[] \| [`LocationLink`](#locationLink)[] \| `null`
+* partial result: [`Location`](#location)[] \| [`LocationLink`](#locationLink)[]
 * error: code and message set in case an exception happens during the definition request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_typeDefinition" name="textDocument_typeDefinition" class="anchor">Goto Type Definition Request (:leftwards_arrow_with_hook:)</a>
 
 > *Since version 3.6.0*
 
 The go to type definition request is sent from the client to the server to resolve the type definition location of a symbol at a given text document position.
 
-The result type [`LocationLink`](#locationlink)[] got introduce with version 3.14.0 and depends in the corresponding client capability `clientCapabilities.textDocument.typeDefinition.linkSupport`.
+The result type [`LocationLink`](#locationLink)[] got introduced with version 3.14.0 and depends on the corresponding client capability `textDocument.typeDefinition.linkSupport`.
+
+_Client Capability_:
+* property name (optional): `textDocument.typeDefinition`
+* property type: `TypeDefinitionClientCapabilities` defined as follows:
+
+```typescript
+export interface TypeDefinitionClientCapabilities {
+	/**
+	 * Whether implementation supports dynamic registration. If this is set to `true`
+	 * the client supports the new `TypeDefinitionRegistrationOptions` return value
+	 * for the corresponding server capability as well.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * The client supports additional metadata in the form of definition links.
+	 *
+	 * @since 3.14.0
+	 */
+	linkSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `typeDefinitionProvider`
+* property type: `boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions` where `TypeDefinitionOptions` is defined as follows:
+
+```typescript
+export interface TypeDefinitionOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `TypeDefinitionRegistrationOptions` defined as follows:
+```typescript
+export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions {
+}
+```
 
 _Request_:
 * method: 'textDocument/typeDefinition'
-* params: [`TextDocumentPositionParams`](#textdocumentpositionparams)
+* params: `TypeDefinitionParams` defined as follows:
+
+```typescript
+export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
+}
+```
 
 _Response_:
-* result: [`Location`](#location) \| [`Location`](#location)[] \| [`LocationLink`](#locationlink)[] \| `null`
+* result: [`Location`](#location) \| [`Location`](#location)[] \| [`LocationLink`](#locationLink)[] \| `null`
+* partial result: [`Location`](#location)[] \| [`LocationLink`](#locationLink)[]
 * error: code and message set in case an exception happens during the definition request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_implementation" name="textDocument_implementation" class="anchor">Goto Implementation Request (:leftwards_arrow_with_hook:)</a>
 
 > *Since version 3.6.0*
 
 The go to implementation request is sent from the client to the server to resolve the implementation location of a symbol at a given text document position.
 
-The result type [`LocationLink`](#locationlink)[] got introduce with version 3.14.0 and depends in the corresponding client capability `clientCapabilities.implementation.typeDefinition.linkSupport`.
+The result type [`LocationLink`](#locationLink)[] got introduced with version 3.14.0 and depends on the corresponding client capability `textDocument.implementation.linkSupport`.
+
+_Client Capability_:
+* property name (optional): `textDocument.implementation`
+* property type: `ImplementationClientCapabilities` defined as follows:
+
+```typescript
+export interface ImplementationClientCapabilities {
+	/**
+	 * Whether implementation supports dynamic registration. If this is set to `true`
+	 * the client supports the new `ImplementationRegistrationOptions` return value
+	 * for the corresponding server capability as well.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * The client supports additional metadata in the form of definition links.
+	 *
+	 * @since 3.14.0
+	 */
+	linkSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `implementationProvider`
+* property type: `boolean | ImplementationOptions | ImplementationRegistrationOptions` where `ImplementationOptions` is defined as follows:
+
+```typescript
+export interface ImplementationOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `ImplementationRegistrationOptions` defined as follows:
+```typescript
+export interface ImplementationRegistrationOptions extends TextDocumentRegistrationOptions, ImplementationOptions, StaticRegistrationOptions {
+}
+```
 
 _Request_:
 * method: 'textDocument/implementation'
-* params: [`TextDocumentPositionParams`](#textdocumentpositionparams)
+* params: `ImplementationParams` defined as follows:
+
+```typescript
+export interface ImplementationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
+}
+```
 
 _Response_:
-* result: [`Location`](#location) \| [`Location`](#location)[] \| [`LocationLink`](#locationlink)[] \| `null`
+* result: [`Location`](#location) \| [`Location`](#location)[] \| [`LocationLink`](#locationLink)[] \| `null`
+* partial result: [`Location`](#location)[] \| [`LocationLink`](#locationLink)[]
 * error: code and message set in case an exception happens during the definition request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_references" name="textDocument_references" class="anchor">Find References Request (:leftwards_arrow_with_hook:)</a>
 
 The references request is sent from the client to the server to resolve project-wide references for the symbol denoted by the given text document position.
 
+_Client Capability_:
+* property name (optional): `textDocument.references`
+* property type: `ReferenceClientCapabilities` defined as follows:
+
+```typescript
+export interface ReferenceClientCapabilities {
+	/**
+	 * Whether references supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `referencesProvider`
+* property type: `boolean | ReferenceOptions` where `ReferenceOptions` is defined as follows:
+
+```typescript
+export interface ReferenceOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `ReferenceRegistrationOptions` defined as follows:
+```typescript
+export interface ReferenceRegistrationOptions extends TextDocumentRegistrationOptions, ReferenceOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/references'
 * params: `ReferenceParams` defined as follows:
 
 ```typescript
-interface ReferenceParams extends TextDocumentPositionParams {
+export interface ReferenceParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
 	context: ReferenceContext
 }
 
-interface ReferenceContext {
+export interface ReferenceContext {
 	/**
 	 * Include the declaration of the current symbol.
 	 */
@@ -3443,10 +4220,9 @@
 ```
 _Response_:
 * result: [`Location`](#location)[] \| `null`
+* partial result: [`Location`](#location)[]
 * error: code and message set in case an exception happens during the reference request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_documentHighlight" name="textDocument_documentHighlight" class="anchor">Document Highlights Request (:leftwards_arrow_with_hook:)</a>
 
 The document highlight request is sent from the client to the server to resolve a document highlights for a given text document position.
@@ -3454,9 +4230,42 @@
 and 'textDocument/references' separate requests since the first one is allowed to be more fuzzy. Symbol matches usually have a `DocumentHighlightKind`
 of `Read` or `Write` whereas fuzzy or textual matches use `Text`as the kind.
 
+_Client Capability_:
+* property name (optional): `textDocument.documentHighlight`
+* property type: `DocumentHighlightClientCapabilities` defined as follows:
+
+```typescript
+export interface DocumentHighlightClientCapabilities {
+	/**
+	 * Whether document highlight supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `documentHighlightProvider`
+* property type: `boolean | DocumentHighlightOptions` where `DocumentHighlightOptions` is defined as follows:
+
+```typescript
+export interface DocumentHighlightOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `DocumentHighlightRegistrationOptions` defined as follows:
+```typescript
+export interface DocumentHighlightRegistrationOptions extends TextDocumentRegistrationOptions, DocumentHighlightOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/documentHighlight'
-* params: [`TextDocumentPositionParams`](#textdocumentpositionparams)
+* params: `DocumentHighlightParams` defined as follows:
+
+```typescript
+export interface DocumentHighlightParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
+}
+```
 
 _Response_:
 * result: `DocumentHighlight[]` \| `null` defined as follows:
@@ -3468,7 +4277,7 @@
  * the background color of its range.
  *
  */
-interface DocumentHighlight {
+export interface DocumentHighlight {
 	/**
 	 * The range this highlight applies to.
 	 */
@@ -3501,10 +4310,9 @@
 }
 ```
 
+* partial result: `DocumentHighlight[]`
 * error: code and message set in case an exception happens during the document highlight request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_documentSymbol" name="textDocument_documentSymbol" class="anchor">Document Symbols Request (:leftwards_arrow_with_hook:)</a>
 
 The document symbol request is sent from the client to the server. The returned result is either
@@ -3512,12 +4320,62 @@
 - `SymbolInformation[]` which is a flat list of all symbols found in a given text document. Then neither the symbol's location range nor the symbol's container name should be used to infer a hierarchy.
 - `DocumentSymbol[]` which is a hierarchy of symbols found in a given text document.
 
+_Client Capability_:
+* property name (optional): `textDocument.documentSymbol`
+* property type: `DocumentSymbolClientCapabilities` defined as follows:
+
+```typescript
+export interface DocumentSymbolClientCapabilities {
+	/**
+	 * Whether document symbol supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * Specific capabilities for the `SymbolKind` in the `textDocument/documentSymbol` request.
+	 */
+	symbolKind?: {
+		/**
+		 * The symbol kind values the client supports. When this
+		 * property exists the client also guarantees that it will
+		 * handle values outside its set gracefully and falls back
+		 * to a default value when unknown.
+		 *
+		 * If this property is not present the client only supports
+		 * the symbol kinds from `File` to `Array` as defined in
+		 * the initial version of the protocol.
+		 */
+		valueSet?: SymbolKind[];
+	}
+
+	/**
+	 * The client supports hierarchical document symbols.
+	 */
+	hierarchicalDocumentSymbolSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `documentSymbolProvider`
+* property type: `boolean | DocumentSymbolOptions` where `DocumentSymbolOptions` is defined as follows:
+
+```typescript
+export interface DocumentSymbolOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `DocumentSymbolRegistrationOptions` defined as follows:
+```typescript
+export interface DocumentSymbolRegistrationOptions extends TextDocumentRegistrationOptions, DocumentSymbolOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/documentSymbol'
 * params: `DocumentSymbolParams` defined as follows:
 
 ```typescript
-interface DocumentSymbolParams {
+export interface DocumentSymbolParams extends WorkDoneProgressParams, PartialResultParams {
 	/**
 	 * The text document.
 	 */
@@ -3566,7 +4424,7 @@
  * hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range,
  * e.g. the range of an identifier.
  */
-export class DocumentSymbol {
+export interface DocumentSymbol {
 
 	/**
 	 * The name of this symbol. Will be displayed in the user interface and therefore must not be
@@ -3612,7 +4470,7 @@
  * Represents information about programming constructs like variables, classes,
  * interfaces etc.
  */
-interface SymbolInformation {
+export interface SymbolInformation {
 	/**
 	 * The name of this symbol.
 	 */
@@ -3621,7 +4479,7 @@
 	/**
 	 * The kind of this symbol.
 	 */
-	kind: number;
+	kind: SymbolKind;
 
 	/**
 	 * Indicates if this symbol is deprecated.
@@ -3649,13 +4507,11 @@
 	 */
 	containerName?: string;
 }
-
 ```
 
+* partial result: `DocumentSymbol[]` \| `SymbolInformation[]`. `DocumentSymbol[]` and `SymbolInformation[]` can not be mixed. That means the first chunk defines the type of all the other chunks.
 * error: code and message set in case an exception happens during the document symbol request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_codeAction" name="textDocument_codeAction" class="anchor">Code Action Request (:leftwards_arrow_with_hook:)</a>
 
 The code action request is sent from the client to the server to compute commands for a given text document and range. These commands are typically code fixes to either fix problems or to beautify/refactor code. The result of a `textDocument/codeAction` request is an array of `Command` literals which are typically presented in the user interface. To ensure that a server is useful in many clients the commands specified in a code actions should be handled by the server and not by the client (see `workspace/executeCommand` and `ServerCapabilities.executeCommandProvider`). If the client supports providing edits with a code action then the mode should be used.
@@ -3667,7 +4523,71 @@
 - the ability to directly return a workspace edit from the code action request. This avoids having another server roundtrip to execute an actual code action. However server providers should be aware that if the code action is expensive to compute or the edits are huge it might still be beneficial if the result is simply a command and the actual edit is only computed when needed.
 - the ability to group code actions using a kind. Clients are allowed to ignore that information. However it allows them to better group code action for example into corresponding menus (e.g. all refactor code actions into a refactor menu).
 
-Clients need to announce their support for code action literals and code action kinds via the corresponding client capability `textDocument.codeAction.codeActionLiteralSupport`.
+Clients need to announce their support for code action literals (e.g. literals of type `CodeAction`) and code action kinds via the corresponding client capability `codeAction.codeActionLiteralSupport`.
+
+_Client Capability_:
+* property name (optional): `textDocument.codeAction`
+* property type: `CodeActionClientCapabilities` defined as follows:
+
+```typescript
+export interface CodeActionClientCapabilities {
+	/**
+	 * Whether code action supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * The client supports code action literals as a valid
+	 * response of the `textDocument/codeAction` request.
+	 *
+	 * @since 3.8.0
+	 */
+	codeActionLiteralSupport?: {
+		/**
+		 * The code action kind is supported with the following value
+		 * set.
+		 */
+		codeActionKind: {
+
+			/**
+			 * The code action kind values the client supports. When this
+			 * property exists the client also guarantees that it will
+			 * handle values outside its set gracefully and falls back
+			 * to a default value when unknown.
+			 */
+			valueSet: CodeActionKind[];
+		};
+	};
+
+	/**
+	 * Whether code action supports the `isPreferred` property.
+	 * @since 3.15.0
+	 */
+	isPreferredSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `codeActionProvider`
+* property type: `boolean | CodeActionOptions` where `CodeActionOptions` is defined as follows:
+
+```typescript
+export interface CodeActionOptions extends WorkDoneProgressOptions {
+	/**
+	 * CodeActionKinds that this server may return.
+	 *
+	 * The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
+	 * may list out every specific kind they provide.
+	 */
+	codeActionKinds?: CodeActionKind[];
+}
+```
+
+_Registration Options_: `CodeActionRegistrationOptions` defined as follows:
+```typescript
+export interface CodeActionRegistrationOptions extends TextDocumentRegistrationOptions, CodeActionOptions {
+}
+```
 
 _Request_:
 * method: 'textDocument/codeAction'
@@ -3677,7 +4597,7 @@
 /**
  * Params for the CodeActionRequest
  */
-interface CodeActionParams {
+export interface CodeActionParams extends WorkDoneProgressParams, PartialResultParams {
 	/**
 	 * The document in which the command was invoked.
 	 */
@@ -3705,7 +4625,7 @@
 export type CodeActionKind = string;
 
 /**
- * A set of predefined code action kinds
+ * A set of predefined code action kinds.
  */
 export namespace CodeActionKind {
 
@@ -3715,17 +4635,17 @@
 	export const Empty: CodeActionKind = '';
 
 	/**
-	 * Base kind for quickfix actions: 'quickfix'
+	 * Base kind for quickfix actions: 'quickfix'.
 	 */
 	export const QuickFix: CodeActionKind = 'quickfix';
 
 	/**
-	 * Base kind for refactoring actions: 'refactor'
+	 * Base kind for refactoring actions: 'refactor'.
 	 */
 	export const Refactor: CodeActionKind = 'refactor';
 
 	/**
-	 * Base kind for refactoring extraction actions: 'refactor.extract'
+	 * Base kind for refactoring extraction actions: 'refactor.extract'.
 	 *
 	 * Example extract actions:
 	 *
@@ -3738,7 +4658,7 @@
 	export const RefactorExtract: CodeActionKind = 'refactor.extract';
 
 	/**
-	 * Base kind for refactoring inline actions: 'refactor.inline'
+	 * Base kind for refactoring inline actions: 'refactor.inline'.
 	 *
 	 * Example inline actions:
 	 *
@@ -3750,7 +4670,7 @@
 	export const RefactorInline: CodeActionKind = 'refactor.inline';
 
 	/**
-	 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
+	 * Base kind for refactoring rewrite actions: 'refactor.rewrite'.
 	 *
 	 * Example rewrite actions:
 	 *
@@ -3764,14 +4684,14 @@
 	export const RefactorRewrite: CodeActionKind = 'refactor.rewrite';
 
 	/**
-	 * Base kind for source actions: `source`
+	 * Base kind for source actions: `source`.
 	 *
 	 * Source code actions apply to the entire file.
 	 */
 	export const Source: CodeActionKind = 'source';
 
 	/**
-	 * Base kind for an organize imports source action: `source.organizeImports`
+	 * Base kind for an organize imports source action: `source.organizeImports`.
 	 */
 	export const SourceOrganizeImports: CodeActionKind = 'source.organizeImports';
 }
@@ -3780,9 +4700,13 @@
  * Contains additional diagnostic information about the context in which
  * a code action is run.
  */
-interface CodeActionContext {
+export interface CodeActionContext {
 	/**
-	 * An array of diagnostics.
+	 * An array of diagnostics known on the client side overlapping the range provided to the
+	 * `textDocument/codeAction` request. They are provided so that the server knows which
+	 * errors are currently presented to the user for the given range. There is no guarantee
+	 * that these accurately reflect the error state of the resource. The primary parameter
+	 * to compute code actions is the provided range.
 	 */
 	diagnostics: Diagnostic[];
 
@@ -3826,6 +4750,17 @@
 	diagnostics?: Diagnostic[];
 
 	/**
+	 * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
+	 * by keybindings.
+	 *
+	 * A quick fix should be marked preferred if it properly addresses the underlying error.
+	 * A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
+	 *
+	 * @since 3.15.0
+	 */
+	isPreferred?: boolean;
+
+	/**
 	 * The workspace edit this code action performs.
 	 */
 	edit?: WorkspaceEdit;
@@ -3838,27 +4773,51 @@
 	command?: Command;
 }
 ```
-
+* partial result: `(Command | CodeAction)[]`
 * error: code and message set in case an exception happens during the code action request.
 
-_Registration Options_: `CodeActionRegistrationOptions`  defined as follows:
-
-```typescript
-export interface CodeActionRegistrationOptions extends TextDocumentRegistrationOptions, CodeActionOptions {
-}
-```
-
-
 #### <a href="#textDocument_codeLens" name="textDocument_codeLens" class="anchor">Code Lens Request (:leftwards_arrow_with_hook:)</a>
 
 The code lens request is sent from the client to the server to compute code lenses for a given text document.
 
+_Client Capability_:
+* property name (optional): `textDocument.codeLens`
+* property type: `CodeLensClientCapabilities` defined as follows:
+
+```typescript
+export interface CodeLensClientCapabilities {
+	/**
+	 * Whether code lens supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `codeLensProvider`
+* property type: `CodeLensOptions` defined as follows:
+
+```typescript
+export interface CodeLensOptions extends WorkDoneProgressOptions {
+	/**
+	 * Code lens has a resolve provider as well.
+	 */
+	resolveProvider?: boolean;
+}
+```
+
+_Registration Options_: `CodeLensRegistrationOptions` defined as follows:
+```typescript
+export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOptions, CodeLensOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/codeLens'
 * params: `CodeLensParams` defined as follows:
 
 ```typescript
-interface CodeLensParams {
+interface CodeLensParams extends WorkDoneProgressParams, PartialResultParams {
 	/**
 	 * The document to request code lens for.
 	 */
@@ -3895,19 +4854,9 @@
 	data?: any
 }
 ```
+* partial result: `CodeLens[]`
 * error: code and message set in case an exception happens during the code lens request.
 
-_Registration Options_: `CodeLensRegistrationOptions` defined as follows:
-
-```typescript
-export interface CodeLensRegistrationOptions extends TextDocumentRegistrationOptions {
-	/**
-	 * Code lens has a resolve provider as well.
-	 */
-	resolveProvider?: boolean;
-}
-```
-
 #### <a href="#codeLens_resolve" name="codeLens_resolve" class="anchor">Code Lens Resolve Request (:leftwards_arrow_with_hook:)</a>
 
 The code lens resolve request is sent from the client to the server to resolve the command for a given code lens item.
@@ -3924,12 +4873,51 @@
 
 The document links request is sent from the client to the server to request the location of links in a document.
 
-_Request_:
-* method: 'textDocument/documentLink'
-* params: `DocumentLinkParams`, defined as follows:
+_Client Capability_:
+* property name (optional): `textDocument.documentLink`
+* property type: `DocumentLinkClientCapabilities` defined as follows:
 
 ```typescript
-interface DocumentLinkParams {
+export interface DocumentLinkClientCapabilities {
+	/**
+	 * Whether document link supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * Whether the client supports the `tooltip` property on `DocumentLink`.
+	 *
+	 * @since 3.15.0
+	 */
+	tooltipSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `documentLinkProvider`
+* property type: `DocumentLinkOptions` defined as follows:
+
+```typescript
+export interface DocumentLinkOptions extends WorkDoneProgressOptions {
+	/**
+	 * Document links have a resolve provider as well.
+	 */
+	resolveProvider?: boolean;
+}
+```
+
+_Registration Options_: `DocumentLinkRegistrationOptions` defined as follows:
+```typescript
+export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions, DocumentLinkOptions {
+}
+```
+
+_Request_:
+* method: 'textDocument/documentLink'
+* params: `DocumentLinkParams` defined as follows:
+
+```typescript
+interface DocumentLinkParams extends WorkDoneProgressParams, PartialResultParams {
 	/**
 	 * The document to provide document links for.
 	 */
@@ -3938,7 +4926,7 @@
 ```
 
 _Response_:
-* result: An array of `DocumentLink` \| `null`.
+* result: `DocumentLink[]` \| `null`.
 
 ```typescript
 /**
@@ -3950,10 +4938,23 @@
 	 * The range this link applies to.
 	 */
 	range: Range;
+
 	/**
 	 * The uri this link points to. If missing a resolve request is sent later.
 	 */
 	target?: DocumentUri;
+
+	/**
+	 * The tooltip text when you hover over this link.
+	 *
+	 * If a tooltip is provided, is will be displayed in a string that includes instructions on how to
+	 * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
+	 * user settings, and localization.
+	 *
+	 * @since 3.15.0
+	 */
+	tooltip?: string;
+
 	/**
 	 * A data entry field that is preserved on a document link between a
 	 * DocumentLinkRequest and a DocumentLinkResolveRequest.
@@ -3961,19 +4962,9 @@
 	data?: any;
 }
 ```
+* partial result: `DocumentLink[]`
 * error: code and message set in case an exception happens during the document link request.
 
-_Registration Options_: `DocumentLinkRegistrationOptions` defined as follows:
-
-```typescript
-export interface DocumentLinkRegistrationOptions extends TextDocumentRegistrationOptions {
-	/**
-	 * Document links have a resolve provider as well.
-	 */
-	resolveProvider?: boolean;
-}
-```
-
 #### <a href="#documentLink_resolve" name="documentLink_resolve" class="anchor">Document Link Resolve Request (:leftwards_arrow_with_hook:)</a>
 
 The document link resolve request is sent from the client to the server to resolve the target of a given document link.
@@ -3996,13 +4987,41 @@
 - Color boxes showing the actual color next to the reference
 - Show a color picker when a color reference is edited
 
+_Client Capability_:
+* property name (optional): `textDocument.colorProvider`
+* property type: `DocumentColorClientCapabilities` defined as follows:
+
+```typescript
+export interface DocumentColorClientCapabilities {
+	/**
+	 * Whether document color supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `colorProvider`
+* property type: `boolean | DocumentColorOptions | DocumentColorRegistrationOptions` where `DocumentColorOptions` is defined as follows:
+
+```typescript
+export interface DocumentColorOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `DocumentColorRegistrationOptions` defined as follows:
+```typescript
+export interface DocumentColorRegistrationOptions extends TextDocumentRegistrationOptions, StaticRegistrationOptions, DocumentColorOptions {
+}
+```
+
 _Request_:
 
 * method: 'textDocument/documentColor'
 * params: `DocumentColorParams` defined as follows
 
-```ts
-interface DocumentColorParams {
+```typescript
+interface DocumentColorParams extends WorkDoneProgressParams, PartialResultParams {
 	/**
 	 * The text document.
 	 */
@@ -4052,6 +5071,7 @@
 	readonly alpha: number;
 }
 ```
+* partial result: `ColorInformation[]`
 * error: code and message set in case an exception happens during the 'textDocument/documentColor' request
 
 #### <a href="#textDocument_colorPresentation" name="textDocument_colorPresentation" class="anchor">Color Presentation Request (:leftwards_arrow_with_hook:)</a>
@@ -4062,6 +5082,7 @@
 - modify a color reference.
 - show in a color picker and let users pick one of the presentations
 
+This request has no special capabilities and registration options since it is send as a resolve request for the `textDocument/documentColor` request.
 
 _Request_:
 
@@ -4069,7 +5090,7 @@
 * params: `ColorPresentationParams` defined as follows
 
 ```typescript
-interface ColorPresentationParams {
+interface ColorPresentationParams extends WorkDoneProgressParams, PartialResultParams {
 	/**
 	 * The text document.
 	 */
@@ -4112,18 +5133,47 @@
 }
 ```
 
+* partial result: `ColorPresentation[]`
 * error: code and message set in case an exception happens during the 'textDocument/colorPresentation' request
 
 #### <a href="#textDocument_formatting" name="textDocument_formatting" class="anchor">Document Formatting Request  (:leftwards_arrow_with_hook:)</a>
 
 The document formatting request is sent from the client to the server to format a whole document.
 
+_Client Capability_:
+* property name (optional): `textDocument.formatting`
+* property type: `DocumentFormattingClientCapabilities` defined as follows:
+
+```typescript
+export interface DocumentFormattingClientCapabilities {
+	/**
+	 * Whether formatting supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `documentFormattingProvider`
+* property type: `boolean | DocumentFormattingOptions` where `DocumentFormattingOptions` is defined as follows:
+
+```typescript
+export interface DocumentFormattingOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `DocumentFormattingRegistrationOptions` defined as follows:
+```typescript
+export interface DocumentFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentFormattingOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/formatting'
 * params: `DocumentFormattingParams` defined as follows
 
 ```typescript
-interface DocumentFormattingParams {
+interface DocumentFormattingParams extends WorkDoneProgressParams {
 	/**
 	 * The document to format.
 	 */
@@ -4150,6 +5200,27 @@
 	insertSpaces: boolean;
 
 	/**
+	 * Trim trailing whitespace on a line.
+	 *
+	 * @since 3.15.0
+	 */
+	trimTrailingWhitespace?: boolean;
+
+	/**
+	 * Insert a newline character at the end of the file if one does not exist.
+	 *
+	 * @since 3.15.0
+	 */
+	insertFinalNewline?: boolean;
+
+	/**
+	 * Trim all newlines after the final newline at the end of the file.
+	 *
+	 * @since 3.15.0
+	 */
+	trimFinalNewlines?: boolean;
+
+	/**
 	 * Signature for further properties.
 	 */
 	[key: string]: boolean | number | string;
@@ -4160,18 +5231,44 @@
 * result: [`TextEdit[]`](#textedit) \| `null` describing the modification to the document to be formatted.
 * error: code and message set in case an exception happens during the formatting request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_rangeFormatting" name="textDocument_rangeFormatting" class="anchor">Document Range Formatting Request (:leftwards_arrow_with_hook:)</a>
 
 The document range formatting request is sent from the client to the server to format a given range in a document.
 
+_Client Capability_:
+* property name (optional): `textDocument.rangeFormatting`
+* property type: `DocumentRangeFormattingClientCapabilities` defined as follows:
+
+```typescript
+export interface DocumentRangeFormattingClientCapabilities {
+	/**
+	 * Whether formatting supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `documentRangeFormattingProvider`
+* property type: `boolean | DocumentRangeFormattingOptions` where `DocumentRangeFormattingOptions` is defined as follows:
+
+```typescript
+export interface DocumentRangeFormattingOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `DocumentFormattingRegistrationOptions` defined as follows:
+```typescript
+export interface DocumentRangeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentRangeFormattingOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/rangeFormatting',
 * params: `DocumentRangeFormattingParams` defined as follows:
 
 ```typescript
-interface DocumentRangeFormattingParams {
+interface DocumentRangeFormattingParams extends WorkDoneProgressParams {
 	/**
 	 * The document to format.
 	 */
@@ -4193,28 +5290,53 @@
 * result: [`TextEdit[]`](#textedit) \| `null` describing the modification to the document to be formatted.
 * error: code and message set in case an exception happens during the range formatting request.
 
-_Registration Options_: `TextDocumentRegistrationOptions`
-
 #### <a href="#textDocument_onTypeFormatting" name="textDocument_onTypeFormatting" class="anchor">Document on Type Formatting Request (:leftwards_arrow_with_hook:)</a>
 
 The document on type formatting request is sent from the client to the server to format parts of the document during typing.
 
+_Client Capability_:
+* property name (optional): `textDocument.onTypeFormatting`
+* property type: `DocumentOnTypeFormattingClientCapabilities` defined as follows:
+
+```typescript
+export interface DocumentOnTypeFormattingClientCapabilities {
+	/**
+	 * Whether on type formatting supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `documentOnTypeFormattingProvider`
+* property type: `DocumentOnTypeFormattingOptions` defined as follows:
+
+```typescript
+export interface DocumentOnTypeFormattingOptions {
+	/**
+	 * A character on which formatting should be triggered, like `}`.
+	 */
+	firstTriggerCharacter: string;
+
+	/**
+	 * More trigger characters.
+	 */
+	moreTriggerCharacter?: string[];
+}
+```
+
+_Registration Options_: `DocumentOnTypeFormattingRegistrationOptions` defined as follows:
+```typescript
+export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions, DocumentOnTypeFormattingOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/onTypeFormatting'
 * params: `DocumentOnTypeFormattingParams` defined as follows:
 
 ```typescript
-interface DocumentOnTypeFormattingParams {
-	/**
-	 * The document to format.
-	 */
-	textDocument: TextDocumentIdentifier;
-
-	/**
-	 * The position at which this request was sent.
-	 */
-	position: Position;
-
+interface DocumentOnTypeFormattingParams extends TextDocumentPositionParams {
 	/**
 	 * The character that has been typed.
 	 */
@@ -4231,40 +5353,58 @@
 * result: [`TextEdit[]`](#textedit) \| `null` describing the modification to the document.
 * error: code and message set in case an exception happens during the range formatting request.
 
-_Registration Options_: `DocumentOnTypeFormattingRegistrationOptions` defined as follows:
-
-```typescript
-export interface DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions {
-	/**
-	 * A character on which formatting should be triggered, like `}`.
-	 */
-	firstTriggerCharacter: string;
-	/**
-	 * More trigger characters.
-	 */
-	moreTriggerCharacter?: string[]
-}
-```
 #### <a href="#textDocument_rename" name="textDocument_rename" class="anchor">Rename Request (:leftwards_arrow_with_hook:)</a>
 
 The rename request is sent from the client to the server to ask the server to compute a workspace change so that the client can perform a workspace-wide rename of a symbol.
 
+_Client Capability_:
+* property name (optional): `textDocument.rename`
+* property type: `RenameClientCapabilities` defined as follows:
+
+```typescript
+export interface RenameClientCapabilities {
+	/**
+	 * Whether rename supports dynamic registration.
+	 */
+	dynamicRegistration?: boolean;
+
+	/**
+	 * Client supports testing for validity of rename operations
+	 * before execution.
+	 *
+	 * @since version 3.12.0
+	 */
+	prepareSupport?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `renameProvider`
+* property type: `boolean | RenameOptions` where `RenameOptions` is defined as follows:
+
+`RenameOptions` may only be specified if the client states that it supports `prepareSupport` in its initial `initialize` request.
+
+```typescript
+export interface RenameOptions extends WorkDoneProgressOptions {
+	/**
+	 * Renames should be checked and tested before being executed.
+	 */
+	prepareProvider?: boolean;
+}
+```
+
+_Registration Options_: `RenameRegistrationOptions` defined as follows:
+```typescript
+export interface RenameRegistrationOptions extends TextDocumentRegistrationOptions, RenameOptions {
+}
+```
+
 _Request_:
 * method: 'textDocument/rename'
 * params: `RenameParams` defined as follows
 
 ```typescript
-interface RenameParams {
-	/**
-	 * The document to rename.
-	 */
-	textDocument: TextDocumentIdentifier;
-
-	/**
-	 * The position at which this request was sent.
-	 */
-	position: Position;
-
+interface RenameParams extends TextDocumentPositionParams, WorkDoneProgressParams {
 	/**
 	 * The new name of the symbol. If the given name is not valid the
 	 * request must return a [ResponseError](#ResponseError) with an
@@ -4278,17 +5418,6 @@
 * result: [`WorkspaceEdit`](#workspaceedit) \| `null` describing the modification to the workspace.
 * error: code and message set in case an exception happens during the rename request.
 
-_Registration Options_: `RenameRegistrationOptions` defined as follows:
-
-```typescript
-export interface RenameRegistrationOptions extends TextDocumentRegistrationOptions {
-	/**
-	 * Renames should be checked and tested for validity before being executed.
-	 */
-	prepareProvider?: boolean;
-}
-```
-
 #### <a href="#textDocument_prepareRename" name="textDocument_prepareRename" class="anchor">Prepare Rename Request (:leftwards_arrow_with_hook:)</a>
 
 > *Since version 3.12.0*
@@ -4297,11 +5426,15 @@
 
 _Request_:
 * method: 'textDocument/prepareRename'
-* params: [`TextDocumentPositionParams`](#textdocumentpositionparams)
+* params: `PrepareRenameParams` defined as follows:
+```typescript
+export interface PrepareRenameParams extends TextDocumentPositionParams {
+}
+```
 
 _Response_:
 * result: [`Range`](#range) \| `{ range: Range, placeholder: string }` \| `null` describing the range of the string to rename and optionally a placeholder text of the string content to be renamed. If `null` is returned then it is deemed that a 'textDocument/rename' request is not valid at the given position.
-* error: code and message set in case an exception happens during the prepare rename request.
+* error: code and message set in case the element can't be renamed. Clients should show the information in their user interface.
 
 #### <a href="#textDocument_foldingRange" name="textDocument_foldingRange" class="anchor">Folding Range Request (:leftwards_arrow_with_hook:)</a>
 
@@ -4309,19 +5442,58 @@
 
 The folding range request is sent from the client to the server to return all folding ranges found in a given text document.
 
+_Client Capability_:
+* property name (optional): `textDocument.foldingRange`
+* property type: `FoldingRangeClientCapabilities` defined as follows:
+
+```typescript
+export interface FoldingRangeClientCapabilities {
+	/**
+	 * Whether implementation supports dynamic registration for folding range providers. If this is set to `true`
+	 * the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server
+	 * capability as well.
+	 */
+	dynamicRegistration?: boolean;
+	/**
+	 * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
+	 * hint, servers are free to follow the limit.
+	 */
+	rangeLimit?: number;
+	/**
+	 * If set, the client signals that it only supports folding complete lines. If set, client will
+	 * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
+	 */
+	lineFoldingOnly?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `foldingRangeProvider`
+* property type: `boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions` where `FoldingRangeOptions` is defined as follows:
+
+```typescript
+export interface FoldingRangeOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `FoldingRangeRegistrationOptions` defined as follows:
+```typescript
+export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions, StaticRegistrationOptions {
+}
+```
+
 _Request_:
 
 * method: 'textDocument/foldingRange'
 * params: `FoldingRangeParams` defined as follows
 
 ```typescript
-export interface FoldingRangeParams {
+export interface FoldingRangeParams extends WorkDoneProgressParams, PartialResultParams {
 	/**
 	 * The text document.
 	 */
 	textDocument: TextDocumentIdentifier;
 }
-
 ```
 
 _Response_:
@@ -4380,10 +5552,86 @@
 }
 ```
 
+* partial result: `FoldingRange[]`
 * error: code and message set in case an exception happens during the 'textDocument/foldingRange' request
 
-_Registration Options_: `TextDocumentRegistrationOptions`
+#### <a href="#textDocument_selectionRange" name="textDocument_selectionRange" class="anchor">Selection Range Request (:leftwards_arrow_with_hook:)</a>
 
+> *Since version 3.15.0*
+
+The selection range request is sent from the client to the server to return suggested selection ranges at an array of given positions. A selection range is a range around the cursor position which the user might be interested in selecting.
+
+A selection range in the return array is for the position in the provided parameters at the same index. Therefore positions[i] must be contained in result[i].range.
+
+Typically, but not necessary, selection ranges correspond to the nodes of the syntax tree.
+
+_Client Capability_:
+* property name (optional): `textDocument.selectionRange`
+* property type: `SelectionRangeClientCapabilities` defined as follows:
+
+```typescript
+export interface SelectionRangeClientCapabilities {
+	/**
+	 * Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
+	 * the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
+	 * capability as well.
+	 */
+	dynamicRegistration?: boolean;
+}
+```
+
+_Server Capability_:
+* property name (optional): `selectionRangeProvider`
+* property type: `boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions` where `SelectionRangeOptions` is defined as follows:
+
+```typescript
+export interface SelectionRangeOptions extends WorkDoneProgressOptions {
+}
+```
+
+_Registration Options_: `SelectionRangeRegistrationOptions` defined as follows:
+```typescript
+export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
+}
+```
+
+_Request_:
+
+* method: 'textDocument/selectionRange'
+* params: `SelectionRangeParams` defined as follows
+
+```typescript
+export interface SelectionRangeParams extends WorkDoneProgressParams, PartialResultParams {
+	/**
+	 * The text document.
+	 */
+	textDocument: TextDocumentIdentifier;
+
+	/**
+	 * The positions inside the text document.
+	 */
+	positions: Position[];
+}
+```
+
+_Response_:
+* result: `SelectionRange[] | null` defined as follows:
+
+```typescript
+export interface SelectionRange {
+    /**
+     * The [range](#Range) of this selection range.
+     */
+    range: Range;
+    /**
+     * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
+     */
+    parent?: SelectionRange;
+}
+```
+
+* partial result: `SelectionRange[]`
+* error: code and message set in case an exception happens during the 'textDocument/selectionRange' request
 
 ### Implementation considerations
 
@@ -4392,10 +5640,28 @@
 - if a client sends a request to the server and the client state changes in a way that the result will be invalid it should cancel the server request and ignore the result. If necessary it can resend the request to receive an up to date result.
 - if a server detects a state change that invalidates the result of a request in execution the server can error these requests with `ContentModified`. If clients receive a `ContentModified` error, it generally should not show it in the UI for the end-user. Clients can resend the request if appropriate.
 - if servers end up in an inconsistent state they should log this to the client using the `window/logMessage` request. If they can't recover from this the best they can do right now is to exit themselves. We are considering an [extension to the protocol](https://github.com/Microsoft/language-server-protocol/issues/646) that allows servers to request a restart on the client side.
-- if a client notices that a server exists unexpectedly it should try to 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.
+- if a client notices that a server exits unexpectedly, it should try to restart the server. However clients should be careful not to restart a crashing server endlessly. VS Code, for example, doesn't restart a server which has crashed 5 times in the last 180 seconds.
 
 ### <a href="#changeLog" name="changeLog" class="anchor">Change Log</a>
 
+#### <a href="#version_3_15_0" name="version_3_15_0" class="anchor">3.15.0 (01/14/2020)</a>
+
+* Add generic progress reporting support.
+* Add specific work done progress reporting support to requests where applicable.
+* Add specific partial result progress support to requests where applicable.
+* Add support for `textDocument/selectionRange`.
+* Add support for server and client information.
+* Add signature help context.
+* Add Erlang and Elixir to the list of supported programming languages
+* Add `version` on `PublishDiagnosticsParams`
+* Add `CodeAction#isPreferred` support.
+* Add `CompletionItem#tag` support.
+* Add `Diagnostic#tag` support.
+* Add `DocumentLink#tooltip` support.
+* Add `trimTrailingWhitespace`, `insertFinalNewline` and `trimFinalNewlines` to `FormattingOptions`.
+* Clarified `WorkspaceSymbolParams#query` parameter.
+
+
 #### <a href="#version_3_14_0" name="version_3_14_0" class="anchor">3.14.0 (12/13/2018)</a>
 
 * Add support for signature label offsets.
diff --git a/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart b/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart
index d303886..1f510d6 100644
--- a/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart
+++ b/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart
@@ -13,6 +13,17 @@
 /// of type names for inline types.
 const fieldNameForIndexer = 'indexer';
 
+final _keywords = const <String, TokenType>{
+  'class': TokenType.CLASS_KEYWORD,
+  'const': TokenType.CONST_KEYWORD,
+  'enum': TokenType.ENUM_KEYWORD,
+  'export': TokenType.EXPORT_KEYWORD,
+  'extends': TokenType.EXTENDS_KEYWORD,
+  'interface': TokenType.INTERFACE_KEYWORD,
+  'namespace': TokenType.NAMESPACE_KEYWORD,
+  'readonly': TokenType.READONLY_KEYWORD,
+};
+
 final _validIdentifierCharacters = RegExp('[a-zA-Z0-9_]');
 
 bool isAnyType(TypeBase t) =>
@@ -151,6 +162,7 @@
     this.baseTypes,
     this.members,
   ) : super(comment);
+
   @override
   String get name => nameToken.lexeme;
   String get nameWithTypeArgs => '$name$typeArgsString';
@@ -245,6 +257,18 @@
       return _advance();
     }
 
+    // The scanner currently reads keywords with specific token types
+    // (eg. TokenType.NAMESPACE_KEYWORD) however v3.16 of the LSP spec also uses
+    // some of these words as identifiers. If the requested type is an identifier
+    // but we have a keyword token, then treat it as an identifier.
+    if (type == TokenType.IDENTIFIER) {
+      final next = !_isAtEnd ? _peek() : null;
+      if (_isKeyword(next?.type)) {
+        _advance();
+        return Token(TokenType.IDENTIFIER, next.lexeme);
+      }
+    }
+
     throw '$message\n\n${_peek()}';
   }
 
@@ -269,7 +293,6 @@
 
   Const _enumValue(String enumName) {
     final leadingComment = _comment();
-    _eatUnwantedKeywords();
     final name = _consume(TokenType.IDENTIFIER, 'Expected identifier');
     TypeBase type;
     if (_match([TokenType.COLON])) {
@@ -420,6 +443,8 @@
     return Interface(leadingComment, name, typeArgs, baseTypes, members);
   }
 
+  bool _isKeyword(TokenType type) => _keywords.values.contains(type);
+
   String _joinNames(String parent, String child) {
     return '$parent${capitalize(child)}';
   }
@@ -502,7 +527,9 @@
     if (includeUndefined) {
       types.add(Type.Undefined);
     }
+    var typeIndex = 0;
     while (true) {
+      typeIndex++;
       TypeBase type;
       if (_match([TokenType.LEFT_BRACE])) {
         // Inline interfaces.
@@ -521,7 +548,12 @@
           type = MapType(indexer.indexType, indexer.valueType);
         } else {
           // Add a synthetic interface to the parsers list of nodes to represent this type.
-          final generatedName = _joinNames(containerName, fieldName);
+          // If we have no fieldName to base the synthetic name from, we should use
+          // the index of this type, for example in:
+          //    type Foo = { [..] } | { [...] }
+          // we will generate Foo1 and Foo2 for the types.
+          final nameSuffix = fieldName ?? '$typeIndex';
+          final generatedName = _joinNames(containerName, nameSuffix);
           _nodes.add(InlineInterface(generatedName, members));
           // Record the type as a simple type that references this interface.
           type = Type.identifier(generatedName);
@@ -616,7 +648,9 @@
     final name = _consume(TokenType.IDENTIFIER, 'Expected identifier');
     _consume(TokenType.EQUAL, 'Expected =');
     final type = _type(name.lexeme, null);
-    _consume(TokenType.SEMI_COLON, 'Expected ;');
+    if (!_isAtEnd) {
+      _consume(TokenType.SEMI_COLON, 'Expected ;');
+    }
 
     return TypeAlias(leadingComment, name, type);
   }
@@ -640,8 +674,16 @@
     return _tokens;
   }
 
-  void _addToken(TokenType type) {
-    final text = _source.substring(_startOfToken, _currentPos);
+  void _addToken(TokenType type, {bool mergeSameTypes = false}) {
+    var text = _source.substring(_startOfToken, _currentPos);
+
+    // Consecutive tokens of some types (for example Comments) are merged
+    // together.
+    if (mergeSameTypes && _tokens.isNotEmpty && type == _tokens.last.type) {
+      text = '${_tokens.last.lexeme}\n$text';
+      _tokens.removeLast();
+    }
+
     _tokens.add(Token(type, text));
   }
 
@@ -650,23 +692,13 @@
       : throw 'Cannot advance past end of source';
 
   void _identifier() {
-    const keywords = <String, TokenType>{
-      'class': TokenType.CLASS_KEYWORD,
-      'const': TokenType.CONST_KEYWORD,
-      'enum': TokenType.ENUM_KEYWORD,
-      'export': TokenType.EXPORT_KEYWORD,
-      'extends': TokenType.EXTENDS_KEYWORD,
-      'interface': TokenType.INTERFACE_KEYWORD,
-      'namespace': TokenType.NAMESPACE_KEYWORD,
-      'readonly': TokenType.READONLY_KEYWORD,
-    };
     while (_isAlpha(_peek())) {
       _advance();
     }
 
     final string = _source.substring(_startOfToken, _currentPos);
-    if (keywords.containsKey(string)) {
-      _addToken(keywords[string]);
+    if (_keywords.containsKey(string)) {
+      _addToken(_keywords[string]);
     } else {
       _addToken(TokenType.IDENTIFIER);
     }
@@ -744,13 +776,13 @@
             _advance();
             _advance();
           }
-          _addToken(TokenType.COMMENT);
+          _addToken(TokenType.COMMENT, mergeSameTypes: true);
         } else if (_match('/')) {
           // Single line comment.
           while (_peek() != '\n' && !_isAtEnd) {
             _advance();
           }
-          _addToken(TokenType.COMMENT);
+          _addToken(TokenType.COMMENT, mergeSameTypes: true);
         } else {
           _addToken(TokenType.SLASH);
         }
diff --git a/pkg/analysis_server/tool/migration_runner.dart b/pkg/analysis_server/tool/migration_runner.dart
index 8b989cd..1edcefa 100644
--- a/pkg/analysis_server/tool/migration_runner.dart
+++ b/pkg/analysis_server/tool/migration_runner.dart
@@ -30,8 +30,8 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/sdk.dart';
+import 'package:cli_util/cli_util.dart';
 import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 
@@ -70,9 +70,7 @@
     // Create server
     //
     var options = AnalysisServerOptions();
-    var sdkPath = FolderBasedDartSdk.defaultSdkDirectory(
-      PhysicalResourceProvider.INSTANCE,
-    ).path;
+    var sdkPath = getSdkPath();
     return AnalysisServer(
         serverChannel,
         resourceProvider,
diff --git a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
index 388a2c7..ee2d987 100644
--- a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
+++ b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
@@ -469,6 +469,22 @@
   public void diagnostic_getServerPort(GetServerPortConsumer consumer);
 
   /**
+   * {@code edit.bulkFixes}
+   *
+   * Analyze the specified sources for fixes that can be applied in bulk and return a set of
+   * suggested edits for those sources. These edits may include changes to sources outside the set of
+   * specified sources if a change in a specified source requires it.
+   *
+   * @param included A list of the files and directories for which edits should be suggested. If a
+   *         request is made with a path that is invalid, e.g. is not absolute and normalized, an
+   *         error of type INVALID_FILE_PATH_FORMAT will be generated. If a request is made for a
+   *         file which does not exist, or which is not currently subject to analysis (e.g. because
+   *         it is not associated with any analysis root specified to analysis.setAnalysisRoots), an
+   *         error of type FILE_NOT_ANALYZED will be generated.
+   */
+  public void edit_bulkFixes(List<String> included, BulkFixesConsumer consumer);
+
+  /**
    * {@code edit.dartfix}
    *
    * Analyze the specified sources for recommended changes and return a set of suggested edits for
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index 81cfb21..5a3e9d2 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -2160,6 +2160,44 @@
       </field>
     </result>
   </request>
+  <request method="bulkFixes" experimental="true">
+    <p>
+      Analyze the specified sources for fixes that can be applied in bulk
+      and return a set of suggested edits for those sources.
+      These edits may include changes to sources outside the set
+      of specified sources if a change in a specified source requires it.
+    </p>
+    <params>
+      <field name="included">
+        <list>
+          <ref>FilePath</ref>
+        </list>
+        <p>
+          A list of the files and directories for which edits should be
+          suggested.
+        </p>
+        <p>
+          If a request is made with a path that is invalid, e.g. is not absolute
+          and normalized, an error of type <tt>INVALID_FILE_PATH_FORMAT</tt>
+          will be generated. If a request is made for a file which does not
+          exist, or which is not currently subject to analysis (e.g. because it
+          is not associated with any analysis root specified to
+          analysis.setAnalysisRoots), an error of type
+          <tt>FILE_NOT_ANALYZED</tt> will be generated.
+        </p>
+      </field>
+    </params>
+    <result>
+      <field name="edits">
+        <list>
+          <ref>SourceFileEdit</ref>
+        </list>
+        <p>
+          A list of source edits to apply the recommended changes.
+        </p>
+      </field>
+    </result>
+  </request>
   <request method="dartfix" experimental="true">
     <p>
       Analyze the specified sources for recommended changes
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
index 2a888ca..2ba9eea 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
@@ -164,6 +164,8 @@
 const String DIAGNOSTIC_REQUEST_GET_SERVER_PORT = 'diagnostic.getServerPort';
 const String DIAGNOSTIC_RESPONSE_GET_DIAGNOSTICS_CONTEXTS = 'contexts';
 const String DIAGNOSTIC_RESPONSE_GET_SERVER_PORT_PORT = 'port';
+const String EDIT_REQUEST_BULK_FIXES = 'edit.bulkFixes';
+const String EDIT_REQUEST_BULK_FIXES_INCLUDED = 'included';
 const String EDIT_REQUEST_DARTFIX = 'edit.dartfix';
 const String EDIT_REQUEST_DARTFIX_EXCLUDED_FIXES = 'excludedFixes';
 const String EDIT_REQUEST_DARTFIX_INCLUDED = 'included';
@@ -220,6 +222,7 @@
 const String EDIT_REQUEST_ORGANIZE_DIRECTIVES_FILE = 'file';
 const String EDIT_REQUEST_SORT_MEMBERS = 'edit.sortMembers';
 const String EDIT_REQUEST_SORT_MEMBERS_FILE = 'file';
+const String EDIT_RESPONSE_BULK_FIXES_EDITS = 'edits';
 const String EDIT_RESPONSE_DARTFIX_DETAILS = 'details';
 const String EDIT_RESPONSE_DARTFIX_EDITS = 'edits';
 const String EDIT_RESPONSE_DARTFIX_HAS_ERRORS = 'hasErrors';
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
index a9a1cf0..29ae9ac 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
@@ -7115,6 +7115,180 @@
   }
 }
 
+/// edit.bulkFixes params
+///
+/// {
+///   "included": List<FilePath>
+/// }
+///
+/// Clients may not extend, implement or mix-in this class.
+class EditBulkFixesParams implements RequestParams {
+  List<String> _included;
+
+  /// A list of the files and directories for which edits should be suggested.
+  ///
+  /// If a request is made with a path that is invalid, e.g. is not absolute
+  /// and normalized, an error of type INVALID_FILE_PATH_FORMAT will be
+  /// generated. If a request is made for a file which does not exist, or which
+  /// is not currently subject to analysis (e.g. because it is not associated
+  /// with any analysis root specified to analysis.setAnalysisRoots), an error
+  /// of type FILE_NOT_ANALYZED will be generated.
+  List<String> get included => _included;
+
+  /// A list of the files and directories for which edits should be suggested.
+  ///
+  /// If a request is made with a path that is invalid, e.g. is not absolute
+  /// and normalized, an error of type INVALID_FILE_PATH_FORMAT will be
+  /// generated. If a request is made for a file which does not exist, or which
+  /// is not currently subject to analysis (e.g. because it is not associated
+  /// with any analysis root specified to analysis.setAnalysisRoots), an error
+  /// of type FILE_NOT_ANALYZED will be generated.
+  set included(List<String> value) {
+    assert(value != null);
+    _included = value;
+  }
+
+  EditBulkFixesParams(List<String> included) {
+    this.included = included;
+  }
+
+  factory EditBulkFixesParams.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    json ??= {};
+    if (json is Map) {
+      List<String> included;
+      if (json.containsKey('included')) {
+        included = jsonDecoder.decodeList(
+            jsonPath + '.included', json['included'], jsonDecoder.decodeString);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, 'included');
+      }
+      return EditBulkFixesParams(included);
+    } else {
+      throw jsonDecoder.mismatch(jsonPath, 'edit.bulkFixes params', json);
+    }
+  }
+
+  factory EditBulkFixesParams.fromRequest(Request request) {
+    return EditBulkFixesParams.fromJson(
+        RequestDecoder(request), 'params', request.params);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    var result = <String, dynamic>{};
+    result['included'] = included;
+    return result;
+  }
+
+  @override
+  Request toRequest(String id) {
+    return Request(id, 'edit.bulkFixes', toJson());
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is EditBulkFixesParams) {
+      return listEqual(
+          included, other.included, (String a, String b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, included.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/// edit.bulkFixes result
+///
+/// {
+///   "edits": List<SourceFileEdit>
+/// }
+///
+/// Clients may not extend, implement or mix-in this class.
+class EditBulkFixesResult implements ResponseResult {
+  List<SourceFileEdit> _edits;
+
+  /// A list of source edits to apply the recommended changes.
+  List<SourceFileEdit> get edits => _edits;
+
+  /// A list of source edits to apply the recommended changes.
+  set edits(List<SourceFileEdit> value) {
+    assert(value != null);
+    _edits = value;
+  }
+
+  EditBulkFixesResult(List<SourceFileEdit> edits) {
+    this.edits = edits;
+  }
+
+  factory EditBulkFixesResult.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    json ??= {};
+    if (json is Map) {
+      List<SourceFileEdit> edits;
+      if (json.containsKey('edits')) {
+        edits = jsonDecoder.decodeList(
+            jsonPath + '.edits',
+            json['edits'],
+            (String jsonPath, Object json) =>
+                SourceFileEdit.fromJson(jsonDecoder, jsonPath, json));
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, 'edits');
+      }
+      return EditBulkFixesResult(edits);
+    } else {
+      throw jsonDecoder.mismatch(jsonPath, 'edit.bulkFixes result', json);
+    }
+  }
+
+  factory EditBulkFixesResult.fromResponse(Response response) {
+    return EditBulkFixesResult.fromJson(
+        ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
+        'result',
+        response.result);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    var result = <String, dynamic>{};
+    result['edits'] =
+        edits.map((SourceFileEdit value) => value.toJson()).toList();
+    return result;
+  }
+
+  @override
+  Response toResponse(String id) {
+    return Response(id, result: toJson());
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is EditBulkFixesResult) {
+      return listEqual(
+          edits, other.edits, (SourceFileEdit a, SourceFileEdit b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    var hash = 0;
+    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
 /// edit.dartfix params
 ///
 /// {
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index ce3906e..50ac6e8 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,6 +1,38 @@
-## 0.39.13-dev
+## 0.39.16
+* Added `TypeVisitorWithArgument` and `DartType.acceptWithArgument`.
+* Bumped the analyzer's SDK requirement to `>=2.7.0`, so that extension methods
+  can be used within the analyzer implementation. Previously it was `2.6.0`,
+  but there is an [issue](https://github.com/dart-lang/sdk/issues/42888).
+
+## 0.39.15
+* Move `asInstanceOf(ClassElement)` to `DartType`, so that it is also
+  supported for `TypeParameterType` when its bound implements the
+  requested interface.
+* Fixed invalid implicit downcast in `InterfaceType.allSupertypes`.
+* The internal `currentVersion` of the language updated to `2.10`.
+* Bug fixes: 41065, 42797, 42770, 42668.
+
+## 0.39.14
+* Removed `defaultSdkDirectory()` and `getSdkProperty()` from internal
+  `FolderBasedDartSdk`. It is up to the clients to decide how to
+  find SDK, for example using `package:cli_util`.
+* Fixed `LintDriver` for the new way to access `WorkspacePackage`.
+* Deprecated `Scope.lookup()`, use `Scope.lookup2()` instead.
+* Updated implementations of `ContextBuilder.createContext()` and
+  `ContextLocator.locateContexts` to use the current SDK if `sdkPath`
+  is not provided.
+* Bug fixes: #41981, #29731, #42720, #33545, #42599, #42699.
+
+## 0.39.13
 * Added 'dart/sdk/build_sdk_summary.dart' with `buildSdkSummary`.
 * Added `DynamicType`, `NeverType`, and `VoidType` interfaces.
+* Added `TypeVisitor` and `DartType.accept(TypeVisitor)`.
+* Changed `ConstructorElement.returnType` to `InterfaceType`.
+* Added `InterfaceType.allSupertypes`.
+* Added `InterfaceType.asInstanceOf(ClassElement)`.
+* Removed deprecated internal `bogus-disabled` and `bogus-enabled`.
+* Added `Scope`, `LibraryElement.scope`, and `PrefixElement.scope`.
+* Bug fixes: #32192, #42620, #42256, #42605.
 
 ## 0.39.12
 * Deprecated `canUseSummaries` in `DartSdkManager` constructor.
diff --git a/pkg/analyzer/analysis_options.yaml b/pkg/analyzer/analysis_options.yaml
index fe59776..62f4670 100644
--- a/pkg/analyzer/analysis_options.yaml
+++ b/pkg/analyzer/analysis_options.yaml
@@ -11,11 +11,23 @@
     omit_local_variable_types: ignore
     # There are currently 3360 violations in lib/.
     prefer_single_quotes: ignore
-    # There are currently 2000 violations in lib/.
-    unnecessary_this: ignore
+
+    # "strict-inference" is enabled, but "unused" parameters named '_' are
+    # still reported.  Re-evaluate after
+    # https://github.com/dart-lang/language/pull/599 and a functional fix land.
+    inference_failure_on_untyped_parameter: ignore
+    # There are about 10k violations in test/ due to missing return types on
+    # test methods. It would be nice to mark this code as
+    # "ignored for test/**/*.dart".
+    inference_failure_on_function_return_type: ignore
+
+  language:
+    strict-inference: true
 
 linter:
   rules:
     - avoid_unused_constructor_parameters
     - empty_statements
+    - prefer_typing_uninitialized_variables
     - unnecessary_brace_in_string_interps
+    - unnecessary_parenthesis
diff --git a/pkg/analyzer/doc/tutorial/analysis.md b/pkg/analyzer/doc/tutorial/analysis.md
index c72050d..dde9f45 100644
--- a/pkg/analyzer/doc/tutorial/analysis.md
+++ b/pkg/analyzer/doc/tutorial/analysis.md
@@ -48,14 +48,14 @@
 to analyze.
 
 ```dart
-main() {
+void main() {
   List<String> includedPaths = <String>[/* ... */];
   AnalysisContextCollection collection =
       new AnalysisContextCollection(includedPaths: includedPaths);
   analyzeSomeFiles(collection, includedPaths);
 }
 
-analyzeSomeFiles(
+void analyzeSomeFiles(
     AnalysisContextCollection collection, List<String> includedPaths) {
   // See below.
 }
@@ -77,7 +77,7 @@
 analysis with the following:
 
 ```dart
-analyzeSomeFiles(
+void analyzeSomeFiles(
     AnalysisContextCollection collection, List<String> includedPaths) {
   for (String path in includedPaths) {
     AnalysisContext context = collection.contextFor(path);
@@ -85,7 +85,7 @@
   }
 }
 
-analyzeSingleFile(AnalysisContext context, String path) {
+void analyzeSingleFile(AnalysisContext context, String path) {
   // See below.
 }
 ```
@@ -97,7 +97,7 @@
 different API:
 
 ```dart
-analyzeAllFiles(AnalysisContextCollection collection) {
+void analyzeAllFiles(AnalysisContextCollection collection) {
   for (AnalysisContext context in collection.contexts) {
     for (String path in context.contextRoot.analyzedFiles()) {
       analyzeSingleFile(context, path);
@@ -105,7 +105,7 @@
   }
 }
 
-analyzeSingleFile(AnalysisContext context, String path) {
+void analyzeSingleFile(AnalysisContext context, String path) {
   // See below.
 }
 ```
@@ -123,7 +123,7 @@
 perform the analysis.
 
 ```dart
-analyzeSingleFile(AnalysisContext context, String path) {
+void analyzeSingleFile(AnalysisContext context, String path) {
   AnalysisSession session = context.currentSession;
   // ...
 }
diff --git a/pkg/analyzer/doc/tutorial/ast.md b/pkg/analyzer/doc/tutorial/ast.md
index 57af577..e39a89b 100644
--- a/pkg/analyzer/doc/tutorial/ast.md
+++ b/pkg/analyzer/doc/tutorial/ast.md
@@ -54,7 +54,7 @@
 the AST:
 
 ```dart
-processFile(AnalysisSession session, String path) {
+void processFile(AnalysisSession session, String path) {
   ParsedUnitResult result = session.getParsedUnit(path);
   CompilationUnit unit = result.unit;
 }
@@ -64,7 +64,7 @@
 method to access it:
 
 ```dart
-processFile(AnalysisSession session, String path) async {
+void processFile(AnalysisSession session, String path) async {
   ResolvedUnitResult result = await session.getResolvedUnit(path);
   CompilationUnit unit = result.unit;
 }
diff --git a/pkg/analyzer/doc/tutorial/element.md b/pkg/analyzer/doc/tutorial/element.md
index 88db476..5464d12 100644
--- a/pkg/analyzer/doc/tutorial/element.md
+++ b/pkg/analyzer/doc/tutorial/element.md
@@ -45,7 +45,7 @@
 ask the analysis session for the compilation unit representing that file.
 
 ```dart
-analyzeSingleFile(AnalysisSession session, String path) async {
+void analyzeSingleFile(AnalysisSession session, String path) async {
   UnitElementResult result = await session.getUnitElement(path);
   CompilationUnitElement element = result.element;
 }
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index fb1492f..0ecf87a 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -2131,7 +2131,19 @@
 /// The declaration of one or more fields of the same type.
 ///
 ///    fieldDeclaration ::=
-///        'static'? [VariableDeclarationList] ';'
+///        'static' 'const' <type>? <staticFinalDeclarationList>
+///      | 'static' 'final' <type>? <staticFinalDeclarationList>
+///      | 'static' 'late' 'final' <type>? <initializedIdentifierList>
+///      | 'static' 'late'? <varOrType> <initializedIdentifierList>
+///      | 'covariant' 'late'? <varOrType> <initializedIdentifierList>
+///      | 'late'? 'final' <type>? <initializedIdentifierList>
+///      | 'late'? <varOrType> <initializedIdentifierList>
+///      | 'abstract' (<finalVarOrType> | 'covariant' <varOrType>)
+///            <identifierList>
+///
+/// (Note: there is no <fieldDeclaration> production in the grammar; this is a
+/// subset of the grammar production <declaration>, which encompasses everything
+/// that can appear inside a class declaration except methods).
 ///
 /// Prior to the 'extension-methods' experiment, these nodes were always
 /// children of a class declaration. When the experiment is enabled, these nodes
@@ -2139,6 +2151,9 @@
 ///
 /// Clients may not extend, implement or mix-in this class.
 abstract class FieldDeclaration implements ClassMember {
+  /// The `abstract` keyword, or `null` if the keyword was not used.
+  Token get abstractKeyword;
+
   /// The 'covariant' keyword, or `null` if the keyword was not used.
   Token get covariantKeyword;
 
diff --git a/pkg/analyzer/lib/dart/ast/ast_factory.dart b/pkg/analyzer/lib/dart/ast/ast_factory.dart
index d324d7a..231ad4c 100644
--- a/pkg/analyzer/lib/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/dart/ast/ast_factory.dart
@@ -363,6 +363,7 @@
   FieldDeclaration fieldDeclaration2(
       {Comment comment,
       List<Annotation> metadata,
+      Token abstractKeyword,
       Token covariantKeyword,
       Token staticKeyword,
       @required VariableDeclarationList fieldList,
diff --git a/pkg/analyzer/lib/dart/ast/visitor.dart b/pkg/analyzer/lib/dart/ast/visitor.dart
index 5956889..bf78d64 100644
--- a/pkg/analyzer/lib/dart/ast/visitor.dart
+++ b/pkg/analyzer/lib/dart/ast/visitor.dart
@@ -98,7 +98,7 @@
 
   /// Initialize a newly created visitor to use each of the given delegate
   /// visitors to visit the nodes of an AST structure.
-  DelegatingAstVisitor(this.delegates);
+  const DelegatingAstVisitor(this.delegates);
 
   @override
   T visitNode(AstNode node) {
@@ -128,6 +128,9 @@
 ///
 /// Clients may extend this class.
 class GeneralizingAstVisitor<R> implements AstVisitor<R> {
+  /// Initialize a newly created visitor.
+  const GeneralizingAstVisitor();
+
   @override
   R visitAdjacentStrings(AdjacentStrings node) => visitStringLiteral(node);
 
@@ -606,6 +609,9 @@
 ///
 /// Clients may extend this class.
 class RecursiveAstVisitor<R> implements AstVisitor<R> {
+  /// Initialize a newly created visitor.
+  const RecursiveAstVisitor();
+
   @override
   R visitAdjacentStrings(AdjacentStrings node) {
     node.visitChildren(this);
@@ -1341,6 +1347,9 @@
 ///
 /// Clients may extend this class.
 class SimpleAstVisitor<R> implements AstVisitor<R> {
+  /// Initialize a newly created visitor.
+  const SimpleAstVisitor();
+
   @override
   R visitAdjacentStrings(AdjacentStrings node) => null;
 
@@ -1719,6 +1728,9 @@
 ///
 /// Clients may extend this class.
 class ThrowingAstVisitor<R> implements AstVisitor<R> {
+  /// Initialize a newly created visitor.
+  const ThrowingAstVisitor();
+
   @override
   R visitAdjacentStrings(AdjacentStrings node) => _throw(node);
 
@@ -3097,6 +3109,9 @@
 ///
 /// Clients may extend this class.
 class UnifyingAstVisitor<R> implements AstVisitor<R> {
+  /// Initialize a newly created visitor.
+  const UnifyingAstVisitor();
+
   @override
   R visitAdjacentStrings(AdjacentStrings node) => visitNode(node);
 
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index e25a5b3..34e6cd6 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -37,6 +37,7 @@
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/dart/element/type_system.dart';
@@ -487,6 +488,9 @@
   /// if this constructor does not redirect to another constructor or if the
   /// library containing this constructor has not yet been resolved.
   ConstructorElement get redirectedConstructor;
+
+  @override
+  InterfaceType get returnType;
 }
 
 /// The base class for all of the elements in the element model. Generally
@@ -1106,6 +1110,10 @@
   @override
   FieldElement get declaration;
 
+  /// Return `true` if this field is abstract. Executable fields are abstract if
+  /// they are declared with the `abstract` keyword.
+  bool get isAbstract;
+
   /// Return `true` if this field was explicitly marked as being covariant.
   bool get isCovariant;
 
@@ -1372,6 +1380,10 @@
   /// computed yet.
   Namespace get publicNamespace;
 
+  /// Return the name lookup scope for this library. It consists of elements
+  /// that are either declared in the library, or imported into it.
+  Scope get scope;
+
   /// Return the top-level elements defined in each of the compilation units
   /// that are included in this library. This includes both public and private
   /// elements, but does not include imports, exports, or synthetic elements.
@@ -1571,6 +1583,11 @@
 abstract class PrefixElement implements Element {
   @override
   LibraryElement get enclosingElement;
+
+  /// Return the name lookup scope for this import prefix. It consists of
+  /// elements imported into the enclosing library with this prefix. The
+  /// namespace combinators of the import directives are taken into account.
+  Scope get scope;
 }
 
 /// A variable that might be subject to type promotion.  This might be a local
diff --git a/pkg/analyzer/lib/dart/element/scope.dart b/pkg/analyzer/lib/dart/element/scope.dart
new file mode 100644
index 0000000..ee35529
--- /dev/null
+++ b/pkg/analyzer/lib/dart/element/scope.dart
@@ -0,0 +1,28 @@
+// 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/dart/element/element.dart';
+import 'package:meta/meta.dart';
+
+/// Scopes are used to resolve names to elements.
+abstract class Scope {
+  /// Return the element with the name `id` or `id=` (if [setter] is `true`),
+  /// `null` if the name is not defined within this scope.
+  @Deprecated('Use lookup2() that is closer to the language specification')
+  Element lookup({@required String id, @required bool setter});
+
+  /// Return the result of lexical lookup for the given [id], not `null`.
+  ///
+  /// Getters and setters are bundled, when we found one or another, we are
+  /// done with the lookup, and return both the getter and the setter, if
+  /// available.
+  ScopeLookupResult lookup2(String id);
+}
+
+class ScopeLookupResult {
+  final Element getter;
+  final Element setter;
+
+  ScopeLookupResult(this.getter, this.setter);
+}
diff --git a/pkg/analyzer/lib/dart/element/type.dart b/pkg/analyzer/lib/dart/element/type.dart
index e3d864e..156470c 100644
--- a/pkg/analyzer/lib/dart/element/type.dart
+++ b/pkg/analyzer/lib/dart/element/type.dart
@@ -21,6 +21,7 @@
 /// the references to `String` and `int` are type arguments.
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
+import 'package:analyzer/dart/element/type_visitor.dart';
 import 'package:analyzer/src/dart/element/type.dart' show InterfaceTypeImpl;
 
 /// The type associated with elements in the element model.
@@ -122,6 +123,32 @@
   /// Return the nullability suffix of this type.
   NullabilitySuffix get nullabilitySuffix;
 
+  /// Use the given [visitor] to visit this type.
+  R accept<R>(TypeVisitor<R> visitor);
+
+  /// Use the given [visitor] to visit this type.
+  R acceptWithArgument<R, A>(
+    TypeVisitorWithArgument<R, A> visitor,
+    A argument,
+  );
+
+  /// Return the canonical interface that this type implements for [element],
+  /// or `null` if such an interface does not exist.
+  ///
+  /// 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>`.
+  ///
+  /// For a [TypeParameterType] with a bound (declared or promoted), returns
+  /// the interface implemented by the bound.
+  InterfaceType asInstanceOf(ClassElement element);
+
   /// Return the presentation of this type as it should appear when presented
   /// to users in contexts such as error messages.
   ///
@@ -257,6 +284,10 @@
   /// declared in this type.
   List<PropertyAccessorElement> get accessors;
 
+  /// Return all the super-interfaces implemented by this interface. This
+  /// includes superclasses, mixins, interfaces, and superclass constraints.
+  List<InterfaceType> get allSupertypes;
+
   /// Return a list containing all of the constructors declared in this type.
   List<ConstructorElement> get constructors;
 
diff --git a/pkg/analyzer/lib/dart/element/type_visitor.dart b/pkg/analyzer/lib/dart/element/type_visitor.dart
new file mode 100644
index 0000000..69ad90e
--- /dev/null
+++ b/pkg/analyzer/lib/dart/element/type_visitor.dart
@@ -0,0 +1,112 @@
+// 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/dart/element/type.dart';
+
+/// Interface for type visitors.
+///
+/// Clients may not extend, implement, or mix-in this class.
+abstract class TypeVisitor<R> {
+  const TypeVisitor();
+
+  R visitDynamicType(DynamicType type);
+
+  R visitFunctionType(FunctionType type);
+
+  R visitInterfaceType(InterfaceType type);
+
+  R visitNeverType(NeverType type);
+
+  R visitTypeParameterType(TypeParameterType type);
+
+  R visitVoidType(VoidType type);
+}
+
+/// Interface for type visitors that have one argument.
+///
+/// Clients may not extend, implement, or mix-in this class.
+abstract class TypeVisitorWithArgument<R, A> {
+  const TypeVisitorWithArgument();
+
+  R visitDynamicType(DynamicType type, A argument);
+
+  R visitFunctionType(FunctionType type, A argument);
+
+  R visitInterfaceType(InterfaceType type, A argument);
+
+  R visitNeverType(NeverType type, A argument);
+
+  R visitTypeParameterType(TypeParameterType type, A argument);
+
+  R visitVoidType(VoidType type, A argument);
+}
+
+/// Invokes [visitDartType] from any other `visitXyz` method.
+///
+/// Clients may extend this class.
+abstract class UnifyingTypeVisitor<R> implements TypeVisitor<R> {
+  const UnifyingTypeVisitor();
+
+  /// By default other `visitXyz` methods invoke this method.
+  R visitDartType(DartType type);
+
+  @override
+  R visitDynamicType(DynamicType type) => visitDartType(type);
+
+  @override
+  R visitFunctionType(FunctionType type) => visitDartType(type);
+
+  @override
+  R visitInterfaceType(InterfaceType type) => visitDartType(type);
+
+  @override
+  R visitNeverType(NeverType type) => visitDartType(type);
+
+  @override
+  R visitTypeParameterType(TypeParameterType type) => visitDartType(type);
+
+  @override
+  R visitVoidType(VoidType type) => visitDartType(type);
+}
+
+/// Invokes [visitDartType] from any other `visitXyz` method.
+///
+/// Clients may extend this class.
+abstract class UnifyingTypeVisitorWithArgument<R, A>
+    implements TypeVisitorWithArgument<R, A> {
+  const UnifyingTypeVisitorWithArgument();
+
+  /// By default other `visitXyz` methods invoke this method.
+  R visitDartType(DartType type, A argument);
+
+  @override
+  R visitDynamicType(DynamicType type, A argument) {
+    return visitDartType(type, argument);
+  }
+
+  @override
+  R visitFunctionType(FunctionType type, A argument) {
+    return visitDartType(type, argument);
+  }
+
+  @override
+  R visitInterfaceType(InterfaceType type, A argument) {
+    return visitDartType(type, argument);
+  }
+
+  @override
+  R visitNeverType(NeverType type, A argument) {
+    return visitDartType(type, argument);
+  }
+
+  @override
+  R visitTypeParameterType(TypeParameterType type, A argument) {
+    return visitDartType(type, argument);
+  }
+
+  @override
+  R visitVoidType(VoidType type, A argument) {
+    return visitDartType(type, argument);
+  }
+}
diff --git a/pkg/analyzer/lib/dart/element/visitor.dart b/pkg/analyzer/lib/dart/element/visitor.dart
index 3119637..70552ed 100644
--- a/pkg/analyzer/lib/dart/element/visitor.dart
+++ b/pkg/analyzer/lib/dart/element/visitor.dart
@@ -79,6 +79,9 @@
 ///
 /// Clients may extend this class.
 class GeneralizingElementVisitor<R> implements ElementVisitor<R> {
+  /// Initialize a newly created visitor.
+  const GeneralizingElementVisitor();
+
   @override
   R visitClassElement(ClassElement element) => visitElement(element);
 
@@ -191,6 +194,9 @@
 ///
 /// Clients may extend this class.
 class RecursiveElementVisitor<R> implements ElementVisitor<R> {
+  /// Initialize a newly created visitor.
+  const RecursiveElementVisitor();
+
   @override
   R visitClassElement(ClassElement element) {
     element.visitChildren(this);
@@ -325,6 +331,9 @@
 ///
 /// Clients may extend this class.
 class SimpleElementVisitor<R> implements ElementVisitor<R> {
+  /// Initialize a newly created visitor.
+  const SimpleElementVisitor();
+
   @override
   R visitClassElement(ClassElement element) => null;
 
@@ -398,6 +407,9 @@
 ///
 /// Clients may extend this class.
 class ThrowingElementVisitor<R> implements ElementVisitor<R> {
+  /// Initialize a newly created visitor.
+  const ThrowingElementVisitor();
+
   @override
   R visitClassElement(ClassElement element) => _throw(element);
 
diff --git a/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart b/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
index 30e01ff..6b85a28 100644
--- a/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
+++ b/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
@@ -22,6 +22,7 @@
 import 'package:analyzer/src/summary2/linked_element_factory.dart';
 import 'package:analyzer/src/summary2/reference.dart';
 import 'package:meta/meta.dart';
+import 'package:pub_semver/pub_semver.dart';
 import 'package:yaml/yaml.dart';
 
 /// Build summary for SDK at the given [sdkPath].
@@ -44,7 +45,11 @@
     var file = resourceProvider.getFile(embedderYamlPath);
     var content = file.readAsStringSync();
     var map = loadYaml(content) as YamlMap;
-    var embedderSdk = EmbedderSdk(resourceProvider, {file.parent: map});
+    var embedderSdk = EmbedderSdk(
+      resourceProvider,
+      {file.parent: map},
+      languageVersion: sdk.languageVersion,
+    );
     for (var library in embedderSdk.sdkLibraries) {
       var uriStr = library.shortName;
       if (sdk.libraryMap.getLibrary(uriStr) == null) {
@@ -60,6 +65,7 @@
   return _Builder(
     sdk.context,
     sdk.allowedExperimentsJson,
+    sdk.languageVersion,
     librarySources,
   ).build();
 }
@@ -73,11 +79,13 @@
   final List<LinkInputLibrary> inputLibraries = [];
 
   AllowedExperiments allowedExperiments;
+  Version languageVersion;
   final PackageBundleAssembler bundleAssembler = PackageBundleAssembler();
 
   _Builder(
     this.context,
     this.allowedExperimentsJson,
+    this.languageVersion,
     this.librarySources,
   ) {
     allowedExperiments = _parseAllowedExperiments(allowedExperimentsJson);
@@ -100,6 +108,10 @@
       bundle2: linkResult.bundle,
       sdk: PackageBundleSdkBuilder(
         allowedExperimentsJson: allowedExperimentsJson,
+        languageVersion: LinkedLanguageVersionBuilder(
+          major: languageVersion.major,
+          minor: languageVersion.minor,
+        ),
       ),
     ).toBuffer();
 
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index d675223..a0780e0 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -60,20 +60,25 @@
   AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES,
   AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITHOUT_VALUES,
   AnalysisOptionsWarningCode.UNSUPPORTED_VALUE,
-  CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-  CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-  CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
-  CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
+  CompileTimeErrorCode.ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER,
+  CompileTimeErrorCode.ABSTRACT_FIELD_INITIALIZER,
   CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
   CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD,
   CompileTimeErrorCode.AMBIGUOUS_EXPORT,
   CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS,
+  CompileTimeErrorCode.AMBIGUOUS_IMPORT,
   CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH,
   CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER,
   CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS,
-  // ignore: deprecated_member_use_from_same_package
-  CompileTimeErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS,
+  CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
   CompileTimeErrorCode.ASSERT_IN_REDIRECTING_CONSTRUCTOR,
+  CompileTimeErrorCode.ASSIGNMENT_TO_CONST,
+  CompileTimeErrorCode.ASSIGNMENT_TO_FINAL,
+  CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL,
+  CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_NO_SETTER,
+  CompileTimeErrorCode.ASSIGNMENT_TO_FUNCTION,
+  CompileTimeErrorCode.ASSIGNMENT_TO_METHOD,
+  CompileTimeErrorCode.ASSIGNMENT_TO_TYPE,
   CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT,
   CompileTimeErrorCode.AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER,
   CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT,
@@ -85,8 +90,11 @@
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME,
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME,
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME,
+  CompileTimeErrorCode.CASE_BLOCK_NOT_TERMINATED,
   CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
   CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE,
+  CompileTimeErrorCode.CAST_TO_NON_TYPE,
+  CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
   CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD,
   CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD,
   CompileTimeErrorCode.CONFLICTING_FIELD_AND_METHOD,
@@ -97,6 +105,8 @@
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_EXTENSION,
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS,
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION,
+  CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+  CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
@@ -112,6 +122,7 @@
   CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
   CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
   CompileTimeErrorCode.CONST_EVAL_TYPE_TYPE,
+  CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
   CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
   CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
   CompileTimeErrorCode
@@ -129,6 +140,7 @@
   CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR,
   CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
   CompileTimeErrorCode.CONTINUE_LABEL_ON_SWITCH,
+  CompileTimeErrorCode.COULD_NOT_INFER,
   CompileTimeErrorCode.DEFAULT_LIST_CONSTRUCTOR,
   CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
   CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR,
@@ -143,6 +155,9 @@
   CompileTimeErrorCode.ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING,
   CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET,
   CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP,
+  CompileTimeErrorCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
+  CompileTimeErrorCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS,
+  CompileTimeErrorCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
   CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY,
   CompileTimeErrorCode.EXPORT_LEGACY_SYMBOL,
   CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
@@ -160,15 +175,30 @@
   CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS,
   CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED,
   CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
+  CompileTimeErrorCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
   CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER,
   CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR,
+  CompileTimeErrorCode.FIELD_INITIALIZER_NOT_ASSIGNABLE,
   CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
   CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR,
+  CompileTimeErrorCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
+  CompileTimeErrorCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
   CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES,
+  CompileTimeErrorCode.FINAL_NOT_INITIALIZED,
+  CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
+  CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2,
+  CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS,
+  CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
+  CompileTimeErrorCode.FOR_IN_OF_INVALID_TYPE,
   CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE,
   CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND,
   CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT,
+  CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES,
+  CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES,
   CompileTimeErrorCode.IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY,
+  CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE,
+  CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE,
+  CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE,
   CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS,
   CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
   CompileTimeErrorCode.IMPLEMENTS_NON_CLASS,
@@ -180,18 +210,30 @@
   CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
   CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
   CompileTimeErrorCode.INCONSISTENT_INHERITANCE_GETTER_AND_METHOD,
+  CompileTimeErrorCode.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE,
   CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD,
   CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD,
   CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD,
   CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD,
+  CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
   CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY,
   CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC,
+  CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS,
   CompileTimeErrorCode.INSTANTIATE_ENUM,
   CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE,
   CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE,
   CompileTimeErrorCode.INVALID_ANNOTATION,
   CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.INVALID_ANNOTATION_GETTER,
+  CompileTimeErrorCode.INVALID_ASSIGNMENT,
+  CompileTimeErrorCode.INVALID_CAST_FUNCTION,
+  CompileTimeErrorCode.INVALID_CAST_FUNCTION_EXPR,
+  CompileTimeErrorCode.INVALID_CAST_LITERAL,
+  CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST,
+  CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP,
+  CompileTimeErrorCode.INVALID_CAST_LITERAL_SET,
+  CompileTimeErrorCode.INVALID_CAST_METHOD,
+  CompileTimeErrorCode.INVALID_CAST_NEW_EXPR,
   CompileTimeErrorCode.INVALID_CONSTANT,
   CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME,
   CompileTimeErrorCode.INVALID_EXTENSION_ARGUMENT_COUNT,
@@ -201,21 +243,24 @@
   CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
   CompileTimeErrorCode.INVALID_OVERRIDE,
   CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS,
+  CompileTimeErrorCode.INVALID_SUPER_INVOCATION,
   CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST,
   CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP,
   CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET,
   CompileTimeErrorCode.INVALID_URI,
   CompileTimeErrorCode.INVALID_USE_OF_COVARIANT,
-  // ignore: deprecated_member_use_from_same_package
-  CompileTimeErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION,
+  CompileTimeErrorCode.INVALID_USE_OF_NULL_VALUE,
   CompileTimeErrorCode.INVOCATION_OF_EXTENSION_WITHOUT_CALL,
+  CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION,
+  CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION,
   CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE,
   CompileTimeErrorCode.LABEL_UNDEFINED,
   CompileTimeErrorCode.LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR,
   CompileTimeErrorCode.LATE_FINAL_LOCAL_ALREADY_ASSIGNED,
+  CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
   CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP,
-  // ignore: deprecated_member_use_from_same_package
-  CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME,
+  CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+  CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
   CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL,
   CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL,
   CompileTimeErrorCode.MISSING_CONST_IN_SET_LITERAL,
@@ -239,12 +284,26 @@
   CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS,
   CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE,
   CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS,
+  CompileTimeErrorCode.MIXINS_SUPER_CLASS,
   CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS,
   CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS,
+  CompileTimeErrorCode.NEW_WITH_NON_TYPE,
+  CompileTimeErrorCode.NEW_WITH_UNDEFINED_CONSTRUCTOR,
+  CompileTimeErrorCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
   CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS,
   CompileTimeErrorCode.NO_COMBINED_SUPER_SIGNATURE,
   CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT,
   CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
+  CompileTimeErrorCode.NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS,
+  CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
+  CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
+  CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+  CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
+  CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
+  CompileTimeErrorCode.NON_BOOL_CONDITION,
+  CompileTimeErrorCode.NON_BOOL_EXPRESSION,
+  CompileTimeErrorCode.NON_BOOL_NEGATION_EXPRESSION,
+  CompileTimeErrorCode.NON_BOOL_OPERAND,
   CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT,
   CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR,
   CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION,
@@ -259,17 +318,20 @@
   CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
   CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT,
-  // ignore: deprecated_member_use_from_same_package
-  CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
   CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
+  CompileTimeErrorCode.NON_GENERATIVE_IMPLICIT_CONSTRUCTOR,
   CompileTimeErrorCode.NON_SYNC_FACTORY,
+  CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT,
+  CompileTimeErrorCode.NON_TYPE_IN_CATCH_CLAUSE,
+  CompileTimeErrorCode.NON_VOID_RETURN_FOR_OPERATOR,
+  CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER,
+  CompileTimeErrorCode.NOT_A_TYPE,
   CompileTimeErrorCode.NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE,
   CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS,
-  // ignore: deprecated_member_use_from_same_package
-  CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS,
   CompileTimeErrorCode.NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD,
   CompileTimeErrorCode.NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR,
   CompileTimeErrorCode.NOT_INITIALIZED_NON_NULLABLE_VARIABLE,
+  CompileTimeErrorCode.NOT_INSTANTIATED_BOUND,
   CompileTimeErrorCode.NOT_ITERABLE_SPREAD,
   CompileTimeErrorCode.NOT_MAP_SPREAD,
   CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD,
@@ -280,12 +342,15 @@
   CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS,
   CompileTimeErrorCode.ON_REPEATED,
   CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR,
+  CompileTimeErrorCode.PART_OF_DIFFERENT_LIBRARY,
   CompileTimeErrorCode.PART_OF_NON_PART,
   CompileTimeErrorCode.PART_OF_UNNAMED_LIBRARY,
   CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER,
   CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
+  CompileTimeErrorCode.PREFIX_SHADOWED_BY_LOCAL_DECLARATION,
   CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION,
   CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER,
+  CompileTimeErrorCode.PRIVATE_SETTER,
   CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
   CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
   CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -297,6 +362,8 @@
   CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR,
   CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR,
   CompileTimeErrorCode.REDIRECT_TO_ABSTRACT_CLASS_CONSTRUCTOR,
+  CompileTimeErrorCode.REDIRECT_TO_INVALID_FUNCTION_TYPE,
+  CompileTimeErrorCode.REDIRECT_TO_INVALID_RETURN_TYPE,
   CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR,
   CompileTimeErrorCode.REDIRECT_TO_NON_CLASS,
   CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR,
@@ -304,40 +371,74 @@
   CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH,
   CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR,
   CompileTimeErrorCode.RETURN_IN_GENERATOR,
+  CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE,
+  CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR,
+  CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION,
+  CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD,
+  CompileTimeErrorCode.RETURN_WITHOUT_VALUE,
   CompileTimeErrorCode.SET_ELEMENT_FROM_DEFERRED_LIBRARY,
+  CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
   CompileTimeErrorCode.SHARED_DEFERRED_PREFIX,
   CompileTimeErrorCode.SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY,
+  CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
   CompileTimeErrorCode.SUPER_IN_EXTENSION,
   CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT,
   CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR,
   CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT,
   CompileTimeErrorCode.SWITCH_CASE_COMPLETES_NORMALLY,
+  CompileTimeErrorCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE,
   CompileTimeErrorCode.THROW_OF_INVALID_TYPE,
+  CompileTimeErrorCode.TOP_LEVEL_CYCLE,
   CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
+  CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS,
   CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
-  // ignore: deprecated_member_use_from_same_package
-  CompileTimeErrorCode.TYPE_PARAMETER_ON_CONSTRUCTOR,
+  CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC,
+  CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND,
+  CompileTimeErrorCode.TYPE_TEST_WITH_NON_TYPE,
+  CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME,
+  CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE,
   CompileTimeErrorCode.UNDEFINED_ANNOTATION,
   CompileTimeErrorCode.UNDEFINED_CLASS,
+  CompileTimeErrorCode.UNDEFINED_CLASS_BOOLEAN,
   CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER,
   CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT,
+  CompileTimeErrorCode.UNDEFINED_ENUM_CONSTANT,
   CompileTimeErrorCode.UNDEFINED_EXTENSION_GETTER,
   CompileTimeErrorCode.UNDEFINED_EXTENSION_METHOD,
   CompileTimeErrorCode.UNDEFINED_EXTENSION_OPERATOR,
   CompileTimeErrorCode.UNDEFINED_EXTENSION_SETTER,
+  CompileTimeErrorCode.UNDEFINED_FUNCTION,
+  CompileTimeErrorCode.UNDEFINED_GETTER,
+  CompileTimeErrorCode.UNDEFINED_IDENTIFIER,
+  CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT,
+  CompileTimeErrorCode.UNDEFINED_METHOD,
   CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER,
+  CompileTimeErrorCode.UNDEFINED_OPERATOR,
+  CompileTimeErrorCode.UNDEFINED_PREFIXED_NAME,
+  CompileTimeErrorCode.UNDEFINED_SETTER,
+  CompileTimeErrorCode.UNDEFINED_SUPER_GETTER,
+  CompileTimeErrorCode.UNDEFINED_SUPER_METHOD,
+  CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR,
+  CompileTimeErrorCode.UNDEFINED_SUPER_SETTER,
+  CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
   CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_STATIC_MEMBER_OF_EXTENDED_TYPE,
   CompileTimeErrorCode.URI_DOES_NOT_EXIST,
   CompileTimeErrorCode.URI_HAS_NOT_BEEN_GENERATED,
   CompileTimeErrorCode.URI_WITH_INTERPOLATION,
+  CompileTimeErrorCode.USE_OF_VOID_RESULT,
+  CompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
   CompileTimeErrorCode.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE,
   CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR,
   CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS,
   CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
+  CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
+  CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
+  CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
   CompileTimeErrorCode.WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE,
   CompileTimeErrorCode.WRONG_TYPE_PARAMETER_VARIANCE_POSITION,
   CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR,
   CompileTimeErrorCode.YIELD_IN_NON_GENERATOR,
+  CompileTimeErrorCode.YIELD_OF_INVALID_TYPE,
   FfiCode.ANNOTATION_ON_POINTER_FIELD,
   FfiCode.EXTRA_ANNOTATION_ON_STRUCT_FIELD,
   FfiCode.FIELD_IN_STRUCT_WITH_INITIALIZER,
@@ -402,8 +503,6 @@
   HintCode.INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER,
   HintCode.INVALID_REQUIRED_NAMED_PARAM,
   HintCode.INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM,
-  // ignore: deprecated_member_use_from_same_package
-  HintCode.INVALID_REQUIRED_PARAM,
   HintCode.INVALID_REQUIRED_POSITIONAL_PARAM,
   HintCode.INVALID_SEALED_ANNOTATION,
   HintCode.INVALID_USE_OF_PROTECTED_MEMBER,
@@ -460,6 +559,7 @@
   HintCode.UNUSED_CATCH_CLAUSE,
   HintCode.UNUSED_CATCH_STACK,
   HintCode.UNUSED_ELEMENT,
+  HintCode.UNUSED_ELEMENT_PARAMETER,
   HintCode.UNUSED_FIELD,
   HintCode.UNUSED_IMPORT,
   HintCode.UNUSED_LABEL,
@@ -688,133 +788,13 @@
   ScannerErrorCode.UNSUPPORTED_OPERATOR,
   ScannerErrorCode.UNTERMINATED_MULTI_LINE_COMMENT,
   ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
-  StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
-  StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS,
-  StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
-  StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
-  StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE,
-  StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE,
-  StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
-  StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE,
-  StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
-  StaticTypeWarningCode.INVALID_ASSIGNMENT,
-  StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
-  StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION,
-  StaticTypeWarningCode.NON_BOOL_CONDITION,
-  StaticTypeWarningCode.NON_BOOL_EXPRESSION,
-  StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION,
-  StaticTypeWarningCode.NON_BOOL_OPERAND,
-  StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT,
-  // ignore: deprecated_member_use_from_same_package
-  StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
-  StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE,
-  StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR,
-  StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION,
-  StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_METHOD,
-  StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND,
-  StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT,
-  StaticTypeWarningCode.UNDEFINED_FUNCTION,
-  StaticTypeWarningCode.UNDEFINED_GETTER,
-  StaticTypeWarningCode.UNDEFINED_METHOD,
-  StaticTypeWarningCode.UNDEFINED_OPERATOR,
-  StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME,
-  StaticTypeWarningCode.UNDEFINED_SETTER,
-  StaticTypeWarningCode.UNDEFINED_SUPER_GETTER,
-  StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
-  StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
-  StaticTypeWarningCode.UNDEFINED_SUPER_SETTER,
-  StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
-  StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
-  StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-  StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
-  StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
-  StaticWarningCode.AMBIGUOUS_IMPORT,
-  StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
-  StaticWarningCode.ASSIGNMENT_TO_CONST,
-  StaticWarningCode.ASSIGNMENT_TO_FINAL,
-  StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL,
-  StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER,
-  StaticWarningCode.ASSIGNMENT_TO_FUNCTION,
-  StaticWarningCode.ASSIGNMENT_TO_METHOD,
-  StaticWarningCode.ASSIGNMENT_TO_TYPE,
-  StaticWarningCode.CASE_BLOCK_NOT_TERMINATED,
-  StaticWarningCode.CAST_TO_NON_TYPE,
-  StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.CONST_WITH_ABSTRACT_CLASS,
   StaticWarningCode.DEAD_NULL_AWARE_EXPRESSION,
-  StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED,
-  StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
-  StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE,
-  StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
-  StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
-  StaticWarningCode.FINAL_NOT_INITIALIZED,
-  StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
-  StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2,
-  StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS,
-  StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES,
-  StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES,
-  StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.IMPORT_OF_NON_LIBRARY,
-  StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS,
   StaticWarningCode.INVALID_NULL_AWARE_OPERATOR,
+  StaticWarningCode.INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT,
   StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED,
   StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL,
-  StaticWarningCode.INVALID_USE_OF_NULL_VALUE,
-  StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
-  StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
-  StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
   StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.MIXED_RETURN_TYPES,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.NEW_WITH_ABSTRACT_CLASS,
-  StaticWarningCode.NEW_WITH_NON_TYPE,
-  StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR,
-  StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
-  StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
-  StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
-  StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-  StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
-  StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
-  StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE,
-  StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR,
-  StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
-  StaticWarningCode.NOT_A_TYPE,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS,
-  StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
-  StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE,
-  StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.REDIRECT_TO_NON_CLASS,
-  StaticWarningCode.RETURN_WITHOUT_VALUE,
-  StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
-  StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
-  StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE,
-  StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS,
-  StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC,
-  StaticWarningCode.TYPE_TEST_WITH_NON_TYPE,
-  StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME,
-  StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.UNDEFINED_CLASS,
-  StaticWarningCode.UNDEFINED_CLASS_BOOLEAN,
-  StaticWarningCode.UNDEFINED_IDENTIFIER,
-  StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT,
-  // ignore: deprecated_member_use_from_same_package
-  StaticWarningCode.UNDEFINED_NAMED_PARAMETER,
   StaticWarningCode.UNNECESSARY_NON_NULL_ASSERTION,
-  StaticWarningCode.USE_OF_VOID_RESULT,
-  StrongModeCode.COULD_NOT_INFER,
-  StrongModeCode.DYNAMIC_INVOKE,
   StrongModeCode.IMPLICIT_DYNAMIC_FIELD,
   StrongModeCode.IMPLICIT_DYNAMIC_FUNCTION,
   StrongModeCode.IMPLICIT_DYNAMIC_INVOKE,
@@ -825,18 +805,6 @@
   StrongModeCode.IMPLICIT_DYNAMIC_RETURN,
   StrongModeCode.IMPLICIT_DYNAMIC_TYPE,
   StrongModeCode.IMPLICIT_DYNAMIC_VARIABLE,
-  StrongModeCode.INVALID_CAST_FUNCTION,
-  StrongModeCode.INVALID_CAST_FUNCTION_EXPR,
-  StrongModeCode.INVALID_CAST_LITERAL,
-  StrongModeCode.INVALID_CAST_LITERAL_LIST,
-  StrongModeCode.INVALID_CAST_LITERAL_MAP,
-  StrongModeCode.INVALID_CAST_LITERAL_SET,
-  StrongModeCode.INVALID_CAST_METHOD,
-  StrongModeCode.INVALID_CAST_NEW_EXPR,
-  StrongModeCode.INVALID_PARAMETER_DECLARATION,
-  StrongModeCode.INVALID_SUPER_INVOCATION,
-  StrongModeCode.NOT_INSTANTIATED_BOUND,
-  StrongModeCode.TOP_LEVEL_CYCLE,
   StrongModeCode.TOP_LEVEL_FUNCTION_LITERAL_BLOCK,
   StrongModeCode.TOP_LEVEL_IDENTIFIER_NO_TYPE,
   StrongModeCode.TOP_LEVEL_INSTANCE_GETTER,
@@ -918,7 +886,7 @@
     String message = formatList(errorCode.message, arguments);
     String correctionTemplate = errorCode.correction;
     if (correctionTemplate != null) {
-      this._correction = formatList(correctionTemplate, arguments);
+      _correction = formatList(correctionTemplate, arguments);
     }
     _problemMessage = DiagnosticMessageImpl(
         filePath: source?.fullName,
diff --git a/pkg/analyzer/lib/error/listener.dart b/pkg/analyzer/lib/error/listener.dart
index e95548f..ffb3b98 100644
--- a/pkg/analyzer/lib/error/listener.dart
+++ b/pkg/analyzer/lib/error/listener.dart
@@ -67,7 +67,7 @@
     } else if (_defaultSource == null) {
       throw ArgumentError("A default source must be provided");
     }
-    this._source = _defaultSource;
+    _source = _defaultSource;
   }
 
   Source get source => _source;
@@ -76,7 +76,7 @@
   /// 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;
+    _source = source ?? _defaultSource;
   }
 
   /// Report the given [error].
diff --git a/pkg/analyzer/lib/exception/exception.dart b/pkg/analyzer/lib/exception/exception.dart
index 6a2bd6c..c666fbae 100644
--- a/pkg/analyzer/lib/exception/exception.dart
+++ b/pkg/analyzer/lib/exception/exception.dart
@@ -41,13 +41,14 @@
 
   /// Initialize a newly created caught exception to have the given [exception]
   /// and [stackTrace].
-  CaughtException(exception, stackTrace)
+  CaughtException(Object exception, StackTrace stackTrace)
       : this.withMessage(null, exception, stackTrace);
 
   /// 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;
+  CaughtException.withMessage(
+      this.message, this.exception, StackTrace stackTrace)
+      : stackTrace = stackTrace ?? StackTrace.current;
 
   /// Recursively unwrap this [CaughtException] if it itself contains a
   /// [CaughtException].
@@ -98,7 +99,7 @@
 /// This is still considered an exceptional situation and will be sent to crash
 /// reporting.
 class SilentException extends CaughtException {
-  SilentException(String message, exception, stackTrace)
+  SilentException(String message, Object exception, StackTrace stackTrace)
       : super.withMessage(message, exception, stackTrace);
 
   /// Create a [SilentException] to wrap a [CaughtException], adding a
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index 1781738..9baa63a 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -28,12 +28,12 @@
 
   MemoryResourceProvider(
       {pathos.Context context, @deprecated bool isWindows = false})
-      : _pathContext = (context ??= pathos.style == pathos.Style.windows
+      : _pathContext = context ??= pathos.style == pathos.Style.windows
             // On Windows, ensure that the current drive matches
             // the drive inserted by MemoryResourceProvider.convertPath
             // so that packages are mapped to the correct drive
             ? pathos.Context(current: 'C:\\')
-            : pathos.context);
+            : pathos.context;
 
   @override
   pathos.Context get pathContext => _pathContext;
@@ -584,11 +584,11 @@
   String get shortName => _provider.pathContext.basename(path);
 
   @override
-  bool operator ==(other) {
+  bool operator ==(Object other) {
     if (runtimeType != other.runtimeType) {
       return false;
     }
-    return path == other.path;
+    return path == (other as _MemoryResource).path;
   }
 
   @override
diff --git a/pkg/analyzer/lib/file_system/overlay_file_system.dart b/pkg/analyzer/lib/file_system/overlay_file_system.dart
index 601b913..2b12574 100644
--- a/pkg/analyzer/lib/file_system/overlay_file_system.dart
+++ b/pkg/analyzer/lib/file_system/overlay_file_system.dart
@@ -369,11 +369,11 @@
   String get shortName => _resource.shortName;
 
   @override
-  bool operator ==(other) {
+  bool operator ==(Object other) {
     if (runtimeType != other.runtimeType) {
       return false;
     }
-    return path == other.path;
+    return path == (other as _OverlayResource).path;
   }
 
   @override
diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
index bd914e2..2e5f628 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -241,7 +241,7 @@
 
   @override
   Stream<WatchEvent> get changes =>
-      DirectoryWatcher(_entry.path).events.handleError((error) {},
+      DirectoryWatcher(_entry.path).events.handleError((Object error) {},
           test: (error) =>
               error is io.FileSystemException &&
               // Don't suppress "Directory watcher closed," so the outer
@@ -378,11 +378,11 @@
   String get shortName => pathContext.basename(path);
 
   @override
-  bool operator ==(other) {
+  bool operator ==(Object other) {
     if (runtimeType != other.runtimeType) {
       return false;
     }
-    return path == other.path;
+    return path == (other as _PhysicalResource).path;
   }
 
   @override
diff --git a/pkg/analyzer/lib/instrumentation/multicast_service.dart b/pkg/analyzer/lib/instrumentation/multicast_service.dart
index d0e288d..995dbfe 100644
--- a/pkg/analyzer/lib/instrumentation/multicast_service.dart
+++ b/pkg/analyzer/lib/instrumentation/multicast_service.dart
@@ -17,7 +17,7 @@
   }
 
   @override
-  void logException(exception,
+  void logException(Object exception,
       [StackTrace stackTrace,
       List<InstrumentationServiceAttachment> attachments]) {
     _services
@@ -49,7 +49,8 @@
   }
 
   @override
-  void logPluginException(PluginData plugin, exception, StackTrace stackTrace) {
+  void logPluginException(
+      PluginData plugin, Object exception, StackTrace stackTrace) {
     _services
         .forEach((s) => s.logPluginException(plugin, exception, stackTrace));
   }
diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart
index f55cc5d..f2cb675 100644
--- a/pkg/analyzer/lib/source/embedder.dart
+++ b/pkg/analyzer/lib/source/embedder.dart
@@ -18,6 +18,7 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart' show FileBasedSource;
 import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
+import 'package:pub_semver/src/version.dart';
 import 'package:yaml/yaml.dart';
 
 export 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
@@ -38,13 +39,15 @@
     embedderYamls?.forEach(_processEmbedderYaml);
   }
 
-  // TODO(danrubel) Determine SDK version
   @override
   String get allowedExperimentsJson {
     return null;
   }
 
   @override
+  Version get languageVersion => throw UnimplementedError();
+
+  @override
   String get sdkVersion => '0';
 
   /// The url mappings for this SDK.
diff --git a/pkg/analyzer/lib/source/line_info.dart b/pkg/analyzer/lib/source/line_info.dart
index dbd0e2f..96c9149 100644
--- a/pkg/analyzer/lib/source/line_info.dart
+++ b/pkg/analyzer/lib/source/line_info.dart
@@ -47,7 +47,8 @@
   /// 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
+  /// a [LineInfo_Location].
   // ignore: deprecated_member_use_from_same_package
   LineInfo_Location getLocation(int offset) {
     var min = 0;
diff --git a/pkg/analyzer/lib/src/clients/angular_analyzer_plugin/angular_analyzer_plugin.dart b/pkg/analyzer/lib/src/clients/angular_analyzer_plugin/angular_analyzer_plugin.dart
new file mode 100644
index 0000000..abedb68
--- /dev/null
+++ b/pkg/analyzer/lib/src/clients/angular_analyzer_plugin/angular_analyzer_plugin.dart
@@ -0,0 +1,106 @@
+// 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 library provides additional APIs for the corresponding client.
+///
+/// By providing such higher level APIs we simplify the clients, and reduce
+/// dependencies on analyzer internal, so can make otherwise breaking
+/// changes easily.
+library angular_analyzer_plugin;
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type_provider.dart';
+import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
+import 'package:analyzer/src/dart/element/scope.dart';
+import 'package:analyzer/src/dart/resolver/resolution_visitor.dart';
+import 'package:analyzer/src/generated/error_verifier.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:meta/meta.dart';
+
+/// Resolve the given [node] in the specified context.
+///
+/// The [componentClass] is the component class.
+///
+/// The [templateSource] is the file with the template.
+///
+/// The template might declare [localVariables], which might be referenced
+/// in the node being resolved.
+///
+/// The [overrideAsExpression] is invoked during [AsExpression] to support
+/// custom resolution behavior.
+void resolveTemplateNode({
+  @required ClassElement componentClass,
+  @required Source templateSource,
+  @required Iterable<LocalVariableElement> localVariables,
+  @required AstNode node,
+  @required AnalysisErrorListener errorListener,
+  @required ErrorReporter errorReporter,
+  OverrideAsExpression overrideAsExpression,
+}) {
+  final unitElement = componentClass.enclosingElement;
+  final library = componentClass.library;
+
+  node.accept(
+    ResolutionVisitor(
+      unitElement: unitElement,
+      errorListener: errorListener,
+      featureSet: library.context.analysisOptions.contextFeatures,
+      nameScope: library.scope,
+    ),
+  );
+
+  final inheritanceManager = InheritanceManager3();
+  final resolver = _AngularTemplateResolver(inheritanceManager, library,
+      templateSource, library.typeProvider, errorListener,
+      overrideAsExpression: overrideAsExpression);
+  // fill the name scope
+  final classScope = ClassScope(resolver.nameScope, componentClass);
+  final localScope = LocalScope(classScope);
+  resolver
+    ..nameScope = localScope
+    ..enclosingClass = componentClass;
+  localVariables.forEach(localScope.add);
+  // do resolve
+  node.accept(resolver);
+  // verify
+  final verifier = ErrorVerifier(
+      errorReporter, library, library.typeProvider, inheritanceManager)
+    ..enclosingClass = componentClass;
+  node.accept(verifier);
+}
+
+typedef OverrideAsExpression = void Function({
+  @required AsExpression node,
+  @required void Function(AsExpression) invokeSuper,
+});
+
+class _AngularTemplateResolver extends ResolverVisitor {
+  final OverrideAsExpression overrideAsExpression;
+
+  _AngularTemplateResolver(
+    InheritanceManager3 inheritanceManager,
+    LibraryElement library,
+    Source source,
+    TypeProvider typeProvider,
+    AnalysisErrorListener errorListener, {
+    @required this.overrideAsExpression,
+  }) : super(inheritanceManager, library, source, typeProvider, errorListener);
+
+  @override
+  void visitAsExpression(AsExpression node) {
+    if (overrideAsExpression != null) {
+      overrideAsExpression(
+        node: node,
+        invokeSuper: (node) {
+          super.visitAsExpression(node);
+        },
+      );
+    } else {
+      super.visitAsExpression(node);
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/command_line/arguments.dart b/pkg/analyzer/lib/src/command_line/arguments.dart
index f3b2c37..6b0199c 100644
--- a/pkg/analyzer/lib/src/command_line/arguments.dart
+++ b/pkg/analyzer/lib/src/command_line/arguments.dart
@@ -6,10 +6,10 @@
 
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/context/builder.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:args/args.dart';
+import 'package:cli_util/cli_util.dart';
 
 const String analysisOptionsFileOption = 'options';
 const String defineVariableOption = 'D';
@@ -55,16 +55,34 @@
 }
 
 /// Use the command-line [args] to create a context builder.
-ContextBuilderOptions createContextBuilderOptions(ArgResults args) {
+ContextBuilderOptions createContextBuilderOptions(
+  ResourceProvider resourceProvider,
+  ArgResults args,
+) {
+  String absoluteNormalizedPath(String path) {
+    if (path == null) {
+      return null;
+    }
+    var pathContext = resourceProvider.pathContext;
+    return pathContext.normalize(
+      pathContext.absolute(path),
+    );
+  }
+
   ContextBuilderOptions builderOptions = ContextBuilderOptions();
   builderOptions.argResults = args;
   //
   // File locations.
   //
-  builderOptions.dartSdkSummaryPath = args[sdkSummaryPathOption];
-  builderOptions.defaultAnalysisOptionsFilePath =
-      args[analysisOptionsFileOption];
-  builderOptions.defaultPackageFilePath = args[packagesOption];
+  builderOptions.dartSdkSummaryPath = absoluteNormalizedPath(
+    args[sdkSummaryPathOption],
+  );
+  builderOptions.defaultAnalysisOptionsFilePath = absoluteNormalizedPath(
+    args[analysisOptionsFileOption],
+  );
+  builderOptions.defaultPackageFilePath = absoluteNormalizedPath(
+    args[packagesOption],
+  );
   //
   // Analysis options.
   //
@@ -103,11 +121,9 @@
 /// `true` and if the summary information exists.
 DartSdkManager createDartSdkManager(
     ResourceProvider resourceProvider, ArgResults args) {
-  String sdkPath = args[sdkPathOption];
+  String sdkPath = args[sdkPathOption] ?? getSdkPath();
 
-  return DartSdkManager(
-    sdkPath ?? FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path,
-  );
+  return DartSdkManager(sdkPath);
 }
 
 /// Add the standard flags and options to the given [parser]. The standard flags
@@ -117,7 +133,7 @@
 /// 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}) {
+    {bool hide = true, bool ddc = false}) {
   parser.addOption(sdkPathOption,
       help: 'The path to the Dart SDK.', hide: ddc && hide);
   parser.addOption(analysisOptionsFileOption,
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index 3bcc89f..de3f46f 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -133,10 +133,12 @@
       includedPaths: [contextRoot.root],
       excludedPaths: contextRoot.exclude,
     );
-    driver.analysisContext = api.DriverBasedAnalysisContext(
-      resourceProvider,
-      apiContextRoots.first,
-      driver,
+    driver.configure(
+      analysisContext: api.DriverBasedAnalysisContext(
+        resourceProvider,
+        apiContextRoots.first,
+        driver,
+      ),
     );
 
     // temporary plugin support:
@@ -223,6 +225,20 @@
           resourceProvider: resourceProvider);
     }
 
+    DartSdk folderSdk;
+    {
+      String sdkPath = sdkManager.defaultSdkDirectory;
+      SdkDescription description = SdkDescription(sdkPath);
+      folderSdk = sdkManager.getSdk(description, () {
+        var sdk = FolderBasedDartSdk(
+          resourceProvider,
+          resourceProvider.getFolder(sdkPath),
+        );
+        sdk.analysisOptions = analysisOptions;
+        return sdk;
+      });
+    }
+
     if (workspace != null) {
       var partialSourceFactory = workspace.createSourceFactory(null, null);
       var embedderYamlSource = partialSourceFactory.forUri(
@@ -235,22 +251,17 @@
             EmbedderYamlLocator.forLibFolder(libFolder);
         Map<Folder, YamlMap> embedderMap = locator.embedderYamls;
         if (embedderMap.isNotEmpty) {
-          EmbedderSdk embedderSdk = EmbedderSdk(resourceProvider, embedderMap);
+          EmbedderSdk embedderSdk = EmbedderSdk(
+            resourceProvider,
+            embedderMap,
+            languageVersion: folderSdk.languageVersion,
+          );
           return embedderSdk;
         }
       }
     }
 
-    String sdkPath = sdkManager.defaultSdkDirectory;
-    SdkDescription description = SdkDescription(sdkPath);
-    return sdkManager.getSdk(description, () {
-      var sdk = FolderBasedDartSdk(
-        resourceProvider,
-        resourceProvider.getFolder(sdkPath),
-      );
-      sdk.analysisOptions = analysisOptions;
-      return sdk;
-    });
+    return folderSdk;
   }
 
   /// Return the analysis options that should be used to analyze code in the
diff --git a/pkg/analyzer/lib/src/context/context_root.dart b/pkg/analyzer/lib/src/context/context_root.dart
index 2b058e5..393c3d5 100644
--- a/pkg/analyzer/lib/src/context/context_root.dart
+++ b/pkg/analyzer/lib/src/context/context_root.dart
@@ -39,7 +39,7 @@
   }
 
   @override
-  bool operator ==(other) {
+  bool operator ==(Object other) {
     if (other is ContextRoot) {
       return root == other.root &&
           _listEqual(exclude, other.exclude, (String a, String b) => a == b);
diff --git a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
index 8d0ba8e..6fea185 100644
--- a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
@@ -5,9 +5,11 @@
 import 'package:analyzer/dart/analysis/analysis_context.dart';
 import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
 import 'package:analyzer/dart/analysis/context_locator.dart';
+import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/src/dart/analysis/context_builder.dart';
+import 'package:cli_util/cli_util.dart';
 import 'package:meta/meta.dart';
 
 /// An implementation of [AnalysisContextCollection].
@@ -20,14 +22,17 @@
   final List<AnalysisContext> contexts = [];
 
   /// Initialize a newly created analysis context manager.
-  AnalysisContextCollectionImpl(
-      {bool enableIndex = false,
-      @required List<String> includedPaths,
-      List<String> excludedPaths,
-      ResourceProvider resourceProvider,
-      String sdkPath})
-      : resourceProvider =
+  AnalysisContextCollectionImpl({
+    Map<String, String> declaredVariables,
+    bool enableIndex = false,
+    @required List<String> includedPaths,
+    List<String> excludedPaths,
+    ResourceProvider resourceProvider,
+    String sdkPath,
+  }) : resourceProvider =
             resourceProvider ?? PhysicalResourceProvider.INSTANCE {
+    sdkPath ??= getSdkPath();
+
     _throwIfAnyNotAbsoluteNormalizedPath(includedPaths);
     if (sdkPath != null) {
       _throwIfNotAbsoluteNormalizedPath(sdkPath);
@@ -46,6 +51,7 @@
       );
       var context = contextBuilder.createContext(
         contextRoot: root,
+        declaredVariables: DeclaredVariables.fromMap(declaredVariables ?? {}),
         enableIndex: enableIndex,
         sdkPath: sdkPath,
       );
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
index fde460e..beba8d7 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
@@ -20,9 +20,9 @@
     show FileContentOverlay;
 import 'package:analyzer/src/dart/analysis/performance_logger.dart'
     show PerformanceLog;
-import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/sdk.dart' show DartSdkManager;
 import 'package:analyzer/src/generated/source.dart' show ContentCache;
+import 'package:cli_util/cli_util.dart';
 import 'package:meta/meta.dart';
 
 /// An implementation of a context builder.
@@ -37,11 +37,6 @@
       : resourceProvider =
             resourceProvider ?? PhysicalResourceProvider.INSTANCE;
 
-  /// 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;
-
   @override
   AnalysisContext createContext(
       {@required ContextRoot contextRoot,
@@ -52,14 +47,14 @@
       @deprecated AnalysisDriverScheduler scheduler,
       String sdkPath,
       String sdkSummaryPath}) {
+    // TODO(scheglov) Remove this, and make `sdkPath` required.
+    sdkPath ??= getSdkPath();
+    ArgumentError.checkNotNull(sdkPath, 'sdkPath');
+
     var byteStore = MemoryByteStore();
     var fileContentOverlay = FileContentOverlay();
     performanceLog ??= PerformanceLog(StringBuffer());
 
-    sdkPath ??= _defaultSdkPath;
-    if (sdkPath == null) {
-      throw ArgumentError('Cannot find path to the SDK');
-    }
     DartSdkManager sdkManager = DartSdkManager(sdkPath);
 
     if (scheduler == null) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_locator.dart b/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
index 807470c..d536249 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
@@ -23,10 +23,10 @@
     show FileContentOverlay;
 import 'package:analyzer/src/dart/analysis/performance_logger.dart'
     show PerformanceLog;
-import 'package:analyzer/src/dart/sdk/sdk.dart' show FolderBasedDartSdk;
 import 'package:analyzer/src/generated/sdk.dart' show DartSdkManager;
 import 'package:analyzer/src/task/options.dart';
 import 'package:analyzer/src/util/yaml.dart';
+import 'package:cli_util/cli_util.dart';
 import 'package:glob/glob.dart';
 import 'package:meta/meta.dart';
 import 'package:path/path.dart';
@@ -47,13 +47,9 @@
   /// supplied, it will be used to access the file system. Otherwise the default
   /// resource provider will be used.
   ContextLocatorImpl({ResourceProvider resourceProvider})
-      : this.resourceProvider =
+      : resourceProvider =
             resourceProvider ?? PhysicalResourceProvider.INSTANCE;
 
-  /// Return the path to the default location of the SDK.
-  String get _defaultSdkPath =>
-      FolderBasedDartSdk.defaultSdkDirectory(resourceProvider).path;
-
   @deprecated
   @override
   List<AnalysisContext> locateContexts(
@@ -62,6 +58,10 @@
       String optionsFile,
       String packagesFile,
       String sdkPath}) {
+    // TODO(scheglov) Remove this, and make `sdkPath` required.
+    sdkPath ??= getSdkPath();
+    ArgumentError.checkNotNull(sdkPath, 'sdkPath');
+
     List<ContextRoot> roots = locateRoots(
         includedPaths: includedPaths,
         excludedPaths: excludedPaths,
@@ -72,7 +72,7 @@
     }
     PerformanceLog performanceLog = PerformanceLog(StringBuffer());
     AnalysisDriverScheduler scheduler = AnalysisDriverScheduler(performanceLog);
-    DartSdkManager sdkManager = DartSdkManager(sdkPath ?? _defaultSdkPath);
+    DartSdkManager sdkManager = DartSdkManager(sdkPath);
     scheduler.start();
     ContextBuilderOptions options = ContextBuilderOptions();
     ContextBuilder builder =
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
index 10baa3c..c7713fb 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
@@ -26,7 +26,7 @@
       : hashCode = JenkinsSmiHash.hash2(target.hashCode, name.hashCode);
 
   @override
-  bool operator ==(other) {
+  bool operator ==(Object other) {
     return other is ClassMemberReference &&
         other.target == target &&
         other.name == name;
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index f711628..81e5485 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 = 104;
+  static const int DATA_VERSION = 108;
 
   /// The length of the list returned by [_computeDeclaredVariablesSignature].
   static const int _declaredVariablesSignatureLength = 4;
@@ -488,10 +488,14 @@
   /// At least one of the optional parameters should be provided, but only those
   /// that represent state that has actually changed need be provided.
   void configure({
+    api.AnalysisContext analysisContext,
     AnalysisOptions analysisOptions,
     Packages packages,
     SourceFactory sourceFactory,
   }) {
+    if (analysisContext != null) {
+      this.analysisContext = analysisContext;
+    }
     if (analysisOptions != null) {
       _analysisOptions = analysisOptions;
     }
@@ -1286,7 +1290,6 @@
             libraryContext.elementFactory,
             libraryContext.analysisSession.inheritanceManager,
             library,
-            _resourceProvider,
             testingData: testingData);
         Map<FileState, UnitAnalysisResult> results = analyzer.analyze();
 
@@ -1363,7 +1366,6 @@
           libraryContext.elementFactory,
           libraryContext.analysisSession.inheritanceManager,
           library,
-          _resourceProvider,
           testingData: testingData);
       Map<FileState, UnitAnalysisResult> unitResults = analyzer.analyze();
       var resolvedUnits = <ResolvedUnitResult>[];
@@ -1453,6 +1455,7 @@
 
     featureSetProvider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
+      resourceProvider: _resourceProvider,
       packages: _packages,
       packageDefaultFeatureSet: _analysisOptions.contextFeatures,
       nonPackageDefaultFeatureSet: _analysisOptions.nonPackageFeatureSet,
@@ -1465,6 +1468,7 @@
       _resourceProvider,
       name,
       sourceFactory,
+      analysisContext?.workspace,
       analysisOptions,
       declaredVariables,
       _saltForUnlinked,
@@ -1631,7 +1635,7 @@
         null);
   }
 
-  void _reportException(String path, exception, StackTrace stackTrace) {
+  void _reportException(String path, Object exception, StackTrace stackTrace) {
     String contextKey;
     if (exception is _ExceptionState) {
       var state = exception as _ExceptionState;
@@ -1639,12 +1643,20 @@
       stackTrace = state.stackTrace;
       contextKey = state.contextKey;
     }
+
     CaughtException caught = CaughtException(exception, stackTrace);
-    String fileContent = _fsState.getFileForPath(path).content;
+
+    var fileContentMap = <String, String>{};
+    var libraryFile = _fsState.getFileForPath(path);
+    for (var file in libraryFile.libraryFiles) {
+      fileContentMap[file.path] = file.content;
+    }
+
     _exceptionController.add(
       ExceptionResult(
         filePath: path,
-        fileContent: fileContent,
+        fileContentMap: fileContentMap,
+        fileContent: libraryFile.content,
         exception: caught,
         contextKey: contextKey,
       ),
@@ -1665,8 +1677,8 @@
         .toBuffer();
   }
 
-  String _storeExceptionContext(
-      String path, FileState libraryFile, exception, StackTrace stackTrace) {
+  String _storeExceptionContext(String path, FileState libraryFile,
+      Object exception, StackTrace stackTrace) {
     if (allowedNumberOfContextsToWrite <= 0) {
       return null;
     } else {
@@ -2119,33 +2131,25 @@
   /// Return the lint code with the given [errorName], or `null` if there is no
   /// lint registered with that name.
   static ErrorCode _lintCodeByUniqueName(String errorName) {
-    const String lintPrefix = 'LintCode.';
-    if (errorName.startsWith(lintPrefix)) {
-      String lintName = errorName.substring(lintPrefix.length);
-      return linter.Registry.ruleRegistry.getRule(lintName)?.lintCode;
-    }
-
-    const String lintPrefixOld = '_LintCode.';
-    if (errorName.startsWith(lintPrefixOld)) {
-      String lintName = errorName.substring(lintPrefixOld.length);
-      return linter.Registry.ruleRegistry.getRule(lintName)?.lintCode;
-    }
-
-    return null;
+    return linter.Registry.ruleRegistry.codeForUniqueName(errorName);
   }
 }
 
 /// Exception that happened during analysis.
 class ExceptionResult {
-  /// The path of the file being analyzed when the [exception] happened.
+  /// The path of the library being analyzed when the [exception] happened.
   ///
   /// Absolute and normalized.
   final String filePath;
 
+  /// The content of the library and its parts.
+  final Map<String, String> fileContentMap;
+
   /// The path of the file being analyzed when the [exception] happened.
+  @Deprecated('Use fileContentMap instead')
   final String fileContent;
 
-  /// The exception during analysis of the file with the [path].
+  /// The exception during analysis of the file with the [filePath].
   final CaughtException exception;
 
   /// If the exception happened during a file analysis, and the context in which
@@ -2156,6 +2160,7 @@
 
   ExceptionResult({
     @required this.filePath,
+    @required this.fileContentMap,
     @required this.fileContent,
     @required this.exception,
     @required this.contextKey,
@@ -2262,7 +2267,7 @@
 
 /// Information about an exception and its context.
 class _ExceptionState {
-  final exception;
+  final Object exception;
   final StackTrace stackTrace;
 
   /// The key under which the context of the exception was stored, or `null`
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
index 98663d9..d09c2fe 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
@@ -8,7 +8,7 @@
 
 /// The current version of the Dart language (or, for non-stable releases, the
 /// version of the language currently in the process of being developed).
-const _currentVersion = '2.9.0';
+const _currentVersion = '2.10.0';
 
 /// A map containing information about all known experimental flags.
 const _knownFeatures = <String, ExperimentalFeature>{
@@ -22,12 +22,8 @@
   EnableString.set_literals: ExperimentalFeatures.set_literals,
   EnableString.spread_collections: ExperimentalFeatures.spread_collections,
   EnableString.triple_shift: ExperimentalFeatures.triple_shift,
+  EnableString.value_class: ExperimentalFeatures.value_class,
   EnableString.variance: ExperimentalFeatures.variance,
-
-  // ignore: deprecated_member_use_from_same_package
-  EnableString.bogus_disabled: ExperimentalFeatures.bogus_disabled,
-  // ignore: deprecated_member_use_from_same_package
-  EnableString.bogus_enabled: ExperimentalFeatures.bogus_enabled,
 };
 
 List<bool> _buildExperimentalFlagsArray() => <bool>[
@@ -39,9 +35,8 @@
       true, // set-literals
       true, // spread-collections
       IsEnabledByDefault.triple_shift,
+      IsEnabledByDefault.value_class,
       IsEnabledByDefault.variance,
-      false, // bogus-disabled
-      true, // bogus-enabled
     ];
 
 /// Constant strings for enabling each of the currently known experimental
@@ -71,16 +66,11 @@
   /// String to enable the experiment "triple-shift"
   static const String triple_shift = 'triple-shift';
 
+  /// String to enable the experiment "value-class"
+  static const String value_class = 'value-class';
+
   /// String to enable the experiment "variance"
   static const String variance = 'variance';
-
-  /// String to enable the experiment "bogus-disabled"
-  @deprecated
-  static const String bogus_disabled = 'bogus-disabled';
-
-  /// String to enable the experiment "bogus-enabled"
-  @deprecated
-  static const String bogus_enabled = 'bogus-enabled';
 }
 
 class ExperimentalFeatures {
@@ -156,36 +146,23 @@
     firstSupportedVersion: null,
   );
 
-  static const variance = ExperimentalFeature(
+  static const value_class = ExperimentalFeature(
     index: 8,
+    enableString: EnableString.value_class,
+    isEnabledByDefault: IsEnabledByDefault.value_class,
+    isExpired: IsExpired.value_class,
+    documentation: 'Value class',
+    firstSupportedVersion: null,
+  );
+
+  static const variance = ExperimentalFeature(
+    index: 9,
     enableString: EnableString.variance,
     isEnabledByDefault: IsEnabledByDefault.variance,
     isExpired: IsExpired.variance,
     documentation: 'Sound variance',
     firstSupportedVersion: null,
   );
-
-  @deprecated
-  static const bogus_disabled = ExperimentalFeature(
-    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(
-    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
@@ -215,16 +192,11 @@
   /// Default state of the experiment "triple-shift"
   static const bool triple_shift = false;
 
+  /// Default state of the experiment "value-class"
+  static const bool value_class = false;
+
   /// Default state of the experiment "variance"
   static const bool variance = false;
-
-  /// Default state of the experiment "bogus-disabled"
-  @deprecated
-  static const bool bogus_disabled = false;
-
-  /// Default state of the experiment "bogus-enabled"
-  @deprecated
-  static const bool bogus_enabled = true;
 }
 
 /// Constant bools indicating whether each experimental flag is currently
@@ -255,25 +227,14 @@
   /// Expiration status of the experiment "triple-shift"
   static const bool triple_shift = false;
 
+  /// Expiration status of the experiment "value-class"
+  static const bool value_class = false;
+
   /// Expiration status of the experiment "variance"
   static const bool variance = false;
-
-  /// Expiration status of the experiment "bogus-disabled"
-  static const bool bogus_disabled = true;
-
-  /// Expiration status of the experiment "bogus-enabled"
-  static const bool bogus_enabled = true;
 }
 
 mixin _CurrentState {
-  /// Current state for the flag "bogus-disabled"
-  @deprecated
-  bool get bogus_disabled => isEnabled(ExperimentalFeatures.bogus_disabled);
-
-  /// Current state for the flag "bogus-enabled"
-  @deprecated
-  bool get bogus_enabled => isEnabled(ExperimentalFeatures.bogus_enabled);
-
   /// Current state for the flag "constant-update-2018"
   bool get constant_update_2018 =>
       isEnabled(ExperimentalFeatures.constant_update_2018);
@@ -303,6 +264,9 @@
   /// Current state for the flag "triple-shift"
   bool get triple_shift => isEnabled(ExperimentalFeatures.triple_shift);
 
+  /// Current state for the flag "value-class"
+  bool get value_class => isEnabled(ExperimentalFeatures.value_class);
+
   /// Current state for the flag "variance"
   bool get variance => isEnabled(ExperimentalFeatures.variance);
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/feature_set_provider.dart b/pkg/analyzer/lib/src/dart/analysis/feature_set_provider.dart
index 8604562..5fe2dd4 100644
--- a/pkg/analyzer/lib/src/dart/analysis/feature_set_provider.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/feature_set_provider.dart
@@ -4,10 +4,12 @@
 
 import 'package:_fe_analyzer_shared/src/sdk/allowed_experiments.dart';
 import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/util/uri.dart';
 import 'package:meta/meta.dart';
 import 'package:pub_semver/pub_semver.dart';
 
@@ -17,16 +19,19 @@
   static const isNullSafetySdk = true;
 
   final AllowedExperiments _allowedExperiments;
+  final ResourceProvider _resourceProvider;
   final Packages _packages;
   final FeatureSet _packageDefaultFeatureSet;
   final FeatureSet _nonPackageDefaultFeatureSet;
 
   FeatureSetProvider._({
     @required AllowedExperiments allowedExperiments,
+    @required ResourceProvider resourceProvider,
     @required Packages packages,
     @required FeatureSet packageDefaultFeatureSet,
     @required FeatureSet nonPackageDefaultFeatureSet,
   })  : _allowedExperiments = allowedExperiments,
+        _resourceProvider = resourceProvider,
         _packages = packages,
         _packageDefaultFeatureSet = packageDefaultFeatureSet,
         _nonPackageDefaultFeatureSet = nonPackageDefaultFeatureSet;
@@ -44,7 +49,7 @@
       }
     }
 
-    var package = _packages.packageForPath(path);
+    var package = _findPackage(uri, path);
     if (package != null) {
       var experiments = _allowedExperiments.forPackage(package.name);
       if (experiments != null) {
@@ -65,8 +70,7 @@
     if (uri.isScheme('dart')) {
       return ExperimentStatus.currentVersion;
     }
-
-    var package = _packages.packageForPath(path);
+    var package = _findPackage(uri, path);
     if (package != null) {
       var languageVersion = package.languageVersion;
       if (languageVersion != null) {
@@ -77,8 +81,31 @@
     return ExperimentStatus.currentVersion;
   }
 
+  /// Return the package corresponding to the [uri] or [path], `null` if none.
+  Package _findPackage(Uri uri, String path) {
+    if (uri.isScheme('package')) {
+      var pathSegments = uri.pathSegments;
+      if (pathSegments.isNotEmpty) {
+        var packageName = pathSegments.first;
+        var package = _packages[packageName];
+        if (package != null) {
+          return package;
+        }
+      }
+    } else if (uri.isScheme('file')) {
+      var uriPath = fileUriToNormalizedPath(_resourceProvider.pathContext, uri);
+      var package = _packages.packageForPath(uriPath);
+      if (package != null) {
+        return package;
+      }
+    }
+
+    return _packages.packageForPath(path);
+  }
+
   static FeatureSetProvider build({
     @required SourceFactory sourceFactory,
+    @required ResourceProvider resourceProvider,
     @required Packages packages,
     @required FeatureSet packageDefaultFeatureSet,
     @required FeatureSet nonPackageDefaultFeatureSet,
@@ -86,6 +113,7 @@
     var allowedExperiments = _experimentsForSdk(sourceFactory.dartSdk);
     return FeatureSetProvider._(
       allowedExperiments: allowedExperiments,
+      resourceProvider: resourceProvider,
       packages: packages,
       packageDefaultFeatureSet: packageDefaultFeatureSet,
       nonPackageDefaultFeatureSet: nonPackageDefaultFeatureSet,
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 b93a6c8..2b3d215 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart
@@ -84,7 +84,7 @@
 
   /// 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) {
+  static void _cacheCleanUpFunction(Object message) {
     SendPort initialReplyTo = message;
     ReceivePort port = ReceivePort();
     initialReplyTo.send(port.sendPort);
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 8d47e14..d288490 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -38,6 +38,7 @@
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/summary2/informative_data.dart';
+import 'package:analyzer/src/workspace/workspace.dart';
 import 'package:convert/convert.dart';
 import 'package:crypto/crypto.dart';
 import 'package:meta/meta.dart';
@@ -91,6 +92,11 @@
   /// The [Source] of the file with the [uri].
   final Source source;
 
+  /// The [WorkspacePackage] that contains this file.
+  ///
+  /// It might be `null` if the file is outside of the workspace.
+  final WorkspacePackage workspacePackage;
+
   /// 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.
@@ -144,6 +150,7 @@
     this.path,
     this.uri,
     this.source,
+    this.workspacePackage,
     this._contextFeatureSet,
     this._packageLanguageVersion,
   ) : isInExternalSummaries = false;
@@ -152,6 +159,7 @@
       : isInExternalSummaries = true,
         path = null,
         source = null,
+        workspacePackage = null,
         _exists = true,
         _contextFeatureSet = null,
         _packageLanguageVersion = null {
@@ -288,7 +296,7 @@
   /// 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
+    libraryCycle; // sets _transitiveSignature
     return _transitiveSignature;
   }
 
@@ -734,6 +742,7 @@
   final ByteStore _byteStore;
   final FileContentOverlay _contentOverlay;
   final SourceFactory _sourceFactory;
+  final Workspace _workspace;
   final AnalysisOptions _analysisOptions;
   final DeclaredVariables _declaredVariables;
   final Uint32List _saltForUnlinked;
@@ -793,6 +802,7 @@
     this._resourceProvider,
     this.contextName,
     this._sourceFactory,
+    this._workspace,
     this._analysisOptions,
     this._declaredVariables,
     this._saltForUnlinked,
@@ -814,8 +824,8 @@
   FileState get unresolvedFile {
     if (_unresolvedFile == null) {
       var featureSet = FeatureSet.fromEnableFlags([]);
-      _unresolvedFile = FileState._(
-          this, null, null, null, featureSet, ExperimentStatus.currentVersion);
+      _unresolvedFile = FileState._(this, null, null, null, null, featureSet,
+          ExperimentStatus.currentVersion);
       _unresolvedFile.refresh();
     }
     return _unresolvedFile;
@@ -841,11 +851,14 @@
       }
       // Create a new file.
       FileSource uriSource = FileSource(resource, uri);
-      FeatureSet featureSet = featureSetProvider.getFeatureSet(path, uri);
+      WorkspacePackage workspacePackage = _workspace?.findPackageFor(path);
+      FeatureSet workspacePackageFeatureSet = workspacePackage?.featureSet;
+      FeatureSet featureSet = workspacePackageFeatureSet ??
+          featureSetProvider.getFeatureSet(path, uri);
       Version packageLanguageVersion =
           featureSetProvider.getLanguageVersion(path, uri);
-      file = FileState._(
-          this, path, uri, uriSource, featureSet, packageLanguageVersion);
+      file = FileState._(this, path, uri, uriSource, workspacePackage,
+          featureSet, packageLanguageVersion);
       _uriToFile[uri] = file;
       _addFileWithPath(path, file);
       _pathToCanonicalFile[path] = file;
@@ -884,11 +897,14 @@
       String path = uriSource.fullName;
       File resource = _resourceProvider.getFile(path);
       FileSource source = FileSource(resource, uri);
-      FeatureSet featureSet = featureSetProvider.getFeatureSet(path, uri);
+      WorkspacePackage workspacePackage = _workspace?.findPackageFor(path);
+      FeatureSet workspacePackageFeatureSet = workspacePackage?.featureSet;
+      FeatureSet featureSet = workspacePackageFeatureSet ??
+          featureSetProvider.getFeatureSet(path, uri);
       Version packageLanguageVersion =
           featureSetProvider.getLanguageVersion(path, uri);
-      file = FileState._(
-          this, path, uri, source, featureSet, packageLanguageVersion);
+      file = FileState._(this, path, uri, source, workspacePackage, featureSet,
+          packageLanguageVersion);
       _uriToFile[uri] = file;
       _addFileWithPath(path, file);
       file.refresh(allowCached: true);
diff --git a/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart b/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart
index 46f3ae6..f2efe65 100644
--- a/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart
@@ -25,5 +25,5 @@
   c0 = c0 % 255;
   c1 = c1 % 255;
 
-  return (c1 << 8 | c0);
+  return c1 << 8 | c0;
 }
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index 4aad110..a60d615 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -8,8 +8,6 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/builder.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/testing_data.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
@@ -26,7 +24,6 @@
 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';
@@ -50,7 +47,6 @@
 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/workspace/workspace.dart';
 import 'package:pub_semver/pub_semver.dart';
 
 var timerLibraryAnalyzer = Stopwatch();
@@ -70,7 +66,6 @@
   final DeclaredVariables _declaredVariables;
   final SourceFactory _sourceFactory;
   final FileState _library;
-  final ResourceProvider _resourceProvider;
 
   final InheritanceManager3 _inheritance;
   final bool Function(Uri) _isLibraryUri;
@@ -79,7 +74,6 @@
 
   LibraryElement _libraryElement;
 
-  LibraryScope _libraryScope;
   final Map<FileState, LineInfo> _fileToLineInfo = {};
 
   final Map<FileState, IgnoreInfo> _fileToIgnoreInfo = {};
@@ -100,7 +94,6 @@
       this._elementFactory,
       this._inheritance,
       this._library,
-      this._resourceProvider,
       {TestingData testingData})
       : _testingData = testingData;
 
@@ -128,7 +121,6 @@
     timerLibraryAnalyzerFreshUnit.stop();
 
     _libraryElement = _elementFactory.libraryOfUri(_library.uriStr);
-    _libraryScope = LibraryScope(_libraryElement);
 
     // Resolve URIs in directives to corresponding sources.
     FeatureSet featureSet = units[_library].featureSet;
@@ -190,6 +182,8 @@
 
     assert(units.values.every(LegacyTypeAsserter.assertLegacyTypes));
 
+    _checkForInconsistentLanguageVersionOverride(units);
+
     timerLibraryAnalyzerVerify.stop();
 
     // Return full results.
@@ -203,6 +197,48 @@
     return results;
   }
 
+  void _checkForInconsistentLanguageVersionOverride(
+    Map<FileState, CompilationUnit> units,
+  ) {
+    var libraryEntry = units.entries.first;
+    var libraryUnit = libraryEntry.value;
+    var libraryOverrideToken = libraryUnit.languageVersionToken;
+
+    var elementToUnit = <CompilationUnitElement, CompilationUnit>{};
+    for (var entry in units.entries) {
+      var unit = entry.value;
+      elementToUnit[unit.declaredElement] = unit;
+    }
+
+    for (var directive in libraryUnit.directives) {
+      if (directive is PartDirective) {
+        var partUnit = elementToUnit[directive.uriElement];
+        if (partUnit != null) {
+          var shouldReport = false;
+          var partOverrideToken = partUnit.languageVersionToken;
+          if (libraryOverrideToken != null) {
+            if (partOverrideToken != null) {
+              if (partOverrideToken.major != libraryOverrideToken.major ||
+                  partOverrideToken.minor != libraryOverrideToken.minor) {
+                shouldReport = true;
+              }
+            } else {
+              shouldReport = true;
+            }
+          } else if (partOverrideToken != null) {
+            shouldReport = true;
+          }
+          if (shouldReport) {
+            _getErrorReporter(_library).reportErrorForNode(
+              CompileTimeErrorCode.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE,
+              directive.uri,
+            );
+          }
+        }
+      }
+    }
+  }
+
   void _computeConstantErrors(
       ErrorReporter errorReporter, CompilationUnit unit) {
     ConstantVerifier constantVerifier = ConstantVerifier(
@@ -251,8 +287,8 @@
         declaredVariables: _declaredVariables,
         typeSystem: _typeSystem,
         inheritanceManager: _inheritance,
-        resourceProvider: _resourceProvider,
         analysisOptions: _context.analysisOptions,
+        workspacePackage: _library.workspacePackage,
       ),
     );
 
@@ -309,8 +345,6 @@
     var nodeRegistry = NodeLintRegistry(_analysisOptions.enableTiming);
     var visitors = <AstVisitor>[];
 
-    final workspacePackage = _getPackage(currentUnit.unit);
-
     var context = LinterContextImpl(
       allUnits,
       currentUnit,
@@ -319,7 +353,7 @@
       _typeSystem,
       _inheritance,
       _analysisOptions,
-      workspacePackage,
+      file.workspacePackage,
     );
     for (Linter linter in _analysisOptions.lintRules) {
       linter.reporter = errorReporter;
@@ -412,8 +446,8 @@
         // non-internal code from importing internal code.
         bool privileged = false;
 
-        if (code == StaticTypeWarningCode.UNDEFINED_FUNCTION ||
-            code == StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME) {
+        if (code == CompileTimeErrorCode.UNDEFINED_FUNCTION ||
+            code == CompileTimeErrorCode.UNDEFINED_PREFIXED_NAME) {
           // Special case a small number of errors in Flutter code which are
           // ignored. The erroneous code is found in a conditionally imported
           // library, which uses a special version of the "dart:ui" library
@@ -479,23 +513,6 @@
     });
   }
 
-  WorkspacePackage _getPackage(CompilationUnit unit) {
-    final libraryPath = _library.source.fullName;
-    Workspace workspace =
-        unit.declaredElement.session?.analysisContext?.workspace;
-
-    // If there is no driver setup (as in test environments), we need to create
-    // a workspace ourselves.
-    // todo (pq): fix tests or otherwise de-dup this logic shared w/ resolver.
-    if (workspace == null) {
-      final builder = ContextBuilder(
-          _resourceProvider, null /* sdkManager */, null /* contentCache */);
-      workspace = ContextBuilder.createWorkspace(
-          _resourceProvider, libraryPath, builder);
-    }
-    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.
   _NameOrSource _getPartLibraryNameOrUri(Source partSource,
@@ -542,7 +559,7 @@
 
     LineInfo lineInfo = unit.lineInfo;
     _fileToLineInfo[file] = lineInfo;
-    _fileToIgnoreInfo[file] = IgnoreInfo.calculateIgnores(content, lineInfo);
+    _fileToIgnoreInfo[file] = IgnoreInfo.forDart(unit, content);
 
     return unit;
   }
@@ -637,7 +654,7 @@
                     [name]);
               } else if (libraryNameNode.name != name) {
                 libraryErrorReporter.reportErrorForNode(
-                    StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
+                    CompileTimeErrorCode.PART_OF_DIFFERENT_LIBRARY,
                     partUri,
                     [libraryNameNode.name, name]);
               }
@@ -645,7 +662,7 @@
               Source source = nameOrSource.source;
               if (source != _library.source) {
                 libraryErrorReporter.reportErrorForNode(
-                    StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
+                    CompileTimeErrorCode.PART_OF_DIFFERENT_LIBRARY,
                     partUri,
                     [_library.uriStr, source.uri]);
               }
@@ -694,14 +711,14 @@
         unitElement: unitElement,
         errorListener: errorListener,
         featureSet: unit.featureSet,
-        nameScope: _libraryScope,
+        nameScope: _libraryElement.scope,
         elementWalker: ElementWalker.forCompilationUnit(unitElement),
       ),
     );
 
     unit.accept(VariableResolverVisitor(
         _libraryElement, source, _typeProvider, errorListener,
-        nameScope: _libraryScope));
+        nameScope: _libraryElement.scope));
 
     // Nothing for RESOLVED_UNIT8?
     // Nothing for RESOLVED_UNIT9?
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index dfb0e07..3f4b76a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -65,9 +65,9 @@
     @required SourceFactory sourceFactory,
     @required this.externalSummaries,
     @required FileState targetLibrary,
-  })  : this.logger = logger,
-        this.byteStore = byteStore,
-        this.analysisSession = session {
+  })  : logger = logger,
+        byteStore = byteStore,
+        analysisSession = session {
     var synchronousSession =
         SynchronousSession(analysisOptions, declaredVariables);
     analysisContext = AnalysisContextImpl(synchronousSession, sourceFactory);
@@ -172,7 +172,7 @@
                       '[cycle: $cycle]'
                       '[loadedBundles: ${loadedBundles.toList()}]'
                       '[elementFactory.libraries: $libraryUriList]';
-                  throw LibraryCycleLinkException(
+                  throw CaughtExceptionWithFiles(
                     'Cycle loading state error',
                     StackTrace.current,
                     {'status': statusText},
@@ -314,19 +314,10 @@
         fileContentMap[file.path] = file.content;
       }
     }
-    throw LibraryCycleLinkException(exception, stackTrace, fileContentMap);
+    throw CaughtExceptionWithFiles(exception, stackTrace, fileContentMap);
   }
 }
 
 class LibraryContextTestView {
   final List<Set<String>> linkedCycles = [];
 }
-
-/// TODO(scheglov) replace in the internal patch
-class LibraryCycleLinkException extends CaughtExceptionWithFiles {
-  LibraryCycleLinkException(
-    Object exception,
-    StackTrace stackTrace,
-    Map<String, String> fileContentMap,
-  ) : super(exception, stackTrace, fileContentMap);
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/session.dart b/pkg/analyzer/lib/src/dart/analysis/session.dart
index 055f715..d343115 100644
--- a/pkg/analyzer/lib/src/dart/analysis/session.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/session.dart
@@ -231,7 +231,7 @@
   AnalysisOptionsImpl get analysisOptions => _analysisOptions;
 
   set analysisOptions(AnalysisOptionsImpl analysisOptions) {
-    this._analysisOptions = analysisOptions;
+    _analysisOptions = analysisOptions;
 
     _typeSystemLegacy?.updateOptions(
       implicitCasts: analysisOptions.implicitCasts,
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 89a1d3f..bfbf152 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -3886,7 +3886,7 @@
   bool get isNullAware {
     var nextType = argumentList.endToken.next.type;
     return nextType == TokenType.QUESTION_PERIOD ||
-        nextType == TokenType.QUESTION_PERIOD_OPEN_SQUARE_BRACKET;
+        nextType == TokenType.QUESTION;
   }
 
   @override
@@ -3920,6 +3920,9 @@
 ///    fieldDeclaration ::=
 ///        'static'? [VariableDeclarationList] ';'
 class FieldDeclarationImpl extends ClassMemberImpl implements FieldDeclaration {
+  @override
+  Token abstractKeyword;
+
   /// The 'covariant' keyword, or `null` if the keyword was not used.
   @override
   Token covariantKeyword;
@@ -3943,6 +3946,7 @@
   FieldDeclarationImpl(
       CommentImpl comment,
       List<Annotation> metadata,
+      this.abstractKeyword,
       this.covariantKeyword,
       this.staticKeyword,
       VariableDeclarationListImpl fieldList,
@@ -3971,7 +3975,9 @@
 
   @override
   Token get firstTokenAfterCommentAndMetadata {
-    if (covariantKeyword != null) {
+    if (abstractKeyword != null) {
+      return abstractKeyword;
+    } else if (covariantKeyword != null) {
       return covariantKeyword;
     } else if (staticKeyword != null) {
       return staticKeyword;
@@ -4311,35 +4317,30 @@
   }
 
   @override
-  bool get isNamed =>
-      kind == ParameterKind.NAMED || kind == ParameterKind.NAMED_REQUIRED;
+  bool get isNamed => kind.isNamed;
 
   @override
-  bool get isOptional =>
-      kind == ParameterKind.NAMED || kind == ParameterKind.POSITIONAL;
+  bool get isOptional => kind.isOptional;
 
   @override
-  bool get isOptionalNamed => kind == ParameterKind.NAMED;
+  bool get isOptionalNamed => kind.isOptionalNamed;
 
   @override
-  bool get isOptionalPositional => kind == ParameterKind.POSITIONAL;
+  bool get isOptionalPositional => kind.isOptionalPositional;
 
   @override
-  bool get isPositional =>
-      kind == ParameterKind.POSITIONAL || kind == ParameterKind.REQUIRED;
+  bool get isPositional => kind.isPositional;
 
   @override
-  bool get isRequired =>
-      kind == ParameterKind.REQUIRED || kind == ParameterKind.NAMED_REQUIRED;
+  bool get isRequired => kind.isRequired;
 
   @override
-  bool get isRequiredNamed => kind == ParameterKind.NAMED_REQUIRED;
+  bool get isRequiredNamed => kind.isRequiredNamed;
 
   @override
-  bool get isRequiredPositional => kind == ParameterKind.REQUIRED;
+  bool get isRequiredPositional => kind.isRequiredPositional;
 
   @override
-  // Overridden to remove the 'deprecated' annotation.
   ParameterKind get kind;
 }
 
@@ -5868,7 +5869,6 @@
       return _ancestorCascade.isNullAware;
     }
     return question != null ||
-        leftBracket.type == TokenType.QUESTION_PERIOD_OPEN_SQUARE_BRACKET ||
         (leftBracket.type == TokenType.OPEN_SQUARE_BRACKET &&
             period != null &&
             period.type == TokenType.QUESTION_PERIOD_PERIOD);
@@ -6279,22 +6279,24 @@
   Iterable<SyntacticEntity> get childEntities => ChildEntities()..add(contents);
 
   @override
-  int get contentsEnd {
-    String lexeme = contents.lexeme;
-    return offset + StringLexemeHelper(lexeme, true, true).end;
-  }
+  int get contentsEnd => offset + _lexemeHelper.end;
 
   @override
-  int get contentsOffset {
-    int offset = contents.offset;
-    String lexeme = contents.lexeme;
-    return offset + StringLexemeHelper(lexeme, true, true).start;
-  }
+  int get contentsOffset => contents.offset + _lexemeHelper.start;
 
   @override
   Token get endToken => contents;
 
   @override
+  StringInterpolation get parent => super.parent;
+
+  StringLexemeHelper get _lexemeHelper {
+    String lexeme = contents.lexeme;
+    return StringLexemeHelper(lexeme, identical(this, parent.elements.first),
+        identical(this, parent.elements.last));
+  }
+
+  @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitInterpolationString(this);
 
   @override
@@ -7686,11 +7688,10 @@
     _identifier = _becomeParentOf(identifier as SimpleIdentifierImpl);
   }
 
-  @deprecated
   @override
   ParameterKind get kind {
     AstNode parent = this.parent;
-    if (parent is DefaultFormalParameter) {
+    if (parent is DefaultFormalParameterImpl) {
       return parent.kind;
     }
     return ParameterKind.REQUIRED;
diff --git a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
index f60676c..ad2b6d8 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
@@ -394,18 +394,19 @@
           VariableDeclarationList fieldList,
           Token semicolon) =>
       FieldDeclarationImpl(
-          comment, metadata, null, staticKeyword, fieldList, semicolon);
+          comment, metadata, null, null, staticKeyword, fieldList, semicolon);
 
   @override
   FieldDeclaration fieldDeclaration2(
           {Comment comment,
           List<Annotation> metadata,
+          Token abstractKeyword,
           Token covariantKeyword,
           Token staticKeyword,
           @required VariableDeclarationList fieldList,
           @required Token semicolon}) =>
-      FieldDeclarationImpl(comment, metadata, covariantKeyword, staticKeyword,
-          fieldList, semicolon);
+      FieldDeclarationImpl(comment, metadata, abstractKeyword, covariantKeyword,
+          staticKeyword, fieldList, semicolon);
 
   @override
   FieldFormalParameter fieldFormalParameter(
diff --git a/pkg/analyzer/lib/src/dart/ast/extensions.dart b/pkg/analyzer/lib/src/dart/ast/extensions.dart
new file mode 100644
index 0000000..fd66ae4
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/ast/extensions.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.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+
+extension ListOfFormalParameterExtension on List<FormalParameter> {
+  Iterable<FormalParameterImpl> get asImpl {
+    return cast<FormalParameterImpl>();
+  }
+}
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 adf8d2b..eba0b8c 100644
--- a/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
@@ -495,6 +495,7 @@
   @override
   void visitFieldDeclaration(FieldDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
+    safelyVisitTokenWithSuffix(node.abstractKeyword, " ");
     safelyVisitTokenWithSuffix(node.staticKeyword, " ");
     safelyVisitNode(node.fields);
     sink.write(";");
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index 250c38e..7d27356 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -339,8 +339,7 @@
 
   @override
   DefaultFormalParameter visitDefaultFormalParameter(
-          DefaultFormalParameter node) =>
-      // ignore: deprecated_member_use_from_same_package
+          covariant DefaultFormalParameterImpl node) =>
       astFactory.defaultFormalParameter(cloneNode(node.parameter), node.kind,
           cloneToken(node.separator), cloneNode(node.defaultValue));
 
@@ -448,6 +447,7 @@
       astFactory.fieldDeclaration2(
           comment: cloneNode(node.documentationComment),
           metadata: cloneNodeList(node.metadata),
+          abstractKeyword: cloneToken(node.abstractKeyword),
           covariantKeyword: cloneToken(node.covariantKeyword),
           staticKeyword: cloneToken(node.staticKeyword),
           fieldList: cloneNode(node.fields),
@@ -1446,10 +1446,9 @@
   }
 
   @override
-  bool visitDefaultFormalParameter(DefaultFormalParameter node) {
-    DefaultFormalParameter other = _other as DefaultFormalParameter;
+  bool visitDefaultFormalParameter(covariant DefaultFormalParameterImpl node) {
+    var other = _other as DefaultFormalParameterImpl;
     return isEqualNodes(node.parameter, other.parameter) &&
-        // ignore: deprecated_member_use_from_same_package
         node.kind == other.kind &&
         isEqualTokens(node.separator, other.separator) &&
         isEqualNodes(node.defaultValue, other.defaultValue);
@@ -1575,8 +1574,9 @@
   @override
   bool visitFieldDeclaration(FieldDeclaration node) {
     FieldDeclaration other = _other as FieldDeclaration;
-    return isEqualNodes(
-            node.documentationComment, other.documentationComment) &&
+    return isEqualTokens(node.abstractKeyword, other.abstractKeyword) &&
+        isEqualTokens(node.covariantKeyword, other.covariantKeyword) &&
+        isEqualNodes(node.documentationComment, other.documentationComment) &&
         _isEqualNodeLists(node.metadata, other.metadata) &&
         isEqualTokens(node.staticKeyword, other.staticKeyword) &&
         isEqualNodes(node.fields, other.fields) &&
@@ -2439,8 +2439,8 @@
   /// 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;
+      : _startOffset = startOffset,
+        _endOffset = endOffset ?? startOffset;
 
   /// Return the node that was found that corresponds to the given source range
   /// or `null` if there is no such node.
@@ -2532,8 +2532,8 @@
   /// 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;
+      : _startOffset = startOffset,
+        _endOffset = endOffset ?? startOffset;
 
   /// Search within the given AST [node] and return the node that was found,
   /// or `null` if no node was found.
@@ -3980,7 +3980,7 @@
 
   @override
   bool visitAdjacentStrings(AdjacentStrings node) {
-    AdjacentStrings toNode = this._toNode as AdjacentStrings;
+    AdjacentStrings toNode = _toNode as AdjacentStrings;
     if (_isEqualNodeLists(node.strings, toNode.strings)) {
       toNode.staticType = node.staticType;
       return true;
@@ -3990,7 +3990,7 @@
 
   @override
   bool visitAnnotation(Annotation node) {
-    Annotation toNode = this._toNode as Annotation;
+    Annotation toNode = _toNode as Annotation;
     if (_and(
         _isEqualTokens(node.atSign, toNode.atSign),
         _isEqualNodes(node.name, toNode.name),
@@ -4005,7 +4005,7 @@
 
   @override
   bool visitArgumentList(ArgumentList node) {
-    ArgumentList toNode = this._toNode as ArgumentList;
+    ArgumentList toNode = _toNode as ArgumentList;
     return _and(
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
         _isEqualNodeLists(node.arguments, toNode.arguments),
@@ -4014,7 +4014,7 @@
 
   @override
   bool visitAsExpression(AsExpression node) {
-    AsExpression toNode = this._toNode as AsExpression;
+    AsExpression toNode = _toNode as AsExpression;
     if (_and(
         _isEqualNodes(node.expression, toNode.expression),
         _isEqualTokens(node.asOperator, toNode.asOperator),
@@ -4027,7 +4027,7 @@
 
   @override
   bool visitAssertInitializer(AssertInitializer node) {
-    AssertInitializer toNode = this._toNode as AssertInitializer;
+    AssertInitializer toNode = _toNode as AssertInitializer;
     return _and(
         _isEqualTokens(node.assertKeyword, toNode.assertKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
@@ -4039,7 +4039,7 @@
 
   @override
   bool visitAssertStatement(AssertStatement node) {
-    AssertStatement toNode = this._toNode as AssertStatement;
+    AssertStatement toNode = _toNode as AssertStatement;
     return _and(
         _isEqualTokens(node.assertKeyword, toNode.assertKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
@@ -4052,7 +4052,7 @@
 
   @override
   bool visitAssignmentExpression(AssignmentExpression node) {
-    AssignmentExpression toNode = this._toNode as AssignmentExpression;
+    AssignmentExpression toNode = _toNode as AssignmentExpression;
     if (_and(
         _isEqualNodes(node.leftHandSide, toNode.leftHandSide),
         _isEqualTokens(node.operator, toNode.operator),
@@ -4066,7 +4066,7 @@
 
   @override
   bool visitAwaitExpression(AwaitExpression node) {
-    AwaitExpression toNode = this._toNode as AwaitExpression;
+    AwaitExpression toNode = _toNode as AwaitExpression;
     if (_and(_isEqualTokens(node.awaitKeyword, toNode.awaitKeyword),
         _isEqualNodes(node.expression, toNode.expression))) {
       toNode.staticType = node.staticType;
@@ -4077,7 +4077,7 @@
 
   @override
   bool visitBinaryExpression(BinaryExpression node) {
-    BinaryExpression toNode = this._toNode as BinaryExpression;
+    BinaryExpression toNode = _toNode as BinaryExpression;
     if (_and(
         _isEqualNodes(node.leftOperand, toNode.leftOperand),
         _isEqualTokens(node.operator, toNode.operator),
@@ -4091,7 +4091,7 @@
 
   @override
   bool visitBlock(Block node) {
-    Block toNode = this._toNode as Block;
+    Block toNode = _toNode as Block;
     return _and(
         _isEqualTokens(node.leftBracket, toNode.leftBracket),
         _isEqualNodeLists(node.statements, toNode.statements),
@@ -4100,13 +4100,13 @@
 
   @override
   bool visitBlockFunctionBody(BlockFunctionBody node) {
-    BlockFunctionBody toNode = this._toNode as BlockFunctionBody;
+    BlockFunctionBody toNode = _toNode as BlockFunctionBody;
     return _isEqualNodes(node.block, toNode.block);
   }
 
   @override
   bool visitBooleanLiteral(BooleanLiteral node) {
-    BooleanLiteral toNode = this._toNode as BooleanLiteral;
+    BooleanLiteral toNode = _toNode as BooleanLiteral;
     if (_and(_isEqualTokens(node.literal, toNode.literal),
         node.value == toNode.value)) {
       toNode.staticType = node.staticType;
@@ -4117,7 +4117,7 @@
 
   @override
   bool visitBreakStatement(BreakStatement node) {
-    BreakStatement toNode = this._toNode as BreakStatement;
+    BreakStatement toNode = _toNode as BreakStatement;
     if (_and(
         _isEqualTokens(node.breakKeyword, toNode.breakKeyword),
         _isEqualNodes(node.label, toNode.label),
@@ -4130,7 +4130,7 @@
 
   @override
   bool visitCascadeExpression(CascadeExpression node) {
-    CascadeExpression toNode = this._toNode as CascadeExpression;
+    CascadeExpression toNode = _toNode as CascadeExpression;
     if (_and(_isEqualNodes(node.target, toNode.target),
         _isEqualNodeLists(node.cascadeSections, toNode.cascadeSections))) {
       toNode.staticType = node.staticType;
@@ -4141,7 +4141,7 @@
 
   @override
   bool visitCatchClause(CatchClause node) {
-    CatchClause toNode = this._toNode as CatchClause;
+    CatchClause toNode = _toNode as CatchClause;
     return _and(
         _isEqualTokens(node.onKeyword, toNode.onKeyword),
         _isEqualNodes(node.exceptionType, toNode.exceptionType),
@@ -4156,7 +4156,7 @@
 
   @override
   bool visitClassDeclaration(ClassDeclaration node) {
-    ClassDeclaration toNode = this._toNode as ClassDeclaration;
+    ClassDeclaration toNode = _toNode as ClassDeclaration;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4174,7 +4174,7 @@
 
   @override
   bool visitClassTypeAlias(ClassTypeAlias node) {
-    ClassTypeAlias toNode = this._toNode as ClassTypeAlias;
+    ClassTypeAlias toNode = _toNode as ClassTypeAlias;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4191,20 +4191,20 @@
 
   @override
   bool visitComment(Comment node) {
-    Comment toNode = this._toNode as Comment;
+    Comment toNode = _toNode as Comment;
     return _isEqualNodeLists(node.references, toNode.references);
   }
 
   @override
   bool visitCommentReference(CommentReference node) {
-    CommentReference toNode = this._toNode as CommentReference;
+    CommentReference toNode = _toNode as CommentReference;
     return _and(_isEqualTokens(node.newKeyword, toNode.newKeyword),
         _isEqualNodes(node.identifier, toNode.identifier));
   }
 
   @override
   bool visitCompilationUnit(CompilationUnit node) {
-    CompilationUnit toNode = this._toNode as CompilationUnit;
+    CompilationUnit toNode = _toNode as CompilationUnit;
     if (_and(
         _isEqualTokens(node.beginToken, toNode.beginToken),
         _isEqualNodes(node.scriptTag, toNode.scriptTag),
@@ -4219,7 +4219,7 @@
 
   @override
   bool visitConditionalExpression(ConditionalExpression node) {
-    ConditionalExpression toNode = this._toNode as ConditionalExpression;
+    ConditionalExpression toNode = _toNode as ConditionalExpression;
     if (_and(
         _isEqualNodes(node.condition, toNode.condition),
         _isEqualTokens(node.question, toNode.question),
@@ -4234,7 +4234,7 @@
 
   @override
   bool visitConfiguration(Configuration node) {
-    Configuration toNode = this._toNode as Configuration;
+    Configuration toNode = _toNode as Configuration;
     if (_and(
         _isEqualTokens(node.ifKeyword, toNode.ifKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
@@ -4250,7 +4250,7 @@
 
   @override
   bool visitConstructorDeclaration(ConstructorDeclaration node) {
-    ConstructorDeclarationImpl toNode = this._toNode as ConstructorDeclaration;
+    ConstructorDeclarationImpl toNode = _toNode as ConstructorDeclaration;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4273,8 +4273,7 @@
 
   @override
   bool visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
-    ConstructorFieldInitializer toNode =
-        this._toNode as ConstructorFieldInitializer;
+    ConstructorFieldInitializer toNode = _toNode as ConstructorFieldInitializer;
     return _and(
         _isEqualTokens(node.thisKeyword, toNode.thisKeyword),
         _isEqualTokens(node.period, toNode.period),
@@ -4285,7 +4284,7 @@
 
   @override
   bool visitConstructorName(ConstructorName node) {
-    ConstructorName toNode = this._toNode as ConstructorName;
+    ConstructorName toNode = _toNode as ConstructorName;
     if (_and(
         _isEqualNodes(node.type, toNode.type),
         _isEqualTokens(node.period, toNode.period),
@@ -4298,7 +4297,7 @@
 
   @override
   bool visitContinueStatement(ContinueStatement node) {
-    ContinueStatement toNode = this._toNode as ContinueStatement;
+    ContinueStatement toNode = _toNode as ContinueStatement;
     if (_and(
         _isEqualTokens(node.continueKeyword, toNode.continueKeyword),
         _isEqualNodes(node.label, toNode.label),
@@ -4311,7 +4310,7 @@
 
   @override
   bool visitDeclaredIdentifier(DeclaredIdentifier node) {
-    DeclaredIdentifier toNode = this._toNode as DeclaredIdentifier;
+    DeclaredIdentifier toNode = _toNode as DeclaredIdentifier;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4321,11 +4320,10 @@
   }
 
   @override
-  bool visitDefaultFormalParameter(DefaultFormalParameter node) {
-    DefaultFormalParameter toNode = this._toNode as DefaultFormalParameter;
+  bool visitDefaultFormalParameter(covariant DefaultFormalParameterImpl node) {
+    var toNode = _toNode as DefaultFormalParameterImpl;
     return _and(
         _isEqualNodes(node.parameter, toNode.parameter),
-        // ignore: deprecated_member_use_from_same_package
         node.kind == toNode.kind,
         _isEqualTokens(node.separator, toNode.separator),
         _isEqualNodes(node.defaultValue, toNode.defaultValue));
@@ -4333,7 +4331,7 @@
 
   @override
   bool visitDoStatement(DoStatement node) {
-    DoStatement toNode = this._toNode as DoStatement;
+    DoStatement toNode = _toNode as DoStatement;
     return _and(
         _isEqualTokens(node.doKeyword, toNode.doKeyword),
         _isEqualNodes(node.body, toNode.body),
@@ -4346,13 +4344,13 @@
 
   @override
   bool visitDottedName(DottedName node) {
-    DottedName toNode = this._toNode as DottedName;
+    DottedName toNode = _toNode as DottedName;
     return _isEqualNodeLists(node.components, toNode.components);
   }
 
   @override
   bool visitDoubleLiteral(DoubleLiteral node) {
-    DoubleLiteral toNode = this._toNode as DoubleLiteral;
+    DoubleLiteral toNode = _toNode as DoubleLiteral;
     if (_and(_isEqualTokens(node.literal, toNode.literal),
         node.value == toNode.value)) {
       toNode.staticType = node.staticType;
@@ -4363,19 +4361,19 @@
 
   @override
   bool visitEmptyFunctionBody(EmptyFunctionBody node) {
-    EmptyFunctionBody toNode = this._toNode as EmptyFunctionBody;
+    EmptyFunctionBody toNode = _toNode as EmptyFunctionBody;
     return _isEqualTokens(node.semicolon, toNode.semicolon);
   }
 
   @override
   bool visitEmptyStatement(EmptyStatement node) {
-    EmptyStatement toNode = this._toNode as EmptyStatement;
+    EmptyStatement toNode = _toNode as EmptyStatement;
     return _isEqualTokens(node.semicolon, toNode.semicolon);
   }
 
   @override
   bool visitEnumConstantDeclaration(EnumConstantDeclaration node) {
-    EnumConstantDeclaration toNode = this._toNode as EnumConstantDeclaration;
+    EnumConstantDeclaration toNode = _toNode as EnumConstantDeclaration;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4384,7 +4382,7 @@
 
   @override
   bool visitEnumDeclaration(EnumDeclaration node) {
-    EnumDeclaration toNode = this._toNode as EnumDeclaration;
+    EnumDeclaration toNode = _toNode as EnumDeclaration;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4397,7 +4395,7 @@
 
   @override
   bool visitExportDirective(ExportDirective node) {
-    ExportDirective toNode = this._toNode as ExportDirective;
+    ExportDirective toNode = _toNode as ExportDirective;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4413,7 +4411,7 @@
 
   @override
   bool visitExpressionFunctionBody(ExpressionFunctionBody node) {
-    ExpressionFunctionBody toNode = this._toNode as ExpressionFunctionBody;
+    ExpressionFunctionBody toNode = _toNode as ExpressionFunctionBody;
     return _and(
         _isEqualTokens(node.functionDefinition, toNode.functionDefinition),
         _isEqualNodes(node.expression, toNode.expression),
@@ -4422,21 +4420,21 @@
 
   @override
   bool visitExpressionStatement(ExpressionStatement node) {
-    ExpressionStatement toNode = this._toNode as ExpressionStatement;
+    ExpressionStatement toNode = _toNode as ExpressionStatement;
     return _and(_isEqualNodes(node.expression, toNode.expression),
         _isEqualTokens(node.semicolon, toNode.semicolon));
   }
 
   @override
   bool visitExtendsClause(ExtendsClause node) {
-    ExtendsClause toNode = this._toNode as ExtendsClause;
+    ExtendsClause toNode = _toNode as ExtendsClause;
     return _and(_isEqualTokens(node.extendsKeyword, toNode.extendsKeyword),
         _isEqualNodes(node.superclass, toNode.superclass));
   }
 
   @override
   bool visitExtensionDeclaration(ExtensionDeclaration node) {
-    ExtensionDeclaration toNode = this._toNode as ExtensionDeclaration;
+    ExtensionDeclaration toNode = _toNode as ExtensionDeclaration;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4455,7 +4453,7 @@
 
   @override
   bool visitExtensionOverride(ExtensionOverride node) {
-    ExtensionOverride toNode = this._toNode as ExtensionOverride;
+    ExtensionOverride toNode = _toNode as ExtensionOverride;
     return _and(
         _isEqualNodes(node.extensionName, toNode.extensionName),
         _isEqualNodes(node.typeArguments, toNode.typeArguments),
@@ -4464,8 +4462,9 @@
 
   @override
   bool visitFieldDeclaration(FieldDeclaration node) {
-    FieldDeclaration toNode = this._toNode as FieldDeclaration;
+    FieldDeclaration toNode = _toNode as FieldDeclaration;
     return _and(
+        _isEqualTokens(node.abstractKeyword, toNode.abstractKeyword),
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
         _isEqualTokens(node.staticKeyword, toNode.staticKeyword),
@@ -4475,7 +4474,7 @@
 
   @override
   bool visitFieldFormalParameter(FieldFormalParameter node) {
-    FieldFormalParameter toNode = this._toNode as FieldFormalParameter;
+    FieldFormalParameter toNode = _toNode as FieldFormalParameter;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4488,8 +4487,7 @@
 
   @override
   bool visitForEachPartsWithDeclaration(ForEachPartsWithDeclaration node) {
-    ForEachPartsWithDeclaration toNode =
-        this._toNode as ForEachPartsWithDeclaration;
+    ForEachPartsWithDeclaration toNode = _toNode as ForEachPartsWithDeclaration;
     return _and(
         _isEqualNodes(node.loopVariable, toNode.loopVariable),
         _isEqualTokens(node.inKeyword, toNode.inKeyword),
@@ -4498,8 +4496,7 @@
 
   @override
   bool visitForEachPartsWithIdentifier(ForEachPartsWithIdentifier node) {
-    ForEachPartsWithIdentifier toNode =
-        this._toNode as ForEachPartsWithIdentifier;
+    ForEachPartsWithIdentifier toNode = _toNode as ForEachPartsWithIdentifier;
     return _and(
         _isEqualNodes(node.identifier, toNode.identifier),
         _isEqualTokens(node.inKeyword, toNode.inKeyword),
@@ -4508,7 +4505,7 @@
 
   @override
   bool visitForElement(ForElement node) {
-    ForElement toNode = this._toNode as ForElement;
+    ForElement toNode = _toNode as ForElement;
     return _and(
         _isEqualTokens(node.awaitKeyword, toNode.awaitKeyword),
         _isEqualTokens(node.forKeyword, toNode.forKeyword),
@@ -4520,7 +4517,7 @@
 
   @override
   bool visitFormalParameterList(FormalParameterList node) {
-    FormalParameterList toNode = this._toNode as FormalParameterList;
+    FormalParameterList toNode = _toNode as FormalParameterList;
     return _and(
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
         _isEqualNodeLists(node.parameters, toNode.parameters),
@@ -4531,7 +4528,7 @@
 
   @override
   bool visitForPartsWithDeclarations(ForPartsWithDeclarations node) {
-    ForPartsWithDeclarations toNode = this._toNode as ForPartsWithDeclarations;
+    ForPartsWithDeclarations toNode = _toNode as ForPartsWithDeclarations;
     return _and(
         _isEqualNodes(node.variables, toNode.variables),
         _isEqualTokens(node.leftSeparator, toNode.leftSeparator),
@@ -4542,7 +4539,7 @@
 
   @override
   bool visitForPartsWithExpression(ForPartsWithExpression node) {
-    ForPartsWithExpression toNode = this._toNode as ForPartsWithExpression;
+    ForPartsWithExpression toNode = _toNode as ForPartsWithExpression;
     return _and(
         _isEqualNodes(node.initialization, toNode.initialization),
         _isEqualTokens(node.leftSeparator, toNode.leftSeparator),
@@ -4553,7 +4550,7 @@
 
   @override
   bool visitForStatement(ForStatement node) {
-    ForStatement toNode = this._toNode as ForStatement;
+    ForStatement toNode = _toNode as ForStatement;
     return _and(
         _isEqualTokens(node.awaitKeyword, toNode.awaitKeyword),
         _isEqualTokens(node.forKeyword, toNode.forKeyword),
@@ -4565,7 +4562,7 @@
 
   @override
   bool visitFunctionDeclaration(FunctionDeclaration node) {
-    FunctionDeclaration toNode = this._toNode as FunctionDeclaration;
+    FunctionDeclaration toNode = _toNode as FunctionDeclaration;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4579,13 +4576,13 @@
   @override
   bool visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
     FunctionDeclarationStatement toNode =
-        this._toNode as FunctionDeclarationStatement;
+        _toNode as FunctionDeclarationStatement;
     return _isEqualNodes(node.functionDeclaration, toNode.functionDeclaration);
   }
 
   @override
   bool visitFunctionExpression(FunctionExpression node) {
-    FunctionExpressionImpl toNode = this._toNode as FunctionExpression;
+    FunctionExpressionImpl toNode = _toNode as FunctionExpression;
     if (_and(_isEqualNodes(node.parameters, toNode.parameters),
         _isEqualNodes(node.body, toNode.body))) {
       toNode.declaredElement = node.declaredElement;
@@ -4598,7 +4595,7 @@
   @override
   bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     FunctionExpressionInvocation toNode =
-        this._toNode as FunctionExpressionInvocation;
+        _toNode as FunctionExpressionInvocation;
     if (_and(
         _isEqualNodes(node.function, toNode.function),
         _isEqualNodes(node.typeArguments, toNode.typeArguments),
@@ -4613,7 +4610,7 @@
 
   @override
   bool visitFunctionTypeAlias(FunctionTypeAlias node) {
-    FunctionTypeAlias toNode = this._toNode as FunctionTypeAlias;
+    FunctionTypeAlias toNode = _toNode as FunctionTypeAlias;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4628,7 +4625,7 @@
   @override
   bool visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     FunctionTypedFormalParameter toNode =
-        this._toNode as FunctionTypedFormalParameter;
+        _toNode as FunctionTypedFormalParameter;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4639,7 +4636,7 @@
 
   @override
   bool visitGenericFunctionType(GenericFunctionType node) {
-    GenericFunctionTypeImpl toNode = this._toNode as GenericFunctionTypeImpl;
+    GenericFunctionTypeImpl toNode = _toNode as GenericFunctionTypeImpl;
     if (_and(
         _isEqualNodes(node.returnType, toNode.returnType),
         _isEqualTokens(node.functionKeyword, toNode.functionKeyword),
@@ -4654,7 +4651,7 @@
 
   @override
   bool visitGenericTypeAlias(GenericTypeAlias node) {
-    GenericTypeAliasImpl toNode = this._toNode as GenericTypeAliasImpl;
+    GenericTypeAliasImpl toNode = _toNode as GenericTypeAliasImpl;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4671,14 +4668,14 @@
 
   @override
   bool visitHideCombinator(HideCombinator node) {
-    HideCombinator toNode = this._toNode as HideCombinator;
+    HideCombinator toNode = _toNode as HideCombinator;
     return _and(_isEqualTokens(node.keyword, toNode.keyword),
         _isEqualNodeLists(node.hiddenNames, toNode.hiddenNames));
   }
 
   @override
   bool visitIfElement(IfElement node) {
-    IfElement toNode = this._toNode as IfElement;
+    IfElement toNode = _toNode as IfElement;
     return _and(
         _isEqualTokens(node.ifKeyword, toNode.ifKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
@@ -4691,7 +4688,7 @@
 
   @override
   bool visitIfStatement(IfStatement node) {
-    IfStatement toNode = this._toNode as IfStatement;
+    IfStatement toNode = _toNode as IfStatement;
     return _and(
         _isEqualTokens(node.ifKeyword, toNode.ifKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
@@ -4704,7 +4701,7 @@
 
   @override
   bool visitImplementsClause(ImplementsClause node) {
-    ImplementsClause toNode = this._toNode as ImplementsClause;
+    ImplementsClause toNode = _toNode as ImplementsClause;
     return _and(
         _isEqualTokens(node.implementsKeyword, toNode.implementsKeyword),
         _isEqualNodeLists(node.interfaces, toNode.interfaces));
@@ -4712,7 +4709,7 @@
 
   @override
   bool visitImportDirective(ImportDirective node) {
-    ImportDirective toNode = this._toNode as ImportDirective;
+    ImportDirective toNode = _toNode as ImportDirective;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4730,7 +4727,7 @@
 
   @override
   bool visitIndexExpression(IndexExpression node) {
-    IndexExpression toNode = this._toNode as IndexExpression;
+    IndexExpression toNode = _toNode as IndexExpression;
     if (_and(
         _isEqualNodes(node.target, toNode.target),
         _isEqualTokens(node.leftBracket, toNode.leftBracket),
@@ -4746,8 +4743,7 @@
 
   @override
   bool visitInstanceCreationExpression(InstanceCreationExpression node) {
-    InstanceCreationExpression toNode =
-        this._toNode as InstanceCreationExpression;
+    InstanceCreationExpression toNode = _toNode as InstanceCreationExpression;
     if (_and(
         _isEqualTokens(node.keyword, toNode.keyword),
         _isEqualNodes(node.constructorName, toNode.constructorName),
@@ -4760,7 +4756,7 @@
 
   @override
   bool visitIntegerLiteral(IntegerLiteral node) {
-    IntegerLiteral toNode = this._toNode as IntegerLiteral;
+    IntegerLiteral toNode = _toNode as IntegerLiteral;
     if (_and(_isEqualTokens(node.literal, toNode.literal),
         node.value == toNode.value)) {
       toNode.staticType = node.staticType;
@@ -4771,7 +4767,7 @@
 
   @override
   bool visitInterpolationExpression(InterpolationExpression node) {
-    InterpolationExpression toNode = this._toNode as InterpolationExpression;
+    InterpolationExpression toNode = _toNode as InterpolationExpression;
     return _and(
         _isEqualTokens(node.leftBracket, toNode.leftBracket),
         _isEqualNodes(node.expression, toNode.expression),
@@ -4780,14 +4776,14 @@
 
   @override
   bool visitInterpolationString(InterpolationString node) {
-    InterpolationString toNode = this._toNode as InterpolationString;
+    InterpolationString toNode = _toNode as InterpolationString;
     return _and(_isEqualTokens(node.contents, toNode.contents),
         node.value == toNode.value);
   }
 
   @override
   bool visitIsExpression(IsExpression node) {
-    IsExpression toNode = this._toNode as IsExpression;
+    IsExpression toNode = _toNode as IsExpression;
     if (_and(
         _isEqualNodes(node.expression, toNode.expression),
         _isEqualTokens(node.isOperator, toNode.isOperator),
@@ -4801,21 +4797,21 @@
 
   @override
   bool visitLabel(Label node) {
-    Label toNode = this._toNode as Label;
+    Label toNode = _toNode as Label;
     return _and(_isEqualNodes(node.label, toNode.label),
         _isEqualTokens(node.colon, toNode.colon));
   }
 
   @override
   bool visitLabeledStatement(LabeledStatement node) {
-    LabeledStatement toNode = this._toNode as LabeledStatement;
+    LabeledStatement toNode = _toNode as LabeledStatement;
     return _and(_isEqualNodeLists(node.labels, toNode.labels),
         _isEqualNodes(node.statement, toNode.statement));
   }
 
   @override
   bool visitLibraryDirective(LibraryDirective node) {
-    LibraryDirective toNode = this._toNode as LibraryDirective;
+    LibraryDirective toNode = _toNode as LibraryDirective;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4830,7 +4826,7 @@
 
   @override
   bool visitLibraryIdentifier(LibraryIdentifier node) {
-    LibraryIdentifier toNode = this._toNode as LibraryIdentifier;
+    LibraryIdentifier toNode = _toNode as LibraryIdentifier;
     if (_isEqualNodeLists(node.components, toNode.components)) {
       toNode.staticType = node.staticType;
       return true;
@@ -4840,7 +4836,7 @@
 
   @override
   bool visitListLiteral(ListLiteral node) {
-    ListLiteral toNode = this._toNode as ListLiteral;
+    ListLiteral toNode = _toNode as ListLiteral;
     if (_and(
         _isEqualTokens(node.constKeyword, toNode.constKeyword),
         _isEqualNodes(node.typeArguments, toNode.typeArguments),
@@ -4855,7 +4851,7 @@
 
   @override
   bool visitMapLiteralEntry(MapLiteralEntry node) {
-    MapLiteralEntry toNode = this._toNode as MapLiteralEntry;
+    MapLiteralEntry toNode = _toNode as MapLiteralEntry;
     return _and(
         _isEqualNodes(node.key, toNode.key),
         _isEqualTokens(node.separator, toNode.separator),
@@ -4864,7 +4860,7 @@
 
   @override
   bool visitMethodDeclaration(MethodDeclaration node) {
-    MethodDeclaration toNode = this._toNode as MethodDeclaration;
+    MethodDeclaration toNode = _toNode as MethodDeclaration;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4880,7 +4876,7 @@
 
   @override
   bool visitMethodInvocation(MethodInvocation node) {
-    MethodInvocation toNode = this._toNode as MethodInvocation;
+    MethodInvocation toNode = _toNode as MethodInvocation;
     if (_and(
         _isEqualNodes(node.target, toNode.target),
         _isEqualTokens(node.operator, toNode.operator),
@@ -4896,7 +4892,7 @@
 
   @override
   bool visitMixinDeclaration(MixinDeclaration node) {
-    MixinDeclaration toNode = this._toNode as MixinDeclaration;
+    MixinDeclaration toNode = _toNode as MixinDeclaration;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4912,7 +4908,7 @@
 
   @override
   bool visitNamedExpression(NamedExpression node) {
-    NamedExpression toNode = this._toNode as NamedExpression;
+    NamedExpression toNode = _toNode as NamedExpression;
     if (_and(_isEqualNodes(node.name, toNode.name),
         _isEqualNodes(node.expression, toNode.expression))) {
       toNode.staticType = node.staticType;
@@ -4923,14 +4919,14 @@
 
   @override
   bool visitNativeClause(NativeClause node) {
-    NativeClause toNode = this._toNode as NativeClause;
+    NativeClause toNode = _toNode as NativeClause;
     return _and(_isEqualTokens(node.nativeKeyword, toNode.nativeKeyword),
         _isEqualNodes(node.name, toNode.name));
   }
 
   @override
   bool visitNativeFunctionBody(NativeFunctionBody node) {
-    NativeFunctionBody toNode = this._toNode as NativeFunctionBody;
+    NativeFunctionBody toNode = _toNode as NativeFunctionBody;
     return _and(
         _isEqualTokens(node.nativeKeyword, toNode.nativeKeyword),
         _isEqualNodes(node.stringLiteral, toNode.stringLiteral),
@@ -4939,7 +4935,7 @@
 
   @override
   bool visitNullLiteral(NullLiteral node) {
-    NullLiteral toNode = this._toNode as NullLiteral;
+    NullLiteral toNode = _toNode as NullLiteral;
     if (_isEqualTokens(node.literal, toNode.literal)) {
       toNode.staticType = node.staticType;
       return true;
@@ -4949,7 +4945,7 @@
 
   @override
   bool visitOnClause(OnClause node) {
-    OnClause toNode = this._toNode as OnClause;
+    OnClause toNode = _toNode as OnClause;
     return _and(
         _isEqualTokens(node.onKeyword, toNode.onKeyword),
         _isEqualNodeLists(
@@ -4958,7 +4954,7 @@
 
   @override
   bool visitParenthesizedExpression(ParenthesizedExpression node) {
-    ParenthesizedExpression toNode = this._toNode as ParenthesizedExpression;
+    ParenthesizedExpression toNode = _toNode as ParenthesizedExpression;
     if (_and(
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
         _isEqualNodes(node.expression, toNode.expression),
@@ -4971,7 +4967,7 @@
 
   @override
   bool visitPartDirective(PartDirective node) {
-    PartDirective toNode = this._toNode as PartDirective;
+    PartDirective toNode = _toNode as PartDirective;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -4986,7 +4982,7 @@
 
   @override
   bool visitPartOfDirective(PartOfDirective node) {
-    PartOfDirective toNode = this._toNode as PartOfDirective;
+    PartOfDirective toNode = _toNode as PartOfDirective;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -5002,7 +4998,7 @@
 
   @override
   bool visitPostfixExpression(PostfixExpression node) {
-    PostfixExpression toNode = this._toNode as PostfixExpression;
+    PostfixExpression toNode = _toNode as PostfixExpression;
     if (_and(_isEqualNodes(node.operand, toNode.operand),
         _isEqualTokens(node.operator, toNode.operator))) {
       toNode.staticElement = node.staticElement;
@@ -5014,7 +5010,7 @@
 
   @override
   bool visitPrefixedIdentifier(PrefixedIdentifier node) {
-    PrefixedIdentifier toNode = this._toNode as PrefixedIdentifier;
+    PrefixedIdentifier toNode = _toNode as PrefixedIdentifier;
     if (_and(
         _isEqualNodes(node.prefix, toNode.prefix),
         _isEqualTokens(node.period, toNode.period),
@@ -5027,7 +5023,7 @@
 
   @override
   bool visitPrefixExpression(PrefixExpression node) {
-    PrefixExpression toNode = this._toNode as PrefixExpression;
+    PrefixExpression toNode = _toNode as PrefixExpression;
     if (_and(_isEqualTokens(node.operator, toNode.operator),
         _isEqualNodes(node.operand, toNode.operand))) {
       toNode.staticElement = node.staticElement;
@@ -5039,7 +5035,7 @@
 
   @override
   bool visitPropertyAccess(PropertyAccess node) {
-    PropertyAccess toNode = this._toNode as PropertyAccess;
+    PropertyAccess toNode = _toNode as PropertyAccess;
     if (_and(
         _isEqualNodes(node.target, toNode.target),
         _isEqualTokens(node.operator, toNode.operator),
@@ -5054,7 +5050,7 @@
   bool visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     RedirectingConstructorInvocation toNode =
-        this._toNode as RedirectingConstructorInvocation;
+        _toNode as RedirectingConstructorInvocation;
     if (_and(
         _isEqualTokens(node.thisKeyword, toNode.thisKeyword),
         _isEqualTokens(node.period, toNode.period),
@@ -5068,7 +5064,7 @@
 
   @override
   bool visitRethrowExpression(RethrowExpression node) {
-    RethrowExpression toNode = this._toNode as RethrowExpression;
+    RethrowExpression toNode = _toNode as RethrowExpression;
     if (_isEqualTokens(node.rethrowKeyword, toNode.rethrowKeyword)) {
       toNode.staticType = node.staticType;
       return true;
@@ -5078,7 +5074,7 @@
 
   @override
   bool visitReturnStatement(ReturnStatement node) {
-    ReturnStatement toNode = this._toNode as ReturnStatement;
+    ReturnStatement toNode = _toNode as ReturnStatement;
     return _and(
         _isEqualTokens(node.returnKeyword, toNode.returnKeyword),
         _isEqualNodes(node.expression, toNode.expression),
@@ -5087,13 +5083,13 @@
 
   @override
   bool visitScriptTag(ScriptTag node) {
-    ScriptTag toNode = this._toNode as ScriptTag;
+    ScriptTag toNode = _toNode as ScriptTag;
     return _isEqualTokens(node.scriptTag, toNode.scriptTag);
   }
 
   @override
   bool visitSetOrMapLiteral(SetOrMapLiteral node) {
-    SetOrMapLiteral toNode = this._toNode as SetOrMapLiteral;
+    SetOrMapLiteral toNode = _toNode as SetOrMapLiteral;
     if (_and(
         _isEqualTokens(node.constKeyword, toNode.constKeyword),
         _isEqualNodes(node.typeArguments, toNode.typeArguments),
@@ -5108,14 +5104,14 @@
 
   @override
   bool visitShowCombinator(ShowCombinator node) {
-    ShowCombinator toNode = this._toNode as ShowCombinator;
+    ShowCombinator toNode = _toNode as ShowCombinator;
     return _and(_isEqualTokens(node.keyword, toNode.keyword),
         _isEqualNodeLists(node.shownNames, toNode.shownNames));
   }
 
   @override
   bool visitSimpleFormalParameter(SimpleFormalParameter node) {
-    SimpleFormalParameter toNode = this._toNode as SimpleFormalParameter;
+    SimpleFormalParameter toNode = _toNode as SimpleFormalParameter;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -5131,7 +5127,7 @@
 
   @override
   bool visitSimpleIdentifier(SimpleIdentifier node) {
-    SimpleIdentifier toNode = this._toNode as SimpleIdentifier;
+    SimpleIdentifier toNode = _toNode as SimpleIdentifier;
     if (_isEqualTokens(node.token, toNode.token)) {
       toNode.staticElement = node.staticElement;
       toNode.staticType = node.staticType;
@@ -5145,7 +5141,7 @@
 
   @override
   bool visitSimpleStringLiteral(SimpleStringLiteral node) {
-    SimpleStringLiteral toNode = this._toNode as SimpleStringLiteral;
+    SimpleStringLiteral toNode = _toNode as SimpleStringLiteral;
     if (_and(_isEqualTokens(node.literal, toNode.literal),
         node.value == toNode.value)) {
       toNode.staticType = node.staticType;
@@ -5156,14 +5152,14 @@
 
   @override
   bool visitSpreadElement(SpreadElement node) {
-    SpreadElement toNode = this._toNode as SpreadElement;
+    SpreadElement toNode = _toNode as SpreadElement;
     return _and(_isEqualTokens(node.spreadOperator, toNode.spreadOperator),
         _isEqualNodes(node.expression, toNode.expression));
   }
 
   @override
   bool visitStringInterpolation(StringInterpolation node) {
-    StringInterpolation toNode = this._toNode as StringInterpolation;
+    StringInterpolation toNode = _toNode as StringInterpolation;
     if (_isEqualNodeLists(node.elements, toNode.elements)) {
       toNode.staticType = node.staticType;
       return true;
@@ -5173,8 +5169,7 @@
 
   @override
   bool visitSuperConstructorInvocation(SuperConstructorInvocation node) {
-    SuperConstructorInvocation toNode =
-        this._toNode as SuperConstructorInvocation;
+    SuperConstructorInvocation toNode = _toNode as SuperConstructorInvocation;
     if (_and(
         _isEqualTokens(node.superKeyword, toNode.superKeyword),
         _isEqualTokens(node.period, toNode.period),
@@ -5188,7 +5183,7 @@
 
   @override
   bool visitSuperExpression(SuperExpression node) {
-    SuperExpression toNode = this._toNode as SuperExpression;
+    SuperExpression toNode = _toNode as SuperExpression;
     if (_isEqualTokens(node.superKeyword, toNode.superKeyword)) {
       toNode.staticType = node.staticType;
       return true;
@@ -5198,7 +5193,7 @@
 
   @override
   bool visitSwitchCase(SwitchCase node) {
-    SwitchCase toNode = this._toNode as SwitchCase;
+    SwitchCase toNode = _toNode as SwitchCase;
     return _and(
         _isEqualNodeLists(node.labels, toNode.labels),
         _isEqualTokens(node.keyword, toNode.keyword),
@@ -5209,7 +5204,7 @@
 
   @override
   bool visitSwitchDefault(SwitchDefault node) {
-    SwitchDefault toNode = this._toNode as SwitchDefault;
+    SwitchDefault toNode = _toNode as SwitchDefault;
     return _and(
         _isEqualNodeLists(node.labels, toNode.labels),
         _isEqualTokens(node.keyword, toNode.keyword),
@@ -5219,7 +5214,7 @@
 
   @override
   bool visitSwitchStatement(SwitchStatement node) {
-    SwitchStatement toNode = this._toNode as SwitchStatement;
+    SwitchStatement toNode = _toNode as SwitchStatement;
     return _and(
         _isEqualTokens(node.switchKeyword, toNode.switchKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
@@ -5232,7 +5227,7 @@
 
   @override
   bool visitSymbolLiteral(SymbolLiteral node) {
-    SymbolLiteral toNode = this._toNode as SymbolLiteral;
+    SymbolLiteral toNode = _toNode as SymbolLiteral;
     if (_and(_isEqualTokens(node.poundSign, toNode.poundSign),
         _isEqualTokenLists(node.components, toNode.components))) {
       toNode.staticType = node.staticType;
@@ -5243,7 +5238,7 @@
 
   @override
   bool visitThisExpression(ThisExpression node) {
-    ThisExpression toNode = this._toNode as ThisExpression;
+    ThisExpression toNode = _toNode as ThisExpression;
     if (_isEqualTokens(node.thisKeyword, toNode.thisKeyword)) {
       toNode.staticType = node.staticType;
       return true;
@@ -5253,7 +5248,7 @@
 
   @override
   bool visitThrowExpression(ThrowExpression node) {
-    ThrowExpression toNode = this._toNode as ThrowExpression;
+    ThrowExpression toNode = _toNode as ThrowExpression;
     if (_and(_isEqualTokens(node.throwKeyword, toNode.throwKeyword),
         _isEqualNodes(node.expression, toNode.expression))) {
       toNode.staticType = node.staticType;
@@ -5264,8 +5259,7 @@
 
   @override
   bool visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
-    TopLevelVariableDeclaration toNode =
-        this._toNode as TopLevelVariableDeclaration;
+    TopLevelVariableDeclaration toNode = _toNode as TopLevelVariableDeclaration;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -5275,7 +5269,7 @@
 
   @override
   bool visitTryStatement(TryStatement node) {
-    TryStatement toNode = this._toNode as TryStatement;
+    TryStatement toNode = _toNode as TryStatement;
     return _and(
         _isEqualTokens(node.tryKeyword, toNode.tryKeyword),
         _isEqualNodes(node.body, toNode.body),
@@ -5286,7 +5280,7 @@
 
   @override
   bool visitTypeArgumentList(TypeArgumentList node) {
-    TypeArgumentList toNode = this._toNode as TypeArgumentList;
+    TypeArgumentList toNode = _toNode as TypeArgumentList;
     return _and(
         _isEqualTokens(node.leftBracket, toNode.leftBracket),
         _isEqualNodeLists(node.arguments, toNode.arguments),
@@ -5295,7 +5289,7 @@
 
   @override
   bool visitTypeName(TypeName node) {
-    TypeName toNode = this._toNode as TypeName;
+    TypeName toNode = _toNode as TypeName;
     if (_and(
         _isEqualNodes(node.name, toNode.name),
         _isEqualNodes(node.typeArguments, toNode.typeArguments),
@@ -5308,7 +5302,7 @@
 
   @override
   bool visitTypeParameter(TypeParameter node) {
-    TypeParameter toNode = this._toNode as TypeParameter;
+    TypeParameter toNode = _toNode as TypeParameter;
     // TODO (kallentu) : Clean up TypeParameterImpl casting once variance is
     // added to the interface.
     return _and(
@@ -5323,7 +5317,7 @@
 
   @override
   bool visitTypeParameterList(TypeParameterList node) {
-    TypeParameterList toNode = this._toNode as TypeParameterList;
+    TypeParameterList toNode = _toNode as TypeParameterList;
     return _and(
         _isEqualTokens(node.leftBracket, toNode.leftBracket),
         _isEqualNodeLists(node.typeParameters, toNode.typeParameters),
@@ -5332,7 +5326,7 @@
 
   @override
   bool visitVariableDeclaration(VariableDeclaration node) {
-    VariableDeclaration toNode = this._toNode as VariableDeclaration;
+    VariableDeclaration toNode = _toNode as VariableDeclaration;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -5343,7 +5337,7 @@
 
   @override
   bool visitVariableDeclarationList(VariableDeclarationList node) {
-    VariableDeclarationList toNode = this._toNode as VariableDeclarationList;
+    VariableDeclarationList toNode = _toNode as VariableDeclarationList;
     return _and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -5355,14 +5349,14 @@
   @override
   bool visitVariableDeclarationStatement(VariableDeclarationStatement node) {
     VariableDeclarationStatement toNode =
-        this._toNode as VariableDeclarationStatement;
+        _toNode as VariableDeclarationStatement;
     return _and(_isEqualNodes(node.variables, toNode.variables),
         _isEqualTokens(node.semicolon, toNode.semicolon));
   }
 
   @override
   bool visitWhileStatement(WhileStatement node) {
-    WhileStatement toNode = this._toNode as WhileStatement;
+    WhileStatement toNode = _toNode as WhileStatement;
     return _and(
         _isEqualTokens(node.whileKeyword, toNode.whileKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
@@ -5373,14 +5367,14 @@
 
   @override
   bool visitWithClause(WithClause node) {
-    WithClause toNode = this._toNode as WithClause;
+    WithClause toNode = _toNode as WithClause;
     return _and(_isEqualTokens(node.withKeyword, toNode.withKeyword),
         _isEqualNodeLists(node.mixinTypes, toNode.mixinTypes));
   }
 
   @override
   bool visitYieldStatement(YieldStatement node) {
-    YieldStatement toNode = this._toNode as YieldStatement;
+    YieldStatement toNode = _toNode as YieldStatement;
     return _and(
         _isEqualTokens(node.yieldKeyword, toNode.yieldKeyword),
         _isEqualNodes(node.expression, toNode.expression),
@@ -5446,7 +5440,7 @@
     } else if (toNode == null) {
       return false;
     } else if (fromNode.runtimeType == toNode.runtimeType) {
-      this._toNode = toNode;
+      _toNode = toNode;
       return fromNode.accept(this);
     }
     //
@@ -5455,13 +5449,13 @@
     if (toNode is PrefixedIdentifier) {
       SimpleIdentifier prefix = toNode.prefix;
       if (fromNode.runtimeType == prefix.runtimeType) {
-        this._toNode = prefix;
+        _toNode = prefix;
         return fromNode.accept(this);
       }
     } else if (toNode is PropertyAccess) {
       Expression target = toNode.target;
       if (fromNode.runtimeType == target.runtimeType) {
-        this._toNode = target;
+        _toNode = target;
         return fromNode.accept(this);
       }
     }
diff --git a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
index 881e523..ffccab6 100644
--- a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
+++ b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
@@ -366,16 +366,12 @@
           identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM) ||
           identical(dataErrorCode,
               CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT) ||
-          identical(
-              dataErrorCode,
-              CheckedModeCompileTimeErrorCode
-                  .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH) ||
-          identical(
-              dataErrorCode,
-              CheckedModeCompileTimeErrorCode
-                  .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH) ||
           identical(dataErrorCode,
-              CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH)) {
+              CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH) ||
+          identical(dataErrorCode,
+              CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH) ||
+          identical(
+              dataErrorCode, CompileTimeErrorCode.VARIABLE_TYPE_MISMATCH)) {
         _errorReporter.reportError(data);
       } else if (errorCode != null) {
         _errorReporter.reportError(
@@ -795,7 +791,7 @@
   bool _validateListExpression(Expression expression, DartObjectImpl value) {
     if (!verifier._evaluationEngine.runtimeTypeMatch(value, listElementType)) {
       verifier._errorReporter.reportErrorForNode(
-        StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
+        CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
         expression,
         [value.type, listElementType],
       );
@@ -872,7 +868,7 @@
 
       if (!verifier._evaluationEngine.runtimeTypeMatch(keyValue, mapKeyType)) {
         verifier._errorReporter.reportErrorForNode(
-          StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+          CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
           keyExpression,
           [keyType, mapKeyType],
         );
@@ -902,7 +898,7 @@
       if (!verifier._evaluationEngine
           .runtimeTypeMatch(valueValue, mapValueType)) {
         verifier._errorReporter.reportErrorForNode(
-          StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+          CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
           valueExpression,
           [valueValue.type, mapValueType],
         );
@@ -950,7 +946,7 @@
   bool _validateSetExpression(Expression expression, DartObjectImpl value) {
     if (!verifier._evaluationEngine.runtimeTypeMatch(value, setElementType)) {
       verifier._errorReporter.reportErrorForNode(
-        StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
+        CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
         expression,
         [value.type, setElementType],
       );
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 40da2ac..9a4651c 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -229,10 +229,10 @@
         if (dartObject != null && constant.isConst) {
           if (!runtimeTypeMatch(dartObject, constant.type)) {
             // TODO(brianwilkerson) This should not be reported if
-            //  StaticTypeWarningCode.INVALID_ASSIGNMENT has already been
+            //  CompileTimeErrorCode.INVALID_ASSIGNMENT has already been
             //  reported (that is, if the static types are also wrong).
             errorReporter.reportErrorForNode(
-                CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
+                CompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
                 constantInitializer,
                 [dartObject.type, constant.type]);
           }
@@ -355,8 +355,7 @@
         if (defaultSuperInvocationNeeded) {
           // No explicit superconstructor invocation found, so we need to
           // manually insert a reference to the implicit superconstructor.
-          InterfaceType superclass =
-              (constant.returnType as InterfaceType).superclass;
+          InterfaceType superclass = constant.returnType.superclass;
           if (superclass != null && !superclass.isDartCoreObject) {
             ConstructorElement unnamedConstructor =
                 superclass.element.unnamedConstructor?.declaration;
@@ -476,7 +475,7 @@
     );
 
     constructor = followConstantRedirectionChain(constructor);
-    InterfaceType definingClass = constructor.returnType as InterfaceType;
+    InterfaceType definingClass = constructor.returnType;
     if (constructor.isFactory) {
       // We couldn't find a non-factory constructor.
       // See if it's because we reached an external const factory constructor
@@ -576,8 +575,7 @@
             FieldMember.from(field, constructor.returnType).type;
         if (fieldValue != null && !runtimeTypeMatch(fieldValue, fieldType)) {
           errorReporter.reportErrorForNode(
-              CheckedModeCompileTimeErrorCode
-                  .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+              CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
               node,
               [fieldValue.type, field.name, fieldType]);
         }
@@ -622,8 +620,7 @@
       if (argumentValue != null) {
         if (!runtimeTypeMatch(argumentValue, parameter.type)) {
           errorReporter.reportErrorForNode(
-              CheckedModeCompileTimeErrorCode
-                  .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+              CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
               errorTarget,
               [argumentValue.type, parameter.type]);
         }
@@ -637,8 +634,7 @@
               // the field.
               if (!runtimeTypeMatch(argumentValue, fieldType)) {
                 errorReporter.reportErrorForNode(
-                    CheckedModeCompileTimeErrorCode
-                        .CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+                    CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
                     errorTarget,
                     [argumentValue.type, fieldType]);
               }
@@ -681,8 +677,7 @@
             PropertyInducingElement field = getter.variable;
             if (!runtimeTypeMatch(evaluationResult, field.type)) {
               errorReporter.reportErrorForNode(
-                  CheckedModeCompileTimeErrorCode
-                      .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+                  CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
                   node,
                   [evaluationResult.type, fieldName, field.type]);
             }
@@ -979,8 +974,7 @@
     Substitution substitution,
   })  : _lexicalEnvironment = lexicalEnvironment,
         _substitution = substitution {
-    this._dartObjectComputer =
-        DartObjectComputer(_errorReporter, evaluationEngine);
+    _dartObjectComputer = DartObjectComputer(_errorReporter, evaluationEngine);
   }
 
   /// Return the object representing the state of active experiments.
@@ -2230,13 +2224,13 @@
   final DartObjectImpl value;
 
   EvaluationResultImpl(this.value, [List<AnalysisError> errors]) {
-    this._errors = errors ?? <AnalysisError>[];
+    _errors = errors ?? <AnalysisError>[];
   }
 
   List<AnalysisError> get errors => _errors;
 
   bool equalValues(TypeProvider typeProvider, EvaluationResultImpl result) {
-    if (this.value != null) {
+    if (value != null) {
       if (result.value == null) {
         return false;
       }
diff --git a/pkg/analyzer/lib/src/dart/constant/has_type_parameter_reference.dart b/pkg/analyzer/lib/src/dart/constant/has_type_parameter_reference.dart
index 0aa6243..30ae5e3 100644
--- a/pkg/analyzer/lib/src/dart/constant/has_type_parameter_reference.dart
+++ b/pkg/analyzer/lib/src/dart/constant/has_type_parameter_reference.dart
@@ -8,7 +8,7 @@
 /// Return `true` if the [type] has a type parameter reference.
 bool hasTypeParameterReference(DartType type) {
   var visitor = _ReferencesTypeParameterVisitor();
-  DartTypeVisitor.visit(type, visitor);
+  type.accept(visitor);
   return visitor.result;
 }
 
@@ -24,9 +24,6 @@
   bool result = false;
 
   @override
-  bool defaultDartType(_) => true;
-
-  @override
   bool visitTypeParameterType(_) {
     result = true;
     // Stop visiting at this point.
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
index e1529fc..3b51c9d 100644
--- a/pkg/analyzer/lib/src/dart/constant/value.dart
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -1157,7 +1157,7 @@
     if (value == null) {
       return UNKNOWN_VALUE;
     }
-    return DoubleState(-(value));
+    return DoubleState(-value);
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/element/class_hierarchy.dart b/pkg/analyzer/lib/src/dart/element/class_hierarchy.dart
index d5b6933..1f8e249 100644
--- a/pkg/analyzer/lib/src/dart/element/class_hierarchy.dart
+++ b/pkg/analyzer/lib/src/dart/element/class_hierarchy.dart
@@ -25,8 +25,7 @@
   }
 
   /// Remove hierarchies for classes defined in specified libraries.
-  void removeOfLibraries(Iterable<String> uriStrIterable) {
-    var uriStrSet = uriStrIterable.toSet();
+  void removeOfLibraries(Set<String> uriStrSet) {
     _map.removeWhere((element, _) {
       var uriStr = '${element.librarySource.uri}';
       return uriStrSet.contains(uriStr);
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 50d892a..a102215 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -10,21 +10,25 @@
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.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/constant/compute.dart';
 import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/display_string_builder.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/nullability_eliminator.dart';
+import 'package:analyzer/src/dart/element/scope.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_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/scope.dart'
+    show Namespace, NamespaceBuilder;
 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';
@@ -81,7 +85,7 @@
     for (PropertyAccessorElement accessor in accessors) {
       (accessor as PropertyAccessorElementImpl).enclosingElement = this;
     }
-    this._accessors = accessors;
+    _accessors = accessors;
   }
 
   @override
@@ -95,7 +99,7 @@
     for (FieldElement field in fields) {
       (field as FieldElementImpl).enclosingElement = this;
     }
-    this._fields = fields;
+    _fields = fields;
   }
 
   @override
@@ -593,7 +597,7 @@
     for (ConstructorElement constructor in constructors) {
       (constructor as ConstructorElementImpl).enclosingElement = this;
     }
-    this._constructors = constructors;
+    _constructors = constructors;
   }
 
   @override
@@ -927,7 +931,7 @@
     for (TypeParameterElement typeParameter in typeParameters) {
       (typeParameter as TypeParameterElementImpl).enclosingElement = this;
     }
-    this._typeParameterElements = typeParameters;
+    _typeParameterElements = typeParameters;
   }
 
   @override
@@ -1308,7 +1312,7 @@
     for (PropertyAccessorElement accessor in accessors) {
       (accessor as PropertyAccessorElementImpl).enclosingElement = this;
     }
-    this._accessors = accessors;
+    _accessors = accessors;
   }
 
   @override
@@ -1361,7 +1365,7 @@
     for (ClassElement enumDeclaration in enums) {
       (enumDeclaration as EnumElementImpl).enclosingElement = this;
     }
-    this._enums = enums;
+    _enums = enums;
   }
 
   @override
@@ -1398,7 +1402,7 @@
     for (ExtensionElement extension in extensions) {
       (extension as ExtensionElementImpl).enclosingElement = this;
     }
-    this._extensions = extensions;
+    _extensions = extensions;
   }
 
   @override
@@ -1429,7 +1433,7 @@
     for (FunctionElement function in functions) {
       (function as FunctionElementImpl).enclosingElement = this;
     }
-    this._functions = functions;
+    _functions = functions;
   }
 
   @override
@@ -1506,7 +1510,7 @@
     for (MixinElementImpl type in mixins) {
       type.enclosingElement = this;
     }
-    this._mixins = mixins;
+    _mixins = mixins;
   }
 
   @override
@@ -1526,7 +1530,7 @@
     for (TopLevelVariableElement field in variables) {
       (field as TopLevelVariableElementImpl).enclosingElement = this;
     }
-    this._variables = variables;
+    _variables = variables;
   }
 
   /// Set the function type aliases contained in this compilation unit to the
@@ -1535,7 +1539,7 @@
     for (FunctionTypeAliasElement typeAlias in typeAliases) {
       (typeAlias as ElementImpl).enclosingElement = this;
     }
-    this._typeAliases = typeAliases;
+    _typeAliases = typeAliases;
   }
 
   @override
@@ -1584,7 +1588,7 @@
         type.enclosingElement = this;
       }
     }
-    this._types = types;
+    _types = types;
   }
 
   @override
@@ -2143,7 +2147,7 @@
   }
 
   @override
-  DartType get returnType =>
+  InterfaceType get returnType =>
       ElementTypeProvider.current.getExecutableReturnType(this);
 
   @override
@@ -2152,15 +2156,8 @@
   }
 
   @override
-  DartType get returnTypeInternal {
-    if (_returnType != null) return _returnType;
-
-    InterfaceTypeImpl classThisType = enclosingElement.thisType;
-    return _returnType = InterfaceTypeImpl(
-      element: classThisType.element,
-      typeArguments: classThisType.typeArguments,
-      nullabilitySuffix: classThisType.nullabilitySuffix,
-    );
+  InterfaceType get returnTypeInternal {
+    return _returnType ??= enclosingElement.thisType;
   }
 
   @override
@@ -2647,8 +2644,8 @@
   /// [_nameOffset].
   ElementImpl(String name, this._nameOffset, {this.reference})
       : linkedNode = null {
-    this._name = StringUtilities.intern(name);
-    this.reference?.element = this;
+    _name = StringUtilities.intern(name);
+    reference?.element = this;
   }
 
   /// Initialize from linked node.
@@ -2973,7 +2970,7 @@
 
   /// Changes the name of this element.
   set name(String name) {
-    this._name = name;
+    _name = name;
   }
 
   @override
@@ -3207,17 +3204,17 @@
       components.insert(0, (ancestor as ElementImpl).identifier);
       ancestor = ancestor.enclosingElement;
     }
-    this._components = components;
+    _components = components;
   }
 
   /// Initialize a newly created location from the given [encoding].
   ElementLocationImpl.con2(String encoding) {
-    this._components = _decode(encoding);
+    _components = _decode(encoding);
   }
 
   /// Initialize a newly created location from the given [components].
   ElementLocationImpl.con3(List<String> components) {
-    this._components = components;
+    _components = components;
   }
 
   @override
@@ -3534,7 +3531,7 @@
     }
 
     // Build fields for all enum constants.
-    var containerRef = this.reference.getChild('@constant');
+    var containerRef = reference.getChild('@constant');
     var constants = linkedContext.getEnumConstants(linkedNode);
     for (var i = 0; i < constants.length; ++i) {
       var constant = constants[i];
@@ -3703,7 +3700,7 @@
     for (ParameterElement parameter in parameters) {
       (parameter as ParameterElementImpl).enclosingElement = this;
     }
-    this._parameters = parameters;
+    _parameters = parameters;
   }
 
   /// Gets the element's parameters, without going through the indirection of
@@ -3785,7 +3782,7 @@
     for (TypeParameterElement parameter in typeParameters) {
       (parameter as TypeParameterElementImpl).enclosingElement = this;
     }
-    this._typeParameterElements = typeParameters;
+    _typeParameterElements = typeParameters;
   }
 
   @override
@@ -4104,7 +4101,7 @@
     for (TypeParameterElement typeParameter in typeParameters) {
       (typeParameter as TypeParameterElementImpl).enclosingElement = this;
     }
-    this._typeParameterElements = typeParameters;
+    _typeParameterElements = typeParameters;
   }
 
   @override
@@ -4241,13 +4238,13 @@
     if (!linkedNode.isSynthetic) {
       var enclosingRef = enclosing.reference;
 
-      this.getter = PropertyAccessorElementImpl_ImplicitGetter(
+      getter = PropertyAccessorElementImpl_ImplicitGetter(
         this,
         reference: enclosingRef.getChild('@getter').getChild(name),
       );
 
       if (_hasSetter) {
-        this.setter = PropertyAccessorElementImpl_ImplicitSetter(
+        setter = PropertyAccessorElementImpl_ImplicitSetter(
           this,
           reference: enclosingRef.getChild('@setter').getChild(name),
         );
@@ -4272,6 +4269,14 @@
   FieldElement get declaration => this;
 
   @override
+  bool get isAbstract {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isAbstract(linkedNode);
+    }
+    return hasModifier(Modifier.ABSTRACT);
+  }
+
+  @override
   bool get isCovariant {
     if (linkedNode != null) {
       return linkedContext.isExplicitlyCovariant(linkedNode);
@@ -4406,7 +4411,7 @@
   @override
   String get identifier {
     String identifier = super.identifier;
-    Element enclosing = this.enclosingElement;
+    Element enclosing = enclosingElement;
     if (enclosing is ExecutableElement) {
       identifier += "@$nameOffset";
     }
@@ -4518,7 +4523,7 @@
     for (ParameterElement parameter in parameters) {
       (parameter as ParameterElementImpl).enclosingElement = this;
     }
-    this._parameters = parameters;
+    _parameters = parameters;
   }
 
   @override
@@ -4583,7 +4588,7 @@
     for (TypeParameterElement parameter in typeParameters) {
       (parameter as TypeParameterElementImpl).enclosingElement = this;
     }
-    this._typeParameterElements = typeParameters;
+    _typeParameterElements = typeParameters;
   }
 
   @override
@@ -4789,7 +4794,7 @@
     for (TypeParameterElement typeParameter in typeParameters) {
       (typeParameter as TypeParameterElementImpl).enclosingElement = this;
     }
-    this._typeParameterElements = typeParameters;
+    _typeParameterElements = typeParameters;
   }
 
   @override
@@ -5215,6 +5220,9 @@
   /// The cached list of prefixes.
   List<PrefixElement> _prefixes;
 
+  /// The scope of this library, `null` if it has not been created yet.
+  LibraryScope _scope;
+
   /// Initialize a newly created library element in the given [context] to have
   /// the given [name] and [offset].
   LibraryElementImpl(this.context, this.session, String name, int offset,
@@ -5268,7 +5276,7 @@
   set definingCompilationUnit(CompilationUnitElement unit) {
     assert((unit as CompilationUnitElementImpl).librarySource == unit.source);
     (unit as CompilationUnitElementImpl).enclosingElement = this;
-    this._definingCompilationUnit = unit;
+    _definingCompilationUnit = unit;
   }
 
   @override
@@ -5349,7 +5357,7 @@
     for (ExportElement exportElement in exports) {
       (exportElement as ExportElementImpl).enclosingElement = this;
     }
-    this._exports = exports;
+    _exports = exports;
   }
 
   @override
@@ -5441,8 +5449,8 @@
         prefix.enclosingElement = this;
       }
     }
-    this._imports = imports;
-    this._prefixes = null;
+    _imports = imports;
+    _prefixes = null;
   }
 
   @override
@@ -5565,7 +5573,7 @@
           source);
       (compilationUnit as CompilationUnitElementImpl).enclosingElement = this;
     }
-    this._parts = parts;
+    _parts = parts;
   }
 
   @override
@@ -5589,6 +5597,11 @@
   }
 
   @override
+  Scope get scope {
+    return _scope ??= LibraryScope(this);
+  }
+
+  @override
   Source get source {
     if (_definingCompilationUnit == null) {
       return null;
@@ -6556,7 +6569,7 @@
 
   /// Set Dart code of the default value.
   set defaultValueCode(String defaultValueCode) {
-    this._defaultValueCode = StringUtilities.intern(defaultValueCode);
+    _defaultValueCode = StringUtilities.intern(defaultValueCode);
   }
 
   @override
@@ -6675,8 +6688,7 @@
     if (_parameterKind != null) return _parameterKind;
 
     if (linkedNode != null) {
-      FormalParameter linkedNode = this.linkedNode;
-      // ignore: deprecated_member_use_from_same_package
+      var linkedNode = this.linkedNode as FormalParameterImpl;
       return linkedNode.kind;
     }
     return _parameterKind;
@@ -6715,7 +6727,7 @@
     for (ParameterElement parameter in parameters) {
       (parameter as ParameterElementImpl).enclosingElement = this;
     }
-    this._parameters = parameters;
+    _parameters = parameters;
   }
 
   @override
@@ -6760,7 +6772,7 @@
     for (TypeParameterElement parameter in typeParameters) {
       (parameter as TypeParameterElementImpl).enclosingElement = this;
     }
-    this._typeParameters = typeParameters;
+    _typeParameters = typeParameters;
   }
 
   @override
@@ -6898,36 +6910,28 @@
 /// [ParameterElement].
 mixin ParameterElementMixin implements ParameterElement {
   @override
-  bool get isNamed =>
-      parameterKind == ParameterKind.NAMED ||
-      parameterKind == ParameterKind.NAMED_REQUIRED;
+  bool get isNamed => parameterKind.isNamed;
 
   @override
-  bool get isNotOptional =>
-      parameterKind == ParameterKind.REQUIRED ||
-      parameterKind == ParameterKind.NAMED_REQUIRED;
+  bool get isNotOptional => parameterKind.isRequired;
 
   @override
-  bool get isOptional =>
-      parameterKind == ParameterKind.NAMED ||
-      parameterKind == ParameterKind.POSITIONAL;
+  bool get isOptional => parameterKind.isOptional;
 
   @override
-  bool get isOptionalNamed => parameterKind == ParameterKind.NAMED;
+  bool get isOptionalNamed => parameterKind.isOptionalNamed;
 
   @override
-  bool get isOptionalPositional => parameterKind == ParameterKind.POSITIONAL;
+  bool get isOptionalPositional => parameterKind.isOptionalPositional;
 
   @override
-  bool get isPositional =>
-      parameterKind == ParameterKind.POSITIONAL ||
-      parameterKind == ParameterKind.REQUIRED;
+  bool get isPositional => parameterKind.isPositional;
 
   @override
-  bool get isRequiredNamed => parameterKind == ParameterKind.NAMED_REQUIRED;
+  bool get isRequiredNamed => parameterKind.isRequiredNamed;
 
   @override
-  bool get isRequiredPositional => parameterKind == ParameterKind.REQUIRED;
+  bool get isRequiredPositional => parameterKind.isRequiredPositional;
 
   @override
   // Overridden to remove the 'deprecated' annotation.
@@ -6954,6 +6958,9 @@
 
 /// A concrete implementation of a [PrefixElement].
 class PrefixElementImpl extends ElementImpl implements PrefixElement {
+  /// The scope of this prefix, `null` if it has not been created yet.
+  PrefixScope _scope;
+
   /// Initialize a newly created method element to have the given [name] and
   /// [nameOffset].
   PrefixElementImpl(String name, int nameOffset) : super(name, nameOffset);
@@ -6989,6 +6996,9 @@
   }
 
   @override
+  Scope get scope => _scope ??= PrefixScope(enclosingElement, this);
+
+  @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitPrefixElement(this);
 
   @override
@@ -7018,6 +7028,7 @@
       {Reference reference})
       : super(variable.name, variable.nameOffset, reference: reference) {
     this.variable = variable;
+    isAbstract = variable is FieldElementImpl && variable.isAbstract;
     isStatic = variable.isStatic;
     isSynthetic = true;
   }
@@ -7420,13 +7431,13 @@
     if (!linkedNode.isSynthetic) {
       var enclosingRef = enclosing.reference;
 
-      this.getter = PropertyAccessorElementImpl_ImplicitGetter(
+      getter = PropertyAccessorElementImpl_ImplicitGetter(
         this,
         reference: enclosingRef.getChild('@getter').getChild(name),
       );
 
       if (_hasSetter) {
-        this.setter = PropertyAccessorElementImpl_ImplicitSetter(
+        setter = PropertyAccessorElementImpl_ImplicitSetter(
           this,
           reference: enclosingRef.getChild('@setter').getChild(name),
         );
@@ -7566,7 +7577,7 @@
   @override
   String get name {
     if (linkedNode != null) {
-      TypeParameter node = this.linkedNode;
+      TypeParameter node = linkedNode;
       return node.name.name;
     }
     return super.name;
@@ -7809,7 +7820,7 @@
     if (function != null) {
       (function as FunctionElementImpl).enclosingElement = this;
     }
-    this._initializer = function;
+    _initializer = function;
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/element/extensions.dart b/pkg/analyzer/lib/src/dart/element/extensions.dart
index 05bab210..ff2a475 100644
--- a/pkg/analyzer/lib/src/dart/element/extensions.dart
+++ b/pkg/analyzer/lib/src/dart/element/extensions.dart
@@ -14,7 +14,7 @@
       name,
       type ?? this.type,
       // ignore: deprecated_member_use_from_same_package
-      kind ?? this.parameterKind,
+      kind ?? parameterKind,
     )..isExplicitlyCovariant = isCovariant;
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart b/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
index 908d87c..52fab94 100644
--- a/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
+++ b/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
@@ -17,7 +17,8 @@
 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/error/codes.dart'
+    show CompileTimeErrorCode, HintCode;
 import 'package:meta/meta.dart';
 
 /// Tracks upper and lower type bounds for a set of type parameters.
@@ -164,7 +165,7 @@
     var knownTypes = <TypeParameterElement, DartType>{};
     for (int i = 0; i < typeFormals.length; i++) {
       TypeParameterElement typeParam = typeFormals[i];
-      var constraints = this._constraints[typeParam];
+      var constraints = _constraints[typeParam];
       var typeParamBound = typeParam.bound != null
           ? Substitution.fromPairs(typeFormals, inferredTypes)
               .substituteType(typeParam.bound)
@@ -187,7 +188,7 @@
       if (!success) {
         if (failAtError) return null;
         errorReporter?.reportErrorForNode(
-            StrongModeCode.COULD_NOT_INFER,
+            CompileTimeErrorCode.COULD_NOT_INFER,
             errorNode,
             [typeParam.name, _formatError(typeParam, inferred, constraints)]);
 
@@ -201,8 +202,8 @@
         if (failAtError) return null;
         var typeFormals = (inferred as FunctionType).typeFormals;
         var typeFormalsStr = typeFormals.map(_elementStr).join(', ');
-        errorReporter
-            ?.reportErrorForNode(StrongModeCode.COULD_NOT_INFER, errorNode, [
+        errorReporter?.reportErrorForNode(
+            CompileTimeErrorCode.COULD_NOT_INFER, errorNode, [
           typeParam.name,
           ' Inferred candidate type ${_typeStr(inferred)} has type parameters'
               ' [$typeFormalsStr], but a function with'
@@ -223,8 +224,13 @@
         // by [infer], with [typeParam] filled in as its bounds. This is
         // considered a failure of inference, under the "strict-inference"
         // mode.
-        if (errorNode is ConstructorName) {
-          String constructorName = '${errorNode.type}.${errorNode.name}';
+        if (errorNode is ConstructorName &&
+            !(errorNode.type.type as InterfaceType)
+                .element
+                .hasOptionalTypeArgs) {
+          String constructorName = errorNode.name == null
+              ? errorNode.type.name.name
+              : '${errorNode.type}.${errorNode.name}';
           errorReporter?.reportErrorForNode(
               HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION,
               errorNode,
@@ -248,8 +254,8 @@
         var typeParamBound = Substitution.fromPairs(typeFormals, inferredTypes)
             .substituteType(typeParam.bound ?? typeProvider.objectType);
         // TODO(jmesserly): improve this error message.
-        errorReporter
-            ?.reportErrorForNode(StrongModeCode.COULD_NOT_INFER, errorNode, [
+        errorReporter?.reportErrorForNode(
+            CompileTimeErrorCode.COULD_NOT_INFER, errorNode, [
           typeParam.name,
           "\nRecursive bound cannot be instantiated: '$typeParamBound'."
               "\nConsider passing explicit type argument(s) "
@@ -496,7 +502,7 @@
       var prefix = parts[0];
       var middle = parts[1];
       var prefixPad = ' ' * (prefixMax - prefix.length);
-      var middlePad = ' ' * (prefixMax);
+      var middlePad = ' ' * prefixMax;
       var end = "";
       if (parts.length > 2) {
         end = '\n  $middlePad ${parts[2]}';
diff --git a/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart b/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
index 16cb851..9189fad 100644
--- a/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
+++ b/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
@@ -307,6 +307,14 @@
     return interface._overridden[name];
   }
 
+  /// Remove interfaces for classes defined in specified libraries.
+  void removeOfLibraries(Set<String> uriStrSet) {
+    _interfaces.removeWhere((element, _) {
+      var uriStr = '${element.librarySource.uri}';
+      return uriStrSet.contains(uriStr);
+    });
+  }
+
   void _addCandidates({
     @required Map<Name, List<ExecutableElement>> namedCandidates,
     @required Substitution substitution,
@@ -890,7 +898,7 @@
   Name._internal(this.libraryUri, this.name, this.isPublic, this.hashCode);
 
   @override
-  bool operator ==(other) {
+  bool operator ==(Object other) {
     return other is Name &&
         name == other.name &&
         libraryUri == other.libraryUri;
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 c3720e9..c713b70 100644
--- a/pkg/analyzer/lib/src/dart/element/least_upper_bound.dart
+++ b/pkg/analyzer/lib/src/dart/element/least_upper_bound.dart
@@ -115,6 +115,11 @@
     return false;
   }
 
+  InstantiatedClass mapArguments(DartType Function(DartType) f) {
+    var mappedArguments = arguments.map(f).toList();
+    return InstantiatedClass(element, mappedArguments);
+  }
+
   @override
   String toString() {
     var buffer = StringBuffer();
@@ -232,6 +237,20 @@
     return result.withNullability(nullability);
   }
 
+  /// Return all of the superinterfaces of the given [type].
+  @visibleForTesting
+  Set<InstantiatedClass> computeSuperinterfaceSet(InstantiatedClass type) {
+    var result = <InstantiatedClass>{};
+    _addSuperinterfaces(result, type);
+    if (typeSystem.isNonNullableByDefault) {
+      return result;
+    } else {
+      return result.map((e) {
+        return e.mapArguments(typeSystem.toLegacyType);
+      }).toSet();
+    }
+  }
+
   /// Compute the least upper bound of types [i] and [j], both of which are
   /// known to be interface types.
   ///
@@ -265,15 +284,6 @@
     );
   }
 
-  /// Return all of the superinterfaces of the given [type].
-  @visibleForTesting
-  static Set<InstantiatedClass> computeSuperinterfaceSet(
-      InstantiatedClass type) {
-    var result = <InstantiatedClass>{};
-    _addSuperinterfaces(result, type);
-    return result;
-  }
-
   /// Add all of the superinterfaces of the given [type] to the given [set].
   static void _addSuperinterfaces(
       Set<InstantiatedClass> set, InstantiatedClass type) {
diff --git a/pkg/analyzer/lib/src/dart/element/member.dart b/pkg/analyzer/lib/src/dart/element/member.dart
index 7fccac1..8385169 100644
--- a/pkg/analyzer/lib/src/dart/element/member.dart
+++ b/pkg/analyzer/lib/src/dart/element/member.dart
@@ -84,6 +84,9 @@
   }
 
   @override
+  InterfaceType get returnType => type.returnType as InterfaceType;
+
+  @override
   T accept<T>(ElementVisitor<T> visitor) =>
       visitor.visitConstructorElement(this);
 
@@ -331,6 +334,9 @@
   }
 
   @override
+  bool get isAbstract => declaration.isAbstract;
+
+  @override
   bool get isCovariant => declaration.isCovariant;
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/element/nullability_eliminator.dart b/pkg/analyzer/lib/src/dart/element/nullability_eliminator.dart
index 6b7fa75..63e7084 100644
--- a/pkg/analyzer/lib/src/dart/element/nullability_eliminator.dart
+++ b/pkg/analyzer/lib/src/dart/element/nullability_eliminator.dart
@@ -5,7 +5,6 @@
 import 'package:analyzer/dart/element/nullability_suffix.dart';
 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_provider.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
@@ -15,7 +14,7 @@
   NullabilityEliminator(this._typeProvider);
 
   @override
-  DartType visitNeverType(NeverTypeImpl type) {
+  DartType visitNeverType(NeverType type) {
     return _typeProvider.nullStar;
   }
 
@@ -38,11 +37,12 @@
   /// If the [type] itself, or any of its components, has any nullability,
   /// return a new type with legacy nullability suffixes. Otherwise return the
   /// original instance.
-  static T perform<T extends DartType>(TypeProviderImpl typeProvider, T type) {
+  static DartType perform(TypeProviderImpl typeProvider, DartType type) {
     if (type == null) {
       return type;
     }
 
-    return NullabilityEliminator(typeProvider).visit(type) ?? type;
+    var visitor = NullabilityEliminator(typeProvider);
+    return type.accept<DartType>(visitor) ?? type;
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/element/replace_top_bottom_visitor.dart b/pkg/analyzer/lib/src/dart/element/replace_top_bottom_visitor.dart
new file mode 100644
index 0000000..7e5e457
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/element/replace_top_bottom_visitor.dart
@@ -0,0 +1,80 @@
+// 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/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/replacement_visitor.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
+import 'package:meta/meta.dart';
+
+/// Replace every "top" type in a covariant position with [_bottomType].
+/// Replace every "bottom" type in a contravariant position with [_topType].
+class ReplaceTopBottomVisitor extends ReplacementVisitor {
+  final DartType _topType;
+  final DartType _bottomType;
+  final TypeSystemImpl _typeSystem;
+
+  bool _isCovariant;
+
+  ReplaceTopBottomVisitor._(
+    this._typeSystem,
+    this._topType,
+    this._bottomType,
+    this._isCovariant,
+  );
+
+  @override
+  void changeVariance() {
+    _isCovariant = !_isCovariant;
+  }
+
+  @override
+  DartType visitDynamicType(DynamicType type) {
+    return _isCovariant ? _bottomType : null;
+  }
+
+  @override
+  DartType visitInterfaceType(InterfaceType type) {
+    if (_isCovariant) {
+      if (_typeSystem.isTop(type)) {
+        return _bottomType;
+      }
+    } else {
+      if (!_typeSystem.isNonNullableByDefault && type.isDartCoreNull) {
+        return _topType;
+      }
+    }
+
+    return super.visitInterfaceType(type);
+  }
+
+  @override
+  DartType visitNeverType(NeverType type) {
+    return _isCovariant ? null : _topType;
+  }
+
+  @override
+  DartType visitVoidType(VoidType type) {
+    return _isCovariant ? _bottomType : null;
+  }
+
+  /// Runs an instance of the visitor on the given [type] and returns the
+  /// resulting type.  If the type contains no instances of Top or Bottom, the
+  /// original type object is returned to avoid unnecessary allocation.
+  static DartType run({
+    @required DartType topType,
+    @required DartType bottomType,
+    @required TypeSystemImpl typeSystem,
+    @required DartType type,
+  }) {
+    var visitor = ReplaceTopBottomVisitor._(
+      typeSystem,
+      topType,
+      bottomType,
+      true,
+    );
+    var result = type.accept(visitor);
+    assert(visitor._isCovariant == true);
+    return result ?? type;
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/element/replacement_visitor.dart b/pkg/analyzer/lib/src/dart/element/replacement_visitor.dart
index 27566d1..c550ccd 100644
--- a/pkg/analyzer/lib/src/dart/element/replacement_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/element/replacement_visitor.dart
@@ -5,6 +5,7 @@
 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_visitor.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/extensions.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -12,13 +13,12 @@
 import 'package:analyzer/src/dart/element/type_schema.dart';
 import 'package:analyzer/src/dart/element/type_visitor.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
-import 'package:analyzer/src/summary2/function_type_builder.dart';
-import 'package:analyzer/src/summary2/named_type_builder.dart';
 import 'package:meta/meta.dart';
 
 /// Helper visitor that clones a type if a nested type is replaced, and
 /// otherwise returns `null`.
-class ReplacementVisitor implements DartTypeVisitor<DartType> {
+class ReplacementVisitor
+    implements TypeVisitor<DartType>, InferenceTypeVisitor<DartType> {
   const ReplacementVisitor();
 
   void changeVariance() {}
@@ -103,16 +103,7 @@
   }
 
   @override
-  DartType defaultDartType(DartType type) {
-    return null;
-  }
-
-  DartType visit(DartType type) {
-    return DartTypeVisitor.visit(type, this);
-  }
-
-  @override
-  DartType visitDynamicType(DynamicTypeImpl type) {
+  DartType visitDynamicType(DynamicType type) {
     return null;
   }
 
@@ -125,7 +116,7 @@
       var typeParameter = node.typeFormals[i];
       var bound = typeParameter.bound;
       if (bound != null) {
-        var newBound = visit(bound);
+        var newBound = bound.accept(this);
         if (newBound != null) {
           newTypeParameters ??= node.typeFormals.toList(growable: false);
           newTypeParameters[i] = TypeParameterElementImpl.synthetic(
@@ -160,7 +151,7 @@
 
     DartType visitType(DartType type) {
       if (type == null) return null;
-      var result = visit(type);
+      var result = type.accept(this);
       if (substitution != null) {
         result = substitution.substituteType(result ?? type);
       }
@@ -203,17 +194,12 @@
   }
 
   @override
-  DartType visitFunctionTypeBuilder(FunctionTypeBuilder type) {
-    throw UnimplementedError();
-  }
-
-  @override
   DartType visitInterfaceType(InterfaceType type) {
     var newNullability = visitNullability(type);
 
     List<DartType> newTypeArguments;
     for (var i = 0; i < type.typeArguments.length; i++) {
-      var substitution = visit(type.typeArguments[i]);
+      var substitution = type.typeArguments[i].accept(this);
       if (substitution != null) {
         newTypeArguments ??= type.typeArguments.toList(growable: false);
         newTypeArguments[i] = substitution;
@@ -228,12 +214,7 @@
   }
 
   @override
-  DartType visitNamedTypeBuilder(NamedTypeBuilder type) {
-    throw UnimplementedError();
-  }
-
-  @override
-  DartType visitNeverType(NeverTypeImpl type) {
+  DartType visitNeverType(NeverType type) {
     var newNullability = visitNullability(type);
 
     return createNeverType(
@@ -256,7 +237,7 @@
 
     var promotedBound = (type as TypeParameterTypeImpl).promotedBound;
     if (promotedBound != null) {
-      var newPromotedBound = visit(promotedBound);
+      var newPromotedBound = promotedBound.accept(this);
       return createPromotedTypeParameterType(
         type: type,
         newNullability: newNullability,
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 3f54b89..07be5ad 100644
--- a/pkg/analyzer/lib/src/dart/element/runtime_type_equality.dart
+++ b/pkg/analyzer/lib/src/dart/element/runtime_type_equality.dart
@@ -5,11 +5,11 @@
 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_visitor.dart';
 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';
 
 class RuntimeTypeEqualityHelper {
   final TypeSystemImpl _typeSystem;
@@ -23,24 +23,16 @@
   bool equal(DartType T1, DartType T2) {
     var N1 = _typeSystem.normalize(T1);
     var N2 = _typeSystem.normalize(T2);
-    return const RuntimeTypeEqualityVisitor().visit(N1, N2);
+    return N1.acceptWithArgument(const RuntimeTypeEqualityVisitor(), N2);
   }
 }
 
-class RuntimeTypeEqualityVisitor extends DartTypeVisitor1<bool, DartType> {
+class RuntimeTypeEqualityVisitor
+    extends TypeVisitorWithArgument<bool, DartType> {
   const RuntimeTypeEqualityVisitor();
 
   @override
-  bool defaultDartType(DartType T1, DartType T2) {
-    throw UnimplementedError('(${T1.runtimeType}) $T1');
-  }
-
-  bool visit(DartType T1, DartType T2) {
-    return DartTypeVisitor1.visit(T1, this, T2);
-  }
-
-  @override
-  bool visitDynamicType(DynamicTypeImpl T1, DartType T2) {
+  bool visitDynamicType(DynamicType T1, DartType T2) {
     return identical(T1, T2);
   }
 
@@ -55,7 +47,7 @@
       bool equal(DartType T1, DartType T2) {
         T1 = typeParameters.T1_substitution.substituteType(T1);
         T2 = typeParameters.T2_substitution.substituteType(T2);
-        return visit(T1, T2);
+        return T1.acceptWithArgument(this, T2);
       }
 
       if (!equal(T1.returnType, T2.returnType)) {
@@ -104,7 +96,7 @@
         for (var i = 0; i < T1_typeArguments.length; i++) {
           var T1_typeArgument = T1_typeArguments[i];
           var T2_typeArgument = T2_typeArguments[i];
-          if (!visit(T1_typeArgument, T2_typeArgument)) {
+          if (!T1_typeArgument.acceptWithArgument(this, T2_typeArgument)) {
             return false;
           }
         }
@@ -115,7 +107,7 @@
   }
 
   @override
-  bool visitNeverType(NeverTypeImpl T1, DartType T2) {
+  bool visitNeverType(NeverType T1, DartType T2) {
     // Note, that all types are normalized before this visitor.
     // So, `Never?` never happens, it is already `Null`.
     assert(T1.nullabilitySuffix != NullabilitySuffix.question);
@@ -181,7 +173,7 @@
       } else if (T1_bound != null && T2_bound != null) {
         T1_bound = T1_substitution.substituteType(T1_bound);
         T2_bound = T2_substitution.substituteType(T2_bound);
-        if (!visit(T1_bound, T2_bound)) {
+        if (!T1_bound.acceptWithArgument(this, T2_bound)) {
           return null;
         }
       } else {
diff --git a/pkg/analyzer/lib/src/dart/element/scope.dart b/pkg/analyzer/lib/src/dart/element/scope.dart
new file mode 100644
index 0000000..fa08358
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/element/scope.dart
@@ -0,0 +1,318 @@
+// 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/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart' as impl;
+import 'package:meta/meta.dart';
+
+/// The scope defined by a class.
+class ClassScope extends EnclosedScope {
+  ClassScope(Scope parent, ClassElement element) : super(parent) {
+    element.accessors.forEach(_addPropertyAccessor);
+    element.methods.forEach(_addGetter);
+  }
+}
+
+/// The scope for the initializers in a constructor.
+class ConstructorInitializerScope extends EnclosedScope {
+  ConstructorInitializerScope(Scope parent, ConstructorElement element)
+      : super(parent) {
+    element.parameters.forEach(_addGetter);
+  }
+}
+
+/// A scope that is lexically enclosed in another scope.
+class EnclosedScope implements Scope {
+  final Scope _parent;
+  final Map<String, Element> _getters = {};
+  final Map<String, Element> _setters = {};
+
+  EnclosedScope(Scope parent) : _parent = parent;
+
+  Scope get parent => _parent;
+
+  @Deprecated('Use lookup2() that is closer to the language specification')
+  @override
+  Element lookup({@required String id, @required bool setter}) {
+    var result = lookup2(id);
+    return setter ? result.setter : result.getter;
+  }
+
+  @override
+  ScopeLookupResult lookup2(String id) {
+    var getter = _getters[id];
+    var setter = _setters[id];
+    if (getter != null || setter != null) {
+      return ScopeLookupResult(getter, setter);
+    }
+
+    return _parent.lookup2(id);
+  }
+
+  void _addGetter(Element element) {
+    _addTo(_getters, element);
+  }
+
+  void _addPropertyAccessor(PropertyAccessorElement element) {
+    if (element.isGetter) {
+      _addGetter(element);
+    } else {
+      _addSetter(element);
+    }
+  }
+
+  void _addSetter(Element element) {
+    _addTo(_setters, element);
+  }
+
+  void _addTo(Map<String, Element> map, Element element) {
+    var id = element.displayName;
+    map[id] ??= element;
+  }
+}
+
+/// The scope defined by an extension.
+class ExtensionScope extends EnclosedScope {
+  ExtensionScope(
+    Scope parent,
+    ExtensionElement element,
+  ) : super(parent) {
+    element.accessors.forEach(_addPropertyAccessor);
+    element.methods.forEach(_addGetter);
+  }
+}
+
+class FormalParameterScope extends EnclosedScope {
+  FormalParameterScope(
+    Scope parent,
+    List<ParameterElement> elements,
+  ) : super(parent) {
+    for (var parameter in elements) {
+      if (parameter is! FieldFormalParameterElement) {
+        _addGetter(parameter);
+      }
+    }
+  }
+}
+
+class LibraryScope extends EnclosedScope {
+  final LibraryElement _element;
+  final List<ExtensionElement> extensions = [];
+
+  LibraryScope(LibraryElement element)
+      : _element = element,
+        super(_LibraryImportScope(element)) {
+    extensions.addAll((_parent as _LibraryImportScope).extensions);
+
+    _element.prefixes.forEach(_addGetter);
+    _element.units.forEach(_addUnitElements);
+  }
+
+  bool shouldIgnoreUndefined({
+    @required String prefix,
+    @required String name,
+  }) {
+    Iterable<NamespaceCombinator> getShowCombinators(
+        ImportElement importElement) {
+      return importElement.combinators.whereType<ShowElementCombinator>();
+    }
+
+    if (prefix != null) {
+      for (var importElement in _element.imports) {
+        if (importElement.prefix?.name == prefix &&
+            importElement.importedLibrary?.isSynthetic != false) {
+          var showCombinators = getShowCombinators(importElement);
+          if (showCombinators.isEmpty) {
+            return true;
+          }
+          for (ShowElementCombinator combinator in showCombinators) {
+            if (combinator.shownNames.contains(name)) {
+              return true;
+            }
+          }
+        }
+      }
+    } else {
+      // TODO(scheglov) merge for(s).
+      for (var importElement in _element.imports) {
+        if (importElement.prefix == null &&
+            importElement.importedLibrary?.isSynthetic != false) {
+          for (ShowElementCombinator combinator
+              in getShowCombinators(importElement)) {
+            if (combinator.shownNames.contains(name)) {
+              return true;
+            }
+          }
+        }
+      }
+    }
+
+    return false;
+  }
+
+  void _addExtension(ExtensionElement element) {
+    _addGetter(element);
+    if (!extensions.contains(element)) {
+      extensions.add(element);
+    }
+  }
+
+  void _addUnitElements(CompilationUnitElement compilationUnit) {
+    compilationUnit.accessors.forEach(_addPropertyAccessor);
+    compilationUnit.enums.forEach(_addGetter);
+    compilationUnit.extensions.forEach(_addExtension);
+    compilationUnit.functions.forEach(_addGetter);
+    compilationUnit.functionTypeAliases.forEach(_addGetter);
+    compilationUnit.mixins.forEach(_addGetter);
+    compilationUnit.types.forEach(_addGetter);
+  }
+}
+
+class LocalScope extends EnclosedScope {
+  LocalScope(Scope parent) : super(parent);
+
+  void add(Element element) {
+    _addGetter(element);
+  }
+}
+
+class PrefixScope implements Scope {
+  final LibraryElement _library;
+  final Map<String, Element> _getters = {};
+  final Map<String, Element> _setters = {};
+  final Set<ExtensionElement> _extensions = {};
+
+  PrefixScope(this._library, PrefixElement prefix) {
+    for (var import in _library.imports) {
+      if (import.prefix == prefix) {
+        var elements = impl.NamespaceBuilder().getImportedElements(import);
+        elements.forEach(_add);
+      }
+    }
+  }
+
+  @Deprecated('Use lookup2() that is closer to the language specification')
+  @override
+  Element lookup({@required String id, @required bool setter}) {
+    var result = lookup2(id);
+    return setter ? result.setter : result.getter;
+  }
+
+  @override
+  ScopeLookupResult lookup2(String id) {
+    var getter = _getters[id];
+    var setter = _setters[id];
+    return ScopeLookupResult(getter, setter);
+  }
+
+  void _add(Element element) {
+    if (element is PropertyAccessorElement && element.isSetter) {
+      _addTo(map: _setters, element: element);
+    } else {
+      _addTo(map: _getters, element: element);
+      if (element is ExtensionElement) {
+        _extensions.add(element);
+      }
+    }
+  }
+
+  void _addTo({
+    @required Map<String, Element> map,
+    @required Element element,
+  }) {
+    var id = element.displayName;
+
+    var existing = map[id];
+    if (existing != null && existing != element) {
+      map[id] = _merge(existing, element);
+      return;
+    }
+
+    map[id] = element;
+  }
+
+  Element _merge(Element existing, Element other) {
+    if (_isSdkElement(existing)) {
+      if (!_isSdkElement(other)) {
+        return other;
+      }
+    } else {
+      if (_isSdkElement(other)) {
+        return existing;
+      }
+    }
+
+    var conflictingElements = <Element>{};
+    _addElement(conflictingElements, existing);
+    _addElement(conflictingElements, other);
+
+    return MultiplyDefinedElementImpl(
+      _library.context,
+      _library.session,
+      conflictingElements.first.name,
+      conflictingElements.toList(),
+    );
+  }
+
+  static void _addElement(
+    Set<Element> conflictingElements,
+    Element element,
+  ) {
+    if (element is MultiplyDefinedElementImpl) {
+      conflictingElements.addAll(element.conflictingElements);
+    } else {
+      conflictingElements.add(element);
+    }
+  }
+
+  static bool _isSdkElement(Element element) {
+    if (element is DynamicElementImpl || element is NeverElementImpl) {
+      return true;
+    }
+    if (element is MultiplyDefinedElement) {
+      return false;
+    }
+    return element.library.isInSdk;
+  }
+}
+
+class TypeParameterScope extends EnclosedScope {
+  TypeParameterScope(
+    Scope parent,
+    List<TypeParameterElement> elements,
+  ) : super(parent) {
+    elements.forEach(_addGetter);
+  }
+}
+
+class _LibraryImportScope implements Scope {
+  final LibraryElement _library;
+  final PrefixScope _nullPrefixScope;
+  List<ExtensionElement> _extensions;
+
+  _LibraryImportScope(LibraryElement library)
+      : _library = library,
+        _nullPrefixScope = PrefixScope(library, null);
+
+  List<ExtensionElement> get extensions {
+    return _extensions ??= {
+      ..._nullPrefixScope._extensions,
+      for (var prefix in _library.prefixes)
+        ...(prefix.scope as PrefixScope)._extensions,
+    }.toList();
+  }
+
+  @Deprecated('Use lookup2() that is closer to the language specification')
+  @override
+  Element lookup({@required String id, @required bool setter}) {
+    throw UnimplementedError();
+  }
+
+  @override
+  ScopeLookupResult lookup2(String id) {
+    return _nullPrefixScope.lookup2(id);
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 8fd0cf4..84de8e0 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -9,7 +9,7 @@
 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_visitor.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/element/display_string_builder.dart';
 import 'package:analyzer/src/dart/element/element.dart';
@@ -69,18 +69,21 @@
   bool operator ==(Object object) => identical(object, this);
 
   @override
-  void appendTo(ElementDisplayStringBuilder builder) {
-    builder.writeDynamicType();
+  R accept<R>(TypeVisitor<R> visitor) {
+    return visitor.visitDynamicType(this);
   }
 
   @override
-  DartType replaceTopAndBottom(TypeProvider typeProvider,
-      {bool isCovariant = true}) {
-    if (isCovariant) {
-      return NeverTypeImpl.instance;
-    } else {
-      return this;
-    }
+  R acceptWithArgument<R, A>(
+    TypeVisitorWithArgument<R, A> visitor,
+    A argument,
+  ) {
+    return visitor.visitDynamicType(this, argument);
+  }
+
+  @override
+  void appendTo(ElementDisplayStringBuilder builder) {
+    builder.writeDynamicType();
   }
 
   @override
@@ -269,6 +272,19 @@
   }
 
   @override
+  R accept<R>(TypeVisitor<R> visitor) {
+    return visitor.visitFunctionType(this);
+  }
+
+  @override
+  R acceptWithArgument<R, A>(
+    TypeVisitorWithArgument<R, A> visitor,
+    A argument,
+  ) {
+    return visitor.visitFunctionType(this, argument);
+  }
+
+  @override
   void appendTo(ElementDisplayStringBuilder builder) {
     builder.writeFunctionType(this);
   }
@@ -300,33 +316,6 @@
   }
 
   @override
-  DartType replaceTopAndBottom(TypeProvider typeProvider,
-      {bool isCovariant = true}) {
-    var returnType = (this.returnType as TypeImpl)
-        .replaceTopAndBottom(typeProvider, isCovariant: isCovariant);
-    ParameterElement transformParameter(ParameterElement p) {
-      TypeImpl type = p.type;
-      var newType = type.replaceTopAndBottom(
-        typeProvider,
-        isCovariant: !isCovariant,
-      );
-      return p.copyWith(type: newType);
-    }
-
-    var parameters = _transformOrShare(this.parameters, transformParameter);
-    if (identical(returnType, this.returnType) &&
-        identical(parameters, this.parameters)) {
-      return this;
-    }
-    return FunctionTypeImpl(
-      typeFormals: typeFormals,
-      parameters: parameters,
-      returnType: returnType,
-      nullabilitySuffix: nullabilitySuffix,
-    );
-  }
-
-  @override
   @deprecated
   FunctionType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes) {
@@ -361,7 +350,7 @@
   }
 
   void _forEachParameterType(
-      ParameterKind kind, Function(String name, DartType type) callback) {
+      ParameterKind kind, void Function(String name, DartType type) callback) {
     for (var parameter in parameters) {
       // ignore: deprecated_member_use_from_same_package
       if (parameter.parameterKind == kind) {
@@ -706,6 +695,14 @@
   }
 
   @override
+  List<InterfaceType> get allSupertypes {
+    var substitution = Substitution.fromInterfaceType(this);
+    return element.allSupertypes
+        .map((t) => substitution.substituteType(t) as InterfaceType)
+        .toList();
+  }
+
+  @override
   List<ConstructorElement> get constructors {
     if (_constructors == null) {
       List<ConstructorElement> constructors = element.constructors;
@@ -874,24 +871,24 @@
   }
 
   @override
+  R accept<R>(TypeVisitor<R> visitor) {
+    return visitor.visitInterfaceType(this);
+  }
+
+  @override
+  R acceptWithArgument<R, A>(
+    TypeVisitorWithArgument<R, A> visitor,
+    A argument,
+  ) {
+    return visitor.visitInterfaceType(this, argument);
+  }
+
+  @override
   void appendTo(ElementDisplayStringBuilder builder) {
     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>`.
+  @override
   InterfaceType asInstanceOf(ClassElement targetElement) {
     if (element == targetElement) {
       return this;
@@ -1361,34 +1358,6 @@
   }
 
   @override
-  DartType replaceTopAndBottom(TypeProvider typeProvider,
-      {bool isCovariant = true}) {
-    // First check if this is actually an instance of Bottom
-    if (this.isDartCoreNull) {
-      if (isCovariant) {
-        return this;
-      } else {
-        return typeProvider.objectType;
-      }
-    }
-
-    // Otherwise, recurse over type arguments.
-    var typeArguments = _transformOrShare(
-        this.typeArguments,
-        (t) => (t as TypeImpl)
-            .replaceTopAndBottom(typeProvider, isCovariant: isCovariant));
-    if (identical(typeArguments, this.typeArguments)) {
-      return this;
-    } else {
-      return InterfaceTypeImpl(
-        element: element,
-        typeArguments: typeArguments,
-        nullabilitySuffix: nullabilitySuffix,
-      );
-    }
-  }
-
-  @override
   @deprecated
   InterfaceTypeImpl substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes) {
@@ -1663,7 +1632,7 @@
   int get hashCode => 0;
 
   @override
-  bool get isBottom => true;
+  bool get isBottom => nullabilitySuffix != NullabilitySuffix.question;
 
   @override
   bool get isDartCoreNull {
@@ -1679,26 +1648,21 @@
   bool operator ==(Object object) => identical(object, this);
 
   @override
-  void appendTo(ElementDisplayStringBuilder builder) {
-    builder.writeNeverType(this);
+  R accept<R>(TypeVisitor<R> visitor) {
+    return visitor.visitNeverType(this);
   }
 
   @override
-  DartType replaceTopAndBottom(TypeProvider typeProvider,
-      {bool isCovariant = true}) {
-    if (isCovariant) {
-      return this;
-    } else {
-      // In theory this should never happen, since we only need to do this
-      // replacement when checking super-boundedness of explicitly-specified
-      // types, or types produced by mixin inference or instantiate-to-bounds,
-      // and bottom can't occur in any of those cases.
-      assert(false,
-          'Attempted to check super-boundedness of a type including "bottom"');
-      // But just in case it does, return `dynamic` since that's similar to what
-      // we do with Null.
-      return typeProvider.objectType;
-    }
+  R acceptWithArgument<R, A>(
+    TypeVisitorWithArgument<R, A> visitor,
+    A argument,
+  ) {
+    return visitor.visitNeverType(this, argument);
+  }
+
+  @override
+  void appendTo(ElementDisplayStringBuilder builder) {
+    builder.writeNeverType(this);
   }
 
   @override
@@ -1808,6 +1772,9 @@
   void appendTo(ElementDisplayStringBuilder builder);
 
   @override
+  InterfaceType asInstanceOf(ClassElement element) => null;
+
+  @override
   String getDisplayString({
     bool skipAllDynamicArguments = false,
     bool withNullability = false,
@@ -1820,14 +1787,6 @@
     return builder.toString();
   }
 
-  /// Replaces all covariant occurrences of `dynamic`, `Object`, and `void` with
-  /// `Null` and all contravariant occurrences of `Null` with `Object`.
-  ///
-  /// The boolean `isCovariant` indicates whether this type is in covariant or
-  /// contravariant position.
-  DartType replaceTopAndBottom(TypeProvider typeProvider,
-      {bool isCovariant = true});
-
   @override
   DartType resolveToBound(DartType objectType) => this;
 
@@ -1928,6 +1887,25 @@
   @override
   int get hashCode => element.hashCode;
 
+  @override
+  bool get isBottom {
+    // In principle we ought to be able to do `return bound.isBottom;`, but that
+    // goes into an infinite loop with illegal code in which type parameter
+    // bounds form a loop.  So we have to be more careful.
+    Set<TypeParameterElement> seenTypes = {};
+    TypeParameterType type = this;
+    while (seenTypes.add(type.element)) {
+      var bound = type.bound;
+      if (bound is TypeParameterType) {
+        type = bound;
+      } else {
+        return bound.isBottom;
+      }
+    }
+    // Infinite loop.
+    return false;
+  }
+
   @Deprecated('Check element, or use getDisplayString()')
   @override
   String get name => element.name;
@@ -1951,14 +1929,26 @@
   }
 
   @override
+  R accept<R>(TypeVisitor<R> visitor) {
+    return visitor.visitTypeParameterType(this);
+  }
+
+  @override
+  R acceptWithArgument<R, A>(
+    TypeVisitorWithArgument<R, A> visitor,
+    A argument,
+  ) {
+    return visitor.visitTypeParameterType(this, argument);
+  }
+
+  @override
   void appendTo(ElementDisplayStringBuilder builder) {
     builder.writeTypeParameterType(this);
   }
 
   @override
-  DartType replaceTopAndBottom(TypeProvider typeProvider,
-      {bool isCovariant = true}) {
-    return this;
+  InterfaceType asInstanceOf(ClassElement element) {
+    return bound?.asInstanceOf(element);
   }
 
   @override
@@ -2087,18 +2077,21 @@
   bool operator ==(Object object) => identical(object, this);
 
   @override
-  void appendTo(ElementDisplayStringBuilder builder) {
-    builder.writeVoidType();
+  R accept<R>(TypeVisitor<R> visitor) {
+    return visitor.visitVoidType(this);
   }
 
   @override
-  DartType replaceTopAndBottom(TypeProvider typeProvider,
-      {bool isCovariant = true}) {
-    if (isCovariant) {
-      return typeProvider.nullType;
-    } else {
-      return this;
-    }
+  R acceptWithArgument<R, A>(
+    TypeVisitorWithArgument<R, A> visitor,
+    A argument,
+  ) {
+    return visitor.visitVoidType(this, argument);
+  }
+
+  @override
+  void appendTo(ElementDisplayStringBuilder builder) {
+    builder.writeVoidType();
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/element/type_algebra.dart b/pkg/analyzer/lib/src/dart/element/type_algebra.dart
index 648d60b..6d5bf1a 100644
--- a/pkg/analyzer/lib/src/dart/element/type_algebra.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_algebra.dart
@@ -5,6 +5,7 @@
 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_visitor.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/extensions.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -139,7 +140,8 @@
   DartType getSubstitute(TypeParameterElement parameter, bool upperBound);
 
   DartType substituteType(DartType type, {bool contravariant = false}) {
-    return _TopSubstitutor(this, contravariant).visit(type);
+    var visitor = _TopSubstitutor(this, contravariant);
+    return type.accept(visitor);
   }
 
   /// Substitutes both variables from [first] and [second], favoring those from
@@ -259,7 +261,7 @@
       var element = elements[i];
       if (element.bound != null) {
         TypeParameterElementImpl freshElement = freshElements[i];
-        freshElement.bound = visit(element.bound);
+        freshElement.bound = element.bound.accept(this);
       }
     }
 
@@ -331,7 +333,11 @@
   }
 }
 
-abstract class _TypeSubstitutor extends DartTypeVisitor<DartType> {
+abstract class _TypeSubstitutor
+    implements
+        TypeVisitor<DartType>,
+        InferenceTypeVisitor<DartType>,
+        LinkingTypeVisitor<DartType> {
   final _TypeSubstitutor outer;
   bool covariantContext = true;
 
@@ -382,12 +388,8 @@
     return _FreshTypeParametersSubstitutor(this);
   }
 
-  DartType visit(DartType type) {
-    return DartTypeVisitor.visit(type, this);
-  }
-
   @override
-  DartType visitDynamicType(DynamicTypeImpl type) => type;
+  DartType visitDynamicType(DynamicType type) => type;
 
   @override
   DartType visitFunctionType(FunctionType type) {
@@ -402,7 +404,7 @@
     // any uses, but does not tell if the resulting function type is distinct.
     // Our own use counter will get incremented if something from our
     // environment has been used inside the function.
-    int before = this.useCounter;
+    int before = useCounter;
 
     var inner = this;
     var typeFormals = type.typeFormals;
@@ -415,16 +417,16 @@
     inner.invertVariance();
 
     var parameters = type.parameters.map((parameter) {
-      var type = inner.visit(parameter.type);
+      var type = parameter.type.accept(inner);
       return parameter.copyWith(type: type);
     }).toList();
 
     inner.invertVariance();
 
-    var returnType = inner.visit(type.returnType);
-    var typeArguments = type.typeArguments.map(visit).toList();
+    var returnType = type.returnType.accept(inner);
+    var typeArguments = _mapList(type.typeArguments);
 
-    if (this.useCounter == before) return type;
+    if (useCounter == before) return type;
 
     return FunctionTypeImpl(
       typeFormals: typeFormals,
@@ -449,7 +451,7 @@
     // any uses, but does not tell if the resulting function type is distinct.
     // Our own use counter will get incremented if something from our
     // environment has been used inside the function.
-    int before = this.useCounter;
+    int before = useCounter;
 
     var inner = this;
     var typeFormals = type.typeFormals;
@@ -462,15 +464,15 @@
     inner.invertVariance();
 
     var parameters = type.parameters.map((parameter) {
-      var type = inner.visit(parameter.type);
+      var type = parameter.type.accept(inner);
       return parameter.copyWith(type: type);
     }).toList();
 
     inner.invertVariance();
 
-    var returnType = inner.visit(type.returnType);
+    var returnType = type.returnType.accept(inner);
 
-    if (this.useCounter == before) return type;
+    if (useCounter == before) return type;
 
     return FunctionTypeBuilder(
       typeFormals,
@@ -487,7 +489,7 @@
     }
 
     int before = useCounter;
-    var typeArguments = type.typeArguments.map(visit).toList();
+    var typeArguments = _mapList(type.typeArguments);
     if (useCounter == before) {
       return type;
     }
@@ -506,7 +508,7 @@
     }
 
     int before = useCounter;
-    var arguments = type.arguments.map(visit).toList();
+    var arguments = _mapList(type.arguments);
     if (useCounter == before) {
       return type;
     }
@@ -520,7 +522,7 @@
   }
 
   @override
-  DartType visitNeverType(NeverTypeImpl type) => type;
+  DartType visitNeverType(NeverType type) => type;
 
   @override
   DartType visitTypeParameterType(TypeParameterType type) {
@@ -541,6 +543,10 @@
   @override
   DartType visitVoidType(VoidType type) => type;
 
+  List<DartType> _mapList(List<DartType> types) {
+    return types.map((e) => e.accept(this)).toList();
+  }
+
   ///  1. Substituting T=X! into T! yields X!
   ///  2. Substituting T=X* into T! yields X*
   ///  3. Substituting T=X? into T! yields X?
diff --git a/pkg/analyzer/lib/src/dart/element/type_demotion.dart b/pkg/analyzer/lib/src/dart/element/type_demotion.dart
index 41a9e17..581f22b 100644
--- a/pkg/analyzer/lib/src/dart/element/type_demotion.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_demotion.dart
@@ -5,10 +5,10 @@
 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_visitor.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';
 
 /// Returns [type] in which all promoted type variables have been replace with
 /// their unpromoted equivalents, and, if [library] is non-nullable by default,
@@ -16,16 +16,18 @@
 DartType demoteType(LibraryElement library, DartType type) {
   if (library.isNonNullableByDefault) {
     var visitor = const _DemotionNonNullification();
-    return visitor.visit(type) ?? type;
+    return type.accept(visitor) ?? type;
   } else {
     var visitor = const _DemotionNonNullification(nonNullifyTypes: false);
-    return visitor.visit(type) ?? type;
+    return type.accept(visitor) ?? type;
   }
 }
 
 /// Returns `true` if type contains a promoted type variable.
 bool hasPromotedTypeVariable(DartType type) {
-  return const _HasPromotedTypeVariableVisitor()._visit(type);
+  return type.accept(
+    const _HasPromotedTypeVariableVisitor(),
+  );
 }
 
 /// Returns [type] in which all legacy types have been replaced with
@@ -33,7 +35,7 @@
 DartType nonNullifyType(TypeSystemImpl typeSystem, DartType type) {
   if (typeSystem.isNonNullableByDefault && type != null) {
     var visitor = const _DemotionNonNullification(demoteTypeVariables: false);
-    return visitor.visit(type) ?? type;
+    return type.accept(visitor) ?? type;
   }
   return type;
 }
@@ -81,20 +83,20 @@
 }
 
 /// Visitor that returns `true` if a type contains a promoted type variable.
-class _HasPromotedTypeVariableVisitor extends DartTypeVisitor<bool> {
+class _HasPromotedTypeVariableVisitor extends UnifyingTypeVisitor<bool> {
   const _HasPromotedTypeVariableVisitor();
 
   @override
-  bool defaultDartType(DartType type) => false;
+  bool visitDartType(DartType type) => false;
 
   @override
   bool visitFunctionType(FunctionType type) {
-    if (_visit(type.returnType)) {
+    if (type.returnType.accept(this)) {
       return true;
     }
 
     for (var parameter in type.parameters) {
-      if (_visit(parameter.type)) {
+      if (parameter.type.accept(this)) {
         return true;
       }
     }
@@ -105,7 +107,7 @@
   @override
   bool visitInterfaceType(InterfaceType type) {
     for (var typeArgument in type.typeArguments) {
-      if (_visit(typeArgument)) {
+      if (typeArgument.accept(this)) {
         return true;
       }
     }
@@ -116,8 +118,4 @@
   bool visitTypeParameterType(TypeParameterType type) {
     return (type as TypeParameterTypeImpl).promotedBound != null;
   }
-
-  bool _visit(DartType type) {
-    return DartTypeVisitor.visit(type, this);
-  }
 }
diff --git a/pkg/analyzer/lib/src/dart/element/type_provider.dart b/pkg/analyzer/lib/src/dart/element/type_provider.dart
index 724e63b..04e4051 100644
--- a/pkg/analyzer/lib/src/dart/element/type_provider.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_provider.dart
@@ -27,7 +27,7 @@
   @override
   bool isObjectGetter(String id) {
     PropertyAccessorElement element = objectType.element.getGetter(id);
-    return (element != null && !element.isStatic);
+    return element != null && !element.isStatic;
   }
 
   @override
@@ -38,7 +38,7 @@
   @override
   bool isObjectMethod(String id) {
     MethodElement element = objectType.element.getMethod(id);
-    return (element != null && !element.isStatic);
+    return element != null && !element.isStatic;
   }
 }
 
@@ -96,9 +96,6 @@
 
   InterfaceTypeImpl _nullStar;
 
-  InterfaceType _iterableForSetMapDisambiguation;
-  InterfaceType _mapForSetMapDisambiguation;
-
   Set<ClassElement> _nonSubtypableClasses;
 
   /// Initialize a newly created type provider to provide the types defined in
@@ -258,25 +255,6 @@
     return _iterableElement ??= _getClassElement(_coreLibrary, 'Iterable');
   }
 
-  /// Return the type that should be used during disambiguation between `Set`
-  /// and `Map` literals. If NNBD enabled, use `Iterable<Object?, Object?>`,
-  /// otherwise use `Iterable<Object*, Object*>*`.
-  InterfaceType get iterableForSetMapDisambiguation {
-    if (_iterableForSetMapDisambiguation == null) {
-      var objectType = objectElement.instantiate(
-        typeArguments: const [],
-        nullabilitySuffix: _questionOrStarSuffix,
-      );
-      _iterableForSetMapDisambiguation = iterableElement.instantiate(
-        typeArguments: [
-          objectType,
-        ],
-        nullabilitySuffix: _questionOrStarSuffix,
-      );
-    }
-    return _iterableForSetMapDisambiguation;
-  }
-
   @override
   InterfaceType get iterableObjectType {
     _iterableObjectType ??= InterfaceTypeImpl(
@@ -309,26 +287,6 @@
     return _mapElement ??= _getClassElement(_coreLibrary, 'Map');
   }
 
-  /// Return the type that should be used during disambiguation between `Set`
-  /// and `Map` literals. If NNBD enabled, use `Map<Object?, Object?>`,
-  /// otherwise use `Map<Object*, Object*>*`.
-  InterfaceType get mapForSetMapDisambiguation {
-    if (_mapForSetMapDisambiguation == null) {
-      var objectType = objectElement.instantiate(
-        typeArguments: const [],
-        nullabilitySuffix: _questionOrStarSuffix,
-      );
-      _mapForSetMapDisambiguation = mapElement.instantiate(
-        typeArguments: [
-          objectType,
-          objectType,
-        ],
-        nullabilitySuffix: _questionOrStarSuffix,
-      );
-    }
-    return _mapForSetMapDisambiguation;
-  }
-
   @override
   InterfaceType get mapObjectObjectType {
     _mapObjectObjectType ??= InterfaceTypeImpl(
@@ -491,12 +449,6 @@
     }
   }
 
-  NullabilitySuffix get _questionOrStarSuffix {
-    return isNonNullableByDefault
-        ? NullabilitySuffix.question
-        : NullabilitySuffix.star;
-  }
-
   @override
   InterfaceType futureOrType2(DartType valueType) {
     return futureOrElement.instantiate(
diff --git a/pkg/analyzer/lib/src/dart/element/type_schema.dart b/pkg/analyzer/lib/src/dart/element/type_schema.dart
index b94870c..1f4b6c4 100644
--- a/pkg/analyzer/lib/src/dart/element/type_schema.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_schema.dart
@@ -5,9 +5,10 @@
 import 'package:analyzer/dart/ast/token.dart' show Keyword;
 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_visitor.dart';
 import 'package:analyzer/src/dart/element/display_string_builder.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_visitor.dart';
 
 /// A type that is being inferred but is not currently known.
 ///
@@ -37,28 +38,34 @@
   bool operator ==(Object object) => identical(object, this);
 
   @override
-  void appendTo(ElementDisplayStringBuilder builder) {
-    builder.writeUnknownInferredType();
+  R accept<R>(TypeVisitor<R> visitor) {
+    if (visitor is InferenceTypeVisitor<R>) {
+      var visitor2 = visitor as InferenceTypeVisitor<R>;
+      return visitor2.visitUnknownInferredType(this);
+    } else {
+      throw StateError('Should not happen outside inference.');
+    }
   }
 
   @override
-  DartType replaceTopAndBottom(TypeProvider typeProvider,
-      {bool isCovariant = true}) {
-    // In theory this should never happen, since we only need to do this
-    // replacement when checking super-boundedness of explicitly-specified
-    // types, or types produced by mixin inference or instantiate-to-bounds, and
-    // the unknown type can't occur in any of those cases.
-    assert(
-        false, 'Attempted to check super-boundedness of a type including "_"');
-    // But just in case it does, behave similar to `dynamic`.
-    if (isCovariant) {
-      return typeProvider.nullType;
+  R acceptWithArgument<R, A>(
+    TypeVisitorWithArgument<R, A> visitor,
+    A argument,
+  ) {
+    if (visitor is InferenceTypeVisitor1<R, A>) {
+      var visitor2 = visitor as InferenceTypeVisitor1<R, A>;
+      return visitor2.visitUnknownInferredType(this, argument);
     } else {
-      return this;
+      throw StateError('Should not happen outside inference.');
     }
   }
 
   @override
+  void appendTo(ElementDisplayStringBuilder builder) {
+    builder.writeUnknownInferredType();
+  }
+
+  @override
   DartType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes) {
     int length = parameterTypes.length;
diff --git a/pkg/analyzer/lib/src/dart/element/type_schema_elimination.dart b/pkg/analyzer/lib/src/dart/element/type_schema_elimination.dart
index 9fd1240..56e772a5 100644
--- a/pkg/analyzer/lib/src/dart/element/type_schema_elimination.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_schema_elimination.dart
@@ -48,7 +48,7 @@
       bottomType,
       isLeastClosure,
     );
-    var result = visitor.visit(schema);
+    var result = schema.accept(visitor);
     assert(visitor._isLeastClosure == isLeastClosure);
     return result ?? schema;
   }
diff --git a/pkg/analyzer/lib/src/dart/element/type_system.dart b/pkg/analyzer/lib/src/dart/element/type_system.dart
index 27bef03..f01860f 100644
--- a/pkg/analyzer/lib/src/dart/element/type_system.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_system.dart
@@ -19,6 +19,7 @@
 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/replace_top_bottom_visitor.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';
@@ -90,6 +91,19 @@
     return type;
   }
 
+  DartType futureOrBase(DartType type) {
+    // If `T` is `FutureOr<S>` for some `S`,
+    // then `futureOrBase(T)` = `futureOrBase(S)`
+    if (type is InterfaceType && type.isDartAsyncFutureOr) {
+      return futureOrBase(
+        type.typeArguments[0],
+      );
+    }
+
+    // Otherwise `futureOrBase(T)` = `T`.
+    return type;
+  }
+
   List<InterfaceType> gatherMixinSupertypeConstraintsForInference(
       ClassElement mixinElement) {
     List<InterfaceType> candidates;
@@ -241,7 +255,16 @@
     var substitution = Substitution.fromPairs(typeParameters, inferredTypes);
 
     for (int i = 0; i < srcTypes.length; i++) {
-      if (substitution.substituteType(srcTypes[i]) != destTypes[i]) {
+      var srcType = substitution.substituteType(srcTypes[i]);
+      var destType = destTypes[i];
+      if (isNonNullableByDefault) {
+        // TODO(scheglov) waiting for the spec
+        // https://github.com/dart-lang/sdk/issues/42605
+      } else {
+        srcType = toLegacyType(srcType);
+        destType = toLegacyType(destType);
+      }
+      if (srcType != destType) {
         // Failed to find an appropriate substitution
         return null;
       }
@@ -250,30 +273,6 @@
     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
@@ -345,6 +344,11 @@
     return type;
   }
 
+  DartType toLegacyType(DartType type) {
+    if (isNonNullableByDefault) return type;
+    return NullabilityEliminator.perform(typeProvider, 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);
@@ -970,8 +974,10 @@
   /// 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;
+    if (type is NeverType) {
+      var result = type.nullabilitySuffix != NullabilitySuffix.question;
+      assert(type.isBottom == result);
+      return result;
     }
 
     // BOTTOM(X&T) is true iff BOTTOM(T)
@@ -979,16 +985,21 @@
     if (type is TypeParameterTypeImpl) {
       var T = type.promotedBound;
       if (T != null) {
-        return isBottom(T);
+        var result = isBottom(T);
+        assert(type.isBottom == result);
+        return result;
       }
 
       T = type.element.bound;
       if (T != null) {
-        return isBottom(T);
+        var result = isBottom(T);
+        assert(type.isBottom == result);
+        return result;
       }
     }
 
     // BOTTOM(T) is false otherwise
+    assert(!type.isBottom);
     return false;
   }
 
@@ -1420,6 +1431,27 @@
     return currentType;
   }
 
+  /// Replaces all covariant occurrences of `dynamic`, `void`, and `Object` or
+  /// `Object?` with `Null` or `Never` and all contravariant occurrences of
+  /// `Null` or `Never` with `Object` or `Object?`.
+  DartType replaceTopAndBottom(DartType dartType) {
+    if (isNonNullableByDefault) {
+      return ReplaceTopBottomVisitor.run(
+        topType: objectQuestion,
+        bottomType: NeverTypeImpl.instance,
+        typeSystem: this,
+        type: dartType,
+      );
+    } else {
+      return ReplaceTopBottomVisitor.run(
+        topType: DynamicTypeImpl.instance,
+        bottomType: typeProvider.nullType,
+        typeSystem: this,
+        type: dartType,
+      );
+    }
+  }
+
   /// Return `true` if runtime types [T1] and [T2] are equal.
   ///
   /// nnbd/feature-specification.md#runtime-type-equality-operator
@@ -1427,11 +1459,6 @@
     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].
   ///
diff --git a/pkg/analyzer/lib/src/dart/element/type_visitor.dart b/pkg/analyzer/lib/src/dart/element/type_visitor.dart
index 714fac0..a10644a 100644
--- a/pkg/analyzer/lib/src/dart/element/type_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_visitor.dart
@@ -3,145 +3,40 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/dart/element/type_visitor.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
 import 'package:analyzer/src/summary2/function_type_builder.dart';
 import 'package:analyzer/src/summary2/named_type_builder.dart';
 
-class DartTypeVisitor<R> {
-  const DartTypeVisitor();
-
-  R defaultDartType(DartType type) => null;
-
-  R visitDynamicType(DynamicTypeImpl type) => defaultDartType(type);
-
-  R visitFunctionType(FunctionType type) => defaultDartType(type);
-
-  R visitFunctionTypeBuilder(FunctionTypeBuilder type) => defaultDartType(type);
-
-  R visitInterfaceType(InterfaceType type) => defaultDartType(type);
-
-  R visitNamedTypeBuilder(NamedTypeBuilder type) => defaultDartType(type);
-
-  R visitNeverType(NeverTypeImpl type) => defaultDartType(type);
-
-  R visitTypeParameterType(TypeParameterType type) => defaultDartType(type);
-
-  R visitUnknownInferredType(UnknownInferredType type) => defaultDartType(type);
-
-  R visitVoidType(VoidType type) => defaultDartType(type);
-
-  static R visit<R>(DartType type, DartTypeVisitor<R> visitor) {
-    if (type is NeverTypeImpl) {
-      return visitor.visitNeverType(type);
-    }
-    if (type is DynamicTypeImpl) {
-      return visitor.visitDynamicType(type);
-    }
-    if (type is FunctionType) {
-      return visitor.visitFunctionType(type);
-    }
-    if (type is FunctionTypeBuilder) {
-      return visitor.visitFunctionTypeBuilder(type);
-    }
-    if (type is InterfaceType) {
-      return visitor.visitInterfaceType(type);
-    }
-    if (type is NamedTypeBuilder) {
-      return visitor.visitNamedTypeBuilder(type);
-    }
-    if (type is TypeParameterType) {
-      return visitor.visitTypeParameterType(type);
-    }
-    if (type is UnknownInferredType) {
-      return visitor.visitUnknownInferredType(type);
-    }
-    if (type is VoidType) {
-      return visitor.visitVoidType(type);
-    }
-    throw UnimplementedError('(${type.runtimeType}) $type');
-  }
+/// Visitors that implement this interface can be used to visit partially
+/// inferred types, during type inference.
+abstract class InferenceTypeVisitor<R> {
+  R visitUnknownInferredType(UnknownInferredType type);
 }
 
-class DartTypeVisitor1<R, T> {
-  const DartTypeVisitor1();
+/// Visitors that implement this interface can be used to visit partially
+/// inferred types, during type inference.
+abstract class InferenceTypeVisitor1<R, A> {
+  R visitUnknownInferredType(UnknownInferredType type, A argument);
+}
 
-  R defaultDartType(DartType type, T arg) => null;
+/// Visitors that implement this interface can be used to visit partially
+/// built types, during linking element model.
+abstract class LinkingTypeVisitor<R> {
+  R visitFunctionTypeBuilder(FunctionTypeBuilder type);
 
-  R visitDynamicType(DynamicTypeImpl type, T arg) {
-    return defaultDartType(type, arg);
-  }
-
-  R visitFunctionType(FunctionType type, T arg) {
-    return defaultDartType(type, arg);
-  }
-
-  R visitFunctionTypeBuilder(FunctionTypeBuilder type, T arg) {
-    return defaultDartType(type, arg);
-  }
-
-  R visitInterfaceType(InterfaceType type, T arg) {
-    return defaultDartType(type, arg);
-  }
-
-  R visitNamedTypeBuilder(NamedTypeBuilder type, T arg) {
-    return defaultDartType(type, arg);
-  }
-
-  R visitNeverType(NeverTypeImpl type, T arg) {
-    return defaultDartType(type, arg);
-  }
-
-  R visitTypeParameterType(TypeParameterType type, T arg) {
-    return defaultDartType(type, arg);
-  }
-
-  R visitUnknownInferredType(UnknownInferredType type, T arg) {
-    return defaultDartType(type, arg);
-  }
-
-  R visitVoidType(VoidType type, T arg) {
-    return defaultDartType(type, arg);
-  }
-
-  static R visit<R, T>(DartType type, DartTypeVisitor1<R, T> visitor, T arg) {
-    if (type is NeverTypeImpl) {
-      return visitor.visitNeverType(type, arg);
-    }
-    if (type is DynamicTypeImpl) {
-      return visitor.visitDynamicType(type, arg);
-    }
-    if (type is FunctionType) {
-      return visitor.visitFunctionType(type, arg);
-    }
-    if (type is FunctionTypeBuilder) {
-      return visitor.visitFunctionTypeBuilder(type, arg);
-    }
-    if (type is InterfaceType) {
-      return visitor.visitInterfaceType(type, arg);
-    }
-    if (type is NamedTypeBuilder) {
-      return visitor.visitNamedTypeBuilder(type, arg);
-    }
-    if (type is TypeParameterType) {
-      return visitor.visitTypeParameterType(type, arg);
-    }
-    if (type is UnknownInferredType) {
-      return visitor.visitUnknownInferredType(type, arg);
-    }
-    if (type is VoidType) {
-      return visitor.visitVoidType(type, arg);
-    }
-    throw UnimplementedError('(${type.runtimeType}) $type');
-  }
+  R visitNamedTypeBuilder(NamedTypeBuilder type);
 }
 
 /// Recursively visits a DartType tree until any visit method returns `false`.
-abstract class RecursiveTypeVisitor extends DartTypeVisitor<bool> {
+class RecursiveTypeVisitor extends UnifyingTypeVisitor<bool> {
   /// Visit each item in the list until one returns `false`, in which case, this
   /// will also return `false`.
   bool visitChildren(Iterable<DartType> types) =>
-      types.every((type) => DartTypeVisitor.visit(type, this));
+      types.every((type) => type.accept(this));
+
+  @override
+  bool visitDartType(DartType type) => true;
 
   @override
   bool visitFunctionType(FunctionType type) => visitChildren([
@@ -153,14 +48,12 @@
       ]);
 
   @override
-  bool visitFunctionTypeBuilder(FunctionTypeBuilder type) =>
-      throw StateError("Builders should not exist outside substitution.");
-
-  @override
   bool visitInterfaceType(InterfaceType type) =>
       visitChildren(type.typeArguments);
 
   @override
-  bool visitNamedTypeBuilder(NamedTypeBuilder type) =>
-      throw StateError("Builders should not exist outside substitution.");
+  bool visitTypeParameterType(TypeParameterType type) {
+    // TODO(scheglov) Should we visit the bound here?
+    return true;
+  }
 }
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index e96b66e..9645945 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -204,6 +204,13 @@
       hasPublishedDocs: true);
 
   /**
+   * `Function` should not be extended anymore.
+   */
+  static const HintCode DEPRECATED_EXTENDS_FUNCTION = HintCode(
+      'DEPRECATED_EXTENDS_FUNCTION', "Extending 'Function' is deprecated.",
+      correction: "Try removing 'Function' from the 'extends' clause.");
+
+  /**
    * Users should not create a class named `Function` anymore.
    */
   static const HintCode DEPRECATED_FUNCTION_CLASS_DECLARATION = HintCode(
@@ -212,13 +219,6 @@
       correction: "Try renaming the class.");
 
   /**
-   * `Function` should not be extended anymore.
-   */
-  static const HintCode DEPRECATED_EXTENDS_FUNCTION = HintCode(
-      'DEPRECATED_EXTENDS_FUNCTION', "Extending 'Function' is deprecated.",
-      correction: "Try removing 'Function' from the 'extends' clause.");
-
-  /**
    * Parameters:
    * 0: the name of the member
    */
@@ -323,6 +323,14 @@
       correction: "Try re-writing the expression to use the '~/' operator.");
 
   /**
+   * Duplicate hidden names.
+   */
+  static const HintCode DUPLICATE_HIDDEN_NAME =
+      HintCode('DUPLICATE_HIDDEN_NAME', "Duplicate hidden name.",
+          correction: "Try removing the repeated name from the list of hidden "
+              "members.");
+
+  /**
    * Duplicate imports.
    *
    * No parameters.
@@ -359,14 +367,6 @@
       hasPublishedDocs: true);
 
   /**
-   * Duplicate hidden names.
-   */
-  static const HintCode DUPLICATE_HIDDEN_NAME =
-      HintCode('DUPLICATE_HIDDEN_NAME', "Duplicate hidden name.",
-          correction: "Try removing the repeated name from the list of hidden "
-              "members.");
-
-  /**
    * Duplicate shown names.
    */
   static const HintCode DUPLICATE_SHOWN_NAME =
@@ -537,7 +537,7 @@
    */
   static const HintCode INFERENCE_FAILURE_ON_INSTANCE_CREATION = HintCode(
       'INFERENCE_FAILURE_ON_INSTANCE_CREATION',
-      "The type argument(s) of '{0}' can't be inferred.",
+      "The type argument(s) of the constructor '{0}' can't be inferred.",
       correction: "Use explicit type argument(s) for '{0}'.");
 
   /**
@@ -595,6 +595,157 @@
       'INVALID_IMMUTABLE_ANNOTATION',
       "Only classes can be annotated as being immutable.");
 
+  /// Invalid Dart language version comments don't follow the specification [1].
+  /// If a comment begins with "@dart" or "dart" (letters in any case),
+  /// followed by optional whitespace, followed by optional non-alphanumeric,
+  /// non-whitespace characters, followed by optional whitespace, followed by
+  /// an optional alphabetical character, followed by a digit, then the
+  /// comment is considered to be an attempt at a language version override
+  /// comment. If this attempted language version override comment is not a
+  /// valid language version override comment, it is reported.
+  ///
+  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN =
+      HintCodeWithUniqueName(
+          'INVALID_LANGUAGE_VERSION_OVERRIDE',
+          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN',
+          "The Dart language version override number must begin with '@dart'",
+          correction: "Specify a Dart language version override with a comment "
+              "like '// @dart = 2.0'.");
+
+  /// Invalid Dart language version comments don't follow the specification [1].
+  /// If a comment begins with "@dart" or "dart" (letters in any case),
+  /// followed by optional whitespace, followed by optional non-alphanumeric,
+  /// non-whitespace characters, followed by optional whitespace, followed by
+  /// an optional alphabetical character, followed by a digit, then the
+  /// comment is considered to be an attempt at a language version override
+  /// comment. If this attempted language version override comment is not a
+  /// valid language version override comment, it is reported.
+  ///
+  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS =
+      HintCodeWithUniqueName(
+          'INVALID_LANGUAGE_VERSION_OVERRIDE',
+          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS',
+          "The Dart language version override comment must be specified with "
+              "an '=' character",
+          correction: "Specify a Dart language version override with a comment "
+              "like '// @dart = 2.0'.");
+
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER =
+      HintCodeWithUniqueName(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    'INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER',
+    "The language version override can't specify a version greater than the "
+        "latest known language version: {0}.{1}",
+    correction: "Try removing the language version override.",
+  );
+
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION =
+      HintCodeWithUniqueName(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    'INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION',
+    "The language version override must be before any declaration or "
+        "directive.",
+    correction:
+        "Try moving the language version override to the top of the file.",
+  );
+
+  /// Invalid Dart language version comments don't follow the specification [1].
+  /// If a comment begins with "@dart" or "dart" (letters in any case),
+  /// followed by optional whitespace, followed by optional non-alphanumeric,
+  /// non-whitespace characters, followed by optional whitespace, followed by
+  /// an optional alphabetical character, followed by a digit, then the
+  /// comment is considered to be an attempt at a language version override
+  /// comment. If this attempted language version override comment is not a
+  /// valid language version override comment, it is reported.
+  ///
+  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE =
+      HintCodeWithUniqueName(
+          'INVALID_LANGUAGE_VERSION_OVERRIDE',
+          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE',
+          "The Dart language version override comment must be specified with "
+              "the word 'dart' in all lower case",
+          correction: "Specify a Dart language version override with a comment "
+              "like '// @dart = 2.0'.");
+
+  /// Invalid Dart language version comments don't follow the specification [1].
+  /// If a comment begins with "@dart" or "dart" (letters in any case),
+  /// followed by optional whitespace, followed by optional non-alphanumeric,
+  /// non-whitespace characters, followed by optional whitespace, followed by
+  /// an optional alphabetical character, followed by a digit, then the
+  /// comment is considered to be an attempt at a language version override
+  /// comment. If this attempted language version override comment is not a
+  /// valid language version override comment, it is reported.
+  ///
+  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER =
+      HintCodeWithUniqueName(
+          'INVALID_LANGUAGE_VERSION_OVERRIDE',
+          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER',
+          "The Dart language version override comment must be specified with a "
+              "version number, like '2.0', after the '=' character.",
+          correction: "Specify a Dart language version override with a comment "
+              "like '// @dart = 2.0'.");
+
+  /// Invalid Dart language version comments don't follow the specification [1].
+  /// If a comment begins with "@dart" or "dart" (letters in any case),
+  /// followed by optional whitespace, followed by optional non-alphanumeric,
+  /// non-whitespace characters, followed by optional whitespace, followed by
+  /// an optional alphabetical character, followed by a digit, then the
+  /// comment is considered to be an attempt at a language version override
+  /// comment. If this attempted language version override comment is not a
+  /// valid language version override comment, it is reported.
+  ///
+  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX =
+      HintCodeWithUniqueName(
+          'INVALID_LANGUAGE_VERSION_OVERRIDE',
+          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX',
+          "The Dart language version override number can't be prefixed with "
+              "a letter",
+          correction: "Specify a Dart language version override with a comment "
+              "like '// @dart = 2.0'.");
+
+  /// Invalid Dart language version comments don't follow the specification [1].
+  /// If a comment begins with "@dart" or "dart" (letters in any case),
+  /// followed by optional whitespace, followed by optional non-alphanumeric,
+  /// non-whitespace characters, followed by optional whitespace, followed by
+  /// an optional alphabetical character, followed by a digit, then the
+  /// comment is considered to be an attempt at a language version override
+  /// comment. If this attempted language version override comment is not a
+  /// valid language version override comment, it is reported.
+  ///
+  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS =
+      HintCodeWithUniqueName(
+          'INVALID_LANGUAGE_VERSION_OVERRIDE',
+          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS',
+          "The Dart language version override comment can't be followed by "
+              "any non-whitespace characters",
+          correction: "Specify a Dart language version override with a comment "
+              "like '// @dart = 2.0'.");
+
+  /// Invalid Dart language version comments don't follow the specification [1].
+  /// If a comment begins with "@dart" or "dart" (letters in any case),
+  /// followed by optional whitespace, followed by optional non-alphanumeric,
+  /// non-whitespace characters, followed by optional whitespace, followed by
+  /// an optional alphabetical character, followed by a digit, then the
+  /// comment is considered to be an attempt at a language version override
+  /// comment. If this attempted language version override comment is not a
+  /// valid language version override comment, it is reported.
+  ///
+  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES =
+      HintCodeWithUniqueName(
+          'INVALID_LANGUAGE_VERSION_OVERRIDE',
+          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES',
+          'The Dart language version override comment must be specified with '
+              'exactly two slashes.',
+          correction: "Specify a Dart language version override with a comment "
+              "like '// @dart = 2.0'.");
+
   /**
    * No parameters.
    */
@@ -790,157 +941,6 @@
       'INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER',
       "The member '{0}' can only be used within '{1}' or a test.");
 
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN =
-      HintCodeWithUniqueName(
-          'INVALID_LANGUAGE_VERSION_OVERRIDE',
-          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN',
-          "The Dart language version override number must begin with '@dart'",
-          correction: "Specify a Dart language version override with a comment "
-              "like '// @dart = 2.0'.");
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS =
-      HintCodeWithUniqueName(
-          'INVALID_LANGUAGE_VERSION_OVERRIDE',
-          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS',
-          "The Dart language version override comment must be specified with "
-              "an '=' character",
-          correction: "Specify a Dart language version override with a comment "
-              "like '// @dart = 2.0'.");
-
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER =
-      HintCodeWithUniqueName(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    'INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER',
-    "The language version override can't specify a version greater than the "
-        "latest known language version: {0}.{1}",
-    correction: "Try removing the language version override.",
-  );
-
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION =
-      HintCodeWithUniqueName(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    'INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION',
-    "The language version override must be before any declaration or "
-        "directive.",
-    correction:
-        "Try moving the language version override to the top of the file.",
-  );
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE =
-      HintCodeWithUniqueName(
-          'INVALID_LANGUAGE_VERSION_OVERRIDE',
-          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE',
-          "The Dart language version override comment must be specified with "
-              "the word 'dart' in all lower case",
-          correction: "Specify a Dart language version override with a comment "
-              "like '// @dart = 2.0'.");
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER =
-      HintCodeWithUniqueName(
-          'INVALID_LANGUAGE_VERSION_OVERRIDE',
-          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER',
-          "The Dart language version override comment must be specified with a "
-              "version number, like '2.0', after the '=' character.",
-          correction: "Specify a Dart language version override with a comment "
-              "like '// @dart = 2.0'.");
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX =
-      HintCodeWithUniqueName(
-          'INVALID_LANGUAGE_VERSION_OVERRIDE',
-          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX',
-          "The Dart language version override number can't be prefixed with "
-              "a letter",
-          correction: "Specify a Dart language version override with a comment "
-              "like '// @dart = 2.0'.");
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS =
-      HintCodeWithUniqueName(
-          'INVALID_LANGUAGE_VERSION_OVERRIDE',
-          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS',
-          "The Dart language version override comment can't be followed by "
-              "any non-whitespace characters",
-          correction: "Specify a Dart language version override with a comment "
-              "like '// @dart = 2.0'.");
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES =
-      HintCodeWithUniqueName(
-          'INVALID_LANGUAGE_VERSION_OVERRIDE',
-          'HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES',
-          'The Dart language version override comment must be specified with '
-              'exactly two slashes.',
-          correction: "Specify a Dart language version override with a comment "
-              "like '// @dart = 2.0'.");
-
   /**
    * This hint is generated anywhere where a private declaration is annotated
    * with `@visibleForTemplate` or `@visibleForTesting`.
@@ -1458,20 +1458,6 @@
       correction: "Try implementing 'hashCode'.");
 
   /**
-   * A getter with the override annotation does not override an existing getter.
-   *
-   * No parameters.
-   */
-  static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER =
-      HintCodeWithUniqueName(
-          'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
-          'HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER',
-          "The getter doesn't override an inherited getter.",
-          correction: "Try updating this class to match the superclass, or "
-              "removing the override annotation.",
-          hasPublishedDocs: true);
-
-  /**
    * A field with the override annotation does not override a getter or setter.
    *
    * No parameters.
@@ -1486,6 +1472,20 @@
           hasPublishedDocs: true);
 
   /**
+   * A getter with the override annotation does not override an existing getter.
+   *
+   * No parameters.
+   */
+  static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER =
+      HintCodeWithUniqueName(
+          'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
+          'HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER',
+          "The getter doesn't override an inherited getter.",
+          correction: "Try updating this class to match the superclass, or "
+              "removing the override annotation.",
+          hasPublishedDocs: true);
+
+  /**
    * A method with the override annotation does not override an existing method.
    *
    * No parameters.
@@ -1583,6 +1583,62 @@
    */
   // #### Description
   //
+  // The analyzer produces this diagnostic when an `as` expression inside a
+  // [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][] wasn't supported in earlier versions, so this code
+  // won't be able to run against earlier versions of the SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.3.2:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces
+  // this diagnostic:
+  //
+  // ```dart
+  // const num n = 3;
+  // const int i = [!n as int!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the expression to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.3.2 <2.4.0'
+  // ```
+  //
+  // 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 isn't in a [constant context][]:
+  //
+  // ```dart
+  // num x = 3;
+  // int y = x as int;
+  // ```
+  static const HintCode SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT = HintCode(
+      'SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT',
+      "The use of an as expression in a constant expression wasn't "
+          "supported until version 2.3.2, but this code is required to be able "
+          "to run on earlier versions.",
+      correction: "Try updating the SDK constraints.",
+      hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
   // The analyzer produces this diagnostic when either the class `Future` or
   // `Stream` is referenced in a library that doesn't import `dart:async` in
   // code that has an SDK constraint whose lower bound is less than 2.1.0. In
@@ -1638,10 +1694,10 @@
    */
   // #### Description
   //
-  // 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
+  // The analyzer produces this diagnostic when any use of the `&`, `|`, or `^`
+  // operators on the class `bool` inside a [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 [constant context][] wasn't supported in earlier
   // versions, so this code won't be able to run against earlier versions of the
   // SDK.
   //
@@ -1656,63 +1712,6 @@
   //   sdk: '>=2.1.0 <2.4.0'
   // ```
   //
-  // In the package that has that pubspec, code like the following produces
-  // this diagnostic:
-  //
-  // ```dart
-  // const num n = 3;
-  // const int i = [!n as int!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the expression to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.3.2 <2.4.0'
-  // ```
-  //
-  // 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 isn't in a [constant context](#constant-context):
-  //
-  // ```dart
-  // num x = 3;
-  // int y = x as int;
-  // ```
-  static const HintCode SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT',
-      "The use of an as expression in a constant expression wasn't "
-          "supported until version 2.3.2, but this code is required to be able "
-          "to run on earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // 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
-  // [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.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.3.2:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.1.0 <2.4.0'
-  // ```
-  //
   // In the package that has that pubspec, code like the following produces this
   // diagnostic:
   //
@@ -1734,7 +1733,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
-  // isn't in a [constant context](#constant-context):
+  // isn't in a [constant context][]:
   //
   // ```dart
   // const bool a = true;
@@ -1755,11 +1754,10 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when the operator `==` is used on a
-  // non-primitive type 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 this operator 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.
+  // non-primitive type inside a [constant context][] is found in code that has
+  // an SDK constraint whose lower bound is less than 2.3.2. Using this operator
+  // in a [constant context][] wasn't supported in earlier versions, so this
+  // code won't be able to run against earlier versions of the SDK.
   //
   // #### Examples
   //
@@ -1794,7 +1792,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 isn't in a [constant context](#constant-context):
+  // expression isn't in a [constant context][]:
   //
   // ```dart
   // class C {}
@@ -1934,11 +1932,10 @@
   // #### Description
   //
   // 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
-  // versions, so this code won't be able to run against earlier versions of the
-  // SDK.
+  // [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][] wasn't supported in earlier versions, so this code
+  // won't be able to run against earlier versions of the SDK.
   //
   // #### Examples
   //
@@ -1972,7 +1969,7 @@
   // If you need to support older versions of the SDK, then either rewrite the
   // 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):
+  // [constant context][]:
   //
   // ```dart
   // const x = 4;
@@ -1989,57 +1986,6 @@
   /**
    * No parameters.
    */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a set literal is found in code
-  // that has an SDK constraint whose lower bound is less than 2.2.0. Set
-  // literals weren't supported in earlier versions, so this code won't be able
-  // to run against earlier versions of the SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.2.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.1.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // var s = [!<int>{}!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the syntax to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.2.0 <2.4.0'
-  // ```
-  //
-  // If you do need to support older versions of the SDK, then replace the set
-  // literal with code that creates the set without the use of a literal:
-  //
-  // ```dart
-  // var s = new Set<int>();
-  // ```
-  static const HintCode SDK_VERSION_SET_LITERAL = HintCode(
-      'SDK_VERSION_SET_LITERAL',
-      "Set literals weren't supported until version 2.2, but this code is "
-          "required to be able to run on earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
   /* // #### Description
   //
   // The analyzer produces this diagnostic when a reference to the class `Never`
@@ -2094,6 +2040,57 @@
    */
   // #### Description
   //
+  // The analyzer produces this diagnostic when a set literal is found in code
+  // that has an SDK constraint whose lower bound is less than 2.2.0. Set
+  // literals weren't supported in earlier versions, so this code won't be able
+  // to run against earlier versions of the SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.2.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // var s = [!<int>{}!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the syntax to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.2.0 <2.4.0'
+  // ```
+  //
+  // If you do need to support older versions of the SDK, then replace the set
+  // literal with code that creates the set without the use of a literal:
+  //
+  // ```dart
+  // var s = new Set<int>();
+  // ```
+  static const HintCode SDK_VERSION_SET_LITERAL = HintCode(
+      'SDK_VERSION_SET_LITERAL',
+      "Set literals weren't supported until version 2.2, but this code is "
+          "required to be able to run on earlier versions.",
+      correction: "Try updating the SDK constraints.",
+      hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
   // The analyzer produces this diagnostic when a for, if, or spread element is
   // found in code that has an SDK constraint whose lower bound is less than
   // 2.3.0. Using a for, if, or spread element wasn't supported in earlier
@@ -2155,11 +2152,10 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when an if or spread element inside
-  // a [constant context](#constant-context) is found in code that has an
-  // SDK constraint whose lower bound is less than 2.5.0. Using an if or
-  // spread element inside 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.
+  // a [constant context][] is found in code that has an SDK constraint whose
+  // lower bound is less than 2.5.0. Using an if or spread element inside a
+  // [constant context][] wasn't supported in earlier versions, so this code
+  // won't be able to run against earlier versions of the SDK.
   //
   // #### Examples
   //
@@ -2199,7 +2195,7 @@
   // ```
   //
   // If that isn't possible, change the code so that the element isn't in a
-  // [constant context](#constant-context):
+  // [constant context][]:
   //
   // ```dart
   // const a = [1, 2];
@@ -2585,6 +2581,17 @@
 
   /**
    * Parameters:
+   * 0: the name of the parameter that is declared but not used
+   */
+  static const HintCode UNUSED_ELEMENT_PARAMETER = HintCodeWithUniqueName(
+      'UNUSED_ELEMENT',
+      'HintCode.UNUSED_ELEMENT_PARAMETER',
+      "A value for optional parameter '{0}' isn't ever given.",
+      correction: "Try removing the unused parameter.",
+      hasPublishedDocs: true);
+
+  /**
+   * Parameters:
    * 0: the name of the unused field
    */
   // #### Description
diff --git a/pkg/analyzer/lib/src/dart/error/lint_codes.dart b/pkg/analyzer/lib/src/dart/error/lint_codes.dart
index 313c98e..5b5e320 100644
--- a/pkg/analyzer/lib/src/dart/error/lint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/lint_codes.dart
@@ -32,7 +32,17 @@
   String get url => 'https://dart-lang.github.io/linter/lints/$name.html';
 
   @override
-  bool operator ==(other) => uniqueName == other.uniqueName;
+  bool operator ==(Object other) =>
+      other is LintCode && uniqueName == other.uniqueName;
+}
+
+class LintCodeWithUniqueName extends LintCode {
+  @override
+  final String uniqueName;
+
+  const LintCodeWithUniqueName(String name, this.uniqueName, String message,
+      {String correction})
+      : super(name, message, correction: correction);
 }
 
 /// Defines security-related best practice recommendations.
@@ -46,3 +56,13 @@
   @override
   bool get isIgnorable => false;
 }
+
+class SecurityLintCodeWithUniqueName extends SecurityLintCode {
+  @override
+  final String uniqueName;
+
+  const SecurityLintCodeWithUniqueName(
+      String name, this.uniqueName, String message,
+      {String correction})
+      : super(name, message, correction: correction);
+}
diff --git a/pkg/analyzer/lib/src/dart/micro/analysis_context.dart b/pkg/analyzer/lib/src/dart/micro/analysis_context.dart
index 2d3ee76..3a1a6253 100644
--- a/pkg/analyzer/lib/src/dart/micro/analysis_context.dart
+++ b/pkg/analyzer/lib/src/dart/micro/analysis_context.dart
@@ -115,7 +115,7 @@
     this.sourceFactory,
     this.resourceProvider, {
     Workspace workspace,
-  }) : this._workspace = workspace;
+  }) : _workspace = workspace;
 
   @override
   AnalysisOptionsImpl get analysisOptions {
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 60e8d0f..5d97366 100644
--- a/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart
@@ -23,15 +23,22 @@
   void put(String key, List<int> signature, List<int> bytes);
 }
 
+class CiderCacheEntry {
+  final List<int> signature;
+  final List<int> bytes;
+
+  CiderCacheEntry(this.signature, this.bytes);
+}
+
 class CiderMemoryByteStore implements CiderByteStore {
-  final Map<String, _CiderCacheEntry> _map = {};
+  final Map<String, CiderCacheEntry> _map = {};
 
   @override
   List<int> get(String key, List<int> signature) {
     var entry = _map[key];
 
     if (entry != null &&
-        const ListEquality().equals(entry.signature, signature)) {
+        const ListEquality<int>().equals(entry.signature, signature)) {
       return entry.bytes;
     }
     return null;
@@ -39,13 +46,6 @@
 
   @override
   void put(String key, List<int> signature, List<int> bytes) {
-    _map[key] = _CiderCacheEntry(signature, bytes);
+    _map[key] = CiderCacheEntry(signature, bytes);
   }
 }
-
-class _CiderCacheEntry {
-  final List<int> signature;
-  final List<int> bytes;
-
-  _CiderCacheEntry(this.signature, this.bytes);
-}
diff --git a/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart b/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart
index 44bc665f..a029dc9 100644
--- a/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart
@@ -24,7 +24,6 @@
 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';
@@ -70,7 +69,6 @@
 
   LibraryElement _libraryElement;
 
-  LibraryScope _libraryScope;
   final Map<FileState, LineInfo> _fileToLineInfo = {};
 
   final Map<FileState, IgnoreInfo> _fileToIgnoreInfo = {};
@@ -86,7 +84,7 @@
 
   final Set<ConstantEvaluationTarget> _constants = {};
 
-  final String Function(String path) getFileContent;
+  final String Function(FileState file) getFileContent;
 
   LibraryAnalyzer(
     this._analysisOptions,
@@ -118,25 +116,30 @@
     performance.run('parse', (performance) {
       for (FileState file in _library.libraryFiles) {
         if (completionPath == null || file.path == completionPath) {
-          units[file] = _parse(file);
+          units[file] = _parse(
+            file: file,
+            performance: performance,
+          );
         }
       }
     });
 
     // Resolve URIs in directives to corresponding sources.
-    FeatureSet featureSet = units[_library].featureSet;
+    FeatureSet featureSet = units.values.first.featureSet;
 
-    units.forEach((file, unit) {
-      _validateFeatureSet(unit, featureSet);
-      _resolveUriBasedDirectives(file, unit);
+    performance.run('resolveUriDirectives', (performance) {
+      units.forEach((file, unit) {
+        _validateFeatureSet(unit, featureSet);
+        _resolveUriBasedDirectives(file, unit);
+      });
     });
 
-    _libraryElement = _elementFactory.libraryOfUri(_library.uriStr);
-
-    _libraryScope = LibraryScope(_libraryElement);
+    performance.run('libraryElement', (performance) {
+      _libraryElement = _elementFactory.libraryOfUri(_library.uriStr);
+    });
 
     performance.run('resolveDirectives', (performance) {
-      _resolveDirectives(units);
+      _resolveDirectives(units, completionPath);
     });
 
     performance.run('resolveFiles', (performance) {
@@ -234,7 +237,7 @@
     if (_analysisOptions.lint) {
       performance.run('computeLints', (performance) {
         var allUnits = _library.libraryFiles.map((file) {
-          var content = _getFileContent(file.path);
+          var content = getFileContent(file);
           return LinterContextUnit(content, units[file]);
         }).toList();
         for (int i = 0; i < allUnits.length; i++) {
@@ -268,7 +271,7 @@
       unit.accept(Dart2JSVerifier(errorReporter));
     }
 
-    var content = _getFileContent(file.path);
+    var content = getFileContent(file);
     unit.accept(
       BestPracticesVerifier(
         errorReporter,
@@ -279,8 +282,8 @@
         declaredVariables: _declaredVariables,
         typeSystem: _typeSystem,
         inheritanceManager: _inheritance,
-        resourceProvider: _resourceProvider,
         analysisOptions: _context.analysisOptions,
+        workspacePackage: null, // TODO(scheglov) implement it
       ),
     );
 
@@ -450,15 +453,6 @@
     });
   }
 
-  /// Catch all exceptions from the `getFileContent` function.
-  String _getFileContent(String path) {
-    try {
-      return getFileContent(path);
-    } catch (_) {
-      return '';
-    }
-  }
-
   WorkspacePackage _getPackage(CompilationUnit unit) {
     final libraryPath = _library.source.fullName;
     Workspace workspace =
@@ -514,20 +508,35 @@
   }
 
   /// Return a  parsed unresolved [CompilationUnit].
-  CompilationUnit _parse(FileState file) {
-    AnalysisErrorListener errorListener = _getErrorListener(file);
-    String content = _getFileContent(file.path);
+  CompilationUnit _parse({
+    @required FileState file,
+    @required OperationPerformanceImpl performance,
+  }) {
+    String content = getFileContent(file);
 
+    performance.getDataInt('count').increment();
+    performance.getDataInt('length').add(content.length);
+
+    AnalysisErrorListener errorListener = _getErrorListener(file);
     CompilationUnit unit = file.parse(errorListener, content);
 
     LineInfo lineInfo = unit.lineInfo;
     _fileToLineInfo[file] = lineInfo;
-    _fileToIgnoreInfo[file] = IgnoreInfo.calculateIgnores(content, lineInfo);
+    _fileToIgnoreInfo[file] = IgnoreInfo.forDart(unit, content);
 
     return unit;
   }
 
-  void _resolveDirectives(Map<FileState, CompilationUnit> units) {
+  void _resolveDirectives(
+    Map<FileState, CompilationUnit> units,
+    String completionPath,
+  ) {
+    if (completionPath != null) {
+      var completionUnit = units.values.first;
+      completionUnit.element = _unitElementWithPath(completionPath);
+      return;
+    }
+
     CompilationUnit definingCompilationUnit = units[_library];
     definingCompilationUnit.element = _libraryElement.definingCompilationUnit;
 
@@ -616,7 +625,7 @@
                     [name]);
               } else if (libraryNameNode.name != name) {
                 libraryErrorReporter.reportErrorForNode(
-                    StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
+                    CompileTimeErrorCode.PART_OF_DIFFERENT_LIBRARY,
                     partUri,
                     [libraryNameNode.name, name]);
               }
@@ -624,7 +633,7 @@
               Source source = nameOrSource.source;
               if (source != _library.source) {
                 libraryErrorReporter.reportErrorForNode(
-                    StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
+                    CompileTimeErrorCode.PART_OF_DIFFERENT_LIBRARY,
                     partUri,
                     [_library.uriStr, source.uri]);
               }
@@ -677,14 +686,14 @@
         unitElement: unitElement,
         errorListener: errorListener,
         featureSet: unit.featureSet,
-        nameScope: _libraryScope,
+        nameScope: _libraryElement.scope,
         elementWalker: ElementWalker.forCompilationUnit(unitElement),
       ),
     );
 
     unit.accept(VariableResolverVisitor(
         _libraryElement, source, _typeProvider, errorListener,
-        nameScope: _libraryScope));
+        nameScope: _libraryElement.scope));
 
     // Nothing for RESOLVED_UNIT8?
     // Nothing for RESOLVED_UNIT9?
@@ -700,7 +709,7 @@
         featureSet: unit.featureSet, flowAnalysisHelper: flowAnalysisHelper);
 
     if (completionOffset != null) {
-      var node = NodeLocator2(completionOffset).searchWithin(unit);
+      var node = NodeLocator(completionOffset).searchWithin(unit);
       var enclosingExecutable = node?.thisOrAncestorMatching((e) {
         return e.parent is ClassDeclaration || e.parent is CompilationUnit;
       });
@@ -750,6 +759,15 @@
     }
   }
 
+  CompilationUnitElement _unitElementWithPath(String path) {
+    for (var unitElement in _libraryElement.units) {
+      if (unitElement.source.fullName == path) {
+        return unitElement;
+      }
+    }
+    return null;
+  }
+
   /// Validate that the feature set associated with the compilation [unit] is
   /// the same as the [expectedSet] of features supported by the library.
   void _validateFeatureSet(CompilationUnit unit, FeatureSet expectedSet) {
diff --git a/pkg/analyzer/lib/src/dart/micro/library_graph.dart b/pkg/analyzer/lib/src/dart/micro/library_graph.dart
index 1b818ef..4b532b3 100644
--- a/pkg/analyzer/lib/src/dart/micro/library_graph.dart
+++ b/pkg/analyzer/lib/src/dart/micro/library_graph.dart
@@ -30,6 +30,7 @@
     show DependencyWalker, Node;
 import 'package:analyzer/src/summary2/informative_data.dart';
 import 'package:analyzer/src/util/performance/operation_performance.dart';
+import 'package:collection/collection.dart';
 import 'package:convert/convert.dart';
 import 'package:meta/meta.dart';
 
@@ -95,7 +96,7 @@
     signatureBuilder.addString(path);
     signatureBuilder.addBytes(libraryCycle.signature);
 
-    var content = getContent();
+    var content = getContentWithSameDigest();
     signatureBuilder.addString(content);
 
     return signatureBuilder.toHex();
@@ -114,6 +115,20 @@
     }
   }
 
+  /// Return the content of the file, the empty string if cannot be read.
+  ///
+  /// Additionally, we read the file digest, end verify that it is the same
+  /// as the [_digest] that we recorded in [refresh]. If it is not, then the
+  /// file was changed, and we failed to call [FileSystemState.changeFile]
+  String getContentWithSameDigest() {
+    var digest = utf8.encode(_fsState.getFileDigest(path));
+    if (!const ListEquality<int>().equals(digest, _digest)) {
+      throw StateError('File was changed, but not invalidated: $path');
+    }
+
+    return getContent();
+  }
+
   void internal_setLibraryCycle(LibraryCycle cycle, String signature) {
     _libraryCycle = cycle;
   }
@@ -166,6 +181,7 @@
     @required OperationPerformanceImpl performance,
   }) {
     _fsState.testView.refreshedFiles.add(path);
+    performance.getDataInt('count').increment();
 
     performance.run('digest', (_) {
       _digest = utf8.encode(_fsState.getFileDigest(path));
@@ -184,13 +200,16 @@
           return getContent();
         });
 
-        var unit = performance.run('parse', (_) {
+        var unit = performance.run('parse', (performance) {
+          performance.getDataInt('count').increment();
+          performance.getDataInt('length').add(content.length);
           return parse(AnalysisErrorListener.NULL_LISTENER, content);
         });
 
-        performance.run('unlinked', (_) {
+        performance.run('unlinked', (performance) {
           var unlinkedBuilder = serializeAstCiderUnlinked(_digest, unit);
           bytes = unlinkedBuilder.toBuffer();
+          performance.getDataInt('length').add(bytes.length);
           _fsState._byteStore.put(unlinkedKey, _digest, bytes);
         });
 
diff --git a/pkg/analyzer/lib/src/dart/micro/performance.dart b/pkg/analyzer/lib/src/dart/micro/performance.dart
deleted file mode 100644
index cf591ff..0000000
--- a/pkg/analyzer/lib/src/dart/micro/performance.dart
+++ /dev/null
@@ -1,9 +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:analyzer/src/util/performance/operation_performance.dart';
-
-/// The performance of an operation.
-@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 c496128..2ccbf70 100644
--- a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
+++ b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
@@ -103,12 +103,12 @@
     @required Workspace workspace,
     CiderByteStore byteStore,
     Duration libraryContextResetTimeout = const Duration(seconds: 60),
-  })  : this.logger = logger,
-        this.sourceFactory = sourceFactory,
-        this.resourceProvider = resourceProvider,
-        this.getFileDigest = getFileDigest,
-        this.prefetchFiles = prefetchFiles,
-        this.workspace = workspace {
+  })  : logger = logger,
+        sourceFactory = sourceFactory,
+        resourceProvider = resourceProvider,
+        getFileDigest = getFileDigest,
+        prefetchFiles = prefetchFiles,
+        workspace = workspace {
     byteStore ??= CiderMemoryByteStore();
     this.byteStore = byteStore;
     _libraryContextReset = _LibraryContextReset(
@@ -185,7 +185,7 @@
 
           bytes = CiderUnitErrorsBuilder(
             signature: errorsSignature,
-            errors: errors.map((ErrorEncoding.encode)).toList(),
+            errors: errors.map(ErrorEncoding.encode).toList(),
           ).toBuffer();
           byteStore.put(errorsKey, errorsSignature, bytes);
         }
@@ -218,8 +218,11 @@
     @required OperationPerformanceImpl performance,
   }) {
     return performance.run('fileContext', (performance) {
-      var analysisOptions = performance.run('analysisOptions', (_) {
-        return _getAnalysisOptions(path);
+      var analysisOptions = performance.run('analysisOptions', (performance) {
+        return _getAnalysisOptions(
+          path: path,
+          performance: performance,
+        );
       });
 
       performance.run('createContext', (_) {
@@ -251,8 +254,10 @@
     return file.libraryCycle.signatureStr;
   }
 
+  /// The [completionLine] and [completionColumn] are zero based.
   ResolvedUnitResult resolve({
-    int completionOffset,
+    int completionLine,
+    int completionColumn,
     @required String path,
     OperationPerformanceImpl performance,
   }) {
@@ -269,14 +274,23 @@
         var file = fileContext.file;
         var libraryFile = file.partOfLibrary ?? file;
 
+        int completionOffset;
+        if (completionLine != null && completionColumn != null) {
+          var lineOffset = file.lineInfo.getOffsetOfLine(completionLine);
+          completionOffset = lineOffset + completionColumn;
+        }
+
         performance.run('libraryContext', (performance) {
-          libraryContext.load2(libraryFile);
+          libraryContext.load2(
+            targetLibrary: libraryFile,
+            performance: performance,
+          );
         });
 
         testView?.addResolvedFile(path);
 
+        var content = _getFileContent(path);
         var errorListener = RecordingErrorListener();
-        var content = resourceProvider.getFile(path).readAsStringSync();
         var unit = file.parse(errorListener, content);
 
         Map<FileState, UnitAnalysisResult> results;
@@ -292,7 +306,7 @@
             contextObjects.inheritanceManager,
             libraryFile,
             resourceProvider,
-            (String path) => resourceProvider.getFile(path).readAsStringSync(),
+            (file) => file.getContentWithSameDigest(),
           );
 
           results = performance.run('analyze', (performance) {
@@ -320,19 +334,6 @@
     });
   }
 
-  @deprecated
-  ResolvedUnitResult resolve2({
-    int completionOffset,
-    @required String path,
-    OperationPerformanceImpl performance,
-  }) {
-    return resolve(
-      completionOffset: completionOffset,
-      path: path,
-      performance: performance,
-    );
-  }
-
   /// Make sure that [fsState], [contextObjects], and [libraryContext] are
   /// created and configured with the given [fileAnalysisOptions].
   ///
@@ -358,6 +359,7 @@
     if (fsState == null) {
       var featureSetProvider = FeatureSetProvider.build(
         sourceFactory: sourceFactory,
+        resourceProvider: resourceProvider,
         packages: Packages.empty,
         packageDefaultFeatureSet: analysisOptions.contextFeatures,
         nonPackageDefaultFeatureSet: analysisOptions.nonPackageFeatureSet,
@@ -419,50 +421,76 @@
   /// default options, if the file exists.
   ///
   /// Otherwise, return the default options.
-  AnalysisOptionsImpl _getAnalysisOptions(String path) {
+  AnalysisOptionsImpl _getAnalysisOptions({
+    @required String path,
+    @required OperationPerformanceImpl performance,
+  }) {
     YamlMap optionMap;
-    var folder = resourceProvider.getFile(path).parent;
-    var optionsFile = _findOptionsFile(folder);
-    if (optionsFile != null) {
-      try {
-        var optionsProvider = AnalysisOptionsProvider(sourceFactory);
-        optionMap = optionsProvider.getOptionsFromFile(optionsFile);
-      } catch (e) {
-        // ignored
-      }
-    } else {
-      Source source;
-      if (workspace is WorkspaceWithDefaultAnalysisOptions) {
-        var separator = resourceProvider.pathContext.separator;
-        if (path
-            .contains('${separator}third_party${separator}dart$separator')) {
-          source = sourceFactory
-              .forUri(WorkspaceWithDefaultAnalysisOptions.thirdPartyUri);
-        } else {
-          source =
-              sourceFactory.forUri(WorkspaceWithDefaultAnalysisOptions.uri);
-        }
-      }
 
-      if (source != null && source.exists()) {
+    var optionsFile = performance.run('findOptionsFile', (_) {
+      var folder = resourceProvider.getFile(path).parent;
+      return _findOptionsFile(folder);
+    });
+
+    if (optionsFile != null) {
+      performance.run('getOptionsFromFile', (_) {
         try {
           var optionsProvider = AnalysisOptionsProvider(sourceFactory);
-          optionMap = optionsProvider.getOptionsFromSource(source);
+          optionMap = optionsProvider.getOptionsFromFile(optionsFile);
         } catch (e) {
           // ignored
         }
+      });
+    } else {
+      var source = performance.run('defaultOptions', (_) {
+        if (workspace is WorkspaceWithDefaultAnalysisOptions) {
+          var separator = resourceProvider.pathContext.separator;
+          if (path
+              .contains('${separator}third_party${separator}dart$separator')) {
+            return sourceFactory.forUri(
+              WorkspaceWithDefaultAnalysisOptions.thirdPartyUri,
+            );
+          } else {
+            return sourceFactory.forUri(
+              WorkspaceWithDefaultAnalysisOptions.uri,
+            );
+          }
+        }
+        return null;
+      });
+
+      if (source != null && source.exists()) {
+        performance.run('getOptionsFromFile', (_) {
+          try {
+            var optionsProvider = AnalysisOptionsProvider(sourceFactory);
+            optionMap = optionsProvider.getOptionsFromSource(source);
+          } catch (e) {
+            // ignored
+          }
+        });
       }
     }
 
     var options = AnalysisOptionsImpl();
 
     if (optionMap != null) {
-      applyToAnalysisOptions(options, optionMap);
+      performance.run('applyToAnalysisOptions', (_) {
+        applyToAnalysisOptions(options, optionMap);
+      });
     }
 
     return options;
   }
 
+  /// Return the file content, the empty string if any exception.
+  String _getFileContent(String path) {
+    try {
+      return resourceProvider.getFile(path).readAsStringSync();
+    } catch (_) {
+      return '';
+    }
+  }
+
   void _throwIfNotAbsoluteNormalizedPath(String path) {
     var pathContext = resourceProvider.pathContext;
     if (pathContext.normalize(path) != path) {
@@ -526,23 +554,21 @@
   }
 
   /// Load data required to access elements of the given [targetLibrary].
-  void load2(FileState targetLibrary) {
+  void load2({
+    @required FileState targetLibrary,
+    @required OperationPerformanceImpl performance,
+  }) {
     var inputBundles = <LinkedNodeBundle>[];
 
-    var numCycles = 0;
-    var librariesTotal = 0;
-    var librariesLoaded = 0;
     var librariesLinked = 0;
     var librariesLinkedTimer = Stopwatch();
     var inputsTimer = Stopwatch();
-    var bytesGet = 0;
-    var bytesPut = 0;
 
     void loadBundle(LibraryCycle cycle) {
       if (!loadedBundles.add(cycle)) return;
 
-      numCycles++;
-      librariesTotal += cycle.libraries.length;
+      performance.getDataInt('cycleCount').increment();
+      performance.getDataInt('libraryCount').add(cycle.libraries.length);
 
       cycle.directDependencies.forEach(loadBundle);
 
@@ -562,10 +588,11 @@
           var partIndex = -1;
           for (var file in libraryFile.libraryFiles) {
             var isSynthetic = !file.exists;
-            var content = '';
-            try {
-              content = resourceProvider.getFile(file.path).readAsStringSync();
-            } catch (_) {}
+
+            var content = file.getContentWithSameDigest();
+            performance.getDataInt('parseCount').increment();
+            performance.getDataInt('parseLength').add(content.length);
+
             var unit = file.parse(
               AnalysisErrorListener.NULL_LISTENER,
               content,
@@ -599,13 +626,12 @@
         bytes = serializeBundle(cycle.signature, linkResult).toBuffer();
 
         byteStore.put(key, cycle.signature, bytes);
-        bytesPut += bytes.length;
+        performance.getDataInt('bytesPut').add(bytes.length);
 
         librariesLinkedTimer.stop();
       } else {
-        // TODO(scheglov) Take / clear parsed units in files.
-        bytesGet += bytes.length;
-        librariesLoaded += cycle.libraries.length;
+        performance.getDataInt('bytesGet').add(bytes.length);
+        performance.getDataInt('libraryLoadCount').add(cycle.libraries.length);
       }
 
       // We are about to load dart:core, but if we have just linked it, the
@@ -637,13 +663,9 @@
       var libraryCycle = targetLibrary.libraryCycle;
       loadBundle(libraryCycle);
       logger.writeln(
-        '[numCycles: $numCycles]'
-        '[librariesTotal: $librariesTotal]'
-        '[librariesLoaded: $librariesLoaded]'
         '[inputsTimer: ${inputsTimer.elapsedMilliseconds} ms]'
         '[librariesLinked: $librariesLinked]'
-        '[librariesLinkedTimer: ${librariesLinkedTimer.elapsedMilliseconds} ms]'
-        '[bytesGet: $bytesGet][bytesPut: $bytesPut]',
+        '[librariesLinkedTimer: ${librariesLinkedTimer.elapsedMilliseconds} ms]',
       );
     });
 
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 5ae37cd..e558b4d 100644
--- a/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart
@@ -197,7 +197,7 @@
     if (operatorType != TokenType.EQ) {
       if (staticType != null && staticType.isVoid) {
         _errorReporter.reportErrorForToken(
-          StaticWarningCode.USE_OF_VOID_RESULT,
+          CompileTimeErrorCode.USE_OF_VOID_RESULT,
           operator,
         );
         return;
@@ -223,7 +223,7 @@
         node.staticElement = result.getter;
         if (_shouldReportInvalidMember(staticType, result)) {
           _errorReporter.reportErrorForToken(
-            StaticTypeWarningCode.UNDEFINED_OPERATOR,
+            CompileTimeErrorCode.UNDEFINED_OPERATOR,
             operator,
             [methodName, staticType],
           );
@@ -281,7 +281,7 @@
       var leftWriteType = _getStaticType2(node.leftHandSide);
       if (!_typeSystem.isAssignableTo2(type, leftWriteType)) {
         _resolver.errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.INVALID_ASSIGNMENT,
+          CompileTimeErrorCode.INVALID_ASSIGNMENT,
           node.rightHandSide,
           [type, leftWriteType],
         );
diff --git a/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart b/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart
index a2709ff..c8b7f64 100644
--- a/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
@@ -13,10 +14,9 @@
 /// Helper for [MethodInvocation]s into [InstanceCreationExpression] to support
 /// the optional `new` and `const` feature, or [ExtensionOverride].
 class AstRewriter {
-  final LibraryElement _libraryElement;
   final ErrorReporter _errorReporter;
 
-  AstRewriter(this._libraryElement, this._errorReporter);
+  AstRewriter(this._errorReporter);
 
   AstNode methodInvocation(Scope nameScope, MethodInvocation node) {
     SimpleIdentifier methodName = node.methodName;
@@ -33,7 +33,7 @@
         // This isn't a constructor invocation because it's in a cascade.
         return node;
       }
-      Element element = nameScope.lookup(methodName, _libraryElement);
+      Element element = nameScope.lookupIdentifier(methodName);
       if (element is ClassElement) {
         TypeName typeName = astFactory.typeName(methodName, node.typeArguments);
         ConstructorName constructorName =
@@ -57,7 +57,7 @@
         // This isn't a constructor invocation because a null aware operator is
         // being used.
       }
-      Element element = nameScope.lookup(target, _libraryElement);
+      Element element = nameScope.lookupIdentifier(target);
       if (element is ClassElement) {
         // Possible case: C.n()
         var constructorElement = element.getNamedConstructor(methodName.name);
@@ -65,8 +65,7 @@
           var typeArguments = node.typeArguments;
           if (typeArguments != null) {
             _errorReporter.reportErrorForNode(
-                StaticTypeWarningCode
-                    .WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
+                CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
                 typeArguments,
                 [element.name, constructorElement.name]);
           }
@@ -87,7 +86,7 @@
             astFactory.simpleIdentifier(target.token),
             null,
             astFactory.simpleIdentifier(methodName.token));
-        Element prefixedElement = nameScope.lookup(identifier, _libraryElement);
+        Element prefixedElement = nameScope.lookupIdentifier(identifier);
         if (prefixedElement is ClassElement) {
           TypeName typeName = astFactory.typeName(
               astFactory.prefixedIdentifier(target, node.operator, methodName),
@@ -112,17 +111,17 @@
       }
     } else if (target is PrefixedIdentifier) {
       // Possible case: p.C.n()
-      Element prefixElement = nameScope.lookup(target.prefix, _libraryElement);
+      Element prefixElement = nameScope.lookupIdentifier(target.prefix);
       target.prefix.staticElement = prefixElement;
       if (prefixElement is PrefixElement) {
-        Element element = nameScope.lookup(target, _libraryElement);
+        Element element = nameScope.lookupIdentifier(target);
         if (element is ClassElement) {
           var constructorElement = element.getNamedConstructor(methodName.name);
           if (constructorElement != null) {
             var typeArguments = node.typeArguments;
             if (typeArguments != null) {
               _errorReporter.reportErrorForNode(
-                  StaticTypeWarningCode
+                  CompileTimeErrorCode
                       .WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
                   typeArguments,
                   [element.name, constructorElement.name]);
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 818e4c5..8486729 100644
--- a/pkg/analyzer/lib/src/dart/resolver/binary_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/binary_expression_resolver.dart
@@ -102,7 +102,7 @@
   void _checkNonBoolOperand(Expression operand, String operator) {
     _resolver.boolExpressionVerifier.checkForNonBoolExpression(
       operand,
-      errorCode: StaticTypeWarningCode.NON_BOOL_OPERAND,
+      errorCode: CompileTimeErrorCode.NON_BOOL_OPERAND,
       arguments: [operator],
     );
   }
@@ -335,13 +335,13 @@
     if (_shouldReportInvalidMember(leftType, result)) {
       if (leftOperand is SuperExpression) {
         _errorReporter.reportErrorForToken(
-          StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
+          CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR,
           node.operator,
           [methodName, leftType],
         );
       } else {
         _errorReporter.reportErrorForToken(
-          StaticTypeWarningCode.UNDEFINED_OPERATOR,
+          CompileTimeErrorCode.UNDEFINED_OPERATOR,
           node.operator,
           [methodName, leftType],
         );
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 6824312..6b5aaf4 100644
--- a/pkg/analyzer/lib/src/dart/resolver/body_inference_context.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/body_inference_context.dart
@@ -92,13 +92,7 @@
       endOfBlockIsReachable: endOfBlockIsReachable,
     );
 
-    DartType clampedReturnedType;
-    if (contextType == null ||
-        _typeSystem.isSubtypeOf2(actualReturnedType, contextType)) {
-      clampedReturnedType = actualReturnedType;
-    } else {
-      clampedReturnedType = nonNullifyType(_typeSystem, contextType);
-    }
+    var clampedReturnedType = _clampToContextType(actualReturnedType);
 
     if (_isGenerator) {
       if (_isAsynchronous) {
@@ -117,6 +111,35 @@
     }
   }
 
+  /// Let `T` be the **actual returned type** of a function literal.
+  DartType _clampToContextType(DartType T) {
+    // Let `R` be the greatest closure of the typing context `K`.
+    var R = contextType;
+    if (R == null) {
+      return T;
+    }
+
+    // If `R` is `void`, or the function literal is marked `async` and `R` is
+    // `FutureOr<void>`, let `S` be `void`.
+    if (_typeSystem.isNonNullableByDefault) {
+      if (R.isVoid ||
+          _isAsynchronous &&
+              R is InterfaceType &&
+              R.isDartAsyncFutureOr &&
+              R.typeArguments[0].isVoid) {
+        return VoidTypeImpl.instance;
+      }
+    }
+
+    // Otherwise, if `T <: R` then let `S` be `T`.
+    if (_typeSystem.isSubtypeOf2(T, R)) {
+      return T;
+    }
+
+    // Otherwise, let `S` be `R`.
+    return nonNullifyType(_typeSystem, R);
+  }
+
   DartType _computeActualReturnedType({
     @required bool endOfBlockIsReachable,
   }) {
@@ -138,11 +161,9 @@
   }
 
   static DartType _argumentOf(DartType type, ClassElement element) {
-    if (type is InterfaceTypeImpl) {
-      var elementType = type.asInstanceOf(element);
-      if (elementType != null) {
-        return elementType.typeArguments[0];
-      }
+    var elementType = type.asInstanceOf(element);
+    if (elementType != null) {
+      return elementType.typeArguments[0];
     }
     return null;
   }
diff --git a/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart b/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
index f9c6f1c..4c10a69 100644
--- a/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
@@ -6,6 +6,7 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
 
 /// Instances of the class `ExitDetector` determine whether the visited AST node
 /// is guaranteed to terminate by executing a `return` statement, `throw`
@@ -423,7 +424,7 @@
       }
     }
     Element element = node.methodName.staticElement;
-    if (element != null && element.hasAlwaysThrows) {
+    if (_elementExits(element)) {
       return true;
     }
     return _nodeExits(node.argumentList);
@@ -660,4 +661,14 @@
   static bool exits(AstNode node) {
     return ExitDetector()._nodeExits(node);
   }
+
+  static bool _elementExits(Element element) {
+    if (element is ExecutableElement) {
+      var declaration = element.declaration;
+      return declaration.hasAlwaysThrows ||
+          identical(declaration.returnType, NeverTypeImpl.instance);
+    }
+
+    return false;
+  }
 }
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 c29cef9..5285ca7 100644
--- a/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart
@@ -4,6 +4,7 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/listener.dart';
@@ -159,7 +160,7 @@
 
     if (receiverType.isVoid) {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.USE_OF_VOID_RESULT, receiverExpression);
+          CompileTimeErrorCode.USE_OF_VOID_RESULT, receiverExpression);
     } else if (!_typeSystem.isAssignableTo2(receiverType, node.extendedType)) {
       _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.EXTENSION_OVERRIDE_ARGUMENT_NOT_ASSIGNABLE,
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 5a625a1..9d22406 100644
--- a/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
@@ -363,6 +363,11 @@
   }
 
   @override
+  bool isNever(DartType type) {
+    return typeSystem.isBottom(type);
+  }
+
+  @override
   bool isSameType(covariant TypeImpl type1, covariant TypeImpl type2) {
     return type1 == type2;
   }
diff --git a/pkg/analyzer/lib/src/dart/resolver/for_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/for_resolver.dart
index 7844f5b..63a9cfb 100644
--- a/pkg/analyzer/lib/src/dart/resolver/for_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/for_resolver.dart
@@ -58,9 +58,7 @@
         ? _resolver.typeProvider.streamElement
         : _resolver.typeProvider.iterableElement;
 
-    InterfaceType iteratedType = iterableType is InterfaceTypeImpl
-        ? iterableType.asInstanceOf(iteratedElement)
-        : null;
+    InterfaceType iteratedType = iterableType.asInstanceOf(iteratedElement);
 
     if (iteratedType != null) {
       var elementType = iteratedType.typeArguments.single;
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 da2e57c..d6f416c 100644
--- a/pkg/analyzer/lib/src/dart/resolver/invocation_inference_helper.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/invocation_inference_helper.dart
@@ -45,8 +45,7 @@
   /// type that is being invoked.
   DartType computeInvokeReturnType(DartType type) {
     if (type is FunctionType) {
-      // TODO(scheglov) https://github.com/dart-lang/sdk/issues/41065
-      return type.returnType ?? DynamicTypeImpl.instance;
+      return type.returnType;
     } else {
       return DynamicTypeImpl.instance;
     }
@@ -217,7 +216,7 @@
       expression.staticType = DynamicTypeImpl.instance;
     } else {
       expression.staticType = type;
-      if (identical(type, NeverTypeImpl.instance)) {
+      if (_typeSystem.isBottom(type)) {
         _flowAnalysis?.flow?.handleExit();
       }
     }
@@ -407,7 +406,7 @@
     List<DartType> typeArguments;
     if (typeArgumentList.arguments.length != typeParameters.length) {
       _errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
+        CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
         typeArgumentList,
         [
           rawType,
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 b5dcd58..b934ae0 100644
--- a/pkg/analyzer/lib/src/dart/resolver/legacy_type_asserter.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/legacy_type_asserter.dart
@@ -114,7 +114,7 @@
       return;
     }
 
-    if (type.isBottom && type.isDartCoreNull) {
+    if (type is NeverType && type.isDartCoreNull) {
       // Never?, which is ok.
       //
       // Note: we could allow Null? and Null, but we really should be able to
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 0ad5812..65fc8ab 100644
--- a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
@@ -96,7 +97,7 @@
     if (receiver is SimpleIdentifier) {
       var receiverElement = receiver.staticElement;
       if (receiverElement is PrefixElement) {
-        _resolveReceiverPrefix(node, receiver, receiverElement, nameNode, name);
+        _resolveReceiverPrefix(node, receiverElement, nameNode, name);
         return;
       }
     }
@@ -189,13 +190,13 @@
       );
     } else if (nullReceiver) {
       _resolver.errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
+        CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
         nameNode,
         [element.enclosingElement.displayName],
       );
     } else {
       _resolver.errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
+        CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
         nameNode,
         [
           nameNode.name,
@@ -209,7 +210,7 @@
   void _reportInvocationOfNonFunction(MethodInvocation node) {
     _setDynamicResolution(node, setNameTypeToDynamic: false);
     _resolver.errorReporter.reportErrorForNode(
-      StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
+      CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION,
       node.methodName,
       [node.methodName.name],
     );
@@ -227,7 +228,7 @@
       ExecutableElement element, SimpleIdentifier nameNode) {
     if (!element.isStatic) {
       _resolver.errorReporter.reportErrorForNode(
-        StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
+        CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
         nameNode,
         [nameNode.name],
       );
@@ -235,16 +236,18 @@
   }
 
   void _reportUndefinedFunction(
-      MethodInvocation node, Identifier ignorableIdentifier) {
+    MethodInvocation node, {
+    @required String prefix,
+    @required String name,
+  }) {
     _setDynamicResolution(node);
 
-    // TODO(scheglov) This is duplication.
-    if (nameScope.shouldIgnoreUndefined(ignorableIdentifier)) {
+    if (nameScope.shouldIgnoreUndefined2(prefix: prefix, name: name)) {
       return;
     }
 
     _resolver.errorReporter.reportErrorForNode(
-      StaticTypeWarningCode.UNDEFINED_FUNCTION,
+      CompileTimeErrorCode.UNDEFINED_FUNCTION,
       node.methodName,
       [node.methodName.name],
     );
@@ -254,7 +257,7 @@
       MethodInvocation node, String name, ClassElement typeReference) {
     _setDynamicResolution(node);
     _resolver.errorReporter.reportErrorForNode(
-      StaticTypeWarningCode.UNDEFINED_METHOD,
+      CompileTimeErrorCode.UNDEFINED_METHOD,
       node.methodName,
       [name, typeReference.displayName],
     );
@@ -263,7 +266,7 @@
   void _reportUseOfVoidType(MethodInvocation node, AstNode errorNode) {
     _setDynamicResolution(node);
     _resolver.errorReporter.reportErrorForNode(
-      StaticWarningCode.USE_OF_VOID_RESULT,
+      CompileTimeErrorCode.USE_OF_VOID_RESULT,
       errorNode,
     );
   }
@@ -480,7 +483,7 @@
 
   void _resolveReceiverNull(
       MethodInvocation node, SimpleIdentifier nameNode, String name) {
-    var element = nameScope.lookup(nameNode, _definingLibrary);
+    var element = nameScope.lookup2(name).getter;
     if (element != null) {
       element = _resolver.toLegacyElement(element);
       nameNode.staticElement = element;
@@ -512,7 +515,11 @@
     } else if (_resolver.enclosingExtension != null) {
       receiverType = _resolver.enclosingExtension.extendedType;
     } else {
-      return _reportUndefinedFunction(node, node.methodName);
+      return _reportUndefinedFunction(
+        node,
+        prefix: null,
+        name: node.methodName.name,
+      );
     }
 
     _resolveReceiverType(
@@ -525,8 +532,8 @@
     );
   }
 
-  void _resolveReceiverPrefix(MethodInvocation node, SimpleIdentifier receiver,
-      PrefixElement prefix, SimpleIdentifier nameNode, String name) {
+  void _resolveReceiverPrefix(MethodInvocation node, PrefixElement prefix,
+      SimpleIdentifier nameNode, String name) {
     // Note: prefix?.bar is reported as an error in ElementResolver.
 
     if (name == FunctionElement.LOAD_LIBRARY_NAME) {
@@ -542,10 +549,7 @@
       }
     }
 
-    // TODO(scheglov) I don't like how we resolve prefixed names.
-    // But maybe this is the only one solution.
-    var prefixedName = PrefixedIdentifierImpl.temp(receiver, nameNode);
-    var element = nameScope.lookup(prefixedName, _definingLibrary);
+    var element = prefix.scope.lookup2(name).getter;
     element = _resolver.toLegacyElement(element);
     nameNode.staticElement = element;
 
@@ -562,7 +566,11 @@
       return _setResolution(node, element.type);
     }
 
-    _reportUndefinedFunction(node, prefixedName);
+    _reportUndefinedFunction(
+      node,
+      prefix: prefix.name,
+      name: name,
+    );
   }
 
   void _resolveReceiverSuper(MethodInvocation node, SuperExpression receiver,
@@ -608,7 +616,7 @@
     // Nothing help, there is no target at all.
     _setDynamicResolution(node);
     _resolver.errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
+        CompileTimeErrorCode.UNDEFINED_SUPER_METHOD,
         nameNode,
         [name, enclosingClass.displayName]);
   }
@@ -663,7 +671,7 @@
 
     if (!nameNode.isSynthetic) {
       _resolver.errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.UNDEFINED_METHOD,
+        CompileTimeErrorCode.UNDEFINED_METHOD,
         nameNode,
         [name, receiverClassName],
       );
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 43b20e7..e3f3cc0 100644
--- a/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart
@@ -73,7 +73,7 @@
     var operandWriteType = _getWriteType(operand);
     if (!_typeSystem.isAssignableTo2(type, operandWriteType)) {
       _resolver.errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.INVALID_ASSIGNMENT,
+        CompileTimeErrorCode.INVALID_ASSIGNMENT,
         node,
         [type, operandWriteType],
       );
@@ -149,13 +149,13 @@
     if (_shouldReportInvalidMember(receiverType, result)) {
       if (operand is SuperExpression) {
         _errorReporter.reportErrorForToken(
-          StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
+          CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR,
           node.operator,
           [methodName, receiverType],
         );
       } else {
         _errorReporter.reportErrorForToken(
-          StaticTypeWarningCode.UNDEFINED_OPERATOR,
+          CompileTimeErrorCode.UNDEFINED_OPERATOR,
           node.operator,
           [methodName, receiverType],
         );
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 beeb19a..8a27334 100644
--- a/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart
@@ -73,7 +73,7 @@
     var operandWriteType = _getStaticType(operand);
     if (!_typeSystem.isAssignableTo2(type, operandWriteType)) {
       _resolver.errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.INVALID_ASSIGNMENT,
+        CompileTimeErrorCode.INVALID_ASSIGNMENT,
         node,
         [type, operandWriteType],
       );
@@ -205,13 +205,13 @@
       if (_shouldReportInvalidMember(staticType, result)) {
         if (operand is SuperExpression) {
           _errorReporter.reportErrorForToken(
-            StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
+            CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR,
             operator,
             [methodName, staticType],
           );
         } else {
           _errorReporter.reportErrorForToken(
-            StaticTypeWarningCode.UNDEFINED_OPERATOR,
+            CompileTimeErrorCode.UNDEFINED_OPERATOR,
             operator,
             [methodName, staticType],
           );
diff --git a/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart b/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
index d006206..5674c42 100644
--- a/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
@@ -7,12 +7,14 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/error.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/scope.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/resolver/ast_rewrite.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
@@ -107,7 +109,6 @@
       libraryElement.typeSystem,
       typeProvider,
       isNonNullableByDefault,
-      libraryElement,
       errorReporter,
     );
 
@@ -116,7 +117,7 @@
       unitElement,
       isNonNullableByDefault,
       errorReporter,
-      AstRewriter(libraryElement, errorReporter),
+      AstRewriter(errorReporter),
       typeNameResolver,
       nameScope,
       elementWalker,
@@ -149,7 +150,7 @@
   void visitBlock(Block node) {
     var outerScope = _nameScope;
     try {
-      _nameScope = EnclosedScope(_nameScope);
+      _nameScope = LocalScope(_nameScope);
 
       var statements = node.statements;
       _buildLocalElements(statements);
@@ -172,7 +173,7 @@
           exceptionNode.offset,
         );
         _elementHolder.enclose(element);
-        _nameScope.define(element);
+        _define(element);
 
         exceptionNode.staticElement = element;
 
@@ -198,7 +199,7 @@
           stackTraceNode.offset,
         );
         _elementHolder.enclose(element);
-        _nameScope.define(element);
+        _define(element);
 
         stackTraceNode.staticElement = element;
 
@@ -336,7 +337,7 @@
   }
 
   @override
-  void visitDefaultFormalParameter(DefaultFormalParameter node) {
+  void visitDefaultFormalParameter(covariant DefaultFormalParameterImpl node) {
     NormalFormalParameter normalParameter = node.parameter;
     SimpleIdentifier nameNode = normalParameter.identifier;
 
@@ -358,7 +359,6 @@
       element.isConst = node.isConst;
       element.isExplicitlyCovariant = node.parameter.covariantKeyword != null;
       element.isFinal = node.isFinal;
-      // ignore: deprecated_member_use_from_same_package
       element.parameterKind = node.kind;
 
       if (normalParameter is SimpleFormalParameter &&
@@ -457,7 +457,7 @@
   }
 
   @override
-  void visitFieldFormalParameter(FieldFormalParameter node) {
+  void visitFieldFormalParameter(covariant FieldFormalParameterImpl node) {
     FieldFormalParameterElementImpl element;
     if (node.parent is DefaultFormalParameter) {
       element = node.declaredElement;
@@ -475,7 +475,6 @@
         element.isConst = node.isConst;
         element.isExplicitlyCovariant = node.covariantKeyword != null;
         element.isFinal = node.isFinal;
-        // ignore: deprecated_member_use_from_same_package
         element.parameterKind = node.kind;
         _setCodeRange(element, node);
         element.metadata = _createElementAnnotations(node.metadata);
@@ -507,6 +506,13 @@
   }
 
   @override
+  void visitForPartsWithDeclarations(ForPartsWithDeclarations node) {
+    _withNameScope(() {
+      super.visitForPartsWithDeclarations(node);
+    });
+  }
+
+  @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     ExecutableElementImpl element;
     if (_elementWalker != null) {
@@ -629,7 +635,9 @@
   }
 
   @override
-  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+  void visitFunctionTypedFormalParameter(
+    covariant FunctionTypedFormalParameterImpl node,
+  ) {
     ParameterElementImpl element;
     if (node.parent is DefaultFormalParameter) {
       element = node.declaredElement;
@@ -643,7 +651,6 @@
         element.isConst = node.isConst;
         element.isExplicitlyCovariant = node.covariantKeyword != null;
         element.isFinal = node.isFinal;
-        // ignore: deprecated_member_use_from_same_package
         element.parameterKind = node.kind;
         _setCodeRange(element, node);
       }
@@ -857,7 +864,7 @@
   }
 
   @override
-  void visitSimpleFormalParameter(SimpleFormalParameter node) {
+  void visitSimpleFormalParameter(covariant SimpleFormalParameterImpl node) {
     ParameterElementImpl element;
     if (node.parent is DefaultFormalParameter) {
       element = node.declaredElement;
@@ -877,15 +884,14 @@
         element.isConst = node.isConst;
         element.isExplicitlyCovariant = node.covariantKeyword != null;
         element.isFinal = node.isFinal;
-        // ignore: deprecated_member_use_from_same_package
         element.parameterKind = node.kind;
         if (node.type == null) {
           element.hasImplicitType = true;
         }
-        (node as SimpleFormalParameterImpl).declaredElement = element;
+        node.declaredElement = element;
       }
       nameNode?.staticElement = element;
-      (node as SimpleFormalParameterImpl).declaredElement = element;
+      node.declaredElement = element;
     }
 
     node.type?.accept(this);
@@ -1054,7 +1060,7 @@
     var nameNode = node.name;
     var element = FunctionElementImpl(nameNode.name, nameNode.offset);
     nameNode.staticElement = element;
-    _nameScope.define(element);
+    _define(element);
     _elementHolder.enclose(element);
   }
 
@@ -1079,7 +1085,7 @@
       }
       variableName.staticElement = element;
       _elementHolder.enclose(element);
-      _nameScope.define(element);
+      _define(element);
 
       element.isConst = isConst;
       element.isFinal = isFinal;
@@ -1107,7 +1113,7 @@
         _setCodeRange(element, typeParameter);
       }
       name.staticElement = element;
-      _nameScope.define(element);
+      _define(element);
     }
   }
 
@@ -1125,12 +1131,16 @@
     }).toList();
   }
 
+  void _define(Element element) {
+    (_nameScope as LocalScope).add(element);
+  }
+
   /// Define given [elements] in the [_nameScope].
   void _defineElements(List<Element> elements) {
     int length = elements.length;
     for (int i = 0; i < length; i++) {
       var element = elements[i];
-      _nameScope.define(element);
+      _define(element);
     }
   }
 
@@ -1140,7 +1150,7 @@
     for (int i = 0; i < length; i++) {
       ParameterElement parameter = parameters[i];
       if (!parameter.isInitializingFormal) {
-        _nameScope.define(parameter);
+        _define(parameter);
       }
     }
   }
@@ -1275,7 +1285,7 @@
   void _withNameScope(void Function() f) {
     var current = _nameScope;
     try {
-      _nameScope = EnclosedScope(current);
+      _nameScope = LocalScope(current);
       f();
     } finally {
       _nameScope = current;
diff --git a/pkg/analyzer/lib/src/dart/resolver/scope.dart b/pkg/analyzer/lib/src/dart/resolver/scope.dart
index 34e34b51..2787d4b 100644
--- a/pkg/analyzer/lib/src/dart/resolver/scope.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/scope.dart
@@ -6,34 +6,26 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/scope.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:meta/meta.dart';
 
 /// The scope defined by a block.
-class BlockScope extends EnclosedScope {
-  /// 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");
-    }
-    _defineElements(block);
-  }
-
-  void _defineElements(Block block) {
-    for (Element element in elementsInBlock(block)) {
-      define(element);
-    }
-  }
-
-  /// 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;
+class BlockScope {
+  /// Return the elements that are declared directly in the given [statements].
+  /// This does not include elements declared in nested blocks.
+  static Iterable<Element> elementsInStatements(
+    List<Statement> statements,
+  ) sync* {
     int statementCount = statements.length;
     for (int i = 0; i < statementCount; i++) {
       Statement statement = statements[i];
+      if (statement is LabeledStatement) {
+        statement = (statement as LabeledStatement).statement;
+      }
       if (statement is VariableDeclarationStatement) {
         NodeList<VariableDeclaration> variables = statement.variables.variables;
         int variableCount = variables.length;
@@ -47,184 +39,6 @@
   }
 }
 
-/// The scope defined by a class.
-class ClassScope extends EnclosedScope {
-  /// Initialize a newly created scope, enclosed within the [enclosingScope],
-  /// based on the given [classElement].
-  ClassScope(Scope enclosingScope, ClassElement classElement)
-      : super(enclosingScope) {
-    if (classElement == null) {
-      throw ArgumentError("class element cannot be null");
-    }
-    _defineMembers(classElement);
-  }
-
-  /// Define the instance members defined by the given [classElement].
-  void _defineMembers(ClassElement classElement) {
-    List<PropertyAccessorElement> accessors = classElement.accessors;
-    int accessorLength = accessors.length;
-    for (int i = 0; i < accessorLength; i++) {
-      define(accessors[i]);
-    }
-    List<MethodElement> methods = classElement.methods;
-    int methodLength = methods.length;
-    for (int i = 0; i < methodLength; i++) {
-      define(methods[i]);
-    }
-  }
-}
-
-/// The scope defined for the initializers in a constructor.
-class ConstructorInitializerScope extends EnclosedScope {
-  /// 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.
-  void _initializeFieldFormalParameters(ConstructorElement element) {
-    for (ParameterElement parameter in element.parameters) {
-      if (parameter is FieldFormalParameterElement) {
-        define(parameter);
-      }
-    }
-  }
-}
-
-/// A scope that is lexically enclosed in another scope.
-class EnclosedScope extends Scope {
-  /// The scope in which this scope is lexically enclosed.
-  @override
-  final Scope enclosingScope;
-
-  /// Initialize a newly created scope, enclosed within the [enclosingScope].
-  EnclosedScope(this.enclosingScope);
-
-  @override
-  Element internalLookup(String name) {
-    Element element = localLookup(name);
-    if (element != null) {
-      return element;
-    }
-    // Check enclosing scope.
-    return enclosingScope.internalLookup(name);
-  }
-
-  @override
-  Element _internalLookupPrefixed(String prefix, String name) {
-    return enclosingScope._internalLookupPrefixed(prefix, name);
-  }
-}
-
-/// The scope defined by an extension.
-class ExtensionScope extends EnclosedScope {
-  /// Initialize a newly created scope, enclosed within the [enclosingScope],
-  /// that represents the given [_extensionElement].
-  ExtensionScope(Scope enclosingScope, ExtensionElement extensionElement)
-      : super(enclosingScope) {
-    _defineMembers(extensionElement);
-  }
-
-  /// Define the static members defined by the given [extensionElement]. The
-  /// instance members should only be found if they would be found by normal
-  /// lookup on `this`.
-  void _defineMembers(ExtensionElement extensionElement) {
-    List<PropertyAccessorElement> accessors = extensionElement.accessors;
-    int accessorLength = accessors.length;
-    for (int i = 0; i < accessorLength; i++) {
-      define(accessors[i]);
-    }
-    List<MethodElement> methods = extensionElement.methods;
-    int methodLength = methods.length;
-    for (int i = 0; i < methodLength; i++) {
-      define(methods[i]);
-    }
-  }
-}
-
-/// The scope defined by a function.
-class FunctionScope extends EnclosedScope {
-  /// 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.
-  bool _parametersDefined = false;
-
-  /// 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) {
-      throw ArgumentError("function element cannot be null");
-    }
-    _defineTypeParameters();
-  }
-
-  /// Define the parameters for the given function in the scope that encloses
-  /// this function.
-  void defineParameters() {
-    if (_parametersDefined) {
-      return;
-    }
-    _parametersDefined = true;
-    Scope parameterScope = enclosingScope;
-    List<ParameterElement> parameters = _functionElement.parameters;
-    int length = parameters.length;
-    for (int i = 0; i < length; i++) {
-      ParameterElement parameter = parameters[i];
-      if (!parameter.isInitializingFormal) {
-        parameterScope.define(parameter);
-      }
-    }
-  }
-
-  /// Define the type parameters for the function.
-  void _defineTypeParameters() {
-    Scope typeParameterScope = enclosingScope.enclosingScope;
-    List<TypeParameterElement> typeParameters = _functionElement.typeParameters;
-    int length = typeParameters.length;
-    for (int i = 0; i < length; i++) {
-      TypeParameterElement typeParameter = typeParameters[i];
-      typeParameterScope.define(typeParameter);
-    }
-  }
-}
-
-/// 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].
-  FunctionTypeScope(Scope enclosingScope, this._typeElement)
-      : super(EnclosedScope(enclosingScope)) {
-    _defineTypeParameters();
-  }
-
-  /// Define the parameters for the function type alias.
-  void defineParameters() {
-    if (_parametersDefined) {
-      return;
-    }
-    _parametersDefined = true;
-    for (ParameterElement parameter in _typeElement.function.parameters) {
-      define(parameter);
-    }
-  }
-
-  /// Define the type parameters for the function type alias.
-  void _defineTypeParameters() {
-    Scope typeParameterScope = enclosingScope;
-    for (TypeParameterElement typeParameter in _typeElement.typeParameters) {
-      typeParameterScope.define(typeParameter);
-    }
-  }
-}
-
 /// The scope statements that can be the target of unlabeled `break` and
 /// `continue` statements.
 class ImplicitLabelScope {
@@ -246,7 +60,7 @@
   /// `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
+      // This scope represents the top-level of a function body, so it doesn't
       // match either break or continue.
       return null;
     }
@@ -292,286 +106,6 @@
   }
 }
 
-/// 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.
-  final LibraryElement _definingLibrary;
-
-  /// 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.
-  Map<String, Map<String, Element>> _definedPrefixedNames;
-
-  /// 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].
-  LibraryImportScope(this._definingLibrary) {
-    _createImportedNamespaces();
-  }
-
-  @override
-  List<ExtensionElement> get extensions {
-    if (_extensions == null) {
-      _extensions = [];
-      List<ImportElement> imports = _definingLibrary.imports;
-      int count = imports.length;
-      for (int i = 0; i < count; i++) {
-        for (var element in imports[i].namespace.definedNames.values) {
-          if (element is ExtensionElement && !_extensions.contains(element)) {
-            _extensions.add(element);
-          }
-        }
-      }
-    }
-    return _extensions;
-  }
-
-  @override
-  void define(Element element) {
-    if (!Scope.isPrivateName(element.displayName)) {
-      super.define(element);
-    }
-  }
-
-  @override
-  Element internalLookup(String name) {
-    return localLookup(name);
-  }
-
-  @override
-  Element localLookup(String name) {
-    var element = super.localLookup(name);
-    if (element != null) {
-      return element;
-    }
-
-    element = _lookupInImportedNamespaces((namespace) {
-      return namespace.get(name);
-    });
-    if (element != null) {
-      defineNameWithoutChecking(name, element);
-    }
-
-    return element;
-  }
-
-  @override
-  bool shouldIgnoreUndefined(Identifier node) {
-    Iterable<NamespaceCombinator> getShowCombinators(
-        ImportElement importElement) {
-      return importElement.combinators.whereType<ShowElementCombinator>();
-    }
-
-    if (node is PrefixedIdentifier) {
-      String prefix = node.prefix.name;
-      String name = node.identifier.name;
-      List<ImportElement> imports = _definingLibrary.imports;
-      int count = imports.length;
-      for (int i = 0; i < count; i++) {
-        ImportElement importElement = imports[i];
-        if (importElement.prefix?.name == prefix &&
-            importElement.importedLibrary?.isSynthetic != false) {
-          Iterable<NamespaceCombinator> showCombinators =
-              getShowCombinators(importElement);
-          if (showCombinators.isEmpty) {
-            return true;
-          }
-          for (ShowElementCombinator combinator in showCombinators) {
-            if (combinator.shownNames.contains(name)) {
-              return true;
-            }
-          }
-        }
-      }
-    } else if (node is SimpleIdentifier) {
-      String name = node.name;
-      List<ImportElement> imports = _definingLibrary.imports;
-      int count = imports.length;
-      for (int i = 0; i < count; i++) {
-        ImportElement importElement = imports[i];
-        if (importElement.prefix == null &&
-            importElement.importedLibrary?.isSynthetic != false) {
-          for (ShowElementCombinator combinator
-              in getShowCombinators(importElement)) {
-            if (combinator.shownNames.contains(name)) {
-              return true;
-            }
-          }
-        }
-      }
-    }
-    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.
-  void _createImportedNamespaces() {
-    List<ImportElement> imports = _definingLibrary.imports;
-    int count = imports.length;
-    _importedNamespaces = List<Namespace>(count);
-    for (int i = 0; i < count; i++) {
-      _importedNamespaces[i] = imports[i].namespace;
-    }
-  }
-
-  /// 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>>();
-    Map<String, Element> unprefixedNames = _definedPrefixedNames.putIfAbsent(
-        prefix, () => HashMap<String, Element>());
-    unprefixedNames[name] = element;
-  }
-
-  @override
-  Element _internalLookupPrefixed(String prefix, String name) {
-    Element element = _localPrefixedLookup(prefix, name);
-    if (element != null) {
-      return element;
-    }
-    element = _lookupInImportedNamespaces(
-        (Namespace namespace) => namespace.getPrefixed(prefix, name));
-    if (element != null) {
-      _definePrefixedNameWithoutChecking(prefix, name, element);
-    }
-    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.
-  Element _localPrefixedLookup(String prefix, String name) {
-    if (_definedPrefixedNames != null) {
-      Map<String, Element> unprefixedNames = _definedPrefixedNames[prefix];
-      if (unprefixedNames != null) {
-        return unprefixedNames[name];
-      }
-    }
-    return null;
-  }
-
-  Element _lookupInImportedNamespaces(
-      Element Function(Namespace namespace) lookup) {
-    Element result;
-
-    bool hasPotentialConflict = false;
-    for (int i = 0; i < _importedNamespaces.length; i++) {
-      Element element = lookup(_importedNamespaces[i]);
-      if (element != null) {
-        if (result == null || result == element) {
-          result = element;
-        } else {
-          hasPotentialConflict = true;
-        }
-      }
-    }
-
-    if (hasPotentialConflict) {
-      var sdkElements = <Element>{};
-      var nonSdkElements = <Element>{};
-      for (int i = 0; i < _importedNamespaces.length; i++) {
-        Element element = lookup(_importedNamespaces[i]);
-        if (element != null) {
-          if (element is NeverElementImpl || element.library.isInSdk) {
-            sdkElements.add(element);
-          } else {
-            nonSdkElements.add(element);
-          }
-        }
-      }
-      if (sdkElements.length > 1 || nonSdkElements.length > 1) {
-        var conflictingElements = <Element>[
-          ...sdkElements,
-          ...nonSdkElements,
-        ];
-        return MultiplyDefinedElementImpl(
-            _definingLibrary.context,
-            _definingLibrary.session,
-            conflictingElements.first.name,
-            conflictingElements);
-      }
-      if (nonSdkElements.isNotEmpty) {
-        result = nonSdkElements.first;
-      } else if (sdkElements.isNotEmpty) {
-        result = sdkElements.first;
-      }
-    }
-
-    return result;
-  }
-}
-
-/// 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].
-  LibraryScope(LibraryElement definingLibrary)
-      : super(LibraryImportScope(definingLibrary)) {
-    _defineTopLevelNames(definingLibrary);
-
-    // For `dart:core` to be able to pass analysis, it has to have `dynamic`
-    // added to its library scope. Note that this is not true of, for instance,
-    // `Object`, because `Object` has a source definition which is not possible
-    // for `dynamic`.
-    if (definingLibrary.isDartCore) {
-      define(DynamicElementImpl.instance);
-    }
-  }
-
-  @override
-  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].
-  void _defineLocalNames(CompilationUnitElement compilationUnit) {
-    for (PropertyAccessorElement element in compilationUnit.accessors) {
-      define(element);
-    }
-    for (ClassElement element in compilationUnit.enums) {
-      define(element);
-    }
-    for (ExtensionElement element in compilationUnit.extensions) {
-      define(element);
-      _extensions.add(element);
-    }
-    for (FunctionElement element in compilationUnit.functions) {
-      define(element);
-    }
-    for (FunctionTypeAliasElement element
-        in compilationUnit.functionTypeAliases) {
-      define(element);
-    }
-    for (ClassElement element in compilationUnit.mixins) {
-      define(element);
-    }
-    for (ClassElement element in compilationUnit.types) {
-      define(element);
-    }
-  }
-
-  /// 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);
-    }
-    _defineLocalNames(definingLibrary.definingCompilationUnit);
-    for (CompilationUnitElement compilationUnit in definingLibrary.parts) {
-      _defineLocalNames(compilationUnit);
-    }
-  }
-}
-
 /// A mapping of identifiers to the elements represented by those identifiers.
 /// Namespaces are the building blocks for scopes.
 class Namespace {
@@ -666,6 +200,19 @@
     return Namespace(definedNames);
   }
 
+  /// Return elements imported with the given [element].
+  Iterable<Element> getImportedElements(ImportElement element) {
+    var importedLibrary = element.importedLibrary;
+
+    // If the URI is invalid.
+    if (importedLibrary == null) {
+      return [];
+    }
+
+    var map = _getExportMapping(importedLibrary);
+    return _applyCombinators(map, element.combinators).values;
+  }
+
   /// Add all of the names in the given [namespace] to the table of
   /// [definedNames].
   void _addAllFromNamespace(
@@ -679,7 +226,7 @@
   /// publicly visible name.
   void _addIfPublic(Map<String, Element> definedNames, Element element) {
     String name = element.name;
-    if (name != null && name.isNotEmpty && !Scope.isPrivateName(name)) {
+    if (name != null && name.isNotEmpty && !Identifier.isPrivateName(name)) {
       definedNames[name] = element;
     }
   }
@@ -858,133 +405,70 @@
   }
 }
 
-/// 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.
-  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.
-  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.
-  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.
-  Map<String, Element> _definedNames;
-
-  /// Return the scope in which this scope is lexically enclosed.
-  Scope get enclosingScope => null;
-
-  /// 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.
-  void define(Element element) {
-    String name = _getName(element);
-    if (name != null && name.isNotEmpty) {
-      _definedNames ??= HashMap<String, Element>();
-      _definedNames.putIfAbsent(name, () => element);
-    }
-  }
-
-  /// 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.
-  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.
-  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.
-  Element localLookup(String name) {
-    if (_definedNames != null) {
-      return _definedNames[name];
-    }
-    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.
-  Element lookup(Identifier identifier, LibraryElement referencingLibrary) {
-    if (identifier is PrefixedIdentifier) {
-      return _internalLookupPrefixed(
-          identifier.prefix.name, identifier.identifier.name);
-    }
-    return internalLookup(identifier.name);
-  }
-
+extension ScopeExtension on Scope {
   /// 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.
+  /// ignored (from the perspective of error reporting).
   bool shouldIgnoreUndefined(Identifier node) {
-    if (enclosingScope != null) {
-      return enclosingScope.shouldIgnoreUndefined(node);
+    if (node is PrefixedIdentifier) {
+      return shouldIgnoreUndefined2(
+        prefix: node.prefix.name,
+        name: node.identifier.name,
+      );
     }
-    return false;
+
+    return shouldIgnoreUndefined2(
+      prefix: null,
+      name: (node as SimpleIdentifier).name,
+    );
   }
 
-  /// Return the name that will be used to look up the given [element].
-  String _getName(Element element) {
-    if (element is MethodElement) {
-      MethodElement method = element;
-      if (method.name == "-" && method.parameters.isEmpty) {
-        return UNARY_MINUS;
+  /// Return `true` if the fact that the identifier with the given [prefix]
+  /// (might be `null`) and [name] is not defined should be ignored (from the
+  /// perspective of error reporting).
+  bool shouldIgnoreUndefined2({
+    @required String prefix,
+    @required String name,
+  }) {
+    return _enclosingLibraryScope.shouldIgnoreUndefined(
+      prefix: prefix,
+      name: name,
+    );
+  }
+
+  List<ExtensionElement> get extensions {
+    return _enclosingLibraryScope.extensions;
+  }
+
+  LibraryScope get _enclosingLibraryScope {
+    var scope = this;
+    while (scope != null) {
+      if (scope is LibraryScope) {
+        return scope;
+      }
+      scope = (scope as EnclosedScope).parent;
+    }
+    throw StateError('Can only be used in a LibraryScope.');
+  }
+
+  // TODO(scheglov) check if it might be inlined
+  Element lookupIdentifier(Identifier identifier) {
+    if (identifier is SimpleIdentifier) {
+      var result = lookup2(identifier.name);
+      return result.getter ?? result.setter;
+    } else {
+      var prefixedIdentifier = identifier as PrefixedIdentifier;
+
+      var prefixIdentifier = prefixedIdentifier.prefix;
+      var prefixName = prefixIdentifier.name;
+      var prefixElement = lookup2(prefixName).getter;
+      prefixIdentifier.staticElement = prefixElement;
+
+      if (prefixElement is PrefixElement) {
+        var name = prefixedIdentifier.identifier.name;
+        var result = prefixElement.scope.lookup2(name);
+        return result.getter ?? result.setter;
       }
     }
-    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.
-  Element _internalLookupPrefixed(String prefix, String 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.
-class TypeParameterScope extends EnclosedScope {
-  /// 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) {
-      throw ArgumentError("element cannot be null");
-    }
-    _defineTypeParameters(element);
-  }
-
-  /// Define the type parameters declared by the [element].
-  void _defineTypeParameters(TypeParameterizedElement element) {
-    for (TypeParameterElement typeParameter in element.typeParameters) {
-      define(typeParameter);
-    }
+    return null;
   }
 }
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 183cf50..29f8498 100644
--- a/pkg/analyzer/lib/src/dart/resolver/type_name_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/type_name_resolver.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/listener.dart';
@@ -23,7 +24,6 @@
   final TypeSystemImpl typeSystem;
   final DartType dynamicType;
   final bool isNonNullableByDefault;
-  final LibraryElement definingLibrary;
   final ErrorReporter errorReporter;
 
   Scope nameScope;
@@ -51,7 +51,7 @@
   ConstructorName rewriteResult;
 
   TypeNameResolver(this.typeSystem, TypeProvider typeProvider,
-      this.isNonNullableByDefault, this.definingLibrary, this.errorReporter)
+      this.isNonNullableByDefault, this.errorReporter)
       : dynamicType = typeProvider.dynamicType;
 
   NullabilitySuffix get _noneOrStarSuffix {
@@ -68,43 +68,51 @@
     rewriteResult = null;
 
     var typeIdentifier = node.name;
-
-    if (typeIdentifier is SimpleIdentifier && typeIdentifier.name == 'void') {
-      node.type = VoidTypeImpl.instance;
-      return;
-    }
-
-    var element = nameScope.lookup(typeIdentifier, definingLibrary);
-
-    if (element is MultiplyDefinedElement) {
-      _setElement(typeIdentifier, element);
-      node.type = dynamicType;
-      return;
-    }
-
-    if (element != null) {
-      _setElement(typeIdentifier, element);
-      node.type = _instantiateElement(node, element);
-      return;
-    }
-
-    if (_rewriteToConstructorName(node)) {
-      return;
-    }
-
-    // Full `prefix.Name` cannot be resolved, try to resolve 'prefix' alone.
     if (typeIdentifier is PrefixedIdentifier) {
-      var prefixIdentifier = typeIdentifier.prefix;
-      var prefixElement = nameScope.lookup(prefixIdentifier, definingLibrary);
-      prefixIdentifier.staticElement = prefixElement;
-    }
+      var prefix = typeIdentifier.prefix;
+      var prefixName = prefix.name;
+      var prefixElement = nameScope.lookup2(prefixName).getter;
+      prefix.staticElement = prefixElement;
 
-    node.type = dynamicType;
-    if (nameScope.shouldIgnoreUndefined(typeIdentifier)) {
-      return;
-    }
+      if (prefixElement == null) {
+        _resolveToElement(node, null);
+        return;
+      }
 
-    _ErrorHelper(errorReporter).reportNullOrNonTypeElement(node, null);
+      if (prefixElement is ClassElement) {
+        _rewriteToConstructorName(node, typeIdentifier);
+        return;
+      }
+
+      if (prefixElement is PrefixElement) {
+        var nameNode = typeIdentifier.identifier;
+        var name = nameNode.name;
+
+        var element = prefixElement.scope.lookup2(name).getter;
+        nameNode.staticElement = element;
+        _resolveToElement(node, element);
+        return;
+      }
+
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.PREFIX_SHADOWED_BY_LOCAL_DECLARATION,
+        prefix,
+        [prefix.name],
+      );
+      node.type = dynamicType;
+    } else {
+      var nameNode = typeIdentifier as SimpleIdentifier;
+      var name = nameNode.name;
+
+      if (name == 'void') {
+        node.type = VoidTypeImpl.instance;
+        return;
+      }
+
+      var element = nameScope.lookup2(name).getter;
+      nameNode.staticElement = element;
+      _resolveToElement(node, element);
+    }
   }
 
   /// Return type arguments, exactly [parameterCount].
@@ -114,7 +122,7 @@
 
     if (argumentCount != parameterCount) {
       errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
+        CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
         node,
         [node.name.name, parameterCount, argumentCount],
       );
@@ -293,61 +301,68 @@
     }
   }
 
-  /// We parse `foo.bar` as `prefix.Name` with the expectation that `prefix`
-  /// will be a [PrefixElement]. But we checked and found that `foo.bar` is
-  /// not in the scope, so try to see if it is `Class.constructor`.
-  ///
-  /// Return `true` if the node was rewritten as `Class.constructor`.
-  bool _rewriteToConstructorName(TypeName node) {
-    var typeIdentifier = node.name;
-    var constructorName = node.parent;
-    if (typeIdentifier is PrefixedIdentifier &&
-        constructorName is ConstructorName &&
-        constructorName.name == null) {
-      var classIdentifier = typeIdentifier.prefix;
-      var classElement = nameScope.lookup(classIdentifier, definingLibrary);
-      if (classElement is ClassElement) {
-        var constructorIdentifier = typeIdentifier.identifier;
-
-        var typeArguments = node.typeArguments;
-        if (typeArguments != null) {
-          errorReporter.reportErrorForNode(
-            StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-            typeArguments,
-            [classIdentifier.name, constructorIdentifier.name],
-          );
-          var instanceCreation = constructorName.parent;
-          if (instanceCreation is InstanceCreationExpressionImpl) {
-            instanceCreation.typeArguments = typeArguments;
-          }
-        }
-
-        node.name = classIdentifier;
-        node.typeArguments = null;
-
-        constructorName.period = typeIdentifier.period;
-        constructorName.name = constructorIdentifier;
-
-        rewriteResult = constructorName;
-        return true;
+  void _resolveToElement(TypeName node, Element element) {
+    if (element == null) {
+      node.type = dynamicType;
+      if (!nameScope.shouldIgnoreUndefined(node.name)) {
+        _ErrorHelper(errorReporter).reportNullOrNonTypeElement(node, null);
       }
+      return;
     }
 
-    return false;
+    if (element is MultiplyDefinedElement) {
+      node.type = dynamicType;
+      return;
+    }
+
+    node.type = _instantiateElement(node, element);
   }
 
-  /// Records the new Element for a TypeName's Identifier.
-  ///
-  /// A null may be passed in to indicate that the element can't be resolved.
-  /// (During a re-run of a task, it's important to clear any previous value
-  /// of the element.)
-  void _setElement(Identifier typeName, Element element) {
-    if (typeName is SimpleIdentifier) {
-      typeName.staticElement = element;
-    } else if (typeName is PrefixedIdentifier) {
-      typeName.identifier.staticElement = element;
-      SimpleIdentifier prefix = typeName.prefix;
-      prefix.staticElement = nameScope.lookup(prefix, definingLibrary);
+  /// We parse `foo.bar` as `prefix.Name` with the expectation that `prefix`
+  /// will be a [PrefixElement]. But when we resolved the `prefix` it turned
+  /// out to be a [ClassElement], so it is probably a `Class.constructor`.
+  void _rewriteToConstructorName(
+    TypeName node,
+    PrefixedIdentifier typeIdentifier,
+  ) {
+    var constructorName = node.parent;
+    if (constructorName is ConstructorName && constructorName.name == null) {
+      var classIdentifier = typeIdentifier.prefix;
+      var constructorIdentifier = typeIdentifier.identifier;
+
+      var typeArguments = node.typeArguments;
+      if (typeArguments != null) {
+        errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
+          typeArguments,
+          [classIdentifier.name, constructorIdentifier.name],
+        );
+        var instanceCreation = constructorName.parent;
+        if (instanceCreation is InstanceCreationExpressionImpl) {
+          instanceCreation.typeArguments = typeArguments;
+        }
+      }
+
+      node.name = classIdentifier;
+      node.typeArguments = null;
+
+      constructorName.period = typeIdentifier.period;
+      constructorName.name = constructorIdentifier;
+
+      rewriteResult = constructorName;
+      return;
+    }
+
+    if (_isInstanceCreation(node)) {
+      node.type = dynamicType;
+      _ErrorHelper(errorReporter).reportNewWithNonType(node);
+    } else {
+      node.type = dynamicType;
+      errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.NOT_A_TYPE,
+        typeIdentifier,
+        [typeIdentifier.name],
+      );
     }
   }
 
@@ -373,7 +388,7 @@
         errorReporter.reportErrorForNode(
           instanceCreation.isConst
               ? CompileTimeErrorCode.CONST_WITH_NON_TYPE
-              : StaticWarningCode.NEW_WITH_NON_TYPE,
+              : CompileTimeErrorCode.NEW_WITH_NON_TYPE,
           errorNode,
           [identifier.name],
         );
@@ -389,7 +404,7 @@
 
     if (errorNode.name == 'boolean') {
       errorReporter.reportErrorForNode(
-        StaticWarningCode.UNDEFINED_CLASS_BOOLEAN,
+        CompileTimeErrorCode.UNDEFINED_CLASS_BOOLEAN,
         errorNode,
       );
       return;
@@ -397,7 +412,7 @@
 
     if (_isTypeInCatchClause(node)) {
       errorReporter.reportErrorForNode(
-        StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE,
+        CompileTimeErrorCode.NON_TYPE_IN_CATCH_CLAUSE,
         identifier,
         [identifier.name],
       );
@@ -406,7 +421,7 @@
 
     if (_isTypeInAsExpression(node)) {
       errorReporter.reportErrorForNode(
-        StaticWarningCode.CAST_TO_NON_TYPE,
+        CompileTimeErrorCode.CAST_TO_NON_TYPE,
         identifier,
         [identifier.name],
       );
@@ -416,13 +431,13 @@
     if (_isTypeInIsExpression(node)) {
       if (element != null) {
         errorReporter.reportErrorForNode(
-          StaticWarningCode.TYPE_TEST_WITH_NON_TYPE,
+          CompileTimeErrorCode.TYPE_TEST_WITH_NON_TYPE,
           identifier,
           [identifier.name],
         );
       } else {
         errorReporter.reportErrorForNode(
-          StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME,
+          CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME,
           identifier,
           [identifier.name],
         );
@@ -441,7 +456,7 @@
 
     if (_isTypeInTypeArgumentList(node)) {
       errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT,
+        CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT,
         identifier,
         [identifier.name],
       );
@@ -476,7 +491,7 @@
 
     if (element != null) {
       errorReporter.reportErrorForNode(
-        StaticWarningCode.NOT_A_TYPE,
+        CompileTimeErrorCode.NOT_A_TYPE,
         identifier,
         [identifier.name],
       );
@@ -485,7 +500,7 @@
 
     if (identifier is SimpleIdentifier && identifier.name == 'await') {
       errorReporter.reportErrorForNode(
-        StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT,
+        CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT,
         node,
       );
       return;
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 7e3a0f5..b36521c 100644
--- a/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart
@@ -12,7 +12,6 @@
 import 'package:analyzer/src/dart/element/element.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_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';
@@ -176,22 +175,37 @@
       return _typeProvider.dynamicType;
     } else if (element is SpreadElement) {
       var expressionType = element.expression.staticType;
+
+      var iterableType = expressionType.asInstanceOf(
+        _typeProvider.iterableElement,
+      );
+      if (iterableType != null) {
+        return iterableType.typeArguments[0];
+      }
+
       if (expressionType.isDynamic) {
-        return expressionType;
-      } else if (expressionType is InterfaceTypeImpl) {
+        return _typeProvider.dynamicType;
+      }
+
+      if (_typeSystem.isNonNullableByDefault) {
+        if (_typeSystem.isSubtypeOf2(expressionType, NeverTypeImpl.instance)) {
+          return NeverTypeImpl.instance;
+        }
+        if (_typeSystem.isSubtypeOf2(expressionType, _typeSystem.nullNone)) {
+          if (element.isNullAware) {
+            return NeverTypeImpl.instance;
+          }
+          return _typeProvider.dynamicType;
+        }
+      } else {
         if (expressionType.isDartCoreNull) {
           if (element.isNullAware) {
             return expressionType;
           }
-        } else {
-          var iterableType = expressionType.asInstanceOf(
-            _typeProvider.iterableElement,
-          );
-          if (iterableType != null) {
-            return iterableType.typeArguments[0];
-          }
+          return _typeProvider.dynamicType;
         }
       }
+
       // TODO(brianwilkerson) Report this as an error.
       return _typeProvider.dynamicType;
     }
@@ -252,39 +266,42 @@
     return _LiteralResolution(_LiteralResolutionKind.ambiguous, null);
   }
 
-  /// If [contextType] is defined and is a subtype of `Iterable<Object>` and
-  /// [contextType] is not a subtype of `Map<Object, Object>`, then *e* is a set
+  /// If [contextType] implements `Iterable`, but not `Map`, then *e* is a set
   /// literal.
   ///
-  /// If [contextType] is defined and is a subtype of `Map<Object, Object>` and
-  /// [contextType] is not a subtype of `Iterable<Object>` then *e* is a map
+  /// If [contextType] implements `Map`, but not `Iterable`, then *e* is a map
   /// literal.
   _LiteralResolution _fromContextType(DartType contextType) {
     if (contextType != null) {
-      DartType unwrap(DartType type) {
-        if (type is InterfaceType &&
-            type.isDartAsyncFutureOr &&
-            type.typeArguments.length == 1) {
-          return unwrap(type.typeArguments[0]);
-        }
-        return type;
-      }
-
-      DartType unwrappedContextType = unwrap(contextType);
+      var unwrappedContextType = _typeSystem.futureOrBase(contextType);
       // TODO(brianwilkerson) Find out what the "greatest closure" is and use that
       // where [unwrappedContextType] is used below.
-      bool isIterable = _typeSystem.isSubtypeOf2(
-          unwrappedContextType, _typeProvider.iterableForSetMapDisambiguation);
-      bool isMap = _typeSystem.isSubtypeOf2(
-          unwrappedContextType, _typeProvider.mapForSetMapDisambiguation);
+      var iterableType = unwrappedContextType.asInstanceOf(
+        _typeProvider.iterableElement,
+      );
+      var mapType = unwrappedContextType.asInstanceOf(
+        _typeProvider.mapElement,
+      );
+      var isIterable = iterableType != null;
+      var isMap = mapType != null;
+
+      // When `S` implements `Iterable` but not `Map`, `e` is a set literal.
       if (isIterable && !isMap) {
         return _LiteralResolution(
-            _LiteralResolutionKind.set, unwrappedContextType);
-      } else if (isMap && !isIterable) {
+          _LiteralResolutionKind.set,
+          unwrappedContextType,
+        );
+      }
+
+      // When `S` implements `Map` but not `Iterable`, `e` is a map literal.
+      if (isMap && !isIterable) {
         return _LiteralResolution(
-            _LiteralResolutionKind.map, unwrappedContextType);
+          _LiteralResolutionKind.map,
+          unwrappedContextType,
+        );
       }
     }
+
     return _LiteralResolution(_LiteralResolutionKind.ambiguous, null);
   }
 
@@ -332,39 +349,69 @@
           valueType: element.value.staticType);
     } else if (element is SpreadElement) {
       DartType expressionType = element.expression.staticType;
-      bool isNull = expressionType.isDartCoreNull;
-      if (!isNull && expressionType is InterfaceType) {
-        if (_typeSystem.isSubtypeOf2(
-            expressionType, _typeProvider.iterableForSetMapDisambiguation)) {
-          InterfaceType iterableType = (expressionType as InterfaceTypeImpl)
-              .asInstanceOf(_typeProvider.iterableElement);
-          return _InferredCollectionElementTypeInformation(
-              elementType: iterableType.typeArguments[0],
-              keyType: null,
-              valueType: null);
-        } else if (_typeSystem.isSubtypeOf2(
-            expressionType, _typeProvider.mapForSetMapDisambiguation)) {
-          InterfaceType mapType = (expressionType as InterfaceTypeImpl)
-              .asInstanceOf(_typeProvider.mapElement);
-          List<DartType> typeArguments = mapType.typeArguments;
-          return _InferredCollectionElementTypeInformation(
-              elementType: null,
-              keyType: typeArguments[0],
-              valueType: typeArguments[1]);
-        }
-      } else if (expressionType.isDynamic) {
+
+      var iterableType = expressionType.asInstanceOf(
+        _typeProvider.iterableElement,
+      );
+      if (iterableType != null) {
         return _InferredCollectionElementTypeInformation(
-            elementType: expressionType,
-            keyType: expressionType,
-            valueType: expressionType);
-      } else if (isNull && element.isNullAware) {
-        return _InferredCollectionElementTypeInformation(
-            elementType: expressionType,
-            keyType: expressionType,
-            valueType: expressionType);
+          elementType: iterableType.typeArguments[0],
+          keyType: null,
+          valueType: null,
+        );
       }
+
+      var mapType = expressionType.asInstanceOf(
+        _typeProvider.mapElement,
+      );
+      if (mapType != null) {
+        return _InferredCollectionElementTypeInformation(
+          elementType: null,
+          keyType: mapType.typeArguments[0],
+          valueType: mapType.typeArguments[1],
+        );
+      }
+
+      if (expressionType.isDynamic) {
+        return _InferredCollectionElementTypeInformation(
+          elementType: expressionType,
+          keyType: expressionType,
+          valueType: expressionType,
+        );
+      }
+
+      if (_typeSystem.isNonNullableByDefault) {
+        if (_typeSystem.isSubtypeOf2(expressionType, NeverTypeImpl.instance)) {
+          return _InferredCollectionElementTypeInformation(
+            elementType: NeverTypeImpl.instance,
+            keyType: NeverTypeImpl.instance,
+            valueType: NeverTypeImpl.instance,
+          );
+        }
+        if (_typeSystem.isSubtypeOf2(expressionType, _typeSystem.nullNone)) {
+          if (element.isNullAware) {
+            return _InferredCollectionElementTypeInformation(
+              elementType: NeverTypeImpl.instance,
+              keyType: NeverTypeImpl.instance,
+              valueType: NeverTypeImpl.instance,
+            );
+          }
+        }
+      } else {
+        if (expressionType.isDartCoreNull && element.isNullAware) {
+          return _InferredCollectionElementTypeInformation(
+            elementType: expressionType,
+            keyType: expressionType,
+            valueType: expressionType,
+          );
+        }
+      }
+
       return _InferredCollectionElementTypeInformation(
-          elementType: null, keyType: null, valueType: null);
+        elementType: null,
+        keyType: null,
+        valueType: null,
+      );
     } else {
       throw StateError('Unknown element type ${element.runtimeType}');
     }
@@ -468,38 +515,54 @@
     } else if (canBeAMap && mustBeAMap) {
       return _toMapType(literal, contextType, inferredTypes);
     }
+
     // Note: according to the spec, the following computations should be based
     // on the greatest closure of the context type (unless the context type is
     // `_`).  In practice, we can just use the context type directly, because
     // the only way the greatest closure of the context type could possibly have
     // a different subtype relationship to `Iterable<Object>` and
     // `Map<Object, Object>` is if the context type is `_`.
-    bool contextProvidesAmbiguityResolutionClues =
-        contextType != null && contextType is! UnknownInferredType;
-    bool contextIsIterable = contextProvidesAmbiguityResolutionClues &&
-        _typeSystem.isSubtypeOf2(
-            contextType, _typeProvider.iterableForSetMapDisambiguation);
-    bool contextIsMap = contextProvidesAmbiguityResolutionClues &&
-        _typeSystem.isSubtypeOf2(
-            contextType, _typeProvider.mapForSetMapDisambiguation);
-    if (contextIsIterable && !contextIsMap) {
-      return _toSetType(literal, contextType, inferredTypes);
-    } else if ((contextIsMap && !contextIsIterable) || elements.isEmpty) {
-      return _toMapType(literal, contextType, inferredTypes);
-    } else {
-      // Ambiguous.  We're not going to get any more information to resolve the
-      // ambiguity.  We don't want to make an arbitrary decision at this point
-      // because it will interfere with future type inference (see
-      // dartbug.com/36210), so we return a type of `dynamic`.
-      if (mustBeAMap && mustBeASet) {
-        _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH, literal);
-      } else {
-        _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, literal);
+    if (contextType != null) {
+      var contextIterableType = contextType.asInstanceOf(
+        _typeProvider.iterableElement,
+      );
+      var contextMapType = contextType.asInstanceOf(
+        _typeProvider.mapElement,
+      );
+      var contextIsIterable = contextIterableType != null;
+      var contextIsMap = contextMapType != null;
+
+      // When `S` implements `Iterable` but not `Map`, `e` is a set literal.
+      if (contextIsIterable && !contextIsMap) {
+        return _toSetType(literal, contextType, inferredTypes);
       }
-      return _typeProvider.dynamicType;
+
+      // When `S` implements `Map` but not `Iterable`, `e` is a map literal.
+      if (contextIsMap && !contextIsIterable) {
+        return _toMapType(literal, contextType, inferredTypes);
+      }
     }
+
+    // When `e` is of the form `{}` and `S` is undefined, `e` is a map literal.
+    if (elements.isEmpty && contextType == null) {
+      return _typeProvider.mapType2(
+        DynamicTypeImpl.instance,
+        DynamicTypeImpl.instance,
+      );
+    }
+
+    // Ambiguous.  We're not going to get any more information to resolve the
+    // ambiguity.  We don't want to make an arbitrary decision at this point
+    // because it will interfere with future type inference (see
+    // dartbug.com/36210), so we return a type of `dynamic`.
+    if (mustBeAMap && mustBeASet) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH, literal);
+    } else {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, literal);
+    }
+    return _typeProvider.dynamicType;
   }
 
   DartType _inferSetTypeDownwards(SetOrMapLiteral node, DartType contextType) {
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 00aea98..e79edc9 100644
--- a/pkg/analyzer/lib/src/dart/resolver/yield_statement_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/yield_statement_resolver.dart
@@ -41,7 +41,7 @@
   /// it returns 'void'. Or, in rare cases, when other types of expressions are
   /// void, such as identifiers.
   ///
-  /// See [StaticWarningCode.USE_OF_VOID_RESULT].
+  /// See [CompileTimeErrorCode.USE_OF_VOID_RESULT].
   ///
   /// TODO(scheglov) This is duplicate
   /// TODO(scheglov) Also in [BoolExpressionVerifier]
@@ -52,12 +52,12 @@
 
     if (expression is MethodInvocation) {
       _errorReporter.reportErrorForNode(
-        StaticWarningCode.USE_OF_VOID_RESULT,
+        CompileTimeErrorCode.USE_OF_VOID_RESULT,
         expression.methodName,
       );
     } else {
       _errorReporter.reportErrorForNode(
-        StaticWarningCode.USE_OF_VOID_RESULT,
+        CompileTimeErrorCode.USE_OF_VOID_RESULT,
         expression,
       );
     }
@@ -87,7 +87,7 @@
     if (declaredReturnType != null) {
       if (!_typeSystem.isAssignableTo2(impliedReturnType, declaredReturnType)) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+          CompileTimeErrorCode.YIELD_OF_INVALID_TYPE,
           expression,
           [impliedReturnType, declaredReturnType],
         );
@@ -108,7 +108,7 @@
 
       if (!_typeSystem.isAssignableTo2(impliedReturnType, requiredReturnType)) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+          CompileTimeErrorCode.YIELD_OF_INVALID_TYPE,
           expression,
           [impliedReturnType, requiredReturnType],
         );
diff --git a/pkg/analyzer/lib/src/dart/scanner/scanner.dart b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
index c2ce2e8..7266b2d 100644
--- a/pkg/analyzer/lib/src/dart/scanner/scanner.dart
+++ b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
@@ -102,7 +102,7 @@
   fasta.LanguageVersionToken get languageVersion => _languageVersion;
 
   set preserveComments(bool preserveComments) {
-    this._preserveComments = preserveComments;
+    _preserveComments = preserveComments;
   }
 
   /// Configures the scanner appropriately for the given [featureSet].
@@ -114,8 +114,8 @@
     @required FeatureSet featureSetForOverriding,
     @required FeatureSet featureSet,
   }) {
-    this._featureSetForOverriding = featureSetForOverriding;
-    this._featureSet = featureSet;
+    _featureSetForOverriding = featureSetForOverriding;
+    _featureSet = featureSet;
     enableGtGtGt = featureSet.isEnabled(Feature.triple_shift);
     enableNonNullable = featureSet.isEnabled(Feature.non_nullable);
   }
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
index f8e3074..28a8cd2 100644
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -15,9 +15,16 @@
 import 'package:analyzer/src/generated/java_engine_io.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:path/path.dart' as pathos;
+import 'package:pub_semver/pub_semver.dart';
 import 'package:yaml/yaml.dart';
 
+Version languageVersionFromSdkVersion(String sdkVersionStr) {
+  var sdkVersionParts = sdkVersionStr.split('.');
+  var sdkVersionMajor = int.parse(sdkVersionParts[0]);
+  var sdkVersionMinor = int.parse(sdkVersionParts[1]);
+  return Version(sdkVersionMajor, sdkVersionMinor, 0);
+}
+
 /// 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.
@@ -199,11 +206,21 @@
   static const String _DART_COLON_PREFIX = 'dart:';
 
   static const String _EMBEDDED_LIB_MAP_KEY = 'embedded_libs';
+
+  Version _languageVersion;
+
   final Map<String, String> _urlMappings = HashMap<String, String>();
 
+  /// TODO(scheglov) Make [languageVersion] required.
+  /// https://github.com/dart-lang/sdk/issues/42890
   EmbedderSdk(
-      ResourceProvider resourceProvider, Map<Folder, YamlMap> embedderYamls) {
+    ResourceProvider resourceProvider,
+    Map<Folder, YamlMap> embedderYamls, {
+    Version languageVersion,
+  }) {
     this.resourceProvider = resourceProvider;
+    _languageVersion =
+        languageVersion ?? languageVersionFromSdkVersion(io.Platform.version);
     embedderYamls?.forEach(_processEmbedderYaml);
   }
 
@@ -224,6 +241,9 @@
   }
 
   @override
+  Version get languageVersion => _languageVersion;
+
+  @override
   // TODO(danrubel) Determine SDK version
   String get sdkVersion => '0';
 
@@ -366,6 +386,9 @@
   /// discovered.
   String _sdkVersion;
 
+  /// The cached language version of this SDK.
+  Version _languageVersion;
+
   /// The file containing the pub executable.
   File _pubExecutable;
 
@@ -397,6 +420,18 @@
   Folder get docDirectory =>
       _sdkDirectory.getChildAssumingFolder(_DOCS_DIRECTORY_NAME);
 
+  @override
+  Version get languageVersion {
+    if (_languageVersion == null) {
+      var sdkVersionStr = _sdkDirectory
+          .getChildAssumingFile(_VERSION_FILE_NAME)
+          .readAsStringSync();
+      _languageVersion = languageVersionFromSdkVersion(sdkVersionStr);
+    }
+
+    return _languageVersion;
+  }
+
   /// Return the directory within the SDK directory that contains the libraries.
   Folder get libraryDirectory {
     return _libraryDirectory ??=
@@ -522,58 +557,6 @@
       return null;
     }
   }
-
-  /// 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
-    // uses cli_utils to find the SDK. Not sure why they're different.
-    String sdkProperty = getSdkProperty(resourceProvider);
-    if (sdkProperty == null) {
-      return null;
-    }
-    Folder sdkDirectory = resourceProvider.getFolder(sdkProperty);
-    if (!sdkDirectory.exists) {
-      return null;
-    }
-    return sdkDirectory;
-  }
-
-  static String getSdkProperty(ResourceProvider resourceProvider) {
-    String exec = io.Platform.resolvedExecutable;
-    if (exec.isEmpty) {
-      return null;
-    }
-    pathos.Context pathContext = resourceProvider.pathContext;
-    if (pathContext.style != pathos.context.style) {
-      // This will only happen when running tests.
-      if (exec.startsWith(RegExp('[a-zA-Z]:'))) {
-        exec = exec.substring(2);
-      } else if (resourceProvider is MemoryResourceProvider) {
-        exec = resourceProvider.convertPath(exec);
-      }
-      exec = pathContext.fromUri(pathos.context.toUri(exec));
-    }
-    // Might be "xcodebuild/ReleaseIA32/dart" with "sdk" sibling
-    String outDir = pathContext.dirname(pathContext.dirname(exec));
-    String sdkPath = pathContext.join(pathContext.dirname(outDir), "sdk");
-    if (resourceProvider.getFolder(sdkPath).exists) {
-      // We are executing in the context of a test.  sdkPath is the path to the
-      // *source* files for the SDK.  But we want to test using the path to the
-      // *built* SDK if possible.
-      String builtSdkPath =
-          pathContext.join(pathContext.dirname(exec), 'dart-sdk');
-      if (resourceProvider.getFolder(builtSdkPath).exists) {
-        return builtSdkPath;
-      } else {
-        return sdkPath;
-      }
-    }
-    // probably be "dart-sdk/bin/dart"
-    return pathContext.dirname(pathContext.dirname(exec));
-  }
 }
 
 /// An object used to read and parse the libraries file
diff --git a/pkg/analyzer/lib/src/diagnostic/diagnostic_factory.dart b/pkg/analyzer/lib/src/diagnostic/diagnostic_factory.dart
index 63533de..14c09b7 100644
--- a/pkg/analyzer/lib/src/diagnostic/diagnostic_factory.dart
+++ b/pkg/analyzer/lib/src/diagnostic/diagnostic_factory.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/diagnostic/diagnostic.dart';
 import 'package:analyzer/error/error.dart';
@@ -47,6 +48,25 @@
     ]);
   }
 
+  /// Return a diagnostic indicating that the [duplicateKey] (in a constant map)
+  /// is a duplicate of the [originalKey].
+  AnalysisError invalidNullAwareAfterShortCircuit(Source source, int offset,
+      int length, List<Object> arguments, Token previousToken) {
+    var lexeme = previousToken.lexeme;
+    return AnalysisError(
+        source,
+        offset,
+        length,
+        StaticWarningCode.INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT,
+        arguments, [
+      DiagnosticMessageImpl(
+          filePath: source.fullName,
+          message: "The operator '$lexeme' is causing the short circuiting.",
+          offset: previousToken.offset,
+          length: previousToken.length)
+    ]);
+  }
+
   /// Return a diagnostic indicating that the given [identifier] was referenced
   /// before it was declared.
   AnalysisError referencedBeforeDeclaration(
diff --git a/pkg/analyzer/lib/src/error/best_practices_verifier.dart b/pkg/analyzer/lib/src/error/best_practices_verifier.dart
index ba3ca9e..6eff16b 100644
--- a/pkg/analyzer/lib/src/error/best_practices_verifier.dart
+++ b/pkg/analyzer/lib/src/error/best_practices_verifier.dart
@@ -13,10 +13,9 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/builder.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
+import 'package:analyzer/src/dart/element/member.dart' show ExecutableMember;
 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';
@@ -65,7 +64,7 @@
   final _InvalidAccessVerifier _invalidAccessVerifier;
 
   /// The [WorkspacePackage] in which [_currentLibrary] is declared.
-  WorkspacePackage _workspacePackage;
+  final WorkspacePackage _workspacePackage;
 
   /// The [LinterContext] used for possible const calculations.
   LinterContext _linterContext;
@@ -87,9 +86,9 @@
     String content, {
     @required TypeSystemImpl typeSystem,
     @required InheritanceManager3 inheritanceManager,
-    @required ResourceProvider resourceProvider,
     @required DeclaredVariables declaredVariables,
     @required AnalysisOptions analysisOptions,
+    @required WorkspacePackage workspacePackage,
   })  : _nullType = typeProvider.nullType,
         _typeSystem = typeSystem,
         _isNonNullableByDefault = typeSystem.isNonNullableByDefault,
@@ -97,10 +96,9 @@
             (analysisOptions as AnalysisOptionsImpl).strictInference,
         _inheritanceManager = inheritanceManager,
         _invalidAccessVerifier =
-            _InvalidAccessVerifier(_errorReporter, _currentLibrary) {
+            _InvalidAccessVerifier(_errorReporter, _currentLibrary),
+        _workspacePackage = workspacePackage {
     _inDeprecatedMember = _currentLibrary.hasDeprecated;
-    String libraryPath = _currentLibrary.source.fullName;
-    _workspacePackage = _getPackage(libraryPath, resourceProvider);
 
     _linterContext = LinterContextImpl(
       null /* allUnits */,
@@ -282,7 +280,8 @@
         }
       }
     }
-    _checkStrictInferenceInParameters(node.parameters);
+    _checkStrictInferenceInParameters(node.parameters,
+        body: node.body, initializers: node.initializers);
     super.visitConstructorDeclaration(node);
   }
 
@@ -363,7 +362,8 @@
       if (node.parent is CompilationUnit && !node.isSetter) {
         _checkStrictInferenceReturnType(node.returnType, node, node.name.name);
       }
-      _checkStrictInferenceInParameters(node.functionExpression.parameters);
+      _checkStrictInferenceInParameters(node.functionExpression.parameters,
+          body: node.functionExpression.body);
       super.visitFunctionDeclaration(node);
     } finally {
       _inDeprecatedMember = wasInDeprecatedMember;
@@ -384,7 +384,7 @@
     }
     DartType functionType = InferenceContext.getContext(node);
     if (functionType is! FunctionType) {
-      _checkStrictInferenceInParameters(node.parameters);
+      _checkStrictInferenceInParameters(node.parameters, body: node.body);
     }
     super.visitFunctionExpression(node);
   }
@@ -403,6 +403,7 @@
   @override
   void visitFunctionTypeAlias(FunctionTypeAlias node) {
     _checkStrictInferenceReturnType(node.returnType, node, node.name.name);
+    _checkStrictInferenceInParameters(node.parameters);
     super.visitFunctionTypeAlias(node);
   }
 
@@ -496,7 +497,7 @@
       if (!node.isSetter && !elementIsOverride()) {
         _checkStrictInferenceReturnType(node.returnType, node, node.name.name);
       }
-      _checkStrictInferenceInParameters(node.parameters);
+      _checkStrictInferenceInParameters(node.parameters, body: node.body);
 
       ExecutableElement overriddenElement = getConcreteOverriddenElement();
       if (overriddenElement == null && (node.isSetter || node.isGetter)) {
@@ -1316,9 +1317,37 @@
 
   /// In "strict-inference" mode, check that each of the [parameters]' type is
   /// specified.
-  void _checkStrictInferenceInParameters(FormalParameterList parameters) {
+  ///
+  /// Only parameters which are referenced in [initializers] or [body] are
+  /// reported. If [initializers] and [body] are both null, the parameters are
+  /// assumed to originate from a typedef, function-typed parameter, or function
+  /// which is abstract or external.
+  void _checkStrictInferenceInParameters(FormalParameterList parameters,
+      {List<ConstructorInitializer> initializers, FunctionBody body}) {
+    _UsedParameterVisitor usedParameterVisitor;
+
+    bool isParameterReferenced(SimpleFormalParameter parameter) {
+      if ((body == null || body is EmptyFunctionBody) && initializers == null) {
+        // The parameter is in a typedef, or function that is abstract,
+        // external, etc.
+        return true;
+      }
+      if (usedParameterVisitor == null) {
+        // Visit the function body and initializers once to determine whether
+        // each of the parameters is referenced.
+        usedParameterVisitor = _UsedParameterVisitor(
+            parameters.parameters.map((p) => p.declaredElement).toSet());
+        body?.accept(usedParameterVisitor);
+        for (var initializer in initializers ?? []) {
+          initializer.accept(usedParameterVisitor);
+        }
+      }
+
+      return usedParameterVisitor.isUsed(parameter.declaredElement);
+    }
+
     void checkParameterTypeIsKnown(SimpleFormalParameter parameter) {
-      if (parameter.type == null) {
+      if (parameter.type == null && isParameterReferenced(parameter)) {
         ParameterElement element = parameter.declaredElement;
         _errorReporter.reportErrorForNode(
           HintCode.INFERENCE_FAILURE_ON_UNTYPED_PARAMETER,
@@ -1356,20 +1385,6 @@
     }
   }
 
-  WorkspacePackage _getPackage(String root, ResourceProvider resourceProvider) {
-    Workspace workspace = _currentLibrary.session?.analysisContext?.workspace;
-    // If there is no driver setup (as in test environments), we need to create
-    // a workspace ourselves.
-    // todo (pq): fix tests or otherwise de-dup this logic shared w/ library_analyzer.
-    if (workspace == null) {
-      final builder = ContextBuilder(
-          resourceProvider, null /* sdkManager */, null /* contentCache */);
-      workspace =
-          ContextBuilder.createWorkspace(resourceProvider, root, builder);
-    }
-    return workspace?.findPackageFor(root);
-  }
-
   bool _isLibraryInWorkspacePackage(LibraryElement library) {
     if (_workspacePackage == null || library == null) {
       // Better to not make a big claim that they _are_ in the same package,
@@ -1543,9 +1558,9 @@
     }
     AstNode grandparent = parent?.parent;
 
-    var element;
-    var name;
-    var node;
+    Element element;
+    String name;
+    AstNode node;
 
     if (grandparent is ConstructorName) {
       element = grandparent.staticElement;
@@ -1626,18 +1641,7 @@
     if (element == null) {
       return false;
     }
-    if (element == superElement) {
-      return true;
-    }
-    // TODO(scheglov) `allSupertypes` is very expensive
-    var allSupertypes = element.allSupertypes;
-    for (var i = 0; i < allSupertypes.length; i++) {
-      var supertype = allSupertypes[i];
-      if (supertype.element == superElement) {
-        return true;
-      }
-    }
-    return false;
+    return element.thisType.asInstanceOf(superElement) != null;
   }
 
   bool _hasVisibleForTemplate(Element element) {
@@ -1681,3 +1685,27 @@
       identifier.parent is Combinator &&
       identifier.parent.parent is ExportDirective;
 }
+
+/// A visitor that determines, upon visiting a function body and/or a
+/// constructor's initializers, whether a parameter is referenced.
+class _UsedParameterVisitor extends RecursiveAstVisitor<void> {
+  final Set<ParameterElement> _parameters;
+
+  final Set<ParameterElement> _usedParameters = {};
+
+  _UsedParameterVisitor(this._parameters);
+
+  bool isUsed(ParameterElement parameter) =>
+      _usedParameters.contains(parameter);
+
+  @override
+  void visitSimpleIdentifier(SimpleIdentifier node) {
+    Element element = node.staticElement;
+    if (element is ExecutableMember) {
+      element = element.declaration;
+    }
+    if (_parameters.contains(element)) {
+      _usedParameters.add(element);
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/error/bool_expression_verifier.dart b/pkg/analyzer/lib/src/error/bool_expression_verifier.dart
index 3769e07..05eb039 100644
--- a/pkg/analyzer/lib/src/error/bool_expression_verifier.dart
+++ b/pkg/analyzer/lib/src/error/bool_expression_verifier.dart
@@ -35,11 +35,11 @@
   /// Check to ensure that the [condition] is of type bool, are. Otherwise an
   /// error is reported on the expression.
   ///
-  /// See [StaticTypeWarningCode.NON_BOOL_CONDITION].
+  /// See [CompileTimeErrorCode.NON_BOOL_CONDITION].
   void checkForNonBoolCondition(Expression condition) {
     checkForNonBoolExpression(
       condition,
-      errorCode: StaticTypeWarningCode.NON_BOOL_CONDITION,
+      errorCode: CompileTimeErrorCode.NON_BOOL_CONDITION,
     );
   }
 
@@ -62,7 +62,7 @@
   void checkForNonBoolNegationExpression(Expression expression) {
     checkForNonBoolExpression(
       expression,
-      errorCode: StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION,
+      errorCode: CompileTimeErrorCode.NON_BOOL_NEGATION_EXPRESSION,
     );
   }
 
@@ -79,12 +79,12 @@
     if (expression is MethodInvocation) {
       SimpleIdentifier methodName = expression.methodName;
       _errorReporter.reportErrorForNode(
-        StaticWarningCode.USE_OF_VOID_RESULT,
+        CompileTimeErrorCode.USE_OF_VOID_RESULT,
         methodName,
       );
     } else {
       _errorReporter.reportErrorForNode(
-        StaticWarningCode.USE_OF_VOID_RESULT,
+        CompileTimeErrorCode.USE_OF_VOID_RESULT,
         expression,
       );
     }
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 6071d56..b4f23ee 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 
 import 'analyzer_error_code.dart';
 
@@ -17,173 +16,25 @@
 // ignore_for_file: slash_for_doc_comments
 
 /**
- * The error codes used for compile time errors caused by constant evaluation
- * that would throw an exception when run in checked mode. The client of the
- * analysis engine is responsible for determining how these errors should be
- * presented to the user (for example, a command-line compiler might elect to
- * treat these errors differently depending whether it is compiling it "checked"
- * mode).
- */
-class CheckedModeCompileTimeErrorCode extends AnalyzerErrorCode {
-  // TODO(paulberry): improve the text of these error messages so that it's
-  // clear to the user that the error is coming from constant evaluation (and
-  // hence the constant needs to be a subtype of the annotated type) as opposed
-  // to static type analysis (which only requires that the two types be
-  // assignable).  Also consider populating the "correction" field for these
-  // errors.
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
-   * object results in an uncaught exception being thrown.
-   */
-  static const CheckedModeCompileTimeErrorCode
-      CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH = CheckedModeCompileTimeErrorCode(
-          'CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH',
-          "A value of type '{0}' can't be assigned to the field '{1}', which "
-              "has type '{2}'.");
-
-  /**
-   * Parameters:
-   * 0: The type of the runtime value of the argument
-   * 1: The static type of the parameter
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the runtime type of a constant
-  // value can't be assigned to the static type of a constant constructor's
-  // parameter.
-  //
-  // #### Example
-  //
-  // 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`:
-  //
-  // ```dart
-  // class C {
-  //   final String s;
-  //
-  //   const C(this.s);
-  // }
-  //
-  // const dynamic i = 0;
-  //
-  // void f() {
-  //   const C([!i!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Pass a value of the correct type to the constructor:
-  //
-  // ```dart
-  // class C {
-  //   final String s;
-  //
-  //   const C(this.s);
-  // }
-  //
-  // const dynamic i = 0;
-  //
-  // void f() {
-  //   const C('$i');
-  // }
-  // ```
-  static const CheckedModeCompileTimeErrorCode
-      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}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
-   * if o is not <b>null</b> and the interface of the class of <i>o</i> is not a
-   * subtype of the static type of the field <i>v</i>.
-   *
-   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
-   * object results in an uncaught exception being thrown.
-   *
-   * Parameters:
-   * 0: the name of the type of the initializer expression
-   * 1: the name of the type of the field
-   */
-  static const CheckedModeCompileTimeErrorCode
-      CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE = CheckedModeCompileTimeErrorCode(
-          'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE',
-          "The initializer type '{0}' can't be assigned to the field type "
-              "'{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the type of the object being assigned.
-   * 1: the type of the variable being assigned to
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the evaluation of a constant
-  // expression would result in a `CastException`.
-  //
-  // #### Examples
-  //
-  // 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`:
-  //
-  // ```dart
-  // const Object x = 0;
-  // const String y = [!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the declaration of the constant is correct, then change the value being
-  // assigned to be of the correct type:
-  //
-  // ```dart
-  // const Object x = 0;
-  // const String y = '$x';
-  // ```
-  //
-  // If the assigned value is correct, then change the declaration to have the
-  // correct type:
-  //
-  // ```dart
-  // const Object x = 0;
-  // const int y = x;
-  // ```
-  static const CheckedModeCompileTimeErrorCode VARIABLE_TYPE_MISMATCH =
-      CheckedModeCompileTimeErrorCode(
-          'VARIABLE_TYPE_MISMATCH',
-          "A value of type '{0}' can't be assigned to a variable of type "
-              "'{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Initialize a newly created error code to have the given [name]. The message
-   * associated with the error will be created from the given [message]
-   * template. The correction associated with the error will be created from the
-   * given [correction] template.
-   */
-  const CheckedModeCompileTimeErrorCode(String name, String message,
-      {String correction, bool hasPublishedDocs})
-      : super.temporary(name, message,
-            correction: correction, hasPublishedDocs: hasPublishedDocs);
-
-  @override
-  ErrorSeverity get errorSeverity =>
-      ErrorType.CHECKED_MODE_COMPILE_TIME_ERROR.severity;
-
-  @override
-  ErrorType get type => ErrorType.CHECKED_MODE_COMPILE_TIME_ERROR;
-}
-
-/**
  * The error codes used for compile time errors. 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 CompileTimeErrorCode extends AnalyzerErrorCode {
+  static const CompileTimeErrorCode ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER =
+      CompileTimeErrorCode('ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER',
+          'Abstract fields cannot have initializers.',
+          correction:
+              "Try removing the field initializer or the 'abstract' keyword "
+              "from the field declaration.");
+
+  static const CompileTimeErrorCode ABSTRACT_FIELD_INITIALIZER =
+      CompileTimeErrorCode('ABSTRACT_FIELD_INITIALIZER',
+          'Abstract fields cannot have initializers.',
+          correction:
+              "Try removing the initializer or the 'abstract' keyword.");
+
   /**
    * Parameters:
    * 0: the display name for the kind of the found abstract member
@@ -323,6 +174,81 @@
           hasPublishedDocs: true);
 
   /**
+   * Parameters:
+   * 0: the name of the ambiguous type
+   * 1: the name of the first library that the type is found
+   * 2: the name of the second library that the type is found
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name is referenced that is
+  // declared in two or more imported libraries.
+  //
+  // #### Examples
+  //
+  // Given a library (`a.dart`) that defines a class (`C` in this example):
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // class A {}
+  // class C {}
+  // ```
+  //
+  // And a library (`b.dart`) that defines a different class with the same name:
+  //
+  // ```dart
+  // %uri="lib/b.dart"
+  // class B {}
+  // class C {}
+  // ```
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // import 'a.dart';
+  // import 'b.dart';
+  //
+  // void f([!C!] c1, [!C!] c2) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If any of the libraries aren't needed, then remove the import directives
+  // for them:
+  //
+  // ```dart
+  // import 'a.dart';
+  //
+  // void f(C c1, C c2) {}
+  // ```
+  //
+  // 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:
+  //
+  // ```dart
+  // import 'a.dart' hide C;
+  // import 'b.dart';
+  //
+  // void f(C c1, C c2) {}
+  // ```
+  //
+  // If you must be able to reference more than one of these types, then add a
+  // prefix to each of the import directives, and qualify the references with
+  // the appropriate prefix:
+  //
+  // ```dart
+  // import 'a.dart' as a;
+  // import 'b.dart' as b;
+  //
+  // void f(a.C c1, b.C c2) {}
+  // ```
+  static const CompileTimeErrorCode AMBIGUOUS_IMPORT = CompileTimeErrorCode(
+      'AMBIGUOUS_IMPORT', "The name '{0}' is defined in the libraries {1}.",
+      correction: "Try using 'as prefix' for one of the import directives, or "
+          "hiding the name from all but one of the imports.",
+      hasPublishedDocs: true);
+
+  /**
    * No parameters.
    */
   // #### Description
@@ -487,15 +413,279 @@
               "correcting the name to match a defined class, or "
               "defining a class with the given name.");
 
-  @Deprecated('Use ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS')
-  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS =
-      ParserErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS;
+  /**
+   * Parameters:
+   * 0: the name of the actual argument type
+   * 1: the name of the expected type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the static type of an argument
+  // can't be assigned to the static type of the corresponding parameter.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because a `num` can't be
+  // assigned to a `String`:
+  //
+  // ```dart
+  // String f(String x) => x;
+  // String g(num y) => f([!y!]);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // 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`:
+  //
+  // ```dart
+  // String f(String x) => x;
+  // String g(String y) => f(y);
+  // ```
+  //
+  // If that fix isn't possible, then add code to handle the case where the
+  // argument value isn't the required type. One approach is to coerce other
+  // types to the required type:
+  //
+  // ```dart
+  // String f(String x) => x;
+  // String g(num y) => f(y.toString());
+  // ```
+  //
+  // Another approach is to add explicit type tests and fallback code:
+  //
+  // ```dart
+  // String f(String x) => x;
+  // String g(num y) => f(y is String ? y : '');
+  // ```
+  //
+  // If you believe that the runtime type of the argument will always be the
+  // 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:
+  //
+  // ```dart
+  // String f(String x) => x;
+  // String g(num y) => f(y as String);
+  // ```
+  static const CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE =
+      CompileTimeErrorCode(
+          'ARGUMENT_TYPE_NOT_ASSIGNABLE',
+          "The argument type '{0}' can't be assigned to the parameter type "
+              "'{1}'.",
+          hasPublishedDocs: true);
 
   static const CompileTimeErrorCode ASSERT_IN_REDIRECTING_CONSTRUCTOR =
       CompileTimeErrorCode('ASSERT_IN_REDIRECTING_CONSTRUCTOR',
           "A redirecting constructor can't have an 'assert' initializer.");
 
   /**
+   * 5 Variables: Attempting to assign to a final variable elsewhere will cause
+   * a NoSuchMethodError to be thrown, because no setter is defined for it. The
+   * assignment will also give rise to a static warning for the same reason.
+   *
+   * A constant variable is always implicitly final.
+   */
+  static const CompileTimeErrorCode ASSIGNMENT_TO_CONST = CompileTimeErrorCode(
+      'ASSIGNMENT_TO_CONST', "Constant variables can't be assigned a value.",
+      correction: "Try removing the assignment, or "
+          "remove the modifier 'const' from the variable.");
+
+  /**
+   * Parameters:
+   * 0: the name of the final variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds an invocation of a
+  // setter, but there's no setter because the field with the same name was
+  // declared to be `final` or `const`.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `v` is final:
+  //
+  // ```dart
+  // class C {
+  //   final v = 0;
+  // }
+  //
+  // f(C c) {
+  //   c.[!v!] = 1;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to be able to set the value of the field, then remove the
+  // modifier `final` from the field:
+  //
+  // ```dart
+  // class C {
+  //   int v = 0;
+  // }
+  //
+  // f(C c) {
+  //   c.v = 1;
+  // }
+  // ```
+  static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL = CompileTimeErrorCode(
+      'ASSIGNMENT_TO_FINAL',
+      "'{0}' can't be used as a setter because it's final.",
+      correction: "Try finding a different setter, or making '{0}' non-final.",
+      hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a local variable that was
+  // declared to be final is assigned after it was initialized.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` is final, so it
+  // can't have a value assigned to it after it was initialized:
+  //
+  // ```dart
+  // void f() {
+  //   final x = 0;
+  //   [!x!] = 3;
+  //   print(x);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the keyword `final`, and replace it with `var` if there's no type
+  // annotation:
+  //
+  // ```dart
+  // void f() {
+  //   var x = 0;
+  //   x = 3;
+  //   print(x);
+  // }
+  // ```
+  static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL_LOCAL =
+      CompileTimeErrorCode('ASSIGNMENT_TO_FINAL_LOCAL',
+          "The final variable '{0}' can only be set once.",
+          correction: "Try making '{0}' non-final.", hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a reference to a setter is
+  // found; there is no setter defined for the type; but there is a getter
+  // defined with the same name.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because there is no setter
+  // named `x` in `C`, but there is a getter named `x`:
+  //
+  // ```dart
+  // class C {
+  //   int get x => 0;
+  //   set y(int p) {}
+  // }
+  //
+  // void f(C c) {
+  //   c.[!x!] = 1;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you want to invoke an existing setter, then correct the name:
+  //
+  // ```dart
+  // class C {
+  //   int get x => 0;
+  //   set y(int p) {}
+  // }
+  //
+  // void f(C c) {
+  //   c.y = 1;
+  // }
+  // ```
+  //
+  // If you want to invoke the setter but it just doesn't exist yet, then
+  // declare it:
+  //
+  // ```dart
+  // class C {
+  //   int get x => 0;
+  //   set x(int p) {}
+  //   set y(int p) {}
+  // }
+  //
+  // void f(C c) {
+  //   c.x = 1;
+  // }
+  // ```
+  static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL_NO_SETTER =
+      CompileTimeErrorCode('ASSIGNMENT_TO_FINAL_NO_SETTER',
+          "There isn’t a setter named '{0}' in class '{1}'.",
+          correction:
+              "Try correcting the name to reference an existing setter, or "
+              "declare the setter.",
+          hasPublishedDocs: true);
+
+  /**
+   * 12.18 Assignment: It is as static warning if an assignment of the form
+   * <i>v = e</i> occurs inside a top level or static function (be it function,
+   * method, getter, or setter) or variable initializer and there is neither a
+   * local variable declaration with name <i>v</i> nor setter declaration with
+   * name <i>v=</i> in the lexical scope enclosing the assignment.
+   */
+  static const CompileTimeErrorCode ASSIGNMENT_TO_FUNCTION =
+      CompileTimeErrorCode(
+          'ASSIGNMENT_TO_FUNCTION', "Functions can't be assigned a value.");
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the target of an assignment is a
+  // method.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` can't be assigned a
+  // value because it's a method:
+  //
+  // ```dart
+  // class C {
+  //   void f() {}
+  //
+  //   void g() {
+  //     [!f!] = null;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rewrite the code so that there isn't an assignment to a method.
+  static const CompileTimeErrorCode ASSIGNMENT_TO_METHOD = CompileTimeErrorCode(
+      'ASSIGNMENT_TO_METHOD', "Methods can't be assigned a value.",
+      hasPublishedDocs: true);
+
+  /**
+   * 12.18 Assignment: It is as static warning if an assignment of the form
+   * <i>v = e</i> occurs inside a top level or static function (be it function,
+   * method, getter, or setter) or variable initializer and there is neither a
+   * local variable declaration with name <i>v</i> nor setter declaration with
+   * name <i>v=</i> in the lexical scope enclosing the assignment.
+   */
+  static const CompileTimeErrorCode ASSIGNMENT_TO_TYPE = CompileTimeErrorCode(
+      'ASSIGNMENT_TO_TYPE', "Types can't be assigned a value.");
+
+  /**
    * 17.6.3 Asynchronous For-in: It is a compile-time error if an asynchronous
    * for-in statement appears inside a synchronous function.
    */
@@ -536,9 +726,8 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when a method or function has a
-  // return type that's <a href=”#potentially-non-nullable”>potentially
-  // non-nullable</a> but would implicitly return `null` if control reached the
-  // end of the function.
+  // return type that's [potentially non-nullable][] but would implicitly return
+  // `null` if control reached the end of the function.
   //
   // #### Example
   //
@@ -713,10 +902,12 @@
    * Parameters:
    * 0: the built-in identifier that is being used
    */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME',
-          "The built-in identifier '{0}' can't be used as a typedef name.",
-          correction: "Try choosing a different name for the typedef.");
+  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
+      CompileTimeErrorCode(
+          'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME',
+          "The built-in identifier '{0}' can't be used as a type parameter "
+              "name.",
+          correction: "Try choosing a different name for the type parameter.");
 
   /**
    * 16.33 Identifier Reference: It is a compile-time error if a built-in
@@ -726,12 +917,58 @@
    * Parameters:
    * 0: the built-in identifier that is being used
    */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
+  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME =
+      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME',
+          "The built-in identifier '{0}' can't be used as a typedef name.",
+          correction: "Try choosing a different name for the typedef.");
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // 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
+  // with an assignment:
+  //
+  // ```dart
+  // void f(int x) {
+  //   switch (x) {
+  //     [!case!] 0:
+  //       x += 2;
+  //     default:
+  //       x += 1;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add one of the required terminators:
+  //
+  // ```dart
+  // void f(int x) {
+  //   switch (x) {
+  //     case 0:
+  //       x += 2;
+  //       break;
+  //     default:
+  //       x += 1;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode CASE_BLOCK_NOT_TERMINATED =
       CompileTimeErrorCode(
-          'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME',
-          "The built-in identifier '{0}' can't be used as a type parameter "
-              "name.",
-          correction: "Try choosing a different name for the type parameter.");
+          'CASE_BLOCK_NOT_TERMINATED',
+          "The last statement of the 'case' should be 'break', 'continue', "
+              "'rethrow', 'return', or 'throw'.",
+          correction: "Try adding one of the required statements.",
+          hasPublishedDocs: true);
 
   /**
    * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements
@@ -808,6 +1045,86 @@
           hasPublishedDocs: true);
 
   /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the name following the `as` in a
+  // cast expression is defined to be something other than a type.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` is a variable, not
+  // a type:
+  //
+  // ```dart
+  // num x = 0;
+  // int y = x as [!x!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the name with the name of a type:
+  //
+  // ```dart
+  // num x = 0;
+  // int y = x as int;
+  // ```
+  static const CompileTimeErrorCode CAST_TO_NON_TYPE = CompileTimeErrorCode(
+      'CAST_TO_NON_TYPE',
+      "The name '{0}' isn't a type, so it can't be used in an 'as' expression.",
+      correction: "Try changing the name to the name of an existing type, or "
+          "creating a type with the name '{0}'.",
+      hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the abstract method
+   * 1: the name of the enclosing class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a member of a concrete class is
+  // found that doesn't have a concrete implementation. Concrete classes aren't
+  // allowed to contain abstract members.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `m` is an abstract
+  // method but `C` isn't an abstract class:
+  //
+  // ```dart
+  // class C {
+  //   [!void m();!]
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If it's valid to create instances of the class, provide an implementation
+  // for the member:
+  //
+  // ```dart
+  // class C {
+  //   void m() {}
+  // }
+  // ```
+  //
+  // If it isn't valid to create instances of the class, mark the class as being
+  // abstract:
+  //
+  // ```dart
+  // abstract class C {
+  //   void m();
+  // }
+  // ```
+  static const CompileTimeErrorCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER =
+      CompileTimeErrorCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER',
+          "'{0}' must have a method body because '{1}' isn't abstract.",
+          correction: "Try making '{1}' abstract, or adding a body to '{0}'.",
+          hasPublishedDocs: true);
+
+  /**
    * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
    * error if `C` declares a constructor named `C.n`, and a static member with
    * basename `n`.
@@ -856,6 +1173,14 @@
               "renaming the field to a name that doesn't conflict.");
 
   /**
+   * Parameters:
+   * 0: the name of the type parameter
+   * 1: detail text explaining why the type could not be inferred
+   */
+  static const CompileTimeErrorCode COULD_NOT_INFER = CompileTimeErrorCode(
+      'COULD_NOT_INFER', "Couldn't infer type parameter '{0}'.{1}");
+
+  /**
    * 10.10 Superinterfaces: It is a compile-time error if a class `C` has two
    * superinterfaces that are different instantiations of the same generic
    * class. For example, a class may not have both `List<int>` and `List<num>`
@@ -864,7 +1189,7 @@
    * Parameters:
    * 0: the name of the class implementing the conflicting interface
    * 1: the first conflicting type
-   * 1: the second conflicting type
+   * 2: the second conflicting type
    */
   static const CompileTimeErrorCode CONFLICTING_GENERIC_INTERFACES =
       CompileTimeErrorCode(
@@ -973,6 +1298,73 @@
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
    * object results in an uncaught exception being thrown.
    */
+  static const CompileTimeErrorCode CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH =
+      CompileTimeErrorCode(
+    'CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH',
+    "In a const constructor, a value of type '{0}' can't be assigned to the "
+        "field '{1}', which has type '{2}'.",
+    correction: "Try using a subtype, or removing the keyword 'const'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: The type of the runtime value of the argument
+   * 1: The static type of the parameter
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the runtime type of a constant
+  // value can't be assigned to the static type of a constant constructor's
+  // parameter.
+  //
+  // #### Example
+  //
+  // 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`:
+  //
+  // ```dart
+  // class C {
+  //   final String s;
+  //
+  //   const C(this.s);
+  // }
+  //
+  // const dynamic i = 0;
+  //
+  // void f() {
+  //   const C([!i!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Pass a value of the correct type to the constructor:
+  //
+  // ```dart
+  // class C {
+  //   final String s;
+  //
+  //   const C(this.s);
+  // }
+  //
+  // const dynamic i = 0;
+  //
+  // void f() {
+  //   const C('$i');
+  // }
+  // ```
+  static const CompileTimeErrorCode CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH =
+      CompileTimeErrorCode(
+          'CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH',
+          "A value of type '{0}' can't be assigned to a parameter of type "
+              "'{1}' in a const constructor.",
+          correction: "Try using a subtype, or removing the keyword 'const'.",
+          hasPublishedDocs: true);
+
+  /**
+   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
+   * object results in an uncaught exception being thrown.
+   */
   static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION =
       CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION',
           "Const constructors can't throw exceptions.",
@@ -1121,6 +1513,24 @@
           "changing the import to not be deferred.");
 
   /**
+   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
+   * object results in an uncaught exception being thrown.
+   */
+  static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION =
+      CompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION',
+          "Evaluation of this constant expression throws an exception.");
+
+  /**
+   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
+   * object results in an uncaught exception being thrown.
+   */
+  static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE =
+      CompileTimeErrorCode(
+          'CONST_EVAL_THROWS_IDBZE',
+          "Evaluation of this constant expression throws an "
+              "IntegerDivisionByZeroException.");
+
+  /**
    * 16.12.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
    * where e, e1 and e2 are constant expressions that evaluate to a boolean
    * value.
@@ -1177,24 +1587,24 @@
       'CONST_EVAL_TYPE_TYPE',
       "In constant expressions, operands of this operator must be of type "
           "'Type'.");
-
   /**
+   * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
+   * if o is not <b>null</b> and the interface of the class of <i>o</i> is not a
+   * subtype of the static type of the field <i>v</i>.
+   *
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
    * object results in an uncaught exception being thrown.
+   *
+   * Parameters:
+   * 0: the name of the type of the initializer expression
+   * 1: the name of the type of the field
    */
-  static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION =
-      CompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION',
-          "Evaluation of this constant expression throws an exception.");
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
-   * object results in an uncaught exception being thrown.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE =
+  static const CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE =
       CompileTimeErrorCode(
-          'CONST_EVAL_THROWS_IDBZE',
-          "Evaluation of this constant expression throws an "
-              "IntegerDivisionByZeroException.");
+          'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE',
+          "The initializer type '{0}' can't be assigned to the field type "
+              "'{1}' in a const constructor.",
+          correction: "Try using a subtype, or removing the 'const' keyword");
 
   /**
    * 6.2 Formal Parameters: It is a compile-time error if a formal parameter is
@@ -2027,6 +2437,45 @@
           hasPublishedDocs: true);
 
   /**
+   * 12.7 Lists: A fresh instance (7.6.1) <i>a</i>, of size <i>n</i>, whose
+   * class implements the built-in class <i>List&lt;E></i> is allocated.
+   *
+   * Parameters:
+   * 0: the number of provided type arguments
+   */
+  static const CompileTimeErrorCode EXPECTED_ONE_LIST_TYPE_ARGUMENTS =
+      CompileTimeErrorCode(
+          'EXPECTED_ONE_LIST_TYPE_ARGUMENTS',
+          "List literals require exactly one type argument or none, "
+              "but {0} found.",
+          correction: "Try adjusting the number of type arguments.");
+
+  /**
+   * Parameters:
+   * 0: the number of provided type arguments
+   */
+  static const CompileTimeErrorCode EXPECTED_ONE_SET_TYPE_ARGUMENTS =
+      CompileTimeErrorCode(
+          'EXPECTED_ONE_SET_TYPE_ARGUMENTS',
+          "Set literals require exactly one type argument or none, "
+              "but {0} found.",
+          correction: "Try adjusting the number of type arguments.");
+
+  /**
+   * 12.8 Maps: A fresh instance (7.6.1) <i>m</i>, of size <i>n</i>, whose class
+   * implements the built-in class <i>Map&lt;K, V></i> is allocated.
+   *
+   * Parameters:
+   * 0: the number of provided type arguments
+   */
+  static const CompileTimeErrorCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS =
+      CompileTimeErrorCode(
+          'EXPECTED_TWO_MAP_TYPE_ARGUMENTS',
+          "Map literals require exactly two type arguments or none, "
+              "but {0} found.",
+          correction: "Try adjusting the number of type arguments.");
+
+  /**
    * SDK implementation libraries can be exported only by other SDK libraries.
    *
    * Parameters:
@@ -2138,18 +2587,6 @@
       hasPublishedDocs: true);
 
   /**
-   * Parameters:
-   * 0: The name of the disallowed type
-   */
-  static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS =
-      // TODO(scheglov) We might want to restore specific code with FrontEnd.
-      //  https://github.com/dart-lang/sdk/issues/31821
-      CompileTimeErrorCodeWithUniqueName('SUBTYPE_OF_DISALLOWED_TYPE',
-          'EXTENDS_DISALLOWED_CLASS', "Classes can't extend '{0}'.",
-          correction: "Try specifying a different superclass, or "
-              "removing the extends clause.");
-
-  /**
    * 7.9 Superclasses: It is a compile-time error if the extends clause of a
    * class <i>C</i> includes a deferred type expression.
    *
@@ -2166,6 +2603,18 @@
 
   /**
    * Parameters:
+   * 0: The name of the disallowed type
+   */
+  static const CompileTimeErrorCode EXTENDS_DISALLOWED_CLASS =
+      // TODO(scheglov) We might want to restore specific code with FrontEnd.
+      //  https://github.com/dart-lang/sdk/issues/31821
+      CompileTimeErrorCodeWithUniqueName('SUBTYPE_OF_DISALLOWED_TYPE',
+          'EXTENDS_DISALLOWED_CLASS', "Classes can't extend '{0}'.",
+          correction: "Try specifying a different superclass, or "
+              "removing the extends clause.");
+
+  /**
+   * Parameters:
    * 0: the name in the extends clause
    */
   // #### Description
@@ -2640,6 +3089,58 @@
           correction: "Try removing one of the initializations.");
 
   /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a final field is initialized in
+  // both the declaration of the field and in an initializer in a constructor.
+  // Final fields can only be assigned once, so it can't be initialized in both
+  // places.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `f` is :
+  //
+  // ```dart
+  // class C {
+  //   final int f = 0;
+  //   C() : [!f!] = 1;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the initialization doesn't depend on any values passed to the
+  // constructor, and if all of the constructors need to initialize the field to
+  // the same value, then remove the initializer from the constructor:
+  //
+  // ```dart
+  // class C {
+  //   final int f = 0;
+  //   C();
+  // }
+  // ```
+  //
+  // If the initialization depends on a value passed to the constructor, or if
+  // different constructors need to initialize the field differently, then
+  // remove the initializer in the field's declaration:
+  //
+  // ```dart
+  // class C {
+  //   final int f;
+  //   C() : f = 1;
+  // }
+  // ```
+  static const CompileTimeErrorCode
+      FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = CompileTimeErrorCode(
+          '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.",
+          hasPublishedDocs: true);
+
+  /**
    * 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It
    * is a compile time error if <i>k</i>'s initializer list contains an
    * initializer for a variable that is initialized by means of an initializing
@@ -2665,6 +3166,60 @@
           correction: "Try using a normal parameter.");
 
   /**
+   * Parameters:
+   * 0: the name of the type of the initializer expression
+   * 1: the name of the type of the field
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the initializer list of a
+  // constructor initializes a field to a value that isn't assignable to the
+  // field.
+  //
+  // #### Example
+  //
+  // 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`:
+  //
+  // ```dart
+  // class C {
+  //   String s;
+  //
+  //   C() : s = [!0!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type of the field is correct, then change the value assigned to it
+  // so that the value has a valid type:
+  //
+  // ```dart
+  // class C {
+  //   String s;
+  //
+  //   C() : s = '0';
+  // }
+  // ```
+  //
+  // If the type of the value is correct, then change the type of the field to
+  // allow the assignment:
+  //
+  // ```dart
+  // class C {
+  //   int s;
+  //
+  //   C() : s = 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode FIELD_INITIALIZER_NOT_ASSIGNABLE =
+      CompileTimeErrorCode(
+          'FIELD_INITIALIZER_NOT_ASSIGNABLE',
+          "The initializer type '{0}' can't be assigned to the field type "
+              "'{1}'.",
+          hasPublishedDocs: true);
+
+  /**
    * 7.6.1 Generative Constructors: It is a compile-time error if an
    * initializing formal is used by a function other than a non-redirecting
    * generative constructor.
@@ -2688,6 +3243,36 @@
           correction: "Try using a normal parameter.");
 
   /**
+   * 7.6.1 Generative Constructors: An initializing formal has the form
+   * <i>this.id</i>. It is a static warning if the static type of <i>id</i> is
+   * not assignable to <i>T<sub>id</sub></i>.
+   *
+   * Parameters:
+   * 0: the name of the type of the field formal parameter
+   * 1: the name of the type of the field
+   */
+  static const CompileTimeErrorCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE =
+      CompileTimeErrorCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE',
+          "The parameter type '{0}' is incompatible with the field type '{1}'.",
+          correction: "Try changing or removing the parameter's type, or "
+              "changing the field's type.");
+
+  /**
+   * 5. Variables: It is a static warning if a final instance variable that has
+   * been initialized at its point of declaration is also initialized in a
+   * constructor.
+   *
+   * Parameters:
+   * 0: the name of the field in question
+   */
+  static const CompileTimeErrorCode
+      FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = CompileTimeErrorCode(
+          'FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR',
+          "'{0}' is final and was given a value when it was declared, "
+              "so it can't be set to a new value.",
+          correction: "Try removing one of the initializations.");
+
+  /**
    * 5 Variables: It is a compile-time error if a final instance variable that
    * has is initialized by means of an initializing formal of a constructor is
    * also initialized elsewhere in the same constructor.
@@ -2700,6 +3285,238 @@
           "'{0}' is a final field and so can only be set once.",
           correction: "Try removing all but one of the initializations.");
 
+  /**
+   * Parameters:
+   * 0: the name of the uninitialized final variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a final field or variable isn't
+  // initialized.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` doesn't have an
+  // initializer:
+  //
+  // ```dart
+  // final [!x!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // For variables and static fields, you can add an initializer:
+  //
+  // ```dart
+  // final x = 0;
+  // ```
+  //
+  // For instance fields, you can add an initializer as shown in the previous
+  // example, or you can initialize the field in every constructor. You can
+  // initialize the field by using a field formal parameter:
+  //
+  // ```dart
+  // class C {
+  //   final int x;
+  //   C(this.x);
+  // }
+  // ```
+  //
+  // You can also initialize the field by using an initializer in the
+  // constructor:
+  //
+  // ```dart
+  // class C {
+  //   final int x;
+  //   C(int y) : x = y * 2;
+  // }
+  // ```
+  static const CompileTimeErrorCode FINAL_NOT_INITIALIZED =
+      CompileTimeErrorCode('FINAL_NOT_INITIALIZED',
+          "The final variable '{0}' must be initialized.",
+          // TODO(brianwilkerson) Split this error code so that we can suggest
+          // initializing fields in constructors (FINAL_FIELD_NOT_INITIALIZED
+          // and FINAL_VARIABLE_NOT_INITIALIZED).
+          correction: "Try initializing the variable.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the uninitialized final variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class defines one or more
+  // final instance fields without initializers and has at least one constructor
+  // that doesn't initialize those fields. All final instance fields must be
+  // initialized when the instance is created, either by the field's initializer
+  // or by the constructor.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // class C {
+  //   final String value;
+  //
+  //   [!C!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the value should be passed in to the constructor directly, then use a
+  // field formal parameter to initialize the field `value`:
+  //
+  // ```dart
+  // class C {
+  //   final String value;
+  //
+  //   C(this.value);
+  // }
+  // ```
+  //
+  // If the value should be computed indirectly from a value provided by the
+  // caller, then add a parameter and include an initializer:
+  //
+  // ```dart
+  // class C {
+  //   final String value;
+  //
+  //   C(Object o) : value = o.toString();
+  // }
+  // ```
+  //
+  // If the value of the field doesn't depend on values that can be passed to
+  // the constructor, then add an initializer for the field as part of the field
+  // declaration:
+  //
+  // ```dart
+  // class C {
+  //   final String value = '';
+  //
+  //   C();
+  // }
+  // ```
+  //
+  // If the value of the field doesn't depend on values that can be passed to
+  // the constructor but different constructors need to initialize it to
+  // different values, then add an initializer for the field in the initializer
+  // list:
+  //
+  // ```dart
+  // class C {
+  //   final String value;
+  //
+  //   C() : value = '';
+  //
+  //   C.named() : value = 'c';
+  // }
+  // ```
+  //
+  // However, if the value is the same for all instances, then consider using a
+  // static field instead of an instance field:
+  //
+  // ```dart
+  // class C {
+  //   static const String value = '';
+  //
+  //   C();
+  // }
+  // ```
+  static const CompileTimeErrorCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 =
+      CompileTimeErrorCodeWithUniqueName(
+          'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
+          'CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1',
+          "All final variables must be initialized, but '{0}' isn't.",
+          correction: "Try adding an initializer for the field.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the uninitialized final variable
+   * 1: the name of the uninitialized final variable
+   */
+  static const CompileTimeErrorCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 =
+      CompileTimeErrorCodeWithUniqueName(
+          'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
+          'CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2',
+          "All final variables must be initialized, but '{0}' and '{1}' "
+              "aren't.",
+          correction: "Try adding initializers for the fields.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the uninitialized final variable
+   * 1: the name of the uninitialized final variable
+   * 2: the number of additional not initialized variables that aren't listed
+   */
+  static const CompileTimeErrorCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS =
+      CompileTimeErrorCodeWithUniqueName(
+          'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
+          'CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3',
+          "All final variables must be initialized, but '{0}', '{1}', and {2} "
+              "others aren't.",
+          correction: "Try adding initializers for the fields.",
+          hasPublishedDocs: true);
+
+  /**
+   * 17.6.2 For-in. It the iterable expression does not implement Iterable with
+   * a type argument that can be assigned to the for-in variable's type, this
+   * warning is reported.
+   *
+   * Parameters:
+   * 0: The type of the iterable expression.
+   * 1: The sequence type -- Iterable for `for` or Stream for `await for`.
+   * 2: The loop variable type.
+   */
+  static const CompileTimeErrorCode FOR_IN_OF_INVALID_ELEMENT_TYPE =
+      CompileTimeErrorCode(
+          'FOR_IN_OF_INVALID_ELEMENT_TYPE',
+          "The type '{0}' used in the 'for' loop must implement {1} with a "
+              "type argument that can be assigned to '{2}'.");
+
+  /**
+   * Parameters:
+   * 0: The type of the iterable expression.
+   * 1: The sequence type -- Iterable for `for` or Stream for `await for`.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the expression following `in` in
+  // a for-in loop has a type that isn't a subclass of `Iterable`.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `m` is a `Map`, and
+  // `Map` isn't a subclass of `Iterable`:
+  //
+  // ```dart
+  // void f(Map<String, String> m) {
+  //   for (String s in [!m!]) {
+  //     print(s);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the expression with one that produces an iterable value:
+  //
+  // ```dart
+  // void f(Map<String, String> m) {
+  //   for (String s in m.values) {
+  //     print(s);
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode FOR_IN_OF_INVALID_TYPE =
+      CompileTimeErrorCode('FOR_IN_OF_INVALID_TYPE',
+          "The type '{0}' used in the 'for' loop must implement {1}.",
+          hasPublishedDocs: true);
+
   static const CompileTimeErrorCode FOR_IN_WITH_CONST_VARIABLE =
       CompileTimeErrorCode('FOR_IN_WITH_CONST_VARIABLE',
           "A for-in loop-variable can't be 'const'.",
@@ -2727,6 +3544,45 @@
           correction: "Try removing type parameters from the generic function "
               "type, or using 'dynamic' as the type argument here.");
 
+  /**
+   * 10.3 Setters: It is a compile-time error if a class has a setter named
+   * `v=` with argument type `T` and a getter named `v` with return type `S`,
+   * and `S` may not be assigned to `T`.
+   *
+   * Parameters:
+   * 0: the name of the getter
+   * 1: the type of the getter
+   * 2: the type of the setter
+   * 3: the name of the setter
+   */
+  static const CompileTimeErrorCode GETTER_NOT_ASSIGNABLE_SETTER_TYPES =
+      CompileTimeErrorCode(
+          'GETTER_NOT_ASSIGNABLE_SETTER_TYPES',
+          "The return type of getter '{0}' is '{1}' which isn't assignable "
+              "to the type '{2}' of its setter '{3}'.",
+          correction: "Try changing the types so that they are compatible.");
+
+  /**
+   * nnbd/feature-specification.md
+   *
+   * It is an error if a class has a setter and a getter with the same basename
+   * where the return type of the getter is not a subtype of the argument type
+   * of the setter. Note that this error specifically requires subtyping and
+   * not assignability and hence makes no exception for `dynamic`.
+   *
+   * Parameters:
+   * 0: the name of the getter
+   * 1: the type of the getter
+   * 2: the type of the setter
+   * 3: the name of the setter
+   */
+  static const CompileTimeErrorCode GETTER_NOT_SUBTYPE_SETTER_TYPES =
+      CompileTimeErrorCode(
+          'GETTER_NOT_SUBTYPE_SETTER_TYPES',
+          "The return type of getter '{0}' is '{1}' which isn't a subtype "
+              "of the type '{2}' of its setter '{3}'.",
+          correction: "Try changing the types so that they are compatible.");
+
   static const CompileTimeErrorCode IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY =
       CompileTimeErrorCode(
           'IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY',
@@ -2735,6 +3591,78 @@
           correction: "Try making the deferred import non-deferred.");
 
   /**
+   * It is a compile-time error if the declared return type of a function marked
+   * 'async*' is not a supertype of 'Stream<T>' for some type 'T'.
+   */
+  static const CompileTimeErrorCode ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE =
+      CompileTimeErrorCode(
+          'ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE',
+          "Functions marked 'async*' must have a return type that is a "
+              "supertype of 'Stream<T>' for some type 'T'.",
+          correction: "Try fixing the return type of the function, or "
+              "removing the modifier 'async*' from the function body.");
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the body of a function has the
+  // `async` modifier even though the return type of the function isn't
+  // assignable to `Future`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the body of the
+  // function `f` has the `async` modifier even though the return type isn't
+  // assignable to `Future`:
+  //
+  // ```dart
+  // [!int!] f() async {
+  //   return 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the function should be asynchronous, then change the return type to be
+  // assignable to `Future`:
+  //
+  // ```dart
+  // Future<int> f() async {
+  //   return 0;
+  // }
+  // ```
+  //
+  // If the function should be synchronous, then remove the `async` modifier:
+  //
+  // ```dart
+  // int f() {
+  //   return 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode ILLEGAL_ASYNC_RETURN_TYPE =
+      CompileTimeErrorCode(
+          'ILLEGAL_ASYNC_RETURN_TYPE',
+          "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.",
+          hasPublishedDocs: true);
+
+  /**
+   * It is a compile-time error if the declared return type of a function marked
+   * 'sync*' is not a supertype of 'Iterable<T>' for some type 'T'.
+   */
+  static const CompileTimeErrorCode ILLEGAL_SYNC_GENERATOR_RETURN_TYPE =
+      CompileTimeErrorCode(
+          'ILLEGAL_SYNC_GENERATOR_RETURN_TYPE',
+          "Functions marked 'sync*' must have a return type that is a "
+              "supertype of 'Iterable<T>' for some type 'T'.",
+          correction: "Try fixing the return type of the function, or "
+              "removing the modifier 'sync*' from the function body.");
+
+  /**
    * 7.10 Superinterfaces: It is a compile-time error if the implements clause
    * of a class <i>C</i> specifies a malformed type or deferred type as a
    * superinterface.
@@ -3033,6 +3961,20 @@
               "inconsistency.");
 
   /**
+   * It is a compile-time error if a part file has a different language version
+   * override than its library.
+   *
+   * https://github.com/dart-lang/language/blob/master/accepted/
+   * future-releases/language-versioning/feature-specification.md
+   * #individual-library-language-version-override
+   */
+  static const CompileTimeErrorCode INCONSISTENT_LANGUAGE_VERSION_OVERRIDE =
+      CompileTimeErrorCode(
+          'INCONSISTENT_LANGUAGE_VERSION_OVERRIDE',
+          "Parts must have exactly the same language version override as "
+              "the library.");
+
+  /**
    * Parameters:
    * 0: the name of the initializing formal that is not an instance variable in
    *    the immediately enclosing class
@@ -3202,6 +4144,51 @@
           correction: "Try removing the initialization.");
 
   /**
+   * Parameters:
+   * 0: the name of the static member
+   * 1: the kind of the static member (field, getter, setter, or method)
+   * 2: the name of the defining class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an access operator is used to
+  // access a static member through an instance of the class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `zero` is a static
+  // field, but it’s being accessed as if it were an instance field:
+  //
+  // ```dart
+  // void f(C c) {
+  //   c.[!zero!];
+  // }
+  //
+  // class C {
+  //   static int zero = 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Use the class to access the static member:
+  //
+  // ```dart
+  // void f(C c) {
+  //   C.zero;
+  // }
+  //
+  // class C {
+  //   static int zero = 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode INSTANCE_ACCESS_TO_STATIC_MEMBER =
+      CompileTimeErrorCode('INSTANCE_ACCESS_TO_STATIC_MEMBER',
+          "Static {1} '{0}' can't be accessed through an instance.",
+          correction: "Try using the class '{2}' to access the {1}.",
+          hasPublishedDocs: true);
+
+  /**
    * No parameters.
    */
   // #### Description
@@ -3306,6 +4293,37 @@
           hasPublishedDocs: true);
 
   /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds a constructor
+  // invocation and the constructor is declared in an abstract class. Even
+  // though you can't create an instance of an abstract class, abstract classes
+  // can declare constructors that can be invoked by subclasses.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `C` is an abstract
+  // class:
+  //
+  // ```dart
+  // abstract class C {}
+  //
+  // var c = new [!C!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If there's a concrete subclass of the abstract class that can be used, then
+  // create an instance of the concrete subclass.
+  static const CompileTimeErrorCode INSTANTIATE_ABSTRACT_CLASS =
+      CompileTimeErrorCode('INSTANTIATE_ABSTRACT_CLASS',
+          "Abstract classes can't be instantiated.",
+          correction: "Try creating an instance of a concrete subtype.",
+          hasPublishedDocs: true);
+
+  /**
    * Enum proposal: It is also a compile-time error to explicitly instantiate an
    * enum via 'new' or 'const' or to access its private fields.
    */
@@ -3313,14 +4331,6 @@
       'INSTANTIATE_ENUM', "Enums can't be instantiated.",
       correction: "Try using one of the defined constants.");
 
-  static const CompileTimeErrorCode INTEGER_LITERAL_OUT_OF_RANGE =
-      CompileTimeErrorCode('INTEGER_LITERAL_OUT_OF_RANGE',
-          "The integer literal {0} can't be represented in 64 bits.",
-          correction:
-              "Try using the BigInt class if you need an integer larger than "
-              "9,223,372,036,854,775,807 or less than "
-              "-9,223,372,036,854,775,808.");
-
   /**
    * An integer literal with static type `double` and numeric value `i`
    * evaluates to an instance of the `double` class representing the value `i`.
@@ -3337,6 +4347,14 @@
               "Try using the BigInt class, or switch to the closest valid "
               "double: {1}");
 
+  static const CompileTimeErrorCode INTEGER_LITERAL_OUT_OF_RANGE =
+      CompileTimeErrorCode('INTEGER_LITERAL_OUT_OF_RANGE',
+          "The integer literal {0} can't be represented in 64 bits.",
+          correction:
+              "Try using the BigInt class if you need an integer larger than "
+              "9,223,372,036,854,775,807 or less than "
+              "-9,223,372,036,854,775,808.");
+
   /**
    * 15 Metadata: Metadata consists of a series of annotations, each of which
    * begin with the character @, followed by a constant expression that must be
@@ -3377,6 +4395,145 @@
           correction: "Try using a top-level variable or a field.");
 
   /**
+   * Parameters:
+   * 0: the name of the right hand side type
+   * 1: the name of the left hand side type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the static type of an expression
+  // that is assigned to a variable isn't assignable to the type of the
+  // variable.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the type of the
+  // initializer (`int`) isn't assignable to the type of the variable
+  // (`String`):
+  //
+  // ```dart
+  // int i = 0;
+  // String s = [!i!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the value being assigned is always assignable at runtime, even though
+  // the static types don't reflect that, then add an explicit cast.
+  //
+  // Otherwise, change the value being assigned so that it has the expected
+  // type. In the previous example, this might look like:
+  //
+  // ```dart
+  // int i = 0;
+  // String s = i.toString();
+  // ```
+  //
+  // 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:
+  //
+  // ```dart
+  // int i = 0;
+  // int s = i;
+  // ```
+  static const CompileTimeErrorCode INVALID_ASSIGNMENT = CompileTimeErrorCode(
+      'INVALID_ASSIGNMENT',
+      "A value of type '{0}' can't be assigned to a variable of type "
+          "'{1}'.",
+      correction: "Try changing the type of the variable, or "
+          "casting the right-hand type to '{1}'.",
+      hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the type of the function
+   * 1: the expected function type
+   */
+  static const CompileTimeErrorCode INVALID_CAST_FUNCTION = CompileTimeErrorCode(
+      'INVALID_CAST_FUNCTION',
+      "The function '{0}' has type '{1}' that isn't of expected type "
+          "'{2}'. This means its parameter or return type doesn't match what "
+          "is expected.");
+
+  /**
+   * Parameters:
+   * 0: the type of the torn-off function expression
+   * 1: the expected function type
+   */
+  static const CompileTimeErrorCode INVALID_CAST_FUNCTION_EXPR =
+      CompileTimeErrorCode(
+          'INVALID_CAST_FUNCTION_EXPR',
+          "The function expression type '{0}' isn't of type '{1}'. "
+              "This means its parameter or return type doesn't match what is "
+              "expected. Consider changing parameter type(s) or the returned "
+              "type(s).");
+
+  /**
+   * Parameters:
+   * 0: the type of the literal
+   * 1: the expected type
+   */
+  static const CompileTimeErrorCode INVALID_CAST_LITERAL = CompileTimeErrorCode(
+      'INVALID_CAST_LITERAL',
+      "The literal '{0}' with type '{1}' isn't of expected type '{2}'.");
+
+  /**
+   * Parameters:
+   * 0: the type of the list literal
+   * 1: the expected type
+   */
+  static const CompileTimeErrorCode INVALID_CAST_LITERAL_LIST =
+      CompileTimeErrorCode(
+          'INVALID_CAST_LITERAL_LIST',
+          "The list literal type '{0}' isn't of expected type '{1}'. The "
+              "list's type can be changed with an explicit generic type "
+              "argument or by changing the element types.");
+
+  /**
+   * Parameters:
+   * 0: the type of the map literal
+   * 1: the expected type
+   */
+  static const CompileTimeErrorCode INVALID_CAST_LITERAL_MAP =
+      CompileTimeErrorCode(
+          'INVALID_CAST_LITERAL_MAP',
+          "The map literal type '{0}' isn't of expected type '{1}'. The maps's "
+              "type can be changed with an explicit generic type arguments or "
+              "by changing the key and value types.");
+
+  /**
+   * Parameters:
+   * 0: the type of the set literal
+   * 1: the expected type
+   */
+  static const CompileTimeErrorCode INVALID_CAST_LITERAL_SET =
+      CompileTimeErrorCode(
+          'INVALID_CAST_LITERAL_SET',
+          "The set literal type '{0}' isn't of expected type '{1}'. The set's "
+              "type can be changed with an explicit generic type argument or "
+              "by changing the element types.");
+
+  /**
+   * Parameters:
+   * 0: the type of the torn-off method
+   * 1: the expected function type
+   */
+  static const CompileTimeErrorCode INVALID_CAST_METHOD = CompileTimeErrorCode(
+      'INVALID_CAST_METHOD',
+      "The method tear-off '{0}' has type '{1}' that isn't of expected type "
+          "'{2}'. This means its parameter or return type doesn't match what "
+          "is expected.");
+
+  /**
+   * Parameters:
+   * 0: the type of the instantiated object
+   * 1: the expected type
+   */
+  static const CompileTimeErrorCode INVALID_CAST_NEW_EXPR = CompileTimeErrorCode(
+      'INVALID_CAST_NEW_EXPR',
+      "The constructor returns type '{0}' that isn't of expected type '{1}'.");
+
+  /**
    * TODO(brianwilkerson) Remove this when we have decided on how to report
    * errors in compile-time constants. Until then, this acts as a placeholder
    * for more informative errors.
@@ -3646,6 +4803,10 @@
           "Invalid reference to 'this' expression.",
           hasPublishedDocs: true);
 
+  static const CompileTimeErrorCode INVALID_SUPER_INVOCATION =
+      CompileTimeErrorCode('INVALID_SUPER_INVOCATION',
+          "The super call must be last in an initializer list: '{0}'.");
+
   /**
    * 12.6 Lists: It is a compile time error if the type argument of a constant
    * list literal includes a type parameter.
@@ -3685,20 +4846,6 @@
               "Try replacing the type parameter with a different type.");
 
   /**
-   * The 'covariant' keyword was found in an inappropriate location.
-   */
-  static const CompileTimeErrorCode INVALID_USE_OF_COVARIANT =
-      CompileTimeErrorCode(
-          'INVALID_USE_OF_COVARIANT',
-          "The 'covariant' keyword can only be used for parameters in instance "
-              "methods or before non-final instance fields.",
-          correction: "Try removing the 'covariant' keyword.");
-
-  @Deprecated('Use ParserErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION')
-  static const ParserErrorCode INVALID_USE_OF_COVARIANT_IN_EXTENSION =
-      ParserErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION;
-
-  /**
    * Parameters:
    * 0: the URI that is invalid
    */
@@ -3724,6 +4871,53 @@
       hasPublishedDocs: true);
 
   /**
+   * The 'covariant' keyword was found in an inappropriate location.
+   */
+  static const CompileTimeErrorCode INVALID_USE_OF_COVARIANT =
+      CompileTimeErrorCode(
+          'INVALID_USE_OF_COVARIANT',
+          "The 'covariant' keyword can only be used for parameters in instance "
+              "methods or before non-final instance fields.",
+          correction: "Try removing the 'covariant' keyword.");
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an expression whose value will
+  // always be `null` is dererenced.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `x` will always be
+  // `null`:
+  //
+  // ```dart
+  // %experiments=non-nullable
+  // int f(Null x) {
+  //   return [!x!].length;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the value is allowed to be something other than `null`, then change the
+  // type of the expression:
+  //
+  // ```dart
+  // %experiments=non-nullable
+  // int f(String? x) {
+  //   return x!.length;
+  // }
+  // ```
+  static const CompileTimeErrorCode INVALID_USE_OF_NULL_VALUE =
+      CompileTimeErrorCode('INVALID_USE_OF_NULL_VALUE',
+          "An expression whose value is always 'null' can't be dereferenced.",
+          correction: "Try changing the type of the expression.",
+          hasPublishedDocs: true);
+
+  /**
    * Parameters:
    * 0: the name of the extension
    */
@@ -3772,6 +4966,94 @@
           hasPublishedDocs: true);
 
   /**
+   * Parameters:
+   * 0: the name of the identifier that is not a function type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds a function invocation,
+  // but the name of the function being invoked is defined to be something other
+  // than a function.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `Binary` is the name of
+  // a function type, not a function:
+  //
+  // ```dart
+  // typedef Binary = int Function(int, int);
+  //
+  // int f() {
+  //   return [!Binary!](1, 2);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the name with the name of a function.
+  static const CompileTimeErrorCode INVOCATION_OF_NON_FUNCTION =
+      CompileTimeErrorCode(
+          'INVOCATION_OF_NON_FUNCTION', "'{0}' isn't a function.",
+          // TODO(brianwilkerson) Split this error code so that we can provide
+          // better error and correction messages.
+          correction:
+              "Try correcting the name to match an existing function, or "
+              "define a method or function named '{0}'.",
+          hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a function invocation is found,
+  // but the name being referenced isn't the name of a function, or when the
+  // expression computing the function doesn't compute a function.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` isn't a function:
+  //
+  // ```dart
+  // int x = 0;
+  //
+  // int f() => x;
+  //
+  // var y = [!x!]();
+  // ```
+  //
+  // The following code produces this diagnostic because `f()` doesn't return a
+  // function:
+  //
+  // ```dart
+  // int x = 0;
+  //
+  // int f() => x;
+  //
+  // var y = [!f()!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to invoke a function, then replace the code before the argument
+  // list with the name of a function or with an expression that computes a
+  // function:
+  //
+  // ```dart
+  // int x = 0;
+  //
+  // int f() => x;
+  //
+  // var y = f();
+  // ```
+  static const CompileTimeErrorCode INVOCATION_OF_NON_FUNCTION_EXPRESSION =
+      CompileTimeErrorCode(
+          'INVOCATION_OF_NON_FUNCTION_EXPRESSION',
+          "The expression doesn't evaluate to a function, so it can't be "
+              "invoked.",
+          hasPublishedDocs: true);
+
+  /**
    * 13.13 Break: It is a compile-time error if no such statement
    * <i>s<sub>E</sub></i> exists within the innermost function in which
    * <i>s<sub>b</sub></i> occurs.
@@ -3829,6 +5111,51 @@
               "the value.");
 
   /**
+   * Parameters:
+   * 0: the actual type of the list element
+   * 1: the expected type of the list element
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the type of an element in a list
+  // literal isn't assignable to the element type of the list.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `2.5` is a double, and
+  // the list can hold only integers:
+  //
+  // ```dart
+  // List<int> x = [1, [!2.5!], 3];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intended to add a different object to the list, then replace the
+  // element with an expression that computes the intended object:
+  //
+  // ```dart
+  // List<int> x = [1, 2, 3];
+  // ```
+  //
+  // If the object shouldn't be in the list, then remove the element:
+  //
+  // ```dart
+  // List<int> x = [1, 3];
+  // ```
+  //
+  // 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:
+  //
+  // ```dart
+  // List<num> x = [1, 2.5, 3];
+  // ```
+  static const CompileTimeErrorCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE =
+      CompileTimeErrorCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE',
+          "The element type '{0}' can't be assigned to the list type '{1}'.",
+          hasPublishedDocs: true);
+
+  /**
    * No parameters.
    */
   // #### Description
@@ -3872,13 +5199,85 @@
       hasPublishedDocs: true);
 
   /**
-   * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
-   * with the same name as <i>C</i>.
+   * Parameters:
+   * 0: the type of the expression being used as a key
+   * 1: the type of keys declared for the map
    */
-  @Deprecated('Superseded by ParserErrorCode.MEMBER_WITH_CLASS_NAME')
-  static const CompileTimeErrorCode MEMBER_WITH_CLASS_NAME =
-      CompileTimeErrorCode('MEMBER_WITH_CLASS_NAME',
-          "Class members can't have the same name as the enclosing class.");
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a key of a key-value pair in a
+  // map literal has a type that isn't assignable to the key type of the map.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `2` is an `int`, but
+  // the keys of the map are required to be `String`s:
+  //
+  // ```dart
+  // var m = <String, String>{[!2!] : 'a'};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type of the map is correct, then change the key to have the correct
+  // type:
+  //
+  // ```dart
+  // var m = <String, String>{'2' : 'a'};
+  // ```
+  //
+  // If the type of the key is correct, then change the key type of the map:
+  //
+  // ```dart
+  // var m = <int, String>{2 : 'a'};
+  // ```
+  static const CompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE =
+      CompileTimeErrorCode(
+          'MAP_KEY_TYPE_NOT_ASSIGNABLE',
+          "The element type '{0}' can't be assigned to the map key type "
+              "'{1}'.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the type of the expression being used as a value
+   * 1: the type of values declared for the map
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a value of a key-value pair in a
+  // map literal has a type that isn't assignable to the the value type of the
+  // map.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `2` is an `int`, but/
+  // the values of the map are required to be `String`s:
+  //
+  // ```dart
+  // var m = <String, String>{'a' : [!2!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type of the map is correct, then change the value to have the
+  // correct type:
+  //
+  // ```dart
+  // var m = <String, String>{'a' : '2'};
+  // ```
+  //
+  // If the type of the value is correct, then change the value type of the map:
+  //
+  // ```dart
+  // var m = <String, int>{'a' : 2};
+  // ```
+  static const CompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE =
+      CompileTimeErrorCode(
+          'MAP_VALUE_TYPE_NOT_ASSIGNABLE',
+          "The element type '{0}' can't be assigned to the map value type "
+              "'{1}'.",
+          hasPublishedDocs: true);
 
   /**
    * 12.1 Constants: A constant expression is ... a constant list literal.
@@ -3920,11 +5319,11 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when an optional parameter, whether
-  // positional or named, has a <a href=”#potentially-non-nullable”>potentially
-  // non-nullable</a> type and doesn't specify a default value. Optional
-  // parameters that have no explicit default value have an implicit default
-  // value of `null`. If the type of the parameter doesn't allow the parameter
-  // to have a value of `null`, then the implicit default value isn't valid.
+  // positional or named, has a [potentially non-nullable][] type and doesn't
+  // specify a default value. Optional parameters that have no explicit default
+  // value have an implicit default value of `null`. If the type of the
+  // parameter doesn't allow the parameter to have a value of `null`, then the
+  // implicit default value isn't valid.
   //
   // #### Example
   //
@@ -4042,6 +5441,20 @@
               "concrete member in the class has type '{2}'.");
 
   /**
+   * It's a compile-time error to apply a mixin containing super-invocations to
+   * a class that doesn't have a concrete implementation of the super-invoked
+   * members compatible with the super-constraint interface.
+   *
+   * Parameters:
+   * 0: the display name of the member without a concrete implementation
+   */
+  static const CompileTimeErrorCode
+      MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER = CompileTimeErrorCode(
+          'MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER',
+          "The class doesn't have a concrete implementation of the "
+              "super-invoked member '{0}'.");
+
+  /**
    * It's a compile-time error to apply a mixin to a class that doesn't
    * implement all the `on` type requirements of the mixin declaration.
    *
@@ -4058,20 +5471,6 @@
           correction: "Try extending the class '{0}'.");
 
   /**
-   * It's a compile-time error to apply a mixin containing super-invocations to
-   * a class that doesn't have a concrete implementation of the super-invoked
-   * members compatible with the super-constraint interface.
-   *
-   * Parameters:
-   * 0: the display name of the member without a concrete implementation
-   */
-  static const CompileTimeErrorCode
-      MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER = CompileTimeErrorCode(
-          'MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER',
-          "The class doesn't have a concrete implementation of the "
-              "super-invoked member '{0}'.");
-
-  /**
    * 9 Mixins: It is a compile-time error if a declared or derived mixin
    * explicitly declares a constructor.
    *
@@ -4249,6 +5648,18 @@
           "Mixin can only be applied to class.");
 
   /**
+   * Technically this is [IMPLEMENTS_SUPER_CLASS].
+   * See https://github.com/dart-lang/sdk/issues/25765#issuecomment-307422593
+   *
+   * Parameters:
+   * 0: the name of the class that appears in both "extends" and "with" clauses
+   */
+  static const CompileTimeErrorCode MIXINS_SUPER_CLASS = CompileTimeErrorCode(
+      'MIXINS_SUPER_CLASS',
+      "'{0}' can't be used in both 'extends' and 'with' clauses.",
+      correction: "Try removing one of the occurrences.");
+
+  /**
    * 7.6.1 Generative Constructors: A generative constructor may be redirecting,
    * in which case its only action is to invoke another generative constructor.
    */
@@ -4269,6 +5680,91 @@
           correction: "Try removing all but one of the 'super' initializers.");
 
   /**
+   * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible
+   * in the current scope, optionally followed by type arguments.
+   *
+   * Parameters:
+   * 0: the name of the non-type element
+   */
+  static const CompileTimeErrorCode NEW_WITH_NON_TYPE =
+      CompileTimeErrorCodeWithUniqueName('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
+   * current scope then:
+   * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;,
+   *    a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;,
+   *    x<sub>n+k</sub>: a<sub>n+k</sub>)</i> it is a static warning if
+   *    <i>T.id</i> is not the name of a constructor declared by the type
+   *    <i>T</i>.
+   * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>,
+   * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>:
+   * a<sub>n+kM/sub>)</i> it is a static warning if the type <i>T</i> does not
+   * declare a constructor with the same name as the declaration of <i>T</i>.
+   */
+  static const CompileTimeErrorCode NEW_WITH_UNDEFINED_CONSTRUCTOR =
+      CompileTimeErrorCode('NEW_WITH_UNDEFINED_CONSTRUCTOR',
+          "The class '{0}' doesn't have a constructor named '{1}'.",
+          correction: "Try invoking a different constructor, or "
+              "define a constructor named '{1}'.");
+
+  /**
+   * Parameters:
+   * 0: the name of the class being instantiated
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an unnamed constructor is
+  // invoked on a class that defines named constructors but the class doesn’t
+  // have an unnamed constructor.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `A` doesn't define an
+  // unnamed constructor:
+  //
+  // ```dart
+  // class A {
+  //   A.a();
+  // }
+  //
+  // A f() => [!A!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If one of the named constructors does what you need, then use it:
+  //
+  // ```dart
+  // class A {
+  //   A.a();
+  // }
+  //
+  // A f() => A.a();
+  // ```
+  //
+  // If none of the named constructors does what you need, and you're able to
+  // add an unnamed constructor, then add the constructor:
+  //
+  // ```dart
+  // class A {
+  //   A();
+  //   A.a();
+  // }
+  //
+  // A f() => A();
+  // ```
+  static const CompileTimeErrorCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT =
+      CompileTimeErrorCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT',
+          "The class '{0}' doesn't have a default constructor.",
+          correction:
+              "Try using one of the named constructors defined in '{0}'.",
+          hasPublishedDocs: true);
+
+  /**
    * No parameters.
    */
   // #### Description
@@ -4345,6 +5841,21 @@
               "explicitly invoking a different constructor in '{0}'.");
 
   /**
+   * User friendly specialized error for [NON_GENERATIVE_CONSTRUCTOR]. This
+   * handles the case of `class E extends Exception` which will never work
+   * because [Exception] has no generative constructors.
+   */
+  static const CompileTimeErrorCode NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS =
+      CompileTimeErrorCode(
+          'NO_GENERATIVE_CONSTRUCTOR_IN_SUPERCLASS',
+          "The class '{0}' cannot extend '{1}' because '{1}' only has factory"
+              " constructors (no generative constructors), and '{0}' has at"
+              ' least one generative constructor.',
+          correction: 'Try implementing the class instead, adding a generative'
+              " (not factory) constructor to the superclass {0}, or a factory"
+              ' constructor to the subclass.');
+
+  /**
    * Parameters:
    * 0: the name of the superclass that does not define an implicitly invoked
    *    constructor
@@ -4360,6 +5871,280 @@
               "constructor in '{0}'.");
 
   /**
+   * Parameters:
+   * 0: the name of the first member
+   * 1: the name of the second member
+   * 2: the name of the third member
+   * 3: the name of the fourth member
+   * 4: the number of additional missing members that aren't listed
+   */
+  static const CompileTimeErrorCode
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS =
+      CompileTimeErrorCodeWithUniqueName(
+          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+          ' CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS',
+          "Missing concrete implementations of '{0}', '{1}', '{2}', '{3}', and "
+              "{4} more.",
+          correction: "Try implementing the missing methods, or make the class "
+              "abstract.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the first member
+   * 1: the name of the second member
+   * 2: the name of the third member
+   * 3: the name of the fourth member
+   */
+  static const CompileTimeErrorCode
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR =
+      CompileTimeErrorCodeWithUniqueName(
+          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+          ' CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR',
+          "Missing concrete implementations of '{0}', '{1}', '{2}', and '{3}'.",
+          correction: "Try implementing the missing methods, or make the class "
+              "abstract.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a concrete class inherits one or
+  // more abstract members, and doesn't provide or inherit an implementation for
+  // at least one of those abstract members.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the class `B` doesn't
+  // have a concrete implementation of `m`:
+  //
+  // ```dart
+  // abstract class A {
+  //   void m();
+  // }
+  //
+  // class [!B!] extends A {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the subclass can provide a concrete implementation for some or all of
+  // the abstract inherited members, then add the concrete implementations:
+  //
+  // ```dart
+  // abstract class A {
+  //   void m();
+  // }
+  //
+  // class B extends A {
+  //   void m() {}
+  // }
+  // ```
+  //
+  // If there is a mixin that provides an implementation of the inherited
+  // methods, then apply the mixin to the subclass:
+  //
+  // ```dart
+  // abstract class A {
+  //   void m();
+  // }
+  //
+  // class B extends A with M {}
+  //
+  // mixin M {
+  //   void m() {}
+  // }
+  // ```
+  //
+  // If the subclass can't provide a concrete implementation for all of the
+  // abstract inherited members, then mark the subclass as being abstract:
+  //
+  // ```dart
+  // abstract class A {
+  //   void m();
+  // }
+  //
+  // abstract class B extends A {}
+  // ```
+  static const CompileTimeErrorCode
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE =
+      CompileTimeErrorCodeWithUniqueName(
+          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+          ' CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE',
+          "Missing concrete implementation of '{0}'.",
+          correction: "Try implementing the missing method, or make the class "
+              "abstract.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the first member
+   * 1: the name of the second member
+   * 2: the name of the third member
+   */
+  static const CompileTimeErrorCode
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE =
+      CompileTimeErrorCodeWithUniqueName(
+          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+          'CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
+          "Missing concrete implementations of '{0}', '{1}', and '{2}'.",
+          correction: "Try implementing the missing methods, or make the class "
+              "abstract.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the first member
+   * 1: the name of the second member
+   */
+  static const CompileTimeErrorCode
+      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO =
+      CompileTimeErrorCodeWithUniqueName(
+          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
+          'CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO',
+          "Missing concrete implementations of '{0}' and '{1}'.",
+          correction: "Try implementing the missing methods, or make the class "
+              "abstract.",
+          hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a condition, such as an `if` or
+  // `while` loop, doesn't have the static type `bool`.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` has the static type
+  // `int`:
+  //
+  // ```dart
+  // void f(int x) {
+  //   if ([!x!]) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the condition so that it produces a Boolean value:
+  //
+  // ```dart
+  // void f(int x) {
+  //   if (x == 0) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode NON_BOOL_CONDITION = CompileTimeErrorCode(
+      'NON_BOOL_CONDITION', "Conditions must have a static type of 'bool'.",
+      correction: "Try changing the condition.", hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the first expression in an
+  // assert has a type other than `bool`.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the type of `p` is
+  // `int`, but a `bool` is required:
+  //
+  // ```dart
+  // void f(int p) {
+  //   assert([!p!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the expression so that it has the type `bool`:
+  //
+  // ```dart
+  // void f(int p) {
+  //   assert(p > 0);
+  // }
+  // ```
+  static const CompileTimeErrorCode NON_BOOL_EXPRESSION = CompileTimeErrorCode(
+      'NON_BOOL_EXPRESSION',
+      "The expression in an assert must be of type 'bool'.",
+      correction: "Try changing the expression.",
+      hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the operand of the unary
+  // negation operator (`!`) doesn't have the type `bool`.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` is an `int` when it
+  // must be a `bool`:
+  //
+  // ```dart
+  // int x = 0;
+  // bool y = ![!x!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the operand with an expression that has the type `bool`:
+  //
+  // ```dart
+  // int x = 0;
+  // bool y = !(x > 0);
+  // ```
+  static const CompileTimeErrorCode NON_BOOL_NEGATION_EXPRESSION =
+      CompileTimeErrorCode('NON_BOOL_NEGATION_EXPRESSION',
+          "A negation operand must have a static type of 'bool'.",
+          correction: "Try changing the operand to the '!' operator.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the lexeme of the logical operator
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when one of the operands of either
+  // the `&&` or `||` operator doesn't have the type `bool`.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `a` isn't a Boolean
+  // value:
+  //
+  // ```dart
+  // int a = 3;
+  // bool b = [!a!] || a > 1;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the operand to a Boolean value:
+  //
+  // ```dart
+  // int a = 3;
+  // bool b = a == 0 || a > 1;
+  // ```
+  static const CompileTimeErrorCode NON_BOOL_OPERAND = CompileTimeErrorCode(
+      'NON_BOOL_OPERAND',
+      "The operands of the operator '{0}' must be assignable to 'bool'.",
+      hasPublishedDocs: true);
+
+  /**
    * 13.2 Expression Statements: It is a compile-time error if a non-constant
    * map literal that has no explicit type arguments appears in a place where a
    * statement is expected.
@@ -4375,6 +6160,52 @@
    */
   // #### Description
   //
+  // The analyzer produces this diagnostic when an annotation is the invocation
+  // of an existing constructor even though the invoked constructor isn't a
+  // const constructor.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the constructor for `C`
+  // isn't a const constructor:
+  //
+  // ```dart
+  // [!@C()!]
+  // void f() {
+  // }
+  //
+  // class C {
+  //   C();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If it's valid for the class to have a const constructor, then create a
+  // const constructor that can be used for the annotation:
+  //
+  // ```dart
+  // @C()
+  // void f() {
+  // }
+  //
+  // class C {
+  //   const C();
+  // }
+  // ```
+  //
+  // If it isn't valid for the class to have a const constructor, then either
+  // 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.",
+          hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
   // The analyzer produces this diagnostic when the expression in a `case`
   // clause isn't a constant expression.
   //
@@ -4500,7 +6331,7 @@
   // The analyzer produces this diagnostic when an element in a constant list
   // literal isn't a constant value. The list literal can be constant either
   // explicitly (because it's prefixed by the `const` keyword) or implicitly
-  // (because it appears in a [constant context](#constant-context)).
+  // (because it appears in a [constant context][]).
   //
   // #### Examples
   //
@@ -4558,6 +6389,56 @@
    */
   // #### Description
   //
+  // 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's attempting to
+  // spread a non-constant map:
+  //
+  // ```dart
+  // var notConst = <int, int>{};
+  // var map = const <int, int>{...[!notConst!]};
+  // ```
+  //
+  // Similarly, the following code produces this diagnostic because the
+  // condition in the `if` element isn't a constant expression:
+  //
+  // ```dart
+  // bool notConst = true;
+  // var map = const <int, int>{if ([!notConst!]) 1 : 2};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // 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:
+  //
+  // ```dart
+  // const notConst = <int, int>{};
+  // var map = const <int, int>{...notConst};
+  // ```
+  //
+  // If the map doesn't need to be a constant map, then remove the `const`
+  // keyword:
+  //
+  // ```dart
+  // bool notConst = true;
+  // var map = <int, int>{if (notConst) 1 : 2};
+  // ```
+  static const CompileTimeErrorCode NON_CONSTANT_MAP_ELEMENT =
+      CompileTimeErrorCode('NON_CONSTANT_MAP_ELEMENT',
+          "The elements in a const map literal must be constant.",
+          correction: "Try removing the keyword 'const' from the map literal.",
+          hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
   // The analyzer produces this diagnostic when a key in a constant map literal
   // isn't a constant value.
   //
@@ -4646,56 +6527,6 @@
           hasPublishedDocs: true);
 
   /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // 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's attempting to
-  // spread a non-constant map:
-  //
-  // ```dart
-  // var notConst = <int, int>{};
-  // var map = const <int, int>{...[!notConst!]};
-  // ```
-  //
-  // Similarly, the following code produces this diagnostic because the
-  // condition in the `if` element isn't a constant expression:
-  //
-  // ```dart
-  // bool notConst = true;
-  // var map = const <int, int>{if ([!notConst!]) 1 : 2};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // 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:
-  //
-  // ```dart
-  // const notConst = <int, int>{};
-  // var map = const <int, int>{...notConst};
-  // ```
-  //
-  // If the map doesn't need to be a constant map, then remove the `const`
-  // keyword:
-  //
-  // ```dart
-  // bool notConst = true;
-  // var map = <int, int>{if (notConst) 1 : 2};
-  // ```
-  static const CompileTimeErrorCode NON_CONSTANT_MAP_ELEMENT =
-      CompileTimeErrorCode('NON_CONSTANT_MAP_ELEMENT',
-          "The elements in a const map literal must be constant.",
-          correction: "Try removing the keyword 'const' from the map literal.",
-          hasPublishedDocs: true);
-
-  /**
    * 12.7 Maps: It is a compile time error if either a key or a value of an
    * entry in a constant map literal is not a compile-time constant.
    *
@@ -4714,52 +6545,6 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when an annotation is the invocation
-  // of an existing constructor even though the invoked constructor isn't a
-  // const constructor.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constructor for `C`
-  // isn't a const constructor:
-  //
-  // ```dart
-  // [!@C()!]
-  // void f() {
-  // }
-  //
-  // class C {
-  //   C();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it's valid for the class to have a const constructor, then create a
-  // const constructor that can be used for the annotation:
-  //
-  // ```dart
-  // @C()
-  // void f() {
-  // }
-  //
-  // class C {
-  //   const C();
-  // }
-  // ```
-  //
-  // If it isn't valid for the class to have a const constructor, then either
-  // 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.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
   // The analyzer produces this diagnostic when a constant set literal contains
   // an element that isn't a compile-time constant.
   //
@@ -4797,44 +6582,182 @@
           hasPublishedDocs: true);
 
   /**
-   * This error code is no longer being generated. It should be removed when the
-   * reference to it in the linter has been removed and rolled into the SDK.
-   */
-  @deprecated
-  static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER =
-      CompileTimeErrorCode(
-          'NON_CONSTANT_VALUE_IN_INITIALIZER',
-          "Initializer expressions in constant constructors must be "
-              "constants.");
-
-  /**
    * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the
    * superinitializer appears and let <i>S</i> be the superclass of <i>C</i>.
    * Let <i>k</i> be a generative constructor. It is a compile-time error if
    * class <i>S</i> does not declare a generative constructor named <i>S</i>
    * (respectively <i>S.id</i>)
+   *
+   * Parameters:
+   * 0: the non-generative constructor
    */
   static const CompileTimeErrorCode NON_GENERATIVE_CONSTRUCTOR =
-      CompileTimeErrorCode('NON_GENERATIVE_CONSTRUCTOR',
-          "The generative constructor '{0}' expected, but factory found.",
+      CompileTimeErrorCode(
+          'NON_GENERATIVE_CONSTRUCTOR',
+          "The constructor '{0}' is a factory constructor, but must be a"
+              " generative constructor to be a valid superinitializer.",
           correction:
-              "Try calling a different constructor in the superclass, or "
+              "Try calling a different constructor of the superclass, or "
               "making the called constructor not be a factory constructor.");
 
+  /**
+   * An error code for when a class has no explicit constructor, and therefore
+   * a constructor is implicitly defined which uses a factory as a
+   * superinitializer. See [NON_GENERATIVE_CONSTRUCTOR].
+   *
+   * Parameters:
+   * 0: the name of the superclass
+   * 1: the name of the current class
+   * 2: the implicitly called factory constructor of the superclass
+   */
+  static const CompileTimeErrorCode NON_GENERATIVE_IMPLICIT_CONSTRUCTOR =
+      CompileTimeErrorCode(
+          'NON_GENERATIVE_IMPLICIT_CONSTRUCTOR',
+          "The default constructor of superclass '{0}' (called by the implicit"
+              " default constructor of '{1}') must be a generative constructor,"
+              " but factory found.",
+          correction: 'Try adding an explicit constructor that has a different'
+              " superinitializer or changing the superclass constructor '{2}'"
+              " to not be a factory constructor.");
+
   static const CompileTimeErrorCode NON_SYNC_FACTORY = CompileTimeErrorCode(
       'NON_SYNC_FACTORY',
       "Factory bodies can't use 'async', 'async*', or 'sync*'.");
 
   /**
    * Parameters:
+   * 0: the name appearing where a type is expected
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an identifier that isn't a type
+  // is used as a type argument.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` is a variable, not
+  // a type:
+  //
+  // ```dart
+  // var x = 0;
+  // List<[!x!]> xList = [];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the type argument to be a type:
+  //
+  // ```dart
+  // var x = 0;
+  // List<int> xList = [];
+  // ```
+  static const CompileTimeErrorCode NON_TYPE_AS_TYPE_ARGUMENT =
+      CompileTimeErrorCode('NON_TYPE_AS_TYPE_ARGUMENT',
+          "The name '{0}' isn't a type so it can't be used as a type argument.",
+          correction: "Try correcting the name to an existing type, or "
+              "defining a type named '{0}'.",
+          hasPublishedDocs: true,
+          isUnresolvedIdentifier: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the non-type element
+   */
+  // #### 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.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` is a function, not
+  // a type:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } on [!f!] {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the name to the type of object that should be caught:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } on FormatException {
+  //     // ...
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode NON_TYPE_IN_CATCH_CLAUSE =
+      CompileTimeErrorCode(
+          'NON_TYPE_IN_CATCH_CLAUSE',
+          "The name '{0}' isn't a type and can't be used in an on-catch "
+              "clause.",
+          correction: "Try correcting the name to match an existing class.",
+          hasPublishedDocs: true);
+
+  /**
+   * 7.1.1 Operators: It is a static warning if the return type of the
+   * user-declared operator []= is explicitly declared and not void.
+   */
+  static const CompileTimeErrorCode NON_VOID_RETURN_FOR_OPERATOR =
+      CompileTimeErrorCode('NON_VOID_RETURN_FOR_OPERATOR',
+          "The return type of the operator []= must be 'void'.",
+          correction: "Try changing the return type to 'void'.");
+
+  /**
+   * 7.3 Setters: It is a static warning if a setter declares a return type
+   * other than void.
+   */
+  static const CompileTimeErrorCode NON_VOID_RETURN_FOR_SETTER =
+      CompileTimeErrorCode('NON_VOID_RETURN_FOR_SETTER',
+          "The return type of the setter must be 'void' or absent.",
+          correction: "Try removing the return type, or "
+              "define a method rather than a setter.");
+
+  /**
+   * Parameters:
+   * 0: the name that is not a type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name is used as a type but
+  // declared to be something other than a type.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` is a function:
+  //
+  // ```dart
+  // f() {}
+  // g([!f!] v) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the name with the name of a type.
+  static const CompileTimeErrorCode NOT_A_TYPE = CompileTimeErrorCode(
+      'NOT_A_TYPE', "{0} isn't a type.",
+      correction: "Try correcting the name to match an existing type.",
+      hasPublishedDocs: true);
+
+  /**
+   * Parameters:
    * 0: the name of the variable that is invalid
    */
   // #### Description
   //
   // The analyzer produces this diagnostic when a local variable is referenced
   // and has all these characteristics:
-  // - Has a type that's <a href=”#potentially-non-nullable”>potentially
-  //   non-nullable</a>.
+  // - Has a type that's [potentially non-nullable][].
   // - Doesn't have an initializer.
   // - Isn't marked as `late`.
   // - The analyzer can't prove that the local variable will be assigned before
@@ -4996,10 +6919,6 @@
           correction: "Try adding the missing arguments.",
           hasPublishedDocs: true);
 
-  @Deprecated('Use CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS')
-  static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS =
-      NOT_ENOUGH_POSITIONAL_ARGUMENTS;
-
   /**
    * Parameters:
    * 0: the name of the field that is not initialized
@@ -5008,8 +6927,7 @@
   //
   // The analyzer produces this diagnostic when a field is declared and has all
   // these characteristics:
-  // - Has a type that's <a href=”#potentially-non-nullable”>potentially
-  //   non-nullable</a>
+  // - Has a type that's [potentially non-nullable][]
   // - Doesn't have an initializer
   // - Isn't marked as `late`
   //
@@ -5171,6 +7089,14 @@
   /**
    * No parameters.
    */
+  static const CompileTimeErrorCode NOT_INSTANTIATED_BOUND =
+      CompileTimeErrorCode('NOT_INSTANTIATED_BOUND',
+          'Type parameter bound types must be instantiated.',
+          correction: 'Try adding type arguments to the type parameter bound.');
+
+  /**
+   * No parameters.
+   */
   // #### Description
   //
   // The analyzer produces this diagnostic when the static type of the
@@ -5440,6 +7366,49 @@
 
   /**
    * Parameters:
+   * 0: the name of expected library name
+   * 1: the non-matching actual library name from the "part of" declaration
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a library attempts to include a
+  // file as a part of itself when the other file is a part of a different
+  // library.
+  //
+  // #### Example
+  //
+  // Given a file named `part.dart` containing
+  //
+  // ```dart
+  // %uri="package:a/part.dart"
+  // part of 'library.dart';
+  // ```
+  //
+  // The following code, in any file other than `library.dart`, produces this
+  // diagnostic because it attempts to include `part.dart` as a part of itself
+  // when `part.dart` is a part of a different library:
+  //
+  // ```dart
+  // part [!'package:a/part.dart'!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the library should be using a different file as a part, then change the
+  // URI in the part directive to be the URI of the other file.
+  //
+  // If the part file should be a part of this library, then update the URI (or
+  // library name) in the part-of directive to be the URI (or name) of the
+  // correct library.
+  static const CompileTimeErrorCode PART_OF_DIFFERENT_LIBRARY =
+      CompileTimeErrorCode('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.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
    * 0: the uri pointing to a non-library declaration
    */
   // #### Description
@@ -5564,6 +7533,24 @@
           hasPublishedDocs: true);
 
   /**
+   * From the `Static Types` section of the spec:
+   *
+   *     A type T is malformed if:
+   *     - T has the form id or the form prefix.id, and in the enclosing lexical
+   *       scope, the name id (respectively prefix.id) does not denote a type.
+   *
+   * In particular, this means that if an import prefix is shadowed by a local
+   * declaration, it is an error to try to use it as a prefix for a type name.
+   */
+  static const CompileTimeErrorCode PREFIX_SHADOWED_BY_LOCAL_DECLARATION =
+      CompileTimeErrorCode(
+          'PREFIX_SHADOWED_BY_LOCAL_DECLARATION',
+          "The prefix '{0}' can't be used here because it is shadowed by a "
+              "local declaration.",
+          correction:
+              "Try renaming either the prefix or the local declaration.");
+
+  /**
    * It is an error for a mixin to add a private name that conflicts with a
    * private name added by a superclass or another mixin.
    */
@@ -5582,6 +7569,12 @@
       CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER',
           "Named optional parameters can't start with an underscore.");
 
+  static const CompileTimeErrorCode PRIVATE_SETTER = CompileTimeErrorCode(
+      'PRIVATE_SETTER',
+      "The setter '{0}' is private and can't be accessed outside of the "
+          "library that declares it.",
+      correction: "Try making it public.");
+
   /**
    * 12.1 Constants: It is a compile-time error if the value of a compile-time
    * constant expression depends on itself.
@@ -5724,6 +7717,148 @@
           correction: "Try redirecting to a constructor of a different class.");
 
   /**
+   * Parameters:
+   * 0: the name of the redirected constructor
+   * 1: the name of the redirecting constructor
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a factory constructor attempts
+  // to redirect to another constructor, but the two have incompatible
+  // parameters. The parameters are compatible if all of the parameters of the
+  // redirecting constructor can be passed to the other constructor and if the
+  // other constructor doesn't require any parameters that aren't declared by
+  // the redirecting constructor.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the constructor for `A`
+  // doesn't declare a parameter that the constructor for `B` requires:
+  //
+  // ```dart
+  // abstract class A {
+  //   factory A() = [!B!];
+  // }
+  //
+  // class B implements A {
+  //   B(int x);
+  //   B.zero();
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the constructor for `A`
+  // declares a named parameter (`y`) that the constructor for `B` doesn't
+  // allow:
+  //
+  // ```dart
+  // abstract class A {
+  //   factory A(int x, {int y}) = [!B!];
+  // }
+  //
+  // class B implements A {
+  //   B(int x);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If there's a different constructor that is compatible with the redirecting
+  // constructor, then redirect to that constructor:
+  //
+  // ```dart
+  // abstract class A {
+  //   factory A() = B.zero;
+  // }
+  //
+  // class B implements A {
+  //   B(int x);
+  //   B.zero();
+  // }
+  // ```
+  //
+  // Otherwise, update the redirecting constructor to be compatible:
+  //
+  // ```dart
+  // abstract class A {
+  //   factory A(int x) = B;
+  // }
+  //
+  // class B implements A {
+  //   B(int x);
+  // }
+  // ```
+  static const CompileTimeErrorCode REDIRECT_TO_INVALID_FUNCTION_TYPE =
+      CompileTimeErrorCode(
+          'REDIRECT_TO_INVALID_FUNCTION_TYPE',
+          "The redirected constructor '{0}' has incompatible parameters with "
+              "'{1}'.",
+          correction: "Try redirecting to a different constructor.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the redirected constructor's return type
+   * 1: the name of the redirecting constructor's return type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a factory constructor redirects
+  // to a constructor whose return type isn't a subtype of the type that the
+  // factory constructor is declared to produce.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `A` isn't a subclass
+  // of `C`, which means that the value returned by the constructor `A()`
+  // couldn't be returned from the constructor `C()`:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class B implements C {}
+  //
+  // class C {
+  //   factory C() = [!A!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the factory constructor is redirecting to a constructor in the wrong
+  // class, then update the factory constructor to redirect to the correct
+  // constructor:
+  //
+  // ```dart
+  // class A {}
+  //
+  // class B implements C {}
+  //
+  // class C {
+  //   factory C() = B;
+  // }
+  // ```
+  //
+  // 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:
+  //
+  // ```dart
+  // class A implements C {}
+  //
+  // class B implements C {}
+  //
+  // class C {
+  //   factory C() = A;
+  // }
+  // ```
+  static const CompileTimeErrorCode REDIRECT_TO_INVALID_RETURN_TYPE =
+      CompileTimeErrorCode(
+          'REDIRECT_TO_INVALID_RETURN_TYPE',
+          "The return type '{0}' of the redirected constructor isn't "
+              "a subtype of '{1}'.",
+          correction: "Try redirecting to a different constructor.",
+          hasPublishedDocs: true);
+
+  /**
    * 7.6.2 Factories: It is a compile-time error if <i>k</i> is prefixed with
    * the const modifier but <i>k'</i> is not a constant constructor.
    */
@@ -5926,6 +8061,144 @@
       correction: "Try removing the value, replacing 'return' with 'yield' or "
           "changing the method body modifier.");
 
+  /**
+   * Parameters:
+   * 0: the return type as declared in the return statement
+   * 1: the expected return type as defined by the method
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the static type of a returned
+  // expression isn't assignable to the return type that the closure is required
+  // to have.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` is defined to be a
+  // function that returns a `String`, but the closure assigned to it returns an
+  // `int`:
+  //
+  // ```dart
+  // String Function(String) f = (s) => [!3!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the return type is correct, then replace the returned value with a value
+  // of the correct type, possibly by converting the existing value:
+  //
+  // ```dart
+  // String Function(String) f = (s) => 3.toString();
+  // ```
+  static const CompileTimeErrorCode RETURN_OF_INVALID_TYPE_FROM_CLOSURE =
+      CompileTimeErrorCode(
+          'RETURN_OF_INVALID_TYPE_FROM_CLOSURE',
+          "The return type '{0}' isn't a '{1}', as required by the closure's "
+              "context.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the return type as declared in the return statement
+   * 1: the expected return type as defined by the enclosing class
+   * 2: the name of the constructor
+   */
+  static const CompileTimeErrorCode RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR =
+      CompileTimeErrorCodeWithUniqueName(
+          'RETURN_OF_INVALID_TYPE',
+          'CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR',
+          "A value of type '{0}' can't be returned from constructor '{2}' "
+              "because it has a return type of '{1}'.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the return type as declared in the return statement
+   * 1: the expected return type as defined by the method
+   * 2: the name of the method
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method or function returns a
+  // value whose type isn't assignable to the declared return type.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` has a return type
+  // of `String` but is returning an `int`:
+  //
+  // ```dart
+  // String f() => [!3!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // 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:
+  //
+  // ```dart
+  // String f() => 3.toString();
+  // ```
+  //
+  // If the value is correct, then change the return type to match:
+  //
+  // ```dart
+  // int f() => 3;
+  // ```
+  static const CompileTimeErrorCode RETURN_OF_INVALID_TYPE_FROM_FUNCTION =
+      CompileTimeErrorCodeWithUniqueName(
+          'RETURN_OF_INVALID_TYPE',
+          'CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION',
+          "A value of type '{0}' can't be returned from function '{2}' because "
+              "it has a return type of '{1}'.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the return type as declared in the return statement
+   * 1: the expected return type as defined by the method
+   * 2: the name of the method
+   */
+  static const CompileTimeErrorCode RETURN_OF_INVALID_TYPE_FROM_METHOD =
+      CompileTimeErrorCodeWithUniqueName(
+          'RETURN_OF_INVALID_TYPE',
+          'CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD',
+          "A value of type '{0}' can't be returned from method '{2}' because "
+              "it has a return type of '{1}'.",
+          hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds a `return` statement
+  // without an expression in a function that declares a return type.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the function `f` is
+  // expected to return an `int`, but no value is being returned:
+  //
+  // ```dart
+  // int f() {
+  //   [!return!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add an expression that computes the value to be returned:
+  //
+  // ```dart
+  // int f() {
+  //   return 0;
+  // }
+  // ```
+  static const CompileTimeErrorCode RETURN_WITHOUT_VALUE = CompileTimeErrorCode(
+      'RETURN_WITHOUT_VALUE', "The  return value is missing after 'return'.",
+      hasPublishedDocs: true);
+
   static const CompileTimeErrorCode SET_ELEMENT_FROM_DEFERRED_LIBRARY =
       CompileTimeErrorCode(
           'SET_ELEMENT_FROM_DEFERRED_LIBRARY',
@@ -5934,6 +8207,15 @@
           correction: "Try making the deferred import non-deferred.");
 
   /**
+   * Parameters:
+   * 0: the actual type of the set element
+   * 1: the expected type of the set element
+   */
+  static const CompileTimeErrorCode SET_ELEMENT_TYPE_NOT_ASSIGNABLE =
+      CompileTimeErrorCode('SET_ELEMENT_TYPE_NOT_ASSIGNABLE',
+          "The element type '{0}' can't be assigned to the set type '{1}'.");
+
+  /**
    * 14.1 Imports: It is a compile-time error if a prefix used in a deferred
    * import is used in another import clause.
    */
@@ -5952,6 +8234,63 @@
           correction: "Try making the deferred import non-deferred.");
 
   /**
+   * Parameters:
+   * 0: the name of the instance member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class name is used to access
+  // an instance field. Instance fields don't exist on a class; they exist only
+  // on an instance of the class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` is an instance
+  // field:
+  //
+  // ```dart
+  // class C {
+  //   static int a;
+  //
+  //   int b;
+  // }
+  //
+  // int f() => C.[!b!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intend to access a static field, then change the name of the field
+  // to an existing static field:
+  //
+  // ```dart
+  // class C {
+  //   static int a;
+  //
+  //   int b;
+  // }
+  //
+  // int f() => C.a;
+  // ```
+  //
+  // If you intend to access the instance field, then use an instance of the
+  // class to access the field:
+  //
+  // ```dart
+  // class C {
+  //   static int a;
+  //
+  //   int b;
+  // }
+  //
+  // int f(C c) => c.b;
+  // ```
+  static const CompileTimeErrorCode STATIC_ACCESS_TO_INSTANCE_MEMBER =
+      CompileTimeErrorCode('STATIC_ACCESS_TO_INSTANCE_MEMBER',
+          "Instance member '{0}' can't be accessed using static access.",
+          hasPublishedDocs: true);
+
+  /**
    * No parameters.
    */
   // #### Description
@@ -6044,6 +8383,63 @@
 
   /**
    * Parameters:
+   * 0: The static type of the switch expression
+   * 1: The static type of the case expressions
+   */
+  // #### 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.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the type of `s`
+  // (`String`) isn't assignable to the type of `0` (`int`):
+  //
+  // ```dart
+  // void f(String s) {
+  //   switch ([!s!]) {
+  //     case 0:
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // 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) {
+  //   switch (int.parse(s)) {
+  //     case 0:
+  //       break;
+  //   }
+  // }
+  // ```
+  //
+  // If the type of the `switch` expression is correct, then change the `case`
+  // expressions to have the correct type:
+  //
+  // ```dart
+  // void f(String s) {
+  //   switch (s) {
+  //     case '0':
+  //       break;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode SWITCH_EXPRESSION_NOT_ASSIGNABLE =
+      CompileTimeErrorCode(
+          'SWITCH_EXPRESSION_NOT_ASSIGNABLE',
+          "Type '{0}' of the switch expression isn't assignable to "
+              "the type '{1}' of case expressions.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
    * 0: the type that can't be thrown
    */
   // #### Description
@@ -6081,6 +8477,45 @@
 
   /**
    * Parameters:
+   * 0: the element whose type could not be inferred.
+   * 1: The [TopLevelInferenceError]'s arguments that led to the cycle.
+   */
+  static const CompileTimeErrorCode TOP_LEVEL_CYCLE = CompileTimeErrorCode(
+      'TOP_LEVEL_CYCLE',
+      "The type of '{0}' can't be inferred because it depends on itself "
+          "through the cycle: {1}.",
+      correction:
+          "Try adding an explicit type to one or more of the variables in the "
+          "cycle in order to break the cycle.");
+
+  /**
+   * 15.3.1 Typedef: Any self reference, either directly, or recursively via
+   * another typedef, is a compile time error.
+   */
+  static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF =
+      CompileTimeErrorCode(
+          'TYPE_ALIAS_CANNOT_REFERENCE_ITSELF',
+          "Typedefs can't reference themselves directly or recursively via "
+              "another typedef.");
+
+  /**
+   * 15.1 Static Types: It is a static warning to use a deferred type in a type
+   * annotation.
+   *
+   * Parameters:
+   * 0: the name of the type that is deferred and being used in a type
+   *    annotation
+   */
+  static const CompileTimeErrorCode TYPE_ANNOTATION_DEFERRED_CLASS =
+      CompileTimeErrorCode(
+          'TYPE_ANNOTATION_DEFERRED_CLASS',
+          "The deferred type '{0}' can't be used in a declaration, cast or "
+              "type test.",
+          correction: "Try using a different type, or "
+              "changing the import to not be deferred.");
+
+  /**
+   * Parameters:
    * 0: the name of the type used in the instance creation that should be
    *    limited by the bound as specified in the class declaration
    * 1: the name of the bounding type
@@ -6117,18 +8552,158 @@
           hasPublishedDocs: true);
 
   /**
-   * 15.3.1 Typedef: Any self reference, either directly, or recursively via
-   * another typedef, is a compile time error.
+   * 10 Generics: However, a type parameter is considered to be a malformed type
+   * when referenced by a static member.
+   *
+   * 15.1 Static Types: Any use of a malformed type gives rise to a static
+   * warning. A malformed type is then interpreted as dynamic by the static type
+   * checker and the runtime.
    */
-  static const CompileTimeErrorCode TYPE_ALIAS_CANNOT_REFERENCE_ITSELF =
-      CompileTimeErrorCode(
-          'TYPE_ALIAS_CANNOT_REFERENCE_ITSELF',
-          "Typedefs can't reference themselves directly or recursively via "
-              "another typedef.");
+  static const CompileTimeErrorCode TYPE_PARAMETER_REFERENCED_BY_STATIC =
+      CompileTimeErrorCode('TYPE_PARAMETER_REFERENCED_BY_STATIC',
+          "Static members can't reference type parameters of the class.",
+          correction: "Try removing the reference to the type parameter, or "
+              "making the member an instance member.");
 
-  @Deprecated('Use ParserErrorCode.TYPE_PARAMETER_ON_CONSTRUCTOR')
-  static const ParserErrorCode TYPE_PARAMETER_ON_CONSTRUCTOR =
-      ParserErrorCode.TYPE_PARAMETER_ON_CONSTRUCTOR;
+  /**
+   * 10 Generics: It is a static type warning if a type parameter is a supertype
+   * of its upper bound.
+   *
+   * Parameters:
+   * 0: the name of the type parameter
+   * 1: the name of the bounding type
+   *
+   * See [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS].
+   */
+  static const CompileTimeErrorCode TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND =
+      CompileTimeErrorCode('TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND',
+          "'{0}' can't be a supertype of its upper bound.",
+          correction: "Try using a type that is or is a subclass of '{1}'.");
+
+  /**
+   * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
+   * available in the current lexical scope.
+   */
+  static const CompileTimeErrorCode TYPE_TEST_WITH_NON_TYPE =
+      CompileTimeErrorCode(
+          'TYPE_TEST_WITH_NON_TYPE',
+          "The name '{0}' isn't a type and can't be used in an 'is' "
+              "expression.",
+          correction: "Try correcting the name to match an existing type.");
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the name following the `is` in a
+  // type test expression isn't defined.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the name `Srting` isn't
+  // defined:
+  //
+  // ```dart
+  // void f(Object o) {
+  //   if (o is [!Srting!]) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the name with the name of a type:
+  //
+  // ```dart
+  // void f(Object o) {
+  //   if (o is String) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode TYPE_TEST_WITH_UNDEFINED_NAME =
+      CompileTimeErrorCode(
+          'TYPE_TEST_WITH_UNDEFINED_NAME',
+          "The name '{0}' isn't defined, so it can't be used in an 'is' "
+              "expression.",
+          correction:
+              "Try changing the name to the name of an existing type, or "
+              "creating a type with the name '{0}'.",
+          hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an expression whose type is
+  // [potentially non-nullable][] is dereferenced without first verifying that
+  // the value isn't `null`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `s` can be `null` at
+  // the point where it's referenced:
+  //
+  // ```dart
+  // %experiments=non-nullable
+  // void f(String? s) {
+  //   if ([!s!].length > 3) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the value really can be `null`, then add a test to ensure that members
+  // are only accessed when the value isn't `null`:
+  //
+  // ```dart
+  // %experiments=non-nullable
+  // void f(String? s) {
+  //   if (s != null && s.length > 3) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // If the expression is a variable and the value should never be `null`, then
+  // change the type of the variable to be non-nullable:
+  //
+  // ```dart
+  // %experiments=non-nullable
+  // void f(String s) {
+  //   if (s.length > 3) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // If you believe that the value of the expression should never be `null`, but
+  // you can't change the type of the variable, and you're willing to risk
+  // having an exception thrown at runtime if you're wrong, then you can assert
+  // that the value isn't null:
+  //
+  // ```dart
+  // %experiments=non-nullable
+  // void f(String? s) {
+  //   if (s!.length > 3) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode UNCHECKED_USE_OF_NULLABLE_VALUE =
+      CompileTimeErrorCode(
+          'UNCHECKED_USE_OF_NULLABLE_VALUE',
+          "An expression whose value can be 'null' must be null-checked before "
+              "it can be dereferenced.",
+          correction:
+              "Try checking that the value isn't 'null' before dereferencing "
+              "it.",
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -6216,6 +8791,15 @@
       isUnresolvedIdentifier: true);
 
   /**
+   * Same as [CompileTimeErrorCode.UNDEFINED_CLASS], but to catch using
+   * "boolean" instead of "bool".
+   */
+  static const CompileTimeErrorCode UNDEFINED_CLASS_BOOLEAN =
+      CompileTimeErrorCode(
+          'UNDEFINED_CLASS_BOOLEAN', "Undefined class 'boolean'.",
+          correction: "Try using the type 'bool'.");
+
+  /**
    * Parameters:
    * 0: the name of the superclass that does not define the invoked constructor
    * 1: the name of the constructor being invoked
@@ -6300,6 +8884,55 @@
 
   /**
    * Parameters:
+   * 0: the name of the enumeration constant that is not defined
+   * 1: the name of the enumeration used to access the constant
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it encounters an identifier that
+  // appears to be the name of an enum constant, and the name either isn't
+  // defined or isn't visible in the scope in which it's being referenced.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `E` doesn't define a
+  // constant named `c`:
+  //
+  // ```dart
+  // enum E {a, b}
+  //
+  // var e = E.[!c!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the constant should be defined, then add it to the declaration of the
+  // enum:
+  //
+  // ```dart
+  // enum E {a, b, c}
+  //
+  // var e = E.c;
+  // ```
+  //
+  // If the constant shouldn't be defined, then change the name to the name of
+  // an existing constant:
+  //
+  // ```dart
+  // enum E {a, b}
+  //
+  // var e = E.b;
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_ENUM_CONSTANT =
+      CompileTimeErrorCode('UNDEFINED_ENUM_CONSTANT',
+          "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}'.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
    * 0: the name of the getter that is undefined
    * 1: the name of the extension that was explicitly specified
    */
@@ -6615,6 +9248,198 @@
 
   /**
    * Parameters:
+   * 0: the name of the method that is undefined
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it encounters an identifier that
+  // appears to be the name of a function but either isn't defined or isn't
+  // visible in the scope in which it's being referenced.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the name `emty` isn't
+  // defined:
+  //
+  // ```dart
+  // List<int> empty() => [];
+  //
+  // void main() {
+  //   print([!emty!]());
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the identifier isn't defined, then either define it or replace it with
+  // the name of a function that is defined. The example above can be corrected
+  // by fixing the spelling of the function:
+  //
+  // ```dart
+  // List<int> empty() => [];
+  //
+  // void main() {
+  //   print(empty());
+  // }
+  // ```
+  //
+  // If the function is defined but isn't visible, then you probably need to add
+  // an import or re-arrange your code to make the function visible.
+  static const CompileTimeErrorCode UNDEFINED_FUNCTION = CompileTimeErrorCode(
+      'UNDEFINED_FUNCTION', "The function '{0}' isn't defined.",
+      correction: "Try importing the library that defines '{0}', "
+          "correcting the name to the name of an existing function, or "
+          "defining a function named '{0}'.",
+      hasPublishedDocs: true,
+      isUnresolvedIdentifier: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the getter
+   * 1: the name of the enclosing type where the getter is being looked for
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it encounters an identifier that
+  // appears to be the name of a getter but either isn't defined or isn't
+  // visible in the scope in which it's being referenced.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `String` has no member
+  // named `len`:
+  //
+  // ```dart
+  // int f(String s) => s.[!len!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the identifier isn't defined, then either define it or replace it with
+  // the name of a getter that is defined. The example above can be corrected by
+  // fixing the spelling of the getter:
+  //
+  // ```dart
+  // int f(String s) => s.length;
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_GETTER = CompileTimeErrorCode(
+      'UNDEFINED_GETTER', "The getter '{0}' isn't defined for the type '{1}'.",
+      correction: "Try importing the library that defines '{0}', "
+          "correcting the name to the name of an existing getter, or "
+          "defining a getter or field named '{0}'.",
+      hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the identifier
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it encounters an identifier that
+  // either isn't defined or isn't visible in the scope in which it's being
+  // referenced.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the name `rihgt` isn't
+  // defined:
+  //
+  // ```dart
+  // int min(int left, int right) => left <= [!rihgt!] ? left : right;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the identifier isn't defined, then either define it or replace it with
+  // an identifier that is defined. The example above can be corrected by
+  // fixing the spelling of the variable:
+  //
+  // ```dart
+  // int min(int left, int right) => left <= right ? left : right;
+  // ```
+  //
+  // If the identifier is defined but isn't visible, then you probably need to
+  // add an import or re-arrange your code to make the identifier visible.
+  static const CompileTimeErrorCode UNDEFINED_IDENTIFIER =
+      CompileTimeErrorCode('UNDEFINED_IDENTIFIER', "Undefined name '{0}'.",
+          correction: "Try correcting the name to one that is defined, or "
+              "defining the name.",
+          hasPublishedDocs: true,
+          isUnresolvedIdentifier: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the name `await` is used in a
+  // method or function body without being declared, and the body isn't marked
+  // with the `async` keyword. The name `await` only introduces an await
+  // expression in an asynchronous function.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the name `await` is
+  // used in the body of `f` even though the body of `f` isn't marked with the
+  // `async` keyword:
+  //
+  // ```dart
+  // void f(p) { [!await!] p; }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add the keyword `async` to the function body:
+  //
+  // ```dart
+  // void f(p) async { await p; }
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_IDENTIFIER_AWAIT =
+      CompileTimeErrorCode('UNDEFINED_IDENTIFIER_AWAIT',
+          "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.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the method that is undefined
+   * 1: the resolved type name that the method lookup is happening on
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it encounters an identifier that
+  // appears to be the name of a method but either isn't defined or isn't
+  // visible in the scope in which it's being referenced.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the identifier
+  // `removeMiddle` isn't defined:
+  //
+  // ```dart
+  // int f(List<int> l) => l.[!removeMiddle!]();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the identifier isn't defined, then either define it or replace it with
+  // the name of a method that is defined. The example above can be corrected by
+  // fixing the spelling of the method:
+  //
+  // ```dart
+  // int f(List<int> l) => l.removeLast();
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_METHOD = CompileTimeErrorCode(
+      'UNDEFINED_METHOD', "The method '{0}' isn't defined for the type '{1}'.",
+      correction:
+          "Try correcting the name to the name of an existing method, or "
+          "defining a method named '{0}'.",
+      hasPublishedDocs: true);
+
+  /**
+   * Parameters:
    * 0: the name of the requested named parameter
    */
   // #### Description
@@ -6691,6 +9516,245 @@
 
   /**
    * Parameters:
+   * 0: the name of the operator
+   * 1: the name of the enclosing type where the operator is being looked for
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a user-definable operator is
+  // invoked on an object for which the operator isn't defined.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the class `C` doesn't
+  // define the operator `+`:
+  //
+  // ```dart
+  // class C {}
+  //
+  // C f(C c) => c [!+!] 2;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the operator should be defined for the class, then define it:
+  //
+  // ```dart
+  // class C {
+  //   C operator +(int i) => this;
+  // }
+  //
+  // C f(C c) => c + 2;
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_OPERATOR = CompileTimeErrorCode(
+      'UNDEFINED_OPERATOR',
+      "The operator '{0}' isn't defined for the type '{1}'.",
+      correction: "Try defining the operator '{0}'.",
+      hasPublishedDocs: true);
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a prefixed identifier is found
+  // where the prefix is valid, but the identifier isn't declared in any of the
+  // libraries imported using that prefix.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `dart:core` doesn't
+  // define anything named `a`:
+  //
+  // ```dart
+  // import 'dart:core' as p;
+  //
+  // void f() {
+  //   p.[!a!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the library in which the name is declared isn't imported yet, add an
+  // import for the library.
+  //
+  // If the name is wrong, then change it to one of the names that's declared in
+  // the imported libraries.
+  static const CompileTimeErrorCode UNDEFINED_PREFIXED_NAME =
+      CompileTimeErrorCode(
+          'UNDEFINED_PREFIXED_NAME',
+          "The name '{0}' is being referenced through the prefix '{1}', but it "
+              "isn't defined in any of the libraries imported using that "
+              "prefix.",
+          correction: "Try correcting the prefix or "
+              "importing the library that defines '{0}'.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the name of the setter
+   * 1: the name of the enclosing type where the setter is being looked for
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it encounters an identifier that
+  // appears to be the name of a setter but either isn't defined or isn't
+  // visible in the scope in which the identifier is being referenced.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because there isn't a setter
+  // named `z`:
+  //
+  // ```dart
+  // class C {
+  //   int x = 0;
+  //   void m(int y) {
+  //     this.[!z!] = y;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the identifier isn't defined, then either define it or replace it with
+  // the name of a setter that is defined. The example above can be corrected by
+  // fixing the spelling of the setter:
+  //
+  // ```dart
+  // class C {
+  //   int x = 0;
+  //   void m(int y) {
+  //     this.x = y;
+  //   }
+  // }
+  // ```
+  static const CompileTimeErrorCode UNDEFINED_SETTER = CompileTimeErrorCode(
+      'UNDEFINED_SETTER', "The setter '{0}' isn't defined for the type '{1}'.",
+      correction: "Try importing the library that defines '{0}', "
+          "correcting the name to the name of an existing setter, or "
+          "defining a setter or field named '{0}'.",
+      hasPublishedDocs: true);
+
+  /**
+   * 12.17 Getter Invocation: 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>.
+   *
+   * Parameters:
+   * 0: the name of the getter
+   * 1: the name of the enclosing type where the getter is being looked for
+   */
+  static const CompileTimeErrorCode UNDEFINED_SUPER_GETTER =
+      CompileTimeErrorCode('UNDEFINED_SUPER_GETTER',
+          "The getter '{0}' isn't defined in a superclass of '{1}'.",
+          correction:
+              "Try correcting the name to the name of an existing getter, or "
+              "defining a getter or field named '{0}' in a superclass.");
+
+  /**
+   * Parameters:
+   * 0: the name of the method that is undefined
+   * 1: the resolved type name that the method lookup is happening on
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an inherited method is
+  // referenced using `super`, but there’s no method with that name in the
+  // superclass chain.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `Object` doesn't define
+  // a member named `n`:
+  //
+  // ```dart
+  // class C {
+  //   void m() {
+  //     super.[!n!]();
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the inherited method you intend to invoke has a different name, then
+  // make the name of the invoked method  match the inherited method.
+  //
+  // If the method you intend to invoke is defined in the same class, then
+  // remove the `super.`.
+  //
+  // If not, then either add the method to one of the superclasses or remove the
+  // invocation.
+  static const CompileTimeErrorCode UNDEFINED_SUPER_METHOD =
+      CompileTimeErrorCode('UNDEFINED_SUPER_METHOD',
+          "The method '{0}' isn't defined in a superclass of '{1}'.",
+          correction:
+              "Try correcting the name to the name of an existing method, or "
+              "defining a method named '{0}' in a superclass.",
+          hasPublishedDocs: true);
+
+  /**
+   * 12.18 Assignment: Evaluation of an assignment of the form
+   * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is
+   * equivalent to the evaluation of the expression (a, i, e){a.[]=(i, e);
+   * return e;} (<i>e<sub>1</sub></i>, <i>e<sub>2</sub></i>,
+   * <i>e<sub>2</sub></i>).
+   *
+   * 12.29 Assignable Expressions: An assignable expression of the form
+   * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] is evaluated as a method
+   * invocation of the operator method [] on <i>e<sub>1</sub></i> with argument
+   * <i>e<sub>2</sub></i>.
+   *
+   * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>.
+   * It is a static type warning if <i>T</i> does not have an accessible
+   * instance member named <i>m</i>.
+   *
+   * Parameters:
+   * 0: the name of the operator
+   * 1: the name of the enclosing type where the operator is being looked for
+   */
+  static const CompileTimeErrorCode UNDEFINED_SUPER_OPERATOR =
+      CompileTimeErrorCode('UNDEFINED_SUPER_OPERATOR',
+          "The operator '{0}' isn't defined in a superclass of '{1}'.",
+          correction: "Try defining the operator '{0}' in a superclass.");
+
+  /**
+   * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
+   * It is a static type warning if <i>T</i> does not have an accessible
+   * instance setter named <i>v=</i>.
+   *
+   * Parameters:
+   * 0: the name of the setter
+   * 1: the name of the enclosing type where the setter is being looked for
+   */
+  static const CompileTimeErrorCode UNDEFINED_SUPER_SETTER =
+      CompileTimeErrorCode('UNDEFINED_SUPER_SETTER',
+          "The setter '{0}' isn't defined in a superclass of '{1}'.",
+          correction:
+              "Try correcting the name to the name of an existing setter, or "
+              "defining a setter or field named '{0}' in a superclass.");
+
+  /**
+   * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does
+   * not have an accessible (3.2) instance member named <i>m</i>.
+   *
+   * This is a specialization of [INSTANCE_ACCESS_TO_STATIC_MEMBER] that is used
+   * when we are able to find the name defined in a supertype. It exists to
+   * provide a more informative error message.
+   *
+   * Parameters:
+   * 0: the name of the defining type
+   */
+  static const CompileTimeErrorCode
+      UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER = CompileTimeErrorCode(
+          'UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER',
+          "Static members from supertypes must be qualified by the name of the "
+              "defining type.",
+          correction: "Try adding '{0}.' before the name.");
+
+  /**
+   * Parameters:
    * 0: the name of the defining type
    */
   // #### Description
@@ -6843,6 +9907,113 @@
           'URI_WITH_INTERPOLATION', "URIs can't use string interpolation.");
 
   /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds an expression whose
+  // type is `void`, and the expression is used in a place where a value is
+  // expected, such as before a member access or on the right-hand side of an
+  // assignment.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` doesn't produce an
+  // object on which `toString` can be invoked:
+  //
+  // ```dart
+  // void f() {}
+  //
+  // void g() {
+  //   [!f()!].toString();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Either rewrite the code so that the expression has a value or rewrite the
+  // code so that it doesn't depend on the value.
+  static const CompileTimeErrorCode USE_OF_VOID_RESULT = CompileTimeErrorCode(
+      'USE_OF_VOID_RESULT',
+      "This expression has a type of 'void' so its value can't be used.",
+      correction:
+          "Try checking to see if you're using the correct API; there might "
+          "be a function or call that returns void you didn't expect. Also "
+          "check type parameters and variables which might also be void.",
+      hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: the type of the object being assigned.
+   * 1: the type of the variable being assigned to
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the evaluation of a constant
+  // expression would result in a `CastException`.
+  //
+  // #### Examples
+  //
+  // 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`:
+  //
+  // ```dart
+  // const Object x = 0;
+  // const String y = [!x!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the declaration of the constant is correct, then change the value being
+  // assigned to be of the correct type:
+  //
+  // ```dart
+  // const Object x = 0;
+  // const String y = '$x';
+  // ```
+  //
+  // If the assigned value is correct, then change the declaration to have the
+  // correct type:
+  //
+  // ```dart
+  // const Object x = 0;
+  // const int y = x;
+  // ```
+  static const CompileTimeErrorCode VARIABLE_TYPE_MISMATCH =
+      CompileTimeErrorCode(
+          'VARIABLE_TYPE_MISMATCH',
+          "A value of type '{0}' can't be assigned to a const variable of type "
+              "'{1}'.",
+          correction: "Try using a subtype, or removing the 'const' keyword",
+          hasPublishedDocs: true);
+
+  /**
+   * Let `C` be a generic class that declares a formal type parameter `X`, and
+   * assume that `T` is a direct superinterface of `C`.
+   *
+   * It is a compile-time error if `X` is explicitly defined as a covariant or
+   * 'in' type parameter and `X` occurs in a non-covariant position in `T`.
+   * It is a compile-time error if `X` is explicitly defined as a contravariant
+   * or 'out' type parameter and `X` occurs in a non-contravariant position in
+   * `T`.
+   *
+   * Parameters:
+   * 0: the name of the type parameter
+   * 1: the variance modifier defined for {0}
+   * 2: the variance position of the type parameter {0} in the
+   *    superinterface {3}
+   * 3: the name of the superinterface
+   */
+  static const CompileTimeErrorCode
+      WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE =
+      CompileTimeErrorCode(
+    'WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE',
+    "'{0}' is an '{1}' type parameter and can't be used in an '{2}' position in '{3}'.",
+    correction: "Try using 'in' type parameters in 'in' positions and 'out' "
+        "type parameters in 'out' positions in the superinterface.",
+  );
+
+  /**
    * Parameters:
    * 0: the name of the declared operator
    * 1: the number of parameters expected
@@ -6939,1146 +10110,6 @@
           hasPublishedDocs: true);
 
   /**
-   * Let `C` be a generic class that declares a formal type parameter `X`, and
-   * assume that `T` is a direct superinterface of `C`. It is a compile-time
-   * error if `X` occurs contravariantly or invariantly in `T`.
-   */
-  static const CompileTimeErrorCode
-      WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE = CompileTimeErrorCode(
-    'WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE',
-    "'{0}' can't be used contravariantly or invariantly in '{1}'.",
-    correction: "Try not using class type parameters in types of formal "
-        "parameters of function types, nor in explicitly contravariant or "
-        "invariant superinterfaces.",
-  );
-
-  /**
-   * Let `C` be a generic class that declares a formal type parameter `X`.
-   *
-   * If `X` is explicitly contravariant then it is a compile-time error for
-   * `X` to occur in a non-contravariant position in a member signature in the
-   * body of `C`, except when `X` is in a contravariant position in the type
-   * annotation of a covariant formal parameter.
-   *
-   * If `X` is explicitly covariant then it is a compile-time error for
-   * `X` to occur in a non-covariant position in a member signature in the
-   * body of `C`, except when `X` is in a covariant position in the type
-   * annotation of a covariant formal parameter.
-   *
-   * Parameters:
-   * 0: the variance modifier defined for {0}
-   * 1: the name of the type parameter
-   * 2: the variance position that the type parameter {1} is in
-   */
-  static const CompileTimeErrorCode WRONG_TYPE_PARAMETER_VARIANCE_POSITION =
-      CompileTimeErrorCode(
-    'WRONG_TYPE_PARAMETER_VARIANCE_POSITION',
-    "The '{0}' type parameter '{1}' can't be used in an '{2}' position.",
-    correction: "Try removing the type parameter or change the explicit "
-        "variance modifier declaration for the type parameter to another one of"
-        " 'in', 'out', or 'inout'.",
-  );
-
-  /**
-   * Let `C` be a generic class that declares a formal type parameter `X`, and
-   * assume that `T` is a direct superinterface of `C`.
-   *
-   * It is a compile-time error if `X` is explicitly defined as a covariant or
-   * 'in' type parameter and `X` occurs in a non-covariant position in `T`.
-   * It is a compile-time error if `X` is explicitly defined as a contravariant
-   * or 'out' type parameter and `X` occurs in a non-contravariant position in
-   * `T`.
-   *
-   * Parameters:
-   * 0: the name of the type parameter
-   * 1: the variance modifier defined for {0}
-   * 2: the variance position of the type parameter {0} in the
-   *    superinterface {3}
-   * 3: the name of the superinterface
-   */
-  static const CompileTimeErrorCode
-      WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE =
-      CompileTimeErrorCode(
-    'WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE',
-    "'{0}' is an '{1}' type parameter and can't be used in an '{2}' position in '{3}'.",
-    correction: "Try using 'in' type parameters in 'in' positions and 'out' "
-        "type parameters in 'out' positions in the superinterface.",
-  );
-
-  /**
-   * ?? Yield: It is a compile-time error if a yield statement appears in a
-   * function that is not a generator function.
-   */
-  static const CompileTimeErrorCode YIELD_EACH_IN_NON_GENERATOR =
-      CompileTimeErrorCode(
-          'YIELD_EACH_IN_NON_GENERATOR',
-          "Yield-each statements must be in a generator function "
-              "(one marked with either 'async*' or 'sync*').",
-          correction:
-              "Try adding 'async*' or 'sync*' to the enclosing function.");
-
-  /**
-   * ?? Yield: It is a compile-time error if a yield statement appears in a
-   * function that is not a generator function.
-   */
-  static const CompileTimeErrorCode YIELD_IN_NON_GENERATOR =
-      CompileTimeErrorCode(
-          'YIELD_IN_NON_GENERATOR',
-          "Yield statements must be in a generator function "
-              "(one marked with either 'async*' or 'sync*').",
-          correction:
-              "Try adding 'async*' or 'sync*' to the enclosing function.");
-
-  /**
-   * Initialize a newly created error code to have the given [name]. The message
-   * associated with the error will be created from the given [message]
-   * template. The correction associated with the error will be created from the
-   * given [correction] template.
-   */
-  const CompileTimeErrorCode(String name, String message,
-      {String correction,
-      bool hasPublishedDocs,
-      bool isUnresolvedIdentifier = false})
-      : super.temporary(name, message,
-            correction: correction,
-            hasPublishedDocs: hasPublishedDocs,
-            isUnresolvedIdentifier: isUnresolvedIdentifier);
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
-
-  @override
-  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
-}
-
-class CompileTimeErrorCodeWithUniqueName extends CompileTimeErrorCode {
-  @override
-  final String uniqueName;
-
-  const CompileTimeErrorCodeWithUniqueName(
-      String name, this.uniqueName, String message,
-      {String correction,
-      bool hasPublishedDocs,
-      bool isUnresolvedIdentifier = false})
-      : super(name, message,
-            correction: correction,
-            hasPublishedDocs: hasPublishedDocs,
-            isUnresolvedIdentifier: isUnresolvedIdentifier);
-}
-
-/**
- * The error codes used for static type warnings. 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 StaticTypeWarningCode extends AnalyzerErrorCode {
-  /**
-   * 12.7 Lists: A fresh instance (7.6.1) <i>a</i>, of size <i>n</i>, whose
-   * class implements the built-in class <i>List&lt;E></i> is allocated.
-   *
-   * Parameters:
-   * 0: the number of provided type arguments
-   */
-  static const StaticTypeWarningCode EXPECTED_ONE_LIST_TYPE_ARGUMENTS =
-      StaticTypeWarningCode(
-          'EXPECTED_ONE_LIST_TYPE_ARGUMENTS',
-          "List literals require exactly one type argument or none, "
-              "but {0} found.",
-          correction: "Try adjusting the number of type arguments.");
-
-  /**
-   * Parameters:
-   * 0: the number of provided type arguments
-   */
-  static const StaticTypeWarningCode EXPECTED_ONE_SET_TYPE_ARGUMENTS =
-      StaticTypeWarningCode(
-          'EXPECTED_ONE_SET_TYPE_ARGUMENTS',
-          "Set literals require exactly one type argument or none, "
-              "but {0} found.",
-          correction: "Try adjusting the number of type arguments.");
-
-  /**
-   * 12.8 Maps: A fresh instance (7.6.1) <i>m</i>, of size <i>n</i>, whose class
-   * implements the built-in class <i>Map&lt;K, V></i> is allocated.
-   *
-   * Parameters:
-   * 0: the number of provided type arguments
-   */
-  static const StaticTypeWarningCode EXPECTED_TWO_MAP_TYPE_ARGUMENTS =
-      StaticTypeWarningCode(
-          'EXPECTED_TWO_MAP_TYPE_ARGUMENTS',
-          "Map literals require exactly two type arguments or none, "
-              "but {0} found.",
-          correction: "Try adjusting the number of type arguments.");
-
-  /**
-   * 9 Functions: It is a static warning if the declared return type of a
-   * function marked async* may not be assigned to Stream.
-   */
-  static const StaticTypeWarningCode ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE =
-      StaticTypeWarningCode(
-          'ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE',
-          "Functions marked 'async*' must have a return type assignable to "
-              "'Stream'.",
-          correction: "Try fixing the return type of the function, or "
-              "removing the modifier 'async*' from the function body.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the body of a function has the
-  // `async` modifier even though the return type of the function isn't
-  // assignable to `Future`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the body of the
-  // function `f` has the `async` modifier even though the return type isn't
-  // assignable to `Future`:
-  //
-  // ```dart
-  // [!int!] f() async {
-  //   return 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the function should be asynchronous, then change the return type to be
-  // assignable to `Future`:
-  //
-  // ```dart
-  // Future<int> f() async {
-  //   return 0;
-  // }
-  // ```
-  //
-  // If the function should be synchronous, then remove the `async` modifier:
-  //
-  // ```dart
-  // int f() {
-  //   return 0;
-  // }
-  // ```
-  static const StaticTypeWarningCode ILLEGAL_ASYNC_RETURN_TYPE =
-      StaticTypeWarningCode(
-          'ILLEGAL_ASYNC_RETURN_TYPE',
-          "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.",
-          hasPublishedDocs: true);
-
-  /**
-   * 9 Functions: It is a static warning if the declared return type of a
-   * function marked sync* may not be assigned to Iterable.
-   */
-  static const StaticTypeWarningCode ILLEGAL_SYNC_GENERATOR_RETURN_TYPE =
-      StaticTypeWarningCode(
-          'ILLEGAL_SYNC_GENERATOR_RETURN_TYPE',
-          "Functions marked 'sync*' must have a return type assignable to "
-              "'Iterable'.",
-          correction: "Try fixing the return type of the function, or "
-              "removing the modifier 'sync*' from the function body.");
-
-  /**
-   * Parameters:
-   * 0: the name of the static member
-   * 1: the kind of the static member (field, getter, setter, or method)
-   * 2: the name of the defining class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an access operator is used to
-  // access a static member through an instance of the class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `zero` is a static
-  // field, but it’s being accessed as if it were an instance field:
-  //
-  // ```dart
-  // void f(C c) {
-  //   c.[!zero!];
-  // }
-  //
-  // class C {
-  //   static int zero = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Use the class to access the static member:
-  //
-  // ```dart
-  // void f(C c) {
-  //   C.zero;
-  // }
-  //
-  // class C {
-  //   static int zero = 0;
-  // }
-  // ```
-  static const StaticTypeWarningCode INSTANCE_ACCESS_TO_STATIC_MEMBER =
-      StaticTypeWarningCode('INSTANCE_ACCESS_TO_STATIC_MEMBER',
-          "Static {1} '{0}' can't be accessed through an instance.",
-          correction: "Try using the class '{2}' to access the {1}.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the right hand side type
-   * 1: the name of the left hand side type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the static type of an expression
-  // that is assigned to a variable isn't assignable to the type of the
-  // variable.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the type of the
-  // initializer (`int`) isn't assignable to the type of the variable
-  // (`String`):
-  //
-  // ```dart
-  // int i = 0;
-  // String s = [!i!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the value being assigned is always assignable at runtime, even though
-  // the static types don't reflect that, then add an explicit cast.
-  //
-  // Otherwise, change the value being assigned so that it has the expected
-  // type. In the previous example, this might look like:
-  //
-  // ```dart
-  // int i = 0;
-  // String s = i.toString();
-  // ```
-  //
-  // 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:
-  //
-  // ```dart
-  // int i = 0;
-  // int s = i;
-  // ```
-  static const StaticTypeWarningCode INVALID_ASSIGNMENT = StaticTypeWarningCode(
-      'INVALID_ASSIGNMENT',
-      "A value of type '{0}' can't be assigned to a variable of type "
-          "'{1}'.",
-      correction: "Try changing the type of the variable, or "
-          "casting the right-hand type to '{1}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the identifier that is not a function type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds a function invocation,
-  // but the name of the function being invoked is defined to be something other
-  // than a function.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `Binary` is the name of
-  // a function type, not a function:
-  //
-  // ```dart
-  // typedef Binary = int Function(int, int);
-  //
-  // int f() {
-  //   return [!Binary!](1, 2);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the name with the name of a function.
-  static const StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION =
-      StaticTypeWarningCode(
-          'INVOCATION_OF_NON_FUNCTION', "'{0}' isn't a function.",
-          // TODO(brianwilkerson) Split this error code so that we can provide
-          // better error and correction messages.
-          correction:
-              "Try correcting the name to match an existing function, or "
-              "define a method or function named '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a function invocation is found,
-  // but the name being referenced isn't the name of a function, or when the
-  // expression computing the function doesn't compute a function.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` isn't a function:
-  //
-  // ```dart
-  // int x = 0;
-  //
-  // int f() => x;
-  //
-  // var y = [!x!]();
-  // ```
-  //
-  // The following code produces this diagnostic because `f()` doesn't return a
-  // function:
-  //
-  // ```dart
-  // int x = 0;
-  //
-  // int f() => x;
-  //
-  // var y = [!f()!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to invoke a function, then replace the code before the argument
-  // list with the name of a function or with an expression that computes a
-  // function:
-  //
-  // ```dart
-  // int x = 0;
-  //
-  // int f() => x;
-  //
-  // var y = f();
-  // ```
-  static const StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION_EXPRESSION =
-      StaticTypeWarningCode(
-          'INVOCATION_OF_NON_FUNCTION_EXPRESSION',
-          "The expression doesn't evaluate to a function, so it can't be "
-              "invoked.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a condition, such as an `if` or
-  // `while` loop, doesn't have the static type `bool`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` has the static type
-  // `int`:
-  //
-  // ```dart
-  // void f(int x) {
-  //   if ([!x!]) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the condition so that it produces a Boolean value:
-  //
-  // ```dart
-  // void f(int x) {
-  //   if (x == 0) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  static const StaticTypeWarningCode NON_BOOL_CONDITION = StaticTypeWarningCode(
-      'NON_BOOL_CONDITION', "Conditions must have a static type of 'bool'.",
-      correction: "Try changing the condition.", hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the first expression in an
-  // assert has a type other than `bool`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the type of `p` is
-  // `int`, but a `bool` is required:
-  //
-  // ```dart
-  // void f(int p) {
-  //   assert([!p!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the expression so that it has the type `bool`:
-  //
-  // ```dart
-  // void f(int p) {
-  //   assert(p > 0);
-  // }
-  // ```
-  static const StaticTypeWarningCode NON_BOOL_EXPRESSION =
-      StaticTypeWarningCode('NON_BOOL_EXPRESSION',
-          "The expression in an assert must be of type 'bool'.",
-          correction: "Try changing the expression.", hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the operand of the unary
-  // negation operator (`!`) doesn't have the type `bool`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is an `int` when it
-  // must be a `bool`:
-  //
-  // ```dart
-  // int x = 0;
-  // bool y = ![!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the operand with an expression that has the type `bool`:
-  //
-  // ```dart
-  // int x = 0;
-  // bool y = !(x > 0);
-  // ```
-  static const StaticTypeWarningCode NON_BOOL_NEGATION_EXPRESSION =
-      StaticTypeWarningCode('NON_BOOL_NEGATION_EXPRESSION',
-          "A negation operand must have a static type of 'bool'.",
-          correction: "Try changing the operand to the '!' operator.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the lexeme of the logical operator
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when one of the operands of either
-  // the `&&` or `||` operator doesn't have the type `bool`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `a` isn't a Boolean
-  // value:
-  //
-  // ```dart
-  // int a = 3;
-  // bool b = [!a!] || a > 1;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the operand to a Boolean value:
-  //
-  // ```dart
-  // int a = 3;
-  // bool b = a == 0 || a > 1;
-  // ```
-  static const StaticTypeWarningCode NON_BOOL_OPERAND = StaticTypeWarningCode(
-      'NON_BOOL_OPERAND',
-      "The operands of the operator '{0}' must be assignable to 'bool'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name appearing where a type is expected
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an identifier that isn't a type
-  // is used as a type argument.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is a variable, not
-  // a type:
-  //
-  // ```dart
-  // var x = 0;
-  // List<[!x!]> xList = [];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the type argument to be a type:
-  //
-  // ```dart
-  // var x = 0;
-  // List<int> xList = [];
-  // ```
-  static const StaticTypeWarningCode NON_TYPE_AS_TYPE_ARGUMENT =
-      StaticTypeWarningCode('NON_TYPE_AS_TYPE_ARGUMENT',
-          "The name '{0}' isn't a type so it can't be used as a type argument.",
-          correction: "Try correcting the name to an existing type, or "
-              "defining a type named '{0}'.",
-          hasPublishedDocs: true,
-          isUnresolvedIdentifier: true);
-
-  /**
-   * Parameters:
-   * 0: the return type as declared in the return statement
-   * 1: the expected return type as defined by the method
-   * 2: the name of the method
-   */
-  @Deprecated('Use either RETURN_OF_INVALID_TYPE_FROM_FUNCTION or '
-      'RETURN_OF_INVALID_TYPE_FROM_METHOD')
-  static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE =
-      StaticTypeWarningCode(
-          'RETURN_OF_INVALID_TYPE',
-          "The return type '{0}' isn't a '{1}', as defined by the method "
-              "'{2}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the return type as declared in the return statement
-   * 1: the expected return type as defined by the method
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the static type of a returned
-  // expression isn't assignable to the return type that the closure is required
-  // to have.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` is defined to be a
-  // function that returns a `String`, but the closure assigned to it returns an
-  // `int`:
-  //
-  // ```dart
-  // String Function(String) f = (s) => [!3!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the return type is correct, then replace the returned value with a value
-  // of the correct type, possibly by converting the existing value:
-  //
-  // ```dart
-  // String Function(String) f = (s) => 3.toString();
-  // ```
-  static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE_FROM_CLOSURE =
-      StaticTypeWarningCode(
-          'RETURN_OF_INVALID_TYPE_FROM_CLOSURE',
-          "The return type '{0}' isn't a '{1}', as required by the closure's "
-              "context.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the return type as declared in the return statement
-   * 1: the expected return type as defined by the enclosing class
-   * 2: the name of the constructor
-   */
-  static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR =
-      StaticTypeWarningCodeWithUniqueName(
-          'RETURN_OF_INVALID_TYPE',
-          'StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR',
-          "A value of type '{0}' can't be returned from constructor '{2}' "
-              "because it has a return type of '{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the return type as declared in the return statement
-   * 1: the expected return type as defined by the method
-   * 2: the name of the method
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method or function returns a
-  // value whose type isn't assignable to the declared return type.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` has a return type
-  // of `String` but is returning an `int`:
-  //
-  // ```dart
-  // String f() => [!3!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // 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:
-  //
-  // ```dart
-  // String f() => 3.toString();
-  // ```
-  //
-  // If the value is correct, then change the return type to match:
-  //
-  // ```dart
-  // int f() => 3;
-  // ```
-  static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE_FROM_FUNCTION =
-      StaticTypeWarningCodeWithUniqueName(
-          'RETURN_OF_INVALID_TYPE',
-          'StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION',
-          "A value of type '{0}' can't be returned from function '{2}' because "
-              "it has a return type of '{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the return type as declared in the return statement
-   * 1: the expected return type as defined by the method
-   * 2: the name of the method
-   */
-  static const StaticTypeWarningCode RETURN_OF_INVALID_TYPE_FROM_METHOD =
-      StaticTypeWarningCodeWithUniqueName(
-          'RETURN_OF_INVALID_TYPE',
-          'StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_METHOD',
-          "A value of type '{0}' can't be returned from method '{2}' because "
-              "it has a return type of '{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * 10 Generics: It is a static type warning if a type parameter is a supertype
-   * of its upper bound.
-   *
-   * Parameters:
-   * 0: the name of the type parameter
-   * 1: the name of the bounding type
-   *
-   * See [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS].
-   */
-  static const StaticTypeWarningCode TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND =
-      StaticTypeWarningCode('TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND',
-          "'{0}' can't be a supertype of its upper bound.",
-          correction: "Try using a type that is or is a subclass of '{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the enumeration constant that is not defined
-   * 1: the name of the enumeration used to access the constant
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it encounters an identifier that
-  // appears to be the name of an enum constant, and the name either isn't
-  // defined or isn't visible in the scope in which it's being referenced.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `E` doesn't define a
-  // constant named `c`:
-  //
-  // ```dart
-  // enum E {a, b}
-  //
-  // var e = E.[!c!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the constant should be defined, then add it to the declaration of the
-  // enum:
-  //
-  // ```dart
-  // enum E {a, b, c}
-  //
-  // var e = E.c;
-  // ```
-  //
-  // If the constant shouldn't be defined, then change the name to the name of
-  // an existing constant:
-  //
-  // ```dart
-  // enum E {a, b}
-  //
-  // var e = E.b;
-  // ```
-  static const StaticTypeWarningCode UNDEFINED_ENUM_CONSTANT =
-      StaticTypeWarningCode('UNDEFINED_ENUM_CONSTANT',
-          "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}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the method that is undefined
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it encounters an identifier that
-  // appears to be the name of a function but either isn't defined or isn't
-  // visible in the scope in which it's being referenced.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the name `emty` isn't
-  // defined:
-  //
-  // ```dart
-  // List<int> empty() => [];
-  //
-  // void main() {
-  //   print([!emty!]());
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the identifier isn't defined, then either define it or replace it with
-  // the name of a function that is defined. The example above can be corrected
-  // by fixing the spelling of the function:
-  //
-  // ```dart
-  // List<int> empty() => [];
-  //
-  // void main() {
-  //   print(empty());
-  // }
-  // ```
-  //
-  // If the function is defined but isn't visible, then you probably need to add
-  // an import or re-arrange your code to make the function visible.
-  static const StaticTypeWarningCode UNDEFINED_FUNCTION = StaticTypeWarningCode(
-      'UNDEFINED_FUNCTION', "The function '{0}' isn't defined.",
-      correction: "Try importing the library that defines '{0}', "
-          "correcting the name to the name of an existing function, or "
-          "defining a function named '{0}'.",
-      hasPublishedDocs: true,
-      isUnresolvedIdentifier: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the getter
-   * 1: the name of the enclosing type where the getter is being looked for
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it encounters an identifier that
-  // appears to be the name of a getter but either isn't defined or isn't
-  // visible in the scope in which it's being referenced.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `String` has no member
-  // named `len`:
-  //
-  // ```dart
-  // int f(String s) => s.[!len!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the identifier isn't defined, then either define it or replace it with
-  // the name of a getter that is defined. The example above can be corrected by
-  // fixing the spelling of the getter:
-  //
-  // ```dart
-  // int f(String s) => s.length;
-  // ```
-  static const StaticTypeWarningCode UNDEFINED_GETTER = StaticTypeWarningCode(
-      'UNDEFINED_GETTER', "The getter '{0}' isn't defined for the type '{1}'.",
-      correction: "Try importing the library that defines '{0}', "
-          "correcting the name to the name of an existing getter, or "
-          "defining a getter or field named '{0}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the method that is undefined
-   * 1: the resolved type name that the method lookup is happening on
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it encounters an identifier that
-  // appears to be the name of a method but either isn't defined or isn't
-  // visible in the scope in which it's being referenced.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the identifier
-  // `removeMiddle` isn't defined:
-  //
-  // ```dart
-  // int f(List<int> l) => l.[!removeMiddle!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the identifier isn't defined, then either define it or replace it with
-  // the name of a method that is defined. The example above can be corrected by
-  // fixing the spelling of the method:
-  //
-  // ```dart
-  // int f(List<int> l) => l.removeLast();
-  // ```
-  static const StaticTypeWarningCode UNDEFINED_METHOD = StaticTypeWarningCode(
-      'UNDEFINED_METHOD', "The method '{0}' isn't defined for the type '{1}'.",
-      correction:
-          "Try correcting the name to the name of an existing method, or "
-          "defining a method named '{0}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the operator
-   * 1: the name of the enclosing type where the operator is being looked for
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a user-definable operator is
-  // invoked on an object for which the operator isn't defined.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the class `C` doesn't
-  // define the operator `+`:
-  //
-  // ```dart
-  // class C {}
-  //
-  // C f(C c) => c [!+!] 2;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the operator should be defined for the class, then define it:
-  //
-  // ```dart
-  // class C {
-  //   C operator +(int i) => this;
-  // }
-  //
-  // C f(C c) => c + 2;
-  // ```
-  static const StaticTypeWarningCode UNDEFINED_OPERATOR = StaticTypeWarningCode(
-      'UNDEFINED_OPERATOR',
-      "The operator '{0}' isn't defined for the type '{1}'.",
-      correction: "Try defining the operator '{0}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a prefixed identifier is found
-  // where the prefix is valid, but the identifier isn't declared in any of the
-  // libraries imported using that prefix.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `dart:core` doesn't
-  // define anything named `a`:
-  //
-  // ```dart
-  // import 'dart:core' as p;
-  //
-  // void f() {
-  //   p.[!a!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the library in which the name is declared isn't imported yet, add an
-  // import for the library.
-  //
-  // If the name is wrong, then change it to one of the names that's declared in
-  // the imported libraries.
-  static const StaticTypeWarningCode UNDEFINED_PREFIXED_NAME =
-      StaticTypeWarningCode(
-          'UNDEFINED_PREFIXED_NAME',
-          "The name '{0}' is being referenced through the prefix '{1}', but it "
-              "isn't defined in any of the libraries imported using that "
-              "prefix.",
-          correction: "Try correcting the prefix or "
-              "importing the library that defines '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the setter
-   * 1: the name of the enclosing type where the setter is being looked for
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it encounters an identifier that
-  // appears to be the name of a setter but either isn't defined or isn't
-  // visible in the scope in which the identifier is being referenced.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there isn't a setter
-  // named `z`:
-  //
-  // ```dart
-  // class C {
-  //   int x = 0;
-  //   void m(int y) {
-  //     this.[!z!] = y;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the identifier isn't defined, then either define it or replace it with
-  // the name of a setter that is defined. The example above can be corrected by
-  // fixing the spelling of the setter:
-  //
-  // ```dart
-  // class C {
-  //   int x = 0;
-  //   void m(int y) {
-  //     this.x = y;
-  //   }
-  // }
-  // ```
-  static const StaticTypeWarningCode UNDEFINED_SETTER = StaticTypeWarningCode(
-      'UNDEFINED_SETTER', "The setter '{0}' isn't defined for the type '{1}'.",
-      correction: "Try importing the library that defines '{0}', "
-          "correcting the name to the name of an existing setter, or "
-          "defining a setter or field named '{0}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * 12.17 Getter Invocation: 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>.
-   *
-   * Parameters:
-   * 0: the name of the getter
-   * 1: the name of the enclosing type where the getter is being looked for
-   */
-  static const StaticTypeWarningCode UNDEFINED_SUPER_GETTER =
-      StaticTypeWarningCode('UNDEFINED_SUPER_GETTER',
-          "The getter '{0}' isn't defined in a superclass of '{1}'.",
-          correction:
-              "Try correcting the name to the name of an existing getter, or "
-              "defining a getter or field named '{0}' in a superclass.");
-
-  /**
-   * Parameters:
-   * 0: the name of the method that is undefined
-   * 1: the resolved type name that the method lookup is happening on
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an inherited method is
-  // referenced using `super`, but there’s no method with that name in the
-  // superclass chain.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `Object` doesn't define
-  // a member named `n`:
-  //
-  // ```dart
-  // class C {
-  //   void m() {
-  //     super.[!n!]();
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the inherited method you intend to invoke has a different name, then
-  // make the name of the invoked method  match the inherited method.
-  //
-  // If the method you intend to invoke is defined in the same class, then
-  // remove the `super.`.
-  //
-  // If not, then either add the method to one of the superclasses or remove the
-  // invocation.
-  static const StaticTypeWarningCode UNDEFINED_SUPER_METHOD =
-      StaticTypeWarningCode('UNDEFINED_SUPER_METHOD',
-          "The method '{0}' isn't defined in a superclass of '{1}'.",
-          correction:
-              "Try correcting the name to the name of an existing method, or "
-              "defining a method named '{0}' in a superclass.",
-          hasPublishedDocs: true);
-
-  /**
-   * 12.18 Assignment: Evaluation of an assignment of the form
-   * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is
-   * equivalent to the evaluation of the expression (a, i, e){a.[]=(i, e);
-   * return e;} (<i>e<sub>1</sub></i>, <i>e<sub>2</sub></i>,
-   * <i>e<sub>2</sub></i>).
-   *
-   * 12.29 Assignable Expressions: An assignable expression of the form
-   * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] is evaluated as a method
-   * invocation of the operator method [] on <i>e<sub>1</sub></i> with argument
-   * <i>e<sub>2</sub></i>.
-   *
-   * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>.
-   * It is a static type warning if <i>T</i> does not have an accessible
-   * instance member named <i>m</i>.
-   *
-   * Parameters:
-   * 0: the name of the operator
-   * 1: the name of the enclosing type where the operator is being looked for
-   */
-  static const StaticTypeWarningCode UNDEFINED_SUPER_OPERATOR =
-      StaticTypeWarningCode('UNDEFINED_SUPER_OPERATOR',
-          "The operator '{0}' isn't defined in a superclass of '{1}'.",
-          correction: "Try defining the operator '{0}' in a superclass.");
-
-  /**
-   * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
-   * It is a static type warning if <i>T</i> does not have an accessible
-   * instance setter named <i>v=</i>.
-   *
-   * Parameters:
-   * 0: the name of the setter
-   * 1: the name of the enclosing type where the setter is being looked for
-   */
-  static const StaticTypeWarningCode UNDEFINED_SUPER_SETTER =
-      StaticTypeWarningCode('UNDEFINED_SUPER_SETTER',
-          "The setter '{0}' isn't defined in a superclass of '{1}'.",
-          correction:
-              "Try correcting the name to the name of an existing setter, or "
-              "defining a setter or field named '{0}' in a superclass.");
-
-  /**
-   * 12.15.1 Ordinary Invocation: It is a static type warning if <i>T</i> does
-   * not have an accessible (3.2) instance member named <i>m</i>.
-   *
-   * This is a specialization of [INSTANCE_ACCESS_TO_STATIC_MEMBER] that is used
-   * when we are able to find the name defined in a supertype. It exists to
-   * provide a more informative error message.
-   *
-   * Parameters:
-   * 0: the name of the defining type
-   */
-  static const StaticTypeWarningCode
-      UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER = StaticTypeWarningCode(
-          'UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER',
-          "Static members from supertypes must be qualified by the name of the "
-              "defining type.",
-          correction: "Try adding '{0}.' before the name.");
-
-  /**
    * Parameters:
    * 0: the name of the type being referenced (<i>G</i>)
    * 1: the number of type parameters that were declared
@@ -8125,8 +10156,8 @@
   //
   // void f(C<int> x) {}
   // ```
-  static const StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS =
-      StaticTypeWarningCode(
+  static const CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS =
+      CompileTimeErrorCode(
           'WRONG_NUMBER_OF_TYPE_ARGUMENTS',
           "The type '{0}' is declared with {1} type parameters, "
               "but {2} type arguments were given.",
@@ -8143,9 +10174,8 @@
    * 0: the name of the class being instantiated
    * 1: the name of the constructor being invoked
    */
-  static const StaticTypeWarningCode
-      WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR = StaticTypeWarningCode(
-          'WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR',
+  static const CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR =
+      CompileTimeErrorCode('WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR',
           "The constructor '{0}.{1}' doesn't have type parameters.",
           correction: "Try moving type arguments to after the type name.");
 
@@ -8158,14 +10188,79 @@
    * 1: the number of type parameters that were declared
    * 2: the number of type arguments provided
    */
-  static const StaticTypeWarningCode WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD =
-      StaticTypeWarningCode(
+  static const CompileTimeErrorCode WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD =
+      CompileTimeErrorCode(
           'WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD',
           "The method '{0}' is declared with {1} type parameters, "
               "but {2} type arguments were given.",
           correction: "Try adjusting the number of type arguments.");
 
   /**
+   * Let `C` be a generic class that declares a formal type parameter `X`, and
+   * assume that `T` is a direct superinterface of `C`. It is a compile-time
+   * error if `X` occurs contravariantly or invariantly in `T`.
+   */
+  static const CompileTimeErrorCode
+      WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE = CompileTimeErrorCode(
+    'WRONG_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE',
+    "'{0}' can't be used contravariantly or invariantly in '{1}'.",
+    correction: "Try not using class type parameters in types of formal "
+        "parameters of function types, nor in explicitly contravariant or "
+        "invariant superinterfaces.",
+  );
+
+  /**
+   * Let `C` be a generic class that declares a formal type parameter `X`.
+   *
+   * If `X` is explicitly contravariant then it is a compile-time error for
+   * `X` to occur in a non-contravariant position in a member signature in the
+   * body of `C`, except when `X` is in a contravariant position in the type
+   * annotation of a covariant formal parameter.
+   *
+   * If `X` is explicitly covariant then it is a compile-time error for
+   * `X` to occur in a non-covariant position in a member signature in the
+   * body of `C`, except when `X` is in a covariant position in the type
+   * annotation of a covariant formal parameter.
+   *
+   * Parameters:
+   * 0: the variance modifier defined for {0}
+   * 1: the name of the type parameter
+   * 2: the variance position that the type parameter {1} is in
+   */
+  static const CompileTimeErrorCode WRONG_TYPE_PARAMETER_VARIANCE_POSITION =
+      CompileTimeErrorCode(
+    'WRONG_TYPE_PARAMETER_VARIANCE_POSITION',
+    "The '{0}' type parameter '{1}' can't be used in an '{2}' position.",
+    correction: "Try removing the type parameter or change the explicit "
+        "variance modifier declaration for the type parameter to another one of"
+        " 'in', 'out', or 'inout'.",
+  );
+
+  /**
+   * ?? Yield: It is a compile-time error if a yield statement appears in a
+   * function that is not a generator function.
+   */
+  static const CompileTimeErrorCode YIELD_EACH_IN_NON_GENERATOR =
+      CompileTimeErrorCode(
+          'YIELD_EACH_IN_NON_GENERATOR',
+          "Yield-each statements must be in a generator function "
+              "(one marked with either 'async*' or 'sync*').",
+          correction:
+              "Try adding 'async*' or 'sync*' to the enclosing function.");
+
+  /**
+   * ?? Yield: It is a compile-time error if a yield statement appears in a
+   * function that is not a generator function.
+   */
+  static const CompileTimeErrorCode YIELD_IN_NON_GENERATOR =
+      CompileTimeErrorCode(
+          'YIELD_IN_NON_GENERATOR',
+          "Yield statements must be in a generator function "
+              "(one marked with either 'async*' or 'sync*').",
+          correction:
+              "Try adding 'async*' or 'sync*' to the enclosing function.");
+
+  /**
    * 17.16.1 Yield: Let T be the static type of e [the expression to the right
    * of "yield"] and let f be the immediately enclosing function.  It is a
    * static type warning if either:
@@ -8183,74 +10278,19 @@
    * assigned to Iterable.  If f is asynchronous it is a static type warning if
    * T may not be assigned to Stream.
    */
-  static const StaticTypeWarningCode YIELD_OF_INVALID_TYPE =
-      StaticTypeWarningCode(
+  static const CompileTimeErrorCode YIELD_OF_INVALID_TYPE =
+      CompileTimeErrorCode(
           'YIELD_OF_INVALID_TYPE',
           "The type '{0}' implied by the 'yield' expression must be assignable "
               "to '{1}'.");
 
   /**
-   * Parameters:
-   * 0: The type of the iterable expression.
-   * 1: The sequence type -- Iterable for `for` or Stream for `await for`.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the expression following `in` in
-  // a for-in loop has a type that isn't a subclass of `Iterable`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `m` is a `Map`, and
-  // `Map` isn't a subclass of `Iterable`:
-  //
-  // ```dart
-  // void f(Map<String, String> m) {
-  //   for (String s in [!m!]) {
-  //     print(s);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the expression with one that produces an iterable value:
-  //
-  // ```dart
-  // void f(Map<String, String> m) {
-  //   for (String s in m.values) {
-  //     print(s);
-  //   }
-  // }
-  // ```
-  static const StaticTypeWarningCode FOR_IN_OF_INVALID_TYPE =
-      StaticTypeWarningCode('FOR_IN_OF_INVALID_TYPE',
-          "The type '{0}' used in the 'for' loop must implement {1}.",
-          hasPublishedDocs: true);
-
-  /**
-   * 17.6.2 For-in. It the iterable expression does not implement Iterable with
-   * a type argument that can be assigned to the for-in variable's type, this
-   * warning is reported.
-   *
-   * Parameters:
-   * 0: The type of the iterable expression.
-   * 1: The sequence type -- Iterable for `for` or Stream for `await for`.
-   * 2: The loop variable type.
-   */
-  static const StaticTypeWarningCode FOR_IN_OF_INVALID_ELEMENT_TYPE =
-      StaticTypeWarningCode(
-          'FOR_IN_OF_INVALID_ELEMENT_TYPE',
-          "The type '{0}' used in the 'for' loop must implement {1} with a "
-              "type argument that can be assigned to '{2}'.");
-
-  /**
    * Initialize a newly created error code to have the given [name]. The message
    * associated with the error will be created from the given [message]
    * template. The correction associated with the error will be created from the
    * given [correction] template.
    */
-  const StaticTypeWarningCode(String name, String message,
+  const CompileTimeErrorCode(String name, String message,
       {String correction,
       bool hasPublishedDocs,
       bool isUnresolvedIdentifier = false})
@@ -8260,21 +10300,25 @@
             isUnresolvedIdentifier: isUnresolvedIdentifier);
 
   @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
+  ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
 
   @override
-  ErrorType get type => ErrorType.STATIC_TYPE_WARNING;
+  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
 }
 
-class StaticTypeWarningCodeWithUniqueName extends StaticTypeWarningCode {
+class CompileTimeErrorCodeWithUniqueName extends CompileTimeErrorCode {
   @override
   final String uniqueName;
 
-  const StaticTypeWarningCodeWithUniqueName(
+  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);
 }
 
 /**
@@ -8285,480 +10329,6 @@
  */
 class StaticWarningCode extends AnalyzerErrorCode {
   /**
-   * Parameters:
-   * 0: the name of the ambiguous type
-   * 1: the name of the first library that the type is found
-   * 2: the name of the second library that the type is found
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name is referenced that is
-  // declared in two or more imported libraries.
-  //
-  // #### Examples
-  //
-  // Given a library (`a.dart`) that defines a class (`C` in this example):
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // class A {}
-  // class C {}
-  // ```
-  //
-  // And a library (`b.dart`) that defines a different class with the same name:
-  //
-  // ```dart
-  // %uri="lib/b.dart"
-  // class B {}
-  // class C {}
-  // ```
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // import 'a.dart';
-  // import 'b.dart';
-  //
-  // void f([!C!] c1, [!C!] c2) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If any of the libraries aren't needed, then remove the import directives
-  // for them:
-  //
-  // ```dart
-  // import 'a.dart';
-  //
-  // void f(C c1, C c2) {}
-  // ```
-  //
-  // 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:
-  //
-  // ```dart
-  // import 'a.dart' hide C;
-  // import 'b.dart';
-  //
-  // void f(C c1, C c2) {}
-  // ```
-  //
-  // If you must be able to reference more than one of these types, then add a
-  // prefix to each of the import directives, and qualify the references with
-  // the appropriate prefix:
-  //
-  // ```dart
-  // import 'a.dart' as a;
-  // import 'b.dart' as b;
-  //
-  // void f(a.C c1, b.C c2) {}
-  // ```
-  static const StaticWarningCode AMBIGUOUS_IMPORT = StaticWarningCode(
-      'AMBIGUOUS_IMPORT', "The name '{0}' is defined in the libraries {1}.",
-      correction: "Try using 'as prefix' for one of the import directives, or "
-          "hiding the name from all but one of the imports.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the actual argument type
-   * 1: the name of the expected type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the static type of an argument
-  // can't be assigned to the static type of the corresponding parameter.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because a `num` can't be
-  // assigned to a `String`:
-  //
-  // ```dart
-  // String f(String x) => x;
-  // String g(num y) => f([!y!]);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // 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`:
-  //
-  // ```dart
-  // String f(String x) => x;
-  // String g(String y) => f(y);
-  // ```
-  //
-  // If that fix isn't possible, then add code to handle the case where the
-  // argument value isn't the required type. One approach is to coerce other
-  // types to the required type:
-  //
-  // ```dart
-  // String f(String x) => x;
-  // String g(num y) => f(y.toString());
-  // ```
-  //
-  // Another approach is to add explicit type tests and fallback code:
-  //
-  // ```dart
-  // String f(String x) => x;
-  // String g(num y) => f(y is String ? y : '');
-  // ```
-  //
-  // If you believe that the runtime type of the argument will always be the
-  // 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:
-  //
-  // ```dart
-  // String f(String x) => x;
-  // String g(num y) => f(y as String);
-  // ```
-  static const StaticWarningCode ARGUMENT_TYPE_NOT_ASSIGNABLE =
-      StaticWarningCode(
-          'ARGUMENT_TYPE_NOT_ASSIGNABLE',
-          "The argument type '{0}' can't be assigned to the parameter type "
-              "'{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * 5 Variables: Attempting to assign to a final variable elsewhere will cause
-   * a NoSuchMethodError to be thrown, because no setter is defined for it. The
-   * assignment will also give rise to a static warning for the same reason.
-   *
-   * A constant variable is always implicitly final.
-   */
-  static const StaticWarningCode ASSIGNMENT_TO_CONST = StaticWarningCode(
-      'ASSIGNMENT_TO_CONST', "Constant variables can't be assigned a value.",
-      correction: "Try removing the assignment, or "
-          "remove the modifier 'const' from the variable.");
-
-  /**
-   * Parameters:
-   * 0: the name of the final variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds an invocation of a
-  // setter, but there's no setter because the field with the same name was
-  // declared to be `final` or `const`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `v` is final:
-  //
-  // ```dart
-  // class C {
-  //   final v = 0;
-  // }
-  //
-  // f(C c) {
-  //   c.[!v!] = 1;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to be able to set the value of the field, then remove the
-  // modifier `final` from the field:
-  //
-  // ```dart
-  // class C {
-  //   int v = 0;
-  // }
-  //
-  // f(C c) {
-  //   c.v = 1;
-  // }
-  // ```
-  static const StaticWarningCode ASSIGNMENT_TO_FINAL = StaticWarningCode(
-      'ASSIGNMENT_TO_FINAL',
-      "'{0}' can't be used as a setter because it's final.",
-      correction: "Try finding a different setter, or making '{0}' non-final.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a local variable that was
-  // declared to be final is assigned after it was initialized.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is final, so it
-  // can't have a value assigned to it after it was initialized:
-  //
-  // ```dart
-  // void f() {
-  //   final x = 0;
-  //   [!x!] = 3;
-  //   print(x);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the keyword `final`, and replace it with `var` if there's no type
-  // annotation:
-  //
-  // ```dart
-  // void f() {
-  //   var x = 0;
-  //   x = 3;
-  //   print(x);
-  // }
-  // ```
-  static const StaticWarningCode ASSIGNMENT_TO_FINAL_LOCAL = StaticWarningCode(
-      'ASSIGNMENT_TO_FINAL_LOCAL',
-      "The final variable '{0}' can only be set once.",
-      correction: "Try making '{0}' non-final.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a reference to a setter is
-  // found; there is no setter defined for the type; but there is a getter
-  // defined with the same name.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there is no setter
-  // named `x` in `C`, but there is a getter named `x`:
-  //
-  // ```dart
-  // class C {
-  //   int get x => 0;
-  //   set y(int p) {}
-  // }
-  //
-  // void f(C c) {
-  //   c.[!x!] = 1;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you want to invoke an existing setter, then correct the name:
-  //
-  // ```dart
-  // class C {
-  //   int get x => 0;
-  //   set y(int p) {}
-  // }
-  //
-  // void f(C c) {
-  //   c.y = 1;
-  // }
-  // ```
-  //
-  // If you want to invoke the setter but it just doesn't exist yet, then
-  // declare it:
-  //
-  // ```dart
-  // class C {
-  //   int get x => 0;
-  //   set x(int p) {}
-  //   set y(int p) {}
-  // }
-  //
-  // void f(C c) {
-  //   c.x = 1;
-  // }
-  // ```
-  static const StaticWarningCode ASSIGNMENT_TO_FINAL_NO_SETTER =
-      StaticWarningCode('ASSIGNMENT_TO_FINAL_NO_SETTER',
-          "There isn’t a setter named '{0}' in class '{1}'.",
-          correction:
-              "Try correcting the name to reference an existing setter, or "
-              "declare the setter.",
-          hasPublishedDocs: true);
-
-  /**
-   * 12.18 Assignment: It is as static warning if an assignment of the form
-   * <i>v = e</i> occurs inside a top level or static function (be it function,
-   * method, getter, or setter) or variable initializer and there is neither a
-   * local variable declaration with name <i>v</i> nor setter declaration with
-   * name <i>v=</i> in the lexical scope enclosing the assignment.
-   */
-  static const StaticWarningCode ASSIGNMENT_TO_FUNCTION = StaticWarningCode(
-      'ASSIGNMENT_TO_FUNCTION', "Functions can't be assigned a value.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the target of an assignment is a
-  // method.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` can't be assigned a
-  // value because it's a method:
-  //
-  // ```dart
-  // class C {
-  //   void f() {}
-  //
-  //   void g() {
-  //     [!f!] = null;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rewrite the code so that there isn't an assignment to a method.
-  static const StaticWarningCode ASSIGNMENT_TO_METHOD = StaticWarningCode(
-      'ASSIGNMENT_TO_METHOD', "Methods can't be assigned a value.",
-      hasPublishedDocs: true);
-
-  /**
-   * 12.18 Assignment: It is as static warning if an assignment of the form
-   * <i>v = e</i> occurs inside a top level or static function (be it function,
-   * method, getter, or setter) or variable initializer and there is neither a
-   * local variable declaration with name <i>v</i> nor setter declaration with
-   * name <i>v=</i> in the lexical scope enclosing the assignment.
-   */
-  static const StaticWarningCode ASSIGNMENT_TO_TYPE = StaticWarningCode(
-      'ASSIGNMENT_TO_TYPE', "Types can't be assigned a value.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // 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
-  // with an assignment:
-  //
-  // ```dart
-  // void f(int x) {
-  //   switch (x) {
-  //     [!case!] 0:
-  //       x += 2;
-  //     default:
-  //       x += 1;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add one of the required terminators:
-  //
-  // ```dart
-  // void f(int x) {
-  //   switch (x) {
-  //     case 0:
-  //       x += 2;
-  //       break;
-  //     default:
-  //       x += 1;
-  //   }
-  // }
-  // ```
-  static const StaticWarningCode CASE_BLOCK_NOT_TERMINATED = StaticWarningCode(
-      'CASE_BLOCK_NOT_TERMINATED',
-      "The last statement of the 'case' should be 'break', 'continue', "
-          "'rethrow', 'return', or 'throw'.",
-      correction: "Try adding one of the required statements.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name following the `as` in a
-  // cast expression is defined to be something other than a type.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is a variable, not
-  // a type:
-  //
-  // ```dart
-  // num x = 0;
-  // int y = x as [!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the name with the name of a type:
-  //
-  // ```dart
-  // num x = 0;
-  // int y = x as int;
-  // ```
-  static const StaticWarningCode CAST_TO_NON_TYPE = StaticWarningCode(
-      'CAST_TO_NON_TYPE',
-      "The name '{0}' isn't a type, so it can't be used in an 'as' expression.",
-      correction: "Try changing the name to the name of an existing type, or "
-          "creating a type with the name '{0}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the abstract method
-   * 1: the name of the enclosing class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a member of a concrete class is
-  // found that doesn't have a concrete implementation. Concrete classes aren't
-  // allowed to contain abstract members.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `m` is an abstract
-  // method but `C` isn't an abstract class:
-  //
-  // ```dart
-  // class C {
-  //   [!void m();!]
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it's valid to create instances of the class, provide an implementation
-  // for the member:
-  //
-  // ```dart
-  // class C {
-  //   void m() {}
-  // }
-  // ```
-  //
-  // If it isn't valid to create instances of the class, mark the class as being
-  // abstract:
-  //
-  // ```dart
-  // abstract class C {
-  //   void m();
-  // }
-  // ```
-  static const StaticWarningCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER =
-      StaticWarningCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER',
-          "'{0}' must have a method body because '{1}' isn't abstract.",
-          correction: "Try making '{1}' abstract, or adding a body to '{0}'.",
-          hasPublishedDocs: true);
-
-  @Deprecated('Use StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS')
-  static const StaticWarningCode CONST_WITH_ABSTRACT_CLASS =
-      INSTANTIATE_ABSTRACT_CLASS;
-
-  /**
    * No parameters.
    */
   // #### Description
@@ -8843,434 +10413,6 @@
       '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,
-      hasPublishedDocs: true);
-
-  /**
-   * 14.2 Exports: It is a static warning to export two different libraries with
-   * the same name.
-   *
-   * Parameters:
-   * 0: the uri pointing to a first library
-   * 1: the uri pointing to a second library
-   * 2:e the shared name of the exported libraries
-   */
-  static const StaticWarningCode EXPORT_DUPLICATED_LIBRARY_NAMED =
-      StaticWarningCode(
-          'EXPORT_DUPLICATED_LIBRARY_NAMED',
-          "The exported libraries '{0}' and '{1}' can't have the same name "
-              "'{2}'.",
-          correction:
-              "Try adding a hide clause to one of the export directives.");
-
-  @Deprecated('Use CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS')
-  static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS =
-      CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS;
-
-  @Deprecated(
-      'Use CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED')
-  static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED =
-      CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a final field is initialized in
-  // both the declaration of the field and in an initializer in a constructor.
-  // Final fields can only be assigned once, so it can't be initialized in both
-  // places.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `f` is :
-  //
-  // ```dart
-  // class C {
-  //   final int f = 0;
-  //   C() : [!f!] = 1;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the initialization doesn't depend on any values passed to the
-  // constructor, and if all of the constructors need to initialize the field to
-  // the same value, then remove the initializer from the constructor:
-  //
-  // ```dart
-  // class C {
-  //   final int f = 0;
-  //   C();
-  // }
-  // ```
-  //
-  // If the initialization depends on a value passed to the constructor, or if
-  // different constructors need to initialize the field differently, then
-  // remove the initializer in the field's declaration:
-  //
-  // ```dart
-  // class C {
-  //   final int f;
-  //   C() : f = 1;
-  // }
-  // ```
-  static const StaticWarningCode
-      FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION = StaticWarningCode(
-          '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.",
-          hasPublishedDocs: true);
-
-  /**
-   * 5. Variables: It is a static warning if a final instance variable that has
-   * been initialized at its point of declaration is also initialized in a
-   * constructor.
-   *
-   * Parameters:
-   * 0: the name of the field in question
-   */
-  static const StaticWarningCode
-      FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR = StaticWarningCode(
-          'FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR',
-          "'{0}' is final and was given a value when it was declared, "
-              "so it can't be set to a new value.",
-          correction: "Try removing one of the initializations.");
-
-  /**
-   * Parameters:
-   * 0: the name of the type of the initializer expression
-   * 1: the name of the type of the field
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the initializer list of a
-  // constructor initializes a field to a value that isn't assignable to the
-  // field.
-  //
-  // #### Example
-  //
-  // 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`:
-  //
-  // ```dart
-  // class C {
-  //   String s;
-  //
-  //   C() : s = [!0!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type of the field is correct, then change the value assigned to it
-  // so that the value has a valid type:
-  //
-  // ```dart
-  // class C {
-  //   String s;
-  //
-  //   C() : s = '0';
-  // }
-  // ```
-  //
-  // If the type of the value is correct, then change the type of the field to
-  // allow the assignment:
-  //
-  // ```dart
-  // class C {
-  //   int s;
-  //
-  //   C() : s = 0;
-  // }
-  // ```
-  static const StaticWarningCode FIELD_INITIALIZER_NOT_ASSIGNABLE =
-      StaticWarningCode(
-          'FIELD_INITIALIZER_NOT_ASSIGNABLE',
-          "The initializer type '{0}' can't be assigned to the field type "
-              "'{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * 7.6.1 Generative Constructors: An initializing formal has the form
-   * <i>this.id</i>. It is a static warning if the static type of <i>id</i> is
-   * not assignable to <i>T<sub>id</sub></i>.
-   *
-   * Parameters:
-   * 0: the name of the type of the field formal parameter
-   * 1: the name of the type of the field
-   */
-  static const StaticWarningCode FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE =
-      StaticWarningCode('FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE',
-          "The parameter type '{0}' is incompatible with the field type '{1}'.",
-          correction: "Try changing or removing the parameter's type, or "
-              "changing the field's type.");
-
-  /**
-   * Parameters:
-   * 0: the name of the uninitialized final variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a final field or variable isn't
-  // initialized.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` doesn't have an
-  // initializer:
-  //
-  // ```dart
-  // final [!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // For variables and static fields, you can add an initializer:
-  //
-  // ```dart
-  // final x = 0;
-  // ```
-  //
-  // For instance fields, you can add an initializer as shown in the previous
-  // example, or you can initialize the field in every constructor. You can
-  // initialize the field by using a field formal parameter:
-  //
-  // ```dart
-  // class C {
-  //   final int x;
-  //   C(this.x);
-  // }
-  // ```
-  //
-  // You can also initialize the field by using an initializer in the
-  // constructor:
-  //
-  // ```dart
-  // class C {
-  //   final int x;
-  //   C(int y) : x = y * 2;
-  // }
-  // ```
-  static const StaticWarningCode FINAL_NOT_INITIALIZED = StaticWarningCode(
-      'FINAL_NOT_INITIALIZED', "The final variable '{0}' must be initialized.",
-      // TODO(brianwilkerson) Split this error code so that we can suggest
-      // initializing fields in constructors (FINAL_FIELD_NOT_INITIALIZED
-      // and FINAL_VARIABLE_NOT_INITIALIZED).
-      correction: "Try initializing the variable.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the uninitialized final variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class defines one or more
-  // final instance fields without initializers and has at least one constructor
-  // that doesn't initialize those fields. All final instance fields must be
-  // initialized when the instance is created, either by the field's initializer
-  // or by the constructor.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // class C {
-  //   final String value;
-  //
-  //   [!C!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the value should be passed in to the constructor directly, then use a
-  // field formal parameter to initialize the field `value`:
-  //
-  // ```dart
-  // class C {
-  //   final String value;
-  //
-  //   C(this.value);
-  // }
-  // ```
-  //
-  // If the value should be computed indirectly from a value provided by the
-  // caller, then add a parameter and include an initializer:
-  //
-  // ```dart
-  // class C {
-  //   final String value;
-  //
-  //   C(Object o) : value = o.toString();
-  // }
-  // ```
-  //
-  // If the value of the field doesn't depend on values that can be passed to
-  // the constructor, then add an initializer for the field as part of the field
-  // declaration:
-  //
-  // ```dart
-  // class C {
-  //   final String value = '';
-  //
-  //   C();
-  // }
-  // ```
-  //
-  // If the value of the field doesn't depend on values that can be passed to
-  // the constructor but different constructors need to initialize it to
-  // different values, then add an initializer for the field in the initializer
-  // list:
-  //
-  // ```dart
-  // class C {
-  //   final String value;
-  //
-  //   C() : value = '';
-  //
-  //   C.named() : value = 'c';
-  // }
-  // ```
-  //
-  // However, if the value is the same for all instances, then consider using a
-  // static field instead of an instance field:
-  //
-  // ```dart
-  // class C {
-  //   static const String value = '';
-  //
-  //   C();
-  // }
-  // ```
-  static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 =
-      StaticWarningCodeWithUniqueName(
-          'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
-          'StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1',
-          "All final variables must be initialized, but '{0}' isn't.",
-          correction: "Try adding an initializer for the field.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the uninitialized final variable
-   * 1: the name of the uninitialized final variable
-   */
-  static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 =
-      StaticWarningCodeWithUniqueName(
-          'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
-          'StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2',
-          "All final variables must be initialized, but '{0}' and '{1}' "
-              "aren't.",
-          correction: "Try adding initializers for the fields.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the uninitialized final variable
-   * 1: the name of the uninitialized final variable
-   * 2: the number of additional not initialized variables that aren't listed
-   */
-  static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS =
-      StaticWarningCodeWithUniqueName(
-          'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
-          'StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3',
-          "All final variables must be initialized, but '{0}', '{1}', and {2} "
-              "others aren't.",
-          correction: "Try adding initializers for the fields.",
-          hasPublishedDocs: true);
-
-  /**
-   * 10.3 Setters: It is a compile-time error if a class has a setter named
-   * `v=` with argument type `T` and a getter named `v` with return type `S`,
-   * and `S` may not be assigned to `T`.
-   *
-   * Parameters:
-   * 0: the name of the getter
-   * 1: the type of the getter
-   * 2: the type of the setter
-   * 3: the name of the setter
-   */
-  static const StaticWarningCode GETTER_NOT_ASSIGNABLE_SETTER_TYPES =
-      StaticWarningCode(
-          'GETTER_NOT_ASSIGNABLE_SETTER_TYPES',
-          "The return type of getter '{0}' is '{1}' which isn't assignable "
-              "to the type '{2}' of its setter '{3}'.",
-          correction: "Try changing the types so that they are compatible.");
-
-  /**
-   * nnbd/feature-specification.md
-   *
-   * It is an error if a class has a setter and a getter with the same basename
-   * where the return type of the getter is not a subtype of the argument type
-   * of the setter. Note that this error specifically requires subtyping and
-   * not assignability and hence makes no exception for `dynamic`.
-   *
-   * Parameters:
-   * 0: the name of the getter
-   * 1: the type of the getter
-   * 2: the type of the setter
-   * 3: the name of the setter
-   */
-  static const StaticWarningCode GETTER_NOT_SUBTYPE_SETTER_TYPES =
-      StaticWarningCode(
-          'GETTER_NOT_SUBTYPE_SETTER_TYPES',
-          "The return type of getter '{0}' is '{1}' which isn't a subtype "
-              "of the type '{2}' of its setter '{3}'.",
-          correction: "Try changing the types so that they are compatible.");
-
-  /**
-   * 14.1 Imports: It is a static warning to import two different libraries with
-   * the same name.
-   *
-   * Parameters:
-   * 0: the uri pointing to a first library
-   * 1: the uri pointing to a second library
-   * 2: the shared name of the imported libraries
-   */
-  static const StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAMED =
-      StaticWarningCode(
-          'IMPORT_DUPLICATED_LIBRARY_NAMED',
-          "The imported libraries '{0}' and '{1}' can't have the same name "
-              "'{2}'.",
-          correction: "Try adding a hide clause to one of the imports.");
-
-  @Deprecated('Use CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY')
-  static const CompileTimeErrorCode IMPORT_OF_NON_LIBRARY =
-      CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds a constructor
-  // invocation and the constructor is declared in an abstract class. Even
-  // though you can't create an instance of an abstract class, abstract classes
-  // can declare constructors that can be invoked by subclasses.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `C` is an abstract
-  // class:
-  //
-  // ```dart
-  // abstract class C {}
-  //
-  // var c = new [!C!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there's a concrete subclass of the abstract class that can be used, then
-  // create an instance of the concrete subclass.
-  static const StaticWarningCode INSTANTIATE_ABSTRACT_CLASS = StaticWarningCode(
-      'INSTANTIATE_ABSTRACT_CLASS', "Abstract classes can't be instantiated.",
-      correction: "Try creating an instance of a concrete subtype.",
       hasPublishedDocs: true);
 
   /**
@@ -9322,8 +10464,22 @@
           'INVALID_NULL_AWARE_OPERATOR',
           "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,
+          correction: "Try replacing the operator '{0}' with '{1}'.",
+          hasPublishedDocs: true);
+
+  /**
+   * Parameters:
+   * 0: The null-aware operator that is invalid
+   * 1: The non-null-aware operator that can replace the invalid operator
+   */
+  static const StaticWarningCode
+      INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT =
+      StaticWarningCodeWithUniqueName(
+          'INVALID_NULL_AWARE_OPERATOR',
+          'INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT',
+          "The target expression can't be null because of short-circuiting, so "
+              "the null-aware operator '{0}' can't be used.",
+          correction: "Try replacing the operator '{0}' with '{1}'.",
           hasPublishedDocs: true);
 
   /**
@@ -9338,8 +10494,7 @@
           'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED',
           "Parameters can't override default values, this method overrides "
               "'{0}.{1}' where '{2}' has a different value.",
-          correction: "Try using the same default value in both methods.",
-          errorSeverity: ErrorSeverity.WARNING);
+          correction: "Try using the same default value in both methods.");
 
   /**
    * 7.1 Instance Methods: It is a static warning if an instance method
@@ -9354,171 +10509,7 @@
           "Parameters can't override default values, this method overrides "
               "'{0}.{1}' where this positional parameter has a different "
               "value.",
-          correction: "Try using the same default value in both methods.",
-          errorSeverity: ErrorSeverity.WARNING);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an expression whose value will
-  // always be `null` is dererenced.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `x` will always be
-  // `null`:
-  //
-  // ```dart
-  // %experiments=non-nullable
-  // int f(Null x) {
-  //   return [!x!].length;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the value is allowed to be something other than `null`, then change the
-  // type of the expression:
-  //
-  // ```dart
-  // %experiments=non-nullable
-  // int f(String? x) {
-  //   return x!.length;
-  // }
-  // ```
-  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.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the actual type of the list element
-   * 1: the expected type of the list element
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the type of an element in a list
-  // literal isn't assignable to the element type of the list.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `2.5` is a double, and
-  // the list can hold only integers:
-  //
-  // ```dart
-  // List<int> x = [1, [!2.5!], 3];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you intended to add a different object to the list, then replace the
-  // element with an expression that computes the intended object:
-  //
-  // ```dart
-  // List<int> x = [1, 2, 3];
-  // ```
-  //
-  // If the object shouldn't be in the list, then remove the element:
-  //
-  // ```dart
-  // List<int> x = [1, 3];
-  // ```
-  //
-  // 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:
-  //
-  // ```dart
-  // List<num> x = [1, 2.5, 3];
-  // ```
-  static const StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE =
-      StaticWarningCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the list type '{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the expression being used as a key
-   * 1: the type of keys declared for the map
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a key of a key-value pair in a
-  // map literal has a type that isn't assignable to the key type of the map.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `2` is an `int`, but
-  // the keys of the map are required to be `String`s:
-  //
-  // ```dart
-  // var m = <String, String>{[!2!] : 'a'};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type of the map is correct, then change the key to have the correct
-  // type:
-  //
-  // ```dart
-  // var m = <String, String>{'2' : 'a'};
-  // ```
-  //
-  // If the type of the key is correct, then change the key type of the map:
-  //
-  // ```dart
-  // var m = <int, String>{2 : 'a'};
-  // ```
-  static const StaticWarningCode MAP_KEY_TYPE_NOT_ASSIGNABLE =
-      StaticWarningCode(
-          'MAP_KEY_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the map key type "
-              "'{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the expression being used as a value
-   * 1: the type of values declared for the map
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a value of a key-value pair in a
-  // map literal has a type that isn't assignable to the the value type of the
-  // map.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `2` is an `int`, but/
-  // the values of the map are required to be `String`s:
-  //
-  // ```dart
-  // var m = <String, String>{'a' : [!2!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type of the map is correct, then change the value to have the
-  // correct type:
-  //
-  // ```dart
-  // var m = <String, String>{'a' : '2'};
-  // ```
-  //
-  // If the type of the value is correct, then change the value type of the map:
-  //
-  // ```dart
-  // var m = <String, int>{'a' : 2};
-  // ```
-  static const StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE =
-      StaticWarningCode(
-          'MAP_VALUE_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the map value type "
-              "'{1}'.",
-          hasPublishedDocs: true);
+          correction: "Try using the same default value in both methods.");
 
   /**
    * Parameters:
@@ -9588,927 +10579,6 @@
           'MISSING_ENUM_CONSTANT_IN_SWITCH', "Missing case clause for '{0}'.",
           correction: "Try adding a case clause for the missing constant, or "
               "adding a default clause.",
-          errorSeverity: ErrorSeverity.WARNING,
-          hasPublishedDocs: true);
-
-  @Deprecated('No longer an error in the spec and no longer generated')
-  static const StaticWarningCode MIXED_RETURN_TYPES = StaticWarningCode(
-      'MIXED_RETURN_TYPES',
-      "Functions can't include return statements both with and without values.",
-      correction: "Try making all the return statements consistent "
-          "(either include a value or not).");
-
-  @Deprecated('Use StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS')
-  static const StaticWarningCode NEW_WITH_ABSTRACT_CLASS =
-      INSTANTIATE_ABSTRACT_CLASS;
-
-  /**
-   * 12.11.1 New: It is a static warning if <i>T</i> is not a class accessible
-   * in the current scope, optionally followed by type arguments.
-   *
-   * Parameters:
-   * 0: the name of the non-type element
-   */
-  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
-   * current scope then:
-   * 1. If <i>e</i> is of the form <i>new T.id(a<sub>1</sub>, &hellip;,
-   *    a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;,
-   *    x<sub>n+k</sub>: a<sub>n+k</sub>)</i> it is a static warning if
-   *    <i>T.id</i> is not the name of a constructor declared by the type
-   *    <i>T</i>.
-   * If <i>e</i> of the form <i>new T(a<sub>1</sub>, &hellip;, a<sub>n</sub>,
-   * x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;, x<sub>n+k</sub>:
-   * a<sub>n+kM/sub>)</i> it is a static warning if the type <i>T</i> does not
-   * declare a constructor with the same name as the declaration of <i>T</i>.
-   */
-  static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR =
-      StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR',
-          "The class '{0}' doesn't have a constructor named '{1}'.",
-          correction: "Try invoking a different constructor, or "
-              "define a constructor named '{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the class being instantiated
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an unnamed constructor is
-  // invoked on a class that defines named constructors but the class doesn’t
-  // have an unnamed constructor.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `A` doesn't define an
-  // unnamed constructor:
-  //
-  // ```dart
-  // class A {
-  //   A.a();
-  // }
-  //
-  // A f() => [!A!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If one of the named constructors does what you need, then use it:
-  //
-  // ```dart
-  // class A {
-  //   A.a();
-  // }
-  //
-  // A f() => A.a();
-  // ```
-  //
-  // If none of the named constructors does what you need, and you're able to
-  // add an unnamed constructor, then add the constructor:
-  //
-  // ```dart
-  // class A {
-  //   A();
-  //   A.a();
-  // }
-  //
-  // A f() => A();
-  // ```
-  static const StaticWarningCode NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT =
-      StaticWarningCode('NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT',
-          "The class '{0}' doesn't have a default constructor.",
-          correction:
-              "Try using one of the named constructors defined in '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the first member
-   * 1: the name of the second member
-   * 2: the name of the third member
-   * 3: the name of the fourth member
-   * 4: the number of additional missing members that aren't listed
-   */
-  static const StaticWarningCode
-      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS =
-      StaticWarningCodeWithUniqueName(
-          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-          'StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS',
-          "Missing concrete implementations of '{0}', '{1}', '{2}', '{3}', and "
-              "{4} more.",
-          correction: "Try implementing the missing methods, or make the class "
-              "abstract.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the first member
-   * 1: the name of the second member
-   * 2: the name of the third member
-   * 3: the name of the fourth member
-   */
-  static const StaticWarningCode
-      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR =
-      StaticWarningCodeWithUniqueName(
-          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-          'StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR',
-          "Missing concrete implementations of '{0}', '{1}', '{2}', and '{3}'.",
-          correction: "Try implementing the missing methods, or make the class "
-              "abstract.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a concrete class inherits one or
-  // more abstract members, and doesn't provide or inherit an implementation for
-  // at least one of those abstract members.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the class `B` doesn't
-  // have a concrete implementation of `m`:
-  //
-  // ```dart
-  // abstract class A {
-  //   void m();
-  // }
-  //
-  // class [!B!] extends A {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the subclass can provide a concrete implementation for some or all of
-  // the abstract inherited members, then add the concrete implementations:
-  //
-  // ```dart
-  // abstract class A {
-  //   void m();
-  // }
-  //
-  // class B extends A {
-  //   void m() {}
-  // }
-  // ```
-  //
-  // If there is a mixin that provides an implementation of the inherited
-  // methods, then apply the mixin to the subclass:
-  //
-  // ```dart
-  // abstract class A {
-  //   void m();
-  // }
-  //
-  // class B extends A with M {}
-  //
-  // mixin M {
-  //   void m() {}
-  // }
-  // ```
-  //
-  // If the subclass can't provide a concrete implementation for all of the
-  // abstract inherited members, then mark the subclass as being abstract:
-  //
-  // ```dart
-  // abstract class A {
-  //   void m();
-  // }
-  //
-  // abstract class B extends A {}
-  // ```
-  static const StaticWarningCode
-      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE =
-      StaticWarningCodeWithUniqueName(
-          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-          'StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE',
-          "Missing concrete implementation of '{0}'.",
-          correction: "Try implementing the missing method, or make the class "
-              "abstract.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the first member
-   * 1: the name of the second member
-   * 2: the name of the third member
-   */
-  static const StaticWarningCode
-      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE =
-      StaticWarningCodeWithUniqueName(
-          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-          'StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE',
-          "Missing concrete implementations of '{0}', '{1}', and '{2}'.",
-          correction: "Try implementing the missing methods, or make the class "
-              "abstract.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the first member
-   * 1: the name of the second member
-   */
-  static const StaticWarningCode
-      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO =
-      StaticWarningCodeWithUniqueName(
-          'NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER',
-          'StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO',
-          "Missing concrete implementations of '{0}' and '{1}'.",
-          correction: "Try implementing the missing methods, or make the class "
-              "abstract.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the non-type element
-   */
-  // #### 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.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` is a function, not
-  // a type:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } on [!f!] {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the name to the type of object that should be caught:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } on FormatException {
-  //     // ...
-  //   }
-  // }
-  // ```
-  static const StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = StaticWarningCode(
-      'NON_TYPE_IN_CATCH_CLAUSE',
-      "The name '{0}' isn't a type and can't be used in an on-catch "
-          "clause.",
-      correction: "Try correcting the name to match an existing class.",
-      hasPublishedDocs: true);
-
-  /**
-   * 7.1.1 Operators: It is a static warning if the return type of the
-   * user-declared operator []= is explicitly declared and not void.
-   */
-  static const StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR =
-      StaticWarningCode('NON_VOID_RETURN_FOR_OPERATOR',
-          "The return type of the operator []= must be 'void'.",
-          correction: "Try changing the return type to 'void'.");
-
-  /**
-   * 7.3 Setters: It is a static warning if a setter declares a return type
-   * other than void.
-   */
-  static const StaticWarningCode NON_VOID_RETURN_FOR_SETTER = StaticWarningCode(
-      'NON_VOID_RETURN_FOR_SETTER',
-      "The return type of the setter must be 'void' or absent.",
-      correction: "Try removing the return type, or "
-          "define a method rather than a setter.");
-
-  /**
-   * Parameters:
-   * 0: the name that is not a type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name is used as a type but
-  // declared to be something other than a type.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` is a function:
-  //
-  // ```dart
-  // f() {}
-  // g([!f!] v) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the name with the name of a type.
-  static const StaticWarningCode NOT_A_TYPE = StaticWarningCode(
-      'NOT_A_TYPE', "{0} isn't a type.",
-      correction: "Try correcting the name to match an existing type.",
-      hasPublishedDocs: true);
-
-  @Deprecated('Use CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS')
-  static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS =
-      CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS;
-
-  /**
-   * Parameters:
-   * 0: the name of expected library name
-   * 1: the non-matching actual library name from the "part of" declaration
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a library attempts to include a
-  // file as a part of itself when the other file is a part of a different
-  // library.
-  //
-  // #### Example
-  //
-  // Given a file named `part.dart` containing
-  //
-  // ```dart
-  // %uri="package:a/part.dart"
-  // part of 'library.dart';
-  // ```
-  //
-  // The following code, in any file other than `library.dart`, produces this
-  // diagnostic because it attempts to include `part.dart` as a part of itself
-  // when `part.dart` is a part of a different library:
-  //
-  // ```dart
-  // part [!'package:a/part.dart'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the library should be using a different file as a part, then change the
-  // URI in the part directive to be the URI of the other file.
-  //
-  // If the part file should be a part of this library, then update the URI (or
-  // library name) in the part-of directive to be the URI (or name) of the
-  // correct library.
-  static const StaticWarningCode PART_OF_DIFFERENT_LIBRARY = StaticWarningCode(
-      '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.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the redirected constructor
-   * 1: the name of the redirecting constructor
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a factory constructor attempts
-  // to redirect to another constructor, but the two have incompatible
-  // parameters. The parameters are compatible if all of the parameters of the
-  // redirecting constructor can be passed to the other constructor and if the
-  // other constructor doesn't require any parameters that aren't declared by
-  // the redirecting constructor.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the constructor for `A`
-  // doesn't declare a parameter that the constructor for `B` requires:
-  //
-  // ```dart
-  // abstract class A {
-  //   factory A() = [!B!];
-  // }
-  //
-  // class B implements A {
-  //   B(int x);
-  //   B.zero();
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the constructor for `A`
-  // declares a named parameter (`y`) that the constructor for `B` doesn't
-  // allow:
-  //
-  // ```dart
-  // abstract class A {
-  //   factory A(int x, {int y}) = [!B!];
-  // }
-  //
-  // class B implements A {
-  //   B(int x);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there's a different constructor that is compatible with the redirecting
-  // constructor, then redirect to that constructor:
-  //
-  // ```dart
-  // abstract class A {
-  //   factory A() = B.zero;
-  // }
-  //
-  // class B implements A {
-  //   B(int x);
-  //   B.zero();
-  // }
-  // ```
-  //
-  // Otherwise, update the redirecting constructor to be compatible:
-  //
-  // ```dart
-  // abstract class A {
-  //   factory A(int x) = B;
-  // }
-  //
-  // class B implements A {
-  //   B(int x);
-  // }
-  // ```
-  static const StaticWarningCode REDIRECT_TO_INVALID_FUNCTION_TYPE =
-      StaticWarningCode(
-          'REDIRECT_TO_INVALID_FUNCTION_TYPE',
-          "The redirected constructor '{0}' has incompatible parameters with "
-              "'{1}'.",
-          correction: "Try redirecting to a different constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the redirected constructor's return type
-   * 1: the name of the redirecting constructor's return type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a factory constructor redirects
-  // to a constructor whose return type isn't a subtype of the type that the
-  // factory constructor is declared to produce.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `A` isn't a subclass
-  // of `C`, which means that the value returned by the constructor `A()`
-  // couldn't be returned from the constructor `C()`:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class B implements C {}
-  //
-  // class C {
-  //   factory C() = [!A!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the factory constructor is redirecting to a constructor in the wrong
-  // class, then update the factory constructor to redirect to the correct
-  // constructor:
-  //
-  // ```dart
-  // class A {}
-  //
-  // class B implements C {}
-  //
-  // class C {
-  //   factory C() = B;
-  // }
-  // ```
-  //
-  // 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:
-  //
-  // ```dart
-  // class A implements C {}
-  //
-  // class B implements C {}
-  //
-  // class C {
-  //   factory C() = A;
-  // }
-  // ```
-  static const StaticWarningCode REDIRECT_TO_INVALID_RETURN_TYPE =
-      StaticWarningCode(
-          'REDIRECT_TO_INVALID_RETURN_TYPE',
-          "The return type '{0}' of the redirected constructor isn't "
-              "a subtype of '{1}'.",
-          correction: "Try redirecting to a different constructor.",
-          hasPublishedDocs: true);
-
-  @Deprecated('Use CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR')
-  static const CompileTimeErrorCode REDIRECT_TO_MISSING_CONSTRUCTOR =
-      CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR;
-
-  @Deprecated('Use CompileTimeErrorCode.REDIRECT_TO_NON_CLASS')
-  static const CompileTimeErrorCode REDIRECT_TO_NON_CLASS =
-      CompileTimeErrorCode.REDIRECT_TO_NON_CLASS;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds a `return` statement
-  // without an expression in a function that declares a return type.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the function `f` is
-  // expected to return an `int`, but no value is being returned:
-  //
-  // ```dart
-  // int f() {
-  //   [!return!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add an expression that computes the value to be returned:
-  //
-  // ```dart
-  // int f() {
-  //   return 0;
-  // }
-  // ```
-  static const StaticWarningCode RETURN_WITHOUT_VALUE = StaticWarningCode(
-      'RETURN_WITHOUT_VALUE', "The  return value is missing after 'return'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the actual type of the set element
-   * 1: the expected type of the set element
-   */
-  static const StaticWarningCode SET_ELEMENT_TYPE_NOT_ASSIGNABLE =
-      StaticWarningCode('SET_ELEMENT_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the set type '{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the instance member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class name is used to access
-  // an instance field. Instance fields don't exist on a class; they exist only
-  // on an instance of the class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is an instance
-  // field:
-  //
-  // ```dart
-  // class C {
-  //   static int a;
-  //
-  //   int b;
-  // }
-  //
-  // int f() => C.[!b!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you intend to access a static field, then change the name of the field
-  // to an existing static field:
-  //
-  // ```dart
-  // class C {
-  //   static int a;
-  //
-  //   int b;
-  // }
-  //
-  // int f() => C.a;
-  // ```
-  //
-  // If you intend to access the instance field, then use an instance of the
-  // class to access the field:
-  //
-  // ```dart
-  // class C {
-  //   static int a;
-  //
-  //   int b;
-  // }
-  //
-  // int f(C c) => c.b;
-  // ```
-  static const StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER =
-      StaticWarningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER',
-          "Instance member '{0}' can't be accessed using static access.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: The static type of the switch expression
-   * 1: The static type of the case expressions
-   */
-  // #### 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.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type of `s`
-  // (`String`) isn't assignable to the type of `0` (`int`):
-  //
-  // ```dart
-  // void f(String s) {
-  //   switch ([!s!]) {
-  //     case 0:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // 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) {
-  //   switch (int.parse(s)) {
-  //     case 0:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // If the type of the `switch` expression is correct, then change the `case`
-  // expressions to have the correct type:
-  //
-  // ```dart
-  // void f(String s) {
-  //   switch (s) {
-  //     case '0':
-  //       break;
-  //   }
-  // }
-  // ```
-  static const StaticWarningCode SWITCH_EXPRESSION_NOT_ASSIGNABLE =
-      StaticWarningCode(
-          'SWITCH_EXPRESSION_NOT_ASSIGNABLE',
-          "Type '{0}' of the switch expression isn't assignable to "
-              "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
-   * annotation.
-   *
-   * Parameters:
-   * 0: the name of the type that is deferred and being used in a type
-   *    annotation
-   */
-  static const StaticWarningCode TYPE_ANNOTATION_DEFERRED_CLASS =
-      StaticWarningCode(
-          'TYPE_ANNOTATION_DEFERRED_CLASS',
-          "The deferred type '{0}' can't be used in a declaration, cast or "
-              "type test.",
-          correction: "Try using a different type, or "
-              "changing the import to not be deferred.");
-
-  /**
-   * 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type
-   * available in the current lexical scope.
-   */
-  static const StaticWarningCode TYPE_TEST_WITH_NON_TYPE = StaticWarningCode(
-      'TYPE_TEST_WITH_NON_TYPE',
-      "The name '{0}' isn't a type and can't be used in an 'is' "
-          "expression.",
-      correction: "Try correcting the name to match an existing type.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name following the `is` in a
-  // type test expression isn't defined.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the name `Srting` isn't
-  // defined:
-  //
-  // ```dart
-  // void f(Object o) {
-  //   if (o is [!Srting!]) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the name with the name of a type:
-  //
-  // ```dart
-  // void f(Object o) {
-  //   if (o is String) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  static const StaticWarningCode TYPE_TEST_WITH_UNDEFINED_NAME =
-      StaticWarningCode(
-          'TYPE_TEST_WITH_UNDEFINED_NAME',
-          "The name '{0}' isn't defined, so it can't be used in an 'is' "
-              "expression.",
-          correction:
-              "Try changing the name to the name of an existing type, or "
-              "creating a type with the name '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * 10 Generics: However, a type parameter is considered to be a malformed type
-   * when referenced by a static member.
-   *
-   * 15.1 Static Types: Any use of a malformed type gives rise to a static
-   * warning. A malformed type is then interpreted as dynamic by the static type
-   * checker and the runtime.
-   */
-  static const StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC =
-      StaticWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC',
-          "Static members can't reference type parameters of the class.",
-          correction: "Try removing the reference to the type parameter, or "
-              "making the member an instance member.");
-
-  @Deprecated('Use CompileTimeErrorCode.UNDEFINED_CLASS')
-  static const CompileTimeErrorCode UNDEFINED_CLASS =
-      CompileTimeErrorCode.UNDEFINED_CLASS;
-
-  /**
-   * Same as [CompileTimeErrorCode.UNDEFINED_CLASS], but to catch using
-   * "boolean" instead of "bool".
-   */
-  static const StaticWarningCode UNDEFINED_CLASS_BOOLEAN = StaticWarningCode(
-      'UNDEFINED_CLASS_BOOLEAN', "Undefined class 'boolean'.",
-      correction: "Try using the type 'bool'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the identifier
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it encounters an identifier that
-  // either isn't defined or isn't visible in the scope in which it's being
-  // referenced.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the name `rihgt` isn't
-  // defined:
-  //
-  // ```dart
-  // int min(int left, int right) => left <= [!rihgt!] ? left : right;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the identifier isn't defined, then either define it or replace it with
-  // an identifier that is defined. The example above can be corrected by
-  // fixing the spelling of the variable:
-  //
-  // ```dart
-  // int min(int left, int right) => left <= right ? left : right;
-  // ```
-  //
-  // If the identifier is defined but isn't visible, then you probably need to
-  // add an import or re-arrange your code to make the identifier visible.
-  static const StaticWarningCode UNDEFINED_IDENTIFIER =
-      StaticWarningCode('UNDEFINED_IDENTIFIER', "Undefined name '{0}'.",
-          correction: "Try correcting the name to one that is defined, or "
-              "defining the name.",
-          hasPublishedDocs: true,
-          isUnresolvedIdentifier: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name `await` is used in a
-  // method or function body without being declared, and the body isn't marked
-  // with the `async` keyword. The name `await` only introduces an await
-  // expression in an asynchronous function.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the name `await` is
-  // used in the body of `f` even though the body of `f` isn't marked with the
-  // `async` keyword:
-  //
-  // ```dart
-  // void f(p) { [!await!] p; }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add the keyword `async` to the function body:
-  //
-  // ```dart
-  // void f(p) async { await p; }
-  // ```
-  static const StaticWarningCode UNDEFINED_IDENTIFIER_AWAIT = StaticWarningCode(
-      'UNDEFINED_IDENTIFIER_AWAIT',
-      "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.",
-      hasPublishedDocs: true);
-
-  @Deprecated('Use CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER')
-  static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER =
-      CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an expression whose type is
-  // <a href=”#potentially-non-nullable”>potentially non-nullable</a> is
-  // dereferenced without first verifying that the value isn't `null`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `s` can be `null` at
-  // the point where it's referenced:
-  //
-  // ```dart
-  // %experiments=non-nullable
-  // void f(String? s) {
-  //   if ([!s!].length > 3) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the value really can be `null`, then add a test to ensure that members
-  // are only accessed when the value isn't `null`:
-  //
-  // ```dart
-  // %experiments=non-nullable
-  // void f(String? s) {
-  //   if (s != null && s.length > 3) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // If the expression is a variable and the value should never be `null`, then
-  // change the type of the variable to be non-nullable:
-  //
-  // ```dart
-  // %experiments=non-nullable
-  // void f(String s) {
-  //   if (s.length > 3) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // If you believe that the value of the expression should never be `null`, but
-  // you can't change the type of the variable, and you're willing to risk
-  // having an exception thrown at runtime if you're wrong, then you can assert
-  // that the value isn't null:
-  //
-  // ```dart
-  // %experiments=non-nullable
-  // void f(String? s) {
-  //   if (s!.length > 3) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  static const StaticWarningCode UNCHECKED_USE_OF_NULLABLE_VALUE =
-      StaticWarningCode(
-          'UNCHECKED_USE_OF_NULLABLE_VALUE',
-          "An expression whose value can be 'null' must be null-checked before "
-              "it can be dereferenced.",
-          correction:
-              "Try checking that the value isn't 'null' before dereferencing "
-              "it.",
           hasPublishedDocs: true);
 
   /**
@@ -10546,49 +10616,9 @@
           "The '!' will have no effect because the target expression can't be"
               " null.",
           correction: "Try removing the '!' operator.",
-          errorSeverity: ErrorSeverity.WARNING,
           hasPublishedDocs: true);
 
   /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds an expression whose
-  // type is `void`, and the expression is used in a place where a value is
-  // expected, such as before a member access or on the right-hand side of an
-  // assignment.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` doesn't produce an
-  // object on which `toString` can be invoked:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // void g() {
-  //   [!f()!].toString();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Either rewrite the code so that the expression has a value or rewrite the
-  // code so that it doesn't depend on the value.
-  static const StaticWarningCode USE_OF_VOID_RESULT = StaticWarningCode(
-      'USE_OF_VOID_RESULT',
-      "This expression has a type of 'void' so its value can't be used.",
-      correction:
-          "Try checking to see if you're using the correct API; there might "
-          "be a function or call that returns void you didn't expect. Also "
-          "check type parameters and variables which might also be void.",
-      hasPublishedDocs: true);
-
-  @override
-  final ErrorSeverity errorSeverity;
-
-  /**
    * Initialize a newly created error code to have the given [name]. The message
    * associated with the error will be created from the given [message]
    * template. The correction associated with the error will be created from the
@@ -10596,7 +10626,6 @@
    */
   const StaticWarningCode(String name, String message,
       {String correction,
-      this.errorSeverity = ErrorSeverity.ERROR,
       bool hasPublishedDocs,
       bool isUnresolvedIdentifier = false})
       : super.temporary(name, message,
@@ -10605,6 +10634,9 @@
             isUnresolvedIdentifier: isUnresolvedIdentifier);
 
   @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
+
+  @override
   ErrorType get type => ErrorType.STATIC_WARNING;
 }
 
@@ -10645,106 +10677,22 @@
       "Try adding an explicit type like 'dynamic', or "
       "enable implicit-dynamic in your analysis options file.";
 
-  static const StrongModeCode INVALID_PARAMETER_DECLARATION = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_PARAMETER_DECLARATION',
-      "Type check failed: '{0}' isn't of type '{1}'.");
-
-  static const StrongModeCode COULD_NOT_INFER = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'COULD_NOT_INFER',
-      "Couldn't infer type parameter '{0}'.{1}");
-
-  static const StrongModeCode INVALID_CAST_LITERAL = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_CAST_LITERAL',
-      "The literal '{0}' with type '{1}' isn't of expected type '{2}'.");
-
-  static const StrongModeCode INVALID_CAST_LITERAL_LIST = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_CAST_LITERAL_LIST',
-      "The list literal type '{0}' isn't of expected type '{1}'. The list's "
-          "type can be changed with an explicit generic type argument or by "
-          "changing the element types.");
-
-  static const StrongModeCode INVALID_CAST_LITERAL_MAP = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_CAST_LITERAL_MAP',
-      "The map literal type '{0}' isn't of expected type '{1}'. The maps's "
-          "type can be changed with an explicit generic type arguments or by "
-          "changing the key and value types.");
-
-  static const StrongModeCode INVALID_CAST_LITERAL_SET = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_CAST_LITERAL_SET',
-      "The set literal type '{0}' isn't of expected type '{1}'. The set's "
-          "type can be changed with an explicit generic type argument or by "
-          "changing the element types.");
-
-  static const StrongModeCode INVALID_CAST_FUNCTION_EXPR = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_CAST_FUNCTION_EXPR',
-      "The function expression type '{0}' isn't of type '{1}'. "
-          "This means its parameter or return type doesn't match what is "
-          "expected. Consider changing parameter type(s) or the returned "
-          "type(s).");
-
-  static const StrongModeCode INVALID_CAST_NEW_EXPR = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_CAST_NEW_EXPR',
-      "The constructor returns type '{0}' that isn't of expected type '{1}'.");
-
-  static const StrongModeCode INVALID_CAST_METHOD = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_CAST_METHOD',
-      "The method tear-off '{0}' has type '{1}' that isn't of expected type "
-          "'{2}'. This means its parameter or return type doesn't match what "
-          "is expected.");
-
-  static const StrongModeCode INVALID_CAST_FUNCTION = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_CAST_FUNCTION',
-      "The function '{0}' has type '{1}' that isn't of expected type "
-          "'{2}'. This means its parameter or return type doesn't match what "
-          "is expected.");
-
-  static const StrongModeCode INVALID_SUPER_INVOCATION = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_SUPER_INVOCATION',
-      "The super call must be last in an initializer "
-          "list (see https://goo.gl/EY6hDP): '{0}'.");
-
-  static const StrongModeCode DYNAMIC_INVOKE = StrongModeCode(
-      ErrorType.HINT, 'DYNAMIC_INVOKE', "'{0}' requires a dynamic invoke.");
-
-  static const StrongModeCode IMPLICIT_DYNAMIC_PARAMETER = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'IMPLICIT_DYNAMIC_PARAMETER',
-      "Missing parameter type for '{0}'.",
-      correction: _implicitDynamicCorrection);
-
-  static const StrongModeCode IMPLICIT_DYNAMIC_RETURN = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'IMPLICIT_DYNAMIC_RETURN',
-      "Missing return type for '{0}'.",
-      correction: _implicitDynamicCorrection);
-
-  static const StrongModeCode IMPLICIT_DYNAMIC_VARIABLE = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'IMPLICIT_DYNAMIC_VARIABLE',
-      "Missing variable type for '{0}'.",
-      correction: _implicitDynamicCorrection);
-
   static const StrongModeCode IMPLICIT_DYNAMIC_FIELD = StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'IMPLICIT_DYNAMIC_FIELD',
       "Missing field type for '{0}'.",
       correction: _implicitDynamicCorrection);
 
-  static const StrongModeCode IMPLICIT_DYNAMIC_TYPE = StrongModeCode(
+  static const StrongModeCode IMPLICIT_DYNAMIC_FUNCTION = StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
-      'IMPLICIT_DYNAMIC_TYPE',
-      "Missing type arguments for generic type '{0}'.",
+      'IMPLICIT_DYNAMIC_FUNCTION',
+      "Missing type arguments for generic function '{0}<{1}>'.",
+      correction: _implicitDynamicCorrection);
+
+  static const StrongModeCode IMPLICIT_DYNAMIC_INVOKE = StrongModeCode(
+      ErrorType.COMPILE_TIME_ERROR,
+      'IMPLICIT_DYNAMIC_INVOKE',
+      "Missing type arguments for calling generic function type '{0}'.",
       correction: _implicitDynamicCorrection);
 
   static const StrongModeCode IMPLICIT_DYNAMIC_LIST_LITERAL = StrongModeCode(
@@ -10759,29 +10707,35 @@
       "Missing type arguments for map literal.",
       correction: _implicitDynamicCorrection);
 
-  static const StrongModeCode IMPLICIT_DYNAMIC_FUNCTION = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'IMPLICIT_DYNAMIC_FUNCTION',
-      "Missing type arguments for generic function '{0}<{1}>'.",
-      correction: _implicitDynamicCorrection);
-
   static const StrongModeCode IMPLICIT_DYNAMIC_METHOD = StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'IMPLICIT_DYNAMIC_METHOD',
       "Missing type arguments for generic method '{0}<{1}>'.",
       correction: _implicitDynamicCorrection);
 
-  static const StrongModeCode IMPLICIT_DYNAMIC_INVOKE = StrongModeCode(
+  static const StrongModeCode IMPLICIT_DYNAMIC_PARAMETER = StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
-      'IMPLICIT_DYNAMIC_INVOKE',
-      "Missing type arguments for calling generic function type '{0}'.",
+      'IMPLICIT_DYNAMIC_PARAMETER',
+      "Missing parameter type for '{0}'.",
       correction: _implicitDynamicCorrection);
 
-  static const StrongModeCode NOT_INSTANTIATED_BOUND = StrongModeCode(
+  static const StrongModeCode IMPLICIT_DYNAMIC_RETURN = StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
-      'NOT_INSTANTIATED_BOUND',
-      "Type parameter bound types must be instantiated.",
-      correction: "Try adding type arguments.");
+      'IMPLICIT_DYNAMIC_RETURN',
+      "Missing return type for '{0}'.",
+      correction: _implicitDynamicCorrection);
+
+  static const StrongModeCode IMPLICIT_DYNAMIC_TYPE = StrongModeCode(
+      ErrorType.COMPILE_TIME_ERROR,
+      'IMPLICIT_DYNAMIC_TYPE',
+      "Missing type arguments for generic type '{0}'.",
+      correction: _implicitDynamicCorrection);
+
+  static const StrongModeCode IMPLICIT_DYNAMIC_VARIABLE = StrongModeCode(
+      ErrorType.COMPILE_TIME_ERROR,
+      'IMPLICIT_DYNAMIC_VARIABLE',
+      "Missing variable type for '{0}'.",
+      correction: _implicitDynamicCorrection);
 
   /*
    * TODO(brianwilkerson) Make the TOP_LEVEL_ error codes be errors rather than
@@ -10790,14 +10744,6 @@
    */
   /* TODO(leafp) Delete most of these.
    */
-  static const StrongModeCode TOP_LEVEL_CYCLE = StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'TOP_LEVEL_CYCLE',
-      "The type of '{0}' can't be inferred because it depends on itself "
-          "through the cycle: {1}.",
-      correction:
-          "Try adding an explicit type to one or more of the variables in the "
-          "cycle in order to break the cycle.");
 
   static const StrongModeCode TOP_LEVEL_FUNCTION_LITERAL_BLOCK = StrongModeCode(
       ErrorType.HINT,
diff --git a/pkg/analyzer/lib/src/error/constructor_fields_verifier.dart b/pkg/analyzer/lib/src/error/constructor_fields_verifier.dart
index d2ee46a..f28b925 100644
--- a/pkg/analyzer/lib/src/error/constructor_fields_verifier.dart
+++ b/pkg/analyzer/lib/src/error/constructor_fields_verifier.dart
@@ -80,6 +80,7 @@
     _fieldMap.forEach((FieldElement field, _InitState state) {
       if (state != _InitState.notInit) return;
       if (field.isLate) return;
+      if (field.isAbstract) return;
 
       if (field.isFinal) {
         notInitFinalFields.add(field);
@@ -117,19 +118,19 @@
 
     if (names.length == 1) {
       _errorReporter.reportErrorForNode(
-        StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
+        CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
         node.returnType,
         names,
       );
     } else if (names.length == 2) {
       _errorReporter.reportErrorForNode(
-        StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2,
+        CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2,
         node.returnType,
         names,
       );
     } else {
       _errorReporter.reportErrorForNode(
-        StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS,
+        CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS,
         node.returnType,
         [names[0], names[1], names.length - 2],
       );
@@ -172,7 +173,7 @@
           } else if (state == _InitState.initInDeclaration) {
             if (element.isFinal || element.isConst) {
               _errorReporter.reportErrorForNode(
-                StaticWarningCode
+                CompileTimeErrorCode
                     .FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
                 fieldName,
               );
@@ -209,7 +210,7 @@
         } else if (state == _InitState.initInDeclaration) {
           if (fieldElement.isFinal || fieldElement.isConst) {
             _errorReporter.reportErrorForNode(
-              StaticWarningCode
+              CompileTimeErrorCode
                   .FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
               parameter.identifier,
               [fieldElement.displayName],
diff --git a/pkg/analyzer/lib/src/error/correct_override.dart b/pkg/analyzer/lib/src/error/correct_override.dart
index 0512bac..8abb0b4 100644
--- a/pkg/analyzer/lib/src/error/correct_override.dart
+++ b/pkg/analyzer/lib/src/error/correct_override.dart
@@ -172,7 +172,7 @@
             i,
           );
           if (superParameter != null) {
-            var parameterSuperList = (result[parameter] ??= []);
+            var parameterSuperList = result[parameter] ??= [];
             var superType = _superSubstitution(superMember)
                 .substituteType(superParameter.type);
             parameterSuperList.add(
diff --git a/pkg/analyzer/lib/src/error/dead_code_verifier.dart b/pkg/analyzer/lib/src/error/dead_code_verifier.dart
index 4e5cebe..ad7fa1f 100644
--- a/pkg/analyzer/lib/src/error/dead_code_verifier.dart
+++ b/pkg/analyzer/lib/src/error/dead_code_verifier.dart
@@ -153,7 +153,7 @@
   /// to the given [errorReporter] and will use the given [typeSystem] if one is
   /// provided.
   LegacyDeadCodeVerifier(this._errorReporter, {TypeSystemImpl typeSystem})
-      : this._typeSystem = typeSystem ??
+      : _typeSystem = typeSystem ??
             TypeSystemImpl(
               implicitCasts: true,
               isNonNullableByDefault: false,
@@ -389,8 +389,10 @@
         // dead, and it's a BreakStatement, then assume it is a statement
         // mandated by the language spec, there to avoid a
         // CASE_BLOCK_NOT_TERMINATED error.
-        if (allowMandated && i == size - 2 && nextStatement is BreakStatement) {
-          return;
+        if (allowMandated && i == size - 2) {
+          if (_isMandatedSwitchCaseTerminatingStatement(nextStatement)) {
+            return;
+          }
         }
         int offset = nextStatement.offset;
         int length = lastStatement.end - offset;
@@ -443,6 +445,21 @@
     }
     return false;
   }
+
+  static bool _isMandatedSwitchCaseTerminatingStatement(Statement node) {
+    if (node is BreakStatement ||
+        node is ContinueStatement ||
+        node is ReturnStatement) {
+      return true;
+    }
+    if (node is ExpressionStatement) {
+      var expression = node.expression;
+      if (expression is RethrowExpression || expression is ThrowExpression) {
+        return true;
+      }
+    }
+    return false;
+  }
 }
 
 /// Helper for tracking dead code - [CatchClause]s and unreachable code.
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 3866ef9..97a02ce 100644
--- a/pkg/analyzer/lib/src/error/getter_setter_types_verifier.dart
+++ b/pkg/analyzer/lib/src/error/getter_setter_types_verifier.dart
@@ -27,8 +27,8 @@
 
   ErrorCode get _errorCode {
     return _isNonNullableByDefault
-        ? StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES
-        : StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES;
+        ? CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES
+        : CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES;
   }
 
   bool get _isNonNullableByDefault => _typeSystem.isNonNullableByDefault;
diff --git a/pkg/analyzer/lib/src/error/inheritance_override.dart b/pkg/analyzer/lib/src/error/inheritance_override.dart
index 8786791..cac6440 100644
--- a/pkg/analyzer/lib/src/error/inheritance_override.dart
+++ b/pkg/analyzer/lib/src/error/inheritance_override.dart
@@ -581,18 +581,33 @@
   /// because the class itself defines an abstract method with this [name],
   /// report the more specific error, and return `true`.
   bool _reportConcreteClassWithAbstractMember(String name) {
+    bool checkMemberNameCombo(ClassMember member, String memberName) {
+      if (memberName == name) {
+        reporter.reportErrorForNode(
+            CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
+            member,
+            [name, classElement.name]);
+        return true;
+      } else {
+        return false;
+      }
+    }
+
     for (var member in members) {
       if (member is MethodDeclaration) {
         var name2 = member.name.name;
         if (member.isSetter) {
           name2 += '=';
         }
-        if (name2 == name) {
-          reporter.reportErrorForNode(
-              StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
-              member,
-              [name, classElement.name]);
-          return true;
+        if (checkMemberNameCombo(member, name2)) return true;
+      } else if (member is FieldDeclaration) {
+        for (var variableDeclaration in member.fields.variables) {
+          var name2 = variableDeclaration.name.name;
+          if (checkMemberNameCombo(member, name2)) return true;
+          if (!variableDeclaration.isFinal) {
+            name2 += '=';
+            if (checkMemberNameCombo(member, name2)) return true;
+          }
         }
       }
     }
@@ -668,31 +683,32 @@
 
     if (descriptions.length == 1) {
       reporter.reportErrorForNode(
-        StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+        CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
         classNameNode,
         [descriptions[0]],
       );
     } else if (descriptions.length == 2) {
       reporter.reportErrorForNode(
-        StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
+        CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
         classNameNode,
         [descriptions[0], descriptions[1]],
       );
     } else if (descriptions.length == 3) {
       reporter.reportErrorForNode(
-        StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
+        CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
         classNameNode,
         [descriptions[0], descriptions[1], descriptions[2]],
       );
     } else if (descriptions.length == 4) {
       reporter.reportErrorForNode(
-        StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
+        CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
         classNameNode,
         [descriptions[0], descriptions[1], descriptions[2], descriptions[3]],
       );
     } else {
       reporter.reportErrorForNode(
-        StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
+        CompileTimeErrorCode
+            .NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
         classNameNode,
         [
           descriptions[0],
diff --git a/pkg/analyzer/lib/src/error/literal_element_verifier.dart b/pkg/analyzer/lib/src/error/literal_element_verifier.dart
index e3098b0..995b3e6 100644
--- a/pkg/analyzer/lib/src/error/literal_element_verifier.dart
+++ b/pkg/analyzer/lib/src/error/literal_element_verifier.dart
@@ -50,8 +50,8 @@
   void _checkAssignableToElementType(DartType type, AstNode errorNode) {
     if (!typeSystem.isAssignableTo2(type, elementType)) {
       var errorCode = forList
-          ? StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
-          : StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE;
+          ? CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+          : CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE;
       errorReporter.reportErrorForNode(
         errorCode,
         errorNode,
@@ -110,7 +110,7 @@
     var keyType = entry.key.staticType;
     if (!typeSystem.isAssignableTo2(keyType, mapKeyType)) {
       errorReporter.reportErrorForNode(
-        StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+        CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
         entry.key,
         [keyType, mapKeyType],
       );
@@ -119,7 +119,7 @@
     var valueType = entry.value.staticType;
     if (!typeSystem.isAssignableTo2(valueType, mapValueType)) {
       errorReporter.reportErrorForNode(
-        StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+        CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
         entry.value,
         [valueType, mapValueType],
       );
@@ -132,22 +132,36 @@
     var expressionType = expression.staticType;
     if (expressionType.isDynamic) return;
 
-    if (expressionType.isDartCoreNull) {
-      if (!isNullAware) {
+    if (typeSystem.isNonNullableByDefault) {
+      if (typeSystem.isSubtypeOf2(expressionType, NeverTypeImpl.instance)) {
+        return;
+      }
+      if (typeSystem.isSubtypeOf2(expressionType, typeSystem.nullNone)) {
+        if (isNullAware) {
+          return;
+        }
         errorReporter.reportErrorForNode(
           CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD,
           expression,
         );
+        return;
       }
-      return;
+    } else {
+      if (expressionType.isDartCoreNull) {
+        if (isNullAware) {
+          return;
+        }
+        errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD,
+          expression,
+        );
+        return;
+      }
     }
 
-    expressionType = typeSystem.resolveToBound(expressionType);
-
-    InterfaceType iterableType;
-    if (expressionType is InterfaceTypeImpl) {
-      iterableType = expressionType.asInstanceOf(typeProvider.iterableElement);
-    }
+    var iterableType = expressionType.asInstanceOf(
+      typeProvider.iterableElement,
+    );
 
     if (iterableType == null) {
       return errorReporter.reportErrorForNode(
@@ -159,8 +173,8 @@
     var iterableElementType = iterableType.typeArguments[0];
     if (!typeSystem.isAssignableTo2(iterableElementType, elementType)) {
       var errorCode = forList
-          ? StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
-          : StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE;
+          ? CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+          : CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE;
       errorReporter.reportErrorForNode(
         errorCode,
         expression,
@@ -175,22 +189,36 @@
     var expressionType = expression.staticType;
     if (expressionType.isDynamic) return;
 
-    if (expressionType.isDartCoreNull) {
-      if (!isNullAware) {
+    if (typeSystem.isNonNullableByDefault) {
+      if (typeSystem.isSubtypeOf2(expressionType, NeverTypeImpl.instance)) {
+        return;
+      }
+      if (typeSystem.isSubtypeOf2(expressionType, typeSystem.nullNone)) {
+        if (isNullAware) {
+          return;
+        }
         errorReporter.reportErrorForNode(
           CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD,
           expression,
         );
+        return;
       }
-      return;
+    } else {
+      if (expressionType.isDartCoreNull) {
+        if (isNullAware) {
+          return;
+        }
+        errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD,
+          expression,
+        );
+        return;
+      }
     }
 
-    expressionType = typeSystem.resolveToBound(expressionType);
-
-    InterfaceType mapType;
-    if (expressionType is InterfaceTypeImpl) {
-      mapType = expressionType.asInstanceOf(typeProvider.mapElement);
-    }
+    var mapType = expressionType.asInstanceOf(
+      typeProvider.mapElement,
+    );
 
     if (mapType == null) {
       return errorReporter.reportErrorForNode(
@@ -202,7 +230,7 @@
     var keyType = mapType.typeArguments[0];
     if (!typeSystem.isAssignableTo2(keyType, mapKeyType)) {
       errorReporter.reportErrorForNode(
-        StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+        CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
         expression,
         [keyType, mapKeyType],
       );
@@ -211,7 +239,7 @@
     var valueType = mapType.typeArguments[1];
     if (!typeSystem.isAssignableTo2(valueType, mapValueType)) {
       errorReporter.reportErrorForNode(
-        StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+        CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
         expression,
         [valueType, mapValueType],
       );
diff --git a/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart b/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart
index cf0a8ae6..26dae7d 100644
--- a/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart
+++ b/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart
@@ -32,8 +32,8 @@
 
   void report(AstNode errorNode, DartType receiverType) {
     var errorCode = receiverType == _typeSystem.typeProvider.nullType
-        ? StaticWarningCode.INVALID_USE_OF_NULL_VALUE
-        : StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE;
+        ? CompileTimeErrorCode.INVALID_USE_OF_NULL_VALUE
+        : CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE;
     _errorReporter.reportErrorForNode(errorCode, errorNode);
   }
 
diff --git a/pkg/analyzer/lib/src/error/required_parameters_verifier.dart b/pkg/analyzer/lib/src/error/required_parameters_verifier.dart
index 9c75de7..6a1c7a2 100644
--- a/pkg/analyzer/lib/src/error/required_parameters_verifier.dart
+++ b/pkg/analyzer/lib/src/error/required_parameters_verifier.dart
@@ -40,6 +40,14 @@
 
   @override
   void visitMethodInvocation(MethodInvocation node) {
+    if (node.methodName.name == FunctionElement.CALL_METHOD_NAME) {
+      var targetType = node.realTarget?.staticType;
+      if (targetType is FunctionType) {
+        _check(targetType.parameters, node.argumentList, node.argumentList);
+        return;
+      }
+    }
+
     _check(
       _executableElement(node.methodName.staticElement)?.parameters,
       node.argumentList,
diff --git a/pkg/analyzer/lib/src/error/return_type_verifier.dart b/pkg/analyzer/lib/src/error/return_type_verifier.dart
index eca4fd0..9d78748 100644
--- a/pkg/analyzer/lib/src/error/return_type_verifier.dart
+++ b/pkg/analyzer/lib/src/error/return_type_verifier.dart
@@ -10,6 +10,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_system.dart';
+import 'package:analyzer/src/error/analyzer_error_code.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/error_verifier.dart';
 import 'package:meta/meta.dart';
@@ -87,30 +88,44 @@
 
     void checkElement(
       ClassElement expectedElement,
-      StaticTypeWarningCode errorCode,
+      AnalyzerErrorCode errorCode,
     ) {
-      if (!_isLegalReturnType(expectedElement)) {
+      void reportError() {
         enclosingExecutable.hasLegalReturnType = false;
         _errorReporter.reportErrorForNode(errorCode, returnType);
       }
+
+      // It is a compile-time error if the declared return type of
+      // a function marked `sync*` or `async*` is `void`.
+      if (enclosingExecutable.isGenerator) {
+        if (enclosingExecutable.returnType.isVoid) {
+          return reportError();
+        }
+      }
+
+      // It is a compile-time error if the declared return type of
+      // a function marked `...` is not a supertype of `...`.
+      if (!_isLegalReturnType(expectedElement)) {
+        return reportError();
+      }
     }
 
     if (enclosingExecutable.isAsynchronous) {
       if (enclosingExecutable.isGenerator) {
         checkElement(
           _typeProvider.streamElement,
-          StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE,
+          CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE,
         );
       } else {
         checkElement(
           _typeProvider.futureElement,
-          StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
+          CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE,
         );
       }
     } else if (enclosingExecutable.isGenerator) {
       checkElement(
         _typeProvider.iterableElement,
-        StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE,
+        CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE,
       );
     }
   }
@@ -142,25 +157,25 @@
     void reportTypeError() {
       if (enclosingExecutable.isClosure) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE,
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE,
           expression,
           [S, T],
         );
       } else if (enclosingExecutable.isConstructor) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR,
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR,
           expression,
           [S, T, enclosingExecutable.displayName],
         );
       } else if (enclosingExecutable.isFunction) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION,
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION,
           expression,
           [S, T, enclosingExecutable.displayName],
         );
       } else if (enclosingExecutable.isMethod) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_METHOD,
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD,
           expression,
           [S, T, enclosingExecutable.displayName],
         );
@@ -243,25 +258,25 @@
     void reportTypeError() {
       if (enclosingExecutable.isClosure) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE,
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE,
           expression,
           [S, T],
         );
       } else if (enclosingExecutable.isConstructor) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR,
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR,
           expression,
           [S, T, enclosingExecutable.displayName],
         );
       } else if (enclosingExecutable.isFunction) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION,
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION,
           expression,
           [S, T, enclosingExecutable.displayName],
         );
       } else if (enclosingExecutable.isMethod) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_METHOD,
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD,
           expression,
           [S, T, enclosingExecutable.displayName],
         );
@@ -351,7 +366,7 @@
     }
 
     _errorReporter.reportErrorForToken(
-      StaticWarningCode.RETURN_WITHOUT_VALUE,
+      CompileTimeErrorCode.RETURN_WITHOUT_VALUE,
       statement.returnKeyword,
     );
   }
diff --git a/pkg/analyzer/lib/src/error/type_arguments_verifier.dart b/pkg/analyzer/lib/src/error/type_arguments_verifier.dart
index ed3f577..ecf7baa 100644
--- a/pkg/analyzer/lib/src/error/type_arguments_verifier.dart
+++ b/pkg/analyzer/lib/src/error/type_arguments_verifier.dart
@@ -7,10 +7,8 @@
 import 'package:analyzer/dart/ast/ast.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/error/error.dart';
 import 'package:analyzer/error/listener.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_system.dart';
@@ -29,8 +27,6 @@
     this._errorReporter,
   );
 
-  TypeProvider get _typeProvider => _libraryElement.typeProvider;
-
   TypeSystemImpl get _typeSystem => _libraryElement.typeSystem;
 
   void checkFunctionExpressionInvocation(FunctionExpressionInvocation node) {
@@ -48,7 +44,7 @@
         );
       }
       _checkTypeArgumentCount(typeArguments, 1,
-          StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS);
+          CompileTimeErrorCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS);
     }
     _checkForImplicitDynamicTypedLiteral(node);
   }
@@ -63,7 +59,7 @@
         );
       }
       _checkTypeArgumentCount(typeArguments, 2,
-          StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS);
+          CompileTimeErrorCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS);
     }
     _checkForImplicitDynamicTypedLiteral(node);
   }
@@ -83,7 +79,7 @@
         );
       }
       _checkTypeArgumentCount(typeArguments, 1,
-          StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS);
+          CompileTimeErrorCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS);
     }
     _checkForImplicitDynamicTypedLiteral(node);
   }
@@ -237,8 +233,7 @@
 
         if (!_typeSystem.isSubtypeOf2(argType, boundType)) {
           if (_shouldAllowSuperBoundedTypes(typeName)) {
-            var replacedType =
-                (argType as TypeImpl).replaceTopAndBottom(_typeProvider);
+            var replacedType = _typeSystem.replaceTopAndBottom(argType);
             if (!identical(replacedType, argType) &&
                 _typeSystem.isSubtypeOf2(replacedType, boundType)) {
               // Bound is satisfied under super-bounded rules, so we're ok.
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 a713c1e..fd25c70 100644
--- a/pkg/analyzer/lib/src/error/unused_local_elements_verifier.dart
+++ b/pkg/analyzer/lib/src/error/unused_local_elements_verifier.dart
@@ -107,6 +107,18 @@
   }
 
   @override
+  void visitMethodInvocation(MethodInvocation node) {
+    var function = node.methodName.staticElement;
+    if (function is FunctionElement || function is MethodElement) {
+      for (var argument in node.argumentList.arguments) {
+        var parameter = argument.staticParameterElement;
+        usedElements.elements.add(parameter);
+      }
+    }
+    super.visitMethodInvocation(node);
+  }
+
+  @override
   void visitPostfixExpression(PostfixExpression node) {
     var element = node.staticElement;
     usedElements.members.add(element);
@@ -135,16 +147,39 @@
     }
     bool isIdentifierRead = _isReadIdentifier(node);
     if (element is PropertyAccessorElement &&
-        element.isSynthetic &&
         isIdentifierRead &&
         element.variable is TopLevelVariableElement) {
-      usedElements.addElement(element.variable);
+      if (element.isSynthetic) {
+        usedElements.addElement(element.variable);
+      } else {
+        usedElements.members.add(element);
+        _addMemberAndCorrespondingGetter(element);
+      }
     } else if (element is LocalVariableElement) {
       if (isIdentifierRead) {
         usedElements.addElement(element);
       }
     } else {
       _useIdentifierElement(node);
+      var parent = node.parent;
+      // If [node] is a method tear-off, assume all parameters are used.
+      var functionReferenceIsCall =
+          (element is ExecutableElement && parent is MethodInvocation) ||
+              // named constructor
+              (element is ConstructorElement &&
+                  parent is ConstructorName &&
+                  parent.parent is InstanceCreationExpression) ||
+              // unnamed constructor
+              (element is ClassElement &&
+                  parent.parent is ConstructorName &&
+                  parent.parent.parent is InstanceCreationExpression);
+      if (element is ExecutableElement &&
+          isIdentifierRead &&
+          !functionReferenceIsCall) {
+        for (var parameter in element.parameters) {
+          usedElements.addElement(parameter);
+        }
+      }
       var enclosingElement = element?.enclosingElement;
       if (element == null) {
         if (isIdentifierRead) {
@@ -163,17 +198,23 @@
           !identical(element, _enclosingExec)) {
         usedElements.members.add(element);
         if (isIdentifierRead) {
-          // Store the corresponding getter.
-          if (element is PropertyAccessorElement && element.isSetter) {
-            element = (element as PropertyAccessorElement).correspondingGetter;
-          }
-          usedElements.members.add(element);
-          usedElements.readMembers.add(element);
+          _addMemberAndCorrespondingGetter(element);
         }
       }
     }
   }
 
+  /// Add [element] as a used member and, if [element] is a setter, add its
+  /// corresponding getter as a used member.
+  void _addMemberAndCorrespondingGetter(Element element) {
+    if (element is PropertyAccessorElement && element.isSetter) {
+      usedElements.members.add(element.correspondingGetter);
+      usedElements.readMembers.add(element.correspondingGetter);
+    } else {
+      usedElements.readMembers.add(element);
+    }
+  }
+
   /// Marks an [Element] of [node] as used in the library.
   void _useIdentifierElement(Identifier node) {
     Element element = node.staticElement;
@@ -269,6 +310,17 @@
       : _libraryUri = library.source.uri;
 
   @override
+  void visitFormalParameterList(FormalParameterList node) {
+    for (var element in node.parameterElements) {
+      if (!_isUsedElement(element)) {
+        _reportErrorForElement(
+            HintCode.UNUSED_ELEMENT_PARAMETER, element, [element.displayName]);
+      }
+    }
+    super.visitFormalParameterList(node);
+  }
+
+  @override
   void visitSimpleIdentifier(SimpleIdentifier node) {
     if (node.inDeclarationContext()) {
       var element = node.staticElement;
@@ -314,6 +366,24 @@
       (element is ClassElement || element is ExtensionElement) &&
       element.isPrivate;
 
+  /// Returns whether [element] is accessible outside of the library in which
+  /// it is declared.
+  bool _isPubliclyAccessible(ExecutableElement element) {
+    if (element.isPrivate) {
+      return false;
+    }
+    var enclosingElement = element.enclosingElement;
+    if (enclosingElement is ClassElement &&
+        enclosingElement.isPrivate &&
+        (element.isStatic || element is ConstructorElement)) {
+      return false;
+    } else if (enclosingElement is ExtensionElement &&
+        enclosingElement.isPrivate) {
+      return false;
+    }
+    return true;
+  }
+
   /// Returns whether [element] is a private element which is read somewhere in
   /// the library.
   bool _isReadMember(Element element) {
@@ -352,6 +422,24 @@
     if (element is LocalVariableElement ||
         element is FunctionElement && !element.isStatic) {
       // local variable or function
+    } else if (element is ParameterElement) {
+      var enclosingElement = element.enclosingElement;
+      // Only report unused parameters of methods or functions.
+      if (enclosingElement is! ConstructorElement &&
+          enclosingElement is! FunctionElement &&
+          enclosingElement is! MethodElement) {
+        return true;
+      }
+
+      if (!element.isOptional) {
+        return true;
+      }
+      if (_isPubliclyAccessible(enclosingElement)) {
+        return true;
+      }
+      if (_overridesUsedParameter(element, enclosingElement)) {
+        return true;
+      }
     } else {
       if (element.isPublic) {
         return true;
@@ -361,20 +449,8 @@
   }
 
   bool _isUsedMember(ExecutableElement element) {
-    var enclosingElement = element.enclosingElement;
-    if (element.isPublic) {
-      if (enclosingElement is ClassElement &&
-          enclosingElement.isPrivate &&
-          element.isStatic) {
-        // Public static members of private classes are inaccessible from
-        // outside the library in which they are declared.
-      } else if (enclosingElement is ExtensionElement &&
-          enclosingElement.isPrivate) {
-        // Public members of private extensions are inaccessible from outside
-        // the library in which they are declared.
-      } else {
-        return true;
-      }
+    if (_isPubliclyAccessible(element)) {
+      return true;
     }
     if (element.isSynthetic) {
       return true;
@@ -389,19 +465,64 @@
     return _overridesUsedElement(element);
   }
 
-  // Check if this is a class member which overrides a super class's class
-  // member which is used.
-  bool _overridesUsedElement(Element element) {
+  Iterable<ExecutableElement> _overriddenElements(Element element) {
     Element enclosingElement = element.enclosingElement;
     if (enclosingElement is ClassElement) {
       Name name = Name(_libraryUri, element.name);
-      Iterable<ExecutableElement> overriddenElements = _inheritanceManager
-          .getOverridden2(enclosingElement, name)
-          ?.map((ExecutableElement e) =>
-              (e is ExecutableMember) ? e.declaration : e);
-      if (overriddenElements != null) {
-        return overriddenElements.any((ExecutableElement e) =>
-            _usedElements.members.contains(e) || _overridesUsedElement(e));
+      var overridden =
+          _inheritanceManager.getOverridden2(enclosingElement, name);
+      if (overridden == null) {
+        return [];
+      }
+      return overridden.map((e) => (e is ExecutableMember) ? e.declaration : e);
+    } else {
+      return [];
+    }
+  }
+
+  /// Check if [element] is a class member which overrides a super class's class
+  /// member which is used.
+  bool _overridesUsedElement(Element element) {
+    return _overriddenElements(element).any((ExecutableElement e) =>
+        _usedElements.members.contains(e) || _overridesUsedElement(e));
+  }
+
+  /// Check if [element] is a parameter of a method which overrides a super
+  /// class's method in which the corresponding parameter is used.
+  bool _overridesUsedParameter(
+      ParameterElement element, ExecutableElement enclosingElement) {
+    var overriddenElements = _overriddenElements(enclosingElement);
+    for (var overridden in overriddenElements) {
+      ParameterElement correspondingParameter;
+      if (element.isNamed) {
+        correspondingParameter = overridden.parameters
+            .firstWhere((p) => p.name == element.name, orElse: () => null);
+      } else {
+        var parameterIndex = 0;
+        var parameterCount = enclosingElement.parameters.length;
+        while (parameterIndex < parameterCount) {
+          if (enclosingElement.parameters[parameterIndex] == element) {
+            break;
+          }
+          parameterIndex++;
+        }
+        if (overridden.parameters.length <= parameterIndex) {
+          // Something is wrong with the overridden element. Ignore it.
+          continue;
+        }
+        correspondingParameter = overridden.parameters[parameterIndex];
+      }
+      // The parameter was added in the override.
+      if (correspondingParameter == null) {
+        continue;
+      }
+      // The parameter was made optional in the override.
+      if (correspondingParameter.isRequiredNamed ||
+          correspondingParameter.isRequiredPositional) {
+        return true;
+      }
+      if (_usedElements.elements.contains(correspondingParameter)) {
+        return true;
       }
     }
     return false;
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index ceda591..42141c5 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -7,6 +7,7 @@
         LocatedMessage,
         Message,
         MessageCode,
+        messageAbstractClassMember,
         messageConstConstructorWithBody,
         messageConstructorWithTypeParameters,
         messageDirectiveAfterDeclaration,
@@ -20,8 +21,8 @@
         messageInvalidThisInInitializer,
         messageMissingAssignableSelector,
         messageNativeClauseShouldBeAnnotation,
-        messageTypedefNotFunction,
         messageOperatorWithTypeParameters,
+        messageTypedefNotFunction,
         templateDuplicateLabelInSwitchStatement,
         templateExpectedButGot,
         templateExpectedIdentifier,
@@ -132,14 +133,14 @@
   AstBuilder(ErrorReporter errorReporter, this.fileUri, this.isFullAst,
       this._featureSet,
       [Uri uri])
-      : this.errorReporter = FastaErrorReporter(errorReporter),
-        this.enableNonNullable = _featureSet.isEnabled(Feature.non_nullable),
-        this.enableSpreadCollections =
+      : errorReporter = FastaErrorReporter(errorReporter),
+        enableNonNullable = _featureSet.isEnabled(Feature.non_nullable),
+        enableSpreadCollections =
             _featureSet.isEnabled(Feature.spread_collections),
-        this.enableControlFlowCollections =
+        enableControlFlowCollections =
             _featureSet.isEnabled(Feature.control_flow_collections),
-        this.enableTripleShift = _featureSet.isEnabled(Feature.triple_shift),
-        this.enableVariance = _featureSet.isEnabled(Feature.variance),
+        enableTripleShift = _featureSet.isEnabled(Feature.triple_shift),
+        enableVariance = _featureSet.isEnabled(Feature.variance),
         uri = uri ?? fileUri;
 
   NodeList<ClassMember> get currentDeclarationMembers {
@@ -836,6 +837,7 @@
 
   @override
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -847,6 +849,10 @@
     assert(optional(';', semicolon));
     debugEvent("Fields");
 
+    if (!enableNonNullable && abstractToken != null) {
+      handleRecoverableError(
+          messageAbstractClassMember, abstractToken, abstractToken);
+    }
     if (externalToken != null) {
       handleRecoverableError(
           messageExternalField, externalToken, externalToken);
@@ -866,6 +872,7 @@
     currentDeclarationMembers.add(ast.fieldDeclaration2(
         comment: comment,
         metadata: metadata,
+        abstractKeyword: abstractToken,
         covariantKeyword: covariantKeyword,
         staticKeyword: staticToken,
         fieldList: variableList,
@@ -1204,6 +1211,7 @@
 
   @override
   void endExtensionFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -1218,8 +1226,8 @@
       // an error at this point, but we include them in order to get navigation,
       // search, etc.
     }
-    endClassFields(externalToken, staticToken, covariantToken, lateToken,
-        varFinalOrConst, count, beginToken, endToken);
+    endClassFields(abstractToken, externalToken, staticToken, covariantToken,
+        lateToken, varFinalOrConst, count, beginToken, endToken);
   }
 
   @override
@@ -1842,6 +1850,7 @@
 
   @override
   void endMixinFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -1850,8 +1859,8 @@
       int count,
       Token beginToken,
       Token endToken) {
-    endClassFields(externalToken, staticToken, covariantToken, lateToken,
-        varFinalOrConst, count, beginToken, endToken);
+    endClassFields(abstractToken, externalToken, staticToken, covariantToken,
+        lateToken, varFinalOrConst, count, beginToken, endToken);
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/fasta/error_converter.dart b/pkg/analyzer/lib/src/fasta/error_converter.dart
index 7a75120..2fd3549 100644
--- a/pkg/analyzer/lib/src/fasta/error_converter.dart
+++ b/pkg/analyzer/lib/src/fasta/error_converter.dart
@@ -47,7 +47,7 @@
         return;
       case "CONCRETE_CLASS_WITH_ABSTRACT_MEMBER":
         errorReporter?.reportErrorForOffset(
-            StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
+            CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
             offset,
             length);
         return;
@@ -104,12 +104,12 @@
       case "FINAL_NOT_INITIALIZED":
         String name = arguments['name'];
         errorReporter?.reportErrorForOffset(
-            StaticWarningCode.FINAL_NOT_INITIALIZED, offset, length, [name]);
+            CompileTimeErrorCode.FINAL_NOT_INITIALIZED, offset, length, [name]);
         return;
       case "FINAL_NOT_INITIALIZED_CONSTRUCTOR_1":
         String name = arguments['name'];
         errorReporter?.reportErrorForOffset(
-            StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
+            CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
             offset,
             length,
             [name]);
@@ -130,7 +130,7 @@
         var type1 = arguments['type'];
         var type2 = arguments['type2'];
         errorReporter?.reportErrorForOffset(
-            StaticTypeWarningCode.INVALID_ASSIGNMENT,
+            CompileTimeErrorCode.INVALID_ASSIGNMENT,
             offset,
             length,
             [type1, type2]);
@@ -149,27 +149,31 @@
         return;
       case "INVALID_CAST_FUNCTION":
         errorReporter?.reportErrorForOffset(
-            StrongModeCode.INVALID_CAST_FUNCTION, offset, length);
+            CompileTimeErrorCode.INVALID_CAST_FUNCTION, offset, length);
         return;
       case "INVALID_CAST_FUNCTION_EXPR":
         errorReporter?.reportErrorForOffset(
-            StrongModeCode.INVALID_CAST_FUNCTION_EXPR, offset, length);
+            CompileTimeErrorCode.INVALID_CAST_FUNCTION_EXPR, offset, length);
         return;
       case "INVALID_CAST_LITERAL_LIST":
         errorReporter?.reportErrorForOffset(
-            StrongModeCode.INVALID_CAST_LITERAL_LIST, offset, length);
+            CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST, offset, length);
         return;
       case "INVALID_CAST_LITERAL_MAP":
         errorReporter?.reportErrorForOffset(
-            StrongModeCode.INVALID_CAST_LITERAL_MAP, offset, length);
+            CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP, offset, length);
+        return;
+      case "INVALID_CAST_LITERAL_SET":
+        errorReporter?.reportErrorForOffset(
+            CompileTimeErrorCode.INVALID_CAST_LITERAL_SET, offset, length);
         return;
       case "INVALID_CAST_METHOD":
         errorReporter?.reportErrorForOffset(
-            StrongModeCode.INVALID_CAST_METHOD, offset, length);
+            CompileTimeErrorCode.INVALID_CAST_METHOD, offset, length);
         return;
       case "INVALID_CAST_NEW_EXPR":
         errorReporter?.reportErrorForOffset(
-            StrongModeCode.INVALID_CAST_NEW_EXPR, offset, length);
+            CompileTimeErrorCode.INVALID_CAST_NEW_EXPR, offset, length);
         return;
       case "INVALID_CODE_POINT":
         errorReporter?.reportErrorForOffset(
@@ -193,7 +197,7 @@
         return;
       case "INVALID_SUPER_INVOCATION":
         errorReporter?.reportErrorForOffset(
-            StrongModeCode.INVALID_SUPER_INVOCATION, offset, length);
+            CompileTimeErrorCode.INVALID_SUPER_INVOCATION, offset, length);
         return;
       case "MISSING_DIGIT":
         errorReporter?.reportErrorForOffset(
@@ -284,15 +288,15 @@
         return;
       case "UNDEFINED_GETTER":
         errorReporter?.reportErrorForOffset(
-            StaticTypeWarningCode.UNDEFINED_GETTER, offset, length);
+            CompileTimeErrorCode.UNDEFINED_GETTER, offset, length);
         return;
       case "UNDEFINED_METHOD":
         errorReporter?.reportErrorForOffset(
-            StaticTypeWarningCode.UNDEFINED_METHOD, offset, length);
+            CompileTimeErrorCode.UNDEFINED_METHOD, offset, length);
         return;
       case "UNDEFINED_SETTER":
         errorReporter?.reportErrorForOffset(
-            StaticTypeWarningCode.UNDEFINED_SETTER, offset, length);
+            CompileTimeErrorCode.UNDEFINED_SETTER, offset, length);
         return;
       case "UNEXPECTED_DOLLAR_IN_STRING":
         errorReporter?.reportErrorForOffset(
@@ -318,7 +322,7 @@
         return;
       case "WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR":
         errorReporter?.reportErrorMessage(
-            StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
+            CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
             offset,
             length,
             message);
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index f4ecf94..ac374e1 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -167,7 +167,7 @@
       if (element == null) {
         // TODO(brianwilkerson) Report this error?
         //        resolver.reportError(
-        //            StaticWarningCode.UNDEFINED_IDENTIFIER,
+        //            CompileTimeErrorCode.UNDEFINED_IDENTIFIER,
         //            simpleIdentifier,
         //            simpleIdentifier.getName());
       } else {
@@ -193,12 +193,12 @@
       SimpleIdentifier name = identifier.identifier;
       Element element = _resolveSimpleIdentifier(prefix);
       if (element == null) {
-//        resolver.reportError(StaticWarningCode.UNDEFINED_IDENTIFIER, prefix, prefix.getName());
+//        resolver.reportError(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, prefix, prefix.getName());
       } else {
         prefix.staticElement = element;
         if (element is PrefixElement) {
           // TODO(brianwilkerson) Report this error?
-          element = _resolver.nameScope.lookup(identifier, _definingLibrary);
+          element = _resolver.nameScope.lookupIdentifier(identifier);
           name.staticElement = element;
           return;
         }
@@ -293,7 +293,7 @@
 //        if (((InstanceCreationExpression) parent).isConst()) {
 //          // CompileTimeErrorCode.CONST_WITH_NON_TYPE
 //        } else {
-//          // StaticWarningCode.NEW_WITH_NON_TYPE
+//          // CompileTimeErrorCode.NEW_WITH_NON_TYPE
 //        }
 //      } else {
 //        // This is part of a redirecting factory constructor; not sure which error code to use
@@ -500,13 +500,13 @@
     //
     Element prefixElement = prefix.staticElement;
     if (prefixElement is PrefixElement) {
-      Element element = _resolver.nameScope.lookup(node, _definingLibrary);
+      Element element = _resolver.nameScope.lookupIdentifier(node);
       if (element == null && identifier.inSetterContext()) {
         Identifier setterName = PrefixedIdentifierImpl.temp(
             node.prefix,
             SimpleIdentifierImpl(StringToken(TokenType.STRING,
                 "${node.identifier.name}=", node.identifier.offset - 1)));
-        element = _resolver.nameScope.lookup(setterName, _definingLibrary);
+        element = _resolver.nameScope.lookupIdentifier(setterName);
       }
       element = _resolver.toLegacyElement(element);
       if (element == null && _resolver.nameScope.shouldIgnoreUndefined(node)) {
@@ -521,7 +521,7 @@
               [identifier.name]);
         } else {
           _errorReporter.reportErrorForNode(
-              StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME,
+              CompileTimeErrorCode.UNDEFINED_PREFIXED_NAME,
               identifier,
               [identifier.name, prefixElement.name]);
         }
@@ -721,12 +721,12 @@
             [element.name]);
       } else if (node.name == "await" && _resolver.enclosingFunction != null) {
         _errorReporter.reportErrorForNode(
-          StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT,
+          CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT,
           node,
         );
       } else if (!_resolver.nameScope.shouldIgnoreUndefined(node)) {
         _errorReporter.reportErrorForNode(
-          StaticWarningCode.UNDEFINED_IDENTIFIER,
+          CompileTimeErrorCode.UNDEFINED_IDENTIFIER,
           node,
           [node.name],
         );
@@ -787,7 +787,10 @@
       }
       return;
     } else {
-      if (element.isFactory) {
+      if (element.isFactory &&
+          // Check if we've reported [NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS].
+          !element.enclosingElement.constructors
+              .every((constructor) => constructor.isFactory)) {
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, node, [element]);
       }
@@ -844,14 +847,14 @@
     if (element.isStatic) return;
 
     _errorReporter.reportErrorForNode(
-      StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
+      CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
       identifier,
       [identifier.name],
     );
   }
 
   /// Check that the given index [expression] was resolved, otherwise a
-  /// [StaticTypeWarningCode.UNDEFINED_OPERATOR] is generated. The [target] is
+  /// [CompileTimeErrorCode.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(
@@ -886,14 +889,14 @@
       );
     } else if (target is SuperExpression) {
       _errorReporter.reportErrorForOffset(
-        StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
+        CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR,
         offset,
         length,
         [methodName, staticType],
       );
     } else if (staticType.isVoid) {
       _errorReporter.reportErrorForOffset(
-        StaticWarningCode.USE_OF_VOID_RESULT,
+        CompileTimeErrorCode.USE_OF_VOID_RESULT,
         offset,
         length,
       );
@@ -904,7 +907,7 @@
       );
     } else {
       _errorReporter.reportErrorForOffset(
-        StaticTypeWarningCode.UNDEFINED_OPERATOR,
+        CompileTimeErrorCode.UNDEFINED_OPERATOR,
         offset,
         length,
         [methodName, staticType],
@@ -1320,8 +1323,8 @@
           _checkForStaticAccessToInstanceMember(propertyName, element);
         } else {
           var code = typeReference.isEnum
-              ? StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT
-              : StaticTypeWarningCode.UNDEFINED_GETTER;
+              ? CompileTimeErrorCode.UNDEFINED_ENUM_CONSTANT
+              : CompileTimeErrorCode.UNDEFINED_GETTER;
           _errorReporter.reportErrorForNode(
             code,
             propertyName,
@@ -1334,8 +1337,15 @@
         ExecutableElement element;
 
         var setter = typeReference.getSetter(propertyName.name);
-        if (setter != null && setter.isAccessibleIn(_definingLibrary)) {
+        if (setter != null) {
           element = setter;
+          if (!setter.isAccessibleIn(_definingLibrary)) {
+            _errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.PRIVATE_SETTER,
+              propertyName,
+              [propertyName.name, typeReference.name],
+            );
+          }
         }
 
         if (element != null) {
@@ -1349,7 +1359,7 @@
             // The error will be reported in ErrorVerifier.
           } else {
             _errorReporter.reportErrorForNode(
-              StaticTypeWarningCode.UNDEFINED_SETTER,
+              CompileTimeErrorCode.UNDEFINED_SETTER,
               propertyName,
               [propertyName.name, typeReference.name],
             );
@@ -1385,7 +1395,7 @@
               );
             } else {
               _errorReporter.reportErrorForNode(
-                StaticTypeWarningCode.UNDEFINED_SUPER_GETTER,
+                CompileTimeErrorCode.UNDEFINED_SUPER_GETTER,
                 propertyName,
                 [propertyName.name, staticType],
               );
@@ -1426,7 +1436,7 @@
               }
             } else {
               _errorReporter.reportErrorForNode(
-                StaticTypeWarningCode.UNDEFINED_SUPER_SETTER,
+                CompileTimeErrorCode.UNDEFINED_SUPER_SETTER,
                 propertyName,
                 [propertyName.name, staticType],
               );
@@ -1448,7 +1458,7 @@
 
     if (staticType.isVoid) {
       _errorReporter.reportErrorForNode(
-        StaticWarningCode.USE_OF_VOID_RESULT,
+        CompileTimeErrorCode.USE_OF_VOID_RESULT,
         propertyName,
       );
       return;
@@ -1487,7 +1497,7 @@
       }
       if (shouldReportUndefinedGetter) {
         _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.UNDEFINED_GETTER,
+          CompileTimeErrorCode.UNDEFINED_GETTER,
           propertyName,
           [propertyName.name, staticType],
         );
@@ -1510,7 +1520,7 @@
           // OK
         } else {
           _errorReporter.reportErrorForNode(
-            StaticTypeWarningCode.UNDEFINED_SETTER,
+            CompileTimeErrorCode.UNDEFINED_SETTER,
             propertyName,
             [propertyName.name, staticType],
           );
@@ -1523,39 +1533,38 @@
   /// 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);
+    var lookupResult = _resolver.nameScope.lookup2(identifier.name);
+
+    Element element = lookupResult.getter;
     element = _resolver.toLegacyElement(element);
+
     if (element is PropertyAccessorElement && identifier.inSetterContext()) {
-      PropertyInducingElement variable =
-          (element as PropertyAccessorElement).variable;
-      if (variable != null) {
-        PropertyAccessorElement setter = variable.setter;
-        if (setter == null) {
-          //
-          // Check to see whether there might be a locally defined getter and
-          // an inherited setter.
-          //
-          ClassElement enclosingClass = _resolver.enclosingClass;
-          if (enclosingClass != null) {
-            var result = _typePropertyResolver.resolve(
-              receiver: null,
-              receiverType: enclosingClass.thisType,
-              name: identifier.name,
-              receiverErrorNode: identifier,
-              nameErrorNode: identifier,
-            );
-            setter = result.setter;
-          }
+      PropertyAccessorElement setter = lookupResult.setter;
+      if (setter == null) {
+        //
+        // Check to see whether there might be a locally defined getter and
+        // an inherited setter.
+        //
+        ClassElement enclosingClass = _resolver.enclosingClass;
+        if (enclosingClass != null) {
+          var result = _typePropertyResolver.resolve(
+            receiver: null,
+            receiverType: enclosingClass.thisType,
+            name: identifier.name,
+            receiverErrorNode: identifier,
+            nameErrorNode: identifier,
+          );
+          setter = result.setter;
         }
-        if (setter != null) {
-          element = setter;
-        }
+      }
+      if (setter != null) {
+        setter = _resolver.toLegacyElement(setter);
+        element = setter;
       }
     } else if (element == null &&
         (identifier.inSetterContext() ||
             identifier.parent is CommentReference)) {
-      Identifier setterId = SyntheticIdentifier('${identifier.name}=');
-      element = _resolver.nameScope.lookup(setterId, _definingLibrary);
+      element = lookupResult.setter;
       element = _resolver.toLegacyElement(element);
     }
     if (element == null) {
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index d25b96d..387f3d4 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -754,7 +754,7 @@
       buffer.addString(linterVersion ?? '');
       buffer.addInt(lintRules.length);
       for (Linter lintRule in lintRules) {
-        buffer.addString(lintRule.lintCode.uniqueName);
+        buffer.addString(lintRule.name);
       }
 
       // Append plugin names.
@@ -860,19 +860,6 @@
     enableLazyAssignmentOperators = options.enableLazyAssignmentOperators;
   }
 
-  /// Return whether the given lists of lints are equal.
-  static bool compareLints(List<Linter> a, List<Linter> b) {
-    if (a.length != b.length) {
-      return false;
-    }
-    for (int i = 0; i < a.length; i++) {
-      if (a[i].lintCode != b[i].lintCode) {
-        return false;
-      }
-    }
-    return true;
-  }
-
   /// Predicate used for [analyzeFunctionBodiesPredicate] when
   /// [analyzeFunctionBodies] is set to `true`.
   @deprecated
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index e2567c4..4eb6d7d 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -40,6 +40,7 @@
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/sdk.dart' show DartSdk, SdkLibrary;
 import 'package:analyzer/src/task/strong/checker.dart';
+import 'package:meta/meta.dart';
 
 class EnclosingExecutableContext {
   final ExecutableElement element;
@@ -48,7 +49,7 @@
   final bool isFactoryConstructor;
   final bool isGenerativeConstructor;
   final bool isGenerator;
-  final bool isStaticMethod;
+  final bool inStaticMethod;
 
   /// The return statements that have a value.
   final List<ReturnStatement> _returnsWith = [];
@@ -68,7 +69,7 @@
         isGenerativeConstructor =
             element is ConstructorElement && !element.isFactory,
         isGenerator = element != null && element.isGenerator,
-        isStaticMethod = _isStaticMethod(element);
+        inStaticMethod = _inStaticMethod(element);
 
   EnclosingExecutableContext.empty() : this(null);
 
@@ -104,11 +105,14 @@
 
   DartType get returnType => element.returnType;
 
-  static bool _isStaticMethod(ExecutableElement element) {
+  static bool _inStaticMethod(ExecutableElement element) {
     var enclosing = element?.enclosingElement;
     if (enclosing is ClassElement || enclosing is ExtensionElement) {
       return element.isStatic;
     }
+    if (enclosing is ExecutableElement) {
+      return _inStaticMethod(enclosing);
+    }
     return false;
   }
 }
@@ -195,16 +199,6 @@
   EnclosingExecutableContext _enclosingExecutable =
       EnclosingExecutableContext.empty();
 
-  /// A table mapping name of the library to the export directive which export
-  /// this library.
-  final Map<String, LibraryElement> _nameToExportElement =
-      HashMap<String, LibraryElement>();
-
-  /// A table mapping name of the library to the import directive which import
-  /// this library.
-  final Map<String, LibraryElement> _nameToImportElement =
-      HashMap<String, LibraryElement>();
-
   /// A table mapping names to the exported elements.
   final Map<String, Element> _exportedElements = HashMap<String, Element>();
 
@@ -236,8 +230,8 @@
         _requiredParametersVerifier = RequiredParametersVerifier(errorReporter),
         _duplicateDefinitionVerifier =
             DuplicateDefinitionVerifier(_currentLibrary, errorReporter) {
-    this._isInSystemLibrary = _currentLibrary.source.isInSystemLibrary;
-    this._hasExtUri = _currentLibrary.hasExtUri;
+    _isInSystemLibrary = _currentLibrary.source.isInSystemLibrary;
+    _hasExtUri = _currentLibrary.hasExtUri;
     _isInCatchClause = false;
     _isInStaticVariableDeclaration = false;
     _isInConstructorInitializer = false;
@@ -365,13 +359,10 @@
 
   @override
   void visitBlock(Block node) {
-    _hiddenElements = HiddenElements(_hiddenElements, node);
-    try {
+    _withHiddenElements(node.statements, () {
       _duplicateDefinitionVerifier.checkStatements(node.statements);
       super.visitBlock(node);
-    } finally {
-      _hiddenElements = _hiddenElements.outerElements;
-    }
+    });
   }
 
   @override
@@ -410,7 +401,6 @@
       _duplicateDefinitionVerifier.checkClass(node);
       _checkForBuiltInIdentifierAsName(
           node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME);
-      _checkForNoDefaultSuperConstructorImplicit(node);
       _checkForConflictingClassTypeVariableErrorCodes();
       TypeName superclass = node.extendsClause?.superclass;
       ImplementsClause implementsClause = node.implementsClause;
@@ -501,6 +491,8 @@
       _checkForInvalidField(node, fieldName, staticElement);
       if (staticElement is FieldElement) {
         _checkForFieldInitializerNotAssignable(node, staticElement);
+        _checkForAbstractFieldConstructorInitializer(
+            node.fieldName, staticElement);
       }
       super.visitConstructorFieldInitializer(node);
     } finally {
@@ -546,7 +538,6 @@
     if (exportElement != null) {
       LibraryElement exportedLibrary = exportElement.exportedLibrary;
       _checkForAmbiguousExport(node, exportElement, exportedLibrary);
-      _checkForExportDuplicateLibraryName(node, exportElement, exportedLibrary);
       _checkForExportInternalLibrary(node, exportElement);
       _checkForExportLegacySymbol(node);
     }
@@ -610,6 +601,14 @@
     _checkForPrivateOptionalParameter(node);
     _checkForFieldInitializingFormalRedirectingConstructor(node);
     _checkForTypeAnnotationDeferredClass(node.type);
+    ParameterElement element = node.declaredElement;
+    if (element is FieldFormalParameterElement) {
+      FieldElement fieldElement = element.field;
+      if (fieldElement != null) {
+        _checkForAbstractFieldConstructorInitializer(
+            node.identifier, fieldElement);
+      }
+    }
     super.visitFieldFormalParameter(node);
   }
 
@@ -721,7 +720,7 @@
         node.staticElement == null &&
         !_isFunctionType(expressionType)) {
       _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION,
+          CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION,
           functionExpression);
     } else if (expressionType is FunctionType) {
       _typeArgumentsVerifier.checkFunctionExpressionInvocation(node);
@@ -787,7 +786,6 @@
           node.prefix, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME);
     }
     if (importElement != null) {
-      _checkForImportDuplicateLibraryName(node, importElement);
       _checkForImportInternalLibrary(node, importElement);
       if (importElement.isDeferred) {
         _checkForDeferredImportOfExtensions(node, importElement);
@@ -798,7 +796,22 @@
 
   @override
   void visitIndexExpression(IndexExpression node) {
-    _checkForArgumentTypeNotAssignableForArgument(node.index);
+    void checkIndexExpression(MethodElement method) {
+      if (method != null) {
+        var parameters = method.parameters;
+        if (parameters.isNotEmpty) {
+          _checkForArgumentTypeNotAssignableForArgument2(
+            argument: node.index,
+            parameter: parameters[0],
+            promoteParameterToNullable: false,
+          );
+        }
+      }
+    }
+
+    checkIndexExpression(node.staticElement);
+    checkIndexExpression(node.auxiliaryElements?.staticElement);
+
     if (node.isNullAware) {
       var target = node.realTarget;
       if (_isExpressionWithType(target)) {
@@ -1104,14 +1117,18 @@
 
   @override
   void visitSwitchCase(SwitchCase node) {
-    _duplicateDefinitionVerifier.checkStatements(node.statements);
-    super.visitSwitchCase(node);
+    _withHiddenElements(node.statements, () {
+      _duplicateDefinitionVerifier.checkStatements(node.statements);
+      super.visitSwitchCase(node);
+    });
   }
 
   @override
   void visitSwitchDefault(SwitchDefault node) {
-    _duplicateDefinitionVerifier.checkStatements(node.statements);
-    super.visitSwitchDefault(node);
+    _withHiddenElements(node.statements, () {
+      _duplicateDefinitionVerifier.checkStatements(node.statements);
+      super.visitSwitchDefault(node);
+    });
   }
 
   @override
@@ -1183,6 +1200,7 @@
     // do checks
     _checkForInvalidAssignment(nameNode, initializerNode);
     _checkForImplicitDynamicIdentifier(node, nameNode);
+    _checkForAbstractFieldInitializer(node);
     // visit name
     nameNode.accept(this);
     // visit initializer
@@ -1242,15 +1260,20 @@
     // class.
     if (!_checkForExtendsDisallowedClass(superclass) &&
         !_checkForImplementsClauseErrorCodes(implementsClause) &&
-        !_checkForAllMixinErrorCodes(withClause)) {
+        !_checkForAllMixinErrorCodes(withClause) &&
+        !_checkForNoGenerativeConstructorsInSuperclass(superclass)) {
       _checkForImplicitDynamicType(superclass);
       _checkForExtendsDeferredClass(superclass);
       _checkForRepeatedType(implementsClause?.interfaces,
           CompileTimeErrorCode.IMPLEMENTS_REPEATED);
       _checkImplementsSuperClass(implementsClause);
+      _checkMixinsSuperClass(withClause);
       _checkMixinInference(node, withClause);
       _checkForMixinWithConflictingPrivateMember(withClause, superclass);
       _checkForConflictingGenerics(node);
+      if (node is ClassDeclaration) {
+        _checkForNoDefaultSuperConstructorImplicit(node);
+      }
     }
   }
 
@@ -1271,6 +1294,24 @@
     }
   }
 
+  void _checkForAbstractFieldConstructorInitializer(
+      AstNode node, FieldElement fieldElement) {
+    if (fieldElement.isAbstract) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER, node);
+    }
+  }
+
+  void _checkForAbstractFieldInitializer(VariableDeclaration node) {
+    var declaredElement = node.declaredElement;
+    if (declaredElement is FieldElement &&
+        declaredElement.isAbstract &&
+        node.initializer != null) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.ABSTRACT_FIELD_INITIALIZER, node.name);
+    }
+  }
+
   /// Verify that all classes of the given [withClause] are valid.
   ///
   /// See [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
@@ -1360,14 +1401,14 @@
     if (!_typeSystem.isAssignableTo2(
         redirectedReturnType, constructorReturnType)) {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE,
+          CompileTimeErrorCode.REDIRECT_TO_INVALID_RETURN_TYPE,
           redirectedConstructor,
           [redirectedReturnType, constructorReturnType]);
       return;
     } else if (!_typeSystem.isSubtypeOf2(redirectedType, constructorType)) {
       // Check parameters.
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE,
+          CompileTimeErrorCode.REDIRECT_TO_INVALID_FUNCTION_TYPE,
           redirectedConstructor,
           [redirectedType, constructorType]);
     }
@@ -1419,7 +1460,7 @@
         libraryNames[i] = _getLibraryName(conflictingMembers[i]);
       }
       libraryNames.sort();
-      _errorReporter.reportErrorForNode(StaticWarningCode.AMBIGUOUS_IMPORT,
+      _errorReporter.reportErrorForNode(CompileTimeErrorCode.AMBIGUOUS_IMPORT,
           node, [name, StringUtilities.printListOfQuotedNames(libraryNames)]);
     }
   }
@@ -1453,17 +1494,29 @@
   /// See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
   void _checkForArgumentTypeNotAssignableForArgument(Expression argument,
       {bool promoteParameterToNullable = false}) {
+    // TODO(scheglov) probably cannot happen
     if (argument == null) {
       return;
     }
 
-    ParameterElement staticParameterElement = argument.staticParameterElement;
-    DartType staticParameterType = staticParameterElement?.type;
+    _checkForArgumentTypeNotAssignableForArgument2(
+      argument: argument,
+      parameter: argument.staticParameterElement,
+      promoteParameterToNullable: promoteParameterToNullable,
+    );
+  }
+
+  void _checkForArgumentTypeNotAssignableForArgument2({
+    @required Expression argument,
+    @required ParameterElement parameter,
+    @required bool promoteParameterToNullable,
+  }) {
+    DartType staticParameterType = parameter?.type;
     if (promoteParameterToNullable && staticParameterType != null) {
       staticParameterType = _typeSystem.makeNullable(staticParameterType);
     }
     _checkForArgumentTypeNotAssignableWithExpectedTypes(argument,
-        staticParameterType, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+        staticParameterType, CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
   }
 
   /// Verify that the given [expression] can be assigned to its corresponding
@@ -1516,8 +1569,21 @@
       DartType expectedStaticType,
       ErrorCode errorCode) {
     if (!_typeSystem.isAssignableTo2(actualStaticType, expectedStaticType)) {
+      AstNode getErrorNode(AstNode node) {
+        if (node is CascadeExpression) {
+          return getErrorNode(node.target);
+        }
+        if (node is ParenthesizedExpression) {
+          return getErrorNode(node.expression);
+        }
+        return node;
+      }
+
       _errorReporter.reportErrorForNode(
-          errorCode, expression, [actualStaticType, expectedStaticType]);
+        errorCode,
+        getErrorNode(expression),
+        [actualStaticType, expectedStaticType],
+      );
       return false;
     }
     return true;
@@ -1550,38 +1616,38 @@
     if (element is VariableElement) {
       if (element.isConst) {
         _errorReporter.reportErrorForNode(
-            StaticWarningCode.ASSIGNMENT_TO_CONST, expression);
+            CompileTimeErrorCode.ASSIGNMENT_TO_CONST, expression);
       } else if (element.isFinal && !element.isLate) {
         if (element is FieldElementImpl) {
           if (element.setter == null && element.isSynthetic) {
             _errorReporter.reportErrorForNode(
-                StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER,
+                CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_NO_SETTER,
                 highlightedNode,
                 [element.name, element.enclosingElement.displayName]);
           } else {
             _errorReporter.reportErrorForNode(
-                StaticWarningCode.ASSIGNMENT_TO_FINAL,
+                CompileTimeErrorCode.ASSIGNMENT_TO_FINAL,
                 highlightedNode,
                 [element.name]);
           }
           return;
         }
         _errorReporter.reportErrorForNode(
-            StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL,
+            CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL,
             highlightedNode,
             [element.name]);
       }
     } else if (element is FunctionElement) {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.ASSIGNMENT_TO_FUNCTION, expression);
+          CompileTimeErrorCode.ASSIGNMENT_TO_FUNCTION, expression);
     } else if (element is MethodElement) {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.ASSIGNMENT_TO_METHOD, expression);
+          CompileTimeErrorCode.ASSIGNMENT_TO_METHOD, expression);
     } else if (element is ClassElement ||
         element is FunctionTypeAliasElement ||
         element is TypeParameterElement) {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.ASSIGNMENT_TO_TYPE, expression);
+          CompileTimeErrorCode.ASSIGNMENT_TO_TYPE, expression);
     }
   }
 
@@ -1679,7 +1745,7 @@
     }
 
     _errorReporter.reportErrorForToken(
-        StaticWarningCode.CASE_BLOCK_NOT_TERMINATED, switchCase.keyword);
+        CompileTimeErrorCode.CASE_BLOCK_NOT_TERMINATED, switchCase.keyword);
   }
 
   /// Verify that the switch cases in the given switch [statement] are
@@ -1994,10 +2060,10 @@
             (expression as InstanceCreationExpressionImpl).isImplicit;
         if (!isImplicit) {
           _errorReporter.reportErrorForNode(
-              StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS, typeName);
+              CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, typeName);
         } else {
           _errorReporter.reportErrorForNode(
-              StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS, typeName);
+              CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, typeName);
         }
       }
     }
@@ -2220,7 +2286,7 @@
 
     if (!_typeSystem.isAssignableTo2(iterableType, requiredSequenceType)) {
       _errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE,
+        CompileTimeErrorCode.FOR_IN_OF_INVALID_TYPE,
         node.iterable,
         [iterableType, loopTypeName],
       );
@@ -2228,7 +2294,7 @@
     }
 
     DartType sequenceElementType;
-    if (iterableType is InterfaceTypeImpl) {
+    {
       var sequenceElement = awaitKeyword != null
           ? _typeProvider.streamElement
           : _typeProvider.iterableElement;
@@ -2244,7 +2310,7 @@
 
     if (!_typeSystem.isAssignableTo2(sequenceElementType, variableType)) {
       _errorReporter.reportErrorForNode(
-        StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
+        CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
         node.iterable,
         [iterableType, loopTypeName, variableType],
       );
@@ -2253,38 +2319,6 @@
     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].
-  void _checkForExportDuplicateLibraryName(ExportDirective directive,
-      ExportElement exportElement, LibraryElement exportedLibrary) {
-    if (exportedLibrary == null) {
-      return;
-    }
-    String name = exportedLibrary.name;
-    // check if there is other exported library with the same name
-    LibraryElement prevLibrary = _nameToExportElement[name];
-    if (prevLibrary != null) {
-      if (prevLibrary != exportedLibrary) {
-        if (name.isNotEmpty) {
-          _errorReporter.reportErrorForNode(
-              StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED, directive, [
-            prevLibrary.definingCompilationUnit.source.uri.toString(),
-            exportedLibrary.definingCompilationUnit.source.uri.toString(),
-            name
-          ]);
-        }
-        return;
-      }
-    } else {
-      _nameToExportElement[name] = exportedLibrary;
-    }
-  }
-
   /// 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
@@ -2458,13 +2492,12 @@
       // TODO(paulberry): this error should be based on the actual type of the
       // constant, not the static type.  See dartbug.com/21119.
       _errorReporter.reportErrorForNode(
-          CheckedModeCompileTimeErrorCode
-              .CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
+          CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
           expression,
           [staticType, fieldType]);
     }
     _errorReporter.reportErrorForNode(
-        StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE,
+        CompileTimeErrorCode.FIELD_INITIALIZER_NOT_ASSIGNABLE,
         expression,
         [staticType, fieldType]);
     // TODO(brianwilkerson) Define a hint corresponding to these errors and
@@ -2549,11 +2582,16 @@
               CompileTimeErrorCode.CONST_NOT_INITIALIZED,
               variable.name,
               [variable.name.name]);
-        } else if (!_isNonNullableByDefault || !variable.isLate) {
-          _errorReporter.reportErrorForNode(
-              StaticWarningCode.FINAL_NOT_INITIALIZED,
-              variable.name,
-              [variable.name.name]);
+        } else {
+          var variableElement = variable.declaredElement;
+          if (variableElement is FieldElement && variableElement.isAbstract) {
+            // Abstract fields can't be initialized, so no error.
+          } else if (!_isNonNullableByDefault || !variable.isLate) {
+            _errorReporter.reportErrorForNode(
+                CompileTimeErrorCode.FINAL_NOT_INITIALIZED,
+                variable.name,
+                [variable.name.name]);
+          }
         }
       }
     }
@@ -2684,7 +2722,7 @@
       return;
     }
     if (!_isInConstructorInitializer &&
-        !_enclosingExecutable.isStaticMethod &&
+        !_enclosingExecutable.inStaticMethod &&
         !_enclosingExecutable.isFactoryConstructor &&
         !_isInInstanceNotLateVariableDeclaration &&
         !_isInStaticVariableDeclaration) {
@@ -2727,7 +2765,8 @@
       }
     }
 
-    if (_enclosingExecutable.isStaticMethod) {
+    if (_enclosingExecutable.inStaticMethod) {
+      // TODO
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC, identifier);
     } else if (_enclosingExecutable.isFactoryConstructor) {
@@ -2741,36 +2780,6 @@
     }
   }
 
-  /// 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
-    LibraryElement nodeLibrary = importElement.importedLibrary;
-    if (nodeLibrary == null) {
-      return;
-    }
-    String name = nodeLibrary.name;
-    // check if there is another imported library with the same name
-    LibraryElement prevLibrary = _nameToImportElement[name];
-    if (prevLibrary != null) {
-      if (prevLibrary != nodeLibrary && name.isNotEmpty) {
-        _errorReporter.reportErrorForNode(
-            StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED, directive, [
-          prevLibrary.definingCompilationUnit.source.uri,
-          nodeLibrary.definingCompilationUnit.source.uri,
-          name
-        ]);
-      }
-    } else {
-      _nameToImportElement[name] = nodeLibrary;
-    }
-  }
-
   /// 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
@@ -2805,7 +2814,7 @@
   /// 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].
+  /// See [CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER].
   void _checkForInstanceAccessToStaticMember(
       ClassElement typeReference, Expression target, SimpleIdentifier name) {
     if (_isInComment) {
@@ -2842,7 +2851,7 @@
         }
       }
       _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
+          CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
           name,
           [name.name, _getKind(element), element.enclosingElement.name]);
     }
@@ -2860,7 +2869,7 @@
     ParameterElement staticParameterElement = argument.staticParameterElement;
     DartType staticParameterType = staticParameterElement?.type;
     _checkForArgumentTypeNotAssignable(argument, staticParameterType, _intType,
-        StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+        CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
   }
 
   /// Verify that the given [annotation] isn't defined in a deferred library.
@@ -2878,7 +2887,7 @@
   /// Verify that the given left hand side ([lhs]) and right hand side ([rhs])
   /// represent a valid assignment.
   ///
-  /// See [StaticTypeWarningCode.INVALID_ASSIGNMENT].
+  /// See [CompileTimeErrorCode.INVALID_ASSIGNMENT].
   void _checkForInvalidAssignment(Expression lhs, Expression rhs) {
     if (lhs == null || rhs == null) {
       return;
@@ -2903,7 +2912,7 @@
     }
 
     _checkForAssignableExpression(
-        rhs, leftType, StaticTypeWarningCode.INVALID_ASSIGNMENT);
+        rhs, leftType, CompileTimeErrorCode.INVALID_ASSIGNMENT);
   }
 
   /// Check the given [initializer] to ensure that the field being initialized
@@ -3393,12 +3402,12 @@
     SimpleIdentifier name = constructorName.name;
     if (name != null) {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR,
+          CompileTimeErrorCode.NEW_WITH_UNDEFINED_CONSTRUCTOR,
           name,
           [className, name]);
     } else {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
+          CompileTimeErrorCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
           constructorName,
           [className]);
     }
@@ -3428,9 +3437,9 @@
     if (superUnnamedConstructor != null) {
       if (superUnnamedConstructor.isFactory) {
         _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
+            CompileTimeErrorCode.NON_GENERATIVE_IMPLICIT_CONSTRUCTOR,
             declaration.name,
-            [superUnnamedConstructor]);
+            [superElement.name, _enclosingClass.name, superUnnamedConstructor]);
         return;
       }
       if (superUnnamedConstructor.isDefaultConstructor) {
@@ -3448,6 +3457,35 @@
     }
   }
 
+  bool _checkForNoGenerativeConstructorsInSuperclass(TypeName superclass) {
+    InterfaceType superType = _enclosingClass.supertype;
+    if (superType == null) {
+      return false;
+    }
+    if (_enclosingClass.constructors
+        .every((constructor) => constructor.isFactory)) {
+      // A class with no generative constructors *can* be extended if the
+      // subclass has only factory constructors.
+      return false;
+    }
+    ClassElement superElement = superType.element;
+    if (superElement.constructors.isEmpty) {
+      // Exclude empty constructor set, which indicates other errors occurred.
+      return false;
+    }
+    if (superElement.constructors
+        .every((constructor) => constructor.isFactory)) {
+      // For `E extends Exception`, etc., this will never work, because it has
+      // no generative constructors. State this clearly to users.
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS,
+          superclass,
+          [_enclosingClass.name, superElement.name]);
+      return true;
+    }
+    return false;
+  }
+
   /// Verify the given map [literal] either:
   /// * has `const modifier`
   /// * has explicit type arguments
@@ -3473,6 +3511,7 @@
       return;
     }
 
+    /// TODO(srawlins): Add any tests showing this is reported.
     _errorReporter.reportErrorForNode(
         CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT, literal);
   }
@@ -3493,7 +3532,7 @@
       DartType type = annotation.type;
       if (type != null && !type.isVoid) {
         _errorReporter.reportErrorForNode(
-            StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR, annotation);
+            CompileTimeErrorCode.NON_VOID_RETURN_FOR_OPERATOR, annotation);
       }
     }
   }
@@ -3507,7 +3546,7 @@
       DartType type = typeName.type;
       if (type != null && !type.isVoid) {
         _errorReporter.reportErrorForNode(
-            StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, typeName);
+            CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, typeName);
       }
     }
   }
@@ -3526,9 +3565,11 @@
     if (_isEnclosingClassFfiStruct) return;
 
     for (var field in fields.variables) {
+      var fieldElement = field.declaredElement as FieldElement;
+      if (fieldElement.isAbstract) continue;
       if (field.initializer != null) continue;
 
-      var type = field.declaredElement.type;
+      var type = fieldElement.type;
       if (!_typeSystem.isPotentiallyNonNullable(type)) continue;
 
       _errorReporter.reportErrorForNode(
@@ -4000,7 +4041,7 @@
         return;
       }
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
+          CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
           name,
           [name.name]);
     }
@@ -4040,7 +4081,7 @@
     // check types
     if (!_typeSystem.isAssignableTo2(expressionType, caseType)) {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE,
+          CompileTimeErrorCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE,
           expression,
           [expressionType, caseType]);
     }
@@ -4083,13 +4124,15 @@
   void _checkForTypeAnnotationDeferredClass(TypeAnnotation type) {
     if (type is TypeName && type.isDeferred) {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, type, [type.name]);
+          CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS,
+          type,
+          [type.name]);
     }
   }
 
   /// Check that none of the type [parameters] references itself in its bound.
   ///
-  /// See [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND].
+  /// See [CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND].
   void _checkForTypeParameterBoundRecursion(List<TypeParameter> parameters) {
     Map<TypeParameterElement, TypeParameter> elementToNode;
     for (var parameter in parameters) {
@@ -4112,7 +4155,7 @@
           if (step == parameters.length) {
             var element = parameter.declaredElement;
             _errorReporter.reportErrorForNode(
-              StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND,
+              CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND,
               parameter,
               [element.displayName, element.bound],
             );
@@ -4124,7 +4167,7 @@
   }
 
   void _checkForTypeParameterReferencedByStatic(SimpleIdentifier identifier) {
-    if (_enclosingExecutable.isStaticMethod || _isInStaticVariableDeclaration) {
+    if (_enclosingExecutable.inStaticMethod || _isInStaticVariableDeclaration) {
       var element = identifier.staticElement;
       if (element is TypeParameterElement &&
           element.enclosingElement is ClassElement) {
@@ -4132,7 +4175,8 @@
         // However all other type parameters are legal (e.g. the static method's
         // type parameters, or a local function's type parameters).
         _errorReporter.reportErrorForNode(
-            StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, identifier);
+            CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC,
+            identifier);
       }
     }
   }
@@ -4178,6 +4222,11 @@
       return;
     }
     ClassElement superElement = superType.element;
+    if (superElement.constructors
+        .every((constructor) => constructor.isFactory)) {
+      // Already reported [NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS].
+      return;
+    }
     ConstructorElement superUnnamedConstructor =
         superElement.unnamedConstructor;
     if (superUnnamedConstructor != null) {
@@ -4223,9 +4272,6 @@
     } else if (operator.type == TokenType.QUESTION_PERIOD_PERIOD) {
       errorCode = StaticWarningCode.INVALID_NULL_AWARE_OPERATOR;
       arguments = [operator.lexeme, '..'];
-    } else if (operator.type == TokenType.QUESTION_PERIOD_OPEN_SQUARE_BRACKET) {
-      errorCode = StaticWarningCode.INVALID_NULL_AWARE_OPERATOR;
-      arguments = [operator.lexeme, '['];
     } else if (operator.type == TokenType.PERIOD_PERIOD_PERIOD_QUESTION) {
       errorCode = StaticWarningCode.INVALID_NULL_AWARE_OPERATOR;
       arguments = [operator.lexeme, '...'];
@@ -4235,7 +4281,54 @@
       return;
     }
 
+    /// If the operator is not valid because the target already makes use of a
+    /// null aware operator, return the null aware operator from the target.
+    Token previousShortCircuitingOperator(Expression target) {
+      if (target is PropertyAccess) {
+        var operator = target.operator;
+        var type = operator.type;
+        if (type == TokenType.QUESTION_PERIOD) {
+          var realTarget = target.realTarget;
+          if (_isExpressionWithType(realTarget)) {
+            return previousShortCircuitingOperator(realTarget) ?? operator;
+          }
+        }
+      } else if (target is IndexExpression) {
+        if (target.question != null) {
+          var realTarget = target.realTarget;
+          if (_isExpressionWithType(realTarget)) {
+            return previousShortCircuitingOperator(realTarget) ??
+                target.question;
+          }
+        }
+      } else if (target is MethodInvocation) {
+        var operator = target.operator;
+        var type = operator?.type;
+        if (type == TokenType.QUESTION_PERIOD) {
+          var realTarget = target.realTarget;
+          if (_isExpressionWithType(realTarget)) {
+            return previousShortCircuitingOperator(realTarget) ?? operator;
+          }
+          return operator;
+        }
+      }
+      return null;
+    }
+
     if (_typeSystem.isStrictlyNonNullable(target.staticType)) {
+      if (errorCode == StaticWarningCode.INVALID_NULL_AWARE_OPERATOR) {
+        var previousOperator = previousShortCircuitingOperator(target);
+        if (previousOperator != null) {
+          _errorReporter.reportError(DiagnosticFactory()
+              .invalidNullAwareAfterShortCircuit(
+                  _errorReporter.source,
+                  operator.offset,
+                  endToken.end - operator.offset,
+                  arguments,
+                  previousOperator));
+          return;
+        }
+      }
       _errorReporter.reportErrorForOffset(
         errorCode,
         operator.offset,
@@ -4249,7 +4342,7 @@
   /// defined in the enclosing class rather than in a superclass.
   ///
   /// See
-  /// [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER].
+  /// [CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER].
   void _checkForUnqualifiedReferenceToNonLocalStaticMember(
       SimpleIdentifier name) {
     Element element = name.staticElement;
@@ -4282,8 +4375,7 @@
           [enclosingElement.displayName]);
     } else {
       _errorReporter.reportErrorForNode(
-          StaticTypeWarningCode
-              .UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
+          CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
           name,
           [enclosingElement.displayName]);
     }
@@ -4322,10 +4414,10 @@
     if (expression is MethodInvocation) {
       SimpleIdentifier methodName = expression.methodName;
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.USE_OF_VOID_RESULT, methodName, []);
+          CompileTimeErrorCode.USE_OF_VOID_RESULT, methodName, []);
     } else {
       _errorReporter.reportErrorForNode(
-          StaticWarningCode.USE_OF_VOID_RESULT, expression, []);
+          CompileTimeErrorCode.USE_OF_VOID_RESULT, expression, []);
     }
 
     return true;
@@ -4360,11 +4452,9 @@
                 CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD,
                 parameter,
                 [parameter.identifier.name]);
-          } else if (declaredType != null &&
-              fieldType != null &&
-              !_typeSystem.isAssignableTo2(declaredType, fieldType)) {
+          } else if (!_typeSystem.isSubtypeOf(declaredType, fieldType)) {
             _errorReporter.reportErrorForNode(
-                StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
+                CompileTimeErrorCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
                 parameter,
                 [declaredType, fieldType]);
           }
@@ -4626,27 +4716,27 @@
     }
   }
 
-  /// Verify that the given class [declaration] does not have the same class in
-  /// the 'extends' and 'implements' clauses.
+  /// Verify that the current class 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;
-    if (superType == null) {
-      return;
-    }
-    // prepare interfaces
     if (implementsClause == null) {
       return;
     }
-    // check interfaces
-    for (TypeName interfaceNode in implementsClause.interfaces) {
-      if (interfaceNode.type == superType) {
+
+    var superElement = _enclosingClass.supertype?.element;
+    if (superElement == null) {
+      return;
+    }
+
+    for (var interfaceNode in implementsClause.interfaces) {
+      if (interfaceNode.type.element == superElement) {
         _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS,
-            interfaceNode,
-            [superType]);
+          CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS,
+          interfaceNode,
+          [superElement],
+        );
       }
     }
   }
@@ -4720,6 +4810,31 @@
     }
   }
 
+  /// Verify that the current class does not have the same class in the
+  /// 'extends' and 'with' clauses.
+  ///
+  /// See [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS].
+  void _checkMixinsSuperClass(WithClause withClause) {
+    if (withClause == null) {
+      return;
+    }
+
+    var superElement = _enclosingClass.supertype?.element;
+    if (superElement == null) {
+      return;
+    }
+
+    for (var mixinNode in withClause.mixinTypes) {
+      if (mixinNode.type.element == superElement) {
+        _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.MIXINS_SUPER_CLASS,
+          mixinNode,
+          [superElement],
+        );
+      }
+    }
+  }
+
   void _checkUseOfCovariantInParameters(FormalParameterList node) {
     AstNode parent = node.parent;
     if (_enclosingClass != null &&
@@ -5096,6 +5211,15 @@
     }
   }
 
+  void _withHiddenElements(List<Statement> statements, void Function() f) {
+    _hiddenElements = HiddenElements(_hiddenElements, statements);
+    try {
+      f();
+    } finally {
+      _hiddenElements = _hiddenElements.outerElements;
+    }
+  }
+
   /// Return [FieldElement]s that are declared in the [ClassDeclaration] with
   /// the given [constructor], but are not initialized.
   static List<FieldElement> computeNotInitializedFields(
@@ -5184,9 +5308,9 @@
 
   /// 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);
+  /// declared in the given [statements].
+  HiddenElements(this.outerElements, List<Statement> statements) {
+    _initializeElements(statements);
   }
 
   /// Return `true` if this set of elements contains the given [element].
@@ -5206,9 +5330,9 @@
   }
 
   /// 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));
+  /// elements declared somewhere in the given [statements].
+  void _initializeElements(List<Statement> statements) {
+    _elements.addAll(BlockScope.elementsInStatements(statements));
   }
 }
 
@@ -5232,7 +5356,7 @@
   _UninstantiatedBoundChecker(this._errorReporter);
 
   @override
-  void visitTypeName(node) {
+  void visitTypeName(TypeName node) {
     var typeArgs = node.typeArguments;
     if (typeArgs != null) {
       typeArgs.accept(this);
@@ -5241,8 +5365,10 @@
 
     var element = node.name.staticElement;
     if (element is TypeParameterizedElement && !element.isSimplyBounded) {
-      _errorReporter
-          .reportErrorForNode(StrongModeCode.NOT_INSTANTIATED_BOUND, node, []);
+      // TODO(srawlins): Don't report this if TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
+      //  has been reported.
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, node, []);
     }
   }
 }
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
deleted file mode 100644
index c9b2b7e..0000000
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/src/dart/resolver/scope.dart';
-
-/// The context to resolve an [AstNode] in.
-class ResolutionContext {
-  CompilationUnitElement enclosingUnit;
-  ClassDeclaration enclosingClassDeclaration;
-  ClassElement enclosingClass;
-  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.
-class ResolutionContextBuilder {
-  /// 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.
-  ClassDeclaration _enclosingClassDeclaration;
-
-  /// The class containing the enclosing [ClassElement], or `null` if we are not
-  /// in the scope of a class.
-  ClassElement _enclosingClass;
-
-  Scope _scopeFor(AstNode node) {
-    if (node is CompilationUnit) {
-      return _scopeForAstNode(node);
-    }
-    AstNode parent = node.parent;
-    if (parent == null) {
-      throw AnalysisException(
-          "Cannot create scope: node is not part of a CompilationUnit");
-    }
-    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]
-  Scope _scopeForAstNode(AstNode node) {
-    if (node is CompilationUnit) {
-      return _scopeForCompilationUnit(node);
-    }
-    AstNode parent = node.parent;
-    if (parent == null) {
-      throw AnalysisException(
-          "Cannot create scope: node is not part of a CompilationUnit");
-    }
-    Scope scope = _scopeForAstNode(parent);
-    if (node is ClassDeclaration) {
-      _enclosingClassDeclaration = node;
-      _enclosingClass = node.declaredElement;
-      if (_enclosingClass == null) {
-        throw AnalysisException("Cannot build a scope for an unresolved class");
-      }
-      scope = ClassScope(
-          TypeParameterScope(scope, _enclosingClass), _enclosingClass);
-    } else if (node is ClassTypeAlias) {
-      ClassElement element = node.declaredElement;
-      if (element == null) {
-        throw AnalysisException(
-            "Cannot build a scope for an unresolved class type alias");
-      }
-      scope = ClassScope(TypeParameterScope(scope, element), element);
-    } else if (node is ConstructorDeclaration) {
-      ConstructorElement element = node.declaredElement;
-      if (element == null) {
-        throw AnalysisException(
-            "Cannot build a scope for an unresolved constructor");
-      }
-      FunctionScope functionScope = FunctionScope(scope, element);
-      functionScope.defineParameters();
-      scope = functionScope;
-    } else if (node is FunctionDeclaration) {
-      ExecutableElement element = node.declaredElement;
-      if (element == null) {
-        throw AnalysisException(
-            "Cannot build a scope for an unresolved function");
-      }
-      FunctionScope functionScope = FunctionScope(scope, element);
-      functionScope.defineParameters();
-      scope = functionScope;
-    } else if (node is FunctionTypeAlias) {
-      scope = FunctionTypeScope(scope, node.declaredElement);
-    } else if (node is MethodDeclaration) {
-      ExecutableElement element = node.declaredElement;
-      if (element == null) {
-        throw AnalysisException(
-            "Cannot build a scope for an unresolved method");
-      }
-      FunctionScope functionScope = FunctionScope(scope, element);
-      functionScope.defineParameters();
-      scope = functionScope;
-    }
-    return scope;
-  }
-
-  Scope _scopeForCompilationUnit(CompilationUnit node) {
-    _enclosingUnit = node.declaredElement;
-    if (_enclosingUnit == null) {
-      throw AnalysisException(
-          "Cannot create scope: compilation unit is not resolved");
-    }
-    LibraryElement libraryElement = _enclosingUnit.library;
-    if (libraryElement == null) {
-      throw AnalysisException(
-          "Cannot create scope: compilation unit is not part of a library");
-    }
-    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]
-  static ResolutionContext contextFor(AstNode node) {
-    if (node == null) {
-      throw AnalysisException("Cannot create context: node is null");
-    }
-    // build scope
-    ResolutionContextBuilder builder = ResolutionContextBuilder();
-    Scope scope = builder._scopeFor(node);
-    // prepare context
-    ResolutionContext context = ResolutionContext();
-    context.scope = scope;
-    context.enclosingUnit = builder._enclosingUnit;
-    context.enclosingClassDeclaration = builder._enclosingClassDeclaration;
-    context.enclosingClass = builder._enclosingClass;
-    return context;
-  }
-}
diff --git a/pkg/analyzer/lib/src/generated/java_core.dart b/pkg/analyzer/lib/src/generated/java_core.dart
index 800d03f..d5457b2 100644
--- a/pkg/analyzer/lib/src/generated/java_core.dart
+++ b/pkg/analyzer/lib/src/generated/java_core.dart
@@ -8,7 +8,14 @@
 ///     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]) {
+    [Object arg0,
+    Object arg1,
+    Object arg2,
+    Object arg3,
+    Object arg4,
+    Object arg5,
+    Object arg6,
+    Object arg7]) {
   // TODO(rnystrom): This is not used by analyzer, but is called by
   // analysis_server. Move this code there and remove it from here.
   return formatList(pattern, [arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7]);
@@ -144,7 +151,7 @@
   final StringBuffer _sb = StringBuffer();
 
   @override
-  void print(x) {
+  void print(Object x) {
     _sb.write(x);
   }
 
@@ -154,17 +161,17 @@
 
 abstract class PrintWriter {
   void newLine() {
-    this.print('\n');
+    print('\n');
   }
 
-  void print(x);
+  void print(Object x);
 
   void printf(String fmt, List args) {
-    this.print(_printf(fmt, args));
+    print(_printf(fmt, args));
   }
 
   void println(String s) {
-    this.print(s);
-    this.newLine();
+    print(s);
+    newLine();
   }
 }
diff --git a/pkg/analyzer/lib/src/generated/java_io.dart b/pkg/analyzer/lib/src/generated/java_io.dart
index 4773d79..efd679e7 100644
--- a/pkg/analyzer/lib/src/generated/java_io.dart
+++ b/pkg/analyzer/lib/src/generated/java_io.dart
@@ -18,15 +18,15 @@
   JavaFile.fromUri(Uri uri) : this(path.context.fromUri(uri));
   JavaFile.relative(JavaFile base, String child) {
     if (child.isEmpty) {
-      this._path = base._path;
+      _path = base._path;
     } else {
-      this._path = path.context.join(base._path, child);
+      _path = path.context.join(base._path, child);
     }
   }
   @override
   int get hashCode => _path.hashCode;
   @override
-  bool operator ==(other) {
+  bool operator ==(Object other) {
     return other is JavaFile && other._path == _path;
   }
 
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index b57d7ea..d23a065 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -227,7 +227,7 @@
 
   /// Set the token with which the parse is to begin to the given [token].
   set currentToken(Token token) {
-    this._currentToken = token;
+    _currentToken = token;
   }
 
   /// Return `true` if the parser is to parse asserts in the initializer list of
@@ -293,7 +293,7 @@
 
   /// Set whether parser is to parse function bodies.
   set parseFunctionBodies(bool parseFunctionBodies) {
-    this._parseFunctionBodies = parseFunctionBodies;
+    _parseFunctionBodies = parseFunctionBodies;
   }
 
   /// Return the content of a string with the given literal representation. The
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 79bdfac..d919f68 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -9,17 +9,18 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/member.dart'
     show ConstructorMember, Member;
 import 'package:analyzer/src/dart/element/nullability_eliminator.dart';
+import 'package:analyzer/src/dart/element/scope.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';
@@ -44,7 +45,6 @@
 import 'package:analyzer/src/error/nullable_dereference_verifier.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/element_resolver.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/migratable_ast_info_provider.dart';
 import 'package:analyzer/src/generated/migration.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -259,7 +259,7 @@
       AnalysisErrorListener errorListener,
       {FeatureSet featureSet,
       Scope nameScope,
-      reportConstEvaluationErrors = true,
+      bool reportConstEvaluationErrors = true,
       FlowAnalysisHelper flowAnalysisHelper})
       : this._(
             inheritanceManager,
@@ -285,78 +285,78 @@
       AnalysisErrorListener errorListener,
       FeatureSet featureSet,
       Scope nameScope,
-      reportConstEvaluationErrors,
+      bool reportConstEvaluationErrors,
       this._flowAnalysis,
       this._migratableAstInfoProvider,
       MigrationResolutionHooks migrationResolutionHooks)
       : _featureSet = featureSet,
         super(definingLibrary, source, typeProvider, errorListener,
             nameScope: nameScope) {
-    this._promoteManager = TypePromotionManager(typeSystem);
-    this.nullableDereferenceVerifier = NullableDereferenceVerifier(
+    _promoteManager = TypePromotionManager(typeSystem);
+    nullableDereferenceVerifier = NullableDereferenceVerifier(
       typeSystem: typeSystem,
       errorReporter: errorReporter,
     );
-    this.boolExpressionVerifier = BoolExpressionVerifier(
+    boolExpressionVerifier = BoolExpressionVerifier(
       typeSystem: typeSystem,
       errorReporter: errorReporter,
       nullableDereferenceVerifier: nullableDereferenceVerifier,
     );
-    this._typedLiteralResolver = TypedLiteralResolver(
+    _typedLiteralResolver = TypedLiteralResolver(
         this, _featureSet, typeSystem, typeProvider,
         migratableAstInfoProvider: _migratableAstInfoProvider);
-    this.extensionResolver = ExtensionMemberResolver(this);
-    this.typePropertyResolver = TypePropertyResolver(this);
-    this.inferenceHelper = InvocationInferenceHelper(
+    extensionResolver = ExtensionMemberResolver(this);
+    typePropertyResolver = TypePropertyResolver(this);
+    inferenceHelper = InvocationInferenceHelper(
         resolver: this,
         flowAnalysis: _flowAnalysis,
         errorReporter: errorReporter,
         typeSystem: typeSystem,
         migrationResolutionHooks: migrationResolutionHooks);
-    this._assignmentExpressionResolver = AssignmentExpressionResolver(
+    _assignmentExpressionResolver = AssignmentExpressionResolver(
       resolver: this,
       flowAnalysis: _flowAnalysis,
     );
-    this._binaryExpressionResolver = BinaryExpressionResolver(
+    _binaryExpressionResolver = BinaryExpressionResolver(
       resolver: this,
       promoteManager: _promoteManager,
       flowAnalysis: _flowAnalysis,
     );
-    this._functionExpressionInvocationResolver =
+    _functionExpressionInvocationResolver =
         FunctionExpressionInvocationResolver(
       resolver: this,
     );
-    this._functionExpressionResolver = FunctionExpressionResolver(
+    _functionExpressionResolver = FunctionExpressionResolver(
       resolver: this,
       migrationResolutionHooks: migrationResolutionHooks,
       flowAnalysis: _flowAnalysis,
       promoteManager: _promoteManager,
     );
-    this._forResolver = ForResolver(
+    _forResolver = ForResolver(
       resolver: this,
       flowAnalysis: _flowAnalysis,
     );
-    this._postfixExpressionResolver = PostfixExpressionResolver(
+    _postfixExpressionResolver = PostfixExpressionResolver(
       resolver: this,
       flowAnalysis: _flowAnalysis,
     );
-    this._prefixExpressionResolver = PrefixExpressionResolver(
+    _prefixExpressionResolver = PrefixExpressionResolver(
       resolver: this,
       flowAnalysis: _flowAnalysis,
     );
-    this._yieldStatementResolver = YieldStatementResolver(
+    _yieldStatementResolver = YieldStatementResolver(
       resolver: this,
     );
-    this.nullSafetyDeadCodeVerifier = NullSafetyDeadCodeVerifier(
+    nullSafetyDeadCodeVerifier = NullSafetyDeadCodeVerifier(
       typeSystem,
       errorReporter,
       _flowAnalysis,
     );
-    this.elementResolver = ElementResolver(this,
+    elementResolver = ElementResolver(this,
         reportConstEvaluationErrors: reportConstEvaluationErrors,
         migratableAstInfoProvider: _migratableAstInfoProvider);
-    this.inferenceContext = InferenceContext._(this);
-    this.typeAnalyzer = StaticTypeAnalyzer(
+    inferenceContext = InferenceContext._(this);
+    typeAnalyzer = StaticTypeAnalyzer(
         this, featureSet, _flowAnalysis, migrationResolutionHooks);
   }
 
@@ -616,7 +616,7 @@
     node.condition?.accept(this);
     boolExpressionVerifier.checkForNonBoolExpression(
       node.condition,
-      errorCode: StaticTypeWarningCode.NON_BOOL_EXPRESSION,
+      errorCode: CompileTimeErrorCode.NON_BOOL_EXPRESSION,
     );
     _flowAnalysis?.flow?.assert_afterCondition(node.condition);
     node.message?.accept(this);
@@ -630,7 +630,7 @@
     node.condition?.accept(this);
     boolExpressionVerifier.checkForNonBoolExpression(
       node.condition,
-      errorCode: StaticTypeWarningCode.NON_BOOL_EXPRESSION,
+      errorCode: CompileTimeErrorCode.NON_BOOL_EXPRESSION,
     );
     _flowAnalysis?.flow?.assert_afterCondition(node.condition);
     node.message?.accept(this);
@@ -679,6 +679,7 @@
     // We do not visit the label because it needs to be visited in the context
     // of the statement.
     //
+    checkUnreachableNode(node);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     _flowAnalysis?.breakStatement(node);
@@ -731,10 +732,44 @@
     AstNode parent = node.parent;
     if (parent is FunctionDeclaration ||
         parent is FunctionTypeAlias ||
-        parent is ConstructorDeclaration ||
-        parent is MethodDeclaration) {
+        parent is ConstructorDeclaration) {
       return;
     }
+
+    // TODO(scheglov) Change corresponding visiting places to visit comments
+    // with name scopes set for correct comments resolution.
+    if (parent is GenericTypeAlias) {
+      var element = parent.declaredElement as GenericTypeAliasElement;
+      var outerScope = nameScope;
+      try {
+        nameScope = TypeParameterScope(nameScope, element.typeParameters);
+
+        var functionElement = element.function;
+        if (functionElement != null) {
+          nameScope = FormalParameterScope(
+            TypeParameterScope(nameScope, functionElement.typeParameters),
+            functionElement.parameters,
+          );
+        }
+
+        super.visitComment(node);
+        return;
+      } finally {
+        nameScope = outerScope;
+      }
+    } else if (parent is MethodDeclaration) {
+      var outerScope = nameScope;
+      try {
+        var element = parent.declaredElement;
+        nameScope = FormalParameterScope(nameScope, element.parameters);
+
+        super.visitComment(node);
+        return;
+      } finally {
+        nameScope = outerScope;
+      }
+    }
+
     super.visitComment(node);
   }
 
@@ -899,6 +934,7 @@
     // We do not visit the label because it needs to be visited in the context
     // of the statement.
     //
+    checkUnreachableNode(node);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
     _flowAnalysis?.continueStatement(node);
@@ -1122,8 +1158,11 @@
     } else {
       Scope outerScope = nameScope;
       try {
-        ExecutableElement functionElement = node.declaredElement;
-        nameScope = FunctionScope(nameScope, functionElement);
+        ExecutableElement element = node.declaredElement;
+        nameScope = FormalParameterScope(
+          TypeParameterScope(nameScope, element.typeParameters),
+          element.parameters,
+        );
         _functionExpressionResolver.resolve(node);
       } finally {
         nameScope = outerScope;
@@ -1337,12 +1376,6 @@
   }
 
   @override
-  void visitMethodDeclarationInScope(MethodDeclaration node) {
-    super.visitMethodDeclarationInScope(node);
-    safelyVisitComment(node.documentationComment);
-  }
-
-  @override
   void visitMethodInvocation(MethodInvocation node) {
     node.target?.accept(this);
 
@@ -2108,7 +2141,7 @@
   ///
   /// @return the enclosing [Scope].
   Scope popNameScope() {
-    nameScope = nameScope.enclosingScope;
+    nameScope = (nameScope as EnclosedScope).parent;
     return nameScope;
   }
 
@@ -2116,22 +2149,16 @@
   ///
   /// @return the new [Scope].
   Scope pushNameScope() {
-    Scope newScope = EnclosedScope(nameScope);
+    Scope newScope = LocalScope(nameScope);
     nameScope = newScope;
     return nameScope;
   }
 
   @override
   void visitBlock(Block node) {
-    Scope outerScope = nameScope;
-    try {
-      EnclosedScope enclosedScope = BlockScope(nameScope, node);
-      nameScope = enclosedScope;
-      _setNodeNameScope(node, nameScope);
+    _withDeclaredLocals(node, node.statements, () {
       super.visitBlock(node);
-    } finally {
-      nameScope = outerScope;
-    }
+    });
   }
 
   @override
@@ -2151,11 +2178,11 @@
     if (exception != null) {
       Scope outerScope = nameScope;
       try {
-        nameScope = EnclosedScope(nameScope);
-        nameScope.define(exception.staticElement);
+        nameScope = LocalScope(nameScope);
+        _define(exception.staticElement);
         SimpleIdentifier stackTrace = node.stackTraceParameter;
         if (stackTrace != null) {
-          nameScope.define(stackTrace.staticElement);
+          _define(stackTrace.staticElement);
         }
         super.visitCatchClause(node);
       } finally {
@@ -2168,28 +2195,22 @@
 
   @override
   void visitClassDeclaration(ClassDeclaration node) {
-    ClassElement classElement = node.declaredElement;
     Scope outerScope = nameScope;
+    ClassElement outerClass = enclosingClass;
     try {
-      if (classElement == null) {
-        AnalysisEngine.instance.instrumentationService.logInfo(
-            "Missing element for class declaration ${node.name.name} in "
-            "${definingLibrary.source.fullName}",
-            CaughtException(AnalysisException(), null));
-        super.visitClassDeclaration(node);
-      } else {
-        ClassElement outerClass = enclosingClass;
-        try {
-          enclosingClass = node.declaredElement;
-          nameScope = TypeParameterScope(nameScope, classElement);
-          visitClassDeclarationInScope(node);
-          nameScope = ClassScope(nameScope, classElement);
-          visitClassMembersInScope(node);
-        } finally {
-          enclosingClass = outerClass;
-        }
-      }
+      ClassElement element = node.declaredElement;
+      enclosingClass = node.declaredElement;
+
+      nameScope = TypeParameterScope(
+        nameScope,
+        element.typeParameters,
+      );
+      visitClassDeclarationInScope(node);
+
+      nameScope = ClassScope(nameScope, element);
+      visitClassMembersInScope(node);
     } finally {
+      enclosingClass = outerClass;
       nameScope = outerScope;
     }
   }
@@ -2214,7 +2235,10 @@
     Scope outerScope = nameScope;
     try {
       ClassElement element = node.declaredElement;
-      nameScope = ClassScope(TypeParameterScope(nameScope, element), element);
+      nameScope = ClassScope(
+        TypeParameterScope(nameScope, element.typeParameters),
+        element,
+      );
       super.visitClassTypeAlias(node);
     } finally {
       nameScope = outerScope;
@@ -2229,40 +2253,32 @@
 
   @override
   void visitConstructorDeclaration(ConstructorDeclaration node) {
-    ConstructorElement constructorElement = node.declaredElement;
-    if (constructorElement == null) {
-      StringBuffer buffer = StringBuffer();
-      buffer.write("Missing element for constructor ");
-      buffer.write(node.returnType.name);
-      if (node.name != null) {
-        buffer.write(".");
-        buffer.write(node.name.name);
-      }
-      buffer.write(" in ");
-      buffer.write(definingLibrary.source.fullName);
-      AnalysisEngine.instance.instrumentationService.logInfo(buffer.toString());
-    }
     Scope outerScope = nameScope;
     try {
-      if (constructorElement != null) {
-        nameScope = FunctionScope(nameScope, constructorElement);
-      }
+      ConstructorElement element = node.declaredElement;
+
       node.documentationComment?.accept(this);
       node.metadata.accept(this);
       node.returnType?.accept(this);
       node.name?.accept(this);
       node.parameters?.accept(this);
-      Scope functionScope = nameScope;
+
       try {
-        if (constructorElement != null) {
-          nameScope =
-              ConstructorInitializerScope(nameScope, constructorElement);
-        }
+        nameScope = ConstructorInitializerScope(
+          nameScope,
+          element,
+        );
         node.initializers.accept(this);
       } finally {
-        nameScope = functionScope;
+        nameScope = outerScope;
       }
+
       node.redirectedConstructor?.accept(this);
+
+      nameScope = FormalParameterScope(
+        nameScope,
+        element.parameters,
+      );
       visitConstructorDeclarationInScope(node);
     } finally {
       nameScope = outerScope;
@@ -2275,10 +2291,7 @@
 
   @override
   void visitDeclaredIdentifier(DeclaredIdentifier node) {
-    VariableElement element = node.declaredElement;
-    if (element != null) {
-      nameScope.define(element);
-    }
+    _define(node.declaredElement);
     super.visitDeclaredIdentifier(node);
   }
 
@@ -2300,25 +2313,16 @@
 
   @override
   void visitEnumDeclaration(EnumDeclaration node) {
-    ClassElement classElement = node.declaredElement;
     Scope outerScope = nameScope;
+    ClassElement outerClass = enclosingClass;
     try {
-      if (classElement == null) {
-        AnalysisEngine.instance.instrumentationService.logInfo(
-            "Missing element for enum declaration ${node.name.name} in "
-            "${definingLibrary.source.fullName}");
-        super.visitEnumDeclaration(node);
-      } else {
-        ClassElement outerClass = enclosingClass;
-        try {
-          enclosingClass = node.declaredElement;
-          nameScope = ClassScope(nameScope, classElement);
-          visitEnumMembersInScope(node);
-        } finally {
-          enclosingClass = outerClass;
-        }
-      }
+      ClassElement element = node.declaredElement;
+      enclosingClass = node.declaredElement;
+
+      nameScope = ClassScope(nameScope, element);
+      visitEnumMembersInScope(node);
     } finally {
+      enclosingClass = outerClass;
       nameScope = outerScope;
     }
   }
@@ -2337,27 +2341,22 @@
 
   @override
   void visitExtensionDeclaration(ExtensionDeclaration node) {
-    ExtensionElement extensionElement = node.declaredElement;
     Scope outerScope = nameScope;
+    ExtensionElement outerExtension = enclosingExtension;
     try {
-      if (extensionElement == null) {
-        AnalysisEngine.instance.instrumentationService.logInfo(
-            "Missing element for extension declaration ${node.name.name} "
-            "in ${definingLibrary.source.fullName}");
-        super.visitExtensionDeclaration(node);
-      } else {
-        ExtensionElement outerExtension = enclosingExtension;
-        try {
-          enclosingExtension = extensionElement;
-          nameScope = TypeParameterScope(nameScope, extensionElement);
-          visitExtensionDeclarationInScope(node);
-          nameScope = ExtensionScope(nameScope, extensionElement);
-          visitExtensionMembersInScope(node);
-        } finally {
-          enclosingExtension = outerExtension;
-        }
-      }
+      ExtensionElement element = node.declaredElement;
+      enclosingExtension = element;
+
+      nameScope = TypeParameterScope(
+        nameScope,
+        element.typeParameters,
+      );
+      visitExtensionDeclarationInScope(node);
+
+      nameScope = ExtensionScope(nameScope, element);
+      visitExtensionMembersInScope(node);
     } finally {
+      enclosingExtension = outerExtension;
       nameScope = outerScope;
     }
   }
@@ -2388,7 +2387,7 @@
   void visitForElement(ForElement node) {
     Scope outerNameScope = nameScope;
     try {
-      nameScope = EnclosedScope(nameScope);
+      nameScope = LocalScope(nameScope);
       _setNodeNameScope(node, nameScope);
       visitForElementInScope(node);
     } finally {
@@ -2413,12 +2412,22 @@
     // scope.  Note: we must not do this if the parent is a
     // FunctionTypedFormalParameter, because in that case we aren't finished
     // resolving the full function signature, just a part of it.
-    if (nameScope is FunctionScope &&
-        node.parent is! FunctionTypedFormalParameter) {
-      (nameScope as FunctionScope).defineParameters();
-    }
-    if (nameScope is FunctionTypeScope) {
-      (nameScope as FunctionTypeScope).defineParameters();
+    var parent = node.parent;
+    if (parent is FunctionExpression) {
+      nameScope = FormalParameterScope(
+        nameScope,
+        parent.declaredElement.parameters,
+      );
+    } else if (parent is FunctionTypeAlias) {
+      nameScope = FormalParameterScope(
+        nameScope,
+        parent.declaredElement.parameters,
+      );
+    } else if (parent is MethodDeclaration) {
+      nameScope = FormalParameterScope(
+        nameScope,
+        parent.declaredElement.parameters,
+      );
     }
   }
 
@@ -2427,7 +2436,7 @@
     Scope outerNameScope = nameScope;
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
     try {
-      nameScope = EnclosedScope(nameScope);
+      nameScope = LocalScope(nameScope);
       _implicitLabelScope = _implicitLabelScope.nest(node);
       _setNodeNameScope(node, nameScope);
       visitForStatementInScope(node);
@@ -2449,20 +2458,13 @@
 
   @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
-    ExecutableElement functionElement = node.declaredElement;
-    if (functionElement != null &&
-        functionElement.enclosingElement is! CompilationUnitElement) {
-      nameScope.define(functionElement);
-    }
     Scope outerScope = nameScope;
     try {
-      if (functionElement == null) {
-        AnalysisEngine.instance.instrumentationService.logInfo(
-            "Missing element for top-level function ${node.name.name} in "
-            "${definingLibrary.source.fullName}");
-      } else {
-        nameScope = FunctionScope(nameScope, functionElement);
-      }
+      var element = node.declaredElement;
+      nameScope = TypeParameterScope(
+        nameScope,
+        element.typeParameters,
+      );
       visitFunctionDeclarationInScope(node);
     } finally {
       nameScope = outerScope;
@@ -2478,34 +2480,19 @@
     if (node.parent is FunctionDeclaration) {
       // We have already created a function scope and don't need to do so again.
       super.visitFunctionExpression(node);
-    } else {
-      Scope outerScope = nameScope;
-      try {
-        ExecutableElement functionElement = node.declaredElement;
-        if (functionElement == null) {
-          StringBuffer buffer = StringBuffer();
-          buffer.write("Missing element for function ");
-          AstNode parent = node.parent;
-          while (parent != null) {
-            if (parent is Declaration) {
-              Element parentElement = parent.declaredElement;
-              buffer.write(parentElement == null
-                  ? "<unknown> "
-                  : "${parentElement.name} ");
-            }
-            parent = parent.parent;
-          }
-          buffer.write("in ");
-          buffer.write(definingLibrary.source.fullName);
-          AnalysisEngine.instance.instrumentationService
-              .logInfo(buffer.toString());
-        } else {
-          nameScope = FunctionScope(nameScope, functionElement);
-        }
-        super.visitFunctionExpression(node);
-      } finally {
-        nameScope = outerScope;
-      }
+      return;
+    }
+
+    Scope outerScope = nameScope;
+    try {
+      ExecutableElement element = node.declaredElement;
+      nameScope = FormalParameterScope(
+        TypeParameterScope(nameScope, element.typeParameters),
+        element.parameters,
+      );
+      super.visitFunctionExpression(node);
+    } finally {
+      nameScope = outerScope;
     }
   }
 
@@ -2513,7 +2500,8 @@
   void visitFunctionTypeAlias(FunctionTypeAlias node) {
     Scope outerScope = nameScope;
     try {
-      nameScope = FunctionTypeScope(nameScope, node.declaredElement);
+      var element = node.declaredElement;
+      nameScope = TypeParameterScope(nameScope, element.typeParameters);
       visitFunctionTypeAliasInScope(node);
     } finally {
       nameScope = outerScope;
@@ -2528,19 +2516,11 @@
   void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     Scope outerScope = nameScope;
     try {
-      ParameterElement parameterElement = node.declaredElement;
-      if (parameterElement == null) {
-        AnalysisEngine.instance.instrumentationService.logInfo(
-            "Missing element for function typed formal parameter "
-            "${node.identifier.name} in ${definingLibrary.source.fullName}");
-      } else {
-        nameScope = EnclosedScope(nameScope);
-        var typeParameters = parameterElement.typeParameters;
-        int length = typeParameters.length;
-        for (int i = 0; i < length; i++) {
-          nameScope.define(typeParameters[i]);
-        }
-      }
+      ParameterElement element = node.declaredElement;
+      nameScope = TypeParameterScope(
+        nameScope,
+        element.typeParameters,
+      );
       super.visitFunctionTypedFormalParameter(node);
     } finally {
       nameScope = outerScope;
@@ -2556,19 +2536,13 @@
       super.visitGenericFunctionType(node);
       return;
     }
-    GenericFunctionTypeElement element =
-        (node as GenericFunctionTypeImpl).declaredElement;
+
     Scope outerScope = nameScope;
     try {
-      if (element == null) {
-        AnalysisEngine.instance.instrumentationService
-            .logInfo("Missing element for generic function type in "
-                "${definingLibrary.source.fullName}");
-        super.visitGenericFunctionType(node);
-      } else {
-        nameScope = TypeParameterScope(nameScope, element);
-        super.visitGenericFunctionType(node);
-      }
+      GenericFunctionTypeElement element =
+          (node as GenericFunctionTypeImpl).declaredElement;
+      nameScope = TypeParameterScope(nameScope, element.typeParameters);
+      super.visitGenericFunctionType(node);
     } finally {
       nameScope = outerScope;
     }
@@ -2576,24 +2550,19 @@
 
   @override
   void visitGenericTypeAlias(GenericTypeAlias node) {
-    GenericTypeAliasElement element = node.declaredElement;
     Scope outerScope = nameScope;
     try {
-      if (element == null) {
-        AnalysisEngine.instance.instrumentationService
-            .logInfo("Missing element for generic function type in "
-                "${definingLibrary.source.fullName}");
-        super.visitGenericTypeAlias(node);
-      } else {
-        nameScope = TypeParameterScope(nameScope, element);
-        super.visitGenericTypeAlias(node);
+      GenericTypeAliasElement element = node.declaredElement;
+      nameScope = TypeParameterScope(nameScope, element.typeParameters);
+      super.visitGenericTypeAlias(node);
 
-        GenericFunctionTypeElement functionElement = element.function;
-        if (functionElement != null) {
-          nameScope = FunctionScope(nameScope, functionElement)
-            ..defineParameters();
-          visitGenericTypeAliasInFunctionScope(node);
-        }
+      GenericFunctionTypeElement functionElement = element.function;
+      if (functionElement != null) {
+        nameScope = FormalParameterScope(
+          nameScope,
+          functionElement.parameters,
+        );
+        visitGenericTypeAliasInFunctionScope(node);
       }
     } finally {
       nameScope = outerScope;
@@ -2623,14 +2592,11 @@
   void visitMethodDeclaration(MethodDeclaration node) {
     Scope outerScope = nameScope;
     try {
-      ExecutableElement methodElement = node.declaredElement;
-      if (methodElement == null) {
-        AnalysisEngine.instance.instrumentationService
-            .logInfo("Missing element for method ${node.name.name} in "
-                "${definingLibrary.source.fullName}");
-      } else {
-        nameScope = FunctionScope(nameScope, methodElement);
-      }
+      ExecutableElement element = node.declaredElement;
+      nameScope = TypeParameterScope(
+        nameScope,
+        element.typeParameters,
+      );
       visitMethodDeclarationInScope(node);
     } finally {
       nameScope = outerScope;
@@ -2643,14 +2609,13 @@
 
   @override
   void visitMixinDeclaration(MixinDeclaration node) {
-    ClassElement element = node.declaredElement;
-
     Scope outerScope = nameScope;
     ClassElement outerClass = enclosingClass;
     try {
+      ClassElement element = node.declaredElement;
       enclosingClass = element;
 
-      nameScope = TypeParameterScope(nameScope, element);
+      nameScope = TypeParameterScope(nameScope, element.typeParameters);
       visitMixinDeclarationInScope(node);
 
       nameScope = ClassScope(nameScope, element);
@@ -2687,7 +2652,7 @@
     } else if (node != null) {
       Scope outerNameScope = nameScope;
       try {
-        nameScope = EnclosedScope(nameScope);
+        nameScope = LocalScope(nameScope);
         node.accept(this);
       } finally {
         nameScope = outerNameScope;
@@ -2698,26 +2663,17 @@
   @override
   void visitSwitchCase(SwitchCase node) {
     node.expression.accept(this);
-    Scope outerNameScope = nameScope;
-    try {
-      nameScope = EnclosedScope(nameScope);
-      _setNodeNameScope(node, nameScope);
+
+    _withDeclaredLocals(node, node.statements, () {
       node.statements.accept(this);
-    } finally {
-      nameScope = outerNameScope;
-    }
+    });
   }
 
   @override
   void visitSwitchDefault(SwitchDefault node) {
-    Scope outerNameScope = nameScope;
-    try {
-      nameScope = EnclosedScope(nameScope);
-      _setNodeNameScope(node, nameScope);
+    _withDeclaredLocals(node, node.statements, () {
       node.statements.accept(this);
-    } finally {
-      nameScope = outerNameScope;
-    }
+    });
   }
 
   @override
@@ -2748,12 +2704,9 @@
   @override
   void visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
-    if (node.parent.parent is! TopLevelVariableDeclaration &&
-        node.parent.parent is! FieldDeclaration) {
-      VariableElement element = node.declaredElement;
-      if (element != null) {
-        nameScope.define(element);
-      }
+
+    if (node.parent.parent is ForParts) {
+      _define(node.declaredElement);
     }
   }
 
@@ -2784,6 +2737,29 @@
     return outerScope;
   }
 
+  void _define(Element element) {
+    (nameScope as LocalScope).add(element);
+  }
+
+  void _withDeclaredLocals(
+    AstNode node,
+    List<Statement> statements,
+    void Function() f,
+  ) {
+    var outerScope = nameScope;
+    try {
+      var enclosedScope = LocalScope(nameScope);
+      BlockScope.elementsInStatements(statements).forEach(enclosedScope.add);
+
+      nameScope = enclosedScope;
+      _setNodeNameScope(node, nameScope);
+
+      f();
+    } finally {
+      nameScope = outerScope;
+    }
+  }
+
   /// Return the [Scope] to use while resolving inside the [node].
   ///
   /// Not every node has the scope set, for example we set the scopes for
@@ -2934,7 +2910,7 @@
       return;
     }
     // Prepare VariableElement.
-    Element element = nameScope.lookup(node, definingLibrary);
+    Element element = nameScope.lookup2(node.name).getter;
     if (element is! VariableElement) {
       return;
     }
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index 2ed64ad..1f141f7 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -8,6 +8,7 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/source.dart' show Source;
+import 'package:pub_semver/pub_semver.dart';
 
 /// A Dart SDK installed in a specified location.
 abstract class DartSdk {
@@ -34,6 +35,12 @@
   /// Return the analysis context used for all of the sources in this [DartSdk].
   AnalysisContext get context;
 
+  /// Return the language version of this SDK, or throws an exception.
+  ///
+  /// The language version has only major/minor components, the patch number
+  /// is always zero, because the patch number does not change the language.
+  Version get languageVersion;
+
   /// Return a list containing all of the libraries defined in this SDK.
   List<SdkLibrary> get sdkLibraries;
 
@@ -330,7 +337,7 @@
 
   /// Set whether the library is documented.
   set documented(bool documented) {
-    this._documented = documented;
+    _documented = documented;
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index 16d82d2..105c95a 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -84,8 +84,8 @@
   /// 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,
+      : uri = uri ?? file.toURI(),
+        file = file,
         id = _idTable.putIfAbsent(
             '${uri ?? file.toURI()}@${file.getPath()}', () => _idTable.length);
 
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index eafa028..4c605a3 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -112,7 +112,7 @@
       expression.staticType = _dynamicType;
     } else {
       expression.staticType = type;
-      if (identical(type, NeverTypeImpl.instance)) {
+      if (_typeSystem.isBottom(type)) {
         _flowAnalysis?.flow?.handleExit();
       }
     }
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 8b8744a..662d1d3 100644
--- a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
@@ -516,8 +516,12 @@
           argumentList: argumentList);
 
   static FieldDeclaration fieldDeclaration(bool isStatic, Keyword keyword,
-          TypeAnnotation type, List<VariableDeclaration> variables) =>
+          TypeAnnotation type, List<VariableDeclaration> variables,
+          {bool isAbstract = false}) =>
       astFactory.fieldDeclaration2(
+          abstractKeyword: isAbstract
+              ? TokenFactory.tokenFromKeyword(Keyword.ABSTRACT)
+              : null,
           staticKeyword:
               isStatic ? TokenFactory.tokenFromKeyword(Keyword.STATIC) : null,
           fieldList: variableDeclarationList(keyword, type, variables),
@@ -778,14 +782,27 @@
           [List<Combinator> combinators]) =>
       importDirective(null, uri, false, prefix, combinators);
 
-  static IndexExpression indexExpression(Expression array, Expression index,
-          [TokenType leftBracket = TokenType.OPEN_SQUARE_BRACKET]) =>
-      astFactory.indexExpressionForTarget2(
-          target: array,
-          leftBracket: TokenFactory.tokenFromType(leftBracket),
-          index: index,
-          rightBracket:
-              TokenFactory.tokenFromType(TokenType.CLOSE_SQUARE_BRACKET));
+  static IndexExpression indexExpression({
+    @required Expression target,
+    bool hasQuestion = false,
+    @required Expression index,
+  }) {
+    return astFactory.indexExpressionForTarget2(
+      target: target,
+      question: hasQuestion
+          ? TokenFactory.tokenFromType(
+              TokenType.QUESTION,
+            )
+          : null,
+      leftBracket: TokenFactory.tokenFromType(
+        TokenType.OPEN_SQUARE_BRACKET,
+      ),
+      index: index,
+      rightBracket: TokenFactory.tokenFromType(
+        TokenType.CLOSE_SQUARE_BRACKET,
+      ),
+    );
+  }
 
   static IndexExpression indexExpressionForCascade(Expression array,
           Expression index, TokenType period, TokenType leftBracket) =>
diff --git a/pkg/analyzer/lib/src/generated/type_promotion_manager.dart b/pkg/analyzer/lib/src/generated/type_promotion_manager.dart
index 2ed4d3e..1858a9b 100644
--- a/pkg/analyzer/lib/src/generated/type_promotion_manager.dart
+++ b/pkg/analyzer/lib/src/generated/type_promotion_manager.dart
@@ -313,12 +313,12 @@
 
   @override
   void visitFunctionExpression(FunctionExpression node) {
-    bool inClosure = this._inClosure;
+    bool inClosure = _inClosure;
     try {
-      this._inClosure = true;
+      _inClosure = true;
       super.visitFunctionExpression(node);
     } finally {
-      this._inClosure = inClosure;
+      _inClosure = inClosure;
     }
   }
 
diff --git a/pkg/analyzer/lib/src/generated/utilities_dart.dart b/pkg/analyzer/lib/src/generated/utilities_dart.dart
index 87dede9..118a2ad 100644
--- a/pkg/analyzer/lib/src/generated/utilities_dart.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_dart.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/ast/ast.dart' show AnnotatedNode, Comment;
 import 'package:analyzer/dart/ast/token.dart' show Token;
 import 'package:analyzer/src/dart/element/element.dart' show ElementImpl;
+import 'package:meta/meta.dart';
 
 export 'package:_fe_analyzer_shared/src/util/resolve_relative_uri.dart'
     show resolveRelativeUri;
@@ -49,19 +50,60 @@
 /// can be either required or optional.
 class ParameterKind implements Comparable<ParameterKind> {
   /// A positional required parameter.
-  static const ParameterKind REQUIRED =
-      ParameterKind('REQUIRED', 0, false, false);
+  static const ParameterKind REQUIRED = ParameterKind(
+    name: 'REQUIRED',
+    ordinal: 0,
+    isPositional: true,
+    isRequiredPositional: true,
+    isOptionalPositional: false,
+    isNamed: false,
+    isRequiredNamed: false,
+    isOptionalNamed: false,
+    isRequired: true,
+    isOptional: false,
+  );
 
   /// A positional optional parameter.
-  static const ParameterKind POSITIONAL =
-      ParameterKind('POSITIONAL', 1, false, true);
+  static const ParameterKind POSITIONAL = ParameterKind(
+    name: 'POSITIONAL',
+    ordinal: 1,
+    isPositional: true,
+    isRequiredPositional: false,
+    isOptionalPositional: true,
+    isNamed: false,
+    isRequiredNamed: false,
+    isOptionalNamed: false,
+    isRequired: false,
+    isOptional: true,
+  );
 
   /// A named required parameter.
-  static const ParameterKind NAMED_REQUIRED =
-      ParameterKind('NAMED_REQUIRED', 2, true, false);
+  static const ParameterKind NAMED_REQUIRED = ParameterKind(
+    name: 'NAMED_REQUIRED',
+    ordinal: 2,
+    isPositional: false,
+    isRequiredPositional: false,
+    isOptionalPositional: false,
+    isNamed: true,
+    isRequiredNamed: true,
+    isOptionalNamed: false,
+    isRequired: true,
+    isOptional: false,
+  );
 
   /// A named optional parameter.
-  static const ParameterKind NAMED = ParameterKind('NAMED', 2, true, true);
+  static const ParameterKind NAMED = ParameterKind(
+    name: 'NAMED',
+    ordinal: 3,
+    isPositional: false,
+    isRequiredPositional: false,
+    isOptionalPositional: false,
+    isNamed: true,
+    isRequiredNamed: false,
+    isOptionalNamed: true,
+    isRequired: false,
+    isOptional: true,
+  );
 
   static const List<ParameterKind> values = [
     REQUIRED,
@@ -76,14 +118,57 @@
   /// The ordinal value of the parameter.
   final int ordinal;
 
-  /// A flag indicating whether this is a named or positional parameter.
+  /// Return `true` if is a positional parameter.
+  ///
+  /// Positional parameters can either be required or optional.
+  final bool isPositional;
+
+  /// Return `true` if both a required and positional parameter.
+  final bool isRequiredPositional;
+
+  /// Return `true` if both an optional and positional parameter.
+  final bool isOptionalPositional;
+
+  /// Return `true` if a named parameter.
+  ///
+  /// Named parameters can either be required or optional.
   final bool isNamed;
 
-  /// A flag indicating whether this is an optional or required parameter.
+  /// Return `true` if both a required and named parameter.
+  ///
+  /// Note: this will return `false` for a named parameter that is annotated
+  /// with the `@required` annotation.
+  final bool isRequiredNamed;
+
+  /// Return `true` if both an optional and named parameter.
+  final bool isOptionalNamed;
+
+  /// Return `true` if a required parameter.
+  ///
+  /// Required parameters can either be positional or named.
+  ///
+  /// Note: this will return `false` for a named parameter that is annotated
+  /// with the `@required` annotation.
+  final bool isRequired;
+
+  /// Return `true` if an optional parameter.
+  ///
+  /// Optional parameters can either be positional or named.
   final bool isOptional;
 
   /// Initialize a newly created kind with the given state.
-  const ParameterKind(this.name, this.ordinal, this.isNamed, this.isOptional);
+  const ParameterKind({
+    @required this.name,
+    @required this.ordinal,
+    @required this.isPositional,
+    @required this.isRequiredPositional,
+    @required this.isOptionalPositional,
+    @required this.isNamed,
+    @required this.isRequiredNamed,
+    @required this.isOptionalNamed,
+    @required this.isRequired,
+    @required this.isOptional,
+  });
 
   @override
   int get hashCode => ordinal;
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart
index dc05c2c..4eb59de 100644
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart
@@ -85,13 +85,14 @@
   }
 
   /// Combines together two hash codes.
-  static int hash2(a, b) => finish(combine(combine(0, a), b));
+  static int hash2(Object a, Object b) => finish(combine(combine(0, a), b));
 
   /// Combines together three hash codes.
-  static int hash3(a, b, c) => finish(combine(combine(combine(0, a), b), c));
+  static int hash3(Object a, Object b, Object c) =>
+      finish(combine(combine(combine(0, a), b), c));
 
   /// Combines together four hash codes.
-  static int hash4(a, b, c, d) =>
+  static int hash4(Object a, Object b, Object c, Object d) =>
       finish(combine(combine(combine(combine(0, a), b), c), d));
 }
 
diff --git a/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart b/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart
index 517c647..d019194 100644
--- a/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart
+++ b/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart
@@ -2,9 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:collection';
-
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /// Information about analysis `//ignore:` and `//ignore_for_file` comments
@@ -31,26 +32,73 @@
   static final RegExp _IGNORE_FOR_FILE_MATCHER =
       RegExp(r'//[ ]*ignore_for_file:(.*)$', multiLine: true);
 
-  final Map<int, List<String>> _ignoreMap = HashMap<int, List<String>>();
+  /// A table mapping line numbers to the diagnostics that are ignored on that
+  /// line.
+  final Map<int, List<_DiagnosticName>> _ignoredOnLine = {};
 
-  final Set<String> _ignoreForFileSet = HashSet<String>();
+  /// A list containing all of the diagnostics that are ignored for the whole
+  /// file.
+  final List<_DiagnosticName> _ignoredForFile = [];
 
-  /// Whether this info object defines any ignores.
-  bool get hasIgnores => _ignoreMap.isNotEmpty || _ignoreForFileSet.isNotEmpty;
+  IgnoreInfo();
 
-  /// Test whether this [errorCode] is ignored at the given [line].
-  bool ignoredAt(String errorCode, int line) =>
-      _ignoreForFileSet.contains(errorCode) ||
-      _ignoreMap[line]?.contains(errorCode) == true;
+  /// Initialize a newly created instance of this class to represent the ignore
+  /// comments in the given compilation [unit].
+  IgnoreInfo.forDart(CompilationUnit unit, String content) {
+    var lineInfo = unit.lineInfo;
+    for (var comment in unit.ignoreComments) {
+      var lexeme = comment.lexeme;
+      if (lexeme.contains('ignore:')) {
+        var location = lineInfo.getLocation(comment.offset);
+        var lineNumber = location.lineNumber;
+        String beforeMatch = content.substring(
+            lineInfo.getOffsetOfLine(lineNumber - 1),
+            lineInfo.getOffsetOfLine(lineNumber - 1) +
+                location.columnNumber -
+                1);
+        if (beforeMatch.trim().isEmpty) {
+          // The comment is on its own line, so it refers to the next line.
+          lineNumber++;
+        }
+        _ignoredOnLine
+            .putIfAbsent(lineNumber, () => [])
+            .addAll(comment.diagnosticNames);
+      } else if (lexeme.contains('ignore_for_file:')) {
+        _ignoredForFile.addAll(comment.diagnosticNames);
+      }
+    }
+  }
+
+  /// Return `true` if there are any ignore comments in the file.
+  bool get hasIgnores =>
+      _ignoredOnLine.isNotEmpty || _ignoredForFile.isNotEmpty;
+
+  /// Return `true` if the [errorCode] is ignored at the given [line].
+  bool ignoredAt(String errorCode, int line) {
+    for (var name in _ignoredForFile) {
+      if (name.matches(errorCode)) {
+        return true;
+      }
+    }
+    var ignoredOnLine = _ignoredOnLine[line];
+    if (ignoredOnLine != null) {
+      for (var name in ignoredOnLine) {
+        if (name.matches(errorCode)) {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
 
   /// Ignore these [errorCodes] at [line].
-  void _addAll(int line, Iterable<String> errorCodes) {
-    _ignoreMap.putIfAbsent(line, () => <String>[]).addAll(errorCodes);
+  void _addAll(int line, Iterable<_DiagnosticName> errorCodes) {
+    _ignoredOnLine.putIfAbsent(line, () => []).addAll(errorCodes);
   }
 
   /// Ignore these [errorCodes] in the whole file.
-  void _addAllForFile(Iterable<String> errorCodes) {
-    _ignoreForFileSet.addAll(errorCodes);
+  void _addAllForFile(Iterable<_DiagnosticName> errorCodes) {
+    _ignoredForFile.addAll(errorCodes);
   }
 
   /// Calculate ignores for the given [content] with line [info].
@@ -64,10 +112,13 @@
     IgnoreInfo ignoreInfo = IgnoreInfo();
     for (Match match in matches) {
       // See _IGNORE_MATCHER for format --- note the possibility of error lists.
-      Iterable<String> codes = match
+      // Note that the offsets are not being computed here. This shouldn't
+      // affect older clients of this class because none of the previous APIs
+      // depended on having offsets.
+      Iterable<_DiagnosticName> codes = match
           .group(1)
           .split(',')
-          .map((String code) => code.trim().toLowerCase());
+          .map((String code) => _DiagnosticName(code.trim().toLowerCase(), -1));
       CharacterLocation location = info.getLocation(match.start);
       int lineNumber = location.lineNumber;
       String beforeMatch = content.substring(
@@ -82,13 +133,75 @@
         ignoreInfo._addAll(lineNumber, codes);
       }
     }
+    // Note that the offsets are not being computed here. This shouldn't affect
+    // older clients of this class because none of the previous APIs depended on
+    // having offsets.
     for (Match match in fileMatches) {
-      Iterable<String> codes = match
+      Iterable<_DiagnosticName> codes = match
           .group(1)
           .split(',')
-          .map((String code) => code.trim().toLowerCase());
+          .map((String code) => _DiagnosticName(code.trim().toLowerCase(), -1));
       ignoreInfo._addAllForFile(codes);
     }
     return ignoreInfo;
   }
 }
+
+/// The name and location of a diagnostic name in an ignore comment.
+class _DiagnosticName {
+  /// The name of the diagnostic being ignored.
+  final String name;
+
+  /// The offset of the diagnostic in the source file.
+  final int offset;
+
+  /// Initialize a newly created diagnostic name to have the given [name] and
+  /// [offset].
+  _DiagnosticName(this.name, this.offset);
+
+  /// Return `true` if this diagnostic name matches the given error code.
+  bool matches(String errorCode) => name == errorCode;
+}
+
+extension on CompilationUnit {
+  /// Return all of the ignore comments in this compilation unit.
+  Iterable<CommentToken> get ignoreComments sync* {
+    Iterable<CommentToken> processPrecedingComments(Token currentToken) sync* {
+      var comment = currentToken.precedingComments;
+      while (comment != null) {
+        var lexeme = comment.lexeme;
+        var match = IgnoreInfo._IGNORE_MATCHER.matchAsPrefix(lexeme);
+        if (match != null) {
+          yield comment;
+        } else {
+          match = IgnoreInfo._IGNORE_FOR_FILE_MATCHER.matchAsPrefix(lexeme);
+          if (match != null) {
+            yield comment;
+          }
+        }
+        comment = comment.next;
+      }
+    }
+
+    var currentToken = beginToken;
+    while (currentToken != currentToken.next) {
+      yield* processPrecedingComments(currentToken);
+      currentToken = currentToken.next;
+    }
+    yield* processPrecedingComments(currentToken);
+  }
+}
+
+extension on CommentToken {
+  /// Return the diagnostic names contained in this comment, assuming that it is
+  /// a correctly formatted ignore comment.
+  Iterable<_DiagnosticName> get diagnosticNames sync* {
+    int offset = lexeme.indexOf(':') + 1;
+    var names = lexeme.substring(offset).split(',');
+    offset += this.offset;
+    for (var name in names) {
+      yield _DiagnosticName(name.trim().toLowerCase(), offset);
+      offset += name.length + 1;
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/lint/analysis.dart b/pkg/analyzer/lib/src/lint/analysis.dart
index 35a0852..2990f6d 100644
--- a/pkg/analyzer/lib/src/lint/analysis.dart
+++ b/pkg/analyzer/lib/src/lint/analysis.dart
@@ -6,6 +6,7 @@
 import 'dart:collection';
 import 'dart:io' as io;
 
+import 'package:analyzer/dart/analysis/context_locator.dart' as api;
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/file_system.dart'
     show File, Folder, ResourceProvider, ResourceUriResolver;
@@ -15,6 +16,8 @@
 import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart'
+    as api;
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
@@ -169,6 +172,9 @@
       _buildAnalyzerOptions(options),
       packages: Packages.empty,
     );
+
+    _setAnalysisDriverAnalysisContext(analysisDriver, files);
+
     analysisDriver.results.listen((_) {});
     analysisDriver.exceptions.listen((_) {});
     scheduler.start();
@@ -242,13 +248,46 @@
     }
     return null;
   }
+
+  void _setAnalysisDriverAnalysisContext(
+    AnalysisDriver analysisDriver,
+    Iterable<io.File> files,
+  ) {
+    if (files.isEmpty) {
+      return;
+    }
+
+    var rootPath = p.normalize(files.first.absolute.path);
+    if (rootPath == null) {
+      return;
+    }
+
+    var apiContextRoots = api.ContextLocator(
+      resourceProvider: resourceProvider,
+    ).locateRoots(
+      includedPaths: [rootPath],
+      excludedPaths: [],
+    );
+
+    if (apiContextRoots.isEmpty) {
+      return;
+    }
+
+    analysisDriver.configure(
+      analysisContext: api.DriverBasedAnalysisContext(
+        resourceProvider,
+        apiContextRoots.first,
+        analysisDriver,
+      ),
+    );
+  }
 }
 
 /// Prints logging information comments to the [outSink] and error messages to
 /// [errorSink].
 class StdInstrumentation extends NoopInstrumentationService {
   @override
-  void logError(String message, [exception]) {
+  void logError(String message, [Object exception]) {
     errorSink.writeln(message);
     if (exception != null) {
       errorSink.writeln(exception);
@@ -264,7 +303,7 @@
   }
 
   @override
-  void logInfo(String message, [exception]) {
+  void logInfo(String message, [Object exception]) {
     outSink.writeln(message);
     if (exception != null) {
       outSink.writeln(exception);
diff --git a/pkg/analyzer/lib/src/lint/config.dart b/pkg/analyzer/lib/src/lint/config.dart
index b6c801c..f18198a 100644
--- a/pkg/analyzer/lib/src/lint/config.dart
+++ b/pkg/analyzer/lib/src/lint/config.dart
@@ -60,7 +60,7 @@
   @override
   final ruleConfigs = <RuleConfig>[];
 
-  void addAsListOrString(value, List<String> list) {
+  void addAsListOrString(Object value, List<String> list) {
     if (value is List) {
       value.forEach((v) => list.add(v));
     } else if (value is String) {
@@ -68,7 +68,7 @@
     }
   }
 
-  bool asBool(scalar) {
+  bool asBool(Object scalar) {
     Object value = scalar is YamlScalar ? scalar.value : scalar;
     if (value is bool) {
       return value;
@@ -84,7 +84,7 @@
     return null;
   }
 
-  String asString(scalar) {
+  String asString(Object scalar) {
     Object value = scalar is YamlScalar ? scalar.value : scalar;
     if (value is String) {
       return value;
@@ -92,7 +92,7 @@
     return null;
   }
 
-  Map<String, dynamic> parseArgs(args) {
+  Map<String, dynamic> parseArgs(Object args) {
     bool enabled = asBool(args);
     if (enabled != null) {
       return {'enabled': enabled};
diff --git a/pkg/analyzer/lib/src/lint/linter.dart b/pkg/analyzer/lib/src/lint/linter.dart
index b3e9d16..4261e0c 100644
--- a/pkg/analyzer/lib/src/lint/linter.dart
+++ b/pkg/analyzer/lib/src/lint/linter.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/dart/element/type_system.dart';
 import 'package:analyzer/error/error.dart';
@@ -24,7 +25,6 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/error/lint_codes.dart';
-import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart'
     show
@@ -49,7 +49,7 @@
 
 export 'package:analyzer/src/lint/linter_visitor.dart' show NodeLintRegistry;
 
-typedef Printer = Function(String msg);
+typedef Printer = void Function(String msg);
 
 /// Describes a String in valid camel case format.
 @deprecated // Never intended for public use.
@@ -212,7 +212,7 @@
 
   String get html => '<a href="$href">${_emph(label)}</a>';
 
-  String _emph(msg) => bold ? '<strong>$msg</strong>' : msg;
+  String _emph(String msg) => bold ? '<strong>$msg</strong>' : msg;
 }
 
 /// The result of attempting to evaluate an expression.
@@ -370,8 +370,6 @@
   @override
   LinterNameInScopeResolutionResult resolveNameInScope(
       String id, bool setter, AstNode node) {
-    var idEq = '$id=';
-
     Scope scope;
     for (var context = node; context != null; context = context.parent) {
       scope = ScopedVisitor.getNodeNameScope(context);
@@ -381,18 +379,9 @@
     }
 
     if (scope != null) {
-      Element idElement;
-      Element idEqElement;
-
-      void lookupScopeAndEnclosing() {
-        while (scope != null && idElement == null && idEqElement == null) {
-          idElement = scope.localLookup(id);
-          idEqElement = scope.localLookup(idEq);
-          scope = scope.enclosingScope;
-        }
-      }
-
-      lookupScopeAndEnclosing();
+      var lookupResult = scope.lookup2(id);
+      var idElement = lookupResult.getter;
+      var idEqElement = lookupResult.setter;
 
       var requestedElement = setter ? idEqElement : idElement;
       var differentElement = setter ? idElement : idEqElement;
@@ -682,7 +671,7 @@
   const Maturity._(this.name, {this.ordinal});
 
   @override
-  int compareTo(Maturity other) => this.ordinal - other.ordinal;
+  int compareTo(Maturity other) => ordinal - other.ordinal;
 }
 
 /// [LintRule]s that implement this interface want to process only some types
diff --git a/pkg/analyzer/lib/src/lint/linter_visitor.dart b/pkg/analyzer/lib/src/lint/linter_visitor.dart
index 0392e60..bc3f868 100644
--- a/pkg/analyzer/lib/src/lint/linter_visitor.dart
+++ b/pkg/analyzer/lib/src/lint/linter_visitor.dart
@@ -19,12 +19,24 @@
   LinterVisitor(this.registry, this.exceptionHandler);
 
   @override
+  void visitAdjacentStrings(AdjacentStrings node) {
+    _runSubscriptions(node, registry._forAdjacentStrings);
+    super.visitAdjacentStrings(node);
+  }
+
+  @override
   void visitAnnotation(Annotation node) {
     _runSubscriptions(node, registry._forAnnotation);
     super.visitAnnotation(node);
   }
 
   @override
+  void visitArgumentList(ArgumentList node) {
+    _runSubscriptions(node, registry._forArgumentList);
+    super.visitArgumentList(node);
+  }
+
+  @override
   void visitAsExpression(AsExpression node) {
     _runSubscriptions(node, registry._forAsExpression);
     super.visitAsExpression(node);
@@ -481,6 +493,18 @@
   }
 
   @override
+  void visitNativeClause(NativeClause node) {
+    _runSubscriptions(node, registry._forNativeClause);
+    super.visitNativeClause(node);
+  }
+
+  @override
+  void visitNativeFunctionBody(NativeFunctionBody node) {
+    _runSubscriptions(node, registry._forNativeFunctionBody);
+    super.visitNativeFunctionBody(node);
+  }
+
+  @override
   void visitNullLiteral(NullLiteral node) {
     _runSubscriptions(node, registry._forNullLiteral);
     super.visitNullLiteral(node);
@@ -554,6 +578,12 @@
   }
 
   @override
+  void visitScriptTag(ScriptTag node) {
+    _runSubscriptions(node, registry._forScriptTag);
+    super.visitScriptTag(node);
+  }
+
+  @override
   void visitSetOrMapLiteral(SetOrMapLiteral node) {
     _runSubscriptions(node, registry._forSetOrMapLiteral);
     super.visitSetOrMapLiteral(node);
@@ -734,7 +764,9 @@
 /// The container to register visitors for separate AST node types.
 class NodeLintRegistry {
   final bool enableTiming;
+  final List<_Subscription<AdjacentStrings>> _forAdjacentStrings = [];
   final List<_Subscription<Annotation>> _forAnnotation = [];
+  final List<_Subscription<ArgumentList>> _forArgumentList = [];
   final List<_Subscription<AsExpression>> _forAsExpression = [];
   final List<_Subscription<AssertInitializer>> _forAssertInitializer = [];
   final List<_Subscription<AssertStatement>> _forAssertStatement = [];
@@ -777,8 +809,8 @@
       [];
   final List<_Subscription<ExpressionStatement>> _forExpressionStatement = [];
   final List<_Subscription<ExtendsClause>> _forExtendsClause = [];
-  final List<_Subscription<ExtendsClause>> _forExtensionDeclaration = [];
-  final List<_Subscription<ExtendsClause>> _forExtensionOverride = [];
+  final List<_Subscription<ExtensionDeclaration>> _forExtensionDeclaration = [];
+  final List<_Subscription<ExtensionOverride>> _forExtensionOverride = [];
   final List<_Subscription<FieldDeclaration>> _forFieldDeclaration = [];
   final List<_Subscription<FieldFormalParameter>> _forFieldFormalParameter = [];
   final List<_Subscription<ForEachPartsWithDeclaration>>
@@ -826,6 +858,8 @@
   final List<_Subscription<MethodInvocation>> _forMethodInvocation = [];
   final List<_Subscription<MixinDeclaration>> _forMixinDeclaration = [];
   final List<_Subscription<NamedExpression>> _forNamedExpression = [];
+  final List<_Subscription<NativeClause>> _forNativeClause = [];
+  final List<_Subscription<NativeFunctionBody>> _forNativeFunctionBody = [];
   final List<_Subscription<NullLiteral>> _forNullLiteral = [];
   final List<_Subscription<OnClause>> _forOnClause = [];
   final List<_Subscription<ParenthesizedExpression>>
@@ -840,6 +874,7 @@
       _forRedirectingConstructorInvocation = [];
   final List<_Subscription<RethrowExpression>> _forRethrowExpression = [];
   final List<_Subscription<ReturnStatement>> _forReturnStatement = [];
+  final List<_Subscription<ScriptTag>> _forScriptTag = [];
   final List<_Subscription<SetOrMapLiteral>> _forSetOrMapLiteral = [];
   final List<_Subscription<ShowCombinator>> _forShowCombinator = [];
   final List<_Subscription<SimpleFormalParameter>> _forSimpleFormalParameter =
@@ -875,10 +910,18 @@
 
   NodeLintRegistry(this.enableTiming);
 
+  void addAdjacentStrings(LintRule linter, AstVisitor visitor) {
+    _forAdjacentStrings.add(_Subscription(linter, visitor, _getTimer(linter)));
+  }
+
   void addAnnotation(LintRule linter, AstVisitor visitor) {
     _forAnnotation.add(_Subscription(linter, visitor, _getTimer(linter)));
   }
 
+  void addArgumentList(LintRule linter, AstVisitor visitor) {
+    _forArgumentList.add(_Subscription(linter, visitor, _getTimer(linter)));
+  }
+
   void addAsExpression(LintRule linter, AstVisitor visitor) {
     _forAsExpression.add(_Subscription(linter, visitor, _getTimer(linter)));
   }
@@ -1217,6 +1260,15 @@
     _forNamedExpression.add(_Subscription(linter, visitor, _getTimer(linter)));
   }
 
+  void addNativeClause(LintRule linter, AstVisitor visitor) {
+    _forNativeClause.add(_Subscription(linter, visitor, _getTimer(linter)));
+  }
+
+  void addNativeFunctionBody(LintRule linter, AstVisitor visitor) {
+    _forNativeFunctionBody
+        .add(_Subscription(linter, visitor, _getTimer(linter)));
+  }
+
   void addNullLiteral(LintRule linter, AstVisitor visitor) {
     _forNullLiteral.add(_Subscription(linter, visitor, _getTimer(linter)));
   }
@@ -1271,6 +1323,10 @@
     _forReturnStatement.add(_Subscription(linter, visitor, _getTimer(linter)));
   }
 
+  void addScriptTag(LintRule linter, AstVisitor visitor) {
+    _forScriptTag.add(_Subscription(linter, visitor, _getTimer(linter)));
+  }
+
   void addSetOrMapLiteral(LintRule linter, AstVisitor visitor) {
     _forSetOrMapLiteral.add(_Subscription(linter, visitor, _getTimer(linter)));
   }
diff --git a/pkg/analyzer/lib/src/lint/registry.dart b/pkg/analyzer/lib/src/lint/registry.dart
index 3fd2ff3..b1c2ccd 100644
--- a/pkg/analyzer/lib/src/lint/registry.dart
+++ b/pkg/analyzer/lib/src/lint/registry.dart
@@ -4,6 +4,7 @@
 
 import 'dart:collection';
 
+import 'package:analyzer/src/dart/error/lint_codes.dart';
 import 'package:analyzer/src/lint/config.dart';
 import 'package:analyzer/src/lint/linter.dart';
 
@@ -13,7 +14,10 @@
   static final Registry ruleRegistry = Registry();
 
   /// A table mapping rule names to rules.
-  final Map<String, LintRule> _ruleMap = <String, LintRule>{};
+  final Map<String, LintRule> _ruleMap = {};
+
+  /// A table mapping unique names to lint codes.
+  final Map<String, LintCode> _codeMap = {};
 
   @override
   Iterator<LintRule> get iterator => _ruleMap.values.iterator;
@@ -24,6 +28,9 @@
   /// Return the lint rule with the given [name].
   LintRule operator [](String name) => _ruleMap[name];
 
+  /// Return the lint code that has the given [uniqueName].
+  LintCode codeForUniqueName(String uniqueName) => _codeMap[uniqueName];
+
   /// Return a list of the lint rules explicitly enabled by the given [config].
   ///
   /// For example:
@@ -41,5 +48,8 @@
   /// Add the given lint [rule] to this registry.
   void register(LintRule rule) {
     _ruleMap[rule.name] = rule;
+    for (var lintCode in rule.lintCodes) {
+      _codeMap[lintCode.uniqueName] = lintCode;
+    }
   }
 }
diff --git a/pkg/analyzer/lib/src/lint/util.dart b/pkg/analyzer/lib/src/lint/util.dart
index 7325d48..0644fb7 100644
--- a/pkg/analyzer/lib/src/lint/util.dart
+++ b/pkg/analyzer/lib/src/lint/util.dart
@@ -87,7 +87,7 @@
   FeatureSet featureSet;
 
   Spelunker(this.path, {IOSink sink, FeatureSet featureSet})
-      : this.sink = sink ?? stdout,
+      : sink = sink ?? stdout,
         featureSet = featureSet ?? FeatureSet.fromEnableFlags([]);
 
   void spelunk() {
diff --git a/pkg/analyzer/lib/src/services/available_declarations.dart b/pkg/analyzer/lib/src/services/available_declarations.dart
index 3a6484c..c1e1a66 100644
--- a/pkg/analyzer/lib/src/services/available_declarations.dart
+++ b/pkg/analyzer/lib/src/services/available_declarations.dart
@@ -1325,7 +1325,7 @@
       List<String> parameterNames,
       List<String> parameterTypes,
       Declaration parent,
-      List<String> relevanceTags,
+      @required List<String> relevanceTags,
       int requiredParameterCount,
       String returnType,
       String typeParameters,
@@ -1333,9 +1333,6 @@
       if (Identifier.isPrivateName(name.name)) {
         return null;
       }
-      if (isConst) {
-        relevanceTags = [...?relevanceTags, 'isConst'];
-      }
 
       var locationOffset = name.offset;
       var lineLocation = lineInfo.getLocation(locationOffset);
@@ -1392,6 +1389,7 @@
           if (classMember is ConstructorDeclaration) {
             var parameters = classMember.parameters;
             var defaultArguments = _computeDefaultArguments(parameters);
+            var isConst = classMember.constKeyword != null;
 
             var constructorName = classMember.name;
             constructorName ??= SimpleIdentifierImpl(
@@ -1402,6 +1400,7 @@
               ),
             );
 
+            // TODO(brianwilkerson) Should we be passing in `isConst`?
             addDeclaration(
               defaultArgumentListString: defaultArguments?.text,
               defaultArgumentListTextRanges: defaultArguments?.ranges,
@@ -1412,12 +1411,18 @@
               parameterNames: _getFormalParameterNames(parameters),
               parameterTypes: _getFormalParameterTypes(parameters),
               parent: parent,
+              relevanceTags: [
+                'ElementKind.CONSTRUCTOR',
+                if (isConst) 'ElementKind.CONSTRUCTOR+const'
+              ],
               requiredParameterCount:
                   _getFormalParameterRequiredCount(parameters),
               returnType: classMember.returnType.name,
             );
             hasConstructor = true;
           } else if (classMember is FieldDeclaration) {
+            // TODO(brianwilkerson) Why are we creating declarations for
+            //  instance members?
             var isStatic = classMember.isStatic;
             var isConst = classMember.fields.isConst;
             var isFinal = classMember.fields.isFinal;
@@ -1431,7 +1436,11 @@
                 kind: DeclarationKind.FIELD,
                 name: field.name,
                 parent: parent,
-                relevanceTags: RelevanceTags._forExpression(field.initializer),
+                relevanceTags: [
+                  'ElementKind.FIELD',
+                  if (isConst) 'ElementKind.FIELD+const',
+                  ...?RelevanceTags._forExpression(field.initializer)
+                ],
                 returnType: _getTypeAnnotationString(classMember.fields.type),
               );
             }
@@ -1445,6 +1454,7 @@
                 kind: DeclarationKind.GETTER,
                 name: classMember.name,
                 parent: parent,
+                relevanceTags: ['ElementKind.FIELD'],
                 returnType: _getTypeAnnotationString(classMember.returnType),
               );
             } else if (classMember.isSetter) {
@@ -1457,6 +1467,7 @@
                 parameterNames: _getFormalParameterNames(parameters),
                 parameterTypes: _getFormalParameterTypes(parameters),
                 parent: parent,
+                relevanceTags: ['ElementKind.FIELD'],
                 requiredParameterCount:
                     _getFormalParameterRequiredCount(parameters),
               );
@@ -1473,6 +1484,7 @@
                 parameterNames: _getFormalParameterNames(parameters),
                 parameterTypes: _getFormalParameterTypes(parameters),
                 parent: parent,
+                relevanceTags: ['ElementKind.METHOD'],
                 requiredParameterCount:
                     _getFormalParameterRequiredCount(parameters),
                 returnType: _getTypeAnnotationString(classMember.returnType),
@@ -1489,6 +1501,7 @@
           isDeprecated: isDeprecated,
           kind: DeclarationKind.CLASS,
           name: node.name,
+          relevanceTags: ['ElementKind.CLASS'],
         );
         if (classDeclaration == null) continue;
 
@@ -1519,7 +1532,7 @@
             parameterNames: [],
             parameterTypes: [],
             parent: classDeclaration,
-            relevanceTags: null,
+            relevanceTags: ['ElementKind.CONSTRUCTOR'],
             requiredParameterCount: 0,
             returnType: node.name.name,
             typeParameters: null,
@@ -1530,12 +1543,14 @@
           isDeprecated: isDeprecated,
           kind: DeclarationKind.CLASS_TYPE_ALIAS,
           name: node.name,
+          relevanceTags: ['ElementKind.CLASS'],
         );
       } else if (node is EnumDeclaration) {
         var enumDeclaration = addDeclaration(
           isDeprecated: isDeprecated,
           kind: DeclarationKind.ENUM,
           name: node.name,
+          relevanceTags: ['ElementKind.ENUM'],
         );
         if (enumDeclaration == null) continue;
 
@@ -1547,6 +1562,10 @@
             kind: DeclarationKind.ENUM_CONSTANT,
             name: constant.name,
             parent: enumDeclaration,
+            relevanceTags: [
+              'ElementKind.ENUM_CONSTANT',
+              'ElementKind.ENUM_CONSTANT+const'
+            ],
           );
         }
       } else if (node is ExtensionDeclaration) {
@@ -1555,8 +1574,11 @@
             isDeprecated: isDeprecated,
             kind: DeclarationKind.EXTENSION,
             name: node.name,
+            relevanceTags: ['ElementKind.EXTENSION'],
           );
         }
+        // TODO(brianwilkerson) Should we be creating declarations for the
+        //  static members of the extension?
       } else if (node is FunctionDeclaration) {
         var functionExpression = node.functionExpression;
         var parameters = functionExpression.parameters;
@@ -1565,6 +1587,7 @@
             isDeprecated: isDeprecated,
             kind: DeclarationKind.GETTER,
             name: node.name,
+            relevanceTags: ['ElementKind.FUNCTION'],
             returnType: _getTypeAnnotationString(node.returnType),
           );
         } else if (node.isSetter) {
@@ -1575,6 +1598,7 @@
             parameters: parameters.toSource(),
             parameterNames: _getFormalParameterNames(parameters),
             parameterTypes: _getFormalParameterTypes(parameters),
+            relevanceTags: ['ElementKind.FUNCTION'],
             requiredParameterCount:
                 _getFormalParameterRequiredCount(parameters),
           );
@@ -1589,6 +1613,7 @@
             parameters: parameters.toSource(),
             parameterNames: _getFormalParameterNames(parameters),
             parameterTypes: _getFormalParameterTypes(parameters),
+            relevanceTags: ['ElementKind.FUNCTION'],
             requiredParameterCount:
                 _getFormalParameterRequiredCount(parameters),
             returnType: _getTypeAnnotationString(node.returnType),
@@ -1607,6 +1632,7 @@
           parameters: parameters.toSource(),
           parameterNames: _getFormalParameterNames(parameters),
           parameterTypes: _getFormalParameterTypes(parameters),
+          relevanceTags: ['ElementKind.FUNCTION_TYPE_ALIAS'],
           requiredParameterCount: _getFormalParameterRequiredCount(parameters),
           returnType: _getTypeAnnotationString(functionType.returnType),
           typeParameters: functionType.typeParameters?.toSource(),
@@ -1620,6 +1646,7 @@
           parameters: parameters.toSource(),
           parameterNames: _getFormalParameterNames(parameters),
           parameterTypes: _getFormalParameterTypes(parameters),
+          relevanceTags: ['ElementKind.FUNCTION_TYPE_ALIAS'],
           requiredParameterCount: _getFormalParameterRequiredCount(parameters),
           returnType: _getTypeAnnotationString(node.returnType),
           typeParameters: node.typeParameters?.toSource(),
@@ -1629,6 +1656,7 @@
           isDeprecated: isDeprecated,
           kind: DeclarationKind.MIXIN,
           name: node.name,
+          relevanceTags: ['ElementKind.MIXIN'],
         );
         if (mixinDeclaration == null) continue;
         addClassMembers(mixinDeclaration, node.members);
@@ -1643,7 +1671,11 @@
             isFinal: isFinal,
             kind: DeclarationKind.VARIABLE,
             name: variable.name,
-            relevanceTags: RelevanceTags._forExpression(variable.initializer),
+            relevanceTags: [
+              'ElementKind.TOP_LEVEL_VARIABLE',
+              if (isConst) 'ElementKind.TOP_LEVEL_VARIABLE+const',
+              ...?RelevanceTags._forExpression(variable.initializer)
+            ],
             returnType: _getTypeAnnotationString(node.variables.type),
           );
         }
@@ -1653,8 +1685,11 @@
 
   void _computeRelevanceTags(List<Declaration> declarations) {
     for (var declaration in declarations) {
-      declaration._relevanceTags ??=
-          RelevanceTags._forDeclaration(uriStr, declaration);
+      var tags = RelevanceTags._forDeclaration(uriStr, declaration);
+      if (tags != null) {
+        declaration._relevanceTags ??= [];
+        declaration._relevanceTags.addAll(tags);
+      }
       _computeRelevanceTags(declaration.children);
     }
   }
diff --git a/pkg/analyzer/lib/src/services/lint.dart b/pkg/analyzer/lib/src/services/lint.dart
index f65130f..495e345 100644
--- a/pkg/analyzer/lib/src/services/lint.dart
+++ b/pkg/analyzer/lib/src/services/lint.dart
@@ -38,6 +38,15 @@
   /// Return the lint code associated with this linter.
   LintCode get lintCode => null;
 
+  /// Return the lint codes associated with this lint rule.
+  List<LintCode> get lintCodes {
+    var code = lintCode;
+    if (code == null) {
+      return const <LintCode>[];
+    }
+    return <LintCode>[code];
+  }
+
   /// Linter name.
   String get name;
 
diff --git a/pkg/analyzer/lib/src/source/path_filter.dart b/pkg/analyzer/lib/src/source/path_filter.dart
index 891d54d..62a490a 100644
--- a/pkg/analyzer/lib/src/source/path_filter.dart
+++ b/pkg/analyzer/lib/src/source/path_filter.dart
@@ -20,7 +20,7 @@
   /// Construct a new path filter rooted at [root] with [ignorePatterns].
   /// If [pathContext] is not specified, then the system path context is used.
   PathFilter(this.root, List<String> ignorePatterns, [path.Context pathContext])
-      : this.pathContext = pathContext ?? path.context {
+      : pathContext = pathContext ?? path.context {
     setIgnorePatterns(ignorePatterns);
   }
 
diff --git a/pkg/analyzer/lib/src/source/source_resource.dart b/pkg/analyzer/lib/src/source/source_resource.dart
index e240e80..39ef8c3 100644
--- a/pkg/analyzer/lib/src/source/source_resource.dart
+++ b/pkg/analyzer/lib/src/source/source_resource.dart
@@ -45,8 +45,8 @@
   /// 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,
+      : uri = uri ?? file.toUri(),
+        file = file,
         id = _idTable.putIfAbsent(
             '${uri ?? file.toUri()}@${file.path}', () => _idTable.length);
 
diff --git a/pkg/analyzer/lib/src/string_source.dart b/pkg/analyzer/lib/src/string_source.dart
index df408cf..f82279c 100644
--- a/pkg/analyzer/lib/src/string_source.dart
+++ b/pkg/analyzer/lib/src/string_source.dart
@@ -20,7 +20,7 @@
   final int modificationStamp;
 
   StringSource(this._contents, String fullName, {Uri uri})
-      : this.fullName = fullName,
+      : fullName = fullName,
         uri = uri ?? (fullName == null ? null : Uri.file(fullName)),
         modificationStamp = DateTime.now().millisecondsSinceEpoch;
 
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index 8680e93..f7c6b21 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -1,12 +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.
-//
+
 // This file has been automatically generated.  Please do not edit it manually.
 // To regenerate the file, use the SDK script
 // "pkg/analyzer/tool/summary/generate.dart $IDL_FILE_PATH",
 // or "pkg/analyzer/tool/generate_files" for the analyzer package IDL/sources.
 
+// The generator sometimes generates unnecessary 'this' references.
+// ignore_for_file: unnecessary_this
+
 library analyzer.src.summary.format;
 
 import 'dart:convert' as convert;
@@ -137,7 +140,7 @@
     int index = const fb.Uint8Reader().read(bc, offset);
     return index < idl.LinkedNodeTypeKind.values.length
         ? idl.LinkedNodeTypeKind.values[index]
-        : idl.LinkedNodeTypeKind.bottom;
+        : idl.LinkedNodeTypeKind.dynamic_;
   }
 }
 
@@ -16691,7 +16694,7 @@
   }
 
   @override
-  idl.LinkedNodeTypeKind get kind => _kind ??= idl.LinkedNodeTypeKind.bottom;
+  idl.LinkedNodeTypeKind get kind => _kind ??= idl.LinkedNodeTypeKind.dynamic_;
 
   set kind(idl.LinkedNodeTypeKind value) {
     this._kind = value;
@@ -16850,7 +16853,7 @@
     if (offset_interfaceTypeArguments != null) {
       fbBuilder.addOffset(4, offset_interfaceTypeArguments);
     }
-    if (_kind != null && _kind != idl.LinkedNodeTypeKind.bottom) {
+    if (_kind != null && _kind != idl.LinkedNodeTypeKind.dynamic_) {
       fbBuilder.addUint8(5, _kind.index);
     }
     if (_nullabilitySuffix != null &&
@@ -16954,7 +16957,7 @@
   @override
   idl.LinkedNodeTypeKind get kind {
     _kind ??= const _LinkedNodeTypeKindReader()
-        .vTableGet(_bc, _bcOffset, 5, idl.LinkedNodeTypeKind.bottom);
+        .vTableGet(_bc, _bcOffset, 5, idl.LinkedNodeTypeKind.dynamic_);
     return _kind;
   }
 
@@ -17010,7 +17013,7 @@
       _result["interfaceTypeArguments"] =
           interfaceTypeArguments.map((_value) => _value.toJson()).toList();
     }
-    if (kind != idl.LinkedNodeTypeKind.bottom) {
+    if (kind != idl.LinkedNodeTypeKind.dynamic_) {
       _result["kind"] = kind.toString().split('.')[1];
     }
     if (nullabilitySuffix != idl.EntityRefNullabilitySuffix.starOrIrrelevant) {
@@ -17789,6 +17792,7 @@
     with _PackageBundleSdkMixin
     implements idl.PackageBundleSdk {
   String _allowedExperimentsJson;
+  LinkedLanguageVersionBuilder _languageVersion;
 
   @override
   String get allowedExperimentsJson => _allowedExperimentsJson ??= '';
@@ -17798,27 +17802,49 @@
     this._allowedExperimentsJson = value;
   }
 
-  PackageBundleSdkBuilder({String allowedExperimentsJson})
-      : _allowedExperimentsJson = allowedExperimentsJson;
+  @override
+  LinkedLanguageVersionBuilder get languageVersion => _languageVersion;
+
+  /// The language version of the SDK.
+  set languageVersion(LinkedLanguageVersionBuilder value) {
+    this._languageVersion = value;
+  }
+
+  PackageBundleSdkBuilder(
+      {String allowedExperimentsJson,
+      LinkedLanguageVersionBuilder languageVersion})
+      : _allowedExperimentsJson = allowedExperimentsJson,
+        _languageVersion = languageVersion;
 
   /// Flush [informative] data recursively.
-  void flushInformative() {}
+  void flushInformative() {
+    _languageVersion?.flushInformative();
+  }
 
   /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._allowedExperimentsJson ?? '');
+    signature.addBool(this._languageVersion != null);
+    this._languageVersion?.collectApiSignature(signature);
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
     fb.Offset offset_allowedExperimentsJson;
+    fb.Offset offset_languageVersion;
     if (_allowedExperimentsJson != null) {
       offset_allowedExperimentsJson =
           fbBuilder.writeString(_allowedExperimentsJson);
     }
+    if (_languageVersion != null) {
+      offset_languageVersion = _languageVersion.finish(fbBuilder);
+    }
     fbBuilder.startTable();
     if (offset_allowedExperimentsJson != null) {
       fbBuilder.addOffset(0, offset_allowedExperimentsJson);
     }
+    if (offset_languageVersion != null) {
+      fbBuilder.addOffset(1, offset_languageVersion);
+    }
     return fbBuilder.endTable();
   }
 }
@@ -17840,6 +17866,7 @@
   _PackageBundleSdkImpl(this._bc, this._bcOffset);
 
   String _allowedExperimentsJson;
+  idl.LinkedLanguageVersion _languageVersion;
 
   @override
   String get allowedExperimentsJson {
@@ -17847,6 +17874,13 @@
         const fb.StringReader().vTableGet(_bc, _bcOffset, 0, '');
     return _allowedExperimentsJson;
   }
+
+  @override
+  idl.LinkedLanguageVersion get languageVersion {
+    _languageVersion ??=
+        const _LinkedLanguageVersionReader().vTableGet(_bc, _bcOffset, 1, null);
+    return _languageVersion;
+  }
 }
 
 abstract class _PackageBundleSdkMixin implements idl.PackageBundleSdk {
@@ -17856,12 +17890,16 @@
     if (allowedExperimentsJson != '') {
       _result["allowedExperimentsJson"] = allowedExperimentsJson;
     }
+    if (languageVersion != null) {
+      _result["languageVersion"] = languageVersion.toJson();
+    }
     return _result;
   }
 
   @override
   Map<String, Object> toMap() => {
         "allowedExperimentsJson": allowedExperimentsJson,
+        "languageVersion": languageVersion,
       };
 
   @override
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 3829aa2..211f5fb 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -1,7 +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.
-//
+
 // This file has been automatically generated.  Please do not edit it manually.
 // To regenerate the file, use the SDK script
 // "pkg/analyzer/tool/summary/generate.dart $IDL_FILE_PATH",
@@ -414,14 +414,14 @@
 
 /// Kinds of [LinkedNodeType]s.
 enum LinkedNodeTypeKind : byte {
-  bottom,
-
   dynamic_,
 
   function,
 
   interface,
 
+  never,
+
   typeParameter,
 
   void_
@@ -1274,6 +1274,9 @@
 table PackageBundleSdk {
   /// The content of the `allowed_experiments.json` from SDK.
   allowedExperimentsJson:string (id: 0);
+
+  /// The language version of the SDK.
+  languageVersion:LinkedLanguageVersion (id: 1);
 }
 
 /// Summary information about a top-level type inference error.
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index 5648d6e..8f6deea 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -1842,10 +1842,10 @@
 
 /// Kinds of [LinkedNodeType]s.
 enum LinkedNodeTypeKind {
-  bottom,
   dynamic_,
   function,
   interface,
+  never,
   typeParameter,
   void_
 }
@@ -1912,6 +1912,10 @@
   /// The content of the `allowed_experiments.json` from SDK.
   @Id(0)
   String get allowedExperimentsJson;
+
+  /// The language version of the SDK.
+  @Id(1)
+  LinkedLanguageVersion get languageVersion;
 }
 
 /// Summary information about a top-level type inference error.
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 508743d..1c5a27b 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -15,7 +15,7 @@
   }
 
   void setBundle2(LinkedNodeBundleBuilder bundle2) {
-    if (this._bundle2 != null) {
+    if (_bundle2 != null) {
       throw StateError('Bundle2 may be set only once.');
     }
     _bundle2 = bundle2;
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index 3315a88..80cd239 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -10,11 +10,12 @@
     show DartUriResolver, Source, SourceFactory;
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
+import 'package:pub_semver/pub_semver.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].
+/// implement [sdkLibraries], [uris] and [fromFileUri].
 class SummaryBasedDartSdk implements DartSdk {
   SummaryDataStore _dataStore;
   InSummaryUriResolver _uriResolver;
@@ -41,7 +42,7 @@
 
   @override
   String get allowedExperimentsJson {
-    return _bundle.sdk?.allowedExperimentsJson;
+    return _bundle.sdk.allowedExperimentsJson;
   }
 
   /// Return the [PackageBundle] for this SDK, not `null`.
@@ -58,6 +59,12 @@
   }
 
   @override
+  Version get languageVersion {
+    var version = _bundle.sdk.languageVersion;
+    return Version(version.major, version.minor, 0);
+  }
+
+  @override
   List<SdkLibrary> get sdkLibraries {
     throw UnimplementedError();
   }
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
index b029847..8a64bc2 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
@@ -649,6 +649,8 @@
   FieldDeclaration _read_fieldDeclaration(LinkedNode data) {
     var node = astFactory.fieldDeclaration2(
       comment: _readDocumentationComment(data),
+      abstractKeyword:
+          AstBinaryFlags.isAbstract(data.flags) ? _Tokens.ABSTRACT : null,
       covariantKeyword:
           AstBinaryFlags.isCovariant(data.flags) ? _Tokens.COVARIANT : null,
       fieldList: _readNode(data.fieldDeclaration_fields),
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
index f8bdeee..1e8276a 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
@@ -554,6 +554,7 @@
       informativeId: getInformativeId(node),
     );
     builder.flags = AstBinaryFlags.encode(
+      isAbstract: node.abstractKeyword != null,
       isCovariant: node.covariantKeyword != null,
       isStatic: node.staticKeyword != null,
     );
diff --git a/pkg/analyzer/lib/src/summary2/ast_resolver.dart b/pkg/analyzer/lib/src/summary2/ast_resolver.dart
index 06b0f40..2b88556 100644
--- a/pkg/analyzer/lib/src/summary2/ast_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_resolver.dart
@@ -4,10 +4,10 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
 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 0cd8fa6..9276295 100644
--- a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
@@ -357,6 +357,7 @@
   void visitFieldDeclaration(FieldDeclaration node) {
     _classMember(node);
     _token(node.staticKeyword);
+    _token(node.abstractKeyword);
     _token(node.covariantKeyword);
     node.fields.accept(this);
     _token(node.semicolon);
diff --git a/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart b/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
index 7a858a8..bb3c11c 100644
--- a/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/resolver/scope.dart';
+import 'package:analyzer/src/dart/element/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/default_types_builder.dart b/pkg/analyzer/lib/src/summary2/default_types_builder.dart
index ef75758..ce0b852 100644
--- a/pkg/analyzer/lib/src/summary2/default_types_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/default_types_builder.dart
@@ -19,22 +19,27 @@
     for (var node in nodes) {
       if (node is ClassDeclaration) {
         var element = node.declaredElement;
+        _breakSelfCycles(node.typeParameters);
         _breakRawTypeCycles(element, node.typeParameters);
         _computeBounds(element, node.typeParameters);
       } else if (node is ClassTypeAlias) {
         var element = node.declaredElement;
+        _breakSelfCycles(node.typeParameters);
         _breakRawTypeCycles(element, node.typeParameters);
         _computeBounds(element, node.typeParameters);
       } else if (node is FunctionTypeAlias) {
         var element = node.declaredElement;
+        _breakSelfCycles(node.typeParameters);
         _breakRawTypeCycles(element, node.typeParameters);
         _computeBounds(element, node.typeParameters);
       } else if (node is GenericTypeAlias) {
         var element = node.declaredElement;
+        _breakSelfCycles(node.typeParameters);
         _breakRawTypeCycles(element, node.typeParameters);
         _computeBounds(element, node.typeParameters);
       } else if (node is MixinDeclaration) {
         var element = node.declaredElement;
+        _breakSelfCycles(node.typeParameters);
         _breakRawTypeCycles(element, node.typeParameters);
         _computeBounds(element, node.typeParameters);
       }
@@ -86,6 +91,45 @@
     }
   }
 
+  void _breakSelfCycles(TypeParameterList parameterList) {
+    if (parameterList == null) return;
+    var typeParameters = parameterList.typeParameters;
+
+    Map<String, TypeParameter> typeParametersByName;
+    for (var parameter in typeParameters) {
+      var boundNode = parameter.bound;
+      if (boundNode is TypeName) {
+        if (typeParametersByName == null) {
+          typeParametersByName = {};
+          for (var parameterNode in typeParameters) {
+            var name = parameterNode.name.name;
+            typeParametersByName[name] = parameterNode;
+          }
+        }
+
+        var current = parameter;
+        for (var step = 0;
+            current != null && step < typeParameters.length;
+            ++step) {
+          var bound = current.bound;
+          if (bound is TypeName) {
+            var typeNameIdentifier = bound.name;
+            if (typeNameIdentifier is SimpleIdentifier) {
+              current = typeParametersByName[typeNameIdentifier.name];
+              continue;
+            }
+          }
+          current = null;
+          break;
+        }
+
+        if (current != null) {
+          boundNode.type = DynamicTypeImpl.instance;
+        }
+      }
+    }
+  }
+
   /// Build actual default type [DartType]s from computed [TypeBuilder]s.
   void _build(TypeParameterList parameterList) {
     if (parameterList == null) return;
diff --git a/pkg/analyzer/lib/src/summary2/default_value_resolver.dart b/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
index f3cee91..a8398e4 100644
--- a/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
@@ -4,9 +4,9 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.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;
 import 'package:analyzer/src/summary2/ast_resolver.dart';
 import 'package:analyzer/src/summary2/link.dart';
diff --git a/pkg/analyzer/lib/src/summary2/function_type_builder.dart b/pkg/analyzer/lib/src/summary2/function_type_builder.dart
index 4114f26..74cf1fd 100644
--- a/pkg/analyzer/lib/src/summary2/function_type_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/function_type_builder.dart
@@ -6,9 +6,12 @@
 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_visitor.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/extensions.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_visitor.dart';
 import 'package:analyzer/src/summary2/lazy_ast.dart';
 import 'package:analyzer/src/summary2/type_builder.dart';
 
@@ -61,6 +64,16 @@
   Element get element => null;
 
   @override
+  R accept<R>(TypeVisitor<R> visitor) {
+    if (visitor is LinkingTypeVisitor<R>) {
+      var visitor2 = visitor as LinkingTypeVisitor<R>;
+      return visitor2.visitFunctionTypeBuilder(this);
+    } else {
+      throw StateError('Should not happen outside linking.');
+    }
+  }
+
+  @override
   DartType build() {
     if (_type != null) {
       return _type;
@@ -148,11 +161,10 @@
     bool isNNBD,
     FormalParameterList node,
   ) {
-    return node.parameters.map((parameter) {
+    return node.parameters.asImpl.map((parameter) {
       return ParameterElementImpl.synthetic(
         parameter.identifier?.name ?? '',
         _getParameterType(isNNBD, parameter),
-        // ignore: deprecated_member_use_from_same_package
         parameter.kind,
       );
     }).toList();
diff --git a/pkg/analyzer/lib/src/summary2/library_builder.dart b/pkg/analyzer/lib/src/summary2/library_builder.dart
index e7c61e6..14ab9ad3 100644
--- a/pkg/analyzer/lib/src/summary2/library_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/library_builder.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/dart/ast/ast.dart' as ast;
 import 'package:analyzer/src/dart/ast/mixin_super_invoked_names.dart';
 import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/resolver/scope.dart' show LibraryScope;
+import 'package:analyzer/src/dart/element/scope.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
@@ -209,7 +209,7 @@
 
   void buildElement() {
     element = linker.elementFactory.libraryOfUri('$uri');
-    scope = LibraryScope(element);
+    scope = element.scope;
   }
 
   void buildInitialExportScope() {
@@ -300,7 +300,7 @@
       return null;
     }
     var relativeUri = Uri.parse(relativeUriStr);
-    return resolveRelativeUri(this.uri, relativeUri);
+    return resolveRelativeUri(uri, relativeUri);
   }
 
   String _selectRelativeUri(
diff --git a/pkg/analyzer/lib/src/summary2/linked_element_factory.dart b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
index 374cfb3..caeb168 100644
--- a/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
+++ b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
@@ -150,14 +150,8 @@
   /// We have linked the bundle, and need to disconnect its libraries, so
   /// that the client can re-add the bundle, this time read from bytes.
   void removeBundle(LinkedBundleContext context) {
-    // TODO(scheglov) Use removeLibraries()
-    for (var uriStr in context.libraryMap.keys) {
-      libraryMap.remove(uriStr);
-      rootReference.removeChild(uriStr);
-    }
-
-    var classHierarchy = analysisSession.classHierarchy;
-    classHierarchy.removeOfLibraries(context.libraryMap.keys);
+    var uriStrList = context.libraryMap.keys.toList();
+    removeLibraries(uriStrList);
   }
 
   /// Remove libraries with the specified URIs from the reference tree, and
@@ -168,8 +162,9 @@
       rootReference.removeChild(uriStr);
     }
 
-    var classHierarchy = analysisSession.classHierarchy;
-    classHierarchy.removeOfLibraries(uriStrList);
+    var uriStrSet = uriStrList.toSet();
+    analysisSession.classHierarchy.removeOfLibraries(uriStrSet);
+    analysisSession.inheritanceManager.removeOfLibraries(uriStrSet);
   }
 
   /// Set optional informative data for the unit.
diff --git a/pkg/analyzer/lib/src/summary2/linked_unit_context.dart b/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
index a5d02ce..b7bae75 100644
--- a/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
+++ b/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
@@ -769,6 +769,20 @@
       return false;
     } else if (node is MethodDeclaration) {
       return LazyMethodDeclaration.isAbstract(node);
+    } else if (node is VariableDeclaration) {
+      var parent = node.parent;
+      if (parent is VariableDeclarationList) {
+        var grandParent = parent.parent;
+        if (grandParent is FieldDeclaration) {
+          return grandParent.abstractKeyword != null;
+        } else {
+          throw UnimplementedError('${grandParent.runtimeType}');
+        }
+      } else {
+        throw UnimplementedError('${parent.runtimeType}');
+      }
+    } else if (node is EnumConstantDeclaration) {
+      return false;
     }
     throw UnimplementedError('${node.runtimeType}');
   }
@@ -922,10 +936,7 @@
     if (linkedType == null) return null;
 
     var kind = linkedType.kind;
-    if (kind == LinkedNodeTypeKind.bottom) {
-      var nullabilitySuffix = _nullabilitySuffix(linkedType.nullabilitySuffix);
-      return NeverTypeImpl.instance.withNullability(nullabilitySuffix);
-    } else if (kind == LinkedNodeTypeKind.dynamic_) {
+    if (kind == LinkedNodeTypeKind.dynamic_) {
       return DynamicTypeImpl.instance;
     } else if (kind == LinkedNodeTypeKind.function) {
       var typeParameterDataList = linkedType.functionTypeParameters;
@@ -985,6 +996,9 @@
         typeArguments: linkedType.interfaceTypeArguments.map(readType).toList(),
         nullabilitySuffix: nullabilitySuffix,
       );
+    } else if (kind == LinkedNodeTypeKind.never) {
+      var nullabilitySuffix = _nullabilitySuffix(linkedType.nullabilitySuffix);
+      return NeverTypeImpl.instance.withNullability(nullabilitySuffix);
     } else if (kind == LinkedNodeTypeKind.typeParameter) {
       TypeParameterElement element;
       var id = linkedType.typeParameterId;
diff --git a/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart b/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
index f2fa94d..72d0e9d 100644
--- a/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
+++ b/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
@@ -78,12 +78,7 @@
   LinkedNodeTypeBuilder writeType(DartType type) {
     if (type == null) return null;
 
-    if (type.isBottom) {
-      return LinkedNodeTypeBuilder(
-        kind: LinkedNodeTypeKind.bottom,
-        nullabilitySuffix: _nullabilitySuffix(type),
-      );
-    } else if (type.isDynamic) {
+    if (type.isDynamic) {
       return LinkedNodeTypeBuilder(
         kind: LinkedNodeTypeKind.dynamic_,
       );
@@ -96,6 +91,11 @@
         interfaceTypeArguments: type.typeArguments.map(writeType).toList(),
         nullabilitySuffix: _nullabilitySuffix(type),
       );
+    } else if (type is NeverType) {
+      return LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.never,
+        nullabilitySuffix: _nullabilitySuffix(type),
+      );
     } else if (type is TypeParameterType) {
       TypeParameterElementImpl element = type.element;
       var id = _typeParameters[element];
diff --git a/pkg/analyzer/lib/src/summary2/linking_node_scope.dart b/pkg/analyzer/lib/src/summary2/linking_node_scope.dart
index 8c8e6e9..a97dccc 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/dart/resolver/scope.dart';
+import 'package:analyzer/dart/element/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 219a1e6..a4182c5 100644
--- a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
@@ -5,8 +5,8 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/src/dart/element/element.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 0edea72..0bc869d 100644
--- a/pkg/analyzer/lib/src/summary2/named_type_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/named_type_builder.dart
@@ -6,10 +6,13 @@
 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_visitor.dart';
+import 'package:analyzer/src/dart/ast/extensions.dart';
 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/summary2/lazy_ast.dart';
 import 'package:analyzer/src/summary2/type_builder.dart';
 import 'package:meta/meta.dart';
@@ -63,6 +66,16 @@
   }
 
   @override
+  R accept<R>(TypeVisitor<R> visitor) {
+    if (visitor is LinkingTypeVisitor<R>) {
+      var visitor2 = visitor as LinkingTypeVisitor<R>;
+      return visitor2.visitNamedTypeBuilder(this);
+    } else {
+      throw StateError('Should not happen outside linking.');
+    }
+  }
+
+  @override
   DartType build() {
     if (_type != null) {
       return _type;
@@ -191,15 +204,7 @@
   }) {
     var returnType = _buildNodeType(returnTypeNode);
     var typeParameters = _typeParameters(typeParameterList);
-
-    var formalParameters = parameterList.parameters.map((parameter) {
-      return ParameterElementImpl.synthetic(
-        parameter.identifier?.name ?? '',
-        _buildFormalParameterType(parameter),
-        // ignore: deprecated_member_use_from_same_package
-        parameter.kind,
-      );
-    }).toList();
+    var formalParameters = _formalParameters(parameterList);
 
     return FunctionTypeImpl(
       typeFormals: typeParameters,
@@ -230,6 +235,16 @@
     }
   }
 
+  List<ParameterElementImpl> _formalParameters(FormalParameterList node) {
+    return node.parameters.asImpl.map((parameter) {
+      return ParameterElementImpl.synthetic(
+        parameter.identifier?.name ?? '',
+        _buildFormalParameterType(parameter),
+        parameter.kind,
+      );
+    }).toList();
+  }
+
   NullabilitySuffix _getNullabilitySuffix(bool hasQuestion) {
     if (hasQuestion) {
       return NullabilitySuffix.question;
diff --git a/pkg/analyzer/lib/src/summary2/reference_resolver.dart b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
index 3e93c70..013ec70 100644
--- a/pkg/analyzer/lib/src/summary2/reference_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
@@ -7,11 +7,12 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/scope.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/summary/idl.dart';
 import 'package:analyzer/src/summary2/function_type_builder.dart';
 import 'package:analyzer/src/summary2/lazy_ast.dart';
@@ -34,7 +35,6 @@
   final TypeSystemImpl _typeSystem;
   final NodesToBuildType nodesToBuildType;
   final LinkedElementFactory elementFactory;
-  final LibraryElement _libraryElement;
   final Reference unitReference;
 
   /// Indicates whether the library is opted into NNBD.
@@ -52,11 +52,11 @@
   ReferenceResolver(
     this.nodesToBuildType,
     this.elementFactory,
-    this._libraryElement,
+    LibraryElement libraryElement,
     this.unitReference,
     this.isNNBD,
     this.scope,
-  )   : _typeSystem = _libraryElement.typeSystem,
+  )   : _typeSystem = libraryElement.typeSystem,
         reference = unitReference;
 
   @override
@@ -74,7 +74,7 @@
     node.name.staticElement = element;
 
     _createTypeParameterElements(node.typeParameters);
-    scope = TypeParameterScope(scope, element);
+    scope = TypeParameterScope(scope, element.typeParameters);
 
     node.typeParameters?.accept(this);
     node.extendsClause?.accept(this);
@@ -109,9 +109,9 @@
 
     ClassElementImpl element = reference.element;
     node.name.staticElement = element;
+
     _createTypeParameterElements(node.typeParameters);
-    scope = TypeParameterScope(scope, element);
-    scope = ClassScope(scope, element);
+    scope = TypeParameterScope(scope, element.typeParameters);
     LinkingNodeContext(node, scope);
 
     node.typeParameters?.accept(this);
@@ -143,10 +143,10 @@
       reference,
       node,
     );
+    (node as ConstructorDeclarationImpl).declaredElement = element;
 
-    var functionScope = FunctionScope(scope, element);
-    functionScope.defineParameters();
-    LinkingNodeContext(node, functionScope);
+    scope = TypeParameterScope(scope, element.typeParameters);
+    LinkingNodeContext(node, scope);
 
     node.parameters?.accept(this);
     node.initializers.accept(
@@ -188,7 +188,7 @@
     node.name?.staticElement = element;
 
     _createTypeParameterElements(node.typeParameters);
-    scope = TypeParameterScope(scope, element);
+    scope = TypeParameterScope(scope, element.typeParameters);
 
     node.typeParameters?.accept(this);
     node.extendedType.accept(this);
@@ -223,18 +223,15 @@
     reference = reference.getChild('@parameter').getChild(name);
     reference.node = node;
 
-    var element = ParameterElementImpl.forLinkedNode(
+    var element = FieldFormalParameterElementImpl.forLinkedNode(
       outerReference.element,
       reference,
       node,
     );
     node.identifier.staticElement = element;
-    _createTypeParameterElements(node.typeParameters);
 
-    scope = EnclosedScope(scope);
-    for (var typeParameter in element.typeParameters) {
-      scope.define(typeParameter);
-    }
+    _createTypeParameterElements(node.typeParameters);
+    scope = TypeParameterScope(scope, element.typeParameters);
 
     node.type?.accept(this);
     node.typeParameters?.accept(this);
@@ -268,8 +265,9 @@
 
     ExecutableElementImpl element = reference.element;
     node.name.staticElement = element;
+
     _createTypeParameterElements(node.functionExpression.typeParameters);
-    scope = FunctionScope(scope, element);
+    scope = TypeParameterScope(outerScope, element.typeParameters);
     LinkingNodeContext(node, scope);
 
     node.returnType?.accept(this);
@@ -296,8 +294,9 @@
 
     GenericTypeAliasElementImpl element = reference.element;
     node.name.staticElement = element;
+
     _createTypeParameterElements(node.typeParameters);
-    scope = FunctionTypeScope(outerScope, element);
+    scope = TypeParameterScope(outerScope, element.typeParameters);
 
     node.returnType?.accept(this);
     node.typeParameters?.accept(this);
@@ -327,12 +326,9 @@
       node,
     );
     node.identifier.staticElement = element;
-    _createTypeParameterElements(node.typeParameters);
 
-    scope = EnclosedScope(scope);
-    for (var typeParameter in element.typeParameters) {
-      scope.define(typeParameter);
-    }
+    _createTypeParameterElements(node.typeParameters);
+    scope = TypeParameterScope(scope, element.typeParameters);
 
     node.returnType?.accept(this);
     node.typeParameters?.accept(this);
@@ -360,8 +356,9 @@
       node,
     );
     (node as GenericFunctionTypeImpl).declaredElement = element;
+
     _createTypeParameterElements(node.typeParameters);
-    scope = TypeParameterScope(outerScope, element);
+    scope = TypeParameterScope(outerScope, element.typeParameters);
 
     node.returnType?.accept(this);
     node.typeParameters?.accept(this);
@@ -386,8 +383,9 @@
 
     GenericTypeAliasElementImpl element = reference.element;
     node.name.staticElement = element;
+
     _createTypeParameterElements(node.typeParameters);
-    scope = TypeParameterScope(outerScope, element);
+    scope = TypeParameterScope(outerScope, element.typeParameters);
 
     node.typeParameters?.accept(this);
     node.functionType?.accept(this);
@@ -425,7 +423,8 @@
     );
     node.name.staticElement = element;
     _createTypeParameterElements(node.typeParameters);
-    scope = FunctionScope(scope, element);
+
+    scope = TypeParameterScope(scope, element.typeParameters);
     LinkingNodeContext(node, scope);
 
     node.returnType?.accept(this);
@@ -449,7 +448,7 @@
     node.name.staticElement = element;
 
     _createTypeParameterElements(node.typeParameters);
-    scope = TypeParameterScope(scope, element);
+    scope = TypeParameterScope(scope, element.typeParameters);
 
     node.typeParameters?.accept(this);
     node.onClause?.accept(this);
@@ -492,19 +491,33 @@
 
   @override
   void visitTypeName(TypeName node) {
-    var typeName = node.name;
-    if (typeName is SimpleIdentifier && typeName.name == 'void') {
-      node.type = VoidTypeImpl.instance;
-      return;
-    }
+    var typeIdentifier = node.name;
 
-    var element = scope.lookup(typeName, _libraryElement);
-    if (typeName is SimpleIdentifier) {
-      typeName.staticElement = element;
-    } else if (typeName is PrefixedIdentifier) {
-      typeName.identifier.staticElement = element;
-      SimpleIdentifier prefix = typeName.prefix;
-      prefix.staticElement = scope.lookup(prefix, _libraryElement);
+    Element element;
+    if (typeIdentifier is PrefixedIdentifier) {
+      var prefix = typeIdentifier.prefix;
+      var prefixName = prefix.name;
+      var prefixElement = scope.lookup2(prefixName).getter;
+      prefix.staticElement = prefixElement;
+
+      if (prefixElement is PrefixElement) {
+        var nameNode = typeIdentifier.identifier;
+        var name = nameNode.name;
+
+        element = prefixElement.scope.lookup2(name).getter;
+        nameNode.staticElement = element;
+      }
+    } else {
+      var nameNode = typeIdentifier as SimpleIdentifier;
+      var name = nameNode.name;
+
+      if (name == 'void') {
+        node.type = VoidTypeImpl.instance;
+        return;
+      }
+
+      element = scope.lookup2(name).getter;
+      nameNode.staticElement = element;
     }
 
     node.typeArguments?.accept(this);
diff --git a/pkg/analyzer/lib/src/summary2/scope.dart b/pkg/analyzer/lib/src/summary2/scope.dart
index b9da45d..11d7d60 100644
--- a/pkg/analyzer/lib/src/summary2/scope.dart
+++ b/pkg/analyzer/lib/src/summary2/scope.dart
@@ -16,7 +16,7 @@
     map[name] = reference;
   }
 
-  void forEach(Function(String name, Reference reference) f) {
+  void forEach(void Function(String name, Reference reference) f) {
     map.forEach(f);
   }
 
diff --git a/pkg/analyzer/lib/src/summary2/top_level_inference.dart b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
index 20ab4a3..2bd5727 100644
--- a/pkg/analyzer/lib/src/summary2/top_level_inference.dart
+++ b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
@@ -5,12 +5,12 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/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';
 import 'package:analyzer/src/summary/format.dart';
diff --git a/pkg/analyzer/lib/src/summary2/types_builder.dart b/pkg/analyzer/lib/src/summary2/types_builder.dart
index 517f976..5248e64 100644
--- a/pkg/analyzer/lib/src/summary2/types_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/types_builder.dart
@@ -8,6 +8,7 @@
 import 'package:analyzer/dart/element/nullability_suffix.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
+import 'package:analyzer/src/dart/ast/extensions.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';
@@ -55,24 +56,8 @@
     NullabilitySuffix nullabilitySuffix,
   ) {
     var returnType = returnTypeNode?.type ?? _dynamicType;
-
-    List<TypeParameterElement> typeParameters;
-    if (typeParameterList != null) {
-      typeParameters = typeParameterList.typeParameters
-          .map<TypeParameterElement>((p) => p.declaredElement)
-          .toList();
-    } else {
-      typeParameters = const <TypeParameterElement>[];
-    }
-
-    var formalParameters = parameterList.parameters.map((parameter) {
-      return ParameterElementImpl.synthetic(
-        parameter.identifier?.name ?? '',
-        _getType(parameter),
-        // ignore: deprecated_member_use_from_same_package
-        parameter.kind,
-      );
-    }).toList();
+    var typeParameters = _typeParameters(typeParameterList);
+    var formalParameters = _formalParameters(parameterList);
 
     return FunctionTypeImpl(
       typeFormals: typeParameters,
@@ -156,6 +141,16 @@
     }
   }
 
+  List<ParameterElementImpl> _formalParameters(FormalParameterList node) {
+    return node.parameters.asImpl.map((parameter) {
+      return ParameterElementImpl.synthetic(
+        parameter.identifier?.name ?? '',
+        _getType(parameter),
+        parameter.kind,
+      );
+    }).toList();
+  }
+
   void _functionTypeAlias(FunctionTypeAlias node) {
     var returnTypeNode = node.returnType;
     LazyAst.setReturnType(node, returnTypeNode?.type ?? _dynamicType);
@@ -188,6 +183,16 @@
     }
   }
 
+  List<TypeParameterElement> _typeParameters(TypeParameterList node) {
+    if (node == null) {
+      return const <TypeParameterElement>[];
+    }
+
+    return node.typeParameters
+        .map<TypeParameterElement>((p) => p.declaredElement)
+        .toList();
+  }
+
   static DartType _getType(FormalParameter node) {
     if (node is DefaultFormalParameter) {
       return _getType(node.parameter);
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index 0d1d5b3..33db715 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -17,7 +17,8 @@
 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/error/codes.dart'
+    show CompileTimeErrorCode, StrongModeCode;
 import 'package:analyzer/src/summary/idl.dart';
 
 /// Given an [expression] and a corresponding [typeSystem] and [typeProvider],
@@ -174,9 +175,7 @@
       checkAssignment(element.expression, expressionCastType);
 
       var exprType = element.expression.staticType;
-      var asIterableType = exprType is InterfaceTypeImpl
-          ? exprType.asInstanceOf(typeProvider.iterableElement)
-          : null;
+      var asIterableType = exprType.asInstanceOf(typeProvider.iterableElement);
       var elementType =
           asIterableType == null ? null : asIterableType.typeArguments[0];
       // Items in the spread will then potentially be downcast to the expected
@@ -213,9 +212,7 @@
       checkAssignment(element.expression, expressionCastType);
 
       var exprType = element.expression.staticType;
-      var asMapType = exprType is InterfaceTypeImpl
-          ? exprType.asInstanceOf(typeProvider.mapElement)
-          : null;
+      var asMapType = exprType.asInstanceOf(typeProvider.mapElement);
 
       var elementKeyType =
           asMapType == null ? null : asMapType.typeArguments[0];
@@ -310,7 +307,12 @@
     for (int i = 0, last = init.length - 1; i < last; i++) {
       final node = init[i];
       if (node is SuperConstructorInvocation) {
-        _recordMessage(node, StrongModeCode.INVALID_SUPER_INVOCATION, [node]);
+        // TODO(srawlins): Don't report this when
+        //  [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR] or
+        //  [CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS] is reported for
+        //  this constructor.
+        _recordMessage(
+            node, CompileTimeErrorCode.INVALID_SUPER_INVOCATION, [node]);
       }
     }
   }
@@ -351,23 +353,6 @@
   }
 
   @override
-  void visitFieldFormalParameter(FieldFormalParameter node) {
-    var element = node.declaredElement;
-    var typeName = node.type;
-    if (typeName != null) {
-      var type = _elementType(element);
-      var fieldElement =
-          node.identifier.staticElement as FieldFormalParameterElement;
-      var fieldType = _elementType(fieldElement.field);
-      if (!rules.isSubtypeOf2(type, fieldType)) {
-        _recordMessage(node, StrongModeCode.INVALID_PARAMETER_DECLARATION,
-            [node, fieldType]);
-      }
-    }
-    node.visitChildren(this);
-  }
-
-  @override
   void visitForEachPartsWithDeclaration(ForEachPartsWithDeclaration node) {
     _visitForEachParts(node, node.loopVariable?.identifier);
     node.visitChildren(this);
@@ -845,11 +830,9 @@
 
   DartType _getInstanceTypeArgument(
       DartType expressionType, ClassElement instanceType) {
-    if (expressionType is InterfaceTypeImpl) {
-      var asInstanceType = expressionType.asInstanceOf(instanceType);
-      if (asInstanceType != null) {
-        return asInstanceType.typeArguments[0];
-      }
+    var asInstanceType = expressionType.asInstanceOf(instanceType);
+    if (asInstanceType != null) {
+      return asInstanceType.typeArguments[0];
     }
     return null;
   }
@@ -918,9 +901,9 @@
   void _recordImplicitCast(Expression expr, DartType to,
       {DartType from,
       bool opAssign = false,
-      forSpread = false,
-      forSpreadKey = false,
-      forSpreadValue = false}) {
+      bool forSpread = false,
+      bool forSpreadKey = false,
+      bool forSpreadValue = false}) {
     // If this is an implicit tearoff, we need to mark the cast, but we don't
     // want to warn if it's a legal subtype.
     if (from is InterfaceType && rules.acceptsFunctionType(to)) {
@@ -940,28 +923,29 @@
         // runtime.
         if (expr is ListLiteral) {
           _recordMessage(
-              expr, StrongModeCode.INVALID_CAST_LITERAL_LIST, [from, to]);
+              expr, CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST, [from, to]);
         } else if (expr is SetOrMapLiteral) {
           if (expr.isMap) {
-            _recordMessage(
-                expr, StrongModeCode.INVALID_CAST_LITERAL_MAP, [from, to]);
+            _recordMessage(expr, CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP,
+                [from, to]);
           } else if (expr.isSet) {
-            _recordMessage(
-                expr, StrongModeCode.INVALID_CAST_LITERAL_SET, [from, to]);
+            _recordMessage(expr, CompileTimeErrorCode.INVALID_CAST_LITERAL_SET,
+                [from, to]);
           } else {
             // This should only happen when the code is invalid, in which case
             // the error should have been reported elsewhere.
           }
         } else {
-          _recordMessage(
-              expr, StrongModeCode.INVALID_CAST_LITERAL, [expr, from, to]);
+          _recordMessage(expr, CompileTimeErrorCode.INVALID_CAST_LITERAL,
+              [expr, from, to]);
         }
         return;
       }
 
       if (expr is FunctionExpression) {
+        // TODO(srawlins): Add _any_ test that shows this code is reported.
         _recordMessage(
-            expr, StrongModeCode.INVALID_CAST_FUNCTION_EXPR, [from, to]);
+            expr, CompileTimeErrorCode.INVALID_CAST_FUNCTION_EXPR, [from, to]);
         return;
       }
 
@@ -971,7 +955,7 @@
           // fromT should be an exact type - this will almost certainly fail at
           // runtime.
           _recordMessage(
-              expr, StrongModeCode.INVALID_CAST_NEW_EXPR, [from, to]);
+              expr, CompileTimeErrorCode.INVALID_CAST_NEW_EXPR, [from, to]);
           return;
         }
       }
@@ -981,8 +965,8 @@
         _recordMessage(
             expr,
             e is MethodElement
-                ? StrongModeCode.INVALID_CAST_METHOD
-                : StrongModeCode.INVALID_CAST_FUNCTION,
+                ? CompileTimeErrorCode.INVALID_CAST_METHOD
+                : CompileTimeErrorCode.INVALID_CAST_FUNCTION,
             [e.name, from, to]);
         return;
       }
@@ -1067,18 +1051,7 @@
   final CodeChecker _codeChecker;
   final String _name;
 
-  /// A flag indicating whether certain diagnostics related to top-level
-  /// elements should be produced. The diagnostics are the ones introduced by
-  /// the analyzer to signal to users when the version of type inference
-  /// performed by the analyzer was unable to accurately infer type information.
-  /// The implementation of type inference used by the task model still has
-  /// these deficiencies, but the implementation used by the driver does not.
-  // TODO(brianwilkerson) Remove this field when the task model has been
-  // removed.
-  final bool flagTopLevel;
-
-  _TopLevelInitializerValidator(this._codeChecker, this._name,
-      {this.flagTopLevel = true});
+  _TopLevelInitializerValidator(this._codeChecker, this._name);
 
   void validateHasType(AstNode n, PropertyAccessorElement e) {
     if (e.hasImplicitReturnType) {
@@ -1086,8 +1059,12 @@
       TopLevelInferenceError error = variable.typeInferenceError;
       if (error != null) {
         if (error.kind == TopLevelInferenceErrorKind.dependencyCycle) {
-          _codeChecker._recordMessage(
-              n, StrongModeCode.TOP_LEVEL_CYCLE, [_name, error.arguments]);
+          // Errors on const should have been reported with
+          // [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT].
+          if (!variable.isConst) {
+            _codeChecker._recordMessage(n, CompileTimeErrorCode.TOP_LEVEL_CYCLE,
+                [_name, error.arguments]);
+          }
         } else {
           _codeChecker._recordMessage(
               n, StrongModeCode.TOP_LEVEL_IDENTIFIER_NO_TYPE, [_name, e.name]);
@@ -1111,7 +1088,7 @@
       if (e is PropertyAccessorElement) {
         if (e.isStatic) {
           validateHasType(n, e);
-        } else if (e.hasImplicitReturnType && flagTopLevel) {
+        } else if (e.hasImplicitReturnType) {
           _codeChecker._recordMessage(
               n, StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, [_name, e.name]);
         }
@@ -1119,7 +1096,7 @@
           e is ExecutableElement &&
           e.kind == ElementKind.METHOD &&
           !e.isStatic) {
-        if (_hasAnyImplicitType(e) && flagTopLevel) {
+        if (_hasAnyImplicitType(e)) {
           _codeChecker._recordMessage(
               n, StrongModeCode.TOP_LEVEL_INSTANCE_METHOD, [_name, e.name]);
         }
@@ -1223,16 +1200,14 @@
     if (method is ExecutableElement) {
       if (method.kind == ElementKind.METHOD &&
           !method.isStatic &&
-          method.hasImplicitReturnType &&
-          flagTopLevel) {
+          method.hasImplicitReturnType) {
         _codeChecker._recordMessage(node,
             StrongModeCode.TOP_LEVEL_INSTANCE_METHOD, [_name, method.name]);
       }
       if (node.typeArguments == null && method.typeParameters.isNotEmpty) {
         if (method.kind == ElementKind.METHOD &&
             !method.isStatic &&
-            _anyParameterHasImplicitType(method) &&
-            flagTopLevel) {
+            _anyParameterHasImplicitType(method)) {
           _codeChecker._recordMessage(node,
               StrongModeCode.TOP_LEVEL_INSTANCE_METHOD, [_name, method.name]);
         }
diff --git a/pkg/analyzer/lib/src/test_utilities/find_node.dart b/pkg/analyzer/lib/src/test_utilities/find_node.dart
index 65daa02..07b410e 100644
--- a/pkg/analyzer/lib/src/test_utilities/find_node.dart
+++ b/pkg/analyzer/lib/src/test_utilities/find_node.dart
@@ -259,6 +259,10 @@
     return _node(search, (n) => n is Statement);
   }
 
+  StringInterpolation stringInterpolation(String search) {
+    return _node(search, (n) => n is StringInterpolation);
+  }
+
   StringLiteral stringLiteral(String search) {
     return _node(search, (n) => n is StringLiteral);
   }
diff --git a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
index d44f818..1807d8d 100644
--- a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
+++ b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
@@ -5,10 +5,12 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:meta/meta.dart';
+import 'package:pub_semver/src/version.dart';
 
 const String sdkRoot = '/sdk';
 
@@ -1069,6 +1071,7 @@
   'io': 'const LibraryInfo("io/io.dart")',
   'isolate': 'const LibraryInfo("isolate/isolate.dart")',
   'math': 'const LibraryInfo("math/math.dart")',
+  '_internal': 'const LibraryInfo("_internal/internal.dart", categories: "")',
 };
 
 class MockSdk implements DartSdk {
@@ -1084,6 +1087,8 @@
   @override
   final List<SdkLibrary> sdkLibraries = [];
 
+  File _versionFile;
+
   /// Optional [additionalLibraries] should have unique URIs, and paths in
   /// their units are relative (will be put into `sdkRoot/lib`).
   MockSdk({
@@ -1091,6 +1096,11 @@
     AnalysisOptionsImpl analysisOptions,
     List<MockSdkLibrary> additionalLibraries = const [],
   }) : _analysisOptions = analysisOptions ?? AnalysisOptionsImpl() {
+    _versionFile = resourceProvider
+        .getFolder(resourceProvider.convertPath(sdkRoot))
+        .getChildAssumingFile('version');
+    _versionFile.writeAsStringSync('2.10.0');
+
     for (MockSdkLibrary library in _LIBRARIES) {
       var convertedLibrary = library._toProvider(resourceProvider);
       sdkLibraries.add(convertedLibrary);
@@ -1101,7 +1111,7 @@
           library.units.map(
             (unit) {
               var pathContext = resourceProvider.pathContext;
-              var absoluteUri = pathContext.join(sdkRoot, unit.path);
+              var absoluteUri = pathContext.join(sdkRoot, 'lib', unit.path);
               return MockSdkLibraryUnit(
                 unit.uriStr,
                 resourceProvider.convertPath(absoluteUri),
@@ -1126,6 +1136,13 @@
       for (var e in _librariesDartEntries.entries) {
         buffer.writeln('"${e.key}": ${e.value},');
       }
+      for (var library in additionalLibraries) {
+        for (var unit in library.units) {
+          var name = unit.uriStr.substring(5);
+          var libraryInfo = 'const LibraryInfo("${unit.path}")';
+          buffer.writeln('"$name": $libraryInfo,');
+        }
+      }
       buffer.writeln('};');
       resourceProvider.newFile(
         resourceProvider.convertPath(
@@ -1180,6 +1197,12 @@
   }
 
   @override
+  Version get languageVersion {
+    var sdkVersionStr = _versionFile.readAsStringSync();
+    return languageVersionFromSdkVersion(sdkVersionStr);
+  }
+
+  @override
   String get sdkVersion => throw UnimplementedError();
 
   @override
diff --git a/pkg/analyzer/lib/src/test_utilities/package_mixin.dart b/pkg/analyzer/lib/src/test_utilities/package_mixin.dart
index ffcf84c..7889ece 100644
--- a/pkg/analyzer/lib/src/test_utilities/package_mixin.dart
+++ b/pkg/analyzer/lib/src/test_utilities/package_mixin.dart
@@ -13,9 +13,40 @@
 
   /// Create a fake 'js' package that can be used by tests.
   void addJsPackage() {
-    Folder lib = addPubPackage('js');
-    newFile(join(lib.path, 'js.dart'), content: r'''
+    var rootFolder = getFolder('/.pub-cache/js');
+    PackagesContent.addJsPackageFiles(rootFolder);
+    addPubPackage('js');
+  }
+
+  /// Create a fake 'meta' package that can be used by tests.
+  void addMetaPackage() {
+    var rootFolder = getFolder('/.pub-cache/meta');
+    PackagesContent.addMetaPackageFiles(rootFolder);
+    addPubPackage('meta');
+  }
+
+  /// Return a newly created directory in which the contents of a pub package
+  /// with the given [packageName] can be written. The package will be added to
+  /// the package map so that the package can be referenced from the code being
+  /// analyzed.
+  Folder addPubPackage(String packageName) {
+    // TODO(brianwilkerson) Consider renaming this to `addPackage` and passing
+    //  in a `PackageStyle` (pub, bazel, gn, build, plain) in order to support
+    //  creating other styles of packages.
+    Folder lib = getFolder('/.pub-cache/$packageName/lib');
+    packageMap[packageName] = [lib];
+    return lib;
+  }
+}
+
+/// Helper for creating mock packages.
+class PackagesContent {
+  /// Create a fake 'js' package that can be used by tests.
+  static void addJsPackageFiles(Folder rootFolder) {
+    var libFolder = rootFolder.getChildAssumingFolder('lib');
+    libFolder.getChildAssumingFile('js.dart').writeAsStringSync(r'''
 library js;
+
 class JS {
   const JS([String js]);
 }
@@ -23,9 +54,9 @@
   }
 
   /// Create a fake 'meta' package that can be used by tests.
-  void addMetaPackage() {
-    Folder lib = addPubPackage('meta');
-    newFile(join(lib.path, 'meta.dart'), content: r'''
+  static void addMetaPackageFiles(Folder rootFolder) {
+    var libFolder = rootFolder.getChildAssumingFolder('lib');
+    libFolder.getChildAssumingFile('meta.dart').writeAsStringSync(r'''
 library meta;
 
 const _AlwaysThrows alwaysThrows = const _AlwaysThrows();
@@ -77,17 +108,4 @@
 }
 ''');
   }
-
-  /// Return a newly created directory in which the contents of a pub package
-  /// with the given [packageName] can be written. The package will be added to
-  /// the package map so that the package can be referenced from the code being
-  /// analyzed.
-  Folder addPubPackage(String packageName) {
-    // TODO(brianwilkerson) Consider renaming this to `addPackage` and passing
-    //  in a `PackageStyle` (pub, bazel, gn, build, plain) in order to support
-    //  creating other styles of packages.
-    Folder lib = getFolder('/.pub-cache/$packageName/lib');
-    packageMap[packageName] = [lib];
-    return lib;
-  }
 }
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 b02dfaf..13aee9b 100644
--- a/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
+++ b/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
@@ -55,11 +55,6 @@
     return resourceProvider.newFile(convertedPath, content);
   }
 
-  File newFileWithBytes(String path, List<int> bytes) {
-    String convertedPath = convertPath(path);
-    return resourceProvider.newFileWithBytes(convertedPath, bytes);
-  }
-
   Folder newFolder(String path) {
     String convertedPath = convertPath(path);
     return resourceProvider.newFolder(convertedPath);
diff --git a/pkg/analyzer/lib/src/util/glob.dart b/pkg/analyzer/lib/src/util/glob.dart
index 2edfd89..3fa8a1a9 100644
--- a/pkg/analyzer/lib/src/util/glob.dart
+++ b/pkg/analyzer/lib/src/util/glob.dart
@@ -39,7 +39,7 @@
   int get hashCode => _pattern.hashCode;
 
   @override
-  bool operator ==(other) => other is Glob && _pattern == other._pattern;
+  bool operator ==(Object 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.
diff --git a/pkg/analyzer/lib/src/util/lru_map.dart b/pkg/analyzer/lib/src/util/lru_map.dart
index 006b02c..050663e 100644
--- a/pkg/analyzer/lib/src/util/lru_map.dart
+++ b/pkg/analyzer/lib/src/util/lru_map.dart
@@ -5,7 +5,7 @@
 import 'dart:collection';
 
 /// This handler is notified when an item is evicted from the cache.
-typedef EvictionHandler<K, V> = Function(K key, V value);
+typedef EvictionHandler<K, V> = void Function(K key, V value);
 
 /// A hash-table based cache implementation.
 ///
diff --git a/pkg/analyzer/lib/src/util/performance/operation_performance.dart b/pkg/analyzer/lib/src/util/performance/operation_performance.dart
index 1764514..c2ce9ae 100644
--- a/pkg/analyzer/lib/src/util/performance/operation_performance.dart
+++ b/pkg/analyzer/lib/src/util/performance/operation_performance.dart
@@ -9,6 +9,10 @@
   /// The child operations, might be empty.
   List<OperationPerformance> get children;
 
+  /// The data attachments, for non-timing data, e.g. how many files were read,
+  /// or how many bytes were processed.
+  List<OperationPerformanceData> get data;
+
   /// The duration of this operation, including its children.
   Duration get elapsed;
 
@@ -27,6 +31,42 @@
   });
 }
 
+/// The data attachment for a [OperationPerformance].
+abstract class OperationPerformanceData<T> {
+  String get name;
+
+  T get value;
+}
+
+abstract class OperationPerformanceDataImpl<T>
+    implements OperationPerformanceData<T> {
+  @override
+  final String name;
+
+  OperationPerformanceDataImpl(this.name);
+
+  @override
+  String toString() {
+    return '$name: $value';
+  }
+}
+
+class OperationPerformanceDataImpl_int
+    extends OperationPerformanceDataImpl<int> {
+  @override
+  int value = 0;
+
+  OperationPerformanceDataImpl_int(String name) : super(name);
+
+  void add(int item) {
+    value += item;
+  }
+
+  void increment() {
+    value++;
+  }
+}
+
 class OperationPerformanceImpl implements OperationPerformance {
   @override
   final String name;
@@ -34,6 +74,8 @@
   final Stopwatch _timer = Stopwatch();
   final List<OperationPerformance> _children = [];
 
+  final Map<String, OperationPerformanceData<Object>> _data = {};
+
   OperationPerformanceImpl(this.name);
 
   @override
@@ -42,6 +84,11 @@
   }
 
   @override
+  List<OperationPerformanceData<Object>> get data {
+    return _data.values.toList();
+  }
+
+  @override
   Duration get elapsed {
     return _timer.elapsed;
   }
@@ -66,6 +113,13 @@
     );
   }
 
+  OperationPerformanceDataImpl_int getDataInt(String name) {
+    return _data.putIfAbsent(
+      name,
+      () => OperationPerformanceDataImpl_int(name),
+    );
+  }
+
   /// 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.
@@ -112,8 +166,17 @@
   }
 
   @override
-  void write({StringBuffer buffer, String indent = ''}) {
-    buffer.writeln('$indent${toString()}');
+  void write({@required StringBuffer buffer, String indent = ''}) {
+    buffer.write('$indent${toString()}');
+
+    if (_data.isNotEmpty) {
+      var sortedNames = _data.keys.toList()..sort();
+      var sortedData = sortedNames.map((name) => _data[name]);
+      var dataStr = sortedData.map((e) => '$e').join(', ');
+      buffer.write('($dataStr)');
+    }
+
+    buffer.writeln();
 
     var childIndent = '$indent  ';
     for (var child in children) {
diff --git a/pkg/analyzer/lib/src/workspace/bazel.dart b/pkg/analyzer/lib/src/workspace/bazel.dart
index 5b6bd92..47f1790 100644
--- a/pkg/analyzer/lib/src/workspace/bazel.dart
+++ b/pkg/analyzer/lib/src/workspace/bazel.dart
@@ -5,7 +5,9 @@
 import 'dart:collection';
 import 'dart:core';
 
+import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -59,6 +61,13 @@
   @override
   Source resolveAbsolute(Uri uri, [Uri actualUri]) {
     return _sourceCache.putIfAbsent(uri, () {
+      if (uri.scheme == 'file') {
+        var pathRelativeToRoot = _workspace._relativeToRoot(uri.path);
+        if (pathRelativeToRoot == null) return null;
+        var fullFilePath = _context.join(_workspace.root, pathRelativeToRoot);
+        File file = _workspace.findFile(fullFilePath);
+        return file?.createSource(uri);
+      }
       if (uri.scheme != 'package') {
         return null;
       }
@@ -306,6 +315,32 @@
     }
   }
 
+  String _relativeToRoot(String p) {
+    path.Context context = provider.pathContext;
+    // genfiles
+    if (genfiles != null && context.isWithin(genfiles, p)) {
+      return context.relative(p, from: genfiles);
+    }
+    // bin
+    for (String bin in binPaths) {
+      if (context.isWithin(bin, p)) {
+        return context.relative(p, from: bin);
+      }
+    }
+    // READONLY
+    if (readonly != null) {
+      if (context.isWithin(readonly, p)) {
+        return context.relative(p, from: readonly);
+      }
+    }
+    // Not generated
+    if (context.isWithin(root, p)) {
+      return context.relative(p, from: root);
+    }
+    // Failed reverse lookup
+    return null;
+  }
+
   /// Find the Bazel workspace that contains the given [filePath].
   ///
   /// This method walks up the file system from [filePath], looking for various
@@ -450,8 +485,42 @@
   @override
   final BazelWorkspace workspace;
 
+  bool _featureSetReady = false;
+  FeatureSet _featureSet;
+
   BazelWorkspacePackage(String packageName, this.root, this.workspace)
-      : this._uriPrefix = 'package:$packageName/';
+      : _uriPrefix = 'package:$packageName/';
+
+  @override
+  FeatureSet get featureSet {
+    if (_featureSetReady) {
+      return _featureSet;
+    }
+
+    try {
+      _featureSetReady = true;
+      var buildContent = workspace.provider
+          .getFolder(root)
+          .getChildAssumingFile('BUILD')
+          .readAsStringSync();
+      var hasNonNullableFlag = buildContent
+          .split('\n')
+          .map((e) => e.trim())
+          .where((e) => !e.startsWith('#'))
+          .map((e) => e.replaceAll(' ', ''))
+          .join()
+          .contains('dart_package(null_safety=True');
+      if (hasNonNullableFlag) {
+        _featureSet = FeatureSet.fromEnableFlags(
+          [EnableString.non_nullable],
+        );
+      }
+    } on FileSystemException {
+      // ignored
+    }
+
+    return _featureSet;
+  }
 
   @override
   bool contains(Source source) {
diff --git a/pkg/analyzer/lib/src/workspace/package_build.dart b/pkg/analyzer/lib/src/workspace/package_build.dart
index d274ccb..39fdaaf 100644
--- a/pkg/analyzer/lib/src/workspace/package_build.dart
+++ b/pkg/analyzer/lib/src/workspace/package_build.dart
@@ -152,13 +152,25 @@
   /// matches the behavior of package:build.
   final String projectPackageName;
 
+  /// `.dart_tool/build/generated` in [root].
+  final String generatedRootPath;
+
+  /// [projectPackageName] in [generatedRootPath].
+  final String generatedThisPath;
+
   /// The singular package in this workspace.
   ///
   /// Each "package:build" workspace is itself one package.
   PackageBuildWorkspacePackage _theOnlyPackage;
 
   PackageBuildWorkspace._(
-      this.provider, this._packageMap, this.root, this.projectPackageName);
+    this.provider,
+    this._packageMap,
+    this.root,
+    this.projectPackageName,
+    this.generatedRootPath,
+    this.generatedThisPath,
+  );
 
   @override
   UriResolver get packageUriResolver => PackageBuildPackageUriResolver(
@@ -231,15 +243,22 @@
   }
 
   @override
-  WorkspacePackage findPackageFor(String filePath) {
-    path.Context context = provider.pathContext;
-    final folder = provider.getFolder(context.dirname(filePath));
-    if (context.isWithin(root, folder.path)) {
-      _theOnlyPackage ??= PackageBuildWorkspacePackage(root, this);
-      return _theOnlyPackage;
-    } else {
+  WorkspacePackage findPackageFor(String path) {
+    var pathContext = provider.pathContext;
+
+    // Must be in this workspace.
+    if (!pathContext.isWithin(root, path)) {
       return null;
     }
+
+    // If generated, must be for this package.
+    if (pathContext.isWithin(generatedRootPath, path)) {
+      if (!pathContext.isWithin(generatedThisPath, path)) {
+        return null;
+      }
+    }
+
+    return _theOnlyPackage ??= PackageBuildWorkspacePackage(root, this);
   }
 
   /// Find the package:build workspace that contains the given [filePath].
@@ -265,8 +284,13 @@
       if (dartToolBuildDir.exists && pubspec.exists) {
         try {
           final yaml = loadYaml(pubspec.readAsStringSync());
-          return PackageBuildWorkspace._(
-              provider, packageMap, folder.path, yaml['name']);
+          final packageName = yaml['name'] as String;
+          final generatedRootPath = provider.pathContext
+              .join(folder.path, '.dart_tool', 'build', 'generated');
+          final generatedThisPath =
+              provider.pathContext.join(generatedRootPath, packageName);
+          return PackageBuildWorkspace._(provider, packageMap, folder.path,
+              packageName, generatedRootPath, generatedThisPath);
         } catch (_) {}
       }
 
@@ -292,12 +316,18 @@
 
   @override
   bool contains(Source source) {
-    String filePath = filePathFromSource(source);
-    if (filePath == null) return false;
-    // There is a 1-1 relationship between PackageBuildWorkspaces and
-    // PackageBuildWorkspacePackages. If a file is in a package's workspace,
-    // then it is in the package as well.
-    return workspace.provider.pathContext.isWithin(workspace.root, filePath) &&
-        workspace.findFile(filePath) != null;
+    var uri = source.uri;
+
+    if (uri.isScheme('package')) {
+      var packageName = uri.pathSegments[0];
+      return packageName == workspace.projectPackageName;
+    }
+
+    if (uri.isScheme('file')) {
+      var path = source.fullName;
+      return workspace.findPackageFor(path) != null;
+    }
+
+    return false;
   }
 }
diff --git a/pkg/analyzer/lib/src/workspace/workspace.dart b/pkg/analyzer/lib/src/workspace/workspace.dart
index 5b64e10..f5f037f 100644
--- a/pkg/analyzer/lib/src/workspace/workspace.dart
+++ b/pkg/analyzer/lib/src/workspace/workspace.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
@@ -38,6 +39,11 @@
 /// understand whether arbitrary file paths represent libraries declared within
 /// a given package in a Workspace.
 abstract class WorkspacePackage {
+  /// Return the [FeatureSet] for all files in the package.
+  ///
+  /// Return `null` if this package does not have a feature set override.
+  FeatureSet get featureSet => null;
+
   String get root;
 
   Workspace get workspace;
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 4044ff8..becd0e8 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,15 +1,16 @@
 name: analyzer
-version: 0.39.13-dev
+version: 0.39.16
 description: This package provides a library that performs static analysis of Dart code.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
 
 environment:
-  sdk: '>=2.6.0 <3.0.0'
+  sdk: '>=2.7.0 <3.0.0'
 
 dependencies:
-  _fe_analyzer_shared: ^5.0.0
+  _fe_analyzer_shared: ^6.0.0
   args: ^1.0.0
   charcode: ^1.1.0
+  cli_util: '>=0.1.4 <0.3.0'
   collection: ^1.10.1
   convert: ^2.0.0
   crypto: ^2.0.0
diff --git a/pkg/analyzer/test/dart/analysis/test_all.dart b/pkg/analyzer/test/dart/analysis/test_all.dart
index a7e9797..40e2965 100644
--- a/pkg/analyzer/test/dart/analysis/test_all.dart
+++ b/pkg/analyzer/test/dart/analysis/test_all.dart
@@ -7,7 +7,7 @@
 import 'from_environment_evaluator_test.dart' as declared_variables;
 import 'utilities_test.dart' as utilities;
 
-main() {
+void main() {
   defineReflectiveSuite(() {
     declared_variables.main();
     utilities.main();
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index 3fdfab1..bad835b 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -25,6 +25,7 @@
     defineReflectiveTests(ConstructorDeclarationTest);
     defineReflectiveTests(FieldFormalParameterTest);
     defineReflectiveTests(IndexExpressionTest);
+    defineReflectiveTests(InterpolationStringTest);
     defineReflectiveTests(MethodDeclarationTest);
     defineReflectiveTests(MethodInvocationTest);
     defineReflectiveTests(NodeListTest);
@@ -222,7 +223,9 @@
 class IndexExpressionTest {
   void test_inGetterContext_assignment_compound_left() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // a[b] += c
     AstTestFactory.assignmentExpression(
         expression, TokenType.PLUS_EQ, AstTestFactory.identifier3("c"));
@@ -231,7 +234,9 @@
 
   void test_inGetterContext_assignment_simple_left() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // a[b] = c
     AstTestFactory.assignmentExpression(
         expression, TokenType.EQ, AstTestFactory.identifier3("c"));
@@ -240,7 +245,9 @@
 
   void test_inGetterContext_nonAssignment() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // a[b] + c
     AstTestFactory.binaryExpression(
         expression, TokenType.PLUS, AstTestFactory.identifier3("c"));
@@ -249,7 +256,9 @@
 
   void test_inSetterContext_assignment_compound_left() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // a[b] += c
     AstTestFactory.assignmentExpression(
         expression, TokenType.PLUS_EQ, AstTestFactory.identifier3("c"));
@@ -258,7 +267,9 @@
 
   void test_inSetterContext_assignment_compound_right() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // c += a[b]
     AstTestFactory.assignmentExpression(
         AstTestFactory.identifier3("c"), TokenType.PLUS_EQ, expression);
@@ -267,7 +278,9 @@
 
   void test_inSetterContext_assignment_simple_left() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // a[b] = c
     AstTestFactory.assignmentExpression(
         expression, TokenType.EQ, AstTestFactory.identifier3("c"));
@@ -276,7 +289,9 @@
 
   void test_inSetterContext_assignment_simple_right() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // c = a[b]
     AstTestFactory.assignmentExpression(
         AstTestFactory.identifier3("c"), TokenType.EQ, expression);
@@ -285,7 +300,9 @@
 
   void test_inSetterContext_nonAssignment() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     AstTestFactory.binaryExpression(
         expression, TokenType.PLUS, AstTestFactory.identifier3("c"));
     // a[b] + cc
@@ -294,7 +311,9 @@
 
   void test_inSetterContext_postfix_bang() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // a[b]!
     AstTestFactory.postfixExpression(expression, TokenType.BANG);
     expect(expression.inSetterContext(), isFalse);
@@ -302,7 +321,9 @@
 
   void test_inSetterContext_postfix_plusPlus() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     AstTestFactory.postfixExpression(expression, TokenType.PLUS_PLUS);
     // a[b]++
     expect(expression.inSetterContext(), isTrue);
@@ -310,7 +331,9 @@
 
   void test_inSetterContext_prefix_bang() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // !a[b]
     AstTestFactory.prefixExpression(TokenType.BANG, expression);
     expect(expression.inSetterContext(), isFalse);
@@ -318,7 +341,9 @@
 
   void test_inSetterContext_prefix_minusMinus() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // --a[b]
     AstTestFactory.prefixExpression(TokenType.MINUS_MINUS, expression);
     expect(expression.inSetterContext(), isTrue);
@@ -326,7 +351,9 @@
 
   void test_inSetterContext_prefix_plusPlus() {
     IndexExpression expression = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("b"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("b"),
+    );
     // ++a[b]
     AstTestFactory.prefixExpression(TokenType.PLUS_PLUS, expression);
     expect(expression.inSetterContext(), isTrue);
@@ -360,30 +387,201 @@
 
   void test_isNullAware_false() {
     final expression = AstTestFactory.indexExpression(
-        AstTestFactory.nullLiteral(),
-        AstTestFactory.nullLiteral(),
-        TokenType.OPEN_SQUARE_BRACKET);
+      target: AstTestFactory.nullLiteral(),
+      index: AstTestFactory.nullLiteral(),
+    );
     expect(expression.isNullAware, isFalse);
   }
 
   void test_isNullAware_regularIndex() {
     final expression = AstTestFactory.indexExpression(
-        AstTestFactory.nullLiteral(),
-        AstTestFactory.nullLiteral(),
-        TokenType.OPEN_SQUARE_BRACKET);
+      target: AstTestFactory.nullLiteral(),
+      index: AstTestFactory.nullLiteral(),
+    );
     expect(expression.isNullAware, isFalse);
   }
 
   void test_isNullAware_true() {
     final expression = AstTestFactory.indexExpression(
-        AstTestFactory.nullLiteral(),
-        AstTestFactory.nullLiteral(),
-        TokenType.QUESTION_PERIOD_OPEN_SQUARE_BRACKET);
+      target: AstTestFactory.nullLiteral(),
+      hasQuestion: true,
+      index: AstTestFactory.nullLiteral(),
+    );
     expect(expression.isNullAware, isTrue);
   }
 }
 
 @reflectiveTest
+class InterpolationStringTest extends ParserTestCase {
+  InterpolationString interpolationString(
+      String lexeme, String value, bool isFirst, bool isLast) {
+    var node = AstTestFactory.interpolationString(lexeme, value);
+    var nodes = <InterpolationElement>[
+      if (!isFirst) AstTestFactory.interpolationString("'first", "first"),
+      node,
+      if (!isLast) AstTestFactory.interpolationString("last'", "last")
+    ];
+    var parent = AstTestFactory.string(nodes);
+    assert(node.parent == parent);
+    return node;
+  }
+
+  void test_contentsOffset_doubleQuote_first() {
+    var node = interpolationString('"foo', "foo", true, true);
+    expect(node.contentsOffset, '"'.length);
+    expect(node.contentsEnd, '"'.length + "foo".length);
+  }
+
+  void test_contentsOffset_doubleQuote_firstLast() {
+    var node = interpolationString('"foo"', "foo", true, true);
+    expect(node.contentsOffset, '"'.length);
+    expect(node.contentsEnd, '"'.length + "foo".length);
+  }
+
+  void test_contentsOffset_doubleQuote_last() {
+    var node = interpolationString('foo"', "foo", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo".length);
+  }
+
+  void test_contentsOffset_doubleQuote_last_empty() {
+    var node = interpolationString('"', "", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, 0);
+  }
+
+  void test_contentsOffset_doubleQuote_last_unterminated() {
+    var node = interpolationString('foo', "foo", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo".length);
+  }
+
+  void test_contentsOffset_doubleQuote_multiline_first() {
+    var node = interpolationString('"""\nfoo\n', "foo\n", true, true);
+    expect(node.contentsOffset, '"""\n'.length);
+    expect(node.contentsEnd, '"""\n'.length + "foo\n".length);
+  }
+
+  void test_contentsOffset_doubleQuote_multiline_firstLast() {
+    var node = interpolationString('"""\nfoo\n"""', "foo\n", true, true);
+    expect(node.contentsOffset, '"""\n'.length);
+    expect(node.contentsEnd, '"""\n'.length + "foo\n".length);
+  }
+
+  void test_contentsOffset_doubleQuote_multiline_last() {
+    var node = interpolationString('foo\n"""', "foo\n", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo\n".length);
+  }
+
+  void test_contentsOffset_doubleQuote_multiline_last_empty() {
+    var node = interpolationString('"""', "", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, 0);
+  }
+
+  void test_contentsOffset_doubleQuote_multiline_last_unterminated() {
+    var node = interpolationString('foo\n', "foo\n", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo\n".length);
+  }
+
+  void test_contentsOffset_escapeCharacters() {
+    // Contents offset cannot use 'value' string, because of escape sequences.
+    var node = interpolationString(r'"foo\nbar"', "foo\nbar", true, true);
+    expect(node.contentsOffset, '"'.length);
+    expect(node.contentsEnd, '"'.length + "foo\\nbar".length);
+  }
+
+  void test_contentsOffset_middle() {
+    var node = interpolationString("foo", "foo", false, false);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo".length);
+  }
+
+  void test_contentsOffset_middle_quoteBegin() {
+    // This occurs in, for instance, `"$a'foo$b"`
+    var node = interpolationString("'foo", "'foo", false, false);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "'foo".length);
+  }
+
+  void test_contentsOffset_middle_quoteBeginEnd() {
+    // This occurs in, for instance, `"$a'foo'$b"`
+    var node = interpolationString("'foo'", "'foo'", false, false);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "'foo'".length);
+  }
+
+  void test_contentsOffset_middle_quoteEnd() {
+    // This occurs in, for instance, `"${a}foo'$b"`
+    var node = interpolationString("foo'", "foo'", false, false);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo'".length);
+  }
+
+  void test_contentsOffset_singleQuote_first() {
+    var node = interpolationString("'foo", "foo", true, true);
+    expect(node.contentsOffset, "'".length);
+    expect(node.contentsEnd, "'".length + "foo".length);
+  }
+
+  void test_contentsOffset_singleQuote_firstLast() {
+    var node = interpolationString("'foo'", "foo", true, true);
+    expect(node.contentsOffset, "'".length);
+    expect(node.contentsEnd, "'".length + "foo".length);
+  }
+
+  void test_contentsOffset_singleQuote_last() {
+    var node = interpolationString("foo'", "foo", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo".length);
+  }
+
+  void test_contentsOffset_singleQuote_last_empty() {
+    var node = interpolationString("'", "", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, 0);
+  }
+
+  void test_contentsOffset_singleQuote_last_unterminated() {
+    var node = interpolationString("foo", "foo", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo".length);
+  }
+
+  void test_contentsOffset_singleQuote_multiline_first() {
+    var node = interpolationString("'''\nfoo\n", "foo\n", true, true);
+    expect(node.contentsOffset, "'''\n".length);
+    expect(node.contentsEnd, "'''\n".length + "foo\n".length);
+  }
+
+  void test_contentsOffset_singleQuote_multiline_firstLast() {
+    var node = interpolationString("'''\nfoo\n'''", "foo\n", true, true);
+    expect(node.contentsOffset, "'''\n".length);
+    expect(node.contentsEnd, "'''\n".length + "foo\n".length);
+  }
+
+  void test_contentsOffset_singleQuote_multiline_last() {
+    var node = interpolationString("foo\n'''", "foo\n", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo\n".length);
+  }
+
+  void test_contentsOffset_singleQuote_multiline_last_empty() {
+    var node = interpolationString("'''", "", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, 0);
+  }
+
+  void test_contentsOffset_singleQuote_multiline_last_unterminated() {
+    var node = interpolationString("foo\n", "foo\n", false, true);
+    expect(node.contentsOffset, 0);
+    expect(node.contentsEnd, "foo\n".length);
+  }
+}
+
+@reflectiveTest
 class MethodDeclarationTest {
   void test_firstTokenAfterCommentAndMetadata_external() {
     MethodDeclaration declaration =
diff --git a/pkg/analyzer/test/error/error_reporter_test.dart b/pkg/analyzer/test/error/error_reporter_test.dart
index 7f1ea6f..4abbae8 100644
--- a/pkg/analyzer/test/error/error_reporter_test.dart
+++ b/pkg/analyzer/test/error/error_reporter_test.dart
@@ -10,7 +10,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../generated/test_support.dart';
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,7 +19,7 @@
 }
 
 @reflectiveTest
-class ErrorReporterTest extends DriverResolutionTest {
+class ErrorReporterTest extends PubPackageResolutionTest {
   var listener = GatheringErrorListener();
 
   test_creation() async {
@@ -41,7 +41,7 @@
       isNonNullableByDefault: false,
     );
     reporter.reportErrorForElement(
-      StaticWarningCode.CAST_TO_NON_TYPE,
+      CompileTimeErrorCode.CAST_TO_NON_TYPE,
       element,
       ['A'],
     );
@@ -63,7 +63,7 @@
       isNonNullableByDefault: false,
     );
     reporter.reportErrorForElement(
-      StaticWarningCode.CAST_TO_NON_TYPE,
+      CompileTimeErrorCode.CAST_TO_NON_TYPE,
       element,
       ['A'],
     );
@@ -73,8 +73,8 @@
   }
 
   test_reportErrorForNode_types_differentNames() async {
-    newFile('/test/lib/a.dart', content: 'class A {}');
-    newFile('/test/lib/b.dart', content: 'class B {}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/b.dart', content: 'class B {}');
     await resolveTestCode(r'''
 import 'package:test/a.dart';
 import 'package:test/b.dart';
@@ -102,7 +102,7 @@
     );
 
     reporter.reportErrorForNode(
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
+      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
       findNode.simple('x'),
       [firstType, secondType],
     );
@@ -112,8 +112,8 @@
   }
 
   test_reportErrorForNode_types_sameName() async {
-    newFile('/test/lib/a.dart', content: 'class A {}');
-    newFile('/test/lib/b.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/b.dart', content: 'class A {}');
     await resolveTestCode(r'''
 import 'package:test/a.dart';
 import 'package:test/b.dart';
@@ -140,7 +140,7 @@
       isNonNullableByDefault: false,
     );
     reporter.reportErrorForNode(
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
+      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
       findNode.simple('x'),
       [firstType, secondType],
     );
@@ -150,8 +150,8 @@
   }
 
   test_reportErrorForNode_types_sameName_functionType() async {
-    newFile('/test/lib/a.dart', content: 'class A{}');
-    newFile('/test/lib/b.dart', content: 'class A{}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A{}');
+    newFile('$testPackageLibPath/b.dart', content: 'class A{}');
     await resolveTestCode(r'''
 import 'a.dart' as a;
 import 'b.dart' as b;
@@ -173,7 +173,7 @@
       isNonNullableByDefault: false,
     );
     reporter.reportErrorForNode(
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
+      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
       findNode.simple('x'),
       [fa.variables.type.type, fb.variables.type.type],
     );
@@ -184,8 +184,8 @@
   }
 
   test_reportErrorForNode_types_sameName_nested() async {
-    newFile('/test/lib/a.dart', content: 'class A{}');
-    newFile('/test/lib/b.dart', content: 'class A{}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A{}');
+    newFile('$testPackageLibPath/b.dart', content: 'class A{}');
     await resolveTestCode(r'''
 import 'a.dart' as a;
 import 'b.dart' as b;
@@ -208,7 +208,7 @@
       isNonNullableByDefault: false,
     );
     reporter.reportErrorForNode(
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
+      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
       findNode.simple('x'),
       [ba.variables.type.type, bb.variables.type.type],
     );
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
deleted file mode 100644
index 3912bc6..0000000
--- a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
+++ /dev/null
@@ -1,634 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/error/codes.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../src/dart/resolution/driver_resolution.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(CheckedModeCompileTimeErrorCodeTest);
-  });
-}
-
-@reflectiveTest
-class CheckedModeCompileTimeErrorCodeTest extends DriverResolutionTest {
-  test_assertion_throws() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A(int x, int y) : assert(x < y);
-}
-var v = const A(3, 2);
-''', [
-      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 61, 13),
-    ]);
-  }
-
-  test_fieldFormalParameterAssignableToField_extends() async {
-    // According to checked-mode type checking rules, a value of type B is
-    // assignable to a field of type A, because B extends A (and hence is a
-    // subtype of A).
-    await assertNoErrorsInCode(r'''
-class A {
-  const A();
-}
-class B extends A {
-  const B();
-}
-class C {
-  final A a;
-  const C(this.a);
-}
-var v = const C(const B());
-''');
-  }
-
-  test_fieldFormalParameterAssignableToField_fieldType_unresolved_null() async {
-    // Null always passes runtime type checks, even when the type is
-    // unresolved.
-    await assertErrorsInCode(r'''
-class A {
-  final Unresolved x;
-  const A(String this.x);
-}
-var v = const A(null);
-''', [
-      error(CompileTimeErrorCode.UNDEFINED_CLASS, 18, 10),
-    ]);
-  }
-
-  test_fieldFormalParameterAssignableToField_implements() async {
-    // According to checked-mode type checking rules, a value of type B is
-    // assignable to a field of type A, because B implements A (and hence is a
-    // subtype of A).
-    await assertNoErrorsInCode(r'''
-class A {}
-class B implements A {
-  const B();
-}
-class C {
-  final A a;
-  const C(this.a);
-}
-var v = const C(const B());
-''');
-  }
-
-  test_fieldFormalParameterAssignableToField_list_dynamic() async {
-    // [1, 2, 3] has type List<dynamic>, which is a subtype of List<int>.
-    await assertNoErrorsInCode(r'''
-class A {
-  const A(List<int> x);
-}
-var x = const A(const [1, 2, 3]);
-''');
-  }
-
-  test_fieldFormalParameterAssignableToField_list_nonDynamic() async {
-    // <int>[1, 2, 3] has type List<int>, which is a subtype of List<num>.
-    await assertNoErrorsInCode(r'''
-class A {
-  const A(List<num> x);
-}
-var x = const A(const <int>[1, 2, 3]);
-''');
-  }
-
-  test_fieldFormalParameterAssignableToField_map_dynamic() async {
-    // {1: 2} has type Map<dynamic, dynamic>, which is a subtype of
-    // Map<int, int>.
-    await assertNoErrorsInCode(r'''
-class A {
-  const A(Map<int, int> x);
-}
-var x = const A(const {1: 2});
-''');
-  }
-
-  test_fieldFormalParameterAssignableToField_map_keyDifferent() async {
-    // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
-    // Map<num, int>.
-    await assertNoErrorsInCode(r'''
-class A {
-  const A(Map<num, int> x);
-}
-var x = const A(const <int, int>{1: 2});
-''');
-  }
-
-  test_fieldFormalParameterAssignableToField_map_valueDifferent() async {
-    // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
-    // Map<int, num>.
-    await assertNoErrorsInCode(r'''
-class A {
-  const A(Map<int, num> x);
-}
-var x = const A(const <int, int>{1: 2});
-''');
-  }
-
-  test_fieldFormalParameterAssignableToField_notype() async {
-    // If a field is declared without a type, then any value may be assigned to
-    // it.
-    await assertNoErrorsInCode(r'''
-class A {
-  final x;
-  const A(this.x);
-}
-var v = const A(5);
-''');
-  }
-
-  test_fieldFormalParameterAssignableToField_null() async {
-    // Null is assignable to anything.
-    await assertNoErrorsInCode(r'''
-class A {
-  final int x;
-  const A(this.x);
-}
-var v = const A(null);
-''');
-  }
-
-  test_fieldFormalParameterAssignableToField_typedef() async {
-    // foo has the runtime type dynamic -> dynamic, so it is not assignable
-    // to A.f.
-    await assertErrorsInCode(r'''
-typedef String Int2String(int x);
-class A {
-  final Int2String f;
-  const A(this.f);
-}
-foo(x) => 1;
-var v = const A(foo);
-''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 116, 3),
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          116,
-          3),
-    ]);
-  }
-
-  test_fieldFormalParameterAssignableToField_typeSubstitution() async {
-    // foo has the runtime type dynamic -> dynamic, so it should be assignable
-    // to A.f.
-    await assertNoErrorsInCode(r'''
-class A<T> {
-  final T x;
-  const A(this.x);
-}
-var v = const A<int>(3);
-''');
-  }
-
-  test_fieldFormalParameterNotAssignableToField() async {
-    await assertErrorsInCode(r'''
-class A {
-  final int x;
-  const A(this.x);
-}
-var v = const A('foo');
-''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          62,
-          5),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 62, 5),
-    ]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_extends() async {
-    // According to checked-mode type checking rules, a value of type A is not
-    // assignable to a field of type B, because B extends A (the subtyping
-    // relationship is in the wrong direction).
-    await assertErrorsInCode(r'''
-class A {
-  const A();
-}
-class B extends A {
-  const B();
-}
-class C {
-  final B b;
-  const C(this.b);
-}
-const A u = const A();
-var v = const C(u);
-''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          143,
-          1),
-    ]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_fieldType() async {
-    await assertErrorsInCode(r'''
-class A {
-  final int x;
-  const A(this.x);
-}
-var v = const A('foo');
-''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          62,
-          5),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 62, 5),
-    ]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_fieldType_unresolved() async {
-    await assertErrorsInCode(r'''
-class A {
-  final Unresolved x;
-  const A(String this.x);
-}
-var v = const A('foo');
-''', [
-      error(CompileTimeErrorCode.UNDEFINED_CLASS, 18, 10),
-    ]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_implements() async {
-    // According to checked-mode type checking rules, a value of type A is not
-    // assignable to a field of type B, because B implements A (the subtyping
-    // relationship is in the wrong direction).
-    await assertErrorsInCode(r'''
-class A {
-  const A();
-}
-class B implements A {}
-class C {
-  final B b;
-  const C(this.b);
-}
-const A u = const A();
-var v = const C(u);
-''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          132,
-          1),
-    ]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_list() async {
-    // <num>[1, 2, 3] has type List<num>, which is not a subtype of List<int>.
-    await assertErrorsInCode(r'''
-class A {
-  const A(List<int> x);
-}
-const dynamic w = const <num>[1, 2, 3];
-var x = const A(w);
-''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          92,
-          1),
-    ]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_map_keyMismatch() async {
-    // <num, int>{1: 2} has type Map<num, int>, which is not a subtype of
-    // Map<int, int>.
-    await assertErrorsInCode(r'''
-class A {
-  const A(Map<int, int> x);
-}
-const dynamic w = const <num, int>{1: 2};
-var x = const A(w);
-''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          98,
-          1),
-    ]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_map_valueMismatch() async {
-    // <int, num>{1: 2} has type Map<int, num>, which is not a subtype of
-    // Map<int, int>.
-    await assertErrorsInCode(r'''
-class A {
-  const A(Map<int, int> x);
-}
-const dynamic w = const <int, num>{1: 2};
-var x = const A(w);
-''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          98,
-          1),
-    ]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_optional() async {
-    await assertErrorsInCode(r'''
-class A {
-  final int x;
-  const A([this.x = 'foo']);
-}
-var v = const A();
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 45, 5),
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          64,
-          9),
-    ]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_typedef() async {
-    // foo has the runtime type String -> int, so it should not be assignable
-    // to A.f (A.f requires it to be int -> String).
-    await assertErrorsInCode(r'''
-typedef String Int2String(int x);
-class A {
-  final Int2String f;
-  const A(this.f);
-}
-int foo(String x) => 1;
-var v = const A(foo);
-''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 127, 3),
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          127,
-          3),
-    ]);
-  }
-
-  test_fieldInitializerNotAssignable() async {
-    await assertErrorsInCode(r'''
-class A {
-  final int x;
-  const A() : x = '';
-}
-''', [
-      error(StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE, 43, 2),
-      error(
-          CheckedModeCompileTimeErrorCode
-              .CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
-          43,
-          2),
-    ]);
-  }
-
-  test_fieldTypeMismatch() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A(x) : y = x;
-  final int y;
-}
-var v = const A('foo');
-''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-          57,
-          14),
-    ]);
-  }
-
-  test_fieldTypeMismatch_generic() async {
-    await assertErrorsInCode(
-      r'''
-class C<T> {
-  final T x = y;
-  const C();
-}
-const int y = 1;
-var v = const C<String>();
-''',
-      [
-        error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 27, 1),
-        error(
-            CheckedModeCompileTimeErrorCode
-                .CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-            70,
-            17),
-      ],
-    );
-  }
-
-  test_fieldTypeMismatch_unresolved() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A(x) : y = x;
-  final Unresolved y;
-}
-var v = const A('foo');
-''', [
-      error(CompileTimeErrorCode.UNDEFINED_CLASS, 40, 10),
-    ]);
-  }
-
-  test_fieldTypeOk_generic() async {
-    await assertErrorsInCode(
-      r'''
-class C<T> {
-  final T x = y;
-  const C();
-}
-const int y = 1;
-var v = const C<int>();
-''',
-      [
-        error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 27, 1),
-      ],
-    );
-  }
-
-  test_fieldTypeOk_null() async {
-    await assertNoErrorsInCode(r'''
-class A {
-  const A(x) : y = x;
-  final int y;
-}
-var v = const A(null);
-''');
-  }
-
-  test_fieldTypeOk_unresolved_null() async {
-    // Null always passes runtime type checks, even when the type is
-    // unresolved.
-    await assertErrorsInCode(r'''
-class A {
-  const A(x) : y = x;
-  final Unresolved y;
-}
-var v = const A(null);
-''', [
-      error(CompileTimeErrorCode.UNDEFINED_CLASS, 40, 10),
-    ]);
-  }
-
-  test_listElementTypeNotAssignable() async {
-    await assertErrorsInCode('''
-var v = const <String> [42];
-''', [
-      error(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 24, 2),
-    ]);
-  }
-
-  test_listLiteral_inferredElementType() async {
-    await assertErrorsInCode('''
-const Object x = [1];
-const List<String> y = x;
-''', [
-      error(CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 45, 1),
-    ]);
-  }
-
-  test_mapLiteral_inferredKeyType() async {
-    await assertErrorsInCode('''
-const Object x = {1: 1};
-const Map<String, dynamic> y = x;
-''', [
-      error(CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 56, 1),
-    ]);
-  }
-
-  test_mapLiteral_inferredValueType() async {
-    await assertErrorsInCode('''
-const Object x = {1: 1};
-const Map<dynamic, String> y = x;
-''', [
-      error(CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 56, 1),
-    ]);
-  }
-
-  test_parameterAssignable_null() async {
-    // Null is assignable to anything.
-    await assertNoErrorsInCode(r'''
-class A {
-  const A(int x);
-}
-var v = const A(null);''');
-  }
-
-  test_parameterAssignable_typeSubstitution() async {
-    await assertNoErrorsInCode(r'''
-class A<T> {
-  const A(T x);
-}
-var v = const A<int>(3);''');
-  }
-
-  test_parameterAssignable_undefined_null() async {
-    // Null always passes runtime type checks, even when the type is
-    // unresolved.
-    await assertErrorsInCode(r'''
-class A {
-  const A(Unresolved x);
-}
-var v = const A(null);
-''', [
-      error(CompileTimeErrorCode.UNDEFINED_CLASS, 20, 10),
-    ]);
-  }
-
-  test_parameterNotAssignable() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A(int x);
-}
-var v = const A('foo');
-''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          46,
-          5),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 46, 5),
-    ]);
-  }
-
-  test_parameterNotAssignable_typeSubstitution() async {
-    await assertErrorsInCode(r'''
-class A<T> {
-  const A(T x);
-}
-var v = const A<int>('foo');
-''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 52, 5),
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          52,
-          5),
-    ]);
-  }
-
-  test_parameterNotAssignable_undefined() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A(Unresolved x);
-}
-var v = const A('foo');
-''', [
-      error(CompileTimeErrorCode.UNDEFINED_CLASS, 20, 10),
-    ]);
-  }
-
-  test_redirectingConstructor_paramTypeMismatch() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A.a1(x) : this.a2(x);
-  const A.a2(String x);
-}
-var v = const A.a1(0);
-''', [
-      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 74, 13),
-    ]);
-  }
-
-  test_superConstructor_paramTypeMismatch() async {
-    await assertErrorsInCode(r'''
-class C {
-  final double d;
-  const C(this.d);
-}
-class D extends C {
-  const D(d) : super(d);
-}
-const f = const D('0.0');
-''', [
-      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 106, 14),
-    ]);
-  }
-
-  test_topLevelVarAssignable_null() async {
-    await assertNoErrorsInCode('''
-const int x = null;
-''');
-  }
-
-  test_topLevelVarAssignable_undefined_null() async {
-    // Null always passes runtime type checks, even when the type is
-    // unresolved.
-    await assertErrorsInCode('''
-const Unresolved x = null;
-''', [
-      error(CompileTimeErrorCode.UNDEFINED_CLASS, 6, 10),
-    ]);
-  }
-
-  test_topLevelVarNotAssignable() async {
-    await assertErrorsInCode('''
-const int x = 'foo';
-''', [
-      error(CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 14, 5),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 14, 5),
-    ]);
-  }
-
-  test_topLevelVarNotAssignable_undefined() async {
-    await assertErrorsInCode('''
-const Unresolved x = 'foo';
-''', [
-      error(CompileTimeErrorCode.UNDEFINED_CLASS, 6, 10),
-    ]);
-  }
-}
diff --git a/pkg/analyzer/test/generated/compile_time_error_code.dart b/pkg/analyzer/test/generated/compile_time_error_code.dart
deleted file mode 100644
index 6840ac0..0000000
--- a/pkg/analyzer/test/generated/compile_time_error_code.dart
+++ /dev/null
@@ -1,1511 +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 'dart:async';
-
-import 'package:analyzer/dart/analysis/declared_variables.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
-import 'package:test/test.dart' show expect;
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../src/dart/resolution/driver_resolution.dart';
-
-class CompileTimeErrorCodeTestBase extends DriverResolutionTest {
-  @failingTest
-  test_accessPrivateEnumField() async {
-    await assertErrorsInCode(r'''
-enum E { ONE }
-String name(E e) {
-  return e._name;
-}
-''', [
-      error(CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD, 45, 5),
-    ]);
-  }
-
-  test_annotationWithNotClass() async {
-    await assertErrorsInCode('''
-class Property {
-  final int value;
-  const Property(this.value);
-}
-
-const Property property = const Property(42);
-
-@property(123)
-main() {
-}
-''', [
-      error(CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS, 117, 8),
-    ]);
-  }
-
-  test_annotationWithNotClass_prefixed() async {
-    newFile("/test/lib/annotations.dart", content: r'''
-class Property {
-  final int value;
-  const Property(this.value);
-}
-
-const Property property = const Property(42);
-''');
-    await assertErrorsInCode('''
-import 'annotations.dart' as pref;
-@pref.property(123)
-main() {
-}
-''', [
-      error(CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS, 36, 13),
-    ]);
-  }
-
-  test_asyncForInWrongContext() async {
-    await assertErrorsInCode(r'''
-f(list) {
-  await for (var e in list) {
-  }
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 27, 1),
-      error(CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT, 29, 2),
-    ]);
-  }
-
-  test_awaitInWrongContext_sync() async {
-    // This test requires better error recovery than we currently have. In
-    // particular, we need to be able to distinguish between an await expression
-    // in the wrong context, and the use of 'await' as an identifier.
-    await assertErrorsInCode(r'''
-f(x) {
-  return await x;
-}
-''', [
-      error(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 16, 5),
-    ]);
-  }
-
-  test_awaitInWrongContext_syncStar() async {
-    // This test requires better error recovery than we currently have. In
-    // particular, we need to be able to distinguish between an await expression
-    // in the wrong context, and the use of 'await' as an identifier.
-    await assertErrorsInCode(r'''
-f(x) sync* {
-  yield await x;
-}
-''', [
-      error(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 21, 5),
-    ]);
-  }
-
-  test_bug_23176() async {
-    await assertErrorsInCode('''
-class A {
-  const A([x]);
-}
-class B {
-  dynamic @A(const A()) x;
-}
-''', [
-      error(ParserErrorCode.EXPECTED_TOKEN, 40, 7),
-      error(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, 40, 7),
-      error(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, 62, 1),
-    ]);
-  }
-
-  test_builtInIdentifierAsType_formalParameter_field() async {
-    await assertErrorsInCode(r'''
-class A {
-  var x;
-  A(static this.x);
-}
-''', [
-      error(ParserErrorCode.EXTRANEOUS_MODIFIER, 23, 6),
-    ]);
-  }
-
-  test_builtInIdentifierAsType_formalParameter_simple() async {
-    await assertErrorsInCode(r'''
-f(static x) {
-}
-''', [
-      error(ParserErrorCode.EXTRANEOUS_MODIFIER, 2, 6),
-    ]);
-  }
-
-  test_builtInIdentifierAsType_variableDeclaration() async {
-    await assertErrorsInCode(r'''
-f() {
-  typedef x;
-}
-''', [
-      error(ParserErrorCode.EXPECTED_TOKEN, 8, 7),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 8, 7),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 16, 1),
-    ]);
-  }
-
-  test_consistentCaseExpressionTypes_dynamic() async {
-    // Even though A.S and S have a static type of "dynamic", we should see
-    // that they match 'abc', because they are constant strings.
-    await assertNoErrorsInCode(r'''
-class A {
-  static const S = 'A.S';
-}
-
-const S = 'S';
-
-foo(var p) {
-  switch (p) {
-    case S:
-      break;
-    case A.S:
-      break;
-    case 'abc':
-      break;
-  }
-}
-''');
-  }
-
-  test_constConstructor_redirect_generic() async {
-    await assertNoErrorsInCode(r'''
-class A<T> {
-  const A(T value) : this._(value);
-  const A._(T value) : value = value;
-  final T value;
-}
-
-void main(){
-  const A<int>(1);
-}
-''');
-  }
-
-  test_constConstructorWithNonConstSuper_explicit() async {
-    await assertErrorsInCode(r'''
-class A {
-  A();
-}
-class B extends A {
-  const B(): super();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, 52, 7),
-    ]);
-  }
-
-  test_constConstructorWithNonConstSuper_implicit() async {
-    await assertErrorsInCode(r'''
-class A {
-  A();
-}
-class B extends A {
-  const B();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, 47, 1),
-    ]);
-  }
-
-  test_constConstructorWithNonFinalField_mixin() async {
-    await assertErrorsInCode(r'''
-class A {
-  var a;
-}
-class B extends Object with A {
-  const B();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 61, 1),
-      error(
-          CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD, 61, 1),
-    ]);
-  }
-
-  test_constConstructorWithNonFinalField_super() async {
-    await assertErrorsInCode(r'''
-class A {
-  var a;
-}
-class B extends A {
-  const B();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 49, 1),
-      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, 49, 1),
-    ]);
-  }
-
-  test_constConstructorWithNonFinalField_this_named() async {
-    await assertErrorsInCode(r'''
-class A {
-  int x;
-  const A.a();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 27, 3),
-    ]);
-  }
-
-  test_constConstructorWithNonFinalField_this_unnamed() async {
-    await assertErrorsInCode(r'''
-class A {
-  int x;
-  const A();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 27, 1),
-    ]);
-  }
-
-  test_constDeferredClass() async {
-    newFile('/test/lib/lib1.dart', content: '''
-library lib1;
-class A {
-  const A();
-}
-''');
-    await assertErrorsInCode('''
-library root;
-import 'lib1.dart' deferred as a;
-main() {
-  const a.A();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_DEFERRED_CLASS, 65, 3),
-    ]);
-  }
-
-  test_constDeferredClass_namedConstructor() async {
-    newFile('/test/lib/lib1.dart', content: '''
-library lib1;
-class A {
-  const A.b();
-}''');
-    await assertErrorsInCode('''
-library root;
-import 'lib1.dart' deferred as a;
-main() {
-  const a.A.b();
-}''', [
-      error(CompileTimeErrorCode.CONST_DEFERRED_CLASS, 65, 5),
-    ]);
-  }
-
-  test_constEval_newInstance_constConstructor() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A();
-}
-const a = new A();
-''', [
-      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 35,
-          7),
-    ]);
-  }
-
-  test_constEval_newInstance_externalFactoryConstConstructor() async {
-    // We can't evaluate "const A()" because its constructor is external.  But
-    // the code is correct--we shouldn't report an error.
-    await assertNoErrorsInCode(r'''
-class A {
-  external const factory A();
-}
-const x = const A();
-''');
-  }
-
-  test_constEval_nonStaticField_inGenericClass() async {
-    await assertErrorsInCode('''
-class C<T> {
-  const C();
-  T get t => null;
-}
-
-const x = const C().t;
-''', [
-      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 58,
-          11),
-    ]);
-  }
-
-  test_constEval_propertyExtraction_targetNotConst() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A();
-  int m() => 0;
-}
-final a = const A();
-const C = a.m;
-''', [
-      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 72,
-          1),
-    ]);
-  }
-
-  test_constEvalThrowsException() async {
-    await assertErrorsInCode(r'''
-class C {
-  const C();
-}
-f() { return const C(); }
-''', [
-      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION, 0, 0),
-    ]);
-  }
-
-  test_constEvalThrowsException_divisionByZero() async {
-    await assertErrorsInCode('''
-const C = 1 ~/ 0;
-''', [
-      error(CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE, 10, 6),
-    ]);
-  }
-
-  test_constEvalTypeBool_binary_and() async {
-    await assertErrorsInCode('''
-const _ = true && '';
-''', [
-      error(HintCode.UNUSED_ELEMENT, 6, 1),
-      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, 10, 10),
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 18, 2),
-    ]);
-  }
-
-  test_constEvalTypeBool_binary_leftTrue() async {
-    await assertErrorsInCode('''
-const C = (true || 0);
-''', [
-      error(HintCode.DEAD_CODE, 19, 1),
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 19, 1),
-    ]);
-  }
-
-  test_constEvalTypeBool_binary_or() async {
-    await assertErrorsInCode(r'''
-const _ = false || '';
-''', [
-      error(HintCode.UNUSED_ELEMENT, 6, 1),
-      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, 10, 11),
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 19, 2),
-    ]);
-  }
-
-  test_constEvalTypeBool_logicalOr_trueLeftOperand() async {
-    await assertNoErrorsInCode(r'''
-class C {
-  final int x;
-  const C({this.x}) : assert(x == null || x >= 0);
-}
-const c = const C();
-''');
-  }
-
-  test_constEvalTypeBoolNumString_equal() async {
-    await assertErrorsInCode(
-        r'''
-class A {
-  const A();
-}
-
-const num a = 0;
-const b = a == const A();
-''',
-        IsEnabledByDefault.constant_update_2018
-            ? []
-            : [
-                error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING, 53,
-                    14),
-              ]);
-  }
-
-  test_constEvalTypeBoolNumString_notEqual() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A();
-}
-
-const num a = 0;
-const _ = a != const A();
-''', [
-      error(HintCode.UNUSED_ELEMENT, 49, 1),
-      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING, 53, 14),
-    ]);
-  }
-
-  test_constEvalTypeInt_binary() async {
-    await _check_constEvalTypeBoolOrInt_binary("a ^ ''");
-    await _check_constEvalTypeBoolOrInt_binary("a & ''");
-    await _check_constEvalTypeBoolOrInt_binary("a | ''");
-    await _check_constEvalTypeInt_binary("a >> ''");
-    await _check_constEvalTypeInt_binary("a << ''");
-  }
-
-  test_constEvalTypeNum_binary() async {
-    await _check_constEvalTypeNum_binary("a + ''");
-    await _check_constEvalTypeNum_binary("a - ''");
-    await _check_constEvalTypeNum_binary("a * ''");
-    await _check_constEvalTypeNum_binary("a / ''");
-    await _check_constEvalTypeNum_binary("a ~/ ''");
-    await _check_constEvalTypeNum_binary("a > ''");
-    await _check_constEvalTypeNum_binary("a < ''");
-    await _check_constEvalTypeNum_binary("a >= ''");
-    await _check_constEvalTypeNum_binary("a <= ''");
-    await _check_constEvalTypeNum_binary("a % ''");
-  }
-
-  test_constFormalParameter_fieldFormalParameter() async {
-    await assertErrorsInCode(r'''
-class A {
-  var x;
-  A(const this.x) {}
-}
-''', [
-      error(CompileTimeErrorCode.CONST_FORMAL_PARAMETER, 23, 12),
-      error(ParserErrorCode.EXTRANEOUS_MODIFIER, 23, 5),
-    ]);
-  }
-
-  test_constFormalParameter_simpleFormalParameter() async {
-    await assertErrorsInCode('''
-f(const x) {}
-''', [
-      error(CompileTimeErrorCode.CONST_FORMAL_PARAMETER, 2, 7),
-      error(ParserErrorCode.EXTRANEOUS_MODIFIER, 2, 5),
-    ]);
-  }
-
-  test_constInitializedWithNonConstValue() async {
-    await assertErrorsInCode(r'''
-f(p) {
-  const C = p;
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 15, 1),
-      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 19,
-          1),
-    ]);
-  }
-
-  test_constInitializedWithNonConstValue_finalField() async {
-    // Regression test for bug #25526 which previously
-    // caused two errors to be reported.
-    await assertErrorsInCode(r'''
-class Foo {
-  final field = 0;
-  foo([int x = field]) {}
-}
-''', [
-      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 46, 5),
-    ]);
-  }
-
-  test_constInitializedWithNonConstValue_missingConstInListLiteral() async {
-    await assertNoErrorsInCode('''
-const List L = [0];
-''');
-  }
-
-  test_constInitializedWithNonConstValue_missingConstInMapLiteral() async {
-    await assertNoErrorsInCode('''
-const Map M = {'a' : 0};
-''');
-  }
-
-  test_constInitializedWithNonConstValueFromDeferredClass() async {
-    newFile('/test/lib/lib1.dart', content: '''
-library lib1;
-const V = 1;
-''');
-    await assertErrorsInCode('''
-library root;
-import 'lib1.dart' deferred as a;
-const B = a.V;
-''', [
-      error(
-          CompileTimeErrorCode
-              .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
-          58,
-          3),
-    ]);
-  }
-
-  test_constInitializedWithNonConstValueFromDeferredClass_nested() async {
-    newFile('/test/lib/lib1.dart', content: '''
-library lib1;
-const V = 1;
-''');
-    await assertErrorsInCode('''
-library root;
-import 'lib1.dart' deferred as a;
-const B = a.V + 1;
-''', [
-      error(
-          CompileTimeErrorCode
-              .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
-          58,
-          7),
-    ]);
-  }
-
-  test_constInstanceField() async {
-    await assertErrorsInCode(r'''
-class C {
-  const int f = 0;
-}
-''', [
-      error(CompileTimeErrorCode.CONST_INSTANCE_FIELD, 12, 5),
-    ]);
-  }
-
-  test_constWithNonConst() async {
-    await assertErrorsInCode(r'''
-class T {
-  T(a, b, {c, d}) {}
-}
-f() { return const T(0, 1, c: 2, d: 3); }
-''', [
-      error(CompileTimeErrorCode.CONST_WITH_NON_CONST, 46, 5),
-    ]);
-  }
-
-  test_constWithNonConst_in_const_context() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A(x);
-}
-class B {
-}
-main() {
-  const A(B());
-}
-''', [
-      error(CompileTimeErrorCode.CONST_WITH_NON_CONST, 57, 3),
-    ]);
-  }
-
-  test_constWithNonConst_mixinApplication_constSuperConstructor() async {
-    await assertNoErrorsInCode(r'''
-mixin M {}
-class A {
-  const A();
-}
-class B = A with M;
-const b = const B();
-''');
-  }
-
-  test_constWithNonConst_mixinApplication_constSuperConstructor_field() async {
-    await assertErrorsInCode(r'''
-mixin M {
-  int i = 0;
-}
-class A {
-  const A();
-}
-class B = A with M;
-var b = const B();
-''', [
-      error(CompileTimeErrorCode.CONST_WITH_NON_CONST, 78, 5),
-    ]);
-  }
-
-  test_constWithNonConst_mixinApplication_constSuperConstructor_getter() async {
-    await assertNoErrorsInCode(r'''
-mixin M {
-  int get i => 0;
-}
-class A {
-  const A();
-}
-class B = A with M;
-var b = const B();
-''');
-  }
-
-  test_constWithNonConst_mixinApplication_constSuperConstructor_setter() async {
-    await assertNoErrorsInCode(r'''
-mixin M {
-  set(int i) {}
-}
-class A {
-  const A();
-}
-class B = A with M;
-var b = const B();
-''');
-  }
-
-  test_constWithNonConstantArgument_annotation() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A(int p);
-}
-var v = 42;
-@A(v)
-main() {
-}
-''', [
-      error(CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT, 45, 1),
-    ]);
-  }
-
-  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/38352')
-  test_constWithNonConstantArgument_classShadowedBySetter() async {
-    // TODO(paulberry): once this is fixed, change this test to use
-    // assertErrorsInCode and verify the exact error message(s).
-    var code = '''
-class Annotation {
-  const Annotation(Object obj);
-}
-
-class Bar {}
-
-class Foo {
-  @Annotation(Bar)
-  set Bar(int value) {}
-}
-''';
-    addTestFile(code);
-    await resolveTestFile();
-    assertHasTestErrors();
-  }
-
-  test_constWithNonConstantArgument_instanceCreation() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A(a);
-}
-f(p) { return const A(p); }
-''', [
-      error(CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT, 48, 1),
-    ]);
-  }
-
-  test_constWithNonType() async {
-    await assertErrorsInCode(r'''
-int A;
-f() {
-  return const A();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_WITH_NON_TYPE, 28, 1),
-    ]);
-  }
-
-  test_constWithNonType_fromLibrary() async {
-    newFile('/test/lib/lib1.dart');
-    await assertErrorsInCode('''
-import 'lib1.dart' as lib;
-void f() {
-  const lib.A();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_WITH_NON_TYPE, 50, 1),
-    ]);
-  }
-
-  test_constWithTypeParameters_direct() async {
-    await assertErrorsInCode(r'''
-class A<T> {
-  static const V = const A<T>();
-  const A();
-}
-''', [
-      error(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 40, 1),
-      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 40, 1),
-    ]);
-  }
-
-  test_constWithTypeParameters_indirect() async {
-    await assertErrorsInCode(r'''
-class A<T> {
-  static const V = const A<List<T>>();
-  const A();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 45, 1),
-      error(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 45, 1),
-    ]);
-  }
-
-  test_constWithUndefinedConstructor() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A();
-}
-f() {
-  return const A.noSuchConstructor();
-}
-''', [
-      error(CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR, 48, 17),
-    ]);
-  }
-
-  test_constWithUndefinedConstructorDefault() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A.name();
-}
-f() {
-  return const A();
-}
-''', [
-      error(
-          CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, 51, 1),
-    ]);
-  }
-
-  test_extraPositionalArguments_const() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A();
-}
-main() {
-  const A(0);
-}
-''', [
-      error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS, 43, 3),
-    ]);
-  }
-
-  test_extraPositionalArguments_const_super() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A();
-}
-class B extends A {
-  const B() : super(0);
-}
-''', [
-      error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS, 64, 3),
-    ]);
-  }
-
-  test_extraPositionalArgumentsCouldBeNamed_const() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A({int x});
-}
-main() {
-  const A(0);
-}
-''', [
-      error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED, 50,
-          3),
-    ]);
-  }
-
-  test_extraPositionalArgumentsCouldBeNamed_const_super() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A({int x});
-}
-class B extends A {
-  const B() : super(0);
-}
-''', [
-      error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED, 71,
-          3),
-    ]);
-  }
-
-  test_fromEnvironment_bool_badArgs() async {
-    await assertErrorsInCode(r'''
-var b1 = const bool.fromEnvironment(1);
-var b2 = const bool.fromEnvironment('x', defaultValue: 1);
-''', [
-      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 9, 29),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 36, 1),
-      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 49, 48),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 81, 15),
-    ]);
-  }
-
-  test_fromEnvironment_bool_badDefault_whenDefined() async {
-    // The type of the defaultValue needs to be correct even when the default
-    // value isn't used (because the variable is defined in the environment).
-    driver.declaredVariables = DeclaredVariables.fromMap({'x': 'true'});
-    await assertErrorsInCode('''
-var b = const bool.fromEnvironment('x', defaultValue: 1);
-''', [
-      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 8, 48),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 40, 15),
-    ]);
-  }
-
-  test_genericFunctionTypeArgument_inference_function() async {
-    await assertErrorsInCode(r'''
-T f<T>(T t) => null;
-main() { f(<S>(S s) => s); }
-''', [
-      error(StrongModeCode.COULD_NOT_INFER, 30, 1),
-    ]);
-  }
-
-  test_genericFunctionTypeArgument_inference_functionType() async {
-    await assertErrorsInCode(r'''
-T Function<T>(T) f;
-main() { f(<S>(S s) => s); }
-''', [
-      error(StrongModeCode.COULD_NOT_INFER, 29, 1),
-    ]);
-  }
-
-  test_genericFunctionTypeArgument_inference_method() async {
-    await assertErrorsInCode(r'''
-class C {
-  T f<T>(T t) => null;
-}
-main() { new C().f(<S>(S s) => s); }
-''', [
-      error(StrongModeCode.COULD_NOT_INFER, 52, 1),
-    ]);
-  }
-
-  test_genericFunctionTypeAsBound_class() async {
-    await assertErrorsInCode(r'''
-class C<T extends S Function<S>(S)> {
-}
-''', [
-      error(CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, 18, 16),
-    ]);
-  }
-
-  test_genericFunctionTypeAsBound_genericFunction() async {
-    await assertErrorsInCode(r'''
-T Function<T extends S Function<S>(S)>(T) fun;
-''', [
-      error(CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, 21, 16),
-    ]);
-  }
-
-  test_genericFunctionTypeAsBound_genericFunctionTypedef() async {
-    await assertErrorsInCode(r'''
-typedef foo = T Function<T extends S Function<S>(S)>(T t);
-''', [
-      error(CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, 35, 16),
-    ]);
-  }
-
-  test_genericFunctionTypeAsBound_parameterOfFunction() async {
-    await assertNoErrorsInCode(r'''
-class C<T extends void Function(S Function<S>(S))> {}
-''');
-  }
-
-  test_genericFunctionTypeAsBound_typedef() async {
-    await assertErrorsInCode(r'''
-typedef T foo<T extends S Function<S>(S)>(T t);
-''', [
-      error(CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, 24, 16),
-    ]);
-  }
-
-  test_genericFunctionTypedParameter() async {
-    var code = '''
-void g(T f<T>(T x)) {}
-''';
-    await assertNoErrorsInCode(code);
-  }
-
-  test_importInternalLibrary() async {
-    // Note, in these error cases we may generate an UNUSED_IMPORT hint, while
-    // we could prevent the hint from being generated by testing the import
-    // directive for the error, this is such a minor corner case that we don't
-    // think we should add the additional computation time to figure out such
-    // cases.
-    await assertErrorsInCode('''
-import 'dart:_interceptors';
-''', [
-      error(CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, 7, 20),
-      error(HintCode.UNUSED_IMPORT, 7, 20),
-    ]);
-  }
-
-  test_importOfNonLibrary() async {
-    newFile("/test/lib/part.dart", content: r'''
-part of lib;
-class A{}
-''');
-    await assertErrorsInCode(r'''
-library lib;
-import 'part.dart';
-A a;
-''', [
-      error(CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY, 20, 11),
-    ]);
-  }
-
-  test_initializerForNonExistent_const() async {
-    // Check that the absence of a matching field doesn't cause a
-    // crash during constant evaluation.
-    await assertErrorsInCode(r'''
-class A {
-  const A() : x = 'foo';
-}
-A a = const A();
-''', [
-      error(CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD, 24, 9),
-    ]);
-  }
-
-  test_initializerForNonExistent_initializer() async {
-    await assertErrorsInCode(r'''
-class A {
-  A() : x = 0 {}
-}
-''', [
-      error(CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD, 18, 5),
-    ]);
-  }
-
-  test_initializerForStaticField() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int x;
-  A() : x = 0 {}
-}
-''', [
-      error(CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD, 34, 5),
-    ]);
-  }
-
-  test_initializingFormalForNonExistentField() async {
-    await assertErrorsInCode(r'''
-class A {
-  A(this.x) {}
-}
-''', [
-      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD, 14,
-          6),
-    ]);
-  }
-
-  test_initializingFormalForNonExistentField_notInEnclosingClass() async {
-    await assertErrorsInCode(r'''
-class A {
-int x;
-}
-class B extends A {
-  B(this.x) {}
-}
-''', [
-      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD, 43,
-          6),
-    ]);
-  }
-
-  test_initializingFormalForNonExistentField_optional() async {
-    await assertErrorsInCode(r'''
-class A {
-  A([this.x]) {}
-}
-''', [
-      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD, 15,
-          6),
-    ]);
-  }
-
-  test_initializingFormalForNonExistentField_synthetic() async {
-    await assertErrorsInCode(r'''
-class A {
-  int get x => 1;
-  A(this.x) {}
-}
-''', [
-      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD, 32,
-          6),
-    ]);
-  }
-
-  test_initializingFormalForStaticField() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int x;
-  A([this.x]) {}
-}
-''', [
-      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD, 31, 6),
-    ]);
-  }
-
-  test_instanceMemberAccessFromFactory_named() async {
-    await assertErrorsInCode(r'''
-class A {
-  m() {}
-  A();
-  factory A.make() {
-    m();
-    return new A();
-  }
-}
-''', [
-      error(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY, 51, 1),
-    ]);
-  }
-
-  test_instanceMemberAccessFromFactory_unnamed() async {
-    await assertErrorsInCode(r'''
-class A {
-  m() {}
-  A._();
-  factory A() {
-    m();
-    return new A._();
-  }
-}
-''', [
-      error(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY, 48, 1),
-    ]);
-  }
-
-  test_instantiateEnum_const() async {
-    await assertErrorsInCode(r'''
-enum E { ONE }
-E e(String name) {
-  return const E();
-}
-''', [
-      error(CompileTimeErrorCode.INSTANTIATE_ENUM, 49, 1),
-    ]);
-  }
-
-  test_instantiateEnum_new() async {
-    await assertErrorsInCode(r'''
-enum E { ONE }
-E e(String name) {
-  return new E();
-}
-''', [
-      error(CompileTimeErrorCode.INSTANTIATE_ENUM, 47, 1),
-    ]);
-  }
-
-  test_integerLiteralAsDoubleOutOfRange_excessiveExponent() async {
-    await assertErrorsInCode(
-        'double x = 0xfffffffffffff80000000000000000000000000000000000000000000'
-        '0000000000000000000000000000000000000000000000000000000000000000000000'
-        '0000000000000000000000000000000000000000000000000000000000000000000000'
-        '000000000000000000000000000000000000000000000000000000000000;',
-        [
-          error(CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE, 11,
-              259),
-        ]);
-    AnalysisError firstError = result.errors[0];
-
-    // Check that we suggest the max double instead.
-    expect(
-        true,
-        firstError.correction.contains(
-            '179769313486231570814527423731704356798070567525844996598917476803'
-            '157260780028538760589558632766878171540458953514382464234321326889'
-            '464182768467546703537516986049910576551282076245490090389328944075'
-            '868508455133942304583236903222948165808559332123348274797826204144'
-            '723168738177180919299881250404026184124858368'));
-  }
-
-  test_integerLiteralAsDoubleOutOfRange_excessiveMantissa() async {
-    await assertErrorsInCode('''
-double x = 9223372036854775809;
-''', [
-      error(CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE, 11, 19),
-    ]);
-    AnalysisError firstError = result.errors[0];
-    // Check that we suggest a valid double instead.
-    expect(true, firstError.correction.contains('9223372036854775808'));
-  }
-
-  test_integerLiteralOutOfRange_negative() async {
-    await assertErrorsInCode('''
-int x = -9223372036854775809;
-''', [
-      error(CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE, 9, 19),
-    ]);
-  }
-
-  test_integerLiteralOutOfRange_positive() async {
-    await assertErrorsInCode('''
-int x = 9223372036854775808;
-''', [
-      error(CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE, 8, 19),
-    ]);
-  }
-
-  test_invalidModifierOnSetter_member_async() async {
-    // TODO(danrubel): Investigate why error message is duplicated when
-    // using fasta parser.
-    await assertErrorsInCode(r'''
-class A {
-  set x(v) async {}
-}
-''', [
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 5),
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 5),
-    ]);
-  }
-
-  test_invalidModifierOnSetter_member_asyncStar() async {
-    await assertErrorsInCode(r'''
-class A {
-  set x(v) async* {}
-}
-''', [
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 5),
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 5),
-    ]);
-  }
-
-  test_invalidModifierOnSetter_member_syncStar() async {
-    await assertErrorsInCode(r'''
-class A {
-  set x(v) sync* {}
-}
-''', [
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 4),
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 4),
-    ]);
-  }
-
-  test_invalidModifierOnSetter_topLevel_async() async {
-    await assertErrorsInCode('''
-set x(v) async {}
-''', [
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 5),
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 5),
-    ]);
-  }
-
-  test_invalidModifierOnSetter_topLevel_asyncStar() async {
-    await assertErrorsInCode('''
-set x(v) async* {}
-''', [
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 5),
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 5),
-    ]);
-  }
-
-  test_invalidModifierOnSetter_topLevel_syncStar() async {
-    await assertErrorsInCode('''
-set x(v) sync* {}
-''', [
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 4),
-      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 4),
-    ]);
-  }
-
-  test_length_of_erroneous_constant() async {
-    // Attempting to compute the length of constant that couldn't be evaluated
-    // (due to an error) should not crash the analyzer (see dartbug.com/23383)
-    await assertErrorsInCode('''
-const int i = (1 ? 'alpha' : 'beta').length;
-''', [
-      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 14,
-          29),
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 15, 1),
-      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, 15, 1),
-    ]);
-  }
-
-  test_multipleRedirectingConstructorInvocations() async {
-    await assertErrorsInCode(r'''
-class A {
-  A() : this.a(), this.b();
-  A.a() {}
-  A.b() {}
-}
-''', [
-      error(CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS,
-          28, 8),
-    ]);
-  }
-
-  test_multipleSuperInitializers() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B extends A {
-  B() : super(), super() {}
-}
-''', [
-      error(StrongModeCode.INVALID_SUPER_INVOCATION, 39, 7),
-      error(CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS, 48, 7),
-    ]);
-  }
-
-  test_nativeClauseInNonSDKCode() async {
-    await assertErrorsInCode('''
-class A native 'string' {}
-''', [
-      error(ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE, 8, 15),
-    ]);
-  }
-
-  test_nativeFunctionBodyInNonSDKCode_function() async {
-    await assertErrorsInCode('''
-int m(a) native 'string';
-''', [
-      error(ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, 9, 16),
-    ]);
-  }
-
-  test_nativeFunctionBodyInNonSDKCode_method() async {
-    await assertErrorsInCode(r'''
-class A{
-  static int m(a) native 'string';
-}
-''', [
-      error(ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, 27, 16),
-    ]);
-  }
-
-  test_noAnnotationConstructorArguments() async {
-    await assertErrorsInCode(r'''
-class A {
-  const A();
-}
-@A
-main() {
-}
-''', [
-      error(CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, 25, 2),
-    ]);
-  }
-
-  test_nonConstantAnnotationConstructor_named() async {
-    await assertErrorsInCode(r'''
-class A {
-  A.fromInt() {}
-}
-@A.fromInt()
-main() {
-}
-''', [
-      error(CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, 29, 12),
-    ]);
-  }
-
-  test_nonConstantAnnotationConstructor_unnamed() async {
-    await assertErrorsInCode(r'''
-class A {
-  A() {}
-}
-@A()
-main() {
-}
-''', [
-      error(CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, 21, 4),
-    ]);
-  }
-
-  test_nonConstantDefaultValue_function_named() async {
-    await assertErrorsInCode(r'''
-int y;
-f({x : y}) {}
-''', [
-      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 14, 1),
-    ]);
-  }
-
-  test_nonConstantDefaultValue_function_positional() async {
-    await assertErrorsInCode(r'''
-int y;
-f([x = y]) {}
-''', [
-      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 14, 1),
-    ]);
-  }
-
-  test_nonConstantDefaultValue_inConstructor_named() async {
-    await assertErrorsInCode(r'''
-class A {
-  int y;
-  A({x : y}) {}
-}
-''', [
-      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 28, 1),
-    ]);
-  }
-
-  test_nonConstantDefaultValue_inConstructor_positional() async {
-    await assertErrorsInCode(r'''
-class A {
-  int y;
-  A([x = y]) {}
-}
-''', [
-      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 28, 1),
-    ]);
-  }
-
-  test_nonConstantDefaultValue_method_named() async {
-    await assertErrorsInCode(r'''
-class A {
-  int y;
-  m({x : y}) {}
-}
-''', [
-      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 28, 1),
-    ]);
-  }
-
-  test_nonConstantDefaultValue_method_positional() async {
-    await assertErrorsInCode(r'''
-class A {
-  int y;
-  m([x = y]) {}
-}
-''', [
-      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 28, 1),
-    ]);
-  }
-
-  test_nonConstantDefaultValueFromDeferredLibrary() async {
-    newFile('/test/lib/lib1.dart', content: '''
-library lib1;
-const V = 1;
-''');
-    await assertErrorsInCode('''
-library root;
-import 'lib1.dart' deferred as a;
-f({x : a.V}) {}
-''', [
-      error(
-          CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY,
-          55,
-          3),
-    ]);
-  }
-
-  test_nonConstantDefaultValueFromDeferredLibrary_nested() async {
-    newFile('/test/lib/lib1.dart', content: '''
-library lib1;
-const V = 1;
-''');
-    await assertErrorsInCode('''
-library root;
-import 'lib1.dart' deferred as a;
-f({x : a.V + 1}) {}
-''', [
-      error(
-          CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY,
-          55,
-          7),
-    ]);
-  }
-
-  test_nonConstMapAsExpressionStatement_begin() async {
-    // TODO(danrubel): Consider improving recovery
-    await assertErrorsInCode(r'''
-f() {
-  {'a' : 0, 'b' : 1}.length;
-}
-''', [
-      error(ParserErrorCode.EXPECTED_TOKEN, 9, 3),
-      error(ParserErrorCode.EXPECTED_TOKEN, 13, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 13, 1),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 13, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 15, 1),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 16, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 16, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 16, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 18, 3),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 22, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 22, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 22, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 24, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
-    ]);
-  }
-
-  test_nonConstMapAsExpressionStatement_only() async {
-    // TODO(danrubel): Consider improving recovery
-    await assertErrorsInCode(r'''
-f() {
-  {'a' : 0, 'b' : 1};
-}
-''', [
-      error(ParserErrorCode.EXPECTED_TOKEN, 9, 3),
-      error(ParserErrorCode.EXPECTED_TOKEN, 13, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 13, 1),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 13, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 15, 1),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 16, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 16, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 16, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 18, 3),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 22, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 22, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 22, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 24, 1),
-    ]);
-  }
-
-  test_nonConstValueInInitializer_instanceCreation_inDifferentFile() async {
-    newFile('/test/lib/a.dart', content: '''
-import 'b.dart';
-const v = const MyClass();
-''');
-    await assertErrorsInCode('''
-class MyClass {
-  const MyClass([p = foo]);
-}
-''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 37, 3),
-      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 37, 3),
-    ]);
-  }
-
-  test_symbol_constructor_badArgs() async {
-    await assertErrorsInCode(r'''
-var s1 = const Symbol('3');
-var s2 = const Symbol(3);
-var s3 = const Symbol();
-var s4 = const Symbol('x', 'y');
-var s5 = const Symbol('x', foo: 'x');
-''', [
-      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 9, 17),
-      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 37, 15),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 50, 1),
-      error(CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS, 75, 2),
-      error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS, 100, 10),
-      error(CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER, 139, 3),
-    ]);
-  }
-
-  Future<void> _check_constEvalTypeBoolOrInt_binary(String expr) async {
-    await assertErrorsInCode('''
-const int a = 0;
-const _ = $expr;
-''', [
-      error(HintCode.UNUSED_ELEMENT, 23, 1),
-      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT, 27, 6),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 2),
-    ]);
-  }
-
-  Future<void> _check_constEvalTypeInt_binary(String expr) async {
-    await assertErrorsInCode('''
-const int a = 0;
-const _ = $expr;
-''', [
-      error(HintCode.UNUSED_ELEMENT, 23, 1),
-      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT, 27, 6),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 2),
-    ]);
-  }
-
-  Future<void> _check_constEvalTypeNum_binary(String expr) async {
-    await assertErrorsInCode('''
-const num a = 0;
-const _ = $expr;
-''', [
-      error(HintCode.UNUSED_ELEMENT, 23, 1),
-      error(CompileTimeErrorCode.CONST_EVAL_TYPE_NUM, 27, 6),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 2),
-    ]);
-  }
-}
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
deleted file mode 100644
index 5ef0017..0000000
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/dart/error/syntactic_errors.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../src/dart/resolution/driver_resolution.dart';
-import 'compile_time_error_code.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(CompileTimeErrorCodeTest);
-    defineReflectiveTests(ControlFlowCollectionsTest);
-  });
-}
-
-@reflectiveTest
-class CompileTimeErrorCodeTest extends CompileTimeErrorCodeTestBase {
-  @override
-  @failingTest
-  test_awaitInWrongContext_sync() {
-    return super.test_awaitInWrongContext_sync();
-  }
-
-  @override
-  @failingTest
-  test_constEvalThrowsException() {
-    return super.test_constEvalThrowsException();
-  }
-}
-
-@reflectiveTest
-class ControlFlowCollectionsTest extends DriverResolutionTest {
-  test_listElementTypeNotAssignable_const() async {
-    await assertErrorsInCode('''
-var v = const <String>[42];
-''', [
-      error(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 23, 2),
-    ]);
-  }
-
-  test_mapValueTypeNotAssignable_const() async {
-    await assertErrorsInCode('''
-var v = const <String, String>{'a' : 2};
-''', [
-      error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 37, 1),
-    ]);
-  }
-
-  test_nonBoolCondition_for_declaration() async {
-    // https://github.com/dart-lang/sdk/issues/24713
-    await assertErrorsInCode(r'''
-f() {
-  for (int i = 0; 3;) {}
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 17, 1),
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 24, 1),
-    ]);
-  }
-
-  test_nonBoolCondition_for_expression() async {
-    // https://github.com/dart-lang/sdk/issues/24713
-    await assertErrorsInCode(r'''
-f() {
-  int i;
-  for (i = 0; 3;) {}
-}''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 12, 1),
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 29, 1),
-    ]);
-  }
-
-  test_nonConstMapAsExpressionStatement_begin() async {
-    // TODO(danrubel) Fasta is not recovering well.
-    // Ideally we would produce a single diagnostic:
-    // CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT
-    await assertErrorsInCode(r'''
-f() {
-  {'a' : 0, 'b' : 1}.length;
-}
-''', [
-      error(ParserErrorCode.EXPECTED_TOKEN, 9, 3),
-      error(ParserErrorCode.EXPECTED_TOKEN, 13, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 13, 1),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 13, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 15, 1),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 16, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 16, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 16, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 18, 3),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 22, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 22, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 22, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 24, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
-    ]);
-  }
-
-  test_nonConstMapAsExpressionStatement_only() async {
-    // TODO(danrubel) Fasta is not recovering well.
-    // Ideally we would produce a single diagnostic:
-    // CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT
-    await assertErrorsInCode(r'''
-f() {
-  {'a' : 0, 'b' : 1};
-}
-''', [
-      error(ParserErrorCode.EXPECTED_TOKEN, 9, 3),
-      error(ParserErrorCode.EXPECTED_TOKEN, 13, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 13, 1),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 13, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 15, 1),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 16, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 16, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 16, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 18, 3),
-      error(ParserErrorCode.UNEXPECTED_TOKEN, 22, 1),
-      error(ParserErrorCode.MISSING_IDENTIFIER, 22, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 22, 1),
-      error(ParserErrorCode.EXPECTED_TOKEN, 24, 1),
-    ]);
-  }
-
-  test_setElementTypeNotAssignable_const() async {
-    await assertErrorsInCode('''
-var v = const <String>{42};
-''', [
-      error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 23, 2),
-    ]);
-  }
-}
diff --git a/pkg/analyzer/test/generated/constant_test.dart b/pkg/analyzer/test/generated/constant_test.dart
index ddf6aab..097479c 100644
--- a/pkg/analyzer/test/generated/constant_test.dart
+++ b/pkg/analyzer/test/generated/constant_test.dart
@@ -9,7 +9,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class ConstantEvaluatorTest extends DriverResolutionTest {
+class ConstantEvaluatorTest extends PubPackageResolutionTest {
   test_bitAnd_int_int() async {
     await _assertValueInt(74 & 42, "74 & 42");
   }
diff --git a/pkg/analyzer/test/generated/element_resolver_test.dart b/pkg/analyzer/test/generated/element_resolver_test.dart
index 0636397..a88deb2 100644
--- a/pkg/analyzer/test/generated/element_resolver_test.dart
+++ b/pkg/analyzer/test/generated/element_resolver_test.dart
@@ -9,10 +9,12 @@
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/scope.dart';
 import 'package:analyzer/dart/element/type.dart';
 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/element/scope.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/generated/element_resolver.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -24,7 +26,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 import '../util/element_type_matchers.dart';
 import 'elements_types_mixin.dart';
 import 'test_analysis_context.dart';
@@ -47,9 +49,9 @@
 }
 
 @reflectiveTest
-class AnnotationElementResolverTest extends DriverResolutionTest {
+class AnnotationElementResolverTest extends PubPackageResolutionTest {
   test_class_namedConstructor() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A.named();
 }
@@ -78,7 +80,7 @@
   }
 
   test_class_prefixed_namedConstructor() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A.named();
 }
@@ -109,7 +111,7 @@
   }
 
   test_class_prefixed_staticConstField() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static const V = 0;
 }
@@ -139,7 +141,7 @@
   }
 
   test_class_prefixed_unnamedConstructor() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A();
 }
@@ -167,7 +169,7 @@
   }
 
   test_class_staticConstField() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static const V = 0;
 }
@@ -195,7 +197,7 @@
   }
 
   test_class_unnamedConstructor() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A();
 }
@@ -221,7 +223,7 @@
   }
 
   test_topLevelVariable() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const V = 0;
 ''');
     await _validateAnnotation('', '@V', (SimpleIdentifier name1,
@@ -245,7 +247,7 @@
   }
 
   test_topLevelVariable_prefixed() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const V = 0;
 ''');
     await _validateAnnotation('as p', '@p.V', (SimpleIdentifier name1,
@@ -404,8 +406,10 @@
     //
     SimpleIdentifier array = AstTestFactory.identifier3("a");
     array.staticType = interfaceTypeStar(classD);
-    IndexExpression expression =
-        AstTestFactory.indexExpression(array, AstTestFactory.identifier3("i"));
+    IndexExpression expression = AstTestFactory.indexExpression(
+      target: array,
+      index: AstTestFactory.identifier3("i"),
+    );
     expect(_resolveIndexExpression(expression), same(operator));
     _listener.assertNoErrors();
   }
@@ -442,8 +446,7 @@
         ElementFactory.setterElement(propName, false, _typeProvider.intType);
     classA.accessors = <PropertyAccessorElement>[getter, setter];
     // set name scope
-    _visitor.nameScope = EnclosedScope(null)
-      ..defineNameWithoutChecking('A', classA);
+    _visitor.nameScope = LocalScope(null)..add(classA);
     // prepare "A.p"
     PrefixedIdentifier prefixed = AstTestFactory.identifier5('A', 'p');
     CommentReference commentReference =
@@ -462,8 +465,7 @@
         ElementFactory.methodElement("m", _typeProvider.intType);
     classA.methods = <MethodElement>[method];
     // set name scope
-    _visitor.nameScope = EnclosedScope(null)
-      ..defineNameWithoutChecking('A', classA);
+    _visitor.nameScope = LocalScope(null)..add(classA);
     // prepare "A.m"
     PrefixedIdentifier prefixed = AstTestFactory.identifier5('A', 'm');
     CommentReference commentReference =
@@ -482,8 +484,7 @@
         ElementFactory.methodElement("==", _typeProvider.boolType);
     classA.methods = <MethodElement>[method];
     // set name scope
-    _visitor.nameScope = EnclosedScope(null)
-      ..defineNameWithoutChecking('A', classA);
+    _visitor.nameScope = LocalScope(null)..add(classA);
     // prepare "A.=="
     PrefixedIdentifier prefixed = AstTestFactory.identifier5('A', '==');
     CommentReference commentReference =
@@ -1029,7 +1030,9 @@
     try {
       _visitor.enclosingClass = enclosingClass;
       EnclosedScope innerScope = ClassScope(
-          TypeParameterScope(outerScope, enclosingClass), enclosingClass);
+        TypeParameterScope(outerScope, enclosingClass.typeParameters),
+        enclosingClass,
+      );
       _visitor.nameScope = innerScope;
       node.accept(_resolver);
     } finally {
@@ -1061,10 +1064,10 @@
   void _resolveNode(AstNode node, [List<Element> definedElements]) {
     Scope outerScope = _visitor.nameScope;
     try {
-      EnclosedScope innerScope = EnclosedScope(outerScope);
+      var innerScope = LocalScope(outerScope);
       if (definedElements != null) {
         for (Element element in definedElements) {
-          innerScope.define(element);
+          innerScope.add(element);
         }
       }
       _visitor.nameScope = innerScope;
diff --git a/pkg/analyzer/test/generated/elements_types_mixin.dart b/pkg/analyzer/test/generated/elements_types_mixin.dart
index e4010b2..00b967c 100644
--- a/pkg/analyzer/test/generated/elements_types_mixin.dart
+++ b/pkg/analyzer/test/generated/elements_types_mixin.dart
@@ -590,17 +590,49 @@
     return element;
   }
 
-  TypeParameterTypeImpl typeParameterTypeNone(TypeParameterElement element) {
-    return element.instantiate(nullabilitySuffix: NullabilitySuffix.none);
+  TypeParameterTypeImpl typeParameterType(
+    TypeParameterElement element, {
+    @required NullabilitySuffix nullabilitySuffix,
+    DartType promotedBound,
+  }) {
+    return TypeParameterTypeImpl(
+      element: element,
+      nullabilitySuffix: nullabilitySuffix,
+      promotedBound: promotedBound,
+    );
+  }
+
+  TypeParameterTypeImpl typeParameterTypeNone(
+    TypeParameterElement element, {
+    DartType promotedBound,
+  }) {
+    return typeParameterType(
+      element,
+      nullabilitySuffix: NullabilitySuffix.none,
+      promotedBound: promotedBound,
+    );
   }
 
   TypeParameterTypeImpl typeParameterTypeQuestion(
-      TypeParameterElement element) {
-    return element.instantiate(nullabilitySuffix: NullabilitySuffix.question);
+    TypeParameterElement element, {
+    DartType promotedBound,
+  }) {
+    return typeParameterType(
+      element,
+      nullabilitySuffix: NullabilitySuffix.question,
+      promotedBound: promotedBound,
+    );
   }
 
-  TypeParameterTypeImpl typeParameterTypeStar(TypeParameterElement element) {
-    return element.instantiate(nullabilitySuffix: NullabilitySuffix.star);
+  TypeParameterTypeImpl typeParameterTypeStar(
+    TypeParameterElement element, {
+    DartType promotedBound,
+  }) {
+    return typeParameterType(
+      element,
+      nullabilitySuffix: NullabilitySuffix.star,
+      promotedBound: promotedBound,
+    );
   }
 }
 
diff --git a/pkg/analyzer/test/generated/error_suppression_test.dart b/pkg/analyzer/test/generated/error_suppression_test.dart
index 877c713..7c6e3d9 100644
--- a/pkg/analyzer/test/generated/error_suppression_test.dart
+++ b/pkg/analyzer/test/generated/error_suppression_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,14 +14,14 @@
 }
 
 @reflectiveTest
-class ErrorSuppressionTest extends DriverResolutionTest with PackageMixin {
+class ErrorSuppressionTest extends PubPackageResolutionTest {
   String get ignoredCode => 'unused_element';
 
   test_does_not_ignore_errors() async {
     await assertErrorsInCode('''
 int x = ''; // ignore: invalid_assignment
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 8, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 8, 2),
     ]);
   }
 
@@ -31,7 +30,7 @@
 // ignore: unused_import, undefined_function
 f() => g();
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_FUNCTION, 52, 1),
+      error(CompileTimeErrorCode.UNDEFINED_FUNCTION, 52, 1),
     ]);
   }
 
@@ -41,7 +40,7 @@
 int x = '';
 int _y = 0; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 34, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 34, 2),
       error(HintCode.UNUSED_ELEMENT, 42, 2),
     ]);
   }
@@ -116,7 +115,7 @@
   }
 
   test_ignore_uniqueName() async {
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
     await assertNoErrorsInCode('''
 import 'package:meta/meta.dart';
 
@@ -139,7 +138,7 @@
 int x = '';
 const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 43, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 43, 2),
       error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 57,
           1),
     ]);
@@ -153,7 +152,7 @@
 ''', [
       error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 43,
           1),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 43, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 43, 1),
     ]);
   }
 
@@ -162,7 +161,7 @@
 // ignore invalid_assignment
 String y = 3; //INVALID_ASSIGNMENT
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 40, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 40, 1),
     ]);
   }
 
@@ -228,7 +227,7 @@
 int x = ''; //INVALID_ASSIGNMENT
 const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 8, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 8, 2),
       error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 43,
           1),
     ]);
@@ -245,7 +244,7 @@
 
   test_undefined_function_within_flutter_can_be_ignored() async {
     await assertErrorsInFile(
-      '/workspace/flutterlib/flutter.dart',
+      '$workspaceRootPath/flutterlib/flutter.dart',
       '''
 // ignore: undefined_function
 f() => g();
@@ -256,17 +255,17 @@
 
   test_undefined_function_within_flutter_without_ignore() async {
     await assertErrorsInFile(
-      '/workspace/flutterlib/flutter.dart',
+      '$workspaceRootPath/flutterlib/flutter.dart',
       '''
 f() => g();
 ''',
-      [error(StaticTypeWarningCode.UNDEFINED_FUNCTION, 7, 1)],
+      [error(CompileTimeErrorCode.UNDEFINED_FUNCTION, 7, 1)],
     );
   }
 
   test_undefined_prefixed_name_within_flutter_can_be_ignored() async {
     await assertErrorsInFile(
-      '/workspace/flutterlib/flutter.dart',
+      '$workspaceRootPath/flutterlib/flutter.dart',
       '''
 import 'dart:collection' as c;
 // ignore: undefined_prefixed_name
diff --git a/pkg/analyzer/test/generated/invalid_code_test.dart b/pkg/analyzer/test/generated/invalid_code_test.dart
index 50449a8..dc3b656 100644
--- a/pkg/analyzer/test/generated/invalid_code_test.dart
+++ b/pkg/analyzer/test/generated/invalid_code_test.dart
@@ -4,12 +4,10 @@
 
 import 'dart:async';
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -23,7 +21,7 @@
 /// errors generated, but we want to make sure that there is at least one,
 /// and analysis finishes without exceptions.
 @reflectiveTest
-class InvalidCodeTest extends DriverResolutionTest {
+class InvalidCodeTest extends PubPackageResolutionTest {
   /// This code results in a method with the empty name, and the default
   /// constructor, which also has the empty name. The `Map` in `f` initializer
   /// references the empty name.
@@ -330,6 +328,17 @@
 ''');
   }
 
+  test_typeBeforeAnnotation() async {
+    await _assertCanBeAnalyzed('''
+class A {
+  const A([x]);
+}
+class B {
+  dynamic @A(const A()) x;
+}
+''');
+  }
+
   Future<void> _assertCanBeAnalyzed(String text) async {
     await resolveTestCode(text);
     assertHasTestErrors();
@@ -337,15 +346,8 @@
 }
 
 @reflectiveTest
-class InvalidCodeWithNullSafetyTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class InvalidCodeWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_issue_40837() async {
     await _assertCanBeAnalyzed('''
 class A {
diff --git a/pkg/analyzer/test/generated/issues_test.dart b/pkg/analyzer/test/generated/issues_test.dart
index 7c6fdbf9..85286a5 100644
--- a/pkg/analyzer/test/generated/issues_test.dart
+++ b/pkg/analyzer/test/generated/issues_test.dart
@@ -4,7 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 /// Tests for various end-to-end cases reported as user issues, where it is
 /// not obvious where to put the test otherwise.
 @reflectiveTest
-class IssuesTest extends DriverResolutionTest {
+class IssuesTest extends PubPackageResolutionTest {
   /// https://github.com/dart-lang/sdk/issues/38565
   ///
   /// The issue was that type inference for annotation instantiation
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 2b9fc1f..ac6d07b 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -4,16 +4,14 @@
 
 import 'dart:async';
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.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:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -23,13 +21,7 @@
 }
 
 @reflectiveTest
-class NonConstantValueInInitializer extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0',
-        additionalFeatures: [Feature.constant_update_2018]);
-
+class NonConstantValueInInitializer extends PubPackageResolutionTest {
   test_intLiteralInDoubleContext_const_exact() async {
     await assertNoErrorsInCode(r'''
 const double x = 0;
@@ -63,13 +55,13 @@
 }
 
 @reflectiveTest
-class NonErrorResolverTest extends DriverResolutionTest {
+class NonErrorResolverTest extends PubPackageResolutionTest {
   test_ambiguousExport() async {
-    newFile("/test/lib/lib1.dart", content: r'''
+    newFile("$testPackageLibPath/lib1.dart", content: r'''
 library lib1;
 class M {}
 ''');
-    newFile("/test/lib/lib2.dart", content: r'''
+    newFile("$testPackageLibPath/lib2.dart", content: r'''
 library lib2;
 class N {}
 ''');
@@ -81,12 +73,12 @@
   }
 
   test_ambiguousExport_combinators_hide() async {
-    newFile("/test/lib/lib1.dart", content: r'''
+    newFile("$testPackageLibPath/lib1.dart", content: r'''
 library L1;
 class A {}
 class B {}
 ''');
-    newFile("/test/lib/lib2.dart", content: r'''
+    newFile("$testPackageLibPath/lib2.dart", content: r'''
 library L2;
 class B {}
 class C {}
@@ -99,12 +91,12 @@
   }
 
   test_ambiguousExport_combinators_show() async {
-    newFile("/test/lib/lib1.dart", content: r'''
+    newFile("$testPackageLibPath/lib1.dart", content: r'''
 library L1;
 class A {}
 class B {}
 ''');
-    newFile("/test/lib/lib2.dart", content: r'''
+    newFile("$testPackageLibPath/lib2.dart", content: r'''
 library L2;
 class B {}
 class C {}
@@ -117,7 +109,7 @@
   }
 
   test_ambiguousExport_sameDeclaration() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile("$testPackageLibPath/lib.dart", content: r'''
 library lib;
 class N {}
 ''');
@@ -129,7 +121,7 @@
   }
 
   test_ambiguousImport_dart_implicitHide() async {
-    newFile('/test/lib/lib.dart', content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 class Future {
   static const zero = 0;
 }
@@ -144,17 +136,17 @@
   }
 
   test_ambiguousImport_hideCombinator() async {
-    newFile("/test/lib/lib1.dart", content: r'''
+    newFile("$testPackageLibPath/lib1.dart", content: r'''
 library lib1;
 class N {}
 class N1 {}
 ''');
-    newFile("/test/lib/lib2.dart", content: r'''
+    newFile("$testPackageLibPath/lib2.dart", content: r'''
 library lib2;
 class N {}
 class N2 {}
 ''');
-    newFile("/test/lib/lib3.dart", content: r'''
+    newFile("$testPackageLibPath/lib3.dart", content: r'''
 library lib3;
 class N {}
 class N3 {}
@@ -172,12 +164,12 @@
   }
 
   test_ambiguousImport_showCombinator() async {
-    newFile("/test/lib/lib1.dart", content: r'''
+    newFile("$testPackageLibPath/lib1.dart", content: r'''
 library lib1;
 class N {}
 class N1 {}
 ''');
-    newFile("/test/lib/lib2.dart", content: r'''
+    newFile("$testPackageLibPath/lib2.dart", content: r'''
 library lib2;
 class N {}
 class N2 {}
@@ -195,7 +187,7 @@
   }
 
   test_annotated_partOfDeclaration() async {
-    newFile('/test/lib/part.dart', content: '''
+    newFile('$testPackageLibPath/part.dart', content: '''
 @deprecated part of L;
 ''');
     await assertNoErrorsInCode('''
@@ -421,7 +413,7 @@
   }
 
   test_assignmentToFinals_importWithPrefix() async {
-    newFile("/test/lib/lib1.dart", content: r'''
+    newFile("$testPackageLibPath/lib1.dart", content: r'''
 library lib1;
 bool x = false;''');
     await assertNoErrorsInCode(r'''
@@ -716,7 +708,7 @@
   }
 
   test_closure_in_type_inferred_variable_in_other_lib() async {
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 var y = (Object x) => x is int && x.isEven;
 ''');
     await assertNoErrorsInCode('''
@@ -778,13 +770,13 @@
   }
 
   test_const_imported_defaultParameterValue_withImportPrefix() async {
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 import 'c.dart' as ccc;
 class B {
   const B([p = ccc.value]);
 }
 ''');
-    newFile('/test/lib/c.dart', content: r'''
+    newFile('$testPackageLibPath/c.dart', content: r'''
 const int value = 12345;
 ''');
     await assertNoErrorsInCode(r'''
@@ -861,7 +853,7 @@
   }
 
   test_constDeferredClass_new() async {
-    newFile('/test/lib/lib.dart', content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 class A {
   const A.b();
 }
@@ -882,7 +874,7 @@
   }
 
   test_constEval_propertyExtraction_fieldStatic_targetType() async {
-    newFile("/test/lib/math.dart", content: r'''
+    newFile("$testPackageLibPath/math.dart", content: r'''
 library math;
 const PI = 3.14;
 ''');
@@ -903,7 +895,7 @@
   }
 
   test_constEval_symbol() async {
-    newFile("/test/lib/math.dart", content: r'''
+    newFile("$testPackageLibPath/math.dart", content: r'''
 library math;
 const PI = 3.14;
 ''');
@@ -1086,7 +1078,7 @@
   }
 
   test_deprecatedMemberUse_hide() async {
-    newFile("/test/lib/lib1.dart", content: r'''
+    newFile("$testPackageLibPath/lib1.dart", content: r'''
 library lib1;
 class A {}
 @deprecated
@@ -1324,27 +1316,6 @@
 ''');
   }
 
-  test_for_in_scope() async {
-    await assertNoErrorsInCode('''
-main() {
-  List<List<int>> x = [[1]];
-  for (int x in x.first) {
-    print(x.isEven);
-  }
-}
-''');
-  }
-
-  test_forEach_genericFunctionType() async {
-    await assertNoErrorsInCode(r'''
-main() {
-  for (Null Function<T>(T, Null) e in <dynamic>[]) {
-    e;
-  }
-}
-''');
-  }
-
   test_functionDeclaration_scope_returnType() async {
     await assertNoErrorsInCode('''
 int f(int) { return 0; }
@@ -1553,7 +1524,7 @@
   }
 
   test_importDuplicatedLibraryName() async {
-    newFile("/test/lib/lib.dart", content: "library lib;");
+    newFile("$testPackageLibPath/lib.dart", content: "library lib;");
     await assertErrorsInCode(r'''
 library test;
 import 'lib.dart';
@@ -1566,8 +1537,8 @@
   }
 
   test_importDuplicatedLibraryUnnamed() async {
-    newFile("/test/lib/lib1.dart");
-    newFile("/test/lib/lib2.dart");
+    newFile("$testPackageLibPath/lib1.dart");
+    newFile("$testPackageLibPath/lib2.dart");
     // No warning on duplicate import (https://github.com/dart-lang/sdk/issues/24156)
     await assertErrorsInCode(r'''
 library test;
@@ -1580,7 +1551,7 @@
   }
 
   test_importOfNonLibrary_libraryDeclared() async {
-    newFile("/test/lib/part.dart", content: r'''
+    newFile("$testPackageLibPath/part.dart", content: r'''
 library lib1;
 class A {}
 ''');
@@ -1592,7 +1563,7 @@
   }
 
   test_importOfNonLibrary_libraryNotDeclared() async {
-    newFile("/test/lib/part.dart", content: '''
+    newFile("$testPackageLibPath/part.dart", content: '''
 class A {}
 ''');
     await assertNoErrorsInCode(r'''
@@ -1603,11 +1574,11 @@
   }
 
   test_importPrefixes_withFirstLetterDifference() async {
-    newFile("/test/lib/lib1.dart", content: r'''
+    newFile("$testPackageLibPath/lib1.dart", content: r'''
 library lib1;
 test1() {}
 ''');
-    newFile("/test/lib/lib2.dart", content: r'''
+    newFile("$testPackageLibPath/lib2.dart", content: r'''
 library lib2;
 test2() {}
 ''');
@@ -1816,7 +1787,7 @@
   }
 
   test_instanceMethodNameCollidesWithSuperclassStatic_field() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile("$testPackageLibPath/lib.dart", content: r'''
 library L;
 class A {
   static var _m;
@@ -1833,7 +1804,7 @@
   }
 
   test_instanceMethodNameCollidesWithSuperclassStatic_method() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile("$testPackageLibPath/lib.dart", content: r'''
 library L;
 class A {
   static _m() {}
@@ -1927,7 +1898,7 @@
   }
 
   test_invalidAnnotation_constantVariable_field_importWithPrefix() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile("$testPackageLibPath/lib.dart", content: r'''
 library lib;
 class A {
   static const C = 0;
@@ -1951,7 +1922,7 @@
   }
 
   test_invalidAnnotation_constantVariable_topLevel_importWithPrefix() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile("$testPackageLibPath/lib.dart", content: r'''
 library lib;
 const C = 0;
 ''');
@@ -1964,7 +1935,7 @@
   }
 
   test_invalidAnnotation_constConstructor_importWithPrefix() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile("$testPackageLibPath/lib.dart", content: r'''
 library lib;
 class A {
   const A(int p);
@@ -1979,7 +1950,7 @@
   }
 
   test_invalidAnnotation_constConstructor_named_importWithPrefix() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile("$testPackageLibPath/lib.dart", content: r'''
 library lib;
 class A {
   const A.named(int p);
@@ -2156,12 +2127,12 @@
   }
 
   Future test_issue32114() async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 class O {}
 
 typedef T Func<T extends O>(T e);
 ''');
-    newFile('/test/lib/b.dart', content: '''
+    newFile('$testPackageLibPath/b.dart', content: '''
 import 'a.dart';
 export 'a.dart' show Func;
 
@@ -2202,7 +2173,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 93, 1),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 97, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 97, 1),
     ]);
     var z = result.unit.declaredElement.topLevelVariables
         .where((e) => e.name == 'z')
@@ -2211,7 +2182,7 @@
   }
 
   test_issue_35320_lists() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 const x = const <String>['a'];
 ''');
     await assertNoErrorsInCode('''
@@ -2231,7 +2202,7 @@
   }
 
   test_issue_35320_maps() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 const x = const <String, String>{'a': 'b'};
 ''');
     await assertNoErrorsInCode('''
@@ -2251,7 +2222,7 @@
   }
 
   test_loadLibraryDefined() async {
-    newFile('/test/lib/lib.dart', content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 foo() => 22;''');
     await assertNoErrorsInCode(r'''
@@ -2817,19 +2788,19 @@
   null[0];
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 0, 0),
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 0, 0),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 0, 0),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 0, 0),
     ]);
   }
 
   test_optionalNew_rewrite() async {
-    newFile("/test/lib/a.dart", content: r'''
+    newFile("$testPackageLibPath/a.dart", content: r'''
 class A {
   const A();
   const A.named();
 }
 ''');
-    newFile("/test/lib/b.dart", content: r'''
+    newFile("$testPackageLibPath/b.dart", content: r'''
 import 'a.dart';
 import 'a.dart' as p;
 
@@ -2859,7 +2830,7 @@
   }
 
   test_optionalNew_rewrite_instantiatesToBounds() async {
-    newFile("/test/lib/a.dart", content: r'''
+    newFile("$testPackageLibPath/a.dart", content: r'''
 class Unbounded<T> {
   const Unbounded();
   const Unbounded.named();
@@ -2869,7 +2840,7 @@
   const Bounded.named();
 }
 ''');
-    newFile("/test/lib/b.dart", content: r'''
+    newFile("$testPackageLibPath/b.dart", content: r'''
 import 'a.dart';
 import 'a.dart' as p;
 
@@ -3064,13 +3035,13 @@
   }
 
   test_sharedDeferredPrefix() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 f1() {}
 ''');
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 f2() {}
 ''');
-    newFile('/test/lib/lib3.dart', content: r'''
+    newFile('$testPackageLibPath/lib3.dart', content: r'''
 f3() {}
 ''');
     await assertNoErrorsInCode(r'''
@@ -3088,7 +3059,7 @@
   }
 
   test_typedef_not_function() async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 typedef F = int;
 ''');
     await assertNoErrorsInCode('''
@@ -3352,7 +3323,7 @@
   }
 
   test_typeType_class_prefixed() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile("$testPackageLibPath/lib.dart", content: r'''
 library lib;
 class C {}''');
     await assertNoErrorsInCode(r'''
@@ -3375,7 +3346,7 @@
   }
 
   test_typeType_functionTypeAlias_prefixed() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile("$testPackageLibPath/lib.dart", content: r'''
 library lib;
 typedef F();''');
     await assertNoErrorsInCode(r'''
diff --git a/pkg/analyzer/test/generated/non_hint_code_test.dart b/pkg/analyzer/test/generated/non_hint_code_test.dart
index 29959b1..bd32129 100644
--- a/pkg/analyzer/test/generated/non_hint_code_test.dart
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 import 'test_support.dart';
 
 main() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class NonHintCodeTest extends DriverResolutionTest {
+class NonHintCodeTest extends PubPackageResolutionTest {
   test_issue20904BuggyTypePromotionAtIfJoin_1() async {
     // https://code.google.com/p/dart/issues/detail?id=20904
     await assertErrorsInCode(r'''
@@ -204,7 +204,7 @@
   }
 }
 
-class PubSuggestionCodeTest extends DriverResolutionTest {
+class PubSuggestionCodeTest extends PubPackageResolutionTest {
   // TODO(brianwilkerson) The tests in this class are not being run, and all but
   //  the first would fail. We should implement these checks and enable the
   //  tests.
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index b75416d..bb429e9 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -621,6 +621,7 @@
 
   @override
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -631,8 +632,16 @@
       Token endToken) {
     // beginMember --> endClassFields, endMember
     expectIn('Member');
-    super.endClassFields(externalToken, staticToken, covariantToken, lateToken,
-        varFinalOrConst, count, beginToken, endToken);
+    super.endClassFields(
+        abstractToken,
+        externalToken,
+        staticToken,
+        covariantToken,
+        lateToken,
+        varFinalOrConst,
+        count,
+        beginToken,
+        endToken);
   }
 
   @override
@@ -749,6 +758,7 @@
 
   @override
   void endExtensionFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -759,8 +769,16 @@
       Token endToken) {
     // beginMember --> endExtensionFields, endMember
     expectIn('Member');
-    super.endExtensionFields(externalToken, staticToken, covariantToken,
-        lateToken, varFinalOrConst, count, beginToken, endToken);
+    super.endExtensionFields(
+        abstractToken,
+        externalToken,
+        staticToken,
+        covariantToken,
+        lateToken,
+        varFinalOrConst,
+        count,
+        beginToken,
+        endToken);
   }
 
   @override
@@ -1005,6 +1023,7 @@
 
   @override
   void endMixinFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -1015,8 +1034,16 @@
       Token endToken) {
     // beginMember --> endMixinFields, endMember
     expectIn('Member');
-    super.endMixinFields(externalToken, staticToken, covariantToken, lateToken,
-        varFinalOrConst, count, beginToken, endToken);
+    super.endMixinFields(
+        abstractToken,
+        externalToken,
+        staticToken,
+        covariantToken,
+        lateToken,
+        varFinalOrConst,
+        count,
+        beginToken,
+        endToken);
   }
 
   @override
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index 9bd30a8..f124938 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -172,6 +172,16 @@
     expect(invocation.argumentList.arguments, hasLength(0));
   }
 
+  void test_parseField_abstract() {
+    createParser('abstract int i;', featureSet: nonNullable);
+    ClassMember member = parser.parseClassMember('C');
+    expect(member, isNotNull);
+    assertNoErrors();
+    expect(member, isFieldDeclaration);
+    FieldDeclaration field = member;
+    expect(field.abstractKeyword, isNotNull);
+  }
+
   void test_parseField_const_late() {
     createParser('const late T f = 0;', featureSet: nonNullable);
     ClassMember member = parser.parseClassMember('C');
@@ -321,6 +331,16 @@
     expect(variable.name, isNotNull);
   }
 
+  void test_parseField_non_abstract() {
+    createParser('int i;', featureSet: nonNullable);
+    ClassMember member = parser.parseClassMember('C');
+    expect(member, isNotNull);
+    assertNoErrors();
+    expect(member, isFieldDeclaration);
+    FieldDeclaration field = member;
+    expect(field.abstractKeyword, isNull);
+  }
+
   void test_parseField_var_late() {
     createParser('var late f;', featureSet: nonNullable);
     ClassMember member = parser.parseClassMember('C');
@@ -1676,7 +1696,7 @@
     var extension = unit.declarations[0] as ExtensionDeclaration;
     expect(extension.name.name, 'E');
     expect(extension.onKeyword.lexeme, 'on');
-    var namedType = (extension.extendedType as NamedType);
+    var namedType = extension.extendedType as NamedType;
     expect(namedType.name.name, 'C');
     expect(namedType.typeArguments.arguments, hasLength(1));
     expect(extension.members, hasLength(0));
@@ -1688,7 +1708,7 @@
     var extension = unit.declarations[0] as ExtensionDeclaration;
     expect(extension.name.name, 'E');
     expect(extension.onKeyword.lexeme, 'on');
-    var namedType = (extension.extendedType as NamedType);
+    var namedType = extension.extendedType as NamedType;
     expect(namedType.name.name, 'C');
     expect(namedType.typeArguments.arguments, hasLength(1));
     expect(extension.members, hasLength(0));
@@ -1700,7 +1720,7 @@
     var extension = unit.declarations[0] as ExtensionDeclaration;
     expect(extension.name, isNull);
     expect(extension.onKeyword.lexeme, 'on');
-    var namedType = (extension.extendedType as NamedType);
+    var namedType = extension.extendedType as NamedType;
     expect(namedType.name.name, 'C');
     expect(namedType.typeArguments.arguments, hasLength(1));
     expect(extension.members, hasLength(0));
@@ -1799,7 +1819,7 @@
     expect(extension.name.name, 'E');
     expect(extension.onKeyword.lexeme, 'on');
     expect((extension.extendedType as NamedType).name.name, 'C');
-    var namedType = (extension.extendedType as NamedType);
+    var namedType = extension.extendedType as NamedType;
     expect(namedType.name.name, 'C');
     expect(namedType.typeArguments, isNull);
     expect(extension.members, hasLength(0));
@@ -1836,7 +1856,7 @@
     expect(extension.name, isNull);
     expect(extension.onKeyword.lexeme, 'on');
     expect((extension.extendedType as NamedType).name.name, 'C');
-    var namedType = (extension.extendedType as NamedType);
+    var namedType = extension.extendedType as NamedType;
     expect(namedType.name.name, 'C');
     expect(namedType.typeArguments, isNull);
     expect(extension.members, hasLength(0));
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 8bb5a73..b1fcee9 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -4416,8 +4416,8 @@
     ]);
     FunctionDeclaration declaration = unit.declarations.first;
     BlockFunctionBody blockBody = declaration.functionExpression.body;
-    ExpressionStatement statement = (blockBody).block.statements.first;
-    Expression expression = (statement).expression;
+    ExpressionStatement statement = blockBody.block.statements.first;
+    Expression expression = statement.expression;
     expect(expression, isSuperExpression);
     SuperExpression superExpression = expression;
     expect(superExpression.superKeyword, isNotNull);
@@ -6880,9 +6880,7 @@
     InstanceCreationExpressionImpl expression =
         parseExpression('new a.b.c<C>()', errors: [
       expectedError(
-          StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-          8,
-          1)
+          CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR, 8, 1)
     ]);
     expect(expression, isNotNull);
     expect(expression.keyword.keyword, Keyword.NEW);
@@ -11450,7 +11448,7 @@
 
   void test_missing_commaInArgumentList() {
     MethodInvocation expression = parseExpression("f(x: 1 y: 2)",
-        errors: ([expectedError(ParserErrorCode.EXPECTED_TOKEN, 7, 1)]));
+        errors: [expectedError(ParserErrorCode.EXPECTED_TOKEN, 7, 1)]);
     NodeList<Expression> arguments = expression.argumentList.arguments;
     expect(arguments, hasLength(2));
   }
@@ -15153,7 +15151,7 @@
     }
     var statement = parseStatement('const A<B>.c<C>();') as ExpressionStatement;
     assertErrorsWithCodes(
-        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR]);
+        [CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR]);
     expect(statement.expression, isNotNull);
   }
 
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index fc7ab58..1e9056d 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -8,49 +8,27 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/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/testing/ast_test_factory.dart';
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 import 'resolver_test_case.dart';
-import 'test_analysis_context.dart';
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(EnclosedScopeTest);
     defineReflectiveTests(ErrorResolverTest);
-    defineReflectiveTests(LibraryImportScopeTest);
-    defineReflectiveTests(LibraryScopeTest);
     defineReflectiveTests(PrefixedNamespaceTest);
-    defineReflectiveTests(ScopeTest);
     defineReflectiveTests(StrictModeTest);
     defineReflectiveTests(TypePropagationTest);
   });
 }
 
 @reflectiveTest
-class EnclosedScopeTest extends DriverResolutionTest {
-  test_define_duplicate() async {
-    Scope rootScope = _RootScope();
-    EnclosedScope scope = EnclosedScope(rootScope);
-    SimpleIdentifier identifier = AstTestFactory.identifier3('v');
-    VariableElement element1 = ElementFactory.localVariableElement(identifier);
-    VariableElement element2 = ElementFactory.localVariableElement(identifier);
-    scope.define(element1);
-    scope.define(element2);
-    expect(scope.lookup(identifier, null), same(element1));
-  }
-}
-
-@reflectiveTest
-class ErrorResolverTest extends DriverResolutionTest {
+class ErrorResolverTest extends PubPackageResolutionTest {
   test_breakLabelOnSwitchMember() async {
     await assertErrorsInCode(r'''
 class A {
@@ -129,288 +107,7 @@
 }
 
 @reflectiveTest
-class LibraryImportScopeTest extends ResolverTestCase {
-  void test_creation_empty() {
-    LibraryImportScope(createDefaultTestLibrary());
-  }
-
-  void test_creation_nonEmpty() {
-    AnalysisContext context = TestAnalysisContext();
-    String importedTypeName = "A";
-    ClassElement importedType = ClassElementImpl(importedTypeName, -1);
-    LibraryElement importedLibrary = createTestLibrary(context, "imported");
-    (importedLibrary.definingCompilationUnit as CompilationUnitElementImpl)
-        .types = <ClassElement>[importedType];
-    LibraryElementImpl definingLibrary =
-        createTestLibrary(context, "importing");
-    ImportElementImpl importElement = ImportElementImpl(0);
-    importElement.importedLibrary = importedLibrary;
-    definingLibrary.imports = <ImportElement>[importElement];
-    Scope scope = LibraryImportScope(definingLibrary);
-    expect(
-        scope.lookup(
-            AstTestFactory.identifier3(importedTypeName), definingLibrary),
-        importedType);
-  }
-
-  void test_extensions_imported() {
-    var context = TestAnalysisContext();
-
-    var extension = ElementFactory.extensionElement('test_extension');
-
-    var importedUnit1 = ElementFactory.compilationUnit('/imported1.dart');
-    importedUnit1.extensions = <ExtensionElement>[extension];
-
-    var importedLibraryName = 'imported_lib';
-    var importedLibrary = LibraryElementImpl(context, null, importedLibraryName,
-        0, importedLibraryName.length, false);
-    importedLibrary.definingCompilationUnit = importedUnit1;
-
-    var importingLibraryName = 'importing_lib';
-    var importingLibrary = LibraryElementImpl(context, null,
-        importingLibraryName, 0, importingLibraryName.length, false);
-    importingLibrary.definingCompilationUnit =
-        ElementFactory.compilationUnit('/importing.dart');
-
-    var importElement = ImportElementImpl(0);
-    importElement.importedLibrary = importedLibrary;
-    importingLibrary.imports = <ImportElement>[importElement];
-
-    expect(
-        LibraryImportScope(importingLibrary).extensions, contains(extension));
-  }
-
-  void test_prefixedAndNonPrefixed() {
-    AnalysisContext context = TestAnalysisContext();
-    String typeName = "C";
-    String prefixName = "p";
-    ClassElement prefixedType = ElementFactory.classElement2(typeName);
-    ClassElement nonPrefixedType = ElementFactory.classElement2(typeName);
-    LibraryElement prefixedLibrary =
-        createTestLibrary(context, "import.prefixed");
-    (prefixedLibrary.definingCompilationUnit as CompilationUnitElementImpl)
-        .types = <ClassElement>[prefixedType];
-    ImportElementImpl prefixedImport = ElementFactory.importFor(
-        prefixedLibrary, ElementFactory.prefix(prefixName));
-    LibraryElement nonPrefixedLibrary =
-        createTestLibrary(context, "import.nonPrefixed");
-    (nonPrefixedLibrary.definingCompilationUnit as CompilationUnitElementImpl)
-        .types = <ClassElement>[nonPrefixedType];
-    ImportElementImpl nonPrefixedImport =
-        ElementFactory.importFor(nonPrefixedLibrary, null);
-    LibraryElementImpl importingLibrary =
-        createTestLibrary(context, "importing");
-    importingLibrary.imports = <ImportElement>[
-      prefixedImport,
-      nonPrefixedImport
-    ];
-    Scope scope = LibraryImportScope(importingLibrary);
-    Element prefixedElement = scope.lookup(
-        AstTestFactory.identifier5(prefixName, typeName), importingLibrary);
-    expect(prefixedElement, same(prefixedType));
-    Element nonPrefixedElement =
-        scope.lookup(AstTestFactory.identifier3(typeName), importingLibrary);
-    expect(nonPrefixedElement, same(nonPrefixedType));
-  }
-}
-
-@reflectiveTest
-class LibraryScopeTest extends ResolverTestCase {
-  void test_creation_empty() {
-    LibraryScope(createDefaultTestLibrary());
-  }
-
-  void test_creation_nonEmpty() {
-    AnalysisContext context = TestAnalysisContext();
-    String importedTypeName = "A";
-    ClassElement importedType = ClassElementImpl(importedTypeName, -1);
-    LibraryElement importedLibrary = createTestLibrary(context, "imported");
-    (importedLibrary.definingCompilationUnit as CompilationUnitElementImpl)
-        .types = <ClassElement>[importedType];
-    LibraryElementImpl definingLibrary =
-        createTestLibrary(context, "importing");
-    ImportElementImpl importElement = ImportElementImpl(0);
-    importElement.importedLibrary = importedLibrary;
-    definingLibrary.imports = <ImportElement>[importElement];
-    Scope scope = LibraryScope(definingLibrary);
-    expect(
-        scope.lookup(
-            AstTestFactory.identifier3(importedTypeName), definingLibrary),
-        importedType);
-  }
-
-  void test_extensions() {
-    ExtensionElement extension =
-        ElementFactory.extensionElement('test_extension');
-
-    CompilationUnitElementImpl compilationUnit =
-        ElementFactory.compilationUnit('/test.dart');
-    compilationUnit.extensions = <ExtensionElement>[extension];
-
-    String libraryName = 'lib';
-    LibraryElementImpl library = LibraryElementImpl(
-        null, null, libraryName, 0, libraryName.length, false);
-    library.definingCompilationUnit = compilationUnit;
-
-    expect(LibraryScope(library).extensions, contains(extension));
-  }
-
-  void test_extensions_imported() {
-    var context = TestAnalysisContext();
-
-    var importedUnit1 = ElementFactory.compilationUnit('/imported1.dart');
-    var importedExtension = ElementFactory.extensionElement('test_extension');
-    var unnamedImportedExtension = ElementFactory.extensionElement();
-    importedUnit1.extensions = [importedExtension, unnamedImportedExtension];
-
-    var importedLibraryName = 'imported_lib';
-    var importedLibrary = LibraryElementImpl(context, null, importedLibraryName,
-        0, importedLibraryName.length, false);
-    importedLibrary.definingCompilationUnit = importedUnit1;
-
-    var importingLibraryName = 'importing_lib';
-    var importingLibrary = LibraryElementImpl(context, null,
-        importingLibraryName, 0, importingLibraryName.length, false);
-
-    var localExtension = ElementFactory.extensionElement('test_extension');
-
-    var importingUnit = ElementFactory.compilationUnit('/importing.dart');
-    importingUnit.extensions = [localExtension];
-    importingLibrary.definingCompilationUnit = importingUnit;
-
-    var importElement = ImportElementImpl(0);
-    importElement.importedLibrary = importedLibrary;
-    importingLibrary.imports = [importElement];
-
-    var libraryExtensions = LibraryScope(importingLibrary).extensions;
-
-    expect(libraryExtensions, contains(localExtension));
-    expect(libraryExtensions, contains(importedExtension));
-    expect(libraryExtensions, isNot(contains(unnamedImportedExtension)));
-  }
-
-  /// Ensure that if a library L1 defines an extension E, L2 exports L1, and L3
-  /// imports L2, then E is included in the list.
-  void test_extensions_imported_chain() {
-    var context = TestAnalysisContext();
-
-    var unit1 = ElementFactory.compilationUnit('/unit1.dart');
-    var ext1 = ElementFactory.extensionElement('ext1');
-    unit1.extensions = [ext1];
-
-    var lib1Name = 'lib1';
-    var lib1 =
-        LibraryElementImpl(context, null, lib1Name, 0, lib1Name.length, false);
-    lib1.definingCompilationUnit = unit1;
-
-    var unit2 = ElementFactory.compilationUnit('/unit2.dart');
-
-    var lib2Name = 'lib2';
-    var lib2 =
-        LibraryElementImpl(context, null, lib2Name, 0, lib2Name.length, false);
-    lib2.definingCompilationUnit = unit2;
-
-    var lib1Export = ExportElementImpl(0);
-    lib1Export.exportedLibrary = lib1;
-    lib2.exports = [lib1Export];
-
-    var importingLibraryName = 'importing_lib';
-    var importingLibrary = LibraryElementImpl(context, null,
-        importingLibraryName, 0, importingLibraryName.length, false);
-
-    var importingUnit = ElementFactory.compilationUnit('/importing.dart');
-    importingLibrary.definingCompilationUnit = importingUnit;
-
-    var lib2Import = ImportElementImpl(0);
-    lib2Import.importedLibrary = lib2;
-    importingLibrary.imports = [lib2Import];
-
-    var libraryExtensions = LibraryScope(importingLibrary).extensions;
-
-    expect(libraryExtensions, orderedEquals([ext1]));
-  }
-
-  /// Ensure that if there are two extensions with the same name that are
-  /// imported from different libraries that they are both in the list of
-  /// extensions.
-  void test_extensions_imported_same_name() {
-    var context = TestAnalysisContext();
-
-    var sharedExtensionName = 'test_ext';
-
-    var unit1 = ElementFactory.compilationUnit('/unit1.dart');
-    var ext1 = ElementFactory.extensionElement(sharedExtensionName);
-    unit1.extensions = [ext1];
-
-    var lib1Name = 'lib1';
-    var lib1 =
-        LibraryElementImpl(context, null, lib1Name, 0, lib1Name.length, false);
-    lib1.definingCompilationUnit = unit1;
-
-    var unit2 = ElementFactory.compilationUnit('/unit2.dart');
-    var ext2 = ElementFactory.extensionElement(sharedExtensionName);
-    unit2.extensions = [ext2];
-
-    var lib2Name = 'lib2';
-    var lib2 =
-        LibraryElementImpl(context, null, lib2Name, 0, lib2Name.length, false);
-    lib2.definingCompilationUnit = unit2;
-
-    var importingLibraryName = 'importing_lib';
-    var importingLibrary = LibraryElementImpl(context, null,
-        importingLibraryName, 0, importingLibraryName.length, false);
-
-    var importingUnit = ElementFactory.compilationUnit('/importing.dart');
-    importingLibrary.definingCompilationUnit = importingUnit;
-
-    var importElement1 = ImportElementImpl(0);
-    importElement1.importedLibrary = lib1;
-    var importElement2 = ImportElementImpl(0);
-    importElement2.importedLibrary = lib2;
-    importingLibrary.imports = [importElement1, importElement2];
-
-    var libraryExtensions = LibraryScope(importingLibrary).extensions;
-
-    expect(libraryExtensions, contains(ext1));
-    expect(libraryExtensions, contains(ext2));
-  }
-
-  /// Ensure that if there are two imports for the same library that the
-  /// imported extension is only in the list one time.
-  void test_extensions_imported_twice() {
-    var context = TestAnalysisContext();
-
-    var sharedExtensionName = 'test_ext';
-
-    var unit1 = ElementFactory.compilationUnit('/unit1.dart');
-    var ext1 = ElementFactory.extensionElement(sharedExtensionName);
-    unit1.extensions = [ext1];
-
-    var lib1Name = 'lib1';
-    var lib1 =
-        LibraryElementImpl(context, null, lib1Name, 0, lib1Name.length, false);
-    lib1.definingCompilationUnit = unit1;
-
-    var importingLibraryName = 'importing_lib';
-    var importingLibrary = LibraryElementImpl(context, null,
-        importingLibraryName, 0, importingLibraryName.length, false);
-
-    var importingUnit = ElementFactory.compilationUnit('/importing.dart');
-    importingLibrary.definingCompilationUnit = importingUnit;
-
-    var importElement1 = ImportElementImpl(0);
-    importElement1.importedLibrary = lib1;
-    var importElement2 = ImportElementImpl(0);
-    importElement2.importedLibrary = lib1;
-    importingLibrary.imports = [importElement1, importElement2];
-
-    var libraryExtensions = LibraryScope(importingLibrary).extensions;
-    expect(libraryExtensions, orderedEquals([ext1]));
-  }
-}
-
-@reflectiveTest
-class PrefixedNamespaceTest extends DriverResolutionTest {
+class PrefixedNamespaceTest extends PubPackageResolutionTest {
   void test_lookup_missing() {
     ClassElement element = ElementFactory.classElement2('A');
     PrefixedNamespace namespace = PrefixedNamespace('p', _toMap([element]));
@@ -438,27 +135,6 @@
   }
 }
 
-@reflectiveTest
-class ScopeTest extends DriverResolutionTest {
-  void test_define_duplicate() {
-    Scope scope = _RootScope();
-    SimpleIdentifier identifier = AstTestFactory.identifier3('v');
-    VariableElement element1 = ElementFactory.localVariableElement(identifier);
-    VariableElement element2 = ElementFactory.localVariableElement(identifier);
-    scope.define(element1);
-    scope.define(element2);
-    expect(scope.localLookup('v'), same(element1));
-  }
-
-  void test_isPrivateName_nonPrivate() {
-    expect(Scope.isPrivateName("Public"), isFalse);
-  }
-
-  void test_isPrivateName_private() {
-    expect(Scope.isPrivateName("_Private"), isTrue);
-  }
-}
-
 /// Instances of the class `StaticTypeVerifier` verify that all of the nodes in
 /// an AST structure that should have a static type associated with them do have
 /// a static type.
@@ -631,14 +307,14 @@
 /// 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 {
+class StrictModeTest extends PubPackageResolutionTest {
   test_assert_is() async {
     await assertErrorsInCode(r'''
 int f(num n) {
   assert (n is int);
   return n & 0x0F;
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 47, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 47, 1),
     ]);
   }
 
@@ -661,7 +337,7 @@
 int f(num n) {
   return (n is! int) ? 0 : n & 0x0F;
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 44, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 44, 1),
     ]);
   }
 
@@ -670,11 +346,10 @@
 int f(num n) {
   return (n is! int || n < 0) ? 0 : n & 0x0F;
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 53, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 53, 1),
     ]);
   }
 
-//  @failingTest
   test_for() async {
     await assertErrorsInCode(r'''
 int f(List<int> list) {
@@ -698,7 +373,7 @@
 }''', [
       error(HintCode.MISSING_RETURN, 4, 1),
       error(HintCode.UNUSED_LOCAL_VARIABLE, 30, 3),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 76, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 76, 1),
     ]);
   }
 
@@ -731,7 +406,7 @@
     return n & 0x0F;
   }
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 72, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 72, 1),
     ]);
   }
 
@@ -743,7 +418,7 @@
   }
   return n & 0x0F;
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 63, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 63, 1),
     ]);
   }
 
@@ -756,7 +431,7 @@
     return n & 0x0F;
   }
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 81, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 81, 1),
     ]);
   }
 
@@ -766,13 +441,13 @@
   num n = 1234;
   return n & 0x0F;
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 37, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 37, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class TypePropagationTest extends DriverResolutionTest {
+class TypePropagationTest extends PubPackageResolutionTest {
   test_assignment_null() async {
     String code = r'''
 main() {
@@ -787,20 +462,6 @@
     assertType(findNode.simple('v; // return'), 'int');
   }
 
-  test_functionExpression_asInvocationArgument_notSubtypeOfStaticType() async {
-    await assertErrorsInCode(r'''
-class A {
-  m(void f(int i)) {}
-}
-x() {
-  A a = new A();
-  a.m(() => 0);
-}''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 63, 7),
-    ]);
-    assertType(findNode.functionExpression('() => 0'), 'int Function()');
-  }
-
   test_initializer_hasStaticType() async {
     await resolveTestCode(r'''
 f() {
@@ -835,7 +496,7 @@
   }
 
   test_invocation_target_prefixed() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int max(int x, int y) => 0;
 ''');
     await resolveTestCode('''
@@ -897,7 +558,7 @@
   }
 
   test_objectAccessInference_disabled_for_library_prefix() async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 dynamic get hashCode => 42;
 ''');
     await assertNoErrorsInCode('''
@@ -918,7 +579,7 @@
   }
 
   test_objectMethodInference_disabled_for_library_prefix() async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 dynamic toString = (int x) => x + 42;
 ''');
     await assertNoErrorsInCode('''
@@ -952,8 +613,3 @@
     assertTypeDynamic(findNode.simple('v = '));
   }
 }
-
-class _RootScope extends Scope {
-  @override
-  Element internalLookup(String name) => null;
-}
diff --git a/pkg/analyzer/test/generated/resolver_test_case.dart b/pkg/analyzer/test/generated/resolver_test_case.dart
index cb180fe..dddd438 100644
--- a/pkg/analyzer/test/generated/resolver_test_case.dart
+++ b/pkg/analyzer/test/generated/resolver_test_case.dart
@@ -33,7 +33,7 @@
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 import 'test_analysis_context.dart';
 import 'test_support.dart';
 
@@ -637,9 +637,8 @@
   }
 }
 
-/// Shared infrastructure for [StaticTypeAnalyzer2Test] and
-/// [StrongModeStaticTypeAnalyzer2Test].
-class StaticTypeAnalyzer2TestShared extends DriverResolutionTest {
+/// Shared infrastructure for [StaticTypeAnalyzer2Test].
+class StaticTypeAnalyzer2TestShared extends PubPackageResolutionTest {
   /// Find the expression that starts at the offset of [search] and validate its
   /// that its static type matches the given [type].
   ///
diff --git a/pkg/analyzer/test/generated/simple_resolver_test.dart b/pkg/analyzer/test/generated/simple_resolver_test.dart
index 4ff5151..d6ce37b 100644
--- a/pkg/analyzer/test/generated/simple_resolver_test.dart
+++ b/pkg/analyzer/test/generated/simple_resolver_test.dart
@@ -8,7 +8,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 import 'resolver_test_case.dart';
 
 main() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class SimpleResolverTest extends DriverResolutionTest {
+class SimpleResolverTest extends PubPackageResolutionTest {
   test_argumentResolution_required_matching() async {
     await resolveTestCode(r'''
 class A {
@@ -422,7 +422,7 @@
   }
 
   test_entryPoint_exported() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 main() {}
 ''');
 
@@ -457,7 +457,7 @@
   }
 
   test_enum_externalLibrary() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 enum EEE {A, B, C}
 ''');
     await assertNoErrorsInCode(r'''
@@ -667,11 +667,11 @@
   }
 
   test_import_hide() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 set foo(value) {}
 class A {}''');
 
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 set foo(value) {}''');
 
     await assertNoErrorsInCode(r'''
@@ -686,7 +686,7 @@
   }
 
   test_import_prefix() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 f(int x) {
   return x * x;
 }''');
@@ -755,7 +755,7 @@
   }
 
   test_import_spaceInUri() async {
-    newFile('/test/lib/sub folder/a.dart', content: r'''
+    newFile('$testPackageLibPath/sub folder/a.dart', content: r'''
 foo() {}''');
 
     await assertNoErrorsInCode(r'''
@@ -786,7 +786,7 @@
   List<List<int>> b;
   b[0][0] = 'hi';
 }''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 39, 4),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 39, 4),
     ]);
     verifyTestResolved();
   }
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index e47e3aa..e51614b 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -11,7 +11,6 @@
 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 ResolverVisitor;
 import 'package:analyzer/src/generated/source.dart';
@@ -33,8 +32,6 @@
     defineReflectiveTests(SetLiteralsTest);
     defineReflectiveTests(StaticTypeAnalyzerTest);
     defineReflectiveTests(StaticTypeAnalyzer2Test);
-    defineReflectiveTests(StaticTypeAnalyzer3Test);
-    defineReflectiveTests(StaticTypeAnalyzerWithSetLiteralsTest);
   });
 }
 
@@ -64,6 +61,66 @@
 /// Like [StaticTypeAnalyzerTest], but as end-to-end tests.
 @reflectiveTest
 class StaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared {
+  test_emptyListLiteral_inferredFromLinkedList() async {
+    await assertErrorsInCode(r'''
+abstract class ListImpl<T> implements List<T> {}
+ListImpl<int> f() => [];
+''', [
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST, 70, 2),
+    ]);
+    expectExpressionType('[]', 'List<dynamic>');
+  }
+
+  test_emptyMapLiteral_inferredFromLinkedHashMap() async {
+    await assertErrorsInCode(r'''
+import 'dart:collection';
+LinkedHashMap<int, int> f() => {};
+''', [
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP, 57, 2),
+    ]);
+    expectExpressionType('{}', 'Map<dynamic, dynamic>');
+  }
+
+  test_emptyMapLiteral_initializer_var() async {
+    await assertErrorsInCode(r'''
+main() {
+  var v = {};
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 15, 1),
+    ]);
+    expectExpressionType('{}', 'Map<dynamic, dynamic>');
+  }
+
+  test_emptyMapLiteral_parameter_typed() async {
+    await assertNoErrorsInCode(r'''
+main() {
+  useMap({});
+}
+void useMap(Map<int, int> m) {
+}
+''');
+    expectExpressionType('{}', 'Map<int, int>');
+  }
+
+  test_emptySetLiteral_inferredFromLinkedHashSet() async {
+    await assertErrorsInCode(r'''
+import 'dart:collection';
+LinkedHashSet<int> f() => {};
+''', [
+      error(CompileTimeErrorCode.INVALID_CAST_LITERAL_SET, 52, 2),
+    ]);
+    expectExpressionType('{}', 'Set<dynamic>');
+  }
+
+  test_emptySetLiteral_initializer_typed_nested() async {
+    await assertNoErrorsInCode(r'''
+Set<Set<int>> ints = {{}};
+''');
+    expectExpressionType('{}', 'Set<int>');
+    expectExpressionType('{{}}', 'Set<Set<int>>');
+  }
+
   test_FunctionExpressionInvocation_block() async {
     await assertErrorsInCode(r'''
 main() {
@@ -169,32 +226,6 @@
   }
 }
 
-/// End-to-end tests of the static type analyzer that use the new driver.
-@reflectiveTest
-class StaticTypeAnalyzer3Test extends StaticTypeAnalyzer2TestShared {
-  test_emptyMapLiteral_initializer_var() async {
-    await assertErrorsInCode(r'''
-main() {
-  var v = {};
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 15, 1),
-    ]);
-    expectExpressionType('{}', 'Map<dynamic, dynamic>');
-  }
-
-  test_emptyMapLiteral_parameter_typed() async {
-    await assertNoErrorsInCode(r'''
-main() {
-  useMap({});
-}
-void useMap(Map<int, int> m) {
-}
-''');
-    expectExpressionType('{}', 'Map<int, int>');
-  }
-}
-
 @reflectiveTest
 class StaticTypeAnalyzerTest with ResourceProviderMixin, ElementsTypesMixin {
   /// The error listener to which errors will be reported.
@@ -718,7 +749,7 @@
 
     _visitor = ResolverVisitor(
         inheritance, _definingLibrary, source, _typeProvider, _listener,
-        featureSet: featureSet, nameScope: LibraryScope(_definingLibrary));
+        featureSet: featureSet, nameScope: _definingLibrary.scope);
     _analyzer = _visitor.typeAnalyzer;
   }
 
@@ -771,27 +802,3 @@
     return identifier;
   }
 }
-
-/// 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 {
-  test_emptySetLiteral_inferredFromLinkedHashSet() async {
-    await assertErrorsInCode(r'''
-import 'dart:collection';
-LinkedHashSet<int> test4() => {};
-''', [
-      error(StrongModeCode.INVALID_CAST_LITERAL_SET, 56, 2),
-    ]);
-    expectExpressionType('{}', 'Set<dynamic>');
-  }
-
-  test_emptySetLiteral_initializer_typed_nested() async {
-    await assertNoErrorsInCode(r'''
-Set<Set<int>> ints = {{}};
-''');
-    expectExpressionType('{}', 'Set<int>');
-    expectExpressionType('{{}}', 'Set<Set<int>>');
-  }
-}
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 6d659a6..0256b50 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class StaticTypeWarningCodeTest extends DriverResolutionTest {
+class StaticTypeWarningCodeTest extends PubPackageResolutionTest {
   test_assert_message_suppresses_type_promotion() async {
     // If a variable is assigned to inside the expression for an assert
     // message, type promotion should be suppressed, just as it would be if the
@@ -34,7 +34,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 65, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 65, 3),
     ]);
   }
 
@@ -59,7 +59,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 68, 1),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 72, 10),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 72, 10),
     ]);
   }
 
@@ -84,7 +84,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 75, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 80, 6),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 80, 6),
     ]);
   }
 
@@ -135,7 +135,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 64, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 85, 6),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 85, 6),
     ]);
   }
 
@@ -185,38 +185,8 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 271, 4),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 289, 2),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 304, 2),
-    ]);
-  }
-
-  test_expectedOneListTypeArgument() async {
-    await assertErrorsInCode(r'''
-main() {
-  <int, int> [];
-}
-''', [
-      error(StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, 11, 10),
-    ]);
-  }
-
-  test_expectedOneSetTypeArgument() async {
-    await assertErrorsInCode(r'''
-main() {
-  <int, int, int>{2, 3};
-}
-''', [
-      error(StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS, 11, 15),
-    ]);
-  }
-
-  test_expectedTwoMapTypeArguments_three() async {
-    await assertErrorsInCode(r'''
-main() {
-  <int, int, int> {};
-}
-''', [
-      error(StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, 11, 15),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 289, 2),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 304, 2),
     ]);
   }
 
@@ -237,7 +207,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 17, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 22, 10),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 22, 10),
     ]);
   }
 
@@ -302,7 +272,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 12, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 27, 10),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 27, 10),
     ]);
   }
 
@@ -336,7 +306,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 81, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 86, 8),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 86, 8),
     ]);
   }
 
@@ -362,184 +332,9 @@
     ]);
   }
 
-  test_illegalAsyncGeneratorReturnType_function_nonStream() async {
-    await assertErrorsInCode('''
-int f() async* {}
-''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 0, 3),
-    ]);
-  }
-
-  test_illegalAsyncGeneratorReturnType_function_subtypeOfStream() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-abstract class SubStream<T> implements Stream<T> {}
-SubStream<int> f() async* {}
-''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 73, 14),
-    ]);
-  }
-
-  test_illegalAsyncGeneratorReturnType_method_nonStream() async {
-    await assertErrorsInCode('''
-class C {
-  int f() async* {}
-}
-''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 12, 3),
-    ]);
-  }
-
-  test_illegalAsyncGeneratorReturnType_method_subtypeOfStream() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-abstract class SubStream<T> implements Stream<T> {}
-class C {
-  SubStream<int> f() async* {}
-}
-''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 85, 14),
-    ]);
-  }
-
-  test_illegalSyncGeneratorReturnType_function_nonIterator() async {
-    await assertErrorsInCode('''
-int f() sync* {}
-''', [
-      error(StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 0, 3),
-    ]);
-  }
-
-  test_illegalSyncGeneratorReturnType_function_subclassOfIterator() async {
-    await assertErrorsInCode('''
-abstract class SubIterator<T> implements Iterator<T> {}
-SubIterator<int> f() sync* {}
-''', [
-      error(StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 56, 16),
-    ]);
-  }
-
-  test_illegalSyncGeneratorReturnType_method_nonIterator() async {
-    await assertErrorsInCode('''
-class C {
-  int f() sync* {}
-}
-''', [
-      error(StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 12, 3),
-    ]);
-  }
-
-  test_illegalSyncGeneratorReturnType_method_subclassOfIterator() async {
-    await assertErrorsInCode('''
-abstract class SubIterator<T> implements Iterator<T> {}
-class C {
-  SubIterator<int> f() sync* {}
-}
-''', [
-      error(StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 68, 16),
-    ]);
-  }
-
-  test_instanceAccessToStaticMember_method_reference() async {
-    await assertErrorsInCode(r'''
-class A {
-  static m() {}
-}
-main(A a) {
-  a.m;
-}
-''', [
-      error(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 44, 1),
-    ]);
-  }
-
-  test_instanceAccessToStaticMember_propertyAccess_field() async {
-    await assertErrorsInCode(r'''
-class A {
-  static var f;
-}
-main(A a) {
-  a.f;
-}
-''', [
-      error(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 44, 1),
-    ]);
-  }
-
-  test_instanceAccessToStaticMember_propertyAccess_getter() async {
-    await assertErrorsInCode(r'''
-class A {
-  static get f => 42;
-}
-main(A a) {
-  a.f;
-}
-''', [
-      error(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 50, 1),
-    ]);
-  }
-
-  test_instanceAccessToStaticMember_propertyAccess_setter() async {
-    await assertErrorsInCode(r'''
-class A {
-  static set f(x) {}
-}
-main(A a) {
-  a.f = 42;
-}
-''', [
-      error(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 49, 1),
-    ]);
-  }
-
-  test_invocationOfNonFunctionExpression_literal() async {
-    await assertErrorsInCode(r'''
-f() {
-  3(5);
-}
-''', [
-      error(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 8, 1),
-    ]);
-  }
-
-  test_nonTypeAsTypeArgument_notAType() async {
-    await assertErrorsInCode(r'''
-int A;
-class B<E> {}
-f(B<A> b) {}
-''', [
-      error(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT, 25, 1),
-    ]);
-  }
-
-  test_nonTypeAsTypeArgument_undefinedIdentifier() async {
-    await assertErrorsInCode(r'''
-class B<E> {}
-f(B<A> b) {}
-''', [
-      error(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT, 18, 1),
-    ]);
-  }
-
-  test_typeParameterSupertypeOfItsBound_1of1() async {
-    await assertErrorsInCode(r'''
-class A<T extends T> {
-}
-''', [
-      error(StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 11),
-    ]);
-  }
-
-  test_typeParameterSupertypeOfItsBound_2of3() async {
-    await assertErrorsInCode(r'''
-class A<T1 extends T3, T2, T3 extends T1> {
-}
-''', [
-      error(StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 13),
-      error(
-          StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 27, 13),
-    ]);
-  }
+  // TODO(srawlins) Figure out what to do with the rest of these tests.
+  //  The names do not correspond to diagnostic codes, so it isn't clear what
+  //  they're testing.
 
   test_typePromotion_booleanAnd_useInRight_accessedInClosureRight_mutated() async {
     await assertErrorsInCode(r'''
@@ -549,7 +344,7 @@
   p = 0;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 71, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 71, 6),
     ]);
   }
 
@@ -559,7 +354,7 @@
   ((p is String) && ((p = 42) == 42)) && p.length != 0;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 60, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 60, 6),
     ]);
   }
 
@@ -569,7 +364,7 @@
   (p is String) && (((p = 42) == 42) && p.length != 0);
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 59, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 59, 6),
     ]);
   }
 
@@ -581,7 +376,7 @@
   p = 42;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 68, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 68, 6),
     ]);
   }
 
@@ -593,7 +388,7 @@
   p is String ? callMe(() { p.length; }) : 0;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 78, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 78, 6),
     ]);
   }
 
@@ -603,7 +398,7 @@
   p is String ? (p.length + (p = 42)) : 0;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 36, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 36, 6),
     ]);
   }
 
@@ -619,7 +414,7 @@
   p = 0;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 83, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 83, 6),
     ]);
   }
 
@@ -631,7 +426,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 66, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 66, 6),
     ]);
   }
 
@@ -649,7 +444,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 100, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 100, 1),
     ]);
   }
 
@@ -667,7 +462,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 105, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 105, 1),
     ]);
   }
 
@@ -680,7 +475,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 44, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 44, 6),
     ]);
   }
 
@@ -693,7 +488,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 55, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 55, 6),
     ]);
   }
 
@@ -706,7 +501,7 @@
   () {p = 0;};
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 44, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 44, 6),
     ]);
   }
 
@@ -719,7 +514,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 59, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 59, 6),
     ]);
   }
 
@@ -732,7 +527,7 @@
   f() {p = 0;};
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 44, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 44, 6),
       error(HintCode.UNUSED_ELEMENT, 58, 1),
     ]);
   }
@@ -747,7 +542,7 @@
 }
 ''', [
       error(HintCode.UNUSED_ELEMENT, 19, 1),
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 60, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 60, 6),
     ]);
   }
 
@@ -765,7 +560,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 103, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 103, 1),
     ]);
   }
 
@@ -783,65 +578,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 112, 1),
-    ]);
-  }
-
-  test_unqualifiedReferenceToNonLocalStaticMember_getter() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int get a => 0;
-}
-class B extends A {
-  int b() {
-    return a;
-  }
-}
-''', [
-      error(
-          StaticTypeWarningCode
-              .UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
-          80,
-          1),
-    ]);
-  }
-
-  test_unqualifiedReferenceToNonLocalStaticMember_getter_invokeTarget() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int foo;
-}
-
-class B extends A {
-  static bar() {
-    foo.abs();
-  }
-}
-''', [
-      error(
-          StaticTypeWarningCode
-              .UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
-          72,
-          3),
-    ]);
-  }
-
-  test_unqualifiedReferenceToNonLocalStaticMember_setter() async {
-    await assertErrorsInCode(r'''
-class A {
-  static set a(x) {}
-}
-class B extends A {
-  b(y) {
-    a = y;
-  }
-}
-''', [
-      error(
-          StaticTypeWarningCode
-              .UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
-          66,
-          1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 112, 1),
     ]);
   }
 
@@ -854,13 +591,13 @@
   a.element.anyGetterExistsInDynamic;
 }
 ''', [
-      error(StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT, 35, 10),
+      error(CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT, 35, 10),
     ]);
   }
 }
 
 @reflectiveTest
-class StrongModeStaticTypeWarningCodeTest extends DriverResolutionTest {
+class StrongModeStaticTypeWarningCodeTest extends PubPackageResolutionTest {
   test_legalAsyncGeneratorReturnType_function_supertypeOfStream() async {
     await assertNoErrorsInCode('''
 import 'dart:async';
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index beea4a3..de9b311 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class StaticWarningCodeTest extends DriverResolutionTest {
+class StaticWarningCodeTest extends PubPackageResolutionTest {
   // TODO(brianwilkerson) Figure out what to do with the rest of these tests.
   //  The names do not correspond to diagnostic codes, so it isn't clear what
   //  they're testing.
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index 568173f..4d01e88 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -16,7 +16,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/dart/resolution/driver_resolution.dart';
+import '../src/dart/resolution/context_collection_resolution.dart';
 import '../utils.dart';
 import 'resolver_test_case.dart';
 import 'test_support.dart';
@@ -335,9 +335,9 @@
 
   test_constrainedByBounds5() async {
     // Test that upwards inference with two type variables does not
-    // propogate from the constrained variable to the unconstrained
+    // propagate from the constrained variable to the unconstrained
     // variable if they are ordered right to left, when the variable
-    // appears co and contra variantly, and that an error is issued
+    // appears co- and contra-variantly, and that an error is issued
     // for the non-matching bound.
     String code = r'''
     typedef To Func1<From, To>(From x);
@@ -346,7 +346,7 @@
    ''';
     Source source = addSource(code);
     TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
+    assertErrors(source, [CompileTimeErrorCode.COULD_NOT_INFER]);
     verify([source]);
     CompilationUnit unit = analysisResult.unit;
     List<Statement> statements =
@@ -912,7 +912,7 @@
     // Test that FutureOr does not have the constituent type methods
     MethodInvocation invoke = await _testFutureOr(r'''
     dynamic test(FutureOr<int> x) => x.abs();
-    ''', errors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    ''', errors: [CompileTimeErrorCode.UNDEFINED_METHOD]);
     _isDynamic(invoke.staticType);
   }
 
@@ -920,7 +920,7 @@
     // Test that FutureOr does not have the Future type methods
     MethodInvocation invoke = await _testFutureOr(r'''
     dynamic test(FutureOr<int> x) => x.then((x) => x);
-    ''', errors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    ''', errors: [CompileTimeErrorCode.UNDEFINED_METHOD]);
     _isDynamic(invoke.staticType);
   }
 
@@ -928,7 +928,7 @@
     // Test that FutureOr<dynamic> does not have all methods
     MethodInvocation invoke = await _testFutureOr(r'''
     dynamic test(FutureOr<dynamic> x) => x.abs();
-    ''', errors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    ''', errors: [CompileTimeErrorCode.UNDEFINED_METHOD]);
     _isDynamic(invoke.staticType);
   }
 
@@ -981,7 +981,7 @@
     MethodInvocation invoke = await _testFutureOr(r'''
     Future<T> mk<T extends Future<Object>>(FutureOr<T> x) => null;
     dynamic test() => mk(new Future<int>.value(42));
-    ''', errors: [StrongModeCode.COULD_NOT_INFER]);
+    ''', errors: [CompileTimeErrorCode.COULD_NOT_INFER]);
     _isFutureOfInt(invoke.staticType);
   }
 
@@ -1093,8 +1093,8 @@
  ''');
     await computeAnalysisResult(source);
     _expectInferenceError(source, [
-      StrongModeCode.COULD_NOT_INFER,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+      CompileTimeErrorCode.COULD_NOT_INFER,
+      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ], r'''
 Couldn't infer type parameter 'T'.
 
@@ -1119,9 +1119,9 @@
  ''');
     await computeAnalysisResult(source);
     _expectInferenceError(source, [
-      StrongModeCode.COULD_NOT_INFER,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+      CompileTimeErrorCode.COULD_NOT_INFER,
+      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
+      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ], r'''
 Couldn't infer type parameter 'T'.
 
@@ -1147,8 +1147,8 @@
  ''');
     var analysisResult = await computeAnalysisResult(source);
     assertErrors(source, [
-      StrongModeCode.INVALID_CAST_LITERAL,
-      StrongModeCode.INVALID_CAST_LITERAL
+      CompileTimeErrorCode.INVALID_CAST_LITERAL,
+      CompileTimeErrorCode.INVALID_CAST_LITERAL
     ]);
     var unit = analysisResult.unit;
     var h = (AstFinder.getStatementsInTopLevelFunction(unit, "test")[0]
@@ -1170,7 +1170,7 @@
  ''');
     await computeAnalysisResult(source);
     _expectInferenceError(source, [
-      StrongModeCode.COULD_NOT_INFER,
+      CompileTimeErrorCode.COULD_NOT_INFER,
     ], r'''
 Couldn't infer type parameter 'T'.
 
@@ -1198,8 +1198,8 @@
  ''');
     await computeAnalysisResult(source);
     _expectInferenceError(source, [
-      StrongModeCode.COULD_NOT_INFER,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+      CompileTimeErrorCode.COULD_NOT_INFER,
+      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ], r'''
 Couldn't infer type parameter 'T'.
 
@@ -1223,7 +1223,7 @@
 }
  ''');
     await computeAnalysisResult(source);
-    _expectInferenceError(source, [StrongModeCode.COULD_NOT_INFER], r'''
+    _expectInferenceError(source, [CompileTimeErrorCode.COULD_NOT_INFER], r'''
 Couldn't infer type parameter 'T'.
 
 Tried to infer 'num' for 'T' which doesn't work:
@@ -1263,9 +1263,9 @@
     assertNoErrors(source);
     verify([source]);
     var unit = analysisResult.unit;
-    var body = (AstFinder.getTopLevelFunction(unit, '_mergeSort')
+    var body = AstFinder.getTopLevelFunction(unit, '_mergeSort')
         .functionExpression
-        .body as BlockFunctionBody);
+        .body as BlockFunctionBody;
     var stmts = body.block.statements;
     for (ExpressionStatement stmt in stmts) {
       MethodInvocation invoke = stmt.expression;
@@ -1290,9 +1290,9 @@
     assertNoErrors(source);
     verify([source]);
     var unit = analysisResult.unit;
-    var body = (AstFinder.getTopLevelFunction(unit, '_mergeSort')
+    var body = AstFinder.getTopLevelFunction(unit, '_mergeSort')
         .functionExpression
-        .body as BlockFunctionBody);
+        .body as BlockFunctionBody;
     var stmts = body.block.statements;
     for (ExpressionStatement stmt in stmts) {
       MethodInvocation invoke = stmt.expression;
@@ -1317,9 +1317,9 @@
     assertNoErrors(source);
     verify([source]);
     var unit = analysisResult.unit;
-    var body = (AstFinder.getTopLevelFunction(unit, '_mergeSort')
+    var body = AstFinder.getTopLevelFunction(unit, '_mergeSort')
         .functionExpression
-        .body as BlockFunctionBody);
+        .body as BlockFunctionBody;
     var stmts = body.block.statements;
     for (ExpressionStatement stmt in stmts) {
       MethodInvocation invoke = stmt.expression;
@@ -1364,8 +1364,8 @@
     ''');
     var analysisResult = await computeAnalysisResult(source);
     assertErrors(source, [
-      StrongModeCode.COULD_NOT_INFER,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+      CompileTimeErrorCode.COULD_NOT_INFER,
+      CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
     verify([source]);
     var unit = analysisResult.unit;
@@ -1934,7 +1934,7 @@
    ''';
     Source source = addSource(code);
     TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [StrongModeCode.INVALID_CAST_LITERAL]);
+    assertErrors(source, [CompileTimeErrorCode.INVALID_CAST_LITERAL]);
     verify([source]);
     CompilationUnit unit = analysisResult.unit;
     FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
@@ -1986,7 +1986,7 @@
     Source source = addSource(code);
     TestAnalysisResult analysisResult = await computeAnalysisResult(source);
     assertErrors(source, [
-      StrongModeCode.INVALID_CAST_LITERAL,
+      CompileTimeErrorCode.INVALID_CAST_LITERAL,
     ]);
     verify([source]);
     CompilationUnit unit = analysisResult.unit;
@@ -2375,7 +2375,7 @@
     assertErrors(source, errorCodes);
     var errors = analysisResults[source]
         .errors
-        .where((e) => e.errorCode == StrongModeCode.COULD_NOT_INFER)
+        .where((e) => e.errorCode == CompileTimeErrorCode.COULD_NOT_INFER)
         .map((e) => e.message)
         .toList();
     expect(errors.length, 1);
@@ -3262,10 +3262,10 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 61, 3),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 106, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 106, 1),
     ]);
     // Note: this correctly reports the error
-    // StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE when run with the driver;
+    // CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE when run with the driver;
     // when run without the driver, it reports no errors.  So we don't bother
     // checking whether the correct errors were reported.
     expectInitializerType('foo', 'Future<String>');
@@ -3341,7 +3341,7 @@
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 73, 1),
       error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 81, 1),
-      error(StrongModeCode.COULD_NOT_INFER, 81, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 81, 1),
     ]);
     _assertLocalVarType('c', 'C<List<dynamic>, List<List<dynamic>>>');
   }
@@ -3456,7 +3456,7 @@
 ''', [
       error(HintCode.MISSING_RETURN, 3, 1),
       error(HintCode.UNUSED_LOCAL_VARIABLE, 69, 1),
-      error(StrongModeCode.COULD_NOT_INFER, 73, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 73, 1),
     ]);
     _assertLocalVarType('c', 'List<dynamic>');
   }
@@ -3526,168 +3526,6 @@
 ''');
   }
 
-  test_notInstantiatedBound_class_error_recursion() async {
-    await assertErrorsInCode(r'''
-class A<T extends B> {} // points to a
-class B<T extends A> {} // points to b
-class C<T extends A> {} // points to a cyclical type
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 18, 1),
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 57, 1),
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 96, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_class_error_recursion_less_direct() async {
-    await assertErrorsInCode(r'''
-class A<T extends B<A>> {}
-class B<T extends A<B>> {}
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 20, 1),
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 47, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_class_error_recursion_typedef() async {
-    await assertErrorsInCode(r'''
-typedef F(C value);
-class C<T extends F> {}
-class D<T extends C> {}
-''', [
-      error(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, 0, 19),
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 38, 1),
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 62, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_error_class_argument() async {
-    await assertErrorsInCode(r'''
-class A<K, V extends List<K>> {}
-class C<T extends A> {}
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 51, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_error_class_argument2() async {
-    await assertErrorsInCode(r'''
-class A<K, V extends List<List<K>>> {}
-class C<T extends A> {}
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 57, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_error_class_direct() async {
-    await assertErrorsInCode(r'''
-class A<K, V extends K> {}
-class C<T extends A> {}
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 45, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_error_class_indirect() async {
-    await assertErrorsInCode(r'''
-class A<K, V extends K> {}
-class C<T extends List<A>> {}
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 50, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_error_functionType() async {
-    await assertErrorsInCode(r'''
-class A<T extends Function(T)> {}
-class B<T extends T Function()> {}
-class C<T extends A> {}
-class D<T extends B> {}
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 87, 1),
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 111, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_error_typedef_argument() async {
-    await assertErrorsInCode(r'''
-class A<K, V extends List<K>> {}
-typedef void F<T extends A>();
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 58, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_error_typedef_argument2() async {
-    await assertErrorsInCode(r'''
-class A<K, V extends List<List<K>>> {}
-typedef void F<T extends A>();
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 64, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_error_typedef_direct() async {
-    await assertErrorsInCode(r'''
-class A<K, V extends K> {}
-typedef void F<T extends A>();
-''', [
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 52, 1),
-    ]);
-  }
-
-  test_notInstantiatedBound_ok_class() async {
-    await assertNoErrorsInCode(r'''
-class A<T extends int> {}
-class C1<T extends A> {}
-class C2<T extends List<A>> {}
-''');
-  }
-
-  test_notInstantiatedBound_ok_class_class2() async {
-    await assertNoErrorsInCode(r'''
-class A<T> {}
-class C<T extends A<int>> {}
-class D<T extends C> {}
-''');
-  }
-
-  test_notInstantiatedBound_ok_class_class3() async {
-    await assertNoErrorsInCode(r'''
-class A<T> {}
-class B<T extends int> {}
-class C<T extends A<B>> {}
-''');
-  }
-
-  test_notInstantiatedBound_ok_class_class4() async {
-    await assertNoErrorsInCode(r'''
-class A<K, V> {}
-class B<T extends int> {}
-class C<T extends A<B, B>> {}
-''');
-  }
-
-  test_notInstantiatedBound_ok_class_function() async {
-    await assertNoErrorsInCode(r'''
-class A<T extends void Function()> {}
-class B<T extends A> {}
-''');
-  }
-
-  test_notInstantiatedBound_ok_class_typedef() async {
-    await assertNoErrorsInCode(r'''
-typedef void F<T extends int>();
-class C<T extends F> {}
-''');
-  }
-
-  test_notInstantiatedBound_ok_typedef_class() async {
-    await assertNoErrorsInCode(r'''
-class C<T extends int> {}
-typedef void F<T extends C>();
-''');
-  }
-
   test_objectMethodOnFunctions_Anonymous() async {
     await _objectMethodOnFunctions_helper2(r'''
 void main() {
@@ -3829,7 +3667,7 @@
   test_returnOfInvalidType_object_void() async {
     await assertErrorsInCode(
         "Object f() { void voidFn() => null; return voidFn(); }", [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 43, 8),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 43, 8),
     ]);
   }
 
@@ -3840,8 +3678,8 @@
 }
 dynamic set g(int x) => null;
 ''', [
-      error(StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, 12, 7),
-      error(StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, 47, 7),
+      error(CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, 12, 7),
+      error(CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, 47, 7),
     ]);
   }
 
@@ -3864,7 +3702,7 @@
 }
 set g(int x) => 42;
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 41, 4),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 41, 4),
     ]);
   }
 
@@ -3885,8 +3723,8 @@
 }
 Object set g(x) => null;
 ''', [
-      error(StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, 12, 6),
-      error(StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, 46, 6),
+      error(CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, 12, 6),
+      error(CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, 46, 6),
     ]);
   }
 
@@ -3935,7 +3773,7 @@
 }
 
 @reflectiveTest
-class StrongModeTypePropagationTest extends DriverResolutionTest {
+class StrongModeTypePropagationTest extends PubPackageResolutionTest {
   test_foreachInference_dynamic_disabled() async {
     await resolveTestCode(r'''
 main() {
diff --git a/pkg/analyzer/test/generated/test_all.dart b/pkg/analyzer/test/generated/test_all.dart
index 12c45df..42ff098 100644
--- a/pkg/analyzer/test/generated/test_all.dart
+++ b/pkg/analyzer/test/generated/test_all.dart
@@ -5,9 +5,6 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'all_the_rest_test.dart' as all_the_rest;
-import 'checked_mode_compile_time_error_code_test.dart'
-    as checked_mode_compile_time_error_code;
-import 'compile_time_error_code_test.dart' as compile_time_error_code;
 // ignore: deprecated_member_use_from_same_package
 import 'constant_test.dart' as constant_test;
 import 'element_resolver_test.dart' as element_resolver_test;
@@ -36,8 +33,6 @@
 main() {
   defineReflectiveSuite(() {
     all_the_rest.main();
-    checked_mode_compile_time_error_code.main();
-    compile_time_error_code.main();
     constant_test.main();
     element_resolver_test.main();
     error_suppression.main();
diff --git a/pkg/analyzer/test/generated/type_system_test.dart b/pkg/analyzer/test/generated/type_system_test.dart
index 3929a49..3c0dd2d 100644
--- a/pkg/analyzer/test/generated/type_system_test.dart
+++ b/pkg/analyzer/test/generated/type_system_test.dart
@@ -4,14 +4,11 @@
 
 import 'package:analyzer/dart/analysis/features.dart';
 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/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:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -21,8 +18,6 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AssignabilityTest);
-    defineReflectiveTests(LeastUpperBoundFunctionsTest);
-    defineReflectiveTests(LeastUpperBoundTest);
     defineReflectiveTests(TryPromoteToTest);
   });
 }
@@ -87,10 +82,6 @@
       typeSystem: typeSystem,
     );
   }
-
-  String _typeString(TypeImpl type) {
-    return type.getDisplayString(withNullability: true);
-  }
 }
 
 @reflectiveTest
@@ -441,1238 +432,6 @@
   }
 }
 
-/// 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);
-
-    var result = typeSystem.getLeastUpperBound(T1, T2);
-    var resultStr = _typeString(result);
-    expect(result, expected, reason: '''
-expected: $expectedStr
-actual: $resultStr
-''');
-
-    // Check that the result is an upper bound.
-    expect(typeSystem.isSubtypeOf(T1, result), true);
-    expect(typeSystem.isSubtypeOf(T2, result), true);
-
-    // Check for symmetry.
-    result = typeSystem.getLeastUpperBound(T2, T1);
-    resultStr = _typeString(result);
-    expect(result, expected, reason: '''
-expected: $expectedStr
-actual: $resultStr
-''');
-  }
-}
-
-@reflectiveTest
-class LeastUpperBoundFunctionsTest extends BoundTestBase {
-  void test_differentRequiredArity() {
-    var type1 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: intStar),
-        requiredParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    var type2 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: intStar),
-        requiredParameter(type: intStar),
-        requiredParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    _checkLeastUpperBound(type1, type2, typeProvider.functionType);
-  }
-
-  void test_fuzzyArrows() {
-    var type1 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: dynamicType),
-      ],
-      returnType: voidNone,
-    );
-    var type2 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    var expected = functionTypeStar(
-      parameters: [
-        requiredParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_glbNamedParams() {
-    var type1 = functionTypeStar(
-      parameters: [
-        namedParameter(name: 'a', type: stringStar),
-        namedParameter(name: 'b', type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    var type2 = functionTypeStar(
-      parameters: [
-        namedParameter(name: 'a', type: intStar),
-        namedParameter(name: 'b', type: numStar),
-      ],
-      returnType: voidNone,
-    );
-    var expected = functionTypeStar(
-      parameters: [
-        namedParameter(name: 'a', type: neverStar),
-        namedParameter(name: 'b', type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_glbPositionalParams() {
-    var type1 = functionTypeStar(
-      parameters: [
-        positionalParameter(type: stringStar),
-        positionalParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    var type2 = functionTypeStar(
-      parameters: [
-        positionalParameter(type: intStar),
-        positionalParameter(type: numStar),
-      ],
-      returnType: voidNone,
-    );
-    var expected = functionTypeStar(
-      parameters: [
-        positionalParameter(type: neverStar),
-        positionalParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_glbRequiredParams() {
-    var type1 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: stringStar),
-        requiredParameter(type: intStar),
-        requiredParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    var type2 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: intStar),
-        requiredParameter(type: doubleStar),
-        requiredParameter(type: numStar),
-      ],
-      returnType: voidNone,
-    );
-    var expected = functionTypeStar(
-      parameters: [
-        requiredParameter(type: neverStar),
-        requiredParameter(type: neverStar),
-        requiredParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_ignoreExtraNamedParams() {
-    var type1 = functionTypeStar(
-      parameters: [
-        namedParameter(name: 'a', type: intStar),
-        namedParameter(name: 'b', type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    var type2 = functionTypeStar(
-      parameters: [
-        namedParameter(name: 'a', type: intStar),
-        namedParameter(name: 'c', type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    var expected = functionTypeStar(
-      parameters: [
-        namedParameter(name: 'a', type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_ignoreExtraPositionalParams() {
-    var type1 = functionTypeStar(
-      parameters: [
-        positionalParameter(type: intStar),
-        positionalParameter(type: intStar),
-        positionalParameter(type: stringStar),
-      ],
-      returnType: voidNone,
-    );
-    var type2 = functionTypeStar(
-      parameters: [
-        positionalParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    var expected = functionTypeStar(
-      parameters: [
-        positionalParameter(type: intStar),
-      ],
-      returnType: voidNone,
-    );
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_lubReturnType() {
-    var type1 = functionTypeStar(returnType: intStar);
-    var type2 = functionTypeStar(returnType: doubleStar);
-    var expected = functionTypeStar(returnType: numStar);
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_sameType_withNamed() {
-    var type1 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: stringStar),
-        requiredParameter(type: intStar),
-        requiredParameter(type: numStar),
-        namedParameter(name: 'n', type: numStar),
-      ],
-      returnType: intStar,
-    );
-
-    var type2 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: stringStar),
-        requiredParameter(type: intStar),
-        requiredParameter(type: numStar),
-        namedParameter(name: 'n', type: numStar),
-      ],
-      returnType: intStar,
-    );
-
-    var expected = functionTypeStar(
-      parameters: [
-        requiredParameter(type: stringStar),
-        requiredParameter(type: intStar),
-        requiredParameter(type: numStar),
-        namedParameter(name: 'n', type: numStar),
-      ],
-      returnType: intStar,
-    );
-
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_sameType_withOptional() {
-    var type1 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: stringStar),
-        requiredParameter(type: intStar),
-        requiredParameter(type: numStar),
-        positionalParameter(type: doubleStar),
-      ],
-      returnType: intStar,
-    );
-
-    var type2 = functionTypeStar(
-      parameters: [
-        requiredParameter(type: stringStar),
-        requiredParameter(type: intStar),
-        requiredParameter(type: numStar),
-        positionalParameter(type: doubleStar),
-      ],
-      returnType: intStar,
-    );
-
-    var expected = functionTypeStar(
-      parameters: [
-        requiredParameter(type: stringStar),
-        requiredParameter(type: intStar),
-        requiredParameter(type: numStar),
-        positionalParameter(type: doubleStar),
-      ],
-      returnType: intStar,
-    );
-
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_typeFormals_differentBounds() {
-    var T1 = typeParameter('T1', bound: intStar);
-    var type1 = functionTypeStar(
-      typeFormals: [T1],
-      returnType: typeParameterTypeStar(T1),
-    );
-
-    var T2 = typeParameter('T2', bound: doubleStar);
-    var type2 = functionTypeStar(
-      typeFormals: [T2],
-      returnType: typeParameterTypeStar(T2),
-    );
-
-    _checkLeastUpperBound(type1, type2, typeProvider.functionType);
-  }
-
-  void test_typeFormals_differentNumber() {
-    var T1 = typeParameter('T1', bound: numStar);
-    var type1 = functionTypeStar(
-      typeFormals: [T1],
-      returnType: typeParameterTypeStar(T1),
-    );
-
-    var type2 = functionTypeStar(returnType: intStar);
-
-    _checkLeastUpperBound(type1, type2, typeProvider.functionType);
-  }
-
-  void test_typeFormals_sameBounds() {
-    var T1 = typeParameter('T1', bound: numStar);
-    var type1 = functionTypeStar(
-      typeFormals: [T1],
-      returnType: typeParameterTypeStar(T1),
-    );
-
-    var T2 = typeParameter('T2', bound: numStar);
-    var type2 = functionTypeStar(
-      typeFormals: [T2],
-      returnType: typeParameterTypeStar(T2),
-    );
-
-    var TE = typeParameter('T', bound: numStar);
-    var expected = functionTypeStar(
-      typeFormals: [TE],
-      returnType: typeParameterTypeStar(TE),
-    );
-
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-}
-
-@reflectiveTest
-class LeastUpperBoundTest extends BoundTestBase {
-  void test_bottom_function() {
-    _checkLeastUpperBound(neverStar, functionTypeStar(returnType: voidNone),
-        functionTypeStar(returnType: voidNone));
-  }
-
-  void test_bottom_interface() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-    _checkLeastUpperBound(neverStar, typeA, typeA);
-  }
-
-  void test_bottom_typeParam() {
-    var T = typeParameter('T');
-    var typeT = typeParameterTypeStar(T);
-    _checkLeastUpperBound(neverStar, typeT, typeT);
-  }
-
-  void test_directInterfaceCase() {
-    // class A
-    // class B implements A
-    // class C implements B
-
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', interfaces: [typeA]);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', interfaces: [typeB]);
-    var typeC = interfaceTypeStar(C);
-
-    _checkLeastUpperBound(typeB, typeC, typeB);
-  }
-
-  void test_directSubclassCase() {
-    // class A
-    // class B extends A
-    // class C extends B
-
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', superType: typeA);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', superType: typeB);
-    var typeC = interfaceTypeStar(C);
-
-    _checkLeastUpperBound(typeB, typeC, typeB);
-  }
-
-  void test_directSuperclass_nullability() {
-    var aElement = class_(name: 'A');
-    var aQuestion = interfaceTypeQuestion(aElement);
-    var aStar = interfaceTypeStar(aElement);
-    var aNone = interfaceTypeNone(aElement);
-
-    var bElementStar = class_(name: 'B', superType: aStar);
-    var bElementNone = class_(name: 'B', superType: aNone);
-
-    InterfaceTypeImpl _bTypeStarElement(NullabilitySuffix nullability) {
-      return interfaceType(
-        bElementStar,
-        nullabilitySuffix: nullability,
-      );
-    }
-
-    InterfaceTypeImpl _bTypeNoneElement(NullabilitySuffix nullability) {
-      return interfaceType(
-        bElementNone,
-        nullabilitySuffix: nullability,
-      );
-    }
-
-    var bStarQuestion = _bTypeStarElement(NullabilitySuffix.question);
-    var bStarStar = _bTypeStarElement(NullabilitySuffix.star);
-    var bStarNone = _bTypeStarElement(NullabilitySuffix.none);
-
-    var bNoneQuestion = _bTypeNoneElement(NullabilitySuffix.question);
-    var bNoneStar = _bTypeNoneElement(NullabilitySuffix.star);
-    var bNoneNone = _bTypeNoneElement(NullabilitySuffix.none);
-
-    void assertLUB(DartType type1, DartType type2, DartType expected) {
-      expect(typeSystem.getLeastUpperBound(type1, type2), expected);
-      expect(typeSystem.getLeastUpperBound(type2, type1), expected);
-    }
-
-    assertLUB(bStarQuestion, aQuestion, aQuestion);
-    assertLUB(bStarQuestion, aStar, aQuestion);
-    assertLUB(bStarQuestion, aNone, aQuestion);
-
-    assertLUB(bStarStar, aQuestion, aQuestion);
-    assertLUB(bStarStar, aStar, aStar);
-    assertLUB(bStarStar, aNone, aStar);
-
-    assertLUB(bStarNone, aQuestion, aQuestion);
-    assertLUB(bStarNone, aStar, aStar);
-    assertLUB(bStarNone, aNone, aNone);
-
-    assertLUB(bNoneQuestion, aQuestion, aQuestion);
-    assertLUB(bNoneQuestion, aStar, aQuestion);
-    assertLUB(bNoneQuestion, aNone, aQuestion);
-
-    assertLUB(bNoneStar, aQuestion, aQuestion);
-    assertLUB(bNoneStar, aStar, aStar);
-    assertLUB(bNoneStar, aNone, aStar);
-
-    assertLUB(bNoneNone, aQuestion, aQuestion);
-    assertLUB(bNoneNone, aStar, aStar);
-    assertLUB(bNoneNone, aNone, aNone);
-  }
-
-  void test_dynamic_bottom() {
-    _checkLeastUpperBound(dynamicType, neverStar, dynamicType);
-  }
-
-  void test_dynamic_function() {
-    _checkLeastUpperBound(
-        dynamicType, functionTypeStar(returnType: voidNone), dynamicType);
-  }
-
-  void test_dynamic_interface() {
-    var A = class_(name: 'A');
-    _checkLeastUpperBound(dynamicType, interfaceTypeStar(A), dynamicType);
-  }
-
-  void test_dynamic_typeParam() {
-    var T = typeParameter('T');
-    _checkLeastUpperBound(dynamicType, typeParameterTypeStar(T), dynamicType);
-  }
-
-  void test_dynamic_void() {
-    // Note: _checkLeastUpperBound tests `LUB(x, y)` as well as `LUB(y, x)`
-    _checkLeastUpperBound(dynamicType, voidNone, voidNone);
-  }
-
-  void test_interface_function() {
-    var A = class_(name: 'A');
-    _checkLeastUpperBound(interfaceTypeStar(A),
-        functionTypeStar(returnType: voidNone), objectStar);
-  }
-
-  void test_interface_sameElement_nullability() {
-    var aElement = class_(name: 'A');
-
-    var aQuestion = interfaceTypeQuestion(aElement);
-    var aStar = interfaceTypeStar(aElement);
-    var aNone = interfaceTypeNone(aElement);
-
-    void assertLUB(DartType type1, DartType type2, DartType expected) {
-      expect(typeSystem.getLeastUpperBound(type1, type2), expected);
-      expect(typeSystem.getLeastUpperBound(type2, type1), expected);
-    }
-
-    assertLUB(aQuestion, aQuestion, aQuestion);
-    assertLUB(aQuestion, aStar, aQuestion);
-    assertLUB(aQuestion, aNone, aQuestion);
-
-    assertLUB(aStar, aQuestion, aQuestion);
-    assertLUB(aStar, aStar, aStar);
-    assertLUB(aStar, aNone, aStar);
-
-    assertLUB(aNone, aQuestion, aQuestion);
-    assertLUB(aNone, aStar, aStar);
-    assertLUB(aNone, aNone, aNone);
-  }
-
-  void test_mixinAndClass_constraintAndInterface() {
-    var classA = class_(name: 'A');
-    var instA = InstantiatedClass(classA, []);
-
-    var classB = class_(
-      name: 'B',
-      interfaces: [instA.withNullabilitySuffixNone],
-    );
-
-    var mixinM = mixin_(
-      name: 'M',
-      constraints: [instA.withNullabilitySuffixNone],
-    );
-
-    _checkLeastUpperBound(
-      interfaceTypeStar(classB),
-      interfaceTypeStar(mixinM),
-      instA.withNullability(NullabilitySuffix.star),
-    );
-  }
-
-  void test_mixinAndClass_object() {
-    var classA = class_(name: 'A');
-    var mixinM = mixin_(name: 'M');
-
-    _checkLeastUpperBound(
-      interfaceTypeStar(classA),
-      interfaceTypeStar(mixinM),
-      objectStar,
-    );
-  }
-
-  void test_mixinAndClass_sharedInterface() {
-    var classA = class_(name: 'A');
-    var instA = InstantiatedClass(classA, []);
-
-    var classB = class_(
-      name: 'B',
-      interfaces: [instA.withNullabilitySuffixNone],
-    );
-
-    var mixinM = mixin_(
-      name: 'M',
-      interfaces: [instA.withNullabilitySuffixNone],
-    );
-
-    _checkLeastUpperBound(
-      interfaceTypeStar(classB),
-      interfaceTypeStar(mixinM),
-      instA.withNullability(NullabilitySuffix.star),
-    );
-  }
-
-  void test_mixinCase() {
-    // class A
-    // class B extends A
-    // class C extends A
-    // class D extends B with M, N, O, P
-
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', superType: typeA);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', superType: typeA);
-    var typeC = interfaceTypeStar(C);
-
-    var D = class_(
-      name: 'D',
-      superType: typeB,
-      mixins: [
-        interfaceTypeStar(class_(name: 'M')),
-        interfaceTypeStar(class_(name: 'N')),
-        interfaceTypeStar(class_(name: 'O')),
-        interfaceTypeStar(class_(name: 'P')),
-      ],
-    );
-    var typeD = interfaceTypeStar(D);
-
-    _checkLeastUpperBound(typeD, typeC, typeA);
-  }
-
-  void test_nestedFunctionsLubInnerParamTypes() {
-    var type1 = functionTypeStar(
-      parameters: [
-        requiredParameter(
-          type: functionTypeStar(
-            parameters: [
-              requiredParameter(type: stringStar),
-              requiredParameter(type: intStar),
-              requiredParameter(type: intStar),
-            ],
-            returnType: voidNone,
-          ),
-        ),
-      ],
-      returnType: voidNone,
-    );
-    var type2 = functionTypeStar(
-      parameters: [
-        requiredParameter(
-          type: functionTypeStar(
-            parameters: [
-              requiredParameter(type: intStar),
-              requiredParameter(type: doubleStar),
-              requiredParameter(type: numStar),
-            ],
-            returnType: voidNone,
-          ),
-        ),
-      ],
-      returnType: voidNone,
-    );
-    var expected = functionTypeStar(
-      parameters: [
-        requiredParameter(
-          type: functionTypeStar(
-            parameters: [
-              requiredParameter(type: objectStar),
-              requiredParameter(type: numStar),
-              requiredParameter(type: numStar),
-            ],
-            returnType: voidNone,
-          ),
-        ),
-      ],
-      returnType: voidNone,
-    );
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_nestedNestedFunctionsGlbInnermostParamTypes() {
-    var type1 = functionTypeStar(
-      parameters: [
-        requiredParameter(
-          type: functionTypeStar(
-            parameters: [
-              requiredParameter(
-                type: functionTypeStar(
-                  parameters: [
-                    requiredParameter(type: stringStar),
-                    requiredParameter(type: intStar),
-                    requiredParameter(type: intStar)
-                  ],
-                  returnType: voidNone,
-                ),
-              ),
-            ],
-            returnType: voidNone,
-          ),
-        ),
-      ],
-      returnType: voidNone,
-    );
-    expect(
-      _typeString(type1),
-      'void Function(void Function(void Function(String*, int*, int*)*)*)*',
-    );
-
-    var type2 = functionTypeStar(
-      parameters: [
-        requiredParameter(
-          type: functionTypeStar(
-            parameters: [
-              requiredParameter(
-                type: functionTypeStar(
-                  parameters: [
-                    requiredParameter(type: intStar),
-                    requiredParameter(type: doubleStar),
-                    requiredParameter(type: numStar)
-                  ],
-                  returnType: voidNone,
-                ),
-              ),
-            ],
-            returnType: voidNone,
-          ),
-        ),
-      ],
-      returnType: voidNone,
-    );
-    expect(
-      _typeString(type2),
-      'void Function(void Function(void Function(int*, double*, num*)*)*)*',
-    );
-    var expected = functionTypeStar(
-      parameters: [
-        requiredParameter(
-          type: functionTypeStar(
-            parameters: [
-              requiredParameter(
-                type: functionTypeStar(
-                  parameters: [
-                    requiredParameter(type: neverStar),
-                    requiredParameter(type: neverStar),
-                    requiredParameter(type: intStar)
-                  ],
-                  returnType: voidNone,
-                ),
-              ),
-            ],
-            returnType: voidNone,
-          ),
-        ),
-      ],
-      returnType: voidNone,
-    );
-    expect(
-      _typeString(expected),
-      'void Function(void Function(void Function(Never*, Never*, int*)*)*)*',
-    );
-
-    _checkLeastUpperBound(type1, type2, expected);
-  }
-
-  void test_object() {
-    var A = class_(name: 'A');
-    var B = class_(name: 'B');
-    var typeA = interfaceTypeStar(A);
-    var typeB = interfaceTypeStar(B);
-    var typeObject = typeA.element.supertype;
-    // assert that object does not have a super type
-    expect(typeObject.element.supertype, isNull);
-    // assert that both A and B have the same super type of Object
-    expect(typeB.element.supertype, typeObject);
-    // finally, assert that the only least upper bound of A and B is Object
-    _checkLeastUpperBound(typeA, typeB, typeObject);
-  }
-
-  void test_self() {
-    var T = typeParameter('T');
-    var A = class_(name: 'A');
-
-    List<DartType> types = [
-      dynamicType,
-      voidNone,
-      neverStar,
-      typeParameterTypeStar(T),
-      interfaceTypeStar(A),
-      functionTypeStar(returnType: voidNone)
-    ];
-
-    for (DartType type in types) {
-      _checkLeastUpperBound(type, type, type);
-    }
-  }
-
-  void test_sharedSuperclass1() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', superType: typeA);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', superType: typeA);
-    var typeC = interfaceTypeStar(C);
-
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_sharedSuperclass1_nullability() {
-    var aElement = class_(name: 'A');
-    var aQuestion = interfaceTypeQuestion(aElement);
-    var aStar = interfaceTypeStar(aElement);
-    var aNone = interfaceTypeNone(aElement);
-
-    var bElementNone = class_(name: 'B', superType: aNone);
-    var bElementStar = class_(name: 'B', superType: aStar);
-
-    var cElementNone = class_(name: 'C', superType: aNone);
-    var cElementStar = class_(name: 'C', superType: aStar);
-
-    InterfaceTypeImpl bTypeElementNone(NullabilitySuffix nullability) {
-      return interfaceType(
-        bElementNone,
-        nullabilitySuffix: nullability,
-      );
-    }
-
-    InterfaceTypeImpl bTypeElementStar(NullabilitySuffix nullability) {
-      return interfaceType(
-        bElementStar,
-        nullabilitySuffix: nullability,
-      );
-    }
-
-    var bNoneQuestion = bTypeElementNone(NullabilitySuffix.question);
-    var bNoneStar = bTypeElementNone(NullabilitySuffix.star);
-    var bNoneNone = bTypeElementNone(NullabilitySuffix.none);
-
-    var bStarQuestion = bTypeElementStar(NullabilitySuffix.question);
-    var bStarStar = bTypeElementStar(NullabilitySuffix.star);
-    var bStarNone = bTypeElementStar(NullabilitySuffix.none);
-
-    InterfaceTypeImpl cTypeElementNone(NullabilitySuffix nullability) {
-      return interfaceType(
-        cElementNone,
-        nullabilitySuffix: nullability,
-      );
-    }
-
-    InterfaceTypeImpl cTypeElementStar(NullabilitySuffix nullability) {
-      return interfaceType(
-        cElementStar,
-        nullabilitySuffix: nullability,
-      );
-    }
-
-    var cNoneQuestion = cTypeElementNone(NullabilitySuffix.question);
-    var cNoneStar = cTypeElementNone(NullabilitySuffix.star);
-    var cNoneNone = cTypeElementNone(NullabilitySuffix.none);
-
-    var cStarQuestion = cTypeElementStar(NullabilitySuffix.question);
-    var cStarStar = cTypeElementStar(NullabilitySuffix.star);
-    var cStarNone = cTypeElementStar(NullabilitySuffix.none);
-
-    void assertLUB(DartType type1, DartType type2, DartType expected) {
-      expect(typeSystem.getLeastUpperBound(type1, type2), expected);
-      expect(typeSystem.getLeastUpperBound(type2, type1), expected);
-    }
-
-    assertLUB(bNoneQuestion, cNoneQuestion, aQuestion);
-    assertLUB(bNoneQuestion, cNoneStar, aQuestion);
-    assertLUB(bNoneQuestion, cNoneNone, aQuestion);
-    assertLUB(bNoneQuestion, cStarQuestion, aQuestion);
-    assertLUB(bNoneQuestion, cStarStar, aQuestion);
-    assertLUB(bNoneQuestion, cStarNone, aQuestion);
-
-    assertLUB(bNoneStar, cNoneQuestion, aQuestion);
-    assertLUB(bNoneStar, cNoneStar, aStar);
-    assertLUB(bNoneStar, cNoneNone, aStar);
-    assertLUB(bNoneStar, cStarQuestion, aQuestion);
-    assertLUB(bNoneStar, cStarStar, aStar);
-    assertLUB(bNoneStar, cStarNone, aStar);
-
-    assertLUB(bNoneNone, cNoneQuestion, aQuestion);
-    assertLUB(bNoneNone, cNoneStar, aStar);
-    assertLUB(bNoneNone, cNoneNone, aNone);
-    assertLUB(bNoneNone, cStarQuestion, aQuestion);
-    assertLUB(bNoneNone, cStarStar, aStar);
-    assertLUB(bNoneNone, cStarNone, aNone);
-
-    assertLUB(bStarQuestion, cNoneQuestion, aQuestion);
-    assertLUB(bStarQuestion, cNoneStar, aQuestion);
-    assertLUB(bStarQuestion, cNoneNone, aQuestion);
-    assertLUB(bStarQuestion, cStarQuestion, aQuestion);
-    assertLUB(bStarQuestion, cStarStar, aQuestion);
-    assertLUB(bStarQuestion, cStarNone, aQuestion);
-
-    assertLUB(bStarStar, cNoneQuestion, aQuestion);
-    assertLUB(bStarStar, cNoneStar, aStar);
-    assertLUB(bStarStar, cNoneNone, aStar);
-    assertLUB(bStarStar, cStarQuestion, aQuestion);
-    assertLUB(bStarStar, cStarStar, aStar);
-    assertLUB(bStarStar, cStarNone, aStar);
-
-    assertLUB(bStarNone, cNoneQuestion, aQuestion);
-    assertLUB(bStarNone, cNoneStar, aStar);
-    assertLUB(bStarNone, cNoneNone, aNone);
-    assertLUB(bStarNone, cStarQuestion, aQuestion);
-    assertLUB(bStarNone, cStarStar, aStar);
-    assertLUB(bStarNone, cStarNone, aNone);
-  }
-
-  void test_sharedSuperclass2() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', superType: typeA);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', superType: typeA);
-    var typeC = interfaceTypeStar(C);
-
-    var D = class_(name: 'D', superType: typeC);
-    var typeD = interfaceTypeStar(D);
-
-    _checkLeastUpperBound(typeB, typeD, typeA);
-  }
-
-  void test_sharedSuperclass3() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', superType: typeA);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', superType: typeB);
-    var typeC = interfaceTypeStar(C);
-
-    var D = class_(name: 'D', superType: typeB);
-    var typeD = interfaceTypeStar(D);
-
-    _checkLeastUpperBound(typeC, typeD, typeB);
-  }
-
-  void test_sharedSuperclass4() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var A2 = class_(name: 'A2');
-    var typeA2 = interfaceTypeStar(A2);
-
-    var A3 = class_(name: 'A3');
-    var typeA3 = interfaceTypeStar(A3);
-
-    var B = class_(name: 'B', superType: typeA, interfaces: [typeA2]);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', superType: typeA, interfaces: [typeA3]);
-    var typeC = interfaceTypeStar(C);
-
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_sharedSuperinterface1() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', interfaces: [typeA]);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', interfaces: [typeA]);
-    var typeC = interfaceTypeStar(C);
-
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_sharedSuperinterface2() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', interfaces: [typeA]);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', interfaces: [typeA]);
-    var typeC = interfaceTypeStar(C);
-
-    var D = class_(name: 'D', interfaces: [typeC]);
-    var typeD = interfaceTypeStar(D);
-
-    _checkLeastUpperBound(typeB, typeD, typeA);
-  }
-
-  void test_sharedSuperinterface3() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', interfaces: [typeA]);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', interfaces: [typeB]);
-    var typeC = interfaceTypeStar(C);
-
-    var D = class_(name: 'D', interfaces: [typeB]);
-    var typeD = interfaceTypeStar(D);
-
-    _checkLeastUpperBound(typeC, typeD, typeB);
-  }
-
-  void test_sharedSuperinterface4() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var A2 = class_(name: 'A2');
-    var typeA2 = interfaceTypeStar(A2);
-
-    var A3 = class_(name: 'A3');
-    var typeA3 = interfaceTypeStar(A3);
-
-    var B = class_(name: 'B', interfaces: [typeA, typeA2]);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', interfaces: [typeA, typeA3]);
-    var typeC = interfaceTypeStar(C);
-
-    _checkLeastUpperBound(typeB, typeC, typeA);
-  }
-
-  void test_twoComparables() {
-    _checkLeastUpperBound(stringStar, numStar, objectStar);
-  }
-
-  void test_typeParam_boundedByParam() {
-    var S = typeParameter('S');
-    var typeS = typeParameterTypeStar(S);
-
-    var T = typeParameter('T', bound: typeS);
-    var typeT = typeParameterTypeStar(T);
-
-    _checkLeastUpperBound(typeT, typeS, typeS);
-  }
-
-  void test_typeParam_class_implements_Function_ignored() {
-    var A = class_(name: 'A', superType: typeProvider.functionType);
-    var T = typeParameter('T', bound: interfaceTypeStar(A));
-    _checkLeastUpperBound(typeParameterTypeStar(T),
-        functionTypeStar(returnType: voidNone), objectStar);
-  }
-
-  void test_typeParam_fBounded() {
-    var T = typeParameter('Q');
-    var A = class_(name: 'A', typeParameters: [T]);
-
-    var S = typeParameter('S');
-    var typeS = typeParameterTypeStar(S);
-    S.bound = interfaceTypeStar(A, typeArguments: [typeS]);
-
-    var U = typeParameter('U');
-    var typeU = typeParameterTypeStar(U);
-    U.bound = interfaceTypeStar(A, typeArguments: [typeU]);
-
-    _checkLeastUpperBound(
-      typeS,
-      typeParameterTypeStar(U),
-      interfaceTypeStar(A, typeArguments: [objectStar]),
-    );
-  }
-
-  void test_typeParam_function_bounded() {
-    var T = typeParameter('T', bound: typeProvider.functionType);
-    _checkLeastUpperBound(
-      typeParameterTypeStar(T),
-      functionTypeStar(returnType: voidNone),
-      typeProvider.functionType,
-    );
-  }
-
-  void test_typeParam_function_noBound() {
-    var T = typeParameter('T');
-    _checkLeastUpperBound(
-      typeParameterTypeStar(T),
-      functionTypeStar(returnType: voidNone),
-      objectStar,
-    );
-  }
-
-  void test_typeParam_interface_bounded() {
-    var A = class_(name: 'A');
-    var typeA = interfaceTypeStar(A);
-
-    var B = class_(name: 'B', superType: typeA);
-    var typeB = interfaceTypeStar(B);
-
-    var C = class_(name: 'C', superType: typeA);
-    var typeC = interfaceTypeStar(C);
-
-    var T = typeParameter('T', bound: typeB);
-    var typeT = typeParameterTypeStar(T);
-
-    _checkLeastUpperBound(typeT, typeC, typeA);
-  }
-
-  void test_typeParam_interface_noBound() {
-    var T = typeParameter('T');
-    var A = class_(name: 'A');
-    _checkLeastUpperBound(
-      typeParameterTypeStar(T),
-      interfaceTypeStar(A),
-      objectStar,
-    );
-  }
-
-  void test_typeParameters_contravariant_different() {
-    // class A<in T>
-    var T = typeParameter('T', variance: Variance.contravariant);
-    var A = class_(name: 'A', typeParameters: [T]);
-
-    // A<num>
-    // A<int>
-    var aNum = interfaceTypeStar(A, typeArguments: [numStar]);
-    var aInt = interfaceTypeStar(A, typeArguments: [intStar]);
-
-    _checkLeastUpperBound(aInt, aNum, aInt);
-  }
-
-  void test_typeParameters_contravariant_same() {
-    // class A<in T>
-    var T = typeParameter('T', variance: Variance.contravariant);
-    var A = class_(name: 'A', typeParameters: [T]);
-
-    // A<num>
-    var aNum = interfaceTypeStar(A, typeArguments: [numStar]);
-
-    _checkLeastUpperBound(aNum, aNum, aNum);
-  }
-
-  void test_typeParameters_covariant_different() {
-    // class A<out T>
-    var T = typeParameter('T', variance: Variance.covariant);
-    var A = class_(name: 'A', typeParameters: [T]);
-
-    // A<num>
-    // A<int>
-    var aNum = interfaceTypeStar(A, typeArguments: [numStar]);
-    var aInt = interfaceTypeStar(A, typeArguments: [intStar]);
-
-    _checkLeastUpperBound(aInt, aNum, aNum);
-  }
-
-  void test_typeParameters_covariant_same() {
-    // class A<out T>
-    var T = typeParameter('T', variance: Variance.covariant);
-    var A = class_(name: 'A', typeParameters: [T]);
-
-    // A<num>
-    var aNum = interfaceTypeStar(A, typeArguments: [numStar]);
-
-    _checkLeastUpperBound(aNum, aNum, aNum);
-  }
-
-  /// Check least upper bound of the same class with different type parameters.
-  void test_typeParameters_different() {
-    // class List<int>
-    // class List<double>
-    var listOfIntType = listStar(intStar);
-    var listOfDoubleType = listStar(doubleStar);
-    var listOfNum = listStar(numStar);
-    _checkLeastUpperBound(listOfIntType, listOfDoubleType, listOfNum);
-  }
-
-  void test_typeParameters_invariant_object() {
-    // class A<inout T>
-    var T = typeParameter('T', variance: Variance.invariant);
-    var A = class_(name: 'A', typeParameters: [T]);
-
-    // A<num>
-    // A<int>
-    var aNum = interfaceTypeStar(A, typeArguments: [numStar]);
-    var aInt = interfaceTypeStar(A, typeArguments: [intStar]);
-
-    _checkLeastUpperBound(aNum, aInt, objectStar);
-  }
-
-  void test_typeParameters_invariant_same() {
-    // class A<inout T>
-    var T = typeParameter('T', variance: Variance.invariant);
-    var A = class_(name: 'A', typeParameters: [T]);
-
-    // A<num>
-    var aNum = interfaceTypeStar(A, typeArguments: [numStar]);
-
-    _checkLeastUpperBound(aNum, aNum, aNum);
-  }
-
-  void test_typeParameters_multi_basic() {
-    // class Multi<out T, inout U, in V>
-    var T = typeParameter('T', variance: Variance.covariant);
-    var U = typeParameter('T', variance: Variance.invariant);
-    var V = typeParameter('T', variance: Variance.contravariant);
-    var Multi = class_(name: 'A', typeParameters: [T, U, V]);
-
-    // Multi<num, num, num>
-    // Multi<int, num, int>
-    var multiNumNumNum =
-        interfaceTypeStar(Multi, typeArguments: [numStar, numStar, numStar]);
-    var multiIntNumInt =
-        interfaceTypeStar(Multi, typeArguments: [intStar, numStar, intStar]);
-
-    // We expect Multi<num, num, int>
-    var multiNumNumInt =
-        interfaceTypeStar(Multi, typeArguments: [numStar, numStar, intStar]);
-
-    _checkLeastUpperBound(multiNumNumNum, multiIntNumInt, multiNumNumInt);
-  }
-
-  void test_typeParameters_multi_objectInterface() {
-    // class Multi<out T, inout U, in V>
-    var T = typeParameter('T', variance: Variance.covariant);
-    var U = typeParameter('T', variance: Variance.invariant);
-    var V = typeParameter('T', variance: Variance.contravariant);
-    var Multi = class_(name: 'A', typeParameters: [T, U, V]);
-
-    // Multi<num, String, num>
-    // Multi<int, num, int>
-    var multiNumStringNum =
-        interfaceTypeStar(Multi, typeArguments: [numStar, stringStar, numStar]);
-    var multiIntNumInt =
-        interfaceTypeStar(Multi, typeArguments: [intStar, numStar, intStar]);
-
-    _checkLeastUpperBound(multiNumStringNum, multiIntNumInt, objectStar);
-  }
-
-  void test_typeParameters_multi_objectType() {
-    // class Multi<out T, inout U, in V>
-    var T = typeParameter('T', variance: Variance.covariant);
-    var U = typeParameter('T', variance: Variance.invariant);
-    var V = typeParameter('T', variance: Variance.contravariant);
-    var Multi = class_(name: 'A', typeParameters: [T, U, V]);
-
-    // Multi<String, num, num>
-    // Multi<int, num, int>
-    var multiStringNumNum =
-        interfaceTypeStar(Multi, typeArguments: [stringStar, numStar, numStar]);
-    var multiIntNumInt =
-        interfaceTypeStar(Multi, typeArguments: [intStar, numStar, intStar]);
-
-    // We expect Multi<Object, num, int>
-    var multiObjectNumInt =
-        interfaceTypeStar(Multi, typeArguments: [objectStar, numStar, intStar]);
-
-    _checkLeastUpperBound(multiStringNumNum, multiIntNumInt, multiObjectNumInt);
-  }
-
-  void test_typeParameters_same() {
-    // List<int>
-    // List<int>
-    var listOfIntType = listStar(intStar);
-    _checkLeastUpperBound(listOfIntType, listOfIntType, listOfIntType);
-  }
-
-  /// Check least upper bound of two related classes with different
-  /// type parameters.
-  void test_typeParametersAndClass_different() {
-    // class List<int>
-    // class Iterable<double>
-    var listOfIntType = listStar(intStar);
-    var iterableOfDoubleType = iterableStar(doubleStar);
-    // TODO(leafp): this should be iterableOfNumType
-    _checkLeastUpperBound(listOfIntType, iterableOfDoubleType, objectStar);
-  }
-
-  void test_void() {
-    var T = typeParameter('T');
-    var A = class_(name: 'A');
-    List<DartType> types = [
-      neverStar,
-      functionTypeStar(returnType: voidNone),
-      interfaceTypeStar(A),
-      typeParameterTypeStar(T),
-    ];
-    for (DartType type in types) {
-      _checkLeastUpperBound(
-        functionTypeStar(returnType: voidNone),
-        functionTypeStar(returnType: type),
-        functionTypeStar(returnType: voidNone),
-      );
-    }
-  }
-}
-
 @reflectiveTest
 class TryPromoteToTest extends AbstractTypeSystemTest {
   @override
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index abf0107..78ad197 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -3123,7 +3123,9 @@
 
   void test_indexExpression() {
     IndexExpression node = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.identifier3("i"));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.identifier3("i"),
+    );
     _assertReplace(node, Getter_NodeReplacerTest_test_indexExpression());
     _assertReplace(node, Getter_NodeReplacerTest_test_indexExpression_2());
   }
diff --git a/pkg/analyzer/test/id_tests/constant_test.dart b/pkg/analyzer/test/id_tests/constant_test.dart
index 9a78106..ff39009 100644
--- a/pkg/analyzer/test/id_tests/constant_test.dart
+++ b/pkg/analyzer/test/id_tests/constant_test.dart
@@ -93,28 +93,31 @@
         return 'Symbol(${value.toSymbolValue()})';
       } else if (type.isDartCoreSet) {
         var elements = value.toSetValue().map(_stringify).join(',');
-        return 'Set<${type.typeArguments[0]}>($elements)';
+        return '${_stringifyType(type)}($elements)';
       } else if (type.isDartCoreList) {
         var elements = value.toListValue().map(_stringify).join(',');
-        return 'List<${type.typeArguments[0]}>($elements)';
+        return '${_stringifyType(type)}($elements)';
       } else if (type.isDartCoreMap) {
-        var typeArguments = type.typeArguments.join(',');
         var elements = value.toMapValue().entries.map((entry) {
           var key = _stringify(entry.key);
           var value = _stringify(entry.value);
           return '$key:$value';
         }).join(',');
-        return 'Map<$typeArguments>($elements)';
+        return '${_stringifyType(type)}($elements)';
       } else {
         // TODO(paulberry): Add `isDartCoreType` to properly recognize type
         // literal constants.
-        return 'TypeLiteral(${value.toTypeValue()})';
+        return 'TypeLiteral(${_stringifyType(value.toTypeValue())})';
       }
       // TODO(paulberry): Support object constants.
     } else if (type is FunctionType) {
       var element = value.toFunctionValue();
-      return 'Function(${element.name},type=${value.type})';
+      return 'Function(${element.name},type=${_stringifyType(value.type)})';
     }
     throw UnimplementedError('_stringify for type $type');
   }
+
+  String _stringifyType(DartType type) {
+    return type.getDisplayString(withNullability: true);
+  }
 }
diff --git a/pkg/analyzer/test/source/error_processor_test.dart b/pkg/analyzer/test/source/error_processor_test.dart
index e9f2284..2a58d77 100644
--- a/pkg/analyzer/test/source/error_processor_test.dart
+++ b/pkg/analyzer/test/source/error_processor_test.dart
@@ -19,7 +19,7 @@
 
 main() {
   AnalysisError invalid_assignment = AnalysisError(
-      TestSource(), 0, 1, StaticTypeWarningCode.INVALID_ASSIGNMENT, [
+      TestSource(), 0, 1, CompileTimeErrorCode.INVALID_ASSIGNMENT, [
     ['x'],
     ['y']
   ]);
@@ -34,8 +34,8 @@
     ['x']
   ]);
 
-  AnalysisError use_of_void_result =
-      AnalysisError(TestSource(), 0, 1, StaticWarningCode.USE_OF_VOID_RESULT, [
+  AnalysisError use_of_void_result = AnalysisError(
+      TestSource(), 0, 1, CompileTimeErrorCode.USE_OF_VOID_RESULT, [
     ['x']
   ]);
 
diff --git a/pkg/analyzer/test/src/clients/angular_analyzer_plugin/resolve_template_node_test.dart b/pkg/analyzer/test/src/clients/angular_analyzer_plugin/resolve_template_node_test.dart
new file mode 100644
index 0000000..810e4e7
--- /dev/null
+++ b/pkg/analyzer/test/src/clients/angular_analyzer_plugin/resolve_template_node_test.dart
@@ -0,0 +1,119 @@
+// 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/dart/analysis/utilities.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/clients/angular_analyzer_plugin/angular_analyzer_plugin.dart';
+import 'package:analyzer/src/test_utilities/find_node.dart';
+import 'package:meta/meta.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ResolveTemplateNodeTest);
+  });
+}
+
+@reflectiveTest
+class ResolveTemplateNodeTest extends PubPackageResolutionTest {
+  test_asExpression() async {
+    await assertNoErrorsInCode(r'''
+class MyComponent {}
+''');
+
+    var source = findElement.unitElement.source;
+    var errorListener = RecordingErrorListener();
+
+    var template = _parseTemplate('var x = 0 as int;');
+    var node = template.findNode.variableDeclaration('x = ').initializer;
+
+    var overrideAsExpressionInvoked = false;
+
+    resolveTemplateNode(
+      componentClass: findElement.class_('MyComponent'),
+      templateSource: source,
+      localVariables: [],
+      node: node,
+      errorListener: errorListener,
+      errorReporter: ErrorReporter(errorListener, source),
+      overrideAsExpression: ({node, invokeSuper}) {
+        overrideAsExpressionInvoked = true;
+        expect(invokeSuper, isNotNull);
+      },
+    );
+
+    expect(overrideAsExpressionInvoked, isTrue);
+  }
+
+  test_references() async {
+    await assertNoErrorsInCode(r'''
+class MyComponent {
+  void someContext() {
+    // ignore:unused_local_variable
+    var foo = 0;
+  }
+
+  void bar(int a) {}
+}
+''');
+
+    var source = findElement.unitElement.source;
+    var errorListener = RecordingErrorListener();
+
+    var template = _parseTemplate('var x = bar(foo);');
+    var node = template.findNode.variableDeclaration('x = ').initializer;
+    assertElementNull(template.findNode.simple('foo'));
+    assertElementNull(template.findNode.methodInvocation('bar'));
+
+    resolveTemplateNode(
+      componentClass: findElement.class_('MyComponent'),
+      templateSource: source,
+      localVariables: [
+        findElement.localVar('foo'),
+      ],
+      node: node,
+      errorListener: errorListener,
+      errorReporter: ErrorReporter(errorListener, source),
+    );
+
+    assertElement(
+      template.findNode.simple('foo'),
+      findElement.localVar('foo'),
+    );
+
+    assertElement(
+      template.findNode.methodInvocation('bar'),
+      findElement.method('bar'),
+    );
+  }
+
+  _ParsedTemplate _parseTemplate(String templateCode) {
+    var templateUnit = parseString(
+      content: templateCode,
+      featureSet: result.unit.featureSet,
+    ).unit;
+
+    return _ParsedTemplate(
+      content: templateCode,
+      unit: templateUnit,
+      findNode: FindNode(templateCode, templateUnit),
+    );
+  }
+}
+
+class _ParsedTemplate {
+  final String content;
+  final CompilationUnit unit;
+  final FindNode findNode;
+
+  _ParsedTemplate({
+    @required this.content,
+    @required this.unit,
+    @required this.findNode,
+  });
+}
diff --git a/pkg/analyzer/test/src/clients/angular_analyzer_plugin/test_all.dart b/pkg/analyzer/test/src/clients/angular_analyzer_plugin/test_all.dart
new file mode 100644
index 0000000..1494e1f
--- /dev/null
+++ b/pkg/analyzer/test/src/clients/angular_analyzer_plugin/test_all.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.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'resolve_template_node_test.dart' as resolve_template_node;
+
+main() {
+  defineReflectiveSuite(() {
+    resolve_template_node.main();
+  }, name: 'angular_analyzer_plugin');
+}
diff --git a/pkg/analyzer/test/src/clients/test_all.dart b/pkg/analyzer/test/src/clients/test_all.dart
new file mode 100644
index 0000000..6ba96a8
--- /dev/null
+++ b/pkg/analyzer/test/src/clients/test_all.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.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'angular_analyzer_plugin/test_all.dart' as angular_analyzer_plugin;
+
+main() {
+  defineReflectiveSuite(() {
+    angular_analyzer_plugin.main();
+  }, name: 'clients');
+}
diff --git a/pkg/analyzer/test/src/command_line/arguments_test.dart b/pkg/analyzer/test/src/command_line/arguments_test.dart
index 38ccc7c..32093f7 100644
--- a/pkg/analyzer/test/src/command_line/arguments_test.dart
+++ b/pkg/analyzer/test/src/command_line/arguments_test.dart
@@ -4,11 +4,11 @@
 
 import 'package:analyzer/src/command_line/arguments.dart';
 import 'package:analyzer/src/context/builder.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:args/args.dart';
+import 'package:cli_util/cli_util.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -36,16 +36,28 @@
       '--packages=$defaultPackageFilePath',
     ];
     ArgResults result = parse(resourceProvider, parser, args);
-    ContextBuilderOptions options = createContextBuilderOptions(result);
+    ContextBuilderOptions options =
+        createContextBuilderOptions(resourceProvider, result);
     expect(options, isNotNull);
-    expect(options.dartSdkSummaryPath, dartSdkSummaryPath);
+
+    expect(
+      options.defaultAnalysisOptionsFilePath,
+      endsWith(defaultAnalysisOptionsFilePath),
+    );
+    expect(
+      options.defaultPackageFilePath,
+      endsWith(defaultPackageFilePath),
+    );
+    expect(
+      options.dartSdkSummaryPath,
+      endsWith(dartSdkSummaryPath),
+    );
+
     Map<String, String> declaredVariables = options.declaredVariables;
     expect(declaredVariables, hasLength(2));
     expect(declaredVariables['foo'], '1');
     expect(declaredVariables['bar'], '2');
-    expect(
-        options.defaultAnalysisOptionsFilePath, defaultAnalysisOptionsFilePath);
-    expect(options.defaultPackageFilePath, defaultPackageFilePath);
+
     AnalysisOptionsImpl defaultOptions = options.defaultOptions;
     expect(defaultOptions, isNotNull);
     expect(defaultOptions.strongMode, true);
@@ -58,7 +70,8 @@
     defineAnalysisArguments(parser);
     List<String> args = [];
     ArgResults result = parse(resourceProvider, parser, args);
-    ContextBuilderOptions options = createContextBuilderOptions(result);
+    ContextBuilderOptions options =
+        createContextBuilderOptions(resourceProvider, result);
     expect(options, isNotNull);
     expect(options.dartSdkSummaryPath, isNull);
     expect(options.declaredVariables, isEmpty);
@@ -78,8 +91,7 @@
     ArgResults result = parse(resourceProvider, parser, args);
     DartSdkManager manager = createDartSdkManager(resourceProvider, result);
     expect(manager, isNotNull);
-    expect(manager.defaultSdkDirectory,
-        FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path);
+    expect(manager.defaultSdkDirectory, getSdkPath());
   }
 
   void test_createDartSdkManager_path() {
@@ -131,7 +143,8 @@
       '--implicit-casts',
     ];
     ArgResults result = parse(resourceProvider, parser, args);
-    ContextBuilderOptions options = createContextBuilderOptions(result);
+    ContextBuilderOptions options =
+        createContextBuilderOptions(resourceProvider, result);
     expect(options, isNotNull);
     AnalysisOptionsImpl defaultOptions = options.defaultOptions;
     expect(defaultOptions, isNotNull);
@@ -145,7 +158,8 @@
       '--no-implicit-casts',
     ];
     ArgResults result = parse(resourceProvider, parser, args);
-    ContextBuilderOptions options = createContextBuilderOptions(result);
+    ContextBuilderOptions options =
+        createContextBuilderOptions(resourceProvider, result);
     expect(options, isNotNull);
     AnalysisOptionsImpl defaultOptions = options.defaultOptions;
     expect(defaultOptions, isNotNull);
diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart
index 63c88ec..214bf41 100644
--- a/pkg/analyzer/test/src/context/builder_test.dart
+++ b/pkg/analyzer/test/src/context/builder_test.dart
@@ -8,6 +8,7 @@
 import 'package:analyzer/src/context/context_root.dart';
 import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/context/source.dart';
+import 'package:analyzer/src/dart/error/lint_codes.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
@@ -66,19 +67,9 @@
         windows: resourceProvider.pathContext.style == path.windows.style);
   }
 
-  void createDefaultSdk(Folder sdkDir) {
-    defaultSdkPath = join(sdkDir.path, 'default', 'sdk');
-    String librariesFilePath = join(defaultSdkPath, 'lib', '_internal',
-        'sdk_library_metadata', 'lib', 'libraries.dart');
-    newFile(librariesFilePath, content: r'''
-const Map<String, LibraryInfo> libraries = const {
-  "async": const LibraryInfo("async/async.dart"),
-  "core": const LibraryInfo("core/core.dart"),
-};
-''');
-    sdkManager = DartSdkManager(defaultSdkPath);
-    builder = ContextBuilder(resourceProvider, sdkManager, contentCache,
-        options: builderOptions);
+  void createDefaultSdk() {
+    defaultSdkPath = convertPath(sdkRoot);
+    MockSdk(resourceProvider: resourceProvider);
   }
 
   void setUp() {
@@ -104,7 +95,7 @@
     defineAnalysisArguments(argParser);
     ArgResults argResults = argParser.parse(['--$lintsFlag']);
     var builder = ContextBuilder(resourceProvider, sdkManager, contentCache,
-        options: createContextBuilderOptions(argResults));
+        options: createContextBuilderOptions(resourceProvider, argResults));
 
     AnalysisOptionsImpl expected = AnalysisOptionsImpl();
     expected.lint = true;
@@ -129,7 +120,7 @@
     defineAnalysisArguments(argParser);
     ArgResults argResults = argParser.parse(['--no-$lintsFlag']);
     var builder = ContextBuilder(resourceProvider, sdkManager, contentCache,
-        options: createContextBuilderOptions(argResults));
+        options: createContextBuilderOptions(resourceProvider, argResults));
 
     AnalysisOptionsImpl expected = AnalysisOptionsImpl();
     expected.lint = false;
@@ -154,7 +145,7 @@
     defineAnalysisArguments(argParser);
     ArgResults argResults = argParser.parse([]);
     var builder = ContextBuilder(resourceProvider, sdkManager, contentCache,
-        options: createContextBuilderOptions(argResults));
+        options: createContextBuilderOptions(resourceProvider, argResults));
 
     AnalysisOptionsImpl expected = AnalysisOptionsImpl();
     expected.lint = true;
@@ -179,7 +170,7 @@
     defineAnalysisArguments(argParser);
     ArgResults argResults = argParser.parse([]);
     var builder = ContextBuilder(resourceProvider, sdkManager, contentCache,
-        options: createContextBuilderOptions(argResults));
+        options: createContextBuilderOptions(resourceProvider, argResults));
 
     AnalysisOptionsImpl expected = AnalysisOptionsImpl();
     expected.lint = false;
@@ -346,8 +337,7 @@
 
   void test_createSourceFactory_noProvider_packages_embedder_noExtensions() {
     String rootPath = convertPath('/root');
-    Folder rootFolder = getFolder(rootPath);
-    createDefaultSdk(rootFolder);
+    createDefaultSdk();
     String projectPath = join(rootPath, 'project');
     String packageFilePath = join(projectPath, '.packages');
 
@@ -386,8 +376,7 @@
 
   void test_createSourceFactory_noProvider_packages_noEmbedder_noExtensions() {
     String rootPath = convertPath('/root');
-    Folder rootFolder = getFolder(rootPath);
-    createDefaultSdk(rootFolder);
+    createDefaultSdk();
     String projectPath = join(rootPath, 'project');
     String packageFilePath = join(projectPath, '.packages');
     String packageA = join(rootPath, 'pkgs', 'a');
@@ -413,7 +402,7 @@
   void test_createWorkspace_hasPackagesFile_hasDartToolAndPubspec() {
     newFile('/workspace/.packages');
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     Workspace workspace = ContextBuilder.createWorkspace(resourceProvider,
         convertPath('/workspace/project/lib/lib.dart'), builder);
     expect(workspace, TypeMatcher<PackageBuildWorkspace>());
@@ -421,7 +410,7 @@
 
   void test_createWorkspace_hasPackagesFile_hasPubspec() {
     newFile('/workspace/.packages');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     Workspace workspace = ContextBuilder.createWorkspace(resourceProvider,
         convertPath('/workspace/project/lib/lib.dart'), builder);
     expect(workspace, TypeMatcher<PubWorkspace>());
@@ -444,7 +433,7 @@
 
   void test_createWorkspace_noPackagesFile_hasDartToolAndPubspec() {
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     Workspace workspace = ContextBuilder.createWorkspace(resourceProvider,
         convertPath('/workspace/project/lib/lib.dart'), builder);
     expect(workspace, TypeMatcher<PackageBuildWorkspace>());
@@ -460,7 +449,7 @@
   }
 
   void test_createWorkspace_noPackagesFile_hasPubspec() {
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     Workspace workspace = ContextBuilder.createWorkspace(resourceProvider,
         convertPath('/workspace/project/lib/lib.dart'), builder);
     expect(workspace, TypeMatcher<PubWorkspace>());
@@ -563,7 +552,7 @@
     newFile(filePath, content: '''
 linter:
   rules:
-    - empty_constructor_bodies
+    - non_existent_lint_rule
 ''');
 
     AnalysisOptions options = builder.getAnalysisOptions(path);
@@ -598,7 +587,7 @@
     ArgParser argParser = ArgParser();
     defineAnalysisArguments(argParser);
     ArgResults argResults = argParser.parse([]);
-    builderOptions = createContextBuilderOptions(argResults);
+    builderOptions = createContextBuilderOptions(resourceProvider, argResults);
     builder = ContextBuilder(resourceProvider, sdkManager, contentCache,
         options: builderOptions);
     AnalysisOptionsImpl expected = AnalysisOptionsImpl();
@@ -659,7 +648,7 @@
     newFile(filePath, content: '''
 linter:
   rules:
-    - empty_constructor_bodies
+    - non_existent_lint_rule
 ''');
 
     AnalysisOptions options = builder.getAnalysisOptions(path);
@@ -821,6 +810,9 @@
   _MockLintRule(this._name);
 
   @override
+  List<LintCode> get lintCodes => [LintCode(_name, '')];
+
+  @override
   String get name => _name;
 
   @override
diff --git a/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart b/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart
index a937fd6..f705281 100644
--- a/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart
@@ -46,7 +46,10 @@
     DeclaredVariables declaredVariables =
         DeclaredVariables.fromMap({'foo': 'true'});
     DriverBasedAnalysisContext context = contextBuilder.createContext(
-        contextRoot: contextRoot, declaredVariables: declaredVariables);
+      contextRoot: contextRoot,
+      declaredVariables: declaredVariables,
+      sdkPath: resourceProvider.convertPath(sdkRoot),
+    );
     expect(context.analysisOptions, isNotNull);
     expect(context.contextRoot, contextRoot);
     assertEquals(context.driver.declaredVariables, declaredVariables);
@@ -68,8 +71,10 @@
   }
 
   test_createContext_defaults() {
-    AnalysisContext context =
-        contextBuilder.createContext(contextRoot: contextRoot);
+    AnalysisContext context = contextBuilder.createContext(
+      contextRoot: contextRoot,
+      sdkPath: resourceProvider.convertPath(sdkRoot),
+    );
     expect(context.analysisOptions, isNotNull);
     expect(context.contextRoot, contextRoot);
   }
diff --git a/pkg/analyzer/test/src/dart/analysis/dependency/base.dart b/pkg/analyzer/test/src/dart/analysis/dependency/base.dart
index b217244..6c12cef 100644
--- a/pkg/analyzer/test/src/dart/analysis/dependency/base.dart
+++ b/pkg/analyzer/test/src/dart/analysis/dependency/base.dart
@@ -8,9 +8,9 @@
 import 'package:meta/meta.dart';
 import 'package:test/test.dart';
 
-import '../../resolution/driver_resolution.dart';
+import '../../resolution/context_collection_resolution.dart';
 
-class BaseDependencyTest extends DriverResolutionTest {
+class BaseDependencyTest extends PubPackageResolutionTest {
 //  DependencyTracker tracker;
   String a;
   String b;
@@ -62,7 +62,7 @@
 //    }
 
     newFile(path, content: content);
-    driver.changeFile(path);
+    driverFor(path).changeFile(path);
 
     var units = await _resolveLibrary(path);
     var uri = units.first.declaredElement.source.uri;
@@ -104,9 +104,9 @@
     super.setUp();
 //    var logger = PerformanceLog(null);
 //    tracker = DependencyTracker(logger);
-    a = convertPath('/test/lib/a.dart');
-    b = convertPath('/test/lib/b.dart');
-    c = convertPath('/test/lib/c.dart');
+    a = convertPath('$testPackageLibPath/a.dart');
+    b = convertPath('$testPackageLibPath/b.dart');
+    c = convertPath('$testPackageLibPath/c.dart');
     aUri = Uri.parse('package:test/a.dart');
     bUri = Uri.parse('package:test/b.dart');
     cUri = Uri.parse('package:test/c.dart');
@@ -138,7 +138,8 @@
   }
 
   Future<List<CompilationUnit>> _resolveLibrary(String libraryPath) async {
-    var resolvedLibrary = await driver.getResolvedLibrary(libraryPath);
+    var session = contextFor(libraryPath).currentSession;
+    var resolvedLibrary = await session.getResolvedLibrary(libraryPath);
     return resolvedLibrary.units.map((ru) => ru.unit).toList();
   }
 }
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 9984659..e6cd991 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
@@ -20,7 +20,7 @@
 
 import '../../../generated/elements_types_mixin.dart';
 import '../../../utils.dart';
-import '../resolution/driver_resolution.dart';
+import '../resolution/context_collection_resolution.dart';
 import 'base.dart';
 
 main() {
@@ -38,7 +38,7 @@
 
 /// Integration tests for resolution.
 @reflectiveTest
-class AnalysisDriverResolutionTest extends DriverResolutionTest
+class AnalysisDriverResolutionTest extends PubPackageResolutionTest
     with ElementsTypesMixin {
   void assertDeclaredVariableType(SimpleIdentifier node, String expected) {
     VariableElement element = node.staticElement;
@@ -250,7 +250,7 @@
   }
 
   test_annotation_onDirective_part() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 part of 'test.dart';
 ''');
     addTestFile(r'''
@@ -273,7 +273,7 @@
   }
 
   test_annotation_onDirective_partOf() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 part 'test.dart';
 ''');
     addTestFile(r'''
@@ -394,7 +394,7 @@
   }
 
   test_annotation_prefixed_classField() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static const a = 1;
 }
@@ -433,7 +433,7 @@
   }
 
   test_annotation_prefixed_constructor() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A(int a, {int b});
 }
@@ -474,7 +474,7 @@
   }
 
   test_annotation_prefixed_constructor_named() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A.named(int a, {int b});
 }
@@ -517,7 +517,7 @@
   }
 
   test_annotation_prefixed_topLevelVariable() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const topAnnotation = 1;
 ''');
     addTestFile(r'''
@@ -1395,7 +1395,7 @@
   }
 
   test_deferredImport_loadLibrary_invocation() async {
-    newFile('/test/lib/a.dart');
+    newFile('$testPackageLibPath/a.dart');
     addTestFile(r'''
 import 'a.dart' deferred as a;
 main() {
@@ -1419,7 +1419,7 @@
   }
 
   test_deferredImport_loadLibrary_invocation_argument() async {
-    newFile('/test/lib/a.dart');
+    newFile('$testPackageLibPath/a.dart');
     addTestFile(r'''
 import 'a.dart' deferred as a;
 var b = 1;
@@ -1453,7 +1453,7 @@
   }
 
   test_deferredImport_loadLibrary_tearOff() async {
-    newFile('/test/lib/a.dart');
+    newFile('$testPackageLibPath/a.dart');
     addTestFile(r'''
 import 'a.dart' deferred as a;
 main() {
@@ -1476,7 +1476,7 @@
   }
 
   test_deferredImport_variable() async {
-    newFile('/test/lib/a.dart', content: 'var v = 0;');
+    newFile('$testPackageLibPath/a.dart', content: 'var v = 0;');
     addTestFile(r'''
 import 'a.dart' deferred as a;
 main() async {
@@ -1516,7 +1516,7 @@
   }
 
   test_directive_export() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class MyClass {}
 int myVar;
 int get myGetter => 0;
@@ -1564,7 +1564,7 @@
   }
 
   test_directive_import_hide() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class MyClass {}
 int myVar;
 int get myGetter => 0;
@@ -1612,7 +1612,7 @@
   }
 
   test_directive_import_show() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class MyClass {}
 int myVar;
 int get myGetter => 0;
@@ -2172,7 +2172,7 @@
   }
 
   test_instanceCreation_prefixed() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class C<T> {
   C(T p);
   C.named(T p);
@@ -3580,7 +3580,7 @@
 
   @failingTest
   test_invalid_nonTypeAsType_topLevelFunction_prefixed() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int T() => 0;
 ''');
     addTestFile(r'''
@@ -3648,7 +3648,7 @@
 
   @failingTest
   test_invalid_nonTypeAsType_topLevelVariable_prefixed() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int T;
 ''');
     addTestFile(r'''
@@ -5630,7 +5630,7 @@
   }
 
   test_optionalConst_prefixed() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class C {
   const C();
   const C.named();
@@ -6154,7 +6154,7 @@
   }
 
   test_prefixedIdentifier_importPrefix_className() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class MyClass {}
 typedef void MyFunctionTypeAlias();
 int myTopVariable;
@@ -7751,9 +7751,9 @@
   }
 
   test_typeAnnotation_prefixed() async {
-    newFile('/test/lib/a.dart', content: 'class A {}');
-    newFile('/test/lib/b.dart', content: "export 'a.dart';");
-    newFile('/test/lib/c.dart', content: "export 'a.dart';");
+    newFile('$testPackageLibPath/a.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/b.dart', content: "export 'a.dart';");
+    newFile('$testPackageLibPath/c.dart', content: "export 'a.dart';");
     addTestFile(r'''
 import 'b.dart' as b;
 import 'c.dart' as c;
@@ -8495,8 +8495,7 @@
 
   /// Assert that the [argument] has the [expectedType]. If the [argument] is
   /// a [NamedExpression], the name must be resolved to the same parameter.
-  void _assertArgumentToParameter2(Expression argument, String expectedType,
-      {DartType memberType}) {
+  void _assertArgumentToParameter2(Expression argument, String expectedType) {
     ParameterElement actual = argument.staticParameterElement;
     assertType(actual.type, expectedType);
 
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index 4e30908..2f46907 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -513,7 +513,7 @@
     ResolvedUnitResult libResult = await driver.getResult(lib);
     List<AnalysisError> errors = libResult.errors;
     expect(errors, hasLength(1));
-    expect(errors[0].errorCode, StaticWarningCode.PART_OF_DIFFERENT_LIBRARY);
+    expect(errors[0].errorCode, CompileTimeErrorCode.PART_OF_DIFFERENT_LIBRARY);
   }
 
   test_analyze_resolveDirectives_error_partOfDifferentLibrary_byUri() async {
@@ -532,7 +532,7 @@
     ResolvedUnitResult libResult = await driver.getResult(lib);
     List<AnalysisError> errors = libResult.errors;
     expect(errors, hasLength(1));
-    expect(errors[0].errorCode, StaticWarningCode.PART_OF_DIFFERENT_LIBRARY);
+    expect(errors[0].errorCode, CompileTimeErrorCode.PART_OF_DIFFERENT_LIBRARY);
   }
 
   test_analyze_resolveDirectives_error_partOfNonPart() async {
@@ -1666,7 +1666,7 @@
       ResolvedUnitResult result = await driver.getResult(b);
       List<AnalysisError> errors = result.errors;
       expect(errors, hasLength(1));
-      expect(errors[0].errorCode, StaticTypeWarningCode.INVALID_ASSIGNMENT);
+      expect(errors[0].errorCode, CompileTimeErrorCode.INVALID_ASSIGNMENT);
     }
   }
 
diff --git a/pkg/analyzer/test/src/dart/analysis/experiments_test.dart b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
index dee7327..d45fd53 100644
--- a/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
@@ -194,7 +194,7 @@
 
   test_fromStrings_unrecognized_flag() {
     // Unrecognized flags are ignored.
-    expect(getFlags(fromStrings(['a'])), []);
+    expect(getFlags(fromStrings(['a'])), <Object>[]);
   }
 
   test_validateFlagCombination_disable_then_enable() {
diff --git a/pkg/analyzer/test/src/dart/analysis/feature_set_provider_test.dart b/pkg/analyzer/test/src/dart/analysis/feature_set_provider_test.dart
index f5328f8..8e88069 100644
--- a/pkg/analyzer/test/src/dart/analysis/feature_set_provider_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/feature_set_provider_test.dart
@@ -13,6 +13,7 @@
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:meta/meta.dart';
 import 'package:pub_semver/pub_semver.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -79,6 +80,7 @@
 
     provider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
+      resourceProvider: resourceProvider,
       packages: packages,
       packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
       nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
@@ -125,6 +127,7 @@
 
     provider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
+      resourceProvider: resourceProvider,
       packages: packages,
       packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
       nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
@@ -171,24 +174,54 @@
 
     provider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
+      resourceProvider: resourceProvider,
       packages: packages,
       packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
       nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
     );
 
-    void check(String posixPath, Version expected) {
+    void check({
+      @required String uriStr,
+      @required String posixPath,
+      @required Version expected,
+    }) {
+      var uri = Uri.parse(uriStr);
       var path = convertPath(posixPath);
-      var uri = Uri.parse('package:aaa/a.dart');
       expect(
         provider.getLanguageVersion(path, uri),
         expected,
       );
     }
 
-    check('/packages/aaa/a.dart', Version.parse('2.5.0'));
-    check('/packages/aaa/bbb/b.dart', Version.parse('2.6.0'));
-    check('/packages/ccc/c.dart', Version.parse('2.7.0'));
-    check('/packages/ddd/d.dart', ExperimentStatus.currentVersion);
+    check(
+      uriStr: 'package:aaa/a.dart',
+      posixPath: '/packages/aaa/a.dart',
+      expected: Version.parse('2.5.0'),
+    );
+
+    check(
+      uriStr: toUriStr('/packages/aaa/test/a.dart'),
+      posixPath: '/packages/aaa/test/a.dart',
+      expected: Version.parse('2.5.0'),
+    );
+
+    check(
+      uriStr: 'package:bbb/b.dart',
+      posixPath: '/packages/aaa/bbb/b.dart',
+      expected: Version.parse('2.6.0'),
+    );
+
+    check(
+      uriStr: 'package:ccc/c.dart',
+      posixPath: '/packages/ccc/c.dart',
+      expected: Version.parse('2.7.0'),
+    );
+
+    check(
+      uriStr: 'package:ddd/a.dart',
+      posixPath: '/packages/ddd/d.dart',
+      expected: ExperimentStatus.currentVersion,
+    );
   }
 
   test_packages_contextExperiments_nonNullable() {
@@ -209,6 +242,7 @@
 
     provider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
+      resourceProvider: resourceProvider,
       packages: packages,
       packageDefaultFeatureSet: FeatureSet.fromEnableFlags(['non-nullable']),
       nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
@@ -238,6 +272,7 @@
 
     provider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
+      resourceProvider: resourceProvider,
       packages: findPackagesFrom(resourceProvider, getFolder('/test')),
       packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
       nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
@@ -269,6 +304,7 @@
 ''');
     provider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
+      resourceProvider: resourceProvider,
       packages: findPackagesFrom(resourceProvider, getFolder('/test')),
       packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
       nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
@@ -284,6 +320,7 @@
   test_sdk_allowedExperiments_mockDefault() {
     provider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
+      resourceProvider: resourceProvider,
       packages: findPackagesFrom(resourceProvider, getFolder('/test')),
       packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
       nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
index 5ec7d05..b9af9b1 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -21,6 +21,7 @@
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:analyzer/src/workspace/basic.dart';
 import 'package:convert/convert.dart';
 import 'package:crypto/crypto.dart';
 import 'package:test/test.dart';
@@ -50,18 +51,29 @@
   void setUp() {
     logger = PerformanceLog(logBuffer);
     sdk = MockSdk(resourceProvider: resourceProvider);
+
+    var packageMap = <String, List<Folder>>{
+      'aaa': [getFolder('/aaa/lib')],
+      'bbb': [getFolder('/bbb/lib')],
+    };
+
+    var workspace = BasicWorkspace.find(
+      resourceProvider,
+      packageMap,
+      convertPath('/test'),
+    );
+
     sourceFactory = SourceFactory([
       DartUriResolver(sdk),
       generatedUriResolver,
-      PackageMapUriResolver(resourceProvider, <String, List<Folder>>{
-        'aaa': [getFolder('/aaa/lib')],
-        'bbb': [getFolder('/bbb/lib')],
-      }),
+      PackageMapUriResolver(resourceProvider, packageMap),
       ResourceUriResolver(resourceProvider)
     ]);
+
     AnalysisOptions analysisOptions = AnalysisOptionsImpl();
     var featureSetProvider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
+      resourceProvider: resourceProvider,
       packages: Packages.empty,
       packageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
       nonPackageDefaultFeatureSet: FeatureSet.fromEnableFlags([]),
@@ -73,6 +85,7 @@
       resourceProvider,
       'contextName',
       sourceFactory,
+      workspace,
       analysisOptions,
       DeclaredVariables(),
       Uint32List(0),
diff --git a/pkg/analyzer/test/src/dart/analysis/mutex_test.dart b/pkg/analyzer/test/src/dart/analysis/mutex_test.dart
index 565168f..5ffbda9 100644
--- a/pkg/analyzer/test/src/dart/analysis/mutex_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/mutex_test.dart
@@ -23,7 +23,7 @@
       Future(() async {
         await mutex.acquire();
         try {
-          await Future.delayed(Duration(milliseconds: 10));
+          await Future<void>.delayed(Duration(milliseconds: 10));
           values.add(1);
         } finally {
           mutex.release();
@@ -50,7 +50,7 @@
     await Future.wait([
       Future(() async {
         await mutex.guard(() async {
-          await Future.delayed(Duration(milliseconds: 10));
+          await Future<void>.delayed(Duration(milliseconds: 10));
           values.add(1);
         });
       }),
diff --git a/pkg/analyzer/test/src/dart/analysis/results/get_element_declaration_test.dart b/pkg/analyzer/test/src/dart/analysis/results/get_element_declaration_test.dart
index 7edf053..69e058e 100644
--- a/pkg/analyzer/test/src/dart/analysis/results/get_element_declaration_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/results/get_element_declaration_test.dart
@@ -9,7 +9,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../resolution/driver_resolution.dart';
+import '../../resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
   });
 }
 
-mixin GetElementDeclarationMixin implements DriverResolutionTest {
+mixin GetElementDeclarationMixin implements PubPackageResolutionTest {
   Future<ElementDeclarationResult> getElementDeclaration(Element element);
 
   test_class() async {
@@ -60,7 +60,7 @@
   }
 
   test_class_inPart() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 part of 'test.dart';
 class A {}
 ''');
@@ -403,7 +403,7 @@
 }
 
 @reflectiveTest
-class GetElementDeclarationParsedTest extends DriverResolutionTest
+class GetElementDeclarationParsedTest extends PubPackageResolutionTest
     with GetElementDeclarationMixin {
   @override
   Future<ElementDeclarationResult> getElementDeclaration(
@@ -414,12 +414,13 @@
   }
 
   ParsedLibraryResultImpl _getParsedLibrary(String path) {
-    return driver.getParsedLibrary(path);
+    var session = contextFor(path).currentSession;
+    return session.getParsedLibrary(path);
   }
 }
 
 @reflectiveTest
-class GetElementDeclarationResolvedTest extends DriverResolutionTest
+class GetElementDeclarationResolvedTest extends PubPackageResolutionTest
     with GetElementDeclarationMixin {
   @override
   Future<ElementDeclarationResult> getElementDeclaration(
@@ -430,6 +431,7 @@
   }
 
   Future<ResolvedLibraryResult> _getResolvedLibrary(String path) {
-    return driver.getResolvedLibrary(path);
+    var session = contextFor(path).currentSession;
+    return session.getResolvedLibrary(path);
   }
 }
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index ce1dd18..37af8b4 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -21,7 +21,7 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(SearchTest);
-    defineReflectiveTests(SearchWithNnbdTest);
+    defineReflectiveTests(SearchWithNullSafetyTest);
   });
 }
 
@@ -39,12 +39,12 @@
   @override
   bool operator ==(Object result) {
     return result is SearchResult &&
-        result.kind == this.kind &&
-        result.isResolved == this.isResolved &&
-        result.isQualified == this.isQualified &&
-        result.offset == this.offset &&
-        result.length == this.length &&
-        result.enclosingElement == this.enclosingElement;
+        result.kind == kind &&
+        result.isResolved == isResolved &&
+        result.isQualified == isQualified &&
+        result.offset == offset &&
+        result.length == length &&
+        result.enclosingElement == enclosingElement;
   }
 
   @override
@@ -1755,7 +1755,7 @@
   /// Create [ExpectedResult] for a qualified and resolved match.
   ExpectedResult _expectIdQ(
       Element element, SearchResultKind kind, String search,
-      {int length, bool isResolved = true}) {
+      {int length}) {
     return _expectId(element, kind, search, isQualified: true, length: length);
   }
 
@@ -1817,7 +1817,7 @@
 }
 
 @reflectiveTest
-class SearchWithNnbdTest extends SearchTest {
+class SearchWithNullSafetyTest extends SearchTest {
   @override
   AnalysisOptionsImpl createAnalysisOptions() => AnalysisOptionsImpl()
     ..contextFeatures = FeatureSet.forTesting(
diff --git a/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart b/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
index 1a390a1..c9d188a 100644
--- a/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
@@ -8,7 +8,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../resolution/driver_resolution.dart';
+import '../resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,17 +17,18 @@
 }
 
 @reflectiveTest
-class AnalysisSessionHelperTest extends DriverResolutionTest {
+class AnalysisSessionHelperTest extends PubPackageResolutionTest {
   AnalysisSessionHelper helper;
 
   @override
   void setUp() {
     super.setUp();
-    helper = AnalysisSessionHelper(driver.currentSession);
+    var session = contextFor(testFilePath).currentSession;
+    helper = AnalysisSessionHelper(session);
   }
 
   test_getClass_defined() async {
-    var file = newFile('/test/lib/c.dart', content: r'''
+    var file = newFile('$testPackageLibPath/c.dart', content: r'''
 class C {}
 int v = 0;
 ''');
@@ -39,7 +40,7 @@
   }
 
   test_getClass_defined_notClass() async {
-    var file = newFile('/test/lib/c.dart', content: r'''
+    var file = newFile('$testPackageLibPath/c.dart', content: r'''
 int v = 0;
 ''');
     String uri = file.toUri().toString();
@@ -49,10 +50,10 @@
   }
 
   test_getClass_exported() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
-    var bFile = newFile('/test/lib/b.dart', content: r'''
+    var bFile = newFile('$testPackageLibPath/b.dart', content: r'''
 export 'a.dart';
 ''');
     String bUri = bFile.toUri().toString();
@@ -63,10 +64,10 @@
   }
 
   test_getClass_imported() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
-    var bFile = newFile('/test/lib/b.dart', content: r'''
+    var bFile = newFile('$testPackageLibPath/b.dart', content: r'''
 import 'a.dart';
 ''');
     String bUri = bFile.toUri().toString();
@@ -96,7 +97,7 @@
   }
 
   test_getTopLevelPropertyAccessor_defined_getter() async {
-    var file = newFile('/test/lib/test.dart', content: r'''
+    var file = newFile('$testPackageLibPath/test.dart', content: r'''
 int get a => 0;
 ''');
     String uri = file.toUri().toString();
@@ -108,7 +109,7 @@
   }
 
   test_getTopLevelPropertyAccessor_defined_setter() async {
-    var file = newFile('/test/lib/test.dart', content: r'''
+    var file = newFile('$testPackageLibPath/test.dart', content: r'''
 set a(_) {}
 ''');
     String uri = file.toUri().toString();
@@ -120,7 +121,7 @@
   }
 
   test_getTopLevelPropertyAccessor_defined_variable() async {
-    var file = newFile('/test/lib/test.dart', content: r'''
+    var file = newFile('$testPackageLibPath/test.dart', content: r'''
 int a;
 ''');
     String uri = file.toUri().toString();
@@ -132,10 +133,10 @@
   }
 
   test_getTopLevelPropertyAccessor_exported() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int a;
 ''');
-    var bFile = newFile('/test/lib/b.dart', content: r'''
+    var bFile = newFile('$testPackageLibPath/b.dart', content: r'''
 export 'a.dart';
 ''');
     String bUri = bFile.toUri().toString();
@@ -147,10 +148,10 @@
   }
 
   test_getTopLevelPropertyAccessor_imported() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int a;
 ''');
-    var bFile = newFile('/test/lib/b.dart', content: r'''
+    var bFile = newFile('$testPackageLibPath/b.dart', content: r'''
 import 'a.dart';
 ''');
     String bUri = bFile.toUri().toString();
@@ -160,7 +161,7 @@
   }
 
   test_getTopLevelPropertyAccessor_notDefined() async {
-    var file = newFile('/test/lib/test.dart', content: r'''
+    var file = newFile('$testPackageLibPath/test.dart', content: r'''
 int a;
 ''');
     String uri = file.toUri().toString();
@@ -170,7 +171,7 @@
   }
 
   test_getTopLevelPropertyAccessor_notPropertyAccessor() async {
-    var file = newFile('/test/lib/test.dart', content: r'''
+    var file = newFile('$testPackageLibPath/test.dart', content: r'''
 int a() {}
 ''');
     String uri = file.toUri().toString();
diff --git a/pkg/analyzer/test/src/dart/ast/element_locator_test.dart b/pkg/analyzer/test/src/dart/ast/element_locator_test.dart
index f63cc86..46d0ab5 100644
--- a/pkg/analyzer/test/src/dart/ast/element_locator_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/element_locator_test.dart
@@ -8,7 +8,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../util/element_type_matchers.dart';
-import '../resolution/driver_resolution.dart';
+import '../resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +17,7 @@
 }
 
 @reflectiveTest
-class ElementLocatorTest extends DriverResolutionTest {
+class ElementLocatorTest extends PubPackageResolutionTest {
   @override
   AnalysisOptionsImpl get analysisOptions {
     return AnalysisOptionsImpl()..hint = false;
@@ -199,7 +199,7 @@
   }
 
   test_locate_InstanceCreationExpression_type_prefixedIdentifier() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
     await resolveTestCode(r'''
@@ -215,7 +215,7 @@
   }
 
   test_locate_InstanceCreationExpression_type_simpleIdentifier() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 ''');
     await resolveTestCode(r'''
 class A {}
@@ -275,19 +275,22 @@
     expect(element, isFunctionElement);
   }
 
-  test_locate_PartOfDirective() async {
-    var libPath = convertPath('/test/lib/lib.dart');
-    var partPath = convertPath('/test/lib/test.dart');
+  test_locate_PartOfDirective_withName() async {
+    var libPath = convertPath('$testPackageLibPath/lib.dart');
+    var partPath = convertPath('$testPackageLibPath/test.dart');
 
     newFile(libPath, content: r'''
 library my.lib;
 part 'test.dart';
 ''');
 
-    driver.addFile(libPath);
-    driver.addFile(partPath);
+    newFile(partPath, content: r'''
+part of my.lib;
+''');
 
-    await resolveTestCode('part of my.lib;');
+    await resolveFile(libPath);
+
+    await resolveFile2(partPath);
     var node = findNode.partOf('part of');
     var element = ElementLocator.locate(node);
     expect(element, isLibraryElement);
@@ -318,7 +321,7 @@
   }
 
   test_locate_StringLiteral_exportUri() async {
-    newFile("/test/lib/foo.dart", content: '');
+    newFile("$testPackageLibPath/foo.dart", content: '');
     await resolveTestCode("export 'foo.dart';");
     var node = findNode.stringLiteral('foo.dart');
     var element = ElementLocator.locate(node);
@@ -333,7 +336,7 @@
   }
 
   test_locate_StringLiteral_importUri() async {
-    newFile("/test/lib/foo.dart", content: '');
+    newFile("$testPackageLibPath/foo.dart", content: '');
     await resolveTestCode("import 'foo.dart';");
     var node = findNode.stringLiteral('foo.dart');
     var element = ElementLocator.locate(node);
@@ -341,7 +344,7 @@
   }
 
   test_locate_StringLiteral_partUri() async {
-    newFile("/test/lib/foo.dart", content: 'part of lib;');
+    newFile("$testPackageLibPath/foo.dart", content: 'part of lib;');
     await resolveTestCode('''
 library lib;
 
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 8207f4e..f93f0ce 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
@@ -898,6 +898,14 @@
                 [AstTestFactory.identifier3('o')])));
   }
 
+  void test_visitFieldDeclaration_abstract() {
+    _assertSource(
+        "abstract var a;",
+        AstTestFactory.fieldDeclaration(
+            false, Keyword.VAR, null, [AstTestFactory.variableDeclaration("a")],
+            isAbstract: true));
+  }
+
   void test_visitFieldDeclaration_instance() {
     _assertSource(
         "var a;",
@@ -1741,9 +1749,12 @@
 
   void test_visitIndexExpression() {
     _assertSource(
-        "a[i]",
-        AstTestFactory.indexExpression(
-            AstTestFactory.identifier3("a"), AstTestFactory.identifier3("i")));
+      "a[i]",
+      AstTestFactory.indexExpression(
+        target: AstTestFactory.identifier3("a"),
+        index: AstTestFactory.identifier3("i"),
+      ),
+    );
   }
 
   void test_visitInstanceCreationExpression_const() {
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index 1489f45..06798f1 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -300,6 +300,26 @@
     expect(toNode.element, same(element));
   }
 
+  void test_visitFieldDeclaration_abstract() {
+    FieldDeclaration fromNode = AstTestFactory.fieldDeclaration(
+        false, Keyword.VAR, null, [AstTestFactory.variableDeclaration('x')],
+        isAbstract: false);
+    FieldElement element = FieldElementImpl('x', -1);
+    fromNode.fields.variables[0].name.staticElement = element;
+    FieldDeclaration toNode1 = AstTestFactory.fieldDeclaration(
+        false, Keyword.VAR, null, [AstTestFactory.variableDeclaration('x')],
+        isAbstract: false);
+    ResolutionCopier.copyResolutionData(fromNode, toNode1);
+    // Nodes matched so resolution data should have been copied.
+    expect(toNode1.fields.variables[0].declaredElement, same(element));
+    FieldDeclaration toNode2 = AstTestFactory.fieldDeclaration(
+        false, Keyword.VAR, null, [AstTestFactory.variableDeclaration('x')],
+        isAbstract: true);
+    ResolutionCopier.copyResolutionData(fromNode, toNode1);
+    // Nodes didn't match so resolution data should not have been copied.
+    expect(toNode2.fields.variables[0].declaredElement, isNull);
+  }
+
   void test_visitForEachPartsWithDeclaration() {
     ForEachPartsWithDeclaration createNode() =>
         astFactory.forEachPartsWithDeclaration(
@@ -498,7 +518,9 @@
 
   void test_visitIndexExpression() {
     IndexExpression fromNode = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.integer(0));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.integer(0),
+    );
     MethodElement staticElement = ElementFactory.methodElement(
         "m", interfaceTypeStar(ElementFactory.classElement2('C')));
     AuxiliaryElements auxiliaryElements = AuxiliaryElements(staticElement);
@@ -507,7 +529,9 @@
     DartType staticType = interfaceTypeStar(ElementFactory.classElement2('C'));
     fromNode.staticType = staticType;
     IndexExpression toNode = AstTestFactory.indexExpression(
-        AstTestFactory.identifier3("a"), AstTestFactory.integer(0));
+      target: AstTestFactory.identifier3("a"),
+      index: AstTestFactory.integer(0),
+    );
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect(toNode.auxiliaryElements, same(auxiliaryElements));
     expect(toNode.staticElement, same(staticElement));
diff --git a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
index 056f1c4..6cd1ae9 100644
--- a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
@@ -14,8 +13,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../generated/test_support.dart';
-import '../resolution/driver_resolution.dart';
-import 'potentially_constant_test.dart';
+import '../resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -301,14 +299,15 @@
   }
 }
 
-class ConstantVisitorTestSupport extends DriverResolutionTest {
+class ConstantVisitorTestSupport extends PubPackageResolutionTest {
   DartObjectImpl _evaluateConstant(
     String name, {
     List<ErrorCode> errorCodes,
     Map<String, String> declaredVariables = const {},
     Map<String, DartObjectImpl> lexicalEnvironment,
   }) {
-    var options = driver.analysisOptions as AnalysisOptionsImpl;
+    var analysisContext = contextFor(this.result.path);
+    var options = analysisContext.analysisOptions as AnalysisOptionsImpl;
     var expression = findNode.topVariableDeclarationByName(name).initializer;
 
     var source = this.result.unit.declaredElement.source;
@@ -344,10 +343,14 @@
 class ConstantVisitorWithConstantUpdate2018Test
     extends ConstantVisitorTestSupport {
   @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.constant_update_2018, EnableString.triple_shift],
+  void setUp() {
+    super.setUp();
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        experiments: [EnableString.triple_shift],
+      ),
     );
+  }
 
   test_visitAsExpression_instanceOfSameClass() async {
     await resolveTestCode('''
diff --git a/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart b/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
index 91e2cc5..4ba18ab 100644
--- a/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
@@ -2,15 +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:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/constant/potentially_constant.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../resolution/driver_resolution.dart';
+import '../resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -22,7 +19,7 @@
 }
 
 @reflectiveTest
-class IsConstantTypeExpressionTest extends DriverResolutionTest {
+class IsConstantTypeExpressionTest extends PubPackageResolutionTest {
   test_class() async {
     await _assertConst(r'''
 int x;
@@ -30,7 +27,7 @@
   }
 
   test_class_prefix() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
     await _assertConst(r'''
@@ -40,7 +37,7 @@
   }
 
   test_class_prefix_deferred() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
     await _assertNeverConst(r'''
@@ -182,7 +179,7 @@
 }
 
 @reflectiveTest
-class PotentiallyConstantTest extends DriverResolutionTest {
+class PotentiallyConstantTest extends PubPackageResolutionTest {
   test_adjacentStrings() async {
     await _assertConst(r'''
 var x = 'a' 'b';
@@ -491,7 +488,7 @@
   }
 
   test_prefixedIdentifier_importPrefix_deferred() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const a = 0;
 ''');
     await _assertNotConst(r'''
@@ -501,7 +498,7 @@
   }
 
   test_prefixedIdentifier_importPrefix_function() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 void f() {}
 ''');
     await _assertConst(r'''
@@ -511,7 +508,7 @@
   }
 
   test_prefixedIdentifier_importPrefix_topVar() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const a = 0;
 ''');
     await _assertConst(r'''
@@ -654,7 +651,7 @@
   }
 
   test_propertyAccess_staticField_withPrefix_const() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static const a = 0;
 }
@@ -666,7 +663,7 @@
   }
 
   test_propertyAccess_staticField_withPrefix_deferred() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static const a = 0;
 }
@@ -678,7 +675,7 @@
   }
 
   test_propertyAccess_staticField_withPrefix_final() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static final a = 0;
 }
@@ -700,7 +697,7 @@
   }
 
   test_propertyAccess_target_variable() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   final a = 0;
   const A();
@@ -969,14 +966,3 @@
 ''', () => _xInitializer());
   }
 }
-
-mixin WithNullSafetyMixin on DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-}
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index e4d0ac4..3b0915a 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -19,7 +19,7 @@
 
 import '../../../generated/elements_types_mixin.dart';
 import '../../../generated/test_analysis_context.dart';
-import '../resolution/driver_resolution.dart';
+import '../resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -838,9 +838,9 @@
 }
 
 @reflectiveTest
-class ElementAnnotationImplTest extends DriverResolutionTest {
+class ElementAnnotationImplTest extends PubPackageResolutionTest {
   test_computeConstantValue() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   final String f;
   const A(this.f);
@@ -1039,7 +1039,7 @@
 }
 
 @reflectiveTest
-class FieldElementImplTest extends DriverResolutionTest {
+class FieldElementImplTest extends PubPackageResolutionTest {
   test_isEnumConstant() async {
     await resolveTestCode(r'''
 enum B {B1, B2, B3}
@@ -1282,6 +1282,23 @@
 
 @reflectiveTest
 class InterfaceTypeImplTest extends AbstractTypeTest {
+  void test_allSupertypes() {
+    void check(InterfaceType type, List<String> expected) {
+      var actual = type.allSupertypes.map((e) {
+        return e.getDisplayString(
+          withNullability: true,
+        );
+      }).toList()
+        ..sort();
+      expect(actual, expected);
+    }
+
+    check(objectNone, []);
+    check(numNone, ['Comparable<num>', 'Object']);
+    check(intNone, ['Comparable<num>', 'Object', 'num']);
+    check(listNone(intQuestion), ['Iterable<int?>', 'Object']);
+  }
+
   test_asInstanceOf_explicitGeneric() {
     // class A<E> {}
     // class B implements A<C> {}
@@ -2196,9 +2213,9 @@
 }
 
 @reflectiveTest
-class TopLevelVariableElementImplTest extends DriverResolutionTest {
+class TopLevelVariableElementImplTest extends PubPackageResolutionTest {
   test_computeConstantValue() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const int C = 42;
 ''');
     await resolveTestCode(r'''
@@ -2219,6 +2236,57 @@
 
 @reflectiveTest
 class TypeParameterTypeImplTest extends AbstractTypeTest {
+  void test_asInstanceOf_hasBound_element() {
+    var T = typeParameter('T', bound: listNone(intNone));
+    _assert_asInstanceOf(
+      typeParameterTypeNone(T),
+      typeProvider.iterableElement,
+      'Iterable<int>',
+    );
+  }
+
+  void test_asInstanceOf_hasBound_element_noMatch() {
+    var T = typeParameter('T', bound: numNone);
+    _assert_asInstanceOf(
+      typeParameterTypeNone(T),
+      typeProvider.iterableElement,
+      null,
+    );
+  }
+
+  void test_asInstanceOf_hasBound_promoted() {
+    var T = typeParameter('T');
+    _assert_asInstanceOf(
+      typeParameterTypeNone(
+        T,
+        promotedBound: listNone(intNone),
+      ),
+      typeProvider.iterableElement,
+      'Iterable<int>',
+    );
+  }
+
+  void test_asInstanceOf_hasBound_promoted_noMatch() {
+    var T = typeParameter('T');
+    _assert_asInstanceOf(
+      typeParameterTypeNone(
+        T,
+        promotedBound: numNone,
+      ),
+      typeProvider.iterableElement,
+      null,
+    );
+  }
+
+  void test_asInstanceOf_noBound() {
+    var T = typeParameter('T');
+    _assert_asInstanceOf(
+      typeParameterTypeNone(T),
+      typeProvider.iterableElement,
+      null,
+    );
+  }
+
   void test_creation() {
     expect(typeParameterTypeStar(TypeParameterElementImpl('E', -1)), isNotNull);
   }
@@ -2240,7 +2308,7 @@
   void test_resolveToBound_bound_nullableInner() {
     ClassElementImpl classS = class_(name: 'A');
     TypeParameterElementImpl element = TypeParameterElementImpl('E', -1);
-    element.bound = (interfaceTypeQuestion(classS));
+    element.bound = interfaceTypeQuestion(classS);
     TypeParameterTypeImpl type = typeParameterTypeStar(element);
     expect(type.resolveToBound(null), same(element.bound));
   }
@@ -2337,6 +2405,18 @@
     expect(type.substitute2(<DartType>[argument], <DartType>[parameter]),
         same(type));
   }
+
+  void _assert_asInstanceOf(
+    DartType type,
+    ClassElement element,
+    String expected,
+  ) {
+    var result = (type as TypeImpl).asInstanceOf(element);
+    expect(
+      result?.getDisplayString(withNullability: true),
+      expected,
+    );
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer/test/src/dart/element/future_or_base_test.dart b/pkg/analyzer/test/src/dart/element/future_or_base_test.dart
new file mode 100644
index 0000000..c70b702
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/element/future_or_base_test.dart
@@ -0,0 +1,66 @@
+// 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/dart/element/type.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../../generated/type_system_test.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FutureOrBaseTest);
+  });
+}
+
+@reflectiveTest
+class FutureOrBaseTest extends AbstractTypeSystemNullSafetyTest {
+  test_dynamic() {
+    _check(dynamicNone, 'dynamic');
+  }
+
+  test_futureOr() {
+    void check(DartType S, String expected) {
+      _check(futureOrNone(S), expected);
+    }
+
+    check(intNone, 'int');
+    check(intQuestion, 'int?');
+    check(intStar, 'int*');
+
+    check(dynamicNone, 'dynamic');
+    check(voidNone, 'void');
+
+    check(neverNone, 'Never');
+    check(neverQuestion, 'Never?');
+    check(neverStar, 'Never*');
+
+    check(objectNone, 'Object');
+    check(objectQuestion, 'Object?');
+    check(objectStar, 'Object*');
+  }
+
+  test_other() {
+    _check(intNone, 'int');
+    _check(intQuestion, 'int?');
+    _check(intStar, 'int*');
+
+    _check(objectNone, 'Object');
+    _check(objectQuestion, 'Object?');
+    _check(objectStar, 'Object*');
+  }
+
+  /// futureValueType(`void`) = `void`.
+  test_void() {
+    _check(voidNone, 'void');
+  }
+
+  void _check(DartType T, String expected) {
+    var result = typeSystem.futureOrBase(T);
+    expect(
+      result.getDisplayString(withNullability: true),
+      expected,
+    );
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/element/generic_inferrer_test.dart b/pkg/analyzer/test/src/dart/element/generic_inferrer_test.dart
index 8427087..bc84dbd 100644
--- a/pkg/analyzer/test/src/dart/element/generic_inferrer_test.dart
+++ b/pkg/analyzer/test/src/dart/element/generic_inferrer_test.dart
@@ -616,7 +616,7 @@
 
     if (expectError) {
       expect(listener.errors.map((e) => e.errorCode).toList(),
-          [StrongModeCode.COULD_NOT_INFER],
+          [CompileTimeErrorCode.COULD_NOT_INFER],
           reason: 'expected exactly 1 could not infer error.');
     } else {
       expect(listener.errors, isEmpty, reason: 'did not expect any errors.');
diff --git a/pkg/analyzer/test/src/dart/element/inheritance_manager3_test.dart b/pkg/analyzer/test/src/dart/element/inheritance_manager3_test.dart
index ab566fc..562224c 100644
--- a/pkg/analyzer/test/src/dart/element/inheritance_manager3_test.dart
+++ b/pkg/analyzer/test/src/dart/element/inheritance_manager3_test.dart
@@ -2,21 +2,19 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/null_safety_understanding_flag.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:meta/meta.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../resolution/driver_resolution.dart';
+import '../resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(InheritanceManager3Test);
-    defineReflectiveTests(InheritanceManager3WithNnbdTest);
+    defineReflectiveTests(InheritanceManager3WithNullSafetyTest);
   });
 }
 
@@ -1043,17 +1041,10 @@
 }
 
 @reflectiveTest
-class InheritanceManager3WithNnbdTest extends _InheritanceManager3Base {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class InheritanceManager3WithNullSafetyTest extends _InheritanceManager3Base
+    with WithNullSafetyMixin {
   test_getInheritedMap_topMerge_method() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.6
 class A {
   void foo({int a}) {}
@@ -1103,7 +1094,7 @@
   }
 
   test_getMember_optIn_inheritsOptIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo(int a, int? b) => 0;
 }
@@ -1127,7 +1118,7 @@
   }
 
   test_getMember_optIn_inheritsOptOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.6
 class A {
   int foo(int a, int b) => 0;
@@ -1212,7 +1203,7 @@
   }
 
   test_getMember_optOut_inheritsOptIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo(int a, int? b) => 0;
 }
@@ -1238,7 +1229,7 @@
   }
 
   test_getMember_optOut_mixesOptIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo(int a, int? b) => 0;
 }
@@ -1263,12 +1254,12 @@
   }
 
   test_getMember_optOut_passOptIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo(int a, int? b) => 0;
 }
 ''');
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart = 2.6
 import 'a.dart';
 class B extends A {
@@ -1292,7 +1283,7 @@
   }
 }
 
-class _InheritanceManager3Base extends DriverResolutionTest {
+class _InheritanceManager3Base extends PubPackageResolutionTest {
   InheritanceManager3 manager;
 
   @override
diff --git a/pkg/analyzer/test/src/dart/element/least_upper_bound_helper_test.dart b/pkg/analyzer/test/src/dart/element/least_upper_bound_helper_test.dart
index 3e95b6c..30418ae 100644
--- a/pkg/analyzer/test/src/dart/element/least_upper_bound_helper_test.dart
+++ b/pkg/analyzer/test/src/dart/element/least_upper_bound_helper_test.dart
@@ -11,7 +11,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/elements_types_mixin.dart';
+import '../../../generated/type_system_test.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -20,7 +20,7 @@
 }
 
 @reflectiveTest
-class InterfaceLeastUpperBoundHelperTest with ElementsTypesMixin {
+class InterfaceLeastUpperBoundHelperTest extends AbstractTypeSystemTest {
   @override
   final TestTypeProvider typeProvider = TestTypeProvider();
 
@@ -535,6 +535,7 @@
   }
 
   Set<InstantiatedClass> _superInterfaces(InstantiatedClass type) {
-    return InterfaceLeastUpperBoundHelper.computeSuperinterfaceSet(type);
+    var helper = InterfaceLeastUpperBoundHelper(typeSystem);
+    return helper.computeSuperinterfaceSet(type);
   }
 }
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 a687593..9309834 100644
--- a/pkg/analyzer/test/src/dart/element/normalize_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/normalize_type_test.dart
@@ -7,9 +7,9 @@
 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_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:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -508,7 +508,7 @@
     var typeStr = '';
 
     var typeParameterCollector = _TypeParameterCollector();
-    DartTypeVisitor.visit(type, typeParameterCollector);
+    type.accept(typeParameterCollector);
     for (var typeParameter in typeParameterCollector.typeParameters) {
       typeStr += ', $typeParameter';
     }
@@ -522,7 +522,7 @@
   }
 }
 
-class _TypeParameterCollector extends DartTypeVisitor<void> {
+class _TypeParameterCollector extends TypeVisitor<void> {
   final Set<String> typeParameters = {};
 
   /// We don't need to print bounds for these type parameters, because
@@ -531,12 +531,7 @@
   final Set<TypeParameterElement> functionTypeParameters = {};
 
   @override
-  void defaultDartType(DartType type) {
-    throw UnimplementedError('(${type.runtimeType}) $type');
-  }
-
-  @override
-  void visitDynamicType(DynamicTypeImpl type) {}
+  void visitDynamicType(DynamicType type) {}
 
   @override
   void visitFunctionType(FunctionType type) {
@@ -544,24 +539,24 @@
     for (var typeParameter in type.typeFormals) {
       var bound = typeParameter.bound;
       if (bound != null) {
-        DartTypeVisitor.visit(bound, this);
+        bound.accept(this);
       }
     }
     for (var parameter in type.parameters) {
-      DartTypeVisitor.visit(parameter.type, this);
+      parameter.type.accept(this);
     }
-    DartTypeVisitor.visit(type.returnType, this);
+    type.returnType.accept(this);
   }
 
   @override
   void visitInterfaceType(InterfaceType type) {
     for (var typeArgument in type.typeArguments) {
-      DartTypeVisitor.visit(typeArgument, this);
+      typeArgument.accept(this);
     }
   }
 
   @override
-  void visitNeverType(NeverTypeImpl type) {}
+  void visitNeverType(NeverType type) {}
 
   @override
   void visitTypeParameterType(TypeParameterType type) {
diff --git a/pkg/analyzer/test/src/dart/element/replace_top_bottom_test.dart b/pkg/analyzer/test/src/dart/element/replace_top_bottom_test.dart
new file mode 100644
index 0000000..e3a64cf
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/element/replace_top_bottom_test.dart
@@ -0,0 +1,135 @@
+// 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/dart/element/null_safety_understanding_flag.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../../generated/type_system_test.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceTopBottomLegacyTest);
+    defineReflectiveTests(ReplaceTopBottomNullSafetyTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceTopBottomLegacyTest extends AbstractTypeSystemTest {
+  test_contravariant_bottom() {
+    // Not contravariant.
+    _check(nullStar, 'Null*');
+
+    _check(
+      functionTypeStar(returnType: intStar, parameters: [
+        requiredParameter(type: nullStar),
+      ]),
+      'int* Function(dynamic)*',
+    );
+  }
+
+  test_covariant_top() {
+    _check(objectStar, 'Null*');
+    _check(dynamicNone, 'Null*');
+    _check(voidNone, 'Null*');
+
+    _check(futureOrStar(objectStar), 'Null*');
+    _check(futureOrStar(dynamicNone), 'Null*');
+    _check(futureOrStar(voidNone), 'Null*');
+    _check(futureOrStar(futureOrStar(voidNone)), 'Null*');
+
+    _check(
+      functionTypeStar(returnType: intStar, parameters: [
+        requiredParameter(
+          type: functionTypeStar(returnType: intStar, parameters: [
+            requiredParameter(type: objectStar),
+          ]),
+        ),
+      ]),
+      'int* Function(int* Function(Null*)*)*',
+      typeStr: 'int* Function(int* Function(Object*)*)*',
+    );
+
+    _check(listStar(intStar), 'List<int*>*');
+  }
+
+  void _check(DartType type, String expectedStr, {String typeStr}) {
+    NullSafetyUnderstandingFlag.enableNullSafetyTypes(() {
+      if (typeStr != null) {
+        expect(_typeString(type), typeStr);
+      }
+
+      var result = typeSystem.replaceTopAndBottom(type);
+      var resultStr = _typeString(result);
+      expect(resultStr, expectedStr);
+    });
+  }
+
+  String _typeString(TypeImpl type) {
+    return type.getDisplayString(withNullability: true);
+  }
+}
+
+@reflectiveTest
+class ReplaceTopBottomNullSafetyTest extends AbstractTypeSystemNullSafetyTest {
+  test_contravariant_bottom() {
+    // Not contravariant.
+    _check(neverNone, 'Never');
+
+    _check(
+      functionTypeNone(returnType: intNone, parameters: [
+        requiredParameter(type: neverNone),
+      ]),
+      'int Function(Object?)',
+    );
+  }
+
+  test_covariant_top() {
+    _check(objectQuestion, 'Never');
+    _check(objectStar, 'Never');
+    _check(dynamicNone, 'Never');
+    _check(voidNone, 'Never');
+
+    _check(futureOrNone(objectQuestion), 'Never');
+    _check(futureOrNone(objectStar), 'Never');
+    _check(futureOrNone(dynamicNone), 'Never');
+    _check(futureOrNone(voidNone), 'Never');
+    _check(futureOrNone(futureOrNone(voidNone)), 'Never');
+
+    _check(
+      functionTypeNone(returnType: intNone, parameters: [
+        requiredParameter(
+          type: functionTypeNone(returnType: intNone, parameters: [
+            requiredParameter(type: objectQuestion),
+          ]),
+        ),
+      ]),
+      'int Function(int Function(Never))',
+      typeStr: 'int Function(int Function(Object?))',
+    );
+
+    _check(listNone(intNone), 'List<int>');
+    _check(listNone(intQuestion), 'List<int?>');
+    _check(listQuestion(intNone), 'List<int>?');
+    _check(listQuestion(intQuestion), 'List<int?>?');
+  }
+
+  void _check(DartType type, String expectedStr, {String typeStr}) {
+    NullSafetyUnderstandingFlag.enableNullSafetyTypes(() {
+      if (typeStr != null) {
+        expect(_typeString(type), typeStr);
+      }
+
+      var result = typeSystem.replaceTopAndBottom(type);
+      var resultStr = _typeString(result);
+      expect(resultStr, expectedStr);
+    });
+  }
+
+  String _typeString(TypeImpl type) {
+    return type.getDisplayString(withNullability: true);
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/element/subtype_test.dart b/pkg/analyzer/test/src/dart/element/subtype_test.dart
index 1585cec..452060b 100644
--- a/pkg/analyzer/test/src/dart/element/subtype_test.dart
+++ b/pkg/analyzer/test/src/dart/element/subtype_test.dart
@@ -6,8 +6,8 @@
 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_visitor.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/dart/element/type_visitor.dart';
 import 'package:analyzer/src/dart/resolver/variance.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -5792,7 +5792,7 @@
     var typeStr = '';
 
     var typeParameterCollector = _TypeParameterCollector();
-    DartTypeVisitor.visit(type, typeParameterCollector);
+    type.accept(typeParameterCollector);
     for (var typeParameter in typeParameterCollector.typeParameters) {
       typeStr += ', $typeParameter';
     }
@@ -5975,7 +5975,7 @@
 
 class _SubtypingTestBase extends AbstractTypeSystemNullSafetyTest {}
 
-class _TypeParameterCollector extends DartTypeVisitor<void> {
+class _TypeParameterCollector extends TypeVisitor<void> {
   final Set<String> typeParameters = {};
 
   /// We don't need to print bounds for these type parameters, because
@@ -5984,12 +5984,7 @@
   final Set<TypeParameterElement> functionTypeParameters = {};
 
   @override
-  void defaultDartType(DartType type) {
-    throw UnimplementedError('(${type.runtimeType}) $type');
-  }
-
-  @override
-  void visitDynamicType(DynamicTypeImpl type) {}
+  void visitDynamicType(DynamicType type) {}
 
   @override
   void visitFunctionType(FunctionType type) {
@@ -5997,24 +5992,24 @@
     for (var typeParameter in type.typeFormals) {
       var bound = typeParameter.bound;
       if (bound != null) {
-        DartTypeVisitor.visit(bound, this);
+        bound.accept(this);
       }
     }
     for (var parameter in type.parameters) {
-      DartTypeVisitor.visit(parameter.type, this);
+      parameter.type.accept(this);
     }
-    DartTypeVisitor.visit(type.returnType, this);
+    type.returnType.accept(this);
   }
 
   @override
   void visitInterfaceType(InterfaceType type) {
     for (var typeArgument in type.typeArguments) {
-      DartTypeVisitor.visit(typeArgument, this);
+      typeArgument.accept(this);
     }
   }
 
   @override
-  void visitNeverType(NeverTypeImpl type) {}
+  void visitNeverType(NeverType type) {}
 
   @override
   void visitTypeParameterType(TypeParameterType type) {
diff --git a/pkg/analyzer/test/src/dart/element/test_all.dart b/pkg/analyzer/test/src/dart/element/test_all.dart
index e08cff7..f59885f 100644
--- a/pkg/analyzer/test/src/dart/element/test_all.dart
+++ b/pkg/analyzer/test/src/dart/element/test_all.dart
@@ -9,6 +9,7 @@
 import 'factor_type_test.dart' as factor_type;
 import 'flatten_type_test.dart' as flatten_type;
 import 'function_type_test.dart' as function_type;
+import 'future_or_base_test.dart' as future_or_base;
 import 'future_value_type_test.dart' as future_value_type;
 import 'generic_inferrer_test.dart' as generic_inferrer;
 import 'inheritance_manager3_test.dart' as inheritance_manager3;
@@ -16,6 +17,7 @@
 import 'normalize_type_test.dart' as normalize_type;
 import 'nullability_eliminator_test.dart' as nullability_eliminator;
 import 'nullable_test.dart' as nullable;
+import 'replace_top_bottom_test.dart' as replace_top_bottom;
 import 'runtime_type_equality_test.dart' as runtime_type_equality;
 import 'subtype_test.dart' as subtype;
 import 'top_merge_test.dart' as top_merge;
@@ -33,6 +35,7 @@
     factor_type.main();
     flatten_type.main();
     function_type.main();
+    future_or_base.main();
     future_value_type.main();
     generic_inferrer.main();
     inheritance_manager3.main();
@@ -40,6 +43,7 @@
     normalize_type.main();
     nullability_eliminator.main();
     nullable.main();
+    replace_top_bottom.main();
     runtime_type_equality.main();
     subtype.main();
     top_merge.main();
diff --git a/pkg/analyzer/test/src/dart/element/type_visitor_test.dart b/pkg/analyzer/test/src/dart/element/type_visitor_test.dart
index 7043e7f..2989a22 100644
--- a/pkg/analyzer/test/src/dart/element/type_visitor_test.dart
+++ b/pkg/analyzer/test/src/dart/element/type_visitor_test.dart
@@ -27,7 +27,7 @@
   }
 
   void test_callsDefaultBehavior() {
-    expect(DartTypeVisitor.visit(intNone, visitor), true);
+    expect(intNone.accept(visitor), true);
     visitor.assertVisitedType(intNone);
   }
 
@@ -43,7 +43,7 @@
         typeFormals: [T, K],
         parameters: [a, b, c, d],
         nullabilitySuffix: NullabilitySuffix.none);
-    expect(DartTypeVisitor.visit(type, visitor), true);
+    expect(type.accept(visitor), true);
     visitor.assertVisitedTypes([
       dynamicType,
       intNone,
@@ -62,7 +62,7 @@
         typeFormals: [],
         parameters: [a],
         nullabilitySuffix: NullabilitySuffix.none);
-    expect(DartTypeVisitor.visit(type, visitor), true);
+    expect(type.accept(visitor), true);
     visitor.assertVisitedType(intNone);
   }
 
@@ -72,7 +72,7 @@
         typeFormals: [],
         parameters: [],
         nullabilitySuffix: NullabilitySuffix.none);
-    expect(DartTypeVisitor.visit(type, visitor), true);
+    expect(type.accept(visitor), true);
     visitor.assertVisitedType(intNone);
   }
 
@@ -83,37 +83,37 @@
         typeFormals: [T],
         parameters: [],
         nullabilitySuffix: NullabilitySuffix.none);
-    expect(DartTypeVisitor.visit(type, visitor), true);
+    expect(type.accept(visitor), true);
     visitor.assertVisitedTypes([dynamicType, intNone]);
   }
 
   void test_functionType_typeFormal_noBound() {
-    final T = this.typeParameter('T');
+    final T = typeParameter('T');
     final type = functionType(
         returnType: dynamicType,
         typeFormals: [T],
         parameters: [],
         nullabilitySuffix: NullabilitySuffix.none);
-    expect(DartTypeVisitor.visit(type, visitor), true);
+    expect(type.accept(visitor), true);
     visitor.assertVisitedType(dynamicType);
   }
 
   void test_interfaceType_typeParameter() {
     final type = typeProvider.listType2(intNone);
-    expect(DartTypeVisitor.visit(type, visitor), true);
+    expect(type.accept(visitor), true);
     visitor.assertVisitedType(intNone);
   }
 
   void test_interfaceType_typeParameters() {
     final type = typeProvider.mapType2(intNone, stringNone);
-    expect(DartTypeVisitor.visit(type, visitor), true);
+    expect(type.accept(visitor), true);
     visitor.assertVisitedTypes([intNone, stringNone]);
   }
 
   void test_interfaceType_typeParameters_nested() {
     final innerList = typeProvider.listType2(intNone);
     final outerList = typeProvider.listType2(innerList);
-    expect(DartTypeVisitor.visit(outerList, visitor), true);
+    expect(outerList.accept(visitor), true);
     visitor.assertVisitedType(intNone);
   }
 
@@ -130,7 +130,7 @@
         parameters: [a, b, c, d],
         nullabilitySuffix: NullabilitySuffix.none);
     visitor.stopOnType = dynamicType;
-    expect(DartTypeVisitor.visit(type, visitor), false);
+    expect(type.accept(visitor), false);
     visitor.assertNotVisitedTypes(
         [intNone, stringNone, numNone, doubleNone, voidNone, objectNone]);
   }
@@ -148,7 +148,7 @@
         parameters: [a, b, c, d],
         nullabilitySuffix: NullabilitySuffix.none);
     visitor.stopOnType = intNone;
-    expect(DartTypeVisitor.visit(type, visitor), false);
+    expect(type.accept(visitor), false);
     visitor.assertNotVisitedTypes([stringNone, voidNone, objectNone]);
   }
 
@@ -156,7 +156,7 @@
     final innerType = typeProvider.mapType2(intNone, stringNone);
     final outerList = typeProvider.listType2(innerType);
     visitor.stopOnType = intNone;
-    expect(DartTypeVisitor.visit(outerList, visitor), false);
+    expect(outerList.accept(visitor), false);
     visitor.assertNotVisitedType(stringNone);
   }
 
@@ -165,14 +165,14 @@
     final innerTypeSkipped = typeProvider.listType2(stringNone);
     final outerType = typeProvider.mapType2(innerTypeStop, innerTypeSkipped);
     visitor.stopOnType = intNone;
-    expect(DartTypeVisitor.visit(outerType, visitor), false);
+    expect(outerType.accept(visitor), false);
     visitor.assertNotVisitedType(stringNone);
   }
 
   void test_stopVisiting_typeParameters() {
     final type = typeProvider.mapType2(intNone, stringNone);
     visitor.stopOnType = intNone;
-    expect(DartTypeVisitor.visit(type, visitor), false);
+    expect(type.accept(visitor), false);
     visitor.assertVisitedType(intNone);
     visitor.assertNotVisitedType(stringNone);
   }
@@ -197,7 +197,7 @@
       types.forEach(assertVisitedType);
 
   @override
-  bool defaultDartType(DartType type) {
+  bool visitDartType(DartType type) {
     expect(type, isNotNull);
     visitedTypes.add(type);
     return type != stopOnType;
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 072e3ef..6454cda 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
@@ -4,12 +4,15 @@
 
 import 'package:analyzer/dart/analysis/features.dart';
 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_visitor.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/dart/resolver/variance.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -19,6 +22,8 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(BoundsHelperPredicatesTest);
     defineReflectiveTests(LowerBoundTest);
+    defineReflectiveTests(UpperBound_FunctionTypes_Test);
+    defineReflectiveTests(UpperBound_InterfaceTypes_Test);
     defineReflectiveTests(UpperBoundTest);
   });
 }
@@ -113,7 +118,7 @@
     // BOTTOM(Never) is true
     isBottom(neverNone);
     isNotBottom(neverQuestion);
-    isNotBottom(neverStar);
+    isBottom(neverStar);
 
     // BOTTOM(X&T) is true iff BOTTOM(T)
     T = typeParameter('T', bound: objectQuestion);
@@ -527,8 +532,8 @@
 class LowerBoundTest extends _BoundsTestBase {
   test_bottom_any() {
     void check(DartType T1, DartType T2) {
-      expect(typeSystem.isBottom(T1), isTrue, reason: _typeString(T1));
-      expect(typeSystem.isBottom(T2), isFalse, reason: _typeString(T2));
+      _assertBottom(T1);
+      _assertNotBottom(T2);
       _checkGreatestLowerBound(T1, T2, T1);
     }
 
@@ -570,8 +575,8 @@
 
   test_bottom_bottom() {
     void check(DartType T1, DartType T2) {
-      expect(typeSystem.isBottom(T1), isTrue, reason: _typeString(T1));
-      expect(typeSystem.isBottom(T2), isTrue, reason: _typeString(T2));
+      _assertBottom(T1);
+      _assertBottom(T2);
       _checkGreatestLowerBound(T1, T2, T1);
     }
 
@@ -1096,11 +1101,9 @@
 
   test_null_any() {
     void check(DartType T2, DartType expected) {
-      var T2_str = _typeString(T2);
-
-      expect(typeSystem.isNull(T2), isFalse, reason: 'isNull: $T2_str');
-      expect(typeSystem.isTop(T2), isFalse, reason: 'isTop: $T2_str');
-      expect(typeSystem.isBottom(T2), isFalse, reason: 'isBottom: $T2_str');
+      _assertNotBottom(T2);
+      _assertNotNull(T2);
+      _assertNotTop(T2);
 
       _checkGreatestLowerBound(nullNone, T2, expected);
     }
@@ -1142,14 +1145,11 @@
 
   test_null_null() {
     void check(DartType T1, DartType T2) {
-      var T1_str = _typeString(T1);
-      var T2_str = _typeString(T2);
+      _assertNull(T1);
+      _assertNull(T2);
 
-      expect(typeSystem.isNull(T1), isTrue, reason: 'isNull: $T1_str');
-      expect(typeSystem.isNull(T2), isTrue, reason: 'isNull: $T2_str');
-
-      expect(typeSystem.isBottom(T1), isFalse, reason: 'isBottom: $T1_str');
-      expect(typeSystem.isBottom(T2), isFalse, reason: 'isBottom: $T2_str');
+      _assertNotBottom(T1);
+      _assertNotBottom(T2);
 
       _checkGreatestLowerBound(T1, T2, T1);
     }
@@ -1160,8 +1160,7 @@
 
   test_object_any() {
     void check(DartType T2, DartType expected) {
-      var T2_str = _typeString(T2);
-      expect(typeSystem.isObject(T2), isFalse, reason: 'isObject: $T2_str');
+      _assertNotObject(T2);
 
       _checkGreatestLowerBound(objectNone, T2, expected);
     }
@@ -1215,11 +1214,8 @@
 
   test_object_object() {
     void check(DartType T1, DartType T2) {
-      var T1_str = _typeString(T1);
-      var T2_str = _typeString(T2);
-
-      expect(typeSystem.isObject(T1), isTrue, reason: 'isObject: $T1_str');
-      expect(typeSystem.isObject(T2), isTrue, reason: 'isObject: $T2_str');
+      _assertObject(T1);
+      _assertObject(T2);
 
       _checkGreatestLowerBound(T1, T2, T1);
     }
@@ -1308,8 +1304,8 @@
 
   test_top_any() {
     void check(DartType T1, DartType T2) {
-      expect(typeSystem.isTop(T1), isTrue, reason: _typeString(T1));
-      expect(typeSystem.isTop(T2), isFalse, reason: _typeString(T2));
+      _assertTop(T1);
+      _assertNotTop(T2);
       _checkGreatestLowerBound(T1, T2, T2);
     }
 
@@ -1356,8 +1352,8 @@
 
   test_top_top() {
     void check(DartType T1, DartType T2) {
-      expect(typeSystem.isTop(T1), isTrue, reason: _typeString(T1));
-      expect(typeSystem.isTop(T2), isTrue, reason: _typeString(T2));
+      _assertTop(T1);
+      _assertTop(T2);
       _checkGreatestLowerBound(T1, T2, T2);
     }
 
@@ -1454,74 +1450,182 @@
 }
 
 @reflectiveTest
-class UpperBoundTest extends _BoundsTestBase {
-  test_bottom_any() {
-    void check(DartType T1, DartType T2) {
-      expect(typeSystem.isBottom(T1), isTrue, reason: _typeString(T1));
-      expect(typeSystem.isBottom(T2), isFalse, reason: _typeString(T2));
-      _checkLeastUpperBound(T1, T2, T2);
-    }
-
-    check(neverNone, objectNone);
-    check(neverNone, objectStar);
-    check(neverNone, objectQuestion);
-
-    check(neverNone, intNone);
-    check(neverNone, intQuestion);
-    check(neverNone, intStar);
-
-    check(neverNone, listNone(intNone));
-    check(neverNone, listQuestion(intNone));
-    check(neverNone, listStar(intNone));
-
-    check(neverNone, futureOrNone(intNone));
-    check(neverNone, futureOrQuestion(intNone));
-    check(neverNone, futureOrStar(intNone));
-
-    {
-      var T = typeParameterTypeNone(
-        typeParameter('T', bound: neverNone),
-      );
-      check(T, intNone);
-      check(T, intQuestion);
-      check(T, intStar);
-    }
-
-    {
-      var T = promotedTypeParameterTypeNone(
-        typeParameter('T', bound: objectQuestion),
-        neverNone,
-      );
-      check(T, intNone);
-      check(T, intQuestion);
-      check(T, intStar);
-    }
-  }
-
-  test_bottom_bottom() {
-    void check(DartType T1, DartType T2) {
-      expect(typeSystem.isBottom(T1), isTrue, reason: _typeString(T1));
-      expect(typeSystem.isBottom(T2), isTrue, reason: _typeString(T2));
-      _checkLeastUpperBound(T1, T2, T2);
-    }
-
-    check(
-      neverNone,
-      typeParameterTypeNone(
-        typeParameter('T', bound: neverNone),
-      ),
+class UpperBound_FunctionTypes_Test extends _BoundsTestBase {
+  void test_nested2_upParameterType() {
+    var T1 = functionTypeNone(
+      parameters: [
+        requiredParameter(
+          type: functionTypeNone(
+            parameters: [
+              requiredParameter(type: stringNone),
+              requiredParameter(type: intNone),
+              requiredParameter(type: intNone),
+            ],
+            returnType: voidNone,
+          ),
+        ),
+      ],
+      returnType: voidNone,
+    );
+    expect(
+      _typeString(T1),
+      'void Function(void Function(String, int, int))',
     );
 
-    check(
-      neverNone,
-      promotedTypeParameterTypeNone(
-        typeParameter('T', bound: objectQuestion),
-        neverNone,
-      ),
+    var T2 = functionTypeNone(
+      parameters: [
+        requiredParameter(
+          type: functionTypeNone(
+            parameters: [
+              requiredParameter(type: intNone),
+              requiredParameter(type: doubleNone),
+              requiredParameter(type: numNone),
+            ],
+            returnType: voidNone,
+          ),
+        ),
+      ],
+      returnType: voidNone,
     );
+    expect(
+      _typeString(T2),
+      'void Function(void Function(int, double, num))',
+    );
+
+    var expected = functionTypeNone(
+      parameters: [
+        requiredParameter(
+          type: functionTypeNone(
+            parameters: [
+              requiredParameter(type: objectNone),
+              requiredParameter(type: numNone),
+              requiredParameter(type: numNone),
+            ],
+            returnType: voidNone,
+          ),
+        ),
+      ],
+      returnType: voidNone,
+    );
+    expect(
+      _typeString(expected),
+      'void Function(void Function(Object, num, num))',
+    );
+
+    _checkLeastUpperBound(T1, T2, expected);
   }
 
-  test_functionType2_parameters_optionalNamed() {
+  void test_nested3_downParameterTypes() {
+    var T1 = functionTypeNone(
+      parameters: [
+        requiredParameter(
+          type: functionTypeNone(
+            parameters: [
+              requiredParameter(
+                type: functionTypeNone(
+                  parameters: [
+                    requiredParameter(type: stringNone),
+                    requiredParameter(type: intNone),
+                    requiredParameter(type: intNone)
+                  ],
+                  returnType: voidNone,
+                ),
+              ),
+            ],
+            returnType: voidNone,
+          ),
+        ),
+      ],
+      returnType: voidNone,
+    );
+    expect(
+      _typeString(T1),
+      'void Function(void Function(void Function(String, int, int)))',
+    );
+
+    var T2 = functionTypeNone(
+      parameters: [
+        requiredParameter(
+          type: functionTypeNone(
+            parameters: [
+              requiredParameter(
+                type: functionTypeNone(
+                  parameters: [
+                    requiredParameter(type: intNone),
+                    requiredParameter(type: doubleNone),
+                    requiredParameter(type: numNone)
+                  ],
+                  returnType: voidNone,
+                ),
+              ),
+            ],
+            returnType: voidNone,
+          ),
+        ),
+      ],
+      returnType: voidNone,
+    );
+    expect(
+      _typeString(T2),
+      'void Function(void Function(void Function(int, double, num)))',
+    );
+
+    var expected = functionTypeNone(
+      parameters: [
+        requiredParameter(
+          type: functionTypeNone(
+            parameters: [
+              requiredParameter(
+                type: functionTypeNone(
+                  parameters: [
+                    requiredParameter(type: neverNone),
+                    requiredParameter(type: neverNone),
+                    requiredParameter(type: intNone)
+                  ],
+                  returnType: voidNone,
+                ),
+              ),
+            ],
+            returnType: voidNone,
+          ),
+        ),
+      ],
+      returnType: voidNone,
+    );
+    expect(
+      _typeString(expected),
+      'void Function(void Function(void Function(Never, Never, int)))',
+    );
+
+    _checkLeastUpperBound(T1, T2, expected);
+  }
+
+  void test_parameters_fuzzyArrows() {
+    var T1 = functionTypeNone(
+      parameters: [
+        requiredParameter(type: dynamicType),
+      ],
+      returnType: voidNone,
+    );
+
+    var T2 = functionTypeNone(
+      parameters: [
+        requiredParameter(type: intNone),
+      ],
+      returnType: voidNone,
+    );
+
+    var expected = functionTypeNone(
+      parameters: [
+        requiredParameter(type: intNone),
+      ],
+      returnType: voidNone,
+    );
+
+    _checkLeastUpperBound(T1, T2, expected);
+  }
+
+  test_parameters_optionalNamed() {
     FunctionType build(Map<String, DartType> namedTypes) {
       return functionTypeNone(
         returnType: voidNone,
@@ -1548,7 +1652,7 @@
     check({'a': intNone, 'b': doubleNone}, {'a': intNone}, {'a': intNone});
   }
 
-  test_functionType2_parameters_optionalPositional() {
+  test_parameters_optionalPositional() {
     FunctionType build(List<DartType> positionalTypes) {
       return functionTypeNone(
         returnType: voidNone,
@@ -1583,7 +1687,7 @@
     );
   }
 
-  test_functionType2_parameters_requiredNamed() {
+  test_parameters_requiredNamed() {
     _checkLeastUpperBound(
       functionTypeNone(
         returnType: voidNone,
@@ -1697,7 +1801,7 @@
     );
   }
 
-  test_functionType2_parameters_requiredPositional() {
+  test_parameters_requiredPositional() {
     FunctionType build(List<DartType> requiredTypes) {
       return functionTypeNone(
         returnType: voidNone,
@@ -1731,7 +1835,28 @@
     );
   }
 
-  test_functionType2_returnType() {
+  void test_parameters_requiredPositional_differentArity() {
+    var T1 = functionTypeNone(
+      parameters: [
+        requiredParameter(type: intNone),
+        requiredParameter(type: intNone),
+      ],
+      returnType: voidNone,
+    );
+
+    var T2 = functionTypeNone(
+      parameters: [
+        requiredParameter(type: intNone),
+        requiredParameter(type: intNone),
+        requiredParameter(type: intNone),
+      ],
+      returnType: voidNone,
+    );
+
+    _checkLeastUpperBound(T1, T2, typeProvider.functionType);
+  }
+
+  test_returnType() {
     void check(DartType T1_ret, DartType T2_ret, DartType expected_ret) {
       _checkLeastUpperBound(
         functionTypeNone(returnType: T1_ret),
@@ -1752,7 +1877,75 @@
     check(intNone, neverNone, intNone);
   }
 
-  test_functionType2_typeParameters() {
+  void test_sameType_withNamed() {
+    var T1 = functionTypeNone(
+      parameters: [
+        requiredParameter(type: stringNone),
+        requiredParameter(type: intNone),
+        requiredParameter(type: numNone),
+        namedParameter(name: 'n', type: numNone),
+      ],
+      returnType: intNone,
+    );
+
+    var T2 = functionTypeNone(
+      parameters: [
+        requiredParameter(type: stringNone),
+        requiredParameter(type: intNone),
+        requiredParameter(type: numNone),
+        namedParameter(name: 'n', type: numNone),
+      ],
+      returnType: intNone,
+    );
+
+    var expected = functionTypeNone(
+      parameters: [
+        requiredParameter(type: stringNone),
+        requiredParameter(type: intNone),
+        requiredParameter(type: numNone),
+        namedParameter(name: 'n', type: numNone),
+      ],
+      returnType: intNone,
+    );
+
+    _checkLeastUpperBound(T1, T2, expected);
+  }
+
+  void test_sameType_withOptional() {
+    var T1 = functionTypeNone(
+      parameters: [
+        requiredParameter(type: stringNone),
+        requiredParameter(type: intNone),
+        requiredParameter(type: numNone),
+        positionalParameter(type: doubleNone),
+      ],
+      returnType: intNone,
+    );
+
+    var T2 = functionTypeNone(
+      parameters: [
+        requiredParameter(type: stringNone),
+        requiredParameter(type: intNone),
+        requiredParameter(type: numNone),
+        positionalParameter(type: doubleNone),
+      ],
+      returnType: intNone,
+    );
+
+    var expected = functionTypeNone(
+      parameters: [
+        requiredParameter(type: stringNone),
+        requiredParameter(type: intNone),
+        requiredParameter(type: numNone),
+        positionalParameter(type: doubleNone),
+      ],
+      returnType: intNone,
+    );
+
+    _checkLeastUpperBound(T1, T2, expected);
+  }
+
+  test_typeParameters() {
     void check(FunctionType T1, FunctionType T2, DartType expected) {
       _assertNullabilityNone(T1);
       _assertNullabilityNone(T2);
@@ -1807,6 +2000,559 @@
       );
     }
   }
+}
+
+@reflectiveTest
+class UpperBound_InterfaceTypes_Test extends _BoundsTestBase {
+  test_directInterface() {
+    // class A
+    // class B implements A
+    // class C implements B
+
+    var A = class_(name: 'A');
+    var typeA = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', interfaces: [typeA]);
+    var typeB = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', interfaces: [typeB]);
+    var typeC = interfaceTypeNone(C);
+
+    _checkLeastUpperBound(typeB, typeC, typeB);
+  }
+
+  test_directInterface_legacy() {
+    typeSystem = analysisContext.typeSystemLegacy;
+
+    // (null safe) class A<T> {}
+    // (legacy)    class B implements A<int> {}
+    // (null safe) class C implements A<int> {}
+
+    var A = class_(
+      name: 'A',
+      typeParameters: [typeParameter('T')],
+    );
+
+    var B = class_(
+      name: 'B',
+      interfaces: [
+        interfaceTypeStar(A, typeArguments: [intStar])
+      ],
+    );
+
+    var C = class_(
+      name: 'C',
+      interfaces: [
+        interfaceTypeNone(A, typeArguments: [intNone])
+      ],
+    );
+
+    _checkLeastUpperBound(
+      interfaceTypeNone(B),
+      interfaceTypeNone(C),
+      interfaceTypeNone(A, typeArguments: [intStar]),
+    );
+  }
+
+  test_directSuperclass() {
+    // class A
+    // class B extends A
+    // class C extends B
+
+    var A = class_(name: 'A');
+    var typeA = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', superType: typeA);
+    var typeB = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', superType: typeB);
+    var typeC = interfaceTypeNone(C);
+
+    _checkLeastUpperBound(typeB, typeC, typeB);
+  }
+
+  void test_directSuperclass_nullability() {
+    var aElement = class_(name: 'A');
+    var aQuestion = interfaceTypeQuestion(aElement);
+    var aStar = interfaceTypeStar(aElement);
+    var aNone = interfaceTypeNone(aElement);
+
+    var bElementStar = class_(name: 'B', superType: aStar);
+    var bElementNone = class_(name: 'B', superType: aNone);
+
+    InterfaceTypeImpl _bTypeStarElement(NullabilitySuffix nullability) {
+      return interfaceType(
+        bElementStar,
+        nullabilitySuffix: nullability,
+      );
+    }
+
+    InterfaceTypeImpl _bTypeNoneElement(NullabilitySuffix nullability) {
+      return interfaceType(
+        bElementNone,
+        nullabilitySuffix: nullability,
+      );
+    }
+
+    var bStarQuestion = _bTypeStarElement(NullabilitySuffix.question);
+    var bStarStar = _bTypeStarElement(NullabilitySuffix.star);
+    var bStarNone = _bTypeStarElement(NullabilitySuffix.none);
+
+    var bNoneQuestion = _bTypeNoneElement(NullabilitySuffix.question);
+    var bNoneStar = _bTypeNoneElement(NullabilitySuffix.star);
+    var bNoneNone = _bTypeNoneElement(NullabilitySuffix.none);
+
+    void assertLUB(DartType type1, DartType type2, DartType expected) {
+      expect(typeSystem.getLeastUpperBound(type1, type2), expected);
+      expect(typeSystem.getLeastUpperBound(type2, type1), expected);
+    }
+
+    assertLUB(bStarQuestion, aQuestion, aQuestion);
+    assertLUB(bStarQuestion, aStar, aQuestion);
+    assertLUB(bStarQuestion, aNone, aQuestion);
+
+    assertLUB(bStarStar, aQuestion, aQuestion);
+    assertLUB(bStarStar, aStar, aStar);
+    assertLUB(bStarStar, aNone, aStar);
+
+    assertLUB(bStarNone, aQuestion, aQuestion);
+    assertLUB(bStarNone, aStar, aStar);
+    assertLUB(bStarNone, aNone, aNone);
+
+    assertLUB(bNoneQuestion, aQuestion, aQuestion);
+    assertLUB(bNoneQuestion, aStar, aQuestion);
+    assertLUB(bNoneQuestion, aNone, aQuestion);
+
+    assertLUB(bNoneStar, aQuestion, aQuestion);
+    assertLUB(bNoneStar, aStar, aStar);
+    assertLUB(bNoneStar, aNone, aStar);
+
+    assertLUB(bNoneNone, aQuestion, aQuestion);
+    assertLUB(bNoneNone, aStar, aStar);
+    assertLUB(bNoneNone, aNone, aNone);
+  }
+
+  void test_implementationsOfComparable() {
+    _checkLeastUpperBound(stringNone, numNone, objectNone);
+  }
+
+  void test_mixinAndClass_constraintAndInterface() {
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', interfaces: [A_none]);
+    var M = mixin_(name: 'M', constraints: [A_none]);
+
+    _checkLeastUpperBound(
+      interfaceTypeNone(B),
+      interfaceTypeNone(M),
+      A_none,
+    );
+  }
+
+  void test_mixinAndClass_object() {
+    var A = class_(name: 'A');
+    var M = mixin_(name: 'M');
+
+    _checkLeastUpperBound(
+      interfaceTypeNone(A),
+      interfaceTypeNone(M),
+      objectNone,
+    );
+  }
+
+  void test_mixinAndClass_sharedInterface() {
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', interfaces: [A_none]);
+    var M = mixin_(name: 'M', interfaces: [A_none]);
+
+    _checkLeastUpperBound(
+      interfaceTypeNone(B),
+      interfaceTypeNone(M),
+      A_none,
+    );
+  }
+
+  void test_sameElement_nullability() {
+    var aElement = class_(name: 'A');
+
+    var aQuestion = interfaceTypeQuestion(aElement);
+    var aStar = interfaceTypeStar(aElement);
+    var aNone = interfaceTypeNone(aElement);
+
+    void assertLUB(DartType type1, DartType type2, DartType expected) {
+      expect(typeSystem.getLeastUpperBound(type1, type2), expected);
+      expect(typeSystem.getLeastUpperBound(type2, type1), expected);
+    }
+
+    assertLUB(aQuestion, aQuestion, aQuestion);
+    assertLUB(aQuestion, aStar, aQuestion);
+    assertLUB(aQuestion, aNone, aQuestion);
+
+    assertLUB(aStar, aQuestion, aQuestion);
+    assertLUB(aStar, aStar, aStar);
+    assertLUB(aStar, aNone, aStar);
+
+    assertLUB(aNone, aQuestion, aQuestion);
+    assertLUB(aNone, aStar, aStar);
+    assertLUB(aNone, aNone, aNone);
+  }
+
+  void test_sharedSuperclass1() {
+    // class A {}
+    // class B extends A {}
+    // class C extends A {}
+
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', superType: A_none);
+    var B_none = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', superType: A_none);
+    var C_none = interfaceTypeNone(C);
+
+    _checkLeastUpperBound(B_none, C_none, A_none);
+  }
+
+  void test_sharedSuperclass1_nullability() {
+    var aElement = class_(name: 'A');
+    var aQuestion = interfaceTypeQuestion(aElement);
+    var aStar = interfaceTypeStar(aElement);
+    var aNone = interfaceTypeNone(aElement);
+
+    var bElementNone = class_(name: 'B', superType: aNone);
+    var bElementStar = class_(name: 'B', superType: aStar);
+
+    var cElementNone = class_(name: 'C', superType: aNone);
+    var cElementStar = class_(name: 'C', superType: aStar);
+
+    InterfaceTypeImpl bTypeElementNone(NullabilitySuffix nullability) {
+      return interfaceType(
+        bElementNone,
+        nullabilitySuffix: nullability,
+      );
+    }
+
+    InterfaceTypeImpl bTypeElementStar(NullabilitySuffix nullability) {
+      return interfaceType(
+        bElementStar,
+        nullabilitySuffix: nullability,
+      );
+    }
+
+    var bNoneQuestion = bTypeElementNone(NullabilitySuffix.question);
+    var bNoneStar = bTypeElementNone(NullabilitySuffix.star);
+    var bNoneNone = bTypeElementNone(NullabilitySuffix.none);
+
+    var bStarQuestion = bTypeElementStar(NullabilitySuffix.question);
+    var bStarStar = bTypeElementStar(NullabilitySuffix.star);
+    var bStarNone = bTypeElementStar(NullabilitySuffix.none);
+
+    InterfaceTypeImpl cTypeElementNone(NullabilitySuffix nullability) {
+      return interfaceType(
+        cElementNone,
+        nullabilitySuffix: nullability,
+      );
+    }
+
+    InterfaceTypeImpl cTypeElementStar(NullabilitySuffix nullability) {
+      return interfaceType(
+        cElementStar,
+        nullabilitySuffix: nullability,
+      );
+    }
+
+    var cNoneQuestion = cTypeElementNone(NullabilitySuffix.question);
+    var cNoneStar = cTypeElementNone(NullabilitySuffix.star);
+    var cNoneNone = cTypeElementNone(NullabilitySuffix.none);
+
+    var cStarQuestion = cTypeElementStar(NullabilitySuffix.question);
+    var cStarStar = cTypeElementStar(NullabilitySuffix.star);
+    var cStarNone = cTypeElementStar(NullabilitySuffix.none);
+
+    void assertLUB(DartType type1, DartType type2, DartType expected) {
+      expect(typeSystem.getLeastUpperBound(type1, type2), expected);
+      expect(typeSystem.getLeastUpperBound(type2, type1), expected);
+    }
+
+    assertLUB(bNoneQuestion, cNoneQuestion, aQuestion);
+    assertLUB(bNoneQuestion, cNoneStar, aQuestion);
+    assertLUB(bNoneQuestion, cNoneNone, aQuestion);
+    assertLUB(bNoneQuestion, cStarQuestion, aQuestion);
+    assertLUB(bNoneQuestion, cStarStar, aQuestion);
+    assertLUB(bNoneQuestion, cStarNone, aQuestion);
+
+    assertLUB(bNoneStar, cNoneQuestion, aQuestion);
+    assertLUB(bNoneStar, cNoneStar, aStar);
+    assertLUB(bNoneStar, cNoneNone, aStar);
+    assertLUB(bNoneStar, cStarQuestion, aQuestion);
+    assertLUB(bNoneStar, cStarStar, aStar);
+    assertLUB(bNoneStar, cStarNone, aStar);
+
+    assertLUB(bNoneNone, cNoneQuestion, aQuestion);
+    assertLUB(bNoneNone, cNoneStar, aStar);
+    assertLUB(bNoneNone, cNoneNone, aNone);
+    assertLUB(bNoneNone, cStarQuestion, aQuestion);
+    assertLUB(bNoneNone, cStarStar, aStar);
+    assertLUB(bNoneNone, cStarNone, aNone);
+
+    assertLUB(bStarQuestion, cNoneQuestion, aQuestion);
+    assertLUB(bStarQuestion, cNoneStar, aQuestion);
+    assertLUB(bStarQuestion, cNoneNone, aQuestion);
+    assertLUB(bStarQuestion, cStarQuestion, aQuestion);
+    assertLUB(bStarQuestion, cStarStar, aQuestion);
+    assertLUB(bStarQuestion, cStarNone, aQuestion);
+
+    assertLUB(bStarStar, cNoneQuestion, aQuestion);
+    assertLUB(bStarStar, cNoneStar, aStar);
+    assertLUB(bStarStar, cNoneNone, aStar);
+    assertLUB(bStarStar, cStarQuestion, aQuestion);
+    assertLUB(bStarStar, cStarStar, aStar);
+    assertLUB(bStarStar, cStarNone, aStar);
+
+    assertLUB(bStarNone, cNoneQuestion, aQuestion);
+    assertLUB(bStarNone, cNoneStar, aStar);
+    assertLUB(bStarNone, cNoneNone, aNone);
+    assertLUB(bStarNone, cStarQuestion, aQuestion);
+    assertLUB(bStarNone, cStarStar, aStar);
+    assertLUB(bStarNone, cStarNone, aNone);
+  }
+
+  void test_sharedSuperclass2() {
+    // class A {}
+    // class B extends A {}
+    // class C extends A {}
+    // class D extends C {}
+
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', superType: A_none);
+    var B_none = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', superType: A_none);
+    var C_none = interfaceTypeNone(C);
+
+    var D = class_(name: 'D', superType: C_none);
+    var D_none = interfaceTypeNone(D);
+
+    _checkLeastUpperBound(B_none, D_none, A_none);
+  }
+
+  void test_sharedSuperclass3() {
+    // class A {}
+    // class B extends A {}
+    // class C extends B {}
+    // class D extends B {}
+
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', superType: A_none);
+    var B_none = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', superType: B_none);
+    var C_none = interfaceTypeNone(C);
+
+    var D = class_(name: 'D', superType: B_none);
+    var D_none = interfaceTypeNone(D);
+
+    _checkLeastUpperBound(C_none, D_none, B_none);
+  }
+
+  void test_sharedSuperclass4() {
+    // class A {}
+    // class A2 {}
+    // class A3 {}
+    // class B extends A implements A2 {}
+    // class C extends A implement A3 {}
+
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var A2 = class_(name: 'A2');
+    var A2_none = interfaceTypeNone(A2);
+
+    var A3 = class_(name: 'A3');
+    var A3_none = interfaceTypeNone(A3);
+
+    var B = class_(name: 'B', superType: A_none, interfaces: [A2_none]);
+    var B_none = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', superType: A_none, interfaces: [A3_none]);
+    var C_none = interfaceTypeNone(C);
+
+    _checkLeastUpperBound(B_none, C_none, A_none);
+  }
+
+  void test_sharedSuperinterface1() {
+    // class A {}
+    // class B implements A {}
+    // class C implements A {}
+
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', interfaces: [A_none]);
+    var B_none = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', interfaces: [A_none]);
+    var C_none = interfaceTypeNone(C);
+
+    _checkLeastUpperBound(B_none, C_none, A_none);
+  }
+
+  void test_sharedSuperinterface2() {
+    // class A {}
+    // class B implements A {}
+    // class C implements A {}
+    // class D implements C {}
+
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', interfaces: [A_none]);
+    var B_none = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', interfaces: [A_none]);
+    var C_none = interfaceTypeNone(C);
+
+    var D = class_(name: 'D', interfaces: [C_none]);
+    var D_none = interfaceTypeNone(D);
+
+    _checkLeastUpperBound(B_none, D_none, A_none);
+  }
+
+  void test_sharedSuperinterface3() {
+    // class A {}
+    // class B implements A {}
+    // class C implements B {}
+    // class D implements B {}
+
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', interfaces: [A_none]);
+    var B_none = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', interfaces: [B_none]);
+    var C_none = interfaceTypeNone(C);
+
+    var D = class_(name: 'D', interfaces: [B_none]);
+    var D_none = interfaceTypeNone(D);
+
+    _checkLeastUpperBound(C_none, D_none, B_none);
+  }
+
+  void test_sharedSuperinterface4() {
+    // class A {}
+    // class A2 {}
+    // class A3 {}
+    // class B implements A, A2 {}
+    // class C implements A, A3 {}
+
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var A2 = class_(name: 'A2');
+    var A2_none = interfaceTypeNone(A2);
+
+    var A3 = class_(name: 'A3');
+    var A3_none = interfaceTypeNone(A3);
+
+    var B = class_(name: 'B', interfaces: [A_none, A2_none]);
+    var B_none = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', interfaces: [A_none, A3_none]);
+    var C_none = interfaceTypeNone(C);
+
+    _checkLeastUpperBound(B_none, C_none, A_none);
+  }
+}
+
+@reflectiveTest
+class UpperBoundTest extends _BoundsTestBase {
+  test_bottom_any() {
+    void check(DartType T1, DartType T2) {
+      _assertBottom(T1);
+      _assertNotBottom(T2);
+      _checkLeastUpperBound(T1, T2, T2);
+    }
+
+    check(neverNone, dynamicNone);
+
+    check(neverNone, objectNone);
+    check(neverNone, objectStar);
+    check(neverNone, objectQuestion);
+
+    check(neverNone, intNone);
+    check(neverNone, intQuestion);
+    check(neverNone, intStar);
+
+    check(neverNone, listNone(intNone));
+    check(neverNone, listQuestion(intNone));
+    check(neverNone, listStar(intNone));
+
+    check(neverNone, futureOrNone(intNone));
+    check(neverNone, futureOrQuestion(intNone));
+    check(neverNone, futureOrStar(intNone));
+
+    check(neverNone, functionTypeNone(returnType: voidNone));
+    check(neverNone, functionTypeQuestion(returnType: voidNone));
+    check(neverNone, functionTypeStar(returnType: voidNone));
+
+    {
+      var T = typeParameter('T');
+      check(neverNone, typeParameterTypeNone(T));
+      check(neverNone, typeParameterTypeQuestion(T));
+      check(neverNone, typeParameterTypeStar(T));
+    }
+
+    {
+      var T = typeParameterTypeNone(
+        typeParameter('T', bound: neverNone),
+      );
+      check(T, intNone);
+      check(T, intQuestion);
+      check(T, intStar);
+    }
+
+    {
+      var T = promotedTypeParameterTypeNone(
+        typeParameter('T', bound: objectQuestion),
+        neverNone,
+      );
+      check(T, intNone);
+      check(T, intQuestion);
+      check(T, intStar);
+    }
+  }
+
+  test_bottom_bottom() {
+    void check(DartType T1, DartType T2) {
+      _assertBottom(T1);
+      _assertBottom(T2);
+      _checkLeastUpperBound(T1, T2, T2);
+    }
+
+    check(
+      neverNone,
+      typeParameterTypeNone(
+        typeParameter('T', bound: neverNone),
+      ),
+    );
+
+    check(
+      neverNone,
+      promotedTypeParameterTypeNone(
+        typeParameter('T', bound: objectQuestion),
+        neverNone,
+      ),
+    );
+  }
 
   test_functionType_interfaceType() {
     void check(FunctionType T1, InterfaceType T2, InterfaceType expected) {
@@ -1859,6 +2605,16 @@
     check(listNone(intNone));
   }
 
+  void test_interfaceType_functionType() {
+    var A = class_(name: 'A');
+
+    _checkLeastUpperBound(
+      interfaceTypeNone(A),
+      functionTypeNone(returnType: voidNone),
+      objectNone,
+    );
+  }
+
   test_none_question() {
     void check(DartType T1, DartType T2, DartType expected) {
       _assertNullabilityNone(T1);
@@ -1893,17 +2649,14 @@
 
   test_null_any() {
     void check(DartType T1, DartType T2, DartType expected) {
-      var T1_str = _typeString(T1);
-      var T2_str = _typeString(T2);
+      _assertNull(T1);
+      _assertNotNull(T2);
 
-      expect(typeSystem.isNull(T1), isTrue, reason: 'isNull: $T1_str');
-      expect(typeSystem.isNull(T2), isFalse, reason: 'isNull: $T2_str');
+      _assertNotTop(T1);
+      _assertNotTop(T2);
 
-      expect(typeSystem.isTop(T1), isFalse, reason: 'isTop: $T1_str');
-      expect(typeSystem.isTop(T2), isFalse, reason: 'isTop: $T2_str');
-
-      expect(typeSystem.isBottom(T1), isFalse, reason: 'isBottom: $T1_str');
-      expect(typeSystem.isBottom(T2), isFalse, reason: 'isBottom: $T2_str');
+      _assertNotBottom(T1);
+      _assertNotBottom(T2);
 
       _checkLeastUpperBound(T1, T2, expected);
     }
@@ -1942,14 +2695,11 @@
 
   test_null_null() {
     void check(DartType T1, DartType T2) {
-      var T1_str = _typeString(T1);
-      var T2_str = _typeString(T2);
+      _assertNull(T1);
+      _assertNull(T2);
 
-      expect(typeSystem.isNull(T1), isTrue, reason: 'isNull: $T1_str');
-      expect(typeSystem.isNull(T2), isTrue, reason: 'isNull: $T2_str');
-
-      expect(typeSystem.isBottom(T1), isFalse, reason: 'isBottom: $T1_str');
-      expect(typeSystem.isBottom(T2), isFalse, reason: 'isBottom: $T2_str');
+      _assertNotBottom(T1);
+      _assertNotBottom(T2);
 
       _checkLeastUpperBound(T1, T2, T2);
     }
@@ -1960,11 +2710,8 @@
 
   test_object_any() {
     void check(DartType T1, DartType T2, DartType expected) {
-      var T1_str = _typeString(T1);
-      var T2_str = _typeString(T2);
-
-      expect(typeSystem.isObject(T1), isTrue, reason: 'isObject: $T1_str');
-      expect(typeSystem.isObject(T2), isFalse, reason: 'isObject: $T2_str');
+      _assertObject(T1);
+      _assertNotObject(T2);
 
       _checkLeastUpperBound(T1, T2, expected);
     }
@@ -1982,11 +2729,8 @@
 
   test_object_object() {
     void check(DartType T1, DartType T2) {
-      var T1_str = _typeString(T1);
-      var T2_str = _typeString(T2);
-
-      expect(typeSystem.isObject(T1), isTrue, reason: 'isObject: $T1_str');
-      expect(typeSystem.isObject(T2), isTrue, reason: 'isObject: $T2_str');
+      _assertObject(T1);
+      _assertObject(T2);
 
       _checkLeastUpperBound(T1, T2, T2);
     }
@@ -2051,48 +2795,42 @@
 
   test_top_any() {
     void check(DartType T1, DartType T2) {
-      expect(typeSystem.isTop(T1), isTrue, reason: _typeString(T1));
-      expect(typeSystem.isTop(T2), isFalse, reason: _typeString(T2));
+      _assertTop(T1);
+      _assertNotTop(T2);
       _checkLeastUpperBound(T1, T2, T1);
     }
 
-    check(voidNone, objectNone);
-    check(voidNone, intNone);
-    check(voidNone, intQuestion);
-    check(voidNone, intStar);
-    check(voidNone, listNone(intNone));
-    check(voidNone, futureOrNone(intNone));
+    void check2(DartType T1) {
+      check(T1, objectNone);
+      check(T1, intNone);
+      check(T1, intQuestion);
+      check(T1, intStar);
+      check(T1, listNone(intNone));
+      check(T1, futureOrNone(intNone));
+      check(T1, functionTypeNone(returnType: voidNone));
 
-    check(dynamicNone, objectNone);
-    check(dynamicNone, intNone);
-    check(dynamicNone, intQuestion);
-    check(dynamicNone, intStar);
-    check(dynamicNone, listNone(intNone));
-    check(dynamicNone, futureOrNone(intNone));
+      {
+        var T = typeParameter('T');
+        check(T1, typeParameterTypeNone(T));
+        check(T1, typeParameterTypeQuestion(T));
+        check(T1, typeParameterTypeStar(T));
+      }
+    }
 
-    check(objectQuestion, objectNone);
-    check(objectQuestion, intNone);
-    check(objectQuestion, intQuestion);
-    check(objectQuestion, intStar);
-    check(objectQuestion, listNone(intNone));
-    check(objectQuestion, futureOrNone(intNone));
+    check2(voidNone);
+    check2(dynamicNone);
+    check2(objectQuestion);
+    check2(objectStar);
 
-    check(objectStar, objectNone);
-    check(objectStar, intNone);
-    check(objectStar, intQuestion);
-    check(objectStar, intStar);
-    check(objectStar, listNone(intNone));
-    check(objectStar, futureOrNone(intNone));
-
-    check(futureOrNone(voidNone), intNone);
-    check(futureOrQuestion(voidNone), intNone);
-    check(futureOrStar(voidNone), intNone);
+    check2(futureOrNone(voidNone));
+    check2(futureOrQuestion(voidNone));
+    check2(futureOrStar(voidNone));
   }
 
   test_top_top() {
     void check(DartType T1, DartType T2) {
-      expect(typeSystem.isTop(T1), isTrue, reason: _typeString(T1));
-      expect(typeSystem.isTop(T2), isTrue, reason: _typeString(T2));
+      _assertTop(T1);
+      _assertTop(T2);
       _checkLeastUpperBound(T1, T2, T1);
     }
 
@@ -2187,32 +2925,246 @@
     }
   }
 
-  void _checkLeastUpperBound(DartType T1, DartType T2, DartType expected) {
-    var expectedStr = _typeString(expected);
+  void test_typeParameter_fBounded() {
+    // class A<T> {}
+    var T = typeParameter('T');
+    var A = class_(name: 'A', typeParameters: [T]);
 
-    var result = typeSystem.getLeastUpperBound(T1, T2);
-    var resultStr = _typeString(result);
-    expect(result, expected, reason: '''
-expected: $expectedStr
-actual: $resultStr
-''');
+    // <S extends A<S>>
+    var S = typeParameter('S');
+    var S_none = typeParameterTypeNone(S);
+    S.bound = interfaceTypeNone(A, typeArguments: [S_none]);
 
-    // Check that the result is an upper bound.
-    expect(typeSystem.isSubtypeOf2(T1, result), true);
-    expect(typeSystem.isSubtypeOf2(T2, result), true);
+    // <U extends A<U>>
+    var U = typeParameter('U');
+    var U_none = typeParameterTypeNone(U);
+    U.bound = interfaceTypeNone(A, typeArguments: [U_none]);
 
-    // Check for symmetry.
-    result = typeSystem.getLeastUpperBound(T2, T1);
-    resultStr = _typeString(result);
-    expect(result, expected, reason: '''
-expected: $expectedStr
-actual: $resultStr
-''');
+    _checkLeastUpperBound(
+      S_none,
+      typeParameterTypeNone(U),
+      interfaceTypeNone(A, typeArguments: [objectNone]),
+    );
+  }
+
+  void test_typeParameter_function_bounded() {
+    var T = typeParameter('T', bound: typeProvider.functionType);
+
+    _checkLeastUpperBound(
+      typeParameterTypeNone(T),
+      functionTypeNone(returnType: voidNone),
+      typeProvider.functionType,
+    );
+  }
+
+  void test_typeParameter_function_noBound() {
+    var T = typeParameter('T', bound: objectQuestion);
+
+    _checkLeastUpperBound(
+      typeParameterTypeNone(T),
+      functionTypeNone(returnType: voidNone),
+      objectQuestion,
+    );
+  }
+
+  void test_typeParameter_interface_bounded() {
+    var A = class_(name: 'A');
+    var A_none = interfaceTypeNone(A);
+
+    var B = class_(name: 'B', superType: A_none);
+    var B_none = interfaceTypeNone(B);
+
+    var C = class_(name: 'C', superType: A_none);
+    var C_none = interfaceTypeNone(C);
+
+    var T = typeParameter('T', bound: B_none);
+    var typeT = typeParameterTypeNone(T);
+
+    _checkLeastUpperBound(typeT, C_none, A_none);
+  }
+
+  void test_typeParameter_interface_noBound() {
+    var T = typeParameter('T', bound: objectQuestion);
+
+    var A = class_(name: 'A');
+
+    _checkLeastUpperBound(
+      typeParameterTypeNone(T),
+      interfaceTypeNone(A),
+      objectQuestion,
+    );
+  }
+
+  void test_typeParameters_contravariant_different() {
+    // class A<in T>
+    var T = typeParameter('T', variance: Variance.contravariant);
+    var A = class_(name: 'A', typeParameters: [T]);
+
+    // A<num>
+    // A<int>
+    var A_num = interfaceTypeNone(A, typeArguments: [numNone]);
+    var A_int = interfaceTypeNone(A, typeArguments: [intNone]);
+
+    _checkLeastUpperBound(A_int, A_num, A_int);
+  }
+
+  void test_typeParameters_contravariant_same() {
+    // class A<in T>
+    var T = typeParameter('T', variance: Variance.contravariant);
+    var A = class_(name: 'A', typeParameters: [T]);
+
+    // A<num>
+    var A_num = interfaceTypeNone(A, typeArguments: [numNone]);
+
+    _checkLeastUpperBound(A_num, A_num, A_num);
+  }
+
+  void test_typeParameters_covariant_different() {
+    // class A<out T>
+    var T = typeParameter('T', variance: Variance.covariant);
+    var A = class_(name: 'A', typeParameters: [T]);
+
+    // A<num>
+    // A<int>
+    var A_num = interfaceTypeNone(A, typeArguments: [numNone]);
+    var A_int = interfaceTypeNone(A, typeArguments: [intNone]);
+
+    _checkLeastUpperBound(A_int, A_num, A_num);
+  }
+
+  void test_typeParameters_covariant_same() {
+    // class A<out T>
+    var T = typeParameter('T', variance: Variance.covariant);
+    var A = class_(name: 'A', typeParameters: [T]);
+
+    // A<num>
+    var A_num = interfaceTypeStar(A, typeArguments: [numNone]);
+
+    _checkLeastUpperBound(A_num, A_num, A_num);
+  }
+
+  void test_typeParameters_invariant_object() {
+    // class A<inout T>
+    var T = typeParameter('T', variance: Variance.invariant);
+    var A = class_(name: 'A', typeParameters: [T]);
+
+    // A<num>
+    // A<int>
+    var A_num = interfaceTypeNone(A, typeArguments: [numNone]);
+    var A_int = interfaceTypeNone(A, typeArguments: [intNone]);
+
+    _checkLeastUpperBound(A_num, A_int, objectNone);
+  }
+
+  void test_typeParameters_invariant_same() {
+    // class A<inout T>
+    var T = typeParameter('T', variance: Variance.invariant);
+    var A = class_(name: 'A', typeParameters: [T]);
+
+    // A<num>
+    var A_num = interfaceTypeNone(A, typeArguments: [numNone]);
+
+    _checkLeastUpperBound(A_num, A_num, A_num);
+  }
+
+  void test_typeParameters_multi_basic() {
+    // class A<out T, inout U, in V>
+    var T = typeParameter('T', variance: Variance.covariant);
+    var U = typeParameter('T', variance: Variance.invariant);
+    var V = typeParameter('T', variance: Variance.contravariant);
+    var A = class_(name: 'A', typeParameters: [T, U, V]);
+
+    // A<num, num, num>
+    // A<int, num, int>
+    var A_num_num_num = interfaceTypeNone(
+      A,
+      typeArguments: [numNone, numNone, numNone],
+    );
+    var A_num_int_num = interfaceTypeNone(
+      A,
+      typeArguments: [intNone, numNone, intNone],
+    );
+
+    // We expect A<num, num, int>
+    var A_num_num_int = interfaceTypeNone(
+      A,
+      typeArguments: [numNone, numNone, intNone],
+    );
+
+    _checkLeastUpperBound(A_num_num_num, A_num_int_num, A_num_num_int);
+  }
+
+  void test_typeParameters_multi_objectInterface() {
+    // class A<out T, inout U, in V>
+    var T = typeParameter('T', variance: Variance.covariant);
+    var U = typeParameter('T', variance: Variance.invariant);
+    var V = typeParameter('T', variance: Variance.contravariant);
+    var A = class_(name: 'A', typeParameters: [T, U, V]);
+
+    // A<num, String, num>
+    // A<int, num, int>
+    var A_num_String_num = interfaceTypeNone(
+      A,
+      typeArguments: [numNone, stringNone, numNone],
+    );
+    var A_int_num_int = interfaceTypeNone(
+      A,
+      typeArguments: [intNone, numNone, intNone],
+    );
+
+    _checkLeastUpperBound(A_num_String_num, A_int_num_int, objectNone);
+  }
+
+  void test_typeParameters_multi_objectType() {
+    // class A<out T, inout U, in V>
+    var T = typeParameter('T', variance: Variance.covariant);
+    var U = typeParameter('T', variance: Variance.invariant);
+    var V = typeParameter('T', variance: Variance.contravariant);
+    var A = class_(name: 'A', typeParameters: [T, U, V]);
+
+    // A<String, num, num>
+    // A<int, num, int>
+    var A_String_num_num = interfaceTypeNone(
+      A,
+      typeArguments: [stringNone, numNone, numNone],
+    );
+    var A_int_num_int = interfaceTypeNone(
+      A,
+      typeArguments: [intNone, numNone, intNone],
+    );
+
+    // We expect A<Object, num, int>
+    var A_Object_num_int = interfaceTypeNone(
+      A,
+      typeArguments: [objectNone, numNone, intNone],
+    );
+
+    _checkLeastUpperBound(A_String_num_num, A_int_num_int, A_Object_num_int);
+  }
+
+  /// Check least upper bound of the same class with different type parameters.
+  void test_typeParameters_noVariance_different() {
+    _checkLeastUpperBound(
+      listNone(intNone),
+      listNone(doubleNone),
+      listNone(numNone),
+    );
+  }
+
+  void test_typeParameters_noVariance_same() {
+    var listOfInt = listNone(intNone);
+    _checkLeastUpperBound(listOfInt, listOfInt, listOfInt);
   }
 }
 
 @reflectiveTest
 class _BoundsTestBase extends AbstractTypeSystemNullSafetyTest {
+  void _assertBottom(DartType type) {
+    if (!typeSystem.isBottom(type)) {
+      fail('isBottom must be true: ' + _typeString(type));
+    }
+  }
+
   void _assertNotBottom(DartType type) {
     if (typeSystem.isBottom(type)) {
       fail('isBottom must be false: ' + _typeString(type));
@@ -2244,6 +3196,12 @@
     }
   }
 
+  void _assertNull(DartType type) {
+    if (!typeSystem.isNull(type)) {
+      fail('isNull must be true: ' + _typeString(type));
+    }
+  }
+
   void _assertNullability(DartType type, NullabilitySuffix expected) {
     if (type.nullabilitySuffix != expected) {
       fail('Expected $expected in ' + _typeString(type));
@@ -2262,11 +3220,48 @@
     _assertNullability(type, NullabilitySuffix.star);
   }
 
+  void _assertObject(DartType type) {
+    if (!typeSystem.isObject(type)) {
+      fail('isObject must be true: ' + _typeString(type));
+    }
+  }
+
+  void _assertTop(DartType type) {
+    if (!typeSystem.isTop(type)) {
+      fail('isTop must be true: ' + _typeString(type));
+    }
+  }
+
+  void _checkLeastUpperBound(DartType T1, DartType T2, DartType expected) {
+    NullSafetyUnderstandingFlag.enableNullSafetyTypes(() async {
+      var expectedStr = _typeString(expected);
+
+      var result = typeSystem.getLeastUpperBound(T1, T2);
+      var resultStr = _typeString(result);
+      expect(result, expected, reason: '''
+expected: $expectedStr
+actual: $resultStr
+''');
+
+      // Check that the result is an upper bound.
+      expect(typeSystem.isSubtypeOf2(T1, result), true);
+      expect(typeSystem.isSubtypeOf2(T2, result), true);
+
+      // Check for symmetry.
+      result = typeSystem.getLeastUpperBound(T2, T1);
+      resultStr = _typeString(result);
+      expect(result, expected, reason: '''
+expected: $expectedStr
+actual: $resultStr
+''');
+    });
+  }
+
   String _typeParametersStr(TypeImpl type) {
     var typeStr = '';
 
     var typeParameterCollector = _TypeParameterCollector();
-    DartTypeVisitor.visit(type, typeParameterCollector);
+    type.accept(typeParameterCollector);
     for (var typeParameter in typeParameterCollector.typeParameters) {
       typeStr += ', $typeParameter';
     }
@@ -2280,7 +3275,8 @@
   }
 }
 
-class _TypeParameterCollector extends DartTypeVisitor<void> {
+class _TypeParameterCollector
+    implements TypeVisitor<void>, InferenceTypeVisitor<void> {
   final Set<String> typeParameters = {};
 
   /// We don't need to print bounds for these type parameters, because
@@ -2289,12 +3285,7 @@
   final Set<TypeParameterElement> functionTypeParameters = {};
 
   @override
-  void defaultDartType(DartType type) {
-    throw UnimplementedError('(${type.runtimeType}) $type');
-  }
-
-  @override
-  void visitDynamicType(DynamicTypeImpl type) {}
+  void visitDynamicType(DynamicType type) {}
 
   @override
   void visitFunctionType(FunctionType type) {
@@ -2302,24 +3293,24 @@
     for (var typeParameter in type.typeFormals) {
       var bound = typeParameter.bound;
       if (bound != null) {
-        DartTypeVisitor.visit(bound, this);
+        bound.accept(this);
       }
     }
     for (var parameter in type.parameters) {
-      DartTypeVisitor.visit(parameter.type, this);
+      parameter.type.accept(this);
     }
-    DartTypeVisitor.visit(type.returnType, this);
+    type.returnType.accept(this);
   }
 
   @override
   void visitInterfaceType(InterfaceType type) {
     for (var typeArgument in type.typeArguments) {
-      DartTypeVisitor.visit(typeArgument, this);
+      typeArgument.accept(this);
     }
   }
 
   @override
-  void visitNeverType(NeverTypeImpl type) {}
+  void visitNeverType(NeverType type) {}
 
   @override
   void visitTypeParameterType(TypeParameterType type) {
diff --git a/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart b/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart
index f0b0b9d..ae592bc 100644
--- a/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart
+++ b/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart
@@ -89,6 +89,79 @@
     assertErrorsInResolvedUnit(result, []);
   }
 
+  test_changeFile_resolution_flushInheritanceManager() async {
+    newFile(aPath, content: r'''
+class A {
+  final int foo = 0;
+}
+''');
+
+    newFile(bPath, content: r'''
+import 'a.dart';
+
+void f(A a) {
+  a.foo = 1;
+}
+''');
+
+    result = await resolveFile(bPath);
+    assertErrorsInResolvedUnit(result, [
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL, 36, 3),
+    ]);
+
+    newFile(aPath, content: r'''
+class A {
+  int foo = 0;
+}
+''');
+    fileResolver.changeFile(aPath);
+
+    result = await resolveFile(bPath);
+    assertErrorsInResolvedUnit(result, []);
+  }
+
+  test_changeFile_resolution_missingChangeFileForPart() async {
+    newFile(aPath, content: r'''
+part 'b.dart';
+
+var b = B(0);
+''');
+
+    result = await resolveFile(aPath);
+    assertErrorsInResolvedUnit(result, [
+      error(CompileTimeErrorCode.URI_DOES_NOT_EXIST, 5, 8),
+      error(CompileTimeErrorCode.UNDEFINED_FUNCTION, 24, 1),
+    ]);
+
+    // Update a.dart, and notify the resolver. We need this to have at least
+    // one change, so that we decided to rebuild the library summary.
+    newFile(aPath, content: r'''
+part 'b.dart';
+
+var b = B(1);
+''');
+    fileResolver.changeFile(aPath);
+
+    // Update b.dart, but do not notify the resolver.
+    // If we try to read it now, it will throw.
+    newFile(bPath, content: r'''
+part of 'a.dart';
+
+class B {
+  B(int _);
+}
+''');
+
+    expect(() async {
+      await resolveFile(aPath);
+    }, throwsStateError);
+
+    // Notify the resolver about b.dart, it is OK now.
+    fileResolver.changeFile(bPath);
+    result = await resolveFile(aPath);
+    assertErrorsInResolvedUnit(result, []);
+  }
+
   test_changePartFile_refreshedFiles() async {
     newFile(aPath, content: r'''
 part 'b.dart';
@@ -152,7 +225,7 @@
 num a = 0;
 int b = a;
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 19, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 19, 1),
     ]);
   }
 
@@ -167,7 +240,7 @@
 num a = 0;
 int b = a;
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 19, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 19, 1),
     ]);
   }
 
@@ -184,7 +257,7 @@
 num a = 0;
 int b = a;
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 19, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 19, 1),
     ]);
   }
 
@@ -235,7 +308,7 @@
     expect(result.path, convertPath('/workspace/dart/test/lib/test.dart'));
     expect(result.uri.toString(), 'package:dart.test/test.dart');
     assertErrorsInList(result.errors, [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 8, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 8, 1),
     ]);
     expect(result.lineInfo.lineStarts, [0, 11, 24]);
   }
@@ -260,7 +333,7 @@
     // Still has cached, will be not resolved.
     createFileResolver();
     expect(getTestErrors().errors, hasLength(1));
-    expect(fileResolver.testView.resolvedFiles, []);
+    expect(fileResolver.testView.resolvedFiles, <Object>[]);
 
     // Change the file, new resolver.
     // With changed file the previously cached result cannot be used.
@@ -273,7 +346,7 @@
     // Still has cached, will be not resolved.
     createFileResolver();
     expect(getTestErrors().errors, hasLength(1));
-    expect(fileResolver.testView.resolvedFiles, []);
+    expect(fileResolver.testView.resolvedFiles, <Object>[]);
   }
 
   test_getErrors_reuse_changeDependency() {
@@ -313,7 +386,7 @@
     // Still has cached, will be not resolved.
     createFileResolver();
     expect(getTestErrors().errors, hasLength(1));
-    expect(fileResolver.testView.resolvedFiles, []);
+    expect(fileResolver.testView.resolvedFiles, <Object>[]);
   }
 
   test_hint() async {
@@ -383,7 +456,7 @@
 num a = 0;
 int b = a;
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 19, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 19, 1),
     ]);
 
     // Implicit casts are enabled in 'bbb'.
@@ -398,7 +471,7 @@
 num a = 0;
 int b = a;
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 19, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 19, 1),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/dart/resolution/assignment_test.dart b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
index 531f4b1..629a69a 100644
--- a/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
@@ -8,7 +8,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +17,7 @@
 }
 
 @reflectiveTest
-class AssignmentDriverResolutionTest extends DriverResolutionTest {
+class AssignmentDriverResolutionTest extends PubPackageResolutionTest {
   test_compound_indexExpression() async {
     await resolveTestCode(r'''
 main() {
@@ -153,10 +153,10 @@
   i %= 1.2;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 3),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 33, 3),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 45, 3),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 57, 3),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 21, 3),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 33, 3),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 45, 3),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 57, 3),
     ]);
     assertType(findNode.assignment('+='), 'double');
     assertType(findNode.assignment('-='), 'double');
@@ -187,7 +187,7 @@
   a ??= b;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 32, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 32, 1),
     ]);
     assertType(findNode.assignment('??='), 'num');
   }
diff --git a/pkg/analyzer/test/src/dart/resolution/ast_rewrite_test.dart b/pkg/analyzer/test/src/dart/resolution/ast_rewrite_test.dart
index d8216d2..a51644b 100644
--- a/pkg/analyzer/test/src/dart/resolution/ast_rewrite_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/ast_rewrite_test.dart
@@ -10,7 +10,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,7 +19,7 @@
 }
 
 @reflectiveTest
-class AstRewriteMethodInvocationTest extends DriverResolutionTest {
+class AstRewriteMethodInvocationTest extends PubPackageResolutionTest {
   test_targetNull_cascade() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -95,7 +95,7 @@
   }
 
   test_targetPrefixedIdentifier_prefix_class_constructor() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T> {
   A.named(T a);
 }
@@ -125,7 +125,7 @@
   }
 
   test_targetPrefixedIdentifier_prefix_class_constructor_typeArguments() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T> {
   A.named(int a);
 }
@@ -138,8 +138,8 @@
   prefix.A.named<int>(0);
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-          50, 5),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR, 50,
+          5),
     ]);
 
     var importFind = findElement.importFind('package:test/a.dart');
@@ -163,7 +163,7 @@
   }
 
   test_targetPrefixedIdentifier_prefix_getter_method() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 A get foo => A();
 
 class A {
@@ -220,8 +220,8 @@
   A.named<int, String>(0);
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-          52, 13),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR, 52,
+          13),
     ]);
 
     var creation = findNode.instanceCreation('named<int, String>(0);');
@@ -263,7 +263,7 @@
   }
 
   test_targetSimpleIdentifier_prefix_class() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T, U> {
   A(int a);
 }
@@ -292,7 +292,7 @@
   }
 
   test_targetSimpleIdentifier_prefix_extension() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 
 extension E<T> on A {
@@ -321,7 +321,7 @@
   }
 
   test_targetSimpleIdentifier_prefix_function() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 void A<T, U>(int a) {}
 ''');
 
diff --git a/pkg/analyzer/test/src/dart/resolution/await_expression_test.dart b/pkg/analyzer/test/src/dart/resolution/await_expression_test.dart
index 74b5b02..fe0faac 100644
--- a/pkg/analyzer/test/src/dart/resolution/await_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/await_expression_test.dart
@@ -2,12 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +14,7 @@
 }
 
 @reflectiveTest
-class AwaitExpressionResolutionTest extends DriverResolutionTest {
+class AwaitExpressionResolutionTest extends PubPackageResolutionTest {
   test_future() async {
     await assertNoErrorsInCode(r'''
 import 'dart:async';
@@ -44,16 +41,8 @@
 }
 
 @reflectiveTest
-class AwaitExpressionResolutionWithNullSafetyTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class AwaitExpressionResolutionWithNullSafetyTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_futureOrQ() async {
     await assertNoErrorsInCode(r'''
 import 'dart:async';
diff --git a/pkg/analyzer/test/src/dart/resolution/binary_expression_test.dart b/pkg/analyzer/test/src/dart/resolution/binary_expression_test.dart
index 2c276d8..f974f35 100644
--- a/pkg/analyzer/test/src/dart/resolution/binary_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/binary_expression_test.dart
@@ -2,23 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(BinaryExpressionResolutionTest);
-    defineReflectiveTests(BinaryExpressionResolutionWithNnbdTest);
+    defineReflectiveTests(BinaryExpressionResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class BinaryExpressionResolutionTest extends DriverResolutionTest {
+class BinaryExpressionResolutionTest extends PubPackageResolutionTest {
   test_bangEq() async {
     await assertNoErrorsInCode(r'''
 f(int a, int b) {
@@ -232,17 +229,8 @@
 }
 
 @reflectiveTest
-class BinaryExpressionResolutionWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    )
-    ..implicitCasts = false;
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class BinaryExpressionResolutionWithNullSafetyTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_ifNull_left_nullableContext() async {
     await assertNoErrorsInCode(r'''
 T f<T>(T t) => t;
diff --git a/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
index 07570ba..d2ae9a5 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
@@ -6,7 +6,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../generated/elements_types_mixin.dart';
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class ClassAliasDriverResolutionTest extends DriverResolutionTest
+class ClassAliasDriverResolutionTest extends PubPackageResolutionTest
     with ElementsTypesMixin {
   test_defaultConstructor() async {
     await assertNoErrorsInCode(r'''
diff --git a/pkg/analyzer/test/src/dart/resolution/class_test.dart b/pkg/analyzer/test/src/dart/resolution/class_test.dart
index b988020..5f9af9f 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_test.dart
@@ -8,7 +8,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../generated/elements_types_mixin.dart';
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +17,7 @@
 }
 
 @reflectiveTest
-class ClassDriverResolutionTest extends DriverResolutionTest
+class ClassDriverResolutionTest extends PubPackageResolutionTest
     with ElementsTypesMixin {
   test_element_allSupertypes() async {
     await assertNoErrorsInCode(r'''
@@ -530,7 +530,7 @@
       error(CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, 6, 1),
       error(CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, 33, 1),
       error(
-          StaticWarningCode
+          CompileTimeErrorCode
               .NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
           60,
           1),
@@ -681,7 +681,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_GETTER, 58, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_GETTER, 58, 1),
     ]);
   }
 
@@ -694,7 +694,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_METHOD, 56, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_METHOD, 56, 1),
     ]);
   }
 
@@ -707,7 +707,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR, 70, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR, 70, 1),
     ]);
   }
 
@@ -720,8 +720,8 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR, 70, 7),
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR, 70, 7),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR, 70, 7),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR, 70, 7),
     ]);
   }
 
@@ -734,7 +734,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR, 70, 11),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR, 70, 11),
     ]);
   }
 
@@ -747,7 +747,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR, 71, 7),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_OPERATOR, 71, 7),
     ]);
   }
 
@@ -760,7 +760,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_SETTER, 49, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_SETTER, 49, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/comment_test.dart b/pkg/analyzer/test/src/dart/resolution/comment_test.dart
index 1d275e6..0f894bf 100644
--- a/pkg/analyzer/test/src/dart/resolution/comment_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/comment_test.dart
@@ -4,7 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -13,7 +13,7 @@
 }
 
 @reflectiveTest
-class CommentDriverResolutionTest extends DriverResolutionTest {
+class CommentDriverResolutionTest extends PubPackageResolutionTest {
   test_error_unqualifiedReferenceToNonLocalStaticMember() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/dart/resolution/constant_test.dart b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
index a535f95..11c9ec8 100644
--- a/pkg/analyzer/test/src/dart/resolution/constant_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
@@ -2,31 +2,28 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/test_utilities/find_element.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ConstantResolutionTest);
-    defineReflectiveTests(ConstantResolutionWithNnbdTest);
+    defineReflectiveTests(ConstantResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ConstantResolutionTest extends DriverResolutionTest {
+class ConstantResolutionTest extends PubPackageResolutionTest {
   test_constantValue_defaultParameter_noDefaultValue() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A({int p});
 }
@@ -108,7 +105,7 @@
   }
 
   test_functionType_element_typeArguments() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 typedef F<T> = T Function(int);
 const a = C<F<double>>();
 
@@ -141,7 +138,7 @@
   }
 
   test_imported_prefixedIdentifier_staticField_class() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const a = C.f;
 
 class C {
@@ -158,7 +155,7 @@
   }
 
   test_imported_prefixedIdentifier_staticField_extension() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const a = E.f;
 
 extension E on int {
@@ -175,7 +172,7 @@
   }
 
   test_imported_prefixedIdentifier_staticField_mixin() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const a = M.f;
 
 class C {}
@@ -194,7 +191,7 @@
   }
 
   test_imported_super_defaultFieldFormalParameter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 import 'test.dart';
 
 class A {
@@ -215,7 +212,7 @@
 }
 ''');
 
-    result = await resolveFile(convertPath('/test/lib/a.dart'));
+    result = await resolveFile(convertPath('$testPackageLibPath/a.dart'));
     assertErrorsInResolvedUnit(result, []);
 
     var bElement = FindElement(result.unit).field('b') as ConstVariableElement;
@@ -238,17 +235,8 @@
 }
 
 @reflectiveTest
-class ConstantResolutionWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    )
-    ..implicitCasts = false;
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class ConstantResolutionWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_context_eliminateTypeVariables() async {
     await assertNoErrorsInCode(r'''
 class A<T> {
@@ -271,7 +259,7 @@
   }
 
   test_field_optIn_fromOptOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static const foo = 42;
 }
@@ -289,7 +277,7 @@
   }
 
   test_fromEnvironment_optOut_fromOptIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 
 const cBool = const bool.fromEnvironment('foo', defaultValue: false);
@@ -315,7 +303,7 @@
   }
 
   test_topLevelVariable_optIn_fromOptOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const foo = 42;
 ''');
 
@@ -332,11 +320,11 @@
   }
 
   test_topLevelVariable_optOut2() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const a = 42;
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 import 'a.dart';
 
 const b = a;
@@ -355,7 +343,7 @@
   }
 
   test_topLevelVariable_optOut3() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 const a = int.fromEnvironment('a', defaultValue: 42);
 ''');
diff --git a/pkg/analyzer/test/src/dart/resolution/constructor_test.dart b/pkg/analyzer/test/src/dart/resolution/constructor_test.dart
index 6f190ac..fac300f 100644
--- a/pkg/analyzer/test/src/dart/resolution/constructor_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ConstructorResolutionTest extends DriverResolutionTest {
+class ConstructorResolutionTest extends PubPackageResolutionTest {
   test_factory_redirect_generic_instantiated() async {
     await assertNoErrorsInCode(r'''
 class A<T> implements B<T> {
@@ -44,6 +44,28 @@
     assertType(B_int_redirect.returnType, 'A<int>');
   }
 
+  test_formalParameterScope_type() async {
+    await assertNoErrorsInCode('''
+class a {}
+
+class B {
+  B(a a) {
+    a;
+  }
+}
+''');
+
+    assertElement(
+      findNode.simple('a a'),
+      findElement.class_('a'),
+    );
+
+    assertElement(
+      findNode.simple('a;'),
+      findElement.parameter('a'),
+    );
+  }
+
   test_initializer_field_functionExpression_blockBody() async {
     await resolveTestCode(r'''
 class C {
diff --git a/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart b/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart
new file mode 100644
index 0000000..c5ac808
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart
@@ -0,0 +1,262 @@
+// 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:analyzer/dart/analysis/analysis_context.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:linter/src/rules.dart';
+import 'package:meta/meta.dart';
+
+import 'resolution.dart';
+
+class AnalysisOptionsFileConfig {
+  final List<String> experiments;
+  final bool implicitCasts;
+  final List<String> lints;
+  final bool strictInference;
+  final bool strictRawTypes;
+
+  AnalysisOptionsFileConfig({
+    this.experiments,
+    this.implicitCasts,
+    this.lints,
+    this.strictInference,
+    this.strictRawTypes,
+  });
+
+  String toContent() {
+    var buffer = StringBuffer();
+
+    if (experiments != null ||
+        strictRawTypes != null ||
+        strictInference != null ||
+        implicitCasts != null) {
+      buffer.writeln('analyzer:');
+
+      if (experiments != null) {
+        buffer.writeln('  enable-experiment:');
+        for (var experiment in experiments) {
+          buffer.writeln('    - $experiment');
+        }
+      }
+
+      buffer.writeln('  language:');
+      if (strictRawTypes != null) {
+        buffer.writeln('    strict-raw-types: $strictRawTypes');
+      }
+      if (strictInference != null) {
+        buffer.writeln('    strict-inference: $strictInference');
+      }
+
+      if (implicitCasts != null) {
+        buffer.writeln('  strong-mode:');
+        buffer.writeln('    implicit-casts: $implicitCasts');
+      }
+    }
+
+    if (lints != null) {
+      buffer.writeln('linter:');
+      buffer.writeln('  rules:');
+      for (var lint in lints) {
+        buffer.writeln('    - $lint');
+      }
+    }
+
+    return buffer.toString();
+  }
+}
+
+class BazelWorkspaceResolutionTest extends ContextResolutionTest {
+  @override
+  List<String> get collectionIncludedPaths => [workspaceRootPath];
+
+  String get myPackageLibPath => '$myPackageRootPath/lib';
+
+  String get myPackageRootPath => '$workspaceRootPath/dart/my';
+
+  @override
+  String get testFilePath => '$myPackageLibPath/my.dart';
+
+  String get workspaceRootPath => '/workspace';
+
+  @override
+  void setUp() {
+    super.setUp();
+    newFile('$workspaceRootPath/WORKSPACE', content: '');
+  }
+}
+
+/// [AnalysisContextCollection] based implementation of [ResolutionTest].
+abstract class ContextResolutionTest
+    with ResourceProviderMixin, ResolutionTest {
+  static bool _lintRulesAreRegistered = false;
+
+  Map<String, String> _declaredVariables = {};
+  AnalysisContextCollection _analysisContextCollection;
+
+  List<MockSdkLibrary> get additionalMockSdkLibraries => [];
+
+  List<String> get collectionIncludedPaths;
+
+  set declaredVariables(Map<String, String> map) {
+    if (_analysisContextCollection != null) {
+      throw StateError('Declared variables cannot be changed after analysis.');
+    }
+
+    _declaredVariables = map;
+  }
+
+  AnalysisContext contextFor(String path) {
+    if (_analysisContextCollection == null) {
+      _createAnalysisContexts();
+    }
+
+    path = convertPath(path);
+    return _analysisContextCollection.contextFor(path);
+  }
+
+  /// TODO(scheglov) Replace this with a method that changes a file in
+  /// [AnalysisContextCollectionImpl].
+  AnalysisDriver driverFor(String path) {
+    var context = contextFor(path) as DriverBasedAnalysisContext;
+    return context.driver;
+  }
+
+  @override
+  File newFile(String path, {String content = ''}) {
+    if (_analysisContextCollection != null && !path.endsWith('.dart')) {
+      throw StateError('Only dart files can be changed after analysis.');
+    }
+
+    return super.newFile(path, content: content);
+  }
+
+  @override
+  Future<ResolvedUnitResult> resolveFile(String path) {
+    var analysisContext = contextFor(path);
+    var session = analysisContext.currentSession;
+    return session.getResolvedUnit(path);
+  }
+
+  @mustCallSuper
+  void setUp() {
+    if (!_lintRulesAreRegistered) {
+      registerLintRules();
+      _lintRulesAreRegistered = true;
+    }
+
+    MockSdk(
+      resourceProvider: resourceProvider,
+      additionalLibraries: additionalMockSdkLibraries,
+    );
+  }
+
+  /// Create all analysis contexts in [collectionIncludedPaths].
+  void _createAnalysisContexts() {
+    _analysisContextCollection = AnalysisContextCollectionImpl(
+      declaredVariables: _declaredVariables,
+      enableIndex: true,
+      includedPaths: collectionIncludedPaths.map(convertPath).toList(),
+      resourceProvider: resourceProvider,
+      sdkPath: convertPath('/sdk'),
+    );
+  }
+}
+
+class PubPackageResolutionTest extends ContextResolutionTest {
+  AnalysisOptionsImpl get analysisOptions {
+    var path = convertPath(testPackageRootPath);
+    return contextFor(path).analysisOptions;
+  }
+
+  @override
+  List<String> get collectionIncludedPaths => [workspaceRootPath];
+
+  @override
+  String get testFilePath => '$testPackageLibPath/test.dart';
+
+  String get testPackageLibPath => '$testPackageRootPath/lib';
+
+  String get testPackageRootPath => '$workspaceRootPath/test';
+
+  String get workspaceRootPath => '/home';
+
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfig({});
+  }
+
+  void writeTestPackageAnalysisOptionsFile(
+    AnalysisOptionsFileConfig builder,
+  ) {
+    newFile(
+      '$testPackageRootPath/analysis_options.yaml',
+      content: builder.toContent(),
+    );
+  }
+
+  void writeTestPackageConfig(Map<String, String> nameToRootPath) {
+    nameToRootPath = {'test': testPackageRootPath, ...nameToRootPath};
+
+    var packagesFileBuffer = StringBuffer();
+    for (var entry in nameToRootPath.entries) {
+      var name = entry.key;
+      var rootPath = entry.value;
+      packagesFileBuffer.writeln(name + ':' + toUriStr('$rootPath/lib'));
+    }
+    // TODO(scheglov) Use package_config.json
+    newFile(
+      '$testPackageRootPath/.packages',
+      content: '$packagesFileBuffer',
+    );
+  }
+
+  void writeTestPackageConfigWith(
+    Map<String, String> nameToRootPath, {
+    bool meta = false,
+  }) {
+    var metaPath = '/packages/meta';
+    PackagesContent.addMetaPackageFiles(
+      getFolder(metaPath),
+    );
+
+    writeTestPackageConfig({
+      if (meta) 'meta': metaPath,
+      ...nameToRootPath,
+    });
+  }
+
+  void writeTestPackageConfigWithMeta() {
+    writeTestPackageConfigWith({}, meta: true);
+  }
+}
+
+mixin WithNullSafetyMixin on PubPackageResolutionTest {
+  @override
+  bool get typeToStringWithNullability => true;
+
+  @nonVirtual
+  @override
+  void setUp() {
+    super.setUp();
+
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        experiments: [EnableString.non_nullable],
+      ),
+    );
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart b/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
index 8503999..45021c6 100644
--- a/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
@@ -4,12 +4,15 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/context_locator.dart' as api;
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/context/context_root.dart';
 import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart'
+    as api;
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
@@ -18,6 +21,7 @@
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:meta/meta.dart';
 
 import 'resolution.dart';
 
@@ -40,6 +44,25 @@
 
   bool get enableIndex => false;
 
+  void configureWorkspace({@required String root}) {
+    newFolder(root);
+
+    var apiContextRoots = api.ContextLocator(
+      resourceProvider: resourceProvider,
+    ).locateRoots(
+      includedPaths: [convertPath(root)],
+      excludedPaths: [],
+    );
+
+    driver.configure(
+      analysisContext: api.DriverBasedAnalysisContext(
+        resourceProvider,
+        apiContextRoots.first,
+        driver,
+      ),
+    );
+  }
+
   @override
   Future<ResolvedUnitResult> resolveFile(String path) async {
     return await driver.getResult(path);
@@ -82,6 +105,8 @@
         enableIndex: enableIndex,
         packages: Packages.empty);
 
+    configureWorkspace(root: '/test');
+
     scheduler.start();
   }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/enum_test.dart b/pkg/analyzer/test/src/dart/resolution/enum_test.dart
index cf358a3..c4dc7ed 100644
--- a/pkg/analyzer/test/src/dart/resolution/enum_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/enum_test.dart
@@ -5,7 +5,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class EnumDriverResolutionTest extends DriverResolutionTest {
+class EnumDriverResolutionTest extends PubPackageResolutionTest {
   test_inference_listLiteral() async {
     await assertNoErrorsInCode(r'''
 enum E1 {a, b}
diff --git a/pkg/analyzer/test/src/dart/resolution/export_test.dart b/pkg/analyzer/test/src/dart/resolution/export_test.dart
index 8fcf08b..fe41eaf 100644
--- a/pkg/analyzer/test/src/dart/resolution/export_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/export_test.dart
@@ -2,11 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,16 +14,16 @@
 }
 
 @reflectiveTest
-class ExportResolutionTest extends DriverResolutionTest {
+class ExportResolutionTest extends PubPackageResolutionTest {
   test_configurations_default() async {
-    newFile('/test/lib/a.dart', content: 'class A {}');
-    newFile('/test/lib/a_html.dart', content: 'class A {}');
-    newFile('/test/lib/a_io.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_html.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_io.dart', content: 'class A {}');
 
-    _setDeclaredVariables({
+    declaredVariables = {
       'dart.library.html': 'false',
       'dart.library.io': 'false',
-    });
+    };
 
     await assertNoErrorsInCode(r'''
 export 'a.dart'
@@ -45,14 +44,14 @@
   }
 
   test_configurations_first() async {
-    newFile('/test/lib/a.dart', content: 'class A {}');
-    newFile('/test/lib/a_html.dart', content: 'class A {}');
-    newFile('/test/lib/a_io.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_html.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_io.dart', content: 'class A {}');
 
-    _setDeclaredVariables({
+    declaredVariables = {
       'dart.library.html': 'true',
       'dart.library.io': 'false',
-    });
+    };
 
     await assertNoErrorsInCode(r'''
 export 'a.dart'
@@ -73,14 +72,14 @@
   }
 
   test_configurations_second() async {
-    newFile('/test/lib/a.dart', content: 'class A {}');
-    newFile('/test/lib/a_html.dart', content: 'class A {}');
-    newFile('/test/lib/a_io.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_html.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_io.dart', content: 'class A {}');
 
-    _setDeclaredVariables({
+    declaredVariables = {
       'dart.library.html': 'false',
       'dart.library.io': 'true',
-    });
+    };
 
     await assertNoErrorsInCode(r'''
 export 'a.dart'
@@ -102,7 +101,7 @@
 
   /// Test that both getter and setter are in the export namespace.
   test_namespace_getter_setter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 get f => null;
 set f(_) {}
 ''');
@@ -113,9 +112,4 @@
     expect(exportNamespace.get('f'), isNotNull);
     expect(exportNamespace.get('f='), isNotNull);
   }
-
-  void _setDeclaredVariables(Map<String, String> map) {
-    driver.declaredVariables = DeclaredVariables.fromMap(map);
-    driver.configure();
-  }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/extension_method_test.dart b/pkg/analyzer/test/src/dart/resolution/extension_method_test.dart
index 1c9f147..0dc26d5 100644
--- a/pkg/analyzer/test/src/dart/resolution/extension_method_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/extension_method_test.dart
@@ -2,34 +2,32 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ExtensionMethodsDeclarationTest);
-    defineReflectiveTests(ExtensionMethodsDeclarationWithNnbdTest);
+    defineReflectiveTests(ExtensionMethodsDeclarationWithNullSafetyTest);
     defineReflectiveTests(ExtensionMethodsExtendedTypeTest);
-    defineReflectiveTests(ExtensionMethodsExtendedTypeWithNnbdTest);
+    defineReflectiveTests(ExtensionMethodsExtendedTypeWithNullSafetyTest);
     defineReflectiveTests(ExtensionMethodsExternalReferenceTest);
-    defineReflectiveTests(ExtensionMethodsExternalReferenceWithNnbdTest);
+    defineReflectiveTests(ExtensionMethodsExternalReferenceWithNullSafetyTest);
     defineReflectiveTests(ExtensionMethodsInternalReferenceTest);
-    defineReflectiveTests(ExtensionMethodsInternalReferenceWithNnbdTest);
+    defineReflectiveTests(ExtensionMethodsInternalReferenceWithNullSafetyTest);
   });
 }
 
 /// Tests that show that extension declarations and the members inside them are
 /// resolved correctly.
 @reflectiveTest
-class ExtensionMethodsDeclarationTest extends DriverResolutionTest {
+class ExtensionMethodsDeclarationTest extends PubPackageResolutionTest {
   @override
   List<MockSdkLibrary> get additionalMockSdkLibraries => [
         MockSdkLibrary([
@@ -40,12 +38,14 @@
 
 class A {}
 '''),
+        ]),
+        MockSdkLibrary([
           MockSdkLibraryUnit('dart:test2', 'test2/test2.dart', r'''
 extension E on Object {
   int get a => 1;
 }
 '''),
-        ])
+        ]),
       ];
 
   test_constructor() async {
@@ -137,7 +137,7 @@
   }
 
   test_visibility_hidden() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 extension E on C {
   int a = 1;
@@ -150,12 +150,12 @@
   c.a;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 40, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 40, 1),
     ]);
   }
 
   test_visibility_notShown() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 extension E on C {
   int a = 1;
@@ -168,12 +168,12 @@
   c.a;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 40, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 40, 1),
     ]);
   }
 
   test_visibility_shadowed_byClass() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 extension E on C {
   int get a => 1;
@@ -194,12 +194,12 @@
   }
 
   test_visibility_shadowed_byImport() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 extension E on Object {
   int get a => 1;
 }
 ''');
-    newFile('/test/lib/lib2.dart', content: '''
+    newFile('$testPackageLibPath/lib2.dart', content: '''
 class E {}
 class A {}
 ''');
@@ -218,7 +218,7 @@
   }
 
   test_visibility_shadowed_byLocal_imported() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 extension E on C {
   int get a => 1;
@@ -259,7 +259,7 @@
   }
 
   test_visibility_shadowed_byTopLevelVariable() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 extension E on C {
   int get a => 1;
@@ -280,7 +280,7 @@
   }
 
   test_visibility_shadowed_platformByNonPlatform() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 extension E on Object {
   int get a => 1;
 }
@@ -297,7 +297,7 @@
   }
 
   test_visibility_withPrefix() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 extension E on C {
   int get a => 1;
@@ -316,15 +316,8 @@
 /// Tests that show that extension declarations and the members inside them are
 /// resolved correctly.
 @reflectiveTest
-class ExtensionMethodsDeclarationWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class ExtensionMethodsDeclarationWithNullSafetyTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_this_type_interface() async {
     await assertNoErrorsInCode('''
 extension E on int {
@@ -362,7 +355,7 @@
 /// Tests that show that extension declarations support all of the possible
 /// types in the `on` clause.
 @reflectiveTest
-class ExtensionMethodsExtendedTypeTest extends DriverResolutionTest {
+class ExtensionMethodsExtendedTypeTest extends PubPackageResolutionTest {
   test_named_generic() async {
     await assertNoErrorsInCode('''
 class C<T> {}
@@ -483,21 +476,13 @@
 }
 
 @reflectiveTest
-class ExtensionMethodsExtendedTypeWithNnbdTest
-    extends ExtensionMethodsExtendedTypeTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-}
+class ExtensionMethodsExtendedTypeWithNullSafetyTest
+    extends ExtensionMethodsExtendedTypeTest with WithNullSafetyMixin {}
 
 /// Tests that extension members can be correctly resolved when referenced
 /// by code external to the extension declaration.
 @reflectiveTest
-class ExtensionMethodsExternalReferenceTest extends DriverResolutionTest {
+class ExtensionMethodsExternalReferenceTest extends PubPackageResolutionTest {
   /// Corresponds to: extension_member_resolution_t07
   test_dynamicInvocation() async {
     await assertNoErrorsInCode(r'''
@@ -964,8 +949,8 @@
 extension on Object {}
 var a = b + c;
 ''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 31, 1),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 35, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 31, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 35, 1),
     ]);
   }
 
@@ -1241,7 +1226,7 @@
   }
 
   test_static_field_importedWithPrefix() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 
 extension E on C {
@@ -1279,7 +1264,7 @@
   }
 
   test_static_getter_importedWithPrefix() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 
 extension E on C {
@@ -1317,7 +1302,7 @@
   }
 
   test_static_method_importedWithPrefix() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 
 extension E on C {
@@ -1355,7 +1340,7 @@
   }
 
   test_static_setter_importedWithPrefix() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 
 extension E on C {
@@ -1436,16 +1421,8 @@
 }
 
 @reflectiveTest
-class ExtensionMethodsExternalReferenceWithNnbdTest
-    extends ExtensionMethodsExternalReferenceTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class ExtensionMethodsExternalReferenceWithNullSafetyTest
+    extends ExtensionMethodsExternalReferenceTest with WithNullSafetyMixin {
   test_instance_getter_fromInstance_Never() async {
     await assertNoErrorsInCode('''
 extension E on Never {
@@ -1615,10 +1592,10 @@
 }
 
 f(int? a) {
-  a?.[0];
+  a?[0];
 }
 ''');
-    var index = findNode.index('a?.[0]');
+    var index = findNode.index('a?[0]');
     assertElement(index, findElement.method('[]'));
   }
 
@@ -1705,7 +1682,7 @@
 /// Tests that extension members can be correctly resolved when referenced
 /// by code internal to (within) the extension declaration.
 @reflectiveTest
-class ExtensionMethodsInternalReferenceTest extends DriverResolutionTest {
+class ExtensionMethodsInternalReferenceTest extends PubPackageResolutionTest {
   test_instance_call() async {
     await assertNoErrorsInCode('''
 class C {}
@@ -2242,13 +2219,5 @@
 }
 
 @reflectiveTest
-class ExtensionMethodsInternalReferenceWithNnbdTest
-    extends ExtensionMethodsInternalReferenceTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-}
+class ExtensionMethodsInternalReferenceWithNullSafetyTest
+    extends ExtensionMethodsInternalReferenceTest with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/extension_override_test.dart b/pkg/analyzer/test/src/dart/resolution/extension_override_test.dart
index cbb0bde..9bf497b 100644
--- a/pkg/analyzer/test/src/dart/resolution/extension_override_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/extension_override_test.dart
@@ -10,8 +10,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../constant/potentially_constant_test.dart';
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -21,7 +20,7 @@
 }
 
 @reflectiveTest
-class ExtensionOverrideTest extends DriverResolutionTest {
+class ExtensionOverrideTest extends PubPackageResolutionTest {
   ExtensionElement extension;
   ExtensionOverride extensionOverride;
 
@@ -72,7 +71,7 @@
   }
 
   test_call_prefix_noTypeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E on A {
   int call(String s) => 0;
@@ -94,7 +93,7 @@
 
   test_call_prefix_typeArguments() async {
     // The test is failing because we're not yet doing type inference.
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E<T> on A {
   int call(T s) => 0;
@@ -170,7 +169,7 @@
   }
 
   test_getter_prefix_noTypeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E on A {
   int get g => 0;
@@ -191,7 +190,7 @@
   }
 
   test_getter_prefix_typeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E<T> on A {
   int get g => 0;
@@ -242,7 +241,7 @@
   }
 
   test_method_prefix_noTypeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E on A {
   void m() {}
@@ -263,7 +262,7 @@
   }
 
   test_method_prefix_typeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E<T> on A {
   void m() {}
@@ -331,7 +330,7 @@
   }
 
   test_operator_prefix_noTypeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E on A {
   void operator +(int offset) {}
@@ -352,7 +351,7 @@
   }
 
   test_operator_prefix_typeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E<T> on A {
   void operator +(int offset) {}
@@ -403,7 +402,7 @@
   }
 
   test_setter_prefix_noTypeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E on A {
   set s(int x) {}
@@ -424,7 +423,7 @@
   }
 
   test_setter_prefix_typeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E<T> on A {
   set s(int x) {}
@@ -477,7 +476,7 @@
   }
 
   test_setterAndGetter_prefix_noTypeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E on A {
   int get s => 0;
@@ -499,7 +498,7 @@
   }
 
   test_setterAndGetter_prefix_typeArguments() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class A {}
 extension E<T> on A {
   int get s => 0;
@@ -614,7 +613,7 @@
 }
 
 void f(int? a) {
-  E(a)?.[0];
+  E(a)?[0];
 }
 ''');
 
@@ -633,7 +632,7 @@
 }
 
 void f(int? a) {
-  E(a)?.[0] = 1;
+  E(a)?[0] = 1;
 }
 ''');
 
diff --git a/pkg/analyzer/test/src/dart/resolution/field_test.dart b/pkg/analyzer/test/src/dart/resolution/field_test.dart
index 274d030..90d814b 100644
--- a/pkg/analyzer/test/src/dart/resolution/field_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/field_test.dart
@@ -4,8 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../constant/potentially_constant_test.dart';
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +14,7 @@
 }
 
 @reflectiveTest
-class FieldTest extends DriverResolutionTest {
+class FieldTest extends PubPackageResolutionTest {
   test_type_inferred_int() async {
     await resolveTestCode('''
 class A {
@@ -60,9 +59,10 @@
 }
 
 @reflectiveTest
-class FieldWithNullSafetyTest extends FieldTest with WithNullSafetyMixin {
+class FieldWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_type_inferred_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 var a = 0;
 ''');
diff --git a/pkg/analyzer/test/src/dart/resolution/for_element_test.dart b/pkg/analyzer/test/src/dart/resolution/for_element_test.dart
index 7dc6aef..1483cdc 100644
--- a/pkg/analyzer/test/src/dart/resolution/for_element_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/for_element_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ForEachElementTest);
-    defineReflectiveTests(ForEachElementWithNnbdTest);
+    defineReflectiveTests(ForEachElementWithNullSafetyTest);
     defineReflectiveTests(ForLoopElementTest);
   });
 }
 
 @reflectiveTest
-class ForEachElementTest extends DriverResolutionTest {
+class ForEachElementTest extends PubPackageResolutionTest {
   test_withDeclaration_scope() async {
     await assertNoErrorsInCode(r'''
 main() {
@@ -51,14 +49,10 @@
 }
 
 @reflectiveTest
-class ForEachElementWithNnbdTest extends ForEachElementTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
+class ForEachElementWithNullSafetyTest extends ForEachElementTest
+    with WithNullSafetyMixin {
   test_optIn_fromOptOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A implements Iterable<int> {
   Iterator<int> iterator => throw 0;
 }
@@ -78,7 +72,7 @@
 }
 
 @reflectiveTest
-class ForLoopElementTest extends DriverResolutionTest {
+class ForLoopElementTest extends PubPackageResolutionTest {
   test_condition_rewrite() async {
     await assertNoErrorsInCode(r'''
 main(bool Function() b) {
diff --git a/pkg/analyzer/test/src/dart/resolution/for_statement_test.dart b/pkg/analyzer/test/src/dart/resolution/for_statement_test.dart
index 8e874b8..bce6cd2 100644
--- a/pkg/analyzer/test/src/dart/resolution/for_statement_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/for_statement_test.dart
@@ -2,11 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/error/codes.dart';
-import 'package:test/test.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,33 +14,72 @@
   });
 }
 
+/// TODO(scheglov) Move other for-in tests here.
 @reflectiveTest
-class ForEachStatementResolutionTest extends DriverResolutionTest {
-  test_importPrefix_asIterable() async {
-    // TODO(scheglov) Remove this test (already tested as import prefix).
-    // TODO(scheglov) Move other for-in tests here.
+class ForEachStatementResolutionTest extends PubPackageResolutionTest {
+  test_iterable_missing() async {
     await assertErrorsInCode(r'''
-import 'dart:async' as p;
-
-main() {
-  for (var x in p) {}
+void f() {
+  for (var v in) {
+    v;
+  }
 }
 ''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 47, 1),
-      error(CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT, 52, 1),
+      error(ParserErrorCode.MISSING_IDENTIFIER, 26, 1),
     ]);
 
-    var xRef = findNode.simple('x in');
-    expect(xRef.staticElement, isNotNull);
+    assertType(findElement.localVar('v').type, 'dynamic');
+    assertType(findNode.simple('v;'), 'dynamic');
+  }
 
-    var pRef = findNode.simple('p) {}');
-    assertElement(pRef, findElement.prefix('p'));
-    assertTypeDynamic(pRef);
+  /// Test that the parameter `x` is in the scope of the iterable.
+  /// But the declared identifier `x` is in the scope of the body.
+  test_scope() async {
+    await assertNoErrorsInCode('''
+void f(List<List<int>> x) {
+  for (int x in x.first) {
+    x.isEven;
+  }
+}
+''');
+
+    assertElement(
+      findNode.simple('x) {'),
+      findElement.parameter('x'),
+    );
+
+    assertElement(
+      findNode.simple('x.isEven'),
+      findElement.localVar('x'),
+    );
+  }
+
+  test_type_genericFunctionType() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  for (Null Function<T>(T, Null) e in <dynamic>[]) {
+    e;
+  }
+}
+''');
+  }
+
+  test_type_inferred() async {
+    await assertNoErrorsInCode(r'''
+void f(List<int> a) {
+  for (var v in a) {
+    v;
+  }
+}
+''');
+
+    assertType(findElement.localVar('v').type, 'int');
+    assertType(findNode.simple('v;'), 'int');
   }
 }
 
 @reflectiveTest
-class ForLoopStatementResolutionTest extends DriverResolutionTest {
+class ForLoopStatementResolutionTest extends PubPackageResolutionTest {
   test_condition_rewrite() async {
     await assertNoErrorsInCode(r'''
 main(bool Function() b) {
diff --git a/pkg/analyzer/test/src/dart/resolution/function_declaration_test.dart b/pkg/analyzer/test/src/dart/resolution/function_declaration_test.dart
new file mode 100644
index 0000000..549f57a
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/function_declaration_test.dart
@@ -0,0 +1,50 @@
+// 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:test_reflective_loader/test_reflective_loader.dart';
+
+import 'context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FunctionDeclarationResolutionTest);
+  });
+}
+
+@reflectiveTest
+class FunctionDeclarationResolutionTest extends PubPackageResolutionTest {
+  test_formalParameterScope_defaultValue() async {
+    await assertNoErrorsInCode('''
+const foo = 0;
+
+void bar([int foo = foo + 1]) {
+}
+''');
+
+    assertElement(
+      findNode.simple('foo + 1'),
+      findElement.topGet('foo'),
+    );
+  }
+
+  test_formalParameterScope_type() async {
+    await assertNoErrorsInCode('''
+class a {}
+
+void bar(a a) {
+  a;
+}
+''');
+
+    assertElement(
+      findNode.simple('a a'),
+      findElement.class_('a'),
+    );
+
+    assertElement(
+      findNode.simple('a;'),
+      findElement.parameter('a'),
+    );
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/function_expression_invocation_test.dart b/pkg/analyzer/test/src/dart/resolution/function_expression_invocation_test.dart
index 03d250f..6d80f3d 100644
--- a/pkg/analyzer/test/src/dart/resolution/function_expression_invocation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/function_expression_invocation_test.dart
@@ -2,23 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(FunctionExpressionInvocationTest);
-    defineReflectiveTests(FunctionExpressionInvocationWithNnbdTest);
+    defineReflectiveTests(FunctionExpressionInvocationWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class FunctionExpressionInvocationTest extends DriverResolutionTest {
+class FunctionExpressionInvocationTest extends PubPackageResolutionTest {
   test_dynamic_withoutTypeArguments() async {
     await assertNoErrorsInCode(r'''
 main() {
@@ -53,17 +50,8 @@
 }
 
 @reflectiveTest
-class FunctionExpressionInvocationWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    )
-    ..implicitCasts = false;
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class FunctionExpressionInvocationWithNullSafetyTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_call_infer_fromArguments() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -176,7 +164,7 @@
   x<int>(1 + 2);
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
     ]);
 
     assertFunctionExpressionInvocation(
diff --git a/pkg/analyzer/test/src/dart/resolution/function_type_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/function_type_alias_test.dart
index 7aef66f..b612327 100644
--- a/pkg/analyzer/test/src/dart/resolution/function_type_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/function_type_alias_test.dart
@@ -6,7 +6,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class FunctionTypeAliasResolutionTest extends DriverResolutionTest {
+class FunctionTypeAliasResolutionTest extends PubPackageResolutionTest {
   test_type_element() async {
     await resolveTestCode(r'''
 G<int> g;
diff --git a/pkg/analyzer/test/src/dart/resolution/generic_function_type_test.dart b/pkg/analyzer/test/src/dart/resolution/generic_function_type_test.dart
index e1ff7a0..3332d08 100644
--- a/pkg/analyzer/test/src/dart/resolution/generic_function_type_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/generic_function_type_test.dart
@@ -6,7 +6,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class GenericFunctionTypeResolutionTest extends DriverResolutionTest {
+class GenericFunctionTypeResolutionTest extends PubPackageResolutionTest {
   /// Test that when [GenericFunctionType] is used in a constant variable
   /// initializer, analysis does not throw an exception; and that the next
   /// [GenericFunctionType] is also handled correctly.
diff --git a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
index 1ae8a7d..8c2193c 100644
--- a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
@@ -8,7 +8,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +17,7 @@
 }
 
 @reflectiveTest
-class GenericTypeAliasDriverResolutionTest extends DriverResolutionTest {
+class GenericTypeAliasDriverResolutionTest extends PubPackageResolutionTest {
   test_genericFunctionTypeCannotBeTypeArgument_def_class() async {
     await assertErrorsInCode(r'''
 class C<T> {}
@@ -122,12 +122,12 @@
 ''', [
       error(ParserErrorCode.INVALID_GENERIC_FUNCTION_TYPE, 13, 1),
       error(ParserErrorCode.EXPECTED_TYPE_NAME, 15, 1),
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 33, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 33, 1),
     ]);
   }
 
   test_missingGenericFunction_imported_withPrefix() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 typedef F<T> = ;
 ''');
     await assertErrorsInCode(r'''
@@ -137,7 +137,7 @@
   p.F.a;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 40, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 40, 1),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/dart/resolution/if_element_test.dart b/pkg/analyzer/test/src/dart/resolution/if_element_test.dart
index 83b70b9..785f95a 100644
--- a/pkg/analyzer/test/src/dart/resolution/if_element_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/if_element_test.dart
@@ -2,21 +2,19 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(IfElementTest);
-    defineReflectiveTests(IfElementWithNnbdTest);
+    defineReflectiveTests(IfElementWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class IfElementTest extends DriverResolutionTest {
+class IfElementTest extends PubPackageResolutionTest {
   test_condition_rewrite() async {
     await assertNoErrorsInCode(r'''
 main(bool Function() b) {
@@ -35,9 +33,5 @@
 }
 
 @reflectiveTest
-class IfElementWithNnbdTest extends IfElementTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-}
+class IfElementWithNullSafetyTest extends IfElementTest
+    with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/if_statement_test.dart b/pkg/analyzer/test/src/dart/resolution/if_statement_test.dart
index d80e0e2..7b647cb 100644
--- a/pkg/analyzer/test/src/dart/resolution/if_statement_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/if_statement_test.dart
@@ -4,7 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -13,7 +13,7 @@
 }
 
 @reflectiveTest
-class IfStatementResolutionTest extends DriverResolutionTest {
+class IfStatementResolutionTest extends PubPackageResolutionTest {
   test_condition_rewrite() async {
     await assertNoErrorsInCode(r'''
 main(bool Function() b) {
diff --git a/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
index f71c1ba..66c665f 100644
--- a/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
@@ -6,7 +6,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class ImportPrefixDriverResolutionTest extends DriverResolutionTest {
+class ImportPrefixDriverResolutionTest extends PubPackageResolutionTest {
   test_asExpression_expressionStatement() async {
     await assertErrorsInCode(r'''
 import 'dart:async' as p;
diff --git a/pkg/analyzer/test/src/dart/resolution/import_test.dart b/pkg/analyzer/test/src/dart/resolution/import_test.dart
index 78a4392..145bae8 100644
--- a/pkg/analyzer/test/src/dart/resolution/import_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/import_test.dart
@@ -2,10 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,16 +13,16 @@
 }
 
 @reflectiveTest
-class ImportDirectiveResolutionTest extends DriverResolutionTest {
+class ImportDirectiveResolutionTest extends PubPackageResolutionTest {
   test_configurations_default() async {
-    newFile('/test/lib/a.dart', content: 'class A {}');
-    newFile('/test/lib/a_html.dart', content: 'class A {}');
-    newFile('/test/lib/a_io.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_html.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_io.dart', content: 'class A {}');
 
-    _setDeclaredVariables({
+    declaredVariables = {
       'dart.library.html': 'false',
       'dart.library.io': 'false',
-    });
+    };
 
     await assertNoErrorsInCode(r'''
 import 'a.dart'
@@ -44,14 +43,14 @@
   }
 
   test_configurations_first() async {
-    newFile('/test/lib/a.dart', content: 'class A {}');
-    newFile('/test/lib/a_html.dart', content: 'class A {}');
-    newFile('/test/lib/a_io.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_html.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_io.dart', content: 'class A {}');
 
-    _setDeclaredVariables({
+    declaredVariables = {
       'dart.library.html': 'true',
       'dart.library.io': 'false',
-    });
+    };
 
     await assertNoErrorsInCode(r'''
 import 'a.dart'
@@ -72,14 +71,14 @@
   }
 
   test_configurations_second() async {
-    newFile('/test/lib/a.dart', content: 'class A {}');
-    newFile('/test/lib/a_html.dart', content: 'class A {}');
-    newFile('/test/lib/a_io.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_html.dart', content: 'class A {}');
+    newFile('$testPackageLibPath/a_io.dart', content: 'class A {}');
 
-    _setDeclaredVariables({
+    declaredVariables = {
       'dart.library.html': 'false',
       'dart.library.io': 'true',
-    });
+    };
 
     await assertNoErrorsInCode(r'''
 import 'a.dart'
@@ -98,9 +97,4 @@
     var a = findElement.topVar('a');
     assertElementLibraryUri(a.type.element, 'package:test/a_io.dart');
   }
-
-  void _setDeclaredVariables(Map<String, String> map) {
-    driver.declaredVariables = DeclaredVariables.fromMap(map);
-    driver.configure();
-  }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/index_expression_test.dart b/pkg/analyzer/test/src/dart/resolution/index_expression_test.dart
index 80d9ab1..4cf9ec2 100644
--- a/pkg/analyzer/test/src/dart/resolution/index_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/index_expression_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(IndexExpressionTest);
-    defineReflectiveTests(IndexExpressionWithNnbdTest);
+    defineReflectiveTests(IndexExpressionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class IndexExpressionTest extends DriverResolutionTest {
+class IndexExpressionTest extends PubPackageResolutionTest {
   test_read() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -238,15 +236,8 @@
 }
 
 @reflectiveTest
-class IndexExpressionWithNnbdTest extends IndexExpressionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class IndexExpressionWithNullSafetyTest extends IndexExpressionTest
+    with WithNullSafetyMixin {
   test_read_cascade_nullShorting() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -299,28 +290,6 @@
     );
   }
 
-  test_read_nullable_questionDotIndex() async {
-    await assertNoErrorsInCode(r'''
-class A {
-  bool operator[](int index) => false;
-}
-
-main(A? a) {
-  a?.[0];
-}
-''');
-
-    var indexElement = findElement.method('[]');
-
-    var indexExpression = findNode.index('a?.[0]');
-    assertIndexExpression(
-      indexExpression,
-      readElement: indexElement,
-      writeElement: null,
-      type: 'bool?',
-    );
-  }
-
   test_readWrite_nullable() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -361,46 +330,6 @@
     );
   }
 
-  test_readWrite_nullable_questionDotIndex() async {
-    await assertNoErrorsInCode(r'''
-class A {
-  num operator[](int index) => 0;
-  void operator[]=(int index, num value) {}
-}
-
-main(A? a) {
-  a?.[0] += 1.2;
-}
-''');
-
-    var indexElement = findElement.method('[]');
-    var indexEqElement = findElement.method('[]=');
-    var numPlusElement = numElement.getMethod('+');
-
-    var indexExpression = findNode.index('a?.[0]');
-    assertIndexExpression(
-      indexExpression,
-      readElement: indexElement,
-      writeElement: indexEqElement,
-      type: 'num',
-    );
-    assertParameterElement(
-      indexExpression.index,
-      indexEqElement.parameters[0],
-    );
-
-    var assignment = indexExpression.parent as AssignmentExpression;
-    assertAssignment(
-      assignment,
-      operatorElement: numPlusElement,
-      type: 'num?',
-    );
-    assertParameterElement(
-      assignment.rightHandSide,
-      numPlusElement.parameters[0],
-    );
-  }
-
   test_write_cascade_nullShorting() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -464,38 +393,4 @@
     );
     assertParameterElement(assignment.rightHandSide, null);
   }
-
-  test_write_nullable_questionDotIndex() async {
-    await assertNoErrorsInCode(r'''
-class A {
-  void operator[]=(int index, num value) {}
-}
-
-main(A? a) {
-  a?.[0] = 1.2;
-}
-''');
-
-    var indexEqElement = findElement.method('[]=');
-
-    var indexExpression = findNode.index('a?.[0]');
-    assertIndexExpression(
-      indexExpression,
-      readElement: null,
-      writeElement: indexEqElement,
-      type: null,
-    );
-    assertParameterElement(
-      indexExpression.index,
-      indexEqElement.parameters[0],
-    );
-
-    var assignment = indexExpression.parent as AssignmentExpression;
-    assertAssignment(
-      assignment,
-      operatorElement: null,
-      type: 'double?',
-    );
-    assertParameterElement(assignment.rightHandSide, null);
-  }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
index 5091559..d9eda13 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,12 @@
 }
 
 @reflectiveTest
-class InstanceCreationDriverResolutionTest extends DriverResolutionTest {
+class InstanceCreationDriverResolutionTest extends PubPackageResolutionTest {
   test_error_newWithInvalidTypeParameters_implicitNew_inference_top() async {
     await assertErrorsInCode(r'''
 final foo = Map<int>();
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 12, 8),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 12, 8),
     ]);
 
     var creation = findNode.instanceCreation('Map<int>');
@@ -42,8 +42,8 @@
   new Foo.bar<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-          53, 5),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR, 53,
+          5),
     ]);
 
     var creation = findNode.instanceCreation('Foo.bar<int>');
@@ -58,7 +58,7 @@
   }
 
   test_error_wrongNumberOfTypeArgumentsConstructor_explicitNew_prefix() async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 class Foo<X> {
   Foo.bar();
 }
@@ -70,8 +70,8 @@
   new p.Foo.bar<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-          44, 3),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR, 44,
+          3),
     ]);
 
     // TODO(brianwilkerson) Test this more carefully after we can re-write the
@@ -97,8 +97,8 @@
   Foo.bar<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-          49, 5),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR, 49,
+          5),
     ]);
 
     var creation = findNode.instanceCreation('Foo.bar<int>');
@@ -117,7 +117,7 @@
   }
 
   test_error_wrongNumberOfTypeArgumentsConstructor_implicitNew_prefix() async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 class Foo<X> {
   Foo.bar();
 }
@@ -129,8 +129,8 @@
   p.Foo.bar<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
-          43, 5),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR, 43,
+          5),
     ]);
 
     var import = findElement.import('package:test/a.dart');
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
index 42b09ff..a4d9df5 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
@@ -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.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +16,7 @@
 }
 
 @reflectiveTest
-class InstanceMemberInferenceClassTest extends DriverResolutionTest {
+class InstanceMemberInferenceClassTest extends PubPackageResolutionTest {
   test_field_covariant_fromField() async {
     await resolveTestCode('''
 class A {
@@ -916,17 +914,9 @@
 
 @reflectiveTest
 class InstanceMemberInferenceClassWithNullSafetyTest
-    extends InstanceMemberInferenceClassTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+    extends InstanceMemberInferenceClassTest with WithNullSafetyMixin {
   test_field_multiple_gettersSetters_final_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 abstract class A {
   int get foo;
@@ -948,7 +938,7 @@
   }
 
   test_field_multiple_gettersSetters_notFinal_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 abstract class A {
   int get foo;
@@ -970,7 +960,7 @@
   }
 
   test_field_single_getter_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 abstract class A {
   int get foo;
@@ -988,7 +978,7 @@
   }
 
   test_field_single_setter_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 abstract class A {
   set foo(int _);
@@ -1006,7 +996,7 @@
   }
 
   test_getter_single_getter_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 abstract class A {
   int get foo;
@@ -1024,7 +1014,7 @@
   }
 
   test_getter_single_setter_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 abstract class A {
   set foo(int _);
@@ -1060,7 +1050,7 @@
   }
 
   test_method_parameter_required_single_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 class A {
   void foo(int p) {}
@@ -1096,7 +1086,7 @@
   }
 
   test_method_return_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 abstract class A {
   int foo();
@@ -1114,7 +1104,7 @@
   }
 
   test_setter_single_getter_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 abstract class A {
   int get foo;
@@ -1132,7 +1122,7 @@
   }
 
   test_setter_single_setter_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 abstract class A {
   set foo(int _);
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
index 0f6a4a8..53579d1 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
@@ -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.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,7 +14,7 @@
 }
 
 @reflectiveTest
-class InstanceMemberInferenceClassTest extends DriverResolutionTest {
+class InstanceMemberInferenceClassTest extends PubPackageResolutionTest {
   test_invalid_inheritanceCycle() async {
     await resolveTestCode('''
 class A extends C {}
@@ -323,15 +321,7 @@
 
 @reflectiveTest
 class InstanceMemberInferenceClassWithNullSafetyTest
-    extends InstanceMemberInferenceClassTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+    extends InstanceMemberInferenceClassTest with WithNullSafetyMixin {
   test_method_parameter_required_multiple_different_merge() async {
     await resolveTestCode('''
 class A {
diff --git a/pkg/analyzer/test/src/dart/resolution/interpolation_string_test.dart b/pkg/analyzer/test/src/dart/resolution/interpolation_string_test.dart
new file mode 100644
index 0000000..4d02f28
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/interpolation_string_test.dart
@@ -0,0 +1,123 @@
+// 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:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InterpolationStringTest);
+  });
+}
+
+@reflectiveTest
+class InterpolationStringTest extends PubPackageResolutionTest {
+  void test_contents() async {
+    var code = r'''
+var bar;
+var f = "foo$bar";
+''';
+    await assertNoErrorsInCode(code);
+    final string = findNode.stringInterpolation(r'"foo$bar"');
+
+    expect(string.elements, hasLength(3));
+
+    final foo = string.elements[0] as InterpolationString;
+    var quoteOffset = code.indexOf('"');
+    expect(foo.contents.lexeme, '"foo');
+    expect(foo.contents.offset, quoteOffset);
+    expect(foo.contents.end, quoteOffset + '"foo'.length);
+  }
+
+  void test_contentsOffset() async {
+    var code = r'''
+var bar;
+var f = "foo${bar}baz";
+''';
+    await assertNoErrorsInCode(code);
+    final string = findNode.stringInterpolation(r'"foo${bar}baz"');
+    expect(string.elements, hasLength(3));
+    var quoteOffset = code.indexOf('"');
+
+    final foo = string.elements[0] as InterpolationString;
+    expect(foo.contentsOffset, quoteOffset + '"'.length);
+    expect(foo.contentsEnd, quoteOffset + '"foo'.length);
+
+    final bar = string.elements[2] as InterpolationString;
+    expect(bar.contentsOffset, quoteOffset + r'"foo${bar}'.length);
+    expect(bar.contentsEnd, quoteOffset + r'"foo${bar}baz'.length);
+  }
+
+  void test_contentsOffset_emptyEnd() async {
+    var code = r'''
+var bar;
+var f = "foo${bar}";
+''';
+    await assertNoErrorsInCode(code);
+    final string = findNode.stringInterpolation(r'"foo${bar}"');
+    expect(string.elements, hasLength(3));
+
+    final end = string.elements[2] as InterpolationString;
+    final endStringOffset = code.indexOf('";');
+    expect(end.contentsOffset, endStringOffset);
+    expect(end.contentsEnd, endStringOffset);
+  }
+
+  void test_contentsOffset_unterminated() async {
+    var code = r'''
+var bar;
+var f = "foo${bar}
+// deliberately unclosed
+;
+''';
+    await assertErrorsInCode(code, [
+      error(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, code.indexOf('}'), 1)
+    ]);
+    final string = findNode.stringInterpolation(r'"foo${bar}');
+    expect(string.elements, hasLength(3));
+
+    final end = string.elements[2] as InterpolationString;
+    final endStringOffset = code.indexOf('}') + 1;
+    expect(end.contentsOffset, endStringOffset);
+    expect(end.contentsEnd, endStringOffset);
+  }
+
+  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/42634')
+  void test_contentsOffset_unterminated_wrongQuote() async {
+    var code = r'''
+var bar;
+var f = "foo${bar}'
+// deliberately closed with wrong quote
+;
+''';
+    await assertErrorsInCode(code, [
+      error(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, code.indexOf("'"), 1),
+    ]);
+    final string = findNode.stringInterpolation('"foo\${bar}\'');
+    expect(string.elements, hasLength(3));
+
+    final end = string.elements[2] as InterpolationString;
+    expect(end.value, "'");
+    final endStringOffset = code.indexOf("'") + 1;
+    expect(end.contentsOffset, endStringOffset);
+    expect(end.contentsEnd, endStringOffset);
+  }
+
+  void test_value() async {
+    var code = r'''
+var bar;
+var f = "foo\n$bar";
+''';
+    await assertNoErrorsInCode(code);
+    final string = findNode.stringInterpolation(r'"foo\n$bar"');
+    expect(string.elements, hasLength(3));
+
+    final foo = string.elements[0] as InterpolationString;
+    expect(foo.value, "foo\n");
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/language_version_test.dart b/pkg/analyzer/test/src/dart/resolution/language_version_test.dart
index 2d30010..2391856 100644
--- a/pkg/analyzer/test/src/dart/resolution/language_version_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/language_version_test.dart
@@ -2,18 +2,16 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/context/packages.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.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/mock_sdk.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'driver_resolution.dart';
+import 'with_null_safety_mixin.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -24,16 +22,8 @@
 }
 
 @reflectiveTest
-class NullSafetyExperimentGlobalTest extends _FeaturesTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class NullSafetyExperimentGlobalTest extends _FeaturesTest
+    with WithNullSafetyMixin {
   test_jsonConfig_legacyContext_nonNullDependency() async {
     _configureTestWithJsonConfig('''
 {
@@ -141,10 +131,10 @@
     assertErrorsInList(result.errors, []);
     assertType(findElement.topVar('x').type, 'int*');
 
-    // Upgrade the language version to `2.9`, so enabled Null Safety.
+    // Upgrade the language version to `2.10`, so enabled Null Safety.
     driver.changeFile(path);
     await _resolveFile(path, r'''
-// @dart = 2.9
+// @dart = 2.10
 var x = 0;
 ''');
     assertType(findElement.topVar('x').type, 'int');
@@ -172,10 +162,10 @@
 ''');
     assertType(findElement.topVar('x').type, 'int*');
 
-    // Upgrade the language version to `2.9`, so enabled Null Safety.
+    // Upgrade the language version to `2.10`, so enabled Null Safety.
     _changeTestFile();
     await assertNoErrorsInCode('''
-// @dart = 2.9
+// @dart = 2.10
 var x = 0;
 ''');
     assertType(findElement.topVar('x').type, 'int');
diff --git a/pkg/analyzer/test/src/dart/resolution/library_element_test.dart b/pkg/analyzer/test/src/dart/resolution/library_element_test.dart
index 15bef67..3df95f6 100644
--- a/pkg/analyzer/test/src/dart/resolution/library_element_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/library_element_test.dart
@@ -2,14 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:meta/meta.dart';
 import 'package:pub_semver/pub_semver.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,9 +17,9 @@
 }
 
 @reflectiveTest
-class LibraryElementTest extends DriverResolutionTest {
+class LibraryElementTest extends PubPackageResolutionTest {
   test_languageVersion() async {
-    newFile('/test/.dart_tool/package_config.json', content: '''
+    newFile('$testPackageRootPath/.dart_tool/package_config.json', content: '''
 {
   "configVersion": 2,
   "packages": [
@@ -38,104 +37,350 @@
   ]
 }
 ''');
-    driver.configure(
-      packages: findPackagesFrom(
-        resourceProvider,
-        getFolder('/test'),
-      ),
-    );
 
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart = 2.6
 class A {}
 ''');
 
-    newFile('/test/lib/c.dart', content: r'''
+    newFile('$testPackageLibPath/c.dart', content: r'''
 // @dart = 2.9
 class A {}
 ''');
 
-    newFile('/test/lib/d.dart', content: r'''
+    newFile('$testPackageLibPath/d.dart', content: r'''
 // @dart = 2.99
 class A {}
 ''');
 
-    newFile('/test/lib/e.dart', content: r'''
+    newFile('$testPackageLibPath/e.dart', content: r'''
 // @dart = 3.0
 class A {}
 ''');
 
-    newFile('/aaa/lib/a.dart', content: r'''
+    newFile('$workspaceRootPath/aaa/lib/a.dart', content: r'''
 class A {}
 ''');
 
-    newFile('/aaa/lib/b.dart', content: r'''
+    newFile('$workspaceRootPath/aaa/lib/b.dart', content: r'''
 // @dart = 2.99
 class A {}
 ''');
 
-    newFile('/aaa/lib/c.dart', content: r'''
+    newFile('$workspaceRootPath/aaa/lib/c.dart', content: r'''
 // @dart = 3.0
 class A {}
 ''');
 
     // No override.
     await _assertLanguageVersion(
-      uriStr: 'package:test/a.dart',
+      path: '$testPackageLibPath/a.dart',
       package: Version.parse('2.7.0'),
       override: null,
     );
 
     // Valid override, less than the latest supported language version.
     await _assertLanguageVersion(
-      uriStr: 'package:test/b.dart',
+      path: '$testPackageLibPath/b.dart',
       package: Version.parse('2.7.0'),
       override: Version.parse('2.6.0'),
     );
 
     // Valid override, even if greater than the package language version.
     await _assertLanguageVersion(
-      uriStr: 'package:test/c.dart',
+      path: '$testPackageLibPath/c.dart',
       package: Version.parse('2.7.0'),
       override: Version.parse('2.9.0'),
     );
 
     // Invalid override: minor is greater than the latest minor.
     await _assertLanguageVersion(
-      uriStr: 'package:test/d.dart',
+      path: '$testPackageLibPath/d.dart',
       package: Version.parse('2.7.0'),
       override: null,
     );
 
     // Invalid override: major is greater than the latest major.
     await _assertLanguageVersion(
-      uriStr: 'package:test/e.dart',
+      path: '$testPackageLibPath/e.dart',
       package: Version.parse('2.7.0'),
       override: null,
     );
 
-    await _assertLanguageVersionCurrent('package:aaa/a.dart');
-    await _assertLanguageVersionCurrent('package:aaa/b.dart');
-    await _assertLanguageVersionCurrent('package:aaa/c.dart');
+    await _assertLanguageVersionCurrent('$workspaceRootPath/aaa/lib/a.dart');
+    await _assertLanguageVersionCurrent('$workspaceRootPath/aaa/lib/b.dart');
+    await _assertLanguageVersionCurrent('$workspaceRootPath/aaa/lib/c.dart');
+  }
+
+  test_scope_lookup2() async {
+    await assertNoErrorsInCode(r'''
+int foo;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      scope.lookup2('foo').getter,
+      findElement.topGet('foo'),
+    );
+    assertElement(
+      scope.lookup2('foo').setter,
+      findElement.topSet('foo'),
+    );
+  }
+
+  test_scope_lookup2_implicitCoreImport() async {
+    await assertNoErrorsInCode('');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      scope.lookup2('int').getter,
+      intElement,
+    );
+  }
+
+  test_scope_lookup2_notFound() async {
+    await assertNoErrorsInCode('');
+
+    var scope = result.libraryElement.scope;
+
+    assertElementNull(
+      scope.lookup2('noSuchGetter').getter,
+    );
+
+    assertElementNull(
+      scope.lookup2('noSuchSetter').setter,
+    );
+  }
+
+  test_scope_lookup2_prefersLocal() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math';
+
+int sin() => 3;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      scope.lookup2('sin').getter,
+      findElement.topFunction('sin'),
+    );
+
+    assertElement(
+      scope.lookup2('cos').getter,
+      findElement.importFind('dart:math').topFunction('cos'),
+    );
+  }
+
+  test_scope_lookup2_prefix() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as math;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      scope.lookup2('math').getter,
+      findElement.prefix('math'),
+    );
+  }
+
+  test_scope_lookup2_respectsCombinator_hide() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' hide sin;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElementNull(
+      scope.lookup2('sin').getter,
+    );
+
+    var mathFind = findElement.importFind('dart:math');
+    assertElement(
+      scope.lookup2('cos').getter,
+      mathFind.topFunction('cos'),
+    );
+    assertElement(
+      scope.lookup2('tan').getter,
+      mathFind.topFunction('tan'),
+    );
+  }
+
+  test_scope_lookup2_respectsCombinator_show() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' show sin;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      scope.lookup2('sin').getter,
+      findElement.importFind('dart:math').topFunction('sin'),
+    );
+
+    assertElementNull(
+      scope.lookup2('cos').getter,
+    );
+  }
+
+  test_scope_lookup_implicitCoreImport() async {
+    await assertNoErrorsInCode('');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'int', setter: false),
+      intElement,
+    );
+  }
+
+  test_scope_lookup_lookup() async {
+    await assertNoErrorsInCode(r'''
+int foo;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: false),
+      findElement.topGet('foo'),
+    );
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: true),
+      findElement.topSet('foo'),
+    );
+  }
+
+  test_scope_lookup_notFound() async {
+    await assertNoErrorsInCode('');
+
+    var scope = result.libraryElement.scope;
+
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'noSuchGetter', setter: false),
+    );
+
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'noSuchSetter', setter: true),
+    );
+  }
+
+  test_scope_lookup_prefersLocal() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math';
+
+int sin() => 3;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'sin', setter: false),
+      findElement.topFunction('sin'),
+    );
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'cos', setter: false),
+      findElement.importFind('dart:math').topFunction('cos'),
+    );
+  }
+
+  test_scope_lookup_prefix() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as math;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'math', setter: false),
+      findElement.prefix('math'),
+    );
+  }
+
+  test_scope_lookup_respectsCombinator_hide() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' hide sin;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'sin', setter: false),
+    );
+
+    var mathFind = findElement.importFind('dart:math');
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'cos', setter: false),
+      mathFind.topFunction('cos'),
+    );
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'tan', setter: false),
+      mathFind.topFunction('tan'),
+    );
+  }
+
+  test_scope_lookup_respectsCombinator_show() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' show sin;
+''');
+
+    var scope = result.libraryElement.scope;
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'sin', setter: false),
+      findElement.importFind('dart:math').topFunction('sin'),
+    );
+
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'cos', setter: false),
+    );
   }
 
   Future<void> _assertLanguageVersion({
-    @required String uriStr,
+    @required String path,
     @required Version package,
     @required Version override,
   }) async {
-    var element = await driver.getLibraryByUri(uriStr);
+    path = convertPath(path);
+    var session = contextFor(path).currentSession;
+    var file = session.getFile(path);
+    var element = await session.getLibraryByUri('${file.uri}');
     expect(element.languageVersion.package, package);
     expect(element.languageVersion.override, override);
   }
 
-  Future<void> _assertLanguageVersionCurrent(String uriStr) async {
+  Future<void> _assertLanguageVersionCurrent(String path) async {
     await _assertLanguageVersion(
-      uriStr: uriStr,
+      path: path,
       package: ExperimentStatus.currentVersion,
       override: null,
     );
diff --git a/pkg/analyzer/test/src/dart/resolution/local_function_test.dart b/pkg/analyzer/test/src/dart/resolution/local_function_test.dart
index 9d660a8..d1de9b1 100644
--- a/pkg/analyzer/test/src/dart/resolution/local_function_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/local_function_test.dart
@@ -6,7 +6,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class LocalFunctionResolutionTest extends DriverResolutionTest {
+class LocalFunctionResolutionTest extends PubPackageResolutionTest {
   test_element_block() async {
     await assertNoErrorsInCode(r'''
 f() {
diff --git a/pkg/analyzer/test/src/dart/resolution/local_variable_test.dart b/pkg/analyzer/test/src/dart/resolution/local_variable_test.dart
index 84d0e75..3545088 100644
--- a/pkg/analyzer/test/src/dart/resolution/local_variable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/local_variable_test.dart
@@ -8,8 +8,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../constant/potentially_constant_test.dart';
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,7 +18,7 @@
 }
 
 @reflectiveTest
-class LocalVariableResolutionTest extends DriverResolutionTest {
+class LocalVariableResolutionTest extends PubPackageResolutionTest {
   test_demoteTypeParameterType() async {
     await assertNoErrorsInCode('''
 void f<T>(T a, T b) {
@@ -128,7 +127,7 @@
   }
 
   test_nonNullifyType() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 var a = 0;
 ''');
diff --git a/pkg/analyzer/test/src/dart/resolution/metadata_test.dart b/pkg/analyzer/test/src/dart/resolution/metadata_test.dart
index e1ba156..ab2e0b4 100644
--- a/pkg/analyzer/test/src/dart/resolution/metadata_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/metadata_test.dart
@@ -2,28 +2,26 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/test_utilities/find_element.dart';
 import 'package:meta/meta.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../summary/resolved_ast_printer.dart';
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(MetadataResolutionTest);
-    defineReflectiveTests(MetadataResolutionWithNnbdTest);
+    defineReflectiveTests(MetadataResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class MetadataResolutionTest extends DriverResolutionTest {
+class MetadataResolutionTest extends PubPackageResolutionTest {
   test_onFieldFormal() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -63,14 +61,14 @@
   }
 
   test_otherLibrary_constructor_named() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   final int f;
   const A.named(this.f);
 }
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 import 'a.dart';
 
 @A.named(42)
@@ -91,14 +89,14 @@
   }
 
   test_otherLibrary_constructor_unnamed() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   final int f;
   const A(this.f);
 }
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 import 'a.dart';
 
 @A(42)
@@ -119,7 +117,7 @@
   }
 
   test_otherLibrary_implicitConst() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   final int f;
   const A(this.f);
@@ -183,21 +181,14 @@
 }
 
 @reflectiveTest
-class MetadataResolutionWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
+class MetadataResolutionWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   ImportFindElement get import_a {
     return findElement.importFind('package:test/a.dart');
   }
 
-  @override
-  bool get typeToStringWithNullability => true;
-
   test_optIn_fromOptOut_class() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A(int a);
 }
@@ -224,7 +215,7 @@
   }
 
   test_optIn_fromOptOut_class_constructor() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   final int a;
   const A.named(this.a);
@@ -258,7 +249,7 @@
   }
 
   test_optIn_fromOptOut_class_constructor_withDefault() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   final int a;
   const A.named({this.a = 42});
@@ -292,7 +283,7 @@
   }
 
   test_optIn_fromOptOut_class_getter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static const foo = 42;
 }
@@ -321,7 +312,7 @@
   }
 
   test_optIn_fromOptOut_getter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const foo = 42;
 ''');
 
@@ -343,7 +334,7 @@
   }
 
   test_optIn_fromOptOut_prefix_class() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A(int a);
 }
@@ -370,7 +361,7 @@
   }
 
   test_optIn_fromOptOut_prefix_class_constructor() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   const A.named(int a);
 }
@@ -397,7 +388,7 @@
   }
 
   test_optIn_fromOptOut_prefix_class_getter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static const foo = 0;
 }
@@ -424,7 +415,7 @@
   }
 
   test_optIn_fromOptOut_prefix_getter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const foo = 0;
 ''');
 
diff --git a/pkg/analyzer/test/src/dart/resolution/method_declaration_test.dart b/pkg/analyzer/test/src/dart/resolution/method_declaration_test.dart
new file mode 100644
index 0000000..9f18387
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/method_declaration_test.dart
@@ -0,0 +1,54 @@
+// 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:test_reflective_loader/test_reflective_loader.dart';
+
+import 'context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MethodDeclarationResolutionTest);
+  });
+}
+
+@reflectiveTest
+class MethodDeclarationResolutionTest extends PubPackageResolutionTest {
+  test_formalParameterScope_defaultValue() async {
+    await assertNoErrorsInCode('''
+class A {
+  static const foo = 0;
+
+  void bar([int foo = foo + 1]) {
+  }
+}
+''');
+
+    assertElement(
+      findNode.simple('foo + 1'),
+      findElement.getter('foo', of: 'A'),
+    );
+  }
+
+  test_formalParameterScope_type() async {
+    await assertNoErrorsInCode('''
+class a {}
+
+class B {
+  void bar(a a) {
+    a;
+  }
+}
+''');
+
+    assertElement(
+      findNode.simple('a a'),
+      findElement.class_('a'),
+    );
+
+    assertElement(
+      findNode.simple('a;'),
+      findElement.parameter('a'),
+    );
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
index 096e13c..8925735 100644
--- a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
@@ -2,31 +2,28 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(MethodInvocationResolutionTest);
-    defineReflectiveTests(MethodInvocationResolutionWithNnbdTest);
+    defineReflectiveTests(MethodInvocationResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class MethodInvocationResolutionTest extends DriverResolutionTest {
+class MethodInvocationResolutionTest extends PubPackageResolutionTest {
   test_error_ambiguousImport_topFunction() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 void foo(int _) {}
 ''');
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 void foo(int _) {}
 ''');
 
@@ -38,7 +35,7 @@
   foo(0);
 }
 ''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 46, 3),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 46, 3),
     ]);
 
     var invocation = findNode.methodInvocation('foo(0)');
@@ -47,10 +44,10 @@
   }
 
   test_error_ambiguousImport_topFunction_prefixed() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 void foo(int _) {}
 ''');
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 void foo(int _) {}
 ''');
 
@@ -62,7 +59,7 @@
   p.foo(0);
 }
 ''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 58, 3),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 58, 3),
     ]);
 
     var invocation = findNode.methodInvocation('foo(0)');
@@ -80,7 +77,7 @@
   a.foo(0);
 }
 ''', [
-      error(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 57, 3),
+      error(CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 57, 3),
     ]);
     assertMethodInvocation2(
       findNode.methodInvocation('a.foo(0)'),
@@ -101,7 +98,7 @@
   c();
 }
 ''', [
-      error(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 51, 1),
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 51, 1),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('c();');
@@ -121,7 +118,7 @@
   foo();
 }
 ''', [
-      error(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 25, 3),
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 25, 3),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -267,7 +264,7 @@
   C.foo();
 }
 ''', [
-      error(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 42, 5),
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 42, 5),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -291,7 +288,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 46, 3),
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 46, 3),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -316,7 +313,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 68, 9),
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 68, 9),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -333,7 +330,7 @@
   }
 
   test_error_prefixIdentifierNotFollowedByDot() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 void foo() {}
 ''');
 
@@ -403,7 +400,7 @@
   foo(0);
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_FUNCTION, 11, 3),
+      error(CompileTimeErrorCode.UNDEFINED_FUNCTION, 11, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo(0)');
   }
@@ -416,7 +413,7 @@
   math.foo(0);
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_FUNCTION, 45, 3),
+      error(CompileTimeErrorCode.UNDEFINED_FUNCTION, 45, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
   }
@@ -427,7 +424,7 @@
   bar.foo(0);
 }
 ''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 11, 3),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 11, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
   }
@@ -439,7 +436,7 @@
   C.foo(0);
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 24, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 24, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
   }
@@ -453,7 +450,7 @@
   C.foo(x);
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 32, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 32, 3),
     ]);
 
     _assertUnresolvedMethodInvocation('foo(x);');
@@ -472,7 +469,7 @@
   C.foo(0);
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 76, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 76, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
   }
@@ -485,7 +482,7 @@
   C.foo<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 25, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 25, 3),
     ]);
 
     _assertUnresolvedMethodInvocation(
@@ -501,7 +498,7 @@
   static main() => C.T();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 34, 1),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 34, 1),
     ]);
     _assertUnresolvedMethodInvocation('C.T();');
   }
@@ -512,7 +509,7 @@
   42.foo(0);
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 14, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 14, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
   }
@@ -524,7 +521,7 @@
   v.foo(0);
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 30, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 30, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
   }
@@ -537,7 +534,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 25, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 25, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
   }
@@ -548,7 +545,7 @@
   null.foo();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 16, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 16, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo();');
   }
@@ -559,12 +556,12 @@
   o.call();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 21, 4),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 21, 4),
     ]);
   }
 
   test_error_undefinedMethod_private() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void _foo(int _) {}
 }
@@ -578,7 +575,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 53, 4),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 53, 4),
     ]);
     _assertUnresolvedMethodInvocation('_foo(0);');
   }
@@ -593,7 +590,7 @@
   C..foo();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 50, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 50, 3),
     ]);
   }
 
@@ -606,7 +603,7 @@
   A?.toString();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 25, 8),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 25, 8),
     ]);
   }
 
@@ -620,7 +617,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_METHOD, 62, 3),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_METHOD, 62, 3),
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
     assertSuperExpression(findNode.super_('super.foo'));
@@ -639,8 +636,7 @@
 }
 ''', [
       error(
-          StaticTypeWarningCode
-              .UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
+          CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
           71,
           3),
       error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS, 74, 3),
@@ -701,7 +697,7 @@
   c.foo();
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 44, 5),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 44, 5),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -722,7 +718,7 @@
   foo();
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 23, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 23, 3),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -743,7 +739,7 @@
   foo()();
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 26, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 26, 3),
     ]);
     assertMethodInvocation(
       findNode.methodInvocation('foo()()'),
@@ -760,7 +756,7 @@
   foo();
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 22, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 22, 3),
     ]);
 
     var invocation = findNode.functionExpressionInvocation('foo();');
@@ -780,7 +776,7 @@
   foo.toString();
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 23, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 23, 3),
     ]);
     // TODO(scheglov) Resolve fully, or don't resolve at all.
     assertMethodInvocation(
@@ -797,7 +793,7 @@
   foo..toString();
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 23, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 23, 3),
     ]);
     // TODO(scheglov) Resolve fully, or don't resolve at all.
     assertMethodInvocation(
@@ -814,7 +810,7 @@
   foo?.toString();
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 23, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 23, 3),
     ]);
     // TODO(scheglov) Resolve fully, or don't resolve at all.
     assertMethodInvocation(
@@ -832,7 +828,7 @@
   foo<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD, 29, 5),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD, 29, 5),
     ]);
     assertMethodInvocation(
       findNode.methodInvocation('foo<int>()'),
@@ -850,7 +846,7 @@
   foo<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD, 58, 5),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD, 58, 5),
     ]);
     assertMethodInvocation(
       findNode.methodInvocation('foo<int>()'),
@@ -990,7 +986,7 @@
   }
 
   test_hasReceiver_importPrefix_topFunction() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 T foo<T extends num>(T a, T b) => a;
 ''');
 
@@ -1015,7 +1011,7 @@
   }
 
   test_hasReceiver_importPrefix_topGetter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 T Function<T>(T a, T b) get foo => null;
 ''');
 
@@ -1184,7 +1180,7 @@
   }
 
   test_hasReceiver_prefixed_class_staticGetter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class C {
   static double Function(int) get foo => null;
 }
@@ -1216,7 +1212,7 @@
   }
 
   test_hasReceiver_prefixed_class_staticMethod() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class C {
   static void foo(int _) => null;
 }
@@ -1656,8 +1652,7 @@
   foo<int, double>();
 }
 ''', [
-      error(
-          StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD, 32, 13),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD, 32, 13),
     ]);
     var invocation = findNode.methodInvocation('foo<int, double>();');
     assertTypeArgumentTypes(invocation, ['dynamic']);
@@ -1721,18 +1716,10 @@
 }
 
 @reflectiveTest
-class MethodInvocationResolutionWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class MethodInvocationResolutionWithNullSafetyTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_hasReceiver_deferredImportPrefix_loadLibrary_optIn_fromOptOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
 
@@ -1779,7 +1766,7 @@
   foo.call();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 29, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 29, 3),
     ]);
 
     assertMethodInvocation2(
@@ -1830,7 +1817,7 @@
   a.foo();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 44, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 44, 1),
     ]);
 
     assertMethodInvocation2(
@@ -1856,7 +1843,7 @@
   a.foo();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 82, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 82, 1),
     ]);
 
     assertMethodInvocation2(
@@ -1923,8 +1910,8 @@
   a.foo();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 27, 1),
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 29, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 27, 1),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 29, 3),
     ]);
 
     assertMethodInvocation2(
@@ -1948,8 +1935,8 @@
   a.foo();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 65, 1),
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 67, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 65, 1),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 67, 3),
     ]);
 
     assertMethodInvocation2(
diff --git a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
index e1ad947..75bd0f7 100644
--- a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
@@ -9,7 +9,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../generated/elements_types_mixin.dart';
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class MixinDriverResolutionTest extends DriverResolutionTest
+class MixinDriverResolutionTest extends PubPackageResolutionTest
     with ElementsTypesMixin {
   test_accessor_getter() async {
     await assertNoErrorsInCode(r'''
@@ -300,7 +300,7 @@
   final int f;
 }
 ''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED, 22, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED, 22, 1),
     ]);
   }
 
@@ -958,7 +958,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SUPER_METHOD, 52, 3),
+      error(CompileTimeErrorCode.UNDEFINED_SUPER_METHOD, 52, 3),
     ]);
 
     var invocation = findNode.methodInvocation('foo(42)');
diff --git a/pkg/analyzer/test/src/dart/resolution/namespace_test.dart b/pkg/analyzer/test/src/dart/resolution/namespace_test.dart
index 2a0e9d0..30c9944 100644
--- a/pkg/analyzer/test/src/dart/resolution/namespace_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/namespace_test.dart
@@ -2,23 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ImportResolutionTest);
-    defineReflectiveTests(ImportResolutionWithNnbdTest);
+    defineReflectiveTests(ImportResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ImportResolutionTest extends DriverResolutionTest {
+class ImportResolutionTest extends PubPackageResolutionTest {
   test_overrideCoreType_Never() async {
-    newFile('/test/lib/declares_never.dart', content: '''
+    newFile('$testPackageLibPath/declares_never.dart', content: '''
 class Never {}
 ''');
     await assertNoErrorsInCode(r'''
@@ -30,9 +28,5 @@
 }
 
 @reflectiveTest
-class ImportResolutionWithNnbdTest extends ImportResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-}
+class ImportResolutionWithNullSafetyTest extends ImportResolutionTest
+    with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/non_nullable_bazel_workspace_test.dart b/pkg/analyzer/test/src/dart/resolution/non_nullable_bazel_workspace_test.dart
new file mode 100644
index 0000000..517ad52
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/non_nullable_bazel_workspace_test.dart
@@ -0,0 +1,110 @@
+// 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:test_reflective_loader/test_reflective_loader.dart';
+
+import 'context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonNullableBazelWorkspaceTest);
+  });
+}
+
+@reflectiveTest
+class NonNullableBazelWorkspaceTest extends BazelWorkspaceResolutionTest {
+  @override
+  bool get typeToStringWithNullability => true;
+
+  test_buildFile_legacy_commentedOut() async {
+    newFile('$myPackageRootPath/BUILD', content: r'''
+dart_package(
+#  null_safety = True,
+''');
+
+    await resolveFileCode(
+      '$myPackageRootPath/lib/a.dart',
+      'int v = 0;',
+    );
+    assertNoErrorsInResult();
+    assertType(findNode.typeName('int v'), 'int*');
+  }
+
+  test_buildFile_nonNullable() async {
+    newFile('$myPackageRootPath/BUILD', content: r'''
+dart_package(
+  null_safety = True,
+)
+''');
+
+    // Non-nullable in lib/.
+    await resolveFileCode(
+      '$myPackageRootPath/lib/a.dart',
+      'int v = 0;',
+    );
+    assertNoErrorsInResult();
+    assertType(findNode.typeName('int v'), 'int');
+
+    // Non-nullable in test/.
+    await resolveFileCode(
+      '$myPackageRootPath/test/a.dart',
+      'int v = 0;',
+    );
+    assertNoErrorsInResult();
+    assertType(findNode.typeName('int v'), 'int');
+
+    // Non-nullable in bin/.
+    await resolveFileCode(
+      '$myPackageRootPath/bin/a.dart',
+      'int v = 0;',
+    );
+    assertNoErrorsInResult();
+    assertType(findNode.typeName('int v'), 'int');
+
+    // Legacy in other package.
+    await resolveFileCode(
+      '$workspaceRootPath/dart/aaa/lib/a.dart',
+      'int v = 0;',
+    );
+    assertNoErrorsInResult();
+    assertType(findNode.typeName('int v'), 'int*');
+  }
+
+  test_buildFile_nonNullable_oneLine_noComma() async {
+    newFile('$myPackageRootPath/BUILD', content: r'''
+dart_package(null_safety = True)
+''');
+
+    await resolveFileCode(
+      '$myPackageRootPath/lib/a.dart',
+      'int v = 0;',
+    );
+    assertNoErrorsInResult();
+    assertType(findNode.typeName('int v'), 'int');
+  }
+
+  test_buildFile_nonNullable_withComments() async {
+    newFile('$myPackageRootPath/BUILD', content: r'''
+dart_package(
+  # Preceding comment.
+  null_safety = True,  # Trailing comment.
+)  # Last comment.
+''');
+
+    await resolveFileCode(
+      '$myPackageRootPath/lib/a.dart',
+      'int v = 0;',
+    );
+    assertNoErrorsInResult();
+    assertType(findNode.typeName('int v'), 'int');
+  }
+
+  test_noBuildFile_legacy() async {
+    await assertNoErrorsInCode('''
+int v = 0;
+''');
+
+    assertType(findNode.typeName('int v'), 'int*');
+  }
+}
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 a312c17..08048f9 100644
--- a/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
@@ -2,16 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package: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:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -21,17 +18,8 @@
 }
 
 @reflectiveTest
-class NonNullableTest extends DriverResolutionTest {
-  // TODO(danrubel): Implement a more fine grained way to specify non-nullable.
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class NonNullableTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_class_hierarchy() async {
     await assertNoErrorsInCode('''
 class A {}
@@ -72,7 +60,7 @@
   }
 
   test_library_typeProvider_typeSystem() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
     await resolveTestCode(r'''
@@ -447,7 +435,7 @@
 }
 
 @reflectiveTest
-class NullableTest extends DriverResolutionTest {
+class NullableTest extends PubPackageResolutionTest {
   @override
   bool get typeToStringWithNullability => true;
 
diff --git a/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart b/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
index cdb8590..cb554a1b 100644
--- a/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,7 +16,7 @@
 }
 
 @reflectiveTest
-class OptionalConstDriverResolutionTest extends DriverResolutionTest {
+class OptionalConstDriverResolutionTest extends PubPackageResolutionTest {
   Map<String, LibraryElement> libraries = {};
 
   LibraryElement get libraryA => libraries['package:test/a.dart'];
@@ -112,7 +112,7 @@
   }
 
   test_prefixed_unnamed_generic() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class C<T> {
   const C();
 }
@@ -167,7 +167,7 @@
 
   Future<InstanceCreationExpression> _resolveImplicitConst(String expr,
       {String prefix}) async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 class A {
   const A();
   const A.named();
@@ -179,12 +179,12 @@
 ''');
 
     if (prefix != null) {
-      newFile('/test/lib/b.dart', content: '''
+      newFile('$testPackageLibPath/b.dart', content: '''
 import 'a.dart' as $prefix;
 const a = $expr;
 ''');
     } else {
-      newFile('/test/lib/b.dart', content: '''
+      newFile('$testPackageLibPath/b.dart', content: '''
 import 'a.dart';
 const a = $expr;
 ''');
diff --git a/pkg/analyzer/test/src/dart/resolution/postfix_expression_test.dart b/pkg/analyzer/test/src/dart/resolution/postfix_expression_test.dart
index e80dec7..74fe485 100644
--- a/pkg/analyzer/test/src/dart/resolution/postfix_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/postfix_expression_test.dart
@@ -2,24 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(PostfixExpressionResolutionTest);
-    defineReflectiveTests(PostfixExpressionResolutionWithNnbdTest);
+    defineReflectiveTests(PostfixExpressionResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class PostfixExpressionResolutionTest extends DriverResolutionTest {
+class PostfixExpressionResolutionTest extends PubPackageResolutionTest {
   test_dec_localVariable() async {
     await assertNoErrorsInCode(r'''
 f(int x) {
@@ -83,17 +80,8 @@
 }
 
 @reflectiveTest
-class PostfixExpressionResolutionWithNnbdTest
-    extends PostfixExpressionResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class PostfixExpressionResolutionWithNullSafetyTest
+    extends PostfixExpressionResolutionTest with WithNullSafetyMixin {
   test_inc_localVariable_depromote() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/dart/resolution/prefix_element_test.dart b/pkg/analyzer/test/src/dart/resolution/prefix_element_test.dart
new file mode 100644
index 0000000..fbf0c0c
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/prefix_element_test.dart
@@ -0,0 +1,513 @@
+// 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/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(PrefixElementTest);
+  });
+}
+
+@reflectiveTest
+class PrefixElementTest extends PubPackageResolutionTest {
+  test_scope_lookup() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var foo = 0;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var importFind = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: false),
+      importFind.topGet('foo'),
+    );
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: true),
+      importFind.topSet('foo'),
+    );
+  }
+
+  test_scope_lookup2() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var foo = 0;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var importFind = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      scope.lookup2('foo').getter,
+      importFind.topGet('foo'),
+    );
+
+    assertElement(
+      scope.lookup2('foo').setter,
+      importFind.topSet('foo'),
+    );
+  }
+
+  test_scope_lookup2_ambiguous_notSdk_both() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var foo = 0;
+''');
+
+    newFile('$testPackageLibPath/b.dart', content: r'''
+var foo = 1.2;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+
+// ignore:unused_import
+import 'b.dart' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+
+    var aImport = findElement.importFind('package:test/a.dart');
+    var bImport = findElement.importFind('package:test/b.dart');
+
+    _assertMultiplyDefinedElement(
+      scope.lookup2('foo').getter,
+      [
+        aImport.topGet('foo'),
+        bImport.topGet('foo'),
+      ],
+    );
+
+    _assertMultiplyDefinedElement(
+      scope.lookup2('foo').setter,
+      [
+        aImport.topSet('foo'),
+        bImport.topSet('foo'),
+      ],
+    );
+  }
+
+  test_scope_lookup2_ambiguous_notSdk_first() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var pi = 4;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+
+// ignore:unused_import
+import 'dart:math' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var aImport = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      scope.lookup2('pi').getter,
+      aImport.topGet('pi'),
+    );
+  }
+
+  test_scope_lookup2_ambiguous_notSdk_second() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var pi = 4;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as prefix;
+
+// ignore:unused_import
+import 'a.dart' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var aImport = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      scope.lookup2('pi').getter,
+      aImport.topGet('pi'),
+    );
+  }
+
+  test_scope_lookup2_ambiguous_same() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var foo = 0;
+''');
+
+    newFile('$testPackageLibPath/b.dart', content: r'''
+export 'a.dart';
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+
+// ignore:unused_import
+import 'b.dart' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var importFind = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      scope.lookup2('foo').getter,
+      importFind.topGet('foo'),
+    );
+
+    assertElement(
+      scope.lookup2('foo').setter,
+      importFind.topSet('foo'),
+    );
+  }
+
+  test_scope_lookup2_differentPrefix() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var foo = 0;
+''');
+
+    newFile('$testPackageLibPath/b.dart', content: r'''
+var bar = 0;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+
+// ignore:unused_import
+import 'b.dart' as prefix2;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var importFind = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      scope.lookup2('foo').getter,
+      importFind.topGet('foo'),
+    );
+    assertElement(
+      scope.lookup2('foo').setter,
+      importFind.topSet('foo'),
+    );
+
+    assertElementNull(
+      scope.lookup2('bar').getter,
+    );
+    assertElementNull(
+      scope.lookup2('bar').setter,
+    );
+  }
+
+  test_scope_lookup2_notFound() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as math;
+''');
+
+    var scope = findElement.prefix('math').scope;
+
+    assertElementNull(
+      scope.lookup2('noSuchGetter').getter,
+    );
+
+    assertElementNull(
+      scope.lookup2('noSuchSetter').setter,
+    );
+  }
+
+  test_scope_lookup2_respectsCombinator_hide() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as math hide sin;
+''');
+
+    var scope = findElement.prefix('math').scope;
+    var mathFind = findElement.importFind('dart:math');
+
+    assertElementNull(
+      scope.lookup2('sin').getter,
+    );
+
+    assertElement(
+      scope.lookup2('cos').getter,
+      mathFind.topFunction('cos'),
+    );
+    assertElement(
+      scope.lookup2('tan').getter,
+      mathFind.topFunction('tan'),
+    );
+  }
+
+  test_scope_lookup2_respectsCombinator_show() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as math show sin;
+''');
+
+    var scope = findElement.prefix('math').scope;
+    var mathFind = findElement.importFind('dart:math');
+
+    assertElement(
+      scope.lookup2('sin').getter,
+      mathFind.topFunction('sin'),
+    );
+
+    assertElementNull(
+      scope.lookup2('cos').getter,
+    );
+  }
+
+  test_scope_lookup_ambiguous_notSdk_both() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var foo = 0;
+''');
+
+    newFile('$testPackageLibPath/b.dart', content: r'''
+var foo = 1.2;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+
+// ignore:unused_import
+import 'b.dart' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+
+    var aImport = findElement.importFind('package:test/a.dart');
+    var bImport = findElement.importFind('package:test/b.dart');
+
+    _assertMultiplyDefinedElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: false),
+      [
+        aImport.topGet('foo'),
+        bImport.topGet('foo'),
+      ],
+    );
+
+    _assertMultiplyDefinedElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: true),
+      [
+        aImport.topSet('foo'),
+        bImport.topSet('foo'),
+      ],
+    );
+  }
+
+  test_scope_lookup_ambiguous_notSdk_first() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var pi = 4;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+
+// ignore:unused_import
+import 'dart:math' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var aImport = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'pi', setter: false),
+      aImport.topGet('pi'),
+    );
+  }
+
+  test_scope_lookup_ambiguous_notSdk_second() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var pi = 4;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as prefix;
+
+// ignore:unused_import
+import 'a.dart' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var aImport = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'pi', setter: false),
+      aImport.topGet('pi'),
+    );
+  }
+
+  test_scope_lookup_ambiguous_same() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var foo = 0;
+''');
+
+    newFile('$testPackageLibPath/b.dart', content: r'''
+export 'a.dart';
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+
+// ignore:unused_import
+import 'b.dart' as prefix;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var importFind = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: false),
+      importFind.topGet('foo'),
+    );
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: true),
+      importFind.topSet('foo'),
+    );
+  }
+
+  test_scope_lookup_differentPrefix() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+var foo = 0;
+''');
+
+    newFile('$testPackageLibPath/b.dart', content: r'''
+var bar = 0;
+''');
+
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'a.dart' as prefix;
+
+// ignore:unused_import
+import 'b.dart' as prefix2;
+''');
+
+    var scope = findElement.prefix('prefix').scope;
+    var importFind = findElement.importFind('package:test/a.dart');
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: false),
+      importFind.topGet('foo'),
+    );
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'foo', setter: true),
+      importFind.topSet('foo'),
+    );
+
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'bar', setter: false),
+    );
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'bar', setter: true),
+    );
+  }
+
+  test_scope_lookup_notFound() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as math;
+''');
+
+    var scope = findElement.prefix('math').scope;
+
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'noSuchGetter', setter: false),
+    );
+
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'noSuchSetter', setter: true),
+    );
+  }
+
+  test_scope_lookup_respectsCombinator_hide() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as math hide sin;
+''');
+
+    var scope = findElement.prefix('math').scope;
+    var mathFind = findElement.importFind('dart:math');
+
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'sin', setter: false),
+    );
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'cos', setter: false),
+      mathFind.topFunction('cos'),
+    );
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'tan', setter: false),
+      mathFind.topFunction('tan'),
+    );
+  }
+
+  test_scope_lookup_respectsCombinator_show() async {
+    await assertNoErrorsInCode(r'''
+// ignore:unused_import
+import 'dart:math' as math show sin;
+''');
+
+    var scope = findElement.prefix('math').scope;
+    var mathFind = findElement.importFind('dart:math');
+
+    assertElement(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'sin', setter: false),
+      mathFind.topFunction('sin'),
+    );
+
+    assertElementNull(
+      // ignore: deprecated_member_use_from_same_package
+      scope.lookup(id: 'cos', setter: false),
+    );
+  }
+
+  void _assertMultiplyDefinedElement(
+    MultiplyDefinedElementImpl element,
+    List<Element> expected,
+  ) {
+    expect(element.conflictingElements, unorderedEquals(expected));
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/prefix_expression_test.dart b/pkg/analyzer/test/src/dart/resolution/prefix_expression_test.dart
index 1ca28c5..2cb17f3 100644
--- a/pkg/analyzer/test/src/dart/resolution/prefix_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/prefix_expression_test.dart
@@ -2,24 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(PrefixExpressionResolutionTest);
-    defineReflectiveTests(PrefixExpressionResolutionWithNnbdTest);
+    defineReflectiveTests(PrefixExpressionResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class PrefixExpressionResolutionTest extends DriverResolutionTest {
+class PrefixExpressionResolutionTest extends PubPackageResolutionTest {
   test_bang_bool_context() async {
     await assertNoErrorsInCode(r'''
 T f<T>() {
@@ -66,7 +63,7 @@
   !x;
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, 14, 1),
+      error(CompileTimeErrorCode.NON_BOOL_NEGATION_EXPRESSION, 14, 1),
     ]);
 
     assertPrefixExpression(
@@ -174,18 +171,8 @@
 }
 
 @reflectiveTest
-class PrefixExpressionResolutionWithNnbdTest
-    extends PrefixExpressionResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    )
-    ..implicitCasts = false;
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class PrefixExpressionResolutionWithNullSafetyTest
+    extends PrefixExpressionResolutionTest with WithNullSafetyMixin {
   test_plusPlus_depromote() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/dart/resolution/prefixed_identifier_test.dart b/pkg/analyzer/test/src/dart/resolution/prefixed_identifier_test.dart
index 8998675..382928b 100644
--- a/pkg/analyzer/test/src/dart/resolution/prefixed_identifier_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/prefixed_identifier_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(PrefixedIdentifierResolutionTest);
-    defineReflectiveTests(PrefixedIdentifierResolutionWithNnbdTest);
+    defineReflectiveTests(PrefixedIdentifierResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class PrefixedIdentifierResolutionTest extends DriverResolutionTest {
+class PrefixedIdentifierResolutionTest extends PubPackageResolutionTest {
   test_dynamic_explicitCore_withPrefix() async {
     await assertNoErrorsInCode(r'''
 import 'dart:core' as mycore;
@@ -35,7 +33,7 @@
   }
 
   test_implicitCall_tearOff() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int call() => 0;
 }
@@ -60,18 +58,10 @@
 }
 
 @reflectiveTest
-class PrefixedIdentifierResolutionWithNnbdTest
-    extends PrefixedIdentifierResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class PrefixedIdentifierResolutionWithNullSafetyTest
+    extends PrefixedIdentifierResolutionTest with WithNullSafetyMixin {
   test_deferredImportPrefix_loadLibrary_optIn_fromOptOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
 
@@ -97,7 +87,7 @@
   }
 
   test_implicitCall_tearOff_nullable() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int call() => 0;
 }
@@ -111,7 +101,7 @@
   return a;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 50, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 50, 1),
     ]);
 
     var identifier = findNode.simple('a;');
diff --git a/pkg/analyzer/test/src/dart/resolution/property_access_test.dart b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
index 41e7bea..1bf149e 100644
--- a/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(PropertyAccessResolutionTest);
-    defineReflectiveTests(PropertyAccessResolutionWithNnbdTest);
+    defineReflectiveTests(PropertyAccessResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class PropertyAccessResolutionTest extends DriverResolutionTest {
+class PropertyAccessResolutionTest extends PubPackageResolutionTest {
   test_tearOff_method() async {
     await assertNoErrorsInCode('''
 class A {
@@ -36,16 +34,8 @@
 }
 
 @reflectiveTest
-class PropertyAccessResolutionWithNnbdTest
-    extends PropertyAccessResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class PropertyAccessResolutionWithNullSafetyTest
+    extends PropertyAccessResolutionTest with WithNullSafetyMixin {
   test_implicitCall_tearOff_nullable() async {
     await assertErrorsInCode('''
 class A {
@@ -60,7 +50,7 @@
   return B().a; // ref
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 85, 5),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 85, 5),
     ]);
 
     var identifier = findNode.simple('a; // ref');
diff --git a/pkg/analyzer/test/src/dart/resolution/resolution.dart b/pkg/analyzer/test/src/dart/resolution/resolution.dart
index 63c6e6d..5aa6ff0 100644
--- a/pkg/analyzer/test/src/dart/resolution/resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/resolution.dart
@@ -79,6 +79,8 @@
 
   InterfaceType get stringType => typeProvider.stringType;
 
+  String get testFilePath => '/test/lib/test.dart';
+
   TypeProvider get typeProvider => result.typeProvider;
 
   TypeSystemImpl get typeSystem => result.typeSystem;
@@ -89,7 +91,7 @@
   VoidType get voidType => VoidTypeImpl.instance;
 
   void addTestFile(String content) {
-    newFile('/test/lib/test.dart', content: content);
+    newFile(testFilePath, content: content);
   }
 
   void assertAssignment(
@@ -206,9 +208,15 @@
     }
   }
 
-  void assertElementNull(Expression node) {
-    Element actual = getNodeElement(node);
-    expect(actual, isNull);
+  void assertElementNull(Object nodeOrElement) {
+    Element element;
+    if (nodeOrElement is AstNode) {
+      element = getNodeElement(nodeOrElement);
+    } else {
+      element = nodeOrElement as Element;
+    }
+
+    expect(element, isNull);
   }
 
   void assertElementString(Element element, String expected) {
@@ -257,6 +265,16 @@
     return result;
   }
 
+  Future<void> assertErrorsInFile2(
+    String path,
+    List<ExpectedError> expectedErrors,
+  ) async {
+    path = convertPath(path);
+
+    var result = await resolveFile(path);
+    assertErrorsInResolvedUnit(result, expectedErrors);
+  }
+
   void assertErrorsInList(
     List<AnalysisError> errors,
     List<ExpectedError> expectedErrors,
@@ -273,6 +291,10 @@
     assertErrorsInList(result.errors, expectedErrors);
   }
 
+  void assertErrorsInResult(List<ExpectedError> expectedErrors) {
+    assertErrorsInResolvedUnit(result, expectedErrors);
+  }
+
   void assertFunctionExpressionInvocation(
     FunctionExpressionInvocation node, {
     @required ExecutableElement element,
@@ -306,7 +328,9 @@
     assertType(ref, type);
   }
 
-  void assertImportPrefix(SimpleIdentifier identifier, PrefixElement element) {
+  /// In valid code [element] must be a [PrefixElement], but for invalid code
+  /// like `int.double v;` we want to resolve `int` somehow. Still not type.
+  void assertImportPrefix(SimpleIdentifier identifier, Element element) {
     assertElement(identifier, element);
     assertTypeNull(identifier);
   }
@@ -496,6 +520,10 @@
     assertErrorsInResolvedUnit(result, const []);
   }
 
+  void assertNoErrorsInResult() {
+    assertErrorsInResult(const []);
+  }
+
   void assertParameterElement(
     Expression expression,
     ParameterElement expected,
@@ -639,7 +667,7 @@
 
   void assertTypeName(
       TypeName node, Element expectedElement, String expectedType,
-      {PrefixElement expectedPrefix}) {
+      {Element expectedPrefix}) {
     assertType(node, expectedType);
 
     if (expectedPrefix == null) {
@@ -747,19 +775,33 @@
 
   Future<ResolvedUnitResult> resolveFile(String path);
 
-  /// Put the [code] into the test file, and resolve it.
-  Future<void> resolveTestCode(String code) async {
-    addTestFile(code);
-    await resolveTestFile();
-  }
+  /// Resolve the file with the [path] into [result].
+  Future<void> resolveFile2(String path) async {
+    path = convertPath(path);
 
-  Future<void> resolveTestFile() async {
-    var path = convertPath('/test/lib/test.dart');
     result = await resolveFile(path);
+    expect(result.state, ResultState.VALID);
+
     findNode = FindNode(result.content, result.unit);
     findElement = FindElement(result.unit);
   }
 
+  /// Create a new file with the [path] and [content], resolve it into [result].
+  Future<void> resolveFileCode(String path, String content) {
+    newFile(path, content: content);
+    return resolveFile2(path);
+  }
+
+  /// Put the [code] into the test file, and resolve it.
+  Future<void> resolveTestCode(String code) {
+    addTestFile(code);
+    return resolveTestFile();
+  }
+
+  Future<void> resolveTestFile() {
+    return resolveFile2(testFilePath);
+  }
+
   /// Choose the type display string, depending on whether the [result] is
   /// non-nullable or legacy.
   String typeStr(String nonNullable, String legacy) {
diff --git a/pkg/analyzer/test/src/dart/resolution/simple_identifier_test.dart b/pkg/analyzer/test/src/dart/resolution/simple_identifier_test.dart
index a79a25e..76881d5 100644
--- a/pkg/analyzer/test/src/dart/resolution/simple_identifier_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/simple_identifier_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(SimpleIdentifierResolutionTest);
-    defineReflectiveTests(SimpleIdentifierResolutionWithNnbdTest);
+    defineReflectiveTests(SimpleIdentifierResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class SimpleIdentifierResolutionTest extends DriverResolutionTest {
+class SimpleIdentifierResolutionTest extends PubPackageResolutionTest {
   test_dynamic_explicitCore() async {
     await assertNoErrorsInCode(r'''
 import 'dart:core';
@@ -42,7 +40,7 @@
   dynamic;
 }
 ''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 42, 7),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 42, 7),
     ]);
 
     assertSimpleIdentifier(
@@ -114,16 +112,8 @@
 }
 
 @reflectiveTest
-class SimpleIdentifierResolutionWithNnbdTest
-    extends SimpleIdentifierResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class SimpleIdentifierResolutionWithNullSafetyTest
+    extends SimpleIdentifierResolutionTest with WithNullSafetyMixin {
   test_functionReference() async {
     await assertErrorsInCode('''
 // @dart = 2.7
@@ -136,7 +126,7 @@
 @A([min])
 main() {}
 ''', [
-      error(StrongModeCode.COULD_NOT_INFER, 66, 5),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 66, 5),
     ]);
 
     var identifier = findNode.simple('min]');
@@ -160,7 +150,7 @@
   return a;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 68, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 68, 1),
     ]);
 
     var identifier = findNode.simple('a;');
diff --git a/pkg/analyzer/test/src/dart/resolution/test_all.dart b/pkg/analyzer/test/src/dart/resolution/test_all.dart
index 33cdc60..7c87fe5 100644
--- a/pkg/analyzer/test/src/dart/resolution/test_all.dart
+++ b/pkg/analyzer/test/src/dart/resolution/test_all.dart
@@ -20,6 +20,7 @@
 import 'field_test.dart' as field;
 import 'for_element_test.dart' as for_element;
 import 'for_statement_test.dart' as for_in;
+import 'function_declaration_test.dart' as function_declaration;
 import 'function_expression_invocation_test.dart'
     as function_expression_invocation;
 import 'function_type_alias_test.dart' as function_type_alias;
@@ -35,17 +36,21 @@
     as instance_member_inference_class;
 import 'instance_member_inference_mixin_test.dart'
     as instance_member_inference_mixin;
+import 'interpolation_string_test.dart' as interpolation_string;
 import 'language_version_test.dart' as language_version;
 import 'library_element_test.dart' as library_element;
 import 'local_function_test.dart' as local_function;
 import 'local_variable_test.dart' as local_variable;
 import 'metadata_test.dart' as metadata;
+import 'method_declaration_test.dart' as method_declaration;
 import 'method_invocation_test.dart' as method_invocation;
 import 'mixin_test.dart' as mixin_resolution;
 import 'namespace_test.dart' as namespace;
+import 'non_nullable_bazel_workspace_test.dart' as non_nullable_bazel_workspace;
 import 'non_nullable_test.dart' as non_nullable;
 import 'optional_const_test.dart' as optional_const;
 import 'postfix_expression_test.dart' as postfix_expression;
+import 'prefix_element_test.dart' as prefix_element;
 import 'prefix_expression_test.dart' as prefix_expression;
 import 'prefixed_identifier_test.dart' as prefixed_identifier;
 import 'property_access_test.dart' as property_access;
@@ -75,6 +80,7 @@
     field.main();
     for_element.main();
     for_in.main();
+    function_declaration.main();
     function_expression_invocation.main();
     function_type_alias.main();
     generic_function_type.main();
@@ -87,17 +93,21 @@
     instance_creation.main();
     instance_member_inference_class.main();
     instance_member_inference_mixin.main();
+    interpolation_string.main();
     language_version.main();
     library_element.main();
     local_function.main();
     local_variable.main();
     metadata.main();
+    method_declaration.main();
     method_invocation.main();
     mixin_resolution.main();
     namespace.main();
+    non_nullable_bazel_workspace.main();
     non_nullable.main();
     optional_const.main();
     postfix_expression.main();
+    prefix_element.main();
     prefix_expression.main();
     prefixed_identifier.main();
     property_access.main();
diff --git a/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart b/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart
index 8640cb0..896aa45 100644
--- a/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart
@@ -4,8 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../constant/potentially_constant_test.dart';
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +14,7 @@
 }
 
 @reflectiveTest
-class TopLevelVariableTest extends DriverResolutionTest {
+class TopLevelVariableTest extends PubPackageResolutionTest {
   test_type_inferred_int() async {
     await resolveTestCode('''
 var v = 0;
@@ -55,7 +54,7 @@
 class TopLevelVariableWithNullSafetyTest extends TopLevelVariableTest
     with WithNullSafetyMixin {
   test_type_inferred_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 var a = 0;
 ''');
diff --git a/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart b/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
index cc28da8..77fa53c 100644
--- a/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class TopTypeInferenceDriverResolutionTest extends DriverResolutionTest {
+class TopTypeInferenceDriverResolutionTest extends PubPackageResolutionTest {
   test_referenceInstanceVariable_withDeclaredType() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/dart/resolution/try_statement_test.dart b/pkg/analyzer/test/src/dart/resolution/try_statement_test.dart
index 2b544e6..d3f8c6b 100644
--- a/pkg/analyzer/test/src/dart/resolution/try_statement_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/try_statement_test.dart
@@ -5,22 +5,17 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../constant/potentially_constant_test.dart';
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(TryStatementTest);
-    defineReflectiveTests(TryStatementNullSafetyTest);
+    defineReflectiveTests(TryStatementWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class TryStatementNullSafetyTest extends TryStatementTest
-    with WithNullSafetyMixin {}
-
-@reflectiveTest
-class TryStatementTest extends DriverResolutionTest {
+class TryStatementTest extends PubPackageResolutionTest {
   test_catch_withoutType() async {
     await assertNoErrorsInCode(r'''
 main() {
@@ -68,3 +63,7 @@
     expect(node.stackTraceParameter.staticElement, st);
   }
 }
+
+@reflectiveTest
+class TryStatementWithNullSafetyTest extends TryStatementTest
+    with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/collection_elements_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/collection_elements_test.dart
index 33f1c6b..e3dc7da 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/collection_elements_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/collection_elements_test.dart
@@ -2,30 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(ForElementWithNnbdTest);
-    defineReflectiveTests(IfElementWithNnbdTest);
-    defineReflectiveTests(SpreadElementWithNnbdTest);
+    defineReflectiveTests(ForElementWithNullSafetyTest);
+    defineReflectiveTests(IfElementWithNullSafetyTest);
+    defineReflectiveTests(SpreadElementWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ForElementWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class ForElementWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_list_awaitForIn_dynamic_downward() async {
     await resolveTestCode('''
 void f() async {
@@ -202,15 +193,8 @@
 }
 
 @reflectiveTest
-class IfElementWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class IfElementWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_list_downward() async {
     await resolveTestCode('''
 void f() {
@@ -246,15 +230,8 @@
 }
 
 @reflectiveTest
-class SpreadElementWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class SpreadElementWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_list_downward() async {
     await resolveTestCode('''
 void f() {
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/conditional_expression_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/conditional_expression_test.dart
index 6f28467..ac8f412 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/conditional_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/conditional_expression_test.dart
@@ -2,21 +2,19 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ConditionalExpressionTest);
-    defineReflectiveTests(ConditionalExpressionWithNnbdTest);
+    defineReflectiveTests(ConditionalExpressionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ConditionalExpressionTest extends DriverResolutionTest {
+class ConditionalExpressionTest extends PubPackageResolutionTest {
   test_upward() async {
     await resolveTestCode('''
 void f(bool a, int b, int c) {
@@ -29,15 +27,8 @@
 }
 
 @reflectiveTest
-class ConditionalExpressionWithNnbdTest extends ConditionalExpressionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class ConditionalExpressionWithNullSafetyTest extends ConditionalExpressionTest
+    with WithNullSafetyMixin {
   @failingTest
   test_downward() async {
     await resolveTestCode('''
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/equality_expressions_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/equality_expressions_test.dart
index ddbebd7..9bca502 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/equality_expressions_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/equality_expressions_test.dart
@@ -2,23 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(EqualTest);
-    defineReflectiveTests(EqualWithNnbdTest);
+    defineReflectiveTests(EqualWithNullSafetyTest);
     defineReflectiveTests(NotEqualTest);
-    defineReflectiveTests(NotEqualWithNnbdTest);
+    defineReflectiveTests(NotEqualWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class EqualTest extends DriverResolutionTest {
+class EqualTest extends PubPackageResolutionTest {
   test_simple() async {
     await resolveTestCode('''
 void f(Object a, Object b) {
@@ -31,18 +29,10 @@
 }
 
 @reflectiveTest
-class EqualWithNnbdTest extends EqualTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-}
+class EqualWithNullSafetyTest extends EqualTest with WithNullSafetyMixin {}
 
 @reflectiveTest
-class NotEqualTest extends DriverResolutionTest {
+class NotEqualTest extends PubPackageResolutionTest {
   test_simple() async {
     await resolveTestCode('''
 void f(Object a, Object b) {
@@ -55,12 +45,5 @@
 }
 
 @reflectiveTest
-class NotEqualWithNnbdTest extends NotEqualTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
+class NotEqualWithNullSafetyTest extends NotEqualTest with WithNullSafetyMixin {
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/extension_methods_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/extension_methods_test.dart
index e27cd4e..75a5b52 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/extension_methods_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/extension_methods_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExtensionMethodsTest extends DriverResolutionTest {
+class ExtensionMethodsTest extends PubPackageResolutionTest {
   test_implicit_getter() async {
     await assertNoErrorsInCode('''
 class A<T> {}
@@ -306,7 +306,7 @@
   E(s).foo();
 }
 ''', [
-      error(StrongModeCode.COULD_NOT_INFER, 69, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 69, 1),
     ]);
     var override = findNode.extensionOverride('E(s)');
     assertElementTypeStrings(override.typeArgumentTypes, ['String']);
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/function_expression_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/function_expression_test.dart
index 2c08363..4ac90c4 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/function_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/function_expression_test.dart
@@ -2,21 +2,64 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(FunctionExpressionTest);
-    defineReflectiveTests(FunctionExpressionWithNnbdTest);
+    defineReflectiveTests(FunctionExpressionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class FunctionExpressionTest extends DriverResolutionTest {
+class FunctionExpressionTest extends PubPackageResolutionTest {
+  test_contextFunctionType_returnType_async_blockBody_futureOrVoid() async {
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [
+        error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 72, 1),
+      ],
+      legacy: [],
+    );
+    await assertErrorsInCode('''
+import 'dart:async';
+
+FutureOr<void> Function() v = () async {
+  return 0;
+};
+''', expectedErrors);
+    _assertReturnType(
+      '() async {',
+      typeStringByNullability(
+        nullable: 'Future<void>',
+        legacy: 'Future<int>',
+      ),
+    );
+  }
+
+  test_contextFunctionType_returnType_async_blockBody_futureVoid() async {
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [
+        error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 48, 1),
+      ],
+      legacy: [],
+    );
+    await assertErrorsInCode('''
+Future<void> Function() v = () async {
+  return 0;
+};
+''', expectedErrors);
+    _assertReturnType(
+      '() async {',
+      typeStringByNullability(
+        nullable: 'Future<void>',
+        legacy: 'Future<int>',
+      ),
+    );
+  }
+
   test_contextFunctionType_returnType_async_expressionBody() async {
     await assertNoErrorsInCode('''
 Future<num> Function() v = () async => 0;
@@ -118,6 +161,24 @@
     _assertReturnType('() {', 'int');
   }
 
+  test_contextFunctionType_returnType_sync_blockBody_void() async {
+    var expectedErrors = expectedErrorsByNullability(nullable: [
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 34, 1),
+    ], legacy: []);
+    await assertErrorsInCode('''
+void Function() v = () {
+  return 0;
+};
+''', expectedErrors);
+    _assertReturnType(
+      '() {',
+      typeStringByNullability(
+        nullable: 'void',
+        legacy: 'int',
+      ),
+    );
+  }
+
   test_contextFunctionType_returnType_sync_expressionBody() async {
     await assertNoErrorsInCode('''
 num Function() v = () => 0;
@@ -282,7 +343,7 @@
   }
 
   test_noContext_returnType_sync_blockBody_notNullable_switch_onEnum_imported() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 enum E { a, b }
 ''');
 
@@ -398,17 +459,10 @@
 }
 
 @reflectiveTest
-class FunctionExpressionWithNnbdTest extends FunctionExpressionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class FunctionExpressionWithNullSafetyTest extends FunctionExpressionTest
+    with WithNullSafetyMixin {
   test_contextFunctionType_nonNullify() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 
 int Function(int a) v;
@@ -430,7 +484,7 @@
   }
 
   test_contextFunctionType_nonNullify_returnType_takeActual() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 
 void foo(int Function() x) {}
@@ -446,7 +500,7 @@
   }
 
   test_contextFunctionType_nonNullify_returnType_takeContext() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 
 void foo(int Function() x) {}
@@ -501,7 +555,7 @@
   }
 
   test_optOut_downward_returnType_expressionBody_Null() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 void foo(Map<String, String> Function() f) {}
 ''');
     await resolveTestCode('''
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/list_literal_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/list_literal_test.dart
index d287dbd..53cb664 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/list_literal_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/list_literal_test.dart
@@ -2,71 +2,92 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ListLiteralTest);
-    defineReflectiveTests(ListLiteralWithNnbdTest);
+    defineReflectiveTests(ListLiteralWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ListLiteralTest extends DriverResolutionTest {
+class ListLiteralTest extends PubPackageResolutionTest {
   test_context_noTypeArgs_expression_conflict() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 List<int> a = ['a'];
-''');
+''', [
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 15, 3),
+    ]);
     assertType(findNode.listLiteral('['), 'List<int>');
   }
 
   test_context_noTypeArgs_expression_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 List<int> a = [1];
 ''');
     assertType(findNode.listLiteral('['), 'List<int>');
   }
 
   test_context_noTypeArgs_noElements() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 List<String> a = [];
 ''');
     assertType(findNode.listLiteral('['), 'List<String>');
   }
 
   test_context_noTypeArgs_noElements_typeParameter() async {
-    await resolveTestCode('''
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [
+        error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 39, 2),
+      ],
+      legacy: [
+        error(CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST, 39, 2),
+      ],
+    );
+    await assertErrorsInCode('''
 class A<E extends List<int>> {
   E a = [];
 }
-''');
+''', expectedErrors);
     assertType(findNode.listLiteral('['), 'List<dynamic>');
   }
 
   test_context_noTypeArgs_noElements_typeParameter_dynamic() async {
-    await resolveTestCode('''
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [
+        error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 43, 2),
+      ],
+      legacy: [
+        error(CompileTimeErrorCode.INVALID_CAST_LITERAL_LIST, 43, 2),
+      ],
+    );
+    await assertErrorsInCode('''
 class A<E extends List<dynamic>> {
   E a = [];
 }
-''');
+''', expectedErrors);
     assertType(findNode.listLiteral('['), 'List<dynamic>');
   }
 
   test_context_typeArgs_expression_conflictingContext() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 List<String> a = <int>[0];
-''');
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 17, 8),
+    ]);
     assertType(findNode.listLiteral('['), 'List<int>');
   }
 
   test_context_typeArgs_expression_conflictingExpression() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 List<String> a = <String>[0];
-''');
+''', [
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 26, 1),
+    ]);
     assertType(findNode.listLiteral('['), 'List<String>');
   }
 
@@ -74,102 +95,108 @@
   test_context_typeArgs_expression_conflictingTypeArgs() async {
     // Context type and element types both suggest `String`, so this should
     // override the explicit type argument.
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 List<String> a = <int>['a'];
 ''');
     assertType(findNode.listLiteral('['), 'List<String>');
   }
 
   test_context_typeArgs_expression_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 List<String> a = <String>['a'];
 ''');
     assertType(findNode.listLiteral('['), 'List<String>');
   }
 
   test_context_typeArgs_noElements_conflict() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 List<String> a = <int>[];
-''');
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 17, 7),
+    ]);
     assertType(findNode.listLiteral('['), 'List<int>');
   }
 
   test_context_typeArgs_noElements_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 List<String> a = <String>[];
 ''');
     assertType(findNode.listLiteral('['), 'List<String>');
   }
 
   test_noContext_noTypeArgs_expressions_lubOfInt() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = [1, 2, 3];
 ''');
     assertType(findNode.listLiteral('['), 'List<int>');
   }
 
   test_noContext_noTypeArgs_expressions_lubOfNum() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = [1, 2.3, 4];
 ''');
     assertType(findNode.listLiteral('['), 'List<num>');
   }
 
   test_noContext_noTypeArgs_expressions_lubOfObject() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = [1, '2', 3];
 ''');
     assertType(findNode.listLiteral('['), 'List<Object>');
   }
 
   test_noContext_noTypeArgs_expressions_unresolved() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 var a = [x];
-''');
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 9, 1),
+    ]);
     assertType(findNode.listLiteral('['), 'List<dynamic>');
   }
 
   test_noContext_noTypeArgs_expressions_unresolved_multiple() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 var a = [0, x, 2];
-''');
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 12, 1),
+    ]);
     assertType(findNode.listLiteral('['), 'List<dynamic>');
   }
 
   test_noContext_noTypeArgs_forEachWithDeclaration() async {
-    await resolveTestCode('''
-List<int> c;
+    await assertNoErrorsInCode('''
+List<int> c = [];
 var a = [for (int e in c) e * 2];
 ''');
     assertType(findNode.listLiteral('[for'), 'List<int>');
   }
 
   test_noContext_noTypeArgs_forEachWithIdentifier() async {
-    await resolveTestCode('''
-List<int> c;
-int b;
+    await assertNoErrorsInCode('''
+List<int> c = [];
+int b = 0;
 var a = [for (b in c) b * 2];
 ''');
     assertType(findNode.listLiteral('[for'), 'List<int>');
   }
 
   test_noContext_noTypeArgs_forWithDeclaration() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = [for (var i = 0; i < 2; i++) i * 2];
 ''');
     assertType(findNode.listLiteral('[for'), 'List<int>');
   }
 
   test_noContext_noTypeArgs_forWithExpression() async {
-    await resolveTestCode('''
-int i;
+    await assertNoErrorsInCode('''
+int i = 0;
 var a = [for (i = 0; i < 2; i++) i * 2];
 ''');
     assertType(findNode.listLiteral('[for'), 'List<int>');
   }
 
   test_noContext_noTypeArgs_if() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = [if (c) 1];
 ''');
@@ -177,7 +204,7 @@
   }
 
   test_noContext_noTypeArgs_ifElse_lubOfInt() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = [if (c) 1 else 2];
 ''');
@@ -185,7 +212,7 @@
   }
 
   test_noContext_noTypeArgs_ifElse_lubOfNum() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = [if (c) 1 else 2.3];
 ''');
@@ -193,7 +220,7 @@
   }
 
   test_noContext_noTypeArgs_ifElse_lubOfObject() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = [if (c) 1 else '2'];
 ''');
@@ -201,52 +228,53 @@
   }
 
   test_noContext_noTypeArgs_noElements() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = [];
 ''');
     assertType(findNode.listLiteral('['), 'List<dynamic>');
   }
 
   test_noContext_noTypeArgs_spread() async {
-    await resolveTestCode('''
-List<int> c;
+    await assertNoErrorsInCode('''
+List<int> c = [];
 var a = [...c];
 ''');
     assertType(findNode.listLiteral('[...'), 'List<int>');
   }
 
   test_noContext_noTypeArgs_spread_lubOfInt() async {
-    await resolveTestCode('''
-List<int> c;
-List<int> b;
+    await assertNoErrorsInCode('''
+List<int> c = [];
+List<int> b = [];
 var a = [...b, ...c];
 ''');
     assertType(findNode.listLiteral('[...'), 'List<int>');
   }
 
   test_noContext_noTypeArgs_spread_lubOfNum() async {
-    await resolveTestCode('''
-List<int> c;
-List<double> b;
+    await assertNoErrorsInCode('''
+List<int> c = [];
+List<double> b = [];
 var a = [...b, ...c];
 ''');
     assertType(findNode.listLiteral('[...'), 'List<num>');
   }
 
   test_noContext_noTypeArgs_spread_lubOfObject() async {
-    await resolveTestCode('''
-List<int> c;
-List<String> b;
+    await assertNoErrorsInCode('''
+List<int> c = [];
+List<String> b = [];
 var a = [...b, ...c];
 ''');
     assertType(findNode.listLiteral('[...'), 'List<Object>');
   }
 
   test_noContext_noTypeArgs_spread_mixin() async {
-    await resolveTestCode(r'''
+    await assertNoErrorsInCode(r'''
 mixin L on List<int> {}
-main() {
-  L l1;
+
+main(L l1) {
+  // ignore:unused_local_variable
   var l2 = [...l1];
 }
 ''');
@@ -254,49 +282,107 @@
   }
 
   test_noContext_noTypeArgs_spread_nestedInIf_oneAmbiguous() async {
-    await resolveTestCode('''
-List<int> c;
+    await assertNoErrorsInCode('''
+List<int> c = [];
 dynamic d;
 var a = [if (0 < 1) ...c else ...d];
 ''');
-    assertType(findNode.listLiteral('['), 'List<dynamic>');
+    assertType(findNode.listLiteral('[if'), 'List<dynamic>');
   }
 
-  test_noContext_noTypeArgs_spread_nullAware_nullAndNotNull() async {
-    await resolveTestCode('''
-f() async {
-  var futureNull = Future.value(null);
-  var a = [1, ...?await futureNull, 2];
+  test_noContext_noTypeArgs_spread_nullAware_null() async {
+    await assertNoErrorsInCode('''
+void f(Null a) {
+  // ignore:unused_local_variable
+  var v = [...?a];
 }
 ''');
     assertType(
       findNode.listLiteral('['),
       typeStringByNullability(
-        nullable: 'List<int?>',
-        legacy: 'List<int>',
+        nullable: 'List<Never>',
+        legacy: 'List<Null>',
       ),
     );
   }
 
-  test_noContext_noTypeArgs_spread_nullAware_onlyNull() async {
-    await resolveTestCode('''
-f() async {
-  var futureNull = Future.value(null);
-  var a = [...?await futureNull];
+  test_noContext_noTypeArgs_spread_nullAware_null2() async {
+    await assertNoErrorsInCode('''
+void f(Null a) {
+  // ignore:unused_local_variable
+  var v = [1, ...?a, 2];
 }
 ''');
-    assertType(findNode.listLiteral('['), 'List<Null>');
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_typeParameter_implementsNull() async {
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [],
+      legacy: [
+        error(CompileTimeErrorCode.NOT_ITERABLE_SPREAD, 85, 1),
+      ],
+    );
+    await assertErrorsInCode('''
+void f<T extends Null>(T a) async {
+  // ignore:unused_local_variable
+  var v = [...?a];
+}
+''', expectedErrors);
+    assertType(
+      findNode.listLiteral('['),
+      typeStringByNullability(
+        nullable: 'List<Never>',
+        legacy: 'List<dynamic>',
+      ),
+    );
+  }
+
+  test_noContext_noTypeArgs_spread_typeParameter_implementsIterable() async {
+    await assertNoErrorsInCode('''
+void f<T extends List<int>>(T a) {
+  // ignore:unused_local_variable
+  var v = [...a];
+}
+''');
+    assertType(findNode.listLiteral('[...'), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_spread_typeParameter_notImplementsIterable() async {
+    await assertErrorsInCode('''
+void f<T extends num>(T a) {
+  // ignore:unused_local_variable
+  var v = [...a];
+}
+''', [
+      error(CompileTimeErrorCode.NOT_ITERABLE_SPREAD, 77, 1),
+    ]);
+    assertType(findNode.listLiteral('[...'), 'List<dynamic>');
+  }
+
+  test_noContext_noTypeArgs_spread_typeParameter_notImplementsIterable2() async {
+    await assertErrorsInCode('''
+void f<T extends num>(T a) {
+  // ignore:unused_local_variable
+  var v = [...a, 0];
+}
+''', [
+      error(CompileTimeErrorCode.NOT_ITERABLE_SPREAD, 77, 1),
+    ]);
+    assertType(findNode.listLiteral('[...'), 'List<dynamic>');
   }
 
   test_noContext_typeArgs_expression_conflict() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 var a = <String>[1];
-''');
+''', [
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 17, 1),
+    ]);
     assertType(findNode.listLiteral('['), 'List<String>');
   }
 
   test_noContext_typeArgs_expression_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = <int>[1];
 ''');
     assertType(findNode.listLiteral('['), 'List<int>');
@@ -304,14 +390,14 @@
 
   @failingTest
   test_noContext_typeArgs_expressions_conflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = <int, String>[1, 2];
 ''');
     assertType(findNode.listLiteral('['), 'List<int>');
   }
 
   test_noContext_typeArgs_noElements() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = <num>[];
 ''');
     assertType(findNode.listLiteral('['), 'List<num>');
@@ -319,15 +405,8 @@
 }
 
 @reflectiveTest
-class ListLiteralWithNnbdTest extends ListLiteralTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class ListLiteralWithNullSafetyTest extends ListLiteralTest
+    with WithNullSafetyMixin {
   test_context_spread_nullAware() async {
     await assertNoErrorsInCode('''
 T f<T>(T t) => t;
@@ -366,4 +445,48 @@
     assertType(findNode.listLiteral('[1,'), 'List<int?>');
     assertType(findNode.listLiteral('[[0'), 'List<List<int?>>');
   }
+
+  test_noContext_noTypeArgs_spread_never() async {
+    await assertNoErrorsInCode('''
+void f(Never a) async {
+  // ignore:unused_local_variable
+  var v = [...a];
+}
+''');
+    assertType(findNode.listLiteral('['), 'List<Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_never() async {
+    await assertErrorsInCode('''
+void f(Never a) async {
+  // ignore:unused_local_variable
+  var v = [...?a];
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR, 69, 4),
+    ]);
+    assertType(findNode.listLiteral('['), 'List<Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_typeParameter_implementsNever() async {
+    await assertErrorsInCode('''
+void f<T extends Never>(T a) async {
+  // ignore:unused_local_variable
+  var v = [...?a];
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR, 82, 4),
+    ]);
+    assertType(findNode.listLiteral('['), 'List<Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_typeParameter_implementsNever() async {
+    await assertNoErrorsInCode('''
+void f<T extends Never>(T a) async {
+  // ignore:unused_local_variable
+  var v = [...a];
+}
+''');
+    assertType(findNode.listLiteral('['), 'List<Never>');
+  }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/local_variable_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/local_variable_test.dart
index 48ebf3e..90aabcf 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/local_variable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/local_variable_test.dart
@@ -4,8 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../constant/potentially_constant_test.dart';
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +14,7 @@
 }
 
 @reflectiveTest
-class LocalVariableTest extends DriverResolutionTest {
+class LocalVariableTest extends PubPackageResolutionTest {
   test_int() async {
     await resolveTestCode('''
 void f() {
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/logical_boolean_expressions_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/logical_boolean_expressions_test.dart
index 02eedf3..edb58ce 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/logical_boolean_expressions_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/logical_boolean_expressions_test.dart
@@ -2,23 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(LogicalAndTest);
-    defineReflectiveTests(LogicalAndWithNnbdTest);
+    defineReflectiveTests(LogicalAndWithNullSafetyTest);
     defineReflectiveTests(LogicalOrTest);
-    defineReflectiveTests(LogicalOrWithNnbdTest);
+    defineReflectiveTests(LogicalOrWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class LogicalAndTest extends DriverResolutionTest {
+class LogicalAndTest extends PubPackageResolutionTest {
   test_upward() async {
     await resolveTestCode('''
 void f(bool a, bool b) {
@@ -31,15 +29,8 @@
 }
 
 @reflectiveTest
-class LogicalAndWithNnbdTest extends LogicalAndTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class LogicalAndWithNullSafetyTest extends LogicalAndTest
+    with WithNullSafetyMixin {
   @failingTest
   test_downward() async {
     await resolveTestCode('''
@@ -56,7 +47,7 @@
 }
 
 @reflectiveTest
-class LogicalOrTest extends DriverResolutionTest {
+class LogicalOrTest extends PubPackageResolutionTest {
   test_upward() async {
     await resolveTestCode('''
 void f(bool a, bool b) {
@@ -69,15 +60,8 @@
 }
 
 @reflectiveTest
-class LogicalOrWithNnbdTest extends LogicalOrTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class LogicalOrWithNullSafetyTest extends LogicalOrTest
+    with WithNullSafetyMixin {
   @failingTest
   test_downward() async {
     await resolveTestCode('''
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/map_literal_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/map_literal_test.dart
index 6f441c5..594ad86 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/map_literal_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/map_literal_test.dart
@@ -2,109 +2,143 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(MapLiteralTest);
-    defineReflectiveTests(MapLiteralWithNnbdTest);
+    defineReflectiveTests(MapLiteralWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class MapLiteralTest extends DriverResolutionTest {
+class MapLiteralTest extends PubPackageResolutionTest {
   AstNode setOrMapLiteral(String search) => findNode.setOrMapLiteral(search);
 
   test_context_noTypeArgs_entry_conflictingKey() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 Map<int, int> a = {'a' : 1};
-''');
+''', [
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 19, 3),
+    ]);
     assertType(setOrMapLiteral('{'), 'Map<int, int>');
   }
 
   test_context_noTypeArgs_entry_conflictingValue() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 Map<int, int> a = {1 : 'a'};
-''');
+''', [
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 23, 3),
+    ]);
     assertType(setOrMapLiteral('{'), 'Map<int, int>');
   }
 
   test_context_noTypeArgs_entry_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 Map<int, int> a = {1 : 2};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<int, int>');
   }
 
-  test_context_noTypeArgs_noEntries() async {
+  test_context_noTypeArgs_noElements_futureOr() async {
     await resolveTestCode('''
+import 'dart:async';
+
+FutureOr<Map<int, String>> f() {
+  return {};
+}
+''');
+    assertType(setOrMapLiteral('{};'), 'Map<int, String>');
+  }
+
+  test_context_noTypeArgs_noEntries() async {
+    await assertNoErrorsInCode('''
 Map<String, String> a = {};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<String, String>');
   }
 
   test_context_noTypeArgs_noEntries_typeParameters() async {
-    await resolveTestCode('''
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [
+        error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 46, 2),
+      ],
+      legacy: [
+        error(CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP, 46, 2),
+      ],
+    );
+    await assertErrorsInCode('''
 class A<E extends Map<int, String>> {
   E a = {};
 }
-''');
+''', expectedErrors);
     assertType(setOrMapLiteral('{}'), 'Map<dynamic, dynamic>');
   }
 
   test_context_noTypeArgs_noEntries_typeParameters_dynamic() async {
-    await resolveTestCode('''
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [
+        error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 51, 2),
+      ],
+      legacy: [
+        error(CompileTimeErrorCode.INVALID_CAST_LITERAL_MAP, 51, 2),
+      ],
+    );
+    await assertErrorsInCode('''
 class A<E extends Map<dynamic, dynamic>> {
   E a = {};
 }
-''');
+''', expectedErrors);
     assertType(setOrMapLiteral('{}'), 'Map<dynamic, dynamic>');
   }
 
   test_context_typeArgs_entry_conflictingKey() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 Map<String, String> a = <String, String>{0 : 'a'};
-''');
+''', [
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 41, 1),
+    ]);
     assertType(setOrMapLiteral('{'), 'Map<String, String>');
   }
 
   test_context_typeArgs_entry_conflictingValue() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 Map<String, String> a = <String, String>{'a' : 1};
-''');
+''', [
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 47, 1),
+    ]);
     assertType(setOrMapLiteral('{'), 'Map<String, String>');
   }
 
   test_context_typeArgs_entry_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 Map<String, String> a = <String, String>{'a' : 'b'};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<String, String>');
   }
 
   test_context_typeArgs_noEntries_conflict() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 Map<String, String> a = <int, int>{};
-''');
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 24, 12),
+    ]);
     assertType(setOrMapLiteral('{'), 'Map<int, int>');
   }
 
   test_context_typeArgs_noEntries_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 Map<String, String> a = <String, String>{};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<String, String>');
   }
 
   test_default_constructor_param_typed() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 class C {
   const C({x = const <String, int>{}});
 }
@@ -112,7 +146,7 @@
   }
 
   test_default_constructor_param_untyped() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 class C {
   const C({x = const {}});
 }
@@ -120,60 +154,60 @@
   }
 
   test_noContext_noTypeArgs_expressions_lubOfIntAndString() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = {1 : 'a', 2 : 'b', 3 : 'c'};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<int, String>');
   }
 
   test_noContext_noTypeArgs_expressions_lubOfNumAndNum() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = {1 : 2, 3.0 : 4, 5 : 6.0};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<num, num>');
   }
 
   test_noContext_noTypeArgs_expressions_lubOfObjectAndObject() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = {1 : '1', '2' : 2, 3 : '3'};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<Object, Object>');
   }
 
   test_noContext_noTypeArgs_forEachWithDeclaration() async {
-    await resolveTestCode('''
-List<int> c;
+    await assertNoErrorsInCode('''
+List<int> c = [];
 var a = {for (int e in c) e : e * 2};
 ''');
     assertType(setOrMapLiteral('{for'), 'Map<int, int>');
   }
 
   test_noContext_noTypeArgs_forEachWithIdentifier() async {
-    await resolveTestCode('''
-List<int> c;
-int b;
+    await assertNoErrorsInCode('''
+List<int> c = [];
+int b = 0;
 var a = {for (b in c) b * 2 : b};
 ''');
     assertType(setOrMapLiteral('{for'), 'Map<int, int>');
   }
 
   test_noContext_noTypeArgs_forWithDeclaration() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = {for (var i = 0; i < 2; i++) i : i * 2};
 ''');
     assertType(setOrMapLiteral('{for'), 'Map<int, int>');
   }
 
   test_noContext_noTypeArgs_forWithExpression() async {
-    await resolveTestCode('''
-int i;
+    await assertNoErrorsInCode('''
+int i = 0;
 var a = {for (i = 0; i < 2; i++) i * 2 : i};
 ''');
     assertType(setOrMapLiteral('{for'), 'Map<int, int>');
   }
 
   test_noContext_noTypeArgs_if() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = {if (c) 1 : 2};
 ''');
@@ -181,7 +215,7 @@
   }
 
   test_noContext_noTypeArgs_ifElse_lubOfIntAndInt() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = {if (c) 1 : 3 else 2 : 4};
 ''');
@@ -189,7 +223,7 @@
   }
 
   test_noContext_noTypeArgs_ifElse_lubOfNumAndNum() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = {if (c) 1.0 : 3 else 2 : 4.0};
 ''');
@@ -197,7 +231,7 @@
   }
 
   test_noContext_noTypeArgs_ifElse_lubOfObjectAndObject() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = {if (c) 1 : '1' else '2': 2 };
 ''');
@@ -205,22 +239,22 @@
   }
 
   test_noContext_noTypeArgs_noEntries() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = {};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<dynamic, dynamic>');
   }
 
   test_noContext_noTypeArgs_spread() async {
-    await resolveTestCode('''
-Map<int, int> c;
+    await assertNoErrorsInCode('''
+Map<int, int> c = {};
 var a = {...c};
 ''');
     assertType(setOrMapLiteral('{...'), 'Map<int, int>');
   }
 
   test_noContext_noTypeArgs_spread_dynamic() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var c = {};
 var a = {...c};
 ''');
@@ -228,37 +262,38 @@
   }
 
   test_noContext_noTypeArgs_spread_lubOfIntAndInt() async {
-    await resolveTestCode('''
-Map<int, int> c;
-Map<int, int> b;
+    await assertNoErrorsInCode('''
+Map<int, int> c = {};
+Map<int, int> b = {};
 var a = {...b, ...c};
 ''');
     assertType(setOrMapLiteral('{...'), 'Map<int, int>');
   }
 
   test_noContext_noTypeArgs_spread_lubOfNumAndNum() async {
-    await resolveTestCode('''
-Map<int, double> c;
-Map<double, int> b;
+    await assertNoErrorsInCode('''
+Map<int, double> c = {};
+Map<double, int> b = {};
 var a = {...b, ...c};
 ''');
     assertType(setOrMapLiteral('{...'), 'Map<num, num>');
   }
 
   test_noContext_noTypeArgs_spread_lubOfObjectObject() async {
-    await resolveTestCode('''
-Map<int, int> c;
-Map<String, String> b;
+    await assertNoErrorsInCode('''
+Map<int, int> c = {};
+Map<String, String> b = {};
 var a = {...b, ...c};
 ''');
     assertType(setOrMapLiteral('{...'), 'Map<Object, Object>');
   }
 
   test_noContext_noTypeArgs_spread_mixin() async {
-    await resolveTestCode(r'''
+    await assertNoErrorsInCode(r'''
 mixin M on Map<String, int> {}
-main() {
-  M m1;
+
+main(M m1) {
+  // ignore:unused_local_variable
   var m2 = {...m1};
 }
 ''');
@@ -266,99 +301,126 @@
   }
 
   test_noContext_noTypeArgs_spread_nestedInIf_oneAmbiguous() async {
-    await resolveTestCode('''
-Map<String, int> c;
+    await assertNoErrorsInCode('''
+Map<String, int> c = {};
 dynamic d;
 var a = {if (0 < 1) ...c else ...d};
 ''');
-    assertType(setOrMapLiteral('{'), 'Map<dynamic, dynamic>');
+    assertType(setOrMapLiteral('{if'), 'Map<dynamic, dynamic>');
   }
 
   test_noContext_noTypeArgs_spread_nullAware_nullAndNotNull_map() async {
     await assertNoErrorsInCode('''
-f() async {
-  var futureNull = Future.value(null);
-  var a = {1 : 'a', ...?await futureNull, 2 : 'b'};
-  a;
+void f(Null a) {
+  // ignore:unused_local_variable
+  var v = {1 : 'a', ...?a, 2 : 'b'};
 }
 ''');
-    assertType(
-      setOrMapLiteral('{1'),
-      typeStringByNullability(
-        nullable: 'Map<int?, String?>',
-        legacy: 'Map<int, String>',
-      ),
-    );
+    assertType(setOrMapLiteral('{1'), 'Map<int, String>');
   }
 
   test_noContext_noTypeArgs_spread_nullAware_nullAndNotNull_set() async {
     await assertNoErrorsInCode('''
-f() async {
-  var futureNull = Future.value(null);
-  var a = {1, ...?await futureNull, 2};
-  a;
+void f(Null a) {
+  // ignore:unused_local_variable
+  var v = {1, ...?a, 2};
 }
 ''');
-    assertType(
-      setOrMapLiteral('{1'),
-      typeStringByNullability(
-        nullable: 'Set<int?>',
-        legacy: 'Set<int>',
-      ),
-    );
+    assertType(setOrMapLiteral('{1'), 'Set<int>');
   }
 
   test_noContext_noTypeArgs_spread_nullAware_onlyNull() async {
     await assertErrorsInCode('''
-f() async {
-  var futureNull = Future.value(null);
-  var a = {...?await futureNull};
-  a;
+void f(Null a) {
+  // ignore:unused_local_variable
+  var v = {...?a};
 }
 ''', [
-      error(CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, 61, 22),
+      error(CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, 61, 7),
+    ]);
+    assertType(setOrMapLiteral('{...'), 'dynamic');
+  }
+
+  test_noContext_noTypeArgs_spread_typeParameter_implementsMap() async {
+    await assertNoErrorsInCode('''
+void f<T extends Map<int, String>>(T a) {
+  // ignore:unused_local_variable
+  var v = {...a};
+}
+''');
+    assertType(setOrMapLiteral('{...'), 'Map<int, String>');
+  }
+
+  /// TODO(scheglov) Should report [CompileTimeErrorCode.NOT_ITERABLE_SPREAD].
+  test_noContext_noTypeArgs_spread_typeParameter_notImplementsMap() async {
+    await assertErrorsInCode('''
+void f<T extends num>(T a) {
+  // ignore:unused_local_variable
+  var v = {...a};
+}
+''', [
+      error(CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, 73, 6),
+    ]);
+    assertType(setOrMapLiteral('{...'), 'dynamic');
+  }
+
+  /// TODO(scheglov) Should report [CompileTimeErrorCode.NOT_ITERABLE_SPREAD].
+  test_noContext_noTypeArgs_spread_typeParameter_notImplementsMap2() async {
+    await assertErrorsInCode('''
+void f<T extends num>(T a) {
+  // ignore:unused_local_variable
+  var v = {...a, 0: 1};
+}
+''', [
+      error(CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, 73, 12),
     ]);
     assertType(setOrMapLiteral('{...'), 'dynamic');
   }
 
   test_noContext_typeArgs_entry_conflictingKey() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 var a = <String, int>{1 : 2};
-''');
+''', [
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 22, 1),
+    ]);
     assertType(setOrMapLiteral('{'), 'Map<String, int>');
   }
 
   test_noContext_typeArgs_entry_conflictingValue() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 var a = <String, int>{'a' : 'b'};
-''');
+''', [
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 28, 3),
+    ]);
     assertType(setOrMapLiteral('{'), 'Map<String, int>');
   }
 
   test_noContext_typeArgs_entry_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = <int, int>{1 : 2};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<int, int>');
   }
 
   test_noContext_typeArgs_expression_conflictingElement() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 var a = <int, String>{1};
-''');
+''', [
+      error(CompileTimeErrorCode.EXPRESSION_IN_MAP, 22, 1),
+    ]);
     assertType(setOrMapLiteral('{'), 'Map<int, String>');
   }
 
   @failingTest
   test_noContext_typeArgs_expressions_conflictingTypeArgs() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = <int>{1 : 2, 3 : 4};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<int, int>');
   }
 
   test_noContext_typeArgs_noEntries() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = <num, String>{};
 ''');
     assertType(setOrMapLiteral('{'), 'Map<num, String>');
@@ -366,18 +428,10 @@
 }
 
 @reflectiveTest
-class MapLiteralWithNnbdTest extends MapLiteralTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class MapLiteralWithNullSafetyTest extends MapLiteralTest
+    with WithNullSafetyMixin {
   test_context_noTypeArgs_noEntries_typeParameterNullable() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 class C<T extends Object?> {
   Map<String, T> a = {}; // 1
   Map<String, T>? b = {}; // 2
@@ -408,4 +462,78 @@
       type: 'Map<int, double>?',
     );
   }
+
+  test_noContext_noTypeArgs_spread_never() async {
+    await assertErrorsInCode('''
+void f(Never a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...a, if (b) throw 0: throw 0};
+}
+''', [
+      error(HintCode.DEAD_CODE, 87, 21),
+    ]);
+    assertType(setOrMapLiteral('{...'), 'Map<Never, Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_never() async {
+    await assertErrorsInCode('''
+void f(Never a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...?a, if (b) throw 0: throw 0};
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR, 77, 4),
+      error(HintCode.DEAD_CODE, 88, 21),
+    ]);
+    assertType(setOrMapLiteral('{...'), 'Map<Never, Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_null() async {
+    await assertErrorsInCode('''
+void f(Null a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...?a, if (b) throw 0: throw 0};
+}
+''', [
+      error(HintCode.DEAD_CODE, 99, 9),
+    ]);
+    assertType(setOrMapLiteral('{...'), 'Map<Never, Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_typeParameter_never() async {
+    await assertErrorsInCode('''
+void f<T extends Never>(T a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...?a, if (b) throw 0: throw 0};
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR, 90, 4),
+      error(HintCode.DEAD_CODE, 101, 21),
+    ]);
+    assertType(setOrMapLiteral('{...'), 'Map<Never, Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_typeParameter_null() async {
+    await assertErrorsInCode('''
+void f<T extends Null>(T a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...?a, if (b) throw 0: throw 0};
+}
+''', [
+      error(HintCode.DEAD_CODE, 112, 9),
+    ]);
+    assertType(setOrMapLiteral('{...'), 'Map<Never, Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_typeParameter_never() async {
+    await assertErrorsInCode('''
+void f<T extends Never>(T a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...a, if (b) throw 0: throw 0};
+}
+''', [
+      error(HintCode.DEAD_CODE, 100, 21),
+    ]);
+    assertType(setOrMapLiteral('{...'), 'Map<Never, Never>');
+  }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/set_literal_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/set_literal_test.dart
index 0711c83..0b119df 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/set_literal_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/set_literal_test.dart
@@ -2,155 +2,186 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(SetLiteralTest);
-    defineReflectiveTests(SetLiteralWithNnbdTest);
+    defineReflectiveTests(SetLiteralWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class SetLiteralTest extends DriverResolutionTest {
+class SetLiteralTest extends PubPackageResolutionTest {
   AstNode setLiteral(String search) => findNode.setOrMapLiteral(search);
 
   test_context_noTypeArgs_expression_conflict() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 Set<int> a = {'a'};
-''');
+''', [
+      error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 14, 3),
+    ]);
     assertType(setLiteral('{'), 'Set<int>');
   }
 
   test_context_noTypeArgs_expression_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 Set<int> a = {1};
 ''');
     assertType(setLiteral('{'), 'Set<int>');
   }
 
   test_context_noTypeArgs_noElements() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 Set<String> a = {};
 ''');
     assertType(setLiteral('{'), 'Set<String>');
   }
 
-  test_context_noTypeArgs_noElements_typeParameter() async {
+  test_context_noTypeArgs_noElements_futureOr() async {
     await resolveTestCode('''
+import 'dart:async';
+
+FutureOr<Set<int>> f() {
+  return {};
+}
+''');
+    assertType(setLiteral('{};'), 'Set<int>');
+  }
+
+  test_context_noTypeArgs_noElements_typeParameter() async {
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [
+        error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 38, 2),
+      ],
+      legacy: [
+        error(CompileTimeErrorCode.INVALID_CAST_LITERAL_SET, 38, 2),
+      ],
+    );
+    await assertErrorsInCode('''
 class A<E extends Set<int>> {
   E a = {};
 }
-''');
+''', expectedErrors);
     assertType(setLiteral('{}'), 'Set<dynamic>');
   }
 
   test_context_noTypeArgs_noElements_typeParameter_dynamic() async {
-    await resolveTestCode('''
+    var expectedErrors = expectedErrorsByNullability(
+      nullable: [
+        error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 42, 2),
+      ],
+      legacy: [
+        error(CompileTimeErrorCode.INVALID_CAST_LITERAL_SET, 42, 2),
+      ],
+    );
+    await assertErrorsInCode('''
 class A<E extends Set<dynamic>> {
   E a = {};
 }
-''');
+''', expectedErrors);
     assertType(setLiteral('{}'), 'Set<dynamic>');
   }
 
   test_context_typeArgs_expression_conflictingExpression() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 Set<String> a = <String>{0};
-''');
+''', [
+      error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 25, 1),
+    ]);
     assertType(setLiteral('{'), 'Set<String>');
   }
 
   @failingTest
   test_context_typeArgs_expression_conflictingTypeArgs() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 Set<String> a = <int>{'a'};
 ''');
     assertType(setLiteral('{'), 'Set<String>');
   }
 
   test_context_typeArgs_expression_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 Set<String> a = <String>{'a'};
 ''');
     assertType(setLiteral('{'), 'Set<String>');
   }
 
   test_context_typeArgs_noElements_conflict() async {
-    await resolveTestCode('''
+    await assertErrorsInCode('''
 Set<String> a = <int>{};
-''');
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 16, 7),
+    ]);
     assertType(setLiteral('{'), 'Set<int>');
   }
 
   test_context_typeArgs_noElements_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 Set<String> a = <String>{};
 ''');
     assertType(setLiteral('{'), 'Set<String>');
   }
 
   test_noContext_noTypeArgs_expressions_lubOfInt() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = {1, 2, 3};
 ''');
     assertType(setLiteral('{'), 'Set<int>');
   }
 
   test_noContext_noTypeArgs_expressions_lubOfNum() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = {1, 2.3, 4};
 ''');
     assertType(setLiteral('{'), 'Set<num>');
   }
 
   test_noContext_noTypeArgs_expressions_lubOfObject() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = {1, '2', 3};
 ''');
     assertType(setLiteral('{'), 'Set<Object>');
   }
 
   test_noContext_noTypeArgs_forEachWithDeclaration() async {
-    await resolveTestCode('''
-List<int> c;
+    await assertNoErrorsInCode('''
+List<int> c = [];
 var a = {for (int e in c) e * 2};
 ''');
     assertType(setLiteral('{for'), 'Set<int>');
   }
 
   test_noContext_noTypeArgs_forEachWithIdentifier() async {
-    await resolveTestCode('''
-List<int> c;
-int b;
+    await assertNoErrorsInCode('''
+List<int> c = [];
+int b = 0;
 var a = {for (b in c) b * 2};
 ''');
     assertType(setLiteral('{for'), 'Set<int>');
   }
 
   test_noContext_noTypeArgs_forWithDeclaration() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = {for (var i = 0; i < 2; i++) i * 2};
 ''');
     assertType(setLiteral('{for'), 'Set<int>');
   }
 
   test_noContext_noTypeArgs_forWithExpression() async {
-    await resolveTestCode('''
-int i;
+    await assertNoErrorsInCode('''
+int i = 0;
 var a = {for (i = 0; i < 2; i++) i * 2};
 ''');
     assertType(setLiteral('{for'), 'Set<int>');
   }
 
   test_noContext_noTypeArgs_if() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = {if (c) 1};
 ''');
@@ -158,7 +189,7 @@
   }
 
   test_noContext_noTypeArgs_ifElse_lubOfInt() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = {if (c) 1 else 2};
 ''');
@@ -166,7 +197,7 @@
   }
 
   test_noContext_noTypeArgs_ifElse_lubOfNum() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = {if (c) 1 else 2.3};
 ''');
@@ -174,7 +205,7 @@
   }
 
   test_noContext_noTypeArgs_ifElse_lubOfObject() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 bool c = true;
 var a = {if (c) 1 else '2'};
 ''');
@@ -182,45 +213,46 @@
   }
 
   test_noContext_noTypeArgs_spread() async {
-    await resolveTestCode('''
-List<int> c;
+    await assertNoErrorsInCode('''
+List<int> c = [];
 var a = {...c};
 ''');
     assertType(setLiteral('{...'), 'Set<int>');
   }
 
   test_noContext_noTypeArgs_spread_lubOfInt() async {
-    await resolveTestCode('''
-List<int> c;
-List<int> b;
+    await assertNoErrorsInCode('''
+List<int> c = [];
+List<int> b = [];
 var a = {...b, ...c};
 ''');
     assertType(setLiteral('{...'), 'Set<int>');
   }
 
   test_noContext_noTypeArgs_spread_lubOfNum() async {
-    await resolveTestCode('''
-List<int> c;
-List<double> b;
+    await assertNoErrorsInCode('''
+List<int> c = [];
+List<double> b = [];
 var a = {...b, ...c};
 ''');
     assertType(setLiteral('{...'), 'Set<num>');
   }
 
   test_noContext_noTypeArgs_spread_lubOfObject() async {
-    await resolveTestCode('''
-List<int> c;
-List<String> b;
+    await assertNoErrorsInCode('''
+List<int> c = [];
+List<String> b = [];
 var a = {...b, ...c};
 ''');
     assertType(setLiteral('{...'), 'Set<Object>');
   }
 
   test_noContext_noTypeArgs_spread_mixin() async {
-    await resolveTestCode(r'''
+    await assertNoErrorsInCode(r'''
 mixin S on Set<int> {}
-main() {
-  S s1;
+
+void f(S s1) {
+  // ignore:unused_local_variable
   var s2 = {...s1};
 }
 ''');
@@ -228,34 +260,69 @@
   }
 
   test_noContext_noTypeArgs_spread_nestedInIf_oneAmbiguous() async {
-    await resolveTestCode('''
-List<int> c;
+    await assertNoErrorsInCode('''
+List<int> c = [];
 dynamic d;
 var a = {if (0 < 1) ...c else ...d};
 ''');
-    assertType(setLiteral('{'), 'Set<dynamic>');
+    assertType(setLiteral('{if'), 'Set<dynamic>');
   }
 
-  @failingTest
   test_noContext_noTypeArgs_spread_nullAware_nullAndNotNull() async {
-    await resolveTestCode('''
-f() {
-  var futureNull = Future.value(null);
-  var a = {1, ...?await futureNull, 2};
+    await assertNoErrorsInCode('''
+void f(Null a) {
+  // ignore:unused_local_variable
+  var v = {1, ...?a, 2};
 }
 ''');
     assertType(setLiteral('{1'), 'Set<int>');
   }
 
-  test_noContext_typeArgs_expression_conflict() async {
-    await resolveTestCode('''
-var a = <String>{1};
+  test_noContext_noTypeArgs_spread_typeParameter_implementsIterable() async {
+    await assertNoErrorsInCode('''
+void f<T extends List<int>>(T a) {
+  // ignore:unused_local_variable
+  var v = {...a};
+}
 ''');
+    assertType(setLiteral('{...'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_spread_typeParameter_notImplementsIterable() async {
+    await assertErrorsInCode('''
+void f<T extends num>(T a) {
+  // ignore:unused_local_variable
+  var v = {...a};
+}
+''', [
+      error(CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, 73, 6),
+    ]);
+    assertType(setLiteral('{...'), 'dynamic');
+  }
+
+  test_noContext_noTypeArgs_spread_typeParameter_notImplementsIterable2() async {
+    await assertErrorsInCode('''
+void f<T extends num>(T a) {
+  // ignore:unused_local_variable
+  var v = {...a, 0};
+}
+''', [
+      error(CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, 73, 9),
+    ]);
+    assertType(setLiteral('{...'), 'dynamic');
+  }
+
+  test_noContext_typeArgs_expression_conflict() async {
+    await assertErrorsInCode('''
+var a = <String>{1};
+''', [
+      error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 17, 1),
+    ]);
     assertType(setLiteral('{'), 'Set<String>');
   }
 
   test_noContext_typeArgs_expression_noConflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = <int>{1};
 ''');
     assertType(setLiteral('{'), 'Set<int>');
@@ -263,14 +330,14 @@
 
   @failingTest
   test_noContext_typeArgs_expressions_conflict() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = <int, String>{1, 2};
 ''');
     assertType(setLiteral('{'), 'Set<int>');
   }
 
   test_noContext_typeArgs_noElements() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 var a = <num>{};
 ''');
     assertType(setLiteral('{'), 'Set<num>');
@@ -278,27 +345,19 @@
 }
 
 @reflectiveTest
-class SetLiteralWithNnbdTest extends SetLiteralTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class SetLiteralWithNullSafetyTest extends SetLiteralTest
+    with WithNullSafetyMixin {
   AstNode setOrMapLiteral(String search) => findNode.setOrMapLiteral(search);
 
   test_context_noTypeArgs_noEntries() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 Set<String> a = {};
 ''');
     assertType(setOrMapLiteral('{'), 'Set<String>');
   }
 
   test_context_noTypeArgs_noEntries_typeParameterNullable() async {
-    await resolveTestCode('''
+    await assertNoErrorsInCode('''
 class C<T extends Object?> {
   Set<T> a = {}; // 1
   Set<T>? b = {}; // 2
@@ -311,4 +370,74 @@
     assertType(setOrMapLiteral('{}; // 3'), 'Set<T?>');
     assertType(setOrMapLiteral('{}; // 4'), 'Set<T?>');
   }
+
+  test_noContext_noTypeArgs_spread_never() async {
+    await assertErrorsInCode('''
+void f(Never a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...a, if (b) throw 0};
+}
+''', [
+      error(HintCode.DEAD_CODE, 87, 12),
+    ]);
+    assertType(setLiteral('{...'), 'Set<Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_never() async {
+    await assertErrorsInCode('''
+void f(Never a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...?a, if (b) throw 0};
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR, 77, 4),
+      error(HintCode.DEAD_CODE, 88, 12),
+    ]);
+    assertType(setLiteral('{...'), 'Set<Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_null() async {
+    await assertNoErrorsInCode('''
+void f(Null a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...?a, if (b) throw 0};
+}
+''');
+    assertType(setLiteral('{...'), 'Set<Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_typeParameter_never() async {
+    await assertErrorsInCode('''
+void f<T extends Never>(T a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...?a, if (b) throw 0};
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR, 90, 4),
+      error(HintCode.DEAD_CODE, 101, 12),
+    ]);
+    assertType(setLiteral('{...'), 'Set<Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_typeParameter_null() async {
+    await assertNoErrorsInCode('''
+void f<T extends Null>(T a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...?a, if (b) throw 0};
+}
+''');
+    assertType(setLiteral('{...'), 'Set<Never>');
+  }
+
+  test_noContext_noTypeArgs_spread_typeParameter_never() async {
+    await assertErrorsInCode('''
+void f<T extends Never>(T a, bool b) async {
+  // ignore:unused_local_variable
+  var v = {...a, if (b) throw 0};
+}
+''', [
+      error(HintCode.DEAD_CODE, 100, 12),
+    ]);
+    assertType(setLiteral('{...'), 'Set<Never>');
+  }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/statements_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/statements_test.dart
index 025800d..ad542d5 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/statements_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/statements_test.dart
@@ -2,32 +2,23 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(AssertWithNnbdTest);
-    defineReflectiveTests(DoWithNnbdTest);
-    defineReflectiveTests(ForWithNnbdTest);
-    defineReflectiveTests(IfWithNnbdTest);
-    defineReflectiveTests(WhileWithNnbdTest);
+    defineReflectiveTests(AssertWithNullSafetyTest);
+    defineReflectiveTests(DoWithNullSafetyTest);
+    defineReflectiveTests(ForWithNullSafetyTest);
+    defineReflectiveTests(IfWithNullSafetyTest);
+    defineReflectiveTests(WhileWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class AssertWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class AssertWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_downward() async {
     await resolveTestCode('''
 void f() {
@@ -40,15 +31,8 @@
 }
 
 @reflectiveTest
-class DoWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class DoWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_downward() async {
     await resolveTestCode('''
 void f() {
@@ -61,15 +45,8 @@
 }
 
 @reflectiveTest
-class ForWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class ForWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_awaitForIn_dynamic_downward() async {
     await resolveTestCode('''
 void f() async {
@@ -125,15 +102,8 @@
 }
 
 @reflectiveTest
-class IfWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class IfWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_downward() async {
     await resolveTestCode('''
 void f() {
@@ -146,15 +116,8 @@
 }
 
 @reflectiveTest
-class WhileWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class WhileWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_downward() async {
     await resolveTestCode('''
 void f() {
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/tear_off_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/tear_off_test.dart
index 607202d..5f939e3 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/tear_off_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/tear_off_test.dart
@@ -7,7 +7,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,7 +16,7 @@
 }
 
 @reflectiveTest
-class TearOffTest extends DriverResolutionTest {
+class TearOffTest extends PubPackageResolutionTest {
   test_empty_contextNotInstantiated() async {
     await assertErrorsInCode('''
 T f<T>(T x) => x;
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/throw_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/throw_test.dart
index d8a978c..05d8a77 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/throw_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/throw_test.dart
@@ -2,28 +2,19 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(ThrowWithNnbdTest);
+    defineReflectiveTests(ThrowWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ThrowWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class ThrowWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_downward() async {
     await resolveTestCode('''
 void f() {
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/type_test_expressions_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/type_test_expressions_test.dart
index f90d562..63618fd 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_inference/type_test_expressions_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/type_test_expressions_test.dart
@@ -2,23 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../driver_resolution.dart';
+import '../context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(IsNotTest);
-    defineReflectiveTests(IsNotWithNnbdTest);
+    defineReflectiveTests(IsNotWithNullSafetyTest);
     defineReflectiveTests(IsTest);
-    defineReflectiveTests(IsWithNnbdTest);
+    defineReflectiveTests(IsWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class IsNotTest extends DriverResolutionTest {
+class IsNotTest extends PubPackageResolutionTest {
   test_simple() async {
     await resolveTestCode('''
 void f(Object a) {
@@ -31,18 +29,10 @@
 }
 
 @reflectiveTest
-class IsNotWithNnbdTest extends IsNotTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-}
+class IsNotWithNullSafetyTest extends IsNotTest with WithNullSafetyMixin {}
 
 @reflectiveTest
-class IsTest extends DriverResolutionTest {
+class IsTest extends PubPackageResolutionTest {
   test_simple() async {
     await resolveTestCode('''
 void f(Object a) {
@@ -55,12 +45,4 @@
 }
 
 @reflectiveTest
-class IsWithNnbdTest extends IsTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-}
+class IsWithNullSafetyTest extends IsTest with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/type_name_test.dart b/pkg/analyzer/test/src/dart/resolution/type_name_test.dart
index 89f9a8e..f50eea9 100644
--- a/pkg/analyzer/test/src/dart/resolution/type_name_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/type_name_test.dart
@@ -2,23 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/test_utilities/find_element.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(TypeNameResolutionTest);
-    defineReflectiveTests(TypeNameResolutionWithNnbdTest);
+    defineReflectiveTests(TypeNameResolutionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class TypeNameResolutionTest extends DriverResolutionTest {
+class TypeNameResolutionTest extends PubPackageResolutionTest {
   @override
   bool get typeToStringWithNullability => true;
 
@@ -199,7 +197,7 @@
   new math.A();
 }
 ''', [
-      error(StaticWarningCode.NEW_WITH_NON_TYPE, 49, 1),
+      error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 49, 1),
     ]);
 
     assertTypeName(
@@ -232,7 +230,7 @@
   new A();
 }
 ''', [
-      error(StaticWarningCode.NEW_WITH_NON_TYPE, 15, 1),
+      error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 15, 1),
     ]);
 
     assertTypeName(
@@ -242,6 +240,40 @@
     );
   }
 
+  test_invalid_prefixedIdentifier_instanceCreation() async {
+    await assertErrorsInCode(r'''
+void f() {
+  new int.double.other();
+}
+''', [
+      error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 17, 10),
+    ]);
+
+    assertTypeName(
+      findNode.typeName('int.double'),
+      null,
+      'dynamic',
+      expectedPrefix: intElement,
+    );
+  }
+
+  test_invalid_prefixedIdentifier_literal() async {
+    await assertErrorsInCode(r'''
+void f() {
+  0 as int.double;
+}
+''', [
+      error(CompileTimeErrorCode.NOT_A_TYPE, 18, 10),
+    ]);
+
+    assertTypeName(
+      findNode.typeName('int.double'),
+      null,
+      'dynamic',
+      expectedPrefix: intElement,
+    );
+  }
+
   test_never() async {
     await assertNoErrorsInCode(r'''
 f(Never a) {}
@@ -256,18 +288,14 @@
 }
 
 @reflectiveTest
-class TypeNameResolutionWithNnbdTest extends TypeNameResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
+class TypeNameResolutionWithNullSafetyTest extends TypeNameResolutionTest
+    with WithNullSafetyMixin {
   ImportFindElement get import_a {
     return findElement.importFind('package:test/a.dart');
   }
 
   test_optIn_fromOptOut_class() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
 
@@ -286,7 +314,7 @@
   }
 
   test_optIn_fromOptOut_class_generic_toBounds() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T extends num> {}
 ''');
 
@@ -305,7 +333,7 @@
   }
 
   test_optIn_fromOptOut_class_generic_toBounds_dynamic() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T> {}
 ''');
 
@@ -324,7 +352,7 @@
   }
 
   test_optIn_fromOptOut_class_generic_typeArguments() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T> {}
 ''');
 
@@ -343,7 +371,7 @@
   }
 
   test_optIn_fromOptOut_functionTypeAlias() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 typedef F = int Function(bool);
 ''');
 
@@ -362,7 +390,7 @@
   }
 
   test_optIn_fromOptOut_functionTypeAlias_generic_dynamic() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 typedef F<T> = T Function(bool);
 ''');
 
@@ -381,7 +409,7 @@
   }
 
   test_optIn_fromOptOut_functionTypeAlias_generic_toBounds() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 typedef F<T extends num> = T Function(bool);
 ''');
 
@@ -400,7 +428,7 @@
   }
 
   test_optIn_fromOptOut_functionTypeAlias_generic_typeArguments() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 typedef F<T> = T Function(bool);
 ''');
 
@@ -419,7 +447,7 @@
   }
 
   test_optOut_fromOptIn_class() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 class A {}
 ''');
@@ -438,7 +466,7 @@
   }
 
   test_optOut_fromOptIn_class_generic_toBounds() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 class A<T extends num> {}
 ''');
@@ -457,7 +485,7 @@
   }
 
   test_optOut_fromOptIn_class_generic_toBounds_dynamic() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 class A<T> {}
 ''');
@@ -476,7 +504,7 @@
   }
 
   test_optOut_fromOptIn_class_generic_typeArguments() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 class A<T> {}
 ''');
@@ -495,7 +523,7 @@
   }
 
   test_optOut_fromOptIn_functionTypeAlias() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 typedef F = int Function();
 ''');
@@ -514,7 +542,7 @@
   }
 
   test_optOut_fromOptIn_functionTypeAlias_generic_toBounds() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 typedef F<T extends num> = T Function();
 ''');
@@ -533,7 +561,7 @@
   }
 
   test_optOut_fromOptIn_functionTypeAlias_generic_toBounds_dynamic() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 typedef F<T> = T Function();
 ''');
@@ -552,7 +580,7 @@
   }
 
   test_optOut_fromOptIn_functionTypeAlias_generic_typeArguments() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 typedef F<T> = T Function();
 ''');
diff --git a/pkg/analyzer/test/src/dart/resolution/with_null_safety_mixin.dart b/pkg/analyzer/test/src/dart/resolution/with_null_safety_mixin.dart
new file mode 100644
index 0000000..300f0a6
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/with_null_safety_mixin.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.
+
+import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart';
+
+import 'driver_resolution.dart';
+
+mixin WithNullSafetyMixin on DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..contextFeatures = FeatureSet.fromEnableFlags(
+      [EnableString.non_nullable],
+    );
+
+  @override
+  bool get typeToStringWithNullability => true;
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/yield_statement_test.dart b/pkg/analyzer/test/src/dart/resolution/yield_statement_test.dart
index b0c5179..2546cac 100644
--- a/pkg/analyzer/test/src/dart/resolution/yield_statement_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/yield_statement_test.dart
@@ -4,7 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'driver_resolution.dart';
+import 'context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -13,12 +13,12 @@
 }
 
 @reflectiveTest
-class YieldStatementResolutionTest extends DriverResolutionTest {
+class YieldStatementResolutionTest extends PubPackageResolutionTest {
   @override
   setUp() {
     super.setUp();
 
-    newFile('/test/lib/my_stream.dart', content: r'''
+    newFile('$testPackageLibPath/my_stream.dart', content: r'''
 import 'dart:async';
 
 export 'dart:async';
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 d9b7c1b..e60d05c 100644
--- a/pkg/analyzer/test/src/dart/resolver/exit_detector_test.dart
+++ b/pkg/analyzer/test/src/dart/resolver/exit_detector_test.dart
@@ -9,7 +9,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../ast/parse_base.dart';
-import '../resolution/driver_resolution.dart';
+import '../resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -920,7 +920,7 @@
 /// TODO(paulberry): migrate this test away from the task model.
 /// See dartbug.com/35734.
 @reflectiveTest
-class ExitDetectorResolvedStatementTest extends DriverResolutionTest {
+class ExitDetectorResolvedStatementTest extends PubPackageResolutionTest {
   test_forStatement_implicitTrue_breakWithLabel() async {
     await _assertNthStatementDoesNotExit(r'''
 void f() {
@@ -1081,15 +1081,9 @@
   }
 
   Future<void> _assertHasReturn(String code, int n, bool expected) async {
-    var path = convertPath('/test/lib/test.dart');
+    await resolveTestCode(code);
 
-    newFile(path, content: code);
-
-    var session = driver.currentSession;
-    var resolvedResult = await session.getResolvedUnit(path);
-
-    var unit = resolvedResult.unit;
-    FunctionDeclaration function = unit.declarations.last;
+    FunctionDeclaration function = result.unit.declarations.last;
     BlockFunctionBody body = function.functionExpression.body;
     Statement statement = body.block.statements[n];
     expect(ExitDetector.exits(statement), expected);
diff --git a/pkg/analyzer/test/src/dart/sdk/sdk_test.dart b/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
index 06d671d..01403ad 100644
--- a/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
+++ b/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:pub_semver/pub_semver.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -30,7 +31,11 @@
     EmbedderYamlLocator locator = EmbedderYamlLocator({
       'fox': <Folder>[pathTranslator.getResource(foxLib)]
     });
-    EmbedderSdk sdk = EmbedderSdk(resourceProvider, locator.embedderYamls);
+    EmbedderSdk sdk = EmbedderSdk(
+      resourceProvider,
+      locator.embedderYamls,
+      languageVersion: Version.parse('2.10.0'),
+    );
 
     expect(sdk.allowedExperimentsJson, isNull);
 
@@ -45,7 +50,11 @@
     EmbedderYamlLocator locator = EmbedderYamlLocator({
       'fox': <Folder>[pathTranslator.getResource(foxLib)]
     });
-    EmbedderSdk sdk = EmbedderSdk(resourceProvider, locator.embedderYamls);
+    EmbedderSdk sdk = EmbedderSdk(
+      resourceProvider,
+      locator.embedderYamls,
+      languageVersion: Version.parse('2.10.0'),
+    );
 
     expect(sdk.urlMappings, hasLength(5));
   }
@@ -54,7 +63,11 @@
     EmbedderYamlLocator locator = EmbedderYamlLocator({
       'fox': <Folder>[pathTranslator.getResource(foxLib)]
     });
-    EmbedderSdk sdk = EmbedderSdk(resourceProvider, locator.embedderYamls);
+    EmbedderSdk sdk = EmbedderSdk(
+      resourceProvider,
+      locator.embedderYamls,
+      languageVersion: Version.parse('2.10.0'),
+    );
 
     expectSource(String posixPath, String dartUri) {
       Uri uri = Uri.parse(posixToOSFileUri(posixPath));
@@ -73,7 +86,11 @@
     EmbedderYamlLocator locator = EmbedderYamlLocator({
       'fox': <Folder>[pathTranslator.getResource(foxLib)]
     });
-    EmbedderSdk sdk = EmbedderSdk(resourceProvider, locator.embedderYamls);
+    EmbedderSdk sdk = EmbedderSdk(
+      resourceProvider,
+      locator.embedderYamls,
+      languageVersion: Version.parse('2.10.0'),
+    );
 
     SdkLibrary lib = sdk.getSdkLibrary('dart:fox');
     expect(lib, isNotNull);
@@ -85,7 +102,11 @@
     EmbedderYamlLocator locator = EmbedderYamlLocator({
       'fox': <Folder>[pathTranslator.getResource(foxLib)]
     });
-    EmbedderSdk sdk = EmbedderSdk(resourceProvider, locator.embedderYamls);
+    EmbedderSdk sdk = EmbedderSdk(
+      resourceProvider,
+      locator.embedderYamls,
+      languageVersion: Version.parse('2.10.0'),
+    );
 
     void expectSource(String dartUri, String posixPath) {
       Source source = sdk.mapDartUri(dartUri);
diff --git a/pkg/analyzer/test/src/diagnostics/abstract_class_member_test.dart b/pkg/analyzer/test/src/diagnostics/abstract_class_member_test.dart
new file mode 100644
index 0000000..e51f4cb
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/abstract_class_member_test.dart
@@ -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 file.
+
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AbstractClassMemberTest);
+    defineReflectiveTests(AbstractClassMemberWithNullSafetyTest);
+  });
+}
+
+@reflectiveTest
+class AbstractClassMemberTest extends PubPackageResolutionTest {
+  test_abstract_field_dynamic() async {
+    await assertErrorsInCode(
+        '''
+abstract class A {
+  abstract dynamic x;
+}
+''',
+        expectedErrorsByNullability(nullable: [], legacy: [
+          error(ParserErrorCode.ABSTRACT_CLASS_MEMBER, 21, 8),
+        ]));
+  }
+
+  test_abstract_field_untyped() async {
+    await assertErrorsInCode(
+        '''
+abstract class A {
+  abstract var x;
+}
+''',
+        expectedErrorsByNullability(nullable: [], legacy: [
+          error(ParserErrorCode.ABSTRACT_CLASS_MEMBER, 21, 8),
+        ]));
+  }
+
+  test_abstract_field_untyped_covariant() async {
+    await assertErrorsInCode(
+        '''
+abstract class A {
+  abstract covariant var x;
+}
+''',
+        expectedErrorsByNullability(nullable: [], legacy: [
+          error(ParserErrorCode.ABSTRACT_CLASS_MEMBER, 21, 8),
+        ]));
+  }
+}
+
+@reflectiveTest
+class AbstractClassMemberWithNullSafetyTest extends AbstractClassMemberTest
+    with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/diagnostics/abstract_field_constructor_initializer_test.dart b/pkg/analyzer/test/src/diagnostics/abstract_field_constructor_initializer_test.dart
new file mode 100644
index 0000000..b874331
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/abstract_field_constructor_initializer_test.dart
@@ -0,0 +1,80 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AbstractFieldConstructorInitializerTest);
+  });
+}
+
+@reflectiveTest
+class AbstractFieldConstructorInitializerTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
+  test_abstract_field_constructor_initializer() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract int x;
+  A() : x = 0;
+}
+''', [
+      error(CompileTimeErrorCode.ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER, 45, 1),
+    ]);
+  }
+
+  test_abstract_field_final_constructor_initializer() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract final int x;
+  A() : x = 0;
+}
+''', [
+      error(CompileTimeErrorCode.ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER, 51, 1),
+    ]);
+  }
+
+  test_abstract_field_final_initializing_formal() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract final int x;
+  A(this.x);
+}
+''', [
+      error(CompileTimeErrorCode.ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER, 52, 1),
+    ]);
+  }
+
+  test_abstract_field_final_no_initialization() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract final int x;
+  A();
+}
+''');
+  }
+
+  test_abstract_field_initializing_formal() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract int x;
+  A(this.x);
+}
+''', [
+      error(CompileTimeErrorCode.ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER, 46, 1),
+    ]);
+  }
+
+  test_abstract_field_no_initialization() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract int x;
+  A();
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/abstract_field_initializer_test.dart b/pkg/analyzer/test/src/diagnostics/abstract_field_initializer_test.dart
new file mode 100644
index 0000000..417c2d6
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/abstract_field_initializer_test.dart
@@ -0,0 +1,54 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AbstractFieldInitializerTest);
+  });
+}
+
+@reflectiveTest
+class AbstractFieldInitializerTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
+  test_abstract_field_final_initializer() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract final int x = 0;
+}
+''', [
+      error(CompileTimeErrorCode.ABSTRACT_FIELD_INITIALIZER, 40, 1),
+    ]);
+  }
+
+  test_abstract_field_final_no_initializer() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract final int x;
+}
+''');
+  }
+
+  test_abstract_field_initializer() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract int x = 0;
+}
+''', [
+      error(CompileTimeErrorCode.ABSTRACT_FIELD_INITIALIZER, 34, 1),
+    ]);
+  }
+
+  test_abstract_field_no_initializer() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/abstract_super_member_reference_test.dart b/pkg/analyzer/test/src/diagnostics/abstract_super_member_reference_test.dart
index ce1e5b1..63131c6 100644
--- a/pkg/analyzer/test/src/diagnostics/abstract_super_member_reference_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/abstract_super_member_reference_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class AbstractSuperMemberReferenceTest extends DriverResolutionTest {
+class AbstractSuperMemberReferenceTest extends PubPackageResolutionTest {
   test_methodInvocation_mixin_implements() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/access_private_enum_field_test.dart b/pkg/analyzer/test/src/diagnostics/access_private_enum_field_test.dart
new file mode 100644
index 0000000..3ea6c65
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/access_private_enum_field_test.dart
@@ -0,0 +1,29 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AccessPrivateEnumFieldTest);
+  });
+}
+
+@reflectiveTest
+class AccessPrivateEnumFieldTest extends PubPackageResolutionTest {
+  @failingTest
+  test_name() async {
+    await assertErrorsInCode(r'''
+enum E { ONE }
+String name(E e) {
+  return e._name;
+}
+''', [
+      error(CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD, 45, 5),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/ambiguous_export_test.dart b/pkg/analyzer/test/src/diagnostics/ambiguous_export_test.dart
index 681a0b5..17142d7 100644
--- a/pkg/analyzer/test/src/diagnostics/ambiguous_export_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/ambiguous_export_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,12 @@
 }
 
 @reflectiveTest
-class AmbiguousExportTest extends DriverResolutionTest {
+class AmbiguousExportTest extends PubPackageResolutionTest {
   test_class() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class N {}
 ''');
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 class N {}
 ''');
     await assertErrorsInCode(r'''
@@ -31,10 +31,10 @@
   }
 
   test_extensions_bothExported() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {}
 ''');
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 extension E on String {}
 ''');
     await assertErrorsInCode(r'''
@@ -46,7 +46,7 @@
   }
 
   test_extensions_localAndExported() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {}
 ''');
     await assertNoErrorsInCode(r'''
diff --git a/pkg/analyzer/test/src/diagnostics/ambiguous_extension_member_access_test.dart b/pkg/analyzer/test/src/diagnostics/ambiguous_extension_member_access_test.dart
index dc9635c6..8fc046c 100644
--- a/pkg/analyzer/test/src/diagnostics/ambiguous_extension_member_access_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/ambiguous_extension_member_access_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class AmbiguousExtensionMemberAccessTest extends DriverResolutionTest {
+class AmbiguousExtensionMemberAccessTest extends PubPackageResolutionTest {
   test_call() async {
     await assertErrorsInCode('''
 class A {}
@@ -30,8 +30,7 @@
 int f(A a) => a();
 ''', [
       error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, 110, 1),
-      error(
-          StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 110, 1),
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 110, 1),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/ambiguous_import_test.dart b/pkg/analyzer/test/src/diagnostics/ambiguous_import_test.dart
index 9a7fff4..61d593a 100644
--- a/pkg/analyzer/test/src/diagnostics/ambiguous_import_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/ambiguous_import_test.dart
@@ -10,7 +10,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,22 +19,23 @@
 }
 
 @reflectiveTest
-class AmbiguousImportTest extends DriverResolutionTest {
+class AmbiguousImportTest extends PubPackageResolutionTest {
   test_as() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}''');
     await assertErrorsInCode('''
 import 'lib1.dart';
 import 'lib2.dart';
 f(p) {p as N;}''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 51, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 51, 1),
     ]);
   }
 
+  @FailingTest(reason: 'Different approach to MockSdk')
   test_dart() async {
     await assertErrorsInCode('''
 import 'dart:async';
@@ -42,31 +43,31 @@
 
 Future v;
 ''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 44, 6),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 44, 6),
     ]);
   }
 
   test_extends() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}''');
     await assertErrorsInCode('''
 import 'lib1.dart';
 import 'lib2.dart';
 class A extends N {}''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 56, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 56, 1),
       error(CompileTimeErrorCode.EXTENDS_NON_CLASS, 56, 1),
     ]);
   }
 
   test_implements() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}''');
     await assertErrorsInCode('''
@@ -74,47 +75,47 @@
 import 'lib2.dart';
 class A implements N {}''', [
       error(CompileTimeErrorCode.IMPLEMENTS_NON_CLASS, 59, 1),
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 59, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 59, 1),
     ]);
   }
 
   test_inPart() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}
 ''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}
 ''');
-    newFile('/test/lib/part.dart', content: '''
+    newFile('$testPackageLibPath/part.dart', content: '''
 part of lib;
 class A extends N {}
 ''');
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 import 'lib1.dart';
 import 'lib2.dart';
 part 'part.dart';
 ''');
     ResolvedUnitResult libResult =
-        await resolveFile(convertPath('/test/lib/lib.dart'));
+        await resolveFile(convertPath('$testPackageLibPath/lib.dart'));
     ResolvedUnitResult partResult =
-        await resolveFile(convertPath('/test/lib/part.dart'));
+        await resolveFile(convertPath('$testPackageLibPath/part.dart'));
     expect(libResult.errors, hasLength(0));
     GatheringErrorListener()
       ..addAll(partResult.errors)
       ..assertErrors([
-        error(StaticWarningCode.AMBIGUOUS_IMPORT, 29, 1),
+        error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 29, 1),
         error(CompileTimeErrorCode.EXTENDS_NON_CLASS, 29, 1),
       ]);
   }
 
   test_instanceCreation() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}''');
     await assertErrorsInCode('''
@@ -122,45 +123,45 @@
 import 'lib1.dart';
 import 'lib2.dart';
 f() {new N();}''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 60, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 60, 1),
     ]);
   }
 
   test_is() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}''');
     await assertErrorsInCode('''
 import 'lib1.dart';
 import 'lib2.dart';
 f(p) {p is N;}''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 51, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 51, 1),
     ]);
   }
 
   test_qualifier() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}''');
     await assertErrorsInCode('''
 import 'lib1.dart';
 import 'lib2.dart';
 g() { N.FOO; }''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 46, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 46, 1),
     ]);
   }
 
   test_typeAnnotation() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}''');
     await assertErrorsInCode('''
@@ -175,22 +176,22 @@
   N m() { return null; }
 }
 class B<T extends N> {}''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 48, 1),
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 53, 1),
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 59, 1),
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 63, 1),
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 72, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 48, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 53, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 59, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 63, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 72, 1),
       error(HintCode.UNUSED_LOCAL_VARIABLE, 74, 1),
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 106, 1),
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 149, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 106, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 149, 1),
     ]);
   }
 
   test_typeArgument_annotation() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}''');
     await assertErrorsInCode('''
@@ -198,15 +199,15 @@
 import 'lib2.dart';
 class A<T> {}
 A<N> f() { return null; }''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 56, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 56, 1),
     ]);
   }
 
   test_typeArgument_instanceCreation() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 class N {}''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 class N {}''');
     await assertErrorsInCode('''
@@ -214,15 +215,15 @@
 import 'lib2.dart';
 class A<T> {}
 f() {new A<N>();}''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 65, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 65, 1),
     ]);
   }
 
   test_varRead() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 var v;''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 var v;''');
     await assertErrorsInCode('''
@@ -230,22 +231,22 @@
 import 'lib2.dart';
 f() { g(v); }
 g(p) {}''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 48, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 48, 1),
     ]);
   }
 
   test_varWrite() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile("$testPackageLibPath/lib1.dart", content: '''
 library lib1;
 var v;''');
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile("$testPackageLibPath/lib2.dart", content: '''
 library lib2;
 var v;''');
     await assertErrorsInCode('''
 import 'lib1.dart';
 import 'lib2.dart';
 f() { v = 0; }''', [
-      error(StaticWarningCode.AMBIGUOUS_IMPORT, 46, 1),
+      error(CompileTimeErrorCode.AMBIGUOUS_IMPORT, 46, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart b/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart
index 873f765..1430312 100644
--- a/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart
@@ -2,24 +2,22 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AmbiguousSetOrMapLiteralBothTest);
-    defineReflectiveTests(AmbiguousSetOrMapLiteralBothWithNnbdTest);
+    defineReflectiveTests(AmbiguousSetOrMapLiteralBothWithNullSafetyTest);
     defineReflectiveTests(AmbiguousSetOrMapLiteralEitherTest);
-    defineReflectiveTests(AmbiguousSetOrMapLiteralEitherWithNnbdTest);
+    defineReflectiveTests(AmbiguousSetOrMapLiteralEitherWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class AmbiguousSetOrMapLiteralBothTest extends DriverResolutionTest {
+class AmbiguousSetOrMapLiteralBothTest extends PubPackageResolutionTest {
   test_map() async {
     await assertNoErrorsInCode('''
 f(Map<int, int> map) {
@@ -64,13 +62,8 @@
 }
 
 @reflectiveTest
-class AmbiguousSetOrMapLiteralBothWithNnbdTest
-    extends AmbiguousSetOrMapLiteralBothTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class AmbiguousSetOrMapLiteralBothWithNullSafetyTest
+    extends AmbiguousSetOrMapLiteralBothTest with WithNullSafetyMixin {
   test_map_keyNonNullable_valueNullable() async {
     await assertNoErrorsInCode('''
 f(Map<int, int?> map) {
@@ -115,7 +108,7 @@
 }
 
 @reflectiveTest
-class AmbiguousSetOrMapLiteralEitherTest extends DriverResolutionTest {
+class AmbiguousSetOrMapLiteralEitherTest extends PubPackageResolutionTest {
   test_invalidPrefixOperator() async {
     // Guard against an exception being thrown.
     await assertErrorsInCode('''
@@ -137,10 +130,5 @@
 }
 
 @reflectiveTest
-class AmbiguousSetOrMapLiteralEitherWithNnbdTest
-    extends AmbiguousSetOrMapLiteralEitherTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-}
+class AmbiguousSetOrMapLiteralEitherWithNullSafetyTest
+    extends AmbiguousSetOrMapLiteralEitherTest with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/diagnostics/annotation_on_pointer_field_test.dart b/pkg/analyzer/test/src/diagnostics/annotation_on_pointer_field_test.dart
index f67ffd0..979d17e 100644
--- a/pkg/analyzer/test/src/diagnostics/annotation_on_pointer_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/annotation_on_pointer_field_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class AnnotationOnPointerFieldTest extends DriverResolutionTest {
+class AnnotationOnPointerFieldTest extends PubPackageResolutionTest {
   test_double() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/annotation_with_non_class_test.dart b/pkg/analyzer/test/src/diagnostics/annotation_with_non_class_test.dart
new file mode 100644
index 0000000..c98e73c
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/annotation_with_non_class_test.dart
@@ -0,0 +1,53 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AnnotationWithNonClassTest);
+  });
+}
+
+@reflectiveTest
+class AnnotationWithNonClassTest extends PubPackageResolutionTest {
+  test_instance() async {
+    await assertErrorsInCode('''
+class Property {
+  final int value;
+  const Property(this.value);
+}
+
+const Property property = const Property(42);
+
+@property(123)
+main() {
+}
+''', [
+      error(CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS, 117, 8),
+    ]);
+  }
+
+  test_prefixed() async {
+    newFile('$testPackageLibPath/annotations.dart', content: r'''
+class Property {
+  final int value;
+  const Property(this.value);
+}
+
+const Property property = const Property(42);
+''');
+    await assertErrorsInCode('''
+import 'annotations.dart' as pref;
+@pref.property(123)
+main() {
+}
+''', [
+      error(CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS, 36, 13),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
index 3fd011e..5ece142 100644
--- a/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
@@ -2,27 +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.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ArgumentTypeNotAssignableTest);
-    defineReflectiveTests(ArgumentTypeNotAssignableTest_NNBD);
+    defineReflectiveTests(ArgumentTypeNotAssignableWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ArgumentTypeNotAssignableTest extends DriverResolutionTest {
+class ArgumentTypeNotAssignableTest extends PubPackageResolutionTest {
   test_ambiguousClassName() async {
     // See dartbug.com/19624
-    newFile("/test/lib/lib2.dart", content: '''
+    newFile('$testPackageLibPath/lib2.dart', content: '''
 class _A {}
 g(h(_A a)) {}''');
     await assertErrorsInCode('''
@@ -31,7 +28,7 @@
 f() {
   g((_A a) {});
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 42, 9),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 42, 9),
     ]);
     // The name _A is private to the library it's defined in, so this is a type
     // mismatch. Furthermore, the error message should mention both _A and the
@@ -48,7 +45,7 @@
 @A.fromInt('0')
 main() {
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 49, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 49, 3),
     ]);
   }
 
@@ -60,7 +57,7 @@
 @A('0')
 main() {
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 33, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 33, 3),
     ]);
   }
 
@@ -72,7 +69,7 @@
 f(A a) {
   a + '0';
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 50, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 50, 3),
     ]);
   }
 
@@ -85,7 +82,7 @@
 void main() {
   f().call(3);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 110, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 110, 1),
     ]);
   }
 
@@ -103,7 +100,7 @@
   A a = new A();
   a..  ma().mb(0);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 186, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 186, 1),
     ]);
   }
 
@@ -115,11 +112,8 @@
 main() {
   const A(42);
 }''', [
-      error(
-          CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-          52,
-          2),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 52, 2),
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, 52, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 52, 2),
     ]);
   }
 
@@ -131,7 +125,7 @@
 class B extends A {
   const B() : super(42);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 73, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 73, 2),
     ]);
   }
 
@@ -162,7 +156,7 @@
 main() {
   (int x) {} ('');
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 23, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 23, 2),
     ]);
   }
 
@@ -176,19 +170,57 @@
   n(void f(int i)) {}
 }
 ''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 7),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 7),
     ]);
   }
 
-  test_index() async {
+  test_index_invalidRead() async {
     await assertErrorsInCode('''
 class A {
-  operator [](int index) {}
+  int operator [](int index) => 0;
 }
 f(A a) {
   a['0'];
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 53, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 60, 3),
+    ]);
+  }
+
+  test_index_invalidRead_validWrite() async {
+    await assertErrorsInCode('''
+class A {
+  int operator [](int index) => 0;
+  operator []=(String index, int value) {}
+}
+f(A a) {
+  a['0'] += 0;
+}''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 103, 3),
+    ]);
+  }
+
+  test_index_invalidWrite() async {
+    await assertErrorsInCode('''
+class A {
+  operator []=(int index, int value) {}
+}
+f(A a) {
+  a['0'] = 0;
+}''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 65, 3),
+    ]);
+  }
+
+  test_index_validRead_invalidWrite() async {
+    await assertErrorsInCode('''
+class A {
+  int operator [](String index) => 0;
+  operator []=(int index, int value) {}
+}
+f(A a) {
+  a['0'] += 0;
+}''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 103, 3),
     ]);
   }
 
@@ -200,7 +232,7 @@
 }
 n(int i) {}
 ''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 24, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 24, 1),
     ]);
   }
 
@@ -212,7 +244,7 @@
 f(A a) {
   a('0');
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 42, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 42, 3),
     ]);
   }
 
@@ -225,7 +257,7 @@
   A a = new A();
   a('0');
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 59, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 59, 3),
     ]);
   }
 
@@ -234,7 +266,7 @@
 a(b(int p)) {
   b('0');
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 18, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 18, 3),
     ]);
   }
 
@@ -245,18 +277,31 @@
     f(v);
   }
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 41, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 41, 1),
     ]);
   }
 
   test_invocation_functionTypes_optional() async {
     await assertErrorsInCode('''
-void acceptFunNumOptBool(void funNumOptBool([bool b])) {}
-void funNumBool(bool b) {}
+void acceptFunOptBool(void funNumOptBool([bool b])) {}
+void funBool(bool b) {}
 main() {
-  acceptFunNumOptBool(funNumBool);
+  acceptFunOptBool(funBool);
 }''', [
-      error(StrongModeCode.INVALID_CAST_FUNCTION, 116, 10),
+      error(CompileTimeErrorCode.INVALID_CAST_FUNCTION, 107, 7),
+    ]);
+  }
+
+  test_invocation_functionTypes_optional_method() async {
+    await assertErrorsInCode('''
+void acceptFunOptBool(void funOptBool([bool b])) {}
+class C {
+  static void funBool(bool b) {}
+}
+main() {
+  acceptFunOptBool(C.funBool);
+}''', [
+      error(CompileTimeErrorCode.INVALID_CAST_METHOD, 125, 9),
     ]);
   }
 
@@ -268,7 +313,7 @@
 f(A<String> a) {
   a.m(1);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 50, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 50, 1),
     ]);
   }
 
@@ -278,7 +323,7 @@
 main() {
   f(p: 42);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 35, 5),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 35, 5),
     ]);
   }
 
@@ -288,7 +333,7 @@
 main() {
   f(42);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 35, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 35, 2),
     ]);
   }
 
@@ -298,7 +343,7 @@
 main() {
   f(42);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 28, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 28, 2),
     ]);
   }
 
@@ -308,7 +353,7 @@
 f(A<int> a) {
   a('1');
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 37, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 37, 3),
     ]);
   }
 
@@ -320,7 +365,7 @@
   A a = getA();
   a('1');
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 69, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 69, 3),
     ]);
   }
 
@@ -330,7 +375,7 @@
 f(A a) {
   a('1');
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 3),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 3),
     ]);
   }
 
@@ -342,7 +387,7 @@
 main() {
   new A<String>(42);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 52, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 52, 2),
     ]);
   }
 
@@ -354,7 +399,7 @@
 main() {
   new A(42);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 53, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 53, 2),
     ]);
   }
 
@@ -366,7 +411,7 @@
 main() {
   new A(42);
 }''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 46, 2),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 46, 2),
     ]);
   }
 
@@ -381,19 +426,14 @@
   print(h('s'));
 }
 ''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 99, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 99, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class ArgumentTypeNotAssignableTest_NNBD extends ArgumentTypeNotAssignableTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class ArgumentTypeNotAssignableWithNullSafetyTest
+    extends ArgumentTypeNotAssignableTest with WithNullSafetyMixin {
   test_binary_eqEq_covariantParameterType() async {
     await assertErrorsInCode(r'''
 class A {
@@ -407,8 +447,8 @@
   aq == null;
 }
 ''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 86, 1),
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 97, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 86, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 97, 1),
     ]);
   }
 
@@ -420,7 +460,7 @@
 }
 n(int x) {}
 ''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 23, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 23, 1),
     ]);
   }
 
@@ -433,7 +473,7 @@
 }
 n(int x) {}
 ''', [
-      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 24, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 24, 1),
     ]);
   }
 
@@ -453,4 +493,18 @@
     // The test is currently generating an error where none is expected.
     await super.test_invocation_functionTypes_optional();
   }
+
+  @override
+  test_invocation_functionTypes_optional_method() async {
+    await assertErrorsInCode('''
+void acceptFunOptBool(void funOptBool([bool b])) {}
+class C {
+  static void funBool(bool b) {}
+}
+main() {
+  acceptFunOptBool(C.funBool);
+}''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 125, 9),
+    ]);
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/assert_in_redirecting_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/assert_in_redirecting_constructor_test.dart
index 240ede4..9b3c6ea 100644
--- a/pkg/analyzer/test/src/diagnostics/assert_in_redirecting_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/assert_in_redirecting_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class AssertInRedirectingConstructorTest extends DriverResolutionTest {
+class AssertInRedirectingConstructorTest extends PubPackageResolutionTest {
   test_assertBeforeRedirection() async {
     await assertErrorsInCode(r'''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/assignment_to_const_test.dart b/pkg/analyzer/test/src/diagnostics/assignment_to_const_test.dart
index 7187511..c4da4a8 100644
--- a/pkg/analyzer/test/src/diagnostics/assignment_to_const_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/assignment_to_const_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class AssignmentToConstTest extends DriverResolutionTest {
+class AssignmentToConstTest extends PubPackageResolutionTest {
   test_instanceVariable() async {
     await assertErrorsInCode('''
 class A {
@@ -24,7 +24,7 @@
 f() {
   A.v = 1;
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_CONST, 42, 3),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_CONST, 42, 3),
     ]);
   }
 
@@ -36,7 +36,7 @@
 f() {
   A.v += 1;
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_CONST, 42, 3),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_CONST, 42, 3),
     ]);
   }
 
@@ -47,7 +47,7 @@
   x = 1;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_CONST, 23, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_CONST, 23, 1),
     ]);
   }
 
@@ -59,7 +59,7 @@
     print(x);
   }
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_CONST, 28, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_CONST, 28, 1),
     ]);
   }
 
@@ -70,7 +70,7 @@
   x += 1;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_CONST, 23, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_CONST, 23, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/assignment_to_final_local_test.dart b/pkg/analyzer/test/src/diagnostics/assignment_to_final_local_test.dart
index cec3b98..502b7bb 100644
--- a/pkg/analyzer/test/src/diagnostics/assignment_to_final_local_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/assignment_to_final_local_test.dart
@@ -2,23 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AssignmentToFinalLocalTest);
-    defineReflectiveTests(AssignmentToFinalLocalWithNnbdTest);
+    defineReflectiveTests(AssignmentToFinalLocalWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class AssignmentToFinalLocalTest extends DriverResolutionTest {
+class AssignmentToFinalLocalTest extends PubPackageResolutionTest {
   test_localVariable() async {
     await assertErrorsInCode('''
 f() {
@@ -26,7 +24,7 @@
   x = 1;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
     ]);
   }
 
@@ -38,7 +36,7 @@
     print(x);
   }
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 28, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 28, 1),
     ]);
   }
 
@@ -49,7 +47,7 @@
   x += 1;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
     ]);
   }
 
@@ -58,7 +56,7 @@
 f(final x) {
   x = 1;
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 15, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 15, 1),
     ]);
   }
 
@@ -69,7 +67,7 @@
   x--;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
     ]);
   }
 
@@ -80,7 +78,7 @@
   x++;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
     ]);
   }
 
@@ -91,7 +89,7 @@
   --x;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 25, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 25, 1),
     ]);
   }
 
@@ -102,7 +100,7 @@
   ++x;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 25, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 25, 1),
     ]);
   }
 
@@ -113,7 +111,7 @@
   x--;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
     ]);
   }
 
@@ -124,7 +122,7 @@
   x++;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 23, 1),
     ]);
   }
 
@@ -132,18 +130,14 @@
     await assertErrorsInCode('''
 final x = 0;
 f() { x = 1; }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL, 19, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_LOCAL, 19, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class AssignmentToFinalLocalWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class AssignmentToFinalLocalWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_localVariable_late() async {
     await assertNoErrorsInCode('''
 void f() {
diff --git a/pkg/analyzer/test/src/diagnostics/assignment_to_final_no_setter_test.dart b/pkg/analyzer/test/src/diagnostics/assignment_to_final_no_setter_test.dart
index 89f5f56..fe06f6f 100644
--- a/pkg/analyzer/test/src/diagnostics/assignment_to_final_no_setter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/assignment_to_final_no_setter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class AssignmentToFinalNoSetterTest extends DriverResolutionTest {
+class AssignmentToFinalNoSetterTest extends PubPackageResolutionTest {
   test_instance_undefined_hasGetter() async {
     await assertErrorsInCode('''
 extension E on int {
@@ -24,7 +24,7 @@
   0.foo = 1;
 }
 ''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER, 53, 3),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_NO_SETTER, 53, 3),
     ]);
   }
 
@@ -37,7 +37,7 @@
   A a = new A();
   a.x = 0;
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER, 60, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_NO_SETTER, 60, 1),
     ]);
   }
 
@@ -52,7 +52,7 @@
 main() {
   B.a.x = 0;
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER, 71, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL_NO_SETTER, 71, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/assignment_to_final_test.dart b/pkg/analyzer/test/src/diagnostics/assignment_to_final_test.dart
index f1e2dfa..b93d824 100644
--- a/pkg/analyzer/test/src/diagnostics/assignment_to_final_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/assignment_to_final_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AssignmentToFinalTest);
-    defineReflectiveTests(AssignmentToFinalWithNnbdTest);
+    defineReflectiveTests(AssignmentToFinalWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class AssignmentToFinalTest extends DriverResolutionTest {
+class AssignmentToFinalTest extends PubPackageResolutionTest {
   test_instanceVariable() async {
     await assertErrorsInCode('''
 class A {
@@ -27,7 +25,7 @@
   A a = new A();
   a.v = 1;
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL, 54, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL, 54, 1),
     ]);
   }
 
@@ -40,18 +38,14 @@
   A a = new A();
   a.v += 1;
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_FINAL, 54, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL, 54, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class AssignmentToFinalWithNnbdTest extends AssignmentToFinalTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class AssignmentToFinalWithNullSafetyTest extends AssignmentToFinalTest
+    with WithNullSafetyMixin {
   test_field_late() async {
     await assertNoErrorsInCode('''
 class A {
@@ -77,4 +71,31 @@
 }
 ''');
   }
+
+  test_set_abstract_field_final_invalid() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract final int x;
+}
+void f(A a, int x) {
+  a.x = x;
+}
+''', [
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FINAL, 70, 1),
+    ]);
+  }
+
+  test_set_abstract_field_final_overridden_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract final int x;
+}
+abstract class B extends A {
+  void set x(int value);
+}
+void f(B b, int x) {
+  b.x = x; // ok because setter provided in derived class
+}
+''');
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/assignment_to_function_test.dart b/pkg/analyzer/test/src/diagnostics/assignment_to_function_test.dart
index d24ec7e..c355e7b 100644
--- a/pkg/analyzer/test/src/diagnostics/assignment_to_function_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/assignment_to_function_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,14 +14,14 @@
 }
 
 @reflectiveTest
-class AssignmentToFunctionTest extends DriverResolutionTest {
+class AssignmentToFunctionTest extends PubPackageResolutionTest {
   test_function() async {
     await assertErrorsInCode('''
 f() {}
 main() {
   f = null;
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_FUNCTION, 18, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_FUNCTION, 18, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/assignment_to_method_test.dart b/pkg/analyzer/test/src/diagnostics/assignment_to_method_test.dart
index 768c9b4..db44bcf 100644
--- a/pkg/analyzer/test/src/diagnostics/assignment_to_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/assignment_to_method_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class AssignmentToMethodTest extends DriverResolutionTest {
+class AssignmentToMethodTest extends PubPackageResolutionTest {
   test_instance_extendedHasMethod_extensionHasSetter() async {
     await assertErrorsInCode('''
 class C {
@@ -29,8 +29,8 @@
   c.foo = 0;
 }
 ''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_METHOD, 87, 5),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 95, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_METHOD, 87, 5),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 95, 1),
     ]);
   }
 
@@ -42,7 +42,7 @@
 f(A a) {
   a.m = () {};
 }''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_METHOD, 32, 3),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_METHOD, 32, 3),
     ]);
   }
 
@@ -60,8 +60,8 @@
   }
 }
 ''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_METHOD, 86, 8),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 97, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_METHOD, 86, 8),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 97, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/assignment_to_type_test.dart b/pkg/analyzer/test/src/diagnostics/assignment_to_type_test.dart
index f0b8b6a..2526101 100644
--- a/pkg/analyzer/test/src/diagnostics/assignment_to_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/assignment_to_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class AssignmentToTypeTest extends DriverResolutionTest {
+class AssignmentToTypeTest extends PubPackageResolutionTest {
   test_class() async {
     await assertErrorsInCode('''
 class C {}
@@ -22,7 +22,7 @@
   C = null;
 }
 ''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_TYPE, 22, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_TYPE, 22, 1),
     ]);
   }
 
@@ -33,7 +33,7 @@
   E = null;
 }
 ''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_TYPE, 24, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_TYPE, 24, 1),
     ]);
   }
 
@@ -44,7 +44,7 @@
   F = null;
 }
 ''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_TYPE, 29, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_TYPE, 29, 1),
     ]);
   }
 
@@ -56,7 +56,7 @@
   }
 }
 ''', [
-      error(StaticWarningCode.ASSIGNMENT_TO_TYPE, 25, 1),
+      error(CompileTimeErrorCode.ASSIGNMENT_TO_TYPE, 25, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/async_for_in_wrong_context_test.dart b/pkg/analyzer/test/src/diagnostics/async_for_in_wrong_context_test.dart
new file mode 100644
index 0000000..1dfe5bf
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/async_for_in_wrong_context_test.dart
@@ -0,0 +1,29 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AsyncForInWrongContextTest);
+  });
+}
+
+@reflectiveTest
+class AsyncForInWrongContextTest extends PubPackageResolutionTest {
+  test_syncFunction() async {
+    await assertErrorsInCode(r'''
+f(list) {
+  await for (var e in list) {
+  }
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 27, 1),
+      error(CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT, 29, 2),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart b/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart
index cc747dd..e88dec6 100644
--- a/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class AsyncKeywordUsedAsIdentifierTest extends DriverResolutionTest {
+class AsyncKeywordUsedAsIdentifierTest extends PubPackageResolutionTest {
   test_async_async() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/await_in_late_local_variable_initializer_test.dart b/pkg/analyzer/test/src/diagnostics/await_in_late_local_variable_initializer_test.dart
index 0dd2f98..c321778 100644
--- a/pkg/analyzer/test/src/diagnostics/await_in_late_local_variable_initializer_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/await_in_late_local_variable_initializer_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,15 +14,11 @@
 }
 
 @reflectiveTest
-class AwaitInLateLocalVariableInitializerTest extends DriverResolutionTest {
+class AwaitInLateLocalVariableInitializerTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   static const _errorCode =
       CompileTimeErrorCode.AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER;
 
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
   test_closure_late_await() async {
     await assertErrorsInCode('''
 main() {
diff --git a/pkg/analyzer/test/src/diagnostics/await_in_wrong_context_test.dart b/pkg/analyzer/test/src/diagnostics/await_in_wrong_context_test.dart
new file mode 100644
index 0000000..e99bf8e
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/await_in_wrong_context_test.dart
@@ -0,0 +1,44 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AwaitInWrongContextTest);
+  });
+}
+
+@reflectiveTest
+class AwaitInWrongContextTest extends PubPackageResolutionTest {
+  @failingTest
+  test_sync() async {
+    // This test requires better error recovery than we currently have. In
+    // particular, we need to be able to distinguish between an await expression
+    // in the wrong context, and the use of 'await' as an identifier.
+    await assertErrorsInCode(r'''
+f(x) {
+  return await x;
+}
+''', [
+      error(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 16, 5),
+    ]);
+  }
+
+  test_syncStar() async {
+    // This test requires better error recovery than we currently have. In
+    // particular, we need to be able to distinguish between an await expression
+    // in the wrong context, and the use of 'await' as an identifier.
+    await assertErrorsInCode(r'''
+f(x) sync* {
+  yield await x;
+}
+''', [
+      error(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 21, 5),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/body_might_complete_normally_test.dart b/pkg/analyzer/test/src/diagnostics/body_might_complete_normally_test.dart
index c19c96d..b366a0d 100644
--- a/pkg/analyzer/test/src/diagnostics/body_might_complete_normally_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/body_might_complete_normally_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,12 +14,8 @@
 }
 
 @reflectiveTest
-class BodyMayCompleteNormallyTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
+class BodyMayCompleteNormallyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_factoryConstructor_named_blockBody() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_extension_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_extension_name_test.dart
index 05791e0..34ff03b 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_extension_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_extension_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class BuiltInIdentifierAsExtensionNameTest extends DriverResolutionTest {
+class BuiltInIdentifierAsExtensionNameTest extends PubPackageResolutionTest {
   test_error_builtInIdentifierAsExtensionName() async {
     await assertErrorsInCode(
       r'''
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_prefix_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_prefix_name_test.dart
index 2a79451..a4f9e2e 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_prefix_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_prefix_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class BuiltInIdentifierAsPrefixNameTest extends DriverResolutionTest {
+class BuiltInIdentifierAsPrefixNameTest extends PubPackageResolutionTest {
   test_builtInIdentifierAsPrefixName() async {
     await assertErrorsInCode('''
 import 'dart:async' as abstract;
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_name_test.dart
index 741a257..2923bf7 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class BuiltInIdentifierAsTypeNameTest extends DriverResolutionTest {
+class BuiltInIdentifierAsTypeNameTest extends PubPackageResolutionTest {
   test_class() async {
     await assertErrorsInCode('''
 class as {}
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_parameter_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_parameter_name_test.dart
index b28236f..fc7fdd3 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_parameter_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_parameter_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,8 @@
 }
 
 @reflectiveTest
-class BuiltInIdentifierAsTypeParameterNameTest extends DriverResolutionTest {
+class BuiltInIdentifierAsTypeParameterNameTest
+    extends PubPackageResolutionTest {
   test_class() async {
     await assertErrorsInCode('''
 class A<as> {}
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_typedef_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_typedef_name_test.dart
index 2163187..7ba99f5 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_typedef_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_typedef_name_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class BuiltInIdentifierAsTypedefNameTest extends DriverResolutionTest {
+class BuiltInIdentifierAsTypedefNameTest extends PubPackageResolutionTest {
   test_classTypeAlias() async {
     await assertErrorsInCode(r'''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart b/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart
index ee5b015..9fa19a3 100644
--- a/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class CanBeNullAfterNullAwareTest extends DriverResolutionTest {
+class CanBeNullAfterNullAwareTest extends PubPackageResolutionTest {
   test_afterCascade() async {
     await assertErrorsInCode(r'''
 m(x) {
diff --git a/pkg/analyzer/test/src/diagnostics/case_block_not_terminated_test.dart b/pkg/analyzer/test/src/diagnostics/case_block_not_terminated_test.dart
index 3c52f06..67e0536 100644
--- a/pkg/analyzer/test/src/diagnostics/case_block_not_terminated_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/case_block_not_terminated_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class CaseBlockNotTerminatedTest extends DriverResolutionTest {
+class CaseBlockNotTerminatedTest extends PubPackageResolutionTest {
   test_lastCase() async {
     await assertNoErrorsInCode(r'''
 f(int a) {
@@ -36,7 +36,7 @@
       return;
   }
 }''', [
-      error(StaticWarningCode.CASE_BLOCK_NOT_TERMINATED, 35, 4),
+      error(CompileTimeErrorCode.CASE_BLOCK_NOT_TERMINATED, 35, 4),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/case_expression_type_implements_equals_test.dart b/pkg/analyzer/test/src/diagnostics/case_expression_type_implements_equals_test.dart
index d6b69ce..bfec408 100644
--- a/pkg/analyzer/test/src/diagnostics/case_expression_type_implements_equals_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/case_expression_type_implements_equals_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(CaseExpressionTypeImplementsEqualsTest);
-    defineReflectiveTests(CaseExpressionTypeImplementsEqualsWithNnbdTest);
+    defineReflectiveTests(CaseExpressionTypeImplementsEqualsWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class CaseExpressionTypeImplementsEqualsTest extends DriverResolutionTest {
+class CaseExpressionTypeImplementsEqualsTest extends PubPackageResolutionTest {
   test_declares() async {
     await assertNoErrorsInCode(r'''
 abstract class A {
@@ -107,13 +105,8 @@
 }
 
 @reflectiveTest
-class CaseExpressionTypeImplementsEqualsWithNnbdTest
-    extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
+class CaseExpressionTypeImplementsEqualsWithNullSafetyTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_declares() async {
     await assertNoErrorsInCode(r'''
 abstract class A {
diff --git a/pkg/analyzer/test/src/diagnostics/case_expression_type_is_not_switch_expression_subtype_test.dart b/pkg/analyzer/test/src/diagnostics/case_expression_type_is_not_switch_expression_subtype_test.dart
index 1561646..dbe659f 100644
--- a/pkg/analyzer/test/src/diagnostics/case_expression_type_is_not_switch_expression_subtype_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/case_expression_type_is_not_switch_expression_subtype_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,12 +15,7 @@
 
 @reflectiveTest
 class CaseExpressionTypeIsNotSswitchExpressionSubtype
-    extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   CompileTimeErrorCode get _errorCode {
     return CompileTimeErrorCode
         .CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE;
diff --git a/pkg/analyzer/test/src/diagnostics/cast_to_non_type_test.dart b/pkg/analyzer/test/src/diagnostics/cast_to_non_type_test.dart
index 08b4de7..78747bc 100644
--- a/pkg/analyzer/test/src/diagnostics/cast_to_non_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/cast_to_non_type_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,13 +15,13 @@
 }
 
 @reflectiveTest
-class CastToNonTypeTest extends DriverResolutionTest {
+class CastToNonTypeTest extends PubPackageResolutionTest {
   test_variable() async {
     await assertErrorsInCode('''
 var A = 0;
 f(String s) { var x = s as A; }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 29, 1),
-      error(StaticWarningCode.CAST_TO_NON_TYPE, 38, 1),
+      error(CompileTimeErrorCode.CAST_TO_NON_TYPE, 38, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/concrete_class_with_abstract_member_test.dart b/pkg/analyzer/test/src/diagnostics/concrete_class_with_abstract_member_test.dart
index 473325b..c85acdb 100644
--- a/pkg/analyzer/test/src/diagnostics/concrete_class_with_abstract_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/concrete_class_with_abstract_member_test.dart
@@ -5,22 +5,26 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ConcreteClassWithAbstractMemberTest);
+    defineReflectiveTests(ConcreteClassWithAbstractMemberWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ConcreteClassWithAbstractMemberTest extends DriverResolutionTest {
+class ConcreteClassWithAbstractMemberTest extends PubPackageResolutionTest
+    with ConcreteClassWithAbstractMemberTestCases {}
+
+mixin ConcreteClassWithAbstractMemberTestCases on PubPackageResolutionTest {
   test_direct() async {
     await assertErrorsInCode('''
 class A {
   m();
 }''', [
-      error(StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 12, 4),
+      error(CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 12, 4),
     ]);
   }
 
@@ -32,7 +36,36 @@
 class A implements I {
   m();
 }''', [
-      error(StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 62, 4),
+      error(CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 62, 4),
+    ]);
+  }
+}
+
+@reflectiveTest
+class ConcreteClassWithAbstractMemberWithNullSafetyTest
+    extends PubPackageResolutionTest
+    with WithNullSafetyMixin, ConcreteClassWithAbstractMemberTestCases {
+  test_abstract_field() async {
+    await assertErrorsInCode('''
+class A {
+  abstract int? x;
+}
+''', [
+      error(CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 12, 16,
+          text: "'x' must have a method body because 'A' isn't abstract."),
+      error(CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 12, 16,
+          text: "'x=' must have a method body because 'A' isn't abstract."),
+    ]);
+  }
+
+  test_abstract_field_final() async {
+    await assertErrorsInCode('''
+class A {
+  abstract final int? x;
+}
+''', [
+      error(CompileTimeErrorCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, 12, 22,
+          text: "'x' must have a method body because 'A' isn't abstract."),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/conflicting_generic_interfaces_test.dart b/pkg/analyzer/test/src/diagnostics/conflicting_generic_interfaces_test.dart
index 2364d00..9342301 100644
--- a/pkg/analyzer/test/src/diagnostics/conflicting_generic_interfaces_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/conflicting_generic_interfaces_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ConflictingGenericInterfacesTest);
-    defineReflectiveTests(ConflictingGenericInterfacesWithNnbdTest);
+    defineReflectiveTests(ConflictingGenericInterfacesWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ConflictingGenericInterfacesTest extends DriverResolutionTest {
+class ConflictingGenericInterfacesTest extends PubPackageResolutionTest {
   test_class_extends_implements() async {
     await assertErrorsInCode('''
 class I<T> {}
@@ -73,13 +71,8 @@
 }
 
 @reflectiveTest
-class ConflictingGenericInterfacesWithNnbdTest
-    extends ConflictingGenericInterfacesTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
+class ConflictingGenericInterfacesWithNullSafetyTest
+    extends ConflictingGenericInterfacesTest with WithNullSafetyMixin {
   test_class_extends_implements_never() async {
     await assertNoErrorsInCode('''
 class I<T> {}
@@ -101,7 +94,7 @@
   }
 
   test_class_extends_implements_optOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class I<T> {}
 class A implements I<int> {}
 class B implements I<int?> {}
@@ -115,7 +108,7 @@
   }
 
   test_class_extends_optIn_implements_optOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T> {}
 
 class B extends A<int> {}
@@ -129,7 +122,7 @@
   }
 
   test_class_mixed_viaLegacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T> {}
 
 class Bi implements A<int> {}
@@ -138,7 +131,7 @@
 ''');
 
     // Both `Bi` and `Biq` implement `A<int*>` in legacy, so identical.
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart = 2.7
 import 'a.dart';
 
@@ -165,11 +158,11 @@
   }
 
   test_class_topMerge_optIn_optOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T> {}
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart = 2.5
 import 'a.dart';
 
diff --git a/pkg/analyzer/test/src/diagnostics/conflicting_static_and_instance_test.dart b/pkg/analyzer/test/src/diagnostics/conflicting_static_and_instance_test.dart
index 08d604b..85205db 100644
--- a/pkg/analyzer/test/src/diagnostics/conflicting_static_and_instance_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/conflicting_static_and_instance_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,7 +16,7 @@
 }
 
 @reflectiveTest
-class ConflictingStaticAndInstanceClassTest extends DriverResolutionTest {
+class ConflictingStaticAndInstanceClassTest extends PubPackageResolutionTest {
   test_inClass_getter_getter() async {
     await assertErrorsInCode(r'''
 class C {
@@ -450,7 +450,7 @@
 }
 
 @reflectiveTest
-class ConflictingStaticAndInstanceEnumTest extends DriverResolutionTest {
+class ConflictingStaticAndInstanceEnumTest extends PubPackageResolutionTest {
   test_hashCode() async {
     await assertErrorsInCode(r'''
 enum E {
@@ -503,7 +503,7 @@
 }
 
 @reflectiveTest
-class ConflictingStaticAndInstanceMixinTest extends DriverResolutionTest {
+class ConflictingStaticAndInstanceMixinTest extends PubPackageResolutionTest {
   test_inConstraint_getter_getter() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_container_test.dart b/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_container_test.dart
index 3403efa..634dfff 100644
--- a/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_container_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_container_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class ConflictingTypeVariableAndClassTest extends DriverResolutionTest {
+class ConflictingTypeVariableAndClassTest extends PubPackageResolutionTest {
   test_conflict_on_class() async {
     await assertErrorsInCode(r'''
 class T<T> {}
@@ -34,7 +34,7 @@
 }
 
 @reflectiveTest
-class ConflictingTypeVariableAndExtensionTest extends DriverResolutionTest {
+class ConflictingTypeVariableAndExtensionTest extends PubPackageResolutionTest {
   test_conflict() async {
     await assertErrorsInCode(r'''
 extension T<T> on String {}
diff --git a/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_member_test.dart b/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_member_test.dart
index 7cd84a8b..7805bea 100644
--- a/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/conflicting_type_variable_and_member_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,7 +16,7 @@
 
 @reflectiveTest
 class ConflictingTypeVariableAndMemberExtensionTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_getter() async {
     await assertErrorsInCode(r'''
 extension A<T> on String {
@@ -52,7 +52,7 @@
 }
 
 @reflectiveTest
-class ConflictingTypeVariableAndMemberTest extends DriverResolutionTest {
+class ConflictingTypeVariableAndMemberTest extends PubPackageResolutionTest {
   test_field() async {
     await assertErrorsInCode(r'''
 class A<T> {
diff --git a/pkg/analyzer/test/src/diagnostics/const_constructor_field_type_mismatch_test.dart b/pkg/analyzer/test/src/diagnostics/const_constructor_field_type_mismatch_test.dart
new file mode 100644
index 0000000..1a3846a
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_constructor_field_type_mismatch_test.dart
@@ -0,0 +1,97 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstConstructorFieldTypeMismatchTest);
+  });
+}
+
+@reflectiveTest
+class ConstConstructorFieldTypeMismatchTest extends PubPackageResolutionTest {
+  test_assignable_generic() async {
+    await assertErrorsInCode(
+      r'''
+class C<T> {
+  final T x = y;
+  const C();
+}
+const int y = 1;
+var v = const C<int>();
+''',
+      [
+        error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 27, 1),
+      ],
+    );
+  }
+
+  test_assignable_nullValue() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  const A(x) : y = x;
+  final int y;
+}
+var v = const A(null);
+''');
+  }
+
+  test_assignable_unresolvedFieldAndNullValue() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A(x) : y = x;
+  final Unresolved y;
+}
+var v = const A(null);
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_CLASS, 40, 10),
+    ]);
+  }
+
+  test_notAssignable() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A(x) : y = x;
+  final int y;
+}
+var v = const A('foo');
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH, 57, 14),
+    ]);
+  }
+
+  test_notAssignable_generic() async {
+    await assertErrorsInCode(
+      r'''
+class C<T> {
+  final T x = y;
+  const C();
+}
+const int y = 1;
+var v = const C<String>();
+''',
+      [
+        error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 27, 1),
+        error(
+            CompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH, 70, 17),
+      ],
+    );
+  }
+
+  test_notAssignable_unresolved() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A(x) : y = x;
+  final Unresolved y;
+}
+var v = const A('foo');
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_CLASS, 40, 10),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_constructor_param_type_mismatch_test.dart b/pkg/analyzer/test/src/diagnostics/const_constructor_param_type_mismatch_test.dart
index 6331a80..24ad795 100644
--- a/pkg/analyzer/test/src/diagnostics/const_constructor_param_type_mismatch_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_constructor_param_type_mismatch_test.dart
@@ -6,7 +6,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,130 @@
   });
 }
 
-/// TODO(paulberry): move other tests from [CheckedModeCompileTimeErrorCodeTest]
-/// to this class.
 @reflectiveTest
-class ConstConstructorParamTypeMismatchTest extends DriverResolutionTest {
+class ConstConstructorParamTypeMismatchTest extends PubPackageResolutionTest {
+  test_assignable_fieldFormal_null() async {
+    // Null is assignable to anything (before null safety).
+    await assertNoErrorsInCode(r'''
+class A {
+  final int x;
+  const A(this.x);
+}
+var v = const A(null);
+''');
+  }
+
+  test_assignable_fieldFormal_omittedType() async {
+    // If a field is declared without a type, and no initializer, it's type is
+    // dynamic.
+    await assertNoErrorsInCode(r'''
+class A {
+  final x;
+  const A(this.x);
+}
+var v = const A(5);
+''');
+  }
+
+  test_assignable_fieldFormal_subtype() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+class C {
+  final A a;
+  const C(this.a);
+}
+var v = const C(const B());
+''');
+  }
+
+  test_assignable_fieldFormal_typedef() async {
+    // foo has the type dynamic -> dynamic, so it is not assignable to A.f.
+    await assertErrorsInCode(r'''
+typedef String Int2String(int x);
+class A {
+  final Int2String f;
+  const A(this.f);
+}
+foo(x) => 1;
+var v = const A(foo);
+''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 116, 3),
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, 116, 3),
+    ]);
+  }
+
+  test_assignable_fieldFormal_typeSubstitution() async {
+    await assertNoErrorsInCode(r'''
+class A<T> {
+  final T x;
+  const A(this.x);
+}
+var v = const A<int>(3);
+''');
+  }
+
+  test_assignable_fieldFormal_unresolved_null() async {
+    // Null always passes runtime type checks, even when the type is
+    // unresolved.
+    await assertErrorsInCode(r'''
+class A {
+  final Unresolved x;
+  const A(String this.x);
+}
+var v = const A(null);
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_CLASS, 18, 10),
+    ]);
+  }
+
+  test_assignable_null() async {
+    // Null is assignable to anything (before null safety).
+    await assertNoErrorsInCode(r'''
+class A {
+  const A(int x);
+}
+var v = const A(null);''');
+  }
+
+  test_assignable_typeSubstitution() async {
+    await assertNoErrorsInCode(r'''
+class A<T> {
+  const A(T x);
+}
+var v = const A<int>(3);''');
+  }
+
+  test_assignable_undefined() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A(Unresolved x);
+}
+var v = const A('foo');
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_CLASS, 20, 10),
+    ]);
+  }
+
+  test_assignable_undefined_null() async {
+    // Null always passes runtime type checks, even when the type is
+    // unresolved.
+    await assertErrorsInCode(r'''
+class A {
+  const A(Unresolved x);
+}
+var v = const A(null);
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_CLASS, 20, 10),
+    ]);
+  }
+
   test_int_to_double_reference_from_other_library_other_file_after() async {
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 import 'test.dart';
 class D {
   final C c;
@@ -35,7 +153,7 @@
 const C constant = const C(0);
 ''');
     var otherFileResult =
-        await resolveFile(convertPath('/test/lib/other.dart'));
+        await resolveFile(convertPath('$testPackageLibPath/other.dart'));
     expect(otherFileResult.errors, isEmpty);
   }
 
@@ -47,7 +165,7 @@
 }
 const C constant = const C(0);
 ''');
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 import 'test.dart';
 class D {
   final C c;
@@ -56,7 +174,7 @@
 const D constant2 = const D(constant);
 ''');
     var otherFileResult =
-        await resolveFile(convertPath('/test/lib/other.dart'));
+        await resolveFile(convertPath('$testPackageLibPath/other.dart'));
     expect(otherFileResult.errors, isEmpty);
   }
 
@@ -71,45 +189,133 @@
   }
 
   test_int_to_double_via_default_value_other_file_after() async {
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 class C {
   final double x;
   const C([this.x = 0]);
 }
 ''');
-    await assertErrorsInCode('''
+    await assertNoErrorsInCode('''
 import 'other.dart';
-
-void main() {
-  const c = C();
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 44, 1),
-    ]);
+const c = C();
+''');
     var otherFileResult =
-        await resolveFile(convertPath('/test/lib/other.dart'));
+        await resolveFile(convertPath('$testPackageLibPath/other.dart'));
     expect(otherFileResult.errors, isEmpty);
   }
 
   test_int_to_double_via_default_value_other_file_before() async {
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 class C {
   final double x;
   const C([this.x = 0]);
 }
 ''');
     var otherFileResult =
-        await resolveFile(convertPath('/test/lib/other.dart'));
+        await resolveFile(convertPath('$testPackageLibPath/other.dart'));
     expect(otherFileResult.errors, isEmpty);
 
-    await assertErrorsInCode('''
+    await assertNoErrorsInCode('''
 import 'other.dart';
+const c = C();
+''');
+  }
 
-void main() {
-  const c = C();
+  test_notAssignable_fieldFormal_optional() async {
+    await assertErrorsInCode(r'''
+class A {
+  final int x;
+  const A([this.x = 'foo']);
 }
+var v = const A();
 ''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 44, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 45, 5),
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, 64, 9),
+    ]);
+  }
+
+  test_notAssignable_fieldFormal_supertype() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+class C {
+  final B b;
+  const C(this.b);
+}
+const A u = const A();
+var v = const C(u);
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, 143, 1),
+    ]);
+  }
+
+  test_notAssignable_fieldFormal_typedef() async {
+    // foo has type String -> int, so it is not assignable to A.f
+    // (A.f requires it to be int -> String).
+    await assertErrorsInCode(r'''
+typedef String Int2String(int x);
+class A {
+  final Int2String f;
+  const A(this.f);
+}
+int foo(String x) => 1;
+var v = const A(foo);
+''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 127, 3),
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, 127, 3),
+    ]);
+  }
+
+  test_notAssignable_fieldFormal_unrelated() async {
+    await assertErrorsInCode(r'''
+class A {
+  final int x;
+  const A(this.x);
+}
+var v = const A('foo');
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, 62, 5),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 62, 5),
+    ]);
+  }
+
+  test_notAssignable_fieldFormal_unresolved() async {
+    await assertErrorsInCode(r'''
+class A {
+  final Unresolved x;
+  const A(String this.x);
+}
+var v = const A('foo');
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_CLASS, 18, 10),
+    ]);
+  }
+
+  test_notAssignable_typeSubstitution() async {
+    await assertErrorsInCode(r'''
+class A<T> {
+  const A(T x);
+}
+var v = const A<int>('foo');
+''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 52, 5),
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, 52, 5),
+    ]);
+  }
+
+  test_notAssignable_unrelated() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A(int x);
+}
+var v = const A('foo');
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, 46, 5),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 46, 5),
     ]);
   }
 }
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 a8a7a79..3b94c24 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
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class ConstConstructorWithFieldInitializedByNonConstTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_factoryConstructor() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart b/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart
index c138d36..73e81a8 100644
--- a/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ConstConstructorWithMixinWithFieldTest extends DriverResolutionTest {
+class ConstConstructorWithMixinWithFieldTest extends PubPackageResolutionTest {
   test_class_instance_final() async {
     await assertErrorsInCode('''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/const_constructor_with_non_const_super_test.dart b/pkg/analyzer/test/src/diagnostics/const_constructor_with_non_const_super_test.dart
new file mode 100644
index 0000000..9dcfbc5
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_constructor_with_non_const_super_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/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstConstructorWithNonConstSuperTest);
+  });
+}
+
+@reflectiveTest
+class ConstConstructorWithNonConstSuperTest extends PubPackageResolutionTest {
+  test_explicit() async {
+    await assertErrorsInCode(r'''
+class A {
+  A();
+}
+class B extends A {
+  const B(): super();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, 52, 7),
+    ]);
+  }
+
+  test_implicit() async {
+    await assertErrorsInCode(r'''
+class A {
+  A();
+}
+class B extends A {
+  const B();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, 47, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_constructor_with_non_final_field_test.dart b/pkg/analyzer/test/src/diagnostics/const_constructor_with_non_final_field_test.dart
new file mode 100644
index 0000000..055e4b1
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_constructor_with_non_final_field_test.dart
@@ -0,0 +1,68 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstConstructorWithNonFinalFieldTest);
+  });
+}
+
+@reflectiveTest
+class ConstConstructorWithNonFinalFieldTest extends PubPackageResolutionTest {
+  test_mixin() async {
+    await assertErrorsInCode(r'''
+class A {
+  var a;
+}
+class B extends Object with A {
+  const B();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 61, 1),
+      error(
+          CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD, 61, 1),
+    ]);
+  }
+
+  test_super() async {
+    await assertErrorsInCode(r'''
+class A {
+  var a;
+}
+class B extends A {
+  const B();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 49, 1),
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, 49, 1),
+    ]);
+  }
+
+  test_this_named() async {
+    await assertErrorsInCode(r'''
+class A {
+  int x;
+  const A.a();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 27, 3),
+    ]);
+  }
+
+  test_this_unnamed() async {
+    await assertErrorsInCode(r'''
+class A {
+  int x;
+  const A();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, 27, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_deferred_class_test.dart b/pkg/analyzer/test/src/diagnostics/const_deferred_class_test.dart
new file mode 100644
index 0000000..7a02553
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_deferred_class_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 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstDeferredClassTest);
+  });
+}
+
+@reflectiveTest
+class ConstDeferredClassTest extends PubPackageResolutionTest {
+  test_namedConstructor() async {
+    newFile('$testPackageLibPath/lib1.dart', content: '''
+library lib1;
+class A {
+  const A.b();
+}''');
+    await assertErrorsInCode('''
+library root;
+import 'lib1.dart' deferred as a;
+main() {
+  const a.A.b();
+}''', [
+      error(CompileTimeErrorCode.CONST_DEFERRED_CLASS, 65, 5),
+    ]);
+  }
+
+  test_unnamed() async {
+    newFile('$testPackageLibPath/lib1.dart', content: '''
+library lib1;
+class A {
+  const A();
+}
+''');
+    await assertErrorsInCode('''
+library root;
+import 'lib1.dart' deferred as a;
+main() {
+  const a.A();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_DEFERRED_CLASS, 65, 3),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart b/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
index c688c88..54cccca 100644
--- a/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
@@ -9,8 +9,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/constant/potentially_constant_test.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -20,13 +19,22 @@
   });
 }
 
-/// TODO(paulberry): move other tests from [CompileTimeErrorCodeTestBase] to
-/// this class.
 @reflectiveTest
-class ConstEvalThrowsExceptionTest extends DriverResolutionTest {
+class ConstEvalThrowsExceptionTest extends PubPackageResolutionTest {
+  test_assertInitializerThrows() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A(int x, int y) : assert(x < y);
+}
+var v = const A(3, 2);
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 61, 13),
+    ]);
+  }
+
   test_CastError_intToDouble_constructor_importAnalyzedAfter() async {
     // See dartbug.com/35993
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 class Foo {
   final double value;
 
@@ -50,13 +58,13 @@
 }
 ''');
     var otherFileResult =
-        await resolveFile(convertPath('/test/lib/other.dart'));
+        await resolveFile(convertPath('$testPackageLibPath/other.dart'));
     expect(otherFileResult.errors, isEmpty);
   }
 
   test_CastError_intToDouble_constructor_importAnalyzedBefore() async {
     // See dartbug.com/35993
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 class Foo {
   final double value;
 
@@ -80,12 +88,12 @@
 }
 ''');
     var otherFileResult =
-        await resolveFile(convertPath('/test/lib/other.dart'));
+        await resolveFile(convertPath('$testPackageLibPath/other.dart'));
     expect(otherFileResult.errors, isEmpty);
   }
 
   test_default_constructor_arg_empty_map_import() async {
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 class C {
   final Map<String, int> m;
   const C({this.m = const <String, int>{}})
@@ -102,7 +110,7 @@
       error(HintCode.UNUSED_LOCAL_VARIABLE, 37, 1),
     ]);
     var otherFileResult =
-        await resolveFile(convertPath('/test/lib/other.dart'));
+        await resolveFile(convertPath('$testPackageLibPath/other.dart'));
     assertErrorsInList(
       otherFileResult.errors,
       expectedErrorsByNullability(
@@ -126,8 +134,10 @@
 }
 var x = const C();
 ''', [
-      error(StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
-          39, 1),
+      error(
+          CompileTimeErrorCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
+          39,
+          1),
       error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 56, 9),
     ]);
   }
@@ -145,8 +155,10 @@
 }
 var x = const C(2);
 ''', [
-      error(StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
-          40, 1),
+      error(
+          CompileTimeErrorCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
+          40,
+          1),
       error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 54, 10),
     ]);
   }
@@ -164,6 +176,30 @@
 ''');
   }
 
+  test_fromEnvironment_bool_badArgs() async {
+    await assertErrorsInCode(r'''
+var b1 = const bool.fromEnvironment(1);
+var b2 = const bool.fromEnvironment('x', defaultValue: 1);
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 9, 29),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 36, 1),
+      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 49, 48),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 81, 15),
+    ]);
+  }
+
+  test_fromEnvironment_bool_badDefault_whenDefined() async {
+    // The type of the defaultValue needs to be correct even when the default
+    // value isn't used (because the variable is defined in the environment).
+    declaredVariables = {'x': 'true'};
+    await assertErrorsInCode('''
+var b = const bool.fromEnvironment('x', defaultValue: 1);
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 8, 48),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 40, 15),
+    ]);
+  }
+
   test_ifElement_false_thenNotEvaluated() async {
     await assertErrorsInCode(
         '''
@@ -239,7 +275,7 @@
   }
 
   test_invalid_constructorFieldInitializer_fromSeparateLibrary() async {
-    newFile('/test/lib/lib.dart', content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 class A<T> {
   final int f;
   const A() : f = T.foo;
@@ -253,6 +289,50 @@
     ]);
   }
 
+  test_redirectingConstructor_paramTypeMismatch() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A.a1(x) : this.a2(x);
+  const A.a2(String x);
+}
+var v = const A.a1(0);
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 74, 13),
+    ]);
+  }
+
+  test_superConstructor_paramTypeMismatch() async {
+    await assertErrorsInCode(r'''
+class C {
+  final double d;
+  const C(this.d);
+}
+class D extends C {
+  const D(d) : super(d);
+}
+const f = const D('0.0');
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 106, 14),
+    ]);
+  }
+
+  test_symbolConstructor_badStringArgument() async {
+    await assertErrorsInCode(r'''
+var s1 = const Symbol('3');
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 9, 17),
+    ]);
+  }
+
+  test_symbolConstructor_nonStringArgument() async {
+    await assertErrorsInCode(r'''
+var s2 = const Symbol(3);
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 9, 15),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 22, 1),
+    ]);
+  }
+
   test_unaryBitNot_null() async {
     await assertErrorsInCode('''
 const dynamic D = null;
diff --git a/pkg/analyzer/test/src/diagnostics/const_eval_throws_idbze_test.dart b/pkg/analyzer/test/src/diagnostics/const_eval_throws_idbze_test.dart
new file mode 100644
index 0000000..4a8c4b2
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_eval_throws_idbze_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.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstEvalThrowsIdbzeTest);
+  });
+}
+
+@reflectiveTest
+class ConstEvalThrowsIdbzeTest extends PubPackageResolutionTest {
+  test_divisionByZero() async {
+    await assertErrorsInCode('''
+const C = 1 ~/ 0;
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE, 10, 6),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_eval_type_bool_int_test.dart b/pkg/analyzer/test/src/diagnostics/const_eval_type_bool_int_test.dart
new file mode 100644
index 0000000..3af662c
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_eval_type_bool_int_test.dart
@@ -0,0 +1,35 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstEvalTypeBoolIntTest);
+  });
+}
+
+@reflectiveTest
+class ConstEvalTypeBoolIntTest extends PubPackageResolutionTest {
+  test_binary() async {
+    await _check_constEvalTypeBoolOrInt_binary("a ^ ''");
+    await _check_constEvalTypeBoolOrInt_binary("a & ''");
+    await _check_constEvalTypeBoolOrInt_binary("a | ''");
+    await _check_constEvalTypeBoolOrInt_binary("a >> ''");
+    await _check_constEvalTypeBoolOrInt_binary("a << ''");
+  }
+
+  Future<void> _check_constEvalTypeBoolOrInt_binary(String expr) async {
+    await assertErrorsInCode('''
+const int a = 0;
+const b = $expr;
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT, 27, 6),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 2),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_eval_type_bool_num_string_test.dart b/pkg/analyzer/test/src/diagnostics/const_eval_type_bool_num_string_test.dart
new file mode 100644
index 0000000..8acf4e9
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_eval_type_bool_num_string_test.dart
@@ -0,0 +1,50 @@
+// 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';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstEvalTypeBoolNumStringTest);
+  });
+}
+
+@reflectiveTest
+class ConstEvalTypeBoolNumStringTest extends PubPackageResolutionTest {
+  test_equal() async {
+    await assertErrorsInCode(
+        r'''
+class A {
+  const A();
+}
+
+const num a = 0;
+const b = a == const A();
+''',
+        IsEnabledByDefault.constant_update_2018
+            ? []
+            : [
+                error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING, 53,
+                    14),
+              ]);
+  }
+
+  test_notEqual() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A();
+}
+
+const num a = 0;
+const _ = a != const A();
+''', [
+      error(HintCode.UNUSED_ELEMENT, 49, 1),
+      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING, 53, 14),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_eval_type_bool_test.dart b/pkg/analyzer/test/src/diagnostics/const_eval_type_bool_test.dart
new file mode 100644
index 0000000..dc91c13
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_eval_type_bool_test.dart
@@ -0,0 +1,67 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstEvalTypeBoolTest);
+  });
+}
+
+@reflectiveTest
+class ConstEvalTypeBoolTest extends PubPackageResolutionTest {
+  test_binary_and() async {
+    await assertErrorsInCode('''
+const c = true && '';
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, 10, 10),
+      error(CompileTimeErrorCode.NON_BOOL_OPERAND, 18, 2),
+    ]);
+  }
+
+  test_binary_leftTrue() async {
+    await assertErrorsInCode('''
+const c = (true || 0);
+''', [
+      error(HintCode.DEAD_CODE, 19, 1),
+      error(CompileTimeErrorCode.NON_BOOL_OPERAND, 19, 1),
+    ]);
+  }
+
+  test_binary_or() async {
+    await assertErrorsInCode(r'''
+const c = false || '';
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, 10, 11),
+      error(CompileTimeErrorCode.NON_BOOL_OPERAND, 19, 2),
+    ]);
+  }
+
+  test_lengthOfErroneousConstant() async {
+    // Attempting to compute the length of constant that couldn't be evaluated
+    // (due to an error) should not crash the analyzer (see dartbug.com/23383)
+    await assertErrorsInCode('''
+const int i = (1 ? 'alpha' : 'beta').length;
+''', [
+      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 14,
+          29),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 15, 1),
+      error(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, 15, 1),
+    ]);
+  }
+
+  test_logicalOr_trueLeftOperand() async {
+    await assertNoErrorsInCode(r'''
+class C {
+  final int x;
+  const C({this.x}) : assert(x == null || x >= 0);
+}
+const c = const C();
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_eval_type_num_test.dart b/pkg/analyzer/test/src/diagnostics/const_eval_type_num_test.dart
new file mode 100644
index 0000000..f332abf
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_eval_type_num_test.dart
@@ -0,0 +1,40 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstEvalTypeNumTest);
+  });
+}
+
+@reflectiveTest
+class ConstEvalTypeNumTest extends PubPackageResolutionTest {
+  test_binary() async {
+    await _check_constEvalTypeNum_binary("a + ''");
+    await _check_constEvalTypeNum_binary("a - ''");
+    await _check_constEvalTypeNum_binary("a * ''");
+    await _check_constEvalTypeNum_binary("a / ''");
+    await _check_constEvalTypeNum_binary("a ~/ ''");
+    await _check_constEvalTypeNum_binary("a > ''");
+    await _check_constEvalTypeNum_binary("a < ''");
+    await _check_constEvalTypeNum_binary("a >= ''");
+    await _check_constEvalTypeNum_binary("a <= ''");
+    await _check_constEvalTypeNum_binary("a % ''");
+  }
+
+  Future<void> _check_constEvalTypeNum_binary(String expr) async {
+    await assertErrorsInCode('''
+const num a = 0;
+const b = $expr;
+''', [
+      error(CompileTimeErrorCode.CONST_EVAL_TYPE_NUM, 27, 6),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 2),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_field_initializer_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/const_field_initializer_not_assignable_test.dart
new file mode 100644
index 0000000..e624e63
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_field_initializer_not_assignable_test.dart
@@ -0,0 +1,38 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstFieldInitializerNotAssignableTest);
+  });
+}
+
+@reflectiveTest
+class ConstFieldInitializerNotAssignableTest extends PubPackageResolutionTest {
+  test_assignable_subtype() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  final num x;
+  const A() : x = 1;
+}
+''');
+  }
+
+  test_notAssignable_unrelated() async {
+    await assertErrorsInCode(r'''
+class A {
+  final int x;
+  const A() : x = '';
+}
+''', [
+      error(CompileTimeErrorCode.FIELD_INITIALIZER_NOT_ASSIGNABLE, 43, 2),
+      error(CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, 43, 2),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_formal_parameter_test.dart b/pkg/analyzer/test/src/diagnostics/const_formal_parameter_test.dart
new file mode 100644
index 0000000..79e54ea
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_formal_parameter_test.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.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstFormalParameterTest);
+  });
+}
+
+@reflectiveTest
+class ConstFormalParameterTest extends PubPackageResolutionTest {
+  test_fieldFormalParameter() async {
+    await assertErrorsInCode(r'''
+class A {
+  var x;
+  A(const this.x) {}
+}
+''', [
+      error(CompileTimeErrorCode.CONST_FORMAL_PARAMETER, 23, 12),
+      error(ParserErrorCode.EXTRANEOUS_MODIFIER, 23, 5),
+    ]);
+  }
+
+  test_simpleFormalParameter() async {
+    await assertErrorsInCode('''
+f(const x) {}
+''', [
+      error(CompileTimeErrorCode.CONST_FORMAL_PARAMETER, 2, 7),
+      error(ParserErrorCode.EXTRANEOUS_MODIFIER, 2, 5),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_initialized_with_non_constant_value_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/const_initialized_with_non_constant_value_from_deferred_library_test.dart
new file mode 100644
index 0000000..2a14814
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_initialized_with_non_constant_value_from_deferred_library_test.dart
@@ -0,0 +1,55 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(
+        ConstInitializedWithNonConstantValueFromDeferredLibraryTest);
+  });
+}
+
+@reflectiveTest
+class ConstInitializedWithNonConstantValueFromDeferredLibraryTest
+    extends PubPackageResolutionTest {
+  test_deferred() async {
+    newFile('$testPackageLibPath/lib1.dart', content: '''
+library lib1;
+const V = 1;
+''');
+    await assertErrorsInCode('''
+library root;
+import 'lib1.dart' deferred as a;
+const B = a.V;
+''', [
+      error(
+          CompileTimeErrorCode
+              .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
+          58,
+          3),
+    ]);
+  }
+
+  test_nested() async {
+    newFile('$testPackageLibPath/lib1.dart', content: '''
+library lib1;
+const V = 1;
+''');
+    await assertErrorsInCode('''
+library root;
+import 'lib1.dart' deferred as a;
+const B = a.V + 1;
+''', [
+      error(
+          CompileTimeErrorCode
+              .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
+          58,
+          7),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_initialized_with_non_constant_value_test.dart b/pkg/analyzer/test/src/diagnostics/const_initialized_with_non_constant_value_test.dart
new file mode 100644
index 0000000..8e28cd4
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_initialized_with_non_constant_value_test.dart
@@ -0,0 +1,105 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstInitializedWithNonConstantValueTest);
+  });
+}
+
+@reflectiveTest
+class ConstInitializedWithNonConstantValueTest
+    extends PubPackageResolutionTest {
+  test_dynamic() async {
+    await assertErrorsInCode(r'''
+f(p) {
+  const c = p;
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 15, 1),
+      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 19,
+          1),
+    ]);
+  }
+
+  test_finalField() async {
+    // Regression test for bug #25526; previously, two errors were reported.
+    await assertErrorsInCode(r'''
+class Foo {
+  final field = 0;
+  foo([int x = field]) {}
+}
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 46, 5),
+    ]);
+  }
+
+  test_missingConstInListLiteral() async {
+    await assertNoErrorsInCode('''
+const List L = [0];
+''');
+  }
+
+  test_missingConstInMapLiteral() async {
+    await assertNoErrorsInCode('''
+const Map M = {'a' : 0};
+''');
+  }
+
+  test_newInstance_constConstructor() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A();
+}
+const a = new A();
+''', [
+      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 35,
+          7),
+    ]);
+  }
+
+  test_newInstance_externalFactoryConstConstructor() async {
+    // We can't evaluate "const A()" because its constructor is external.  But
+    // the code is correct--we shouldn't report an error.
+    await assertNoErrorsInCode(r'''
+class A {
+  external const factory A();
+}
+const x = const A();
+''');
+  }
+
+  test_nonStaticField_inGenericClass() async {
+    await assertErrorsInCode('''
+class C<T> {
+  const C();
+  T get t => null;
+}
+
+const x = const C().t;
+''', [
+      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 58,
+          11),
+    ]);
+  }
+
+  test_propertyExtraction_targetNotConst() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A();
+  int m() => 0;
+}
+final a = const A();
+const c = a.m;
+''', [
+      error(CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, 72,
+          1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_instance_field_test.dart b/pkg/analyzer/test/src/diagnostics/const_instance_field_test.dart
new file mode 100644
index 0000000..2e8afb16
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_instance_field_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:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstInstanceFieldTest);
+  });
+}
+
+@reflectiveTest
+class ConstInstanceFieldTest extends PubPackageResolutionTest {
+  test_class() async {
+    await assertErrorsInCode(r'''
+class C {
+  const int f = 0;
+}
+''', [
+      error(CompileTimeErrorCode.CONST_INSTANCE_FIELD, 12, 5),
+    ]);
+  }
+
+  test_mixin() async {
+    await assertErrorsInCode(r'''
+mixin C {
+  const int f = 0;
+}
+''', [
+      error(CompileTimeErrorCode.CONST_INSTANCE_FIELD, 12, 5),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_map_key_expression_type_implements_equals_test.dart b/pkg/analyzer/test/src/diagnostics/const_map_key_expression_type_implements_equals_test.dart
index ee3066f..6b2a23b 100644
--- a/pkg/analyzer/test/src/diagnostics/const_map_key_expression_type_implements_equals_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_map_key_expression_type_implements_equals_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class ConstMapKeyExpressionTypeImplementsEqualsTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_abstract() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/const_not_initialized_test.dart b/pkg/analyzer/test/src/diagnostics/const_not_initialized_test.dart
index 9617d6f..786dfe7 100644
--- a/pkg/analyzer/test/src/diagnostics/const_not_initialized_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_not_initialized_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ConstNotInitializedTest);
-    defineReflectiveTests(ConstNotInitializedWithNnbdTest);
+    defineReflectiveTests(ConstNotInitializedWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ConstNotInitializedTest extends DriverResolutionTest {
+class ConstNotInitializedTest extends PubPackageResolutionTest {
   test_extension_static() async {
     await assertErrorsInCode('''
 extension E on String {
@@ -58,9 +56,5 @@
 }
 
 @reflectiveTest
-class ConstNotInitializedWithNnbdTest extends ConstNotInitializedTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-}
+class ConstNotInitializedWithNullSafetyTest extends ConstNotInitializedTest
+    with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/diagnostics/const_set_element_type_implements_equals_test.dart b/pkg/analyzer/test/src/diagnostics/const_set_element_type_implements_equals_test.dart
index 62ca512..48c5f70 100644
--- a/pkg/analyzer/test/src/diagnostics/const_set_element_type_implements_equals_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_set_element_type_implements_equals_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,7 +19,7 @@
 }
 
 @reflectiveTest
-class ConstSetElementTypeImplementsEqualsTest extends DriverResolutionTest {
+class ConstSetElementTypeImplementsEqualsTest extends PubPackageResolutionTest {
   test_constField() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/const_spread_expected_list_or_set_test.dart b/pkg/analyzer/test/src/diagnostics/const_spread_expected_list_or_set_test.dart
index 1751118..6cbca9c 100644
--- a/pkg/analyzer/test/src/diagnostics/const_spread_expected_list_or_set_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_spread_expected_list_or_set_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class ConstSpreadExpectedListOrSetTest extends DriverResolutionTest {
+class ConstSpreadExpectedListOrSetTest extends PubPackageResolutionTest {
   test_const_listInt() async {
     await assertErrorsInCode(
         '''
diff --git a/pkg/analyzer/test/src/diagnostics/const_spread_expected_map_test.dart b/pkg/analyzer/test/src/diagnostics/const_spread_expected_map_test.dart
index e14372a..0548e36 100644
--- a/pkg/analyzer/test/src/diagnostics/const_spread_expected_map_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_spread_expected_map_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class ConstSpreadExpectedMapTest extends DriverResolutionTest {
+class ConstSpreadExpectedMapTest extends PubPackageResolutionTest {
   test_const_mapInt() async {
     await assertErrorsInCode(
         '''
diff --git a/pkg/analyzer/test/src/diagnostics/const_with_non_const_test.dart b/pkg/analyzer/test/src/diagnostics/const_with_non_const_test.dart
new file mode 100644
index 0000000..39e41c9
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_with_non_const_test.dart
@@ -0,0 +1,95 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstWithNonConstTest);
+  });
+}
+
+@reflectiveTest
+class ConstWithNonConstTest extends PubPackageResolutionTest {
+  test_inConstContext() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A(x);
+}
+class B {
+}
+main() {
+  const A(B());
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_NON_CONST, 57, 3),
+    ]);
+  }
+
+  test_mixinApplication_constSuperConstructor() async {
+    await assertNoErrorsInCode(r'''
+mixin M {}
+class A {
+  const A();
+}
+class B = A with M;
+const b = const B();
+''');
+  }
+
+  test_mixinApplication_constSuperConstructor_field() async {
+    await assertErrorsInCode(r'''
+mixin M {
+  int i = 0;
+}
+class A {
+  const A();
+}
+class B = A with M;
+var b = const B();
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_NON_CONST, 78, 5),
+    ]);
+  }
+
+  test_mixinApplication_constSuperConstructor_getter() async {
+    await assertNoErrorsInCode(r'''
+mixin M {
+  int get i => 0;
+}
+class A {
+  const A();
+}
+class B = A with M;
+var b = const B();
+''');
+  }
+
+  test_mixinApplication_constSuperConstructor_setter() async {
+    await assertNoErrorsInCode(r'''
+mixin M {
+  set(int i) {}
+}
+class A {
+  const A();
+}
+class B = A with M;
+var b = const B();
+''');
+  }
+
+  test_nonConst() async {
+    await assertErrorsInCode(r'''
+class T {
+  T(a, b, {c, d}) {}
+}
+f() { return const T(0, 1, c: 2, d: 3); }
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_NON_CONST, 46, 5),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_with_non_constant_argument_test.dart b/pkg/analyzer/test/src/diagnostics/const_with_non_constant_argument_test.dart
new file mode 100644
index 0000000..e21d023
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_with_non_constant_argument_test.dart
@@ -0,0 +1,60 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstWithNonConstantArgumentTest);
+  });
+}
+
+@reflectiveTest
+class ConstWithNonConstantArgumentTest extends PubPackageResolutionTest {
+  test_annotation() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A(int p);
+}
+var v = 42;
+@A(v)
+main() {
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT, 45, 1),
+    ]);
+  }
+
+  test_classShadowedBySetter() async {
+    await assertErrorsInCode(r'''
+class Annotation {
+  const Annotation(Object obj);
+}
+
+class Bar {}
+
+class Foo {
+  @Annotation(Bar)
+  set Bar(int value) {}
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT, 94, 3),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 94, 3),
+    ]);
+  }
+
+  test_instanceCreation() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A(a);
+}
+f(p) { return const A(p); }
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT, 48, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_with_non_type_test.dart b/pkg/analyzer/test/src/diagnostics/const_with_non_type_test.dart
new file mode 100644
index 0000000..67edb47
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_with_non_type_test.dart
@@ -0,0 +1,40 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstWithNonTypeTest);
+  });
+}
+
+@reflectiveTest
+class ConstWithNonTypeTest extends PubPackageResolutionTest {
+  test_fromLibrary() async {
+    newFile('$testPackageLibPath/lib1.dart');
+    await assertErrorsInCode('''
+import 'lib1.dart' as lib;
+void f() {
+  const lib.A();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_NON_TYPE, 50, 1),
+    ]);
+  }
+
+  test_variable() async {
+    await assertErrorsInCode(r'''
+int A;
+f() {
+  return const A();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_NON_TYPE, 28, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_with_type_parameters_test.dart b/pkg/analyzer/test/src/diagnostics/const_with_type_parameters_test.dart
new file mode 100644
index 0000000..ea1ef186
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_with_type_parameters_test.dart
@@ -0,0 +1,41 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstWithTypeParametersTest);
+  });
+}
+
+@reflectiveTest
+class ConstWithTypeParametersTest extends PubPackageResolutionTest {
+  test_direct() async {
+    await assertErrorsInCode(r'''
+class A<T> {
+  static const V = const A<T>();
+  const A();
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 40, 1),
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 40, 1),
+    ]);
+  }
+
+  test_indirect() async {
+    await assertErrorsInCode(r'''
+class A<T> {
+  static const V = const A<List<T>>();
+  const A();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, 45, 1),
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 45, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_with_undefined_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/const_with_undefined_constructor_test.dart
new file mode 100644
index 0000000..eb83413
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_with_undefined_constructor_test.dart
@@ -0,0 +1,44 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstWithUndefinedConstructorTest);
+  });
+}
+
+@reflectiveTest
+class ConstWithUndefinedConstructorTest extends PubPackageResolutionTest {
+  test_named() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A();
+}
+f() {
+  return const A.noSuchConstructor();
+}
+''', [
+      error(CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR, 48, 17),
+    ]);
+  }
+
+  test_unnamed() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A.name();
+}
+f() {
+  return const A();
+}
+''', [
+      error(
+          CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, 51, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/could_not_infer_test.dart b/pkg/analyzer/test/src/diagnostics/could_not_infer_test.dart
new file mode 100644
index 0000000..73ddb62
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/could_not_infer_test.dart
@@ -0,0 +1,249 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CouldNotInferTest);
+  });
+}
+
+@reflectiveTest
+class CouldNotInferTest extends PubPackageResolutionTest {
+  test_constructors_inferenceFBounded() async {
+    await assertErrorsInCode('''
+class C<T> {}
+
+class P<T extends C<T>, U extends C<U>> {
+  T t;
+  U u;
+  P(this.t, this.u);
+  P._();
+  P<U, T> get reversed => new P(u, t);
+}
+
+main() {
+  P._();
+}
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 154, 3),
+      error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 154, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 154, 3),
+    ]);
+  }
+
+  test_constructors_inferFromArguments_argumentNotAssignable() async {
+    await assertErrorsInCode('''
+class A {}
+
+typedef T F<T>();
+
+class C<T extends A> {
+  C(F<T> f);
+}
+
+class NotA {}
+NotA myF() => null;
+
+main() {
+  var x = C(myF);
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 120, 1),
+      error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 124, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 124, 1),
+    ]);
+  }
+
+  test_downwardInference_fixes_noUpwardsErrors() async {
+    await assertErrorsInCode(r'''
+import 'dart:math';
+// T max<T extends num>(T x, T y);
+main() {
+  num x;
+  dynamic y;
+
+  num a = max(x, y);
+  Object b = max(x, y);
+  dynamic c = max(x, y);
+  var d = max(x, y);
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 93, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 117, 1),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 142, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 146, 3),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 163, 1),
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 167, 3),
+    ]);
+  }
+
+  test_function() async {
+    await assertErrorsInCode(r'''
+T f<T>(T t) => null;
+main() { f(<S>(S s) => s); }
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 30, 1),
+    ]);
+  }
+
+  test_functionType() async {
+    await assertErrorsInCode('''
+T Function<T>(T) f;
+main() { f(<S>(S s) => s); }
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 29, 1),
+    ]);
+  }
+
+  test_functionType_allSameSubtype() async {
+    await assertNoErrorsInCode(r'''
+external T f<T extends num>(T a, T b);
+void g(int cb(int a, int b)) {}
+void main() {
+  g(f);
+}
+''');
+  }
+
+  test_functionType_parameterIsBound_returnIsBound() async {
+    await assertNoErrorsInCode(r'''
+external T f<T extends num>(T a, T b);
+void g(num cb(num a, num b)) {}
+void main() {
+  g(f);
+}
+''');
+  }
+
+  test_functionType_parameterIsObject_returnIsBound() async {
+    await assertErrorsInCode('''
+external T f<T extends num>(T a, T b);
+void g(num cb(Object a, Object b)) {}
+void main() {
+  g(f);
+}
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 95, 1),
+      error(CompileTimeErrorCode.INVALID_CAST_FUNCTION, 95, 1),
+    ]);
+  }
+
+  test_functionType_parameterIsObject_returnIsBound_prefixedFunction() async {
+    newFile('$testPackageLibPath/a.dart', content: '''
+external T f<T extends num>(T a, T b);
+''');
+    await assertErrorsInCode('''
+import 'a.dart' as a;
+void g(num cb(Object a, Object b)) {}
+void main() {
+  g(a.f);
+}
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 78, 3),
+      error(CompileTimeErrorCode.INVALID_CAST_FUNCTION, 78, 3),
+    ]);
+  }
+
+  test_functionType_parameterIsObject_returnIsSubtype() async {
+    await assertErrorsInCode('''
+external T f<T extends num>(T a, T b);
+void g(int cb(Object a, Object b)) {}
+void main() {
+  g(f);
+}
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 95, 1),
+      error(CompileTimeErrorCode.INVALID_CAST_FUNCTION, 95, 1),
+    ]);
+  }
+
+  test_functionType_parameterIsObject_returnIsSubtype_tearOff() async {
+    await assertErrorsInCode('''
+class C {
+  T m<T extends num>(T x, T y) {
+    throw 'error';
+  }
+}
+void g(int cb(Object a, Object b)) {}
+void main() {
+  g(C().m);
+}
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 124, 5),
+    ]);
+  }
+
+  test_functionType_parameterIsSubtype_returnIsBound() async {
+    await assertNoErrorsInCode(r'''
+external T f<T extends num>(T a, T b);
+void g(num cb(int a, int b)) {}
+void main() {
+  g(f);
+}
+''');
+  }
+
+  test_functionType_parameterIsSubtype_returnIsObject() async {
+    await assertNoErrorsInCode('''
+external T f<T extends num>(T a, T b);
+void g(Object cb(int a, int b)) {}
+void main() {
+  g(f);
+}
+''');
+  }
+
+  test_functionType_parametersAreSubtypes_returnIsBound() async {
+    await assertNoErrorsInCode('''
+external T f<T extends num>(T a, T b);
+void g(num cb(int a, double b)) {}
+void main() {
+  g(f);
+}
+''');
+  }
+
+  test_functionType_parametersAreSubtypes_returnIsOne() async {
+    await assertErrorsInCode('''
+external T f<T extends num>(T a, T b);
+void g(int cb(int a, double b)) {}
+void main() {
+  g(f);
+}
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 92, 1),
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 92, 1),
+    ]);
+  }
+
+  test_genericMethods_correctlyRecognizeGenericUpperBound() async {
+    // Regression test for https://github.com/dart-lang/sdk/issues/25740.
+    await assertErrorsInCode(r'''
+class Foo<T extends Pattern> {
+  U method<U extends T>(U u) => u;
+}
+main() {
+  new Foo<String>()./*error:COULD_NOT_INFER*/method(42);
+}
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 122, 6),
+    ]);
+  }
+
+  test_method() async {
+    await assertErrorsInCode(r'''
+class C {
+  T f<T>(T t) => null;
+}
+main() { new C().f(<S>(S s) => s); }
+''', [
+      error(CompileTimeErrorCode.COULD_NOT_INFER, 52, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/dead_code_test.dart b/pkg/analyzer/test/src/diagnostics/dead_code_test.dart
index 088a0a8..2529fea 100644
--- a/pkg/analyzer/test/src/diagnostics/dead_code_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/dead_code_test.dart
@@ -3,11 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/constant/potentially_constant_test.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +15,13 @@
 }
 
 @reflectiveTest
-class DeadCodeTest extends DriverResolutionTest with PackageMixin {
+class DeadCodeTest extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfigWithMeta();
+  }
+
   test_afterForEachWithBreakLabel() async {
     await assertNoErrorsInCode(r'''
 f(List<Object> values) {
@@ -166,7 +170,7 @@
   }
 
   test_deadBlock_if_debugConst_prefixedIdentifier2() async {
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 class A {
   static const bool DEBUG = false;
 }''');
@@ -178,7 +182,7 @@
   }
 
   test_deadBlock_if_debugConst_propertyAccessor() async {
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 class A {
   static const bool DEBUG = false;
 }''');
@@ -316,61 +320,6 @@
     ]);
   }
 
-  test_deadFinalBreakInCase() async {
-    await assertNoErrorsInCode(r'''
-f() {
-  switch (true) {
-  case true:
-    try {
-      print(1);
-    } finally {
-      return;
-    }
-    break;
-  default:
-    break;
-  }
-}''');
-  }
-
-  test_deadFinalReturnInCase() async {
-    await assertErrorsInCode(r'''
-f() {
-  switch (true) {
-  case true:
-    try {
-      print(1);
-    } finally {
-      return;
-    }
-    return;
-  default:
-    break;
-  }
-}''', [
-      error(HintCode.DEAD_CODE, 103, 7),
-    ]);
-  }
-
-  test_deadFinalStatementInCase() async {
-    await assertErrorsInCode(r'''
-f() {
-  switch (true) {
-  case true:
-    try {
-      print(1);
-    } finally {
-      return;
-    }
-    throw 'msg';
-  default:
-    break;
-  }
-}''', [
-      error(HintCode.DEAD_CODE, 103, 12),
-    ]);
-  }
-
   test_deadOperandLHS_and() async {
     await assertErrorsInCode(r'''
 f() {
@@ -508,7 +457,6 @@
   }
 
   test_statementAfterAlwaysThrowsFunction() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 
@@ -528,7 +476,6 @@
 
   @failingTest
   test_statementAfterAlwaysThrowsGetter() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 
@@ -548,7 +495,6 @@
   }
 
   test_statementAfterAlwaysThrowsMethod() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 
@@ -805,6 +751,97 @@
       error(HintCode.DEAD_CODE, 41, 9),
     ]);
   }
+
+  test_switchCase_final_break() async {
+    var expectedErrors = expectedErrorsByNullability(nullable: [
+      error(HintCode.DEAD_CODE, 96, 6),
+    ], legacy: []);
+    await assertErrorsInCode(r'''
+void f(int a) {
+  switch (a) {
+    case 0:
+      try {} finally {
+        return;
+      }
+      break;
+  }
+}
+''', expectedErrors);
+  }
+
+  test_switchCase_final_continue() async {
+    var expectedErrors = expectedErrorsByNullability(nullable: [
+      error(HintCode.DEAD_CODE, 140, 9),
+    ], legacy: []);
+    await assertErrorsInCode(r'''
+void f(int a) {
+  for (var i = 0; i < 2; i++) {
+    switch (a) {
+      case 0:
+        try {} finally {
+          return;
+        }
+        continue;
+    }
+  }
+}
+''', expectedErrors);
+  }
+
+  test_switchCase_final_rethrow() async {
+    var expectedErrors = expectedErrorsByNullability(nullable: [
+      error(HintCode.DEAD_CODE, 142, 8),
+    ], legacy: []);
+    await assertErrorsInCode(r'''
+void f(int a) {
+  try {
+    // empty
+  } on int {
+    switch (a) {
+      case 0:
+        try {} finally {
+          return;
+        }
+        rethrow;
+    }
+  }
+}
+''', expectedErrors);
+  }
+
+  test_switchCase_final_return() async {
+    var expectedErrors = expectedErrorsByNullability(nullable: [
+      error(HintCode.DEAD_CODE, 96, 7),
+    ], legacy: []);
+    await assertErrorsInCode(r'''
+void f(int a) {
+  switch (a) {
+    case 0:
+      try {} finally {
+        return;
+      }
+      return;
+  }
+}
+''', expectedErrors);
+  }
+
+  test_switchCase_final_throw() async {
+    var expectedErrors = expectedErrorsByNullability(nullable: [
+      error(HintCode.DEAD_CODE, 96, 8),
+    ], legacy: []);
+    await assertErrorsInCode(r'''
+void f(int a) {
+  switch (a) {
+    case 0:
+      try {} finally {
+        return;
+      }
+      throw 0;
+  }
+}
+''', expectedErrors);
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer/test/src/diagnostics/dead_null_aware_expression_test.dart b/pkg/analyzer/test/src/diagnostics/dead_null_aware_expression_test.dart
index 939300f..c1e4746 100644
--- a/pkg/analyzer/test/src/diagnostics/dead_null_aware_expression_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/dead_null_aware_expression_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,15 +14,10 @@
 }
 
 @reflectiveTest
-class DeadNullAwareExpressionTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class DeadNullAwareExpressionTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_assignCompound_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 var x = 0;
 ''');
@@ -71,7 +63,7 @@
   }
 
   test_binary_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 var x = 0;
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/default_list_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/default_list_constructor_test.dart
index 5609204d..6f8f9c1 100644
--- a/pkg/analyzer/test/src/diagnostics/default_list_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/default_list_constructor_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,12 +14,8 @@
 }
 
 @reflectiveTest
-class DefaultListConstructorMismatch extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class DefaultListConstructorMismatch extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_inferredType() async {
     await assertErrorsInCode('''
 List<int> v = List(5);
diff --git a/pkg/analyzer/test/src/diagnostics/default_value_in_function_type_test.dart b/pkg/analyzer/test/src/diagnostics/default_value_in_function_type_test.dart
index 6356791..19c3909 100644
--- a/pkg/analyzer/test/src/diagnostics/default_value_in_function_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/default_value_in_function_type_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class DefaultValueInFunctionTypeTest extends DriverResolutionTest {
+class DefaultValueInFunctionTypeTest extends PubPackageResolutionTest {
   test_new_named() async {
     await assertErrorsInCode('''
 typedef F = int Function({Map<String, String> m: const {}});
diff --git a/pkg/analyzer/test/src/diagnostics/default_value_in_function_typed_parameter_test.dart b/pkg/analyzer/test/src/diagnostics/default_value_in_function_typed_parameter_test.dart
index d75a555..746f479 100644
--- a/pkg/analyzer/test/src/diagnostics/default_value_in_function_typed_parameter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/default_value_in_function_typed_parameter_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,8 @@
 }
 
 @reflectiveTest
-class DefaultValueInFunctionTypedParameterTest extends DriverResolutionTest {
+class DefaultValueInFunctionTypedParameterTest
+    extends PubPackageResolutionTest {
   test_named() async {
     await assertErrorsInCode('''
 f(g({p: null})) {}
diff --git a/pkg/analyzer/test/src/diagnostics/default_value_in_redirecting_factory_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/default_value_in_redirecting_factory_constructor_test.dart
index 34f2171..f2e9e0c 100644
--- a/pkg/analyzer/test/src/diagnostics/default_value_in_redirecting_factory_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/default_value_in_redirecting_factory_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class DefaultValueInRedirectingFactoryConstructorTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_default_value() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/default_value_on_required_parameter_test.dart b/pkg/analyzer/test/src/diagnostics/default_value_on_required_parameter_test.dart
index 8700979..d191807 100644
--- a/pkg/analyzer/test/src/diagnostics/default_value_on_required_parameter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/default_value_on_required_parameter_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,12 +14,8 @@
 }
 
 @reflectiveTest
-class DefaultValueOnRequiredParameterTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class DefaultValueOnRequiredParameterTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_function_notRequired_default() async {
     await assertNoErrorsInCode('''
 void log({String message: 'no message'}) {}
diff --git a/pkg/analyzer/test/src/diagnostics/deferred_import_of_extension_test.dart b/pkg/analyzer/test/src/diagnostics/deferred_import_of_extension_test.dart
index 89e92d4..2475e1e 100644
--- a/pkg/analyzer/test/src/diagnostics/deferred_import_of_extension_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deferred_import_of_extension_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class DeferredImportOfExtensionTest extends DriverResolutionTest {
+class DeferredImportOfExtensionTest extends PubPackageResolutionTest {
   test_deferredImport_withExtensions() {
-    newFile('/test/lib/foo.dart', content: '''
+    newFile('$testPackageLibPath/foo.dart', content: '''
 extension E on C {}
 class C {}
 ''');
@@ -32,7 +32,7 @@
   }
 
   test_deferredImport_withHiddenExtensions() {
-    newFile('/test/lib/foo.dart', content: '''
+    newFile('$testPackageLibPath/foo.dart', content: '''
 extension E on C {}
 class C {}
 ''');
@@ -46,7 +46,7 @@
   }
 
   test_deferredImport_withoutExtensions() {
-    newFile('/test/lib/foo.dart', content: '''
+    newFile('$testPackageLibPath/foo.dart', content: '''
 class C {}
 ''');
     assertNoErrorsInCode('''
@@ -59,7 +59,7 @@
   }
 
   test_deferredImport_withShownNonExtensions() {
-    newFile('/test/lib/foo.dart', content: '''
+    newFile('$testPackageLibPath/foo.dart', content: '''
 extension E on C {}
 class C {}
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/definitely_unassigned_late_local_variable_test.dart b/pkg/analyzer/test/src/diagnostics/definitely_unassigned_late_local_variable_test.dart
index 24bb1e0..61ee6ec 100644
--- a/pkg/analyzer/test/src/diagnostics/definitely_unassigned_late_local_variable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/definitely_unassigned_late_local_variable_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,13 +14,8 @@
 }
 
 @reflectiveTest
-class DefinitelyUnassignedLateLocalVariableTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class DefinitelyUnassignedLateLocalVariableTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   CompileTimeErrorCode get _errorCode {
     return CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE;
   }
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_extends_function_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_extends_function_test.dart
index ed17e5b..2e97f25 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_extends_function_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_extends_function_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class DeprecatedExtendsFunctionTest extends DriverResolutionTest {
+class DeprecatedExtendsFunctionTest extends PubPackageResolutionTest {
   test_core() async {
     await assertErrorsInCode('''
 class A extends Function {}
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_function_class_declaration_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_function_class_declaration_test.dart
index 66dc44d..6221d24 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_function_class_declaration_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_function_class_declaration_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class DeprecatedFunctionClassDeclarationTest extends DriverResolutionTest {
+class DeprecatedFunctionClassDeclarationTest extends PubPackageResolutionTest {
   test_declaration() async {
     await assertErrorsInCode('''
 class Function {}
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
index f2493f1..c273957 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
@@ -18,6 +18,8 @@
 @reflectiveTest
 class DeprecatedMemberUseFromSamePackageTest extends DriverResolutionTest {
   test_basicWorkspace() async {
+    configureWorkspace(root: '/workspace');
+
     newFile('/workspace/lib/deprecated_library.dart', content: r'''
 @deprecated
 library deprecated_library;
@@ -33,6 +35,8 @@
   }
 
   test_bazelWorkspace() async {
+    configureWorkspace(root: '/workspace');
+
     newFile('/workspace/WORKSPACE');
     newFile('/workspace/project/BUILD');
     newFolder('/workspace/bazel-genfiles');
@@ -123,6 +127,8 @@
   }
 
   test_gnWorkspace() async {
+    configureWorkspace(root: '/workspace');
+
     newFolder('/workspace/.jiri_root');
     newFile('/workspace/project/pubspec.yaml');
     newFile('/workspace/project/BUILD.gn');
@@ -353,9 +359,11 @@
   }
 
   test_packageBuildWorkspace() async {
+    configureWorkspace(root: '/workspace');
+
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
-    newFileWithBytes('/workspace/.packages', 'project:lib/'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
+    newFile('/workspace/.packages', content: 'project:lib/');
 
     newFile('/workspace/lib/deprecated_library.dart', content: r'''
 @deprecated
@@ -699,7 +707,7 @@
 ''');
 
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
 
     await assertErrorsInFile('/workspace/package/lib/lib1.dart', r'''
 import 'package:aaa/a.dart';
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_mixin_function_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_mixin_function_test.dart
index dd0b1b9..e6fd57e 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_mixin_function_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_mixin_function_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class DeprecatedMixinFunctionTest extends DriverResolutionTest {
+class DeprecatedMixinFunctionTest extends PubPackageResolutionTest {
   test_core() async {
     await assertErrorsInCode('''
 class A extends Object with Function {}
diff --git a/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart b/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart
index f0f3141..ff371bc 100644
--- a/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class DivisionOptimizationTest extends DriverResolutionTest {
+class DivisionOptimizationTest extends PubPackageResolutionTest {
   test_divisionOptimization() async {
     await assertNoErrorsInCode(r'''
 f(int x, int y) {
diff --git a/pkg/analyzer/test/src/diagnostics/duplicate_definition_test.dart b/pkg/analyzer/test/src/diagnostics/duplicate_definition_test.dart
index 5c48482..1891285 100644
--- a/pkg/analyzer/test/src/diagnostics/duplicate_definition_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/duplicate_definition_test.dart
@@ -7,7 +7,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,7 +19,7 @@
 }
 
 @reflectiveTest
-class DuplicateDefinitionClassTest extends DriverResolutionTest {
+class DuplicateDefinitionClassTest extends PubPackageResolutionTest {
   test_instance_field_field() async {
     await assertErrorsInCode(r'''
 class C {
@@ -327,7 +327,7 @@
 }
 
 @reflectiveTest
-class DuplicateDefinitionExtensionTest extends DriverResolutionTest {
+class DuplicateDefinitionExtensionTest extends PubPackageResolutionTest {
   test_extendedType_instance() async {
     await assertNoErrorsInCode('''
 class A {
@@ -637,7 +637,7 @@
 }
 
 @reflectiveTest
-class DuplicateDefinitionMixinTest extends DriverResolutionTest {
+class DuplicateDefinitionMixinTest extends PubPackageResolutionTest {
   test_instance_field_field() async {
     await assertErrorsInCode(r'''
 mixin M {
@@ -936,7 +936,7 @@
 }
 
 @reflectiveTest
-class DuplicateDefinitionTest extends DriverResolutionTest {
+class DuplicateDefinitionTest extends PubPackageResolutionTest {
   test_catch() async {
     await assertErrorsInCode(r'''
 main() {
@@ -1158,8 +1158,8 @@
   }
 
   test_unitMembers_part_library() async {
-    var libPath = convertPath('/test/lib/lib.dart');
-    var aPath = convertPath('/test/lib/a.dart');
+    var libPath = convertPath('$testPackageLibPath/lib.dart');
+    var aPath = convertPath('$testPackageLibPath/a.dart');
     newFile(libPath, content: '''
 part 'a.dart';
 
@@ -1182,9 +1182,9 @@
   }
 
   test_unitMembers_part_part() async {
-    var libPath = convertPath('/test/lib/lib.dart');
-    var aPath = convertPath('/test/lib/a.dart');
-    var bPath = convertPath('/test/lib/b.dart');
+    var libPath = convertPath('$testPackageLibPath/lib.dart');
+    var aPath = convertPath('$testPackageLibPath/a.dart');
+    var bPath = convertPath('$testPackageLibPath/b.dart');
     newFile(libPath, content: '''
 part 'a.dart';
 part 'b.dart';
diff --git a/pkg/analyzer/test/src/diagnostics/duplicate_hidden_name_test.dart b/pkg/analyzer/test/src/diagnostics/duplicate_hidden_name_test.dart
index aadefba..ab9c46d 100644
--- a/pkg/analyzer/test/src/diagnostics/duplicate_hidden_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/duplicate_hidden_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class DuplicateHiddenNameTest extends DriverResolutionTest {
+class DuplicateHiddenNameTest extends PubPackageResolutionTest {
   test_hidden() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 class B {}
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart b/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart
index 6057e3b..963db0e 100644
--- a/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart
@@ -6,7 +6,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,106 +15,106 @@
 }
 
 @reflectiveTest
-class DuplicateImportTest extends DriverResolutionTest {
+class DuplicateImportTest extends PubPackageResolutionTest {
   test_duplicateImport() async {
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 library lib1;
 class A {}''');
 
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 library L;
 import 'lib1.dart';
 import 'lib1.dart';
 A a;''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.DUPLICATE_IMPORT, 38, 11),
     ]);
   }
 
   test_importsHaveIdenticalShowHide() async {
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 library lib1;
 class A {}
 class B {}''');
 
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 library L;
 import 'lib1.dart' as M show A hide B;
 import 'lib1.dart' as M show A hide B;
 M.A a;''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.DUPLICATE_IMPORT, 57, 11),
     ]);
   }
 
   test_oneImportHasHide() async {
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 library lib1;
 class A {}
 class B {}''');
 
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 library L;
 import 'lib1.dart';
 import 'lib1.dart' hide A;
 A a;
 B b;''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart');
   }
 
   test_oneImportHasShow() async {
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 library lib1;
 class A {}
 class B {}''');
 
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 library L;
 import 'lib1.dart';
 import 'lib1.dart' show A;
 A a;
 B b;''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart');
   }
 
   test_oneImportUsesAs() async {
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 library lib1;
 class A {}''');
 
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 library L;
 import 'lib1.dart';
 import 'lib1.dart' as one;
 A a;
 one.A a2;''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart');
   }
 
   test_twoDuplicateImports() async {
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 library lib1;
 class A {}''');
 
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 library L;
 import 'lib1.dart';
 import 'lib1.dart';
 import 'lib1.dart';
 A a;''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.DUPLICATE_IMPORT, 38, 11),
       error(HintCode.DUPLICATE_IMPORT, 58, 11),
     ]);
diff --git a/pkg/analyzer/test/src/diagnostics/duplicate_named_argument_test.dart b/pkg/analyzer/test/src/diagnostics/duplicate_named_argument_test.dart
index 6bde893..3fceecb 100644
--- a/pkg/analyzer/test/src/diagnostics/duplicate_named_argument_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/duplicate_named_argument_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class DuplicateNamedArgumentTest extends DriverResolutionTest {
+class DuplicateNamedArgumentTest extends PubPackageResolutionTest {
   test_duplicate_named_argument() async {
     await assertErrorsInCode(r'''
 f({a, b}) {}
diff --git a/pkg/analyzer/test/src/diagnostics/duplicate_part_test.dart b/pkg/analyzer/test/src/diagnostics/duplicate_part_test.dart
index bd96a49..64ed945 100644
--- a/pkg/analyzer/test/src/diagnostics/duplicate_part_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/duplicate_part_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,12 @@
 }
 
 @reflectiveTest
-class DuplicatePartTest extends DriverResolutionTest {
+class DuplicatePartTest extends PubPackageResolutionTest {
   test_no_duplicates() async {
-    newFile('/test/lib/part1.dart', content: '''
+    newFile('$testPackageLibPath/part1.dart', content: '''
 part of lib;
 ''');
-    newFile('/test/lib/part2.dart', content: '''
+    newFile('$testPackageLibPath/part2.dart', content: '''
 part of lib;
 ''');
     await assertNoErrorsInCode(r'''
@@ -30,7 +30,7 @@
   }
 
   test_sameSource() async {
-    newFile('/test/lib/part.dart', content: 'part of lib;');
+    newFile('$testPackageLibPath/part.dart', content: 'part of lib;');
     await assertErrorsInCode(r'''
 library lib;
 part 'part.dart';
@@ -41,7 +41,7 @@
   }
 
   test_sameUri() async {
-    newFile('/test/lib/part.dart', content: 'part of lib;');
+    newFile('$testPackageLibPath/part.dart', content: 'part of lib;');
     await assertErrorsInCode(r'''
 library lib;
 part 'part.dart';
diff --git a/pkg/analyzer/test/src/diagnostics/duplicate_shown_name_test.dart b/pkg/analyzer/test/src/diagnostics/duplicate_shown_name_test.dart
index b921499..e1e0cde 100644
--- a/pkg/analyzer/test/src/diagnostics/duplicate_shown_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/duplicate_shown_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class DuplicateShownNameTest extends DriverResolutionTest {
+class DuplicateShownNameTest extends PubPackageResolutionTest {
   test_hidden() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 class B {}
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/enum_constant_same_name_as_enclosing.dart b/pkg/analyzer/test/src/diagnostics/enum_constant_same_name_as_enclosing.dart
index e0b57f8..1e17a30 100644
--- a/pkg/analyzer/test/src/diagnostics/enum_constant_same_name_as_enclosing.dart
+++ b/pkg/analyzer/test/src/diagnostics/enum_constant_same_name_as_enclosing.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class EnumConstantSameNameAsEnclosingTest extends DriverResolutionTest {
+class EnumConstantSameNameAsEnclosingTest extends PubPackageResolutionTest {
   test_name() async {
     await assertErrorsInCode(r'''
 enum E {
diff --git a/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart b/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart
index 69b5728..8b43155 100644
--- a/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,15 +18,13 @@
 }
 
 @reflectiveTest
-class EqualElementsInConstSetTest extends DriverResolutionTest {
+class EqualElementsInConstSetTest extends PubPackageResolutionTest {
   test_const_entry() async {
     await assertErrorsInCode('''
 var c = const {1, 2, 1};
 ''', [
       error(CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET, 21, 1,
-          contextMessages: [
-            message(resourceProvider.convertPath('/test/lib/test.dart'), 15, 1)
-          ]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 15, 1)]),
     ]);
   }
 
@@ -39,10 +37,7 @@
             ? [
                 error(CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET, 36, 1,
                     contextMessages: [
-                      message(
-                          resourceProvider.convertPath('/test/lib/test.dart'),
-                          15,
-                          1)
+                      message('$testPackageLibPath/test.dart', 15, 1)
                     ]),
               ]
             : [
@@ -107,10 +102,7 @@
             ? [
                 error(CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET, 29, 1,
                     contextMessages: [
-                      message(
-                          resourceProvider.convertPath('/test/lib/test.dart'),
-                          15,
-                          1)
+                      message('$testPackageLibPath/test.dart', 15, 1)
                     ]),
               ]
             : [
@@ -127,9 +119,7 @@
 var c = const {const A<int>(), const A<int>()};
 ''', [
       error(CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET, 60, 14,
-          contextMessages: [
-            message(resourceProvider.convertPath('/test/lib/test.dart'), 44, 14)
-          ]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 44, 14)]),
     ]);
   }
 
@@ -165,10 +155,7 @@
             ? [
                 error(CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET, 21, 3,
                     contextMessages: [
-                      message(
-                          resourceProvider.convertPath('/test/lib/test.dart'),
-                          15,
-                          1)
+                      message('$testPackageLibPath/test.dart', 15, 1)
                     ]),
               ]
             : [
diff --git a/pkg/analyzer/test/src/diagnostics/equal_elements_in_set_test.dart b/pkg/analyzer/test/src/diagnostics/equal_elements_in_set_test.dart
index 261e8bf..cf24d77 100644
--- a/pkg/analyzer/test/src/diagnostics/equal_elements_in_set_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/equal_elements_in_set_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class EqualElementsInSetTest extends DriverResolutionTest {
+class EqualElementsInSetTest extends PubPackageResolutionTest {
   test_constant_constant() async {
     await assertErrorsInCode('''
 const a = 1;
diff --git a/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart b/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart
index 7334278..a9fde6b 100644
--- a/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,13 +18,13 @@
 }
 
 @reflectiveTest
-class EqualKeysInConstMapTest extends DriverResolutionTest {
+class EqualKeysInConstMapTest extends PubPackageResolutionTest {
   test_const_entry() async {
     await assertErrorsInCode('''
 var c = const {1: null, 2: null, 1: null};
 ''', [
       error(CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP, 33, 1,
-          contextMessages: [message('/test/lib/test.dart', 15, 1)]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 15, 1)]),
     ]);
   }
 
@@ -36,7 +36,9 @@
         analysisOptions.experimentStatus.constant_update_2018
             ? [
                 error(CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP, 48, 1,
-                    contextMessages: [message('/test/lib/test.dart', 15, 1)]),
+                    contextMessages: [
+                      message('$testPackageLibPath/test.dart', 15, 1)
+                    ]),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 24, 31),
@@ -99,7 +101,9 @@
         analysisOptions.experimentStatus.constant_update_2018
             ? [
                 error(CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP, 35, 1,
-                    contextMessages: [message('/test/lib/test.dart', 15, 1)]),
+                    contextMessages: [
+                      message('$testPackageLibPath/test.dart', 15, 1)
+                    ]),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 24, 18),
@@ -115,7 +119,7 @@
 var c = const {const A<int>(): null, const A<int>(): null};
 ''', [
       error(CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP, 66, 14,
-          contextMessages: [message('/test/lib/test.dart', 44, 14)]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 44, 14)]),
     ]);
   }
 
@@ -150,7 +154,9 @@
         analysisOptions.experimentStatus.constant_update_2018
             ? [
                 error(CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP, 27, 9,
-                    contextMessages: [message('/test/lib/test.dart', 15, 1)]),
+                    contextMessages: [
+                      message('$testPackageLibPath/test.dart', 15, 1)
+                    ]),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 24, 12),
diff --git a/pkg/analyzer/test/src/diagnostics/equal_keys_in_map_test.dart b/pkg/analyzer/test/src/diagnostics/equal_keys_in_map_test.dart
index a546d1b..1763922 100644
--- a/pkg/analyzer/test/src/diagnostics/equal_keys_in_map_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/equal_keys_in_map_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class EqualKeysInMapTest extends DriverResolutionTest {
+class EqualKeysInMapTest extends PubPackageResolutionTest {
   test_constant_constant() async {
     await assertErrorsInCode('''
 const a = 1;
diff --git a/pkg/analyzer/test/src/diagnostics/expected_one_list_type_arguments_test.dart b/pkg/analyzer/test/src/diagnostics/expected_one_list_type_arguments_test.dart
index c5b3597..5a0f4a6 100644
--- a/pkg/analyzer/test/src/diagnostics/expected_one_list_type_arguments_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/expected_one_list_type_arguments_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExpectedOneListTypeArgumentsTest extends DriverResolutionTest {
+class ExpectedOneListTypeArgumentsTest extends PubPackageResolutionTest {
   test_one_type_argument() async {
     await assertNoErrorsInCode(r'''
 main() {
@@ -28,7 +28,7 @@
 main() {
   <int, int>[];
 }''', [
-      error(StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, 11, 10),
+      error(CompileTimeErrorCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, 11, 10),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/expected_one_set_type_arguments_test.dart b/pkg/analyzer/test/src/diagnostics/expected_one_set_type_arguments_test.dart
index 890ca88..30f9072 100644
--- a/pkg/analyzer/test/src/diagnostics/expected_one_set_type_arguments_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/expected_one_set_type_arguments_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,13 +14,13 @@
 }
 
 @reflectiveTest
-class ExpectedOneSetTypeArgumentsTest extends DriverResolutionTest {
+class ExpectedOneSetTypeArgumentsTest extends PubPackageResolutionTest {
   test_multiple_type_arguments() async {
     await assertErrorsInCode(r'''
 main() {
   <int, int, int>{2, 3};
 }''', [
-      error(StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS, 11, 15),
+      error(CompileTimeErrorCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS, 11, 15),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/expected_two_map_type_arguments_test.dart b/pkg/analyzer/test/src/diagnostics/expected_two_map_type_arguments_test.dart
index a8b297f..e340953 100644
--- a/pkg/analyzer/test/src/diagnostics/expected_two_map_type_arguments_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/expected_two_map_type_arguments_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExpectedTwoMapTypeArgumentsTest extends DriverResolutionTest {
+class ExpectedTwoMapTypeArgumentsTest extends PubPackageResolutionTest {
   test_three_type_arguments_ambiguous() async {
     // TODO(brianwilkerson) We probably need a new error code for "expected
     //  either one or two type arguments" to handle the ambiguous case.
@@ -22,7 +22,7 @@
 main() {
   <int, int, int>{};
 }''', [
-      error(StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, 11, 15),
+      error(CompileTimeErrorCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, 11, 15),
     ]);
   }
 
@@ -31,7 +31,7 @@
 main() {
   <int, int, int>{1: 2};
 }''', [
-      error(StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, 11, 15),
+      error(CompileTimeErrorCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, 11, 15),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/export_duplicated_library_named_test.dart b/pkg/analyzer/test/src/diagnostics/export_duplicated_library_named_test.dart
deleted file mode 100644
index b76689c..0000000
--- a/pkg/analyzer/test/src/diagnostics/export_duplicated_library_named_test.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/error/codes.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../dart/resolution/driver_resolution.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(ExportDuplicatedLibraryNamedTest);
-  });
-}
-
-@reflectiveTest
-class ExportDuplicatedLibraryNamedTest extends DriverResolutionTest {
-  test_no_duplication() async {
-    newFile("/test/lib/lib1.dart");
-    newFile("/test/lib/lib2.dart");
-    await assertNoErrorsInCode(r'''
-library test;
-export 'lib1.dart';
-export 'lib2.dart';
-''');
-  }
-
-  test_sameNames() async {
-    newFile("/test/lib/lib1.dart", content: "library lib;");
-    newFile("/test/lib/lib2.dart", content: "library lib;");
-    await assertErrorsInCode('''
-export 'lib1.dart';
-export 'lib2.dart';
-''', [
-      error(StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED, 20, 19),
-    ]);
-  }
-}
diff --git a/pkg/analyzer/test/src/diagnostics/export_internal_library_test.dart b/pkg/analyzer/test/src/diagnostics/export_internal_library_test.dart
index 6d5e461..e4a7206 100644
--- a/pkg/analyzer/test/src/diagnostics/export_internal_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/export_internal_library_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,12 @@
 }
 
 @reflectiveTest
-class ExportInternalLibraryTest extends DriverResolutionTest {
+class ExportInternalLibraryTest extends PubPackageResolutionTest {
   test_export_internal_library() async {
     await assertErrorsInCode('''
-export 'dart:_interceptors';
+export 'dart:_internal';
 ''', [
-      error(CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY, 0, 28),
+      error(CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY, 0, 24),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/export_legacy_symbol_test.dart b/pkg/analyzer/test/src/diagnostics/export_legacy_symbol_test.dart
index 364015d..2d1fa89 100644
--- a/pkg/analyzer/test/src/diagnostics/export_legacy_symbol_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/export_legacy_symbol_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,15 +14,8 @@
 }
 
 @reflectiveTest
-class ExportLegacySymbolTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class ExportLegacySymbolTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_exportDartAsync() async {
     await assertNoErrorsInCode(r'''
 export 'dart:async';
@@ -38,7 +29,7 @@
   }
 
   test_exportOptedIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
     await assertNoErrorsInCode(r'''
@@ -47,11 +38,11 @@
   }
 
   test_exportOptedOut_exportOptedIn_hasLegacySymbol() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart = 2.5
 export 'a.dart';
 class B {}
@@ -65,11 +56,11 @@
   }
 
   test_exportOptedOut_exportOptedIn_hideLegacySymbol() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart = 2.5
 export 'a.dart';
 class B {}
@@ -81,7 +72,7 @@
   }
 
   test_exportOptedOut_hasLegacySymbol() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 class A {}
 class B {}
diff --git a/pkg/analyzer/test/src/diagnostics/export_of_non_library_test.dart b/pkg/analyzer/test/src/diagnostics/export_of_non_library_test.dart
index 3080209..4c4ef49 100644
--- a/pkg/analyzer/test/src/diagnostics/export_of_non_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/export_of_non_library_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class ExportOfNonLibraryTest extends DriverResolutionTest {
+class ExportOfNonLibraryTest extends PubPackageResolutionTest {
   test_export_of_non_library() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 part of lib;
 ''');
     await assertErrorsInCode(r'''
@@ -28,7 +28,7 @@
   }
 
   test_libraryDeclared() async {
-    newFile("/test/lib/lib1.dart", content: "library lib1;");
+    newFile('$testPackageLibPath/lib1.dart', content: "library lib1;");
     await assertNoErrorsInCode(r'''
 library L;
 export 'lib1.dart';
@@ -36,7 +36,7 @@
   }
 
   test_libraryNotDeclared() async {
-    newFile("/test/lib/lib1.dart");
+    newFile('$testPackageLibPath/lib1.dart');
     await assertNoErrorsInCode(r'''
 library L;
 export 'lib1.dart';
diff --git a/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart b/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart
index 0763073..56816da 100644
--- a/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExpressionInMapTest extends DriverResolutionTest {
+class ExpressionInMapTest extends PubPackageResolutionTest {
   test_map() async {
     await assertErrorsInCode('''
 var m = <String, int>{'a', 'b' : 2};
diff --git a/pkg/analyzer/test/src/diagnostics/extends_deferred_class_test.dart b/pkg/analyzer/test/src/diagnostics/extends_deferred_class_test.dart
index c448fae..11c16ab 100644
--- a/pkg/analyzer/test/src/diagnostics/extends_deferred_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extends_deferred_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class ExtendsDeferredClassTest extends DriverResolutionTest {
+class ExtendsDeferredClassTest extends PubPackageResolutionTest {
   test_classTypeAlias() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}
 ''');
@@ -31,7 +31,7 @@
   }
 
   test_extends_deferred_class() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}
 ''');
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 8f7c596..7102a8a 100644
--- a/pkg/analyzer/test/src/diagnostics/extends_disallowed_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extends_disallowed_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExtendsDisallowedClassTest extends DriverResolutionTest {
+class ExtendsDisallowedClassTest extends PubPackageResolutionTest {
   test_class_bool() async {
     await assertErrorsInCode('''
 class A extends bool {}
diff --git a/pkg/analyzer/test/src/diagnostics/extends_non_class_test.dart b/pkg/analyzer/test/src/diagnostics/extends_non_class_test.dart
index 784bb3e..2658ff5 100644
--- a/pkg/analyzer/test/src/diagnostics/extends_non_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extends_non_class_test.dart
@@ -2,30 +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.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
-//    defineReflectiveTests(ExtendsNonClassTest);
-    defineReflectiveTests(ExtendsNonClassWithNnbdTest);
+    defineReflectiveTests(ExtendsNonClassTest);
+    defineReflectiveTests(ExtendsNonClassWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ExtendsNonClassTest extends DriverResolutionTest {}
+class ExtendsNonClassTest extends PubPackageResolutionTest {}
 
 @reflectiveTest
-class ExtendsNonClassWithNnbdTest extends ExtendsNonClassTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class ExtendsNonClassWithNullSafetyTest extends ExtendsNonClassTest
+    with WithNullSafetyMixin {
   test_Never() async {
     await assertErrorsInCode('''
 class A extends Never {}
diff --git a/pkg/analyzer/test/src/diagnostics/extension_as_expression_test.dart b/pkg/analyzer/test/src/diagnostics/extension_as_expression_test.dart
index 17c8776..61d3e2c 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_as_expression_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_as_expression_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class ExtensionAsExpressionTest extends DriverResolutionTest {
+class ExtensionAsExpressionTest extends PubPackageResolutionTest {
   test_prefixedIdentifier() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 extension E on int {}
 ''');
     await assertErrorsInCode('''
diff --git a/pkg/analyzer/test/src/diagnostics/extension_conflicting_static_and_instance_test.dart b/pkg/analyzer/test/src/diagnostics/extension_conflicting_static_and_instance_test.dart
index 12ad23a..d2581f7 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_conflicting_static_and_instance_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_conflicting_static_and_instance_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,8 @@
 }
 
 @reflectiveTest
-class ExtensionConflictingStaticAndInstanceTest extends DriverResolutionTest {
+class ExtensionConflictingStaticAndInstanceTest
+    extends PubPackageResolutionTest {
   CompileTimeErrorCode get _errorCode =>
       CompileTimeErrorCode.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE;
 
diff --git a/pkg/analyzer/test/src/diagnostics/extension_declares_abstract_method_test.dart b/pkg/analyzer/test/src/diagnostics/extension_declares_abstract_method_test.dart
index b85a6d2..831f4b1 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_declares_abstract_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_declares_abstract_method_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExtensionDeclaresAbstractMethodTest extends DriverResolutionTest {
+class ExtensionDeclaresAbstractMethodTest extends PubPackageResolutionTest {
   test_getter() async {
     await assertErrorsInCode('''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/extension_declares_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/extension_declares_constructor_test.dart
index ac6219d..043d580 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_declares_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_declares_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExtensionDeclaresConstructorTest extends DriverResolutionTest {
+class ExtensionDeclaresConstructorTest extends PubPackageResolutionTest {
   test_named() async {
     await assertErrorsInCode('''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/extension_declares_field_test.dart b/pkg/analyzer/test/src/diagnostics/extension_declares_field_test.dart
index 967a0ce..ec4b005 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_declares_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_declares_field_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExtensionDeclaresFieldTest extends DriverResolutionTest {
+class ExtensionDeclaresFieldTest extends PubPackageResolutionTest {
   test_multiple() async {
     await assertErrorsInCode('''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/extension_declares_member_of_object_test.dart b/pkg/analyzer/test/src/diagnostics/extension_declares_member_of_object_test.dart
index c959a54..76cd656 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_declares_member_of_object_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_declares_member_of_object_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExtensionDeclaresMemberOfObjectTest extends DriverResolutionTest {
+class ExtensionDeclaresMemberOfObjectTest extends PubPackageResolutionTest {
   test_instance_differentKind() async {
     await assertErrorsInCode('''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/extension_override_access_to_static_member_test.dart b/pkg/analyzer/test/src/diagnostics/extension_override_access_to_static_member_test.dart
index 735a092..9b46e54 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_override_access_to_static_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_override_access_to_static_member_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,8 @@
 }
 
 @reflectiveTest
-class ExtensionOverrideAccessToStaticMemberTest extends DriverResolutionTest {
+class ExtensionOverrideAccessToStaticMemberTest
+    extends PubPackageResolutionTest {
   test_call() async {
     await assertErrorsInCode('''
 extension E on int {
diff --git a/pkg/analyzer/test/src/diagnostics/extension_override_argument_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/extension_override_argument_not_assignable_test.dart
index c8f44a9..6ee8f7b 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_override_argument_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_override_argument_not_assignable_test.dart
@@ -2,22 +2,22 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ExtensionOverrideArgumentNotAssignableTest);
-    defineReflectiveTests(ExtensionOverrideArgumentNotAssignableWithNNBDTest);
+    defineReflectiveTests(
+        ExtensionOverrideArgumentNotAssignableWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ExtensionOverrideArgumentNotAssignableTest extends DriverResolutionTest {
+class ExtensionOverrideArgumentNotAssignableTest
+    extends PubPackageResolutionTest {
   test_subtype() async {
     await assertNoErrorsInCode('''
 class A {}
@@ -63,13 +63,8 @@
 }
 
 @reflectiveTest
-class ExtensionOverrideArgumentNotAssignableWithNNBDTest
-    extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
+class ExtensionOverrideArgumentNotAssignableWithNullSafetyTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_override_onNonNullable() async {
     await assertErrorsInCode(r'''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/extension_override_with_cascade_test.dart b/pkg/analyzer/test/src/diagnostics/extension_override_with_cascade_test.dart
index dfa1c58..31888e1 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_override_with_cascade_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_override_with_cascade_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExtensionOverrideWithCascadeTest extends DriverResolutionTest {
+class ExtensionOverrideWithCascadeTest extends PubPackageResolutionTest {
   test_getter() async {
     await assertErrorsInCode('''
 extension E on int {
diff --git a/pkg/analyzer/test/src/diagnostics/extension_override_without_access_test.dart b/pkg/analyzer/test/src/diagnostics/extension_override_without_access_test.dart
index 21a9c6d..a0edc8f 100644
--- a/pkg/analyzer/test/src/diagnostics/extension_override_without_access_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extension_override_without_access_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExtensionOverrideWithoutAccessTest extends DriverResolutionTest {
+class ExtensionOverrideWithoutAccessTest extends PubPackageResolutionTest {
   test_binaryExpression() async {
     await assertNoErrorsInCode('''
 class C {}
diff --git a/pkg/analyzer/test/src/diagnostics/extra_annotation_on_struct_field_test.dart b/pkg/analyzer/test/src/diagnostics/extra_annotation_on_struct_field_test.dart
index 4110fd5..11f9c6c 100644
--- a/pkg/analyzer/test/src/diagnostics/extra_annotation_on_struct_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extra_annotation_on_struct_field_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ExtraAnnotationOnStructFieldTest extends DriverResolutionTest {
+class ExtraAnnotationOnStructFieldTest extends PubPackageResolutionTest {
   test_one() async {
     await assertNoErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/extra_positional_arguments_test.dart b/pkg/analyzer/test/src/diagnostics/extra_positional_arguments_test.dart
index 1a18b4a..8bb30fb 100644
--- a/pkg/analyzer/test/src/diagnostics/extra_positional_arguments_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extra_positional_arguments_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,36 @@
 }
 
 @reflectiveTest
-class ExtraPositionalArgumentsCouldBeNamedTest extends DriverResolutionTest {
+class ExtraPositionalArgumentsCouldBeNamedTest
+    extends PubPackageResolutionTest {
+  test_constConstructor() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A({int x});
+}
+main() {
+  const A(0);
+}
+''', [
+      error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED, 50,
+          3),
+    ]);
+  }
+
+  test_constConstructor_super() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A({int x});
+}
+class B extends A {
+  const B() : super(0);
+}
+''', [
+      error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED, 71,
+          3),
+    ]);
+  }
+
   test_functionExpressionInvocation() async {
     await assertErrorsInCode('''
 main() {
@@ -41,7 +70,33 @@
 }
 
 @reflectiveTest
-class ExtraPositionalArgumentsTest extends DriverResolutionTest {
+class ExtraPositionalArgumentsTest extends PubPackageResolutionTest {
+  test_constConstructor() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A();
+}
+main() {
+  const A(0);
+}
+''', [
+      error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS, 43, 3),
+    ]);
+  }
+
+  test_constConstructor_super() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A();
+}
+class B extends A {
+  const B() : super(0);
+}
+''', [
+      error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS, 64, 3),
+    ]);
+  }
+
   test_functionExpressionInvocation() async {
     await assertErrorsInCode('''
 main() {
diff --git a/pkg/analyzer/test/src/diagnostics/field_in_struct_with_initializer_test.dart b/pkg/analyzer/test/src/diagnostics/field_in_struct_with_initializer_test.dart
index 0268520..da75f22 100644
--- a/pkg/analyzer/test/src/diagnostics/field_in_struct_with_initializer_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_in_struct_with_initializer_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class FieldInStructWithInitializerTest extends DriverResolutionTest {
+class FieldInStructWithInitializerTest extends PubPackageResolutionTest {
   test_instance_withInitializer() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/field_initialized_by_multiple_initializers_test.dart b/pkg/analyzer/test/src/diagnostics/field_initialized_by_multiple_initializers_test.dart
index cc38433..6744663 100644
--- a/pkg/analyzer/test/src/diagnostics/field_initialized_by_multiple_initializers_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_initialized_by_multiple_initializers_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,8 @@
 }
 
 @reflectiveTest
-class FinalInitializedByMultipleInitializersTest extends DriverResolutionTest {
+class FinalInitializedByMultipleInitializersTest
+    extends PubPackageResolutionTest {
   static const _errorCode =
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS;
 
diff --git a/pkg/analyzer/test/src/diagnostics/field_initialized_in_initializer_and_declaration_test.dart b/pkg/analyzer/test/src/diagnostics/field_initialized_in_initializer_and_declaration_test.dart
index 46395a1..63a379d 100644
--- a/pkg/analyzer/test/src/diagnostics/field_initialized_in_initializer_and_declaration_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_initialized_in_initializer_and_declaration_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class FieldInitializedInInitializerAndDeclarationTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_both() async {
     await assertErrorsInCode('''
 class A {
@@ -23,8 +23,10 @@
   A() : x = 1;
 }
 ''', [
-      error(StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
-          37, 1),
+      error(
+          CompileTimeErrorCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
+          37,
+          1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/field_initialized_in_parameter_and_initializer_test.dart b/pkg/analyzer/test/src/diagnostics/field_initialized_in_parameter_and_initializer_test.dart
index b2c651c..1de0aff 100644
--- a/pkg/analyzer/test/src/diagnostics/field_initialized_in_parameter_and_initializer_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_initialized_in_parameter_and_initializer_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class FinalInitializedInParameterAndInitializerTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_initializingFormal_initializer() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/field_initializer_factory_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/field_initializer_factory_constructor_test.dart
index 6368edb..1bbd96b 100644
--- a/pkg/analyzer/test/src/diagnostics/field_initializer_factory_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_initializer_factory_constructor_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class FieldInitializerFactoryConstructorTest extends DriverResolutionTest {
+class FieldInitializerFactoryConstructorTest extends PubPackageResolutionTest {
   test_fieldFormalParameter() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/field_initializer_in_struct_test.dart b/pkg/analyzer/test/src/diagnostics/field_initializer_in_struct_test.dart
index d0a3c36..f1e7575 100644
--- a/pkg/analyzer/test/src/diagnostics/field_initializer_in_struct_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_initializer_in_struct_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class FieldInitializerInStructTest extends DriverResolutionTest {
+class FieldInitializerInStructTest extends PubPackageResolutionTest {
   test_fieldInitializer() async {
     await assertErrorsInCode('''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/field_initializer_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/field_initializer_not_assignable_test.dart
index 55e94cb..2667077 100644
--- a/pkg/analyzer/test/src/diagnostics/field_initializer_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_initializer_not_assignable_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class FieldInitializerNotAssignableTest extends DriverResolutionTest {
+class FieldInitializerNotAssignableTest extends PubPackageResolutionTest {
   test_unrelated() async {
     await assertErrorsInCode('''
 class A {
@@ -22,7 +22,7 @@
   A() : x = '';
 }
 ''', [
-      error(StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE, 31, 2),
+      error(CompileTimeErrorCode.FIELD_INITIALIZER_NOT_ASSIGNABLE, 31, 2),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/field_initializer_outside_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/field_initializer_outside_constructor_test.dart
index 8c5a955..6e2ce5f 100644
--- a/pkg/analyzer/test/src/diagnostics/field_initializer_outside_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_initializer_outside_constructor_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class FieldInitializerOutsideConstructorTest extends DriverResolutionTest {
+class FieldInitializerOutsideConstructorTest extends PubPackageResolutionTest {
   test_closure() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/field_initializer_redirecting_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/field_initializer_redirecting_constructor_test.dart
index 9a11dde..1bd985e 100644
--- a/pkg/analyzer/test/src/diagnostics/field_initializer_redirecting_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_initializer_redirecting_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,8 @@
 }
 
 @reflectiveTest
-class FieldInitializerRedirectingConstructorTest extends DriverResolutionTest {
+class FieldInitializerRedirectingConstructorTest
+    extends PubPackageResolutionTest {
   test_afterRedirection() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/field_initializing_formal_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/field_initializing_formal_not_assignable_test.dart
index 65b451e..f3ff4aa 100644
--- a/pkg/analyzer/test/src/diagnostics/field_initializing_formal_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/field_initializing_formal_not_assignable_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,20 @@
 }
 
 @reflectiveTest
-class FieldInitializingFormalNotAssignableTest extends DriverResolutionTest {
+class FieldInitializingFormalNotAssignableTest
+    extends PubPackageResolutionTest {
+  test_dynamic() async {
+    await assertErrorsInCode('''
+class A {
+  int x;
+  A(dynamic this.x) {}
+}
+''', [
+      error(CompileTimeErrorCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, 23,
+          14),
+    ]);
+  }
+
   test_unrelated() async {
     await assertErrorsInCode('''
 class A {
@@ -22,8 +35,8 @@
   A(String this.x) {}
 }
 ''', [
-      error(StrongModeCode.INVALID_PARAMETER_DECLARATION, 23, 13),
-      error(StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, 23, 13),
+      error(CompileTimeErrorCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, 23,
+          13),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/final_initialized_in_delcaration_and_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/final_initialized_in_delcaration_and_constructor_test.dart
index 0779878..0817c4e 100644
--- a/pkg/analyzer/test/src/diagnostics/final_initialized_in_delcaration_and_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/final_initialized_in_delcaration_and_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class FinalInitializedInDeclarationAndConstructorTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_initializingFormal() async {
     await assertErrorsInCode('''
 class A {
@@ -23,8 +23,10 @@
   A(this.x) {}
 }
 ''', [
-      error(StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
-          34, 1),
+      error(
+          CompileTimeErrorCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
+          34,
+          1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/final_initialized_multiple_times_test.dart b/pkg/analyzer/test/src/diagnostics/final_initialized_multiple_times_test.dart
index 83c5bb9..d860ffe 100644
--- a/pkg/analyzer/test/src/diagnostics/final_initialized_multiple_times_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/final_initialized_multiple_times_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class FinalInitializedMultipleTimesTest extends DriverResolutionTest {
+class FinalInitializedMultipleTimesTest extends PubPackageResolutionTest {
   test_initializingFormals_withDefaultValues() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/final_not_initialized_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/final_not_initialized_constructor_test.dart
index 000bccc..3bd3afc 100644
--- a/pkg/analyzer/test/src/diagnostics/final_not_initialized_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/final_not_initialized_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class FinalNotInitializedConstructorTest extends DriverResolutionTest {
+class FinalNotInitializedConstructorTest extends PubPackageResolutionTest {
   test_1() async {
     await assertErrorsInCode('''
 class A {
@@ -22,7 +22,7 @@
   A() {}
 }
 ''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1, 27, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1, 27, 1),
     ]);
   }
 
@@ -34,7 +34,7 @@
   A() {}
 }
 ''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2, 42, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2, 42, 1),
     ]);
   }
 
@@ -47,7 +47,8 @@
   A() {}
 }
 ''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS, 57, 1),
+      error(
+          CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS, 57, 1),
     ]);
   }
 
@@ -59,7 +60,7 @@
   A._();
 }
 ''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1, 45, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1, 45, 1),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart b/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart
index fb6002e..8772ebf 100644
--- a/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart
@@ -2,23 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(FinalNotInitializedTest);
-    defineReflectiveTests(FinalNotInitializedWithNnbdTest);
+    defineReflectiveTests(FinalNotInitializedWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class FinalNotInitializedTest extends DriverResolutionTest {
+class FinalNotInitializedTest extends PubPackageResolutionTest {
   test_class_instanceField_final_factoryConstructor_only() async {
     await assertNoErrorsInCode('''
 class A {
@@ -33,7 +31,7 @@
 extension E on String {
   static final F;
 }''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED, 39, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED, 39, 1),
     ]);
   }
 
@@ -42,7 +40,7 @@
 class A {
   final F;
 }''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED, 18, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED, 18, 1),
     ]);
   }
 
@@ -51,7 +49,7 @@
 class A {
   static final F;
 }''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED, 25, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED, 25, 1),
     ]);
   }
 
@@ -59,7 +57,7 @@
     await assertErrorsInCode('''
 final F;
 ''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED, 6, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED, 6, 1),
     ]);
   }
 
@@ -69,7 +67,7 @@
   final int x;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 18, 1),
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED, 18, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED, 18, 1),
     ]);
   }
 
@@ -79,17 +77,30 @@
   final int x;
 }
 ''', [
-      error(StaticWarningCode.FINAL_NOT_INITIALIZED, 22, 1),
+      error(CompileTimeErrorCode.FINAL_NOT_INITIALIZED, 22, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class FinalNotInitializedWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
+class FinalNotInitializedWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
+  test_field_abstract() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract final int x;
+}
+''');
+  }
+
+  test_field_abstract_with_constructor() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract final int x;
+  A();
+}
+''');
+  }
 
   test_field_noConstructor_initializer() async {
     await assertNoErrorsInCode('''
diff --git a/pkg/analyzer/test/src/diagnostics/for_in_of_invalid_element_type_test.dart b/pkg/analyzer/test/src/diagnostics/for_in_of_invalid_element_type_test.dart
index eb1ddf7..916d47f 100644
--- a/pkg/analyzer/test/src/diagnostics/for_in_of_invalid_element_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/for_in_of_invalid_element_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ForInOfInvalidElementTypeTest extends DriverResolutionTest {
+class ForInOfInvalidElementTypeTest extends PubPackageResolutionTest {
   test_await_declaredVariableWrongType() async {
     await assertErrorsInCode('''
 import 'dart:async';
@@ -24,7 +24,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 75, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 80, 6),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 80, 6),
     ]);
   }
 
@@ -38,7 +38,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 64, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 85, 6),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 85, 6),
     ]);
   }
 
@@ -51,7 +51,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 81, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 86, 8),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 86, 8),
     ]);
   }
 
@@ -62,7 +62,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 17, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 22, 10),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 22, 10),
     ]);
   }
 
@@ -74,7 +74,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 12, 1),
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 27, 10),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, 27, 10),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/for_in_of_invalid_type_test.dart b/pkg/analyzer/test/src/diagnostics/for_in_of_invalid_type_test.dart
index 7fe09d4..89baab4 100644
--- a/pkg/analyzer/test/src/diagnostics/for_in_of_invalid_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/for_in_of_invalid_type_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ForInOfInvalidTypeTest);
-    defineReflectiveTests(ForInOfInvalidTypeWithNnbdTest);
+    defineReflectiveTests(ForInOfInvalidTypeWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ForInOfInvalidTypeTest extends DriverResolutionTest {
+class ForInOfInvalidTypeTest extends PubPackageResolutionTest {
   test_awaitForIn_dynamic() async {
     await assertNoErrorsInCode('''
 f(dynamic e) async {
@@ -36,7 +34,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE, 41, 1),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_TYPE, 41, 1),
     ]);
   }
 
@@ -58,18 +56,14 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE, 29, 1),
+      error(CompileTimeErrorCode.FOR_IN_OF_INVALID_TYPE, 29, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class ForInOfInvalidTypeWithNnbdTest extends ForInOfInvalidTypeTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class ForInOfInvalidTypeWithNullSafetyTest extends ForInOfInvalidTypeTest
+    with WithNullSafetyMixin {
   test_awaitForIn_never() async {
     await assertErrorsInCode('''
 f(Never e) async {
diff --git a/pkg/analyzer/test/src/diagnostics/for_in_with_const_variable_test.dart b/pkg/analyzer/test/src/diagnostics/for_in_with_const_variable_test.dart
index 2336b98..e2630c9 100644
--- a/pkg/analyzer/test/src/diagnostics/for_in_with_const_variable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/for_in_with_const_variable_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ForInWithConstVariableTest extends DriverResolutionTest {
+class ForInWithConstVariableTest extends PubPackageResolutionTest {
   test_forEach_loopVariable() async {
     await assertErrorsInCode(r'''
 f() {
diff --git a/pkg/analyzer/test/src/diagnostics/generic_function_type_cannot_be_bound_test.dart b/pkg/analyzer/test/src/diagnostics/generic_function_type_cannot_be_bound_test.dart
new file mode 100644
index 0000000..72de5dc
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/generic_function_type_cannot_be_bound_test.dart
@@ -0,0 +1,56 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(GenericFunctionTypeCannotBeBoundTest);
+  });
+}
+
+@reflectiveTest
+class GenericFunctionTypeCannotBeBoundTest extends PubPackageResolutionTest {
+  test_class() async {
+    await assertErrorsInCode(r'''
+class C<T extends S Function<S>(S)> {
+}
+''', [
+      error(CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, 18, 16),
+    ]);
+  }
+
+  test_genericFunction() async {
+    await assertErrorsInCode(r'''
+T Function<T extends S Function<S>(S)>(T) fun;
+''', [
+      error(CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, 21, 16),
+    ]);
+  }
+
+  test_genericFunctionTypedef() async {
+    await assertErrorsInCode(r'''
+typedef foo = T Function<T extends S Function<S>(S)>(T t);
+''', [
+      error(CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, 35, 16),
+    ]);
+  }
+
+  test_parameterOfFunction() async {
+    await assertNoErrorsInCode(r'''
+class C<T extends void Function(S Function<S>(S))> {}
+''');
+  }
+
+  test_typedef() async {
+    await assertErrorsInCode(r'''
+typedef T foo<T extends S Function<S>(S)>(T t);
+''', [
+      error(CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND, 24, 16),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/generic_struct_subclass_test.dart b/pkg/analyzer/test/src/diagnostics/generic_struct_subclass_test.dart
index ace933d..8b4aef4 100644
--- a/pkg/analyzer/test/src/diagnostics/generic_struct_subclass_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/generic_struct_subclass_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class GenericStructSubclassTest extends DriverResolutionTest {
+class GenericStructSubclassTest extends PubPackageResolutionTest {
   test_genericStruct() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/getter_not_assignable_setter_types_test.dart b/pkg/analyzer/test/src/diagnostics/getter_not_assignable_setter_types_test.dart
index 6bb253e..b4996d1 100644
--- a/pkg/analyzer/test/src/diagnostics/getter_not_assignable_setter_types_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/getter_not_assignable_setter_types_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class GetterNotAssignableSetterTypesTest extends DriverResolutionTest {
+class GetterNotAssignableSetterTypesTest extends PubPackageResolutionTest {
   test_class_instance_dynamicGetter() async {
     await assertNoErrorsInCode(r'''
 class C {
@@ -45,12 +45,12 @@
 
 abstract class X implements A, B {}
 ''', [
-      error(StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 84, 1),
+      error(CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 84, 1),
     ]);
   }
 
   test_class_instance_private_getter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int get _foo => 0;
 }
@@ -67,12 +67,12 @@
   }
 
   test_class_instance_private_interfaces() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int get _foo => 0;
 }
 ''');
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 class B {
   set _foo(String _) {}
 }
@@ -86,7 +86,7 @@
   }
 
   test_class_instance_private_interfaces2() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int get _foo => 0;
 }
@@ -103,7 +103,7 @@
   }
 
   test_class_instance_private_setter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   set _foo(String _) {}
 }
@@ -126,7 +126,7 @@
   set foo(String _) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 20, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 20, 3),
     ]);
   }
 
@@ -171,7 +171,7 @@
   set foo(String _) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 59, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 59, 3),
     ]);
   }
 
@@ -185,7 +185,7 @@
   int get foo => 0;
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 66, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 66, 3),
     ]);
   }
 
@@ -196,7 +196,7 @@
   static set foo(String _) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 27, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 27, 3),
     ]);
   }
 
@@ -207,7 +207,7 @@
   set foo(String v) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 34, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 34, 3),
     ]);
   }
 
@@ -218,7 +218,7 @@
   static set foo(String v) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 41, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 41, 3),
     ]);
   }
 
@@ -227,7 +227,7 @@
 int get foo { return 0; }
 set foo(String v) {}
 ''', [
-      error(StaticWarningCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 8, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_ASSIGNABLE_SETTER_TYPES, 8, 3),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/getter_not_subtype_setter_types_test.dart b/pkg/analyzer/test/src/diagnostics/getter_not_subtype_setter_types_test.dart
index 8cbbe24..13631fa 100644
--- a/pkg/analyzer/test/src/diagnostics/getter_not_subtype_setter_types_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/getter_not_subtype_setter_types_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,15 +14,8 @@
 }
 
 @reflectiveTest
-class GetterNotSubtypeSetterTypesTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class GetterNotSubtypeSetterTypesTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_class_instance() async {
     await assertErrorsInCode('''
 class C {
@@ -32,7 +23,7 @@
   set foo(int v) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 20, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 20, 3),
     ]);
   }
 
@@ -43,7 +34,7 @@
   set foo(String v) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 16, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 16, 3),
     ]);
   }
 
@@ -68,12 +59,12 @@
 
 abstract class X implements A, B {}
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 84, 1),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 84, 1),
     ]);
   }
 
   test_class_instance_private_getter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int get _foo => 0;
 }
@@ -90,12 +81,12 @@
   }
 
   test_class_instance_private_interfaces() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int get _foo => 0;
 }
 ''');
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 class B {
   set _foo(String _) {}
 }
@@ -109,7 +100,7 @@
   }
 
   test_class_instance_private_interfaces2() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int get _foo => 0;
 }
@@ -126,7 +117,7 @@
   }
 
   test_class_instance_private_setter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   set _foo(String _) {}
 }
@@ -149,7 +140,7 @@
   set foo(String _) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 20, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 20, 3),
     ]);
   }
 
@@ -194,7 +185,7 @@
   set foo(String _) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 59, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 59, 3),
     ]);
   }
 
@@ -208,7 +199,7 @@
   int get foo => 0;
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 66, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 66, 3),
     ]);
   }
 
@@ -219,7 +210,7 @@
   static set foo(int v) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 27, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 27, 3),
     ]);
   }
 
@@ -230,7 +221,7 @@
   set foo(String v) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 34, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 34, 3),
     ]);
   }
 
@@ -241,7 +232,7 @@
   static set foo(String v) {}
 }
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 41, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 41, 3),
     ]);
   }
 
@@ -250,7 +241,7 @@
 int get foo => 0;
 set foo(String v) {}
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 8, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 8, 3),
     ]);
   }
 
@@ -259,7 +250,7 @@
 get foo => 0;
 set foo(int v) {}
 ''', [
-      error(StaticWarningCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 4, 3),
+      error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 4, 3),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/if_element_condition_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/if_element_condition_from_deferred_library_test.dart
index b3c03b9..710a5cf 100644
--- a/pkg/analyzer/test/src/diagnostics/if_element_condition_from_deferred_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/if_element_condition_from_deferred_library_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,9 +19,10 @@
 }
 
 @reflectiveTest
-class IfElementConditionFromDeferredLibraryTest extends DriverResolutionTest {
+class IfElementConditionFromDeferredLibraryTest
+    extends PubPackageResolutionTest {
   test_inList_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const bool c = true;''');
     await assertErrorsInCode(
         r'''
@@ -43,7 +44,7 @@
   }
 
   test_inList_nonConst() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const bool c = true;''');
     await assertNoErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -53,7 +54,7 @@
   }
 
   test_inList_notDeferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const bool c = true;''');
     await assertErrorsInCode(
         r'''
@@ -69,7 +70,7 @@
   }
 
   test_inMap_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const bool c = true;''');
     await assertErrorsInCode(
         r'''
@@ -91,7 +92,7 @@
   }
 
   test_inMap_notConst() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const bool c = true;''');
     await assertNoErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -101,7 +102,7 @@
   }
 
   test_inMap_notDeferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const bool c = true;''');
     await assertErrorsInCode(
         r'''
@@ -117,7 +118,7 @@
   }
 
   test_inSet_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const bool c = true;''');
     await assertErrorsInCode(
         r'''
@@ -139,7 +140,7 @@
   }
 
   test_inSet_notConst() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const bool c = true;''');
     await assertNoErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -149,7 +150,7 @@
   }
 
   test_inSet_notDeferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const bool c = true;''');
     await assertErrorsInCode(
         r'''
diff --git a/pkg/analyzer/test/src/diagnostics/illegal_async_generator_return_type_test.dart b/pkg/analyzer/test/src/diagnostics/illegal_async_generator_return_type_test.dart
new file mode 100644
index 0000000..ac52b34
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/illegal_async_generator_return_type_test.dart
@@ -0,0 +1,81 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(IllegalAsyncGeneratorReturnTypeTest);
+  });
+}
+
+@reflectiveTest
+class IllegalAsyncGeneratorReturnTypeTest extends PubPackageResolutionTest {
+  test_function_nonStream() async {
+    await assertErrorsInCode('''
+int f() async* {}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 0, 3),
+    ]);
+  }
+
+  test_function_stream() async {
+    await assertNoErrorsInCode('''
+Stream<void> f() async* {}
+''');
+  }
+
+  test_function_subtypeOfStream() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+abstract class SubStream<T> implements Stream<T> {}
+SubStream<int> f() async* {}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 73, 14),
+    ]);
+  }
+
+  test_function_void() async {
+    await assertErrorsInCode('''
+void f() async* {}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 0, 4),
+    ]);
+  }
+
+  test_method_nonStream() async {
+    await assertErrorsInCode('''
+class C {
+  int f() async* {}
+}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 12, 3),
+    ]);
+  }
+
+  test_method_subtypeOfStream() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+abstract class SubStream<T> implements Stream<T> {}
+class C {
+  SubStream<int> f() async* {}
+}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 85, 14),
+    ]);
+  }
+
+  test_method_void() async {
+    await assertErrorsInCode('''
+class C {
+  void f() async* {}
+}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 12, 4),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/illegal_async_return_type_test.dart b/pkg/analyzer/test/src/diagnostics/illegal_async_return_type_test.dart
index a6ceffd..3302326 100644
--- a/pkg/analyzer/test/src/diagnostics/illegal_async_return_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/illegal_async_return_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,22 +14,28 @@
 }
 
 @reflectiveTest
-class IllegalAsyncReturnTypeTest extends DriverResolutionTest {
+class IllegalAsyncReturnTypeTest extends PubPackageResolutionTest {
   test_function_nonFuture() async {
     await assertErrorsInCode('''
 int f() async {}
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, 0, 3),
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE, 0, 3),
     ]);
   }
 
+  test_function_nonFuture_void() async {
+    await assertNoErrorsInCode('''
+void f() async {}
+''');
+  }
+
   test_function_nonFuture_withReturn() async {
     await assertErrorsInCode('''
 int f() async {
   return 2;
 }
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, 0, 3),
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE, 0, 3),
     ]);
   }
 
@@ -41,7 +47,7 @@
   return 0;
 }
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, 73, 14),
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE, 73, 14),
     ]);
   }
 
@@ -51,10 +57,18 @@
   int m() async {}
 }
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, 12, 3),
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE, 12, 3),
     ]);
   }
 
+  test_method_nonFuture_void() async {
+    await assertNoErrorsInCode('''
+class C {
+  void m() async {}
+}
+''');
+  }
+
   test_method_subtypeOfFuture() async {
     await assertErrorsInCode('''
 import 'dart:async';
@@ -65,7 +79,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, 85, 14),
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE, 85, 14),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/illegal_sync_generator_return_type_test.dart b/pkg/analyzer/test/src/diagnostics/illegal_sync_generator_return_type_test.dart
new file mode 100644
index 0000000..1656f94
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/illegal_sync_generator_return_type_test.dart
@@ -0,0 +1,79 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(IllegalSyncGeneratorReturnTypeTest);
+  });
+}
+
+@reflectiveTest
+class IllegalSyncGeneratorReturnTypeTest extends PubPackageResolutionTest {
+  test_function_iterator() async {
+    await assertNoErrorsInCode('''
+Iterable<void> f() sync* {}
+''');
+  }
+
+  test_function_nonIterator() async {
+    await assertErrorsInCode('''
+int f() sync* {}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 0, 3),
+    ]);
+  }
+
+  test_function_subclassOfIterator() async {
+    await assertErrorsInCode('''
+abstract class SubIterator<T> implements Iterator<T> {}
+SubIterator<int> f() sync* {}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 56, 16),
+    ]);
+  }
+
+  test_function_void() async {
+    await assertErrorsInCode('''
+void f() sync* {}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 0, 4),
+    ]);
+  }
+
+  test_method_nonIterator() async {
+    await assertErrorsInCode('''
+class C {
+  int f() sync* {}
+}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 12, 3),
+    ]);
+  }
+
+  test_method_subclassOfIterator() async {
+    await assertErrorsInCode('''
+abstract class SubIterator<T> implements Iterator<T> {}
+class C {
+  SubIterator<int> f() sync* {}
+}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 68, 16),
+    ]);
+  }
+
+  test_method_void() async {
+    await assertErrorsInCode('''
+class C {
+  void f() sync* {}
+}
+''', [
+      error(CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 12, 4),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/implements_deferred_class_test.dart b/pkg/analyzer/test/src/diagnostics/implements_deferred_class_test.dart
index 771fd00..aaa6cf5 100644
--- a/pkg/analyzer/test/src/diagnostics/implements_deferred_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/implements_deferred_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class ImplementsDeferredClassTest extends DriverResolutionTest {
+class ImplementsDeferredClassTest extends PubPackageResolutionTest {
   test_implements() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}
 ''');
@@ -30,7 +30,7 @@
   }
 
   test_mixinApplication() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/implements_disallowed_class_test.dart b/pkg/analyzer/test/src/diagnostics/implements_disallowed_class_test.dart
index f106f37..64e25bc 100644
--- a/pkg/analyzer/test/src/diagnostics/implements_disallowed_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/implements_disallowed_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ImplementsDisallowedClassTest extends DriverResolutionTest {
+class ImplementsDisallowedClassTest extends PubPackageResolutionTest {
   test_class_bool() async {
     await assertErrorsInCode('''
 class A implements bool {}
diff --git a/pkg/analyzer/test/src/diagnostics/implements_non_class_test.dart b/pkg/analyzer/test/src/diagnostics/implements_non_class_test.dart
index fb3c2a5..adcb2a3 100644
--- a/pkg/analyzer/test/src/diagnostics/implements_non_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/implements_non_class_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ImplementsNonClassTest);
-    defineReflectiveTests(ImplementsNonClassWithNnbdTest);
+    defineReflectiveTests(ImplementsNonClassWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ImplementsNonClassTest extends DriverResolutionTest {
+class ImplementsNonClassTest extends PubPackageResolutionTest {
   test_class() async {
     await assertErrorsInCode(r'''
 int A = 7;
@@ -57,12 +55,8 @@
 }
 
 @reflectiveTest
-class ImplementsNonClassWithNnbdTest extends ImplementsNonClassTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class ImplementsNonClassWithNullSafetyTest extends ImplementsNonClassTest
+    with WithNullSafetyMixin {
   test_Never() async {
     await assertErrorsInCode('''
 class A implements Never {}
diff --git a/pkg/analyzer/test/src/diagnostics/implements_super_class_test.dart b/pkg/analyzer/test/src/diagnostics/implements_super_class_test.dart
index 6ad751f..c6ba3d3 100644
--- a/pkg/analyzer/test/src/diagnostics/implements_super_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/implements_super_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ImplementsSuperClassTest extends DriverResolutionTest {
+class ImplementsSuperClassTest extends PubPackageResolutionTest {
   test_implements_super_class() async {
     await assertErrorsInCode(r'''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/implicit_this_reference_in_initializer_test.dart b/pkg/analyzer/test/src/diagnostics/implicit_this_reference_in_initializer_test.dart
index aa3745b..3b81868 100644
--- a/pkg/analyzer/test/src/diagnostics/implicit_this_reference_in_initializer_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/implicit_this_reference_in_initializer_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ImplicitThisReferenceInInitializerTest);
-    defineReflectiveTests(ImplicitThisReferenceInInitializerWithNnbdTest);
+    defineReflectiveTests(ImplicitThisReferenceInInitializerWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class ImplicitThisReferenceInInitializerTest extends DriverResolutionTest {
+class ImplicitThisReferenceInInitializerTest extends PubPackageResolutionTest {
   test_class_field_commentReference_prefixedIdentifier() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -249,13 +247,8 @@
 }
 
 @reflectiveTest
-class ImplicitThisReferenceInInitializerWithNnbdTest
-    extends ImplicitThisReferenceInInitializerTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class ImplicitThisReferenceInInitializerWithNullSafetyTest
+    extends ImplicitThisReferenceInInitializerTest with WithNullSafetyMixin {
   test_class_field_late_invokeInstanceMethod() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart b/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart
index 2838d5e..040fe91 100644
--- a/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart
@@ -6,7 +6,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,51 +15,52 @@
 }
 
 @reflectiveTest
-class ImportDeferredLibraryWithLoadFunctionTest extends DriverResolutionTest {
+class ImportDeferredLibraryWithLoadFunctionTest
+    extends PubPackageResolutionTest {
   test_deferredImport_withLoadLibraryFunction() async {
-    newFile('/pkg1/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 library lib1;
 loadLibrary() {}
 f() {}''');
 
-    newFile('/pkg1/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 library root;
 import 'lib1.dart' deferred as lib1;
 main() { lib1.f(); }''');
 
-    await _resolveFile('/pkg1/lib/lib1.dart');
-    await _resolveFile('/pkg1/lib/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION, 14, 36),
     ]);
   }
 
   test_deferredImport_withoutLoadLibraryFunction() async {
-    newFile('/pkg1/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 library lib1;
 f() {}''');
 
-    newFile('/pkg1/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 library root;
 import 'lib1.dart' deferred as lib1;
 main() { lib1.f(); }''');
 
-    await _resolveFile('/pkg1/lib/lib1.dart');
-    await _resolveFile('/pkg1/lib/lib2.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart');
   }
 
   test_nonDeferredImport_withLoadLibraryFunction() async {
-    newFile('/pkg1/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 library lib1;
 loadLibrary() {}
 f() {}''');
 
-    newFile('/pkg1/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 library root;
 import 'lib1.dart' as lib1;
 main() { lib1.f(); }''');
 
-    await _resolveFile('/pkg1/lib/lib1.dart');
-    await _resolveFile('/pkg1/lib/lib2.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart');
   }
 
   /// Resolve the file with the given [path].
diff --git a/pkg/analyzer/test/src/diagnostics/import_duplicated_library_named_test.dart b/pkg/analyzer/test/src/diagnostics/import_duplicated_library_named_test.dart
deleted file mode 100644
index af61f3b..0000000
--- a/pkg/analyzer/test/src/diagnostics/import_duplicated_library_named_test.dart
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/error/codes.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../dart/resolution/driver_resolution.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(ImportDuplicatedLibraryNamedTest);
-  });
-}
-
-@reflectiveTest
-class ImportDuplicatedLibraryNamedTest extends DriverResolutionTest {
-  test_duplicate() async {
-    newFile("/test/lib/lib1.dart", content: '''
-library lib;
-class A {}
-''');
-    newFile("/test/lib/lib2.dart", content: '''
-library lib;
-class B {}
-''');
-    await assertErrorsInCode('''
-import 'lib1.dart';
-import 'lib2.dart';
-class C implements A, B {}
-''', [
-      error(StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED, 20, 19),
-    ]);
-  }
-}
diff --git a/pkg/analyzer/test/src/diagnostics/import_internal_library_test.dart b/pkg/analyzer/test/src/diagnostics/import_internal_library_test.dart
new file mode 100644
index 0000000..3ba652a
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/import_internal_library_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:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ImportInternalLibraryTest);
+  });
+}
+
+@reflectiveTest
+class ImportInternalLibraryTest extends PubPackageResolutionTest {
+  test_internal() async {
+    // Note, in these error cases we may generate an UNUSED_IMPORT hint, while
+    // we could prevent the hint from being generated by testing the import
+    // directive for the error, this is such a minor corner case that we don't
+    // think we should add the additional computation time to figure out such
+    // cases.
+    await assertErrorsInCode('''
+import 'dart:_internal';
+''', [
+      error(CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, 7, 16),
+      error(HintCode.UNUSED_IMPORT, 7, 16),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/import_of_non_library_test.dart b/pkg/analyzer/test/src/diagnostics/import_of_non_library_test.dart
index c5d1d06..55109a1 100644
--- a/pkg/analyzer/test/src/diagnostics/import_of_non_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/import_of_non_library_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class ImportOfNonLibraryTest extends DriverResolutionTest {
-  test_part() async {
-    newFile("/test/lib/lib1.dart", content: '''
+class ImportOfNonLibraryTest extends PubPackageResolutionTest {
+  test_deferred() async {
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 part of lib;
 class A {}
 ''');
@@ -28,4 +28,18 @@
       error(CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY, 20, 11),
     ]);
   }
+
+  test_part() async {
+    newFile('$testPackageLibPath/part.dart', content: r'''
+part of lib;
+class A{}
+''');
+    await assertErrorsInCode(r'''
+library lib;
+import 'part.dart';
+A a;
+''', [
+      error(CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY, 20, 11),
+    ]);
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/inconsistent_case_expression_types_test.dart b/pkg/analyzer/test/src/diagnostics/inconsistent_case_expression_types_test.dart
index 9dee843..775c57b 100644
--- a/pkg/analyzer/test/src/diagnostics/inconsistent_case_expression_types_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/inconsistent_case_expression_types_test.dart
@@ -5,8 +5,7 @@
 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';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,7 +15,30 @@
 }
 
 @reflectiveTest
-class InconsistentCaseExpressionTypesTest extends DriverResolutionTest {
+class InconsistentCaseExpressionTypesTest extends PubPackageResolutionTest {
+  test_dynamic() async {
+    // Even though A.S and S have a static type of "dynamic", we should see
+    // that they match 'abc', because they are constant strings.
+    await assertNoErrorsInCode(r'''
+class A {
+  static const S = 'A.S';
+}
+
+const S = 'S';
+
+foo(var p) {
+  switch (p) {
+    case S:
+      break;
+    case A.S:
+      break;
+    case 'abc':
+      break;
+  }
+}
+''');
+  }
+
   test_int() async {
     await assertNoErrorsInCode(r'''
 void f(var e) {
@@ -92,9 +114,9 @@
 
 @reflectiveTest
 class InconsistentCaseExpressionTypesWithNullSafetyTest
-    extends DriverResolutionTest with WithNullSafetyMixin {
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_int_none_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const a = 0;
 ''');
 
diff --git a/pkg/analyzer/test/src/diagnostics/inconsistent_inheritance_getter_and_method_test.dart b/pkg/analyzer/test/src/diagnostics/inconsistent_inheritance_getter_and_method_test.dart
index 029df6c..a396382 100644
--- a/pkg/analyzer/test/src/diagnostics/inconsistent_inheritance_getter_and_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/inconsistent_inheritance_getter_and_method_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,8 @@
 }
 
 @reflectiveTest
-class InconsistentInheritanceGetterAndMethodTest extends DriverResolutionTest {
+class InconsistentInheritanceGetterAndMethodTest
+    extends PubPackageResolutionTest {
   test_class_getter_method() async {
     await assertErrorsInCode(r'''
 abstract class A {
diff --git a/pkg/analyzer/test/src/diagnostics/inconsistent_inheritance_test.dart b/pkg/analyzer/test/src/diagnostics/inconsistent_inheritance_test.dart
index 7d6f23e..0820fb8 100644
--- a/pkg/analyzer/test/src/diagnostics/inconsistent_inheritance_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/inconsistent_inheritance_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InconsistentInheritanceTest extends DriverResolutionTest {
+class InconsistentInheritanceTest extends PubPackageResolutionTest {
   test_class_parameterType() async {
     await assertErrorsInCode(r'''
 abstract class A {
diff --git a/pkg/analyzer/test/src/diagnostics/inconsistent_language_version_override_test.dart b/pkg/analyzer/test/src/diagnostics/inconsistent_language_version_override_test.dart
new file mode 100644
index 0000000..22eb5ae
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/inconsistent_language_version_override_test.dart
@@ -0,0 +1,109 @@
+// 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:meta/meta.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../generated/test_support.dart';
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InconsistentLanguageVersionOverrideTest);
+  });
+}
+
+@reflectiveTest
+class InconsistentLanguageVersionOverrideTest extends PubPackageResolutionTest {
+  CompileTimeErrorCode get _errorCode =>
+      CompileTimeErrorCode.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE;
+
+  test_both_different() async {
+    await _checkLibraryAndPart(
+      libraryContent: r'''
+// @dart = 2.5
+part 'b.dart';
+''',
+      partContent: r'''
+// @dart = 2.6
+part of 'a.dart';
+''',
+      libraryErrors: [
+        error(_errorCode, 20, 8),
+      ],
+    );
+  }
+
+  test_both_same() async {
+    await _checkLibraryAndPart(
+      libraryContent: r'''
+// @dart = 2.5
+part 'b.dart';
+''',
+      partContent: r'''
+// @dart = 2.5
+part of 'a.dart';
+''',
+      libraryErrors: [],
+    );
+  }
+
+  test_none() async {
+    await _checkLibraryAndPart(
+      libraryContent: r'''
+part 'b.dart';
+''',
+      partContent: r'''
+part of 'a.dart';
+''',
+      libraryErrors: [],
+    );
+  }
+
+  test_onlyLibrary() async {
+    await _checkLibraryAndPart(
+      libraryContent: r'''
+// @dart = 2.5
+part 'b.dart';
+''',
+      partContent: r'''
+part of 'a.dart';
+''',
+      libraryErrors: [
+        error(_errorCode, 20, 8),
+      ],
+    );
+  }
+
+  test_onlyPart() async {
+    await _checkLibraryAndPart(
+      libraryContent: r'''
+part 'b.dart';
+''',
+      partContent: r'''
+// @dart = 2.5
+part of 'a.dart';
+''',
+      libraryErrors: [
+        error(_errorCode, 5, 8),
+      ],
+    );
+  }
+
+  Future<void> _checkLibraryAndPart({
+    @required String libraryContent,
+    @required String partContent,
+    @required List<ExpectedError> libraryErrors,
+  }) async {
+    var libraryPath = convertPath('$testPackageLibPath/a.dart');
+    var partPath = convertPath('$testPackageLibPath/b.dart');
+
+    newFile(libraryPath, content: libraryContent);
+
+    newFile(partPath, content: partContent);
+
+    await assertErrorsInFile2(libraryPath, libraryErrors);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/inference_failure_on_collection_literal_test.dart b/pkg/analyzer/test/src/diagnostics/inference_failure_on_collection_literal_test.dart
index 70f51bf..ad65005 100644
--- a/pkg/analyzer/test/src/diagnostics/inference_failure_on_collection_literal_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/inference_failure_on_collection_literal_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,10 +14,16 @@
 }
 
 @reflectiveTest
-class InferenceFailureOnCollectionLiteralTest extends DriverResolutionTest {
+class InferenceFailureOnCollectionLiteralTest extends PubPackageResolutionTest {
   @override
-  AnalysisOptionsImpl get analysisOptions =>
-      AnalysisOptionsImpl()..strictInference = true;
+  void setUp() {
+    super.setUp();
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        strictInference: true,
+      ),
+    );
+  }
 
   test_collectionsWithAnyElements() async {
     await assertErrorsInCode(r'''
diff --git a/pkg/analyzer/test/src/diagnostics/inference_failure_on_function_return_type_test.dart b/pkg/analyzer/test/src/diagnostics/inference_failure_on_function_return_type_test.dart
index a3f0bd4..1940b0a 100644
--- a/pkg/analyzer/test/src/diagnostics/inference_failure_on_function_return_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/inference_failure_on_function_return_type_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,10 +16,17 @@
 /// Tests of HintCode.INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE with the
 /// "strict-inference" static analysis option.
 @reflectiveTest
-class InferenceFailureOnFunctionReturnTypeTest extends DriverResolutionTest {
+class InferenceFailureOnFunctionReturnTypeTest
+    extends PubPackageResolutionTest {
   @override
-  AnalysisOptionsImpl get analysisOptions =>
-      AnalysisOptionsImpl()..strictInference = true;
+  void setUp() {
+    super.setUp();
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        strictInference: true,
+      ),
+    );
+  }
 
   test_classInstanceGetter() async {
     await assertErrorsInCode(r'''
diff --git a/pkg/analyzer/test/src/diagnostics/inference_failure_on_instance_creation_test.dart b/pkg/analyzer/test/src/diagnostics/inference_failure_on_instance_creation_test.dart
new file mode 100644
index 0000000..6e39da6
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/inference_failure_on_instance_creation_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 'package:analyzer/src/error/codes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InferenceFailureOnInstanceCreationTest);
+  });
+}
+
+@reflectiveTest
+class InferenceFailureOnInstanceCreationTest extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        strictInference: true,
+      ),
+    );
+  }
+
+  test_constructorNames_named() async {
+    await assertErrorsInCode('''
+import 'dart:collection';
+void f() {
+  HashMap.from({1: 1, 2: 2, 3: 3});
+}
+''', [
+      error(HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, 39, 12),
+    ]);
+    expect(result.errors[0].message, contains("'HashMap.from'"));
+  }
+
+  test_constructorNames_unnamed() async {
+    await assertErrorsInCode('''
+import 'dart:collection';
+void f() {
+  HashMap();
+}
+''', [
+      error(HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, 39, 7),
+    ]);
+    expect(result.errors[0].message, contains("'HashMap'"));
+  }
+
+  test_explicitTypeArgument() async {
+    await assertNoErrorsInCode(r'''
+import 'dart:collection';
+void f() {
+  HashMap<int, int>();
+}
+''');
+  }
+
+  test_missingTypeArgument_downwardInference() async {
+    await assertNoErrorsInCode(r'''
+import 'dart:collection';
+HashMap<int, int> f() {
+  return HashMap();
+}
+''');
+  }
+
+  test_missingTypeArgument_noInference() async {
+    await assertErrorsInCode(r'''
+import 'dart:collection';
+void f() {
+  HashMap();
+}
+''', [
+      error(HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, 39, 7),
+    ]);
+  }
+
+  test_missingTypeArgument_noInference_optionalTypeArgs() async {
+    writeTestPackageConfigWithMeta();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+@optionalTypeArgs
+class C<T> {}
+void f() {
+  C();
+}
+''');
+  }
+
+  test_missingTypeArgument_upwardInference() async {
+    await assertNoErrorsInCode(r'''
+import 'dart:collection';
+void f() {
+  HashMap.of({1: 1, 2: 2, 3: 3});
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/inference_failure_on_uninitialized_variable_test.dart b/pkg/analyzer/test/src/diagnostics/inference_failure_on_uninitialized_variable_test.dart
index 846fd9c..f6a67f2 100644
--- a/pkg/analyzer/test/src/diagnostics/inference_failure_on_uninitialized_variable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/inference_failure_on_uninitialized_variable_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,10 +17,16 @@
 /// "strict-inference" static analysis option.
 @reflectiveTest
 class InferenceFailureOnUninitializedVariableTest
-    extends StaticTypeAnalyzer2TestShared {
+    extends PubPackageResolutionTest {
   @override
-  AnalysisOptionsImpl get analysisOptions =>
-      AnalysisOptionsImpl()..strictInference = true;
+  void setUp() {
+    super.setUp();
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        strictInference: true,
+      ),
+    );
+  }
 
   test_field() async {
     await assertErrorsInCode(r'''
diff --git a/pkg/analyzer/test/src/diagnostics/inference_failure_on_untyped_parameter_test.dart b/pkg/analyzer/test/src/diagnostics/inference_failure_on_untyped_parameter_test.dart
index 6a6614e..47e4695 100644
--- a/pkg/analyzer/test/src/diagnostics/inference_failure_on_untyped_parameter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/inference_failure_on_untyped_parameter_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,11 +16,16 @@
 /// Tests of HintCode.INFERENCE_FAILURE_ON_UNTYPED_PARAMETER with the
 /// "strict-inference" static analysis option.
 @reflectiveTest
-class InferenceFailureOnUntypedParameterTest
-    extends StaticTypeAnalyzer2TestShared {
+class InferenceFailureOnUntypedParameterTest extends PubPackageResolutionTest {
   @override
-  AnalysisOptionsImpl get analysisOptions =>
-      AnalysisOptionsImpl()..strictInference = true;
+  void setUp() {
+    super.setUp();
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        strictInference: true,
+      ),
+    );
+  }
 
   test_fieldParameter() async {
     await assertNoErrorsInCode(r'''
@@ -60,6 +64,12 @@
     ]);
   }
 
+  test_namedParameter_withVar_unreferenced() async {
+    await assertNoErrorsInCode(r'''
+void fn({var a}) {}
+''');
+  }
+
   test_parameter() async {
     await assertErrorsInCode(r'''
 void fn(a) => print(a);
@@ -71,13 +81,55 @@
   test_parameter_inConstructor() async {
     await assertErrorsInCode(r'''
 class C {
-  C(var a) {}
+  C(var a) {
+    a;
+  }
 }
 ''', [
       error(HintCode.INFERENCE_FAILURE_ON_UNTYPED_PARAMETER, 14, 5),
     ]);
   }
 
+  test_parameter_inConstructor_fieldFormal() async {
+    await assertNoErrorsInCode(r'''
+class C {
+  int a;
+  C(this.a) {
+    a;
+  }
+}
+''');
+  }
+
+  test_parameter_inConstructor_fieldFormal_withVar() async {
+    await assertNoErrorsInCode(r'''
+class C {
+  int a;
+  C(var this.a) {
+    a;
+  }
+}
+''');
+  }
+
+  test_parameter_inConstructor_referencedInInitializer() async {
+    await assertErrorsInCode(r'''
+class C {
+  C(var a) : assert(a != null);
+}
+''', [
+      error(HintCode.INFERENCE_FAILURE_ON_UNTYPED_PARAMETER, 14, 5),
+    ]);
+  }
+
+  test_parameter_inConstructor_unreferenced() async {
+    await assertNoErrorsInCode(r'''
+class C {
+  C(var a);
+}
+''');
+  }
+
   test_parameter_inConstructor_withType() async {
     await assertNoErrorsInCode(r'''
 class C {
@@ -89,7 +141,7 @@
   test_parameter_inFunctionLiteral() async {
     await assertErrorsInCode(r'''
 void fn() {
-  var f = (var a) {};
+  var f = (var a) => a;
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 18, 1),
@@ -116,13 +168,9 @@
   }
 
   test_parameter_inFunctionLiteral_withType() async {
-    await assertErrorsInCode(r'''
-void fn() {
-  var f = (int a) {};
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 18, 1),
-    ]);
+    await assertNoErrorsInCode(r'''
+var f = (int a) => false;
+''');
   }
 
   test_parameter_inGenericFunction_withType() async {
@@ -141,6 +189,16 @@
     ]);
   }
 
+  test_parameter_inMethod_abstract() async {
+    await assertErrorsInCode(r'''
+abstract class C {
+  void fn(var a);
+}
+''', [
+      error(HintCode.INFERENCE_FAILURE_ON_UNTYPED_PARAMETER, 29, 5),
+    ]);
+  }
+
   test_parameter_inMethod_withType() async {
     await assertNoErrorsInCode(r'''
 class C {
@@ -205,6 +263,14 @@
 ''');
   }
 
+  test_parameter_inTypedef_withoutType() async {
+    await assertErrorsInCode(r'''
+typedef void cb(a);
+''', [
+      error(HintCode.INFERENCE_FAILURE_ON_UNTYPED_PARAMETER, 16, 1),
+    ]);
+  }
+
   test_parameter_inTypedef_withType() async {
     await assertNoErrorsInCode(r'''
 typedef cb = void Function(int a);
diff --git a/pkg/analyzer/test/src/diagnostics/initializer_for_non_existent_field_test.dart b/pkg/analyzer/test/src/diagnostics/initializer_for_non_existent_field_test.dart
new file mode 100644
index 0000000..43361f5
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/initializer_for_non_existent_field_test.dart
@@ -0,0 +1,40 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InitializerForNonExistentFieldTest);
+  });
+}
+
+@reflectiveTest
+class InitializerForNonExistentFieldTest extends PubPackageResolutionTest {
+  test_const() async {
+    // Check that the absence of a matching field doesn't cause a
+    // crash during constant evaluation.
+    await assertErrorsInCode(r'''
+class A {
+  const A() : x = 'foo';
+}
+A a = const A();
+''', [
+      error(CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD, 24, 9),
+    ]);
+  }
+
+  test_initializer() async {
+    await assertErrorsInCode(r'''
+class A {
+  A() : x = 0 {}
+}
+''', [
+      error(CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD, 18, 5),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/initializer_for_static_field_test.dart b/pkg/analyzer/test/src/diagnostics/initializer_for_static_field_test.dart
new file mode 100644
index 0000000..6aa701f
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/initializer_for_static_field_test.dart
@@ -0,0 +1,28 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InitializerForStaticFieldTest);
+  });
+}
+
+@reflectiveTest
+class InitializerForStaticFieldTest extends PubPackageResolutionTest {
+  test_static() async {
+    await assertErrorsInCode(r'''
+class A {
+  static int x;
+  A() : x = 0 {}
+}
+''', [
+      error(CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD, 34, 5),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/initializing_formal_for_non_existent_field_test.dart b/pkg/analyzer/test/src/diagnostics/initializing_formal_for_non_existent_field_test.dart
new file mode 100644
index 0000000..2a01c1d
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/initializing_formal_for_non_existent_field_test.dart
@@ -0,0 +1,66 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InitializingFormalForNonExistentFieldTest);
+  });
+}
+
+@reflectiveTest
+class InitializingFormalForNonExistentFieldTest
+    extends PubPackageResolutionTest {
+  test_nonExistent() async {
+    await assertErrorsInCode(r'''
+class A {
+  A(this.x) {}
+}
+''', [
+      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD, 14,
+          6),
+    ]);
+  }
+
+  test_notInEnclosingClass() async {
+    await assertErrorsInCode(r'''
+class A {
+int x;
+}
+class B extends A {
+  B(this.x) {}
+}
+''', [
+      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD, 43,
+          6),
+    ]);
+  }
+
+  test_optional() async {
+    await assertErrorsInCode(r'''
+class A {
+  A([this.x]) {}
+}
+''', [
+      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD, 15,
+          6),
+    ]);
+  }
+
+  test_synthetic() async {
+    await assertErrorsInCode(r'''
+class A {
+  int get x => 1;
+  A(this.x) {}
+}
+''', [
+      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD, 32,
+          6),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/initializing_formal_for_static_field_test.dart b/pkg/analyzer/test/src/diagnostics/initializing_formal_for_static_field_test.dart
new file mode 100644
index 0000000..b79eba6
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/initializing_formal_for_static_field_test.dart
@@ -0,0 +1,28 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InitializingFormalForStaticFieldTest);
+  });
+}
+
+@reflectiveTest
+class InitializingFormalForStaticFieldTest extends PubPackageResolutionTest {
+  test_static() async {
+    await assertErrorsInCode(r'''
+class A {
+  static int x;
+  A([this.x]) {}
+}
+''', [
+      error(CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD, 31, 6),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/instance_access_to_static_member_test.dart b/pkg/analyzer/test/src/diagnostics/instance_access_to_static_member_test.dart
index 0f8682b..8644b85 100644
--- a/pkg/analyzer/test/src/diagnostics/instance_access_to_static_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/instance_access_to_static_member_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InstanceAccessToStaticMemberTest extends DriverResolutionTest {
+class InstanceAccessToStaticMemberTest extends PubPackageResolutionTest {
   test_extension_getter() async {
     await assertErrorsInCode('''
 class C {}
@@ -28,7 +28,7 @@
   g(c).a;
 }
 ''', [
-      error(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 93, 1),
+      error(CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 93, 1),
     ]);
     assertElement(
       findNode.simple('a;'),
@@ -48,7 +48,7 @@
   c.a();
 }
 ''', [
-      error(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 68, 1),
+      error(CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 68, 1),
     ]);
     assertElement(
       findNode.methodInvocation('a();'),
@@ -68,11 +68,63 @@
   c.a = 2;
 }
 ''', [
-      error(StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 68, 1),
+      error(CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 68, 1),
     ]);
     assertElement(
       findNode.simple('a = 2;'),
       findElement.setter('a'),
     );
   }
+
+  test_method_reference() async {
+    await assertErrorsInCode(r'''
+class A {
+  static m() {}
+}
+main(A a) {
+  a.m;
+}
+''', [
+      error(CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 44, 1),
+    ]);
+  }
+
+  test_propertyAccess_field() async {
+    await assertErrorsInCode(r'''
+class A {
+  static var f;
+}
+main(A a) {
+  a.f;
+}
+''', [
+      error(CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 44, 1),
+    ]);
+  }
+
+  test_propertyAccess_getter() async {
+    await assertErrorsInCode(r'''
+class A {
+  static get f => 42;
+}
+main(A a) {
+  a.f;
+}
+''', [
+      error(CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 50, 1),
+    ]);
+  }
+
+  test_propertyAccess_setter() async {
+    await assertErrorsInCode(r'''
+class A {
+  static set f(x) {}
+}
+main(A a) {
+  a.f = 42;
+}
+''', [
+      error(CompileTimeErrorCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, 49, 1),
+    ]);
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/instance_member_access_from_factory_test.dart b/pkg/analyzer/test/src/diagnostics/instance_member_access_from_factory_test.dart
new file mode 100644
index 0000000..5bde8d7
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/instance_member_access_from_factory_test.dart
@@ -0,0 +1,47 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InstanceMemberAccessFromFactoryTest);
+  });
+}
+
+@reflectiveTest
+class InstanceMemberAccessFromFactoryTest extends PubPackageResolutionTest {
+  test_named() async {
+    await assertErrorsInCode(r'''
+class A {
+  m() {}
+  A();
+  factory A.make() {
+    m();
+    return new A();
+  }
+}
+''', [
+      error(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY, 51, 1),
+    ]);
+  }
+
+  test_unnamed() async {
+    await assertErrorsInCode(r'''
+class A {
+  m() {}
+  A._();
+  factory A() {
+    m();
+    return new A._();
+  }
+}
+''', [
+      error(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY, 48, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/instance_member_access_from_static_test.dart b/pkg/analyzer/test/src/diagnostics/instance_member_access_from_static_test.dart
index c54e3fd..4ec14fa 100644
--- a/pkg/analyzer/test/src/diagnostics/instance_member_access_from_static_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/instance_member_access_from_static_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,22 +14,8 @@
 }
 
 @reflectiveTest
-class InstanceMemberAccessFromStaticTest extends DriverResolutionTest {
-  test_class_field() async {
-    await assertErrorsInCode(r'''
-class A {
-  int foo;
-
-  static void bar() {
-    foo;
-  }
-}
-''', [
-      error(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC, 48, 3),
-    ]);
-  }
-
-  test_class_getter() async {
+class InstanceMemberAccessFromStaticTest extends PubPackageResolutionTest {
+  test_class_getter_fromMethod() async {
     await assertErrorsInCode(r'''
 class A {
   int get foo => 0;
@@ -43,7 +29,23 @@
     ]);
   }
 
-  test_class_method() async {
+  test_class_getter_fromMethod_fromClosure() async {
+    await assertErrorsInCode(r'''
+class A {
+  int get foo => 0;
+
+  static Object bar() {
+    return () {
+      foo;
+    };
+  }
+}
+''', [
+      error(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC, 77, 3),
+    ]);
+  }
+
+  test_class_method_fromMethod() async {
     await assertErrorsInCode(r'''
 class A {
   void foo() {}
@@ -57,7 +59,7 @@
     ]);
   }
 
-  test_class_setter() async {
+  test_class_setter_fromMethod() async {
     await assertErrorsInCode(r'''
 class A {
   set foo(int _) {}
@@ -71,7 +73,7 @@
     ]);
   }
 
-  test_extension_external_getter() async {
+  test_extension_external_getter_fromMethod() async {
     await assertErrorsInCode(r'''
 extension E on A {
   int get foo => 0;
@@ -87,7 +89,7 @@
     ]);
   }
 
-  test_extension_external_method() async {
+  test_extension_external_method_fromMethod() async {
     await assertErrorsInCode(r'''
 extension E on A {
   void foo() {}
@@ -103,7 +105,7 @@
     ]);
   }
 
-  test_extension_external_setter() async {
+  test_extension_external_setter_fromMethod() async {
     await assertErrorsInCode(r'''
 extension E on A {
   set foo(int _) {}
@@ -119,7 +121,7 @@
     ]);
   }
 
-  test_extension_internal_getter() async {
+  test_extension_internal_getter_fromMethod() async {
     await assertErrorsInCode(r'''
 extension E on int {
   int get foo => 0;
@@ -133,7 +135,7 @@
     ]);
   }
 
-  test_extension_internal_method() async {
+  test_extension_internal_method_fromMethod() async {
     await assertErrorsInCode(r'''
 extension E on int {
   void foo() {}
@@ -147,7 +149,7 @@
     ]);
   }
 
-  test_extension_internal_setter() async {
+  test_extension_internal_setter_fromMethod() async {
     await assertErrorsInCode(r'''
 extension E on int {
   set foo(int _) {}
diff --git a/pkg/analyzer/test/src/diagnostics/instantiate_abstract_class_test.dart b/pkg/analyzer/test/src/diagnostics/instantiate_abstract_class_test.dart
index 560995d..6c1e237 100644
--- a/pkg/analyzer/test/src/diagnostics/instantiate_abstract_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/instantiate_abstract_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InstantiateAbstractClassTest extends DriverResolutionTest {
+class InstantiateAbstractClassTest extends PubPackageResolutionTest {
   test_const_generic() async {
     await assertErrorsInCode('''
 abstract class A<E> {
@@ -24,7 +24,7 @@
   var a = const A<int>();
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 54, 1),
-      error(StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS, 64, 6),
+      error(CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, 64, 6),
     ]);
 
     assertType(findNode.instanceCreation('const A<int>'), 'A<int>');
@@ -39,7 +39,7 @@
   A a = const A();
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 49, 1),
-      error(StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS, 59, 1),
+      error(CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, 59, 1),
     ]);
   }
 
@@ -50,7 +50,7 @@
   new A<int>();
 }
 ''', [
-      error(StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS, 40, 6),
+      error(CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, 40, 6),
     ]);
 
     assertType(findNode.instanceCreation('new A<int>'), 'A<int>');
@@ -63,7 +63,7 @@
   new A();
 }
 ''', [
-      error(StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS, 37, 1),
+      error(CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, 37, 1),
     ]);
   }
 
@@ -74,7 +74,7 @@
   A<int>();
 }
 ''', [
-      error(StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS, 36, 6),
+      error(CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, 36, 6),
     ]);
 
     assertType(findNode.instanceCreation('A<int>'), 'A<int>');
@@ -87,7 +87,7 @@
   A();
 }
 ''', [
-      error(StaticWarningCode.INSTANTIATE_ABSTRACT_CLASS, 33, 1),
+      error(CompileTimeErrorCode.INSTANTIATE_ABSTRACT_CLASS, 33, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/instantiate_enum_test.dart b/pkg/analyzer/test/src/diagnostics/instantiate_enum_test.dart
new file mode 100644
index 0000000..0fd804c
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/instantiate_enum_test.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.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InstantiateEnumTest);
+  });
+}
+
+@reflectiveTest
+class InstantiateEnumTest extends PubPackageResolutionTest {
+  test_const() async {
+    await assertErrorsInCode(r'''
+enum E { ONE }
+E e(String name) {
+  return const E();
+}
+''', [
+      error(CompileTimeErrorCode.INSTANTIATE_ENUM, 49, 1),
+    ]);
+  }
+
+  test_new() async {
+    await assertErrorsInCode(r'''
+enum E { ONE }
+E e(String name) {
+  return new E();
+}
+''', [
+      error(CompileTimeErrorCode.INSTANTIATE_ENUM, 47, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/integer_literal_imprecise_as_double_test.dart b/pkg/analyzer/test/src/diagnostics/integer_literal_imprecise_as_double_test.dart
new file mode 100644
index 0000000..8c831b2
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/integer_literal_imprecise_as_double_test.dart
@@ -0,0 +1,53 @@
+// 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/error/codes.dart';
+import 'package:test/test.dart' show expect;
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(IntegerLiteralImpreciseAsDoubleTest);
+  });
+}
+
+@reflectiveTest
+class IntegerLiteralImpreciseAsDoubleTest extends PubPackageResolutionTest {
+  test_excessiveExponent() async {
+    await assertErrorsInCode(
+        'double x = 0xfffffffffffff80000000000000000000000000000000000000000000'
+        '0000000000000000000000000000000000000000000000000000000000000000000000'
+        '0000000000000000000000000000000000000000000000000000000000000000000000'
+        '000000000000000000000000000000000000000000000000000000000000;',
+        [
+          error(CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE, 11,
+              259),
+        ]);
+    AnalysisError firstError = result.errors[0];
+
+    // Check that we suggest the max double instead.
+    expect(
+        true,
+        firstError.correction.contains(
+            '179769313486231570814527423731704356798070567525844996598917476803'
+            '157260780028538760589558632766878171540458953514382464234321326889'
+            '464182768467546703537516986049910576551282076245490090389328944075'
+            '868508455133942304583236903222948165808559332123348274797826204144'
+            '723168738177180919299881250404026184124858368'));
+  }
+
+  test_excessiveMantissa() async {
+    await assertErrorsInCode('''
+double x = 9223372036854775809;
+''', [
+      error(CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE, 11, 19),
+    ]);
+    AnalysisError firstError = result.errors[0];
+    // Check that we suggest a valid double instead.
+    expect(true, firstError.correction.contains('9223372036854775808'));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/integer_literal_out_of_range_test.dart b/pkg/analyzer/test/src/diagnostics/integer_literal_out_of_range_test.dart
new file mode 100644
index 0000000..0d1d08e
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/integer_literal_out_of_range_test.dart
@@ -0,0 +1,33 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(IntegerLiteralOutOfRangeTest);
+  });
+}
+
+@reflectiveTest
+class IntegerLiteralOutOfRangeTest extends PubPackageResolutionTest {
+  test_negative() async {
+    await assertErrorsInCode('''
+int x = -9223372036854775809;
+''', [
+      error(CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE, 9, 19),
+    ]);
+  }
+
+  test_positive() async {
+    await assertErrorsInCode('''
+int x = 9223372036854775808;
+''', [
+      error(CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE, 8, 19),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_annotation_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_annotation_from_deferred_library_test.dart
index a235c79..88263a6 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_annotation_from_deferred_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_annotation_from_deferred_library_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,10 @@
 }
 
 @reflectiveTest
-class InvalidAnnotationFromDeferredLibraryTest extends DriverResolutionTest {
+class InvalidAnnotationFromDeferredLibraryTest
+    extends PubPackageResolutionTest {
   test_constructor() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class C { const C(); }
 ''');
@@ -31,7 +32,7 @@
   }
 
   test_from_deferred_library() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class V { const V(); }
 const v = const V();
@@ -47,7 +48,7 @@
   }
 
   test_namedConstructor() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class C { const C.name(); }
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_annotation_getter_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_annotation_getter_test.dart
index be6978d..9963bea 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_annotation_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_annotation_getter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidAnnotationGetterTest extends DriverResolutionTest {
+class InvalidAnnotationGetterTest extends PubPackageResolutionTest {
   test_getter() async {
     await assertErrorsInCode(r'''
 get V => 0;
@@ -27,7 +27,7 @@
   }
 
   test_importWithPrefix_getter() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 get V => 0;
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_annotation_test.dart
index b799306..1ad964c 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_annotation_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class InvalidAnnotationTest extends DriverResolutionTest {
+class InvalidAnnotationTest extends PubPackageResolutionTest {
   test_importWithPrefix_notConstantVariable() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 final V = 0;
 ''');
@@ -31,7 +31,7 @@
   }
 
   test_importWithPrefix_notVariableOrConstructorInvocation() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 typedef V();
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
index 6137d28f..da01c89 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,12 +15,8 @@
 }
 
 @reflectiveTest
-class InvalidAssignmentNnbdTest extends InvalidAssignmentTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
+class InvalidAssignmentNnbdTest extends InvalidAssignmentTest
+    with WithNullSafetyMixin {
   @override
   test_ifNullAssignment() async {
     await assertErrorsInCode('''
@@ -31,7 +25,7 @@
   d ??= i;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 37, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 37, 1),
     ]);
   }
 
@@ -64,7 +58,7 @@
 }
 ''', [
       error(HintCode.DEAD_CODE, 24, 5),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 24, 4),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 24, 4),
     ]);
   }
 
@@ -77,7 +71,7 @@
 }
 ''', [
       error(HintCode.DEAD_CODE, 37, 5),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 37, 4),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 37, 4),
     ]);
   }
 
@@ -93,13 +87,13 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 58, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 58, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class InvalidAssignmentTest extends DriverResolutionTest {
+class InvalidAssignmentTest extends PubPackageResolutionTest {
   test_assignment_to_dynamic() async {
     await assertErrorsInCode(r'''
 f() {
@@ -111,6 +105,17 @@
     ]);
   }
 
+  test_cascadeExpression() async {
+    await assertErrorsInCode(r'''
+void f(int a) {
+  // ignore:unused_local_variable
+  String v = (a)..isEven;
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 64, 1),
+    ]);
+  }
+
   test_compoundAssignment() async {
     await assertErrorsInCode(r'''
 class byte {
@@ -134,7 +139,7 @@
 f({String x: 0}) {
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 13, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 13, 1),
     ]);
   }
 
@@ -148,7 +153,7 @@
     await assertErrorsInCode(r'''
 f([String x = 0]) {
 }''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 14, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 14, 1),
     ]);
   }
 
@@ -165,7 +170,7 @@
   dynamic = 1;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 21, 1),
     ]);
   }
 
@@ -175,7 +180,7 @@
   String x = (() => 5)();
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 23, 11),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 23, 11),
     ]);
   }
 
@@ -186,7 +191,7 @@
   d ??= i;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 36, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 36, 1),
     ]);
   }
 
@@ -297,7 +302,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 80, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 80, 1),
     ]);
   }
 
@@ -321,7 +326,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 12, 1),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 3),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 21, 3),
     ]);
   }
 
@@ -334,7 +339,18 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 44, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 44, 1),
+    ]);
+  }
+
+  test_parenthesizedExpression() async {
+    await assertErrorsInCode(r'''
+void f(int a) {
+  // ignore:unused_local_variable
+  String v = (a);
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 64, 1),
     ]);
   }
 
@@ -350,7 +366,7 @@
   a++;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 65, 3),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 65, 3),
     ]);
   }
 
@@ -382,7 +398,7 @@
   c.a++;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 91, 5),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 91, 5),
     ]);
   }
 
@@ -414,7 +430,7 @@
   ++a;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 65, 3),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 65, 3),
     ]);
   }
 
@@ -446,7 +462,7 @@
   ++c.a;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 91, 5),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 91, 5),
     ]);
   }
 
@@ -496,7 +512,7 @@
   T t = int;
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 3),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 21, 3),
     ]);
   }
 
@@ -509,7 +525,7 @@
   A.x = '0';
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 46, 3),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 46, 3),
     ]);
   }
 
@@ -524,7 +540,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 74, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 74, 1),
     ]);
   }
 
@@ -532,7 +548,7 @@
     await assertErrorsInCode('''
 int x = 'string';
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 8, 8),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 8, 8),
     ]);
   }
 
@@ -546,7 +562,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 57, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 57, 1),
     ]);
   }
 
@@ -564,7 +580,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 131, 1),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 131, 1),
     ]);
   }
 
@@ -574,7 +590,7 @@
   int x = 'string';
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 20, 8),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 20, 8),
     ]);
   }
 
@@ -595,7 +611,7 @@
   print(n);
 }
 ''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 218, 7),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 218, 7),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_cast_new_expr_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_cast_new_expr_test.dart
index 88a6917..fc1ce1e 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_cast_new_expr_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_cast_new_expr_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidCastNewExprTest extends DriverResolutionTest {
+class InvalidCastNewExprTest extends PubPackageResolutionTest {
   test_listLiteral_const() async {
     await assertErrorsInCode(r'''
 const c = <B>[A()];
@@ -25,8 +25,8 @@
   const B();
 }
 ''', [
-      error(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 14, 3),
-      error(StrongModeCode.INVALID_CAST_NEW_EXPR, 14, 3),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 14, 3),
+      error(CompileTimeErrorCode.INVALID_CAST_NEW_EXPR, 14, 3),
     ]);
   }
 
@@ -40,7 +40,7 @@
   const B();
 }
 ''', [
-      error(StrongModeCode.INVALID_CAST_NEW_EXPR, 12, 3),
+      error(CompileTimeErrorCode.INVALID_CAST_NEW_EXPR, 12, 3),
     ]);
   }
 
@@ -54,8 +54,8 @@
   const B();
 }
 ''', [
-      error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 14, 3),
-      error(StrongModeCode.INVALID_CAST_NEW_EXPR, 14, 3),
+      error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 14, 3),
+      error(CompileTimeErrorCode.INVALID_CAST_NEW_EXPR, 14, 3),
     ]);
   }
 
@@ -69,7 +69,7 @@
   const B();
 }
 ''', [
-      error(StrongModeCode.INVALID_CAST_NEW_EXPR, 12, 3),
+      error(CompileTimeErrorCode.INVALID_CAST_NEW_EXPR, 12, 3),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_constant_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_constant_test.dart
index ef14538a..a000c02 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_constant_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_constant_test.dart
@@ -5,8 +5,7 @@
 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';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,7 +15,7 @@
 }
 
 @reflectiveTest
-class InvalidConstantTest extends DriverResolutionTest {
+class InvalidConstantTest extends PubPackageResolutionTest {
   test_in_initializer_assert_condition() async {
     await assertErrorsInCode('''
 class A {
@@ -50,7 +49,7 @@
   }
 
   test_in_initializer_from_deferred_library_field() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 const int c = 1;''');
     await assertErrorsInCode('''
@@ -66,7 +65,7 @@
   }
 
   test_in_initializer_from_deferred_library_field_nested() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 const int c = 1;
 ''');
@@ -83,7 +82,7 @@
   }
 
   test_in_initializer_from_deferred_library_redirecting() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 const int c = 1;
 ''');
@@ -100,7 +99,7 @@
   }
 
   test_in_initializer_from_deferred_library_super() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 const int c = 1;
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_constructor_name_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_constructor_name_test.dart
index ba7337a..049f378 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_constructor_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_constructor_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidConstructorNameTest extends DriverResolutionTest {
+class InvalidConstructorNameTest extends PubPackageResolutionTest {
   test_notEnclosingClassName_defined() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_exception_value_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_exception_value_test.dart
index 2d3b9b1..ce4bb84 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_exception_value_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_exception_value_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidExceptionValueTest extends DriverResolutionTest {
+class InvalidExceptionValueTest extends PubPackageResolutionTest {
   test_missing() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_extension_argument_count_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_extension_argument_count_test.dart
index 59375f2..5a4f4bf 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_extension_argument_count_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_extension_argument_count_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidExtensionArgumentCountTest extends DriverResolutionTest {
+class InvalidExtensionArgumentCountTest extends PubPackageResolutionTest {
   test_many() async {
     await assertErrorsInCode('''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_factory_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_factory_annotation_test.dart
index 0011b60..759ae73 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_factory_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_factory_annotation_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,10 +14,14 @@
 }
 
 @reflectiveTest
-class InvalidFactoryAnnotationTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidFactoryAnnotationTest extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfigWithMeta();
+  }
+
   test_class() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @factory
@@ -30,7 +33,6 @@
   }
 
   test_field() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class X {
@@ -43,7 +45,6 @@
   }
 
   test_topLevelFunction() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @factory
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_factory_method_impl_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_factory_method_impl_test.dart
index c11b9f2..596fbc6 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_factory_method_impl_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_factory_method_impl_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,10 +14,14 @@
 }
 
 @reflectiveTest
-class InvalidFactoryMethodImplTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidFactoryMethodImplTest extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfigWithMeta();
+  }
+
   test_abstract() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 abstract class Stateful {
@@ -30,7 +33,6 @@
   }
 
   test_badReturn() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class Stateful {
@@ -46,7 +48,6 @@
   }
 
   test_block() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class Stateful {
@@ -60,7 +61,6 @@
   }
 
   test_block_returnNull() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class Stateful {
@@ -74,7 +74,6 @@
   }
 
   test_expr() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class Stateful {
@@ -86,7 +85,6 @@
   }
 
   test_expr_returnNull() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class Stateful {
@@ -98,7 +96,6 @@
   }
 
   test_noReturnType() async {
-    addMetaPackage();
     // Null return types will get flagged elsewhere, no need to pile on here.
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
@@ -112,7 +109,6 @@
   }
 
   test_subclass() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 abstract class Stateful {
@@ -132,7 +128,6 @@
   }
 
   test_voidReturn() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_factory_name_not_a_class_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_factory_name_not_a_class_test.dart
index 53d8d5f..5a7c46b 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_factory_name_not_a_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_factory_name_not_a_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidFactoryNameNotAClassTest extends DriverResolutionTest {
+class InvalidFactoryNameNotAClassTest extends PubPackageResolutionTest {
   test_notClassName() async {
     await assertErrorsInCode(r'''
 int B;
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_field_type_in_struct_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_field_type_in_struct_test.dart
index 7a0e10d..06cd7f3 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_field_type_in_struct_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_field_type_in_struct_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidFieldTypeInStructTest extends DriverResolutionTest {
+class InvalidFieldTypeInStructTest extends PubPackageResolutionTest {
   test_instance_invalid() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_immutable_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_immutable_annotation_test.dart
index 86f3980..81be70f 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_immutable_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_immutable_annotation_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,10 +14,14 @@
 }
 
 @reflectiveTest
-class InvalidImmutableAnnotationTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidImmutableAnnotationTest extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfigWithMeta();
+  }
+
   test_class() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @immutable
@@ -29,7 +32,6 @@
   }
 
   test_method() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_language_override_greater_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_language_override_greater_test.dart
index 301431e..03e35bc 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_language_override_greater_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_language_override_greater_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/context/packages.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/error/hint_codes.dart';
@@ -11,8 +10,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/constant/potentially_constant_test.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -21,7 +19,7 @@
 }
 
 @reflectiveTest
-class InvalidLanguageOverrideGreaterTest extends DriverResolutionTest
+class InvalidLanguageOverrideGreaterTest extends PubPackageResolutionTest
     with WithNullSafetyMixin {
   test_greaterThanLatest() async {
     var latestVersion = ExperimentStatus.currentVersion;
@@ -40,12 +38,12 @@
   test_greaterThanPackage() async {
     _configureTestPackageLanguageVersion('2.5');
     await assertNoErrorsInCode(r'''
-// @dart = 2.9
+// @dart = 2.10
 int? a;
 ''');
     _assertUnitLanguageVersion(
       package: Version.parse('2.5.0'),
-      override: Version.parse('2.9.0'),
+      override: Version.parse('2.10.0'),
     );
   }
 
@@ -72,15 +70,18 @@
   }
 
   void _configureTestPackageLanguageVersion(String versionStr) {
-    driver.configure(
-      packages: Packages({
-        'test': Package(
-          name: 'test',
-          rootFolder: getFolder('/test'),
-          libFolder: getFolder('/test/lib'),
-          languageVersion: Version.parse(versionStr + '.0'),
-        ),
-      }),
-    );
+    newFile('$testPackageRootPath/.dart_tool/package_config.json', content: '''
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "test",
+      "rootUri": "../",
+      "packageUri": "lib/",
+      "languageVersion": "$versionStr"
+    }
+  ]
+}
+''');
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_language_override_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_language_override_test.dart
index 1495c82..020ebfb 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_language_override_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_language_override_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidLanguageOverrideTest extends DriverResolutionTest {
+class InvalidLanguageOverrideTest extends PubPackageResolutionTest {
   test_correct_11_12() async {
     await assertErrorsInCode(r'''
 // @dart = 11.12
@@ -24,9 +24,9 @@
     ]);
   }
 
-  test_correct_2_10() async {
+  test_correct_2_19() async {
     await assertErrorsInCode(r'''
-// @dart = 2.10
+// @dart = 2.19
 int i = 0;
 ''', [
       error(HintCode.INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER, 0, 15),
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_literal_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_literal_annotation_test.dart
index 08262bc..73e21ae 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_literal_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_literal_annotation_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,10 +14,14 @@
 }
 
 @reflectiveTest
-class InvalidLiteralAnnotationTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidLiteralAnnotationTest extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfigWithMeta();
+  }
+
   test_constConstructor() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -29,7 +32,6 @@
   }
 
   test_nonConstConstructor() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -42,7 +44,6 @@
   }
 
   test_nonConstructor() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_modifier_on_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_modifier_on_constructor_test.dart
index bf3351e..0d0973d 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_modifier_on_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_modifier_on_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidModifierOnConstructorTest extends DriverResolutionTest {
+class InvalidModifierOnConstructorTest extends PubPackageResolutionTest {
   test_async() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_modifier_on_setter_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_modifier_on_setter_test.dart
new file mode 100644
index 0000000..f5fb7e2
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_modifier_on_setter_test.dart
@@ -0,0 +1,79 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidModifierOnSetterTest);
+  });
+}
+
+@reflectiveTest
+class InvalidModifierOnSetterTest extends PubPackageResolutionTest {
+  test_member_async() async {
+    // TODO(danrubel): Investigate why error message is duplicated when
+    // using fasta parser.
+    await assertErrorsInCode(r'''
+class A {
+  set x(v) async {}
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 5),
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 5),
+    ]);
+  }
+
+  test_member_asyncStar() async {
+    await assertErrorsInCode(r'''
+class A {
+  set x(v) async* {}
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 5),
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 5),
+    ]);
+  }
+
+  test_member_syncStar() async {
+    await assertErrorsInCode(r'''
+class A {
+  set x(v) sync* {}
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 4),
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 21, 4),
+    ]);
+  }
+
+  test_topLevel_async() async {
+    await assertErrorsInCode('''
+set x(v) async {}
+''', [
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 5),
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 5),
+    ]);
+  }
+
+  test_topLevel_asyncStar() async {
+    await assertErrorsInCode('''
+set x(v) async* {}
+''', [
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 5),
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 5),
+    ]);
+  }
+
+  test_topLevel_syncStar() async {
+    await assertErrorsInCode('''
+set x(v) sync* {}
+''', [
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 4),
+      error(CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, 9, 4),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_non_virtual_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_non_virtual_annotation_test.dart
index d0c52ae..a159977 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_non_virtual_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_non_virtual_annotation_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,12 +14,11 @@
 }
 
 @reflectiveTest
-class InvalidNonVirtualAnnotationTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidNonVirtualAnnotationTest extends PubPackageResolutionTest {
   @override
-  setUp() {
+  void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_class() async {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_null_aware_operator_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_null_aware_operator_test.dart
index d36cb8f..32cefad 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_null_aware_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_null_aware_operator_test.dart
@@ -2,28 +2,92 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidNullAwareOperatorAfterShortCircuitTest);
     defineReflectiveTests(InvalidNullAwareOperatorTest);
   });
 }
 
 @reflectiveTest
-class InvalidNullAwareOperatorTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
+class InvalidNullAwareOperatorAfterShortCircuitTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
+  Future<void> test_getter_previousTarget() async {
+    await assertErrorsInCode('''
+void f(String? s) {
+  s?.length?.isEven;
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT,
+          31, 2,
+          contextMessages: [message('$testPackageLibPath/test.dart', 23, 2)]),
+    ]);
+  }
 
+  Future<void> test_index_previousTarget() async {
+    await assertErrorsInCode('''
+void f(String? s) {
+  s?[4]?.length;
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT,
+          27, 2,
+          contextMessages: [message('$testPackageLibPath/test.dart', 23, 1)]),
+    ]);
+  }
+
+  Future<void> test_methodInvocation_noTarget() async {
+    await assertErrorsInCode('''
+class C {
+  C? m1() => this;
+  C m2() => this;
+  void m3() {
+    m1()?.m2()?.m2();
+  }
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT,
+          75, 2,
+          contextMessages: [message('$testPackageLibPath/test.dart', 69, 2)]),
+    ]);
+  }
+
+  Future<void> test_methodInvocation_previousTarget() async {
+    await assertErrorsInCode('''
+void f(String? s) {
+  s?.substring(0, 5)?.length;
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT,
+          40, 2,
+          contextMessages: [message('$testPackageLibPath/test.dart', 23, 2)]),
+    ]);
+  }
+
+  Future<void> test_methodInvocation_previousTwoTargets() async {
+    await assertErrorsInCode('''
+void f(String? s) {
+  s?.substring(0, 5)?.toLowerCase()?.length;
+}
+''', [
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT,
+          40, 2,
+          contextMessages: [message('$testPackageLibPath/test.dart', 23, 2)]),
+      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT,
+          55, 2,
+          contextMessages: [message('$testPackageLibPath/test.dart', 23, 2)]),
+    ]);
+  }
+}
+
+@reflectiveTest
+class InvalidNullAwareOperatorTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_getter_class() async {
     await assertNoErrorsInCode('''
 class C {
@@ -49,7 +113,7 @@
   }
 
   test_getter_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 var x = 0;
 ''');
@@ -101,7 +165,7 @@
   /// report [StaticWarningCode.INVALID_NULL_AWARE_OPERATOR]. But we also
   /// report another error.
   test_getter_prefix() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int x = 0;
 ''');
     await assertErrorsInCode('''
@@ -116,7 +180,7 @@
   }
 
   test_index_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 var x = [0];
 ''');
@@ -126,7 +190,6 @@
 
 f() {
   x?[0];
-  x?.[0];
   x?..[0];
 }
 ''');
@@ -136,13 +199,11 @@
     await assertErrorsInCode('''
 f(List<int> x) {
   x?[0];
-  x?.[0];
   x?..[0];
 }
 ''', [
       error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR, 20, 2),
       error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR, 29, 3),
-      error(StaticWarningCode.INVALID_NULL_AWARE_OPERATOR, 39, 3),
     ]);
   }
 
@@ -150,7 +211,6 @@
     await assertNoErrorsInCode('''
 f(List<int>? x) {
   x?[0];
-  x?.[0];
   x?..[0];
 }
 ''');
@@ -181,7 +241,7 @@
   }
 
   test_method_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 var x = 0;
 ''');
@@ -238,7 +298,7 @@
   }
 
   test_nullableSpread_legacyType() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 var x = <int>[];
 ''');
@@ -310,7 +370,7 @@
   /// report [StaticWarningCode.INVALID_NULL_AWARE_OPERATOR]. But we also
   /// report another error.
   test_setter_prefix() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int x = 0;
 ''');
     await assertErrorsInCode('''
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart
index 8db5d07..e3a0206 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart
@@ -2,26 +2,23 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(InvalidOverrideDifferentDefaultValuesNamedTest);
     defineReflectiveTests(
-      InvalidOverrideDifferentDefaultValuesNamedWithNnbdTest,
+      InvalidOverrideDifferentDefaultValuesNamedWithNullSafetyTest,
     );
   });
 }
 
 @reflectiveTest
 class InvalidOverrideDifferentDefaultValuesNamedTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_abstract_different_base_value() async {
     await assertErrorsInCode(r'''
 abstract class A {
@@ -174,7 +171,7 @@
   }
 
   test_concrete_equal_otherLibrary() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void foo([a = 0]) {}
 }
@@ -189,7 +186,7 @@
   }
 
   test_concrete_equal_otherLibrary_listLiteral() async {
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 class C {
   void foo({x: const ['x']}) {}
 }
@@ -243,7 +240,7 @@
 }
 ''', [
       error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 26, 9),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 26, 9),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 26, 9),
     ]);
   }
 
@@ -259,9 +256,9 @@
 }
 ''', [
       error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 26, 9),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 26, 9),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 26, 9),
       error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 85, 10),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 85, 10),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 85, 10),
     ]);
   }
 
@@ -277,7 +274,7 @@
 }
 ''', [
       error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 71, 9),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 71, 9),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 71, 9),
     ]);
   }
 
@@ -300,20 +297,11 @@
 }
 
 @reflectiveTest
-class InvalidOverrideDifferentDefaultValuesNamedWithNnbdTest
-    extends InvalidOverrideDifferentDefaultValuesNamedTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    )
-    ..implicitCasts = false;
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class InvalidOverrideDifferentDefaultValuesNamedWithNullSafetyTest
+    extends InvalidOverrideDifferentDefaultValuesNamedTest
+    with WithNullSafetyMixin {
   test_concrete_equal_optIn_extends_optOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 class A {
   void foo({int a = 0}) {}
@@ -330,7 +318,7 @@
   }
 
   test_concrete_equal_optOut_extends_optIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void foo({int a = 0}) {}
 }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart
index 1c00700..67d9fa8 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart
@@ -2,26 +2,23 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(InvalidOverrideDifferentDefaultValuesPositionalTest);
     defineReflectiveTests(
-      InvalidOverrideDifferentDefaultValuesPositionalWithNnbdTest,
+      InvalidOverrideDifferentDefaultValuesPositionalWithNullSafetyTest,
     );
   });
 }
 
 @reflectiveTest
 class InvalidOverrideDifferentDefaultValuesPositionalTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_abstract_different_base_value() async {
     await assertErrorsInCode(r'''
 abstract class A {
@@ -186,7 +183,7 @@
   }
 
   test_concrete_equal_otherLibrary() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void foo([x = 0]) {}
 }
@@ -201,7 +198,7 @@
   }
 
   test_concrete_equal_otherLibrary_listLiteral() async {
-    newFile('/test/lib/other.dart', content: '''
+    newFile('$testPackageLibPath/other.dart', content: '''
 class C {
   void foo([x = const ['x']]) {}
 }
@@ -255,7 +252,7 @@
 }
 ''', [
       error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 26, 9),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 26, 9),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 26, 9),
     ]);
   }
 
@@ -271,9 +268,9 @@
 }
 ''', [
       error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 26, 9),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 26, 9),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 26, 9),
       error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 85, 10),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 85, 10),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 85, 10),
     ]);
   }
 
@@ -289,7 +286,7 @@
 }
 ''', [
       error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 71, 9),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 71, 9),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 71, 9),
     ]);
   }
 
@@ -315,20 +312,11 @@
 }
 
 @reflectiveTest
-class InvalidOverrideDifferentDefaultValuesPositionalWithNnbdTest
-    extends InvalidOverrideDifferentDefaultValuesPositionalTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    )
-    ..implicitCasts = false;
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class InvalidOverrideDifferentDefaultValuesPositionalWithNullSafetyTest
+    extends InvalidOverrideDifferentDefaultValuesPositionalTest
+    with WithNullSafetyMixin {
   test_concrete_equal_optIn_extends_optOut() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 class A {
   void foo([int a = 0]) {}
@@ -345,7 +333,7 @@
   }
 
   test_concrete_equal_optOut_extends_optIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void foo([int a = 0]) {}
 }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_override_of_non_virtual_member_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_override_of_non_virtual_member_test.dart
index 613fdb9..10a52f8 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_override_of_non_virtual_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_override_of_non_virtual_member_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,12 +14,11 @@
 }
 
 @reflectiveTest
-class InvalidOverrideOfNonVirtualMemberTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidOverrideOfNonVirtualMemberTest extends PubPackageResolutionTest {
   @override
-  setUp() {
+  void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_class_field() async {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_override_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_override_test.dart
index b46af7a..fc35f34 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_override_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_override_test.dart
@@ -2,23 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(InvalidOverrideTest);
-    defineReflectiveTests(InvalidOverrideWithNnbdTest);
+    defineReflectiveTests(InvalidOverrideWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class InvalidOverrideTest extends DriverResolutionTest {
+class InvalidOverrideTest extends PubPackageResolutionTest {
   test_getter_returnType() async {
     await assertErrorsInCode('''
 class A {
@@ -563,19 +560,100 @@
 }
 
 @reflectiveTest
-class InvalidOverrideWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    )
-    ..implicitCasts = false;
+class InvalidOverrideWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
+  test_abstract_field_covariant_inheritance() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract covariant num x;
+}
+abstract class B implements A {
+  void set x(Object value); // Implicitly covariant
+}
+abstract class C implements B {
+  int get x;
+  void set x(int value); // Ok because covariant
+}
+''');
+  }
 
-  @override
-  bool get typeToStringWithNullability => true;
+  test_getter_overrides_abstract_field_covariant_invalid() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract covariant int x;
+}
+abstract class B implements A {
+  num get x;
+  void set x(num value);
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_OVERRIDE, 91, 1),
+    ]);
+  }
+
+  test_getter_overrides_abstract_field_covariant_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract covariant num x;
+}
+abstract class B implements A {
+  int get x;
+}
+''');
+  }
+
+  test_getter_overrides_abstract_field_final_invalid() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract final int x;
+}
+abstract class B implements A {
+  num get x;
+  void set x(num value);
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_OVERRIDE, 87, 1),
+    ]);
+  }
+
+  test_getter_overrides_abstract_field_final_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract final num x;
+}
+abstract class B implements A {
+  int get x;
+}
+''');
+  }
+
+  test_getter_overrides_abstract_field_invalid() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+abstract class B implements A {
+  num get x;
+  void set x(num value);
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_OVERRIDE, 81, 1),
+    ]);
+  }
+
+  test_getter_overrides_abstract_field_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract num x;
+}
+abstract class B implements A {
+  int get x;
+}
+''');
+  }
 
   test_method_parameter_functionTyped_optOut_extends_optIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 abstract class A {
   A catchError(void Function(Object) a);
 }
@@ -592,7 +670,7 @@
   }
 
   test_method_parameter_interfaceOptOut_concreteOptIn() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void foo(Object a) {}
 }
@@ -609,7 +687,7 @@
   }
 
   test_mixedInheritance_1() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class B {
   List<int Function(int)> get a => [];
   set a(List<int Function(int)> _) {}
@@ -623,7 +701,7 @@
 }
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart = 2.7
 import 'a.dart';
 
@@ -639,7 +717,7 @@
   }
 
   test_mixedInheritance_2() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class B {
   List<int Function(int)> get a => [];
   set a(List<int Function(int)> _) {}
@@ -653,7 +731,7 @@
 }
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart = 2.7
 import 'a.dart';
 
@@ -671,8 +749,57 @@
 ''');
   }
 
+  test_setter_overrides_abstract_field_covariant_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract covariant num x;
+}
+abstract class B implements A {
+  int get x;
+  void set x(int value);
+}
+''');
+  }
+
+  test_setter_overrides_abstract_field_final_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract final num x;
+}
+abstract class B implements A {
+  int get x;
+  void set x(int value);
+}
+''');
+  }
+
+  test_setter_overrides_abstract_field_invalid() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract num x;
+}
+abstract class B implements A {
+  int get x;
+  void set x(int value);
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_OVERRIDE, 95, 1),
+    ]);
+  }
+
+  test_setter_overrides_abstract_field_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+abstract class B implements A {
+  void set x(num value);
+}
+''');
+  }
+
   test_viaLegacy_class() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A1 {
   int m() => 0;
   int get g => 0;
@@ -686,7 +813,7 @@
 }
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart=2.6
 import 'a.dart';
 
@@ -709,7 +836,7 @@
   }
 
   test_viaLegacy_mixin() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A1 {
   int m() => 0;
   int get g => 0;
@@ -723,7 +850,7 @@
 }
 ''');
 
-    newFile('/test/lib/b.dart', content: r'''
+    newFile('$testPackageLibPath/b.dart', content: r'''
 // @dart=2.6
 import 'a.dart';
 
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_reference_to_this_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_reference_to_this_test.dart
index d294200..48725a2 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_reference_to_this_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_reference_to_this_test.dart
@@ -2,23 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(InvalidReferenceToThisTest);
-    defineReflectiveTests(InvalidReferenceToThisTest_NNBD);
+    defineReflectiveTests(InvalidReferenceToThisWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class InvalidReferenceToThisTest extends DriverResolutionTest {
+class InvalidReferenceToThisTest extends PubPackageResolutionTest {
   test_constructor_valid() async {
     await assertErrorsInCode(r'''
 class A {
@@ -137,13 +134,8 @@
 }
 
 @reflectiveTest
-class InvalidReferenceToThisTest_NNBD extends InvalidReferenceToThisTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class InvalidReferenceToThisWithNullSafetyTest
+    extends InvalidReferenceToThisTest with WithNullSafetyMixin {
   test_instanceVariableInitializer_inDeclaration_late() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_required_named_param_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_required_named_param_test.dart
index baca673..50c6f22 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_required_named_param_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_required_named_param_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,12 +14,11 @@
 }
 
 @reflectiveTest
-class InvalidRequiredNamedParamTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidRequiredNamedParamTest extends PubPackageResolutionTest {
   @override
   void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_namedParameter_withDefault() async {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_required_optional_positional_param_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_required_optional_positional_param_test.dart
index 71ba74c..4af82b8 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_required_optional_positional_param_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_required_optional_positional_param_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,12 +14,12 @@
 }
 
 @reflectiveTest
-class InvalidRequiredOptionalPositionalParamTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidRequiredOptionalPositionalParamTest
+    extends PubPackageResolutionTest {
   @override
   void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_positionalParameter_noDefault() async {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_required_positional_param_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_required_positional_param_test.dart
index 5717328..39caa76 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_required_positional_param_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_required_positional_param_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,12 +14,11 @@
 }
 
 @reflectiveTest
-class InvalidRequiredPositionalParamTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidRequiredPositionalParamTest extends PubPackageResolutionTest {
   @override
   void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_requiredPositionalParameter() async {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_sealed_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_sealed_annotation_test.dart
index 9273a7b..20a4f62 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_sealed_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_sealed_annotation_test.dart
@@ -3,24 +3,22 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(InvalidLiteralAnnotationTest);
+    defineReflectiveTests(InvalidSealedAnnotationTest);
   });
 }
 
 @reflectiveTest
-class InvalidLiteralAnnotationTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidSealedAnnotationTest extends PubPackageResolutionTest {
   @override
-  setUp() {
+  void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_class() async {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_super_invocation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_super_invocation_test.dart
new file mode 100644
index 0000000..bf48fa1
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_super_invocation_test.dart
@@ -0,0 +1,38 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidSuperInvocationTest);
+  });
+}
+
+@reflectiveTest
+class InvalidSuperInvocationTest extends PubPackageResolutionTest {
+  test_superBeforeAssert() async {
+    await assertErrorsInCode(r'''
+class A {
+  A(int x) : super(), assert(x != null);
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 23, 7),
+    ]);
+  }
+
+  test_superBeforeAssignment() async {
+    await assertErrorsInCode(r'''
+class A {
+  final int x;
+  A() : super(), x = 1;
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 33, 7),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_list_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_list_test.dart
index 334e8e1..a47fffd 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_list_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_list_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidTypeArgumentInConstListTest extends DriverResolutionTest {
+class InvalidTypeArgumentInConstListTest extends PubPackageResolutionTest {
   test_type_parameter() async {
     await assertErrorsInCode(r'''
 class A<E> {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_map_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_map_test.dart
index 8d0bf55..3c75e1d 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_map_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_map_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidTypeArgumentInConstMapTest extends DriverResolutionTest {
+class InvalidTypeArgumentInConstMapTest extends PubPackageResolutionTest {
   test_key() async {
     await assertErrorsInCode(r'''
 class A<E> {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_set_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_set_test.dart
index aaffeb6..fe0c076 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_set_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_type_argument_in_const_set_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidTypeArgumentInConstSetTest extends DriverResolutionTest {
+class InvalidTypeArgumentInConstSetTest extends PubPackageResolutionTest {
   test_type_parameter() async {
     await assertErrorsInCode(r'''
 class A<E> {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_uri_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_uri_test.dart
index 3240d4d..3304a00 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_uri_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_uri_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidUriTest extends DriverResolutionTest {
+class InvalidUriTest extends PubPackageResolutionTest {
   test_emptyUri() async {
     await assertNoErrorsInCode('''
 import '' as top;
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_use_of_covariant_in_extension_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_use_of_covariant_in_extension_test.dart
index 93d316f..93727c5 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_use_of_covariant_in_extension_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_use_of_covariant_in_extension_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvalidUseOfCovariantInExtensionTest extends DriverResolutionTest {
+class InvalidUseOfCovariantInExtensionTest extends PubPackageResolutionTest {
   test_optional_named() async {
     await assertErrorsInCode('''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_use_of_protected_member_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_use_of_protected_member_test.dart
index 1a807fe..9c15de5 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_use_of_protected_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_use_of_protected_member_test.dart
@@ -3,11 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,11 +15,15 @@
 }
 
 @reflectiveTest
-class InvalidUseOfProtectedMemberTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidUseOfProtectedMemberTest extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfigWithMeta();
+  }
+
   test_closure() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 
 class A {
@@ -28,7 +31,7 @@
   int a() => 42;
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 
 void main() {
@@ -37,14 +40,13 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_PROTECTED_MEMBER, 56, 1),
     ]);
   }
 
   test_extendingSubclass() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -57,15 +59,14 @@
   }
 
   test_extension_outsideClassAndFile() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @protected
   void a(int i) {}
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 extension E on A {
   e() {
@@ -74,14 +75,13 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_PROTECTED_MEMBER, 51, 1),
     ]);
   }
 
   test_field() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -95,29 +95,27 @@
   }
 
   test_field_outsideClassAndLibrary() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @protected
   int a;
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 abstract class B {
   int b() => new A().a;
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_PROTECTED_MEMBER, 60, 1),
     ]);
   }
 
   test_field_subclassAndSameLibrary() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -130,15 +128,14 @@
   }
 
   test_fromSuperclassConstraint() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 abstract class A {
   @protected
   void foo() {}
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 mixin M on A {
   @override
@@ -148,20 +145,19 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart');
   }
 
   test_function_outsideClassAndLibrary() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @protected
   void a(){ }
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 
 main() {
@@ -169,14 +165,13 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_PROTECTED_MEMBER, 40, 1),
     ]);
   }
 
   test_function_sameLibrary() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -189,7 +184,6 @@
   }
 
   test_function_subclass() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -203,7 +197,6 @@
   }
 
   test_getter() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -217,15 +210,14 @@
   }
 
   test_getter_outsideClassAndLibrary() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @protected
   int get a => 42;
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 class B {
   A a;
@@ -233,14 +225,13 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_PROTECTED_MEMBER, 52, 1),
     ]);
   }
 
   test_getter_subclass() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -253,8 +244,7 @@
   }
 
   test_inDocs() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 
 class A {
@@ -268,26 +258,25 @@
   int a() => 0;
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 /// OK: [A.a], [A.b], [A.c].
 f() {}
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart');
   }
 
   test_method_outsideClassAndLibrary() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @protected
   void a() {}
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 
 class B {
@@ -295,15 +284,14 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_PROTECTED_MEMBER, 53, 1),
     ]);
   }
 
   test_method_subclass() async {
     // https://github.com/dart-lang/linter/issues/257
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 
@@ -323,7 +311,6 @@
   }
 
   test_mixingIn() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -339,7 +326,6 @@
     // TODO(srawlins): This test verifies that the analyzer **allows**
     // protected members to be called from static members, which violates the
     // protected spec.
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -351,7 +337,6 @@
   }
 
   test_sameLibrary() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -370,15 +355,14 @@
     // TODO(srawlins): This test verifies that the analyzer **allows**
     // protected members to be called on objects other than `this`, which
     // violates the protected spec.
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @protected
   void set a(int i) { }
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 class B {
   A a;
@@ -388,14 +372,13 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_PROTECTED_MEMBER, 56, 1),
     ]);
   }
 
   test_setter_sameClass() async {
-    addMetaPackage();
     await assertErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -412,7 +395,6 @@
   }
 
   test_setter_subclass() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -428,7 +410,6 @@
   }
 
   test_setter_subclassImplementing() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 class A {
@@ -443,7 +424,6 @@
   }
 
   test_topLevelVariable() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @protected
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_template_member_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_template_member_test.dart
index 858747c..d894e7d 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_template_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_template_member_test.dart
@@ -2,13 +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:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,11 +16,19 @@
 }
 
 @reflectiveTest
-class InvalidUseOfVisibleForTemplateMemberTest extends DriverResolutionTest
-    with PackageMixin {
-  void addAngularMetaPackage() {
-    Folder lib = addPubPackage('angular_meta');
-    newFile(join(lib.path, 'angular_meta.dart'), content: r'''
+class InvalidUseOfVisibleForTemplateMemberTest
+    extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+
+    var metaPath = '/packages/meta';
+    PackagesContent.addMetaPackageFiles(
+      getFolder(metaPath),
+    );
+
+    var angularMetaPath = '/packages/angular_meta';
+    newFile('$angularMetaPath/lib/angular_meta.dart', content: r'''
 library angular.meta;
 
 const _VisibleForTemplate visibleForTemplate = const _VisibleForTemplate();
@@ -30,76 +37,77 @@
   const _VisibleForTemplate();
 }
 ''');
+
+    writeTestPackageConfig({
+      'meta': metaPath,
+      'angular_meta': angularMetaPath,
+    });
   }
 
   test_export() async {
-    addAngularMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 
 @visibleForTemplate
 int fn0() => 1;
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 export 'lib1.dart' show fn0;
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart');
   }
 
   test_functionInExtension() async {
-    addAngularMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 extension E on List {
   @visibleForTemplate
   int m() => 1;
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 void main() {
   E([]).m();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER, 42, 1),
     ]);
   }
 
   test_functionInExtension_fromTemplate() async {
-    addAngularMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 extension E on List {
   @visibleForTemplate
   int m() => 1;
 }
 ''');
-    newFile('/lib1.template.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.template.dart', content: r'''
 import 'lib1.dart';
 void main() {
   E([]).m();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib1.template.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib1.template.dart');
   }
 
   test_method() async {
-    addAngularMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 class A {
   @visibleForTemplate
   void a(){ }
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 
 class B {
@@ -107,23 +115,21 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER, 53, 1),
     ]);
   }
 
   test_method_fromTemplate() async {
-    addAngularMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 class A {
   @visibleForTemplate
   void a(){ }
 }
 ''');
-    addAngularMetaPackage();
-    newFile('/lib1.template.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.template.dart', content: r'''
 import 'lib1.dart';
 
 class B {
@@ -131,13 +137,12 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib1.template.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib1.template.dart');
   }
 
   test_namedConstructor() async {
-    addAngularMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 class A {
   int _x;
@@ -146,7 +151,7 @@
   A.forTemplate(this._x);
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 
 void main() {
@@ -154,17 +159,16 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart', [
       error(HintCode.UNUSED_FIELD, 65, 2),
     ]);
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER, 41, 13),
     ]);
   }
 
   test_propertyAccess() async {
-    addAngularMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 class A {
   @visibleForTemplate
@@ -174,7 +178,7 @@
   set b(_) => 7;
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 
 void main() {
@@ -183,17 +187,15 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER, 45, 1),
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER, 58, 1),
     ]);
   }
 
   test_protectedAndForTemplate_usedAsProtected() async {
-    addAngularMetaPackage();
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 import 'package:meta/meta.dart';
 class A {
@@ -202,21 +204,19 @@
   void a(){ }
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 class B extends A {
   void b() => new A().a();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart');
   }
 
   test_protectedAndForTemplate_usedAsTemplate() async {
-    addAngularMetaPackage();
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 import 'package:meta/meta.dart';
 class A {
@@ -225,28 +225,25 @@
   void a(){ }
 }
 ''');
-    addAngularMetaPackage();
-    addMetaPackage();
-    newFile('/lib1.template.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.template.dart', content: r'''
 import 'lib1.dart';
 void main() {
   new A().a();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib1.template.dart');
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib1.template.dart');
   }
 
   test_topLevelFunction() async {
-    addAngularMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 
 @visibleForTemplate
 int fn0() => 1;
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 
 void main() {
@@ -254,15 +251,14 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart');
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER, 37, 3),
     ]);
   }
 
   test_unnamedConstructor() async {
-    addAngularMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 import 'package:angular_meta/angular_meta.dart';
 class A {
   int _x;
@@ -271,7 +267,7 @@
   A(this._x);
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 import 'lib1.dart';
 
 void main() {
@@ -279,10 +275,10 @@
 }
 ''');
 
-    await _resolveFile('/lib1.dart', [
+    await _resolveFile('$testPackageLibPath/lib1.dart', [
       error(HintCode.UNUSED_FIELD, 65, 2),
     ]);
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageLibPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER, 41, 1),
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_testing_member_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_testing_member_test.dart
index ba4d62f..80c9b7b 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_testing_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_testing_member_test.dart
@@ -3,11 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,152 +15,152 @@
 }
 
 @reflectiveTest
-class InvalidUseOfVisibleForTestingMemberTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidUseOfVisibleForTestingMemberTest extends PubPackageResolutionTest {
+  @override
+  String get testPackageRootPath => '/home/my';
+
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfigWithMeta();
+  }
+
   test_export() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 @visibleForTesting
 int fn0() => 1;
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 export 'lib1.dart' show fn0;
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart');
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/lib2.dart');
   }
 
   test_fromTestDirectory() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @visibleForTesting
   void a(){ }
 }
 ''');
-    newFile('/test/test.dart', content: r'''
+    newFile('$testPackageRootPath/test/test.dart', content: r'''
 import '../lib1.dart';
 class B {
   void b() => new A().a();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/test/test.dart');
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/test/test.dart');
   }
 
   test_fromTestingDirectory() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @visibleForTesting
   void a(){ }
 }
 ''');
-    newFile('/testing/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/testing/lib1.dart', content: r'''
 import '../lib1.dart';
 class C {
   void b() => new A().a();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/testing/lib1.dart');
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/testing/lib1.dart');
   }
 
   test_functionInExtension() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 extension E on List {
   @visibleForTesting
   int m() => 1;
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 import 'lib1.dart';
 void main() {
   E([]).m();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER, 42, 1),
     ]);
   }
 
   test_functionInExtension_fromTestDirectory() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 extension E on List {
   @visibleForTesting
   int m() => 1;
 }
 ''');
-    newFile('/test/test.dart', content: r'''
+    newFile('$testPackageRootPath/test/test.dart', content: r'''
 import '../lib1.dart';
 void main() {
   E([]).m();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/test/test.dart');
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/test/test.dart');
   }
 
   test_getter() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @visibleForTesting
   int get a => 7;
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 import 'lib1.dart';
 void main() {
   new A().a;
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER, 44, 1),
     ]);
   }
 
   test_method() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @visibleForTesting
   void a(){ }
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 import 'lib1.dart';
 class B {
   void b() => new A().a();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER, 52, 1),
     ]);
   }
 
   test_mixin() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 mixin M {
   @visibleForTesting
@@ -169,22 +168,21 @@
 }
 class C with M {}
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 import 'lib1.dart';
 void main() {
   C().m();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER, 40, 1),
     ]);
   }
 
   test_namedConstructor() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   int _x;
@@ -193,25 +191,24 @@
   A.forTesting(this._x);
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 import 'lib1.dart';
 void main() {
   new A.forTesting(0);
 }
 ''');
 
-    await _resolveFile('/lib1.dart', [
+    await _resolveFile('$testPackageRootPath/lib1.dart', [
       error(HintCode.UNUSED_FIELD, 49, 2),
     ]);
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageRootPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER, 40, 12,
           messageContains: 'A.forTesting'),
     ]);
   }
 
   test_protectedAndForTesting_usedAsProtected() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @protected
@@ -219,20 +216,19 @@
   void a(){ }
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 import 'lib1.dart';
 class B extends A {
   void b() => new A().a();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart');
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/lib2.dart');
   }
 
   test_protectedAndForTesting_usedAsTesting() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @protected
@@ -240,63 +236,59 @@
   void a(){ }
 }
 ''');
-    addMetaPackage();
-    newFile('/test/test1.dart', content: r'''
+    newFile('$testPackageRootPath/test/test1.dart', content: r'''
 import '../lib1.dart';
 void main() {
   new A().a();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/test/test1.dart');
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/test/test1.dart');
   }
 
   test_setter() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   @visibleForTesting
   set b(_) => 7;
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 import 'lib1.dart';
 void main() {
   new A().b = 6;
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER, 44, 1),
     ]);
   }
 
   test_topLevelFunction() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 @visibleForTesting
 int fn0() => 1;
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 import 'lib1.dart';
 void main() {
   fn0();
 }
 ''');
 
-    await _resolveFile('/lib1.dart');
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageRootPath/lib1.dart');
+    await _resolveFile('$testPackageRootPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER, 36, 3),
     ]);
   }
 
   test_unnamedConstructor() async {
-    addMetaPackage();
-    newFile('/lib1.dart', content: r'''
+    newFile('$testPackageRootPath/lib1.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   int _x;
@@ -305,17 +297,17 @@
   A(this._x);
 }
 ''');
-    newFile('/lib2.dart', content: r'''
+    newFile('$testPackageRootPath/lib2.dart', content: r'''
 import 'lib1.dart';
 void main() {
   new A(0);
 }
 ''');
 
-    await _resolveFile('/lib1.dart', [
+    await _resolveFile('$testPackageRootPath/lib1.dart', [
       error(HintCode.UNUSED_FIELD, 49, 2),
     ]);
-    await _resolveFile('/lib2.dart', [
+    await _resolveFile('$testPackageRootPath/lib2.dart', [
       error(HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER, 40, 1),
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_visibility_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_visibility_annotation_test.dart
index 24aa6a1..4a42fcd 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_visibility_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_visibility_annotation_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,12 +14,11 @@
 }
 
 @reflectiveTest
-class InvalidVisibilityAnnotationTest extends DriverResolutionTest
-    with PackageMixin {
+class InvalidVisibilityAnnotationTest extends PubPackageResolutionTest {
   @override
   void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_fields_multipleMixed() async {
diff --git a/pkg/analyzer/test/src/diagnostics/invocation_of_extension_without_call_test.dart b/pkg/analyzer/test/src/diagnostics/invocation_of_extension_without_call_test.dart
index 21e2e99..780de76 100644
--- a/pkg/analyzer/test/src/diagnostics/invocation_of_extension_without_call_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invocation_of_extension_without_call_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class InvocationOfExtensionWithoutCallTest extends DriverResolutionTest {
+class InvocationOfExtensionWithoutCallTest extends PubPackageResolutionTest {
   test_instance_differentKind() async {
     await assertErrorsInCode('''
 extension E on Object {}
diff --git a/pkg/analyzer/test/src/diagnostics/invocation_of_non_function_expression_test.dart b/pkg/analyzer/test/src/diagnostics/invocation_of_non_function_expression_test.dart
new file mode 100644
index 0000000..1a329c0
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invocation_of_non_function_expression_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.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvocationOfNonFunctionExpressionTest);
+  });
+}
+
+@reflectiveTest
+class InvocationOfNonFunctionExpressionTest extends PubPackageResolutionTest {
+  test_invocationOfNonFunctionExpression_literal() async {
+    await assertErrorsInCode(r'''
+f() {
+  3(5);
+}
+''', [
+      error(CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, 8, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/label_in_outer_scope_test.dart b/pkg/analyzer/test/src/diagnostics/label_in_outer_scope_test.dart
index 851ddf0..7fa6830 100644
--- a/pkg/analyzer/test/src/diagnostics/label_in_outer_scope_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/label_in_outer_scope_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class LabelInOuterScopeTest extends DriverResolutionTest {
+class LabelInOuterScopeTest extends PubPackageResolutionTest {
   test_label_in_outer_scope() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/label_undefined_test.dart b/pkg/analyzer/test/src/diagnostics/label_undefined_test.dart
index 503c009..7918d11 100644
--- a/pkg/analyzer/test/src/diagnostics/label_undefined_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/label_undefined_test.dart
@@ -6,8 +6,7 @@
 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';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +16,7 @@
 }
 
 @reflectiveTest
-class LabelUndefinedTest extends DriverResolutionTest {
+class LabelUndefinedTest extends PubPackageResolutionTest {
   test_break() async {
     await assertErrorsInCode(r'''
 f() {
diff --git a/pkg/analyzer/test/src/diagnostics/late_final_field_with_const_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/late_final_field_with_const_constructor_test.dart
index 58d3572..868c233 100644
--- a/pkg/analyzer/test/src/diagnostics/late_final_field_with_const_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/late_final_field_with_const_constructor_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,15 +14,11 @@
 }
 
 @reflectiveTest
-class LateFinalFieldWithConstConstructorTest extends DriverResolutionTest {
+class LateFinalFieldWithConstConstructorTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   static const _errorCode =
       CompileTimeErrorCode.LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR;
 
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
   test_class_hasConstConstructor_instance_hasInitializer() async {
     await assertErrorsInCode('''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/late_final_local_already_assigned_test.dart b/pkg/analyzer/test/src/diagnostics/late_final_local_already_assigned_test.dart
index bfae4d0..0bc97d0 100644
--- a/pkg/analyzer/test/src/diagnostics/late_final_local_already_assigned_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/late_final_local_already_assigned_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,15 +14,8 @@
 }
 
 @reflectiveTest
-class LateFinalLocalAlreadyAssignedTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class LateFinalLocalAlreadyAssignedTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_assignmentExpression_compound() async {
     await assertErrorsInCode('''
 main() {
diff --git a/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart
index bdd4b72..9f57784 100644
--- a/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class ListElementTypeNotAssignableTest extends DriverResolutionTest {
+class ListElementTypeNotAssignableTest extends PubPackageResolutionTest {
   test_const_ifElement_thenElseFalse_intInt() async {
     await assertErrorsInCode(
         '''
@@ -42,8 +42,8 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(
-                    StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 82, 1),
+                error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 82,
+                    1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 64, 19),
@@ -57,13 +57,13 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(
-                    StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 31, 3),
+                error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 31,
+                    3),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 20, 14),
-                error(
-                    StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 31, 3),
+                error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 31,
+                    3),
               ]);
   }
 
@@ -101,8 +101,8 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(
-                    StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 53, 1),
+                error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 53,
+                    1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, 43, 11),
@@ -125,7 +125,7 @@
     await assertErrorsInCode('''
 var v = const <String>[42];
 ''', [
-      error(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 23, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 23, 2),
     ]);
   }
 
@@ -134,7 +134,7 @@
 const dynamic x = 42;
 var v = const <String>[x];
 ''', [
-      error(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 45, 1),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 45, 1),
     ]);
   }
 
@@ -184,7 +184,7 @@
     await assertErrorsInCode('''
 var v = <int>[if (1 < 0) 'a'];
 ''', [
-      error(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 25, 3),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 25, 3),
     ]);
   }
 
@@ -212,7 +212,7 @@
     await assertErrorsInCode('''
 var v = <String>[42];
 ''', [
-      error(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 17, 2),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 17, 2),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart b/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart
index 3a1725e..9300295 100644
--- a/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MapEntryNotInMapTest extends DriverResolutionTest {
+class MapEntryNotInMapTest extends PubPackageResolutionTest {
   test_set() async {
     await assertErrorsInCode('''
 var c = <int>{1:2};
diff --git a/pkg/analyzer/test/src/diagnostics/map_key_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/map_key_type_not_assignable_test.dart
index 3d3f4a3..3281891 100644
--- a/pkg/analyzer/test/src/diagnostics/map_key_type_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/map_key_type_not_assignable_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class MapKeyTypeNotAssignableTest extends DriverResolutionTest {
+class MapKeyTypeNotAssignableTest extends PubPackageResolutionTest {
   test_const_ifElement_thenElseFalse_intInt_dynamic() async {
     await assertErrorsInCode(
         '''
@@ -42,7 +42,7 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 94, 1),
+                error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 94, 1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 70, 32),
@@ -69,11 +69,11 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 37, 3),
+                error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 37, 3),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 26, 20),
-                error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 37, 3),
+                error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 37, 3),
               ]);
   }
 
@@ -98,7 +98,7 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 59, 1),
+                error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 59, 1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 49, 17),
@@ -132,7 +132,7 @@
 const dynamic a = 'a';
 var v = const <int, bool>{a : true};
 ''', [
-      error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 49, 1),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 49, 1),
     ]);
   }
 
@@ -140,7 +140,7 @@
     await assertErrorsInCode('''
 var v = const <int, bool>{'a' : true};
 ''', [
-      error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 26, 3),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 26, 3),
     ]);
   }
 
@@ -164,11 +164,11 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 55, 1),
+                error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 55, 1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 51, 11),
-                error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 55, 1),
+                error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 55, 1),
               ]);
   }
 
@@ -198,7 +198,7 @@
     await assertErrorsInCode('''
 var v = <int, bool>{if (1 < 0) 'a': true};
 ''', [
-      error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 31, 3),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 31, 3),
     ]);
   }
 
@@ -234,7 +234,7 @@
     await assertErrorsInCode('''
 var v = <int, bool>{'a' : true};
 ''', [
-      error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 20, 3),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 20, 3),
     ]);
   }
 
@@ -254,7 +254,7 @@
     await assertErrorsInCode('''
 var v = <int, String>{...{'a': 'a'}};
 ''', [
-      error(StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 26, 3),
+      error(CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, 26, 3),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/map_value_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/map_value_type_not_assignable_test.dart
index e540eed..794cc75 100644
--- a/pkg/analyzer/test/src/diagnostics/map_value_type_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/map_value_type_not_assignable_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class MapValueTypeNotAssignableTest extends DriverResolutionTest {
+class MapValueTypeNotAssignableTest extends PubPackageResolutionTest {
   test_const_ifElement_thenElseFalse_intInt_dynamic() async {
     await assertErrorsInCode(
         '''
@@ -42,7 +42,8 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 101, 1),
+                error(
+                    CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 101, 1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 70, 32),
@@ -69,11 +70,13 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 43, 3),
+                error(
+                    CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 43, 3),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 26, 20),
-                error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 43, 3),
+                error(
+                    CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 43, 3),
               ]);
   }
 
@@ -98,7 +101,8 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 65, 1),
+                error(
+                    CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 65, 1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 49, 17),
@@ -132,7 +136,7 @@
 const dynamic a = 'a';
 var v = const <bool, int>{true: a};
 ''', [
-      error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 55, 1),
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 55, 1),
     ]);
   }
 
@@ -140,7 +144,7 @@
     await assertErrorsInCode('''
 var v = const <bool, int>{true: 'a'};
 ''', [
-      error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 32, 3),
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 32, 3),
     ]);
   }
 
@@ -164,11 +168,13 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 59, 1),
+                error(
+                    CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 59, 1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT, 49, 12),
-                error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 59, 1),
+                error(
+                    CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 59, 1),
               ]);
   }
 
@@ -192,7 +198,7 @@
     await assertErrorsInCode('''
 var v = <bool, int>{if (1 < 0) true: 'a'};
 ''', [
-      error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 37, 3),
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 37, 3),
     ]);
   }
 
@@ -228,7 +234,7 @@
     await assertErrorsInCode('''
 var v = <bool, int>{true: 'a'};
 ''', [
-      error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 26, 3),
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 26, 3),
     ]);
   }
 
@@ -248,7 +254,7 @@
     await assertErrorsInCode('''
 var v = <bool, int>{...{true: 'a'}};
 ''', [
-      error(StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 30, 3),
+      error(CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, 30, 3),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/member_with_class_name_test.dart b/pkg/analyzer/test/src/diagnostics/member_with_class_name_test.dart
index 3558cc0..6590bfd 100644
--- a/pkg/analyzer/test/src/diagnostics/member_with_class_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/member_with_class_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MemberWithClassNameTest extends DriverResolutionTest {
+class MemberWithClassNameTest extends PubPackageResolutionTest {
   test_field() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/mismatched_annotation_on_struct_field_test.dart b/pkg/analyzer/test/src/diagnostics/mismatched_annotation_on_struct_field_test.dart
index 1e5a88a..b404bde 100644
--- a/pkg/analyzer/test/src/diagnostics/mismatched_annotation_on_struct_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mismatched_annotation_on_struct_field_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MismatchedAnnotationOnStructFieldTest extends DriverResolutionTest {
+class MismatchedAnnotationOnStructFieldTest extends PubPackageResolutionTest {
   test_double_on_int() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/missing_annotation_on_struct_field_test.dart b/pkg/analyzer/test/src/diagnostics/missing_annotation_on_struct_field_test.dart
index 0e7fdde..1a5a83c 100644
--- a/pkg/analyzer/test/src/diagnostics/missing_annotation_on_struct_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/missing_annotation_on_struct_field_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MissingAnnotationOnStructFieldTest extends DriverResolutionTest {
+class MissingAnnotationOnStructFieldTest extends PubPackageResolutionTest {
   test_missing_int() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/missing_default_value_for_parameter_test.dart b/pkg/analyzer/test/src/diagnostics/missing_default_value_for_parameter_test.dart
index b78b72b..dec4111 100644
--- a/pkg/analyzer/test/src/diagnostics/missing_default_value_for_parameter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/missing_default_value_for_parameter_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.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,12 +15,8 @@
 }
 
 @reflectiveTest
-class MissingDefaultValueForParameterTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class MissingDefaultValueForParameterTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_constructor_externalFactory_nonNullable_named_optional_noDefault() async {
     await assertNoErrorsInCode('''
 class C {
diff --git a/pkg/analyzer/test/src/diagnostics/missing_enum_constant_in_switch_test.dart b/pkg/analyzer/test/src/diagnostics/missing_enum_constant_in_switch_test.dart
index 8e7ff2e..33df17a 100644
--- a/pkg/analyzer/test/src/diagnostics/missing_enum_constant_in_switch_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/missing_enum_constant_in_switch_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(MissingEnumConstantInSwitchTest);
-    defineReflectiveTests(MissingEnumConstantInSwitchWithNnbdTest);
+    defineReflectiveTests(MissingEnumConstantInSwitchWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class MissingEnumConstantInSwitchTest extends DriverResolutionTest {
+class MissingEnumConstantInSwitchTest extends PubPackageResolutionTest {
   test_default() async {
     await assertNoErrorsInCode('''
 enum E { one, two, three }
@@ -83,13 +81,8 @@
 }
 
 @reflectiveTest
-class MissingEnumConstantInSwitchWithNnbdTest
-    extends MissingEnumConstantInSwitchTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
+class MissingEnumConstantInSwitchWithNullSafetyTest
+    extends MissingEnumConstantInSwitchTest with WithNullSafetyMixin {
   test_nullable() async {
     await assertErrorsInCode('''
 enum E { one, two }
diff --git a/pkg/analyzer/test/src/diagnostics/missing_exception_value_test.dart b/pkg/analyzer/test/src/diagnostics/missing_exception_value_test.dart
index cbc7895..30c949c 100644
--- a/pkg/analyzer/test/src/diagnostics/missing_exception_value_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/missing_exception_value_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MissingExceptionValueTest extends DriverResolutionTest {
+class MissingExceptionValueTest extends PubPackageResolutionTest {
   test_missing() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/missing_field_type_in_struct_test.dart b/pkg/analyzer/test/src/diagnostics/missing_field_type_in_struct_test.dart
index 2955f38..cfae21f 100644
--- a/pkg/analyzer/test/src/diagnostics/missing_field_type_in_struct_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/missing_field_type_in_struct_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MissingFieldTypeInStructTest extends DriverResolutionTest {
+class MissingFieldTypeInStructTest extends PubPackageResolutionTest {
   test_missing() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/missing_js_lib_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/missing_js_lib_annotation_test.dart
index 561c11b..551fbb3 100644
--- a/pkg/analyzer/test/src/diagnostics/missing_js_lib_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/missing_js_lib_annotation_test.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,10 +16,19 @@
 }
 
 @reflectiveTest
-class MissingJSLibAnnotationTest extends DriverResolutionTest
-    with PackageMixin {
+class MissingJSLibAnnotationTest extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+
+    var path = '/packages/js';
+    PackagesContent.addJsPackageFiles(
+      getFolder(path),
+    );
+    writeTestPackageConfig({'js': path});
+  }
+
   test_class() async {
-    addJsPackage();
     await assertErrorsInCode('''
 library foo;
 
@@ -34,7 +43,6 @@
 
   test_externalField() async {
     // https://github.com/dart-lang/sdk/issues/26987
-    addJsPackage();
     await assertErrorsInCode('''
 import 'package:js/js.dart';
 
@@ -47,7 +55,6 @@
   }
 
   test_function() async {
-    addJsPackage();
     await assertErrorsInCode('''
 library foo;
 
@@ -62,7 +69,6 @@
   }
 
   test_method() async {
-    addJsPackage();
     await assertErrorsInCode('''
 library foo;
 
@@ -78,7 +84,6 @@
   }
 
   test_notMissing() async {
-    addJsPackage();
     await assertNoErrorsInCode('''
 @JS()
 library foo;
@@ -91,7 +96,6 @@
   }
 
   test_variable() async {
-    addJsPackage();
     await assertErrorsInCode('''
 import 'package:js/js.dart';
 
diff --git a/pkg/analyzer/test/src/diagnostics/missing_required_param_test.dart b/pkg/analyzer/test/src/diagnostics/missing_required_param_test.dart
index 8cc3c98..7c3510e 100644
--- a/pkg/analyzer/test/src/diagnostics/missing_required_param_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/missing_required_param_test.dart
@@ -2,28 +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.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(MissingRequiredParamTest);
-    defineReflectiveTests(MissingRequiredParamWithNnbdTest);
+    defineReflectiveTests(MissingRequiredParamWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class MissingRequiredParamTest extends DriverResolutionTest with PackageMixin {
+class MissingRequiredParamTest extends PubPackageResolutionTest {
   @override
-  setUp() {
+  void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_constructor_argumentGiven() async {
@@ -191,23 +188,22 @@
   }
 
   test_method_inOtherLib() async {
-    newFile('/a_lib.dart', content: r'''
-library a_lib;
+    newFile('$testPackageLibPath/a.dart', content: r'''
 import 'package:meta/meta.dart';
 class A {
   void m({@Required('must specify an `a`') int a}) {}
 }
 ''');
-    newFile('/test.dart', content: r'''
-import "a_lib.dart";
+    newFile('$testPackageLibPath/test.dart', content: r'''
+import 'a.dart';
 f() {
   new A().m();
 }
 ''');
 
-    await _resolveFile('/a_lib.dart');
-    await _resolveFile('/test.dart', [
-      error(HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS, 37, 1),
+    await _resolveFile('$testPackageLibPath/a.dart');
+    await _resolveFile('$testPackageLibPath/test.dart', [
+      error(HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS, 33, 1),
     ]);
   }
 
@@ -246,12 +242,8 @@
 }
 
 @reflectiveTest
-class MissingRequiredParamWithNnbdTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class MissingRequiredParamWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_constructor_argumentGiven() async {
     await assertNoErrorsInCode(r'''
 class C {
@@ -314,6 +306,18 @@
     ]);
   }
 
+  test_function_call() async {
+    await assertErrorsInCode(r'''
+void f({required int a}) {}
+
+main() {
+  f.call();
+}
+''', [
+      error(CompileTimeErrorCode.MISSING_REQUIRED_ARGUMENT, 46, 2),
+    ]);
+  }
+
   test_functionInvocation() async {
     await assertErrorsInCode(r'''
 void Function({required int a}) f() => throw '';
@@ -339,7 +343,7 @@
   }
 
   test_method_inOtherLib() async {
-    newFile('/test/lib/a_lib.dart', content: r'''
+    newFile('$testPackageLibPath/a_lib.dart', content: r'''
 class A {
   void m({required int a}) {}
 }
@@ -355,7 +359,7 @@
   }
 
   test_method_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void foo({required int a}) {}
 }
diff --git a/pkg/analyzer/test/src/diagnostics/missing_return_test.dart b/pkg/analyzer/test/src/diagnostics/missing_return_test.dart
index 3441f21..4d9fec5 100644
--- a/pkg/analyzer/test/src/diagnostics/missing_return_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/missing_return_test.dart
@@ -3,21 +3,21 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(MissingReturnTest);
+    defineReflectiveTests(MissingReturnWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class MissingReturnTest extends DriverResolutionTest with PackageMixin {
+class MissingReturnTest extends PubPackageResolutionTest {
   test_alwaysThrows() async {
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 
@@ -213,3 +213,23 @@
     ]);
   }
 }
+
+@reflectiveTest
+class MissingReturnWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
+  test_returnNever() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+Never foo() {
+  throw 0;
+}
+''');
+    await assertNoErrorsInCode(r'''
+// @dart = 2.8
+import 'a.dart';
+
+int f() {
+  foo();
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_application_not_implemented_interface_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_application_not_implemented_interface_test.dart
index 4e8f9a4..13fcb26 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_application_not_implemented_interface_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_application_not_implemented_interface_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,8 @@
 }
 
 @reflectiveTest
-class MixinApplicationNotImplementedInterfaceTest extends DriverResolutionTest {
+class MixinApplicationNotImplementedInterfaceTest
+    extends PubPackageResolutionTest {
   test_matchingClass_inPreviousMixin_new_syntax() async {
     await assertNoErrorsInCode('''
 abstract class A<T> {}
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_class_declares_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_class_declares_constructor_test.dart
index 11017b8..baece03 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_class_declares_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_class_declares_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MixinClassDeclaresConstructorTest extends DriverResolutionTest {
+class MixinClassDeclaresConstructorTest extends PubPackageResolutionTest {
   test_classDeclaration() async {
     await assertErrorsInCode(
       r'''
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_declares_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_declares_constructor_test.dart
index 355a804..e171fde 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_declares_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_declares_constructor_test.dart
@@ -4,9 +4,10 @@
 
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +16,7 @@
 }
 
 @reflectiveTest
-class MixinDeclaresConstructorTest extends DriverResolutionTest {
+class MixinDeclaresConstructorTest extends PubPackageResolutionTest {
   test_fieldFormalParameter() async {
     await assertErrorsInCode(r'''
 mixin M {
@@ -24,6 +25,9 @@
 }
 ''', [
       error(ParserErrorCode.MIXIN_DECLARES_CONSTRUCTOR, 27, 1),
+      // TODO(srawlins): Don't report this from within a mixin.
+      error(
+          CompileTimeErrorCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, 29, 6),
     ]);
 
     var element = findElement.mixin('M');
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_deferred_class_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_deferred_class_test.dart
index b37129a..a9bccb9 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_deferred_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_deferred_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class MixinDeferredClassTest extends DriverResolutionTest {
+class MixinDeferredClassTest extends PubPackageResolutionTest {
   test_classTypeAlias() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}
 ''');
@@ -31,7 +31,7 @@
   }
 
   test_mixin_deferred_class() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_inherits_from_not_object_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_inherits_from_not_object_test.dart
index 3ca2493..7bcbe74 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_inherits_from_not_object_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_inherits_from_not_object_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MixinInheritsFromNotObjectTest extends DriverResolutionTest {
+class MixinInheritsFromNotObjectTest extends PubPackageResolutionTest {
   test_classDeclaration_extends() async {
     await assertErrorsInCode(r'''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_of_disallowed_class_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_of_disallowed_class_test.dart
index b22ce50..b72300b 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_of_disallowed_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_of_disallowed_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MixinOfDisallowedClassTest extends DriverResolutionTest {
+class MixinOfDisallowedClassTest extends PubPackageResolutionTest {
   test_class_bool() async {
     await assertErrorsInCode('''
 class A extends Object with bool {}
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_of_non_class_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_of_non_class_test.dart
index 937abac..df4c58b 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_of_non_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_of_non_class_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(MixinOfNonClassTest);
-    defineReflectiveTests(MixinOfNonClassWithNnbdTest);
+    defineReflectiveTests(MixinOfNonClassWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class MixinOfNonClassTest extends DriverResolutionTest {
+class MixinOfNonClassTest extends PubPackageResolutionTest {
   test_class() async {
     await assertErrorsInCode(r'''
 int A = 7;
@@ -60,12 +58,8 @@
 }
 
 @reflectiveTest
-class MixinOfNonClassWithNnbdTest extends MixinOfNonClassTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class MixinOfNonClassWithNullSafetyTest extends MixinOfNonClassTest
+    with WithNullSafetyMixin {
   test_Never() async {
     await assertErrorsInCode('''
 class A with Never {}
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_on_sealed_class_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_on_sealed_class_test.dart
index aefd37f..74a169e 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_on_sealed_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_on_sealed_class_test.dart
@@ -107,6 +107,7 @@
   /// that [root] is the root of a PubWorkspace, and a PubWorkspacePackage.
   void _newPubPackageRoot(String root) {
     newFile('$root/pubspec.yaml');
+    configureWorkspace(root: root);
   }
 
   /// Resolve the file with the given [path].
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_super_class_constraint_non_interface_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_super_class_constraint_non_interface_test.dart
index cb304c57..cec22cb 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_super_class_constraint_non_interface_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_super_class_constraint_non_interface_test.dart
@@ -2,31 +2,26 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(MixinSuperClassConstraintNonInterfaceTest);
-    defineReflectiveTests(MixinSuperClassConstraintNonInterfaceWithNnbdTest);
+    defineReflectiveTests(
+        MixinSuperClassConstraintNonInterfaceWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class MixinSuperClassConstraintNonInterfaceTest extends DriverResolutionTest {}
+class MixinSuperClassConstraintNonInterfaceTest
+    extends PubPackageResolutionTest {}
 
 @reflectiveTest
-class MixinSuperClassConstraintNonInterfaceWithNnbdTest
-    extends MixinSuperClassConstraintNonInterfaceTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class MixinSuperClassConstraintNonInterfaceWithNullSafetyTest
+    extends MixinSuperClassConstraintNonInterfaceTest with WithNullSafetyMixin {
   test_Never() async {
     await assertErrorsInCode('''
 mixin M on Never {}
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_with_non_class_superclass_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_with_non_class_superclass_test.dart
index aa6a3af..ea23d2e 100644
--- a/pkg/analyzer/test/src/diagnostics/mixin_with_non_class_superclass_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/mixin_with_non_class_superclass_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MixinWithNonClassSuperclassTest extends DriverResolutionTest {
+class MixinWithNonClassSuperclassTest extends PubPackageResolutionTest {
   test_class() async {
     await assertErrorsInCode(r'''
 int A;
diff --git a/pkg/analyzer/test/src/diagnostics/mixins_super_class_test.dart b/pkg/analyzer/test/src/diagnostics/mixins_super_class_test.dart
new file mode 100644
index 0000000..b7b7ff6
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/mixins_super_class_test.dart
@@ -0,0 +1,35 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MixinsSuperClassTest);
+  });
+}
+
+@reflectiveTest
+class MixinsSuperClassTest extends PubPackageResolutionTest {
+  test_class() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B extends A with A {}
+''', [
+      error(CompileTimeErrorCode.MIXINS_SUPER_CLASS, 34, 1),
+    ]);
+  }
+
+  test_classAlias() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B = A with A;
+''', [
+      error(CompileTimeErrorCode.MIXINS_SUPER_CLASS, 28, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/multiple_redirecting_constructor_invocations_test.dart b/pkg/analyzer/test/src/diagnostics/multiple_redirecting_constructor_invocations_test.dart
new file mode 100644
index 0000000..293caf5
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/multiple_redirecting_constructor_invocations_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:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MultipleRedirectingConstructorInvocationsTest);
+  });
+}
+
+@reflectiveTest
+class MultipleRedirectingConstructorInvocationsTest
+    extends PubPackageResolutionTest {
+  test_twoNamedConstructorInvocations() async {
+    await assertErrorsInCode(r'''
+class A {
+  A() : this.a(), this.b();
+  A.a() {}
+  A.b() {}
+}
+''', [
+      error(CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS,
+          28, 8),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/multiple_super_initializers_test.dart b/pkg/analyzer/test/src/diagnostics/multiple_super_initializers_test.dart
new file mode 100644
index 0000000..dea4b59
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/multiple_super_initializers_test.dart
@@ -0,0 +1,29 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MultipleSuperInitializersTest);
+  });
+}
+
+@reflectiveTest
+class MultipleSuperInitializersTest extends PubPackageResolutionTest {
+  test_twoSuperInitializers() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B extends A {
+  B() : super(), super() {}
+}
+''', [
+      error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 39, 7),
+      error(CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS, 48, 7),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/must_be_a_native_function_type_test.dart b/pkg/analyzer/test/src/diagnostics/must_be_a_native_function_type_test.dart
index 6c1287c..8c6ecc1 100644
--- a/pkg/analyzer/test/src/diagnostics/must_be_a_native_function_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/must_be_a_native_function_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MustBeANativeFunctionTypeTest extends DriverResolutionTest {
+class MustBeANativeFunctionTypeTest extends PubPackageResolutionTest {
   test_fromFunction() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/must_be_a_subtype_test.dart b/pkg/analyzer/test/src/diagnostics/must_be_a_subtype_test.dart
index 244a8c6..551c7ec 100644
--- a/pkg/analyzer/test/src/diagnostics/must_be_a_subtype_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/must_be_a_subtype_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class MustBeASubtypeTest extends DriverResolutionTest {
+class MustBeASubtypeTest extends PubPackageResolutionTest {
   test_fromFunction_firstArgument() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/must_be_immutable_test.dart b/pkg/analyzer/test/src/diagnostics/must_be_immutable_test.dart
index ffb94a7a..4b0f2f1 100644
--- a/pkg/analyzer/test/src/diagnostics/must_be_immutable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/must_be_immutable_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,11 +14,11 @@
 }
 
 @reflectiveTest
-class MustBeImmutableTest extends DriverResolutionTest with PackageMixin {
+class MustBeImmutableTest extends PubPackageResolutionTest {
   @override
   void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_directAnnotation() async {
@@ -60,7 +59,6 @@
   }
 
   test_finalField() async {
-    addMetaPackage();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @immutable
diff --git a/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart b/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart
index d93fced..7a58e23 100644
--- a/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,11 +14,11 @@
 }
 
 @reflectiveTest
-class MustCallSuperTest extends DriverResolutionTest with PackageMixin {
+class MustCallSuperTest extends PubPackageResolutionTest {
   @override
-  setUp() {
+  void setUp() {
     super.setUp();
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
   }
 
   test_containsSuperCall() async {
diff --git a/pkg/analyzer/test/src/diagnostics/native_clause_in_non_sdk_code_test.dart b/pkg/analyzer/test/src/diagnostics/native_clause_in_non_sdk_code_test.dart
new file mode 100644
index 0000000..48365a7
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/native_clause_in_non_sdk_code_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.
+
+import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NativeClauseInNonSdkCodeTest);
+  });
+}
+
+@reflectiveTest
+class NativeClauseInNonSdkCodeTest extends PubPackageResolutionTest {
+  test_nativeClauseInNonSDKCode() async {
+    await assertErrorsInCode('''
+class A native 'string' {}
+''', [
+      error(ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE, 8, 15),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/native_function_body_in_non_sdk_code_test.dart b/pkg/analyzer/test/src/diagnostics/native_function_body_in_non_sdk_code_test.dart
new file mode 100644
index 0000000..189f963
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/native_function_body_in_non_sdk_code_test.dart
@@ -0,0 +1,45 @@
+// 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/generated/parser.dart' show ParserErrorCode;
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NativeFunctionBodyInNonSdkCodeTest);
+  });
+}
+
+@reflectiveTest
+class NativeFunctionBodyInNonSdkCodeTest extends PubPackageResolutionTest {
+  test_function() async {
+    await assertErrorsInCode('''
+int m(a) native 'string';
+''', [
+      error(ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, 9, 16),
+    ]);
+  }
+
+  test_method() async {
+    await assertErrorsInCode(r'''
+class A {
+  static int m(a) native 'string';
+}
+''', [
+      error(ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, 28, 16),
+    ]);
+  }
+
+  test_mixinMethod() async {
+    await assertErrorsInCode(r'''
+mixin A {
+  static int m(a) native 'string';
+}
+''', [
+      error(ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, 28, 16),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/new_with_non_type_test.dart b/pkg/analyzer/test/src/diagnostics/new_with_non_type_test.dart
index 758cb1f..5e3dce3 100644
--- a/pkg/analyzer/test/src/diagnostics/new_with_non_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/new_with_non_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NewWithNonTypeTest extends DriverResolutionTest {
+class NewWithNonTypeTest extends PubPackageResolutionTest {
   test_functionTypeAlias() async {
     await assertErrorsInCode('''
 typedef F = void Function();
@@ -23,12 +23,12 @@
   new F();
 }
 ''', [
-      error(StaticWarningCode.NEW_WITH_NON_TYPE, 49, 1),
+      error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 49, 1),
     ]);
   }
 
   test_imported() async {
-    newFile("/test/lib/lib.dart", content: "class B {}");
+    newFile('$testPackageLibPath/lib.dart', content: "class B {}");
     await assertErrorsInCode('''
 import 'lib.dart' as lib;
 void f() {
@@ -36,7 +36,7 @@
 }
 lib.B b;
 ''', [
-      error(StaticWarningCode.NEW_WITH_NON_TYPE, 47, 1),
+      error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 47, 1),
     ]);
   }
 
@@ -47,7 +47,20 @@
   new A();
 }
 ''', [
-      error(StaticWarningCode.NEW_WITH_NON_TYPE, 28, 1),
+      error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 28, 1),
+    ]);
+  }
+
+  test_malformed_constructor_call() async {
+    await assertErrorsInCode('''
+class C {
+  C.x();
+}
+main() {
+  new C.x.y();
+}
+''', [
+      error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 36, 3),
     ]);
   }
 
@@ -57,7 +70,7 @@
   new T();
 }
 ''', [
-      error(StaticWarningCode.NEW_WITH_NON_TYPE, 22, 1),
+      error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 22, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/new_with_undefined_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/new_with_undefined_constructor_test.dart
index 07eb600..5e3e722 100644
--- a/pkg/analyzer/test/src/diagnostics/new_with_undefined_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/new_with_undefined_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NewWithUndefinedConstructorTest extends DriverResolutionTest {
+class NewWithUndefinedConstructorTest extends PubPackageResolutionTest {
   test_default() async {
     await assertErrorsInCode('''
 class A {
@@ -24,7 +24,7 @@
   new A();
 }
 ''', [
-      error(StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, 38, 1),
+      error(CompileTimeErrorCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, 38, 1),
     ]);
   }
 
@@ -59,7 +59,7 @@
   new A.name();
 }
 ''', [
-      error(StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR, 35, 4),
+      error(CompileTimeErrorCode.NEW_WITH_UNDEFINED_CONSTRUCTOR, 35, 4),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/no_annotation_constructor_arguments_test.dart b/pkg/analyzer/test/src/diagnostics/no_annotation_constructor_arguments_test.dart
new file mode 100644
index 0000000..9a49f06
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/no_annotation_constructor_arguments_test.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.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NoAnnotationConstructorArgumentsTest);
+  });
+}
+
+@reflectiveTest
+class NoAnnotationConstructorArgumentsTest extends PubPackageResolutionTest {
+  test_missingArgumentList() async {
+    await assertErrorsInCode(r'''
+class A {
+  const A();
+}
+@A
+main() {
+}
+''', [
+      error(CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, 25, 2),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/no_combined_super_signature_test.dart b/pkg/analyzer/test/src/diagnostics/no_combined_super_signature_test.dart
index d93e2ef..218e88e 100644
--- a/pkg/analyzer/test/src/diagnostics/no_combined_super_signature_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/no_combined_super_signature_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NoCombinedSuperSignatureTest extends DriverResolutionTest {
+class NoCombinedSuperSignatureTest extends PubPackageResolutionTest {
   test_conflictingParameter() async {
     await assertErrorsInCode('''
 abstract class A {
diff --git a/pkg/analyzer/test/src/diagnostics/no_default_super_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/no_default_super_constructor_test.dart
index 069da67..4995806 100644
--- a/pkg/analyzer/test/src/diagnostics/no_default_super_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/no_default_super_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NoDefaultSuperConstructorTest extends DriverResolutionTest {
+class NoDefaultSuperConstructorTest extends PubPackageResolutionTest {
   test_explicitDefaultSuperConstructor() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/no_generative_constructors_in_superclass_test.dart b/pkg/analyzer/test/src/diagnostics/no_generative_constructors_in_superclass_test.dart
new file mode 100644
index 0000000..573f5aa
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/no_generative_constructors_in_superclass_test.dart
@@ -0,0 +1,97 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NoGenerativeConstructorsInSuperclassTest);
+  });
+}
+
+@reflectiveTest
+class NoGenerativeConstructorsInSuperclassTest
+    extends PubPackageResolutionTest {
+  test_explicit() async {
+    await assertErrorsInCode(r'''
+class A {
+  factory A() => throw '';
+}
+class B extends A {
+  B() : super();
+}
+''', [
+      error(
+          CompileTimeErrorCode.NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS, 55, 1),
+    ]);
+  }
+
+  test_explicit_oneFactory() async {
+    await assertErrorsInCode(r'''
+class A {
+  factory A() => throw '';
+}
+class B extends A {
+  B() : super();
+  factory B.second() => throw '';
+}
+''', [
+      error(
+          CompileTimeErrorCode.NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS, 55, 1),
+    ]);
+  }
+
+  test_hasFactories() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  factory A() => throw '';
+}
+class B extends A {
+  factory B() => throw '';
+  factory B.second() => throw '';
+}
+''');
+  }
+
+  test_hasFactory() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  factory A() => throw '';
+}
+class B extends A {
+  factory B() => throw '';
+}
+''');
+  }
+
+  test_implicit() async {
+    await assertErrorsInCode(r'''
+class A {
+  factory A() => throw '';
+}
+class B extends A {
+  B();
+}
+''', [
+      error(
+          CompileTimeErrorCode.NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS, 55, 1),
+    ]);
+  }
+
+  test_implicit2() async {
+    await assertErrorsInCode(r'''
+class A {
+  factory A() => throw '';
+}
+class B extends A {
+}
+''', [
+      error(
+          CompileTimeErrorCode.NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS, 55, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_abstract_class_inherits_abstract_member_test.dart b/pkg/analyzer/test/src/diagnostics/non_abstract_class_inherits_abstract_member_test.dart
index c56b4f8..c2faa10 100644
--- a/pkg/analyzer/test/src/diagnostics/non_abstract_class_inherits_abstract_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_abstract_class_inherits_abstract_member_test.dart
@@ -5,16 +5,23 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(NonAbstractClassInheritsAbstractMemberTest);
+    defineReflectiveTests(
+        NonAbstractClassInheritsAbstractMemberWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class NonAbstractClassInheritsAbstractMemberTest extends DriverResolutionTest {
+class NonAbstractClassInheritsAbstractMemberTest
+    extends PubPackageResolutionTest
+    with NonAbstractClassInheritsAbstractMemberTestCases {}
+
+mixin NonAbstractClassInheritsAbstractMemberTestCases
+    on PubPackageResolutionTest {
   test_abstractsDontOverrideConcretes_getter() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -98,7 +105,7 @@
 }
 ''', [
       error(
-          StaticWarningCode
+          CompileTimeErrorCode
               .NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
           62,
           1),
@@ -116,8 +123,10 @@
 class C extends A {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
-          55, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
+          55,
+          1),
     ]);
   }
 
@@ -215,8 +224,10 @@
 }
 class B = A with M implements I;
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          74, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          74,
+          1),
     ]);
   }
 
@@ -229,8 +240,10 @@
 abstract class A {}
 class B = A with M;
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          54, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          54,
+          1),
     ]);
   }
 
@@ -243,8 +256,10 @@
 }
 class B = A with M;
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          45, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          45,
+          1),
     ]);
   }
 
@@ -256,8 +271,10 @@
 class C implements I {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          42, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          42,
+          1),
     ]);
   }
 
@@ -269,8 +286,10 @@
 class C extends A {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          40, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          40,
+          1),
     ]);
   }
 
@@ -282,8 +301,10 @@
 class C implements I {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          28, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          28,
+          1),
     ]);
   }
 
@@ -296,8 +317,10 @@
   noSuchMethod(v);
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          28, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          28,
+          1),
     ]);
   }
 
@@ -324,8 +347,10 @@
 class C implements I {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          55, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          55,
+          1),
     ]);
   }
 
@@ -337,8 +362,10 @@
 class C extends A {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          35, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          35,
+          1),
     ]);
   }
 
@@ -354,8 +381,10 @@
 class C implements A, B {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          89, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          89,
+          1),
     ]);
   }
 
@@ -366,8 +395,10 @@
 abstract class B implements A { get g1 => 1; }
 class C extends Object with B {}
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          90, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          90,
+          1),
     ]);
   }
 
@@ -378,8 +409,10 @@
 abstract class B implements A { m1() => 1; }
 class C extends Object with B {}
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          84, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          84,
+          1),
     ]);
   }
 
@@ -390,8 +423,10 @@
 abstract class B implements A { set s1(v) {} }
 class C extends Object with B {}
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          96, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          96,
+          1),
     ]);
   }
 
@@ -407,8 +442,10 @@
 class B extends A implements I {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          71, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          71,
+          1),
     ]);
   }
 
@@ -425,8 +462,10 @@
   get field => 0;
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          77, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          77,
+          1),
     ]);
   }
 
@@ -438,8 +477,10 @@
 class C implements I {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          36, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          36,
+          1),
     ]);
   }
 
@@ -451,8 +492,10 @@
 class C extends A {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          43, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          43,
+          1),
     ]);
   }
 
@@ -468,8 +511,10 @@
 class C extends B {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          84, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          84,
+          1),
     ]);
   }
 
@@ -483,8 +528,10 @@
   set v(_) {}
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          27, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          27,
+          1),
     ]);
   }
 
@@ -498,8 +545,10 @@
   get v => 1;
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
-          27, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          27,
+          1),
     ]);
   }
 
@@ -523,8 +572,11 @@
 class C extends A {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
-          48, 1),
+      error(
+          CompileTimeErrorCode
+              .NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
+          48,
+          1),
     ]);
   }
 
@@ -537,8 +589,10 @@
 class C extends A {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
-          41, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
+          41,
+          1),
     ]);
   }
 
@@ -551,8 +605,98 @@
 class C implements I {
 }
 ''', [
-      error(StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
-          27, 1),
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
+          27,
+          1),
+    ]);
+  }
+}
+
+@reflectiveTest
+class NonAbstractClassInheritsAbstractMemberWithNullSafetyTest
+    extends PubPackageResolutionTest
+    with WithNullSafetyMixin, NonAbstractClassInheritsAbstractMemberTestCases {
+  test_abstract_field_final_implement_getter() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract final int x;
+}
+class B implements A {
+  int get x => 0;
+}
+''');
+  }
+
+  test_abstract_field_final_implement_none() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract final int x;
+}
+class B implements A {}
+''', [
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          51,
+          1),
+    ]);
+  }
+
+  test_abstract_field_implement_getter() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+class B implements A {
+  int get x => 0;
+}
+''', [
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          45,
+          1),
+    ]);
+  }
+
+  test_abstract_field_implement_getter_and_setter() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+class B implements A {
+  int get x => 0;
+  void set x(int value) {}
+}
+''');
+  }
+
+  test_abstract_field_implement_none() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+class B implements A {}
+''', [
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
+          45,
+          1),
+    ]);
+  }
+
+  test_abstract_field_implement_setter() async {
+    await assertErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+class B implements A {
+  void set x(int value) {}
+}
+''', [
+      error(
+          CompileTimeErrorCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
+          45,
+          1),
     ]);
   }
 }
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 f209280..f7aa310 100644
--- a/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart
@@ -2,28 +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.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(NonBoolConditionTest);
-    defineReflectiveTests(NonBoolConditionTest_NNBD);
+    defineReflectiveTests(NonBoolConditionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class NonBoolConditionTest extends DriverResolutionTest {
+class NonBoolConditionTest extends PubPackageResolutionTest {
   test_conditional() async {
     await assertErrorsInCode('''
 f() { return 3 ? 2 : 1; }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 13, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 13, 1),
     ]);
   }
 
@@ -33,7 +30,7 @@
   do {} while (3);
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 21, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 21, 1),
     ]);
   }
 
@@ -44,7 +41,31 @@
   for (;3;) {}
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 14, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 14, 1),
+    ]);
+  }
+
+  test_for_declaration() async {
+    // https://github.com/dart-lang/sdk/issues/24713
+    await assertErrorsInCode(r'''
+f() {
+  for (int i = 0; 3;) {}
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 17, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 24, 1),
+    ]);
+  }
+
+  test_for_expression() async {
+    // https://github.com/dart-lang/sdk/issues/24713
+    await assertErrorsInCode(r'''
+f() {
+  int i;
+  for (i = 0; 3;) {}
+}''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 12, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 29, 1),
     ]);
   }
 
@@ -52,7 +73,7 @@
     await assertErrorsInCode('''
 var v = [for (; 0;) 1];
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 16, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 16, 1),
     ]);
   }
 
@@ -62,7 +83,7 @@
   if (3) return 2; else return 1;
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 12, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 12, 1),
     ]);
   }
 
@@ -70,7 +91,7 @@
     await assertErrorsInCode('''
 var v = [if (3) 1];
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 13, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 13, 1),
     ]);
   }
 
@@ -80,19 +101,14 @@
   while (3) {}
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 15, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 15, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class NonBoolConditionTest_NNBD extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class NonBoolConditionWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_if_null() async {
     await assertErrorsInCode(r'''
 m() {
@@ -100,7 +116,7 @@
   if (x) {}
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 22, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 22, 1),
     ]);
   }
 
@@ -111,7 +127,7 @@
   x ? 0 : 1;
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 18, 1),
+      error(CompileTimeErrorCode.NON_BOOL_CONDITION, 18, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/non_bool_expression_test.dart b/pkg/analyzer/test/src/diagnostics/non_bool_expression_test.dart
index 258accb..0a12cfb 100644
--- a/pkg/analyzer/test/src/diagnostics/non_bool_expression_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_bool_expression_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NonBoolExpressionTest extends DriverResolutionTest {
+class NonBoolExpressionTest extends PubPackageResolutionTest {
   test_functionType_bool() async {
     await assertErrorsInCode(r'''
 bool makeAssertion() => true;
@@ -22,7 +22,7 @@
   assert(makeAssertion);
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_EXPRESSION, 45, 13),
+      error(CompileTimeErrorCode.NON_BOOL_EXPRESSION, 45, 13),
     ]);
   }
 
@@ -33,7 +33,7 @@
   assert(makeAssertion);
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_EXPRESSION, 41, 13),
+      error(CompileTimeErrorCode.NON_BOOL_EXPRESSION, 41, 13),
     ]);
   }
 
@@ -43,7 +43,7 @@
   assert(0);
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_EXPRESSION, 15, 1),
+      error(CompileTimeErrorCode.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 d8d9af0..1fdb4eb 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
@@ -2,42 +2,34 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(NonBoolNegationExpressionTest);
-    defineReflectiveTests(NonBoolNegationExpressionTest_NNBD);
+    defineReflectiveTests(NonBoolNegationExpressionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class NonBoolNegationExpressionTest extends DriverResolutionTest {
+class NonBoolNegationExpressionTest extends PubPackageResolutionTest {
   test_nonBool() async {
     await assertErrorsInCode(r'''
 f() {
   !42;
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, 9, 2),
+      error(CompileTimeErrorCode.NON_BOOL_NEGATION_EXPRESSION, 9, 2),
     ]);
   }
 }
 
 @reflectiveTest
-class NonBoolNegationExpressionTest_NNBD extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class NonBoolNegationExpressionWithNullSafetyTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_null() async {
     await assertErrorsInCode(r'''
 m() {
@@ -46,7 +38,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, 19, 1),
+      error(CompileTimeErrorCode.NON_BOOL_NEGATION_EXPRESSION, 19, 1),
     ]);
   }
 }
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 f322a56..456e55c 100644
--- a/pkg/analyzer/test/src/diagnostics/non_bool_operand_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_bool_operand_test.dart
@@ -2,30 +2,27 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(NonBoolOperandTest);
-    defineReflectiveTests(NonBoolOperandTest_NNBD);
+    defineReflectiveTests(NonBoolOperandWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class NonBoolOperandTest extends DriverResolutionTest {
+class NonBoolOperandTest extends PubPackageResolutionTest {
   test_and_left() async {
     await assertErrorsInCode(r'''
 bool f(int left, bool right) {
   return left && right;
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 40, 4),
+      error(CompileTimeErrorCode.NON_BOOL_OPERAND, 40, 4),
     ]);
   }
 
@@ -35,7 +32,7 @@
   return left && right;
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 51, 5),
+      error(CompileTimeErrorCode.NON_BOOL_OPERAND, 51, 5),
     ]);
   }
 
@@ -45,7 +42,7 @@
   return left || right;
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 46, 4),
+      error(CompileTimeErrorCode.NON_BOOL_OPERAND, 46, 4),
     ]);
   }
 
@@ -55,19 +52,14 @@
   return left || right;
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 51, 5),
+      error(CompileTimeErrorCode.NON_BOOL_OPERAND, 51, 5),
     ]);
   }
 }
 
 @reflectiveTest
-class NonBoolOperandTest_NNBD extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class NonBoolOperandWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_and_null() async {
     await assertErrorsInCode(r'''
 m() {
@@ -75,7 +67,7 @@
   if(x && true) {}
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 21, 1),
+      error(CompileTimeErrorCode.NON_BOOL_OPERAND, 21, 1),
     ]);
   }
 
@@ -86,7 +78,7 @@
   if(x || false) {}
 }
 ''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 21, 1),
+      error(CompileTimeErrorCode.NON_BOOL_OPERAND, 21, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart b/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart
deleted file mode 100644
index 408fc1a..0000000
--- a/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../dart/resolution/driver_resolution.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(NonConstCallToLiteralConstructorTest);
-  });
-}
-
-@reflectiveTest
-class NonConstCallToLiteralConstructorTest extends DriverResolutionTest
-    with PackageMixin {
-  @override
-  void setUp() {
-    super.setUp();
-    addMetaPackage();
-  }
-
-  test_constConstructor() async {
-    await assertNoErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-''');
-  }
-
-  test_constContextCreation() async {
-    await assertNoErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-
-void main() {
-  const a = A();
-}
-''');
-  }
-
-  test_constCreation() async {
-    await assertNoErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-
-void main() {
-  const a = const A();
-}
-''');
-  }
-
-  test_namedConstructor() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A.named();
-}
-void main() {
-  var a = A.named();
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 95, 1),
-      error(HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR, 99, 9),
-    ]);
-  }
-
-  test_nonConstContext() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-void main() {
-  var a = A();
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 89, 1),
-      error(HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR, 93, 3),
-    ]);
-  }
-
-  test_unconstableCreation() async {
-    await assertNoErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A(List list);
-}
-
-void main() {
-  var a = A(new List());
-}
-''');
-  }
-
-  test_usingNew() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-void main() {
-  var a = new A();
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 89, 1),
-      error(HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW, 93, 7),
-    ]);
-  }
-}
diff --git a/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor_test.dart
new file mode 100644
index 0000000..67aac2c
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor_test.dart
@@ -0,0 +1,105 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstCallToLiteralConstructorTest);
+  });
+}
+
+@reflectiveTest
+class NonConstCallToLiteralConstructorTest extends PubPackageResolutionTest {
+  @override
+  void setUp() {
+    super.setUp();
+    writeTestPackageConfigWithMeta();
+  }
+
+  test_constConstructor() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+''');
+  }
+
+  test_constContextCreation() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+const a = A();
+''');
+  }
+
+  test_constCreation() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+const a = const A();
+''');
+  }
+
+  test_namedConstructor() async {
+    await assertErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A.named();
+}
+var a = A.named();
+''', [
+      error(HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR, 83, 9),
+    ]);
+  }
+
+  test_nonConstContext() async {
+    await assertErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+var a = A();
+''', [
+      error(HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR, 77, 3),
+    ]);
+  }
+
+  test_unconstableCreation() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A(List list);
+}
+var a = A(new List());
+''');
+  }
+
+  test_usingNew() async {
+    await assertErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+var a = new A();
+''', [
+      error(HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW, 77, 7),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_const_map_as_expression_statement_test.dart b/pkg/analyzer/test/src/diagnostics/non_const_map_as_expression_statement_test.dart
new file mode 100644
index 0000000..50a4b24
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_const_map_as_expression_statement_test.dart
@@ -0,0 +1,48 @@
+// 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/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstMapAsExpressionStatementTest);
+  });
+}
+
+@reflectiveTest
+class NonConstMapAsExpressionStatementTest extends PubPackageResolutionTest {
+  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/42850')
+  test_beginningOfExpressiontatement() async {
+    // TODO(srawlins) Fasta is not recovering well.
+    // Ideally we would produce a single diagnostic:
+    // CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT
+    addTestFile(r'''
+f() {
+  {'a' : 0, 'b' : 1}.length;
+}
+''');
+    await resolveTestFile();
+    expect(result.errors[0].errorCode,
+        CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT);
+  }
+
+  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/42850')
+  test_expressionStatementOnly() async {
+    // TODO(danrubel) Fasta is not recovering well.
+    // Ideally we would produce a single diagnostic:
+    // CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT
+    addTestFile(r'''
+f() {
+  {'a' : 0, 'b' : 1};
+}
+''');
+    await resolveTestFile();
+    expect(result.errors[0].errorCode,
+        CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_annotation_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_annotation_constructor_test.dart
new file mode 100644
index 0000000..89f983a
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_annotation_constructor_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/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantAnnotationConstructorTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantAnnotationConstructorTest extends PubPackageResolutionTest {
+  test_named() async {
+    await assertErrorsInCode(r'''
+class A {
+  A.fromInt() {}
+}
+@A.fromInt()
+main() {
+}
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, 29, 12),
+    ]);
+  }
+
+  test_unnamed() async {
+    await assertErrorsInCode(r'''
+class A {
+  A() {}
+}
+@A()
+main() {
+}
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, 21, 4),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_case_expression_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_case_expression_from_deferred_library_test.dart
index f0de552..9c6dd7a 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_case_expression_from_deferred_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_case_expression_from_deferred_library_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,9 +15,9 @@
 
 @reflectiveTest
 class NonConstantCaseExpressionFromDeferredLibraryTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_nested() async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 const int c = 0;
 ''');
 
@@ -40,7 +40,7 @@
   }
 
   test_simple() async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 const int c = 0;
 ''');
 
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_case_expression_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_case_expression_test.dart
index 4203442..0140b9e 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_case_expression_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_case_expression_test.dart
@@ -2,22 +2,20 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(NonConstantCaseExpressionTest);
-    defineReflectiveTests(NonConstantCaseExpressionWithNnbdTest);
+    defineReflectiveTests(NonConstantCaseExpressionWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class NonConstantCaseExpressionTest extends DriverResolutionTest {
+class NonConstantCaseExpressionTest extends PubPackageResolutionTest {
   test_constField() async {
     await assertNoErrorsInCode(r'''
 void f(C e) {
@@ -67,10 +65,5 @@
 }
 
 @reflectiveTest
-class NonConstantCaseExpressionWithNnbdTest
-    extends NonConstantCaseExpressionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-}
+class NonConstantCaseExpressionWithNullSafetyTest
+    extends NonConstantCaseExpressionTest with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_default_value_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_default_value_from_deferred_library_test.dart
new file mode 100644
index 0000000..bde3524
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_default_value_from_deferred_library_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.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantDefaultValueFromDeferredLibraryTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantDefaultValueFromDeferredLibraryTest
+    extends PubPackageResolutionTest {
+  test_deferred() async {
+    newFile('$testPackageLibPath/lib1.dart', content: '''
+library lib1;
+const V = 1;
+''');
+    await assertErrorsInCode('''
+library root;
+import 'lib1.dart' deferred as a;
+f({x : a.V}) {}
+''', [
+      error(
+          CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY,
+          55,
+          3),
+    ]);
+  }
+
+  test_nested() async {
+    newFile('$testPackageLibPath/lib1.dart', content: '''
+library lib1;
+const V = 1;
+''');
+    await assertErrorsInCode('''
+library root;
+import 'lib1.dart' deferred as a;
+f({x : a.V + 1}) {}
+''', [
+      error(
+          CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY,
+          55,
+          7),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_default_value_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_default_value_test.dart
index e3ba1db..eb206cb 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_default_value_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_default_value_test.dart
@@ -6,7 +6,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class NonConstantDefaultValueTest extends DriverResolutionTest {
+class NonConstantDefaultValueTest extends PubPackageResolutionTest {
   test_appliedTypeParameter_defaultConstructorValue() async {
     await assertErrorsInCode(r'''
 void f<T>(T t) => t;
@@ -61,6 +61,83 @@
 ''', [ExpectedError(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 67, 1)]);
   }
 
+  test_constructor_inDifferentFile() async {
+    newFile('/test/lib/a.dart', content: '''
+import 'b.dart';
+const v = const MyClass();
+''');
+    await assertErrorsInCode('''
+class MyClass {
+  const MyClass([p = foo]);
+}
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 37, 3),
+      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 37, 3),
+    ]);
+  }
+
+  test_constructor_named() async {
+    await assertErrorsInCode(r'''
+class A {
+  int y;
+  A({x : y}) {}
+}
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 28, 1),
+    ]);
+  }
+
+  test_constructor_positional() async {
+    await assertErrorsInCode(r'''
+class A {
+  int y;
+  A([x = y]) {}
+}
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 28, 1),
+    ]);
+  }
+
+  test_function_named() async {
+    await assertErrorsInCode(r'''
+int y;
+f({x : y}) {}
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 14, 1),
+    ]);
+  }
+
+  test_function_positional() async {
+    await assertErrorsInCode(r'''
+int y;
+f([x = y]) {}
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 14, 1),
+    ]);
+  }
+
+  test_method_named() async {
+    await assertErrorsInCode(r'''
+class A {
+  int y;
+  m({x : y}) {}
+}
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 28, 1),
+    ]);
+  }
+
+  test_method_positional() async {
+    await assertErrorsInCode(r'''
+class A {
+  int y;
+  m([x = y]) {}
+}
+''', [
+      error(CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, 28, 1),
+    ]);
+  }
+
   test_noAppliedTypeParameters_defaultConstructorValue_dynamic() async {
     await assertNoErrorsInCode(r'''
 void f<T>(T t) => t;
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart
index 30ab020..6f0d2d7 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -20,11 +20,11 @@
 
 @reflectiveTest
 class NonConstantListElementFromDeferredLibraryTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   @failingTest
   test_const_ifElement_thenTrue_deferredElse() async {
     // reports wrong error code (which is not crucial to fix)
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -39,7 +39,7 @@
   }
 
   test_const_ifElement_thenTrue_deferredThen() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(
         r'''
@@ -61,7 +61,7 @@
   }
 
   test_const_topLevel_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -75,7 +75,7 @@
   }
 
   test_const_topLevel_deferred_nested() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart
index ac5b6917..fd0772b 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class NonConstantListElementTest extends DriverResolutionTest {
+class NonConstantListElementTest extends PubPackageResolutionTest {
   test_const_forElement() async {
     await assertErrorsInCode(r'''
 const Set set = {};
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart
index b1c9035..ec30b00 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -20,7 +20,7 @@
 }
 
 @reflectiveTest
-class NonConstantMapElementTest extends DriverResolutionTest {
+class NonConstantMapElementTest extends PubPackageResolutionTest {
   test_forElement_cannotBeConst() async {
     await assertErrorsInCode('''
 void main() {
@@ -161,7 +161,7 @@
 }
 
 @reflectiveTest
-class NonConstantMapKeyTest extends DriverResolutionTest {
+class NonConstantMapKeyTest extends PubPackageResolutionTest {
   test_const_ifElement_thenElseFalse_finalElse() async {
     await assertErrorsInCode(
         '''
@@ -296,7 +296,7 @@
 }
 
 @reflectiveTest
-class NonConstantMapValueTest extends DriverResolutionTest {
+class NonConstantMapValueTest extends PubPackageResolutionTest {
   test_const_ifElement_thenElseFalse_finalElse() async {
     await assertErrorsInCode(
         '''
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart
index 4af3532..25504a3 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,11 +19,12 @@
 }
 
 @reflectiveTest
-class NonConstantMapKeyFromDeferredLibraryTest extends DriverResolutionTest {
+class NonConstantMapKeyFromDeferredLibraryTest
+    extends PubPackageResolutionTest {
   @failingTest
   test_const_ifElement_thenTrue_deferredElse() async {
 // reports wrong error code
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -36,7 +37,7 @@
   }
 
   test_const_ifElement_thenTrue_deferredThen() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(
         r'''
@@ -58,7 +59,7 @@
   }
 
   test_const_topLevel_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -70,7 +71,7 @@
   }
 
   test_const_topLevel_deferred_nested() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart
index a660179..d884a44 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class NonConstantMapKeyTest extends DriverResolutionTest {
+class NonConstantMapKeyTest extends PubPackageResolutionTest {
   test_const_ifElement_thenTrue_elseFinal() async {
     await assertErrorsInCode(
         r'''
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart
index 52559de..6ce36a1 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -19,11 +19,12 @@
 }
 
 @reflectiveTest
-class NonConstantMapValueFromDeferredLibraryTest extends DriverResolutionTest {
+class NonConstantMapValueFromDeferredLibraryTest
+    extends PubPackageResolutionTest {
   @failingTest
   test_const_ifElement_thenTrue_elseDeferred() async {
     // reports wrong error code
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -36,7 +37,7 @@
   }
 
   test_const_ifElement_thenTrue_thenDeferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(
         r'''
@@ -58,7 +59,7 @@
   }
 
   test_const_topLevel_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -70,7 +71,7 @@
   }
 
   test_const_topLevel_deferred_nested() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart
index b22f1a0..edbe740 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class NonConstantMapValueTest extends DriverResolutionTest {
+class NonConstantMapValueTest extends PubPackageResolutionTest {
   test_const_ifTrue_elseFinal() async {
     await assertErrorsInCode(
         r'''
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart
index 2b69d39..1f92b3d 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class NonConstantSetElementTest extends DriverResolutionTest {
+class NonConstantSetElementTest extends PubPackageResolutionTest {
   test_const_forElement() async {
     await assertErrorsInCode(r'''
 const Set set = {};
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_type_argument_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_type_argument_test.dart
index 5754334..eee33d4 100644
--- a/pkg/analyzer/test/src/diagnostics/non_constant_type_argument_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_type_argument_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/ffi_code.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NonConstantTypeArgumentTest extends DriverResolutionTest {
+class NonConstantTypeArgumentTest extends PubPackageResolutionTest {
   test_asFunction_R() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/non_generative_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/non_generative_constructor_test.dart
index fd89b22..533e750 100644
--- a/pkg/analyzer/test/src/diagnostics/non_generative_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_generative_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,17 +14,18 @@
 }
 
 @reflectiveTest
-class NonGenerativeConstructorTest extends DriverResolutionTest {
+class NonGenerativeConstructorTest extends PubPackageResolutionTest {
   test_explicit() async {
     await assertErrorsInCode(r'''
 class A {
   factory A.named() => throw 0;
+  A.generative();
 }
 class B extends A {
   B() : super.named();
 }
 ''', [
-      error(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, 72, 13),
+      error(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, 90, 13),
     ]);
   }
 
@@ -56,24 +57,13 @@
     await assertErrorsInCode(r'''
 class A {
   factory A() => throw 0;
+  A.named();
 }
 class B extends A {
   B();
 }
 ''', [
-      error(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, 60, 1),
-    ]);
-  }
-
-  test_implicit2() async {
-    await assertErrorsInCode(r'''
-class A {
-  factory A() => throw 0;
-}
-class B extends A {
-}
-''', [
-      error(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, 44, 1),
+      error(CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, 73, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/non_generative_implicit_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/non_generative_implicit_constructor_test.dart
new file mode 100644
index 0000000..e2d7d41
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_generative_implicit_constructor_test.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.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonGenerativeImplicitConstructorTest);
+  });
+}
+
+@reflectiveTest
+class NonGenerativeImplicitConstructorTest extends PubPackageResolutionTest {
+  test_implicit() async {
+    await assertErrorsInCode(r'''
+class A {
+  factory A() => throw 0;
+  A.named();
+}
+class B extends A {
+}
+''', [
+      error(CompileTimeErrorCode.NON_GENERATIVE_IMPLICIT_CONSTRUCTOR, 57, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_native_function_type_argument_to_pointer_test.dart b/pkg/analyzer/test/src/diagnostics/non_native_function_type_argument_to_pointer_test.dart
index 576cbdb..323c81b 100644
--- a/pkg/analyzer/test/src/diagnostics/non_native_function_type_argument_to_pointer_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_native_function_type_argument_to_pointer_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,8 @@
 }
 
 @reflectiveTest
-class NonNativeFunctionTypeArgumentToPointerTest extends DriverResolutionTest {
+class NonNativeFunctionTypeArgumentToPointerTest
+    extends PubPackageResolutionTest {
   test_asFunction_1() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
@@ -28,7 +29,7 @@
 ''', [
       // This changed from a method to a extension method, uses Dart semantics
       // instead of manual check now.
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 98, 10),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 98, 10),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/non_null_opt_out_test.dart b/pkg/analyzer/test/src/diagnostics/non_null_opt_out_test.dart
index b72081b..856103c 100644
--- a/pkg/analyzer/test/src/diagnostics/non_null_opt_out_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_null_opt_out_test.dart
@@ -3,17 +3,15 @@
 // BSD-style license that can be found in the LICENSE file.
 
 //import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/test_utilities/find_element.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -22,21 +20,14 @@
 }
 
 @reflectiveTest
-class NonNullOptOutTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class NonNullOptOutTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   ImportFindElement get _import_a {
     return findElement.importFind('package:test/a.dart');
   }
 
   test_assignment_indexExpression() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void operator[]=(int a, int b) {}
 }
@@ -60,7 +51,7 @@
   }
 
   test_assignment_prefixedIdentifier_instanceTarget_class_field() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo = 0;
 }
@@ -87,7 +78,7 @@
   }
 
   test_assignment_prefixedIdentifier_instanceTarget_extension_setter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 extension E on A {
   void set foo(int _) {}
@@ -115,7 +106,7 @@
   }
 
   test_assignment_prefixedIdentifier_staticTarget_class_field() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static int foo = 0;
 }
@@ -142,7 +133,7 @@
   }
 
   test_assignment_prefixedIdentifier_staticTarget_extension_field() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 extension E on int {
   static int foo = 0;
 }
@@ -169,7 +160,7 @@
   }
 
   test_assignment_prefixedIdentifier_topLevelVariable() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int foo = 0;
 ''');
     await assertNoErrorsInCode(r'''
@@ -191,7 +182,7 @@
   }
 
   test_assignment_propertyAccess_class_field() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo = 0;
 }
@@ -215,7 +206,7 @@
   }
 
   test_assignment_propertyAccess_extension_setter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 extension E on A {
   void set foo(int a) {}
@@ -240,7 +231,7 @@
   }
 
   test_assignment_propertyAccess_extensionOverride_setter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 extension E on A {
   void set foo(int a) {}
@@ -265,7 +256,7 @@
   }
 
   test_assignment_propertyAccess_superTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo = 0;
 }
@@ -291,7 +282,7 @@
   }
 
   test_assignment_simpleIdentifier_topLevelVariable() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int foo = 0;
 ''');
     await assertNoErrorsInCode(r'''
@@ -313,7 +304,7 @@
   }
 
   test_binaryExpression() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int operator+(int a) => 0;
 }
@@ -335,7 +326,7 @@
   }
 
   test_functionExpressionInvocation() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int Function(int, int?)? foo;
 ''');
     await assertNoErrorsInCode(r'''
@@ -358,7 +349,7 @@
   }
 
   test_functionExpressionInvocation_call() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int call(int a, int? b) => 0;
 }
@@ -383,7 +374,7 @@
   }
 
   test_functionExpressionInvocation_extension_staticTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 extension E on int {
   static int Function(int) get foo => (_) => 0;
 }
@@ -408,7 +399,7 @@
   }
 
   test_instanceCreation() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   A(int a, int? b);
 }
@@ -431,7 +422,7 @@
   }
 
   test_instanceCreation_generic() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T> {
   A(T a, T? b);
 }
@@ -455,7 +446,7 @@
   }
 
   test_instanceCreation_generic_instantiateToBounds() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<T extends num> {}
 ''');
     await assertNoErrorsInCode(r'''
@@ -470,7 +461,7 @@
   }
 
   test_methodInvocation_extension_functionTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 extension E on void Function() {
   int foo(int a) => 0;
 }
@@ -495,7 +486,7 @@
   }
 
   test_methodInvocation_extension_interfaceTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 extension E on int {
   int foo(int a) => 0;
 }
@@ -520,7 +511,7 @@
   }
 
   test_methodInvocation_extension_nullTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 extension E on A {
   int foo(int a) => 0;
@@ -548,7 +539,7 @@
   }
 
   test_methodInvocation_extension_staticTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 extension E on int {
   static int foo(int a) => 0;
 }
@@ -573,7 +564,7 @@
   }
 
   test_methodInvocation_extensionOverride() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 extension E on int {
   int foo(int a) => 0;
 }
@@ -598,7 +589,7 @@
   }
 
   test_methodInvocation_function() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int foo(int a, int? b) => 0;
 ''');
     await assertNoErrorsInCode(r'''
@@ -621,7 +612,7 @@
   }
 
   test_methodInvocation_function_prefixed() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int foo(int a, int? b) => 0;
 ''');
     await assertNoErrorsInCode(r'''
@@ -644,7 +635,7 @@
   }
 
   test_methodInvocation_method_cascade() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo(int a, int? b) => 0;
 }
@@ -669,7 +660,7 @@
   }
 
   test_methodInvocation_method_interfaceTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo(int a, int? b) => 0;
 }
@@ -694,7 +685,7 @@
   }
 
   test_methodInvocation_method_nullTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo(int a, int? b) => 0;
 }
@@ -721,7 +712,7 @@
   }
 
   test_methodInvocation_method_staticTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static int foo(int a, int? b) => 0;
 }
@@ -746,7 +737,7 @@
   }
 
   test_methodInvocation_method_superTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo(int a, int? b) => 0;
 }
@@ -800,7 +791,7 @@
   }
 
   test_postfixExpression() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   A operator+(int a) => this;
 }
@@ -821,7 +812,7 @@
   }
 
   test_prefixExpression() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int operator-() => 0;
 }
@@ -842,7 +833,7 @@
   }
 
   test_read_indexExpression_class() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int operator[](int a) => 0;
 }
@@ -863,7 +854,7 @@
   }
 
   test_read_prefixedIdentifier_instanceTarget_class_field() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo;
 }
@@ -887,7 +878,7 @@
   }
 
   test_read_prefixedIdentifier_instanceTarget_extension_getter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 extension E on A {
   int get foo => 0;
@@ -912,7 +903,7 @@
   }
 
   test_read_prefixedIdentifier_staticTarget_class_field() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static int foo;
 }
@@ -936,7 +927,7 @@
   }
 
   test_read_prefixedIdentifier_staticTarget_class_method() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static int foo(int a) => 0;
 }
@@ -960,7 +951,7 @@
   }
 
   test_read_prefixedIdentifier_staticTarget_extension_field() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 extension E {
   static int foo;
 }
@@ -984,7 +975,7 @@
   }
 
   test_read_prefixedIdentifier_staticTarget_extension_method() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 extension E {
   static int foo(int a) => 0;
 }
@@ -1008,7 +999,7 @@
   }
 
   test_read_prefixedIdentifier_topLevelVariable() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int foo = 0;
 ''');
     await assertNoErrorsInCode(r'''
@@ -1030,7 +1021,7 @@
   }
 
   test_read_propertyAccessor_class_field() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo = 0;
 }
@@ -1054,7 +1045,7 @@
   }
 
   test_read_propertyAccessor_class_method() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo() => 0;
 }
@@ -1078,7 +1069,7 @@
   }
 
   test_read_propertyAccessor_extensionOverride_getter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 extension E on A {
   int get foo => 0;
@@ -1103,7 +1094,7 @@
   }
 
   test_read_propertyAccessor_superTarget() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo = 0;
 }
@@ -1129,7 +1120,7 @@
   }
 
   test_read_simpleIdentifier_class_field() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo = 0;
 }
@@ -1152,7 +1143,7 @@
   }
 
   test_read_simpleIdentifier_class_method() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int foo(int a) => 0;
 }
@@ -1175,7 +1166,7 @@
   }
 
   test_read_simpleIdentifier_extension_getter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 extension E on A {
   int get foo => 0;
@@ -1199,7 +1190,7 @@
   }
 
   test_read_simpleIdentifier_extension_method() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {}
 extension E on A {
   int foo(int a) => 0;
@@ -1223,7 +1214,7 @@
   }
 
   test_read_simpleIdentifier_topLevelVariable() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int foo = 0;
 ''');
     await assertNoErrorsInCode(r'''
@@ -1242,7 +1233,7 @@
   }
 
   test_superConstructorInvocation() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   A(int a, int? b);
 }
diff --git a/pkg/analyzer/test/src/diagnostics/non_type_as_type_argument_test.dart b/pkg/analyzer/test/src/diagnostics/non_type_as_type_argument_test.dart
new file mode 100644
index 0000000..2285127
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_type_as_type_argument_test.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.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonTypeAsTypeArgumentTest);
+  });
+}
+
+@reflectiveTest
+class NonTypeAsTypeArgumentTest extends PubPackageResolutionTest {
+  test_notAType() async {
+    await assertErrorsInCode(r'''
+int A;
+class B<E> {}
+f(B<A> b) {}
+''', [
+      error(CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT, 25, 1),
+    ]);
+  }
+
+  test_undefinedIdentifier() async {
+    await assertErrorsInCode(r'''
+class B<E> {}
+f(B<A> b) {}
+''', [
+      error(CompileTimeErrorCode.NON_TYPE_AS_TYPE_ARGUMENT, 18, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_type_in_catch_clause_test.dart b/pkg/analyzer/test/src/diagnostics/non_type_in_catch_clause_test.dart
index 92f7df5..9e21e5a 100644
--- a/pkg/analyzer/test/src/diagnostics/non_type_in_catch_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_type_in_catch_clause_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NonTypeInCatchClauseTest extends DriverResolutionTest {
+class NonTypeInCatchClauseTest extends PubPackageResolutionTest {
   test_isClass() async {
     await assertErrorsInCode(r'''
 f() {
@@ -62,7 +62,7 @@
   }
 }
 ''', [
-      error(StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, 21, 1),
+      error(CompileTimeErrorCode.NON_TYPE_IN_CATCH_CLAUSE, 21, 1),
       error(HintCode.UNUSED_CATCH_CLAUSE, 30, 1),
     ]);
   }
@@ -76,7 +76,7 @@
   }
 }
 ''', [
-      error(StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, 32, 1),
+      error(CompileTimeErrorCode.NON_TYPE_IN_CATCH_CLAUSE, 32, 1),
       error(HintCode.UNUSED_CATCH_CLAUSE, 41, 1),
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/non_void_return_for_operator_test.dart b/pkg/analyzer/test/src/diagnostics/non_void_return_for_operator_test.dart
index b63e7ce..1055ee0 100644
--- a/pkg/analyzer/test/src/diagnostics/non_void_return_for_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_void_return_for_operator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,13 +14,13 @@
 }
 
 @reflectiveTest
-class NonVoidReturnForOperatorTest extends DriverResolutionTest {
+class NonVoidReturnForOperatorTest extends PubPackageResolutionTest {
   test_indexSetter() async {
     await assertErrorsInCode('''
 class A {
   int operator []=(a, b) { return a; }
 }''', [
-      error(StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR, 12, 3),
+      error(CompileTimeErrorCode.NON_VOID_RETURN_FOR_OPERATOR, 12, 3),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/non_void_return_for_setter_test.dart b/pkg/analyzer/test/src/diagnostics/non_void_return_for_setter_test.dart
index 835fb02..b01d127 100644
--- a/pkg/analyzer/test/src/diagnostics/non_void_return_for_setter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_void_return_for_setter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,13 +14,13 @@
 }
 
 @reflectiveTest
-class NonVoidReturnForSetterTest extends DriverResolutionTest {
+class NonVoidReturnForSetterTest extends PubPackageResolutionTest {
   test_function() async {
     await assertErrorsInCode('''
 int set x(int v) {
   return 42;
 }''', [
-      error(StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, 0, 3),
+      error(CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, 0, 3),
     ]);
   }
 
@@ -43,7 +43,7 @@
     return 42;
   }
 }''', [
-      error(StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, 12, 3),
+      error(CompileTimeErrorCode.NON_VOID_RETURN_FOR_SETTER, 12, 3),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/not_a_type_test.dart b/pkg/analyzer/test/src/diagnostics/not_a_type_test.dart
index 8f961ad..c2adf0a 100644
--- a/pkg/analyzer/test/src/diagnostics/not_a_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_a_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,36 @@
 }
 
 @reflectiveTest
-class NotATypeTest extends DriverResolutionTest {
+class NotATypeTest extends PubPackageResolutionTest {
+  test_class_constructor() async {
+    await assertErrorsInCode('''
+class A {
+  A.foo();
+}
+
+A.foo bar() {}
+''', [
+      error(CompileTimeErrorCode.NOT_A_TYPE, 24, 5),
+    ]);
+  }
+
+  test_class_method() async {
+    await assertErrorsInCode('''
+class A {
+  static void foo() {}
+}
+
+A.foo bar() {}
+''', [
+      error(CompileTimeErrorCode.NOT_A_TYPE, 36, 5),
+    ]);
+  }
+
   test_extension() async {
     await assertErrorsInCode('''
 extension E on int {}
 E a;
-''', [error(StaticWarningCode.NOT_A_TYPE, 22, 1)]);
+''', [error(CompileTimeErrorCode.NOT_A_TYPE, 22, 1)]);
     var typeName = findNode.typeName('E a;');
     assertTypeDynamic(typeName.type);
     assertTypeNull(typeName.name);
@@ -31,7 +55,7 @@
 main() {
   f v = null;
 }''', [
-      error(StaticWarningCode.NOT_A_TYPE, 18, 1),
+      error(CompileTimeErrorCode.NOT_A_TYPE, 18, 1),
       error(HintCode.UNUSED_LOCAL_VARIABLE, 20, 1),
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/not_assigned_potentially_non_nullable_local_variable_test.dart b/pkg/analyzer/test/src/diagnostics/not_assigned_potentially_non_nullable_local_variable_test.dart
index 480726c..1caa9cc 100644
--- a/pkg/analyzer/test/src/diagnostics/not_assigned_potentially_non_nullable_local_variable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_assigned_potentially_non_nullable_local_variable_test.dart
@@ -2,14 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -21,13 +18,7 @@
 
 @reflectiveTest
 class NotInitializedPotentiallyNonNullableLocalVariableTest
-    extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_assignment_leftExpression() async {
     await assertErrorsInCode(r'''
 void f() {
@@ -1038,7 +1029,6 @@
       break;
     case 2:
       continue L;
-      break;
     default:
       v = 0;
   }
diff --git a/pkg/analyzer/test/src/diagnostics/not_enough_positional_arguments_test.dart b/pkg/analyzer/test/src/diagnostics/not_enough_positional_arguments_test.dart
index 4f2200d..b08bd58 100644
--- a/pkg/analyzer/test/src/diagnostics/not_enough_positional_arguments_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_enough_positional_arguments_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NotEnoughPositionalArgumentsTest extends DriverResolutionTest {
+class NotEnoughPositionalArgumentsTest extends PubPackageResolutionTest {
   test_const() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_instance_field_test.dart b/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_instance_field_test.dart
index 1ef6b33..08e6965 100644
--- a/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_instance_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_instance_field_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,12 +14,24 @@
 }
 
 @reflectiveTest
-class NotInitializedNonNullableInstanceFieldTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
+class NotInitializedNonNullableInstanceFieldTest
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
+  test_abstract_field_non_nullable() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+''');
+  }
+
+  test_abstract_field_non_nullable_with_constructor() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract int x;
+  A();
+}
+''');
+  }
 
   test_class_factoryConstructor() async {
     await assertNoErrorsInCode('''
diff --git a/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_variable_test.dart b/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_variable_test.dart
index d606353..d7d101e 100644
--- a/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_variable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_variable_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,13 +14,8 @@
 }
 
 @reflectiveTest
-class NotInitializedNonNullableVariableTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class NotInitializedNonNullableVariableTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_staticField_futureOr_questionArgument_none() async {
     await assertNoErrorsInCode('''
 import 'dart:async';
diff --git a/pkg/analyzer/test/src/diagnostics/not_instantiated_bound_test.dart b/pkg/analyzer/test/src/diagnostics/not_instantiated_bound_test.dart
new file mode 100644
index 0000000..969205a
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/not_instantiated_bound_test.dart
@@ -0,0 +1,179 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NotInstantiatedBoundTest);
+  });
+}
+
+@reflectiveTest
+class NotInstantiatedBoundTest extends PubPackageResolutionTest {
+  test_argument_notInstantiated() async {
+    await assertErrorsInCode(r'''
+class A<K, V extends List<K>> {}
+class C<T extends A> {}
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 51, 1),
+    ]);
+  }
+
+  test_argumentDeep_notInstantiated() async {
+    await assertErrorsInCode(r'''
+class A<K, V extends List<List<K>>> {}
+class C<T extends A> {}
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 57, 1),
+    ]);
+  }
+
+  test_class_bound_argument_instantiated() async {
+    await assertNoErrorsInCode(r'''
+class A<T> {}
+class B<T extends int> {}
+class C<T extends A<B>> {}
+''');
+  }
+
+  test_class_bound_argument_recursive_instantiated() async {
+    await assertNoErrorsInCode(r'''
+class A<K, V> {}
+class B<T extends int> {}
+class C<T extends A<B, B>> {}
+''');
+  }
+
+  test_class_bound_bound_instantiated() async {
+    await assertNoErrorsInCode(r'''
+class A<T> {}
+class C<T extends A<int>> {}
+class D<T extends C> {}
+''');
+  }
+
+  test_class_function_instantiated() async {
+    await assertNoErrorsInCode(r'''
+class A<T extends void Function()> {}
+class B<T extends A> {}
+''');
+  }
+
+  test_class_instantiated() async {
+    await assertNoErrorsInCode(r'''
+class A<T extends int> {}
+class C1<T extends A> {}
+class C2<T extends List<A>> {}
+''');
+  }
+
+  test_class_recursion_boundArgument_notInstantiated() async {
+    await assertErrorsInCode(r'''
+class A<T extends B<A>> {}
+class B<T extends A<B>> {}
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 20, 1),
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 47, 1),
+    ]);
+  }
+
+  test_class_recursion_notInstantiated() async {
+    await assertErrorsInCode(r'''
+class A<T extends B> {} // points to a
+class B<T extends A> {} // points to b
+class C<T extends A> {} // points to a cyclical type
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 18, 1),
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 57, 1),
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 96, 1),
+    ]);
+  }
+
+  test_class_recursion_typedef_notInstantiated() async {
+    await assertErrorsInCode(r'''
+typedef F(C value);
+class C<T extends F> {}
+class D<T extends C> {}
+''', [
+      error(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, 0, 19),
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 38, 1),
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 62, 1),
+    ]);
+  }
+
+  test_class_typedef_instantiated() async {
+    await assertNoErrorsInCode(r'''
+typedef void F<T extends int>();
+class C<T extends F> {}
+''');
+  }
+
+  test_direct_notInstantiated() async {
+    await assertErrorsInCode(r'''
+class A<K, V extends K> {}
+class C<T extends A> {}
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 45, 1),
+    ]);
+  }
+
+  test_functionType_notInstantiated() async {
+    await assertErrorsInCode(r'''
+class A<T extends Function(T)> {}
+class B<T extends T Function()> {}
+class C<T extends A> {}
+class D<T extends B> {}
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 87, 1),
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 111, 1),
+    ]);
+  }
+
+  test_indirect_notInstantiatedt() async {
+    await assertErrorsInCode(r'''
+class A<K, V extends K> {}
+class C<T extends List<A>> {}
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 50, 1),
+    ]);
+  }
+
+  test_typedef_argument_notInstantiated() async {
+    await assertErrorsInCode(r'''
+class A<K, V extends List<K>> {}
+typedef void F<T extends A>();
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 58, 1),
+    ]);
+  }
+
+  test_typedef_argumentDeep_notInstantiated() async {
+    await assertErrorsInCode(r'''
+class A<K, V extends List<List<K>>> {}
+typedef void F<T extends A>();
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 64, 1),
+    ]);
+  }
+
+  test_typedef_class_instantiated() async {
+    await assertNoErrorsInCode(r'''
+class C<T extends int> {}
+typedef void F<T extends C>();
+''');
+  }
+
+  test_typedef_direct_notInstantiated() async {
+    await assertErrorsInCode(r'''
+class A<K, V extends K> {}
+typedef void F<T extends A>();
+''', [
+      error(CompileTimeErrorCode.NOT_INSTANTIATED_BOUND, 52, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart b/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart
index 06f4f23..4be6794 100644
--- a/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,15 +15,8 @@
 }
 
 @reflectiveTest
-class NotIterableSpreadNullSafetyTest extends NotIterableSpreadTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class NotIterableSpreadNullSafetyTest extends NotIterableSpreadTest
+    with WithNullSafetyMixin {
   test_iterable_typeParameter_bound_listQuestion() async {
     await assertNoErrorsInCode('''
 void f<T extends List<int>?>(T a) {
@@ -37,7 +28,7 @@
 }
 
 @reflectiveTest
-class NotIterableSpreadTest extends DriverResolutionTest {
+class NotIterableSpreadTest extends PubPackageResolutionTest {
   test_iterable_list() async {
     await assertNoErrorsInCode('''
 var a = [0];
diff --git a/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart b/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart
index 98ccc0d..b95d6f8 100644
--- a/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,15 +15,8 @@
 }
 
 @reflectiveTest
-class NotMapSpreadNullSafetyTest extends NotMapSpreadTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class NotMapSpreadNullSafetyTest extends NotMapSpreadTest
+    with WithNullSafetyMixin {
   test_map_typeParameter_bound_mapQuestion() async {
     await assertNoErrorsInCode('''
 void f<T extends Map<int, String>?>(T a) {
@@ -37,7 +28,7 @@
 }
 
 @reflectiveTest
-class NotMapSpreadTest extends DriverResolutionTest {
+class NotMapSpreadTest extends PubPackageResolutionTest {
   test_map() async {
     await assertNoErrorsInCode('''
 var a = {0: 0};
diff --git a/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart b/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart
index 115ffde..f521be8 100644
--- a/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NotNullAwareNullSpreadTest extends DriverResolutionTest {
+class NotNullAwareNullSpreadTest extends PubPackageResolutionTest {
   test_listLiteral_notNullAware_nullLiteral() async {
     await assertErrorsInCode('''
 var v = [...null];
diff --git a/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart b/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart
index 6b5be07..2fb8510 100644
--- a/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NullAwareBeforeOperatorTest extends DriverResolutionTest {
+class NullAwareBeforeOperatorTest extends PubPackageResolutionTest {
   test_assignment() async {
     await assertNoErrorsInCode(r'''
 m(x) {
diff --git a/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart b/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart
index c057732..94daa48 100644
--- a/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NullAwareInConditionTest extends DriverResolutionTest {
+class NullAwareInConditionTest extends PubPackageResolutionTest {
   test_assert() async {
     await assertErrorsInCode(r'''
 m(x) {
diff --git a/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart b/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart
index d445199..a64628b 100644
--- a/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class NullAwareInLogicalOperatorTest extends DriverResolutionTest {
+class NullAwareInLogicalOperatorTest extends PubPackageResolutionTest {
   test_conditionalAnd_first() async {
     await assertErrorsInCode(r'''
 m(x) {
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart
index 10b129c..bbd9363 100644
--- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart
@@ -5,8 +5,7 @@
 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';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +14,7 @@
 }
 
 @reflectiveTest
-class NullableTypeInCatchClauseTest extends DriverResolutionTest
+class NullableTypeInCatchClauseTest extends PubPackageResolutionTest
     with WithNullSafetyMixin {
   test_noOnClause() async {
     await assertNoErrorsInCode('''
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart
index afd262c..ccdffe5 100644
--- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,13 +14,8 @@
 }
 
 @reflectiveTest
-class NullableTypeInExtendsClauseTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class NullableTypeInExtendsClauseTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_class_nonNullable() async {
     await assertNoErrorsInCode('''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart
index 6ce28aa..9e9d5a8 100644
--- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,13 +14,8 @@
 }
 
 @reflectiveTest
-class NullableTypeInImplementsClauseTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class NullableTypeInImplementsClauseTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_class_nonNullable() async {
     await assertNoErrorsInCode('''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart
index 84a72c0..98a243c 100644
--- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,13 +14,8 @@
 }
 
 @reflectiveTest
-class NullableTypeInOnClauseTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class NullableTypeInOnClauseTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_nonNullable() async {
     await assertNoErrorsInCode('''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart
index ec4d29c..ba235ef 100644
--- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,13 +14,8 @@
 }
 
 @reflectiveTest
-class NullableTypeInWithClauseTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class NullableTypeInWithClauseTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_class_nonNullable() async {
     await assertNoErrorsInCode('''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/object_cannot_extend_another_class_test.dart b/pkg/analyzer/test/src/diagnostics/object_cannot_extend_another_class_test.dart
index 66ca109..cb3965f 100644
--- a/pkg/analyzer/test/src/diagnostics/object_cannot_extend_another_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/object_cannot_extend_another_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ObjectCannotExtendAnotherClassTest extends DriverResolutionTest {
+class ObjectCannotExtendAnotherClassTest extends PubPackageResolutionTest {
   @failingTest
   test_object_extends_class() async {
     // TODO(brianwilkerson): Implement this check.
diff --git a/pkg/analyzer/test/src/diagnostics/optional_parameter_in_operator_test.dart b/pkg/analyzer/test/src/diagnostics/optional_parameter_in_operator_test.dart
index f773af0..6f8dbb8 100644
--- a/pkg/analyzer/test/src/diagnostics/optional_parameter_in_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/optional_parameter_in_operator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class OptionalParameterInOperatorTest extends DriverResolutionTest {
+class OptionalParameterInOperatorTest extends PubPackageResolutionTest {
   test_named() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart b/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart
index 7def0c4..6479ead 100644
--- a/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class OverrideEqualsButNotHashCodeTest extends DriverResolutionTest {
+class OverrideEqualsButNotHashCodeTest extends PubPackageResolutionTest {
   test_overrideBoth() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart
index cb18626..619cfb8 100644
--- a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class OverrideOnNonOverridingFieldTest extends DriverResolutionTest {
+class OverrideOnNonOverridingFieldTest extends PubPackageResolutionTest {
   test_inInterface() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart
index 3a3345c..d07c28e 100644
--- a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class OverrideOnNonOverridingGetterTest extends DriverResolutionTest {
+class OverrideOnNonOverridingGetterTest extends PubPackageResolutionTest {
   test_inInterface() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart
index 19a2cbd..3720caa 100644
--- a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class OverrideOnNonOverridingMethodTest extends DriverResolutionTest {
+class OverrideOnNonOverridingMethodTest extends PubPackageResolutionTest {
   test_inInterface() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart
index 748aa24..b2f6683 100644
--- a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class OverrideOnNonOverridingSetterTest extends DriverResolutionTest {
+class OverrideOnNonOverridingSetterTest extends PubPackageResolutionTest {
   test_inInterface() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/part_of_different_library_test.dart b/pkg/analyzer/test/src/diagnostics/part_of_different_library_test.dart
index b54eff4..e26ae88 100644
--- a/pkg/analyzer/test/src/diagnostics/part_of_different_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/part_of_different_library_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,14 +14,14 @@
 }
 
 @reflectiveTest
-class PartOfDifferentLibraryTest extends DriverResolutionTest {
+class PartOfDifferentLibraryTest extends PubPackageResolutionTest {
   test_name() async {
-    newFile("/test/lib/part.dart", content: "part of lub;");
+    newFile('$testPackageLibPath/part.dart', content: "part of lub;");
     await assertErrorsInCode('''
 library lib;
 part 'part.dart';
 ''', [
-      error(StaticWarningCode.PART_OF_DIFFERENT_LIBRARY, 18, 11),
+      error(CompileTimeErrorCode.PART_OF_DIFFERENT_LIBRARY, 18, 11),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/part_of_non_part_test.dart b/pkg/analyzer/test/src/diagnostics/part_of_non_part_test.dart
index 89ca7ed..a03e62c 100644
--- a/pkg/analyzer/test/src/diagnostics/part_of_non_part_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/part_of_non_part_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class PartOfNonPartTest extends DriverResolutionTest {
+class PartOfNonPartTest extends PubPackageResolutionTest {
   test_part_of_non_part() async {
-    newFile("/test/lib/l2.dart", content: '''
+    newFile('$testPackageLibPath/l2.dart', content: '''
 library l2;
 ''');
     await assertErrorsInCode(r'''
diff --git a/pkg/analyzer/test/src/diagnostics/prefix_collides_with_top_level_member_test.dart b/pkg/analyzer/test/src/diagnostics/prefix_collides_with_top_level_member_test.dart
index e00d0ab..0aecbd6 100644
--- a/pkg/analyzer/test/src/diagnostics/prefix_collides_with_top_level_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/prefix_collides_with_top_level_member_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class PrefixCollidesWithTopLevelMemberTest extends DriverResolutionTest {
+class PrefixCollidesWithTopLevelMemberTest extends PubPackageResolutionTest {
   test_functionTypeAlias() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 class A{}
 ''');
@@ -30,7 +30,7 @@
   }
 
   test_no_collision() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 class A {}''');
     await assertNoErrorsInCode(r'''
@@ -44,7 +44,7 @@
   }
 
   test_topLevelFunction() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 class A{}
 ''');
@@ -58,7 +58,7 @@
   }
 
   test_topLevelVariable() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 class A{}
 ''');
@@ -72,7 +72,7 @@
   }
 
   test_type() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 class A{}
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/prefix_identifier_not_followed_by_dot_test.dart b/pkg/analyzer/test/src/diagnostics/prefix_identifier_not_followed_by_dot_test.dart
index 1f4c596..76faf80 100644
--- a/pkg/analyzer/test/src/diagnostics/prefix_identifier_not_followed_by_dot_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/prefix_identifier_not_followed_by_dot_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class PrefixIdentifierNotFollowedByDotTest extends DriverResolutionTest {
+class PrefixIdentifierNotFollowedByDotTest extends PubPackageResolutionTest {
   test_assignment_compound_in_method() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 ''');
     await assertErrorsInCode('''
@@ -32,7 +32,7 @@
   }
 
   test_assignment_compound_not_in_method() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 ''');
     await assertErrorsInCode('''
@@ -46,7 +46,7 @@
   }
 
   test_assignment_in_method() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 ''');
     await assertErrorsInCode('''
@@ -62,7 +62,7 @@
   }
 
   test_assignment_not_in_method() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 ''');
     await assertErrorsInCode('''
@@ -76,7 +76,7 @@
   }
 
   test_compoundAssignment() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 ''');
     await assertErrorsInCode('''
@@ -90,7 +90,7 @@
   }
 
   test_conditionalMethodInvocation() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 g() {}
 ''');
@@ -105,7 +105,7 @@
   }
 
   test_conditionalPropertyAccess_call_loadLibrary() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 ''');
     await assertErrorsInCode('''
@@ -119,7 +119,7 @@
   }
 
   test_conditionalPropertyAccess_get() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 var x;
 ''');
@@ -134,7 +134,7 @@
   }
 
   test_conditionalPropertyAccess_get_loadLibrary() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 ''');
     await assertErrorsInCode('''
@@ -148,7 +148,7 @@
   }
 
   test_conditionalPropertyAccess_set() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 var x;
 ''');
@@ -163,7 +163,7 @@
   }
 
   test_conditionalPropertyAccess_set_loadLibrary() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 ''');
     await assertErrorsInCode('''
@@ -177,7 +177,7 @@
   }
 
   test_prefix_not_followed_by_dot() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 ''');
     await assertErrorsInCode('''
diff --git a/pkg/analyzer/test/src/diagnostics/prefix_shadowed_by_local_declaration_test.dart b/pkg/analyzer/test/src/diagnostics/prefix_shadowed_by_local_declaration_test.dart
new file mode 100644
index 0000000..33c6cf1
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/prefix_shadowed_by_local_declaration_test.dart
@@ -0,0 +1,69 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(PrefixShadowedByLocalDeclarationTest);
+  });
+}
+
+@reflectiveTest
+class PrefixShadowedByLocalDeclarationTest extends PubPackageResolutionTest {
+  test_function_return_type_not_shadowed_by_parameter() async {
+    await assertNoErrorsInCode('''
+import 'dart:async' as a;
+a.Future f(int a) {
+  return null;
+}
+''');
+  }
+
+  test_local_variable_type_inside_function_with_shadowing_parameter() async {
+    await assertErrorsInCode('''
+import 'dart:async' as a;
+f(int a) {
+  a.Future x = null;
+  return x;
+}
+''', [
+      error(HintCode.UNUSED_IMPORT, 7, 12),
+      error(CompileTimeErrorCode.PREFIX_SHADOWED_BY_LOCAL_DECLARATION, 39, 1),
+    ]);
+  }
+
+  test_local_variable_type_inside_function_with_shadowing_variable_after() async {
+    await assertErrorsInCode('''
+import 'dart:async' as a;
+f() {
+  a.Future x = null;
+  int a = 0;
+  return [x, a];
+}
+''', [
+      error(HintCode.UNUSED_IMPORT, 7, 12),
+      error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 34, 1,
+          contextMessages: [message('$testPackageLibPath/test.dart', 59, 1)]),
+      error(CompileTimeErrorCode.PREFIX_SHADOWED_BY_LOCAL_DECLARATION, 34, 1),
+    ]);
+  }
+
+  test_local_variable_type_inside_function_with_shadowing_variable_before() async {
+    await assertErrorsInCode('''
+import 'dart:async' as a;
+f() {
+  int a = 0;
+  a.Future x = null;
+  return [x, a];
+}
+''', [
+      error(HintCode.UNUSED_IMPORT, 7, 12),
+      error(CompileTimeErrorCode.PREFIX_SHADOWED_BY_LOCAL_DECLARATION, 47, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/private_collision_in_mixin_application_test.dart b/pkg/analyzer/test/src/diagnostics/private_collision_in_mixin_application_test.dart
index 689ae85..de4ef80 100644
--- a/pkg/analyzer/test/src/diagnostics/private_collision_in_mixin_application_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/private_collision_in_mixin_application_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class PrivateCollisionInMixinApplicationTest extends DriverResolutionTest {
+class PrivateCollisionInMixinApplicationTest extends PubPackageResolutionTest {
   test_class_interfaceAndMixin_same() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void _foo() {}
 }
@@ -31,7 +31,7 @@
   }
 
   test_class_mixinAndMixin() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void _foo() {}
 }
@@ -51,7 +51,7 @@
   }
 
   test_class_mixinAndMixin_indirect() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void _foo() {}
 }
@@ -72,7 +72,7 @@
   }
 
   test_class_staticAndInstanceElement() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static void _foo() {}
 }
@@ -90,7 +90,7 @@
   }
 
   test_class_staticElements() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   static void _foo() {}
 }
@@ -108,7 +108,7 @@
   }
 
   test_class_superclassAndMixin_getter2() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   int get _foo => 0;
 }
@@ -128,7 +128,7 @@
   }
 
   test_class_superclassAndMixin_method2() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void _foo() {}
 }
@@ -147,22 +147,6 @@
     ]);
   }
 
-  test_class_superclassAndMixin_same() async {
-    newFile('/test/lib/a.dart', content: r'''
-class A {
-  void _foo() {}
-}
-''');
-
-    await assertErrorsInCode('''
-import 'a.dart';
-
-class C extends A with A {}
-''', [
-      error(CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION, 41, 1),
-    ]);
-  }
-
   test_class_superclassAndMixin_sameLibrary() async {
     await assertErrorsInCode('''
 class A {
@@ -181,7 +165,7 @@
   }
 
   test_class_superclassAndMixin_setter2() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   set _foo(int _) {}
 }
@@ -201,7 +185,7 @@
   }
 
   test_classTypeAlias_mixinAndMixin() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void _foo() {}
 }
@@ -221,7 +205,7 @@
   }
 
   test_classTypeAlias_mixinAndMixin_indirect() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void _foo() {}
 }
@@ -242,7 +226,7 @@
   }
 
   test_classTypeAlias_superclassAndMixin() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A {
   void _foo() {}
 }
@@ -260,24 +244,4 @@
       error(CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION, 35, 1),
     ]);
   }
-
-  test_classTypeAlias_superclassAndMixin_same() async {
-    newFile('/test/lib/a.dart', content: r'''
-class A {
-  void _foo() {}
-}
-
-class B {
-  void _foo() {}
-}
-''');
-
-    await assertErrorsInCode('''
-import 'a.dart';
-
-class C = A with A;
-''', [
-      error(CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION, 35, 1),
-    ]);
-  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/private_optional_parameter_test.dart b/pkg/analyzer/test/src/diagnostics/private_optional_parameter_test.dart
index 6a6812c..c8b9dbc 100644
--- a/pkg/analyzer/test/src/diagnostics/private_optional_parameter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/private_optional_parameter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class PrivateOptionalParameterTest extends DriverResolutionTest {
+class PrivateOptionalParameterTest extends PubPackageResolutionTest {
   test_fieldFormal() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/private_setter_test.dart b/pkg/analyzer/test/src/diagnostics/private_setter_test.dart
new file mode 100644
index 0000000..438630b
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/private_setter_test.dart
@@ -0,0 +1,113 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(PrivateSetterTest);
+  });
+}
+
+@reflectiveTest
+class PrivateSetterTest extends PubPackageResolutionTest {
+  test_typeLiteral_privateField_differentLibrary() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+class A {
+  static int _foo = 0;
+}
+''');
+    await assertErrorsInCode(r'''
+import 'a.dart';
+
+main() {
+  A._foo = 0;
+}
+''', [
+      error(CompileTimeErrorCode.PRIVATE_SETTER, 31, 4),
+    ]);
+
+    var aImport = findElement.importFind('package:test/a.dart');
+    assertElement(
+      findNode.simple('_foo = 0'),
+      aImport.setter('_foo'),
+    );
+  }
+
+  test_typeLiteral_privateField_sameLibrary() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  // ignore:unused_field
+  static int _foo = 0;
+}
+
+main() {
+  A._foo = 0;
+}
+''');
+  }
+
+  test_typeLiteral_privateSetter__sameLibrary() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  static set _foo(int _) {}
+}
+
+main() {
+  A._foo = 0;
+}
+''');
+  }
+
+  test_typeLiteral_privateSetter_differentLibrary_hasGetter() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+class A {
+  static set _foo(int _) {}
+  
+  static int get _foo => 0;
+}
+''');
+    await assertErrorsInCode(r'''
+import 'a.dart';
+
+main() {
+  A._foo = 0;
+}
+''', [
+      error(CompileTimeErrorCode.PRIVATE_SETTER, 31, 4),
+    ]);
+
+    var aImport = findElement.importFind('package:test/a.dart');
+    assertElement(
+      findNode.simple('_foo = 0'),
+      aImport.setter('_foo'),
+    );
+  }
+
+  test_typeLiteral_privateSetter_differentLibrary_noGetter() async {
+    newFile('$testPackageLibPath/a.dart', content: r'''
+class A {
+  static set _foo(int _) {}
+}
+''');
+    await assertErrorsInCode(r'''
+import 'a.dart';
+
+main() {
+  A._foo = 0;
+}
+''', [
+      error(CompileTimeErrorCode.PRIVATE_SETTER, 31, 4),
+    ]);
+
+    var aImport = findElement.importFind('package:test/a.dart');
+    assertElement(
+      findNode.simple('_foo = 0'),
+      aImport.setter('_foo'),
+    );
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/receiver_of_type_never_test.dart b/pkg/analyzer/test/src/diagnostics/receiver_of_type_never_test.dart
index 3c4b65e..0cfcca7 100644
--- a/pkg/analyzer/test/src/diagnostics/receiver_of_type_never_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/receiver_of_type_never_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,16 +15,8 @@
 }
 
 @reflectiveTest
-class InvalidUseOfNeverTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class InvalidUseOfNeverTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_binaryExpression_never_eqEq() async {
     await assertErrorsInCode(r'''
 void main(Never x) {
@@ -88,7 +77,7 @@
   x + (1 + 2);
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
     ]);
 
     assertBinaryExpression(
@@ -132,7 +121,7 @@
   x();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
     ]);
   }
 
@@ -200,8 +189,8 @@
   x[0];
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 25, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 25, 3),
     ]);
 
     assertIndexExpression(
@@ -218,9 +207,9 @@
   x[0] += 1 + 2;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 25, 3),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 25, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 25, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 25, 3),
     ]);
 
     assertIndexExpression(
@@ -239,8 +228,8 @@
   x[0] = 1 + 2;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 25, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 25, 3),
     ]);
 
     assertIndexExpression(
@@ -345,7 +334,7 @@
   x++;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
     ]);
 
     assertPostfixExpression(
@@ -378,7 +367,7 @@
   ++x;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 26, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 26, 1),
     ]);
 
     assertPrefixExpression(
@@ -480,7 +469,7 @@
   x.foo;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
     ]);
 
     assertSimpleIdentifier(
@@ -520,7 +509,7 @@
 }
 
 @reflectiveTest
-class InvalidUseOfNeverTest_Legacy extends DriverResolutionTest {
+class InvalidUseOfNeverTest_Legacy extends PubPackageResolutionTest {
   test_binaryExpression_eqEq() async {
     await assertNoErrorsInCode(r'''
 void main() {
@@ -546,7 +535,7 @@
   (throw '') + (1 + 2);
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 27, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 27, 1),
     ]);
 
     assertBinaryExpression(
diff --git a/pkg/analyzer/test/src/diagnostics/recursive_compile_time_constant_test.dart b/pkg/analyzer/test/src/diagnostics/recursive_compile_time_constant_test.dart
index 05d0a4c..90d06b2 100644
--- a/pkg/analyzer/test/src/diagnostics/recursive_compile_time_constant_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/recursive_compile_time_constant_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,16 +14,14 @@
 }
 
 @reflectiveTest
-class RecursiveCompileTimeConstantTest extends DriverResolutionTest {
+class RecursiveCompileTimeConstantTest extends PubPackageResolutionTest {
   test_cycle() async {
     await assertErrorsInCode(r'''
 const x = y + 1;
 const y = x + 1;
 ''', [
       error(CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, 6, 1),
-      error(StrongModeCode.TOP_LEVEL_CYCLE, 10, 1),
       error(CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, 23, 1),
-      error(StrongModeCode.TOP_LEVEL_CYCLE, 27, 1),
     ]);
   }
 
@@ -40,7 +38,7 @@
 
   test_fromMapLiteral() async {
     newFile(
-      '/test/lib/constants.dart',
+      '$testPackageLibPath/constants.dart',
       content: r'''
 const int x = y;
 const int y = x;
@@ -72,7 +70,6 @@
 const x = x;
 ''', [
       error(CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, 6, 1),
-      error(StrongModeCode.TOP_LEVEL_CYCLE, 10, 1),
     ]);
   }
 
@@ -85,7 +82,6 @@
 ];
 ''', [
       error(CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, 6, 5),
-      error(StrongModeCode.TOP_LEVEL_CYCLE, 39, 5),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/recursive_constructor_redirect_test.dart b/pkg/analyzer/test/src/diagnostics/recursive_constructor_redirect_test.dart
index e1e6130..25a71a3 100644
--- a/pkg/analyzer/test/src/diagnostics/recursive_constructor_redirect_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/recursive_constructor_redirect_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RecursiveConstructorRedirectTest extends DriverResolutionTest {
+class RecursiveConstructorRedirectTest extends PubPackageResolutionTest {
   test_directSelfReference() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/recursive_factory_redirect_test.dart b/pkg/analyzer/test/src/diagnostics/recursive_factory_redirect_test.dart
index 3a792e1..3bcab7d 100644
--- a/pkg/analyzer/test/src/diagnostics/recursive_factory_redirect_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/recursive_factory_redirect_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RecursiveFactoryRedirectTest extends DriverResolutionTest {
+class RecursiveFactoryRedirectTest extends PubPackageResolutionTest {
   test_directSelfReference() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/recursive_interface_inheritance_test.dart b/pkg/analyzer/test/src/diagnostics/recursive_interface_inheritance_test.dart
index 8650d66..472f7914 100644
--- a/pkg/analyzer/test/src/diagnostics/recursive_interface_inheritance_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/recursive_interface_inheritance_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RecursiveInterfaceInheritanceTest extends DriverResolutionTest {
+class RecursiveInterfaceInheritanceTest extends PubPackageResolutionTest {
   test_loop() async {
     await assertErrorsInCode('''
 class A implements B {}
diff --git a/pkg/analyzer/test/src/diagnostics/redirect_generative_to_missing_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/redirect_generative_to_missing_constructor_test.dart
index a349c9a..14a4018 100644
--- a/pkg/analyzer/test/src/diagnostics/redirect_generative_to_missing_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/redirect_generative_to_missing_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class RedirectGenerativeToNonGenerativeConstructorTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_missing() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/redirect_generative_to_non_generative_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/redirect_generative_to_non_generative_constructor_test.dart
index bc34b8d..5f7cf95 100644
--- a/pkg/analyzer/test/src/diagnostics/redirect_generative_to_non_generative_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/redirect_generative_to_non_generative_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class RedirectGenerativeToNonGenerativeConstructorTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_nonGenerative() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/redirect_to_abstract_class_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/redirect_to_abstract_class_constructor_test.dart
index a828062..57aabd4 100644
--- a/pkg/analyzer/test/src/diagnostics/redirect_to_abstract_class_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/redirect_to_abstract_class_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RedirectToAbstractClassConstructorTest extends DriverResolutionTest {
+class RedirectToAbstractClassConstructorTest extends PubPackageResolutionTest {
   test_abstractRedirectsToSelf() async {
     await assertErrorsInCode(r'''
 abstract class A {
diff --git a/pkg/analyzer/test/src/diagnostics/redirect_to_invalid_function_type_test.dart b/pkg/analyzer/test/src/diagnostics/redirect_to_invalid_function_type_test.dart
index bd47fd3..e76771c 100644
--- a/pkg/analyzer/test/src/diagnostics/redirect_to_invalid_function_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/redirect_to_invalid_function_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RedirectToInvalidFunctionTypeTest extends DriverResolutionTest {
+class RedirectToInvalidFunctionTypeTest extends PubPackageResolutionTest {
   test_redirectToInvalidFunctionType() async {
     await assertErrorsInCode('''
 class A implements B {
@@ -23,7 +23,7 @@
 class B {
   factory B() = A;
 }''', [
-      error(StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE, 65, 1),
+      error(CompileTimeErrorCode.REDIRECT_TO_INVALID_FUNCTION_TYPE, 65, 1),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/redirect_to_invalid_return_type_test.dart b/pkg/analyzer/test/src/diagnostics/redirect_to_invalid_return_type_test.dart
index d1b8b0f..8a754d2 100644
--- a/pkg/analyzer/test/src/diagnostics/redirect_to_invalid_return_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/redirect_to_invalid_return_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RedirectToInvalidReturnTypeTest extends DriverResolutionTest {
+class RedirectToInvalidReturnTypeTest extends PubPackageResolutionTest {
   test_redirectToInvalidReturnType() async {
     await assertErrorsInCode('''
 class A {
@@ -23,7 +23,7 @@
 class B {
   factory B() = A;
 }''', [
-      error(StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE, 47, 1),
+      error(CompileTimeErrorCode.REDIRECT_TO_INVALID_RETURN_TYPE, 47, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/redirect_to_missing_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/redirect_to_missing_constructor_test.dart
index e181529..058f1cc 100644
--- a/pkg/analyzer/test/src/diagnostics/redirect_to_missing_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/redirect_to_missing_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RedirectToMissingConstructorTest extends DriverResolutionTest {
+class RedirectToMissingConstructorTest extends PubPackageResolutionTest {
   test_named() async {
     await assertErrorsInCode('''
 class A implements B{
diff --git a/pkg/analyzer/test/src/diagnostics/redirect_to_non_class_test.dart b/pkg/analyzer/test/src/diagnostics/redirect_to_non_class_test.dart
index f087599..c7610f1c 100644
--- a/pkg/analyzer/test/src/diagnostics/redirect_to_non_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/redirect_to_non_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RedirectToNonClassTest extends DriverResolutionTest {
+class RedirectToNonClassTest extends PubPackageResolutionTest {
   test_notAType() async {
     await assertErrorsInCode('''
 class B {
diff --git a/pkg/analyzer/test/src/diagnostics/redirect_to_non_const_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/redirect_to_non_const_constructor_test.dart
index 25c414f..d5cb09a 100644
--- a/pkg/analyzer/test/src/diagnostics/redirect_to_non_const_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/redirect_to_non_const_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RedirectToNonConstConstructorTest extends DriverResolutionTest {
+class RedirectToNonConstConstructorTest extends PubPackageResolutionTest {
   test_constRedirector_cannotResolveRedirectee() async {
     // No crash when redirectee cannot be resolved.
     await assertErrorsInCode(r'''
@@ -35,6 +35,20 @@
 ''');
   }
 
+  test_constRedirector_constRedirectee_generic() async {
+    await assertNoErrorsInCode(r'''
+class A<T> {
+  const A(T value) : this._(value);
+  const A._(T value) : value = value;
+  final T value;
+}
+
+void main(){
+  const A<int>(1);
+}
+''');
+  }
+
   test_constRedirector_constRedirectee_viaInitializer() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/referenced_before_declaration_test.dart b/pkg/analyzer/test/src/diagnostics/referenced_before_declaration_test.dart
index 8e571cd..cdcd43d 100644
--- a/pkg/analyzer/test/src/diagnostics/referenced_before_declaration_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/referenced_before_declaration_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ReferencedBeforeDeclarationTest extends DriverResolutionTest {
+class ReferencedBeforeDeclarationTest extends PubPackageResolutionTest {
   test_cascade_after_declaration() async {
     await assertNoErrorsInCode(r'''
 testRequestHandler() {}
@@ -51,7 +51,7 @@
 print(x) {}
 ''', [
       error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 28, 1,
-          contextMessages: [message('/test/lib/test.dart', 34, 1)]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 34, 1)]),
     ]);
   }
 
@@ -65,11 +65,11 @@
 print(x) {}
 ''', [
       error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 28, 1,
-          contextMessages: [message('/test/lib/test.dart', 38, 1)]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 38, 1)]),
     ]);
   }
 
-  test_hideInBlock_subBlock() async {
+  test_hideInBlock_local_subBlock() async {
     await assertErrorsInCode(r'''
 var v = 1;
 main() {
@@ -81,10 +81,86 @@
 print(x) {}
 ''', [
       error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 34, 1,
-          contextMessages: [message('/test/lib/test.dart', 48, 1)]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 48, 1)]),
     ]);
   }
 
+  test_hideInSwitchCase_function() async {
+    await assertErrorsInCode(r'''
+var v = 0;
+
+void f(int a) {
+  switch (a) {
+    case 0:
+      v;
+      void v() {}
+  }
+}
+''', [
+      error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 61, 1,
+          contextMessages: [message('$testPackageLibPath/test.dart', 75, 1)]),
+    ]);
+
+    assertElement(findNode.simple('v;'), findElement.localFunction('v'));
+  }
+
+  test_hideInSwitchCase_local() async {
+    await assertErrorsInCode(r'''
+var v = 0;
+
+void f(int a) {
+  switch (a) {
+    case 0:
+      v;
+      var v = 1;
+  }
+}
+''', [
+      error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 61, 1,
+          contextMessages: [message('$testPackageLibPath/test.dart', 74, 1)]),
+    ]);
+
+    assertElement(findNode.simple('v;'), findElement.localVar('v'));
+  }
+
+  test_hideInSwitchDefault_function() async {
+    await assertErrorsInCode(r'''
+var v = 0;
+
+void f(int a) {
+  switch (a) {
+    default:
+      v;
+      void v() {}
+  }
+}
+''', [
+      error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 62, 1,
+          contextMessages: [message('$testPackageLibPath/test.dart', 76, 1)]),
+    ]);
+
+    assertElement(findNode.simple('v;'), findElement.localFunction('v'));
+  }
+
+  test_hideInSwitchDefault_local() async {
+    await assertErrorsInCode(r'''
+var v = 0;
+
+void f(int a) {
+  switch (a) {
+    default:
+      v;
+      var v = 1;
+  }
+}
+''', [
+      error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 62, 1,
+          contextMessages: [message('$testPackageLibPath/test.dart', 75, 1)]),
+    ]);
+
+    assertElement(findNode.simple('v;'), findElement.localVar('v'));
+  }
+
   test_inInitializer_closure() async {
     await assertErrorsInCode(r'''
 main() {
@@ -92,7 +168,7 @@
 }
 ''', [
       error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 25, 1,
-          contextMessages: [message('/test/lib/test.dart', 15, 1)]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 15, 1)]),
     ]);
   }
 
@@ -103,10 +179,34 @@
 }
 ''', [
       error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 19, 1,
-          contextMessages: [message('/test/lib/test.dart', 15, 1)]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 15, 1)]),
     ]);
   }
 
+  test_labeledStatement_function() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  // ignore:unused_label
+  label: void v() {}
+  v;
+}
+''');
+
+    assertElement(findNode.simple('v;'), findElement.localFunction('v'));
+  }
+
+  test_labeledStatement_local() async {
+    await assertNoErrorsInCode(r'''
+void f() {
+  // ignore:unused_label
+  label: var v = 0;
+  v; 
+}
+''');
+
+    assertElement(findNode.simple('v;'), findElement.localVar('v'));
+  }
+
   test_type_localFunction() async {
     await assertErrorsInCode(r'''
 void testTypeRef() {
@@ -116,7 +216,7 @@
 }
 ''', [
       error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 23, 6,
-          contextMessages: [message('/test/lib/test.dart', 44, 6)]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 44, 6)]),
     ]);
   }
 
@@ -129,7 +229,7 @@
 }
 ''', [
       error(CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, 23, 6,
-          contextMessages: [message('/test/lib/test.dart', 44, 6)]),
+          contextMessages: [message('$testPackageLibPath/test.dart', 44, 6)]),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/rethrow_outside_catch_test.dart b/pkg/analyzer/test/src/diagnostics/rethrow_outside_catch_test.dart
index a42d2d6..ee8c262 100644
--- a/pkg/analyzer/test/src/diagnostics/rethrow_outside_catch_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/rethrow_outside_catch_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class RethrowOutsideCatchTest extends DriverResolutionTest {
+class RethrowOutsideCatchTest extends PubPackageResolutionTest {
   test_insideCatch() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/return_in_generative_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/return_in_generative_constructor_test.dart
index 9b0d9de..55ee4b1 100644
--- a/pkg/analyzer/test/src/diagnostics/return_in_generative_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/return_in_generative_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ReturnInGenerativeConstructorTest extends DriverResolutionTest {
+class ReturnInGenerativeConstructorTest extends PubPackageResolutionTest {
   test_blockBody() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/return_in_generator_test.dart b/pkg/analyzer/test/src/diagnostics/return_in_generator_test.dart
index 5cfd8b3..bdc49f3 100644
--- a/pkg/analyzer/test/src/diagnostics/return_in_generator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/return_in_generator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class ReturnInGeneratorTest extends DriverResolutionTest {
+class ReturnInGeneratorTest extends PubPackageResolutionTest {
   test_async() async {
     await assertNoErrorsInCode(r'''
 f() async {
diff --git a/pkg/analyzer/test/src/diagnostics/return_of_invalid_type_test.dart b/pkg/analyzer/test/src/diagnostics/return_of_invalid_type_test.dart
index f078f04..986bd56 100644
--- a/pkg/analyzer/test/src/diagnostics/return_of_invalid_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/return_of_invalid_type_test.dart
@@ -5,8 +5,7 @@
 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';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,7 +15,7 @@
 }
 
 @reflectiveTest
-class ReturnOfInvalidTypeTest extends DriverResolutionTest {
+class ReturnOfInvalidTypeTest extends PubPackageResolutionTest {
   test_closure() async {
     await assertErrorsInCode('''
 typedef Td = int Function();
@@ -24,7 +23,7 @@
   return () => "hello";
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 53, 7),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE, 53, 7),
     ]);
   }
 
@@ -35,7 +34,7 @@
 }
 ''', [
       error(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR, 33, 1),
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR, 33, 1),
     ]);
   }
 
@@ -46,7 +45,7 @@
 }
 ''', [
       error(
-          StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR, 27, 1),
+          CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_CONSTRUCTOR, 27, 1),
     ]);
   }
 
@@ -68,7 +67,7 @@
   return a;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 54, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 54, 1),
     ]);
   }
 
@@ -85,7 +84,7 @@
   return 5;
 }
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, 0, 3),
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_RETURN_TYPE, 0, 3),
     ]);
   }
 
@@ -111,7 +110,7 @@
   return 5;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 36, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 36, 1),
     ]);
   }
 
@@ -121,7 +120,7 @@
   return 5;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 26, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 26, 1),
     ]);
   }
 
@@ -139,7 +138,7 @@
   return a;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 39, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 39, 1),
     ]);
   }
 
@@ -189,13 +188,13 @@
   return 42;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 20, 2),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 20, 2),
     ]);
   }
 
   test_function_sync_block_num__to_int() async {
     var expectedErrors = expectedErrorsByNullability(nullable: [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 24, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 24, 1),
     ], legacy: []);
     await assertErrorsInCode(r'''
 int f(num a) {
@@ -210,7 +209,7 @@
   return '0';
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 19, 3),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 19, 3),
     ]);
   }
 
@@ -246,13 +245,13 @@
   return a;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 25, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 25, 1),
     ]);
   }
 
   test_function_sync_block_void__to_Null() async {
     var expectedErrors = expectedErrorsByNullability(nullable: [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 26, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 26, 1),
     ], legacy: []);
     await assertErrorsInCode('''
 Null f(void a) {
@@ -279,7 +278,7 @@
     await assertErrorsInCode('''
 int f() => '0';
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 11, 3),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 11, 3),
     ]);
   }
 
@@ -289,7 +288,7 @@
   return '0';
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 21, 3),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 21, 3),
     ]);
   }
 
@@ -297,7 +296,7 @@
     await assertErrorsInCode('''
 int get g => '0';
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 13, 3),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 13, 3),
     ]);
   }
 
@@ -310,7 +309,7 @@
   g();
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 34, 3),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 34, 3),
     ]);
   }
 
@@ -323,7 +322,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 38, 3),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 38, 3),
     ]);
   }
 
@@ -354,7 +353,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_METHOD, 33, 3),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD, 33, 3),
     ]);
   }
 
@@ -376,7 +375,7 @@
   int f() => '0';
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_METHOD, 23, 3),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_METHOD, 23, 3),
     ]);
   }
 }
@@ -390,7 +389,7 @@
   return 0;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 34, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 34, 1),
     ]);
   }
 
@@ -400,7 +399,7 @@
   return a;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 40, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 40, 1),
     ]);
   }
 
@@ -412,7 +411,7 @@
   return a;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 67, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 67, 1),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/return_without_value_test.dart b/pkg/analyzer/test/src/diagnostics/return_without_value_test.dart
index 1d5efe5..6d33a0d 100644
--- a/pkg/analyzer/test/src/diagnostics/return_without_value_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/return_without_value_test.dart
@@ -5,8 +5,7 @@
 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';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,14 +15,14 @@
 }
 
 @reflectiveTest
-class ReturnWithoutValueTest extends DriverResolutionTest {
+class ReturnWithoutValueTest extends PubPackageResolutionTest {
   test_async_futureInt() async {
     await assertErrorsInCode('''
 Future<int> f() async {
   return;
 }
 ''', [
-      error(StaticWarningCode.RETURN_WITHOUT_VALUE, 26, 6),
+      error(CompileTimeErrorCode.RETURN_WITHOUT_VALUE, 26, 6),
     ]);
   }
 
@@ -33,7 +32,7 @@
   return;
 }
 ''', [
-      error(StaticWarningCode.RETURN_WITHOUT_VALUE, 29, 6),
+      error(CompileTimeErrorCode.RETURN_WITHOUT_VALUE, 29, 6),
     ]);
   }
 
@@ -45,7 +44,7 @@
   }
 }
 ''', [
-      error(StaticWarningCode.RETURN_WITHOUT_VALUE, 30, 6),
+      error(CompileTimeErrorCode.RETURN_WITHOUT_VALUE, 30, 6),
     ]);
   }
 
@@ -55,7 +54,7 @@
   return;
 }
 ''', [
-      error(StaticWarningCode.RETURN_WITHOUT_VALUE, 12, 6),
+      error(CompileTimeErrorCode.RETURN_WITHOUT_VALUE, 12, 6),
     ]);
   }
 
@@ -112,7 +111,7 @@
   };
 }
 ''', [
-      error(StaticWarningCode.RETURN_WITHOUT_VALUE, 48, 6),
+      error(CompileTimeErrorCode.RETURN_WITHOUT_VALUE, 48, 6),
     ]);
   }
 
@@ -132,7 +131,7 @@
   }
 }
 ''', [
-      error(StaticWarningCode.RETURN_WITHOUT_VALUE, 26, 6),
+      error(CompileTimeErrorCode.RETURN_WITHOUT_VALUE, 26, 6),
     ]);
   }
 
@@ -147,7 +146,7 @@
   return;
 }
 ''', [
-      error(StaticWarningCode.RETURN_WITHOUT_VALUE, 50, 6),
+      error(CompileTimeErrorCode.RETURN_WITHOUT_VALUE, 50, 6),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart
index 4c2223d..f535a32 100644
--- a/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart
@@ -30,7 +30,7 @@
     await verifyVersion('2.5.0', '''
 const a = 42 >>> 3;
 ''', expectedErrors: [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 13, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 13, 3),
     ]);
   }
 
@@ -41,7 +41,7 @@
 const a = 42 >>> 3;
 ''', expectedErrors: [
       error(HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, 13, 3),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 13, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 13, 3),
     ]);
   }
 
@@ -69,7 +69,7 @@
     await verifyVersion('2.5.0', '''
 var a = 42 >>> 3;
 ''', expectedErrors: [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 11, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 11, 3),
     ]);
   }
 
@@ -80,7 +80,7 @@
 var a = 42 >>> 3;
 ''', expectedErrors: [
       error(HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, 11, 3),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 11, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 11, 3),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_never_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_never_test.dart
index ecbfa36..25f3ed0 100644
--- a/pkg/analyzer/test/src/diagnostics/sdk_version_never_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_never_test.dart
@@ -7,12 +7,13 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../dart/resolution/with_null_safety_mixin.dart';
 import 'sdk_constraint_verifier_support.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(SdkVersionNeverTest);
-    defineReflectiveTests(SdkVersionNeverWithNnbdTest);
+    defineReflectiveTests(SdkVersionNeverWithNullSafetyTest);
   });
 }
 
@@ -32,12 +33,8 @@
 }
 
 @reflectiveTest
-class SdkVersionNeverWithNnbdTest extends SdkConstraintVerifierTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures =
-        FeatureSet.forTesting(additionalFeatures: [Feature.non_nullable]);
-
+class SdkVersionNeverWithNullSafetyTest extends SdkConstraintVerifierTest
+    with WithNullSafetyMixin {
   test_experimentEnabled() async {
     await verifyVersion('2.7.0', r'''
 Never foo = (throw 42);
diff --git a/pkg/analyzer/test/src/diagnostics/set_element_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/set_element_from_deferred_library_test.dart
index daa180b..c5af2c7 100644
--- a/pkg/analyzer/test/src/diagnostics/set_element_from_deferred_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/set_element_from_deferred_library_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,11 +18,11 @@
 }
 
 @reflectiveTest
-class SetElementFromDeferredLibraryTest extends DriverResolutionTest {
+class SetElementFromDeferredLibraryTest extends PubPackageResolutionTest {
   @failingTest
   test_const_ifElement_thenTrue_elseDeferred() async {
     // reports wrong error code
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -34,7 +34,7 @@
   }
 
   test_const_ifElement_thenTrue_thenDeferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(
         r'''
@@ -53,7 +53,7 @@
   }
 
   test_const_topLevel_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -64,7 +64,7 @@
   }
 
   test_const_topLevel_deferred_nested() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const int c = 1;''');
     await assertErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
diff --git a/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart
index 5ab2d41..6fcc0ed 100644
--- a/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,7 +18,7 @@
 }
 
 @reflectiveTest
-class SetElementTypeNotAssignableTest extends DriverResolutionTest {
+class SetElementTypeNotAssignableTest extends PubPackageResolutionTest {
   test_const_ifElement_thenElseFalse_intInt() async {
     await assertErrorsInCode(
         '''
@@ -42,7 +42,8 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 82, 1),
+                error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 82,
+                    1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 64, 19),
@@ -56,11 +57,13 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 31, 3),
+                error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 31,
+                    3),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 20, 14),
-                error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 31, 3),
+                error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 31,
+                    3),
               ]);
   }
 
@@ -98,7 +101,8 @@
 ''',
         analysisOptions.experimentStatus.constant_update_2018
             ? [
-                error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 53, 1),
+                error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 53,
+                    1),
               ]
             : [
                 error(CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT, 43, 11),
@@ -121,7 +125,7 @@
     await assertErrorsInCode('''
 var v = const <String>{42};
 ''', [
-      error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 23, 2),
+      error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 23, 2),
     ]);
   }
 
@@ -137,7 +141,7 @@
 const dynamic x = 42;
 var v = const <String>{x};
 ''', [
-      error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 45, 1),
+      error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 45, 1),
     ]);
   }
 
@@ -145,7 +149,7 @@
     await assertErrorsInCode('''
 var v = <String>{42};
 ''', [
-      error(StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 17, 2),
+      error(CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE, 17, 2),
     ]);
   }
 
@@ -169,7 +173,7 @@
     await assertErrorsInCode('''
 var v = <int>[if (1 < 0) 'a'];
 ''', [
-      error(StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 25, 3),
+      error(CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 25, 3),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/shared_deferred_prefix_test.dart b/pkg/analyzer/test/src/diagnostics/shared_deferred_prefix_test.dart
index fc41cc6..9574bc5 100644
--- a/pkg/analyzer/test/src/diagnostics/shared_deferred_prefix_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/shared_deferred_prefix_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,13 +14,13 @@
 }
 
 @reflectiveTest
-class SharedDeferredPrefixTest extends DriverResolutionTest {
+class SharedDeferredPrefixTest extends PubPackageResolutionTest {
   test_hasSharedDeferredPrefix() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 f1() {}
 ''');
-    newFile('/test/lib/lib2.dart', content: '''
+    newFile('$testPackageLibPath/lib2.dart', content: '''
 library lib2;
 f2() {}
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/spread_expression_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/spread_expression_from_deferred_library_test.dart
index 3f20714..d62d6ba 100644
--- a/pkg/analyzer/test/src/diagnostics/spread_expression_from_deferred_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/spread_expression_from_deferred_library_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,9 +18,9 @@
 }
 
 @reflectiveTest
-class SpreadExpressionFromDeferredLibraryTest extends DriverResolutionTest {
+class SpreadExpressionFromDeferredLibraryTest extends PubPackageResolutionTest {
   test_inList_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const List c = [];''');
     await assertErrorsInCode(
         r'''
@@ -42,7 +42,7 @@
   }
 
   test_inList_deferred_notConst() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const List c = [];''');
     await assertNoErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -52,7 +52,7 @@
   }
 
   test_inList_notDeferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const List c = [];''');
     await assertErrorsInCode(
         r'''
@@ -68,7 +68,7 @@
   }
 
   test_inMap_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const Map c = <int, int>{};''');
     await assertErrorsInCode(
         r'''
@@ -90,7 +90,7 @@
   }
 
   test_inMap_notConst() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const Map c = <int, int>{};''');
     await assertNoErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -100,7 +100,7 @@
   }
 
   test_inMap_notDeferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const Map c = <int, int>{};''');
     await assertErrorsInCode(
         r'''
@@ -116,7 +116,7 @@
   }
 
   test_inSet_deferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const Set c = <int>{};''');
     await assertErrorsInCode(
         r'''
@@ -138,7 +138,7 @@
   }
 
   test_inSet_notConst() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const Set c = <int>{};''');
     await assertNoErrorsInCode(r'''
 import 'lib1.dart' deferred as a;
@@ -148,7 +148,7 @@
   }
 
   test_inSet_notDeferred() async {
-    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+    newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
 const Set c = <int>{};''');
     await assertErrorsInCode(
         r'''
diff --git a/pkg/analyzer/test/src/diagnostics/static_access_to_instance_member_test.dart b/pkg/analyzer/test/src/diagnostics/static_access_to_instance_member_test.dart
index db3e52c..3ae9041 100644
--- a/pkg/analyzer/test/src/diagnostics/static_access_to_instance_member_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/static_access_to_instance_member_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class StaticAccessToInstanceMemberTest extends DriverResolutionTest {
+class StaticAccessToInstanceMemberTest extends PubPackageResolutionTest {
   test_annotation() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -35,7 +35,7 @@
   E.g;
 }
 ''', [
-      error(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 51, 1),
+      error(CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 51, 1),
     ]);
   }
 
@@ -48,7 +48,7 @@
   E.m();
 }
 ''', [
-      error(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 47, 1),
+      error(CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 47, 1),
     ]);
   }
 
@@ -61,7 +61,7 @@
   E.s = 2;
 }
 ''', [
-      error(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 56, 1),
+      error(CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 56, 1),
     ]);
   }
 
@@ -73,7 +73,7 @@
 main() {
   A.m();
 }''', [
-      error(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 34, 1),
+      error(CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 34, 1),
     ]);
   }
 
@@ -85,7 +85,7 @@
 main() {
   A.m;
 }''', [
-      error(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 34, 1),
+      error(CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 34, 1),
     ]);
   }
 
@@ -97,7 +97,7 @@
 main() {
   A.f;
 }''', [
-      error(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 34, 1),
+      error(CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 34, 1),
     ]);
   }
 
@@ -109,7 +109,7 @@
 main() {
   A.f;
 }''', [
-      error(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 40, 1),
+      error(CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 40, 1),
     ]);
   }
 
@@ -121,7 +121,7 @@
 main() {
   A.f = 42;
 }''', [
-      error(StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 39, 1),
+      error(CompileTimeErrorCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, 39, 1),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/strict_raw_type_test.dart b/pkg/analyzer/test/src/diagnostics/strict_raw_type_test.dart
index ed4670e..238ed5a 100644
--- a/pkg/analyzer/test/src/diagnostics/strict_raw_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/strict_raw_type_test.dart
@@ -3,11 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,10 +14,16 @@
 }
 
 @reflectiveTest
-class StrictRawTypeTest extends DriverResolutionTest with PackageMixin {
+class StrictRawTypeTest extends PubPackageResolutionTest {
   @override
-  AnalysisOptionsImpl get analysisOptions =>
-      AnalysisOptionsImpl()..strictRawTypes = true;
+  void setUp() {
+    super.setUp();
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        strictRawTypes: true,
+      ),
+    );
+  }
 
   test_asExpression() async {
     await assertNoErrorsInCode(r'''
@@ -32,7 +36,7 @@
   }
 
   test_functionParts_optionalTypeArg() async {
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @optionalTypeArgs
@@ -140,7 +144,7 @@
   }
 
   test_topLevelField_optionalTypeArg() async {
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @optionalTypeArgs
@@ -186,7 +190,7 @@
   }
 
   test_typedef_modern_optionalTypeArgs() async {
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @optionalTypeArgs
@@ -210,7 +214,7 @@
   }
 
   test_TypeOnClassDeclaration_optionalTypeArgs() async {
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @optionalTypeArgs
@@ -247,7 +251,7 @@
   }
 
   test_typeOnExtendedType_optionalTypeArgs() async {
-    addMetaPackage();
+    writeTestPackageConfigWithMeta();
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
 @optionalTypeArgs
diff --git a/pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart b/pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart
index 504a6f1..a5aed99 100644
--- a/pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +17,7 @@
 }
 
 @reflectiveTest
-class SubtypeOfFfiClassInExtendsTest extends DriverResolutionTest {
+class SubtypeOfFfiClassInExtendsTest extends PubPackageResolutionTest {
   test_Double() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
@@ -135,7 +135,7 @@
 }
 
 @reflectiveTest
-class SubtypeOfFfiClassInImplementsTest extends DriverResolutionTest {
+class SubtypeOfFfiClassInImplementsTest extends PubPackageResolutionTest {
   test_Double() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
@@ -255,7 +255,7 @@
 }
 
 @reflectiveTest
-class SubtypeOfFfiClassInWithTest extends DriverResolutionTest {
+class SubtypeOfFfiClassInWithTest extends PubPackageResolutionTest {
   test_Double() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/subtype_of_sealed_class_test.dart b/pkg/analyzer/test/src/diagnostics/subtype_of_sealed_class_test.dart
index cf50d59..1ac4382 100644
--- a/pkg/analyzer/test/src/diagnostics/subtype_of_sealed_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/subtype_of_sealed_class_test.dart
@@ -206,6 +206,7 @@
   /// that [root] is the root of a PubWorkspace, and a PubWorkspacePackage.
   void _newPubPackageRoot(String root) {
     newFile('$root/pubspec.yaml');
+    configureWorkspace(root: root);
   }
 
   /// Resolve the file with the given [path].
diff --git a/pkg/analyzer/test/src/diagnostics/subtype_of_struct_class_test.dart b/pkg/analyzer/test/src/diagnostics/subtype_of_struct_class_test.dart
index 0c5b17e..66f4192 100644
--- a/pkg/analyzer/test/src/diagnostics/subtype_of_struct_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/subtype_of_struct_class_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +17,7 @@
 }
 
 @reflectiveTest
-class SubtypeOfStructClassInExtendsTest extends DriverResolutionTest {
+class SubtypeOfStructClassInExtendsTest extends PubPackageResolutionTest {
   test_extends() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
@@ -30,7 +30,7 @@
 }
 
 @reflectiveTest
-class SubtypeOfStructClassInImplementsTest extends DriverResolutionTest {
+class SubtypeOfStructClassInImplementsTest extends PubPackageResolutionTest {
   test_implements() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
@@ -43,7 +43,7 @@
 }
 
 @reflectiveTest
-class SubtypeOfStructClassInWithTest extends DriverResolutionTest {
+class SubtypeOfStructClassInWithTest extends PubPackageResolutionTest {
   test_with() async {
     await assertErrorsInCode(r'''
 import 'dart:ffi';
diff --git a/pkg/analyzer/test/src/diagnostics/super_in_extension_test.dart b/pkg/analyzer/test/src/diagnostics/super_in_extension_test.dart
index e28a9eb..1e7f624 100644
--- a/pkg/analyzer/test/src/diagnostics/super_in_extension_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/super_in_extension_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class SuperInExtensionTest extends DriverResolutionTest {
+class SuperInExtensionTest extends PubPackageResolutionTest {
   test_binaryOperator_inMethod() async {
     await assertErrorsInCode('''
 extension E on int {
diff --git a/pkg/analyzer/test/src/diagnostics/super_in_invalid_context_test.dart b/pkg/analyzer/test/src/diagnostics/super_in_invalid_context_test.dart
index 561613b..3a326ae 100644
--- a/pkg/analyzer/test/src/diagnostics/super_in_invalid_context_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/super_in_invalid_context_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class SuperInInvalidContextTest extends DriverResolutionTest {
+class SuperInInvalidContextTest extends PubPackageResolutionTest {
   test_binaryExpression() async {
     await assertErrorsInCode('''
 var v = super + 0;
diff --git a/pkg/analyzer/test/src/diagnostics/super_in_redirecting_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/super_in_redirecting_constructor_test.dart
index 1a10868..cbd6cdd 100644
--- a/pkg/analyzer/test/src/diagnostics/super_in_redirecting_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/super_in_redirecting_constructor_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,29 +14,27 @@
 }
 
 @reflectiveTest
-class SuperInRedirectingConstructorTest extends DriverResolutionTest {
+class SuperInRedirectingConstructorTest extends PubPackageResolutionTest {
   test_redirectionSuper() async {
     await assertErrorsInCode(r'''
-class A {}
-class B {
-  B() : this.name(), super();
-  B.name() {}
+class A {
+  A() : this.name(), super();
+  A.name() {}
 }
 ''', [
-      error(CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR, 42, 7),
+      error(CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR, 31, 7),
     ]);
   }
 
   test_superRedirection() async {
     await assertErrorsInCode(r'''
-class A {}
-class B {
-  B() : super(), this.name();
-  B.name() {}
+class A {
+  A() : super(), this.name();
+  A.name() {}
 }
 ''', [
-      error(StrongModeCode.INVALID_SUPER_INVOCATION, 29, 7),
-      error(CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR, 29, 7),
+      error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 18, 7),
+      error(CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR, 18, 7),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/super_initializer_in_object_test.dart b/pkg/analyzer/test/src/diagnostics/super_initializer_in_object_test.dart
index c5e11c2..171e542 100644
--- a/pkg/analyzer/test/src/diagnostics/super_initializer_in_object_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/super_initializer_in_object_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class SuperInitializerInObjectTest extends DriverResolutionTest {
+class SuperInitializerInObjectTest extends PubPackageResolutionTest {
   @failingTest
   test_superInitializerInObject() async {
     await assertErrorsInCode(r'''
diff --git a/pkg/analyzer/test/src/diagnostics/switch_case_completes_normally_test.dart b/pkg/analyzer/test/src/diagnostics/switch_case_completes_normally_test.dart
index 2060b19..cdde582 100644
--- a/pkg/analyzer/test/src/diagnostics/switch_case_completes_normally_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/switch_case_completes_normally_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,12 +14,8 @@
 }
 
 @reflectiveTest
-class SwitchCaseCompletesNormallyTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
+class SwitchCaseCompletesNormallyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_break() async {
     await assertNoErrorsInCode(r'''
 void f(int a) {
diff --git a/pkg/analyzer/test/src/diagnostics/switch_expression_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/switch_expression_not_assignable_test.dart
index e8d5051..60f0a17 100644
--- a/pkg/analyzer/test/src/diagnostics/switch_expression_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/switch_expression_not_assignable_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class SwitchExpressionNotAssignableTest extends DriverResolutionTest {
+class SwitchExpressionNotAssignableTest extends PubPackageResolutionTest {
   test_simple() async {
     await assertErrorsInCode('''
 f(int p) {
@@ -22,7 +22,7 @@
     case 'a': break;
   }
 }''', [
-      error(StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE, 21, 1),
+      error(CompileTimeErrorCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE, 21, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index 496937e..c166314 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -4,14 +4,20 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import 'abstract_class_member_test.dart' as abstract_class_member;
+import 'abstract_field_constructor_initializer_test.dart'
+    as abstract_field_constructor_initializer;
+import 'abstract_field_initializer_test.dart' as abstract_field_initializer;
 import 'abstract_super_member_reference_test.dart'
     as abstract_super_member_reference;
+import 'access_private_enum_field_test.dart' as access_private_enum_field;
 import 'ambiguous_export_test.dart' as ambiguous_export;
 import 'ambiguous_extension_member_access_test.dart'
     as ambiguous_extension_member_access;
 import 'ambiguous_import_test.dart' as ambiguous_import;
 import 'ambiguous_set_or_map_literal_test.dart' as ambiguous_set_or_map_literal;
 import 'annotation_on_pointer_field_test.dart' as annotation_on_pointer_field;
+import 'annotation_with_non_class_test.dart' as annotation_with_non_class;
 import 'argument_type_not_assignable_test.dart' as argument_type_not_assignable;
 import 'assert_in_redirecting_constructor_test.dart'
     as assert_in_redirecting_constructor;
@@ -23,10 +29,12 @@
 import 'assignment_to_function_test.dart' as assignment_to_function;
 import 'assignment_to_method_test.dart' as assignment_to_method;
 import 'assignment_to_type_test.dart' as assignment_to_type;
+import 'async_for_in_wrong_context_test.dart' as async_for_in_wrong_context;
 import 'async_keyword_used_as_identifier_test.dart'
     as async_keyword_used_as_identifier;
 import 'await_in_late_local_variable_initializer_test.dart'
     as await_in_late_local_variable_initializer;
+import 'await_in_wrong_context_test.dart' as await_in_wrong_context;
 import 'body_might_complete_normally_test.dart' as body_might_complete_normally;
 import 'built_in_identifier_as_extension_name_test.dart'
     as built_in_as_extension_name;
@@ -54,13 +62,34 @@
     as conflicting_type_variable_and_container;
 import 'conflicting_type_variable_and_member_test.dart'
     as conflicting_type_variable_and_member;
+import 'const_constructor_field_type_mismatch_test.dart'
+    as const_constructor_field_type_mismatch;
 import 'const_constructor_param_type_mismatch_test.dart'
     as const_constructor_param_type_mismatch;
 import 'const_constructor_with_field_initialized_by_non_const_test.dart'
     as const_constructor_with_field_initialized_by_non_const;
 import 'const_constructor_with_mixin_with_field_test.dart'
     as const_constructor_with_mixin_with_field;
+import 'const_constructor_with_non_const_super_test.dart'
+    as const_constructor_with_non_const_super;
+import 'const_constructor_with_non_final_field_test.dart'
+    as const_constructor_with_non_final_field;
+import 'const_deferred_class_test.dart' as const_deferred_class;
 import 'const_eval_throws_exception_test.dart' as const_eval_throws_exception;
+import 'const_eval_throws_idbze_test.dart' as const_eval_throws_idbze;
+import 'const_eval_type_bool_int_test.dart' as const_eval_type_bool_int;
+import 'const_eval_type_bool_num_string_test.dart'
+    as const_eval_type_bool_num_string;
+import 'const_eval_type_bool_test.dart' as const_eval_type_bool;
+import 'const_eval_type_num_test.dart' as const_eval_type_num;
+import 'const_field_initializer_not_assignable_test.dart'
+    as const_field_initializer_not_assignable;
+import 'const_formal_parameter_test.dart' as const_formal_parameter;
+import 'const_initialized_with_non_constant_value_from_deferred_library_test.dart'
+    as const_initialized_with_non_constant_value_from_deferred_library;
+import 'const_initialized_with_non_constant_value_test.dart'
+    as const_initialized_with_non_constant_value;
+import 'const_instance_field_test.dart' as const_instance_field;
 import 'const_map_key_expression_type_implements_equals_test.dart'
     as const_map_key_expression_type_implements_equals;
 import 'const_not_initialized_test.dart' as const_not_initialized;
@@ -69,6 +98,14 @@
 import 'const_spread_expected_list_or_set_test.dart'
     as const_spread_expected_list_or_set;
 import 'const_spread_expected_map_test.dart' as const_spread_expected_map;
+import 'const_with_non_const_test.dart' as const_with_non_const;
+import 'const_with_non_constant_argument_test.dart'
+    as const_with_non_constant_argument;
+import 'const_with_non_type_test.dart' as const_with_non_type;
+import 'const_with_type_parameters_test.dart' as const_with_type_parameters;
+import 'const_with_undefined_constructor_test.dart'
+    as const_with_undefined_constructor;
+import 'could_not_infer_test.dart' as could_not_infer;
 import 'dead_code_test.dart' as dead_code;
 import 'dead_null_aware_expression_test.dart' as dead_null_aware_expression;
 import 'default_list_constructor_test.dart' as default_list_constructor;
@@ -107,8 +144,6 @@
     as expected_one_set_type_arguments;
 import 'expected_two_map_type_arguments_test.dart'
     as expected_two_map_type_arguments;
-import 'export_duplicated_library_named_test.dart'
-    as export_duplicated_library_named;
 import 'export_internal_library_test.dart' as export_internal_library;
 import 'export_legacy_symbol_test.dart' as export_legacy_symbol;
 import 'export_of_non_library_test.dart' as export_of_non_library;
@@ -167,6 +202,8 @@
     as for_in_of_invalid_element_type;
 import 'for_in_of_invalid_type_test.dart' as for_in_of_invalid_type;
 import 'for_in_with_const_variable_test.dart' as for_in_with_const_variable;
+import 'generic_function_type_cannot_be_bound_test.dart'
+    as generic_function_type_cannot_be_bound;
 import 'generic_struct_subclass_test.dart' as generic_struct_subclass;
 import 'getter_not_assignable_setter_types_test.dart'
     as getter_not_assignable_setter_types;
@@ -174,7 +211,11 @@
     as getter_not_subtype_setter_types;
 import 'if_element_condition_from_deferred_library_test.dart'
     as if_element_condition_from_deferred_library;
+import 'illegal_async_generator_return_type_test.dart'
+    as illegal_async_generator_return_type;
 import 'illegal_async_return_type_test.dart' as illegal_async_return_type;
+import 'illegal_sync_generator_return_type_test.dart'
+    as illegal_sync_generator_return_type;
 import 'implements_deferred_class_test.dart' as implements_deferred_class;
 import 'implements_disallowed_class_test.dart' as implements_disallowed_class;
 import 'implements_non_class_test.dart' as implements_non_class;
@@ -183,27 +224,43 @@
     as implicit_this_reference_in_initializer;
 import 'import_deferred_library_with_load_function_test.dart'
     as import_deferred_library_with_load_function;
-import 'import_duplicated_library_named_test.dart'
-    as import_duplicated_library_named;
+import 'import_internal_library_test.dart' as import_internal_library;
 import 'import_of_non_library_test.dart' as import_of_non_library;
 import 'inconsistent_case_expression_types_test.dart'
     as inconsistent_case_expression_types;
 import 'inconsistent_inheritance_getter_and_method_test.dart'
     as inconsistent_inheritance_getter_and_method;
 import 'inconsistent_inheritance_test.dart' as inconsistent_inheritance;
+import 'inconsistent_language_version_override_test.dart'
+    as inconsistent_language_version_override;
 import 'inference_failure_on_collection_literal_test.dart'
     as inference_failure_on_collection_literal;
 import 'inference_failure_on_function_return_type_test.dart'
     as inference_failure_on_function_return_type;
+import 'inference_failure_on_instance_creation_test.dart'
+    as inference_failure_on_instance_creation;
 import 'inference_failure_on_uninitialized_variable_test.dart'
     as inference_failure_on_uninitialized_variable;
 import 'inference_failure_on_untyped_parameter_test.dart'
     as inference_failure_on_untyped_parameter;
+import 'initializer_for_non_existent_field_test.dart'
+    as initializer_for_non_existent_field;
+import 'initializer_for_static_field_test.dart' as initializer_for_static_field;
+import 'initializing_formal_for_non_existent_field_test.dart'
+    as initializing_formal_for_non_existent_field;
+import 'initializing_formal_for_static_field_test.dart'
+    as initializing_formal_for_static_field;
 import 'instance_access_to_static_member_test.dart'
     as instance_access_to_static_member;
+import 'instance_member_access_from_factory_test.dart'
+    as instance_member_access_from_factory;
 import 'instance_member_access_from_static_test.dart'
     as instance_member_access_from_static;
 import 'instantiate_abstract_class_test.dart' as instantiate_abstract_class;
+import 'instantiate_enum_test.dart' as instantiate_enum;
+import 'integer_literal_imprecise_as_double_test.dart'
+    as integer_literal_imprecise_as_double;
+import 'integer_literal_out_of_range_test.dart' as integer_literal_out_of_range;
 import 'invalid_annotation_from_deferred_library_test.dart'
     as invalid_annotation_from_deferred_library;
 import 'invalid_annotation_getter_test.dart' as invalid_annotation_getter;
@@ -227,6 +284,7 @@
 import 'invalid_literal_annotation_test.dart' as invalid_literal_annotation;
 import 'invalid_modifier_on_constructor_test.dart'
     as invalid_modifier_on_constructor;
+import 'invalid_modifier_on_setter_test.dart' as invalid_modifier_on_setter;
 import 'invalid_non_virtual_annotation_test.dart'
     as invalid_non_virtual_annotation;
 import 'invalid_null_aware_operator_test.dart' as invalid_null_aware_operator;
@@ -244,6 +302,7 @@
 import 'invalid_required_positional_param_test.dart'
     as invalid_required_positional_param;
 import 'invalid_sealed_annotation_test.dart' as invalid_sealed_annotation;
+import 'invalid_super_invocation_test.dart' as invalid_super_invocation;
 import 'invalid_type_argument_in_const_list_test.dart'
     as invalid_type_argument_in_const_list;
 import 'invalid_type_argument_in_const_map_test.dart'
@@ -263,6 +322,8 @@
     as invalid_visibility_annotation;
 import 'invocation_of_extension_without_call_test.dart'
     as invocation_of_extension_without_call;
+import 'invocation_of_non_function_expression_test.dart'
+    as invocation_of_non_function_expression;
 import 'is_double_test.dart' as is_double;
 import 'is_int_test.dart' as is_int;
 import 'is_not_double_test.dart' as is_not_double;
@@ -308,25 +369,45 @@
     as mixin_super_class_constraint_non_interface;
 import 'mixin_with_non_class_superclass_test.dart'
     as mixin_with_non_class_superclass;
+import 'mixins_super_class_test.dart' as mixins_super_class;
+import 'multiple_redirecting_constructor_invocations_test.dart'
+    as multiple_redirecting_constructor_invocations;
+import 'multiple_super_initializers_test.dart' as multiple_super_initializers;
 import 'must_be_a_native_function_type_test.dart'
     as must_be_a_native_function_type;
 import 'must_be_a_subtype_test.dart' as must_be_a_subtype;
 import 'must_be_immutable_test.dart' as must_be_immutable;
 import 'must_call_super_test.dart' as must_call_super;
+import 'native_clause_in_non_sdk_code_test.dart'
+    as native_clause_in_non_sdk_code;
+import 'native_function_body_in_non_sdk_code_test.dart'
+    as native_function_body_in_non_sdk_code;
 import 'new_with_non_type_test.dart' as new_with_non_type;
 import 'new_with_undefined_constructor_test.dart'
     as new_with_undefined_constructor;
+import 'no_annotation_constructor_arguments_test.dart'
+    as no_annotation_constructor_arguments;
 import 'no_combined_super_signature_test.dart' as no_combined_super_signature;
 import 'no_default_super_constructor_test.dart' as no_default_super_constructor;
+import 'no_generative_constructors_in_superclass_test.dart'
+    as no_generative_constructors_in_superclass;
 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_const_call_to_literal_constructor_test.dart'
+    as non_const_call_to_literal_constructor;
+import 'non_const_map_as_expression_statement_test.dart'
+    as non_const_map_as_expression_statement;
+import 'non_constant_annotation_constructor_test.dart'
+    as non_constant_annotation_constructor;
 import 'non_constant_case_expression_from_deferred_library_test.dart'
     as non_constant_case_expression_from_deferred_library;
 import 'non_constant_case_expression_test.dart' as non_constant_case_expression;
+import 'non_constant_default_value_from_deferred_library_test.dart'
+    as non_constant_default_value_from_deferred_library;
 import 'non_constant_default_value_test.dart' as non_constant_default_value;
 import 'non_constant_list_element_from_deferred_library_test.dart'
     as non_constant_list_element_from_deferred_library;
@@ -341,9 +422,12 @@
 import 'non_constant_set_element_test.dart' as non_constant_set_element;
 import 'non_constant_type_argument_test.dart' as non_constant_type_argument;
 import 'non_generative_constructor_test.dart' as non_generative_constructor;
+import 'non_generative_implicit_constructor_test.dart'
+    as non_generative_implicit_constructor;
 import 'non_native_function_type_argument_to_pointer_test.dart'
     as non_native_function_type_argument_to_pointer;
 import 'non_null_opt_out_test.dart' as non_null_opt_out;
+import 'non_type_as_type_argument_test.dart' as non_type_as_type_argument;
 import 'non_type_in_catch_clause_test.dart' as non_type_in_catch_clause;
 import 'non_void_return_for_operator_test.dart' as non_void_return_for_operator;
 import 'non_void_return_for_setter_test.dart' as non_void_return_for_setter;
@@ -356,6 +440,7 @@
     as not_initialized_non_nullable_instance_field;
 import 'not_initialized_non_nullable_variable_test.dart'
     as not_initialized_non_nullable_variable;
+import 'not_instantiated_bound_test.dart' as not_instantiated_bound;
 import 'not_iterable_spread_test.dart' as not_iterable_spread;
 import 'not_map_spread_test.dart' as not_map_spread;
 import 'not_null_aware_null_spread_test.dart' as not_null_aware_null_spread;
@@ -391,9 +476,12 @@
     as prefix_collides_with_top_level_member;
 import 'prefix_identifier_not_followed_by_dot_test.dart'
     as prefix_identifier_not_followed_by_dot;
+import 'prefix_shadowed_by_local_declaration_test.dart'
+    as prefix_shadowed_by_local_declaration;
 import 'private_collision_in_mixin_application_test.dart'
     as private_collision_in_mixin_application;
 import 'private_optional_parameter_test.dart' as private_optional_parameter;
+import 'private_setter_test.dart' as private_setter;
 import 'receiver_of_type_never_test.dart' as receiver_of_type_never;
 import 'recursive_compile_time_constant_test.dart'
     as recursive_compile_time_constant;
@@ -467,6 +555,7 @@
     as switch_expression_not_assignable;
 import 'throw_of_invalid_type_test.dart' as throw_of_invalid_type;
 import 'todo_test.dart' as todo_test;
+import 'top_level_cycle_test.dart' as top_level_cycle;
 import 'top_level_instance_getter_test.dart' as top_level_instance_getter;
 import 'top_level_instance_method_test.dart' as top_level_instance_method;
 import 'type_alias_cannot_reference_itself_test.dart'
@@ -479,6 +568,8 @@
 import 'type_check_is_null_test.dart' as type_check_is_null;
 import 'type_parameter_referenced_by_static_test.dart'
     as type_parameter_referenced_by_static;
+import 'type_parameter_supertype_of_its_bound_test.dart'
+    as type_parameter_supertype_of_its_bound;
 import 'type_test_with_non_type_test.dart' as type_test_with_non_type;
 import 'type_test_with_undefined_name_test.dart'
     as type_test_with_undefined_name;
@@ -510,6 +601,8 @@
     as unnecessary_non_null_assertion;
 import 'unnecessary_null_comparison_test.dart' as unnecessary_null_comparison;
 import 'unnecessary_type_check_test.dart' as unnecessary_type_check;
+import 'unqualified_reference_to_non_local_static_member_test.dart'
+    as unqualified_reference_to_non_local_static_member;
 import 'unqualified_reference_to_static_member_of_extended_type_test.dart'
     as unqualified_reference_to_static_member_of_extended_type;
 import 'unused_catch_clause_test.dart' as unused_catch_clause;
@@ -540,12 +633,17 @@
 
 main() {
   defineReflectiveSuite(() {
+    abstract_class_member.main();
+    abstract_field_constructor_initializer.main();
+    abstract_field_initializer.main();
     abstract_super_member_reference.main();
+    access_private_enum_field.main();
     ambiguous_export.main();
     ambiguous_extension_member_access.main();
     ambiguous_import.main();
     ambiguous_set_or_map_literal.main();
     annotation_on_pointer_field.main();
+    annotation_with_non_class.main();
     argument_type_not_assignable.main();
     assert_in_redirecting_constructor.main();
     assignment_to_const.main();
@@ -555,8 +653,10 @@
     assignment_to_function.main();
     assignment_to_method.main();
     assignment_to_type.main();
+    async_for_in_wrong_context.main();
     async_keyword_used_as_identifier.main();
     await_in_late_local_variable_initializer.main();
+    await_in_wrong_context.main();
     body_might_complete_normally.main();
     built_in_as_extension_name.main();
     built_in_as_prefix_name.main();
@@ -573,15 +673,35 @@
     conflicting_static_and_instance.main();
     conflicting_type_variable_and_container.main();
     conflicting_type_variable_and_member.main();
+    const_constructor_field_type_mismatch.main();
     const_constructor_param_type_mismatch.main();
     const_constructor_with_field_initialized_by_non_const.main();
     const_constructor_with_mixin_with_field.main();
+    const_constructor_with_non_const_super.main();
+    const_constructor_with_non_final_field.main();
+    const_deferred_class.main();
     const_eval_throws_exception.main();
+    const_eval_throws_idbze.main();
+    const_eval_type_bool_int.main();
+    const_eval_type_bool_num_string.main();
+    const_eval_type_bool.main();
+    const_eval_type_num.main();
+    const_field_initializer_not_assignable.main();
+    const_formal_parameter.main();
+    const_initialized_with_non_constant_value_from_deferred_library.main();
+    const_initialized_with_non_constant_value.main();
+    const_instance_field.main();
     const_map_key_expression_type_implements_equals.main();
     const_not_initialized.main();
     const_set_element_type_implements_equals.main();
     const_spread_expected_list_or_set.main();
     const_spread_expected_map.main();
+    const_with_non_const.main();
+    const_with_non_constant_argument.main();
+    const_with_non_type.main();
+    const_with_type_parameters.main();
+    const_with_undefined_constructor.main();
+    could_not_infer.main();
     dead_code.main();
     dead_null_aware_expression.main();
     default_list_constructor.main();
@@ -610,7 +730,6 @@
     expected_one_list_type_arguments.main();
     expected_one_set_type_arguments.main();
     expected_two_map_type_arguments.main();
-    export_duplicated_library_named.main();
     export_internal_library.main();
     export_legacy_symbol.main();
     export_of_non_library.main();
@@ -647,29 +766,42 @@
     for_in_of_invalid_element_type.main();
     for_in_of_invalid_type.main();
     for_in_with_const_variable.main();
+    generic_function_type_cannot_be_bound.main();
     generic_struct_subclass.main();
     getter_not_assignable_setter_types.main();
     getter_not_subtype_setter_types.main();
     if_element_condition_from_deferred_library.main();
+    illegal_async_generator_return_type.main();
     illegal_async_return_type.main();
+    illegal_sync_generator_return_type.main();
     implements_deferred_class.main();
     implements_disallowed_class.main();
     implements_non_class.main();
     implements_super_class.main();
     implicit_this_reference_in_initializer.main();
     import_deferred_library_with_load_function.main();
-    import_duplicated_library_named.main();
+    import_internal_library.main();
     import_of_non_library.main();
     inconsistent_case_expression_types.main();
     inconsistent_inheritance_getter_and_method.main();
     inconsistent_inheritance.main();
+    inconsistent_language_version_override.main();
     inference_failure_on_collection_literal.main();
     inference_failure_on_function_return_type.main();
+    inference_failure_on_instance_creation.main();
     inference_failure_on_uninitialized_variable.main();
     inference_failure_on_untyped_parameter.main();
+    initializer_for_non_existent_field.main();
+    initializer_for_static_field.main();
+    initializing_formal_for_non_existent_field.main();
+    initializing_formal_for_static_field.main();
     instance_access_to_static_member.main();
+    instance_member_access_from_factory.main();
     instance_member_access_from_static.main();
     instantiate_abstract_class.main();
+    instantiate_enum.main();
+    integer_literal_imprecise_as_double.main();
+    integer_literal_out_of_range.main();
     invalid_annotation.main();
     invalid_annotation_from_deferred_library.main();
     invalid_annotation_getter.main();
@@ -688,6 +820,7 @@
     invalid_language_override.main();
     invalid_literal_annotation.main();
     invalid_modifier_on_constructor.main();
+    invalid_modifier_on_setter.main();
     invalid_non_virtual_annotation.main();
     invalid_null_aware_operator.main();
     invalid_override_different_default_values_named.main();
@@ -699,6 +832,7 @@
     invalid_required_optional_positional_param.main();
     invalid_required_positional_param.main();
     invalid_sealed_annotation.main();
+    invalid_super_invocation.main();
     invalid_type_argument_in_const_list.main();
     invalid_type_argument_in_const_map.main();
     invalid_type_argument_in_const_set.main();
@@ -709,6 +843,7 @@
     invalid_use_of_visible_for_testing_member.main();
     invalid_visibility_annotation.main();
     invocation_of_extension_without_call.main();
+    invocation_of_non_function_expression.main();
     is_double.main();
     is_int.main();
     is_not_double.main();
@@ -741,22 +876,32 @@
     mixin_on_sealed_class.main();
     mixin_super_class_constraint_non_interface.main();
     mixin_with_non_class_superclass.main();
+    mixins_super_class.main();
+    multiple_redirecting_constructor_invocations.main();
+    multiple_super_initializers.main();
     must_be_a_native_function_type.main();
     must_be_a_subtype.main();
     must_be_immutable.main();
     must_call_super.main();
+    native_clause_in_non_sdk_code.main();
+    native_function_body_in_non_sdk_code.main();
     new_with_non_type.main();
     new_with_undefined_constructor.main();
+    no_annotation_constructor_arguments.main();
     no_combined_super_signature.main();
     no_default_super_constructor.main();
+    no_generative_constructors_in_superclass.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_annotation_constructor.main();
     non_constant_list_element.main();
     non_constant_case_expression_from_deferred_library.main();
     non_constant_case_expression.main();
+    non_constant_default_value_from_deferred_library.main();
+    non_constant_default_value.main();
     non_constant_list_element_from_deferred_library.main();
     non_constant_map_key.main();
     non_constant_map_key_from_deferred_library.main();
@@ -766,16 +911,21 @@
     non_constant_set_element.main();
     non_constant_type_argument.main();
     non_generative_constructor.main();
+    non_generative_implicit_constructor.main();
     non_native_function_type_argument_to_pointer.main();
     non_null_opt_out.main();
+    non_type_as_type_argument.main();
     non_type_in_catch_clause.main();
     non_void_return_for_operator.main();
     non_void_return_for_setter.main();
     not_a_type.main();
     not_assigned_potentially_non_nullable_local_variable.main();
+    non_const_call_to_literal_constructor.main();
+    non_const_map_as_expression_statement.main();
     not_enough_positional_arguments.main();
     not_initialized_non_nullable_instance_field.main();
     not_initialized_non_nullable_variable.main();
+    not_instantiated_bound.main();
     not_iterable_spread.main();
     not_map_spread.main();
     not_null_aware_null_spread.main();
@@ -798,8 +948,10 @@
     part_of_non_part.main();
     prefix_collides_with_top_level_member.main();
     prefix_identifier_not_followed_by_dot.main();
+    prefix_shadowed_by_local_declaration.main();
     private_collision_in_mixin_application.main();
     private_optional_parameter.main();
+    private_setter.main();
     receiver_of_type_never.main();
     recursive_compile_time_constant.main();
     recursive_constructor_redirect.main();
@@ -847,6 +999,7 @@
     switch_expression_not_assignable.main();
     throw_of_invalid_type.main();
     todo_test.main();
+    top_level_cycle.main();
     top_level_instance_getter.main();
     top_level_instance_method.main();
     type_alias_cannot_reference_itself.main();
@@ -855,6 +1008,7 @@
     type_check_is_not_null.main();
     type_check_is_null.main();
     type_parameter_referenced_by_static.main();
+    type_parameter_supertype_of_its_bound.main();
     type_test_with_non_type.main();
     type_test_with_undefined_name.main();
     undefined_annotation.main();
@@ -877,12 +1031,12 @@
     undefined_prefixed_name.main();
     undefined_setter.main();
     undefined_shown_name.main();
-    non_constant_default_value.main();
     unnecessary_cast.main();
     unnecessary_no_such_method.main();
     unnecessary_non_null_assertion.main();
     unnecessary_null_comparison.main();
     unnecessary_type_check.main();
+    unqualified_reference_to_non_local_static_member.main();
     unqualified_reference_to_static_member_of_extended_type.main();
     unused_catch_clause.main();
     unused_catch_stack.main();
diff --git a/pkg/analyzer/test/src/diagnostics/throw_of_invalid_type_test.dart b/pkg/analyzer/test/src/diagnostics/throw_of_invalid_type_test.dart
index 448719d..d1ec82c 100644
--- a/pkg/analyzer/test/src/diagnostics/throw_of_invalid_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/throw_of_invalid_type_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,13 +14,8 @@
 }
 
 @reflectiveTest
-class ThrowOfInvalidTypeTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class ThrowOfInvalidTypeTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_dynamic() async {
     await assertNoErrorsInCode('''
 f(dynamic a) {
@@ -33,7 +25,7 @@
   }
 
   test_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 int a = 0;
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/todo_test.dart b/pkg/analyzer/test/src/diagnostics/todo_test.dart
index 03ed766..1a540df 100644
--- a/pkg/analyzer/test/src/diagnostics/todo_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/todo_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class TodoTest extends DriverResolutionTest {
+class TodoTest extends PubPackageResolutionTest {
   test_todo_multiLineComment() async {
     await assertErrorsInCode(r'''
 main() {
diff --git a/pkg/analyzer/test/src/diagnostics/top_level_cycle_test.dart b/pkg/analyzer/test/src/diagnostics/top_level_cycle_test.dart
new file mode 100644
index 0000000..0f72b33
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/top_level_cycle_test.dart
@@ -0,0 +1,47 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(TopLevelCycleTest);
+  });
+}
+
+@reflectiveTest
+class TopLevelCycleTest extends PubPackageResolutionTest {
+  test_cycle() async {
+    await assertErrorsInCode(r'''
+var x = y + 1;
+var y = x + 1;
+''', [
+      error(CompileTimeErrorCode.TOP_LEVEL_CYCLE, 8, 1),
+      error(CompileTimeErrorCode.TOP_LEVEL_CYCLE, 23, 1),
+    ]);
+  }
+
+  test_singleVariable() async {
+    await assertErrorsInCode(r'''
+var x = x;
+''', [
+      error(CompileTimeErrorCode.TOP_LEVEL_CYCLE, 8, 1),
+    ]);
+  }
+
+  test_singleVariable_fromList() async {
+    await assertErrorsInCode(r'''
+var elems = [
+  [
+    1, elems, 3,
+  ],
+];
+''', [
+      error(CompileTimeErrorCode.TOP_LEVEL_CYCLE, 25, 5),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart b/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart
index 6eae0be..185c80f 100644
--- a/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class TopLevelInstanceGetterTest extends DriverResolutionTest {
+class TopLevelInstanceGetterTest extends PubPackageResolutionTest {
   test_call() async {
     await assertNoErrorsInCode('''
 class A {
@@ -48,7 +48,7 @@
   }
 
   test_field_imported() async {
-    newFile('/test/lib/a.dart', content: '''
+    newFile('$testPackageLibPath/a.dart', content: '''
 class A {
   int f;
 }
@@ -322,7 +322,7 @@
   test_implicitlyTyped_new_explicit_type_params_prefixed() async {
     // The reference to a.x does not trigger TOP_LEVEL_INSTANCE_GETTER because
     // it can't possibly affect the type of b.
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 class B<T> {
   B(x);
 }
@@ -385,7 +385,7 @@
   }
 
   test_implicitlyTyped_new_not_generic_prefixed() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 class B {
   B(x);
 }
@@ -403,7 +403,7 @@
   }
 
   test_implicitlyTyped_new_prefixed() async {
-    newFile('/test/lib/lib1.dart', content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 class B<T> {
   B(x);
 }
diff --git a/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart b/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart
index 00a78e1..b71dd5b 100644
--- a/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class TopLevelInstanceMethodTest extends DriverResolutionTest {
+class TopLevelInstanceMethodTest extends PubPackageResolutionTest {
   test_noParameter() async {
     await assertErrorsInCode('''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/type_alias_cannot_reference_itself_test.dart b/pkg/analyzer/test/src/diagnostics/type_alias_cannot_reference_itself_test.dart
index 176e1fc..c8b634c 100644
--- a/pkg/analyzer/test/src/diagnostics/type_alias_cannot_reference_itself_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_alias_cannot_reference_itself_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class TypeAliasCannotReferenceItselfTest extends DriverResolutionTest {
+class TypeAliasCannotReferenceItselfTest extends PubPackageResolutionTest {
   test_functionTypedParameter_returnType() async {
     await assertErrorsInCode('''
 typedef A(A b());
@@ -33,16 +33,15 @@
 }
 ''', [
       error(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, 0, 37),
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 101, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 101, 1),
     ]);
   }
 
   test_infiniteParameterBoundCycle() async {
     await assertErrorsInCode(r'''
-typedef F<X extends F> = F Function();
+typedef F<X extends F<X>> = F Function();
 ''', [
-      error(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, 0, 38),
-      error(StrongModeCode.NOT_INSTANTIATED_BOUND, 20, 1),
+      error(CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, 0, 41),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/type_annotation_deferred_class_test.dart b/pkg/analyzer/test/src/diagnostics/type_annotation_deferred_class_test.dart
index 516f8c5..3f2504ee 100644
--- a/pkg/analyzer/test/src/diagnostics/type_annotation_deferred_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_annotation_deferred_class_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class TypeAnnotationDeferredClassTest extends DriverResolutionTest {
+class TypeAnnotationDeferredClassTest extends PubPackageResolutionTest {
   test_asExpression() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
@@ -25,12 +25,12 @@
 f(var v) {
   v as a.A;
 }''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 66, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 66, 3),
     ]);
   }
 
   test_catchClause() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
@@ -41,12 +41,12 @@
   } on a.A {
   }
 }''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 74, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 74, 3),
     ]);
   }
 
   test_fieldFormalParameter() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
@@ -56,36 +56,36 @@
   var v;
   C(a.A this.v);
 }''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 71, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 71, 3),
     ]);
   }
 
   test_functionDeclaration_returnType() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
 library root;
 import 'lib1.dart' deferred as a;
 a.A f() { return null; }''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 48, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 48, 3),
     ]);
   }
 
   test_functionTypedFormalParameter_returnType() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
 library root;
 import 'lib1.dart' deferred as a;
 f(a.A g()) {}''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 50, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 50, 3),
     ]);
   }
 
   test_isExpression() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
@@ -95,12 +95,12 @@
   bool b = v is a.A;
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 66, 1),
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 75, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 75, 3),
     ]);
   }
 
   test_methodDeclaration_returnType() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
@@ -109,24 +109,24 @@
 class C {
   a.A m() { return null; }
 }''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 60, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 60, 3),
     ]);
   }
 
   test_simpleFormalParameter() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
 library root;
 import 'lib1.dart' deferred as a;
 f(a.A v) {}''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 50, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 50, 3),
     ]);
   }
 
   test_typeArgumentList() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
@@ -134,12 +134,12 @@
 import 'lib1.dart' deferred as a;
 class C<E> {}
 C<a.A> c;''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 64, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 64, 3),
     ]);
   }
 
   test_typeArgumentList2() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
@@ -147,32 +147,32 @@
 import 'lib1.dart' deferred as a;
 class C<E, F> {}
 C<a.A, a.A> c;''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 67, 3),
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 72, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 67, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 72, 3),
     ]);
   }
 
   test_typeParameter_bound() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
 library root;
 import 'lib1.dart' deferred as a;
 class C<E extends a.A> {}''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 66, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 66, 3),
     ]);
   }
 
   test_variableDeclarationList() async {
-    newFile("/test/lib/lib1.dart", content: '''
+    newFile('$testPackageLibPath/lib1.dart', content: '''
 library lib1;
 class A {}''');
     await assertErrorsInCode('''
 library root;
 import 'lib1.dart' deferred as a;
 a.A v;''', [
-      error(StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, 48, 3),
+      error(CompileTimeErrorCode.TYPE_ANNOTATION_DEFERRED_CLASS, 48, 3),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/type_argument_not_matching_bounds_test.dart b/pkg/analyzer/test/src/diagnostics/type_argument_not_matching_bounds_test.dart
index 212c026..da813a8 100644
--- a/pkg/analyzer/test/src/diagnostics/type_argument_not_matching_bounds_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_argument_not_matching_bounds_test.dart
@@ -2,24 +2,22 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(TypeArgumentNotMatchingBoundsTest);
     defineReflectiveTests(
-      TypeArgumentNotMatchingBoundsWithNnbdTest,
+      TypeArgumentNotMatchingBoundsWithNullSafetyTest,
     );
   });
 }
 
 @reflectiveTest
-class TypeArgumentNotMatchingBoundsTest extends DriverResolutionTest {
+class TypeArgumentNotMatchingBoundsTest extends PubPackageResolutionTest {
   test_classTypeAlias() async {
     await assertErrorsInCode(r'''
 class A {}
@@ -349,11 +347,24 @@
   factory X.name(int x, int y) = X<B>;
 }
 ''', [
-      error(StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE, 99, 4),
+      error(CompileTimeErrorCode.REDIRECT_TO_INVALID_RETURN_TYPE, 99, 4),
       error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 101, 1),
     ]);
   }
 
+  test_regression_42196_Null() async {
+    await assertNoErrorsInCode(r'''
+typedef G<X> = Function(X);
+class A<X extends G<A<X,Y>>, Y extends X> {}
+
+test<X>() { print("OK"); }
+
+main() {
+  test<A<G<A<Null, Null>>, dynamic>>();
+}
+''');
+  }
+
   test_typeArgumentList() async {
     await assertErrorsInCode(r'''
 class A {}
@@ -402,15 +413,10 @@
 }
 
 @reflectiveTest
-class TypeArgumentNotMatchingBoundsWithNnbdTest
-    extends TypeArgumentNotMatchingBoundsTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
+class TypeArgumentNotMatchingBoundsWithNullSafetyTest
+    extends TypeArgumentNotMatchingBoundsTest with WithNullSafetyMixin {
   test_extends_optIn_fromOptOut_Null() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 class A<X extends int> {}
 ''');
 
@@ -423,7 +429,7 @@
   }
 
   test_extends_optIn_fromOptOut_otherTypeParameter() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 void foo<T extends U, U>() {
 }
 ''');
@@ -441,6 +447,62 @@
 ''');
   }
 
+  test_regression_42196() async {
+    await assertNoErrorsInCode(r'''
+typedef G<X> = Function(X);
+class A<X extends G<A<X,Y>>, Y extends X> {}
+
+test<X>() { print("OK"); }
+
+main() {
+  test<A<G<A<Never, Never>>, dynamic>>();
+}
+''');
+  }
+
+  @override
+  test_regression_42196_Null() async {
+    await assertErrorsInCode(r'''
+typedef G<X> = Function(X);
+class A<X extends G<A<X,Y>>, Y extends X> {}
+
+test<X>() { print("OK"); }
+
+main() {
+  test<A<G<A<Null, Null>>, dynamic>>();
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 120, 16),
+      error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 124, 4),
+    ]);
+  }
+
+  test_regression_42196_object() async {
+    await assertNoErrorsInCode(r'''
+typedef G<X> = Function(X);
+class A<X extends G<A<X, Y>>, Y extends Never> {}
+
+test<X>() { print("OK"); }
+
+main() {
+  test<A<G<A<Never, Never>>, Object?>>();
+}
+''');
+  }
+
+  test_regression_42196_void() async {
+    await assertNoErrorsInCode(r'''
+typedef G<X> = Function(X);
+class A<X extends G<A<X, Y>>, Y extends Never> {}
+
+test<X>() { print("OK"); }
+
+main() {
+  test<A<G<A<Never, Never>>, void>>();
+}
+''');
+  }
+
   test_superBounded() async {
     await assertNoErrorsInCode(r'''
 class A<X extends A<X>> {}
diff --git a/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart b/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart
index e5e14a3..9834ad5 100644
--- a/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class TypeCheckIsNotNullTest extends DriverResolutionTest {
+class TypeCheckIsNotNullTest extends PubPackageResolutionTest {
   test_not_Null() async {
     await assertErrorsInCode(r'''
 bool m(i) {
diff --git a/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart b/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart
index 19d804b..4df1afb 100644
--- a/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class TypeCheckIsNullTest extends DriverResolutionTest {
+class TypeCheckIsNullTest extends PubPackageResolutionTest {
   test_is_Null() async {
     await assertErrorsInCode(r'''
 bool m(i) {
diff --git a/pkg/analyzer/test/src/diagnostics/type_parameter_referenced_by_static_test.dart b/pkg/analyzer/test/src/diagnostics/type_parameter_referenced_by_static_test.dart
index 2b54d51..96fb733 100644
--- a/pkg/analyzer/test/src/diagnostics/type_parameter_referenced_by_static_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_parameter_referenced_by_static_test.dart
@@ -2,11 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,65 +14,8 @@
 }
 
 @reflectiveTest
-class TypeParameterReferencedByStaticTest extends DriverResolutionTest {
-  test_field() async {
-    await assertErrorsInCode('''
-class A<K> {
-  static K k;
-}''', [
-      error(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 22, 1),
-    ]);
-  }
-
-  test_getter() async {
-    await assertErrorsInCode('''
-class A<K> {
-  static K get k => null;
-}''', [
-      error(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 22, 1),
-    ]);
-  }
-
-  test_methodBodyReference() async {
-    await assertErrorsInCode('''
-class A<K> {
-  static m() {
-    K k;
-  }
-}''', [
-      error(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 32, 1),
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 34, 1),
-    ]);
-  }
-
-  test_methodParameter() async {
-    await assertErrorsInCode('''
-class A<K> {
-  static m(K k) {}
-}''', [
-      error(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 24, 1),
-    ]);
-  }
-
-  test_methodReturn() async {
-    await assertErrorsInCode('''
-class A<K> {
-  static K m() { return null; }
-}''', [
-      error(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 22, 1),
-    ]);
-  }
-
-  test_setter() async {
-    await assertErrorsInCode('''
-class A<K> {
-  static set s(K k) {}
-}''', [
-      error(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 28, 1),
-    ]);
-  }
-
-  test_simpleIdentifier() async {
+class TypeParameterReferencedByStaticTest extends PubPackageResolutionTest {
+  test_expression_method() async {
     await assertErrorsInCode('''
 class A<T> {
   static foo() {
@@ -81,7 +23,84 @@
   }
 }
 ''', [
-      error(StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 34, 1),
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 34, 1),
+    ]);
+  }
+
+  test_type_field() async {
+    await assertErrorsInCode('''
+class A<T> {
+  static T foo;
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 22, 1),
+    ]);
+  }
+
+  test_type_getter() async {
+    await assertErrorsInCode('''
+class A<T> {
+  static T get foo => null;
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 22, 1),
+    ]);
+  }
+
+  test_type_method_bodyReference() async {
+    await assertErrorsInCode('''
+class A<T> {
+  static foo() {
+    // ignore:unused_local_variable
+    T v;
+  }
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 70, 1),
+    ]);
+  }
+
+  test_type_method_closure() async {
+    await assertErrorsInCode('''
+class A<T> {
+  static Object foo() {
+    return (T a) {};
+  }
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 49, 1),
+    ]);
+  }
+
+  test_type_method_parameter() async {
+    await assertErrorsInCode('''
+class A<T> {
+  static foo(T a) {}
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 26, 1),
+    ]);
+  }
+
+  test_type_method_return() async {
+    await assertErrorsInCode('''
+class A<T> {
+  static T foo() {
+    throw 0;
+  }
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 22, 1),
+    ]);
+  }
+
+  test_type_setter() async {
+    await assertErrorsInCode('''
+class A<T> {
+  static set foo(T _) {}
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, 30, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/type_parameter_supertype_of_its_bound_test.dart b/pkg/analyzer/test/src/diagnostics/type_parameter_supertype_of_its_bound_test.dart
new file mode 100644
index 0000000..54192759
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/type_parameter_supertype_of_its_bound_test.dart
@@ -0,0 +1,53 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(TypeParameterSupertypeOfItsBoundTest);
+    defineReflectiveTests(TypeParameterSupertypeOfItsBoundWithNullSafetyTest);
+  });
+}
+
+@reflectiveTest
+class TypeParameterSupertypeOfItsBoundTest extends PubPackageResolutionTest {
+  test_1of1() async {
+    await assertErrorsInCode(r'''
+class A<T extends T> {
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 11),
+    ]);
+  }
+
+  test_1of1_used() async {
+    await assertErrorsInCode('''
+class A<T extends T> {
+  void foo(x) {
+    x is T;
+  }
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 11),
+    ]);
+  }
+
+  test_2of3() async {
+    await assertErrorsInCode(r'''
+class A<T1 extends T3, T2, T3 extends T1> {
+}
+''', [
+      error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 8, 13),
+      error(CompileTimeErrorCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, 27, 13),
+    ]);
+  }
+}
+
+@reflectiveTest
+class TypeParameterSupertypeOfItsBoundWithNullSafetyTest
+    extends TypeParameterSupertypeOfItsBoundTest with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/diagnostics/type_test_with_non_type_test.dart b/pkg/analyzer/test/src/diagnostics/type_test_with_non_type_test.dart
index 39f086c9..dc65285 100644
--- a/pkg/analyzer/test/src/diagnostics/type_test_with_non_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_test_with_non_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class TypeTestWithNonTypeTest extends DriverResolutionTest {
+class TypeTestWithNonTypeTest extends PubPackageResolutionTest {
   test_parameter() async {
     await assertErrorsInCode('''
 var A = 0;
@@ -22,7 +22,7 @@
   if (p is A) {
   }
 }''', [
-      error(StaticWarningCode.TYPE_TEST_WITH_NON_TYPE, 33, 1),
+      error(CompileTimeErrorCode.TYPE_TEST_WITH_NON_TYPE, 33, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/type_test_with_undefined_name_test.dart b/pkg/analyzer/test/src/diagnostics/type_test_with_undefined_name_test.dart
index b530cf4..ba1fb17 100644
--- a/pkg/analyzer/test/src/diagnostics/type_test_with_undefined_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_test_with_undefined_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,14 +14,14 @@
 }
 
 @reflectiveTest
-class TypeTestWithUndefinedNameTest extends DriverResolutionTest {
+class TypeTestWithUndefinedNameTest extends PubPackageResolutionTest {
   test_undefined() async {
     await assertErrorsInCode('''
 f(var p) {
   if (p is A) {
   }
 }''', [
-      error(StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME, 22, 1),
+      error(CompileTimeErrorCode.TYPE_TEST_WITH_UNDEFINED_NAME, 22, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_annotation_test.dart
index 8d862d4..779d2d2 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_annotation_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedAnnotationTest extends DriverResolutionTest {
+class UndefinedAnnotationTest extends PubPackageResolutionTest {
   test_unresolved_identifier() async {
     await assertErrorsInCode(r'''
 @unresolved
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_class_boolean_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_class_boolean_test.dart
index 8ee9e4b..58f17ba 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_class_boolean_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_class_boolean_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,12 +15,12 @@
 }
 
 @reflectiveTest
-class UndefinedClassBooleanTest extends DriverResolutionTest {
+class UndefinedClassBooleanTest extends PubPackageResolutionTest {
   test_variableDeclaration() async {
     await assertErrorsInCode('''
 f() { boolean v; }
 ''', [
-      error(StaticWarningCode.UNDEFINED_CLASS_BOOLEAN, 6, 7),
+      error(CompileTimeErrorCode.UNDEFINED_CLASS_BOOLEAN, 6, 7),
       error(HintCode.UNUSED_LOCAL_VARIABLE, 14, 1),
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_class_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_class_test.dart
index 2842fc2..518e957 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_class_test.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 }
 
 @reflectiveTest
-class UndefinedClassTest extends DriverResolutionTest {
+class UndefinedClassTest extends PubPackageResolutionTest {
   test_const() async {
     await assertErrorsInCode(r'''
 f() {
@@ -40,7 +40,7 @@
     await assertErrorsInCode('''
 f() { new C(); }
 ''', [
-      error(StaticWarningCode.NEW_WITH_NON_TYPE, 10, 1),
+      error(CompileTimeErrorCode.NEW_WITH_NON_TYPE, 10, 1),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_constructor_in_initializer_default_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_constructor_in_initializer_default_test.dart
index d54d2cf..206da60 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_constructor_in_initializer_default_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_constructor_in_initializer_default_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class UndefinedConstructorInInitializerDefaultTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_hasOptionalParameters_defined() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_constructor_in_initializer_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_constructor_in_initializer_test.dart
index 0a21c5f..b951089 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_constructor_in_initializer_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_constructor_in_initializer_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedConstructorInInitializerTest extends DriverResolutionTest {
+class UndefinedConstructorInInitializerTest extends PubPackageResolutionTest {
   test_explicit_named() async {
     await assertErrorsInCode(r'''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_enum_constant_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_enum_constant_test.dart
index 1d6ca2b..c3e537b 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_enum_constant_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_enum_constant_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedEnumConstantTest extends DriverResolutionTest {
+class UndefinedEnumConstantTest extends PubPackageResolutionTest {
   test_defined() async {
     await assertNoErrorsInCode(r'''
 enum E { ONE }
@@ -31,7 +31,7 @@
   return E.TWO;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT, 34, 3),
+      error(CompileTimeErrorCode.UNDEFINED_ENUM_CONSTANT, 34, 3),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_extension_getter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_extension_getter_test.dart
index b6a5b55..7e44f91 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_extension_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_extension_getter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedExtensionGetterTest extends DriverResolutionTest {
+class UndefinedExtensionGetterTest extends PubPackageResolutionTest {
   test_override_defined() async {
     await assertNoErrorsInCode('''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_extension_method_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_extension_method_test.dart
index 24a6445..07b1785 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_extension_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_extension_method_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedExtensionMethodTest extends DriverResolutionTest {
+class UndefinedExtensionMethodTest extends PubPackageResolutionTest {
   test_method_defined() async {
     await assertNoErrorsInCode('''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_extension_operator_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_extension_operator_test.dart
index b03a1f1..4859442 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_extension_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_extension_operator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedExtensionOperatorTest extends DriverResolutionTest {
+class UndefinedExtensionOperatorTest extends PubPackageResolutionTest {
   test_binary_defined() async {
     await assertNoErrorsInCode('''
 extension E on String {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_extension_setter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_extension_setter_test.dart
index 7b798b7c..551e4cb 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_extension_setter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_extension_setter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedExtensionSetterTest extends DriverResolutionTest {
+class UndefinedExtensionSetterTest extends PubPackageResolutionTest {
   test_override_defined() async {
     await assertNoErrorsInCode('''
 extension E on int {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
index 61d9896..65b9468 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
@@ -5,16 +5,20 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(UndefinedGetterTest);
+    defineReflectiveTests(UndefinedGetterWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class UndefinedGetterTest extends DriverResolutionTest {
+class UndefinedGetterTest extends PubPackageResolutionTest
+    with UndefinedGetterTestCases {}
+
+mixin UndefinedGetterTestCases on PubPackageResolutionTest {
   test_compoundAssignment_hasSetter_instance() async {
     await assertErrorsInCode('''
 class C {
@@ -25,7 +29,7 @@
   c.foo += 1;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 46, 3),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 46, 3),
     ]);
   }
 
@@ -39,7 +43,7 @@
   C.foo += 1;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 50, 3),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 50, 3),
     ]);
   }
 
@@ -57,7 +61,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 95, 3),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 95, 3),
     ]);
   }
 
@@ -70,7 +74,7 @@
   0.foo;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 58, 3),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 58, 3),
     ]);
   }
 
@@ -79,7 +83,7 @@
 extension E on int {}
 var a = 3.v;
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 32, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 32, 1),
     ]);
   }
 
@@ -93,7 +97,7 @@
   c.a;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 46, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 46, 1),
     ]);
   }
 
@@ -111,7 +115,7 @@
   c.foo;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 93, 3),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 93, 3),
     ]);
   }
 
@@ -132,7 +136,7 @@
   return [if (x is String) x.length];
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 40, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 40, 6),
     ]);
   }
 
@@ -150,7 +154,7 @@
   return {if (x is String) x : x.length};
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 44, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 44, 6),
     ]);
   }
 
@@ -168,7 +172,7 @@
   return {if (x is String) x.length};
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 40, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 40, 6),
     ]);
   }
 
@@ -188,7 +192,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 38, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 38, 6),
     ]);
   }
 
@@ -207,7 +211,7 @@
 class T {}
 f(T e) { return e.m; }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 29, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 29, 1),
     ]);
   }
 
@@ -217,19 +221,24 @@
   f() { return this.m; }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 30, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 30, 1),
     ]);
   }
 
   test_nullMember_undefined() async {
-    await assertErrorsInCode(r'''
+    await assertErrorsInCode(
+        r'''
 m() {
   Null _null;
   _null.foo;
 }
-''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 28, 3),
-    ]);
+''',
+        expectedErrorsByNullability(nullable: [
+          error(CompileTimeErrorCode.INVALID_USE_OF_NULL_VALUE, 22, 5),
+          error(CompileTimeErrorCode.UNDEFINED_GETTER, 28, 3),
+        ], legacy: [
+          error(CompileTimeErrorCode.UNDEFINED_GETTER, 28, 3),
+        ]));
   }
 
   test_object_call() async {
@@ -238,7 +247,7 @@
   return o.call;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 25, 4),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 25, 4),
     ]);
   }
 
@@ -250,7 +259,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 66, 6),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 66, 6),
     ]);
   }
 
@@ -266,7 +275,7 @@
   new PrefixProxy().foo;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 127, 3),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 127, 3),
     ]);
   }
 
@@ -290,7 +299,7 @@
 f(var p) {
   f(C.g);
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 75, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 75, 1),
     ]);
   }
 
@@ -300,7 +309,7 @@
 f(var p) {
   f(C.m);
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 28, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 28, 1),
     ]);
   }
 
@@ -313,7 +322,7 @@
   T..foo;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 54, 3),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 54, 3),
     ]);
   }
 
@@ -324,7 +333,7 @@
 class A {}
 f() => A?.hashCode;
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 21, 8),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 21, 8),
     ]);
   }
 
@@ -332,8 +341,10 @@
     await assertNoErrorsInCode(r'''
 class A<E> {
   E element;
+  A(this.element);
 }
 class B extends A<List> {
+  B(List element) : super(element);
   m() {
     element.last;
   }
@@ -341,3 +352,31 @@
 ''');
   }
 }
+
+@reflectiveTest
+class UndefinedGetterWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin, UndefinedGetterTestCases {
+  test_get_from_abstract_field_final_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract final int x;
+}
+int f(A a) => a.x;
+''');
+  }
+
+  test_get_from_abstract_field_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+int f(A a) => a.x;
+''');
+  }
+
+  @override
+  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/42957')
+  test_typeLiteral_conditionalAccess() {
+    return super.test_typeLiteral_conditionalAccess();
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart
index 014866b..57fbdfc 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart
@@ -5,8 +5,7 @@
 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';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,9 +15,9 @@
 }
 
 @reflectiveTest
-class UndefinedHiddenNameTest extends DriverResolutionTest {
+class UndefinedHiddenNameTest extends PubPackageResolutionTest {
   test_export() async {
-    newFile('/test/lib/lib1.dart');
+    newFile('$testPackageLibPath/lib1.dart');
     await assertErrorsInCode(r'''
 export 'lib1.dart' hide a;
 ''', [
@@ -27,7 +26,7 @@
   }
 
   test_import() async {
-    newFile('/test/lib/lib1.dart');
+    newFile('$testPackageLibPath/lib1.dart');
     await assertErrorsInCode(r'''
 import 'lib1.dart' hide a;
 ''', [
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_identifier_await_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_identifier_await_test.dart
index 89019f9..2610fc5 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_identifier_await_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_identifier_await_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,12 @@
 }
 
 @reflectiveTest
-class UndefinedIdentifierAwaitTest extends DriverResolutionTest {
+class UndefinedIdentifierAwaitTest extends PubPackageResolutionTest {
   test_function() async {
     await assertErrorsInCode('''
 void a() { await; }
 ''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT, 11, 5),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT, 11, 5),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
index 20a5cd5..06400e6 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
@@ -2,31 +2,29 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(UndefinedIdentifierTest);
-    defineReflectiveTests(UndefinedIdentifierWithNnbdTest);
+    defineReflectiveTests(UndefinedIdentifierWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class UndefinedIdentifierTest extends DriverResolutionTest {
+class UndefinedIdentifierTest extends PubPackageResolutionTest {
   @failingTest
   test_commentReference() async {
     await assertErrorsInCode('''
 /** [m] xxx [new B.c] */
 class A {
 }''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 5, 1),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 17, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 5, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 17, 1),
     ]);
   }
 
@@ -36,7 +34,7 @@
   for (e in l) {
   }
 }''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 18, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 18, 1),
     ]);
   }
 
@@ -55,7 +53,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 25, 1),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 40, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 40, 1),
     ]);
   }
 
@@ -77,7 +75,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 17, 1),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 31, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 31, 1),
     ]);
   }
 
@@ -85,7 +83,7 @@
     await assertErrorsInCode('''
 int a() => b;
 ''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 11, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 11, 1),
     ]);
   }
 
@@ -96,7 +94,7 @@
   List;
   String;
 }''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 49, 6),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 49, 6),
     ]);
   }
 
@@ -104,7 +102,7 @@
     await assertErrorsInCode('''
 var a = b;
 ''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 8, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 8, 1),
     ]);
   }
 
@@ -112,12 +110,12 @@
     await assertErrorsInCode('''
 f() { C.m(); }
 ''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 6, 1),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 6, 1),
     ]);
   }
 
   test_private_getter() async {
-    newFile("/test/lib/lib.dart", content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 class A {
   var _foo;
@@ -130,12 +128,12 @@
   }
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 58, 1),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 62, 4),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 62, 4),
     ]);
   }
 
   test_private_setter() async {
-    newFile("/test/lib/lib.dart", content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 library lib;
 class A {
   var _foo;
@@ -147,7 +145,7 @@
     _foo = 42;
   }
 }''', [
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 54, 4),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 54, 4),
     ]);
   }
 
@@ -170,16 +168,12 @@
 }
 ''', [
       error(ParserErrorCode.MISSING_IDENTIFIER, 30, 1),
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 30, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 30, 1),
       error(ParserErrorCode.MISSING_IDENTIFIER, 31, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class UndefinedIdentifierWithNnbdTest extends UndefinedIdentifierTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.6.0', additionalFeatures: [Feature.non_nullable]);
-}
+class UndefinedIdentifierWithNullSafetyTest extends UndefinedIdentifierTest
+    with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_method_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_method_test.dart
index 20615c6..8767c86 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_method_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedMethodTest extends DriverResolutionTest {
+class UndefinedMethodTest extends PubPackageResolutionTest {
   test_constructor_defined() async {
     await assertNoErrorsInCode(r'''
 class C {
@@ -25,7 +25,7 @@
   }
 
   test_definedInPrivateExtension() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class B {}
 
 extension _ on B {
@@ -39,12 +39,12 @@
   b.a();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 33, 1),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 33, 1),
     ]);
   }
 
   test_definedInUnnamedExtension() async {
-    newFile('/test/lib/lib.dart', content: '''
+    newFile('$testPackageLibPath/lib.dart', content: '''
 class C {}
 
 extension on C {
@@ -58,7 +58,7 @@
   c.a();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 33, 1),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 33, 1),
     ]);
   }
 
@@ -91,7 +91,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 85, 1),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 85, 1),
     ]);
   }
 
@@ -99,7 +99,7 @@
     await assertErrorsInCode('''
 f(bool b, int i) => (b ? null : i).foo();
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 35, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 35, 3),
     ]);
   }
 
@@ -111,7 +111,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 22, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 22, 3),
     ]);
   }
 
@@ -122,7 +122,7 @@
   c..abs();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 25, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 25, 3),
     ]);
   }
 
@@ -131,7 +131,7 @@
 enum E { A }
 f() => E.abs();
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 22, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 22, 3),
     ]);
   }
 
@@ -142,7 +142,7 @@
   m.abs();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 24, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 24, 3),
     ]);
   }
 
@@ -153,7 +153,7 @@
   m..abs();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 25, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 25, 3),
     ]);
   }
 
@@ -164,7 +164,7 @@
   f(42).abs();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 40, 3),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 40, 3),
     ]);
   }
 
@@ -194,7 +194,7 @@
   B.named();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 96, 5),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 96, 5),
     ]);
   }
 
@@ -210,7 +210,7 @@
   c.c();
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 61, 1),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 61, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_named_parameter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_named_parameter_test.dart
index a03bbb2..96bbf01 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_named_parameter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_named_parameter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedNamedParameterTest extends DriverResolutionTest {
+class UndefinedNamedParameterTest extends PubPackageResolutionTest {
   test_constConstructor() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart
index 8f1ee9f..45bc660 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UndefinedOperatorTest extends DriverResolutionTest {
+class UndefinedOperatorTest extends PubPackageResolutionTest {
   test_assignmentExpression_undefined() async {
     await assertErrorsInCode(r'''
 class A {}
@@ -25,7 +25,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 58, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 58, 2),
     ]);
   }
 
@@ -38,7 +38,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 44, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 44, 1),
     ]);
   }
 
@@ -47,7 +47,7 @@
 enum E { A }
 f(E e) => e + 1;
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 25, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 25, 1),
     ]);
   }
 
@@ -63,7 +63,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 87, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 87, 1),
     ]);
   }
 
@@ -72,7 +72,7 @@
 mixin M {}
 f(M m) => m + 1;
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 23, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 23, 1),
     ]);
   }
 
@@ -84,8 +84,8 @@
   a[0]++;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 24, 3),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 24, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 24, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 24, 3),
     ]);
   }
 
@@ -109,7 +109,7 @@
   e[0];
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 25, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 25, 3),
     ]);
   }
 
@@ -141,7 +141,7 @@
   a[0];
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 125, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 125, 3),
     ]);
   }
 
@@ -153,7 +153,7 @@
   a[0];
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 24, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 24, 3),
     ]);
   }
 
@@ -164,7 +164,7 @@
   m[0];
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 23, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 23, 3),
     ]);
   }
 
@@ -174,7 +174,7 @@
   x[0];
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 15, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 15, 3),
     ]);
   }
 
@@ -192,7 +192,7 @@
   a[0] = 1;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 125, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 125, 3),
     ]);
   }
 
@@ -218,7 +218,7 @@
   a[0] = 1;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 24, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 24, 3),
     ]);
   }
 
@@ -229,8 +229,8 @@
   a[0]++;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 23, 3),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 23, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 23, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 23, 3),
     ]);
   }
 
@@ -241,7 +241,7 @@
   a[0];
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 23, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 23, 3),
     ]);
   }
 
@@ -252,7 +252,7 @@
   a[0] = 1;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 23, 3),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 23, 3),
     ]);
   }
 
@@ -263,7 +263,7 @@
   x - 3;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 20, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 20, 1),
     ]);
   }
 
@@ -275,7 +275,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 20, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 20, 2),
     ]);
   }
 
@@ -286,7 +286,7 @@
   x + 3;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 20, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 20, 1),
     ]);
   }
 
@@ -297,7 +297,7 @@
   a + 1;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 24, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 24, 1),
     ]);
   }
 
@@ -309,7 +309,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 20, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 20, 2),
     ]);
   }
 
@@ -321,7 +321,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 19, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 19, 2),
     ]);
   }
 
@@ -357,7 +357,7 @@
   m++;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 23, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 23, 2),
     ]);
   }
 
@@ -368,7 +368,7 @@
   a++;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 23, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 23, 2),
     ]);
   }
 
@@ -380,7 +380,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 19, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 19, 2),
     ]);
   }
 
@@ -392,7 +392,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 18, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 18, 2),
     ]);
   }
 
@@ -428,7 +428,7 @@
   -m;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 22, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 22, 1),
     ]);
   }
 
@@ -439,7 +439,7 @@
   ++a;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 22, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 22, 2),
     ]);
   }
 
@@ -451,7 +451,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 18, 2),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 18, 2),
     ]);
   }
 
@@ -470,7 +470,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 18, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 18, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart
index 3485b60..87cafbf 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,26 +14,26 @@
 }
 
 @reflectiveTest
-class UndefinedPrefixedNameTest extends DriverResolutionTest {
+class UndefinedPrefixedNameTest extends PubPackageResolutionTest {
   test_getterContext() async {
-    newFile('/test/lib/lib.dart');
+    newFile('$testPackageLibPath/lib.dart');
     await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() => p.c;
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME, 33, 1),
+      error(CompileTimeErrorCode.UNDEFINED_PREFIXED_NAME, 33, 1),
     ]);
   }
 
   test_setterContext() async {
-    newFile('/test/lib/lib.dart');
+    newFile('$testPackageLibPath/lib.dart');
     await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p.c = 0;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME, 34, 1),
+      error(CompileTimeErrorCode.UNDEFINED_PREFIXED_NAME, 34, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
index b845ece..d5c09b8 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
@@ -5,18 +5,22 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(UndefinedSetterTest);
+    defineReflectiveTests(UndefinedSetterWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class UndefinedSetterTest extends DriverResolutionTest {
+class UndefinedSetterTest extends PubPackageResolutionTest
+    with UndefinedSetterTestCases {}
+
+mixin UndefinedSetterTestCases on PubPackageResolutionTest {
   test_importWithPrefix_defined() async {
-    newFile("/test/lib/lib.dart", content: r'''
+    newFile('$testPackageLibPath/lib.dart', content: r'''
 library lib;
 set y(int value) {}''');
     await assertNoErrorsInCode(r'''
@@ -32,7 +36,7 @@
 class T {}
 f(T e1) { e1.m = 0; }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SETTER, 24, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SETTER, 24, 1),
     ]);
   }
 
@@ -42,7 +46,7 @@
   f() { this.m = 0; }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SETTER, 23, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SETTER, 23, 1),
     ]);
   }
 
@@ -58,7 +62,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SETTER, 80, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SETTER, 80, 1),
     ]);
   }
 
@@ -71,7 +75,7 @@
   }
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SETTER, 43, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SETTER, 43, 1),
     ]);
   }
 
@@ -95,7 +99,7 @@
 f(var p) {
   f(C.s = 1);
 }''', [
-      error(StaticTypeWarningCode.UNDEFINED_SETTER, 75, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SETTER, 75, 1),
     ]);
   }
 
@@ -104,7 +108,7 @@
 class A {}
 f() { A.B = 0;}
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SETTER, 19, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SETTER, 19, 1),
     ]);
   }
 
@@ -117,7 +121,7 @@
   T..foo = 42;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SETTER, 54, 3),
+      error(CompileTimeErrorCode.UNDEFINED_SETTER, 54, 3),
     ]);
   }
 
@@ -131,7 +135,22 @@
   c.a = 1;
 }
 ''', [
-      error(StaticTypeWarningCode.UNDEFINED_SETTER, 46, 1),
+      error(CompileTimeErrorCode.UNDEFINED_SETTER, 46, 1),
     ]);
   }
 }
+
+@reflectiveTest
+class UndefinedSetterWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin, UndefinedSetterTestCases {
+  test_set_abstract_field_valid() async {
+    await assertNoErrorsInCode('''
+abstract class A {
+  abstract int x;
+}
+void f(A a, int x) {
+  a.x = x;
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart
index e671e33..4fba9ed 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart
@@ -5,8 +5,7 @@
 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';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,9 +15,9 @@
 }
 
 @reflectiveTest
-class UndefinedShownNameTest extends DriverResolutionTest {
+class UndefinedShownNameTest extends PubPackageResolutionTest {
   test_export() async {
-    newFile('/test/lib/lib1.dart');
+    newFile('$testPackageLibPath/lib1.dart');
     await assertErrorsInCode(r'''
 export 'lib1.dart' show a;
 ''', [
@@ -27,7 +26,7 @@
   }
 
   test_import() async {
-    newFile('/test/lib/lib1.dart');
+    newFile('$testPackageLibPath/lib1.dart');
     await assertErrorsInCode(r'''
 import 'lib1.dart' show a;
 ''', [
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
index 544a047..d927ad5 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
@@ -5,8 +5,7 @@
 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';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,7 +15,7 @@
 }
 
 @reflectiveTest
-class UnnecessaryCastTest extends DriverResolutionTest {
+class UnnecessaryCastTest extends PubPackageResolutionTest {
   test_conditionalExpression_changesResultType_left() async {
     await assertNoErrorsInCode(r'''
 class A {}
@@ -219,7 +218,7 @@
 class UnnecessaryCastTestWithNullSafety extends UnnecessaryCastTest
     with WithNullSafetyMixin {
   test_interfaceType_star_toNone() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 int a = 0;
 ''');
@@ -237,7 +236,7 @@
   }
 
   test_interfaceType_star_toQuestion() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.7
 int a = 0;
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart
index d443e12..705ab75 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UnnecessaryNoSuchMethodTest extends DriverResolutionTest {
+class UnnecessaryNoSuchMethodTest extends PubPackageResolutionTest {
   test_blockBody() async {
     await assertErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_non_null_assertion_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_non_null_assertion_test.dart
index 112b3da..a72ca9d 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_non_null_assertion_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_non_null_assertion_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,15 +14,10 @@
 }
 
 @reflectiveTest
-class UnnecessaryNonNullAssertionTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class UnnecessaryNonNullAssertionTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 var x = 0;
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_null_comparison_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_null_comparison_test.dart
index bc58a11..e48a345 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_null_comparison_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_null_comparison_test.dart
@@ -2,13 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -18,13 +15,8 @@
 }
 
 @reflectiveTest
-class UnnecessaryNullComparisonFalseTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class UnnecessaryNullComparisonFalseTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_equal_intLiteral() async {
     await assertNoErrorsInCode('''
 f(int a, int? b) {
@@ -37,7 +29,7 @@
   }
 
   test_equal_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 var a = 0;
 ''');
@@ -85,13 +77,8 @@
 }
 
 @reflectiveTest
-class UnnecessaryNullComparisonTrueTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class UnnecessaryNullComparisonTrueTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_notEqual_intLiteral() async {
     await assertNoErrorsInCode('''
 f(int a, int? b) {
@@ -104,7 +91,7 @@
   }
 
   test_notEqual_legacy() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 // @dart = 2.5
 var a = 0;
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_test.dart
index 0a21ca9..4c277a3 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_test.dart
@@ -2,24 +2,22 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/dart/error/hint_codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(UnnecessaryTypeCheckFalseTest);
-    defineReflectiveTests(UnnecessaryTypeCheckFalseWithNnbdTest);
+    defineReflectiveTests(UnnecessaryTypeCheckFalseWithNullSafetyTest);
     defineReflectiveTests(UnnecessaryTypeCheckTrueTest);
-    defineReflectiveTests(UnnecessaryTypeCheckTrueWithNnbdTest);
+    defineReflectiveTests(UnnecessaryTypeCheckTrueWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class UnnecessaryTypeCheckFalseTest extends DriverResolutionTest {
+class UnnecessaryTypeCheckFalseTest extends PubPackageResolutionTest {
   test_null_not_Null() async {
     await assertErrorsInCode(r'''
 var b = null is! Null;
@@ -50,13 +48,8 @@
 }
 
 @reflectiveTest
-class UnnecessaryTypeCheckFalseWithNnbdTest
-    extends UnnecessaryTypeCheckFalseTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class UnnecessaryTypeCheckFalseWithNullSafetyTest
+    extends UnnecessaryTypeCheckFalseTest with WithNullSafetyMixin {
   @override
   test_type_not_object() async {
     await assertNoErrorsInCode(r'''
@@ -78,7 +71,7 @@
 }
 
 @reflectiveTest
-class UnnecessaryTypeCheckTrueTest extends DriverResolutionTest {
+class UnnecessaryTypeCheckTrueTest extends PubPackageResolutionTest {
   test_null_is_Null() async {
     await assertErrorsInCode(r'''
 var b = null is Null;
@@ -109,13 +102,8 @@
 }
 
 @reflectiveTest
-class UnnecessaryTypeCheckTrueWithNnbdTest
-    extends UnnecessaryTypeCheckTrueTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]);
-
+class UnnecessaryTypeCheckTrueWithNullSafetyTest
+    extends UnnecessaryTypeCheckTrueTest with WithNullSafetyMixin {
   @override
   test_type_is_object() async {
     await assertNoErrorsInCode(r'''
diff --git a/pkg/analyzer/test/src/diagnostics/unqualified_reference_to_non_local_static_member_test.dart b/pkg/analyzer/test/src/diagnostics/unqualified_reference_to_non_local_static_member_test.dart
new file mode 100644
index 0000000..56a6482
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/unqualified_reference_to_non_local_static_member_test.dart
@@ -0,0 +1,73 @@
+// 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/context_collection_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UnqualifiedReferenceToNonLocalStaticMemberTest);
+  });
+}
+
+@reflectiveTest
+class UnqualifiedReferenceToNonLocalStaticMemberTest
+    extends PubPackageResolutionTest {
+  test_getter() async {
+    await assertErrorsInCode(r'''
+class A {
+  static int get a => 0;
+}
+class B extends A {
+  int b() {
+    return a;
+  }
+}
+''', [
+      error(
+          CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
+          80,
+          1),
+    ]);
+  }
+
+  test_getter_invokeTarget() async {
+    await assertErrorsInCode(r'''
+class A {
+  static int foo;
+}
+
+class B extends A {
+  static bar() {
+    foo.abs();
+  }
+}
+''', [
+      error(
+          CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
+          72,
+          3),
+    ]);
+  }
+
+  test_setter() async {
+    await assertErrorsInCode(r'''
+class A {
+  static set a(x) {}
+}
+class B extends A {
+  b(y) {
+    a = y;
+  }
+}
+''', [
+      error(
+          CompileTimeErrorCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
+          66,
+          1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/unqualified_reference_to_static_member_of_extended_type_test.dart b/pkg/analyzer/test/src/diagnostics/unqualified_reference_to_static_member_of_extended_type_test.dart
index 5e5860f..18a9304 100644
--- a/pkg/analyzer/test/src/diagnostics/unqualified_reference_to_static_member_of_extended_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unqualified_reference_to_static_member_of_extended_type_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class UnqualifiedReferenceToStaticMemberOfExtendedTypeTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_getter() async {
     await assertErrorsInCode('''
 class MyClass {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart b/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
index 9eefe4c..c64c00e 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UnusedCatchClauseTest extends DriverResolutionTest {
+class UnusedCatchClauseTest extends PubPackageResolutionTest {
   @override
   bool get enableUnusedLocalVariable => true;
 
diff --git a/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart b/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
index 9ee0541..4a71c72 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UnusedCatchStackTest extends DriverResolutionTest {
+class UnusedCatchStackTest extends PubPackageResolutionTest {
   @override
   bool get enableUnusedLocalVariable => true;
 
diff --git a/pkg/analyzer/test/src/diagnostics/unused_element_test.dart b/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
index 7756ea0..4a1a652 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
@@ -5,16 +5,17 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(UnusedElementTest);
+    defineReflectiveTests(UnusedElementWithNullSafetyTest);
   });
 }
 
 @reflectiveTest
-class UnusedElementTest extends DriverResolutionTest {
+class UnusedElementTest extends PubPackageResolutionTest {
   @override
   bool get enableUnusedElement => true;
 
@@ -84,6 +85,13 @@
 ''');
   }
 
+  test_class_isUsed_with() async {
+    await assertNoErrorsInCode(r'''
+class _A {}
+class B with _A {}
+''');
+  }
+
   test_class_notUsed_inClassMember() async {
     await assertErrorsInCode(r'''
 class _A {
@@ -108,6 +116,7 @@
 }
 ''', [
       error(HintCode.UNUSED_ELEMENT, 6, 2),
+      error(HintCode.UNUSED_ELEMENT, 26, 5),
     ]);
   }
 
@@ -303,56 +312,6 @@
     ]);
   }
 
-  test_functionTop_isUsed_invocation() async {
-    await assertNoErrorsInCode(r'''
-_f() {}
-main() {
-  _f();
-}
-''');
-  }
-
-  test_functionTop_isUsed_reference() async {
-    await assertNoErrorsInCode(r'''
-_f() {}
-main() {
-  print(_f);
-}
-print(x) {}
-''');
-  }
-
-  test_functionTop_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
-_f() {}
-main() {
-}
-''', [
-      error(HintCode.UNUSED_ELEMENT, 0, 2),
-    ]);
-  }
-
-  test_functionTop_notUsed_referenceFromItself() async {
-    await assertErrorsInCode(r'''
-_f(int p) {
-  _f(p - 1);
-}
-main() {
-}
-''', [
-      error(HintCode.UNUSED_ELEMENT, 0, 2),
-    ]);
-  }
-
-  test_functionTop_notUsed_referenceInComment() async {
-    await assertErrorsInCode(r'''
-/// [_f] is a great function.
-_f(int p) => 7;
-''', [
-      error(HintCode.UNUSED_ELEMENT, 30, 2),
-    ]);
-  }
-
   test_functionTypeAlias_isUsed_isExpression() async {
     await assertNoErrorsInCode(r'''
 typedef _F(a, b);
@@ -471,7 +430,7 @@
 ''');
   }
 
-  test_getter_isUsed_invocation_PrefixedIdentifier() async {
+  test_getter_isUsed_invocation_prefixedIdentifier() async {
     await assertErrorsInCode(r'''
 class A {
   get _g => null;
@@ -484,7 +443,7 @@
     ]);
   }
 
-  test_getter_isUsed_invocation_PropertyAccess() async {
+  test_getter_isUsed_invocation_propertyAccess() async {
     await assertErrorsInCode(r'''
 class A {
   get _g => null;
@@ -583,7 +542,7 @@
 ''');
   }
 
-  test_method_isUsed_hasReference_PrefixedIdentifier() async {
+  test_method_isUsed_hasReference_prefixedIdentifier() async {
     await assertNoErrorsInCode(r'''
 class A {
   _m() {}
@@ -594,7 +553,7 @@
 ''');
   }
 
-  test_method_isUsed_hasReference_PropertyAccess() async {
+  test_method_isUsed_hasReference_propertyAccess() async {
     await assertNoErrorsInCode(r'''
 class A {
   _m() {}
@@ -656,7 +615,7 @@
 ''');
   }
 
-  test_method_isUsed_invocation_MemberElement() async {
+  test_method_isUsed_invocation_memberElement() async {
     await assertNoErrorsInCode(r'''
 class A<T> {
   _m(T t) {}
@@ -705,16 +664,6 @@
 ''');
   }
 
-  test_method_isUsed_notPrivate() async {
-    await assertNoErrorsInCode(r'''
-class A {
-  m() {}
-}
-main() {
-}
-''');
-  }
-
   test_method_isUsed_privateExtension() async {
     await assertNoErrorsInCode(r'''
 extension _A on String {
@@ -770,8 +719,6 @@
 ''');
   }
 
-  // Postfix operators can only be called, not defined. The "notUsed" sibling to
-  // this test is the test on a binary operator.
   test_method_isUsed_privateExtension_prefixOperator() async {
     await assertNoErrorsInCode(r'''
 extension _A on String {
@@ -783,8 +730,16 @@
 ''');
   }
 
-  // Assignment operators can only be called, not defined. The "notUsed" sibling
-  // to this test is the test on a binary operator.
+  test_method_isUsed_public() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  m() {}
+}
+main() {
+}
+''');
+  }
+
   test_method_isUsed_staticInvocation() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -852,6 +807,8 @@
     ]);
   }
 
+  // Postfix operators can only be called, not defined. The "notUsed" sibling to
+  // this test is the test on a binary operator.
   test_method_notUsed_privateExtension_indexOperator() async {
     await assertErrorsInCode(r'''
 extension _A on bool {
@@ -862,6 +819,8 @@
     ]);
   }
 
+  // Assignment operators can only be called, not defined. The "notUsed" sibling
+  // to this test is the test on a binary operator.
   test_method_notUsed_privateExtension_operator() async {
     await assertErrorsInCode(r'''
 extension _A on String {
@@ -937,6 +896,282 @@
     ]);
   }
 
+  test_mixin_isUsed_with() async {
+    await assertNoErrorsInCode(r'''
+mixin _M {}
+class C with _M {}
+''');
+  }
+
+  test_mixin_notUsed() async {
+    await assertErrorsInCode(r'''
+mixin _M {}
+''', [
+      error(HintCode.UNUSED_ELEMENT, 6, 2),
+    ]);
+  }
+
+  test_optionalParameter_constructor_named_notUsed() async {
+    await assertErrorsInCode(r'''
+class A {
+  A._([int a]);
+}
+f() => A._();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 21, 1),
+    ]);
+  }
+
+  test_optionalParameter_constructor_unnamed_notUsed() async {
+    await assertErrorsInCode(r'''
+class _A {
+  _A([int a]);
+}
+f() => _A();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 21, 1),
+    ]);
+  }
+
+  test_optionalParameter_isUsed_functionTearoff() async {
+    await assertNoErrorsInCode(r'''
+f() {
+  void _m([int a]) {}
+  _m;
+}
+''');
+  }
+
+  test_optionalParameter_isUsed_local() async {
+    await assertNoErrorsInCode(r'''
+f() {
+  void _m([int a]) {}
+  _m(1);
+}
+''');
+  }
+
+  test_optionalParameter_isUsed_methodTearoff() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  void _m([int a]) {}
+}
+f() => A()._m;
+''');
+  }
+
+  test_optionalParameter_isUsed_named() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  void _m({int a = 0}) {}
+}
+f() => A()._m(a: 0);
+''');
+  }
+
+  test_optionalParameter_isUsed_overridden() async {
+    await assertErrorsInCode(r'''
+class A {
+  void _m([int a]) {}
+}
+class B implements A {
+  void _m([int a]) {}
+}
+f() {
+  A()._m();
+  B()._m(0);
+}
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 25, 1),
+    ]);
+  }
+
+  test_optionalParameter_isUsed_override() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  void _m([int a]) {}
+}
+class B implements A {
+  void _m([int a]) {}
+}
+f() => A()._m(0);
+''');
+  }
+
+  test_optionalParameter_isUsed_override_renamed() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  void _m([int a]) {}
+}
+class B implements A {
+  void _m([int b]) {}
+}
+f() => A()._m(0);
+''');
+  }
+
+  test_optionalParameter_isUsed_overrideRequired() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  void _m(int a) {}
+}
+class B implements A {
+  void _m([int a]) {}
+}
+f() => A()._m(0);
+''');
+  }
+
+  test_optionalParameter_isUsed_positional() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  void _m([int a]) {}
+}
+f() => A()._m(0);
+''');
+  }
+
+  test_optionalParameter_isUsed_publicMethod() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  void m([int a]) {}
+}
+f() => A().m();
+''');
+  }
+
+  test_optionalParameter_isUsed_publicMethod_extension() async {
+    await assertNoErrorsInCode(r'''
+extension E on String {
+  void m([int a]) {}
+}
+f() => "hello".m();
+''');
+  }
+
+  test_optionalParameter_isUsed_requiredPositional() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  void _m(int a) {}
+}
+f() => A()._m(0);
+''');
+  }
+
+  test_optionalParameter_notUsed_extension() async {
+    await assertErrorsInCode(r'''
+extension E on String {
+  void _m([int a]) {}
+}
+f() => "hello"._m();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 39, 1),
+    ]);
+  }
+
+  test_optionalParameter_notUsed_named() async {
+    await assertErrorsInCode(r'''
+class A {
+  void _m({int a}) {}
+}
+f() => A()._m();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 25, 1),
+    ]);
+  }
+
+  test_optionalParameter_notUsed_override_added() async {
+    await assertErrorsInCode(r'''
+class A {
+  void _m() {}
+}
+class B implements A {
+  void _m([int a]) {}
+}
+f() => A()._m();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 65, 1),
+    ]);
+  }
+
+  test_optionalParameter_notUsed_positional() async {
+    await assertErrorsInCode(r'''
+class A {
+  void _m([int a]) {}
+}
+f() => A()._m();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 25, 1),
+    ]);
+  }
+
+  test_optionalParameter_notUsed_publicMethod_privateExtension() async {
+    await assertErrorsInCode(r'''
+extension _E on String {
+  void m([int a]) {}
+}
+f() => "hello".m();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 39, 1),
+    ]);
+  }
+
+  test_optionalParameter_notUsed_publicMethod_unnamedExtension() async {
+    await assertErrorsInCode(r'''
+extension on String {
+  void m([int a]) {}
+}
+f() => "hello".m();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 36, 1),
+    ]);
+  }
+
+  test_optionalParameter_static_notUsed() async {
+    await assertErrorsInCode(r'''
+class A {
+  static void _m([int a]) {}
+}
+f() => A._m();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 32, 1),
+    ]);
+  }
+
+  test_optionalParameter_staticPublic_notUsed_privateClass() async {
+    await assertErrorsInCode(r'''
+class _A {
+  static void m([int a]) {}
+}
+f() => _A.m();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 32, 1),
+    ]);
+  }
+
+  test_optionalParameter_topLevel_isUsed() async {
+    await assertNoErrorsInCode(r'''
+void _m([int a]) {}
+f() => _m(1);
+''');
+  }
+
+  test_optionalParameter_topLevel_notUsed() async {
+    await assertErrorsInCode(r'''
+void _m([int a]) {}
+f() => _m();
+''', [
+      error(HintCode.UNUSED_ELEMENT_PARAMETER, 13, 1),
+    ]);
+  }
+
+  test_optionalParameter_topLevelPublic_isUsed() async {
+    await assertNoErrorsInCode(r'''
+void m([int a]) {}
+f() => m();
+''');
+  }
+
   test_publicStaticMethod_privateClass_isUsed() async {
     await assertNoErrorsInCode(r'''
 class _A {
@@ -1067,6 +1302,66 @@
     ]);
   }
 
+  test_topLevelAccessors_isUsed_questionQuestionEqual() async {
+    await assertNoErrorsInCode(r'''
+int get _c => 1;
+void set _c(int x) {}
+int f() {
+  return _c ??= 7;
+}
+''');
+  }
+
+  test_topLevelFunction_isUsed_invocation() async {
+    await assertNoErrorsInCode(r'''
+_f() {}
+main() {
+  _f();
+}
+''');
+  }
+
+  test_topLevelFunction_isUsed_reference() async {
+    await assertNoErrorsInCode(r'''
+_f() {}
+main() {
+  print(_f);
+}
+print(x) {}
+''');
+  }
+
+  test_topLevelFunction_notUsed_noReference() async {
+    await assertErrorsInCode(r'''
+_f() {}
+main() {
+}
+''', [
+      error(HintCode.UNUSED_ELEMENT, 0, 2),
+    ]);
+  }
+
+  test_topLevelFunction_notUsed_referenceFromItself() async {
+    await assertErrorsInCode(r'''
+_f(int p) {
+  _f(p - 1);
+}
+main() {
+}
+''', [
+      error(HintCode.UNUSED_ELEMENT, 0, 2),
+    ]);
+  }
+
+  test_topLevelFunction_notUsed_referenceInComment() async {
+    await assertErrorsInCode(r'''
+/// [_f] is a great function.
+_f(int p) => 7;
+''', [
+      error(HintCode.UNUSED_ELEMENT, 30, 2),
+    ]);
+  }
+
   test_topLevelVariable_isUsed() async {
     await assertNoErrorsInCode(r'''
 int _a = 1;
@@ -1086,6 +1381,15 @@
 ''');
   }
 
+  test_topLevelVariable_isUsed_questionQuestionEqual() async {
+    await assertNoErrorsInCode(r'''
+int _a;
+f() {
+  _a ??= 1;
+}
+''');
+  }
+
   test_topLevelVariable_notUsed() async {
     await assertErrorsInCode(r'''
 int _a = 1;
@@ -1097,6 +1401,17 @@
     ]);
   }
 
+  test_topLevelVariable_notUsed_compoundAssign() async {
+    await assertErrorsInCode(r'''
+int _a = 1;
+f() {
+  _a += 1;
+}
+''', [
+      error(HintCode.UNUSED_ELEMENT, 4, 2),
+    ]);
+  }
+
   test_topLevelVariable_notUsed_referenceInComment() async {
     await assertErrorsInCode(r'''
 /// [_a] is a great variable.
@@ -1106,3 +1421,19 @@
     ]);
   }
 }
+
+@reflectiveTest
+class UnusedElementWithNullSafetyTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
+  test_optionalParameter_isUsed_overrideRequiredNamed() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  void _m({required int a}) {}
+}
+class B implements A {
+  void _m({int a = 0}) {}
+}
+f() => A()._m(a: 0);
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/unused_field_test.dart b/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
index 045edd4..e274e91 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UnusedFieldTest extends DriverResolutionTest {
+class UnusedFieldTest extends PubPackageResolutionTest {
   @override
   bool get enableUnusedElement => true;
 
diff --git a/pkg/analyzer/test/src/diagnostics/unused_import_test.dart b/pkg/analyzer/test/src/diagnostics/unused_import_test.dart
index b1a0884..f574819 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_import_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_import_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class UnusedImportTest extends DriverResolutionTest {
+class UnusedImportTest extends PubPackageResolutionTest {
   test_annotationOnDirective() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {
   const A() {}
 }
@@ -28,7 +28,7 @@
   }
 
   test_as() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 ''');
     await assertErrorsInCode(r'''
@@ -42,10 +42,10 @@
 
   test_as_equalPrefixes_referenced() async {
     // 18818
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 ''');
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 class B {}
 ''');
     await assertNoErrorsInCode(r'''
@@ -59,10 +59,10 @@
   @failingTest
   test_as_equalPrefixes_unreferenced() async {
     // See todo at ImportsVerifier.prefixElementMap.
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 ''');
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 class B {}
 ''');
     await assertErrorsInCode(r'''
@@ -81,11 +81,11 @@
   }
 
   test_export() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 export 'lib2.dart';
 class One {}
 ''');
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 class Two {}
 ''');
     await assertNoErrorsInCode(r'''
@@ -95,15 +95,15 @@
   }
 
   test_export2() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 export 'lib2.dart';
 class One {}
 ''');
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 export 'lib3.dart';
 class Two {}
 ''');
-    newFile('/test/lib/lib3.dart', content: r'''
+    newFile('$testPackageLibPath/lib3.dart', content: r'''
 class Three {}
 ''');
     await assertNoErrorsInCode(r'''
@@ -113,15 +113,15 @@
   }
 
   test_export_infiniteLoop() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 export 'lib2.dart';
 class One {}
 ''');
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 export 'lib3.dart';
 class Two {}
 ''');
-    newFile('/test/lib/lib3.dart', content: r'''
+    newFile('$testPackageLibPath/lib3.dart', content: r'''
 export 'lib2.dart';
 class Three {}
 ''');
@@ -132,7 +132,7 @@
   }
 
   test_extension_instance_call() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on int {
   int call(int x) => 0;
 }
@@ -147,7 +147,7 @@
   }
 
   test_extension_instance_getter() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   String get empty => '';
 }
@@ -162,7 +162,7 @@
   }
 
   test_extension_instance_method() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   String empty() => '';
 }
@@ -177,7 +177,7 @@
   }
 
   test_extension_instance_operator_binary() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   String operator -(String s) => this;
 }
@@ -192,7 +192,7 @@
   }
 
   test_extension_instance_operator_index() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on int {
   int operator [](int i) => 0;
 }
@@ -207,7 +207,7 @@
   }
 
   test_extension_instance_operator_unary() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   void operator -() {}
 }
@@ -222,7 +222,7 @@
   }
 
   test_extension_instance_setter() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   void set foo(int i) {}
 }
@@ -237,7 +237,7 @@
   }
 
   test_extension_override_getter() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   String get empty => '';
 }
@@ -252,7 +252,7 @@
   }
 
   test_extension_static_field() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   static const String empty = '';
 }
@@ -267,7 +267,7 @@
   }
 
   test_hide() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 ''');
     await assertErrorsInCode(r'''
@@ -287,7 +287,7 @@
   }
 
   test_metadata() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 const x = 0;
 ''');
     await assertNoErrorsInCode(r'''
@@ -301,12 +301,12 @@
   }
 
   test_multipleExtensions() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   String a() => '';
 }
 ''');
-    newFile('/test/lib/lib2.dart', content: r'''
+    newFile('$testPackageLibPath/lib2.dart', content: r'''
 extension E on String {
   String b() => '';
 }
@@ -324,7 +324,7 @@
   }
 
   test_prefix_topLevelFunction() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class One {}
 topLevelFunction() {}
 ''');
@@ -343,7 +343,7 @@
   }
 
   test_prefix_topLevelFunction2() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class One {}
 topLevelFunction() {}
 ''');
@@ -364,7 +364,7 @@
   }
 
   test_show() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 class B {}
 ''');
@@ -378,7 +378,7 @@
   }
 
   test_unusedImport() async {
-    newFile('/test/lib/lib1.dart');
+    newFile('$testPackageLibPath/lib1.dart');
     await assertErrorsInCode(r'''
 import 'lib1.dart';
 ''', [
diff --git a/pkg/analyzer/test/src/diagnostics/unused_label_test.dart b/pkg/analyzer/test/src/diagnostics/unused_label_test.dart
index 4d1c338..dbc6fb1 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_label_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_label_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UnusedLabelTest extends DriverResolutionTest {
+class UnusedLabelTest extends PubPackageResolutionTest {
   test_unused_inSwitch() async {
     await assertErrorsInCode(r'''
 f(x) {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart b/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
index 5bf524c..58c7b44 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UnusedLocalVariableTest extends DriverResolutionTest {
+class UnusedLocalVariableTest extends PubPackageResolutionTest {
   @override
   bool get enableUnusedLocalVariable => true;
 
diff --git a/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart b/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart
index 6e43f10..787c6841 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,9 +14,9 @@
 }
 
 @reflectiveTest
-class UnusedShownNameTest extends DriverResolutionTest {
+class UnusedShownNameTest extends PubPackageResolutionTest {
   test_extension_instance_method_unused() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   String empty() => '';
 }
@@ -34,7 +34,7 @@
   }
 
   test_extension_instance_method_used() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 extension E on String {
   String empty() => '';
 }
@@ -49,7 +49,7 @@
   }
 
   test_unreferenced() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 class B {}
 ''');
@@ -73,7 +73,7 @@
   }
 
   test_unusedShownName_as() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 class B {}
 ''');
@@ -86,7 +86,7 @@
   }
 
   test_unusedShownName_duplicates() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 class A {}
 class B {}
 class C {}
@@ -104,7 +104,7 @@
   }
 
   test_unusedShownName_topLevelVariable() async {
-    newFile('/test/lib/lib1.dart', content: r'''
+    newFile('$testPackageLibPath/lib1.dart', content: r'''
 const int var1 = 1;
 const int var2 = 2;
 const int var3 = 3;
diff --git a/pkg/analyzer/test/src/diagnostics/uri_does_not_exist_test.dart b/pkg/analyzer/test/src/diagnostics/uri_does_not_exist_test.dart
index 8682a2d1..a9bdb9b 100644
--- a/pkg/analyzer/test/src/diagnostics/uri_does_not_exist_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/uri_does_not_exist_test.dart
@@ -5,8 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/test_support.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +14,7 @@
 }
 
 @reflectiveTest
-class UriDoesNotExistTest extends DriverResolutionTest {
+class UriDoesNotExistTest extends PubPackageResolutionTest {
   test_deferredImportWithInvalidUri() async {
     await assertErrorsInCode(r'''
 import '[invalid uri]' deferred as p;
@@ -44,7 +43,7 @@
   }
 
   test_import_appears_after_deleting_target() async {
-    String filePath = newFile('/test/lib/target.dart').path;
+    String filePath = newFile('$testPackageLibPath/target.dart').path;
 
     await assertErrorsInCode('''
 import 'target.dart';
@@ -54,12 +53,10 @@
 
     // Remove the overlay in the same way as AnalysisServer.
     deleteFile(filePath);
-    driver.removeFile(filePath);
+    driverFor(testFilePath).removeFile(filePath);
 
     await resolveTestFile();
-    GatheringErrorListener errorListener = GatheringErrorListener();
-    errorListener.addAll(result.errors);
-    errorListener.assertErrors([
+    assertErrorsInResult([
       error(CompileTimeErrorCode.URI_DOES_NOT_EXIST, 7, 13),
     ]);
   }
@@ -72,15 +69,13 @@
       error(CompileTimeErrorCode.URI_DOES_NOT_EXIST, 7, 13),
     ]);
 
-    newFile('/test/lib/target.dart');
+    newFile('$testPackageLibPath/target.dart');
 
     // Make sure the error goes away.
     // TODO(brianwilkerson) The error does not go away, possibly because the
     //  file is not being reanalyzed.
     await resolveTestFile();
-    GatheringErrorListener errorListener = GatheringErrorListener();
-    errorListener.addAll(result.errors);
-    errorListener.assertErrors([
+    assertErrorsInResult([
       error(HintCode.UNUSED_IMPORT, 0, 0),
     ]);
   }
@@ -95,21 +90,21 @@
   }
 
   test_valid_dll() async {
-    newFile("/test/lib/lib.dll");
+    newFile("$testPackageLibPath/lib.dll");
     await assertNoErrorsInCode('''
 import 'dart-ext:lib';
 ''');
   }
 
   test_valid_dylib() async {
-    newFile("/test/lib/lib.dylib");
+    newFile("$testPackageLibPath/lib.dylib");
     await assertNoErrorsInCode('''
 import 'dart-ext:lib';
 ''');
   }
 
   test_valid_so() async {
-    newFile("/test/lib/lib.so");
+    newFile("$testPackageLibPath/lib.so");
     await assertNoErrorsInCode('''
 import 'dart-ext:lib';
 ''');
diff --git a/pkg/analyzer/test/src/diagnostics/uri_with_interpolation_test.dart b/pkg/analyzer/test/src/diagnostics/uri_with_interpolation_test.dart
index a396f27..f637890 100644
--- a/pkg/analyzer/test/src/diagnostics/uri_with_interpolation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/uri_with_interpolation_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,13 +14,13 @@
 }
 
 @reflectiveTest
-class UriWithInterpolationTest extends DriverResolutionTest {
+class UriWithInterpolationTest extends PubPackageResolutionTest {
   test_constant() async {
     await assertErrorsInCode('''
 import 'stuff_\$platform.dart';
 ''', [
       error(CompileTimeErrorCode.URI_WITH_INTERPOLATION, 7, 22),
-      error(StaticWarningCode.UNDEFINED_IDENTIFIER, 15, 8),
+      error(CompileTimeErrorCode.UNDEFINED_IDENTIFIER, 15, 8),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/use_of_nullable_value_test.dart b/pkg/analyzer/test/src/diagnostics/use_of_nullable_value_test.dart
index 4cc8770..6e71b13 100644
--- a/pkg/analyzer/test/src/diagnostics/use_of_nullable_value_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/use_of_nullable_value_test.dart
@@ -2,14 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -20,13 +17,8 @@
 }
 
 @reflectiveTest
-class InvalidUseOfNullValueTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
+class InvalidUseOfNullValueTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_as() async {
     await assertNoErrorsInCode(r'''
 m() {
@@ -71,7 +63,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 27, 1),
-      error(StaticWarningCode.INVALID_USE_OF_NULL_VALUE, 32, 1),
+      error(CompileTimeErrorCode.INVALID_USE_OF_NULL_VALUE, 32, 1),
     ]);
   }
 
@@ -132,16 +124,7 @@
 
 @reflectiveTest
 class UncheckedUseOfNullableValueInsideExtensionTest
-    extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+    extends PubPackageResolutionTest with WithNullSafetyMixin {
   test_indexExpression_nonNullable() async {
     await assertNoErrorsInCode(r'''
 class A {
@@ -171,15 +154,15 @@
 extension E on A? {
   void bar() {
     this[0];
-    this?.[0];
+    this?[0];
 
     this[0] = 0;
-    this?.[0] = 0;
+    this?[0] = 0;
   }
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 126, 4),
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 155, 4),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 126, 4),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 154, 4),
     ]);
   }
 
@@ -219,8 +202,8 @@
   }
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 68, 3),
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 79, 4),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 68, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 79, 4),
     ]);
   }
 
@@ -250,7 +233,7 @@
   }
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 78, 4),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 78, 4),
     ]);
   }
 
@@ -294,8 +277,8 @@
   }
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 93, 3),
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 102, 4),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 93, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 102, 4),
     ]);
   }
 
@@ -339,23 +322,15 @@
   }
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 93, 3),
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 106, 4),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 93, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 106, 4),
     ]);
   }
 }
 
 @reflectiveTest
-class UncheckedUseOfNullableValueTest extends DriverResolutionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.non_nullable],
-    );
-
-  @override
-  bool get typeToStringWithNullability => true;
-
+class UncheckedUseOfNullableValueTest extends PubPackageResolutionTest
+    with WithNullSafetyMixin {
   test_and_nonNullable() async {
     await assertNoErrorsInCode(r'''
 m() {
@@ -372,7 +347,7 @@
   if(x && true) {}
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 22, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 22, 1),
     ]);
   }
 
@@ -401,7 +376,7 @@
   assert(x);
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 26, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 26, 1),
     ]);
   }
 
@@ -422,7 +397,7 @@
   b.a.x = 2;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 100, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 100, 3),
     ]);
     var assignment1 = findNode.assignment('b.a?.x = 1');
     var assignment2 = findNode.assignment('b.a.x = 2');
@@ -465,7 +440,7 @@
   b.a.y += 0;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 109, 5),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 109, 5),
     ]);
     var assignment1 = findNode.assignment('b.a.x +=');
     var assignment2 = findNode.assignment('b.a.y +=');
@@ -492,7 +467,7 @@
   b.a.x += 2;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 101, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 101, 3),
     ]);
     var assignment1 = findNode.assignment('b.a?.x += 1');
     var assignment2 = findNode.assignment('b.a.x += 2');
@@ -509,7 +484,7 @@
   y += 0;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 31, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 31, 1),
     ]);
     var assignment1 = findNode.assignment('x +=');
     var assignment2 = findNode.assignment('y +=');
@@ -553,7 +528,7 @@
   x..[0] = 1;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 24, 1),
     ]);
   }
 
@@ -573,7 +548,7 @@
   x..abs();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
     ]);
   }
 
@@ -593,7 +568,7 @@
   x..isEven;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
     ]);
   }
 
@@ -634,7 +609,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 28, 1),
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 33, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 33, 1),
     ]);
   }
 
@@ -648,8 +623,8 @@
   x.foo;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 58, 1),
-      error(StaticTypeWarningCode.UNDEFINED_GETTER, 60, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 58, 1),
+      error(CompileTimeErrorCode.UNDEFINED_GETTER, 60, 3),
     ]);
   }
 
@@ -669,7 +644,7 @@
   if (x) {}
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 1),
     ]);
   }
 
@@ -689,7 +664,7 @@
   x[0];
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
     ]);
   }
 
@@ -709,7 +684,7 @@
   x();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 1),
     ]);
   }
 
@@ -729,7 +704,7 @@
   x();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 25, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 25, 1),
     ]);
   }
 
@@ -785,7 +760,7 @@
   x.isEven;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
     ]);
     assertSimpleIdentifier(
       findNode.simple('isEven'),
@@ -810,7 +785,7 @@
   (x).isEven;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 3),
     ]);
   }
 
@@ -829,7 +804,7 @@
   x.isEven;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 27, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 27, 1),
     ]);
   }
 
@@ -839,7 +814,7 @@
   x.first();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 38, 7),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 38, 7),
     ]);
   }
 
@@ -885,7 +860,7 @@
   x.round();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
     ]);
   }
 
@@ -899,8 +874,8 @@
   x.foo();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 54, 1),
-      error(StaticTypeWarningCode.UNDEFINED_METHOD, 56, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 54, 1),
+      error(CompileTimeErrorCode.UNDEFINED_METHOD, 56, 3),
     ]);
   }
 
@@ -935,7 +910,7 @@
   x.call();
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
     ]);
   }
 
@@ -958,7 +933,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
     ]);
   }
 
@@ -978,7 +953,7 @@
   if(!x) {}
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 23, 1),
     ]);
   }
 
@@ -1035,7 +1010,7 @@
   x - 3;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
     ]);
   }
 
@@ -1055,7 +1030,7 @@
   x + 3;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
     ]);
   }
 
@@ -1078,7 +1053,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 18, 1),
     ]);
   }
 
@@ -1096,7 +1071,7 @@
   x++;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 14, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 14, 1),
     ]);
   }
 
@@ -1112,7 +1087,7 @@
   x++;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 77, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 77, 1),
     ]);
   }
 
@@ -1135,7 +1110,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 20, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 20, 1),
     ]);
   }
 
@@ -1153,7 +1128,7 @@
   ++x;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 16, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 16, 1),
     ]);
   }
 
@@ -1176,7 +1151,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 13, 1),
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
     ]);
   }
 
@@ -1192,7 +1167,7 @@
   -x;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 73, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 73, 1),
     ]);
   }
 
@@ -1212,7 +1187,7 @@
   if(x || false) {}
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 22, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 22, 1),
     ]);
   }
 
@@ -1230,7 +1205,7 @@
   x += 1;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 14, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 14, 1),
     ]);
   }
 
@@ -1246,7 +1221,7 @@
   a.x; // 2
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 66, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 66, 1),
     ]);
     var propertyAccess1 = findNode.propertyAccess('a?.x; // 1');
     var propertyAccess2 = findNode.prefixed('a.x; // 2');
@@ -1277,7 +1252,7 @@
   b.a.x; // 2
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 101, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 101, 3),
     ]);
     var propertyAccess1 = findNode.propertyAccess('b.a?.x; // 1');
     var propertyAccess2 = findNode.propertyAccess('b.a.x; // 2');
@@ -1308,7 +1283,7 @@
   b.a.x; // 2
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 101, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 101, 1),
     ]);
     var propertyAccess1 = findNode.propertyAccess('x; // 1');
     var propertyAccess2 = findNode.propertyAccess('x; // 2');
@@ -1344,7 +1319,7 @@
   c.b.a.x; // 2
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 142, 5),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 142, 5),
     ]);
     var propertyAccess1 = findNode.propertyAccess('x; // 1');
     var propertyAccess2 = findNode.propertyAccess('x; // 2');
@@ -1380,7 +1355,7 @@
   c.b.a.x; // 2
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 148, 3),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 148, 3),
     ]);
     var propertyAccess1 = findNode.propertyAccess('x; // 1');
     var propertyAccess2 = findNode.propertyAccess('x; // 2');
@@ -1414,7 +1389,7 @@
   [...list];
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 26, 4),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 26, 4),
     ]);
   }
 
@@ -1434,7 +1409,7 @@
   x ? 0 : 1;
 }
 ''', [
-      error(StaticWarningCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
+      error(CompileTimeErrorCode.UNCHECKED_USE_OF_NULLABLE_VALUE, 19, 1),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/use_of_void_result_test.dart b/pkg/analyzer/test/src/diagnostics/use_of_void_result_test.dart
index d702f89..bb87ff3 100644
--- a/pkg/analyzer/test/src/diagnostics/use_of_void_result_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/use_of_void_result_test.dart
@@ -6,8 +6,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
-import '../dart/constant/potentially_constant_test.dart';
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +16,7 @@
 }
 
 @reflectiveTest
-class UseOfVoidResultTest extends DriverResolutionTest {
+class UseOfVoidResultTest extends PubPackageResolutionTest {
   test_andVoidLhsError() async {
     await assertErrorsInCode('''
 void main() {
@@ -25,7 +24,7 @@
   x && true;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 26, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 26, 1),
     ]);
   }
 
@@ -36,7 +35,7 @@
   true && x;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 34, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 34, 1),
     ]);
   }
 
@@ -50,7 +49,7 @@
   }
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 38, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 49, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 49, 1),
     ]);
   }
 
@@ -64,7 +63,7 @@
   }
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 40, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 51, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 51, 1),
     ]);
   }
 
@@ -113,7 +112,7 @@
   E(f()).g;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 71, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 71, 3),
     ]);
   }
 
@@ -139,7 +138,7 @@
   }
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 47, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 51, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 51, 1),
     ]);
   }
 
@@ -163,7 +162,7 @@
   "$x";
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 28, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 28, 1),
     ]);
   }
 
@@ -175,7 +174,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 21, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 27, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 27, 1),
     ]);
   }
 
@@ -197,7 +196,7 @@
   x || true;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 26, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 26, 1),
     ]);
   }
 
@@ -208,7 +207,7 @@
   false || x;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 35, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 35, 1),
     ]);
   }
 
@@ -219,7 +218,7 @@
   throw x;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 32, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 32, 1),
     ]);
   }
 
@@ -232,8 +231,8 @@
 ''', [
       // TODO(mfairhurst) suppress UNDEFINED_OPERATOR
       error(HintCode.UNUSED_LOCAL_VARIABLE, 21, 1),
-      error(StaticTypeWarningCode.UNDEFINED_OPERATOR, 26, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 27, 1),
+      error(CompileTimeErrorCode.UNDEFINED_OPERATOR, 26, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 27, 1),
     ]);
   }
 
@@ -244,7 +243,7 @@
   list[x] = null;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 40, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 40, 1),
     ]);
   }
 
@@ -255,7 +254,7 @@
   list[x];
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 40, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 40, 1),
     ]);
   }
 
@@ -267,7 +266,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 34, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 38, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 38, 1),
     ]);
   }
 
@@ -278,7 +277,7 @@
   x[0];
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 27, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 27, 3),
     ]);
   }
 
@@ -289,7 +288,7 @@
   x.foo = null;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 28, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 28, 3),
     ]);
   }
 
@@ -310,7 +309,7 @@
   x ? null : null;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 26, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 26, 1),
     ]);
   }
 
@@ -323,7 +322,7 @@
   c ? x : null;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 36, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 36, 1),
     ]);
   }
 
@@ -336,7 +335,7 @@
   c ? null : x;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 43, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 43, 1),
     ]);
   }
 
@@ -347,7 +346,7 @@
   do {} while (x);
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 39, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 39, 1),
     ]);
   }
 
@@ -369,7 +368,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 30, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 45, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 45, 1),
     ]);
   }
 
@@ -381,7 +380,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 35, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 40, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 40, 1),
     ]);
   }
 
@@ -393,7 +392,7 @@
   for (x in [1, 2]) {}
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 31, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 31, 1),
     ]);
   }
 
@@ -413,7 +412,7 @@
   x is int;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 26, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 26, 1),
     ]);
   }
 
@@ -424,7 +423,7 @@
   <dynamic>[x];
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 36, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 36, 1),
     ]);
   }
 
@@ -445,7 +444,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 30, 2),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 50, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 50, 1),
     ]);
   }
 
@@ -468,7 +467,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 30, 2),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 53, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 53, 1),
     ]);
   }
 
@@ -490,7 +489,7 @@
   x ?? 499;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 26, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 26, 1),
     ]);
   }
 
@@ -511,7 +510,7 @@
 }
 ''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 21, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 28, 2),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 28, 2),
     ]);
   }
 
@@ -522,7 +521,7 @@
   switch(x) {}
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 33, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 33, 1),
     ]);
   }
 
@@ -533,7 +532,7 @@
   while (x) {};
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 33, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 33, 1),
     ]);
   }
 
@@ -544,7 +543,7 @@
   x?.foo;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 29, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 29, 3),
     ]);
   }
 
@@ -555,7 +554,7 @@
   x.foo;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 28, 3),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 28, 3),
     ]);
   }
 
@@ -569,7 +568,7 @@
 }
 ''', [
       error(HintCode.UNUSED_ELEMENT, 22, 8),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 96, 4),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 96, 4),
     ]);
   }
 
@@ -582,7 +581,7 @@
   return x;
 }
 ''', [
-      error(StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 36, 1),
+      error(CompileTimeErrorCode.RETURN_OF_INVALID_TYPE_FROM_FUNCTION, 36, 1),
     ]);
   }
 
@@ -603,7 +602,7 @@
   use(x);
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 54, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 54, 1),
     ]);
   }
 
@@ -627,7 +626,7 @@
   }
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 41, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 45, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 45, 1),
     ]);
   }
 
@@ -653,9 +652,9 @@
   }
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 43, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 47, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 47, 1),
       error(HintCode.UNUSED_LOCAL_VARIABLE, 52, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 56, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 56, 1),
     ]);
   }
 
@@ -668,7 +667,7 @@
   }
 }''', [
       error(HintCode.UNUSED_LOCAL_VARIABLE, 43, 1),
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 47, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 47, 1),
     ]);
   }
 
@@ -691,7 +690,7 @@
   yield* x;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 31, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 31, 1),
     ]);
   }
 
@@ -701,7 +700,7 @@
   yield* x;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 30, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 30, 1),
     ]);
   }
 
@@ -711,7 +710,7 @@
   yield x;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 30, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 30, 1),
     ]);
   }
 
@@ -721,13 +720,13 @@
   yield x;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 29, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 29, 1),
     ]);
   }
 }
 
 @reflectiveTest
-class UseOfVoidResultTest_NonNullable extends DriverResolutionTest
+class UseOfVoidResultTest_NonNullable extends PubPackageResolutionTest
     with WithNullSafetyMixin {
   test_await() async {
     await assertErrorsInCode('''
@@ -735,7 +734,7 @@
   await x;
 }
 ''', [
-      error(StaticWarningCode.USE_OF_VOID_RESULT, 29, 1),
+      error(CompileTimeErrorCode.USE_OF_VOID_RESULT, 29, 1),
     ]);
   }
 
@@ -744,7 +743,7 @@
 f(void x) {
   x!;
 }
-''', [ExpectedError(StaticWarningCode.USE_OF_VOID_RESULT, 14, 2)]);
+''', [ExpectedError(CompileTimeErrorCode.USE_OF_VOID_RESULT, 14, 2)]);
 
     assertType(findNode.postfix('x!'), 'void');
   }
diff --git a/pkg/analyzer/test/src/diagnostics/variable_type_mismatch_test.dart b/pkg/analyzer/test/src/diagnostics/variable_type_mismatch_test.dart
index 909a836..155020e 100644
--- a/pkg/analyzer/test/src/diagnostics/variable_type_mismatch_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/variable_type_mismatch_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -13,10 +13,39 @@
   });
 }
 
-/// TODO(paulberry): move other tests from [CheckedModeCompileTimeErrorCodeTest]
-/// to this class.
 @reflectiveTest
-class VariableTypeMismatchTest extends DriverResolutionTest {
+class VariableTypeMismatchTest extends PubPackageResolutionTest {
+  test_assignNullToInt() async {
+    await assertNoErrorsInCode('''
+const int x = null;
+''');
+  }
+
+  test_assignNullToUndefined() async {
+    await assertErrorsInCode('''
+const Unresolved x = null;
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_CLASS, 6, 10),
+    ]);
+  }
+
+  test_assignUnrelatedTypes() async {
+    await assertErrorsInCode('''
+const int x = 'foo';
+''', [
+      error(CompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 14, 5),
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 14, 5),
+    ]);
+  }
+
+  test_assignValueToUndefined() async {
+    await assertErrorsInCode('''
+const Unresolved x = 'foo';
+''', [
+      error(CompileTimeErrorCode.UNDEFINED_CLASS, 6, 10),
+    ]);
+  }
+
   test_int_to_double_variable_reference_is_not_promoted() async {
     // Note: in the following code, the declaration of `y` should produce an
     // error because we should only promote literal ints to doubles; we
@@ -25,7 +54,34 @@
 const Object x = 0;
 const double y = x;
 ''', [
-      error(CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 37, 1),
+      error(CompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 37, 1),
+    ]);
+  }
+
+  test_listLiteral_inferredElementType() async {
+    await assertErrorsInCode('''
+const Object x = [1];
+const List<String> y = x;
+''', [
+      error(CompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 45, 1),
+    ]);
+  }
+
+  test_mapLiteral_inferredKeyType() async {
+    await assertErrorsInCode('''
+const Object x = {1: 1};
+const Map<String, dynamic> y = x;
+''', [
+      error(CompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 56, 1),
+    ]);
+  }
+
+  test_mapLiteral_inferredValueType() async {
+    await assertErrorsInCode('''
+const Object x = {1: 1};
+const Map<dynamic, String> y = x;
+''', [
+      error(CompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, 56, 1),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/void_with_type_arguments_test.dart b/pkg/analyzer/test/src/diagnostics/void_with_type_arguments_test.dart
index bc3d754..7615279 100644
--- a/pkg/analyzer/test/src/diagnostics/void_with_type_arguments_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/void_with_type_arguments_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class VoidWithTypeArgumentsTest extends DriverResolutionTest {
+class VoidWithTypeArgumentsTest extends PubPackageResolutionTest {
   test_noArguments() async {
     await assertNoErrorsInCode('''
 void f() {}
diff --git a/pkg/analyzer/test/src/diagnostics/wrong_number_of_parameters_for_operator_test.dart b/pkg/analyzer/test/src/diagnostics/wrong_number_of_parameters_for_operator_test.dart
index 9a22787..cb48547 100644
--- a/pkg/analyzer/test/src/diagnostics/wrong_number_of_parameters_for_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/wrong_number_of_parameters_for_operator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class WrongNumberOfParametersForOperatorTest extends DriverResolutionTest {
+class WrongNumberOfParametersForOperatorTest extends PubPackageResolutionTest {
   test_binaryOperators() async {
     await _checkTooFewAndTooMany('<');
     await _checkTooFewAndTooMany('>');
diff --git a/pkg/analyzer/test/src/diagnostics/wrong_number_of_parameters_for_setter_test.dart b/pkg/analyzer/test/src/diagnostics/wrong_number_of_parameters_for_setter_test.dart
index 9797798..48d73c1 100644
--- a/pkg/analyzer/test/src/diagnostics/wrong_number_of_parameters_for_setter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/wrong_number_of_parameters_for_setter_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class WrongNumberOfParametersForSetterTest extends DriverResolutionTest {
+class WrongNumberOfParametersForSetterTest extends PubPackageResolutionTest {
   test_correct_number_of_parameters() async {
     await assertNoErrorsInCode(r'''
 class A {
diff --git a/pkg/analyzer/test/src/diagnostics/wrong_number_of_type_arguments_test.dart b/pkg/analyzer/test/src/diagnostics/wrong_number_of_type_arguments_test.dart
index 83954f2..2faef5e 100644
--- a/pkg/analyzer/test/src/diagnostics/wrong_number_of_type_arguments_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/wrong_number_of_type_arguments_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,13 +14,13 @@
 }
 
 @reflectiveTest
-class WrongNumberOfTypeArgumentsTest extends DriverResolutionTest {
+class WrongNumberOfTypeArgumentsTest extends PubPackageResolutionTest {
   test_class_tooFew() async {
     await assertErrorsInCode(r'''
 class A<E, F> {}
 A<A> a = null;
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 17, 4),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 17, 4),
     ]);
   }
 
@@ -29,7 +29,7 @@
 class A<E> {}
 A<A, A> a = null;
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 14, 7),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 14, 7),
     ]);
   }
 
@@ -39,7 +39,7 @@
 class M {}
 class B<F extends num> = A<F> with M;
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 47, 4),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 47, 4),
     ]);
   }
 
@@ -53,7 +53,7 @@
   return const C<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 47, 6),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 47, 6),
     ]);
   }
 
@@ -67,7 +67,7 @@
   return const C<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 53, 6),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 53, 6),
     ]);
   }
 
@@ -81,7 +81,7 @@
   return const C<int, int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 50, 11),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 50, 11),
     ]);
   }
 
@@ -89,7 +89,7 @@
     await assertErrorsInCode(r'''
 dynamic<int> v;
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 0, 12),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 0, 12),
     ]);
   }
 
@@ -101,7 +101,7 @@
   return new C<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 31, 6),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 31, 6),
     ]);
   }
 
@@ -113,7 +113,7 @@
   return new C<int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 37, 6),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 37, 6),
     ]);
   }
 
@@ -125,7 +125,7 @@
   return new C<int, int>();
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 34, 11),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 34, 11),
     ]);
   }
 
@@ -138,7 +138,7 @@
   a.element.anyGetterExistsInDynamic;
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 36, 6),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 36, 6),
     ]);
   }
 
@@ -151,7 +151,7 @@
   a.element.anyGetterExistsInDynamic;
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 33, 10),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 33, 10),
     ]);
   }
 
@@ -161,7 +161,7 @@
   T<int> f;
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 15, 6),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 15, 6),
     ]);
   }
 
@@ -173,7 +173,7 @@
   return p is C<A>;
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 49, 4),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 49, 4),
     ]);
   }
 
@@ -185,7 +185,7 @@
   return p is C<A, A>;
 }
 ''', [
-      error(StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 46, 7),
+      error(CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, 46, 7),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/wrong_type_parameter_variance_in_superinterface_test.dart b/pkg/analyzer/test/src/diagnostics/wrong_type_parameter_variance_in_superinterface_test.dart
index 840791c..71e8ff7 100644
--- a/pkg/analyzer/test/src/diagnostics/wrong_type_parameter_variance_in_superinterface_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/wrong_type_parameter_variance_in_superinterface_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class WrongTypeParameterVarianceInSuperinterfaceTest
-    extends DriverResolutionTest {
+    extends PubPackageResolutionTest {
   test_class_extends_function_parameterType() async {
     await assertErrorsInCode(r'''
 typedef F<X> = void Function(X);
diff --git a/pkg/analyzer/test/src/diagnostics/yield_each_in_non_generator_test.dart b/pkg/analyzer/test/src/diagnostics/yield_each_in_non_generator_test.dart
index 5843555..d17e43c 100644
--- a/pkg/analyzer/test/src/diagnostics/yield_each_in_non_generator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/yield_each_in_non_generator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class YieldEachInNonGeneratorTest extends DriverResolutionTest {
+class YieldEachInNonGeneratorTest extends PubPackageResolutionTest {
   @FailingTest(
       reason: 'We are currently trying to parse the yield statement as a '
           'binary expression.')
diff --git a/pkg/analyzer/test/src/diagnostics/yield_in_non_generator_test.dart b/pkg/analyzer/test/src/diagnostics/yield_in_non_generator_test.dart
index e180713..8f72f46 100644
--- a/pkg/analyzer/test/src/diagnostics/yield_in_non_generator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/yield_in_non_generator_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class YieldInNonGeneratorTest extends DriverResolutionTest {
+class YieldInNonGeneratorTest extends PubPackageResolutionTest {
   @FailingTest(
       reason: 'We are currently trying to parse the yield statement as a '
           'binary expression.')
diff --git a/pkg/analyzer/test/src/diagnostics/yield_of_invalid_type_test.dart b/pkg/analyzer/test/src/diagnostics/yield_of_invalid_type_test.dart
index 8963c73..862460e 100644
--- a/pkg/analyzer/test/src/diagnostics/yield_of_invalid_type_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/yield_of_invalid_type_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -17,7 +15,7 @@
 }
 
 @reflectiveTest
-class YieldOfInvalidTypeTest extends DriverResolutionTest {
+class YieldOfInvalidTypeTest extends PubPackageResolutionTest {
   test_none_asyncStar_dynamic_to_streamInt() async {
     await assertErrorsInCode(
         '''
@@ -29,7 +27,7 @@
 }
 ''',
         expectedErrorsByNullability(nullable: [
-          error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 72, 1),
+          error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 72, 1),
         ], legacy: []));
   }
 
@@ -39,8 +37,8 @@
   yield 0;
 }
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 0, 3),
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 25, 1),
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 0, 3),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 25, 1),
     ]);
   }
 
@@ -58,8 +56,8 @@
   yield 0;
 }
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 0, 13),
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 35, 1),
+      error(CompileTimeErrorCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 0, 13),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 35, 1),
     ]);
   }
 
@@ -91,7 +89,7 @@
   yield 0;
 }
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 58, 1),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 58, 1),
     ]);
   }
 
@@ -112,7 +110,7 @@
 }
 ''',
         expectedErrorsByNullability(nullable: [
-          error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 51, 1),
+          error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 51, 1),
         ], legacy: []));
   }
 
@@ -122,8 +120,8 @@
   yield 0;
 }
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 0, 3),
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 24, 1),
+      error(CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 0, 3),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 24, 1),
     ]);
   }
 
@@ -157,7 +155,7 @@
   yield 0;
 }
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 37, 1),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 37, 1),
     ]);
   }
 
@@ -169,8 +167,8 @@
   yield 0;
 }
 ''', [
-      error(StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 22, 11),
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 54, 1),
+      error(CompileTimeErrorCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, 22, 11),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 54, 1),
     ]);
   }
 
@@ -222,7 +220,7 @@
   yield* 0;
 }
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 22, 1),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 22, 1),
     ]);
   }
 
@@ -233,7 +231,7 @@
   yield* a;
 }
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 41, 1),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 41, 1),
     ]);
   }
 
@@ -246,7 +244,7 @@
   yield* a;
 }
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 75, 1),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 75, 1),
     ]);
   }
 
@@ -259,7 +257,7 @@
   yield* a;
 }
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 78, 1),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 78, 1),
     ]);
   }
 
@@ -287,7 +285,7 @@
 Stream g() => throw 0;
 ''',
         expectedErrorsByNullability(nullable: [
-          error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 56, 3),
+          error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 56, 3),
         ], legacy: []));
   }
 
@@ -325,7 +323,7 @@
 
 Stream<String> g() => throw 0;
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 56, 3),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 56, 3),
     ]);
   }
 
@@ -365,7 +363,7 @@
   yield* 0;
 }
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 21, 1),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 21, 1),
     ]);
   }
 
@@ -378,7 +376,7 @@
   f;
 }
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 41, 1),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 41, 1),
     ]);
   }
 
@@ -402,7 +400,7 @@
 Iterable g() => throw 0;
 ''',
         expectedErrorsByNullability(nullable: [
-          error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 35, 3),
+          error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 35, 3),
         ], legacy: []));
   }
 
@@ -434,18 +432,11 @@
 
 Iterable<String> g() => throw 0;
 ''', [
-      error(StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, 35, 3),
+      error(CompileTimeErrorCode.YIELD_OF_INVALID_TYPE, 35, 3),
     ]);
   }
 }
 
 @reflectiveTest
-class YieldOfInvalidTypeTest2 extends YieldOfInvalidTypeTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.forTesting(
-        sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
-
-  @override
-  bool get typeToStringWithNullability => true;
-}
+class YieldOfInvalidTypeTest2 extends YieldOfInvalidTypeTest
+    with WithNullSafetyMixin {}
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/top_level_variable_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/top_level_variable_test.dart
index e57c5c8..2d817a4 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/top_level_variable_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/top_level_variable_test.dart
@@ -134,7 +134,7 @@
               'setter'
             ],
             expectedErrorsInValidCode: [
-              StaticWarningCode.FINAL_NOT_INITIALIZED
+              CompileTimeErrorCode.FINAL_NOT_INITIALIZED
             ],
           ),
           TestDescriptor(
@@ -142,12 +142,12 @@
             'final a',
             [
               ParserErrorCode.EXPECTED_TOKEN,
-              StaticWarningCode.FINAL_NOT_INITIALIZED
+              CompileTimeErrorCode.FINAL_NOT_INITIALIZED
             ],
             "final a;",
             failing: ['functionNonVoid', 'getter', 'setter', 'mixin'],
             expectedErrorsInValidCode: [
-              StaticWarningCode.FINAL_NOT_INITIALIZED
+              CompileTimeErrorCode.FINAL_NOT_INITIALIZED
             ],
           ),
           TestDescriptor(
@@ -155,11 +155,11 @@
             'final int a',
             [
               ParserErrorCode.EXPECTED_TOKEN,
-              StaticWarningCode.FINAL_NOT_INITIALIZED
+              CompileTimeErrorCode.FINAL_NOT_INITIALIZED
             ],
             "final int a;",
             expectedErrorsInValidCode: [
-              StaticWarningCode.FINAL_NOT_INITIALIZED
+              CompileTimeErrorCode.FINAL_NOT_INITIALIZED
             ],
           ),
           TestDescriptor(
diff --git a/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart b/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
index 01364df..194fe57 100644
--- a/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
+++ b/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
@@ -11,7 +11,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../dart/resolution/driver_resolution.dart';
+import '../../dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -24,7 +24,7 @@
 }
 
 @reflectiveTest
-abstract class AbstractLinterContextTest extends DriverResolutionTest {
+abstract class AbstractLinterContextTest extends PubPackageResolutionTest {
   LinterContextImpl context;
 
   Future<void> resolve(String content) async {
@@ -246,7 +246,7 @@
   }
 
   void test_true_computeDependencies() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const a = 0;
 ''');
 
@@ -286,7 +286,7 @@
   }
 
   void test_true_importedClass_defaultValue() async {
-    var aPath = convertPath('/test/lib/a.dart');
+    var aPath = convertPath('$testPackageLibPath/a.dart');
     newFile(aPath, content: r'''
 class A {
   final int a;
@@ -329,7 +329,7 @@
   }
 
   void test_listLiteral_true_computeDependencies() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 const a = 0;
 ''');
 
@@ -463,7 +463,7 @@
 @reflectiveTest
 class PubDependencyTest extends AbstractLinterContextTest {
   test_dependencies() async {
-    newFile('/test/pubspec.yaml', content: '''
+    newFile('$testPackageRootPath/pubspec.yaml', content: '''
 name: test
 
 dependencies:
diff --git a/pkg/analyzer/test/src/lint/linter/resolve_name_in_scope_test.dart b/pkg/analyzer/test/src/lint/linter/resolve_name_in_scope_test.dart
index 3aa45e2..8ad3449 100644
--- a/pkg/analyzer/test/src/lint/linter/resolve_name_in_scope_test.dart
+++ b/pkg/analyzer/test/src/lint/linter/resolve_name_in_scope_test.dart
@@ -48,7 +48,7 @@
   }
 
   test_class_getter_different_importScope() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 set foo(int _) {}
 ''');
     await resolve('''
@@ -86,7 +86,7 @@
   }
 
   test_class_getter_requested_importScope() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 int get foo => 0;
 ''');
     await resolve('''
@@ -246,7 +246,7 @@
   }
 
   test_class_method_requested_importScope() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 void foo() {}
 ''');
     await resolve('''
@@ -490,7 +490,7 @@
   }
 
   test_class_setter_requested_importScope() async {
-    newFile('/test/lib/a.dart', content: r'''
+    newFile('$testPackageLibPath/a.dart', content: r'''
 set foo(int _) {}
 ''');
     await resolve('''
diff --git a/pkg/analyzer/test/src/services/available_declarations_test.dart b/pkg/analyzer/test/src/services/available_declarations_test.dart
index f179e21..e21ccd8 100644
--- a/pkg/analyzer/test/src/services/available_declarations_test.dart
+++ b/pkg/analyzer/test/src/services/available_declarations_test.dart
@@ -500,7 +500,7 @@
       ),
       'A',
       DeclarationKind.CLASS,
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::A'],
     );
 
     newFile(filePath, content: 'class B {}');
@@ -515,7 +515,7 @@
       ),
       'B',
       DeclarationKind.CLASS,
-      relevanceTags: ['package:test/test.dart::B'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::B'],
     );
   }
 
@@ -550,7 +550,7 @@
       ),
       'A',
       DeclarationKind.CLASS,
-      relevanceTags: ['package:aaa/a.dart::A'],
+      relevanceTags: ['ElementKind.CLASS', 'package:aaa/a.dart::A'],
     );
 
     newFile(filePath, content: 'class B {}');
@@ -565,7 +565,7 @@
       ),
       'B',
       DeclarationKind.CLASS,
-      relevanceTags: ['package:aaa/a.dart::B'],
+      relevanceTags: ['ElementKind.CLASS', 'package:aaa/a.dart::B'],
     );
   }
 
@@ -587,7 +587,7 @@
       ),
       'A',
       DeclarationKind.CLASS,
-      relevanceTags: ['dart:math::A'],
+      relevanceTags: ['ElementKind.CLASS', 'dart:math::A'],
     );
 
     newFile(filePath, content: 'class B {}');
@@ -602,7 +602,7 @@
       ),
       'B',
       DeclarationKind.CLASS,
-      relevanceTags: ['dart:math::B'],
+      relevanceTags: ['ElementKind.CLASS', 'dart:math::B'],
     );
   }
 
@@ -1129,21 +1129,21 @@
       _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.CLASS,
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::A'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.CLASS,
       isAbstract: true,
-      relevanceTags: ['package:test/test.dart::B'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::B'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'C'),
       'C',
       DeclarationKind.CLASS,
       isDeprecated: true,
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::C'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'D'),
@@ -1151,7 +1151,7 @@
       DeclarationKind.CLASS,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb\nccc ccc',
-      relevanceTags: ['package:test/test.dart::D'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::D'],
     );
   }
 
@@ -1192,7 +1192,7 @@
       'f1',
       DeclarationKind.FIELD,
       isStatic: true,
-      relevanceTags: ['dart:core::int'],
+      relevanceTags: ['ElementKind.FIELD', 'dart:core::int'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -1201,7 +1201,7 @@
       DeclarationKind.FIELD,
       isFinal: true,
       isStatic: true,
-      relevanceTags: ['dart:core::int'],
+      relevanceTags: ['ElementKind.FIELD', 'dart:core::int'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -1210,14 +1210,18 @@
       DeclarationKind.FIELD,
       isConst: true,
       isStatic: true,
-      relevanceTags: ['dart:core::int', 'isConst'],
+      relevanceTags: [
+        'ElementKind.FIELD',
+        'ElementKind.FIELD+const',
+        'dart:core::int',
+      ],
       returnType: 'int',
     );
     _assertDeclaration(
       _getDeclaration(classDeclaration.children, 'f4'),
       'f4',
       DeclarationKind.FIELD,
-      relevanceTags: ['dart:core::int'],
+      relevanceTags: ['ElementKind.FIELD', 'dart:core::int'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -1225,7 +1229,7 @@
       'f5',
       DeclarationKind.FIELD,
       isFinal: true,
-      relevanceTags: ['dart:core::int'],
+      relevanceTags: ['ElementKind.FIELD', 'dart:core::int'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -1233,7 +1237,7 @@
       'f6',
       DeclarationKind.FIELD,
       isDeprecated: true,
-      relevanceTags: ['dart:core::int'],
+      relevanceTags: ['ElementKind.FIELD', 'dart:core::int'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -1242,7 +1246,7 @@
       DeclarationKind.FIELD,
       isDeprecated: true,
       isFinal: true,
-      relevanceTags: ['dart:core::int'],
+      relevanceTags: ['ElementKind.FIELD', 'dart:core::int'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -1251,7 +1255,7 @@
       DeclarationKind.FIELD,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb',
-      relevanceTags: ['dart:core::int'],
+      relevanceTags: ['ElementKind.FIELD', 'dart:core::int'],
       returnType: 'int',
     );
   }
@@ -1284,12 +1288,14 @@
       'g1',
       DeclarationKind.GETTER,
       isStatic: true,
+      relevanceTags: ['ElementKind.FIELD'],
       returnType: 'int',
     );
     _assertDeclaration(
       _getDeclaration(classDeclaration.children, 'g2'),
       'g2',
       DeclarationKind.GETTER,
+      relevanceTags: ['ElementKind.FIELD'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -1297,6 +1303,7 @@
       'g3',
       DeclarationKind.GETTER,
       isDeprecated: true,
+      relevanceTags: ['ElementKind.FIELD'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -1305,6 +1312,7 @@
       DeclarationKind.GETTER,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb',
+      relevanceTags: ['ElementKind.FIELD'],
       returnType: 'int',
     );
   }
@@ -1342,6 +1350,7 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
+      relevanceTags: ['ElementKind.METHOD'],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1352,6 +1361,7 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
+      relevanceTags: ['ElementKind.METHOD'],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1364,6 +1374,7 @@
       parameters: '(int a)',
       parameterNames: ['a'],
       parameterTypes: ['int'],
+      relevanceTags: ['ElementKind.METHOD'],
       requiredParameterCount: 1,
       returnType: 'void',
     );
@@ -1375,6 +1386,7 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
+      relevanceTags: ['ElementKind.METHOD'],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1387,6 +1399,7 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
+      relevanceTags: ['ElementKind.METHOD'],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1423,6 +1436,7 @@
       parameters: '(int value)',
       parameterNames: ['value'],
       parameterTypes: ['int'],
+      relevanceTags: ['ElementKind.FIELD'],
       requiredParameterCount: 1,
     );
     _assertDeclaration(
@@ -1432,6 +1446,7 @@
       parameters: '(int value)',
       parameterNames: ['value'],
       parameterTypes: ['int'],
+      relevanceTags: ['ElementKind.FIELD'],
       requiredParameterCount: 1,
     );
     _assertDeclaration(
@@ -1442,6 +1457,7 @@
       parameters: '(int value)',
       parameterNames: ['value'],
       parameterTypes: ['int'],
+      relevanceTags: ['ElementKind.FIELD'],
       requiredParameterCount: 1,
     );
     _assertDeclaration(
@@ -1453,6 +1469,7 @@
       parameters: '(int value)',
       parameterNames: ['value'],
       parameterTypes: ['int'],
+      relevanceTags: ['ElementKind.FIELD'],
       requiredParameterCount: 1,
     );
   }
@@ -1480,14 +1497,14 @@
       _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.CLASS_TYPE_ALIAS,
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::A'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.CLASS_TYPE_ALIAS,
       isDeprecated: true,
-      relevanceTags: ['package:test/test.dart::B'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::B'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'C'),
@@ -1495,7 +1512,7 @@
       DeclarationKind.CLASS_TYPE_ALIAS,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb',
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::C'],
     );
   }
 
@@ -1536,7 +1553,7 @@
       parameterNames: [],
       parameters: '()',
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.CONSTRUCTOR', 'package:test/test.dart::C'],
       requiredParameterCount: 0,
       returnType: 'C',
     );
@@ -1547,7 +1564,7 @@
       parameterNames: [],
       parameters: '()',
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.CONSTRUCTOR', 'package:test/test.dart::C'],
       requiredParameterCount: 0,
       returnType: 'C',
     );
@@ -1559,7 +1576,7 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.CONSTRUCTOR', 'package:test/test.dart::C'],
       requiredParameterCount: 0,
       returnType: 'C',
     );
@@ -1572,7 +1589,7 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.CONSTRUCTOR', 'package:test/test.dart::C'],
       requiredParameterCount: 0,
       returnType: 'C',
     );
@@ -1585,7 +1602,7 @@
       parameters: '(Map<String, int> p1, int p2, {double p3})',
       parameterNames: ['p1', 'p2', 'p3'],
       parameterTypes: ['Map<String, int>', 'int', 'double'],
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.CONSTRUCTOR', 'package:test/test.dart::C'],
       requiredParameterCount: 2,
       returnType: 'C',
     );
@@ -1598,7 +1615,7 @@
       parameters: '(this.f1, this.f2)',
       parameterNames: ['f1', 'f2'],
       parameterTypes: ['', ''],
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.CONSTRUCTOR', 'package:test/test.dart::C'],
       requiredParameterCount: 2,
       returnType: 'C',
     );
@@ -1625,14 +1642,14 @@
       _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.ENUM,
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: ['ElementKind.ENUM', 'package:test/test.dart::A'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.ENUM,
       isDeprecated: true,
-      relevanceTags: ['package:test/test.dart::B'],
+      relevanceTags: ['ElementKind.ENUM', 'package:test/test.dart::B'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'C'),
@@ -1640,7 +1657,7 @@
       DeclarationKind.ENUM,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb',
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.ENUM', 'package:test/test.dart::C'],
     );
   }
 
@@ -1669,14 +1686,22 @@
       _getDeclaration(enumDeclaration.children, 'a'),
       'a',
       DeclarationKind.ENUM_CONSTANT,
-      relevanceTags: ['package:test/test.dart::MyEnum'],
+      relevanceTags: [
+        'ElementKind.ENUM_CONSTANT',
+        'ElementKind.ENUM_CONSTANT+const',
+        'package:test/test.dart::MyEnum'
+      ],
     );
     _assertDeclaration(
       _getDeclaration(enumDeclaration.children, 'b'),
       'b',
       DeclarationKind.ENUM_CONSTANT,
       isDeprecated: true,
-      relevanceTags: ['package:test/test.dart::MyEnum'],
+      relevanceTags: [
+        'ElementKind.ENUM_CONSTANT',
+        'ElementKind.ENUM_CONSTANT+const',
+        'package:test/test.dart::MyEnum'
+      ],
     );
     _assertDeclaration(
       _getDeclaration(enumDeclaration.children, 'c'),
@@ -1684,7 +1709,11 @@
       DeclarationKind.ENUM_CONSTANT,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb',
-      relevanceTags: ['package:test/test.dart::MyEnum'],
+      relevanceTags: [
+        'ElementKind.ENUM_CONSTANT',
+        'ElementKind.ENUM_CONSTANT+const',
+        'package:test/test.dart::MyEnum'
+      ],
     );
   }
 
@@ -1713,12 +1742,14 @@
       _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.EXTENSION,
+      relevanceTags: ['ElementKind.EXTENSION'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.EXTENSION,
       isDeprecated: true,
+      relevanceTags: ['ElementKind.EXTENSION'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'C'),
@@ -1726,6 +1757,7 @@
       DeclarationKind.EXTENSION,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb\nccc ccc',
+      relevanceTags: ['ElementKind.EXTENSION'],
     );
   }
 
@@ -1757,6 +1789,7 @@
       parameterNames: [],
       parameters: '()',
       parameterTypes: [],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1768,6 +1801,7 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1780,6 +1814,7 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1792,6 +1827,7 @@
       parameters: '(Map<String, int> p1, int p2, {double p3})',
       parameterNames: ['p1', 'p2', 'p3'],
       parameterTypes: ['Map<String, int>', 'int', 'double'],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 2,
       returnType: 'List<String>',
     );
@@ -1802,6 +1838,7 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 0,
       returnType: 'void',
       typeParameters: '<T extends num, U>',
@@ -1830,6 +1867,7 @@
       parameterNames: [],
       parameters: '()',
       parameterTypes: [],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1842,6 +1880,7 @@
       parameters: '(int a, double bb, String ccc)',
       parameterNames: ['a', 'bb', 'ccc'],
       parameterTypes: ['int', 'double', 'String'],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 3,
       returnType: 'void',
     );
@@ -1854,6 +1893,7 @@
       parameters: '(int a, [double b, String c])',
       parameterNames: ['a', 'b', 'c'],
       parameterTypes: ['int', 'double', 'String'],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 1,
       returnType: 'void',
     );
@@ -1866,6 +1906,7 @@
       parameters: '(int a, {int b, @required int c, @required int d, int e})',
       parameterNames: ['a', 'b', 'c', 'd', 'e'],
       parameterTypes: ['int', 'int', 'int', 'int', 'int'],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 1,
       returnType: 'void',
     );
@@ -1901,7 +1942,10 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::A'
+      ],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1913,7 +1957,10 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::B'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::B'
+      ],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1926,7 +1973,10 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::C'
+      ],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -1937,7 +1987,10 @@
       parameters: '(int p1, [double p2, String p3])',
       parameterNames: ['p1', 'p2', 'p3'],
       parameterTypes: ['int', 'double', 'String'],
-      relevanceTags: ['package:test/test.dart::D'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::D'
+      ],
       requiredParameterCount: 1,
       returnType: 'int',
     );
@@ -1948,7 +2001,10 @@
       parameters: '(int, double, {String p3})',
       parameterNames: ['', '', 'p3'],
       parameterTypes: ['int', 'double', 'String'],
-      relevanceTags: ['package:test/test.dart::E'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::E'
+      ],
       requiredParameterCount: 2,
       returnType: 'void',
     );
@@ -1960,7 +2016,10 @@
       parameterNames: [],
       parameterTypes: [],
       requiredParameterCount: 0,
-      relevanceTags: ['package:test/test.dart::F'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::F'
+      ],
       returnType: 'void',
       typeParameters: '<T extends num, U>',
     );
@@ -2008,7 +2067,10 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::A'
+      ],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -2020,7 +2082,10 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::B'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::B'
+      ],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -2033,7 +2098,10 @@
       parameters: '()',
       parameterNames: [],
       parameterTypes: [],
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::C'
+      ],
       requiredParameterCount: 0,
       returnType: 'void',
     );
@@ -2044,7 +2112,10 @@
       parameters: '(int p1, [double p2, String p3])',
       parameterNames: ['p1', 'p2', 'p3'],
       parameterTypes: ['int', 'double', 'String'],
-      relevanceTags: ['package:test/test.dart::D'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::D'
+      ],
       requiredParameterCount: 1,
       returnType: 'int',
     );
@@ -2055,7 +2126,10 @@
       parameters: '(int p1, double p2, {String p3})',
       parameterNames: ['p1', 'p2', 'p3'],
       parameterTypes: ['int', 'double', 'String'],
-      relevanceTags: ['package:test/test.dart::E'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::E'
+      ],
       requiredParameterCount: 2,
       returnType: 'void',
     );
@@ -2067,7 +2141,10 @@
       parameterNames: [],
       parameterTypes: [],
       requiredParameterCount: 0,
-      relevanceTags: ['package:test/test.dart::F'],
+      relevanceTags: [
+        'ElementKind.FUNCTION_TYPE_ALIAS',
+        'package:test/test.dart::F'
+      ],
       returnType: 'void',
       typeParameters: '<T extends num, U>',
     );
@@ -2094,6 +2171,7 @@
       _getDeclaration(library.declarations, 'a'),
       'a',
       DeclarationKind.GETTER,
+      relevanceTags: ['ElementKind.FUNCTION'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -2101,6 +2179,7 @@
       'b',
       DeclarationKind.GETTER,
       isDeprecated: true,
+      relevanceTags: ['ElementKind.FUNCTION'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -2109,6 +2188,7 @@
       DeclarationKind.GETTER,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb',
+      relevanceTags: ['ElementKind.FUNCTION'],
       returnType: 'int',
     );
   }
@@ -2147,7 +2227,7 @@
       _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.CLASS,
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::A'],
     );
   }
 
@@ -2166,7 +2246,7 @@
       _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.CLASS,
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::A'],
     );
   }
 
@@ -2268,7 +2348,7 @@
       locationPath: testPath,
       locationStartColumn: 7,
       locationStartLine: 1,
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::A'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'B'),
@@ -2278,7 +2358,7 @@
       locationPath: testPath,
       locationStartColumn: 7,
       locationStartLine: 3,
-      relevanceTags: ['package:test/test.dart::B'],
+      relevanceTags: ['ElementKind.CLASS', 'package:test/test.dart::B'],
     );
   }
 
@@ -2304,14 +2384,14 @@
       _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.MIXIN,
-      relevanceTags: ['package:test/test.dart::A'],
+      relevanceTags: ['ElementKind.MIXIN', 'package:test/test.dart::A'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.MIXIN,
       isDeprecated: true,
-      relevanceTags: ['package:test/test.dart::B'],
+      relevanceTags: ['ElementKind.MIXIN', 'package:test/test.dart::B'],
     );
     _assertDeclaration(
       _getDeclaration(library.declarations, 'C'),
@@ -2319,7 +2399,7 @@
       DeclarationKind.MIXIN,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb\nccc ccc',
-      relevanceTags: ['package:test/test.dart::C'],
+      relevanceTags: ['ElementKind.MIXIN', 'package:test/test.dart::C'],
     );
   }
 
@@ -2347,6 +2427,7 @@
       parameters: '(int value)',
       parameterNames: ['value'],
       parameterTypes: ['int'],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 1,
     );
     _assertDeclaration(
@@ -2357,6 +2438,7 @@
       parameters: '(int value)',
       parameterNames: ['value'],
       parameterTypes: ['int'],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 1,
     );
     _assertDeclaration(
@@ -2368,6 +2450,7 @@
       parameters: '(int value)',
       parameterNames: ['value'],
       parameterTypes: ['int'],
+      relevanceTags: ['ElementKind.FUNCTION'],
       requiredParameterCount: 1,
     );
   }
@@ -2397,6 +2480,7 @@
       _getDeclaration(library.declarations, 'a'),
       'a',
       DeclarationKind.VARIABLE,
+      relevanceTags: ['ElementKind.TOP_LEVEL_VARIABLE'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -2404,6 +2488,7 @@
       'b',
       DeclarationKind.VARIABLE,
       isDeprecated: true,
+      relevanceTags: ['ElementKind.TOP_LEVEL_VARIABLE'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -2412,6 +2497,7 @@
       DeclarationKind.VARIABLE,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb',
+      relevanceTags: ['ElementKind.TOP_LEVEL_VARIABLE'],
       returnType: 'int',
     );
     _assertDeclaration(
@@ -2419,7 +2505,11 @@
       'd',
       DeclarationKind.VARIABLE,
       isConst: true,
-      relevanceTags: ['dart:core::int', 'isConst'],
+      relevanceTags: [
+        'ElementKind.TOP_LEVEL_VARIABLE',
+        'ElementKind.TOP_LEVEL_VARIABLE+const',
+        'dart:core::int',
+      ],
       returnType: '',
     );
     _assertDeclaration(
@@ -2427,7 +2517,7 @@
       'e',
       DeclarationKind.VARIABLE,
       isFinal: true,
-      relevanceTags: ['dart:core::double'],
+      relevanceTags: ['ElementKind.TOP_LEVEL_VARIABLE', 'dart:core::double'],
       returnType: 'double',
     );
   }
@@ -2435,6 +2525,20 @@
 
 @reflectiveTest
 class ExportTest extends _Base {
+  test_classTypeAlias() async {
+    newFile('/home/test/lib/test.dart', content: r'''
+mixin M {}
+class A = Object with M;
+''');
+    tracker.addContext(testAnalysisContext);
+
+    await _doAllTrackerWork();
+    _assertHasLibrary('package:test/test.dart', declarations: [
+      _ExpectedDeclaration.mixin('M'),
+      _ExpectedDeclaration.classTypeAlias('A'),
+    ]);
+  }
+
   test_combinators_hide() async {
     newFile('/home/test/lib/a.dart', content: r'''
 class A {}
@@ -2570,6 +2674,32 @@
     ]);
   }
 
+  test_function() async {
+    newFile('/home/test/lib/test.dart', content: r'''
+int foo() => 0;
+int bar() => 0;
+''');
+    tracker.addContext(testAnalysisContext);
+
+    await _doAllTrackerWork();
+    _assertHasLibrary('package:test/test.dart', declarations: [
+      _ExpectedDeclaration.function('foo'),
+      _ExpectedDeclaration.function('bar'),
+    ]);
+  }
+
+  test_functionTypeAlias() async {
+    newFile('/home/test/lib/test.dart', content: r'''
+typedef F = int Function();
+''');
+    tracker.addContext(testAnalysisContext);
+
+    await _doAllTrackerWork();
+    _assertHasLibrary('package:test/test.dart', declarations: [
+      _ExpectedDeclaration.functionTypeAlias('F'),
+    ]);
+  }
+
   test_missing() async {
     newFile('/home/test/lib/test.dart', content: r'''
 export 'a.dart';
@@ -2674,6 +2804,18 @@
       ]),
     ]);
   }
+
+  test_variable() async {
+    newFile('/home/test/lib/test.dart', content: r'''
+int foo = 0;
+''');
+    tracker.addContext(testAnalysisContext);
+
+    await _doAllTrackerWork();
+    _assertHasLibrary('package:test/test.dart', declarations: [
+      _ExpectedDeclaration.variable('foo'),
+    ]);
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index 951af04..b630645 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -965,6 +965,7 @@
 
       writeIf(e.isSynthetic, 'synthetic ');
       writeIf(e.isStatic, 'static ');
+      writeIf(e is FieldElementImpl && e.isAbstract, 'abstract ');
       writeIf(e is FieldElementImpl && e.isCovariant, 'covariant ');
     } else {
       writeDocumentation(e);
diff --git a/pkg/analyzer/test/src/summary/resolved_ast_printer.dart b/pkg/analyzer/test/src/summary/resolved_ast_printer.dart
index 20384ca..70960ee 100644
--- a/pkg/analyzer/test/src/summary/resolved_ast_printer.dart
+++ b/pkg/analyzer/test/src/summary/resolved_ast_printer.dart
@@ -497,6 +497,7 @@
     _writeln('FieldDeclaration');
     _withIndent(() {
       var properties = _Properties();
+      properties.addToken('abstractKeyword', node.abstractKeyword);
       properties.addToken('covariantKeyword', node.covariantKeyword);
       properties.addNode('fields', node.fields);
       properties.addToken('semicolon', node.semicolon);
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
index 5e594b8..7b6be4a 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
@@ -4,10 +4,12 @@
 
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/null_safety_understanding_flag.dart';
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/element/class_hierarchy.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/idl.dart';
@@ -108,9 +110,13 @@
       LinkedBundleContext(elementFactory, sdkBundle),
     );
 
-    var linkResult = link(
-      elementFactory,
-      inputLibraries,
+    var linkResult = NullSafetyUnderstandingFlag.enableNullSafetyTypes(
+      () {
+        return link(
+          elementFactory,
+          inputLibraries,
+        );
+      },
     );
 
     elementFactory.addBundle(
@@ -221,5 +227,8 @@
   final ClassHierarchy classHierarchy = ClassHierarchy();
 
   @override
+  InheritanceManager3 inheritanceManager = InheritanceManager3();
+
+  @override
   noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 0380e45..5c26d58 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -16,6 +16,7 @@
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'element_text.dart';
 import 'test_strategies.dart';
@@ -1684,6 +1685,30 @@
 ''');
   }
 
+  test_class_type_parameters_cycle_1of1() async {
+    var library = await checkLibrary('class C<T extends T> {}');
+    checkElementText(
+        library,
+        r'''
+notSimplyBounded class C<T extends dynamic> {
+}
+''',
+        withTypes: true);
+  }
+
+  test_class_type_parameters_cycle_2of3() async {
+    var library = await checkLibrary(r'''
+class C<T extends V, U, V extends T> {}
+''');
+    checkElementText(
+        library,
+        r'''
+notSimplyBounded class C<T extends dynamic, U, V extends dynamic> {
+}
+''',
+        withTypes: true);
+  }
+
   test_class_type_parameters_f_bound_complex() async {
     var library = await checkLibrary('class C<T extends List<U>, U> {}');
     checkElementText(library, r'''
@@ -6037,6 +6062,20 @@
 ''');
   }
 
+  test_field_abstract() async {
+    featureSet = enableNnbd;
+    var library = await checkLibrary('''
+abstract class C {
+  abstract int i;
+}
+''');
+    checkElementText(library, '''
+abstract class C {
+  abstract int i;
+}
+''');
+  }
+
   test_field_covariant() async {
     var library = await checkLibrary('''
 class C {
@@ -9348,6 +9387,93 @@
 ''');
   }
 
+  test_mixin_inference_legacy() async {
+    var library = await checkLibrary(r'''
+class A<T> {}
+mixin M<U> on A<U> {}
+class B extends A<int> with M {}
+''');
+    checkElementText(
+        library,
+        r'''
+class A<T> {
+}
+class B extends A<int*>* with M<int*>* {
+  synthetic B();
+}
+mixin M<U> on A<U*>* {
+}
+''',
+        annotateNullability: true);
+  }
+
+  test_mixin_inference_nullSafety() async {
+    featureSet = enableNnbd;
+    var library = await checkLibrary(r'''
+class A<T> {}
+mixin M<U> on A<U> {}
+class B extends A<int> with M {}
+''');
+    checkElementText(
+        library,
+        r'''
+class A<T> {
+}
+class B extends A<int> with M<int> {
+  synthetic B();
+}
+mixin M<U> on A<U> {
+}
+''',
+        annotateNullability: true);
+  }
+
+  test_mixin_inference_nullSafety_mixed_inOrder() async {
+    featureSet = enableNnbd;
+    addLibrarySource('/a.dart', r'''
+class A<T> {}
+mixin M<U> on A<U> {}
+''');
+    var library = await checkLibrary(r'''
+// @dart = 2.8
+import 'a.dart';
+class B extends A<int> with M {}
+''');
+    checkElementText(
+        library,
+        r'''
+import 'a.dart';
+class B extends A<int*>* with M<int*>* {
+  synthetic B();
+}
+''',
+        annotateNullability: true);
+  }
+
+  @FailingTest(reason: 'Out-of-order inference is not specified yet')
+  test_mixin_inference_nullSafety_mixed_outOfOrder() async {
+    featureSet = enableNnbd;
+    addLibrarySource('/a.dart', r'''
+// @dart = 2.8
+class A<T> {}
+mixin M<U> on A<U> {}
+''');
+    var library = await checkLibrary(r'''
+import 'a.dart';
+
+class B extends A<int> with M {}
+''');
+    checkElementText(
+        library,
+        r'''
+import 'a.dart';
+class B extends A<int> with M<int> {
+  synthetic B();
+}
+''',
+        annotateNullability: true);
+  }
+
   test_mixin_method_namedAsConstraint() async {
     var library = await checkLibrary(r'''
 class A {}
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 577c790..1d3f695 100644
--- a/pkg/analyzer/test/src/summary/top_level_inference_test.dart
+++ b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
@@ -7,11 +7,12 @@
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../dart/analysis/base.dart';
-import '../task/strong/strong_test_helper.dart';
+import '../dart/resolution/context_collection_resolution.dart';
 import 'element_text.dart';
 
 main() {
@@ -31,26 +32,24 @@
 }
 
 @reflectiveTest
-class TopLevelInferenceErrorsTest extends AbstractStrongTest {
+class TopLevelInferenceErrorsTest extends PubPackageResolutionTest {
   test_initializer_additive() async {
     await _assertErrorOnlyLeft(['+', '-']);
   }
 
   test_initializer_assign() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t1 = a += 1;
 var t2 = a = 2;
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_binary_onlyLeft() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t = (a = 1) + (a = 2);
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_bitwise() async {
@@ -58,116 +57,107 @@
   }
 
   test_initializer_boolean() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t1 = ((a = 1) == 0) || ((a = 2) == 0);
 var t2 = ((a = 1) == 0) && ((a = 2) == 0);
 var t3 = !((a = 1) == 0);
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_cascade() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 0;
 var t = (a = 1)..isEven;
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_classField_instance_instanceCreation() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 class A<T> {}
 class B {
   var t1 = new A<int>();
   var t2 = new A();
 }
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_classField_static_instanceCreation() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 class A<T> {}
 class B {
   static var t1 = 1;
   static var t2 = new A();
 }
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_conditional() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var b = true;
-var t = b ?
-          (a = 1) :
-          (a = 2);
-''';
-    await checkFile(content);
+var t = b
+    ? (a = 1)
+    : (a = 2);
+''');
   }
 
   test_initializer_dependencyCycle() async {
-    var content = r'''
-var a = /*error:TOP_LEVEL_CYCLE*/b;
-var b = /*error:TOP_LEVEL_CYCLE*/a;
-''';
-    await checkFile(content);
+    await assertErrorsInCode('''
+var a = b;
+var b = a;
+''', [
+      error(CompileTimeErrorCode.TOP_LEVEL_CYCLE, 8, 1),
+      error(CompileTimeErrorCode.TOP_LEVEL_CYCLE, 19, 1),
+    ]);
   }
 
   test_initializer_equality() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t1 = ((a = 1) == 0) == ((a = 2) == 0);
 var t2 = ((a = 1) == 0) != ((a = 2) == 0);
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_extractIndex() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = [0, 1.2];
 var b0 = a[0];
 var b1 = a[1];
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_functionLiteral_blockBody() async {
-    var content = r'''
-var t = /*error:TOP_LEVEL_FUNCTION_LITERAL_BLOCK*/
-        
-        (int p) {};
-''';
-    await checkFile(content);
+    await assertErrorsInCode('''
+var t = (int p) {};
+''', [
+      error(StrongModeCode.TOP_LEVEL_FUNCTION_LITERAL_BLOCK, 8, 10),
+    ]);
   }
 
   test_initializer_functionLiteral_expressionBody() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 0;
 var t = (int p) => (a = 1);
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_functionLiteral_parameters_withoutType() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var t = (int a, b,int c, d) => 0;
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_hasTypeAnnotation() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 int t = (a = 1);
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_identifier() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 int top_function() => 0;
 var top_variable = 0;
 int get top_getter => 0;
@@ -184,67 +174,60 @@
 var t5 = A.static_getter;
 var t6 = A.static_method;
 var t7 = new A().instance_method;
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_identifier_error() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 0;
 var b = (a = 1);
 var c = b;
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_ifNull() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t = a ?? 2;
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_instanceCreation_withoutTypeParameters() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 class A {}
 var t = new A();
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_instanceCreation_withTypeParameters() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 class A<T> {}
 var t1 = new A<int>();
 var t2 = new A();
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_instanceGetter() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 class A {
   int f = 1;
 }
 var a = new A().f;
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_methodInvocation_function() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 int f1() => null;
 T f2<T>() => null;
 var t1 = f1();
 var t2 = f2();
 var t3 = f2<int>();
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_methodInvocation_method() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 class A {
   int m1() => null;
   T m2<T>() => null;
@@ -253,8 +236,7 @@
 var t1 = a.m1();
 var t2 = a.m2();
 var t3 = a.m2<int>();
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_multiplicative() async {
@@ -262,21 +244,19 @@
   }
 
   test_initializer_postfixIncDec() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t1 = a++;
 var t2 = a--;
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_prefixIncDec() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t1 = ++a;
 var t2 = --a;
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_relational() async {
@@ -288,43 +268,42 @@
   }
 
   test_initializer_typedList() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t = <int>[a = 1];
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_typedMap() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t = <int, int>{(a = 1) : (a = 2)};
-''';
-    await checkFile(content);
+''');
   }
 
   test_initializer_untypedList() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t = [
-            a = 1,
-            2, 3];
-''';
-    await checkFile(content);
+    a = 1,
+    2,
+    3,
+];
+''');
   }
 
   test_initializer_untypedMap() async {
-    var content = r'''
+    await assertNoErrorsInCode('''
 var a = 1;
 var t = {
-            (a = 1) :
-            (a = 2)};
-''';
-    await checkFile(content);
+    (a = 1) :
+        (a = 2),
+};
+''');
   }
 
   test_override_conflictFieldType() async {
-    var content = r'''
+    await assertErrorsInCode('''
 abstract class A {
   int aaa;
 }
@@ -332,15 +311,16 @@
   String aaa;
 }
 class C implements A, B {
-  var /*error:INVALID_OVERRIDE,error:INVALID_OVERRIDE*/aaa;
+  var aaa;
 }
-''';
-    await checkFile(content);
+''', [
+      error(CompileTimeErrorCode.INVALID_OVERRIDE, 99, 3),
+      error(CompileTimeErrorCode.INVALID_OVERRIDE, 99, 3),
+    ]);
   }
 
-  @failingTest
   test_override_conflictParameterType_method() async {
-    var content = r'''
+    await assertErrorsInCode('''
 abstract class A {
   void mmm(int a);
 }
@@ -348,10 +328,11 @@
   void mmm(String a);
 }
 class C implements A, B {
-  void mmm(/*error:TOP_LEVEL_INFERENCE_ERROR*/a) {}
+  void mmm(a) {}
 }
-''';
-    await checkFile(content);
+''', [
+      error(CompileTimeErrorCode.NO_COMBINED_SUPER_SIGNATURE, 116, 3),
+    ]);
   }
 
   Future<void> _assertErrorOnlyLeft(List<String> operators) async {
@@ -360,7 +341,7 @@
       String operator = operators[i];
       code += 'var t$i = (a = 1) $operator (a = 2);\n';
     }
-    await checkFile(code);
+    await assertNoErrorsInCode(code);
   }
 }
 
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index 557aef8..9188c8c 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -80,7 +80,7 @@
       ['x']
     ]);
     var invalid_assignment = AnalysisError(
-        TestSource(), 0, 1, StaticTypeWarningCode.INVALID_ASSIGNMENT, [
+        TestSource(), 0, 1, CompileTimeErrorCode.INVALID_ASSIGNMENT, [
       ['x'],
       ['y']
     ]);
@@ -484,7 +484,7 @@
 }
 
 class TestRule extends LintRule {
-  TestRule() : super(name: 'fantastic_test_rule');
+  TestRule() : super(name: 'fantastic_test_rule', description: '');
 
-  TestRule.withName(String name) : super(name: name);
+  TestRule.withName(String name) : super(name: name, description: '');
 }
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 6cdf516..fe99a26 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -422,7 +422,7 @@
 
   A.c2(this.x, this.y);
 
-  A.c3(/*error:INVALID_PARAMETER_DECLARATION*/num this.x, String this.y);
+  A.c3(/*error:FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE*/num this.x, String this.y);
 }
 
 class B extends A {
diff --git a/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart b/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart
index cec16f8..c67500c 100644
--- a/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart
+++ b/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart
@@ -11,7 +11,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../dart/resolution/driver_resolution.dart';
+import '../../dart/resolution/context_collection_resolution.dart';
 
 void main() {
   defineReflectiveSuite(() {
@@ -23,7 +23,7 @@
 ///
 /// https://github.com/dart-lang/sdk/issues/31638
 @reflectiveTest
-class Dart2InferenceTest extends DriverResolutionTest {
+class Dart2InferenceTest extends PubPackageResolutionTest {
   test_bool_assert() async {
     var code = r'''
 T f<T>(int _) => null;
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 907bbea..0ec1da6 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -11,7 +11,6 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../utils.dart';
-import '../../summary/element_text.dart';
 import 'strong_test_helper.dart';
 
 void main() {
@@ -394,29 +393,6 @@
 ''');
   }
 
-  test_constructors_inferenceFBounded() async {
-    var errors = 'error:COULD_NOT_INFER,error:COULD_NOT_INFER,'
-        'error:TYPE_ARGUMENT_NOT_MATCHING_BOUNDS';
-//    if (hasExtraTaskModelPass) errors = '$errors,$errors';
-    var unit = await checkFile('''
-class Cloneable<T> {}
-
-class Pair<T extends Cloneable<T>, U extends Cloneable<U>> {
-  T t;
-  U u;
-  Pair(this.t, this.u);
-  Pair._();
-  Pair<U, T> get reversed => new Pair(u, t);
-}
-
-main() {
-  final x = new /*$errors*/Pair._();
-}
-''');
-    var x = findLocalVariable(unit, 'x');
-    _assertTypeStr(x.type, 'Pair<Cloneable<dynamic>, Cloneable<dynamic>>');
-  }
-
   test_constructors_inferFromArguments() async {
     var unit = await checkFile('''
 class C<T> {
@@ -446,28 +422,6 @@
     _assertTypeStr(findLocalVariable(unit, 'c_dynamic').type, 'C<dynamic>');
   }
 
-  test_constructors_inferFromArguments_argumentNotAssignable() async {
-    var unit = await checkFile('''
-class A {}
-
-typedef T F<T>();
-
-class C<T extends A> {
-  C(F<T> f);
-}
-
-class NotA {}
-NotA myF() => null;
-
-main() {
-  var x = new
-      /*error:COULD_NOT_INFER,error:TYPE_ARGUMENT_NOT_MATCHING_BOUNDS*/C(myF);
-}
-''');
-    var x = findLocalVariable(unit, 'x');
-    _assertTypeStr(x.type, 'C<NotA>');
-  }
-
   test_constructors_inferFromArguments_const() async {
     var unit = await checkFile('''
 class C<T> {
@@ -714,21 +668,6 @@
 ''');
   }
 
-  test_downwardInference_fixes_noUpwardsErrors() async {
-    await checkFileElement(r'''
-import 'dart:math';
-// T max<T extends num>(T x, T y);
-main() {
-  num x;
-  dynamic y;
-
-  num a = max(x, y);
-  Object b = max(x, y);
-  dynamic c = /*error:COULD_NOT_INFER*/max(x, y);
-  var d = /*error:COULD_NOT_INFER*/max(x, y);
-}''');
-  }
-
   test_downwardInference_miscellaneous() async {
     await checkFileElement('''
 typedef T Function2<S, T>(S x);
@@ -1739,18 +1678,6 @@
 ''');
   }
 
-  test_genericMethods_correctlyRecognizeGenericUpperBound() async {
-    // Regression test for https://github.com/dart-lang/sdk/issues/25740.
-    await checkFileElement(r'''
-class Foo<T extends Pattern> {
-  U method<U extends T>(U u) => u;
-}
-main() {
-  new Foo<String>()./*error:COULD_NOT_INFER*/method(42);
-}
-''');
-  }
-
   test_genericMethods_dartMathMinMax() async {
     await checkFileElement('''
 import 'dart:math';
@@ -1901,100 +1828,6 @@
     _assertTypeStr(f.type, 'U Function() Function<U>(U)');
   }
 
-  test_genericMethods_inferGenericInstantiation() async {
-    await checkFileElement('''
-import 'dart:math' as math;
-import 'dart:math' show min;
-
-class C {
-T m<T extends num>(T x, T y) => null;
-}
-
-main() {
-takeIII(math.max);
-takeDDD(math.max);
-takeNNN(math.max);
-takeIDN(math.max);
-takeDIN(math.max);
-takeIIN(math.max);
-takeDDN(math.max);
-takeIIO(math.max);
-takeDDO(math.max);
-
-takeOOI(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/math.max);
-takeIDI(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/math.max);
-takeDID(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/math.max);
-takeOON(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/math.max);
-takeOOO(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/math.max);
-
-// Also test SimpleIdentifier
-takeIII(min);
-takeDDD(min);
-takeNNN(min);
-takeIDN(min);
-takeDIN(min);
-takeIIN(min);
-takeDDN(min);
-takeIIO(min);
-takeDDO(min);
-
-takeOOI(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/min);
-takeIDI(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/min);
-takeDID(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/min);
-takeOON(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/min);
-takeOOO(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/min);
-
-// Also PropertyAccess
-takeIII(new C().m);
-takeDDD(new C().m);
-takeNNN(new C().m);
-takeIDN(new C().m);
-takeDIN(new C().m);
-takeIIN(new C().m);
-takeDDN(new C().m);
-takeIIO(new C().m);
-takeDDO(new C().m);
-
-// Note: this is a warning because a downcast of a method tear-off could work
-// (derived method can be a subtype):
-//
-//     class D extends C {
-//       S m<S extends num>(Object x, Object y);
-//     }
-//
-// That's legal because we're loosening parameter types.
-//
-// We do issue the inference error though, similar to generic function calls.
-takeOON(/*error:COULD_NOT_INFER*/new C().m);
-takeOOO(/*error:COULD_NOT_INFER*/new C().m);
-
-// Note: this is a warning because a downcast of a method tear-off could work
-// in "normal" Dart, due to bivariance.
-//
-// We do issue the inference error though, similar to generic function calls.
-takeOOI(/*error:COULD_NOT_INFER*/new C().m);
-
-takeIDI(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/new C().m);
-takeDID(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/new C().m);
-}
-
-void takeIII(int fn(int a, int b)) {}
-void takeDDD(double fn(double a, double b)) {}
-void takeIDI(int fn(double a, int b)) {}
-void takeDID(double fn(int a, double b)) {}
-void takeIDN(num fn(double a, int b)) {}
-void takeDIN(num fn(int a, double b)) {}
-void takeIIN(num fn(int a, int b)) {}
-void takeDDN(num fn(double a, double b)) {}
-void takeNNN(num fn(num a, num b)) {}
-void takeOON(num fn(Object a, Object b)) {}
-void takeOOO(num fn(Object a, Object b)) {}
-void takeOOI(int fn(Object a, Object b)) {}
-void takeIIO(Object fn(int a, int b)) {}
-void takeDDO(Object fn(double a, double b)) {}
-''');
-  }
-
   test_genericMethods_inferGenericMethodType() async {
     // Regression test for https://github.com/dart-lang/sdk/issues/25668
     await checkFileElement('''
@@ -3391,151 +3224,6 @@
     _assertTypeStr(x.type, 'void');
   }
 
-  test_instantiateToBounds_invokeConstructor_noBound() async {
-    var unit = await checkFileElement('''
-class C<T> {}
-var x = new C();
-''');
-    _assertTypeStr(unit.topLevelVariables[0].type, 'C<dynamic>');
-  }
-
-  test_instantiateToBounds_invokeConstructor_typeArgsExact() async {
-    var unit = await checkFileElement('''
-class C<T extends num> {}
-var x = new C<int>();
-''');
-    _assertTypeStr(unit.topLevelVariables[0].type, 'C<int>');
-  }
-
-  test_instantiateToBounds_notGeneric() async {
-    var unit = await checkFileElement(r'''
-class A {}
-class B<T extends A> {}
-B v = null;
-''');
-    checkElementText(unit.library, r'''
-class A {
-}
-class B<T extends A> {
-}
-B<A> v;
-''');
-  }
-
-  test_instantiateToBounds_typeName_error1() async {
-    var unit = await checkFileElement(r'''
-class A<T1 extends int, T2 extends T1> {}
-class B<T extends /*error:NOT_INSTANTIATED_BOUND*/A> {}
-B v = null;
-''');
-    checkElementText(unit.library, r'''
-notSimplyBounded class A<T1 extends int, T2 extends T1> {
-}
-notSimplyBounded class B<T extends A<int, int>> {
-}
-B<A<int, int>> v;
-''');
-  }
-
-  test_instantiateToBounds_typeName_error2() async {
-    var unit = await checkFileElement(r'''
-class A<T1 extends T2, T2 extends int> {}
-class B<T extends /*error:NOT_INSTANTIATED_BOUND*/A> {}
-B v = null;
-''');
-    checkElementText(unit.library, r'''
-notSimplyBounded class A<T1 extends T2, T2 extends int> {
-}
-notSimplyBounded class B<T extends A<int, int>> {
-}
-B<A<int, int>> v;
-''');
-  }
-
-  test_instantiateToBounds_typeName_error3() async {
-    var unit = await checkFileElement(r'''
-class A<T1 extends int, T2 extends List<T1>> {}
-class B<T extends /*error:NOT_INSTANTIATED_BOUND*/A> {}
-B v = null;
-''');
-    checkElementText(unit.library, r'''
-notSimplyBounded class A<T1 extends int, T2 extends List<T1>> {
-}
-notSimplyBounded class B<T extends A<int, List<int>>> {
-}
-B<A<int, List<int>>> v;
-''');
-  }
-
-  test_instantiateToBounds_typeName_OK_hasBound_definedAfter() async {
-    var unit = await checkFileElement(r'''
-class B<T extends A> {}
-class A<T extends int> {}
-B v = null;
-''');
-    checkElementText(unit.library, r'''
-class B<T extends A<int>> {
-}
-class A<T extends int> {
-}
-B<A<int>> v;
-''');
-  }
-
-  test_instantiateToBounds_typeName_OK_hasBound_definedBefore() async {
-    var unit = await checkFileElement(r'''
-class A<T extends int> {}
-class B<T extends A> {}
-B v = null;
-''');
-    checkElementText(unit.library, r'''
-class A<T extends int> {
-}
-class B<T extends A<int>> {
-}
-B<A<int>> v;
-''');
-  }
-
-  test_instantiateToBounds_typeName_OK_inBound_hasBound_definedAfter() async {
-    var unit = await checkFileElement(r'''
-A v = null;
-class A<T extends int> {}
-''');
-    checkElementText(unit.library, r'''
-class A<T extends int> {
-}
-A<int> v;
-''');
-  }
-
-  test_instantiateToBounds_typeName_OK_inBound_hasBound_definedBefore() async {
-    var unit = await checkFileElement(r'''
-class A<T extends int> {}
-A v = null;
-''');
-    checkElementText(unit.library, r'''
-class A<T extends int> {
-}
-A<int> v;
-''');
-  }
-
-  test_instantiateToBounds_typeName_OK_noBound() async {
-    var unit = await checkFileElement(r'''
-class A<T> {}
-class B<T extends A> {}
-B v = null;
-''');
-    checkElementText(unit.library, r'''
-class A<T> {
-}
-class B<T extends A<dynamic>> {
-}
-B<A<dynamic>> v;
-''');
-  }
-
   test_lambdaDoesNotHavePropagatedTypeHint() async {
     await checkFileElement(r'''
 List<String> getListOfString() => const <String>[];
diff --git a/pkg/analyzer/test/src/test_all.dart b/pkg/analyzer/test/src/test_all.dart
index 80fbf6b..6fd19dc 100644
--- a/pkg/analyzer/test/src/test_all.dart
+++ b/pkg/analyzer/test/src/test_all.dart
@@ -4,6 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import 'clients/test_all.dart' as clients;
 import 'command_line/test_all.dart' as command_line;
 import 'context/test_all.dart' as context;
 import 'dart/test_all.dart' as dart;
@@ -25,6 +26,7 @@
 
 main() {
   defineReflectiveSuite(() {
+    clients.main();
     command_line.main();
     context.main();
     dart.main();
diff --git a/pkg/analyzer/test/src/workspace/bazel_test.dart b/pkg/analyzer/test/src/workspace/bazel_test.dart
index f267f85..6bc5fb9 100644
--- a/pkg/analyzer/test/src/workspace/bazel_test.dart
+++ b/pkg/analyzer/test/src/workspace/bazel_test.dart
@@ -130,6 +130,58 @@
         exists: true);
   }
 
+  void test_resolveAbsolute_file_bin_to_genfiles() {
+    _addResources([
+      '/workspace/WORKSPACE',
+      '/workspace/bazel-genfiles/my/foo/test/foo1.dart',
+      '/workspace/bazel-bin/'
+    ]);
+    _assertResolve('file:///workspace/bazel-bin/my/foo/test/foo1.dart',
+        '/workspace/bazel-genfiles/my/foo/test/foo1.dart',
+        restore: false);
+  }
+
+  void test_resolveAbsolute_file_genfiles_to_workspace() {
+    _addResources([
+      '/workspace/WORKSPACE',
+      '/workspace/bazel-genfiles/',
+      '/workspace/my/foo/test/foo1.dart'
+    ]);
+    _assertResolve('file:///workspace/bazel-genfiles/my/foo/test/foo1.dart',
+        '/workspace/my/foo/test/foo1.dart',
+        restore: false);
+  }
+
+  void test_resolveAbsolute_file_not_in_workspace() {
+    _addResources([
+      '/workspace/WORKSPACE',
+      '/workspace/bazel-genfiles/',
+      '/other/my/foo/test/foo1.dart'
+    ]);
+    _assertNoResolve('file:///other/my/foo/test/foo1.dart');
+  }
+
+  void test_resolveAbsolute_file_readonly_to_workspace() {
+    _addResources([
+      '/workspace/WORKSPACE',
+      '/READONLY/workspace/',
+      '/workspace/my/foo/test/foo1.dart'
+    ]);
+    _assertResolve('file:///READONLY/workspace/my/foo/test/foo1.dart',
+        '/workspace/my/foo/test/foo1.dart',
+        restore: false);
+  }
+
+  void test_resolveAbsolute_file_workspace_to_genfiles() {
+    _addResources([
+      '/workspace/WORKSPACE',
+      '/workspace/bazel-genfiles/my/foo/test/foo1.dart'
+    ]);
+    _assertResolve('file:///workspace/my/foo/test/foo1.dart',
+        '/workspace/bazel-genfiles/my/foo/test/foo1.dart',
+        restore: false);
+  }
+
   void test_resolveAbsolute_genfiles() {
     _addResources([
       '/workspace/WORKSPACE',
@@ -465,6 +517,11 @@
     resolver = BazelPackageUriResolver(workspace);
   }
 
+  void _assertNoResolve(String uriStr) {
+    var uri = Uri.parse(uriStr);
+    expect(resolver.resolveAbsolute(uri), isNull);
+  }
+
   void _assertResolve(String uriStr, String posixPath,
       {bool exists = true, bool restore = true}) {
     Uri uri = Uri.parse(uriStr);
diff --git a/pkg/analyzer/test/src/workspace/package_build_test.dart b/pkg/analyzer/test/src/workspace/package_build_test.dart
index 630bf0c..42c46c4 100644
--- a/pkg/analyzer/test/src/workspace/package_build_test.dart
+++ b/pkg/analyzer/test/src/workspace/package_build_test.dart
@@ -4,14 +4,12 @@
 
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer/src/workspace/package_build.dart';
+import 'package:meta/meta.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/test_support.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(PackageBuildFileUriResolverTest);
@@ -49,7 +47,7 @@
 
   void setUp() {
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
 
     workspace = PackageBuildWorkspace.find(
       resourceProvider,
@@ -137,7 +135,7 @@
   }
 
   void setUp() {
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
   }
 
   void test_resolveAbsolute_generated() {
@@ -228,98 +226,168 @@
 
 @reflectiveTest
 class PackageBuildWorkspacePackageTest with ResourceProviderMixin {
-  MockUriResolver packageUriResolver;
+  PackageBuildWorkspace myWorkspace;
+  PackageBuildWorkspacePackage myPackage;
 
-  void test_contains_differentWorkspace() {
-    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
-    newFile('/workspace2/project2/lib/file.dart');
+  String get fooPackageLibPath => '$fooPackageRootPath/lib';
 
-    var package = workspace
-        .findPackageFor(convertPath('/workspace/project/lib/code.dart'));
-    expect(
-        package.contains(
-            TestSource(convertPath('/workspace2/project2/lib/file.dart'))),
-        isFalse);
+  String get fooPackageRootPath => '$myWorkspacePath/foo';
+
+  String get myPackageGeneratedPath {
+    return '$myPackageRootPath/.dart_tool/build/generated';
   }
 
-  void test_contains_packageUris() {
-    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
-    newFile('/workspace/project/lib/file2.dart');
-    var package = workspace
-        .findPackageFor(convertPath('/workspace/project/lib/code.dart'));
-    var file2Source = InSummarySource(
-        Uri.parse('package:project/file2.dart'), '' /* summaryPath */);
-    expect(package.contains(file2Source), isTrue);
-  }
+  String get myPackageLibPath => '$myPackageRootPath/lib';
 
-  void test_contains_packageUris_unrelatedFile() {
-    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
-    newFile('/workspace/project/lib/file2.dart');
-    var package = workspace
-        .findPackageFor(convertPath('/workspace/project/lib/code.dart'));
-    var file2Source = InSummarySource(
-        Uri.parse('package:project2/file2.dart'), '' /* summaryPath */);
-    expect(package.contains(file2Source), isFalse);
-  }
+  String get myPackageRootPath => '$myWorkspacePath/my';
 
-  void test_contains_sameWorkspace() {
-    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
-    newFile('/workspace/project/lib/file2.dart');
+  String get myWorkspacePath => '/workspace';
 
-    var package = workspace
-        .findPackageFor(convertPath('/workspace/project/lib/code.dart'));
-    var file2Path = convertPath('/workspace/project/lib/file2.dart');
-    expect(package.contains(TestSource(file2Path)), isTrue);
-    var binPath = convertPath('/workspace/project/bin/bin.dart');
-    expect(package.contains(TestSource(binPath)), isTrue);
-    var testPath = convertPath('/workspace/project/test/test.dart');
-    expect(package.contains(TestSource(testPath)), isTrue);
-  }
+  void setUp() {
+    newFile('$myPackageRootPath/pubspec.yaml', content: 'name: my');
+    newFolder(myPackageGeneratedPath);
 
-  void test_findPackageFor_includedFile() {
-    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
-    newFile('/workspace/project/lib/file.dart');
-
-    var package = workspace
-        .findPackageFor(convertPath('/workspace/project/lib/file.dart'));
-    expect(package, isNotNull);
-    expect(package.root, convertPath('/workspace'));
-    expect(package.workspace, equals(workspace));
-  }
-
-  void test_findPackageFor_testFile() {
-    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
-    newFile('/workspace/project/test/test.dart');
-
-    var package = workspace
-        .findPackageFor(convertPath('/workspace/project/test/test.dart'));
-    expect(package, isNotNull);
-    expect(package.root, convertPath('/workspace'));
-    expect(package.workspace, equals(workspace));
-  }
-
-  void test_findPackageFor_unrelatedFile() {
-    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
-    newFile('/workspace/project/lib/file.dart');
-
-    var package = workspace
-        .findPackageFor(convertPath('/workspace2/project2/lib/file.dart'));
-    expect(package, isNull);
-  }
-
-  PackageBuildWorkspace _createPackageBuildWorkspace() {
-    newFolder('/workspace/.dart_tool/build');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
-    PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
+    myWorkspace = PackageBuildWorkspace.find(
       resourceProvider,
       {
-        'project': [getFolder('/workspace')]
+        'my': [getFolder(myPackageLibPath)],
+        'foo': [getFolder(fooPackageLibPath)],
       },
-      convertPath('/workspace'),
+      convertPath(myPackageRootPath),
     );
-    packageUriResolver = MockUriResolver();
-    PackageBuildPackageUriResolver(workspace, packageUriResolver);
-    return workspace;
+
+    myPackage = myWorkspace.findPackageFor('$myPackageLibPath/fake.dart');
+  }
+
+  test_contains_fileUri() {
+    expect(
+      myPackage.contains(
+        _sourceWithFileUri('$myPackageRootPath/test/a.dart'),
+      ),
+      isTrue,
+    );
+
+    expect(
+      myPackage.contains(
+        _sourceWithFileUri('$fooPackageRootPath/test/a.dart'),
+      ),
+      isFalse,
+    );
+  }
+
+  test_contains_fileUri_generated() {
+    var myGeneratedPath = '$myPackageGeneratedPath/my/test/a.dart';
+    newFile(myGeneratedPath, content: '');
+
+    var fooGeneratedPath = '$myPackageGeneratedPath/foo/test/a.dart';
+    newFile(fooGeneratedPath, content: '');
+
+    expect(
+      myPackage.contains(
+        _sourceWithFileUri(myGeneratedPath),
+      ),
+      isTrue,
+    );
+
+    expect(
+      myPackage.contains(
+        _sourceWithFileUri(fooGeneratedPath),
+      ),
+      isFalse,
+    );
+  }
+
+  test_contains_packageUri() {
+    expect(
+      myPackage.contains(
+        _sourceWithPackageUriWithoutPath('package:my/a.dart'),
+      ),
+      isTrue,
+    );
+
+    expect(
+      myPackage.contains(
+        _sourceWithPackageUriWithoutPath('package:foo/a.dart'),
+      ),
+      isFalse,
+    );
+  }
+
+  test_findPackageFor_my_generated_libFile() {
+    var package = myWorkspace.findPackageFor(
+      convertPath('$myPackageGeneratedPath/my/lib/a.dart'),
+    );
+    expect(package, isNotNull);
+    expect(package.root, convertPath(myPackageRootPath));
+    expect(package.workspace, myWorkspace);
+  }
+
+  test_findPackageFor_my_generated_other() {
+    expect(
+      myWorkspace.findPackageFor(
+        convertPath('$myPackageGeneratedPath/foo/lib/a.dart'),
+      ),
+      isNull,
+    );
+
+    expect(
+      myWorkspace.findPackageFor(
+        convertPath('$myPackageGeneratedPath/foo/test/a.dart'),
+      ),
+      isNull,
+    );
+  }
+
+  test_findPackageFor_my_generated_testFile() {
+    var package = myWorkspace.findPackageFor(
+      convertPath('$myPackageGeneratedPath/my/test/a.dart'),
+    );
+    expect(package, isNotNull);
+    expect(package.root, convertPath(myPackageRootPath));
+    expect(package.workspace, myWorkspace);
+  }
+
+  test_findPackageFor_my_libFile() {
+    var package = myWorkspace.findPackageFor(
+      convertPath('$myPackageLibPath/a.dart'),
+    );
+    expect(package, isNotNull);
+    expect(package.root, convertPath(myPackageRootPath));
+    expect(package.workspace, myWorkspace);
+  }
+
+  test_findPackageFor_my_testFile() {
+    var package = myWorkspace.findPackageFor(
+      convertPath('$myPackageRootPath/test/a.dart'),
+    );
+    expect(package, isNotNull);
+    expect(package.root, convertPath(myPackageRootPath));
+    expect(package.workspace, myWorkspace);
+  }
+
+  test_findPackageFor_other() {
+    expect(
+      myWorkspace.findPackageFor(
+        convertPath('$fooPackageRootPath/lib/a.dart'),
+      ),
+      isNull,
+    );
+
+    expect(
+      myWorkspace.findPackageFor(
+        convertPath('$fooPackageRootPath/test/a.dart'),
+      ),
+      isNull,
+    );
+  }
+
+  Source _sourceWithFileUri(String path) {
+    return _MockSource(path: convertPath(path), uri: toUri(path));
+  }
+
+  Source _sourceWithPackageUriWithoutPath(String uriStr) {
+    var uri = Uri.parse(uriStr);
+    return _MockSource(path: null, uri: uri);
   }
 }
 
@@ -327,7 +395,7 @@
 class PackageBuildWorkspaceTest with ResourceProviderMixin {
   void test_builtFile_currentProject() {
     newFolder('/workspace/.dart_tool/build');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace =
         _createWorkspace('/workspace', ['project']);
 
@@ -339,7 +407,7 @@
 
   void test_builtFile_importedPackage() {
     newFolder('/workspace/.dart_tool/build');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace =
         _createWorkspace('/workspace', ['project', 'foo']);
 
@@ -350,7 +418,7 @@
 
   void test_builtFile_notInPackagesGetsHidden() {
     newFolder('/workspace/.dart_tool/build');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
 
     // Ensure package:bar is not configured.
     PackageBuildWorkspace workspace =
@@ -378,7 +446,7 @@
 
   void test_find_hasDartToolAndPubspec() {
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
       resourceProvider,
       {},
@@ -391,9 +459,9 @@
   void test_find_hasDartToolAndPubspec_inParentDirectory() {
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
     newFolder('/workspace/opened/up/a/child/dir/.dart_tool/build');
-    newFileWithBytes('/workspace/opened/up/a/child/dir/pubspec.yaml',
-        'name: subproject'.codeUnits);
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/opened/up/a/child/dir/pubspec.yaml',
+        content: 'name: subproject');
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
       resourceProvider,
       {},
@@ -407,9 +475,9 @@
       test_find_hasDartToolAndPubspec_inParentDirectory_ignoresMalformedPubspec() {
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
     newFolder('/workspace/opened/up/a/child/dir/.dart_tool/build');
-    newFileWithBytes('/workspace/opened/up/a/child/dir/pubspec.yaml',
-        'not: yaml: here!!! 111'.codeUnits);
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/opened/up/a/child/dir/pubspec.yaml',
+        content: 'not: yaml: here!!! 111');
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
       resourceProvider,
       {},
@@ -423,7 +491,7 @@
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
     newFolder('/workspace/opened/up/a/child/dir');
     newFolder('/workspace/opened/up/a/child/dir/.dart_tool/build');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
       resourceProvider,
       {},
@@ -436,9 +504,9 @@
   void test_find_hasDartToolAndPubspec_inParentDirectory_ignoresSoloPubspec() {
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
     newFolder('/workspace/opened/up/a/child/dir');
-    newFileWithBytes('/workspace/opened/up/a/child/dir/pubspec.yaml',
-        'name: subproject'.codeUnits);
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/opened/up/a/child/dir/pubspec.yaml',
+        content: 'name: subproject');
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
       resourceProvider,
       {},
@@ -451,7 +519,7 @@
   void test_find_hasDartToolNoBuild() {
     // Edge case: an empty .dart_tool directory. Don't assume package:build.
     newFolder('/workspace/.dart_tool');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
       resourceProvider,
       {},
@@ -473,7 +541,7 @@
   void test_find_hasDartToolPubButNotBuild() {
     // Dart projects will have this directory, that don't use package:build.
     newFolder('/workspace/.dart_tool/pub');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
       resourceProvider,
       {},
@@ -484,8 +552,7 @@
 
   void test_find_hasMalformedPubspec() {
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes(
-        '/workspace/pubspec.yaml', 'not: yaml: here! 1111'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'not: yaml: here! 1111');
     PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
       resourceProvider,
       {},
@@ -495,7 +562,7 @@
   }
 
   void test_find_hasPubspecNoDartTool() {
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace = PackageBuildWorkspace.find(
       resourceProvider,
       {},
@@ -506,7 +573,7 @@
 
   void test_findFile_bin() {
     newFolder('/workspace/.dart_tool/build/generated/project/bin');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace =
         _createWorkspace('/workspace', ['project']);
 
@@ -517,7 +584,7 @@
 
   void test_findFile_binGenerated() {
     newFolder('/workspace/.dart_tool/build/generated/project/bin');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace =
         _createWorkspace('/workspace', ['project']);
 
@@ -529,7 +596,7 @@
 
   void test_findFile_libGenerated() {
     newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace =
         _createWorkspace('/workspace', ['project']);
 
@@ -541,7 +608,7 @@
 
   void test_findFile_test() {
     newFolder('/workspace/.dart_tool/build/generated/project/test');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace =
         _createWorkspace('/workspace', ['project']);
 
@@ -552,7 +619,7 @@
 
   void test_findFile_testGenerated() {
     newFolder('/workspace/.dart_tool/build/generated/project/test');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace =
         _createWorkspace('/workspace', ['project']);
 
@@ -564,7 +631,7 @@
 
   void test_findFile_web() {
     newFolder('/workspace/.dart_tool/build/generated/project/web');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace =
         _createWorkspace('/workspace', ['project']);
 
@@ -575,7 +642,7 @@
 
   void test_findFile_webGenerated() {
     newFolder('/workspace/.dart_tool/build/generated/project/web');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PackageBuildWorkspace workspace =
         _createWorkspace('/workspace', ['project']);
 
@@ -599,3 +666,24 @@
     );
   }
 }
+
+class _MockSource implements Source {
+  final String path;
+
+  @override
+  final Uri uri;
+
+  _MockSource({@required this.path, @required this.uri});
+
+  @override
+  String get fullName {
+    if (path == null) {
+      throw StateError('This source has no path, '
+          'and we do not expect that it will be accessed.');
+    }
+    return path;
+  }
+
+  @override
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
diff --git a/pkg/analyzer/test/src/workspace/pub_test.dart b/pkg/analyzer/test/src/workspace/pub_test.dart
index c5d5c3c..a33908a 100644
--- a/pkg/analyzer/test/src/workspace/pub_test.dart
+++ b/pkg/analyzer/test/src/workspace/pub_test.dart
@@ -21,7 +21,7 @@
   PubWorkspace workspace;
 
   setUp() {
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     workspace =
         PubWorkspace.find(resourceProvider, {}, convertPath('/workspace'));
     expect(workspace.isBazel, isFalse);
@@ -79,7 +79,7 @@
 @reflectiveTest
 class PubWorkspaceTest with ResourceProviderMixin {
   void test_find_directory() {
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PubWorkspace workspace =
         PubWorkspace.find(resourceProvider, {}, convertPath('/workspace'));
     expect(workspace.isBazel, isFalse);
@@ -94,7 +94,7 @@
   }
 
   void test_find_file() {
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFile('/workspace/pubspec.yaml', content: 'name: project');
     PubWorkspace workspace = PubWorkspace.find(
         resourceProvider, {}, convertPath('/workspace/lib/lib1.dart'));
     expect(workspace.root, convertPath('/workspace'));
diff --git a/pkg/analyzer/test/util/id_testing_helper.dart b/pkg/analyzer/test/util/id_testing_helper.dart
index be77c72..c393ad8 100644
--- a/pkg/analyzer/test/util/id_testing_helper.dart
+++ b/pkg/analyzer/test/util/id_testing_helper.dart
@@ -129,7 +129,7 @@
   MemberAnnotations<IdValue> memberAnnotations =
       testData.expectedMaps[config.marker];
   var resourceProvider = MemoryResourceProvider();
-  var testUris = [];
+  var testUris = <Uri>[];
   for (var entry in testData.memorySourceFiles.entries) {
     var testUri = _toTestUri(entry.key);
     testUris.add(testUri);
diff --git a/pkg/analyzer/test/utils.dart b/pkg/analyzer/test/utils.dart
index 5dce8862..2e00258 100644
--- a/pkg/analyzer/test/utils.dart
+++ b/pkg/analyzer/test/utils.dart
@@ -220,7 +220,7 @@
   Asserter<DartType> isFunction2Of(
           Asserter<DartType> argType, Asserter<DartType> returnType) =>
       (DartType type) {
-        FunctionType fType = (type as FunctionType);
+        FunctionType fType = type as FunctionType;
         argType(fType.normalParameterTypes[0]);
         returnType(fType.returnType);
       };
@@ -230,7 +230,7 @@
   AsserterBuilder<List<Asserter<DartType>>, DartType> isInstantiationOf(
           Asserter<DartType> baseAssert) =>
       (List<Asserter<DartType>> argAsserts) => (DartType type) {
-            InterfaceType t = (type as InterfaceType);
+            InterfaceType t = type as InterfaceType;
             baseAssert(t);
             List<DartType> typeArguments = t.typeArguments;
             expect(typeArguments, hasLength(argAsserts.length));
diff --git a/pkg/analyzer/test/verify_diagnostics_test.dart b/pkg/analyzer/test/verify_diagnostics_test.dart
index ee476e0..78e3e14 100644
--- a/pkg/analyzer/test/verify_diagnostics_test.dart
+++ b/pkg/analyzer/test/verify_diagnostics_test.dart
@@ -3,22 +3,18 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
-import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:path/path.dart';
-import 'package:pub_semver/src/version_constraint.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../tool/diagnostics/generate.dart';
-import 'src/dart/resolution/driver_resolution.dart';
+import 'src/dart/resolution/context_collection_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -38,6 +34,8 @@
   /// ony include docs that cannot be verified because of missing support in the
   /// verifier.
   static const List<String> unverifiedDocs = [
+    // Needs to be able to specify two expected diagnostics.
+    'CompileTimeErrorCode.AMBIGUOUS_IMPORT',
     // Produces two diagnostics when it should only produce one.
     'CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE',
     // Produces two diagnostics when it should only produce one. We could get
@@ -46,17 +44,15 @@
     'CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY',
     // Produces two diagnostics when it should only produce one.
     'CompileTimeErrorCode.INVALID_URI',
+    // Produces two diagnostics when it should only produce one.
+    'CompileTimeErrorCode.INVALID_USE_OF_NULL_VALUE',
     // Need a way to make auxiliary files that (a) are not included in the
     // generated docs or (b) can be made persistent for fixes.
     'CompileTimeErrorCode.PART_OF_NON_PART',
+    // Produces the diagnostic HintCode.UNUSED_LOCAL_VARIABLE when it shouldn't.
+    'CompileTimeErrorCode.UNDEFINED_IDENTIFIER_AWAIT',
     // The code has been replaced but is not yet removed.
     'HintCode.DEPRECATED_MEMBER_USE',
-    // Needs to be able to specify two expected diagnostics.
-    'StaticWarningCode.AMBIGUOUS_IMPORT',
-    // Produces two diagnostics when it should only produce one.
-    'StaticWarningCode.INVALID_USE_OF_NULL_VALUE',
-    // Produces the diagnostic HintCode.UNUSED_LOCAL_VARIABLE when it shouldn't.
-    'StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT',
   ];
 
   /// The prefix used on directive lines to specify the experiments that should
@@ -399,51 +395,48 @@
 
 /// A test class that creates an environment suitable for analyzing the
 /// snippets.
-class _SnippetTest extends DriverResolutionTest with PackageMixin {
+class _SnippetTest extends PubPackageResolutionTest {
   /// The snippet being tested.
   final _SnippetData snippet;
 
-  @override
-  AnalysisOptionsImpl analysisOptions = AnalysisOptionsImpl();
-
   /// Initialize a newly created test to test the given [snippet].
   _SnippetTest(this.snippet) {
-    analysisOptions.contextFeatures =
-        FeatureSet.fromEnableFlags(snippet.experiments ?? []);
-    String pubspecContent = snippet.auxiliaryFiles['pubspec.yaml'];
-    if (pubspecContent != null) {
-      for (String line in pubspecContent.split('\n')) {
-        if (line.indexOf('sdk:') > 0) {
-          int start = line.indexOf("'") + 1;
-          String constraint = line.substring(start, line.indexOf("'", start));
-          analysisOptions.sdkVersionConstraint =
-              VersionConstraint.parse(constraint);
-        }
-      }
-    }
+    writeTestPackageAnalysisOptionsFile(
+      AnalysisOptionsFileConfig(
+        experiments: snippet.experiments,
+      ),
+    );
   }
 
   @override
   void setUp() {
     super.setUp();
-    addMetaPackage();
     _createAuxiliaryFiles(snippet.auxiliaryFiles);
     addTestFile(snippet.content);
   }
 
   void _createAuxiliaryFiles(Map<String, String> auxiliaryFiles) {
-    Map<String, String> packageMap = {};
-    for (String uri in auxiliaryFiles.keys) {
-      if (uri.startsWith('package:')) {
-        int slash = uri.indexOf('/');
-        String packageName = uri.substring(8, slash);
-        String libPath = packageMap.putIfAbsent(
-            packageName, () => addPubPackage(packageName).path);
-        String relativePath = uri.substring(slash + 1);
-        newFile('$libPath/$relativePath', content: auxiliaryFiles[uri]);
+    Map<String, String> packageNameToRootPath = {};
+    for (String uriStr in auxiliaryFiles.keys) {
+      if (uriStr.startsWith('package:')) {
+        Uri uri = Uri.parse(uriStr);
+
+        String packageName = uri.pathSegments[0];
+        String packageRootPath = '/packages/$packageName';
+        packageNameToRootPath[packageName] = convertPath(packageRootPath);
+
+        String pathInLib = uri.pathSegments.skip(1).join('/');
+        newFile(
+          '$packageRootPath/lib/$pathInLib',
+          content: auxiliaryFiles[uriStr],
+        );
       } else {
-        newFile('/test/$uri', content: auxiliaryFiles[uri]);
+        newFile(
+          '$testPackageRootPath/$uriStr',
+          content: auxiliaryFiles[uriStr],
+        );
       }
     }
+    writeTestPackageConfigWith(packageNameToRootPath, meta: true);
   }
 }
diff --git a/pkg/analyzer/tool/diagnostics/diagnostics.md b/pkg/analyzer/tool/diagnostics/diagnostics.md
index 88b7aee..c6ef942 100644
--- a/pkg/analyzer/tool/diagnostics/diagnostics.md
+++ b/pkg/analyzer/tool/diagnostics/diagnostics.md
@@ -17,6 +17,9 @@
 
 This page uses the following terms.
 
+[constant context]: #constant-context
+[potentially non-nullable]: #potentially-non-nullable
+
 ### Constant context
 
 A _constant context_ is a region of code in which it isn't necessary to include
@@ -581,9 +584,8 @@
 #### Description
 
 The analyzer produces this diagnostic when a method or function has a
-return type that's <a href=”#potentially-non-nullable”>potentially
-non-nullable</a> but would implicitly return `null` if control reached the
-end of the function.
+return type that's [potentially non-nullable][] but would implicitly return
+`null` if control reached the end of the function.
 
 #### Example
 
@@ -862,7 +864,8 @@
 
 ### const_constructor_param_type_mismatch
 
-_A value of type '{0}' can't be assigned to a parameter of type '{1}'._
+_A value of type '{0}' can't be assigned to a parameter of type '{1}' in a const
+constructor._
 
 #### Description
 
@@ -3439,6 +3442,9 @@
 
 ### invalid_null_aware_operator
 
+_The target expression can't be null because of short-circuiting, so the
+null-aware operator '{0}' can't be used._
+
 _The target expression can't be null, so the null-aware operator '{0}' can't be
 used._
 
@@ -3974,11 +3980,11 @@
 #### Description
 
 The analyzer produces this diagnostic when an optional parameter, whether
-positional or named, has a <a href=”#potentially-non-nullable”>potentially
-non-nullable</a> type and doesn't specify a default value. Optional
-parameters that have no explicit default value have an implicit default
-value of `null`. If the type of the parameter doesn't allow the parameter
-to have a value of `null`, then the implicit default value isn't valid.
+positional or named, has a [potentially non-nullable][] type and doesn't
+specify a default value. Optional parameters that have no explicit default
+value have an implicit default value of `null`. If the type of the
+parameter doesn't allow the parameter to have a value of `null`, then the
+implicit default value isn't valid.
 
 #### Example
 
@@ -4751,7 +4757,7 @@
 The analyzer produces this diagnostic when an element in a constant list
 literal isn't a constant value. The list literal can be constant either
 explicitly (because it's prefixed by the `const` keyword) or implicitly
-(because it appears in a [constant context](#constant-context)).
+(because it appears in a [constant context][]).
 
 #### Examples
 
@@ -5057,8 +5063,7 @@
 
 The analyzer produces this diagnostic when a local variable is referenced
 and has all these characteristics:
-- Has a type that's <a href=”#potentially-non-nullable”>potentially
-  non-nullable</a>.
+- Has a type that's [potentially non-nullable][].
 - Doesn't have an initializer.
 - Isn't marked as `late`.
 - The analyzer can't prove that the local variable will be assigned before
@@ -5230,8 +5235,7 @@
 
 The analyzer produces this diagnostic when a field is declared and has all
 these characteristics:
-- Has a type that's <a href=”#potentially-non-nullable”>potentially
-  non-nullable</a>
+- Has a type that's [potentially non-nullable][]
 - Doesn't have an initializer
 - Isn't marked as `late`
 
@@ -6217,11 +6221,10 @@
 #### Description
 
 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
-versions, so this code won't be able to run against earlier versions of the
-SDK.
+[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][] wasn't supported in earlier versions, so this code
+won't be able to run against earlier versions of the SDK.
 
 #### Examples
 
@@ -6253,7 +6256,7 @@
 
 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 isn't in a [constant context](#constant-context):
+expression isn't in a [constant context][]:
 
 {% prettify dart tag=pre+code %}
 num x = 3;
@@ -6268,11 +6271,11 @@
 #### Description
 
 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
-[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.
+operators on the class `bool` inside a [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 [constant context][] wasn't supported in earlier
+versions, so this code won't be able to run against earlier versions of the
+SDK.
 
 #### Examples
 
@@ -6305,7 +6308,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
-isn't in a [constant context](#constant-context):
+isn't in a [constant context][]:
 
 {% prettify dart tag=pre+code %}
 const bool a = true;
@@ -6321,11 +6324,10 @@
 #### Description
 
 The analyzer produces this diagnostic when the operator `==` is used on a
-non-primitive type 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 this operator 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.
+non-primitive type inside a [constant context][] is found in code that has
+an SDK constraint whose lower bound is less than 2.3.2. Using this operator
+in a [constant context][] wasn't supported in earlier versions, so this
+code won't be able to run against earlier versions of the SDK.
 
 #### Examples
 
@@ -6359,7 +6361,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 isn't in a [constant context](#constant-context):
+expression isn't in a [constant context][]:
 
 {% prettify dart tag=pre+code %}
 class C {}
@@ -6431,11 +6433,10 @@
 #### Description
 
 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
-versions, so this code won't be able to run against earlier versions of the
-SDK.
+[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][] wasn't supported in earlier versions, so this code
+won't be able to run against earlier versions of the SDK.
 
 #### Examples
 
@@ -6468,7 +6469,7 @@
 If you need to support older versions of the SDK, then either rewrite the
 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):
+[constant context][]:
 
 {% prettify dart tag=pre+code %}
 const x = 4;
@@ -6584,11 +6585,10 @@
 #### Description
 
 The analyzer produces this diagnostic when an if or spread element inside
-a [constant context](#constant-context) is found in code that has an
-SDK constraint whose lower bound is less than 2.5.0. Using an if or
-spread element inside 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.
+a [constant context][] is found in code that has an SDK constraint whose
+lower bound is less than 2.5.0. Using an if or spread element inside a
+[constant context][] wasn't supported in earlier versions, so this code
+won't be able to run against earlier versions of the SDK.
 
 #### Examples
 
@@ -6627,7 +6627,7 @@
 {% endprettify %}
 
 If that isn't possible, change the code so that the element isn't in a
-[constant context](#constant-context):
+[constant context][]:
 
 {% prettify dart tag=pre+code %}
 const a = [1, 2];
@@ -6897,8 +6897,8 @@
 #### Description
 
 The analyzer produces this diagnostic when an expression whose type is
-<a href=”#potentially-non-nullable”>potentially non-nullable</a> is
-dereferenced without first verifying that the value isn't `null`.
+[potentially non-nullable][] is dereferenced without first verifying that
+the value isn't `null`.
 
 #### Example
 
@@ -8101,6 +8101,8 @@
 
 ### unused_element
 
+_A value for optional parameter '{0}' isn't ever given._
+
 _The declaration '{0}' isn't referenced._
 
 #### Description
@@ -8369,7 +8371,7 @@
 
 ### variable_type_mismatch
 
-_A value of type '{0}' can't be assigned to a variable of type '{1}'._
+_A value of type '{0}' can't be assigned to a const variable of type '{1}'._
 
 #### Description
 
diff --git a/pkg/analyzer/tool/diagnostics/generate.dart b/pkg/analyzer/tool/diagnostics/generate.dart
index 6a0c2f3..bc4fb24 100644
--- a/pkg/analyzer/tool/diagnostics/generate.dart
+++ b/pkg/analyzer/tool/diagnostics/generate.dart
@@ -390,6 +390,9 @@
 
 This page uses the following terms.
 
+[constant context]: #constant-context
+[potentially non-nullable]: #potentially-non-nullable
+
 ### Constant context
 
 A _constant context_ is a region of code in which it isn't necessary to include
diff --git a/pkg/analyzer/tool/experiments/generate.dart b/pkg/analyzer/tool/experiments/generate.dart
index 231851f..02b1a0e 100644
--- a/pkg/analyzer/tool/experiments/generate.dart
+++ b/pkg/analyzer/tool/experiments/generate.dart
@@ -107,26 +107,15 @@
         out.writeln('IsEnabledByDefault.$id,');
       }
     }
-    // TODO(danrubel): Remove bogus entries
     out.write('''
-      false, // bogus-disabled
-      true, // bogus-enabled
     ];
 ''');
   }
 
   void generateSection_CurrentState() {
-    // TODO(danrubel): Remove bogus entries
     out.write('''
 
 mixin _CurrentState {
-  /// Current state for the flag "bogus-disabled"
-  @deprecated
-  bool get bogus_disabled => isEnabled(ExperimentalFeatures.bogus_disabled);
-
-  /// Current state for the flag "bogus-enabled"
-  @deprecated
-  bool get bogus_enabled => isEnabled(ExperimentalFeatures.bogus_enabled);
 ''');
     for (var key in keysSorted) {
       var id = keyToIdentifier(key);
@@ -164,16 +153,7 @@
       static const String ${keyToIdentifier(key)} = '$key';
     ''');
     }
-    // TODO(danrubel): Remove bogus entries
     out.write('''
-
-      /// String to enable the experiment "bogus-disabled"
-      @deprecated
-      static const String bogus_disabled = 'bogus-disabled';
-
-      /// String to enable the experiment "bogus-enabled"
-      @deprecated
-      static const String bogus_enabled = 'bogus-enabled';
     }''');
   }
 
@@ -205,30 +185,7 @@
       out.writeln(');');
       ++index;
     }
-    // TODO(danrubel): Remove bogus entries
     out.write('''
-
-      @deprecated
-      static const bogus_disabled = ExperimentalFeature(
-        index: $index,
-        // 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(
-        index: ${index + 1},
-        // 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',
-      );
     }''');
   }
 
@@ -247,16 +204,7 @@
       static const bool ${keyToIdentifier(key)} = $shipped;
     ''');
     }
-    // TODO(danrubel): Remove bogus entries
     out.write('''
-
-      /// Default state of the experiment "bogus-disabled"
-      @deprecated
-      static const bool bogus_disabled = false;
-
-      /// Default state of the experiment "bogus-enabled"
-      @deprecated
-      static const bool bogus_enabled = true;
     }''');
   }
 
@@ -280,14 +228,7 @@
         throw 'Cannot mark shipped feature as "expired: false"';
       }
     }
-    // TODO(danrubel): Remove bogus entries
     out.write('''
-
-      /// Expiration status of the experiment "bogus-disabled"
-      static const bool bogus_disabled = true;
-
-      /// Expiration status of the experiment "bogus-enabled"
-      static const bool bogus_enabled = true;
     }''');
   }
 
@@ -303,13 +244,7 @@
   EnableString.$id: ExperimentalFeatures.$id,
     ''');
     }
-    // TODO(danrubel): Remove bogus entries
     out.write('''
-
-  // ignore: deprecated_member_use_from_same_package
-  EnableString.bogus_disabled: ExperimentalFeatures.bogus_disabled,
-  // ignore: deprecated_member_use_from_same_package
-  EnableString.bogus_enabled: ExperimentalFeatures.bogus_enabled,
 };
 ''');
   }
diff --git a/pkg/analyzer/tool/summary/build_sdk_summaries.dart b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
index 515fb5d..9d76bc7 100644
--- a/pkg/analyzer/tool/summary/build_sdk_summaries.dart
+++ b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
@@ -6,7 +6,7 @@
 
 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:cli_util/cli_util.dart';
 
 void main(List<String> args) {
   String command;
@@ -28,9 +28,7 @@
   //
   // Validate the SDK path.
   //
-  sdkPath ??=
-      FolderBasedDartSdk.defaultSdkDirectory(PhysicalResourceProvider.INSTANCE)
-          .path;
+  sdkPath ??= getSdkPath();
   if (!FileSystemEntity.isDirectorySync('$sdkPath/lib')) {
     print("'$sdkPath/lib' does not exist.");
     _printUsage();
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart
index d60de7c..945b34c 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -806,6 +806,9 @@
   /// Entry point to the code generator when generating the "format.dart" file.
   void generateFormatCode() {
     outputHeader();
+    out("// The generator sometimes generates unnecessary 'this' references.");
+    out('// ignore_for_file: unnecessary_this');
+    out();
     out('library analyzer.src.summary.format;');
     out();
     out("import 'dart:convert' as convert;");
@@ -848,7 +851,7 @@
     out('// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file');
     out('// for details. All rights reserved. Use of this source code is governed by a');
     out('// BSD-style license that can be found in the LICENSE file.');
-    out('//');
+    out();
     out('// This file has been automatically generated.  Please do not edit it manually.');
     out('// To regenerate the file, use the SDK script');
     out('// "pkg/analyzer/tool/summary/generate.dart \$IDL_FILE_PATH",');
diff --git a/pkg/analyzer_cli/analysis_options.yaml b/pkg/analyzer_cli/analysis_options.yaml
index eb5e7f0..a8a1d4b 100644
--- a/pkg/analyzer_cli/analysis_options.yaml
+++ b/pkg/analyzer_cli/analysis_options.yaml
@@ -6,6 +6,8 @@
   errors:
     # Increase the severity of the unused_import hint.
     unused_import: warning
+  language:
+    strict-inference: true
   exclude:
     - test/data/**
 linter:
diff --git a/pkg/analyzer_cli/lib/src/analyzer_impl.dart b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
index 7bb46af..e72299a 100644
--- a/pkg/analyzer_cli/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
@@ -276,7 +276,7 @@
   }
 
   @override
-  void logInfo(String message, [exception]) {
+  void logInfo(String message, [Object exception]) {
     outSink.writeln(message);
     if (exception != null) {
       outSink.writeln(exception);
diff --git a/pkg/analyzer_cli/lib/src/batch_mode.dart b/pkg/analyzer_cli/lib/src/batch_mode.dart
index f147d64..3a34b88 100644
--- a/pkg/analyzer_cli/lib/src/batch_mode.dart
+++ b/pkg/analyzer_cli/lib/src/batch_mode.dart
@@ -13,8 +13,8 @@
 /// Provides a framework to read command line options from stdin and feed them
 /// to a callback.
 class BatchRunner {
-  final outSink;
-  final errorSink;
+  final StringSink outSink;
+  final StringSink errorSink;
 
   BatchRunner(this.outSink, this.errorSink);
 
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index bf9eeb1..7bdcc3b 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -6,6 +6,7 @@
 import 'dart:io' as io;
 import 'dart:isolate';
 
+import 'package:analyzer/dart/analysis/context_locator.dart' as api;
 import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
@@ -16,6 +17,8 @@
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/cache.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart'
+    as api;
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
@@ -109,8 +112,8 @@
         }
 
         // Prepare options.
-        var options =
-            CommandLineOptions.parse(arguments, printAndFail: (String msg) {
+        var options = CommandLineOptions.parse(resourceProvider, arguments,
+            printAndFail: (String msg) {
           throw ArgumentError(msg);
         });
 
@@ -432,6 +435,8 @@
       packages: packages,
     );
 
+    _setAnalysisDriverAnalysisContext(rootPath);
+
     declaredVariables = DeclaredVariables.fromMap(options.definedVariables);
     analysisDriver.declaredVariables = declaredVariables;
 
@@ -540,6 +545,31 @@
       }
     });
   }
+
+  void _setAnalysisDriverAnalysisContext(String rootPath) {
+    if (rootPath == null) {
+      return;
+    }
+
+    var apiContextRoots = api.ContextLocator(
+      resourceProvider: resourceProvider,
+    ).locateRoots(
+      includedPaths: [rootPath],
+      excludedPaths: [],
+    );
+
+    if (apiContextRoots.isEmpty) {
+      return;
+    }
+
+    analysisDriver.configure(
+      analysisContext: api.DriverBasedAnalysisContext(
+        resourceProvider,
+        apiContextRoots.first,
+        analysisDriver,
+      ),
+    );
+  }
 }
 
 /// Tracks paths to dependencies, really just a thin api around a Set<String>.
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index a78cc89..702c73a 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/analysis/context_locator.dart' as api;
 import 'package:analyzer/dart/sdk/build_sdk_summary.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/file_system/file_system.dart';
@@ -15,6 +16,8 @@
 import 'package:analyzer/src/context/packages.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart'
+    as api;
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/results.dart';
@@ -123,7 +126,7 @@
     linter.registerLintRules();
 
     // Parse commandline options.
-    var options = CommandLineOptions.parse(args);
+    var options = CommandLineOptions.parse(resourceProvider, args);
 
     // Do analysis.
     if (options.buildMode) {
@@ -137,7 +140,7 @@
       batchRunner.runAsBatch(args, (List<String> args) async {
         // TODO(brianwilkerson) Determine whether this await is necessary.
         await null;
-        var options = CommandLineOptions.parse(args);
+        var options = CommandLineOptions.parse(resourceProvider, args);
         return await _analyzeAll(options);
       });
     } else {
@@ -438,7 +441,11 @@
 
     // Setup embedding.
     if (includeSdkResolver) {
-      var embedderSdk = EmbedderSdk(resourceProvider, embedderMap);
+      var embedderSdk = EmbedderSdk(
+        resourceProvider,
+        embedderMap,
+        languageVersion: sdk.languageVersion,
+      );
       if (embedderSdk.libraryMap.size() == 0) {
         // The embedder uri resolver has no mappings. Use the default Dart SDK
         // uri resolver.
@@ -574,6 +581,7 @@
         packages: packageInfo.packages);
     analysisDriver.results.listen((_) {});
     analysisDriver.exceptions.listen((_) {});
+    _setAnalysisDriverAnalysisContext(source);
     scheduler.start();
   }
 
@@ -627,6 +635,27 @@
     return analyzer.analyze(formatter);
   }
 
+  void _setAnalysisDriverAnalysisContext(String rootPath) {
+    var apiContextRoots = api.ContextLocator(
+      resourceProvider: resourceProvider,
+    ).locateRoots(
+      includedPaths: [rootPath],
+      excludedPaths: [],
+    );
+
+    if (apiContextRoots.isEmpty) {
+      return;
+    }
+
+    analysisDriver.configure(
+      analysisContext: api.DriverBasedAnalysisContext(
+        resourceProvider,
+        apiContextRoots.first,
+        analysisDriver,
+      ),
+    );
+  }
+
   void _setupSdk(CommandLineOptions options, AnalysisOptions analysisOptions) {
     if (sdk == null) {
       if (options.dartSdkSummaryPath != null) {
diff --git a/pkg/analyzer_cli/lib/src/error_formatter.dart b/pkg/analyzer_cli/lib/src/error_formatter.dart
index e7a39af..a807955 100644
--- a/pkg/analyzer_cli/lib/src/error_formatter.dart
+++ b/pkg/analyzer_cli/lib/src/error_formatter.dart
@@ -137,10 +137,9 @@
   bool get isWarning => severity == 'warning';
 
   @override
-  bool operator ==(other) {
-    if (other is! CLIError) return false;
-
-    return severity == other.severity &&
+  bool operator ==(Object other) {
+    return other is CLIError &&
+        severity == other.severity &&
         sourcePath == other.sourcePath &&
         errorCode == other.errorCode &&
         offset == other.offset;
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index fd0f95d..59bbd3f 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -2,8 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:io';
+import 'dart:io' as io;
 
+import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/src/command_line/arguments.dart';
 import 'package:analyzer/src/context/builder.dart';
@@ -18,7 +19,7 @@
 /// Shared exit handler.
 ///
 /// *Visible for testing.*
-ExitHandler exitHandler = exit;
+ExitHandler exitHandler = io.exit;
 
 T cast<T>(dynamic value) => value as T;
 
@@ -151,8 +152,10 @@
   final String summaryDepsOutput;
 
   /// Initialize options from the given parsed [args].
-  CommandLineOptions._fromArgs(ArgResults args)
-      : buildAnalysisOutput = cast(args['build-analysis-output']),
+  CommandLineOptions._fromArgs(
+    ResourceProvider resourceProvider,
+    ArgResults args,
+  )   : buildAnalysisOutput = cast(args['build-analysis-output']),
         buildMode = cast(args['build-mode']),
         buildModePersistentWorker = cast(args['persistent_worker']),
         buildSummaryInputs =
@@ -162,7 +165,10 @@
         buildSummaryOutputSemantic =
             cast(args['build-summary-output-semantic']),
         buildSuppressExitCode = cast(args['build-suppress-exit-code']),
-        contextBuilderOptions = createContextBuilderOptions(args),
+        contextBuilderOptions = createContextBuilderOptions(
+          resourceProvider,
+          args,
+        ),
         dartSdkPath = cast(args['dart-sdk']),
         dartSdkSummaryPath = cast(args['dart-sdk-summary']),
         defaultLanguageVersion = cast(args['default-language-version']),
@@ -214,9 +220,10 @@
   /// Parse [args] into [CommandLineOptions] describing the specified
   /// analyzer options. In case of a format error, calls [printAndFail], which
   /// by default prints an error message to stderr and exits.
-  static CommandLineOptions parse(List<String> args,
-      {Function(String msg) printAndFail = printAndFail}) {
-    var options = _parse(args);
+  static CommandLineOptions parse(
+      ResourceProvider resourceProvider, List<String> args,
+      {void Function(String msg) printAndFail = printAndFail}) {
+    var options = _parse(resourceProvider, args);
 
     /// Only happens in testing.
     if (options == null) {
@@ -236,7 +243,7 @@
         return null; // Only reachable in testing.
       }
       // Check that SDK is existing directory.
-      if (!(Directory(sdkPath)).existsSync()) {
+      if (!(io.Directory(sdkPath)).existsSync()) {
         printAndFail('Invalid Dart SDK path: $sdkPath');
         return null; // Only reachable in testing.
       }
@@ -271,8 +278,9 @@
   static String _getVersion() {
     try {
       // This is relative to bin/snapshot, so ../..
-      var versionPath = Platform.script.resolve('../../version').toFilePath();
-      var versionFile = File(versionPath);
+      var versionPath =
+          io.Platform.script.resolve('../../version').toFilePath();
+      var versionFile = io.File(versionPath);
       return versionFile.readAsStringSync().trim();
     } catch (_) {
       // This happens when the script is not running in the context of an SDK.
@@ -280,7 +288,10 @@
     }
   }
 
-  static CommandLineOptions _parse(List<String> args) {
+  static CommandLineOptions _parse(
+    ResourceProvider resourceProvider,
+    List<String> args,
+  ) {
     args = preprocessArgs(PhysicalResourceProvider.INSTANCE, args);
 
     var verbose = args.contains('-v') || args.contains('--verbose');
@@ -504,7 +515,7 @@
               'option. Got: $args');
           return null; // Only reachable in testing.
         }
-        return CommandLineOptions._fromArgs(results);
+        return CommandLineOptions._fromArgs(resourceProvider, results);
       }
 
       // Help requests.
@@ -565,7 +576,7 @@
         }
       }
 
-      return CommandLineOptions._fromArgs(results);
+      return CommandLineOptions._fromArgs(resourceProvider, results);
     } on FormatException catch (e) {
       errorSink.writeln(e.message);
       _showUsage(parser);
diff --git a/pkg/analyzer_cli/test/build_mode_test.dart b/pkg/analyzer_cli/test/build_mode_test.dart
index c2db753..aee3830 100644
--- a/pkg/analyzer_cli/test/build_mode_test.dart
+++ b/pkg/analyzer_cli/test/build_mode_test.dart
@@ -28,7 +28,8 @@
       : super(MemoryResourceProvider(), connection);
 
   @override
-  Future<void> analyze(CommandLineOptions options, inputs) async {
+  Future<void> analyze(
+      CommandLineOptions options, Map<String, WorkerInput> inputs) async {
     if (_analyze != null) {
       _analyze(options);
     }
diff --git a/pkg/analyzer_cli/test/data/file_with_assert_initializers.dart b/pkg/analyzer_cli/test/data/file_with_assert_initializers.dart
index 46b7c0c..1f30a88 100644
--- a/pkg/analyzer_cli/test/data/file_with_assert_initializers.dart
+++ b/pkg/analyzer_cli/test/data/file_with_assert_initializers.dart
@@ -2,6 +2,6 @@
   int _x, _y;
   C(x, y)
       : _x = x,
-        assert (x < y),
+        assert(x < y),
         _y = y;
 }
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index 4735d87..cc8ae522 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -38,6 +38,23 @@
 }
 
 class AbstractBuildModeTest extends BaseTest {
+  List<String> get _sdkSummaryArguments {
+    var sdkPath = path.dirname(
+      path.dirname(
+        Platform.resolvedExecutable,
+      ),
+    );
+
+    var dartSdkSummaryPath = path.join(
+      sdkPath,
+      'lib',
+      '_internal',
+      'strong.sum',
+    );
+
+    return ['--dart-sdk-summary', dartSdkSummaryPath];
+  }
+
   Future<void> _doDrive(
     String filePath, {
     String sourceArgument,
@@ -54,24 +71,7 @@
     args.add('--build-mode');
     args.add('--format=machine');
 
-    {
-      var sdkPath = path.dirname(
-        path.dirname(
-          Platform.resolvedExecutable,
-        ),
-      );
-
-      var dartSdkSummaryPath = path.join(
-        sdkPath,
-        'lib',
-        '_internal',
-        'strong.sum',
-      );
-
-      args.add('--dart-sdk-summary');
-      args.add(dartSdkSummaryPath);
-    }
-
+    args.addAll(_sdkSummaryArguments);
     args.addAll(additionalArgs);
 
     if (sourceArgument == null) {
@@ -97,7 +97,7 @@
   bool get usePreviewDart2 => false;
 
   /// Normalize text with bullets.
-  String bulletToDash(item) => '$item'.replaceAll('•', '-');
+  String bulletToDash(StringSink item) => '$item'.replaceAll('•', '-');
 
   /// Start a driver for the given [source], optionally providing additional
   /// [args] and an [options] file path. The value of [options] defaults to an
@@ -587,6 +587,25 @@
     expect(exitCode, isNot(0));
   }
 
+  Future<void> test_noInputs() async {
+    await withTempDirAsync((tempDir) async {
+      var outputPath = path.join(tempDir, 'test.sum');
+
+      await driveMany([], args: [
+        '--build-mode',
+        '--format=machine',
+        ..._sdkSummaryArguments,
+        '--build-summary-only',
+        '--build-summary-output=$outputPath',
+      ]);
+
+      var output = File(outputPath);
+      expect(output.existsSync(), isTrue);
+
+      expect(exitCode, 0);
+    });
+  }
+
   Future<void> test_noStatistics() async {
     await _doDrive(path.join('data', 'test_file.dart'));
     // Should not print statistics summary.
@@ -721,6 +740,7 @@
 
 @reflectiveTest
 class ExitCodesTest extends BaseTest {
+  @SkippedTest(reason: 'Fails on bots, passes locally. Do not know why.')
   Future<void> test_bazelWorkspace_relativePath() async {
     // Copy to temp dir so that existing analysis options
     // in the test directory hierarchy do not interfere
@@ -1090,7 +1110,7 @@
 
     // missing_return: error
     var undefined_function = AnalysisError(
-        TestSource(), 0, 1, StaticTypeWarningCode.UNDEFINED_FUNCTION, [
+        TestSource(), 0, 1, CompileTimeErrorCode.UNDEFINED_FUNCTION, [
       ['x']
     ]);
     expect(processorFor(undefined_function).severity, ErrorSeverity.WARNING);
diff --git a/pkg/analyzer_cli/test/options_test.dart b/pkg/analyzer_cli/test/options_test.dart
index 6b81425..9d682ef 100644
--- a/pkg/analyzer_cli/test/options_test.dart
+++ b/pkg/analyzer_cli/test/options_test.dart
@@ -4,6 +4,7 @@
 
 import 'dart:io';
 
+import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/analysis/experiments_impl.dart'
     show overrideKnownFeatures;
@@ -22,6 +23,13 @@
       int savedExitCode;
       ExitHandler savedExitHandler;
 
+      CommandLineOptions parse(List<String> args,
+          {void Function(String msg) printAndFail = printAndFail}) {
+        var resourceProvider = PhysicalResourceProvider.INSTANCE;
+        return CommandLineOptions.parse(resourceProvider, args,
+            printAndFail: printAndFail);
+      }
+
       setUp(() {
         savedOutSink = outSink;
         savedErrorSink = errorSink;
@@ -40,7 +48,7 @@
       });
 
       test('defaults', () {
-        var options = CommandLineOptions.parse(['--dart-sdk', '.', 'foo.dart']);
+        var options = parse(['--dart-sdk', '.', 'foo.dart']);
         expect(options, isNotNull);
         expect(options.buildMode, isFalse);
         expect(options.buildAnalysisOutput, isNull);
@@ -70,20 +78,19 @@
       });
 
       test('batch', () {
-        var options = CommandLineOptions.parse(['--dart-sdk', '.', '--batch']);
+        var options = parse(['--dart-sdk', '.', '--batch']);
         expect(options.batchMode, isTrue);
       });
 
       test('defined variables', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '-Dfoo=bar', 'foo.dart']);
+        var options = parse(['--dart-sdk', '.', '-Dfoo=bar', 'foo.dart']);
         expect(options.definedVariables['foo'], equals('bar'));
         expect(options.definedVariables['bar'], isNull);
       });
 
       test('disable cache flushing', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--disable-cache-flushing', 'foo.dart']);
+        var options =
+            parse(['--dart-sdk', '.', '--disable-cache-flushing', 'foo.dart']);
         expect(options.disableCacheFlushing, isTrue);
       });
 
@@ -116,32 +123,28 @@
         };
 
         test('no values', () {
-          var options = overrideKnownFeatures(
-              knownFeatures, () => CommandLineOptions.parse(['foo.dart']));
+          var options =
+              overrideKnownFeatures(knownFeatures, () => parse(['foo.dart']));
           expect(options.enabledExperiments, isEmpty);
         });
 
         test('single value', () {
-          var options = overrideKnownFeatures(
-              knownFeatures,
-              () => CommandLineOptions.parse(
-                  ['--enable-experiment', 'a', 'foo.dart']));
+          var options = overrideKnownFeatures(knownFeatures,
+              () => parse(['--enable-experiment', 'a', 'foo.dart']));
           expect(options.enabledExperiments, ['a']);
         });
 
         group('multiple values', () {
           test('single flag', () {
-            var options = overrideKnownFeatures(
-                knownFeatures,
-                () => CommandLineOptions.parse(
-                    ['--enable-experiment', 'a,b', 'foo.dart']));
+            var options = overrideKnownFeatures(knownFeatures,
+                () => parse(['--enable-experiment', 'a,b', 'foo.dart']));
             expect(options.enabledExperiments, ['a', 'b']);
           });
 
           test('mixed single and multiple flags', () {
             var options = overrideKnownFeatures(
                 knownFeatures,
-                () => CommandLineOptions.parse([
+                () => parse([
                       '--enable-experiment',
                       'a,b',
                       '--enable-experiment',
@@ -154,7 +157,7 @@
           test('multiple flags', () {
             var options = overrideKnownFeatures(
                 knownFeatures,
-                () => CommandLineOptions.parse([
+                () => parse([
                       '--enable-experiment',
                       'a',
                       '--enable-experiment',
@@ -167,74 +170,68 @@
       });
 
       test('hintsAreFatal', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--fatal-hints', 'foo.dart']);
+        var options = parse(['--dart-sdk', '.', '--fatal-hints', 'foo.dart']);
         expect(options.infosAreFatal, isTrue);
       });
 
       test('infosAreFatal', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--fatal-infos', 'foo.dart']);
+        var options = parse(['--dart-sdk', '.', '--fatal-infos', 'foo.dart']);
         expect(options.infosAreFatal, isTrue);
       });
 
       test('log', () {
-        var options =
-            CommandLineOptions.parse(['--dart-sdk', '.', '--log', 'foo.dart']);
+        var options = parse(['--dart-sdk', '.', '--log', 'foo.dart']);
         expect(options.log, isTrue);
       });
 
       test('machine format', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--format=machine', 'foo.dart']);
+        var options =
+            parse(['--dart-sdk', '.', '--format=machine', 'foo.dart']);
         expect(options.machineFormat, isTrue);
       });
 
       test('no-hints', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--no-hints', 'foo.dart']);
+        var options = parse(['--dart-sdk', '.', '--no-hints', 'foo.dart']);
         expect(options.disableHints, isTrue);
       });
 
       test('options', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--options', 'options.yaml', 'foo.dart']);
-        expect(options.analysisOptionsFile, equals('options.yaml'));
+        var options =
+            parse(['--dart-sdk', '.', '--options', 'options.yaml', 'foo.dart']);
+        expect(options.analysisOptionsFile, endsWith('options.yaml'));
       });
 
       test('lints', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--lints', 'foo.dart']);
+        var options = parse(['--dart-sdk', '.', '--lints', 'foo.dart']);
         expect(options.lints, isTrue);
       });
 
       test('package warnings', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--package-warnings', 'foo.dart']);
+        var options =
+            parse(['--dart-sdk', '.', '--package-warnings', 'foo.dart']);
         expect(options.showPackageWarnings, isTrue);
       });
 
       test('sdk warnings', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--sdk-warnings', 'foo.dart']);
+        var options = parse(['--dart-sdk', '.', '--sdk-warnings', 'foo.dart']);
         expect(options.showSdkWarnings, isTrue);
       });
 
       test('sourceFiles', () {
-        var options = CommandLineOptions.parse(
+        var options = parse(
             ['--dart-sdk', '.', '--log', 'foo.dart', 'foo2.dart', 'foo3.dart']);
         expect(options.sourceFiles,
             equals(['foo.dart', 'foo2.dart', 'foo3.dart']));
       });
 
       test('warningsAreFatal', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--fatal-warnings', 'foo.dart']);
+        var options =
+            parse(['--dart-sdk', '.', '--fatal-warnings', 'foo.dart']);
         expect(options.warningsAreFatal, isTrue);
       });
 
       test('ignore unrecognized flags', () {
-        var options = CommandLineOptions.parse([
+        var options = parse([
           '--ignore-unrecognized-flags',
           '--bar',
           '--baz',
@@ -247,27 +244,24 @@
       });
 
       test('hintsAreFatal', () {
-        var options = CommandLineOptions.parse(
-            ['--dart-sdk', '.', '--fatal-lints', 'foo.dart']);
+        var options = parse(['--dart-sdk', '.', '--fatal-lints', 'foo.dart']);
         expect(options.lintsAreFatal, isTrue);
       });
 
       test('bad SDK dir', () {
-        var failureMessage;
-        CommandLineOptions.parse(['--dart-sdk', '&&&&&', 'foo.dart'],
+        String failureMessage;
+        parse(['--dart-sdk', '&&&&&', 'foo.dart'],
             printAndFail: (msg) => failureMessage = msg);
         expect(failureMessage, equals('Invalid Dart SDK path: &&&&&'));
       });
 
       test('--use-fasta-parser', () {
-        var options =
-            CommandLineOptions.parse(['--use-fasta-parser', 'foo.dart']);
+        var options = parse(['--use-fasta-parser', 'foo.dart']);
         expect(options.useFastaParser, isTrue);
       });
 
       test('--train-snapshot', () {
-        var options =
-            CommandLineOptions.parse(['--train-snapshot', 'foo.dart']);
+        var options = parse(['--train-snapshot', 'foo.dart']);
         expect(options.trainSnapshot, isTrue);
       });
     });
@@ -421,7 +415,9 @@
   }
 
   void _parse(List<String> args) {
-    options = CommandLineOptions.parse(args, printAndFail: (msg) {
+    var resourceProvider = PhysicalResourceProvider.INSTANCE;
+    options =
+        CommandLineOptions.parse(resourceProvider, args, printAndFail: (msg) {
       failureMessage = msg;
     });
   }
diff --git a/pkg/analyzer_cli/test/perf_report_test.dart b/pkg/analyzer_cli/test/perf_report_test.dart
index c75d94a..933b455 100644
--- a/pkg/analyzer_cli/test/perf_report_test.dart
+++ b/pkg/analyzer_cli/test/perf_report_test.dart
@@ -4,6 +4,7 @@
 
 import 'dart:convert' show json;
 
+import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer_cli/src/error_formatter.dart' show AnalysisStats;
 import 'package:analyzer_cli/src/options.dart';
 import 'package:analyzer_cli/src/perf_report.dart';
@@ -11,7 +12,10 @@
 
 void main() {
   test('makePerfReport', () {
-    var options = CommandLineOptions.parse(['somefile.dart']);
+    var options = CommandLineOptions.parse(
+      PhysicalResourceProvider.INSTANCE,
+      ['somefile.dart'],
+    );
     var encoded = makePerfReport(1000, 1234, options, 0, AnalysisStats());
 
     var jsonData = json.decode(encoded);
diff --git a/pkg/analyzer_plugin/CHANGELOG.md b/pkg/analyzer_plugin/CHANGELOG.md
index 14f32e9..60d65bb 100644
--- a/pkg/analyzer_plugin/CHANGELOG.md
+++ b/pkg/analyzer_plugin/CHANGELOG.md
@@ -1,3 +1,16 @@
+## 0.3.1-dev
+- Deprecated the class `DartChangeBuilder` and enhanced `ChangeBuilder` to be
+  the replacement for it.
+- Deprecated the method `ChangeBuilder.addFileEdit` and introduced
+  `ChangeBuilder.addDartFileEdit` and `ChangeBuilder.addGenericFileEdit` to be
+  the replacements for it.
+
+## 0.3.0
+- Removed deprecated `Plugin.getResolveResult`. Use `getResolvedUnitResult`.
+
+## 0.2.5
+- Change supported analyzer version to `^0.39.12`
+
 ## 0.2.4
 - Exposed method `AnalyzerConverter.locationFromElement` (was previously
   private).
diff --git a/pkg/analyzer_plugin/doc/tutorial/assists.md b/pkg/analyzer_plugin/doc/tutorial/assists.md
index ade51d6..b71e33d 100644
--- a/pkg/analyzer_plugin/doc/tutorial/assists.md
+++ b/pkg/analyzer_plugin/doc/tutorial/assists.md
@@ -80,7 +80,7 @@
   }
 
   void _wrapInIf() {
-    ChangeBuilder builder = new DartChangeBuilder(session);
+    ChangeBuilder builder = new ChangeBuilder(session: session);
     // TODO Build the edit to wrap the selection in a 'if' statement.
     addAssist(wrapInIf, builder);
   }
diff --git a/pkg/analyzer_plugin/doc/tutorial/creating_edits.md b/pkg/analyzer_plugin/doc/tutorial/creating_edits.md
index 223786e..d3aabce 100644
--- a/pkg/analyzer_plugin/doc/tutorial/creating_edits.md
+++ b/pkg/analyzer_plugin/doc/tutorial/creating_edits.md
@@ -9,27 +9,28 @@
 your plugin, but will ensure a consistent user experience in terms of the code
 being generated by the analysis server.
 
-## `DartChangeBuilder`
+## `ChangeBuilder`
 
-The class used to create a `SourceChange` is `DartChangeBuilder`, defined in
-`package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart`.
-You can create a `DartChangeBuilder` with the following:
+The class used to create a `SourceChange` is `ChangeBuilder`, defined in
+`package:analyzer_plugin/utilities/change_builder/change_builder_core.dart`.
+You can create a `ChangeBuilder` with the following:
 
 ```dart
-DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+ChangeBuilder changeBuilder = new ChangeBuilder(session: session);
 ```
 
-The constructor required an instance of the class `AnalysisSession`. How you get
+The constructor requires an instance of the class `AnalysisSession`. How you get
 the correct instance depends on where the constructor is being invoked.
 
 A `SourceChange` can contain edits that are to be applied to multiple files. The
-edits for a single file are created by invoking the method `addFileEdit`, as
+edits for a single file are created by invoking the method `addDartFileEdit`, as
 illustrated by the following:
 
 ```dart
-changeBuilder.addFileEdit(path, (DartFileEditBuilder fileEditBuilder) {
+await changeBuilder.addDartFileEdit(path,
+    (DartFileEditBuilder fileEditBuilder) {
   // ...
-}
+});
 ```
 
 where the `path` is the path to the file to which the edits will be applied.
@@ -170,7 +171,7 @@
 A `SourceChange` also allows you to specify where the cursor should be placed
 after the edits are applied. There are two ways to specify this.
 
-The first is by invoking the method `setSelection` on a `DartChangeBuilder`.
+The first is by invoking the method `setSelection` on a `ChangeBuilder`.
 The method takes a `Position`, which encapsulates an offset in a particular
 file. This can be difficult to get right because the offset is required to be
 the offset *after* all of the edits for that file have been applied.
diff --git a/pkg/analyzer_plugin/doc/tutorial/fixes.md b/pkg/analyzer_plugin/doc/tutorial/fixes.md
index c81548c..920ed30 100644
--- a/pkg/analyzer_plugin/doc/tutorial/fixes.md
+++ b/pkg/analyzer_plugin/doc/tutorial/fixes.md
@@ -95,7 +95,7 @@
   void _defineComponent(AnalysisError error) {
     // TODO Get the name from the source code.
     String componentName = null;
-    ChangeBuilder builder = new DartChangeBuilder(session);
+    ChangeBuilder builder = new ChangeBuilder(session: session);
     // TODO Build the edit to insert the definition of the component.
     addFix(error, defineComponent, builder, args: [componentName]);
   }
diff --git a/pkg/analyzer_plugin/lib/plugin/plugin.dart b/pkg/analyzer_plugin/lib/plugin/plugin.dart
index 6147731..4e8f153 100644
--- a/pkg/analyzer_plugin/lib/plugin/plugin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/plugin.dart
@@ -173,14 +173,6 @@
     return result;
   }
 
-  /// Return the result of analyzing the file with the given [path].
-  ///
-  /// Throw a [RequestFailure] is the file cannot be analyzed or if the driver
-  /// associated with the file is not an [AnalysisDriver].
-  @deprecated
-  Future<ResolveResult> getResolveResult(String path) =>
-      getResolvedUnitResult(path);
-
   /// Handle an 'analysis.getNavigation' request.
   ///
   /// Throw a [RequestFailure] if the request could not be handled.
@@ -412,7 +404,7 @@
         FileByteStore(byteStorePath,
             tempNameSuffix: DateTime.now().millisecondsSinceEpoch.toString()),
         64 * M);
-    _sdkManager = DartSdkManager(sdkPath, true);
+    _sdkManager = DartSdkManager(sdkPath);
     return PluginVersionCheckResult(
         isCompatibleWith(serverVersion), name, version, fileGlobsToAnalyze,
         contactInfo: contactInfo);
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart
index eea528e..38904ba 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart
@@ -6,12 +6,22 @@
 import 'dart:collection';
 import 'dart:math' as math;
 
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
 
 /// A builder used to build a [SourceChange].
 class ChangeBuilderImpl implements ChangeBuilder {
+  /// The workspace in which the change builder should operate, or `null` if no
+  /// Dart files will be changed.
+  final ChangeWorkspace workspace;
+
   /// The end-of-line marker used in the file being edited, or `null` if the
   /// default marker should be used.
   String eol;
@@ -31,11 +41,18 @@
   /// should not be updated in result of inserting this builder.
   final Set<Position> _lockedPositions = HashSet<Position>.identity();
 
-  /// A map of absolute normalized path to file edit builder.
-  final _fileEditBuilders = <String, FileEditBuilderImpl>{};
+  /// A map of absolute normalized path to generic file edit builders.
+  final Map<String, FileEditBuilderImpl> _genericFileEditBuilders = {};
 
-  /// Initialize a newly created change builder.
-  ChangeBuilderImpl();
+  /// A map of absolute normalized path to Dart file edit builders.
+  final Map<String, DartFileEditBuilderImpl> _dartFileEditBuilders = {};
+
+  /// Initialize a newly created change builder. If the builder will be used to
+  /// create changes for Dart files, then either a [session] or a [workspace]
+  /// must be provided (but not both).
+  ChangeBuilderImpl({AnalysisSession session, ChangeWorkspace workspace})
+      : assert(session == null || workspace == null),
+        workspace = workspace ?? _SingleSessionWorkspace(session);
 
   @override
   SourceRange get selectionRange => _selectionRange;
@@ -43,7 +60,13 @@
   @override
   SourceChange get sourceChange {
     var change = SourceChange('');
-    for (var builder in _fileEditBuilders.values) {
+    for (var builder in _genericFileEditBuilders.values) {
+      if (builder.hasEdits) {
+        change.addFileEdit(builder.fileEdit);
+        builder.finalize();
+      }
+    }
+    for (var builder in _dartFileEditBuilders.values) {
       if (builder.hasEdits) {
         change.addFileEdit(builder.fileEdit);
         builder.finalize();
@@ -59,13 +82,45 @@
   }
 
   @override
+  Future<void> addDartFileEdit(
+      String path, void Function(DartFileEditBuilder builder) buildFileEdit,
+      {ImportPrefixGenerator importPrefixGenerator}) async {
+    if (_genericFileEditBuilders.containsKey(path)) {
+      throw StateError("Can't create both a generic file edit and a dart file "
+          'edit for the same file');
+    }
+    var builder = _dartFileEditBuilders[path];
+    if (builder == null) {
+      builder = await createDartFileEditBuilder(path);
+      if (builder != null) {
+        _dartFileEditBuilders[path] = builder;
+      }
+    }
+    if (builder != null) {
+      builder.importPrefixGenerator = importPrefixGenerator;
+      buildFileEdit(builder);
+    }
+  }
+
+  @Deprecated('Use either addDartFileEdit or addGenericFileEdit')
+  @override
   Future<void> addFileEdit(
       String path, void Function(FileEditBuilder builder) buildFileEdit) async {
-    var builder = _fileEditBuilders[path];
+    return addGenericFileEdit(path, buildFileEdit);
+  }
+
+  @override
+  Future<void> addGenericFileEdit(
+      String path, void Function(FileEditBuilder builder) buildFileEdit) async {
+    if (_dartFileEditBuilders.containsKey(path)) {
+      throw StateError("Can't create both a generic file edit and a dart file "
+          'edit for the same file');
+    }
+    var builder = _genericFileEditBuilders[path];
     if (builder == null) {
-      builder = await createFileEditBuilder(path);
+      builder = await createGenericFileEditBuilder(path);
       if (builder != null) {
-        _fileEditBuilders[path] = builder;
+        _genericFileEditBuilders[path] = builder;
       }
     }
     if (builder != null) {
@@ -73,11 +128,47 @@
     }
   }
 
+  /// Create and return a [DartFileEditBuilder] that can be used to build edits
+  /// to the Dart file with the given [path].
+  Future<DartFileEditBuilderImpl> createDartFileEditBuilder(String path) async {
+    // TODO(brianwilkerson) Make this method private when
+    //  `DartChangeBuilderImpl` is removed.
+    if (workspace == null) {
+      throw StateError("Can't create a DartFileEditBuilder without providing "
+          'either a session or a workspace');
+    }
+    if (!workspace.containsFile(path)) {
+      return null;
+    }
+
+    var session = workspace.getSession(path);
+    var result = await session.getResolvedUnit(path);
+    var state = result?.state ?? ResultState.INVALID_FILE_TYPE;
+    if (state == ResultState.INVALID_FILE_TYPE) {
+      throw AnalysisException('Cannot analyze "$path"');
+    }
+    var timeStamp = state == ResultState.VALID ? 0 : -1;
+
+    var declaredUnit = result.unit.declaredElement;
+    var libraryUnit = declaredUnit.library.definingCompilationUnit;
+
+    DartFileEditBuilderImpl libraryEditBuilder;
+    if (libraryUnit != declaredUnit) {
+      // If the receiver is a part file builder, then proactively cache the
+      // library file builder so that imports can be finalized synchronously.
+      await addDartFileEdit(libraryUnit.source.fullName, (builder) {
+        libraryEditBuilder = builder as DartFileEditBuilderImpl;
+      });
+    }
+
+    return DartFileEditBuilderImpl(this, result, timeStamp, libraryEditBuilder);
+  }
+
   /// Create and return a [FileEditBuilder] that can be used to build edits to
-  /// the file with the given [path] and [timeStamp].
-  Future<FileEditBuilderImpl> createFileEditBuilder(String path) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+  /// the file with the given [path].
+  Future<FileEditBuilderImpl> createGenericFileEditBuilder(String path) async {
+    // TODO(brianwilkerson) Make this method private when
+    //  `DartChangeBuilderImpl` is removed.
     return FileEditBuilderImpl(this, path, 0);
   }
 
@@ -419,3 +510,24 @@
     editBuilder.writeln(string);
   }
 }
+
+/// Workspace that wraps a single [AnalysisSession].
+class _SingleSessionWorkspace extends ChangeWorkspace {
+  final AnalysisSession session;
+
+  _SingleSessionWorkspace(this.session);
+
+  @override
+  bool containsFile(String path) {
+    var analysisContext = session.analysisContext;
+    return analysisContext.contextRoot.isAnalyzed(path);
+  }
+
+  @override
+  AnalysisSession getSession(String path) {
+    if (containsFile(path)) {
+      return session;
+    }
+    throw StateError('Not in a context root: $path');
+  }
+}
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
index f35f707..d1c08d5 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
@@ -12,7 +12,6 @@
 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/exception/exception.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -28,59 +27,30 @@
 import 'package:dart_style/dart_style.dart';
 
 /// A [ChangeBuilder] used to build changes in Dart files.
+@Deprecated('Use ChangeBuilder')
 class DartChangeBuilderImpl extends ChangeBuilderImpl
     implements DartChangeBuilder {
-  /// The analysis session in which the files are analyzed and edited.
-  final ChangeWorkspace workspace;
-
   /// Initialize a newly created change builder.
-  DartChangeBuilderImpl(AnalysisSession session)
-      : this.forWorkspace(_SingleSessionWorkspace(session));
+  @Deprecated('Use ChangeBuilder(session: session)')
+  DartChangeBuilderImpl(AnalysisSession session) : super(session: session);
 
-  DartChangeBuilderImpl.forWorkspace(this.workspace);
+  @Deprecated('Use ChangeBuilder(workspace: workspace)')
+  DartChangeBuilderImpl.forWorkspace(ChangeWorkspace workspace)
+      : super(workspace: workspace);
 
+  @Deprecated('Use ChangeBuilder.addDartFileEdit')
   @override
   Future<void> addFileEdit(
       String path, void Function(DartFileEditBuilder builder) buildFileEdit,
       {ImportPrefixGenerator importPrefixGenerator}) {
-    return super.addFileEdit(path, (builder) {
-      var dartBuilder = builder as DartFileEditBuilderImpl;
-      dartBuilder.importPrefixGenerator = importPrefixGenerator;
-      buildFileEdit(dartBuilder);
-    });
+    return super.addDartFileEdit(path, buildFileEdit,
+        importPrefixGenerator: importPrefixGenerator);
   }
 
   @override
-  Future<DartFileEditBuilderImpl> createFileEditBuilder(String path) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-
-    if (!workspace.containsFile(path)) {
-      return null;
-    }
-
-    var session = workspace.getSession(path);
-    var result = await session.getResolvedUnit(path);
-    var state = result?.state ?? ResultState.INVALID_FILE_TYPE;
-    if (state == ResultState.INVALID_FILE_TYPE) {
-      throw AnalysisException('Cannot analyze "$path"');
-    }
-    var timeStamp = state == ResultState.VALID ? 0 : -1;
-
-    var declaredUnit = result.unit.declaredElement;
-    var libraryUnit = declaredUnit.library.definingCompilationUnit;
-
-    DartFileEditBuilderImpl libraryEditBuilder;
-    if (libraryUnit != declaredUnit) {
-      // If the receiver is a part file builder, then proactively cache the
-      // library file builder so that imports can be finalized synchronously.
-      await addFileEdit(libraryUnit.source.fullName,
-          (DartFileEditBuilder builder) {
-        libraryEditBuilder = builder as DartFileEditBuilderImpl;
-      });
-    }
-
-    return DartFileEditBuilderImpl(this, result, timeStamp, libraryEditBuilder);
+  Future<DartFileEditBuilderImpl> createGenericFileEditBuilder(
+      String path) async {
+    return super.createDartFileEditBuilder(path);
   }
 }
 
@@ -922,10 +892,12 @@
       }
     } else if (expression is IndexExpression) {
       name = _getBaseNameFromExpression(expression.realTarget);
-      if (name.endsWith('es')) {
-        name = name.substring(0, name.length - 2);
-      } else if (name.endsWith('s')) {
-        name = name.substring(0, name.length - 1);
+      if (name != null) {
+        if (name.endsWith('es')) {
+          name = name.substring(0, name.length - 2);
+        } else if (name.endsWith('s')) {
+          name = name.substring(0, name.length - 1);
+        }
       }
     }
     // strip known prefixes
@@ -1207,8 +1179,8 @@
   /// Initialize a newly created builder to build a source file edit within the
   /// change being built by the given [changeBuilder]. The file being edited has
   /// the given [resolvedUnit] and [timeStamp].
-  DartFileEditBuilderImpl(DartChangeBuilderImpl changeBuilder,
-      this.resolvedUnit, int timeStamp, this.libraryChangeBuilder)
+  DartFileEditBuilderImpl(ChangeBuilderImpl changeBuilder, this.resolvedUnit,
+      int timeStamp, this.libraryChangeBuilder)
       : super(changeBuilder, resolvedUnit.path, timeStamp);
 
   @override
@@ -1686,24 +1658,3 @@
         other.prefix == prefix;
   }
 }
-
-/// Workspace that wraps a single [AnalysisSession].
-class _SingleSessionWorkspace extends ChangeWorkspace {
-  final AnalysisSession session;
-
-  _SingleSessionWorkspace(this.session);
-
-  @override
-  bool containsFile(String path) {
-    var analysisContext = session.analysisContext;
-    return analysisContext.contextRoot.isAnalyzed(path);
-  }
-
-  @override
-  AnalysisSession getSession(String path) {
-    if (containsFile(path)) {
-      return session;
-    }
-    throw StateError('Not in a context root: $path');
-  }
-}
diff --git a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart
index 2d2fa0e..7dd762e 100644
--- a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart
+++ b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart
@@ -4,32 +4,58 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
 
 /// A builder used to build a [SourceChange].
 ///
 /// Clients may not extend, implement or mix-in this class.
 abstract class ChangeBuilder {
-  /// Initialize a newly created change builder.
-  factory ChangeBuilder() = ChangeBuilderImpl;
+  /// Initialize a newly created change builder. If the builder will be used to
+  /// create changes for Dart files, then either a [session] or a [workspace]
+  /// must be provided (but not both).
+  factory ChangeBuilder({AnalysisSession session, ChangeWorkspace workspace}) =
+      ChangeBuilderImpl;
 
   /// Return the range of the selection for the change being built, or `null` if
   /// there is no selection.
   SourceRange get selectionRange;
 
   /// Return the source change that was built. The source change will not be
-  /// complete until all of the futures returned by [addFileEdit] have
-  /// completed.
+  /// complete until all of the futures returned by the add*FileEdit methods
+  /// have completed.
   SourceChange get sourceChange;
 
   /// Use the [buildFileEdit] function to create a collection of edits to the
   /// file with the given [path]. The edits will be added to the source change
   /// that is being built.
+  ///
+  /// The builder passed to the [buildFileEdit] function has additional support
+  /// for working with Dart source files.
+  Future<void> addDartFileEdit(
+      String path, void Function(DartFileEditBuilder builder) buildFileEdit,
+      {ImportPrefixGenerator importPrefixGenerator});
+
+  /// Use the [buildFileEdit] function to create a collection of edits to the
+  /// file with the given [path]. The edits will be added to the source change
+  /// that is being built.
+  @Deprecated('Use either addDartFileEdit or addGenericFileEdit')
   Future<void> addFileEdit(
       String path, void Function(FileEditBuilder builder) buildFileEdit);
 
+  /// Use the [buildFileEdit] function to create a collection of edits to the
+  /// file with the given [path]. The edits will be added to the source change
+  /// that is being built.
+  ///
+  /// The builder passed to the [buildFileEdit] function has no special support
+  /// for any particular kind of file.
+  Future<void> addGenericFileEdit(
+      String path, void Function(FileEditBuilder builder) buildFileEdit);
+
   /// Set the selection for the change being built to the given [position].
   void setSelection(Position position);
 }
diff --git a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
index 15ba518..1da71f5 100644
--- a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
@@ -19,10 +19,10 @@
 /// A [ChangeBuilder] used to build changes in Dart files.
 ///
 /// Clients may not extend, implement or mix-in this class.
+@Deprecated('Use ChangeBuilder')
 abstract class DartChangeBuilder implements ChangeBuilder {
   /// Initialize a newly created change builder.
-  ///
-  /// TODO(scheglov) Replace this constructor with using workspace.
+  @Deprecated('Use ChangeBuilder(session: session)')
   factory DartChangeBuilder(AnalysisSession session) = DartChangeBuilderImpl;
 
   /// Use the [buildFileEdit] function to create a collection of edits to the
@@ -31,6 +31,7 @@
   ///
   /// If [importPrefixGenerator] is provided, it will be asked to generate an
   /// import prefix for every newly imported library.
+  @Deprecated('Use ChangeBuilder.addDartFileEdit')
   @override
   Future<void> addFileEdit(
       String path, void Function(DartFileEditBuilder builder) buildFileEdit,
diff --git a/pkg/analyzer_plugin/lib/utilities/completion/relevance.dart b/pkg/analyzer_plugin/lib/utilities/completion/relevance.dart
index db06369..3d9bbd2 100644
--- a/pkg/analyzer_plugin/lib/utilities/completion/relevance.dart
+++ b/pkg/analyzer_plugin/lib/utilities/completion/relevance.dart
@@ -101,9 +101,5 @@
 
   /// The relevance boost used when suggesting an enum constant from an
   /// available declaration set.
-  static const int availableEnumConstant = 100;
-
-  /// The relevance boost used when suggesting a constant value / constructor
-  /// from an available declaration set in a constant context.
-  static const int constInConstantContext = 200;
+  static const int availableEnumConstant = 250;
 }
diff --git a/pkg/analyzer_plugin/lib/utilities/range_factory.dart b/pkg/analyzer_plugin/lib/utilities/range_factory.dart
index 1ef5dbc..c791818 100644
--- a/pkg/analyzer_plugin/lib/utilities/range_factory.dart
+++ b/pkg/analyzer_plugin/lib/utilities/range_factory.dart
@@ -57,14 +57,18 @@
   /// trailing comma as appropriate) in the containing [list].
   SourceRange nodeInList<T extends AstNode>(NodeList<T> list, T item) {
     if (list.length == 1) {
+      var nextToken = item.endToken.next;
+      if (nextToken.type == TokenType.COMMA) {
+        return startEnd(item, nextToken);
+      }
       return node(item);
     }
     final index = list.indexOf(item);
-    // Remove trailing comma.
     if (index == 0) {
+      // Remove the trailing comma.
       return startStart(item, list[1]);
     } else {
-      // Remove leading comma.
+      // Remove the leading comma.
       return endEnd(list[index - 1], item);
     }
   }
diff --git a/pkg/analyzer_plugin/pubspec.yaml b/pkg/analyzer_plugin/pubspec.yaml
index 85b313d3..df17df9 100644
--- a/pkg/analyzer_plugin/pubspec.yaml
+++ b/pkg/analyzer_plugin/pubspec.yaml
@@ -1,6 +1,6 @@
 name: analyzer_plugin
 description: A framework and support code for building plugins for the analysis server.
-version: 0.2.4
+version: 0.3.0
 author: Dart Team <misc@dartlang.org>
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_plugin
 
@@ -8,7 +8,7 @@
   sdk: '>=2.3.0 <3.0.0'
 
 dependencies:
-  analyzer: '^0.39.0'
+  analyzer: '^0.39.12'
   charcode: '^1.1.0'
   dart_style: '^1.2.0'
   html: '>=0.13.1 <0.15.0'
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_core_test.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_core_test.dart
index 866a7a2..711cf55 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_core_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_core_test.dart
@@ -23,7 +23,7 @@
   Future<void> test_createFileEditBuilder() async {
     var builder = ChangeBuilderImpl();
     var path = '/test.dart';
-    var fileEditBuilder = await builder.createFileEditBuilder(path);
+    var fileEditBuilder = await builder.createGenericFileEditBuilder(path);
     expect(fileEditBuilder, const TypeMatcher<FileEditBuilder>());
     var fileEdit = fileEditBuilder.fileEdit;
     expect(fileEdit.file, path);
@@ -46,7 +46,7 @@
   void test_sourceChange_emptyEdit() async {
     var builder = ChangeBuilderImpl();
     var path = '/test.dart';
-    await builder.addFileEdit(path, (FileEditBuilder builder) {});
+    await builder.addGenericFileEdit(path, (builder) {});
     var sourceChange = builder.sourceChange;
     expect(sourceChange, isNotNull);
     expect(sourceChange.edits, isEmpty);
@@ -68,7 +68,7 @@
   Future<void> test_sourceChange_oneChange() async {
     var builder = ChangeBuilderImpl();
     var path = '/test.dart';
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
       builder.addSimpleInsertion(0, '_');
     });
     builder.getLinkedEditGroup('a');
@@ -89,9 +89,9 @@
     var builder = ChangeBuilderImpl();
     var offset = 10;
     var text = 'content';
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(10, (EditBuilder builder) {
-        builder.addLinkedEdit('a', (LinkedEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addInsertion(10, (builder) {
+        builder.addLinkedEdit('a', (builder) {
           builder.write(text);
         });
         var sourceEdit = (builder as EditBuilderImpl).sourceEdit;
@@ -114,8 +114,8 @@
     var builder = ChangeBuilderImpl();
     var offset = 10;
     var text = 'content';
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(10, (EditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addInsertion(10, (builder) {
         builder.addSimpleLinkedEdit('a', text);
         var sourceEdit = (builder as EditBuilderImpl).sourceEdit;
         expect(sourceEdit.replacement, text);
@@ -135,8 +135,8 @@
 
   Future<void> test_createLinkedEditBuilder() async {
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(10, (EditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addInsertion(10, (builder) {
         var linkBuilder =
             (builder as EditBuilderImpl).createLinkedEditBuilder();
         expect(linkBuilder, const TypeMatcher<LinkedEditBuilder>());
@@ -146,7 +146,7 @@
 
   Future<void> test_selectHere() async {
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
       builder.addInsertion(10, (EditBuilder builder) {
         builder.selectHere();
       });
@@ -158,8 +158,8 @@
     var builder = ChangeBuilderImpl();
     var offset = 10;
     var text = 'write';
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(offset, (EditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addInsertion(offset, (builder) {
         builder.write(text);
       });
     });
@@ -186,9 +186,8 @@
     var builder = ChangeBuilderImpl();
     var offset = 52;
     var length = 12;
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addReplacement(SourceRange(offset, length),
-          (EditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addReplacement(SourceRange(offset, length), (builder) {
         builder.writeln();
       });
     });
@@ -216,9 +215,8 @@
     var offset = 52;
     var length = 12;
     var text = 'writeln';
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addReplacement(SourceRange(offset, length),
-          (EditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addReplacement(SourceRange(offset, length), (builder) {
         builder.writeln(text);
       });
     });
@@ -251,7 +249,7 @@
     var offset = 23;
     var length = 7;
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
       builder.addDeletion(SourceRange(offset, length));
     });
     var edits = builder.sourceChange.edits[0].edits;
@@ -263,8 +261,8 @@
 
   Future<void> test_addInsertion() async {
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(10, (EditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addInsertion(10, (builder) {
         expect(builder, isNotNull);
       });
     });
@@ -273,7 +271,7 @@
   Future<void> test_addLinkedPosition() async {
     var builder = ChangeBuilderImpl();
     var groupName = 'a';
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
       builder.addLinkedPosition(SourceRange(3, 6), groupName);
     });
 
@@ -288,8 +286,8 @@
 
   Future<void> test_addReplacement() async {
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addReplacement(SourceRange(4, 5), (EditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addReplacement(SourceRange(4, 5), (builder) {
         expect(builder, isNotNull);
       });
     });
@@ -299,7 +297,7 @@
     var offset = 23;
     var text = 'xyz';
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
       builder.addSimpleInsertion(offset, text);
     });
     var edits = builder.sourceChange.edits[0].edits;
@@ -314,7 +312,7 @@
     var length = 7;
     var text = 'xyz';
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
       builder.addSimpleReplacement(SourceRange(offset, length), text);
     });
     var edits = builder.sourceChange.edits[0].edits;
@@ -326,7 +324,7 @@
 
   Future<void> test_createEditBuilder() async {
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
       var offset = 4;
       var length = 5;
       var editBuilder =
@@ -347,9 +345,9 @@
   Future<void> test_addSuggestion() async {
     var groupName = 'a';
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(10, (EditBuilder builder) {
-        builder.addLinkedEdit(groupName, (LinkedEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addInsertion(10, (builder) {
+        builder.addLinkedEdit(groupName, (builder) {
           builder.write('A');
           builder.addSuggestion(LinkedEditSuggestionKind.TYPE, 'B');
         });
@@ -363,9 +361,9 @@
   Future<void> test_addSuggestion_zeroLength() async {
     var groupName = 'a';
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(10, (EditBuilder builder) {
-        builder.addLinkedEdit(groupName, (LinkedEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addInsertion(10, (builder) {
+        builder.addLinkedEdit(groupName, (builder) {
           builder.addSuggestion(LinkedEditSuggestionKind.TYPE, 'A');
         });
       });
@@ -377,9 +375,9 @@
   Future<void> test_addSuggestions() async {
     var groupName = 'a';
     var builder = ChangeBuilderImpl();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(10, (EditBuilder builder) {
-        builder.addLinkedEdit(groupName, (LinkedEditBuilder builder) {
+    await builder.addGenericFileEdit(path, (builder) {
+      builder.addInsertion(10, (builder) {
+        builder.addLinkedEdit(groupName, (builder) {
           builder.write('A');
           builder.addSuggestions(LinkedEditSuggestionKind.TYPE, ['B', 'C']);
         });
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
index 86904fb..3c84ed8 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
@@ -12,9 +12,8 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/test_utilities/find_node.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart'
+    show DartLinkedEditBuilderImpl;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -23,7 +22,6 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(DartChangeBuilderImplTest);
     defineReflectiveTests(DartEditBuilderImplTest);
     defineReflectiveTests(DartFileEditBuilderImplTest);
     defineReflectiveTests(DartLinkedEditBuilderImplTest);
@@ -33,20 +31,6 @@
 }
 
 @reflectiveTest
-class DartChangeBuilderImplTest extends AbstractContextTest
-    with DartChangeBuilderMixin {
-  Future<void> test_createFileEditBuilder() async {
-    var path = convertPath('/home/test/lib/test.dart');
-    addSource(path, 'library test;');
-    var builder = newBuilder();
-    var fileEditBuilder = await builder.createFileEditBuilder(path);
-    expect(fileEditBuilder, const TypeMatcher<DartFileEditBuilder>());
-    var fileEdit = fileEditBuilder.fileEdit;
-    expect(fileEdit.file, path);
-  }
-}
-
-@reflectiveTest
 class DartEditBuilderImplTest extends AbstractContextTest
     with DartChangeBuilderMixin {
   Future<void> test_writeClassDeclaration_interfaces() async {
@@ -55,10 +39,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeClassDeclaration('C', interfaces: [typeA]);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeClassDeclaration('C', interfaces: [typeA]);
       });
     });
     var edit = getEdit(builder);
@@ -71,10 +54,9 @@
     addSource(path, '');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeClassDeclaration('C', isAbstract: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeClassDeclaration('C', isAbstract: true);
       });
     });
     var edit = getEdit(builder);
@@ -86,10 +68,9 @@
     addSource(path, '');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeClassDeclaration('C',
-            membersWriter: () {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeClassDeclaration('C', membersWriter: () {
           builder.write('/**/');
         });
       });
@@ -104,10 +85,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeClassDeclaration('C', mixins: [typeA]);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeClassDeclaration('C', mixins: [typeA]);
       });
     });
     var edit = getEdit(builder);
@@ -122,10 +102,9 @@
     DartType typeB = await _getType(path, 'B');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeClassDeclaration('C', mixins: [typeB], superclass: typeA);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeClassDeclaration('C', mixins: [typeB], superclass: typeA);
       });
     });
     var edit = getEdit(builder);
@@ -138,10 +117,9 @@
     addSource(path, '');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeClassDeclaration('C', nameGroupName: 'name');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeClassDeclaration('C', nameGroupName: 'name');
       });
     });
     var edit = getEdit(builder);
@@ -160,9 +138,9 @@
     DartType typeB = await _getType(path, 'B');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeClassDeclaration('C',
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeClassDeclaration('C',
             superclass: typeB, superclassGroupName: 'superclass');
       });
     });
@@ -181,8 +159,8 @@
     addSource(path, 'class C {}');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (DartFileEditBuilder builder) {
-      builder.addInsertion(9, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(9, (builder) {
         builder.writeConstructorDeclaration('A', bodyWriter: () {
           builder.write(' { print(42); }');
         });
@@ -202,8 +180,8 @@
 ''');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (DartFileEditBuilder builder) {
-      builder.addInsertion(42, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(42, (builder) {
         builder.writeConstructorDeclaration('A', fieldNames: ['a', 'bb']);
       });
     });
@@ -216,8 +194,8 @@
     addSource(path, 'class C {}');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (DartFileEditBuilder builder) {
-      builder.addInsertion(9, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(9, (builder) {
         builder.writeConstructorDeclaration('A', initializerWriter: () {
           builder.write('super()');
         });
@@ -232,8 +210,8 @@
     addSource(path, 'class C {}');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (DartFileEditBuilder builder) {
-      builder.addInsertion(9, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(9, (builder) {
         builder.writeConstructorDeclaration('A', parameterWriter: () {
           builder.write('int a, {this.b}');
         });
@@ -249,10 +227,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeFieldDeclaration('f',
-            initializerWriter: () {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeFieldDeclaration('f', initializerWriter: () {
           builder.write('e');
         });
       });
@@ -267,9 +244,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeFieldDeclaration('f', isConst: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeFieldDeclaration('f', isConst: true);
       });
     });
     var edit = getEdit(builder);
@@ -282,10 +259,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeFieldDeclaration('f', isConst: true, isFinal: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeFieldDeclaration('f', isConst: true, isFinal: true);
       });
     });
     var edit = getEdit(builder);
@@ -299,10 +275,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeFieldDeclaration('f', isConst: true, type: typeA);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeFieldDeclaration('f', isConst: true, type: typeA);
       });
     });
     var edit = getEdit(builder);
@@ -315,9 +290,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeFieldDeclaration('f', isFinal: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeFieldDeclaration('f', isFinal: true);
       });
     });
     var edit = getEdit(builder);
@@ -331,10 +306,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeFieldDeclaration('f', isFinal: true, type: typeA);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeFieldDeclaration('f', isFinal: true, type: typeA);
       });
     });
     var edit = getEdit(builder);
@@ -347,9 +321,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeFieldDeclaration('f', isStatic: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeFieldDeclaration('f', isStatic: true);
       });
     });
     var edit = getEdit(builder);
@@ -362,10 +336,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeFieldDeclaration('f', nameGroupName: 'name');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeFieldDeclaration('f', nameGroupName: 'name');
       });
     });
     var edit = getEdit(builder);
@@ -387,10 +360,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeFieldDeclaration('f', type: typeA, typeGroupName: 'type');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeFieldDeclaration('f', type: typeA, typeGroupName: 'type');
       });
     });
     var edit = getEdit(builder);
@@ -412,10 +384,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeFunctionDeclaration('fib',
-            bodyWriter: () {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeFunctionDeclaration('fib', bodyWriter: () {
           builder.write('{ ... }');
         });
       });
@@ -431,10 +402,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeFunctionDeclaration('fib', nameGroupName: 'name');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeFunctionDeclaration('fib', nameGroupName: 'name');
       });
     });
     var edit = getEdit(builder);
@@ -454,10 +424,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeFunctionDeclaration('fib',
-            parameterWriter: () {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeFunctionDeclaration('fib', parameterWriter: () {
           builder.write('p, q, r');
         });
       });
@@ -475,9 +444,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeFunctionDeclaration('fib',
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeFunctionDeclaration('fib',
             returnType: typeA, returnTypeGroupName: 'type');
       });
     });
@@ -497,10 +466,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeGetterDeclaration('g',
-            bodyWriter: () {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeGetterDeclaration('g', bodyWriter: () {
           builder.write('{}');
         });
       });
@@ -515,10 +483,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeGetterDeclaration('g', isStatic: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeGetterDeclaration('g', isStatic: true);
       });
     });
     var edit = getEdit(builder);
@@ -531,10 +498,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeGetterDeclaration('g', nameGroupName: 'name');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeGetterDeclaration('g', nameGroupName: 'name');
       });
     });
     var edit = getEdit(builder);
@@ -556,9 +522,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeGetterDeclaration('g',
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeGetterDeclaration('g',
             returnType: typeA, returnTypeGroupName: 'returnType');
       });
     });
@@ -584,10 +550,9 @@
     await driver.getResult(path);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(11, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeLocalVariableDeclaration('foo',
-            initializerWriter: () {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(11, (builder) {
+        builder.writeLocalVariableDeclaration('foo', initializerWriter: () {
           builder.write('null');
         });
       });
@@ -606,10 +571,9 @@
     await driver.getResult(path);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(11, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeLocalVariableDeclaration('foo', nameGroupName: 'name');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(11, (builder) {
+        builder.writeLocalVariableDeclaration('foo', nameGroupName: 'name');
       });
     });
     var edit = getEdit(builder);
@@ -633,10 +597,9 @@
     await driver.getResult(path);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(11, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeLocalVariableDeclaration('foo', isConst: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(11, (builder) {
+        builder.writeLocalVariableDeclaration('foo', isConst: true);
       });
     });
     var edit = getEdit(builder);
@@ -654,10 +617,9 @@
     await driver.getResult(path);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(11, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeLocalVariableDeclaration('foo', isFinal: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(11, (builder) {
+        builder.writeLocalVariableDeclaration('foo', isFinal: true);
       });
     });
     var edit = getEdit(builder);
@@ -677,9 +639,9 @@
     var A = unit.declarations[1] as ClassDeclaration;
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(11, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeLocalVariableDeclaration(
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(11, (builder) {
+        builder.writeLocalVariableDeclaration(
           'foo',
           initializerWriter: () {
             builder.write('null');
@@ -708,9 +670,9 @@
     var A = unit.declarations[1] as ClassDeclaration;
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(11, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeLocalVariableDeclaration(
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(11, (builder) {
+        builder.writeLocalVariableDeclaration(
           'foo',
           type: A.declaredElement.instantiate(
             typeArguments: [],
@@ -744,9 +706,9 @@
     var A = unit.declarations[1] as ClassDeclaration;
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(11, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeLocalVariableDeclaration(
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(11, (builder) {
+        builder.writeLocalVariableDeclaration(
           'foo',
           isFinal: true,
           type: A.declaredElement.instantiate(
@@ -773,10 +735,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeMixinDeclaration('M', interfaces: [typeA]);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeMixinDeclaration('M', interfaces: [typeA]);
       });
     });
     var edit = getEdit(builder);
@@ -792,9 +753,9 @@
     DartType typeB = await _getType(path, 'B');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeMixinDeclaration('M',
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeMixinDeclaration('M',
             interfaces: [typeA], superclassConstraints: [typeB]);
       });
     });
@@ -808,10 +769,9 @@
     addSource(path, '');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeMixinDeclaration('M',
-            membersWriter: () {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeMixinDeclaration('M', membersWriter: () {
           builder.write('/**/');
         });
       });
@@ -825,10 +785,9 @@
     addSource(path, '');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeMixinDeclaration('M', nameGroupName: 'name');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeMixinDeclaration('M', nameGroupName: 'name');
       });
     });
     var edit = getEdit(builder);
@@ -847,10 +806,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(0, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeMixinDeclaration('M', superclassConstraints: [typeA]);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(0, (builder) {
+        builder.writeMixinDeclaration('M', superclassConstraints: [typeA]);
       });
     });
     var edit = getEdit(builder);
@@ -863,9 +821,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeParameter('a');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameter('a');
       });
     });
     var edit = getEdit(builder);
@@ -879,9 +837,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeParameter('a', type: typeA);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameter('a', type: typeA);
       });
     });
     var edit = getEdit(builder);
@@ -906,10 +864,9 @@
     var argument = invocation.argumentList.arguments[0];
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(2, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeParameterMatchingArgument(argument, 0, <String>{});
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(2, (builder) {
+        builder.writeParameterMatchingArgument(argument, 0, <String>{});
       });
     });
     var edit = getEdit(builder);
@@ -927,9 +884,9 @@
     var elements = parameters.parameters.map((p) => p.declaredElement);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeParameters(elements);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameters(elements);
       });
     });
     var edit = getEdit(builder);
@@ -947,9 +904,9 @@
     var elements = parameters.parameters.map((p) => p.declaredElement);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeParameters(elements);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameters(elements);
       });
     });
     var edit = getEdit(builder);
@@ -967,9 +924,9 @@
     var elements = parameters.parameters.map((p) => p.declaredElement);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeParameters(elements);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParameters(elements);
       });
     });
     var edit = getEdit(builder);
@@ -990,10 +947,9 @@
     var invocation = statement.expression as MethodInvocation;
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeParametersMatchingArguments(invocation.argumentList);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParametersMatchingArguments(invocation.argumentList);
       });
     });
     var edit = getEdit(builder);
@@ -1014,10 +970,9 @@
     var invocation = statement.expression as MethodInvocation;
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeParametersMatchingArguments(invocation.argumentList);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeParametersMatchingArguments(invocation.argumentList);
       });
     });
     var edit = getEdit(builder);
@@ -1042,8 +997,8 @@
     var fooElement = aElement.methods[0];
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (DartFileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
         builder.writeReference(fooElement);
       });
     });
@@ -1064,8 +1019,8 @@
     var aElement = await _getTopLevelAccessorElement(aPath, 'a');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (DartFileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
         builder.writeReference(aElement);
       });
     });
@@ -1086,8 +1041,8 @@
     var aElement = await _getTopLevelAccessorElement(aPath, 'a');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (DartFileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
         builder.writeReference(aElement);
       });
     });
@@ -1106,8 +1061,8 @@
     var aElement = await _getTopLevelAccessorElement(aPath, 'a');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (DartFileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
         builder.writeReference(aElement);
       });
     });
@@ -1123,10 +1078,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeSetterDeclaration('s',
-            bodyWriter: () {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeSetterDeclaration('s', bodyWriter: () {
           builder.write('{/* TODO */}');
         });
       });
@@ -1141,10 +1095,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeSetterDeclaration('s', isStatic: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeSetterDeclaration('s', isStatic: true);
       });
     });
     var edit = getEdit(builder);
@@ -1157,10 +1110,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeSetterDeclaration('s', nameGroupName: 'name');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeSetterDeclaration('s', nameGroupName: 'name');
       });
     });
     var edit = getEdit(builder);
@@ -1182,9 +1134,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeSetterDeclaration('s',
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeSetterDeclaration('s',
             parameterType: typeA, parameterTypeGroupName: 'returnType');
       });
     });
@@ -1207,10 +1159,10 @@
     var unit = (await driver.getResult(path))?.unit;
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
         var typeProvider = unit.declaredElement.library.typeProvider;
-        (builder as DartEditBuilder).writeType(typeProvider.dynamicType);
+        builder.writeType(typeProvider.dynamicType);
       });
     });
     var edit = getEdit(builder);
@@ -1249,9 +1201,9 @@
     var typeBofA = await _getType(path, 'B', typeArguments: [typeA]);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeType(typeBofA);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeType(typeBofA);
       });
     });
     var edit = getEdit(builder);
@@ -1265,9 +1217,9 @@
     DartType typeC = await _getType(path, 'C');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeType(typeC, groupName: 'type');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeType(typeC, groupName: 'type');
       });
     });
     var edit = getEdit(builder);
@@ -1286,10 +1238,10 @@
     DartType typeC = await _getType(path, 'C');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder)
-            .writeType(typeC, addSupertypeProposals: true, groupName: 'type');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeType(typeC,
+            addSupertypeProposals: true, groupName: 'type');
       });
     });
     var edit = getEdit(builder);
@@ -1321,7 +1273,7 @@
     );
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (builder) {
+    await builder.addDartFileEdit(path, (builder) {
       builder.addInsertion(content.length, (builder) {
         // "T" cannot be written, because we are outside of "A".
         // So, we also should not create linked groups.
@@ -1345,9 +1297,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeType(null);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeType(null);
       });
     });
     var edit = getEdit(builder);
@@ -1380,7 +1332,7 @@
     }
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (builder) {
+    await builder.addDartFileEdit(path, (builder) {
       builder.addInsertion(content.length - 1, (builder) {
         builder.writeType(a1.instantiate(
           typeArguments: [],
@@ -1420,11 +1372,10 @@
     var unit = (await driver.getResult(path))?.unit;
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
         var typeProvider = unit.declaredElement.library.typeProvider;
-        (builder as DartEditBuilder)
-            .writeType(typeProvider.dynamicType, required: true);
+        builder.writeType(typeProvider.dynamicType, required: true);
       });
     });
     var edit = getEdit(builder);
@@ -1438,9 +1389,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeType(typeA, required: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeType(typeA, required: true);
       });
     });
     var edit = getEdit(builder);
@@ -1453,9 +1404,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeType(null, required: true);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeType(null, required: true);
       });
     });
     var edit = getEdit(builder);
@@ -1469,9 +1420,9 @@
     DartType typeA = await _getType(path, 'A');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeType(typeA);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeType(typeA);
       });
     });
     var edit = getEdit(builder);
@@ -1493,9 +1444,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilderImpl).writeTypes([]);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeTypes([]);
       });
     });
     var edit = getEdit(builder);
@@ -1510,9 +1461,9 @@
     DartType typeB = await _getType(path, 'B');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilderImpl).writeTypes([typeA, typeB]);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeTypes([typeA, typeB]);
       });
     });
     var edit = getEdit(builder);
@@ -1525,9 +1476,9 @@
     addSource(path, content);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilderImpl).writeTypes(null);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeTypes(null);
       });
     });
     var edit = getEdit(builder);
@@ -1542,10 +1493,9 @@
     DartType typeB = await _getType(path, 'B');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 1, (EditBuilder builder) {
-        (builder as DartEditBuilderImpl)
-            .writeTypes([typeA, typeB], prefix: 'implements ');
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 1, (builder) {
+        builder.writeTypes([typeA, typeB], prefix: 'implements ');
       });
     });
     var edit = getEdit(builder);
@@ -1560,7 +1510,7 @@
     var f = await _getTopLevelAccessorElement(path, 'v');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (builder) {
+    await builder.addDartFileEdit(path, (builder) {
       builder.addInsertion(content.length - 1, (builder) {
         builder.writeType(f.returnType);
       });
@@ -1605,9 +1555,8 @@
     var body = findNode.functionBody('{}');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      (builder as DartFileEditBuilder)
-          .convertFunctionFromSyncToAsync(body, resolvedUnit.typeProvider);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.convertFunctionFromSyncToAsync(body, resolvedUnit.typeProvider);
     });
     var edits = getEdits(builder);
     expect(edits, hasLength(1));
@@ -1623,9 +1572,8 @@
     var body = findNode.functionBody('{}');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      (builder as DartFileEditBuilder)
-          .convertFunctionFromSyncToAsync(body, resolvedUnit.typeProvider);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.convertFunctionFromSyncToAsync(body, resolvedUnit.typeProvider);
     });
     var edits = getEdits(builder);
     expect(edits, hasLength(2));
@@ -1633,23 +1581,6 @@
     expect(edits[1].replacement, equalsIgnoringWhitespace('Future<String>'));
   }
 
-  Future<void> test_createEditBuilder() async {
-    var path = convertPath('/home/test/lib/test.dart');
-    addSource(path, 'library test;');
-    var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      var offset = 4;
-      var length = 5;
-      var editBuilder = (builder as DartFileEditBuilderImpl)
-          .createEditBuilder(offset, length);
-      expect(editBuilder, const TypeMatcher<DartEditBuilder>());
-      var sourceEdit = editBuilder.sourceEdit;
-      expect(sourceEdit.length, length);
-      expect(sourceEdit.offset, offset);
-      expect(sourceEdit.replacement, isEmpty);
-    });
-  }
-
   Future<void> test_format_hasEdits() async {
     var initialCode = r'''
 void functionBefore() {
@@ -1670,7 +1601,7 @@
     newFile(path, content: initialCode);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (builder) {
+    await builder.addDartFileEdit(path, (builder) {
       builder.addInsertion(34, (builder) {
         builder.writeln('  3 +  4;');
       });
@@ -1722,7 +1653,7 @@
     newFile(path, content: initialCode);
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (builder) {
+    await builder.addDartFileEdit(path, (builder) {
       builder.format(SourceRange(37, 39));
     });
 
@@ -1754,9 +1685,8 @@
     var type = findNode.typeAnnotation('String');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      (builder as DartFileEditBuilder)
-          .replaceTypeWithFuture(type, resolvedUnit.typeProvider);
+    await builder.addDartFileEdit(path, (builder) {
+      builder.replaceTypeWithFuture(type, resolvedUnit.typeProvider);
     });
     var edits = getEdits(builder);
     expect(edits, hasLength(1));
@@ -2237,7 +2167,7 @@
     var path = convertPath('/home/test/lib/test.dart');
     addSource(path, initialCode);
     var builder = newBuilder();
-    await builder.addFileEdit(path, (DartFileEditBuilder builder) {
+    await builder.addDartFileEdit(path, (builder) {
       for (var i = 0; i < uriList.length; ++i) {
         var uri = Uri.parse(uriList[i]);
         builder.importLibrary(uri);
@@ -2812,9 +2742,9 @@
     var displayBuffer = displayText != null ? StringBuffer() : null;
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (FileEditBuilder builder) {
-      builder.addInsertion(content.length - 2, (EditBuilder builder) {
-        (builder as DartEditBuilder).writeOverride(
+    await builder.addDartFileEdit(path, (builder) {
+      builder.addInsertion(content.length - 2, (builder) {
+        builder.writeOverride(
           inherited,
           displayTextBuffer: displayBuffer,
           invokeSuper: invokeSuper,
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/dart_change_builder_mixin.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/dart_change_builder_mixin.dart
index 91e9152..9bff4bb 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/dart_change_builder_mixin.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/dart_change_builder_mixin.dart
@@ -3,20 +3,19 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:test/test.dart';
 
 import '../../../../support/abstract_context.dart';
 
 mixin DartChangeBuilderMixin implements AbstractContextTest {
-  SourceEdit getEdit(DartChangeBuilder builder) {
+  SourceEdit getEdit(ChangeBuilder builder) {
     var edits = getEdits(builder);
     expect(edits, hasLength(1));
     return edits[0];
   }
 
-  List<SourceEdit> getEdits(DartChangeBuilder builder) {
+  List<SourceEdit> getEdits(ChangeBuilder builder) {
     var sourceChange = builder.sourceChange;
     expect(sourceChange, isNotNull);
 
@@ -29,6 +28,5 @@
   }
 
   /// Return a newly created Dart change builder.
-  DartChangeBuilderImpl newBuilder() =>
-      DartChangeBuilder(session) as DartChangeBuilderImpl;
+  ChangeBuilder newBuilder() => ChangeBuilder(session: session);
 }
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/import_library_element_test.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/import_library_element_test.dart
index 6f04e0f..f108f1c 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/import_library_element_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/import_library_element_test.dart
@@ -5,7 +5,7 @@
 import 'dart:async';
 
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -446,7 +446,7 @@
 }
 
 class _Base extends AbstractContextTest with DartChangeBuilderMixin {
-  void _assertEmptyChange(DartChangeBuilderImpl builder) {
+  void _assertEmptyChange(ChangeBuilder builder) {
     var change = builder.sourceChange;
     expect(change, isNotNull);
     expect(change.edits, isEmpty);
@@ -474,7 +474,7 @@
     expect(requestedElement, isNotNull, reason: '`$name` in $uriStr');
 
     var builder = newBuilder();
-    await builder.addFileEdit(path, (builder) {
+    await builder.addDartFileEdit(path, (builder) {
       var uri = Uri.parse(uriStr);
       var result = builder.importLibraryElement(uri);
       expect(result.prefix, expectedPrefix);
diff --git a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
index 8648555..9ab8590 100644
--- a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
@@ -4,6 +4,7 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart';
+import 'package:analyzer/source/source_range.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
@@ -14,12 +15,22 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(SourceRangesTest);
+    defineReflectiveTests(RangeFactoryTest);
   });
 }
 
 @reflectiveTest
-class SourceRangesTest extends AbstractSingleUnitTest {
+class RangeFactoryTest extends AbstractSingleUnitTest {
+  /// Assuming that the test code starts with a function whose block body starts
+  /// with a method invocation, return the list of arguments in that invocation.
+  NodeList<Expression> get _argumentList {
+    var f = testUnit.declarations[0] as FunctionDeclaration;
+    var body = f.functionExpression.body as BlockFunctionBody;
+    var statement = body.block.statements[0] as ExpressionStatement;
+    var invocation = statement.expression as MethodInvocation;
+    return invocation.argumentList.arguments;
+  }
+
   Future<void> test_elementName() async {
     await resolveTestUnit('class ABC {}');
     var element = findElement('ABC');
@@ -61,6 +72,117 @@
     expect(range.node(mainName), SourceRange(0, 4));
   }
 
+  Future<void> test_nodeInList_argumentList_first_named() async {
+    await resolveTestUnit('''
+void f() {
+  g(a: 1, b: 2);
+}
+void g({int a, int b}) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[0]), SourceRange(15, 6));
+  }
+
+  Future<void> test_nodeInList_argumentList_first_positional() async {
+    await resolveTestUnit('''
+void f() {
+  g(1, 2);
+}
+void g(int a, int b) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[0]), SourceRange(15, 3));
+  }
+
+  Future<void> test_nodeInList_argumentList_last_named() async {
+    await resolveTestUnit('''
+void f() {
+  g(a: 1, b: 2);
+}
+void g({int a, int b}) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[1]), SourceRange(19, 6));
+  }
+
+  Future<void> test_nodeInList_argumentList_last_positional() async {
+    await resolveTestUnit('''
+void f() {
+  g(1, 2);
+}
+void g(int a, int b) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[1]), SourceRange(16, 3));
+  }
+
+  Future<void> test_nodeInList_argumentList_middle_named() async {
+    await resolveTestUnit('''
+void f() {
+  g(a: 1, b: 2, c: 3);
+}
+void g({int a, int b, int c}) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[1]), SourceRange(19, 6));
+  }
+
+  Future<void> test_nodeInList_argumentList_middle_positional() async {
+    await resolveTestUnit('''
+void f() {
+  g(1, 2, 3);
+}
+void g(int a, int b, int c) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[1]), SourceRange(16, 3));
+  }
+
+  Future<void> test_nodeInList_argumentList_only_named() async {
+    await resolveTestUnit('''
+void f() {
+  g(a: 1);
+}
+void g({int a}) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[0]), SourceRange(15, 4));
+  }
+
+  Future<void> test_nodeInList_argumentList_only_named_trailingComma() async {
+    await resolveTestUnit('''
+void f() {
+  g(a: 1,);
+}
+void g({int a}) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[0]), SourceRange(15, 5));
+  }
+
+  Future<void> test_nodeInList_argumentList_only_positional() async {
+    await resolveTestUnit('''
+void f() {
+  g(1);
+}
+void g(int a) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[0]), SourceRange(15, 1));
+  }
+
+  Future<void>
+      test_nodeInList_argumentList_only_positional_trailingComma() async {
+    await resolveTestUnit('''
+void f() {
+  g(1,);
+}
+void g(int a) {}
+''');
+    var list = _argumentList;
+    expect(range.nodeInList(list, list[0]), SourceRange(15, 2));
+  }
+
   Future<void> test_nodes() async {
     await resolveTestUnit(' main() {}');
     var mainFunction = testUnit.declarations[0] as FunctionDeclaration;
diff --git a/pkg/build_integration/LICENSE b/pkg/build_integration/LICENSE
new file mode 100644
index 0000000..c4dc9ba
--- /dev/null
+++ b/pkg/build_integration/LICENSE
@@ -0,0 +1,26 @@
+Copyright 2018, the Dart project authors. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+    * Neither the name of Google Inc. nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart
index 563d438..aea3bac 100644
--- a/pkg/compiler/lib/src/commandline_options.dart
+++ b/pkg/compiler/lib/src/commandline_options.dart
@@ -22,12 +22,16 @@
   static const String enableAssertMessage = '--assert-message';
   static const String enableCheckedMode = '--enable-checked-mode';
   static const String enableAsserts = '--enable-asserts';
+  static const String enableNullAssertions = '--null-assertions';
   static const String enableDiagnosticColors = '--enable-diagnostic-colors';
   static const String experimentalTrackAllocations =
       '--experimental-track-allocations';
   static const String experimentalAllocationsPath =
       '--experimental-allocations-path';
 
+  static const String experimentalWrapped = '--experimental-wrapped';
+  static const String experimentalPowersets = '--experimental-powersets';
+
   // Temporary experiment for code generation of locals for frequently used
   // 'this' and constants.
   static const String experimentLocalNames = '--experiment-code-1';
@@ -104,6 +108,8 @@
   static const String newDeferredSplit = '--new-deferred-split';
   static const String reportInvalidInferredDeferredTypes =
       '--report-invalid-deferred-types';
+  static const String deferClassTypes = '--defer-class-types';
+  static const String noDeferClassTypes = '--no-defer-class-types';
 
   /// Flag for a combination of flags for 'production' mode.
   static const String benchmarkingProduction = '--benchmarking-production';
@@ -152,6 +158,9 @@
       '${Flags.enableLanguageExperiments}|'
       '${Flags.enableLanguageExperiments}=.*';
 
+  static const String multiRoots = '--multi-root=.+';
+  static const String multiRootScheme = '--multi-root-scheme=.+';
+
   // Experimental options.
   static const String resolutionInput = '--resolution-input=.+';
   static const String bazelPaths = '--bazel-paths=.+';
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index dfcea46..48db7fd 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -2283,6 +2283,15 @@
   /// Calls [f] for each supertype of [cls].
   void forEachSupertype(ClassEntity cls, void f(InterfaceType supertype));
 
+  /// Calls [f] for each SuperClass of [cls].
+  void forEachSuperClass(ClassEntity cls, void f(ClassEntity superClass)) {
+    for (var superClass = getSuperClass(cls);
+        superClass != null;
+        superClass = getSuperClass(superClass)) {
+      f(superClass);
+    }
+  }
+
   /// Create the instantiation of [cls] with the given [typeArguments] and
   /// [nullability].
   InterfaceType createInterfaceType(
@@ -2336,6 +2345,23 @@
 
   /// Returns `true` if [cls] is a Dart enum class.
   bool isEnumClass(ClassEntity cls);
+
+  /// Returns the 'effective' mixin class if [cls] is a mixin application, and
+  /// `null` otherwise.
+  ///
+  /// The 'effective' mixin class is the class from which members are mixed in.
+  /// Normally this is the mixin class itself, but not if the mixin class itself
+  /// is a mixin application.
+  ///
+  /// Consider this hierarchy:
+  ///
+  ///     class A {}
+  ///     class B = Object with A {}
+  ///     class C = Object with B {}
+  ///
+  /// The mixin classes of `B` and `C` are `A` and `B`, respectively, but the
+  /// _effective_ mixin class of both is `A`.
+  ClassEntity getEffectiveMixinClass(ClassEntity cls);
 }
 
 abstract class KElementEnvironment extends ElementEnvironment {
@@ -2377,23 +2403,6 @@
   /// super calls.
   bool isSuperMixinApplication(ClassEntity cls);
 
-  /// Returns the 'effective' mixin class if [cls] is a mixin application, and
-  /// `null` otherwise.
-  ///
-  /// The 'effective' mixin class is the class from which members are mixed in.
-  /// Normally this is the mixin class itself, but not if the mixin class itself
-  /// is a mixin application.
-  ///
-  /// Consider this hierarchy:
-  ///
-  ///     class A {}
-  ///     class B = Object with A {}
-  ///     class C = Object with B {}
-  ///
-  /// The mixin classes of `B` and `C` are `A` and `B`, respectively, but the
-  /// _effective_ mixin class of both is `A`.
-  ClassEntity getEffectiveMixinClass(ClassEntity cls);
-
   /// The default type of the [typeVariable].
   ///
   /// This is the type used as the default type argument when no explicit type
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 7e909f2..62d62d5 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -28,6 +28,8 @@
 import 'frontend_strategy.dart';
 import 'inferrer/abstract_value_domain.dart' show AbstractValueStrategy;
 import 'inferrer/trivial.dart' show TrivialAbstractValueStrategy;
+import 'inferrer/powersets/wrapped.dart' show WrappedAbstractValueStrategy;
+import 'inferrer/powersets/powersets.dart' show PowersetStrategy;
 import 'inferrer/typemasks/masks.dart' show TypeMaskStrategy;
 import 'inferrer/types.dart'
     show GlobalTypeInferenceResults, GlobalTypeInferenceTask;
@@ -138,6 +140,13 @@
     abstractValueStrategy = options.useTrivialAbstractValueDomain
         ? const TrivialAbstractValueStrategy()
         : const TypeMaskStrategy();
+    if (options.experimentalWrapped) {
+      abstractValueStrategy =
+          WrappedAbstractValueStrategy(abstractValueStrategy);
+    } else if (options.experimentalPowersets) {
+      abstractValueStrategy = PowersetStrategy(abstractValueStrategy);
+    }
+
     CompilerTask kernelFrontEndTask;
     selfTask = new GenericTask('self', measurer);
     _outputProvider = new _CompilerOutput(this, outputProvider);
diff --git a/pkg/compiler/lib/src/constants/constant_system.dart b/pkg/compiler/lib/src/constants/constant_system.dart
index afbb8f4..11ac356 100644
--- a/pkg/compiler/lib/src/constants/constant_system.dart
+++ b/pkg/compiler/lib/src/constants/constant_system.dart
@@ -40,6 +40,7 @@
 const truncatingDivide = const TruncatingDivideOperation();
 const codeUnitAt = const CodeUnitAtOperation();
 const round = const RoundOperation();
+const toInt = const ToIntOperation();
 const abs = const UnfoldedUnaryOperation('abs');
 
 /// Returns true if [value] will turn into NaN or infinity
@@ -959,6 +960,32 @@
   }
 }
 
+class ToIntOperation implements UnaryOperation {
+  @override
+  final String name = 'toInt';
+
+  const ToIntOperation();
+
+  @override
+  ConstantValue fold(ConstantValue constant) {
+    if (constant is IntConstantValue) {
+      double value = constant.doubleValue;
+      // The code below is written to work for any `double`, even though
+      // IntConstantValue uses `BigInt`.
+      // TODO(sra): IntConstantValue should wrap a `double` since we consider
+      // infinities and negative zero to be `is int`.
+      if (!value.isFinite) return null;
+      // Ensure `(-0.0).toInt()` --> `0`.
+      if (value == 0) return createIntFromInt(0);
+      return constant;
+    }
+    // TODO(sra): Handle doubles. Note that integral-valued doubles are
+    // canonicalized to IntConstantValue, so we are only missing `toInt()`
+    // operations that truncate.
+    return null;
+  }
+}
+
 class UnfoldedUnaryOperation implements UnaryOperation {
   @override
   final String name;
diff --git a/pkg/compiler/lib/src/constants/values.dart b/pkg/compiler/lib/src/constants/values.dart
index ebeac09..14b1867 100644
--- a/pkg/compiler/lib/src/constants/values.dart
+++ b/pkg/compiler/lib/src/constants/values.dart
@@ -9,7 +9,6 @@
 import '../elements/entities.dart';
 import '../elements/types.dart';
 import '../deferred_load.dart' show OutputUnit;
-import '../inferrer/abstract_value_domain.dart';
 import '../js/js.dart' as js;
 import '../util/util.dart';
 
@@ -862,26 +861,19 @@
   String toStructuredText(DartTypes dartTypes) => 'JsNameConstant(${name})';
 }
 
-/// A constant used as the dummy interceptor value for intercepted calls with
+/// A constant used as the dummy receiver value for intercepted calls with
 /// a known non-interceptor target.
+// TODO(sra): Rename fo 'DummyReceiverConstantValue'.
 class DummyInterceptorConstantValue extends ConstantValue {
-  final AbstractValue abstractValue;
+  factory DummyInterceptorConstantValue() =>
+      const DummyInterceptorConstantValue._();
 
-  DummyInterceptorConstantValue(this.abstractValue);
+  const DummyInterceptorConstantValue._();
 
   @override
   bool get isDummy => true;
 
   @override
-  bool operator ==(other) {
-    return other is DummyInterceptorConstantValue &&
-        abstractValue == other.abstractValue;
-  }
-
-  @override
-  get hashCode => abstractValue.hashCode * 17;
-
-  @override
   List<ConstantValue> getDependencies() => const <ConstantValue>[];
 
   @override
@@ -896,11 +888,10 @@
   ConstantValueKind get kind => ConstantValueKind.DUMMY_INTERCEPTOR;
 
   @override
-  String toDartText(DartTypes dartTypes) => 'dummy_interceptor($abstractValue)';
+  String toDartText(DartTypes dartTypes) => 'dummy_interceptor()';
 
   @override
-  String toStructuredText(DartTypes dartTypes) =>
-      'DummyInterceptorConstant($abstractValue)';
+  String toStructuredText(DartTypes dartTypes) => 'DummyInterceptorConstant()';
 }
 
 // A constant with an empty type used in [HInstruction]s of an expression
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 22bd612..4022219 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -112,6 +112,8 @@
   int codegenShard;
   int codegenShards;
   List<String> bazelPaths;
+  List<String> multiRoots;
+  String multiRootScheme = 'org-dartlang-app';
   Uri packageConfig = null;
   List<String> options = new List<String>();
   bool wantHelp = false;
@@ -196,6 +198,16 @@
     bazelPaths = <String>[]..addAll(paths.split(','));
   }
 
+  void setMultiRoots(String argument) {
+    String paths = extractParameter(argument);
+    multiRoots ??= <String>[];
+    multiRoots.addAll(paths.split(','));
+  }
+
+  void setMultiRootScheme(String argument) {
+    multiRootScheme = extractParameter(argument);
+  }
+
   String getDepsOutput(Iterable<Uri> sourceFiles) {
     var filenames = sourceFiles.map((uri) => '$uri').toList();
     filenames.sort();
@@ -429,6 +441,7 @@
     new OptionHandler('--enable[_-]checked[_-]mode|--checked',
         (_) => setCheckedMode(Flags.enableCheckedMode)),
     new OptionHandler(Flags.enableAsserts, passThrough),
+    new OptionHandler(Flags.enableNullAssertions, passThrough),
     new OptionHandler(Flags.trustTypeAnnotations, setTrustTypeAnnotations),
     new OptionHandler(Flags.trustPrimitives, passThrough),
     new OptionHandler(Flags.trustJSInteropTypeAnnotations, passThrough),
@@ -437,6 +450,8 @@
     new OptionHandler(Flags.noSourceMaps, passThrough),
     new OptionHandler(Option.resolutionInput, ignoreOption),
     new OptionHandler(Option.bazelPaths, setBazelPaths),
+    new OptionHandler(Option.multiRoots, setMultiRoots),
+    new OptionHandler(Option.multiRootScheme, setMultiRootScheme),
     new OptionHandler(Flags.resolveOnly, ignoreOption),
     new OptionHandler(Flags.disableNativeLiveTypeAnalysis, passThrough),
     new OptionHandler('--categories=.*', setCategories),
@@ -445,11 +460,15 @@
     new OptionHandler(Flags.disableProgramSplit, passThrough),
     new OptionHandler(Flags.disableTypeInference, passThrough),
     new OptionHandler(Flags.useTrivialAbstractValueDomain, passThrough),
+    new OptionHandler(Flags.experimentalWrapped, passThrough),
+    new OptionHandler(Flags.experimentalPowersets, passThrough),
     new OptionHandler(Flags.disableRtiOptimization, passThrough),
     new OptionHandler(Flags.terse, passThrough),
     new OptionHandler('--deferred-map=.+', passThrough),
     new OptionHandler(Flags.newDeferredSplit, passThrough),
     new OptionHandler(Flags.reportInvalidInferredDeferredTypes, passThrough),
+    new OptionHandler(Flags.deferClassTypes, passThrough),
+    new OptionHandler(Flags.noDeferClassTypes, passThrough),
     new OptionHandler('${Flags.dumpInfo}|${Flags.dumpInfo}=.+', setDumpInfo),
     new OptionHandler('--disallow-unsafe-eval', ignoreOption),
     new OptionHandler(Option.showPackageWarnings, passThrough),
@@ -513,7 +532,14 @@
   // TODO(johnniwinther): Measure time for reading files.
   SourceFileProvider inputProvider;
   if (bazelPaths != null) {
+    if (multiRoots != null) {
+      helpAndFail(
+          'The options --bazel-root and --multi-root cannot be supplied '
+          'together, please choose one or the other.');
+    }
     inputProvider = new BazelInputProvider(bazelPaths);
+  } else if (multiRoots != null) {
+    inputProvider = new MultiRootInputProvider(multiRootScheme, multiRoots);
   } else {
     inputProvider = new CompilerSourceFileProvider();
   }
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index 6320f60..1db440d 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -28,6 +28,7 @@
 import 'universe/use.dart';
 import 'universe/world_impact.dart'
     show ImpactUseCase, WorldImpact, WorldImpactVisitorImpl;
+import 'util/maplet.dart';
 import 'util/util.dart' show makeUnique;
 import 'world.dart' show KClosedWorld;
 
@@ -109,6 +110,9 @@
   /// A mapping from classes to their import set.
   Map<ClassEntity, ImportSet> _classToSet = {};
 
+  /// A mapping from interface types (keyed by classes) to their import set.
+  Map<ClassEntity, ImportSet> _classTypeToSet = {};
+
   /// A mapping from members to their import set.
   Map<MemberEntity, ImportSet> _memberToSet = {};
 
@@ -134,6 +138,7 @@
   bool get newDeferredSplit => compiler.options.newDeferredSplit;
   bool get reportInvalidInferredDeferredTypes =>
       compiler.options.reportInvalidInferredDeferredTypes;
+  bool get deferClassTypes => compiler.options.deferClassTypes;
 
   DeferredLoadTask(this.compiler) : super(compiler.measurer) {
     _mainOutputUnit = OutputUnit(true, 'main', <ImportEntity>{});
@@ -203,12 +208,24 @@
       _collectDirectMemberDependencies(closedWorld, member, dependencies);
     }
 
+    void addClassAndMaybeAddEffectiveMixinClass(ClassEntity cls) {
+      dependencies.addClass(cls);
+      if (elementEnvironment.isMixinApplication(cls)) {
+        dependencies.addClass(elementEnvironment.getEffectiveMixinClass(cls));
+      }
+    }
+
     ClassEntity cls = element;
     elementEnvironment.forEachLocalClassMember(cls, addLiveInstanceMember);
     elementEnvironment.forEachSupertype(cls, (InterfaceType type) {
       _collectTypeDependencies(type, dependencies);
     });
-    dependencies.addClass(cls);
+    elementEnvironment.forEachSuperClass(cls, (superClass) {
+      addClassAndMaybeAddEffectiveMixinClass(superClass);
+      _collectTypeDependencies(
+          elementEnvironment.getThisType(superClass), dependencies);
+    });
+    addClassAndMaybeAddEffectiveMixinClass(cls);
   }
 
   /// Finds all elements and constants that [element] depends directly on.
@@ -253,14 +270,17 @@
   /// Recursively collects all the dependencies of [type].
   void _collectTypeDependencies(DartType type, Dependencies dependencies,
       [ImportEntity import]) {
-    TypeDependencyVisitor(dependencies, import, commonElements).visit(type);
+    TypeDependencyVisitor(dependencies, import, commonElements,
+            collectClassesAndTypes: !deferClassTypes)
+        .visit(type);
   }
 
   void _collectTypeArgumentDependencies(
       Iterable<DartType> typeArguments, Dependencies dependencies,
       [ImportEntity import]) {
     if (typeArguments == null) return;
-    TypeDependencyVisitor(dependencies, import, commonElements)
+    TypeDependencyVisitor(dependencies, import, commonElements,
+            collectClassesAndTypes: !deferClassTypes)
         .visitList(typeArguments);
   }
 
@@ -308,21 +328,29 @@
             default:
           }
         }, visitTypeUse: (MemberEntity member, TypeUse typeUse) {
+          void addClassIfInterfaceType(DartType t, [ImportEntity import]) {
+            var typeWithoutNullability = t.withoutNullability;
+            if (typeWithoutNullability is InterfaceType) {
+              dependencies.addClass(typeWithoutNullability.element, import);
+            }
+          }
+
           DartType type = typeUse.type;
           switch (typeUse.kind) {
             case TypeUseKind.TYPE_LITERAL:
-              var typeWithoutNullability = type.withoutNullability;
-              if (typeWithoutNullability is InterfaceType) {
-                dependencies.addClass(
-                    typeWithoutNullability.element, typeUse.deferredImport);
-              }
+              _collectTypeDependencies(
+                  type, dependencies, typeUse.deferredImport);
               break;
             case TypeUseKind.CONST_INSTANTIATION:
+              addClassIfInterfaceType(type, typeUse.deferredImport);
               _collectTypeDependencies(
                   type, dependencies, typeUse.deferredImport);
               break;
             case TypeUseKind.INSTANTIATION:
             case TypeUseKind.NATIVE_INSTANTIATION:
+              addClassIfInterfaceType(type);
+              _collectTypeDependencies(type, dependencies);
+              break;
             case TypeUseKind.IS_CHECK:
             case TypeUseKind.CATCH_TYPE:
               _collectTypeDependencies(type, dependencies);
@@ -352,6 +380,7 @@
             case TypeUseKind.RTI_VALUE:
             case TypeUseKind.TYPE_ARGUMENT:
             case TypeUseKind.NAMED_TYPE_VARIABLE_NEW_RTI:
+            case TypeUseKind.CONSTRUCTOR_REFERENCE:
               failedAt(element, "Unexpected type use: $typeUse.");
               break;
           }
@@ -445,6 +474,33 @@
     }
   }
 
+  void _updateClassTypeRecursive(KClosedWorld closedWorld, ClassEntity element,
+      ImportSet oldSet, ImportSet newSet, WorkQueue queue) {
+    if (element == null) return;
+
+    ImportSet currentSet = _classTypeToSet[element];
+
+    // Already visited. We may visit some root nodes a second time with
+    // [isMirrorUsage] in order to mark static members used reflectively.
+    if (currentSet == newSet) return;
+
+    // Elements in the main output unit always remain there.
+    if (currentSet == importSets.mainSet) return;
+
+    if (currentSet == oldSet) {
+      // Continue recursively updating from [oldSet] to [newSet].
+      _classTypeToSet[element] = newSet;
+
+      Dependencies dependencies = Dependencies();
+      dependencies.addClassType(element);
+      LibraryEntity library = element.library;
+      _processDependencies(
+          closedWorld, library, dependencies, oldSet, newSet, queue, element);
+    } else {
+      queue.addClassType(element, newSet);
+    }
+  }
+
   void _updateMemberRecursive(KClosedWorld closedWorld, MemberEntity element,
       ImportSet oldSet, ImportSet newSet, WorkQueue queue) {
     if (element == null) return;
@@ -577,6 +633,19 @@
       }
     });
 
+    dependencies.classType.forEach((ClassEntity cls, DependencyInfo info) {
+      _fixClassDependencyInfo(info, cls, library, context);
+      if (info.isDeferred) {
+        if (_shouldAddDeferredDependency(newSet)) {
+          for (ImportEntity deferredImport in info.imports) {
+            queue.addClassType(cls, importSets.singleton(deferredImport));
+          }
+        }
+      } else {
+        _updateClassTypeRecursive(closedWorld, cls, oldSet, newSet, queue);
+      }
+    });
+
     dependencies.members.forEach((MemberEntity member, DependencyInfo info) {
       _fixMemberDependencyInfo(info, member, library, context);
       if (info.isDeferred) {
@@ -624,6 +693,7 @@
     // Generate an output unit for all import sets that are associated with an
     // element or constant.
     _classToSet.values.forEach(addUnit);
+    _classTypeToSet.values.forEach(addUnit);
     _memberToSet.values.forEach(addUnit);
     _localFunctionToSet.values.forEach(addUnit);
     _constantToSet.values.forEach(addUnit);
@@ -812,16 +882,19 @@
     _createOutputUnits();
     Map<String, List<OutputUnit>> hunksToLoad = _setupHunksToLoad();
     Map<ClassEntity, OutputUnit> classMap = {};
+    Map<ClassEntity, OutputUnit> classTypeMap = {};
     Map<MemberEntity, OutputUnit> memberMap = {};
     Map<Local, OutputUnit> localFunctionMap = {};
     Map<ConstantValue, OutputUnit> constantMap = {};
     _classToSet.forEach((cls, s) => classMap[cls] = s.unit);
+    _classTypeToSet.forEach((cls, s) => classTypeMap[cls] = s.unit);
     _memberToSet.forEach((member, s) => memberMap[member] = s.unit);
     _localFunctionToSet.forEach(
         (localFunction, s) => localFunctionMap[localFunction] = s.unit);
     _constantToSet.forEach((constant, s) => constantMap[constant] = s.unit);
 
     _classToSet = null;
+    _classTypeToSet = null;
     _memberToSet = null;
     _localFunctionToSet = null;
     _constantToSet = null;
@@ -829,8 +902,10 @@
     cleanup();
     return OutputUnitData(
         this.isProgramSplit && !disableProgramSplit,
+        deferClassTypes,
         this._mainOutputUnit,
         classMap,
+        classTypeMap,
         memberMap,
         localFunctionMap,
         constantMap,
@@ -881,6 +956,13 @@
       id = '$id cls';
       elements.add(id);
     });
+    _classTypeToSet.forEach((ClassEntity element, ImportSet importSet) {
+      if (ignoreEntityInDump(element)) return;
+      var elements = elementMap.putIfAbsent(importSet.unit, () => <String>[]);
+      var id = element.name ?? '$element';
+      id = '$id type';
+      elements.add(id);
+    });
     _memberToSet.forEach((MemberEntity element, ImportSet importSet) {
       if (ignoreEntityInDump(element)) return;
       var elements = elementMap.putIfAbsent(importSet.unit, () => <String>[]);
@@ -1050,8 +1132,11 @@
         b = b._previous;
       }
     }
-    while (imports.isNotEmpty) {
-      result = result._add(imports.removeLast());
+
+    // Add merged elements back in reverse order. It is tempting to pop them off
+    // with `removeLast()` but that causes measurable shrinking reallocations.
+    for (int i = imports.length - 1; i >= 0; i--) {
+      result = result._add(imports[i]);
     }
     return result;
   }
@@ -1091,7 +1176,7 @@
   }
 
   /// Links to other import sets in the lattice by adding one import.
-  final Map<_DeferredImport, ImportSet> _transitions = {};
+  final Map<_DeferredImport, ImportSet> _transitions = Maplet();
 
   ImportSet.empty()
       : _import = null,
@@ -1132,6 +1217,10 @@
   /// An index to find work items in the queue corresponding to a class.
   final Map<ClassEntity, WorkItem> pendingClasses = {};
 
+  /// An index to find work items in the queue corresponding to an
+  /// [InterfaceType] represented here by its [ClassEntitiy].
+  final Map<ClassEntity, WorkItem> pendingClassType = {};
+
   /// An index to find work items in the queue corresponding to a member.
   final Map<MemberEntity, WorkItem> pendingMembers = {};
 
@@ -1167,6 +1256,22 @@
     }
   }
 
+  /// Add to the queue that class type (represented by [element]) should be
+  /// updated to include all imports in [importSet]. If there is already a
+  /// work item in the queue for [element], this makes sure that the work
+  /// item now includes the union of [importSet] and the existing work
+  /// item's import set.
+  void addClassType(ClassEntity element, ImportSet importSet) {
+    var item = pendingClassType[element];
+    if (item == null) {
+      item = ClassTypeWorkItem(element, importSet);
+      pendingClassType[element] = item;
+      queue.add(item);
+    } else {
+      item.importsToAdd = _importSets.union(item.importsToAdd, importSet);
+    }
+  }
+
   /// Add to the queue that [element] should be updated to include all imports
   /// in [importSet]. If there is already a work item in the queue for
   /// [element], this makes sure that the work item now includes the union of
@@ -1230,6 +1335,23 @@
   }
 }
 
+/// Summary of the work that needs to be done on a class.
+class ClassTypeWorkItem extends WorkItem {
+  /// Class to be recursively updated.
+  final ClassEntity cls;
+
+  ClassTypeWorkItem(this.cls, ImportSet newSet) : super(newSet);
+
+  @override
+  void update(
+      DeferredLoadTask task, KClosedWorld closedWorld, WorkQueue queue) {
+    queue.pendingClassType.remove(cls);
+    ImportSet oldSet = task._classTypeToSet[cls];
+    ImportSet newSet = task.importSets.union(oldSet, importsToAdd);
+    task._updateClassTypeRecursive(closedWorld, cls, oldSet, newSet, queue);
+  }
+}
+
 /// Summary of the work that needs to be done on a member.
 class MemberWorkItem extends WorkItem {
   /// Member to be recursively updated.
@@ -1293,8 +1415,10 @@
   static const String tag = 'output-unit-data';
 
   final bool isProgramSplit;
+  final bool deferClassTypes;
   final OutputUnit mainOutputUnit;
   final Map<ClassEntity, OutputUnit> _classToUnit;
+  final Map<ClassEntity, OutputUnit> _classTypeToUnit;
   final Map<MemberEntity, OutputUnit> _memberToUnit;
   final Map<Local, OutputUnit> _localFunctionToUnit;
   final Map<ConstantValue, OutputUnit> _constantToUnit;
@@ -1316,8 +1440,10 @@
 
   OutputUnitData(
       this.isProgramSplit,
+      this.deferClassTypes,
       this.mainOutputUnit,
       this._classToUnit,
+      this._classTypeToUnit,
       this._memberToUnit,
       this._localFunctionToUnit,
       this._constantToUnit,
@@ -1340,6 +1466,8 @@
           convertConstantMap) {
     Map<ClassEntity, OutputUnit> classToUnit =
         convertClassMap(other._classToUnit, other._localFunctionToUnit);
+    Map<ClassEntity, OutputUnit> classTypeToUnit =
+        convertClassMap(other._classTypeToUnit, other._localFunctionToUnit);
     Map<MemberEntity, OutputUnit> memberToUnit =
         convertMemberMap(other._memberToUnit, other._localFunctionToUnit);
     Map<ConstantValue, OutputUnit> constantToUnit =
@@ -1355,8 +1483,10 @@
 
     return OutputUnitData(
         other.isProgramSplit,
+        other.deferClassTypes,
         other.mainOutputUnit,
         classToUnit,
+        classTypeToUnit,
         memberToUnit,
         // Local functions only make sense in the K-world model.
         const <Local, OutputUnit>{},
@@ -1371,6 +1501,7 @@
   factory OutputUnitData.readFromDataSource(DataSource source) {
     source.begin(tag);
     bool isProgramSplit = source.readBool();
+    bool deferClassTypes = source.readBool();
     List<OutputUnit> outputUnits = source.readList(() {
       bool isMainOutput = source.readBool();
       String name = source.readString();
@@ -1382,6 +1513,9 @@
     Map<ClassEntity, OutputUnit> classToUnit = source.readClassMap(() {
       return outputUnits[source.readInt()];
     });
+    Map<ClassEntity, OutputUnit> classTypeToUnit = source.readClassMap(() {
+      return outputUnits[source.readInt()];
+    });
     Map<MemberEntity, OutputUnit> memberToUnit =
         source.readMemberMap((MemberEntity member) {
       return outputUnits[source.readInt()];
@@ -1406,8 +1540,10 @@
     source.end(tag);
     return OutputUnitData(
         isProgramSplit,
+        deferClassTypes,
         mainOutputUnit,
         classToUnit,
+        classTypeToUnit,
         memberToUnit,
         // Local functions only make sense in the K-world model.
         const <Local, OutputUnit>{},
@@ -1422,6 +1558,7 @@
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     sink.writeBool(isProgramSplit);
+    sink.writeBool(deferClassTypes);
     Map<OutputUnit, int> outputUnitIndices = {};
     sink.writeList(outputUnits, (OutputUnit outputUnit) {
       outputUnitIndices[outputUnit] = outputUnitIndices.length;
@@ -1433,6 +1570,9 @@
     sink.writeClassMap(_classToUnit, (OutputUnit outputUnit) {
       sink.writeInt(outputUnitIndices[outputUnit]);
     });
+    sink.writeClassMap(_classTypeToUnit, (OutputUnit outputUnit) {
+      sink.writeInt(outputUnitIndices[outputUnit]);
+    });
     sink.writeMemberMap(_memberToUnit,
         (MemberEntity member, OutputUnit outputUnit) {
       sink.writeInt(outputUnitIndices[outputUnit]);
@@ -1468,6 +1608,23 @@
 
   OutputUnit outputUnitForClassForTesting(ClassEntity cls) => _classToUnit[cls];
 
+  /// Returns the [OutputUnit] where [cls]'s type belongs.
+  // TODO(joshualitt): see above TODO regarding allowNull.
+  OutputUnit outputUnitForClassType(ClassEntity cls, {bool allowNull: false}) {
+    if (!isProgramSplit) return mainOutputUnit;
+    OutputUnit unit;
+    if (deferClassTypes) {
+      unit = _classTypeToUnit[cls];
+    } else {
+      unit = _classToUnit[cls];
+    }
+    assert(allowNull || unit != null, 'No output unit for type $cls');
+    return unit ?? mainOutputUnit;
+  }
+
+  OutputUnit outputUnitForClassTypeForTesting(ClassEntity cls) =>
+      deferClassTypes ? _classTypeToUnit[cls] : _classToUnit[cls];
+
   /// Returns the [OutputUnit] where [member] belongs.
   OutputUnit outputUnitForMember(MemberEntity member) {
     if (!isProgramSplit) return mainOutputUnit;
@@ -1625,12 +1782,21 @@
 
 class Dependencies {
   final Map<ClassEntity, DependencyInfo> classes = {};
+  final Map<ClassEntity, DependencyInfo> classType = {};
   final Map<MemberEntity, DependencyInfo> members = {};
   final Set<Local> localFunctions = {};
   final Map<ConstantValue, DependencyInfo> constants = {};
 
   void addClass(ClassEntity cls, [ImportEntity import]) {
     (classes[cls] ??= DependencyInfo()).registerImport(import);
+
+    // Add a classType dependency as well just in case we optimize out
+    // the class later.
+    addClassType(cls, import);
+  }
+
+  void addClassType(ClassEntity cls, [ImportEntity import]) {
+    (classType[cls] ??= DependencyInfo()).registerImport(import);
   }
 
   void addMember(MemberEntity m, [ImportEntity import]) {
@@ -1659,11 +1825,16 @@
 }
 
 class TypeDependencyVisitor implements DartTypeVisitor<void, Null> {
+  // If true, collect classes and types, otherwise just collect types.
+  // Note: When collecting classes, types are added implicitly by the
+  // dependencies class.
+  final bool collectClassesAndTypes;
   final Dependencies _dependencies;
   final ImportEntity _import;
   final CommonElements _commonElements;
 
-  TypeDependencyVisitor(this._dependencies, this._import, this._commonElements);
+  TypeDependencyVisitor(this._dependencies, this._import, this._commonElements,
+      {this.collectClassesAndTypes});
 
   @override
   void visit(DartType type, [_]) {
@@ -1686,7 +1857,11 @@
 
   @override
   void visitFutureOrType(FutureOrType type, Null argument) {
-    _dependencies.addClass(_commonElements.futureClass);
+    if (collectClassesAndTypes) {
+      _dependencies.addClass(_commonElements.futureClass);
+    } else {
+      _dependencies.addClassType(_commonElements.futureClass);
+    }
     visit(type.typeArgument);
   }
 
@@ -1713,10 +1888,11 @@
   @override
   void visitInterfaceType(InterfaceType type, Null argument) {
     visitList(type.typeArguments);
-    // TODO(sigmund): when we are able to split classes from types in our
-    // runtime-type representation, this should track type.element as a type
-    // dependency instead.
-    _dependencies.addClass(type.element, _import);
+    if (collectClassesAndTypes) {
+      _dependencies.addClass(type.element, _import);
+    } else {
+      _dependencies.addClassType(type.element, _import);
+    }
   }
 
   @override
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index 33d7b23..4b78a07 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -77,7 +77,6 @@
   JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
   JS_INTEROP_FIELD_NOT_SUPPORTED,
   JS_INTEROP_NON_EXTERNAL_MEMBER,
-  JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS,
   JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS,
   JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
   JS_PLACEHOLDER_CAPTURE,
@@ -197,41 +196,15 @@
               """
           ]),
 
-      MessageKind.JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS:
-          const MessageTemplate(
-              MessageKind
-                  .JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
-              "Some parameters in anonymous js-interop class '#{cls}' "
-              "object literal constructor are positional instead of named."
-              ".",
-              howToFix: "Make all arguments in external factory object literal "
-                  "constructors named.",
-              examples: const [
-            """
-class Super {
-  factory Super.foo() => null;
-}
-class Class extends Super {
-  Class() : super.foo();
-}
-main() => new Class();
-"""
-          ]),
-
       MessageKind.JS_INTEROP_NON_EXTERNAL_MEMBER: const MessageTemplate(
           MessageKind.JS_INTEROP_NON_EXTERNAL_MEMBER,
           "Js-interop members must be 'external'."),
 
-      MessageKind.JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS: const MessageTemplate(
-          MessageKind.JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS,
-          "Js-interop class members are only supported in js-interop classes.",
-          howToFix: "Try marking the enclosing class as js-interop or "
-              "remove the js-interop annotation from the member."),
-
       MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER: const MessageTemplate(
           MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
           "Member '#{member}' in js-interop class '#{cls}' is not external.",
-          howToFix: "Try adding the 'external' to '#{member}'.",
+          howToFix: "Try adding 'external' to '#{member}'. If #{member} is a "
+              "`late` field, use an `external` getter/setter instead.",
           examples: const [
             """
               import 'package:js/js.dart';
@@ -247,27 +220,6 @@
               """
           ]),
 
-      MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS: const MessageTemplate(
-          MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS,
-          "Js-interop method '#{method}' has named arguments but is not "
-          "a factory constructor of an @anonymous @JS class.",
-          howToFix: "Remove all named arguments from js-interop method or "
-              "in the case of a factory constructor annotate the class "
-              "as @anonymous.",
-          examples: const [
-            """
-              import 'package:js/js.dart';
-
-              @JS()
-              class Foo {
-                external bar(foo, {baz});
-              }
-
-              main() {
-                new Foo().bar(4, baz: 5);
-              }
-              """
-          ]),
       MessageKind.IMPLICIT_JS_INTEROP_FIELD_NOT_SUPPORTED:
           const MessageTemplate(
               MessageKind.IMPLICIT_JS_INTEROP_FIELD_NOT_SUPPORTED,
diff --git a/pkg/compiler/lib/src/elements/entities.dart b/pkg/compiler/lib/src/elements/entities.dart
index e863b5b..ccd058d 100644
--- a/pkg/compiler/lib/src/elements/entities.dart
+++ b/pkg/compiler/lib/src/elements/entities.dart
@@ -33,6 +33,9 @@
 abstract class LibraryEntity extends Entity {
   /// Return the canonical uri that identifies this library.
   Uri get canonicalUri;
+
+  /// Returns whether or not this library has opted into null safety.
+  bool get isNonNullableByDefault;
 }
 
 /// Stripped down super interface for import entities.
diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart
index ce038a9..2b45419 100644
--- a/pkg/compiler/lib/src/elements/types.dart
+++ b/pkg/compiler/lib/src/elements/types.dart
@@ -651,7 +651,7 @@
 
   final List<FunctionTypeVariable> typeVariables;
 
-  FunctionType._(
+  FunctionType._allocate(
       this.returnType,
       this.parameterTypes,
       this.optionalParameterTypes,
@@ -659,17 +659,42 @@
       this.requiredNamedParameters,
       this.namedParameterTypes,
       this.typeVariables) {
-    assert(returnType != null, "Invalid return type in $this.");
-    assert(!parameterTypes.contains(null), "Invalid parameter types in $this.");
+    assert(returnType != null, 'Invalid return type in $this.');
+    assert(!parameterTypes.contains(null), 'Invalid parameter types in $this.');
     assert(!optionalParameterTypes.contains(null),
-        "Invalid optional parameter types in $this.");
+        'Invalid optional parameter types in $this.');
     assert(
-        !namedParameters.contains(null), "Invalid named parameters in $this.");
+        !namedParameters.contains(null), 'Invalid named parameters in $this.');
     assert(!requiredNamedParameters.contains(null),
-        "Invalid required named parameters in $this.");
+        'Invalid required named parameters in $this.');
     assert(!namedParameterTypes.contains(null),
-        "Invalid named parameter types in $this.");
-    assert(!typeVariables.contains(null), "Invalid type variables in $this.");
+        'Invalid named parameter types in $this.');
+    assert(!typeVariables.contains(null), 'Invalid type variables in $this.');
+  }
+
+  factory FunctionType._(
+      DartType returnType,
+      List<DartType> parameterTypes,
+      List<DartType> optionalParameterTypes,
+      List<String> namedParameters,
+      Set<String> requiredNamedParameters,
+      List<DartType> namedParameterTypes,
+      List<FunctionTypeVariable> typeVariables) {
+    // Canonicalize empty collections to constants to save storage.
+    if (parameterTypes.isEmpty) parameterTypes = const [];
+    if (optionalParameterTypes.isEmpty) optionalParameterTypes = const [];
+    if (namedParameterTypes.isEmpty) namedParameterTypes = const [];
+    if (requiredNamedParameters.isEmpty) requiredNamedParameters = const {};
+    if (typeVariables.isEmpty) typeVariables = const [];
+
+    return FunctionType._allocate(
+        returnType,
+        parameterTypes,
+        optionalParameterTypes,
+        namedParameters,
+        requiredNamedParameters,
+        namedParameterTypes,
+        typeVariables);
   }
 
   factory FunctionType._readFromDataSource(
@@ -1915,6 +1940,11 @@
 
   bool _subtypeHelper(DartType s, DartType t,
       {bool allowPotentialSubtypes: false, bool assumeInstantiations: false}) {
+    assert(allowPotentialSubtypes || !assumeInstantiations);
+
+    // TODO(fishythefish): Add constraint solving for potential subtypes.
+    if (allowPotentialSubtypes) return true;
+
     /// Based on
     /// https://github.com/dart-lang/language/blob/master/resources/type-system/subtyping.md.
     /// See also [_isSubtype] in `dart:_rti`.
@@ -1927,10 +1957,6 @@
           env.isAssumed(s, t)) return true;
 
       if (s is AnyType) return true;
-      if (allowPotentialSubtypes &&
-          (s is TypeVariableType || t is TypeVariableType)) return true;
-      if (assumeInstantiations &&
-          (s is FunctionTypeVariable || t is FunctionTypeVariable)) return true;
 
       // Right Top:
       if (isTopType(t)) return true;
@@ -2039,10 +2065,10 @@
           List<FunctionTypeVariable> sTypeVariables = s.typeVariables;
           List<FunctionTypeVariable> tTypeVariables = t.typeVariables;
           int length = tTypeVariables.length;
-          if (length == sTypeVariables.length) {
-            env ??= _Assumptions();
-            env.assumePairs(sTypeVariables, tTypeVariables);
-          } else if (!assumeInstantiations || length > 0) return false;
+          if (length != sTypeVariables.length) return false;
+
+          env ??= _Assumptions();
+          env.assumePairs(sTypeVariables, tTypeVariables);
           try {
             for (int i = 0; i < length; i++) {
               DartType sBound = sTypeVariables[i].bound;
@@ -2114,12 +2140,14 @@
                 String sName = sNamed[sIndex++];
                 int comparison = sName.compareTo(tName);
                 if (comparison > 0) return false;
-                bool sIsRequired = sRequiredNamed.contains(sName);
+                bool sIsRequired =
+                    !useLegacySubtyping && sRequiredNamed.contains(sName);
                 if (comparison < 0) {
                   if (sIsRequired) return false;
                   continue;
                 }
-                bool tIsRequired = tRequiredNamed.contains(tName);
+                bool tIsRequired =
+                    !useLegacySubtyping && tRequiredNamed.contains(tName);
                 if (sIsRequired && !tIsRequired) return false;
                 if (!_isSubtype(
                     tNamedTypes[tIndex], sNamedTypes[sIndex - 1], env))
@@ -2127,8 +2155,10 @@
                 break;
               }
             }
-            while (sIndex < sNamedLength) {
-              if (sRequiredNamed.contains(sNamed[sIndex++])) return false;
+            if (!useLegacySubtyping) {
+              while (sIndex < sNamedLength) {
+                if (sRequiredNamed.contains(sNamed[sIndex++])) return false;
+              }
             }
             return true;
           } finally {
@@ -2273,4 +2303,32 @@
             canAssignGenericFunctionTo(getTypeVariableBound(type.element)) ||
         type is FunctionTypeVariable && canAssignGenericFunctionTo(type.bound);
   }
+
+  /// Returns `true` if [type] occuring in a program with no sound null safety
+  /// cannot accept `null` under sound rules.
+  bool isNonNullableIfSound(DartType type) {
+    if (type is DynamicType ||
+        type is VoidType ||
+        type is AnyType ||
+        type is ErasedType) {
+      return false;
+    }
+    if (type is NullableType) return false;
+    if (type is LegacyType) {
+      return isNonNullableIfSound(type.baseType);
+    }
+    if (type is InterfaceType) {
+      if (type.isNull) return false;
+      return true;
+    }
+    if (type is FunctionType) return true;
+    if (type is NeverType) return true;
+    if (type is TypeVariableType) {
+      return isNonNullableIfSound(getTypeVariableBound(type.element));
+    }
+    if (type is FutureOrType) {
+      return isNonNullableIfSound(type.typeArgument);
+    }
+    throw UnimplementedError('isNonNullableIfSound $type');
+  }
 }
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index feda38d..c3c07e6 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -416,6 +416,7 @@
         break;
       case TypeUseKind.RTI_VALUE:
       case TypeUseKind.TYPE_ARGUMENT:
+      case TypeUseKind.CONSTRUCTOR_REFERENCE:
         failedAt(CURRENT_ELEMENT_SPANNABLE, "Unexpected type use: $typeUse.");
         break;
       case TypeUseKind.NAMED_TYPE_VARIABLE_NEW_RTI:
diff --git a/pkg/compiler/lib/src/inferrer/powersets/powersets.dart b/pkg/compiler/lib/src/inferrer/powersets/powersets.dart
new file mode 100644
index 0000000..60f9253
--- /dev/null
+++ b/pkg/compiler/lib/src/inferrer/powersets/powersets.dart
@@ -0,0 +1,722 @@
+// 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 '../../constants/values.dart' show ConstantValue, PrimitiveConstantValue;
+import '../../elements/entities.dart';
+import '../../elements/names.dart';
+import '../../elements/types.dart' show DartType;
+import '../../ir/static_type.dart';
+import '../../serialization/serialization.dart';
+import '../../universe/selector.dart';
+import '../../universe/world_builder.dart';
+import '../../universe/use.dart';
+import '../../world.dart';
+import '../abstract_value_domain.dart';
+
+class PowersetValue implements AbstractValue {
+  final AbstractValue _abstractValue;
+  final int _powersetBits;
+  const PowersetValue(this._abstractValue, this._powersetBits);
+
+  @override
+  bool operator ==(var other) {
+    if (identical(this, other)) return true;
+    if (other is! PowersetValue) return false;
+    PowersetValue otherPowerset = other;
+    return other is PowersetValue &&
+        _abstractValue == otherPowerset._abstractValue &&
+        _powersetBits == otherPowerset._powersetBits;
+  }
+
+  @override
+  int get hashCode {
+    return _abstractValue.hashCode * _powersetBits.hashCode;
+  }
+
+  @override
+  String toString() =>
+      '[Powerset of ${_abstractValue.toString()} with bits ${_powersetBits}]';
+}
+
+AbstractValue unwrapOrNull(PowersetValue powerset) {
+  return powerset == null ? null : powerset._abstractValue;
+}
+
+PowersetValue wrapOrNull(AbstractValue abstractValue, int powersetBits) {
+  return abstractValue == null
+      ? null
+      : PowersetValue(abstractValue, powersetBits);
+}
+
+class PowersetDomain implements AbstractValueDomain {
+  final AbstractValueDomain _abstractValueDomain;
+  const PowersetDomain(this._abstractValueDomain);
+
+  @override
+  AbstractValue get dynamicType {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.dynamicType;
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  void writeAbstractValueToDataSink(
+      DataSink sink, covariant PowersetValue value) {
+    _abstractValueDomain.writeAbstractValueToDataSink(
+        sink, value._abstractValue);
+  }
+
+  @override
+  AbstractValue readAbstractValueFromDataSource(DataSource source) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.readAbstractValueFromDataSource(source);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  String getCompactText(covariant PowersetValue value) =>
+      _abstractValueDomain.getCompactText(value._abstractValue);
+
+  @override
+  AbstractBool isFixedLengthJsIndexable(covariant PowersetValue value) =>
+      _abstractValueDomain.isFixedLengthJsIndexable(value._abstractValue);
+
+  @override
+  AbstractBool isJsIndexableAndIterable(covariant PowersetValue value) =>
+      _abstractValueDomain.isJsIndexableAndIterable(unwrapOrNull(value));
+
+  @override
+  AbstractBool isJsIndexable(covariant PowersetValue value) =>
+      _abstractValueDomain.isJsIndexable(value._abstractValue);
+
+  @override
+  MemberEntity locateSingleMember(
+          covariant PowersetValue receiver, Selector selector) =>
+      _abstractValueDomain.locateSingleMember(
+          receiver._abstractValue, selector);
+
+  @override
+  AbstractBool isIn(
+          covariant PowersetValue subset, covariant PowersetValue superset) =>
+      _abstractValueDomain.isIn(subset._abstractValue, superset._abstractValue);
+
+  @override
+  AbstractBool needsNoSuchMethodHandling(
+          covariant PowersetValue receiver, Selector selector) =>
+      _abstractValueDomain.needsNoSuchMethodHandling(
+          receiver._abstractValue, selector);
+
+  @override
+  AbstractBool isTargetingMember(
+          covariant PowersetValue receiver, MemberEntity member, Name name) =>
+      _abstractValueDomain.isTargetingMember(
+          receiver._abstractValue, member, name);
+
+  @override
+  AbstractValue computeReceiver(Iterable<MemberEntity> members) {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.computeReceiver(members);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  PrimitiveConstantValue getPrimitiveValue(covariant PowersetValue value) =>
+      _abstractValueDomain.getPrimitiveValue(value._abstractValue);
+
+  @override
+  AbstractValue createPrimitiveValue(
+      covariant PowersetValue originalValue, PrimitiveConstantValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.createPrimitiveValue(
+        originalValue._abstractValue, value);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  bool isPrimitiveValue(covariant PowersetValue value) =>
+      _abstractValueDomain.isPrimitiveValue(value._abstractValue);
+
+  @override
+  MemberEntity getAllocationElement(covariant PowersetValue value) =>
+      _abstractValueDomain.getAllocationElement(value._abstractValue);
+
+  @override
+  Object getAllocationNode(covariant PowersetValue value) =>
+      _abstractValueDomain.getAllocationNode(value._abstractValue);
+
+  @override
+  AbstractValue getGeneralization(covariant PowersetValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.getGeneralization(unwrapOrNull(value));
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  bool isSpecializationOf(covariant PowersetValue specialization,
+          covariant PowersetValue generalization) =>
+      _abstractValueDomain.isSpecializationOf(
+          specialization._abstractValue, generalization._abstractValue);
+
+  @override
+  AbstractValue getDictionaryValueForKey(
+      covariant PowersetValue value, String key) {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.getDictionaryValueForKey(
+        value._abstractValue, key);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  bool containsDictionaryKey(covariant PowersetValue value, String key) =>
+      _abstractValueDomain.containsDictionaryKey(value._abstractValue, key);
+
+  @override
+  AbstractValue createDictionaryValue(
+      covariant PowersetValue originalValue,
+      Object allocationNode,
+      MemberEntity allocationElement,
+      covariant PowersetValue key,
+      covariant PowersetValue value,
+      covariant Map<String, AbstractValue> mappings) {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.createDictionaryValue(
+        originalValue._abstractValue,
+        allocationNode,
+        allocationElement,
+        key._abstractValue,
+        value._abstractValue, {
+      for (var entry in mappings.entries)
+        entry.key: (entry.value as PowersetValue)._abstractValue
+    });
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  bool isDictionary(covariant PowersetValue value) =>
+      _abstractValueDomain.isDictionary(value._abstractValue);
+
+  @override
+  AbstractValue getMapValueType(covariant PowersetValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.getMapValueType(value._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue getMapKeyType(covariant PowersetValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.getMapKeyType(value._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue createMapValue(
+      covariant PowersetValue originalValue,
+      Object allocationNode,
+      MemberEntity allocationElement,
+      covariant PowersetValue key,
+      covariant PowersetValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.createMapValue(
+        originalValue._abstractValue,
+        allocationNode,
+        allocationElement,
+        key._abstractValue,
+        value._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  bool isMap(covariant PowersetValue value) =>
+      _abstractValueDomain.isMap(value._abstractValue);
+
+  @override
+  AbstractValue getSetElementType(covariant PowersetValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.getSetElementType(value._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue createSetValue(
+      covariant PowersetValue originalValue,
+      Object allocationNode,
+      MemberEntity allocationElement,
+      covariant PowersetValue elementType) {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.createSetValue(
+        originalValue._abstractValue,
+        allocationNode,
+        allocationElement,
+        elementType._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  bool isSet(covariant PowersetValue value) =>
+      _abstractValueDomain.isSet(value._abstractValue);
+
+  @override
+  int getContainerLength(covariant PowersetValue value) =>
+      _abstractValueDomain.getContainerLength(value._abstractValue);
+
+  @override
+  AbstractValue getContainerElementType(covariant PowersetValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.getContainerElementType(value._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue createContainerValue(
+      covariant PowersetValue originalValue,
+      Object allocationNode,
+      MemberEntity allocationElement,
+      covariant PowersetValue elementType,
+      int length) {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.createContainerValue(
+        originalValue._abstractValue,
+        allocationNode,
+        allocationElement,
+        elementType._abstractValue,
+        length);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  bool isContainer(covariant PowersetValue value) =>
+      _abstractValueDomain.isContainer(value._abstractValue);
+
+  @override
+  AbstractValue computeAbstractValueForConstant(covariant ConstantValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.computeAbstractValueForConstant(value);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue getAbstractValueForNativeMethodParameterType(DartType type) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.getAbstractValueForNativeMethodParameterType(type);
+    return wrapOrNull(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractBool containsAll(covariant PowersetValue a) =>
+      _abstractValueDomain.containsAll(a._abstractValue);
+
+  @override
+  AbstractBool areDisjoint(
+          covariant PowersetValue a, covariant PowersetValue b) =>
+      _abstractValueDomain.areDisjoint(a._abstractValue, b._abstractValue);
+
+  @override
+  AbstractValue intersection(
+      covariant PowersetValue a, covariant PowersetValue b) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.intersection(a._abstractValue, b._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue unionOfMany(covariant Iterable<AbstractValue> values) {
+    List<AbstractValue> unwrapped_Values = values
+        .map((element) => (element as PowersetValue)._abstractValue)
+        .toList();
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.unionOfMany(unwrapped_Values);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue union(covariant PowersetValue a, covariant PowersetValue b) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.union(a._abstractValue, b._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractBool isPrimitiveOrNull(covariant PowersetValue value) =>
+      _abstractValueDomain.isPrimitiveOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isStringOrNull(covariant PowersetValue value) =>
+      _abstractValueDomain.isStringOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isString(covariant PowersetValue value) =>
+      _abstractValueDomain.isString(value._abstractValue);
+
+  @override
+  AbstractBool isBooleanOrNull(covariant PowersetValue value) =>
+      _abstractValueDomain.isBooleanOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isBoolean(covariant PowersetValue value) =>
+      _abstractValueDomain.isBoolean(value._abstractValue);
+
+  @override
+  AbstractBool isDoubleOrNull(covariant PowersetValue value) =>
+      _abstractValueDomain.isDoubleOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isDouble(covariant PowersetValue value) =>
+      _abstractValueDomain.isDouble(value._abstractValue);
+
+  @override
+  AbstractBool isNumberOrNull(covariant PowersetValue value) =>
+      _abstractValueDomain.isNumberOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isNumber(covariant PowersetValue value) =>
+      _abstractValueDomain.isNumber(value._abstractValue);
+
+  @override
+  AbstractBool isIntegerOrNull(covariant PowersetValue value) =>
+      _abstractValueDomain.isIntegerOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isPositiveIntegerOrNull(covariant PowersetValue value) =>
+      _abstractValueDomain.isPositiveIntegerOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isPositiveInteger(covariant PowersetValue value) =>
+      _abstractValueDomain.isPositiveInteger(value._abstractValue);
+
+  @override
+  AbstractBool isUInt31(covariant PowersetValue value) =>
+      _abstractValueDomain.isUInt31(value._abstractValue);
+
+  @override
+  AbstractBool isUInt32(covariant PowersetValue value) =>
+      _abstractValueDomain.isUInt32(value._abstractValue);
+
+  @override
+  AbstractBool isInteger(covariant PowersetValue value) =>
+      _abstractValueDomain.isInteger(value._abstractValue);
+
+  @override
+  AbstractBool isInterceptor(covariant PowersetValue value) =>
+      _abstractValueDomain.isInterceptor(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitiveString(covariant PowersetValue value) =>
+      _abstractValueDomain.isPrimitiveString(value._abstractValue);
+
+  @override
+  AbstractBool isArray(covariant PowersetValue value) =>
+      _abstractValueDomain.isArray(value._abstractValue);
+
+  @override
+  AbstractBool isMutableIndexable(covariant PowersetValue value) =>
+      _abstractValueDomain.isMutableIndexable(value._abstractValue);
+
+  @override
+  AbstractBool isMutableArray(covariant PowersetValue value) =>
+      _abstractValueDomain.isMutableArray(value._abstractValue);
+
+  @override
+  AbstractBool isExtendableArray(covariant PowersetValue value) =>
+      _abstractValueDomain.isExtendableArray(value._abstractValue);
+
+  @override
+  AbstractBool isFixedArray(covariant PowersetValue value) =>
+      _abstractValueDomain.isFixedArray(value._abstractValue);
+
+  @override
+  AbstractBool isIndexablePrimitive(covariant PowersetValue value) =>
+      _abstractValueDomain.isIndexablePrimitive(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitiveArray(covariant PowersetValue value) =>
+      _abstractValueDomain.isPrimitiveArray(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitiveBoolean(covariant PowersetValue value) =>
+      _abstractValueDomain.isPrimitiveBoolean(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitiveNumber(covariant PowersetValue value) =>
+      _abstractValueDomain.isPrimitiveNumber(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitive(covariant PowersetValue value) =>
+      _abstractValueDomain.isPrimitive(value._abstractValue);
+
+  @override
+  AbstractBool isNull(covariant PowersetValue value) =>
+      _abstractValueDomain.isNull(value._abstractValue);
+
+  @override
+  ClassEntity getExactClass(covariant PowersetValue value) =>
+      _abstractValueDomain.getExactClass(value._abstractValue);
+
+  @override
+  AbstractBool isExactOrNull(covariant PowersetValue value) =>
+      _abstractValueDomain.isExactOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isExact(covariant PowersetValue value) =>
+      _abstractValueDomain.isExact(value._abstractValue);
+
+  @override
+  AbstractBool isEmpty(covariant PowersetValue value) =>
+      _abstractValueDomain.isEmpty(value._abstractValue);
+
+  @override
+  AbstractBool isInstanceOf(covariant PowersetValue value, ClassEntity cls) =>
+      _abstractValueDomain.isInstanceOf(value._abstractValue, cls);
+
+  @override
+  AbstractBool isInstanceOfOrNull(
+          covariant PowersetValue value, ClassEntity cls) =>
+      _abstractValueDomain.isInstanceOfOrNull(value._abstractValue, cls);
+
+  @override
+  AbstractBool containsOnlyType(
+          covariant PowersetValue value, ClassEntity cls) =>
+      _abstractValueDomain.containsOnlyType(value._abstractValue, cls);
+
+  @override
+  AbstractBool containsType(covariant PowersetValue value, ClassEntity cls) =>
+      _abstractValueDomain.containsType(value._abstractValue, cls);
+
+  @override
+  AbstractValue includeNull(covariant PowersetValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.includeNull(value._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue excludeNull(covariant PowersetValue value) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.excludeNull(value._abstractValue);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractBool couldBeTypedArray(covariant PowersetValue value) =>
+      _abstractValueDomain.couldBeTypedArray(value._abstractValue);
+
+  @override
+  AbstractBool isTypedArray(covariant PowersetValue value) =>
+      _abstractValueDomain.isTypedArray(value._abstractValue);
+
+  @override
+  AbstractValue createNullableSubtype(ClassEntity cls) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.createNullableSubtype(cls);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue createNonNullSubtype(ClassEntity cls) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.createNonNullSubtype(cls);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue createNonNullSubclass(ClassEntity cls) {
+    int powersetBits = 0;
+    AbstractValue abstractValue =
+        _abstractValueDomain.createNonNullSubclass(cls);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue createNullableExact(ClassEntity cls) {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.createNullableExact(cls);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValue createNonNullExact(ClassEntity cls) {
+    int powersetBits = 0;
+    AbstractValue abstractValue = _abstractValueDomain.createNonNullExact(cls);
+    return PowersetValue(abstractValue, powersetBits);
+  }
+
+  @override
+  AbstractValueWithPrecision createFromStaticType(DartType type,
+      {ClassRelation classRelation = ClassRelation.subtype, bool nullable}) {
+    int powersetBits = 0;
+    var unwrapped = _abstractValueDomain.createFromStaticType(type,
+        classRelation: classRelation, nullable: nullable);
+    return AbstractValueWithPrecision(
+        PowersetValue(unwrapped.abstractValue, powersetBits),
+        unwrapped.isPrecise);
+  }
+
+  @override
+  AbstractValue get asyncStarStreamType =>
+      PowersetValue(_abstractValueDomain.asyncStarStreamType, 0);
+
+  @override
+  AbstractValue get asyncFutureType =>
+      PowersetValue(_abstractValueDomain.asyncFutureType, 0);
+
+  @override
+  AbstractValue get syncStarIterableType =>
+      PowersetValue(_abstractValueDomain.syncStarIterableType, 0);
+
+  @override
+  AbstractValue get emptyType =>
+      PowersetValue(_abstractValueDomain.emptyType, 0);
+
+  @override
+  AbstractValue get constMapType =>
+      PowersetValue(_abstractValueDomain.constMapType, 0);
+
+  @override
+  AbstractValue get constSetType =>
+      PowersetValue(_abstractValueDomain.constSetType, 0);
+
+  @override
+  AbstractValue get constListType =>
+      PowersetValue(_abstractValueDomain.constListType, 0);
+
+  @override
+  AbstractValue get positiveIntType =>
+      PowersetValue(_abstractValueDomain.positiveIntType, 0);
+
+  @override
+  AbstractValue get uint32Type =>
+      PowersetValue(_abstractValueDomain.uint32Type, 0);
+
+  @override
+  AbstractValue get uint31Type =>
+      PowersetValue(_abstractValueDomain.uint31Type, 0);
+
+  @override
+  AbstractValue get fixedListType =>
+      PowersetValue(_abstractValueDomain.fixedListType, 0);
+
+  @override
+  AbstractValue get growableListType =>
+      PowersetValue(_abstractValueDomain.growableListType, 0);
+
+  @override
+  AbstractValue get nullType => PowersetValue(_abstractValueDomain.nullType, 0);
+
+  @override
+  AbstractValue get nonNullType =>
+      PowersetValue(_abstractValueDomain.nonNullType, 0);
+
+  @override
+  AbstractValue get mapType => PowersetValue(_abstractValueDomain.mapType, 0);
+
+  @override
+  AbstractValue get setType => PowersetValue(_abstractValueDomain.setType, 0);
+
+  @override
+  AbstractValue get listType => PowersetValue(_abstractValueDomain.listType, 0);
+
+  @override
+  AbstractValue get stringType =>
+      PowersetValue(_abstractValueDomain.stringType, 0);
+
+  @override
+  AbstractValue get numType => PowersetValue(_abstractValueDomain.numType, 0);
+
+  @override
+  AbstractValue get doubleType =>
+      PowersetValue(_abstractValueDomain.doubleType, 0);
+
+  @override
+  AbstractValue get intType => PowersetValue(_abstractValueDomain.intType, 0);
+
+  @override
+  AbstractValue get boolType => PowersetValue(_abstractValueDomain.boolType, 0);
+
+  @override
+  AbstractValue get functionType =>
+      PowersetValue(_abstractValueDomain.functionType, 0);
+
+  @override
+  AbstractValue get typeType => PowersetValue(_abstractValueDomain.typeType, 0);
+}
+
+class PowersetStrategy implements AbstractValueStrategy {
+  final AbstractValueStrategy _abstractValueStrategy;
+  const PowersetStrategy(this._abstractValueStrategy);
+
+  @override
+  AbstractValueDomain createDomain(JClosedWorld closedWorld) {
+    return PowersetDomain(_abstractValueStrategy.createDomain(closedWorld));
+  }
+
+  @override
+  SelectorConstraintsStrategy createSelectorStrategy() {
+    return PowersetsSelectorStrategy(
+        _abstractValueStrategy.createSelectorStrategy());
+  }
+}
+
+class PowersetsSelectorStrategy implements SelectorConstraintsStrategy {
+  final SelectorConstraintsStrategy _selectorConstraintsStrategy;
+  const PowersetsSelectorStrategy(this._selectorConstraintsStrategy);
+
+  @override
+  UniverseSelectorConstraints createSelectorConstraints(
+      Selector selector, Object initialConstraint) {
+    return PowersetsUniverseSelectorConstraints(
+        _selectorConstraintsStrategy.createSelectorConstraints(
+            selector,
+            initialConstraint == null
+                ? null
+                : (initialConstraint as PowersetValue)._abstractValue));
+  }
+
+  @override
+  bool appliedUnnamed(DynamicUse dynamicUse, MemberEntity member,
+      covariant JClosedWorld world) {
+    return _selectorConstraintsStrategy.appliedUnnamed(
+        dynamicUse.withReceiverConstraint(
+            unwrapOrNull(dynamicUse.receiverConstraint)),
+        member,
+        world);
+  }
+}
+
+class PowersetsUniverseSelectorConstraints
+    implements UniverseSelectorConstraints {
+  final UniverseSelectorConstraints _universeSelectorConstraints;
+  const PowersetsUniverseSelectorConstraints(this._universeSelectorConstraints);
+
+  @override
+  bool addReceiverConstraint(Object constraint) =>
+      _universeSelectorConstraints.addReceiverConstraint(constraint == null
+          ? null
+          : (constraint as PowersetValue)._abstractValue);
+
+  @override
+  bool needsNoSuchMethodHandling(Selector selector, World world) =>
+      _universeSelectorConstraints.needsNoSuchMethodHandling(selector, world);
+
+  @override
+  bool canHit(MemberEntity element, Name name, World world) =>
+      _universeSelectorConstraints.canHit(element, name, world);
+
+  @override
+  String toString() => 'PowersetsUniverseSelectorConstraints:$hashCode';
+}
diff --git a/pkg/compiler/lib/src/inferrer/powersets/wrapped.dart b/pkg/compiler/lib/src/inferrer/powersets/wrapped.dart
new file mode 100644
index 0000000..c30f196
--- /dev/null
+++ b/pkg/compiler/lib/src/inferrer/powersets/wrapped.dart
@@ -0,0 +1,653 @@
+// 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 '../../constants/values.dart' show ConstantValue, PrimitiveConstantValue;
+import '../../elements/entities.dart';
+import '../../elements/names.dart';
+import '../../elements/types.dart' show DartType;
+import '../../ir/static_type.dart';
+import '../../serialization/serialization.dart';
+import '../../universe/selector.dart';
+import '../../universe/world_builder.dart';
+import '../../universe/use.dart';
+import '../../world.dart';
+import '../abstract_value_domain.dart';
+
+class WrappedAbstractValue implements AbstractValue {
+  final AbstractValue _abstractValue;
+  const WrappedAbstractValue(this._abstractValue);
+
+  @override
+  bool operator ==(var other) {
+    if (identical(this, other)) return true;
+    if (other is! WrappedAbstractValue) return false;
+    WrappedAbstractValue otherWrapped = other;
+    return other is WrappedAbstractValue &&
+        _abstractValue == otherWrapped._abstractValue;
+  }
+
+  @override
+  int get hashCode {
+    return _abstractValue.hashCode;
+  }
+
+  @override
+  String toString() => _abstractValue.toString();
+}
+
+AbstractValue unwrapOrNull(WrappedAbstractValue wrapped) {
+  return wrapped == null ? null : wrapped._abstractValue;
+}
+
+WrappedAbstractValue wrapOrNull(AbstractValue abstractValue) {
+  return abstractValue == null ? null : WrappedAbstractValue(abstractValue);
+}
+
+class WrappedAbstractValueDomain implements AbstractValueDomain {
+  final AbstractValueDomain _abstractValueDomain;
+  const WrappedAbstractValueDomain(this._abstractValueDomain);
+
+  @override
+  AbstractValue get dynamicType =>
+      WrappedAbstractValue(_abstractValueDomain.dynamicType);
+
+  @override
+  void writeAbstractValueToDataSink(
+      DataSink sink, covariant WrappedAbstractValue value) {
+    _abstractValueDomain.writeAbstractValueToDataSink(
+        sink, value._abstractValue);
+  }
+
+  @override
+  AbstractValue readAbstractValueFromDataSource(DataSource source) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.readAbstractValueFromDataSource(source));
+
+  @override
+  String getCompactText(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.getCompactText(value._abstractValue);
+
+  @override
+  AbstractBool isFixedLengthJsIndexable(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isFixedLengthJsIndexable(value._abstractValue);
+
+  @override
+  AbstractBool isJsIndexableAndIterable(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isJsIndexableAndIterable(unwrapOrNull(value));
+
+  @override
+  AbstractBool isJsIndexable(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isJsIndexable(value._abstractValue);
+
+  @override
+  MemberEntity locateSingleMember(
+          covariant WrappedAbstractValue receiver, Selector selector) =>
+      _abstractValueDomain.locateSingleMember(
+          receiver._abstractValue, selector);
+
+  @override
+  AbstractBool isIn(covariant WrappedAbstractValue subset,
+          covariant WrappedAbstractValue superset) =>
+      _abstractValueDomain.isIn(subset._abstractValue, superset._abstractValue);
+
+  @override
+  AbstractBool needsNoSuchMethodHandling(
+          covariant WrappedAbstractValue receiver, Selector selector) =>
+      _abstractValueDomain.needsNoSuchMethodHandling(
+          receiver._abstractValue, selector);
+
+  @override
+  AbstractBool isTargetingMember(covariant WrappedAbstractValue receiver,
+          MemberEntity member, Name name) =>
+      _abstractValueDomain.isTargetingMember(
+          receiver._abstractValue, member, name);
+
+  @override
+  AbstractValue computeReceiver(Iterable<MemberEntity> members) =>
+      WrappedAbstractValue(_abstractValueDomain.computeReceiver(members));
+
+  @override
+  PrimitiveConstantValue getPrimitiveValue(
+          covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.getPrimitiveValue(value._abstractValue);
+
+  @override
+  AbstractValue createPrimitiveValue(
+          covariant WrappedAbstractValue originalValue,
+          PrimitiveConstantValue value) =>
+      WrappedAbstractValue(_abstractValueDomain.createPrimitiveValue(
+          originalValue._abstractValue, value));
+
+  @override
+  bool isPrimitiveValue(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isPrimitiveValue(value._abstractValue);
+
+  @override
+  MemberEntity getAllocationElement(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.getAllocationElement(value._abstractValue);
+
+  @override
+  Object getAllocationNode(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.getAllocationNode(value._abstractValue);
+
+  @override
+  AbstractValue getGeneralization(covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.getGeneralization(unwrapOrNull(value)));
+
+  @override
+  bool isSpecializationOf(covariant WrappedAbstractValue specialization,
+          covariant WrappedAbstractValue generalization) =>
+      _abstractValueDomain.isSpecializationOf(
+          specialization._abstractValue, generalization._abstractValue);
+
+  @override
+  AbstractValue getDictionaryValueForKey(
+          covariant WrappedAbstractValue value, String key) =>
+      WrappedAbstractValue(_abstractValueDomain.getDictionaryValueForKey(
+          value._abstractValue, key));
+
+  @override
+  bool containsDictionaryKey(
+          covariant WrappedAbstractValue value, String key) =>
+      _abstractValueDomain.containsDictionaryKey(value._abstractValue, key);
+
+  @override
+  AbstractValue createDictionaryValue(
+      covariant WrappedAbstractValue originalValue,
+      Object allocationNode,
+      MemberEntity allocationElement,
+      covariant WrappedAbstractValue key,
+      covariant WrappedAbstractValue value,
+      covariant Map<String, AbstractValue> mappings) {
+    return WrappedAbstractValue(_abstractValueDomain.createDictionaryValue(
+        originalValue._abstractValue,
+        allocationNode,
+        allocationElement,
+        key._abstractValue,
+        value._abstractValue, {
+      for (var entry in mappings.entries)
+        entry.key: (entry.value as WrappedAbstractValue)._abstractValue
+    }));
+  }
+
+  @override
+  bool isDictionary(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isDictionary(value._abstractValue);
+
+  @override
+  AbstractValue getMapValueType(covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.getMapValueType(value._abstractValue));
+
+  @override
+  AbstractValue getMapKeyType(covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.getMapKeyType(value._abstractValue));
+
+  @override
+  AbstractValue createMapValue(
+          covariant WrappedAbstractValue originalValue,
+          Object allocationNode,
+          MemberEntity allocationElement,
+          covariant WrappedAbstractValue key,
+          covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(_abstractValueDomain.createMapValue(
+          originalValue._abstractValue,
+          allocationNode,
+          allocationElement,
+          key._abstractValue,
+          value._abstractValue));
+
+  @override
+  bool isMap(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isMap(value._abstractValue);
+
+  @override
+  AbstractValue getSetElementType(covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.getSetElementType(value._abstractValue));
+
+  @override
+  AbstractValue createSetValue(
+          covariant WrappedAbstractValue originalValue,
+          Object allocationNode,
+          MemberEntity allocationElement,
+          covariant WrappedAbstractValue elementType) =>
+      WrappedAbstractValue(_abstractValueDomain.createSetValue(
+          originalValue._abstractValue,
+          allocationNode,
+          allocationElement,
+          elementType._abstractValue));
+
+  @override
+  bool isSet(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isSet(value._abstractValue);
+
+  @override
+  int getContainerLength(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.getContainerLength(value._abstractValue);
+
+  @override
+  AbstractValue getContainerElementType(covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.getContainerElementType(value._abstractValue));
+
+  @override
+  AbstractValue createContainerValue(
+          covariant WrappedAbstractValue originalValue,
+          Object allocationNode,
+          MemberEntity allocationElement,
+          covariant WrappedAbstractValue elementType,
+          int length) =>
+      WrappedAbstractValue(_abstractValueDomain.createContainerValue(
+          originalValue._abstractValue,
+          allocationNode,
+          allocationElement,
+          elementType._abstractValue,
+          length));
+
+  @override
+  bool isContainer(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isContainer(value._abstractValue);
+
+  @override
+  AbstractValue computeAbstractValueForConstant(
+          covariant ConstantValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.computeAbstractValueForConstant(value));
+
+  @override
+  AbstractValue getAbstractValueForNativeMethodParameterType(DartType type) {
+    return wrapOrNull(_abstractValueDomain
+        .getAbstractValueForNativeMethodParameterType(type));
+  }
+
+  @override
+  AbstractBool containsAll(covariant WrappedAbstractValue a) =>
+      _abstractValueDomain.containsAll(a._abstractValue);
+
+  @override
+  AbstractBool areDisjoint(
+          covariant WrappedAbstractValue a, covariant WrappedAbstractValue b) =>
+      _abstractValueDomain.areDisjoint(a._abstractValue, b._abstractValue);
+
+  @override
+  AbstractValue intersection(
+          covariant WrappedAbstractValue a, covariant WrappedAbstractValue b) =>
+      WrappedAbstractValue(_abstractValueDomain.intersection(
+          a._abstractValue, b._abstractValue));
+
+  @override
+  AbstractValue unionOfMany(covariant Iterable<AbstractValue> values) {
+    List<AbstractValue> unwrapped_Values = values
+        .map((element) => (element as WrappedAbstractValue)._abstractValue)
+        .toList();
+    return WrappedAbstractValue(
+        _abstractValueDomain.unionOfMany(unwrapped_Values));
+  }
+
+  @override
+  AbstractValue union(
+          covariant WrappedAbstractValue a, covariant WrappedAbstractValue b) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.union(a._abstractValue, b._abstractValue));
+
+  @override
+  AbstractBool isPrimitiveOrNull(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isPrimitiveOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isStringOrNull(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isStringOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isString(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isString(value._abstractValue);
+
+  @override
+  AbstractBool isBooleanOrNull(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isBooleanOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isBoolean(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isBoolean(value._abstractValue);
+
+  @override
+  AbstractBool isDoubleOrNull(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isDoubleOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isDouble(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isDouble(value._abstractValue);
+
+  @override
+  AbstractBool isNumberOrNull(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isNumberOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isNumber(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isNumber(value._abstractValue);
+
+  @override
+  AbstractBool isIntegerOrNull(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isIntegerOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isPositiveIntegerOrNull(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isPositiveIntegerOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isPositiveInteger(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isPositiveInteger(value._abstractValue);
+
+  @override
+  AbstractBool isUInt31(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isUInt31(value._abstractValue);
+
+  @override
+  AbstractBool isUInt32(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isUInt32(value._abstractValue);
+
+  @override
+  AbstractBool isInteger(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isInteger(value._abstractValue);
+
+  @override
+  AbstractBool isInterceptor(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isInterceptor(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitiveString(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isPrimitiveString(value._abstractValue);
+
+  @override
+  AbstractBool isArray(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isArray(value._abstractValue);
+
+  @override
+  AbstractBool isMutableIndexable(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isMutableIndexable(value._abstractValue);
+
+  @override
+  AbstractBool isMutableArray(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isMutableArray(value._abstractValue);
+
+  @override
+  AbstractBool isExtendableArray(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isExtendableArray(value._abstractValue);
+
+  @override
+  AbstractBool isFixedArray(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isFixedArray(value._abstractValue);
+
+  @override
+  AbstractBool isIndexablePrimitive(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isIndexablePrimitive(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitiveArray(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isPrimitiveArray(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitiveBoolean(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isPrimitiveBoolean(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitiveNumber(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isPrimitiveNumber(value._abstractValue);
+
+  @override
+  AbstractBool isPrimitive(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isPrimitive(value._abstractValue);
+
+  @override
+  AbstractBool isNull(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isNull(value._abstractValue);
+
+  @override
+  ClassEntity getExactClass(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.getExactClass(value._abstractValue);
+
+  @override
+  AbstractBool isExactOrNull(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isExactOrNull(value._abstractValue);
+
+  @override
+  AbstractBool isExact(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isExact(value._abstractValue);
+
+  @override
+  AbstractBool isEmpty(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isEmpty(value._abstractValue);
+
+  @override
+  AbstractBool isInstanceOf(
+          covariant WrappedAbstractValue value, ClassEntity cls) =>
+      _abstractValueDomain.isInstanceOf(value._abstractValue, cls);
+
+  @override
+  AbstractBool isInstanceOfOrNull(
+          covariant WrappedAbstractValue value, ClassEntity cls) =>
+      _abstractValueDomain.isInstanceOfOrNull(value._abstractValue, cls);
+
+  @override
+  AbstractBool containsOnlyType(
+          covariant WrappedAbstractValue value, ClassEntity cls) =>
+      _abstractValueDomain.containsOnlyType(value._abstractValue, cls);
+
+  @override
+  AbstractBool containsType(
+          covariant WrappedAbstractValue value, ClassEntity cls) =>
+      _abstractValueDomain.containsType(value._abstractValue, cls);
+
+  @override
+  AbstractValue includeNull(covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.includeNull(value._abstractValue));
+
+  @override
+  AbstractValue excludeNull(covariant WrappedAbstractValue value) =>
+      WrappedAbstractValue(
+          _abstractValueDomain.excludeNull(value._abstractValue));
+
+  @override
+  AbstractBool couldBeTypedArray(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.couldBeTypedArray(value._abstractValue);
+
+  @override
+  AbstractBool isTypedArray(covariant WrappedAbstractValue value) =>
+      _abstractValueDomain.isTypedArray(value._abstractValue);
+
+  @override
+  AbstractValue createNullableSubtype(ClassEntity cls) =>
+      WrappedAbstractValue(_abstractValueDomain.createNullableSubtype(cls));
+
+  @override
+  AbstractValue createNonNullSubtype(ClassEntity cls) =>
+      WrappedAbstractValue(_abstractValueDomain.createNonNullSubtype(cls));
+
+  @override
+  AbstractValue createNonNullSubclass(ClassEntity cls) =>
+      WrappedAbstractValue(_abstractValueDomain.createNonNullSubclass(cls));
+
+  @override
+  AbstractValue createNullableExact(ClassEntity cls) =>
+      WrappedAbstractValue(_abstractValueDomain.createNullableExact(cls));
+
+  @override
+  AbstractValue createNonNullExact(ClassEntity cls) =>
+      WrappedAbstractValue(_abstractValueDomain.createNonNullExact(cls));
+
+  @override
+  AbstractValueWithPrecision createFromStaticType(DartType type,
+      {ClassRelation classRelation = ClassRelation.subtype, bool nullable}) {
+    var unwrapped = _abstractValueDomain.createFromStaticType(type,
+        classRelation: classRelation, nullable: nullable);
+    return AbstractValueWithPrecision(
+        WrappedAbstractValue(unwrapped.abstractValue), unwrapped.isPrecise);
+  }
+
+  @override
+  AbstractValue get asyncStarStreamType =>
+      WrappedAbstractValue(_abstractValueDomain.asyncStarStreamType);
+
+  @override
+  AbstractValue get asyncFutureType =>
+      WrappedAbstractValue(_abstractValueDomain.asyncFutureType);
+
+  @override
+  AbstractValue get syncStarIterableType =>
+      WrappedAbstractValue(_abstractValueDomain.syncStarIterableType);
+
+  @override
+  AbstractValue get emptyType =>
+      WrappedAbstractValue(_abstractValueDomain.emptyType);
+
+  @override
+  AbstractValue get constMapType =>
+      WrappedAbstractValue(_abstractValueDomain.constMapType);
+
+  @override
+  AbstractValue get constSetType =>
+      WrappedAbstractValue(_abstractValueDomain.constSetType);
+
+  @override
+  AbstractValue get constListType =>
+      WrappedAbstractValue(_abstractValueDomain.constListType);
+
+  @override
+  AbstractValue get positiveIntType =>
+      WrappedAbstractValue(_abstractValueDomain.positiveIntType);
+
+  @override
+  AbstractValue get uint32Type =>
+      WrappedAbstractValue(_abstractValueDomain.uint32Type);
+
+  @override
+  AbstractValue get uint31Type =>
+      WrappedAbstractValue(_abstractValueDomain.uint31Type);
+
+  @override
+  AbstractValue get fixedListType =>
+      WrappedAbstractValue(_abstractValueDomain.fixedListType);
+
+  @override
+  AbstractValue get growableListType =>
+      WrappedAbstractValue(_abstractValueDomain.growableListType);
+
+  @override
+  AbstractValue get nullType =>
+      WrappedAbstractValue(_abstractValueDomain.nullType);
+
+  @override
+  AbstractValue get nonNullType =>
+      WrappedAbstractValue(_abstractValueDomain.nonNullType);
+
+  @override
+  AbstractValue get mapType =>
+      WrappedAbstractValue(_abstractValueDomain.mapType);
+
+  @override
+  AbstractValue get setType =>
+      WrappedAbstractValue(_abstractValueDomain.setType);
+
+  @override
+  AbstractValue get listType =>
+      WrappedAbstractValue(_abstractValueDomain.listType);
+
+  @override
+  AbstractValue get stringType =>
+      WrappedAbstractValue(_abstractValueDomain.stringType);
+
+  @override
+  AbstractValue get numType =>
+      WrappedAbstractValue(_abstractValueDomain.numType);
+
+  @override
+  AbstractValue get doubleType =>
+      WrappedAbstractValue(_abstractValueDomain.doubleType);
+
+  @override
+  AbstractValue get intType =>
+      WrappedAbstractValue(_abstractValueDomain.intType);
+
+  @override
+  AbstractValue get boolType =>
+      WrappedAbstractValue(_abstractValueDomain.boolType);
+
+  @override
+  AbstractValue get functionType =>
+      WrappedAbstractValue(_abstractValueDomain.functionType);
+
+  @override
+  AbstractValue get typeType =>
+      WrappedAbstractValue(_abstractValueDomain.typeType);
+}
+
+class WrappedAbstractValueStrategy implements AbstractValueStrategy {
+  final AbstractValueStrategy _abstractValueStrategy;
+  const WrappedAbstractValueStrategy(this._abstractValueStrategy);
+
+  @override
+  AbstractValueDomain createDomain(JClosedWorld closedWorld) {
+    return WrappedAbstractValueDomain(
+        _abstractValueStrategy.createDomain(closedWorld));
+  }
+
+  @override
+  SelectorConstraintsStrategy createSelectorStrategy() {
+    return WrappedSelectorStrategy(
+        _abstractValueStrategy.createSelectorStrategy());
+  }
+}
+
+class WrappedSelectorStrategy implements SelectorConstraintsStrategy {
+  final SelectorConstraintsStrategy _selectorConstraintsStrategy;
+  const WrappedSelectorStrategy(this._selectorConstraintsStrategy);
+
+  @override
+  UniverseSelectorConstraints createSelectorConstraints(
+      Selector selector, Object initialConstraint) {
+    return WrappedUniverseSelectorConstraints(
+        _selectorConstraintsStrategy.createSelectorConstraints(
+            selector,
+            initialConstraint == null
+                ? null
+                : (initialConstraint as WrappedAbstractValue)._abstractValue));
+  }
+
+  @override
+  bool appliedUnnamed(DynamicUse dynamicUse, MemberEntity member,
+      covariant JClosedWorld world) {
+    return _selectorConstraintsStrategy.appliedUnnamed(
+        dynamicUse.withReceiverConstraint(
+            unwrapOrNull(dynamicUse.receiverConstraint)),
+        member,
+        world);
+  }
+}
+
+class WrappedUniverseSelectorConstraints
+    implements UniverseSelectorConstraints {
+  final UniverseSelectorConstraints _universeSelectorConstraints;
+  const WrappedUniverseSelectorConstraints(this._universeSelectorConstraints);
+
+  @override
+  bool addReceiverConstraint(Object constraint) =>
+      _universeSelectorConstraints.addReceiverConstraint(constraint == null
+          ? null
+          : (constraint as WrappedAbstractValue)._abstractValue);
+
+  @override
+  bool needsNoSuchMethodHandling(Selector selector, World world) =>
+      _universeSelectorConstraints.needsNoSuchMethodHandling(selector, world);
+
+  @override
+  bool canHit(MemberEntity element, Name name, World world) =>
+      _universeSelectorConstraints.canHit(element, name, world);
+
+  @override
+  String toString() => 'WrappedUniverseSelectorConstraints:$hashCode';
+}
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 5d6d6ac..4aa804c 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -1239,26 +1239,24 @@
   /// library code.
   TypeInformation handleIntrisifiedSelector(
       Selector selector, AbstractValue mask, InferrerEngine inferrer) {
-    JClosedWorld closedWorld = inferrer.closedWorld;
+    AbstractValueDomain abstractValueDomain = inferrer.abstractValueDomain;
     if (mask == null) return null;
-    if (inferrer.abstractValueDomain.isIntegerOrNull(mask).isPotentiallyFalse) {
+    if (abstractValueDomain.isIntegerOrNull(mask).isPotentiallyFalse) {
       return null;
     }
     if (!selector.isCall && !selector.isOperator) return null;
     if (!arguments.named.isEmpty) return null;
     if (arguments.positional.length > 1) return null;
 
-    ClassEntity uint31Implementation = closedWorld.commonElements.jsUInt31Class;
-    bool isInt(info) => info.type.containsOnlyInt(closedWorld);
-    bool isEmpty(info) => info.type.isEmpty;
-    bool isUInt31(info) {
-      return info.type.satisfies(uint31Implementation, closedWorld);
-    }
-
-    bool isPositiveInt(info) {
-      return info.type.satisfies(
-          closedWorld.commonElements.jsPositiveIntClass, closedWorld);
-    }
+    bool isInt(info) =>
+        abstractValueDomain.isIntegerOrNull(info.type).isDefinitelyTrue;
+    bool isEmpty(info) =>
+        abstractValueDomain.isEmpty(info.type).isDefinitelyTrue;
+    bool isUInt31(info) => abstractValueDomain
+        .isUInt31(abstractValueDomain.excludeNull(info.type))
+        .isDefinitelyTrue;
+    bool isPositiveInt(info) =>
+        abstractValueDomain.isPositiveIntegerOrNull(info.type).isDefinitelyTrue;
 
     TypeInformation tryLater() => inferrer.types.nonNullEmptyType;
 
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/constants.dart b/pkg/compiler/lib/src/inferrer/typemasks/constants.dart
index 0994564..935095e 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/constants.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/constants.dart
@@ -10,19 +10,21 @@
 import 'masks.dart';
 
 /// Computes the [TypeMask] for the constant [value].
-TypeMask computeTypeMask(JClosedWorld closedWorld, ConstantValue value) {
-  return value.accept(const ConstantValueTypeMasks(), closedWorld);
+TypeMask computeTypeMask(CommonMasks abstractValueDomain,
+    JClosedWorld closedWorld, ConstantValue value) {
+  return value.accept(ConstantValueTypeMasks(abstractValueDomain), closedWorld);
 }
 
 class ConstantValueTypeMasks
     extends ConstantValueVisitor<TypeMask, JClosedWorld> {
-  const ConstantValueTypeMasks();
+  final CommonMasks _abstractValueDomain;
+  const ConstantValueTypeMasks(this._abstractValueDomain);
 
   @override
   TypeMask visitConstructed(
       ConstructedConstantValue constant, JClosedWorld closedWorld) {
     if (closedWorld.interceptorData.isInterceptedClass(constant.type.element)) {
-      return closedWorld.abstractValueDomain.nonNullType;
+      return _abstractValueDomain.nonNullType;
     }
     return new TypeMask.nonNullExact(constant.type.element, closedWorld);
   }
@@ -38,97 +40,96 @@
     // We have to recognize double constants that are 'is int'.
     if (constant_system.isInt(constant)) {
       if (constant.isMinusZero) {
-        return closedWorld.abstractValueDomain.uint31Type;
+        return _abstractValueDomain.uint31Type;
       } else {
         assert(constant.isPositiveInfinity || constant.isNegativeInfinity);
-        return closedWorld.abstractValueDomain.intType;
+        return _abstractValueDomain.intType;
       }
     }
-    return closedWorld.abstractValueDomain.doubleType;
+    return _abstractValueDomain.doubleType;
   }
 
   @override
   TypeMask visitDummyInterceptor(
       DummyInterceptorConstantValue constant, JClosedWorld closedWorld) {
-    return constant.abstractValue;
+    return _abstractValueDomain.dynamicType;
   }
 
   @override
   TypeMask visitUnreachable(
       UnreachableConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.emptyType;
+    return _abstractValueDomain.emptyType;
   }
 
   @override
   TypeMask visitJsName(JsNameConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.stringType;
+    return _abstractValueDomain.stringType;
   }
 
   @override
   TypeMask visitBool(BoolConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.boolType;
+    return _abstractValueDomain.boolType;
   }
 
   @override
   TypeMask visitFunction(
       FunctionConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.functionType;
+    return _abstractValueDomain.functionType;
   }
 
   @override
   TypeMask visitInstantiation(
       InstantiationConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.functionType;
+    return _abstractValueDomain.functionType;
   }
 
   @override
   TypeMask visitInt(IntConstantValue constant, JClosedWorld closedWorld) {
-    if (constant.isUInt31()) return closedWorld.abstractValueDomain.uint31Type;
-    if (constant.isUInt32()) return closedWorld.abstractValueDomain.uint32Type;
-    if (constant.isPositive())
-      return closedWorld.abstractValueDomain.positiveIntType;
-    return closedWorld.abstractValueDomain.intType;
+    if (constant.isUInt31()) return _abstractValueDomain.uint31Type;
+    if (constant.isUInt32()) return _abstractValueDomain.uint32Type;
+    if (constant.isPositive()) return _abstractValueDomain.positiveIntType;
+    return _abstractValueDomain.intType;
   }
 
   @override
   TypeMask visitInterceptor(
       InterceptorConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.nonNullType;
+    return _abstractValueDomain.nonNullType;
   }
 
   @override
   TypeMask visitList(ListConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.constListType;
+    return _abstractValueDomain.constListType;
   }
 
   @override
   TypeMask visitSet(SetConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.constSetType;
+    return _abstractValueDomain.constSetType;
   }
 
   @override
   TypeMask visitMap(MapConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.constMapType;
+    return _abstractValueDomain.constMapType;
   }
 
   @override
   TypeMask visitNull(NullConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.nullType;
+    return _abstractValueDomain.nullType;
   }
 
   @override
   TypeMask visitNonConstant(
       NonConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.nullType;
+    return _abstractValueDomain.nullType;
   }
 
   @override
   TypeMask visitString(StringConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.stringType;
+    return _abstractValueDomain.stringType;
   }
 
   @override
   TypeMask visitType(TypeConstantValue constant, JClosedWorld closedWorld) {
-    return closedWorld.abstractValueDomain.typeType;
+    return _abstractValueDomain.typeType;
   }
 }
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
index f2fda3d..188a951 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
@@ -32,12 +32,12 @@
 
   /// Deserializes a [ContainerTypeMask] object from [source].
   factory ContainerTypeMask.readFromDataSource(
-      DataSource source, JClosedWorld closedWorld) {
+      DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, closedWorld);
+    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
     ir.TreeNode allocationNode = source.readTreeNodeOrNull();
     MemberEntity allocationElement = source.readMemberOrNull();
-    TypeMask elementType = new TypeMask.readFromDataSource(source, closedWorld);
+    TypeMask elementType = new TypeMask.readFromDataSource(source, domain);
     int length = source.readIntOrNull();
     source.end(tag);
     return new ContainerTypeMask(
@@ -88,14 +88,14 @@
   }
 
   @override
-  TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
-    TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
+  TypeMask intersection(TypeMask other, CommonMasks domain) {
+    TypeMask forwardIntersection = forwardTo.intersection(other, domain);
     if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
     return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
   @override
-  TypeMask union(dynamic other, JClosedWorld closedWorld) {
+  TypeMask union(dynamic other, CommonMasks domain) {
     if (this == other) {
       return this;
     } else if (equalsDisregardNull(other)) {
@@ -105,10 +105,9 @@
     } else if (other.isContainer &&
         elementType != null &&
         other.elementType != null) {
-      TypeMask newElementType =
-          elementType.union(other.elementType, closedWorld);
+      TypeMask newElementType = elementType.union(other.elementType, domain);
       int newLength = (length == other.length) ? length : null;
-      TypeMask newForwardTo = forwardTo.union(other.forwardTo, closedWorld);
+      TypeMask newForwardTo = forwardTo.union(other.forwardTo, domain);
       return new ContainerTypeMask(
           newForwardTo,
           allocationNode == other.allocationNode ? allocationNode : null,
@@ -118,7 +117,7 @@
           newElementType,
           newLength);
     } else {
-      return forwardTo.union(other, closedWorld);
+      return forwardTo.union(other, domain);
     }
   }
 
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
index ef15561..cc54437 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
@@ -29,15 +29,15 @@
 
   /// Deserializes a [DictionaryTypeMask] object from [source].
   factory DictionaryTypeMask.readFromDataSource(
-      DataSource source, JClosedWorld closedWorld) {
+      DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, closedWorld);
+    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
     ir.TreeNode allocationNode = source.readTreeNodeOrNull();
     MemberEntity allocationElement = source.readMemberOrNull();
-    TypeMask keyType = new TypeMask.readFromDataSource(source, closedWorld);
-    TypeMask valueType = new TypeMask.readFromDataSource(source, closedWorld);
-    Map<String, AbstractValue> typeMap = source.readStringMap(
-        () => new TypeMask.readFromDataSource(source, closedWorld));
+    TypeMask keyType = new TypeMask.readFromDataSource(source, domain);
+    TypeMask valueType = new TypeMask.readFromDataSource(source, domain);
+    Map<String, AbstractValue> typeMap = source
+        .readStringMap(() => new TypeMask.readFromDataSource(source, domain));
     source.end(tag);
     return new DictionaryTypeMask(forwardTo, allocationNode, allocationElement,
         keyType, valueType, typeMap);
@@ -97,14 +97,14 @@
   }
 
   @override
-  TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
-    TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
+  TypeMask intersection(TypeMask other, CommonMasks domain) {
+    TypeMask forwardIntersection = forwardTo.intersection(other, domain);
     if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
     return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
   @override
-  TypeMask union(dynamic other, JClosedWorld closedWorld) {
+  TypeMask union(dynamic other, CommonMasks domain) {
     if (this == other) {
       return this;
     } else if (equalsDisregardNull(other)) {
@@ -112,9 +112,9 @@
     } else if (other.isEmptyOrNull) {
       return other.isNullable ? this.nullable() : this;
     } else if (other.isDictionary) {
-      TypeMask newForwardTo = forwardTo.union(other.forwardTo, closedWorld);
-      TypeMask newKeyType = keyType.union(other.keyType, closedWorld);
-      TypeMask newValueType = valueType.union(other.valueType, closedWorld);
+      TypeMask newForwardTo = forwardTo.union(other.forwardTo, domain);
+      TypeMask newKeyType = keyType.union(other.keyType, domain);
+      TypeMask newValueType = valueType.union(other.valueType, domain);
       Map<String, TypeMask> mappings = <String, TypeMask>{};
       _typeMap.forEach((k, dynamic v) {
         if (!other._typeMap.containsKey(k)) {
@@ -123,7 +123,7 @@
       });
       other._typeMap.forEach((k, v) {
         if (_typeMap.containsKey(k)) {
-          mappings[k] = v.union(_typeMap[k], closedWorld);
+          mappings[k] = v.union(_typeMap[k], domain);
         } else {
           mappings[k] = v.nullable();
         }
@@ -133,13 +133,13 @@
     } else if (other.isMap &&
         (other.keyType != null) &&
         (other.valueType != null)) {
-      TypeMask newForwardTo = forwardTo.union(other.forwardTo, closedWorld);
-      TypeMask newKeyType = keyType.union(other.keyType, closedWorld);
-      TypeMask newValueType = valueType.union(other.valueType, closedWorld);
+      TypeMask newForwardTo = forwardTo.union(other.forwardTo, domain);
+      TypeMask newKeyType = keyType.union(other.keyType, domain);
+      TypeMask newValueType = valueType.union(other.valueType, domain);
       return new MapTypeMask(
           newForwardTo, null, null, newKeyType, newValueType);
     } else {
-      return forwardTo.union(other, closedWorld);
+      return forwardTo.union(other, domain);
     }
   }
 
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
index 175bac3..deb7d88 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
@@ -53,37 +53,35 @@
   /// Ensures that the generated mask is normalized, i.e., a call to
   /// [TypeMask.assertIsNormalized] with the factory's result returns `true`.
   factory FlatTypeMask.normalized(
-      ClassEntity base, int flags, JClosedWorld world) {
-    if (base == world.commonElements.nullClass) {
+      ClassEntity base, int flags, CommonMasks domain) {
+    if (base == domain.commonElements.nullClass) {
       return FlatTypeMask.empty();
     }
     if ((flags >> 1) == EMPTY || ((flags >> 1) == EXACT)) {
       return new FlatTypeMask._(base, flags);
     }
     if ((flags >> 1) == SUBTYPE) {
-      if (!world.classHierarchy.hasAnyStrictSubtype(base) ||
-          world.classHierarchy.hasOnlySubclasses(base)) {
+      if (!domain._closedWorld.classHierarchy.hasAnyStrictSubtype(base) ||
+          domain._closedWorld.classHierarchy.hasOnlySubclasses(base)) {
         flags = (flags & 0x1) | (SUBCLASS << 1);
       }
     }
     if (((flags >> 1) == SUBCLASS) &&
-        !world.classHierarchy.hasAnyStrictSubclass(base)) {
+        !domain._closedWorld.classHierarchy.hasAnyStrictSubclass(base)) {
       flags = (flags & 0x1) | (EXACT << 1);
     }
-    CommonMasks commonMasks = world.abstractValueDomain;
-    return commonMasks.getCachedMask(
+    return domain.getCachedMask(
         base, flags, () => new FlatTypeMask._(base, flags));
   }
 
   /// Deserializes a [FlatTypeMask] object from [source].
   factory FlatTypeMask.readFromDataSource(
-      DataSource source, JClosedWorld closedWorld) {
+      DataSource source, CommonMasks domain) {
     source.begin(tag);
     ClassEntity base = source.readClassOrNull();
     int flags = source.readInt();
     source.end(tag);
-    CommonMasks commonMasks = closedWorld.abstractValueDomain;
-    return commonMasks.getCachedMask(
+    return domain.getCachedMask(
         base, flags, () => new FlatTypeMask._(base, flags));
   }
 
@@ -298,26 +296,27 @@
   }
 
   @override
-  TypeMask union(TypeMask other, JClosedWorld closedWorld) {
+  TypeMask union(TypeMask other, CommonMasks domain) {
+    JClosedWorld closedWorld = domain._closedWorld;
     assert(other != null);
     assert(TypeMask.assertIsNormalized(this, closedWorld));
     assert(TypeMask.assertIsNormalized(other, closedWorld));
-    if (other is! FlatTypeMask) return other.union(this, closedWorld);
+    if (other is! FlatTypeMask) return other.union(this, domain);
     FlatTypeMask flatOther = other;
     if (isEmptyOrNull) {
       return isNullable ? flatOther.nullable() : flatOther;
     } else if (flatOther.isEmptyOrNull) {
       return flatOther.isNullable ? nullable() : this;
     } else if (base == flatOther.base) {
-      return unionSame(flatOther, closedWorld);
+      return unionSame(flatOther, domain);
     } else if (closedWorld.classHierarchy.isSubclassOf(flatOther.base, base)) {
-      return unionStrictSubclass(flatOther, closedWorld);
+      return unionStrictSubclass(flatOther, domain);
     } else if (closedWorld.classHierarchy.isSubclassOf(base, flatOther.base)) {
-      return flatOther.unionStrictSubclass(this, closedWorld);
+      return flatOther.unionStrictSubclass(this, domain);
     } else if (closedWorld.classHierarchy.isSubtypeOf(flatOther.base, base)) {
-      return unionStrictSubtype(flatOther, closedWorld);
+      return unionStrictSubtype(flatOther, domain);
     } else if (closedWorld.classHierarchy.isSubtypeOf(base, flatOther.base)) {
-      return flatOther.unionStrictSubtype(this, closedWorld);
+      return flatOther.unionStrictSubtype(this, domain);
     } else {
       return new UnionTypeMask._internal(
           <FlatTypeMask>[this.nonNullable(), flatOther.nonNullable()],
@@ -325,10 +324,10 @@
     }
   }
 
-  TypeMask unionSame(FlatTypeMask other, JClosedWorld closedWorld) {
+  TypeMask unionSame(FlatTypeMask other, CommonMasks domain) {
     assert(base == other.base);
-    assert(TypeMask.assertIsNormalized(this, closedWorld));
-    assert(TypeMask.assertIsNormalized(other, closedWorld));
+    assert(TypeMask.assertIsNormalized(this, domain._closedWorld));
+    assert(TypeMask.assertIsNormalized(other, domain._closedWorld));
     // The two masks share the base type, so we must chose the least
     // constraining kind (the highest) of the two. If either one of
     // the masks are nullable the result should be nullable too.
@@ -341,18 +340,18 @@
     } else if (other.flags == combined) {
       return other;
     } else {
-      return new FlatTypeMask.normalized(base, combined, closedWorld);
+      return new FlatTypeMask.normalized(base, combined, domain);
     }
   }
 
-  TypeMask unionStrictSubclass(FlatTypeMask other, JClosedWorld closedWorld) {
+  TypeMask unionStrictSubclass(FlatTypeMask other, CommonMasks domain) {
     assert(base != other.base);
-    assert(closedWorld.classHierarchy.isSubclassOf(other.base, base));
-    assert(TypeMask.assertIsNormalized(this, closedWorld));
-    assert(TypeMask.assertIsNormalized(other, closedWorld));
+    assert(domain._closedWorld.classHierarchy.isSubclassOf(other.base, base));
+    assert(TypeMask.assertIsNormalized(this, domain._closedWorld));
+    assert(TypeMask.assertIsNormalized(other, domain._closedWorld));
     int combined;
     if ((isExact && other.isExact) ||
-        base == closedWorld.commonElements.objectClass) {
+        base == domain.commonElements.objectClass) {
       // Since the other mask is a subclass of this mask, we need the
       // resulting union to be a subclass too. If either one of the
       // masks are nullable the result should be nullable too.
@@ -368,16 +367,16 @@
     // If we weaken the constraint on this type, we have to make sure that
     // the result is normalized.
     return (flags != combined)
-        ? new FlatTypeMask.normalized(base, combined, closedWorld)
+        ? new FlatTypeMask.normalized(base, combined, domain)
         : this;
   }
 
-  TypeMask unionStrictSubtype(FlatTypeMask other, JClosedWorld closedWorld) {
+  TypeMask unionStrictSubtype(FlatTypeMask other, CommonMasks domain) {
     assert(base != other.base);
-    assert(!closedWorld.classHierarchy.isSubclassOf(other.base, base));
-    assert(closedWorld.classHierarchy.isSubtypeOf(other.base, base));
-    assert(TypeMask.assertIsNormalized(this, closedWorld));
-    assert(TypeMask.assertIsNormalized(other, closedWorld));
+    assert(!domain._closedWorld.classHierarchy.isSubclassOf(other.base, base));
+    assert(domain._closedWorld.classHierarchy.isSubtypeOf(other.base, base));
+    assert(TypeMask.assertIsNormalized(this, domain._closedWorld));
+    assert(TypeMask.assertIsNormalized(other, domain._closedWorld));
     // Since the other mask is a subtype of this mask, we need the
     // resulting union to be a subtype too. If either one of the masks
     // are nullable the result should be nullable too.
@@ -385,16 +384,16 @@
     // We know there is at least one subtype, [other.base], so no need
     // to normalize.
     return (flags != combined)
-        ? new FlatTypeMask.normalized(base, combined, closedWorld)
+        ? new FlatTypeMask.normalized(base, combined, domain)
         : this;
   }
 
   @override
-  TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
+  TypeMask intersection(TypeMask other, CommonMasks domain) {
     assert(other != null);
-    if (other is! FlatTypeMask) return other.intersection(this, closedWorld);
-    assert(TypeMask.assertIsNormalized(this, closedWorld));
-    assert(TypeMask.assertIsNormalized(other, closedWorld));
+    if (other is! FlatTypeMask) return other.intersection(this, domain);
+    assert(TypeMask.assertIsNormalized(this, domain._closedWorld));
+    assert(TypeMask.assertIsNormalized(other, domain._closedWorld));
     FlatTypeMask flatOther = other;
 
     ClassEntity otherBase = flatOther.base;
@@ -407,14 +406,12 @@
       return includeNull ? other : other.nonNullable();
     }
 
-    SubclassResult result = closedWorld.classHierarchy
+    SubclassResult result = domain._closedWorld.classHierarchy
         .commonSubclasses(base, _classQuery, otherBase, flatOther._classQuery);
 
     switch (result.kind) {
       case SubclassResultKind.EMPTY:
-        return includeNull
-            ? closedWorld.abstractValueDomain.nullType
-            : closedWorld.abstractValueDomain.emptyType;
+        return includeNull ? domain.nullType : domain.emptyType;
       case SubclassResultKind.EXACT1:
         assert(isExact);
         return includeNull ? this : nonNullable();
@@ -436,20 +433,19 @@
       case SubclassResultKind.SET:
       default:
         if (result.classes.isEmpty) {
-          return includeNull
-              ? closedWorld.abstractValueDomain.nullType
-              : closedWorld.abstractValueDomain.emptyType;
+          return includeNull ? domain.nullType : domain.emptyType;
         } else if (result.classes.length == 1) {
           ClassEntity cls = result.classes.first;
           return includeNull
-              ? new TypeMask.subclass(cls, closedWorld)
-              : new TypeMask.nonNullSubclass(cls, closedWorld);
+              ? new TypeMask.subclass(cls, domain._closedWorld)
+              : new TypeMask.nonNullSubclass(cls, domain._closedWorld);
         }
 
         List<FlatTypeMask> masks = List.from(result.classes.map(
-            (ClassEntity cls) => TypeMask.nonNullSubclass(cls, closedWorld)));
+            (ClassEntity cls) =>
+                TypeMask.nonNullSubclass(cls, domain._closedWorld)));
         if (masks.length > UnionTypeMask.MAX_UNION_LENGTH) {
-          return UnionTypeMask.flatten(masks, includeNull, closedWorld);
+          return UnionTypeMask.flatten(masks, includeNull, domain);
         }
         return new UnionTypeMask._internal(masks, includeNull);
     }
@@ -501,7 +497,7 @@
     return true;
   }
 
-  TypeMask intersectionSame(FlatTypeMask other, JClosedWorld closedWorld) {
+  TypeMask intersectionSame(FlatTypeMask other, CommonMasks domain) {
     assert(base == other.base);
     // The two masks share the base type, so we must chose the most
     // constraining kind (the lowest) of the two. Only if both masks
@@ -515,14 +511,13 @@
     } else if (other.flags == combined) {
       return other;
     } else {
-      return new FlatTypeMask.normalized(base, combined, closedWorld);
+      return new FlatTypeMask.normalized(base, combined, domain);
     }
   }
 
-  TypeMask intersectionStrictSubclass(
-      FlatTypeMask other, JClosedWorld closedWorld) {
+  TypeMask intersectionStrictSubclass(FlatTypeMask other, CommonMasks domain) {
     assert(base != other.base);
-    assert(closedWorld.classHierarchy.isSubclassOf(other.base, base));
+    assert(domain._closedWorld.classHierarchy.isSubclassOf(other.base, base));
     // If this mask isn't at least a subclass mask, then the
     // intersection with the other mask is empty.
     if (isExact) return intersectionEmpty(other);
@@ -535,7 +530,7 @@
     if (other.flags == combined) {
       return other;
     } else {
-      return new FlatTypeMask.normalized(other.base, combined, closedWorld);
+      return new FlatTypeMask.normalized(other.base, combined, domain);
     }
   }
 
@@ -597,10 +592,13 @@
   }
 
   @override
-  MemberEntity locateSingleMember(Selector selector, JClosedWorld closedWorld) {
+  MemberEntity locateSingleMember(Selector selector, CommonMasks domain) {
     if (isEmptyOrNull) return null;
-    if (closedWorld.includesClosureCall(selector, this)) return null;
-    Iterable<MemberEntity> targets = closedWorld.locateMembers(selector, this);
+    JClosedWorld closedWorld = domain._closedWorld;
+    if (closedWorld.includesClosureCallInDomain(selector, this, domain))
+      return null;
+    Iterable<MemberEntity> targets =
+        closedWorld.locateMembersInDomain(selector, this, domain);
     if (targets.length != 1) return null;
     MemberEntity result = targets.first;
     ClassEntity enclosing = result.enclosingClass;
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
index 8d86f0c..ca3910d 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
@@ -98,7 +98,7 @@
   }
 
   @override
-  TypeMask union(other, JClosedWorld closedWorld) {
+  TypeMask union(other, CommonMasks domain) {
     if (this == other) {
       return this;
     } else if (equalsDisregardNull(other)) {
@@ -106,7 +106,7 @@
     } else if (other.isEmptyOrNull) {
       return other.isNullable ? this.nullable() : this;
     }
-    return forwardTo.union(other, closedWorld);
+    return forwardTo.union(other, domain);
   }
 
   @override
@@ -115,8 +115,8 @@
   }
 
   @override
-  TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
-    return forwardTo.intersection(other, closedWorld);
+  TypeMask intersection(TypeMask other, CommonMasks domain) {
+    return forwardTo.intersection(other, domain);
   }
 
   @override
@@ -131,8 +131,8 @@
   }
 
   @override
-  MemberEntity locateSingleMember(Selector selector, JClosedWorld closedWorld) {
-    return forwardTo.locateSingleMember(selector, closedWorld);
+  MemberEntity locateSingleMember(Selector selector, CommonMasks domain) {
+    return forwardTo.locateSingleMember(selector, domain);
   }
 
   bool equalsDisregardNull(other) {
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
index 3b4d729..556be49 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
@@ -32,13 +32,13 @@
 
   /// Deserializes a [MapTypeMask] object from [source].
   factory MapTypeMask.readFromDataSource(
-      DataSource source, JClosedWorld closedWorld) {
+      DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, closedWorld);
+    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
     ir.TreeNode allocationNode = source.readTreeNodeOrNull();
     MemberEntity allocationElement = source.readMemberOrNull();
-    TypeMask keyType = new TypeMask.readFromDataSource(source, closedWorld);
-    TypeMask valueType = new TypeMask.readFromDataSource(source, closedWorld);
+    TypeMask keyType = new TypeMask.readFromDataSource(source, domain);
+    TypeMask valueType = new TypeMask.readFromDataSource(source, domain);
     source.end(tag);
     return new MapTypeMask(
         forwardTo, allocationNode, allocationElement, keyType, valueType);
@@ -90,14 +90,14 @@
   }
 
   @override
-  TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
-    TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
+  TypeMask intersection(TypeMask other, CommonMasks domain) {
+    TypeMask forwardIntersection = forwardTo.intersection(other, domain);
     if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
     return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
   @override
-  TypeMask union(dynamic other, JClosedWorld closedWorld) {
+  TypeMask union(dynamic other, CommonMasks domain) {
     if (this == other) {
       return this;
     } else if (equalsDisregardNull(other)) {
@@ -109,9 +109,9 @@
         other.keyType != null &&
         valueType != null &&
         other.valueType != null) {
-      TypeMask newKeyType = keyType.union(other.keyType, closedWorld);
-      TypeMask newValueType = valueType.union(other.valueType, closedWorld);
-      TypeMask newForwardTo = forwardTo.union(other.forwardTo, closedWorld);
+      TypeMask newKeyType = keyType.union(other.keyType, domain);
+      TypeMask newValueType = valueType.union(other.valueType, domain);
+      TypeMask newForwardTo = forwardTo.union(other.forwardTo, domain);
       return new MapTypeMask(
           newForwardTo, null, null, newKeyType, newValueType);
     } else if (other.isDictionary) {
@@ -119,11 +119,11 @@
       // doesn't need the compiler.
       assert(other.keyType ==
           new TypeMask.nonNullExact(
-              closedWorld.commonElements.jsStringClass, closedWorld));
-      TypeMask newKeyType = keyType.union(other.keyType, closedWorld);
+              domain.commonElements.jsStringClass, domain._closedWorld));
+      TypeMask newKeyType = keyType.union(other.keyType, domain);
       TypeMask newValueType =
-          other.typeMap.values.fold(keyType, (p, n) => p.union(n, closedWorld));
-      TypeMask newForwardTo = forwardTo.union(other.forwardTo, closedWorld);
+          other.typeMap.values.fold(keyType, (p, n) => p.union(n, domain));
+      TypeMask newForwardTo = forwardTo.union(other.forwardTo, domain);
       MapTypeMask newMapTypeMask = new MapTypeMask(
           newForwardTo,
           allocationNode == other.allocationNode ? allocationNode : null,
@@ -134,7 +134,7 @@
           newValueType);
       return newMapTypeMask;
     } else {
-      return forwardTo.union(other, closedWorld);
+      return forwardTo.union(other, domain);
     }
   }
 
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
index 61b0825..a657685 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
@@ -225,7 +225,7 @@
   @override
   AbstractBool couldBeTypedArray(TypeMask mask) {
     bool intersects(TypeMask type1, TypeMask type2) =>
-        !type1.intersection(type2, _closedWorld).isEmpty;
+        !type1.intersection(type2, this).isEmpty;
     // TODO(herhut): Maybe cache the TypeMask for typedDataClass and
     //               jsIndexingBehaviourInterface.
     ClassEntity typedDataClass = _closedWorld.commonElements.typedDataClass;
@@ -428,7 +428,7 @@
     AbstractValue typeMask = (cls == commonElements.nullClass)
         ? createNullableSubtype(cls)
         : createNonNullSubtype(cls);
-    if (expressionMask.union(typeMask, _closedWorld) == typeMask) {
+    if (expressionMask.union(typeMask, this) == typeMask) {
       return AbstractBool.True;
     } else if (expressionMask.isDisjoint(typeMask, _closedWorld)) {
       return AbstractBool.False;
@@ -674,11 +674,10 @@
   }
 
   @override
-  TypeMask union(TypeMask a, TypeMask b) => a.union(b, _closedWorld);
+  TypeMask union(TypeMask a, TypeMask b) => a.union(b, this);
 
   @override
-  TypeMask intersection(TypeMask a, TypeMask b) =>
-      a.intersection(b, _closedWorld);
+  TypeMask intersection(TypeMask a, TypeMask b) => a.intersection(b, this);
 
   @override
   AbstractBool areDisjoint(TypeMask a, TypeMask b) =>
@@ -690,7 +689,7 @@
 
   @override
   AbstractValue computeAbstractValueForConstant(ConstantValue value) {
-    return computeTypeMask(_closedWorld, value);
+    return computeTypeMask(this, _closedWorld, value);
   }
 
   @override
@@ -738,7 +737,7 @@
   AbstractValue unionOfMany(Iterable<AbstractValue> values) {
     TypeMask result = const TypeMask.nonNullEmpty();
     for (TypeMask value in values) {
-      result = result.union(value, _closedWorld);
+      result = result.union(value, this);
     }
     return result;
   }
@@ -761,7 +760,7 @@
             return const TypeMask.empty();
           }
         }),
-        _closedWorld);
+        this);
   }
 
   @override
@@ -786,7 +785,7 @@
   @override
   MemberEntity locateSingleMember(
       covariant TypeMask receiver, Selector selector) {
-    return receiver.locateSingleMember(selector, _closedWorld);
+    return receiver.locateSingleMember(selector, this);
   }
 
   @override
@@ -816,7 +815,7 @@
         mask.containsOnly(
             _closedWorld.commonElements.jsUnmodifiableArrayClass) ||
         mask.containsOnlyString(_closedWorld) ||
-        _closedWorld.abstractValueDomain.isTypedArray(mask).isDefinitelyTrue) {
+        isTypedArray(mask).isDefinitelyTrue) {
       return AbstractBool.True;
     }
     return AbstractBool.Maybe;
@@ -964,7 +963,7 @@
   @override
   TypeMask readAbstractValueFromDataSource(DataSource source) {
     return source.readCached<TypeMask>(
-        () => new TypeMask.readFromDataSource(source, _closedWorld));
+        () => new TypeMask.readFromDataSource(source, this));
   }
 
   @override
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
index 0b1ffb6e..cfe96da 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
@@ -29,12 +29,12 @@
 
   /// Deserializes a [SetTypeMask] object from [source].
   factory SetTypeMask.readFromDataSource(
-      DataSource source, JClosedWorld closedWorld) {
+      DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, closedWorld);
+    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
     ir.TreeNode allocationNode = source.readTreeNodeOrNull();
     MemberEntity allocationElement = source.readMemberOrNull();
-    TypeMask elementType = new TypeMask.readFromDataSource(source, closedWorld);
+    TypeMask elementType = new TypeMask.readFromDataSource(source, domain);
     source.end(tag);
     return new SetTypeMask(
         forwardTo, allocationNode, allocationElement, elementType);
@@ -79,14 +79,14 @@
   }
 
   @override
-  TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
-    TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
+  TypeMask intersection(TypeMask other, CommonMasks domain) {
+    TypeMask forwardIntersection = forwardTo.intersection(other, domain);
     if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
     return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
   @override
-  TypeMask union(dynamic other, JClosedWorld closedWorld) {
+  TypeMask union(dynamic other, CommonMasks domain) {
     if (this == other) {
       return this;
     } else if (equalsDisregardNull(other)) {
@@ -96,12 +96,11 @@
     } else if (other.isSet &&
         elementType != null &&
         other.elementType != null) {
-      TypeMask newElementType =
-          elementType.union(other.elementType, closedWorld);
-      TypeMask newForwardTo = forwardTo.union(other.forwardTo, closedWorld);
+      TypeMask newElementType = elementType.union(other.elementType, domain);
+      TypeMask newForwardTo = forwardTo.union(other.forwardTo, domain);
       return new SetTypeMask(newForwardTo, null, null, newElementType);
     } else {
-      return forwardTo.union(other, closedWorld);
+      return forwardTo.union(other, domain);
     }
   }
 
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
index 7490ada..f98ad55 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
@@ -110,9 +110,9 @@
 /// yield conservative answers that contain too many classes.
 abstract class TypeMask implements AbstractValue {
   factory TypeMask(
-      ClassEntity base, int kind, bool isNullable, JClosedWorld closedWorld) {
+      ClassEntity base, int kind, bool isNullable, CommonMasks domain) {
     return new FlatTypeMask.normalized(
-        base, (kind << 1) | (isNullable ? 1 : 0), closedWorld);
+        base, (kind << 1) | (isNullable ? 1 : 0), domain);
   }
 
   const factory TypeMask.empty() = FlatTypeMask.empty;
@@ -217,29 +217,28 @@
     }
   }
 
-  factory TypeMask.unionOf(Iterable<TypeMask> masks, JClosedWorld closedWorld) {
-    return UnionTypeMask.unionOf(masks, closedWorld);
+  factory TypeMask.unionOf(Iterable<TypeMask> masks, CommonMasks domain) {
+    return UnionTypeMask.unionOf(masks, domain);
   }
 
   /// Deserializes a [TypeMask] object from [source].
-  factory TypeMask.readFromDataSource(
-      DataSource source, JClosedWorld closedWorld) {
+  factory TypeMask.readFromDataSource(DataSource source, CommonMasks domain) {
     TypeMaskKind kind = source.readEnum(TypeMaskKind.values);
     switch (kind) {
       case TypeMaskKind.flat:
-        return new FlatTypeMask.readFromDataSource(source, closedWorld);
+        return new FlatTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.union:
-        return new UnionTypeMask.readFromDataSource(source, closedWorld);
+        return new UnionTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.container:
-        return new ContainerTypeMask.readFromDataSource(source, closedWorld);
+        return new ContainerTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.set:
-        return new SetTypeMask.readFromDataSource(source, closedWorld);
+        return new SetTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.map:
-        return new MapTypeMask.readFromDataSource(source, closedWorld);
+        return new MapTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.dictionary:
-        return new DictionaryTypeMask.readFromDataSource(source, closedWorld);
+        return new DictionaryTypeMask.readFromDataSource(source, domain);
       case TypeMaskKind.value:
-        return new ValueTypeMask.readFromDataSource(source, closedWorld);
+        return new ValueTypeMask.readFromDataSource(source, domain);
     }
     throw new UnsupportedError("Unexpected TypeMaskKind $kind.");
   }
@@ -394,13 +393,13 @@
   ClassEntity singleClass(JClosedWorld closedWorld);
 
   /// Returns a type mask representing the union of [this] and [other].
-  TypeMask union(TypeMask other, JClosedWorld closedWorld);
+  TypeMask union(TypeMask other, CommonMasks domain);
 
   /// Returns whether the intersection of this and [other] is empty.
   bool isDisjoint(TypeMask other, JClosedWorld closedWorld);
 
   /// Returns a type mask representing the intersection of [this] and [other].
-  TypeMask intersection(TypeMask other, JClosedWorld closedWorld);
+  TypeMask intersection(TypeMask other, CommonMasks domain);
 
   /// Returns whether [element] is a potential target when being invoked on this
   /// type mask.
@@ -415,5 +414,5 @@
 
   /// Returns the [element] that is known to always be hit at runtime
   /// on this mask. Returns null if there is none.
-  MemberEntity locateSingleMember(Selector selector, JClosedWorld closedWorld);
+  MemberEntity locateSingleMember(Selector selector, CommonMasks domain);
 }
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
index e8cd0d1..a4ffd6d 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
@@ -30,10 +30,10 @@
 
   /// Deserializes a [UnionTypeMask] object from [source].
   factory UnionTypeMask.readFromDataSource(
-      DataSource source, JClosedWorld closedWorld) {
+      DataSource source, CommonMasks domain) {
     source.begin(tag);
-    List<FlatTypeMask> disjointMasks = source
-        .readList(() => new TypeMask.readFromDataSource(source, closedWorld));
+    List<FlatTypeMask> disjointMasks =
+        source.readList(() => new TypeMask.readFromDataSource(source, domain));
     bool isNullable = source.readBool();
     source.end(tag);
     return new UnionTypeMask._internal(disjointMasks, isNullable);
@@ -50,33 +50,33 @@
     sink.end(tag);
   }
 
-  static TypeMask unionOf(Iterable<TypeMask> masks, JClosedWorld closedWorld) {
-    assert(
-        masks.every((mask) => TypeMask.assertIsNormalized(mask, closedWorld)));
+  static TypeMask unionOf(Iterable<TypeMask> masks, CommonMasks domain) {
+    assert(masks.every(
+        (mask) => TypeMask.assertIsNormalized(mask, domain._closedWorld)));
     List<FlatTypeMask> disjoint = <FlatTypeMask>[];
     bool isNullable = masks.any((TypeMask mask) => mask.isNullable);
-    unionOfHelper(masks, disjoint, closedWorld);
+    unionOfHelper(masks, disjoint, domain);
     if (disjoint.isEmpty)
       return isNullable ? TypeMask.empty() : TypeMask.nonNullEmpty();
     if (disjoint.length > MAX_UNION_LENGTH) {
-      return flatten(disjoint, isNullable, closedWorld);
+      return flatten(disjoint, isNullable, domain);
     }
     if (disjoint.length == 1)
       return isNullable ? disjoint[0].nullable() : disjoint[0];
     UnionTypeMask union = new UnionTypeMask._internal(disjoint, isNullable);
-    assert(TypeMask.assertIsNormalized(union, closedWorld));
+    assert(TypeMask.assertIsNormalized(union, domain._closedWorld));
     return union;
   }
 
   static void unionOfHelper(Iterable<TypeMask> masks,
-      List<FlatTypeMask> disjoint, JClosedWorld closedWorld) {
+      List<FlatTypeMask> disjoint, CommonMasks domain) {
     // TODO(johnniwinther): Impose an order on the mask to ensure subclass masks
     // are preferred to subtype masks.
     for (TypeMask mask in masks) {
       mask = TypeMask.nonForwardingMask(mask).nonNullable();
       if (mask.isUnion) {
         UnionTypeMask union = mask;
-        unionOfHelper(union.disjointMasks, disjoint, closedWorld);
+        unionOfHelper(union.disjointMasks, disjoint, domain);
       } else if (mask.isEmpty) {
         continue;
       } else {
@@ -89,7 +89,7 @@
         for (int i = 0; i < disjoint.length; i++) {
           FlatTypeMask current = disjoint[i];
           if (current == null) continue;
-          TypeMask newMask = flatMask.union(current, closedWorld);
+          TypeMask newMask = flatMask.union(current, domain);
           // If we have found a disjoint union, continue iterating.
           if (newMask.isUnion) continue;
           covered = true;
@@ -122,7 +122,7 @@
   }
 
   static TypeMask flatten(
-      List<FlatTypeMask> masks, bool includeNull, JClosedWorld closedWorld) {
+      List<FlatTypeMask> masks, bool includeNull, CommonMasks domain) {
     // TODO(johnniwinther): Move this computation to [ClosedWorld] and use the
     // class set structures.
     if (masks.isEmpty) throw ArgumentError.value(masks, 'masks');
@@ -132,7 +132,7 @@
 
     List<ClassEntity> masksBases = masks.map((mask) => mask.base).toList();
     Iterable<ClassEntity> candidates =
-        closedWorld.commonSupertypesOf(masksBases);
+        domain._closedWorld.commonSupertypesOf(masksBases);
 
     // Compute the best candidate and its kind.
     ClassEntity bestElement;
@@ -141,8 +141,8 @@
     for (ClassEntity candidate in candidates) {
       bool isInstantiatedStrictSubclass(cls) =>
           cls != candidate &&
-          closedWorld.classHierarchy.isExplicitlyInstantiated(cls) &&
-          closedWorld.classHierarchy.isSubclassOf(cls, candidate);
+          domain._closedWorld.classHierarchy.isExplicitlyInstantiated(cls) &&
+          domain._closedWorld.classHierarchy.isSubclassOf(cls, candidate);
 
       int size;
       int kind;
@@ -155,12 +155,13 @@
         // TODO(sigmund, johnniwinther): computing length here (and below) is
         // expensive. If we can't prevent `flatten` from being called a lot, it
         // might be worth caching results.
-        size = closedWorld.classHierarchy.strictSubclassCount(candidate);
-        assert(
-            size <= closedWorld.classHierarchy.strictSubtypeCount(candidate));
+        size =
+            domain._closedWorld.classHierarchy.strictSubclassCount(candidate);
+        assert(size <=
+            domain._closedWorld.classHierarchy.strictSubtypeCount(candidate));
       } else {
         kind = FlatTypeMask.SUBTYPE;
-        size = closedWorld.classHierarchy.strictSubtypeCount(candidate);
+        size = domain._closedWorld.classHierarchy.strictSubtypeCount(candidate);
       }
       // Update the best candidate if the new one is better.
       if (bestElement == null || size < bestSize) {
@@ -169,11 +170,11 @@
         bestKind = kind;
       }
     }
-    return new TypeMask(bestElement, bestKind, includeNull, closedWorld);
+    return new TypeMask(bestElement, bestKind, includeNull, domain);
   }
 
   @override
-  TypeMask union(dynamic other, JClosedWorld closedWorld) {
+  TypeMask union(dynamic other, CommonMasks domain) {
     other = TypeMask.nonForwardingMask(other);
     if (other is UnionTypeMask) {
       if (_containsNonNullableUnion(other)) {
@@ -195,12 +196,12 @@
       assert(other is UnionTypeMask);
       newList.addAll(other.disjointMasks);
     }
-    TypeMask newMask = new TypeMask.unionOf(newList, closedWorld);
+    TypeMask newMask = new TypeMask.unionOf(newList, domain);
     return isNullable || other.isNullable ? newMask.nullable() : newMask;
   }
 
   @override
-  TypeMask intersection(dynamic other, JClosedWorld closedWorld) {
+  TypeMask intersection(dynamic other, CommonMasks domain) {
     other = TypeMask.nonForwardingMask(other);
     if (other is UnionTypeMask) {
       if (_containsNonNullableUnion(other)) {
@@ -223,14 +224,14 @@
           intersections.add(current);
         } else {
           for (FlatTypeMask flatOther in other.disjointMasks) {
-            intersections.add(current.intersection(flatOther, closedWorld));
+            intersections.add(current.intersection(flatOther, domain));
           }
         }
       } else {
-        intersections.add(current.intersection(other, closedWorld));
+        intersections.add(current.intersection(other, domain));
       }
     }
-    TypeMask newMask = TypeMask.unionOf(intersections, closedWorld);
+    TypeMask newMask = TypeMask.unionOf(intersections, domain);
     return isNullable && other.isNullable ? newMask.nullable() : newMask;
   }
 
@@ -420,11 +421,11 @@
   }
 
   @override
-  MemberEntity locateSingleMember(Selector selector, JClosedWorld closedWorld) {
+  MemberEntity locateSingleMember(Selector selector, CommonMasks domain) {
     MemberEntity candidate;
     for (FlatTypeMask mask in disjointMasks) {
       if (isNullable) mask = mask.nullable();
-      MemberEntity current = mask.locateSingleMember(selector, closedWorld);
+      MemberEntity current = mask.locateSingleMember(selector, domain);
       if (current == null) {
         return null;
       } else if (candidate == null) {
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart
index fb475be..38486ab 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart
@@ -17,9 +17,9 @@
 
   /// Deserializes a [ValueTypeMask] object from [source].
   factory ValueTypeMask.readFromDataSource(
-      DataSource source, JClosedWorld closedWorld) {
+      DataSource source, CommonMasks domain) {
     source.begin(tag);
-    TypeMask forwardTo = new TypeMask.readFromDataSource(source, closedWorld);
+    TypeMask forwardTo = new TypeMask.readFromDataSource(source, domain);
     ConstantValue constant = source.readConstant();
     source.end(tag);
     return new ValueTypeMask(forwardTo, constant);
@@ -57,8 +57,8 @@
   }
 
   @override
-  TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
-    TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
+  TypeMask intersection(TypeMask other, CommonMasks domain) {
+    TypeMask forwardIntersection = forwardTo.intersection(other, domain);
     if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
     return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
diff --git a/pkg/compiler/lib/src/ir/impact_data.dart b/pkg/compiler/lib/src/ir/impact_data.dart
index 7276ae4..a76ff95 100644
--- a/pkg/compiler/lib/src/ir/impact_data.dart
+++ b/pkg/compiler/lib/src/ir/impact_data.dart
@@ -1363,30 +1363,11 @@
 }
 
 class _ConstInstantiation {
-  static const String tag = '_ConstInstantiation';
-
   final ir.Class cls;
   final List<ir.DartType> typeArguments;
   final ir.LibraryDependency import;
 
   _ConstInstantiation(this.cls, this.typeArguments, this.import);
-
-  factory _ConstInstantiation.fromDataSource(DataSource source) {
-    source.begin(tag);
-    ir.Class cls = source.readClassNode();
-    List<ir.DartType> typeArguments = source.readDartTypeNodes();
-    ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
-    source.end(tag);
-    return new _ConstInstantiation(cls, typeArguments, import);
-  }
-
-  void toDataSink(DataSink sink) {
-    sink.begin(tag);
-    sink.writeClassNode(cls);
-    sink.writeDartTypeNodes(typeArguments);
-    sink.writeLibraryDependencyNodeOrNull(import);
-    sink.end(tag);
-  }
 }
 
 enum _Feature {
@@ -1620,8 +1601,6 @@
 }
 
 class _ForInData {
-  static const String tag = '_ForInData';
-
   final ir.DartType iterableType;
   final ir.DartType iteratorType;
   final ClassRelation iteratorClassRelation;
@@ -1629,23 +1608,4 @@
 
   _ForInData(this.iterableType, this.iteratorType, this.iteratorClassRelation,
       {this.isAsync});
-
-  factory _ForInData.fromDataSource(DataSource source) {
-    source.begin(tag);
-    ir.DartType iterableType = source.readDartTypeNode();
-    ir.DartType iteratorType = source.readDartTypeNode(allowNull: true);
-    ClassRelation iteratorClassRelation = source.readEnum(ClassRelation.values);
-    bool isAsync = source.readBool();
-    return new _ForInData(iterableType, iteratorType, iteratorClassRelation,
-        isAsync: isAsync);
-  }
-
-  void toDataSink(DataSink sink) {
-    sink.begin(tag);
-    sink.writeDartTypeNode(iterableType);
-    sink.writeDartTypeNode(iteratorType);
-    sink.writeEnum(iteratorClassRelation);
-    sink.writeBool(isAsync);
-    sink.end(tag);
-  }
 }
diff --git a/pkg/compiler/lib/src/ir/static_type.dart b/pkg/compiler/lib/src/ir/static_type.dart
index 2d25175..33079f9 100644
--- a/pkg/compiler/lib/src/ir/static_type.dart
+++ b/pkg/compiler/lib/src/ir/static_type.dart
@@ -350,9 +350,9 @@
     ir.DartType receiverType = visitNode(node.receiver);
     ArgumentTypes argumentTypes = _visitArguments(node.arguments);
     ir.DartType returnType;
-    if (typeEnvironment.isOverloadedArithmeticOperator(node.target)) {
+    if (typeEnvironment.isSpecialCasedBinaryOperator(node.target)) {
       ir.DartType argumentType = argumentTypes.positional[0];
-      returnType = typeEnvironment.getTypeOfOverloadedArithmetic(
+      returnType = typeEnvironment.getTypeOfSpecialCasedBinaryOperator(
           receiverType, argumentType);
     } else {
       ir.Class superclass = node.target.enclosingClass;
@@ -386,7 +386,7 @@
   /// target as to avoid visiting the argument twice.
   bool isSpecialCasedBinaryOperator(ir.Member interfaceTarget) {
     return interfaceTarget is ir.Procedure &&
-        typeEnvironment.isOverloadedArithmeticOperator(interfaceTarget);
+        typeEnvironment.isSpecialCasedBinaryOperator(interfaceTarget);
   }
 
   ir.Member _getMember(ir.Class cls, String name) {
@@ -639,7 +639,7 @@
           node, argumentTypes, getterType, interfaceTarget);
       if (isSpecialCasedBinaryOperator(interfaceTarget)) {
         ir.DartType argumentType = argumentTypes.positional[0];
-        return typeEnvironment.getTypeOfOverloadedArithmetic(
+        return typeEnvironment.getTypeOfSpecialCasedBinaryOperator(
             receiverType, argumentType);
       } else if (getterType is ir.FunctionType) {
         return getterType.returnType;
diff --git a/pkg/compiler/lib/src/ir/visitors.dart b/pkg/compiler/lib/src/ir/visitors.dart
index 6ff419b..bd1929e 100644
--- a/pkg/compiler/lib/src/ir/visitors.dart
+++ b/pkg/compiler/lib/src/ir/visitors.dart
@@ -130,12 +130,10 @@
             .skip(node.requiredParameterCount)
             .toList()),
         node.namedParameters.map((n) => n.name).toList(),
-        _options.useLegacySubtyping
-            ? const <String>{}
-            : node.namedParameters
-                .where((n) => n.isRequired)
-                .map((n) => n.name)
-                .toSet(),
+        node.namedParameters
+            .where((n) => n.isRequired)
+            .map((n) => n.name)
+            .toSet(),
         node.namedParameters.map((n) => visitType(n.type)).toList(),
         typeVariables ?? const <FunctionTypeVariable>[]);
     DartType type = _convertNullability(functionType, node.nullability);
diff --git a/pkg/compiler/lib/src/js_backend/enqueuer.dart b/pkg/compiler/lib/src/js_backend/enqueuer.dart
index 53f5989..51740c4 100644
--- a/pkg/compiler/lib/src/js_backend/enqueuer.dart
+++ b/pkg/compiler/lib/src/js_backend/enqueuer.dart
@@ -225,6 +225,9 @@
       case TypeUseKind.TYPE_ARGUMENT:
         _worldBuilder.registerTypeArgument(type);
         break;
+      case TypeUseKind.CONSTRUCTOR_REFERENCE:
+        _worldBuilder.registerConstructorReference(type);
+        break;
       case TypeUseKind.CONST_INSTANTIATION:
         failedAt(CURRENT_ELEMENT_SPANNABLE, "Unexpected type use: $typeUse.");
         break;
diff --git a/pkg/compiler/lib/src/js_backend/impact_transformer.dart b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
index 842a94e..ed37f59 100644
--- a/pkg/compiler/lib/src/js_backend/impact_transformer.dart
+++ b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
@@ -203,6 +203,7 @@
         case TypeUseKind.RTI_VALUE:
         case TypeUseKind.TYPE_ARGUMENT:
         case TypeUseKind.NAMED_TYPE_VARIABLE_NEW_RTI:
+        case TypeUseKind.CONSTRUCTOR_REFERENCE:
           failedAt(CURRENT_ELEMENT_SPANNABLE, "Unexpected type use: $typeUse.");
           break;
       }
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 8259c10..086d55aa 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart
@@ -167,11 +167,15 @@
   }
 }
 
+bool _isProperty(Entity entity) =>
+    entity is MemberEntity && (entity.isField || entity.isGetter);
+
 class CallablePropertyNode extends CallableNode {
   final MemberEntity property;
   final DartType type;
 
-  CallablePropertyNode(this.property, this.type);
+  CallablePropertyNode(this.property, this.type)
+      : assert(_isProperty(property));
 
   @override
   Entity get entity => property;
@@ -181,8 +185,6 @@
 
   @override
   bool selectorApplies(Selector selector, BuiltWorld world) {
-    if (world.annotationsData.getParameterCheckPolicy(property).isTrusted)
-      return false;
     if (property.memberName != selector.memberName) return false;
     if (type is FunctionType &&
         !selector.callStructure
@@ -305,6 +307,8 @@
     Iterable<RtiNode> dependencies;
     if (entity is ClassEntity) {
       dependencies = _classes[entity]?.dependencies;
+    } else if (_isProperty(entity)) {
+      dependencies = _callableProperties[entity]?.dependencies;
     } else {
       dependencies = _methods[entity]?.dependencies;
     }
@@ -1031,6 +1035,8 @@
         });
       } else if (entity is FunctionEntity) {
         methodsNeedingTypeArguments.add(entity);
+      } else if (_isProperty(entity)) {
+        // Do nothing. We just need to visit the dependencies.
       } else {
         localFunctionsNeedingTypeArguments.add(entity);
       }
@@ -1139,6 +1145,9 @@
     localFunctionsUsingTypeVariableLiterals
         .forEach(potentiallyNeedTypeArguments);
 
+    typeVariableTests._callableProperties.keys
+        .forEach(potentiallyNeedTypeArguments);
+
     if (closedWorld.isMemberUsed(
         closedWorld.commonElements.invocationTypeArgumentGetter)) {
       // If `Invocation.typeArguments` is live, mark all user-defined
@@ -1317,7 +1326,7 @@
     typeVariableTests
         .forEachAppliedSelector((Selector selector, Set<Entity> targets) {
       for (Entity target in targets) {
-        if (target is MemberEntity && (target.isField || target.isGetter) ||
+        if (_isProperty(target) ||
             methodsNeedingTypeArguments.contains(target) ||
             localFunctionsNeedingTypeArguments.contains(target)) {
           selectorsNeedingTypeArguments.add(selector);
diff --git a/pkg/compiler/lib/src/js_backend/specialized_checks.dart b/pkg/compiler/lib/src/js_backend/specialized_checks.dart
index 25156d2..5802406 100644
--- a/pkg/compiler/lib/src/js_backend/specialized_checks.dart
+++ b/pkg/compiler/lib/src/js_backend/specialized_checks.dart
@@ -97,6 +97,7 @@
       OutputUnitData outputUnitData = closedWorld.outputUnitData;
 
       if (classHierarchy.hasOnlySubclasses(element) &&
+          classHierarchy.isInstantiated(element) &&
           !interceptorData.isInterceptedClass(element) &&
           outputUnitData.hasOnlyNonDeferredImportPathsToClass(
               graph.element, element)) {
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index 5008ebd..7479339 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -198,12 +198,13 @@
   final String uri;
   final List<StaticMethod> statics;
   final List<Class> classes;
+  final List<ClassTypeData> classTypeData;
 
   @override
   final List<Field> staticFieldsForReflection;
 
   Library(this.element, this.uri, this.statics, this.classes,
-      this.staticFieldsForReflection);
+      this.classTypeData, this.staticFieldsForReflection);
 
   @override
   String toString() {
@@ -225,9 +226,13 @@
   final bool isFinal;
   final bool isLazy;
   final bool isInitializedByConstant;
+  final bool usesNonNullableInitialization;
 
   StaticField(this.element, this.name, this.getterName, this.holder, this.code,
-      {this.isFinal, this.isLazy, this.isInitializedByConstant: false});
+      {this.isFinal,
+      this.isLazy,
+      this.isInitializedByConstant: false,
+      this.usesNonNullableInitialization: false});
 
   @override
   String toString() {
@@ -235,12 +240,28 @@
   }
 }
 
-// TODO(fishythefish, sra): Split type information into separate model object.
+class ClassTypeData {
+  /// The element should only be used during the transition to the new model.
+  /// Uses indicate missing information in the model.
+  final ClassEntity element;
+
+  final ClassChecks classChecks;
+  final Set<TypeVariableType> namedTypeVariables = {};
+
+  ClassTypeData(this.element, this.classChecks);
+
+  bool isTriviallyChecked(CommonElements commonElements) =>
+      classChecks.checks.every((TypeCheck check) =>
+          check.cls == commonElements.objectClass || check.cls == element);
+}
+
 class Class implements FieldContainer {
   /// The element should only be used during the transition to the new model.
   /// Uses indicate missing information in the model.
   final ClassEntity element;
 
+  final ClassTypeData typeData;
+
   final js.Name name;
   final Holder holder;
   Class _superclass;
@@ -248,8 +269,6 @@
   final List<Method> methods;
   final List<Field> fields;
   final List<StubMethod> isChecks;
-  final ClassChecks classChecksNewRti;
-  final Set<TypeVariableType> namedTypeVariablesNewRti = {};
   final List<StubMethod> checkedSetters;
 
   /// Stub methods for this class that are call stubs for getters.
@@ -261,6 +280,7 @@
   final List<Field> staticFieldsForReflection;
   final bool hasRtiField; // Per-instance runtime type information pseudo-field.
   final bool onlyForRti;
+  final bool onlyForConstructor;
   final bool isDirectlyInstantiated;
   final bool isNative;
   final bool isClosureBaseClass; // Common base class for closures.
@@ -290,6 +310,7 @@
 
   Class(
       this.element,
+      this.typeData,
       this.name,
       this.holder,
       this.methods,
@@ -299,16 +320,17 @@
       this.noSuchMethodStubs,
       this.checkedSetters,
       this.isChecks,
-      this.classChecksNewRti,
       this.functionTypeIndex,
       {this.hasRtiField,
       this.onlyForRti,
+      this.onlyForConstructor,
       this.isDirectlyInstantiated,
       this.isNative,
       this.isClosureBaseClass,
       this.isSoftDeferred = false,
       this.isSuperMixinApplication}) {
     assert(onlyForRti != null);
+    assert(onlyForConstructor != null);
     assert(isDirectlyInstantiated != null);
     assert(isNative != null);
     assert(isClosureBaseClass != null);
@@ -316,10 +338,6 @@
 
   bool get isSimpleMixinApplication => false;
 
-  bool isTriviallyChecked(CommonElements commonElements) =>
-      classChecksNewRti.checks.every((TypeCheck check) =>
-          check.cls == commonElements.objectClass || check.cls == element);
-
   Class get superclass => _superclass;
 
   void setSuperclass(Class superclass) {
@@ -344,6 +362,7 @@
 class MixinApplication extends Class {
   MixinApplication(
       ClassEntity element,
+      ClassTypeData typeData,
       js.Name name,
       Holder holder,
       List<Field> instanceFields,
@@ -351,13 +370,14 @@
       List<StubMethod> callStubs,
       List<StubMethod> checkedSetters,
       List<StubMethod> isChecks,
-      ClassChecks classChecksNewRti,
       js.Expression functionTypeIndex,
       {bool hasRtiField,
       bool onlyForRti,
+      bool onlyForConstructor,
       bool isDirectlyInstantiated})
       : super(
             element,
+            typeData,
             name,
             holder,
             const <Method>[],
@@ -367,10 +387,10 @@
             const <StubMethod>[],
             checkedSetters,
             isChecks,
-            classChecksNewRti,
             functionTypeIndex,
             hasRtiField: hasRtiField,
             onlyForRti: onlyForRti,
+            onlyForConstructor: onlyForConstructor,
             isDirectlyInstantiated: isDirectlyInstantiated,
             isNative: false,
             isClosureBaseClass: false,
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
index 84ff8fe..9223c96 100644
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
@@ -37,9 +37,10 @@
   // Caches the methods that have a native body.
   Set<FunctionEntity> nativeMethods = new Set<FunctionEntity>();
 
-  // Type metadata redirections, where the key is the class being redirected to
-  // and the value is the list of classes being redirected.
-  final Map<Class, List<Class>> typeRedirections = {};
+  // Type metadata redirections, where the key is the class type data being
+  // redirected to and the value is the list of class type data being
+  // redirected.
+  final Map<ClassTypeData, List<ClassTypeData>> typeRedirections = {};
 
   NativeEmitter(
       this._emitterTask, this._closedWorld, this._nativeCodegenEnqueuer);
@@ -157,19 +158,20 @@
         neededClasses.add(cls);
         neededClasses.add(cls.superclass);
         nonLeafClasses.add(cls.superclass);
-      } else if (!cls.isTriviallyChecked(_commonElements) ||
-          cls.namedTypeVariablesNewRti.isNotEmpty) {
+      } else if (!cls.typeData.isTriviallyChecked(_commonElements) ||
+          cls.typeData.namedTypeVariables.isNotEmpty) {
         // The class is not marked 'needed', but we still need it in the type
         // metadata.
 
-        // Redirect this class (and all classes which would have redirected to
-        // this class) to its superclass. Because we have a post-order visit,
-        // this eventually causes all such native classes to redirect to their
-        // leaf interceptors.
-        List<Class> redirectedClasses = typeRedirections[cls] ?? [];
-        redirectedClasses.add(cls);
-        typeRedirections[cls.superclass] = redirectedClasses;
-        typeRedirections.remove(cls);
+        // Redirect this class type data (and all class type data which would
+        // have redirected to this class type data) to its superclass. Because
+        // we have a post-order visit, this eventually causes all such native
+        // classes to redirect to their leaf interceptors.
+        List<ClassTypeData> redirectedClasses =
+            typeRedirections[cls.typeData] ?? [];
+        redirectedClasses.add(cls.typeData);
+        typeRedirections[cls.superclass.typeData] = redirectedClasses;
+        typeRedirections.remove(cls.typeData);
       }
     }
 
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart b/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart
index 62a40d7..b1aaa3b 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart
@@ -9,6 +9,7 @@
 ///
 /// The code for the containing (used) methods must exist in the `universe`.
 class Collector {
+  final CompilerOptions _options;
   final JCommonElements _commonElements;
   final JElementEnvironment _elementEnvironment;
   final OutputUnitData _outputUnitData;
@@ -22,29 +23,27 @@
   final Map<MemberEntity, js.Expression> _generatedCode;
   final Sorter _sorter;
 
-  final Set<ClassEntity> neededClasses = new Set<ClassEntity>();
+  final Set<ClassEntity> neededClasses = {};
+  final Set<ClassEntity> classesOnlyNeededForRti = {};
   // This field is set in [computeNeededDeclarations].
-  Set<ClassEntity> classesOnlyNeededForRti;
-  final Map<OutputUnit, List<ClassEntity>> outputClassLists =
-      new Map<OutputUnit, List<ClassEntity>>();
-  final Map<OutputUnit, List<ConstantValue>> outputConstantLists =
-      new Map<OutputUnit, List<ConstantValue>>();
-  final Map<OutputUnit, List<MemberEntity>> outputStaticLists =
-      new Map<OutputUnit, List<MemberEntity>>();
-  final Map<OutputUnit, List<FieldEntity>> outputStaticNonFinalFieldLists =
-      new Map<OutputUnit, List<FieldEntity>>();
+  Set<ClassEntity> classesOnlyNeededForConstructor;
+  final Map<OutputUnit, List<ClassEntity>> outputClassLists = {};
+  final Map<OutputUnit, List<ClassEntity>> outputClassTypeLists = {};
+  final Map<OutputUnit, List<ConstantValue>> outputConstantLists = {};
+  final Map<OutputUnit, List<MemberEntity>> outputStaticLists = {};
+  final Map<OutputUnit, List<FieldEntity>> outputStaticNonFinalFieldLists = {};
   final Map<OutputUnit, List<FieldEntity>> outputLazyStaticFieldLists = {};
-  final Map<OutputUnit, Set<LibraryEntity>> outputLibraryLists =
-      new Map<OutputUnit, Set<LibraryEntity>>();
+  final Map<OutputUnit, Set<LibraryEntity>> outputLibraryLists = {};
 
   /// True, if the output contains a constant list.
   ///
   /// This flag is updated in [computeNeededConstants].
   bool outputContainsConstantList = false;
 
-  final List<ClassEntity> nativeClassesAndSubclasses = <ClassEntity>[];
+  final List<ClassEntity> nativeClassesAndSubclasses = [];
 
   Collector(
+      this._options,
       this._commonElements,
       this._elementEnvironment,
       this._outputUnitData,
@@ -59,7 +58,7 @@
       this._sorter);
 
   Set<ClassEntity> computeInterceptorsReferencedFromConstants() {
-    Set<ClassEntity> classes = new Set<ClassEntity>();
+    Set<ClassEntity> classes = {};
     Iterable<ConstantValue> constants = _codegenWorld.getConstantsForEmission();
     for (ConstantValue constant in constants) {
       if (constant is InterceptorConstantValue) {
@@ -73,14 +72,14 @@
   /// Return a function that returns true if its argument is a class
   /// that needs to be emitted.
   Function computeClassFilter(Iterable<ClassEntity> backendTypeHelpers) {
-    Set<ClassEntity> unneededClasses = new Set<ClassEntity>();
+    Set<ClassEntity> unneededClasses = {};
     // The [Bool] class is not marked as abstract, but has a factory
     // constructor that always throws. We never need to emit it.
     unneededClasses.add(_commonElements.boolClass);
 
     // Go over specialized interceptors and then constants to know which
     // interceptors are needed.
-    Set<ClassEntity> needed = new Set<ClassEntity>();
+    Set<ClassEntity> needed = {};
     for (SpecializedGetInterceptor interceptor
         in _oneShotInterceptorData.specializedGetInterceptors) {
       needed.addAll(interceptor.classes);
@@ -134,9 +133,15 @@
         // TODO(sigurdm): We should track those constants.
         constantUnit = _outputUnitData.mainOutputUnit;
       }
-      outputConstantLists
-          .putIfAbsent(constantUnit, () => new List<ConstantValue>())
-          .add(constant);
+      outputConstantLists.putIfAbsent(constantUnit, () => []).add(constant);
+    }
+  }
+
+  Map<OutputUnit, List<ClassEntity>> get _outputListsForClassType {
+    if (_options.deferClassTypes) {
+      return outputClassTypeLists;
+    } else {
+      return outputClassLists;
     }
   }
 
@@ -153,18 +158,11 @@
             .where(computeClassFilter(backendTypeHelpers))
             .toSet();
 
-    void addClassWithSuperclasses(ClassEntity cls) {
-      neededClasses.add(cls);
-      for (ClassEntity superclass = _elementEnvironment.getSuperClass(cls);
-          superclass != null;
-          superclass = _elementEnvironment.getSuperClass(superclass)) {
-        neededClasses.add(superclass);
-      }
-    }
-
     void addClassesWithSuperclasses(Iterable<ClassEntity> classes) {
       for (ClassEntity cls in classes) {
-        addClassWithSuperclasses(cls);
+        neededClasses.add(cls);
+        _elementEnvironment.forEachSuperClass(
+            cls, (superClass) => neededClasses.add(superClass));
       }
     }
 
@@ -178,14 +176,19 @@
         .toSet();
     neededClasses.addAll(mixinClasses);
 
-    // 3. Find all classes needed for rti.
+    // 3. Add classes only needed for their constructors.
+    classesOnlyNeededForConstructor = _codegenWorld.constructorReferences
+        .where((cls) => !neededClasses.contains(cls))
+        .toSet();
+    neededClasses.addAll(classesOnlyNeededForConstructor);
+
+    // 4. Find all classes needed for rti.
     // It is important that this is the penultimate step, at this point,
     // neededClasses must only contain classes that have been resolved and
     // codegen'd. The rtiNeededClasses may contain additional classes, but
     // these are thought to not have been instantiated, so we need to be able
     // to identify them later and make sure we only emit "empty shells" without
     // fields, etc.
-    classesOnlyNeededForRti = new Set<ClassEntity>();
     for (ClassEntity cls in _rtiNeededClasses) {
       if (backendTypeHelpers.contains(cls)) continue;
       while (cls != null && !neededClasses.contains(cls)) {
@@ -196,43 +199,25 @@
 
     neededClasses.addAll(classesOnlyNeededForRti);
 
-    // TODO(18175, floitsch): remove once issue 18175 is fixed.
-    if (neededClasses.contains(_commonElements.jsIntClass)) {
-      neededClasses.add(_commonElements.intClass);
-    }
-    if (neededClasses.contains(_commonElements.jsDoubleClass)) {
-      neededClasses.add(_commonElements.doubleClass);
-    }
-    if (neededClasses.contains(_commonElements.jsNumberClass)) {
-      neededClasses.add(_commonElements.numClass);
-    }
-    if (neededClasses.contains(_commonElements.jsStringClass)) {
-      neededClasses.add(_commonElements.stringClass);
-    }
-    if (neededClasses.contains(_commonElements.jsBoolClass)) {
-      neededClasses.add(_commonElements.boolClass);
-    }
-    if (neededClasses.contains(_commonElements.jsArrayClass)) {
-      neededClasses.add(_commonElements.listClass);
-    }
-
-    // 4. Finally, sort the classes.
+    // 5. Finally, sort the classes.
     List<ClassEntity> sortedClasses = _sorter.sortClasses(neededClasses);
 
     for (ClassEntity cls in sortedClasses) {
-      if (_nativeData.isNativeOrExtendsNative(cls) &&
-          !classesOnlyNeededForRti.contains(cls)) {
+      if (classesOnlyNeededForRti.contains(cls)) {
+        _outputListsForClassType
+            .putIfAbsent(_outputUnitData.outputUnitForClassType(cls), () => [])
+            .add(cls);
+      } else if (_nativeData.isNativeOrExtendsNative(cls) &&
+          !classesOnlyNeededForConstructor.contains(cls)) {
         // For now, native classes and related classes cannot be deferred.
         nativeClassesAndSubclasses.add(cls);
         assert(!_outputUnitData.isDeferredClass(cls), failedAt(cls));
         outputClassLists
-            .putIfAbsent(
-                _outputUnitData.mainOutputUnit, () => new List<ClassEntity>())
+            .putIfAbsent(_outputUnitData.mainOutputUnit, () => [])
             .add(cls);
       } else {
         outputClassLists
-            .putIfAbsent(_outputUnitData.outputUnitForClass(cls),
-                () => new List<ClassEntity>())
+            .putIfAbsent(_outputUnitData.outputUnitForClass(cls), () => [])
             .add(cls);
       }
     }
@@ -247,8 +232,7 @@
 
     for (MemberEntity member in _sorter.sortMembers(elements)) {
       List<MemberEntity> list = outputStaticLists.putIfAbsent(
-          _outputUnitData.outputUnitForMember(member),
-          () => new List<MemberEntity>());
+          _outputUnitData.outputUnitForMember(member), () => []);
       list.add(member);
     }
   }
@@ -256,8 +240,7 @@
   void computeNeededStaticNonFinalFields() {
     addToOutputUnit(FieldEntity element) {
       List<FieldEntity> list = outputStaticNonFinalFieldLists.putIfAbsent(
-          _outputUnitData.outputUnitForMember(element),
-          () => new List<FieldEntity>());
+          _outputUnitData.outputUnitForMember(element), () => []);
       list.add(element);
     }
 
@@ -306,16 +289,14 @@
     _generatedCode.keys.forEach((MemberEntity element) {
       OutputUnit unit = _outputUnitData.outputUnitForMember(element);
       LibraryEntity library = element.library;
-      outputLibraryLists
-          .putIfAbsent(unit, () => new Set<LibraryEntity>())
-          .add(library);
+      outputLibraryLists.putIfAbsent(unit, () => {}).add(library);
     });
     neededClasses.forEach((ClassEntity element) {
-      OutputUnit unit = _outputUnitData.outputUnitForClass(element);
+      OutputUnit unit = classesOnlyNeededForRti.contains(element)
+          ? _outputUnitData.outputUnitForClassType(element)
+          : _outputUnitData.outputUnitForClass(element);
       LibraryEntity library = element.library;
-      outputLibraryLists
-          .putIfAbsent(unit, () => new Set<LibraryEntity>())
-          .add(library);
+      outputLibraryLists.putIfAbsent(unit, () => {}).add(library);
     });
   }
 
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
index a54322d..5351885 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
@@ -135,6 +135,7 @@
       this._rtiNeededClasses,
       this._mainFunction)
       : this.collector = new Collector(
+            _options,
             _commonElements,
             _elementEnvironment,
             _outputUnitData,
@@ -153,6 +154,10 @@
   /// update the superclass in the [Class].
   final Map<ClassEntity, Class> _classes = <ClassEntity, Class>{};
 
+  /// Mapping from [ClassEntity] to constructed [ClassTypeData] object. Used to build
+  /// libraries.
+  final Map<ClassEntity, ClassTypeData> _classTypeData = {};
+
   /// Mapping from [OutputUnit] to constructed [Fragment]. We need this to
   /// generate the deferredLoadingMap (to know which hunks to load).
   final Map<OutputUnit, Fragment> _outputs = <OutputUnit, Fragment>{};
@@ -163,6 +168,8 @@
 
   Set<Class> _unneededNativeClasses;
 
+  List<StubMethod> _jsInteropIsChecks = [];
+
   /// Classes that have been allocated during a profile run.
   ///
   /// These classes should not be soft-deferred.
@@ -182,6 +189,7 @@
     _closedWorld.outputUnitData.outputUnits
         .forEach(_registry.registerOutputUnit);
     collector.outputClassLists.forEach(_registry.registerClasses);
+    collector.outputClassTypeLists.forEach(_registry.registerClassTypes);
     collector.outputStaticLists.forEach(_registry.registerMembers);
     collector.outputConstantLists.forEach(_registerConstants);
     collector.outputStaticNonFinalFieldLists.forEach(_registry.registerMembers);
@@ -197,6 +205,11 @@
       classes.forEach(_buildClass);
     });
 
+    collector.outputClassTypeLists
+        .forEach((OutputUnit _, List<ClassEntity> types) {
+      types.forEach(_buildClassTypeData);
+    });
+
     // Resolve the superclass references after we've processed all the classes.
     _classes.forEach((ClassEntity cls, Class c) {
       ClassEntity superclass = _elementEnvironment.getSuperClass(cls);
@@ -432,7 +445,8 @@
         element, name, null, _registerStaticStateHolder(), code,
         isFinal: false,
         isLazy: false,
-        isInitializedByConstant: initialValue != null);
+        isInitializedByConstant: initialValue != null,
+        usesNonNullableInitialization: element.library.isNonNullableByDefault);
   }
 
   List<StaticField> _buildStaticLazilyInitializedFields(
@@ -461,15 +475,18 @@
     // the holder-instance.
     return new StaticField(
         element, name, getterName, _registerStaticStateHolder(), code,
-        isFinal: !element.isAssignable, isLazy: true);
+        isFinal: !element.isAssignable,
+        isLazy: true,
+        usesNonNullableInitialization: element.library.isNonNullableByDefault);
   }
 
   List<Library> _buildLibraries(LibrariesMap librariesMap) {
     List<Library> libraries = new List<Library>(librariesMap.length);
     int count = 0;
     librariesMap.forEach((LibraryEntity library, List<ClassEntity> classes,
-        List<MemberEntity> members) {
-      libraries[count++] = _buildLibrary(library, classes, members);
+        List<MemberEntity> members, List<ClassEntity> classTypeElements) {
+      libraries[count++] =
+          _buildLibrary(library, classes, members, classTypeElements);
     });
     return libraries;
   }
@@ -492,9 +509,11 @@
     // a method in the case where there exist multiple JavaScript classes
     // that conflict on whether the member is a getter or a method.
     Class interceptorClass = _classes[_commonElements.jsJavaScriptObjectClass];
+
+    interceptorClass?.isChecks?.addAll(_jsInteropIsChecks);
     Set<String> stubNames = {};
-    librariesMap
-        .forEach((LibraryEntity library, List<ClassEntity> classElements, _) {
+    librariesMap.forEach((LibraryEntity library,
+        List<ClassEntity> classElements, _memberElement, _typeElement) {
       for (ClassEntity cls in classElements) {
         if (_nativeData.isJsInteropClass(cls)) {
           _elementEnvironment.forEachLocalClassMember(cls,
@@ -594,7 +613,7 @@
   // Note that a library-element may have multiple [Library]s, if it is split
   // into multiple output units.
   Library _buildLibrary(LibraryEntity library, List<ClassEntity> classElements,
-      List<MemberEntity> memberElements) {
+      List<MemberEntity> memberElements, List<ClassEntity> classTypeElements) {
     String uri = library.canonicalUri.toString();
 
     List<StaticMethod> statics = memberElements
@@ -614,12 +633,17 @@
             !cls.isNative || !_unneededNativeClasses.contains(cls))
         .toList(growable: false);
 
+    List<ClassTypeData> classTypeData = classTypeElements
+        .map((ClassEntity classTypeElement) => _classTypeData[classTypeElement])
+        .toList();
+    classTypeData.addAll(classes.map((Class cls) => cls.typeData).toList());
+
     bool visitStatics = true;
     List<Field> staticFieldsForReflection =
         _buildFields(library: library, visitStatics: visitStatics);
 
-    return new Library(
-        library, uri, statics, classes, staticFieldsForReflection);
+    return new Library(library, uri, statics, classes, classTypeData,
+        staticFieldsForReflection);
   }
 
   bool _isSoftDeferred(ClassEntity element) {
@@ -627,13 +651,19 @@
   }
 
   Class _buildClass(ClassEntity cls) {
-    bool onlyForRti = collector.classesOnlyNeededForRti.contains(cls);
+    bool onlyForConstructor =
+        collector.classesOnlyNeededForConstructor.contains(cls);
+    bool onlyForRti = _options.deferClassTypes
+        ? false
+        : collector.classesOnlyNeededForRti.contains(cls);
     bool hasRtiField = _rtiNeed.classNeedsTypeArguments(cls);
     if (_nativeData.isJsInteropClass(cls)) {
+      // TODO(joshualitt): Can we just emit JSInteropClasses as types?
       // TODO(jacobr): check whether the class has any active static fields
       // if it does not we can suppress it completely.
       onlyForRti = true;
     }
+    bool onlyForConstructorOrRti = onlyForConstructor || onlyForRti;
     bool isClosureBaseClass = cls == _commonElements.closureClass;
 
     List<Method> methods = [];
@@ -693,14 +723,14 @@
       callStubs.add(_buildStubMethod(name, function));
     }
 
-    if (_commonElements.isInstantiationClass(cls) && !onlyForRti) {
+    if (_commonElements.isInstantiationClass(cls) && !onlyForConstructorOrRti) {
       callStubs.addAll(_generateInstantiationStubs(cls));
     }
 
     // MixinApplications run through the members of their mixin. Here, we are
     // only interested in direct members.
     bool isSuperMixinApplication = false;
-    if (!onlyForRti) {
+    if (!onlyForConstructorOrRti) {
       if (_elementEnvironment.isSuperMixinApplication(cls)) {
         List<MemberEntity> members = <MemberEntity>[];
         void add(MemberEntity member) {
@@ -725,14 +755,14 @@
       }
     }
     bool isInterceptedClass = _interceptorData.isInterceptedClass(cls);
-    List<Field> instanceFields = onlyForRti
-        ? const <Field>[]
+    List<Field> instanceFields = onlyForConstructorOrRti
+        ? const []
         : _buildFields(
             cls: cls,
             visitStatics: false,
             isHolderInterceptedClass: isInterceptedClass);
-    List<Field> staticFieldsForReflection = onlyForRti
-        ? const <Field>[]
+    List<Field> staticFieldsForReflection = onlyForConstructorOrRti
+        ? const []
         : _buildFields(
             cls: cls,
             visitStatics: true,
@@ -750,9 +780,7 @@
       // Currently we generate duplicates if a class is implemented by multiple
       // js-interop classes.
       typeTests.forEachProperty(_sorter, (js.Name name, js.Node code) {
-        _classes[_commonElements.jsJavaScriptObjectClass]
-            .isChecks
-            .add(_buildStubMethod(name, code));
+        _jsInteropIsChecks.add(_buildStubMethod(name, code));
       });
     } else {
       for (Field field in instanceFields) {
@@ -785,9 +813,10 @@
     bool isInstantiated = !_nativeData.isJsInteropClass(cls) &&
         _codegenWorld.directlyInstantiatedClasses.contains(cls);
 
+    ClassTypeData typeData = ClassTypeData(cls, _rtiChecks.requiredChecks[cls]);
     Class result;
     if (_elementEnvironment.isMixinApplication(cls) &&
-        !onlyForRti &&
+        !onlyForConstructorOrRti &&
         !isSuperMixinApplication) {
       assert(!_nativeData.isNativeClass(cls));
       assert(methods.isEmpty);
@@ -795,6 +824,7 @@
 
       result = new MixinApplication(
           cls,
+          typeData,
           name,
           holder,
           instanceFields,
@@ -802,14 +832,15 @@
           callStubs,
           checkedSetters,
           isChecks,
-          _rtiChecks.requiredChecks[cls],
           typeTests.functionTypeIndex,
           isDirectlyInstantiated: isInstantiated,
           hasRtiField: hasRtiField,
-          onlyForRti: onlyForRti);
+          onlyForRti: onlyForRti,
+          onlyForConstructor: onlyForConstructor);
     } else {
       result = new Class(
           cls,
+          typeData,
           name,
           holder,
           methods,
@@ -819,11 +850,11 @@
           noSuchMethodStubs,
           checkedSetters,
           isChecks,
-          _rtiChecks.requiredChecks[cls],
           typeTests.functionTypeIndex,
           isDirectlyInstantiated: isInstantiated,
           hasRtiField: hasRtiField,
           onlyForRti: onlyForRti,
+          onlyForConstructor: onlyForConstructor,
           isNative: _nativeData.isNativeClass(cls),
           isClosureBaseClass: isClosureBaseClass,
           isSoftDeferred: _isSoftDeferred(cls),
@@ -833,6 +864,10 @@
     return result;
   }
 
+  void _buildClassTypeData(ClassEntity cls) {
+    _classTypeData[cls] = ClassTypeData(cls, _rtiChecks.requiredChecks[cls]);
+  }
+
   void associateNamedTypeVariablesNewRti() {
     for (TypeVariableType typeVariable in _codegenWorld.namedTypeVariablesNewRti
         .union(_lateNamedTypeVariablesNewRti)) {
@@ -843,8 +878,13 @@
               : _classHierarchy.subclassesOf(declaration);
       for (ClassEntity entity in subtypes) {
         Class cls = _classes[entity];
-        if (cls == null) continue;
-        cls.namedTypeVariablesNewRti.add(typeVariable);
+        if (cls != null) {
+          cls.typeData.namedTypeVariables.add(typeVariable);
+        }
+        ClassTypeData classTypeData = _classTypeData[entity];
+        if (classTypeData != null) {
+          classTypeData.namedTypeVariables.add(typeVariable);
+        }
       }
     }
   }
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart b/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart
index 13bc633..c738517 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/registry.dart
@@ -5,14 +5,18 @@
 part of dart2js.js_emitter.program_builder;
 
 class LibraryContents {
-  final List<ClassEntity> classes = <ClassEntity>[];
-  final List<MemberEntity> members = <MemberEntity>[];
+  final List<ClassEntity> classes = [];
+  final List<MemberEntity> members = [];
+  final List<ClassEntity> classTypes = [];
 }
 
-/// Maps [LibraryEntity]s to their [ClassEntity]s and [MemberEntity]s.
+/// Maps [LibraryEntity]s to their classes, members, and class types.
 ///
 /// Fundamentally, this class nicely encapsulates a
-/// `Map<LibraryEntity, Pair<List<ClassEntity>, List<MemberEntity>>>`.
+/// `Map<LibraryEntity, Tuple<classes, members, class types>>`.
+///
+/// where both classes and class types are lists of [ClassEntity] and
+/// members is a list of [MemberEntity].
 ///
 /// There exists exactly one instance per [OutputUnit].
 class LibrariesMap {
@@ -46,6 +50,10 @@
     _getMapping(library).classes.add(element);
   }
 
+  void addClassType(LibraryEntity library, ClassEntity element) {
+    _getMapping(library).classTypes.add(element);
+  }
+
   void addMember(LibraryEntity library, MemberEntity element) {
     _getMapping(library).members.add(element);
   }
@@ -54,9 +62,9 @@
 
   void forEach(
       void f(LibraryEntity library, List<ClassEntity> classes,
-          List<MemberEntity> members)) {
+          List<MemberEntity> members, List<ClassEntity> classTypeData)) {
     _mapping.forEach((LibraryEntity library, LibraryContents mapping) {
-      f(library, mapping.classes, mapping.members);
+      f(library, mapping.classes, mapping.members, mapping.classTypes);
     });
   }
 }
@@ -125,6 +133,16 @@
 
   /// Adds all elements to their respective libraries in the correct
   /// libraries map.
+  void registerClassTypes(
+      OutputUnit outputUnit, Iterable<ClassEntity> elements) {
+    LibrariesMap targetLibrariesMap = _mapUnitToLibrariesMap(outputUnit);
+    for (ClassEntity element in _sorter.sortClasses(elements)) {
+      targetLibrariesMap.addClassType(element.library, element);
+    }
+  }
+
+  /// Adds all elements to their respective libraries in the correct
+  /// libraries map.
   void registerMembers(OutputUnit outputUnit, Iterable<MemberEntity> elements) {
     LibrariesMap targetLibrariesMap = _mapUnitToLibrariesMap(outputUnit);
     for (MemberEntity element in _sorter.sortMembers(elements)) {
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
index 1da9bec..d9bfaab 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -263,7 +263,7 @@
 
   @override
   bool visitInterfaceType(InterfaceType type, OutputUnit argument) {
-    if (_outputUnitData.outputUnitForClass(type.element) != argument) {
+    if (_outputUnitData.outputUnitForClassType(type.element) != argument) {
       return false;
     }
     return visitList(type.typeArguments, argument);
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
index 8ae8d3a3..41ddad7 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
@@ -118,7 +118,7 @@
 // A lazy field has a storage entry, [name], which holds the value, and a
 // getter ([getterName]) to access the field. If the field wasn't set before
 // the first access, it is initialized with the [initializer].
-function lazy(holder, name, getterName, initializer) {
+function lazyOld(holder, name, getterName, initializer) {
   var uninitializedSentinel = holder;
   holder[name] = uninitializedSentinel;
   holder[getterName] = function() {
@@ -149,6 +149,23 @@
   };
 }
 
+// Creates a lazy field that uses non-nullable initialization semantics.
+//
+// A lazy field has a storage entry, [name], which holds the value, and a
+// getter ([getterName]) to access the field. If the field wasn't set before
+// the first access, it is initialized with the [initializer].
+function lazy(holder, name, getterName, initializer) {
+  var uninitializedSentinel = holder;
+  holder[name] = uninitializedSentinel;
+  holder[getterName] = function() {
+    if (holder[name] === uninitializedSentinel) {
+      holder[name] = initializer();
+    }
+    holder[getterName] = function() { return this[name]; };
+    return holder[name];
+  };
+}
+
 // Given a list, marks it as constant.
 //
 // The runtime ensures that const-lists cannot be modified.
@@ -350,6 +367,7 @@
 
     makeConstList: makeConstList,
     lazy: lazy,
+    lazyOld: lazyOld,
     updateHolder: updateHolder,
     convertToFastObject: convertToFastObject,
     setFunctionNamesIfNecessary: setFunctionNamesIfNecessary,
@@ -1732,7 +1750,9 @@
     for (StaticField field in fields) {
       assert(field.holder.isStaticStateHolder);
       js.Statement statement = js.js.statement("#(#, #, #, #);", [
-        locals.find('_lazy', 'hunkHelpers.lazy'),
+        field.usesNonNullableInitialization
+            ? locals.find('_lazy', 'hunkHelpers.lazy')
+            : locals.find('_lazyOld', 'hunkHelpers.lazyOld'),
         field.holder.name,
         js.quoteName(field.name),
         js.quoteName(field.getterName),
@@ -1978,15 +1998,15 @@
     ClassEntity jsObjectClass = _commonElements.jsJavaScriptObjectClass;
     InterfaceType jsObjectType = _elementEnvironment.getThisType(jsObjectClass);
 
-    Map<Class, List<Class>> nativeRedirections =
+    Map<ClassTypeData, List<ClassTypeData>> nativeRedirections =
         _nativeEmitter.typeRedirections;
 
     Ruleset ruleset = Ruleset.empty();
     Map<ClassEntity, int> erasedTypes = {};
-    Iterable<Class> classes =
-        fragment.libraries.expand((Library library) => library.classes);
-    classes.forEach((Class cls) {
-      ClassEntity element = cls.element;
+    Iterable<ClassTypeData> classTypeData =
+        fragment.libraries.expand((Library library) => library.classTypeData);
+    classTypeData.forEach((ClassTypeData typeData) {
+      ClassEntity element = typeData.element;
       InterfaceType targetType = _elementEnvironment.getThisType(element);
 
       // TODO(fishythefish): Prune uninstantiated classes.
@@ -1996,7 +2016,7 @@
 
       bool isInterop = _classHierarchy.isSubclassOf(element, jsObjectClass);
 
-      Iterable<TypeCheck> checks = cls.classChecksNewRti?.checks ?? [];
+      Iterable<TypeCheck> checks = typeData.classChecks?.checks ?? [];
       Iterable<InterfaceType> supertypes = isInterop
           ? checks
               .map((check) => _elementEnvironment.getJsInteropType(check.cls))
@@ -2004,11 +2024,11 @@
               .map((check) => _dartTypes.asInstanceOf(targetType, check.cls));
 
       Map<TypeVariableType, DartType> typeVariables = {};
-      Set<TypeVariableType> namedTypeVariables = cls.namedTypeVariablesNewRti;
-      nativeRedirections[cls]?.forEach((Class redirectee) {
-        namedTypeVariables.addAll(redirectee.namedTypeVariablesNewRti);
+      Set<TypeVariableType> namedTypeVariables = typeData.namedTypeVariables;
+      nativeRedirections[typeData]?.forEach((ClassTypeData redirectee) {
+        namedTypeVariables.addAll(redirectee.namedTypeVariables);
       });
-      for (TypeVariableType typeVariable in cls.namedTypeVariablesNewRti) {
+      for (TypeVariableType typeVariable in typeData.namedTypeVariables) {
         TypeVariableEntity element = typeVariable.element;
         InterfaceType supertype = isInterop
             ? _elementEnvironment.getJsInteropType(element.typeDeclaration)
@@ -2033,8 +2053,9 @@
       });
     }
 
-    nativeRedirections.forEach((Class target, List<Class> redirectees) {
-      for (Class redirectee in redirectees) {
+    nativeRedirections
+        .forEach((ClassTypeData target, List<ClassTypeData> redirectees) {
+      for (ClassTypeData redirectee in redirectees) {
         ruleset.addRedirection(redirectee.element, target.element);
       }
     });
diff --git a/pkg/compiler/lib/src/js_model/element_map_impl.dart b/pkg/compiler/lib/src/js_model/element_map_impl.dart
index e92f9f1..20f91bd 100644
--- a/pkg/compiler/lib/src/js_model/element_map_impl.dart
+++ b/pkg/compiler/lib/src/js_model/element_map_impl.dart
@@ -148,8 +148,8 @@
       IndexedLibrary oldLibrary = _elementMap.libraries.getEntity(libraryIndex);
       KLibraryEnv oldEnv = _elementMap.libraries.getEnv(oldLibrary);
       KLibraryData data = _elementMap.libraries.getData(oldLibrary);
-      IndexedLibrary newLibrary =
-          new JLibrary(oldLibrary.name, oldLibrary.canonicalUri);
+      IndexedLibrary newLibrary = new JLibrary(oldLibrary.name,
+          oldLibrary.canonicalUri, oldLibrary.isNonNullableByDefault);
       JLibraryEnv newEnv = oldEnv.convert(_elementMap, liveMemberUsage);
       libraryMap[oldEnv.library] =
           libraries.register<IndexedLibrary, JLibraryData, JLibraryEnv>(
@@ -917,7 +917,7 @@
     for (ir.VariableDeclaration variable in sortedNamedParameters) {
       namedParameters.add(variable.name);
       namedParameterTypes.add(getParameterType(variable));
-      if (variable.isRequired && !options.useLegacySubtyping) {
+      if (variable.isRequired) {
         requiredNamedParameters.add(variable.name);
       }
     }
@@ -2003,15 +2003,15 @@
           fieldNumber++;
         }
       } else if (variable is TypeVariableTypeWithContext) {
-        _constructClosureField(
-            localsMap.getLocalTypeVariable(variable.type, this),
-            closureClassInfo,
-            memberThisType,
-            memberMap,
-            variable.type.parameter,
-            true,
-            false,
-            fieldNumber);
+        Local capturedLocal =
+            localsMap.getLocalTypeVariable(variable.type, this);
+        // We can have distinct TypeVariableTypeWithContexts that have the same
+        // local variable but with different nullabilities. We only want to
+        // construct a closure field once for each local variable.
+        if (closureClassInfo.localToFieldMap.containsKey(capturedLocal))
+          continue;
+        _constructClosureField(capturedLocal, closureClassInfo, memberThisType,
+            memberMap, variable.type.parameter, true, false, fieldNumber);
         fieldNumber++;
       } else {
         throw new UnsupportedError("Unexpected field node type: $variable");
diff --git a/pkg/compiler/lib/src/js_model/elements.dart b/pkg/compiler/lib/src/js_model/elements.dart
index 4929d21..05a965f 100644
--- a/pkg/compiler/lib/src/js_model/elements.dart
+++ b/pkg/compiler/lib/src/js_model/elements.dart
@@ -24,16 +24,19 @@
   final String name;
   @override
   final Uri canonicalUri;
+  @override
+  final bool isNonNullableByDefault;
 
-  JLibrary(this.name, this.canonicalUri);
+  JLibrary(this.name, this.canonicalUri, this.isNonNullableByDefault);
 
   /// Deserializes a [JLibrary] object from [source].
   factory JLibrary.readFromDataSource(DataSource source) {
     source.begin(tag);
     String name = source.readString();
     Uri canonicalUri = source.readUri();
+    bool isNonNullableByDefault = source.readBool();
     source.end(tag);
-    return new JLibrary(name, canonicalUri);
+    return new JLibrary(name, canonicalUri, isNonNullableByDefault);
   }
 
   /// Serializes this [JLibrary] to [sink].
@@ -41,6 +44,7 @@
     sink.begin(tag);
     sink.writeString(name);
     sink.writeUri(canonicalUri);
+    sink.writeBool(isNonNullableByDefault);
     sink.end(tag);
   }
 
diff --git a/pkg/compiler/lib/src/js_model/js_world.dart b/pkg/compiler/lib/src/js_model/js_world.dart
index e510eff..2b5263a 100644
--- a/pkg/compiler/lib/src/js_model/js_world.dart
+++ b/pkg/compiler/lib/src/js_model/js_world.dart
@@ -457,7 +457,8 @@
       getLubOfInstantiatedSubtypes(commonElements.functionClass);
 
   @override
-  bool includesClosureCall(Selector selector, AbstractValue receiver) {
+  bool includesClosureCallInDomain(Selector selector, AbstractValue receiver,
+      AbstractValueDomain abstractValueDomain) {
     return selector.name == Identifiers.call &&
         (receiver == null ||
             // This is logically equivalent to the former implementation using
@@ -480,6 +481,11 @@
   }
 
   @override
+  bool includesClosureCall(Selector selector, AbstractValue receiver) {
+    return includesClosureCallInDomain(selector, receiver, abstractValueDomain);
+  }
+
+  @override
   AbstractValue computeReceiverType(Selector selector, AbstractValue receiver) {
     _ensureFunctionSet();
     if (includesClosureCall(selector, receiver)) {
@@ -489,12 +495,18 @@
   }
 
   @override
-  Iterable<MemberEntity> locateMembers(
-      Selector selector, AbstractValue receiver) {
+  Iterable<MemberEntity> locateMembersInDomain(Selector selector,
+      AbstractValue receiver, AbstractValueDomain abstractValueDomain) {
     _ensureFunctionSet();
     return _allFunctions.filter(selector, receiver, abstractValueDomain);
   }
 
+  @override
+  Iterable<MemberEntity> locateMembers(
+      Selector selector, AbstractValue receiver) {
+    return locateMembersInDomain(selector, receiver, abstractValueDomain);
+  }
+
   bool hasAnyUserDefinedGetter(Selector selector, AbstractValue receiver) {
     _ensureFunctionSet();
     return _allFunctions
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index 386f119..76e5139 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -539,7 +539,7 @@
     for (ir.VariableDeclaration variable in sortedNamedParameters) {
       namedParameters.add(variable.name);
       namedParameterTypes.add(getParameterType(variable));
-      if (variable.isRequired && !options.useLegacySubtyping) {
+      if (variable.isRequired) {
         requiredNamedParameters.add(variable.name);
       }
     }
@@ -1191,7 +1191,8 @@
       String path = canonicalUri.path;
       name = path.substring(path.lastIndexOf('/') + 1);
     }
-    IndexedLibrary library = createLibrary(name, canonicalUri);
+    IndexedLibrary library =
+        createLibrary(name, canonicalUri, node.isNonNullableByDefault);
     return libraries.register(library, new KLibraryData(node),
         libraryEnv ?? env.lookupLibrary(canonicalUri));
   }
@@ -1597,8 +1598,9 @@
         isJsInterop: isJsInterop);
   }
 
-  IndexedLibrary createLibrary(String name, Uri canonicalUri) {
-    return new KLibrary(name, canonicalUri);
+  IndexedLibrary createLibrary(
+      String name, Uri canonicalUri, bool isNonNullableByDefault) {
+    return new KLibrary(name, canonicalUri, isNonNullableByDefault);
   }
 
   IndexedClass createClass(LibraryEntity library, String name,
@@ -1911,6 +1913,15 @@
     KClassData classData = elementMap.classes.getData(cls);
     return classData.isEnumClass;
   }
+
+  @override
+  ClassEntity getEffectiveMixinClass(ClassEntity cls) {
+    if (!isMixinApplication(cls)) return null;
+    do {
+      cls = elementMap.getAppliedMixin(cls);
+    } while (isMixinApplication(cls));
+    return cls;
+  }
 }
 
 /// [BehaviorBuilder] for kernel based elements.
diff --git a/pkg/compiler/lib/src/kernel/kelements.dart b/pkg/compiler/lib/src/kernel/kelements.dart
index 0257c08..8356cb5 100644
--- a/pkg/compiler/lib/src/kernel/kelements.dart
+++ b/pkg/compiler/lib/src/kernel/kelements.dart
@@ -17,8 +17,10 @@
   final String name;
   @override
   final Uri canonicalUri;
+  @override
+  final bool isNonNullableByDefault;
 
-  KLibrary(this.name, this.canonicalUri);
+  KLibrary(this.name, this.canonicalUri, this.isNonNullableByDefault);
 
   @override
   String toString() => '${kElementPrefix}library($name)';
diff --git a/pkg/compiler/lib/src/kernel/native_basic_data.dart b/pkg/compiler/lib/src/kernel/native_basic_data.dart
index f4e35a2..9ebb17d 100644
--- a/pkg/compiler/lib/src/kernel/native_basic_data.dart
+++ b/pkg/compiler/lib/src/kernel/native_basic_data.dart
@@ -47,15 +47,6 @@
     return annotationName;
   }
 
-  void checkFunctionParameters(FunctionEntity function) {
-    if (function.parameterStructure.namedParameters.isNotEmpty) {
-      elementMap.reporter.reportErrorMessage(
-          function,
-          MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS,
-          {'method': function.name});
-    }
-  }
-
   @override
   void extractJsInteropAnnotations(LibraryEntity library) {
     DiagnosticReporter reporter = elementMap.reporter;
@@ -90,7 +81,6 @@
                 function, MessageKind.JS_INTEROP_NON_EXTERNAL_MEMBER);*/
           } else {
             _nativeBasicDataBuilder.markAsJsInteropMember(function, memberName);
-            checkFunctionParameters(function);
             // TODO(johnniwinther): It is unclear whether library can be
             // implicitly js-interop. For now we allow it.
             isJsLibrary = true;
@@ -144,8 +134,6 @@
                   MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
                   {'cls': cls.name, 'member': member.name});
             }
-
-            checkFunctionParameters(function);
           }
         });
         elementEnvironment.forEachConstructor(cls,
@@ -163,27 +151,12 @@
             _nativeBasicDataBuilder.markAsJsInteropMember(
                 constructor, memberName);
           }
-
-          if (constructor.isFactoryConstructor && isAnonymous) {
-            if (constructor.parameterStructure.positionalParameters > 0) {
-              reporter.reportErrorMessage(
-                  constructor,
-                  MessageKind
-                      .JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
-                  {'cls': cls.name});
-            }
-          } else {
-            checkFunctionParameters(constructor);
-          }
         });
       } else {
         elementEnvironment.forEachLocalClassMember(cls, (MemberEntity member) {
           String memberName = getJsInteropName(
               library, elementEnvironment.getMemberMetadata(member));
-          if (memberName != null) {
-            reporter.reportErrorMessage(
-                member, MessageKind.JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS);
-          } else if (member is FunctionEntity) {
+          if (memberName == null && member is FunctionEntity) {
             if (member.isExternal &&
                 !commonElements.isExternalAllowed(member)) {
               reporter.reportErrorMessage(
@@ -195,10 +168,7 @@
             (ConstructorEntity constructor) {
           String memberName = getJsInteropName(
               library, elementEnvironment.getMemberMetadata(constructor));
-          if (memberName != null) {
-            reporter.reportErrorMessage(constructor,
-                MessageKind.JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS);
-          } else {
+          if (memberName == null) {
             if (constructor.isExternal &&
                 !commonElements.isExternalAllowed(constructor)) {
               reporter.reportErrorMessage(
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index 2f719b0..3e9ab67 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -157,6 +157,11 @@
   /// This flag is presented to help developers find and fix the affected code.
   bool reportInvalidInferredDeferredTypes = false;
 
+  /// Whether to defer load class types.
+  bool deferClassTypes = false; // default value.
+  bool _deferClassTypes = false;
+  bool _noDeferClassTypes = false;
+
   /// Whether to disable inlining during the backend optimizations.
   // TODO(sigmund): negate, so all flags are positive
   bool disableInlining = false;
@@ -193,6 +198,12 @@
   /// Whether to use the trivial abstract value domain.
   bool useTrivialAbstractValueDomain = false;
 
+  /// Whether to use the wrapped abstract value domain (experimental).
+  bool experimentalWrapped = false;
+
+  /// Whether to use the powersets abstract value domain (experimental).
+  bool experimentalPowersets = false;
+
   /// Whether to disable optimization for need runtime type information.
   bool disableRtiOptimization = false;
 
@@ -232,6 +243,13 @@
   /// Whether to generate code containing user's `assert` statements.
   bool enableUserAssertions = false;
 
+  /// Whether to generate code asserting that non-nullable parameters in opt-in
+  /// code are not null. In mixed mode code (some opting into non-nullable, some
+  /// not), null-safety is unsound, allowing `null` values to be assigned to
+  /// variables with non-nullable types. This assertion lets the opt-in code
+  /// operate with a stronger guarantee.
+  bool enableNullAssertions = false;
+
   /// Whether to generate a source-map file together with the output program.
   bool generateSourceMap = true;
 
@@ -416,6 +434,8 @@
       ..newDeferredSplit = _hasOption(options, Flags.newDeferredSplit)
       ..reportInvalidInferredDeferredTypes =
           _hasOption(options, Flags.reportInvalidInferredDeferredTypes)
+      .._deferClassTypes = _hasOption(options, Flags.deferClassTypes)
+      .._noDeferClassTypes = _hasOption(options, Flags.noDeferClassTypes)
       ..fatalWarnings = _hasOption(options, Flags.fatalWarnings)
       ..terseDiagnostics = _hasOption(options, Flags.terse)
       ..suppressWarnings = _hasOption(options, Flags.suppressWarnings)
@@ -428,6 +448,8 @@
       ..disableTypeInference = _hasOption(options, Flags.disableTypeInference)
       ..useTrivialAbstractValueDomain =
           _hasOption(options, Flags.useTrivialAbstractValueDomain)
+      ..experimentalWrapped = _hasOption(options, Flags.experimentalWrapped)
+      ..experimentalPowersets = _hasOption(options, Flags.experimentalPowersets)
       ..disableRtiOptimization =
           _hasOption(options, Flags.disableRtiOptimization)
       ..dumpInfo = _hasOption(options, Flags.dumpInfo)
@@ -441,6 +463,8 @@
           !_hasOption(options, Flags.disableNativeLiveTypeAnalysis)
       ..enableUserAssertions = _hasOption(options, Flags.enableCheckedMode) ||
           _hasOption(options, Flags.enableAsserts)
+      ..enableNullAssertions = _hasOption(options, Flags.enableCheckedMode) ||
+          _hasOption(options, Flags.enableNullAssertions)
       ..experimentalTrackAllocations =
           _hasOption(options, Flags.experimentalTrackAllocations)
       ..experimentalAllocationsPath = _extractStringOption(
@@ -514,6 +538,10 @@
       throw ArgumentError("'${Flags.soundNullSafety}' requires the "
           "'non-nullable' experiment to be enabled");
     }
+    if (_deferClassTypes && _noDeferClassTypes) {
+      throw ArgumentError("'${Flags.deferClassTypes}' incompatible with "
+          "'${Flags.noDeferClassTypes}'");
+    }
   }
 
   void deriveOptions() {
@@ -575,6 +603,9 @@
     if (_disableMinification) {
       enableMinification = false;
     }
+
+    if (_deferClassTypes) deferClassTypes = true;
+    if (_noDeferClassTypes) deferClassTypes = false;
   }
 
   /// Returns `true` if warnings and hints are shown for all packages.
diff --git a/pkg/compiler/lib/src/serialization/abstract_sink.dart b/pkg/compiler/lib/src/serialization/abstract_sink.dart
index 19b110a..c127c695b 100644
--- a/pkg/compiler/lib/src/serialization/abstract_sink.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_sink.dart
@@ -537,8 +537,6 @@
         writeOutputUnitReference(constant.unit);
         break;
       case ConstantValueKind.DUMMY_INTERCEPTOR:
-        DummyInterceptorConstantValue constant = value;
-        writeAbstractValue(constant.abstractValue);
         break;
       case ConstantValueKind.UNREACHABLE:
         break;
diff --git a/pkg/compiler/lib/src/serialization/abstract_source.dart b/pkg/compiler/lib/src/serialization/abstract_source.dart
index 6a2fc22..26f9bc1 100644
--- a/pkg/compiler/lib/src/serialization/abstract_source.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_source.dart
@@ -543,8 +543,7 @@
         OutputUnit unit = readOutputUnitReference();
         return new DeferredGlobalConstantValue(constant, unit);
       case ConstantValueKind.DUMMY_INTERCEPTOR:
-        AbstractValue abstractValue = readAbstractValue();
-        return new DummyInterceptorConstantValue(abstractValue);
+        return DummyInterceptorConstantValue();
       case ConstantValueKind.UNREACHABLE:
         return UnreachableConstantValue();
       case ConstantValueKind.JS_NAME:
diff --git a/pkg/compiler/lib/src/source_file_provider.dart b/pkg/compiler/lib/src/source_file_provider.dart
index 11272be..e227a7d 100644
--- a/pkg/compiler/lib/src/source_file_provider.dart
+++ b/pkg/compiler/lib/src/source_file_provider.dart
@@ -586,3 +586,64 @@
     return null;
   }
 }
+
+/// Adapter to support one or more synthetic uri schemes.
+///
+/// These custom uris map to one or more real directories on the file system,
+/// providing a merged view - or "overlay" file system.
+///
+/// This also allows for hermetic builds which do not encode machine specific
+/// absolute uris by creating a synthetic "root" of the file system.
+///
+/// TODO(sigmund): Remove the [BazelInputProvider] in favor of this.
+/// TODO(sigmund): Remove this and use the common `MultiRootFileSystem`
+/// implementation.
+class MultiRootInputProvider extends SourceFileProvider {
+  final List<Uri> roots;
+  final String markerScheme;
+
+  MultiRootInputProvider(this.markerScheme, List<String> searchPaths)
+      : roots = searchPaths.map(Uri.base.resolve).toList();
+
+  @override
+  Future<api.Input<List<int>>> readFromUri(Uri uri,
+      {InputKind inputKind: InputKind.UTF8}) async {
+    var resolvedUri = uri;
+    if (resolvedUri.scheme == markerScheme) {
+      var path = resolvedUri.path;
+      if (path.startsWith('/')) path = path.substring(1);
+      for (var dir in roots) {
+        var fileUri = dir.resolve(path);
+        if (await new File.fromUri(fileUri).exists()) {
+          resolvedUri = fileUri;
+          break;
+        }
+      }
+    }
+    api.Input<List<int>> result =
+        await readBytesFromUri(resolvedUri, inputKind);
+    switch (inputKind) {
+      case InputKind.UTF8:
+        utf8SourceFiles[uri] = utf8SourceFiles[resolvedUri];
+        break;
+      case InputKind.binary:
+        binarySourceFiles[uri] = binarySourceFiles[resolvedUri];
+        break;
+    }
+    return result;
+  }
+
+  @override
+  api.Input autoReadFromFile(Uri resourceUri) {
+    if (resourceUri.scheme == markerScheme) {
+      var path = resourceUri.path;
+      for (var dir in roots) {
+        var file = dir.resolve(path);
+        if (new File.fromUri(file).existsSync()) {
+          return super.autoReadFromFile(file);
+        }
+      }
+    }
+    return null;
+  }
+}
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 02e6e5c..24104e5 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -588,13 +588,15 @@
       // If the method is intercepted, we want the actual receiver
       // to be the first parameter.
       graph.entry.addBefore(graph.entry.last, parameter);
+      DartType type = _getDartTypeIfValid(node.type);
       HInstruction value = _typeBuilder.potentiallyCheckOrTrustTypeOfParameter(
-          field, parameter, _getDartTypeIfValid(node.type));
+          field, parameter, type);
       // TODO(sra): Pass source information to
       // [potentiallyCheckOrTrustTypeOfParameter].
       // TODO(sra): The source information should indiciate the field and
       // possibly its type but not the initializer.
       value.sourceInformation ??= _sourceInformationBuilder.buildSet(node);
+      value = _potentiallyAssertNotNull(node, value, type);
       if (!_fieldAnalysis.getFieldData(field).isElided) {
         add(HFieldSet(_abstractValueDomain, field, thisInstruction, value));
       }
@@ -1237,27 +1239,6 @@
         parameterStructure: function.parameterStructure,
         checks: _checksForFunction(function));
 
-    // If [functionNode] is `operator==` we explicitly add a null check at the
-    // beginning of the method. This is to avoid having call sites do the null
-    // check.
-    if (function.name == '==') {
-      if (!_commonElements.operatorEqHandlesNullArgument(function)) {
-        _handleIf(
-            visitCondition: () {
-              HParameterValue parameter = parameters.values.first;
-              push(new HIdentity(parameter, graph.addConstantNull(closedWorld),
-                  _abstractValueDomain.boolType));
-            },
-            visitThen: () {
-              _closeAndGotoExit(HReturn(
-                  _abstractValueDomain,
-                  graph.addConstantBool(false, closedWorld),
-                  _sourceInformationBuilder.buildReturn(functionNode)));
-            },
-            visitElse: null,
-            sourceInformation: _sourceInformationBuilder.buildIf(functionNode));
-      }
-    }
     if (const bool.fromEnvironment('unreachable-throw')) {
       var emptyParameters = parameters.values.where((p) =>
           _abstractValueDomain.isEmpty(p.instructionType).isDefinitelyTrue);
@@ -1432,7 +1413,8 @@
         newParameter = _typeBuilder.trustTypeOfParameter(
             targetElement, newParameter, type);
       }
-
+      // TODO(sra): Hoist out of loop.
+      newParameter = _potentiallyAssertNotNull(variable, newParameter, type);
       localsHandler.updateLocal(local, newParameter);
     }
 
@@ -1459,6 +1441,41 @@
     }
   }
 
+  /// In mixed mode, inserts an assertion of the form `assert(x != null)` for
+  /// parameters in opt-in libraries that have a static type that cannot be
+  /// nullable under a strong interpretation.
+  HInstruction _potentiallyAssertNotNull(
+      ir.TreeNode context, HInstruction value, DartType type) {
+    if (!options.enableNullAssertions) return value;
+    if (!_isNonNullableByDefault(context)) return value;
+    if (!dartTypes.isNonNullableIfSound(type)) return value;
+
+    if (options.enableUserAssertions) {
+      pushCheckNull(value);
+      push(HNot(pop(), _abstractValueDomain.boolType));
+      var sourceInformation = _sourceInformationBuilder.buildAssert(context);
+      _pushStaticInvocation(
+          _commonElements.assertHelper,
+          <HInstruction>[pop()],
+          _typeInferenceMap.getReturnTypeOf(_commonElements.assertHelper),
+          const <DartType>[],
+          sourceInformation: sourceInformation);
+      pop();
+      return value;
+    } else {
+      HInstruction nullCheck = HNullCheck(
+          value, _abstractValueDomain.excludeNull(value.instructionType))
+        ..sourceInformation = value.sourceInformation;
+      add(nullCheck);
+      return nullCheck;
+    }
+  }
+
+  bool _isNonNullableByDefault(ir.TreeNode node) {
+    if (node is ir.Library) return node.isNonNullableByDefault;
+    return _isNonNullableByDefault(node.parent);
+  }
+
   /// Builds a SSA graph for FunctionNodes of external methods. This produces a
   /// graph for a method with Dart calling conventions that forwards to the
   /// actual external method.
@@ -1617,6 +1634,29 @@
     _addClassTypeVariablesIfNeeded(member);
     _addFunctionTypeVariablesIfNeeded(member);
 
+    // If [member] is `operator==` we explicitly add a null check at the
+    // beginning of the method. This is to avoid having call sites do the null
+    // check. The null check is added before the argument type checks since in
+    // strong mode, the parameter type might be non-nullable.
+    if (member.name == '==') {
+      if (!_commonElements.operatorEqHandlesNullArgument(member)) {
+        _handleIf(
+            visitCondition: () {
+              HParameterValue parameter = parameters.values.first;
+              push(new HIdentity(parameter, graph.addConstantNull(closedWorld),
+                  _abstractValueDomain.boolType));
+            },
+            visitThen: () {
+              _closeAndGotoExit(HReturn(
+                  _abstractValueDomain,
+                  graph.addConstantBool(false, closedWorld),
+                  _sourceInformationBuilder.buildReturn(functionNode)));
+            },
+            visitElse: null,
+            sourceInformation: _sourceInformationBuilder.buildIf(functionNode));
+      }
+    }
+
     if (functionNode != null) {
       _potentiallyAddFunctionParameterTypeChecks(functionNode, checks);
     }
@@ -3603,13 +3643,6 @@
           }
         }
         assert(namedValues.isEmpty);
-      } else {
-        // Throw an error because JS cannot handle named parameters.
-        reporter.reportErrorMessage(
-            _elementMap.getSpannable(targetElement, target),
-            MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS,
-            {'method': function.name});
-        return null;
       }
     }
     return values;
@@ -5500,10 +5533,9 @@
 
       // Don't inline operator== methods if the parameter can be null.
       if (function.name == '==') {
-        if (function.enclosingClass != _commonElements.objectClass &&
-            providedArguments[1]
-                .isNull(_abstractValueDomain)
-                .isPotentiallyTrue) {
+        if (providedArguments[1]
+            .isNull(_abstractValueDomain)
+            .isPotentiallyTrue) {
           return false;
         }
       }
@@ -6053,6 +6085,8 @@
         checkedOrTrusted = _typeBuilder.potentiallyCheckOrTrustTypeOfParameter(
             function, argument, type);
       }
+      checkedOrTrusted =
+          _potentiallyAssertNotNull(variable, checkedOrTrusted, type);
       localsHandler.updateLocal(parameter, checkedOrTrusted);
     });
   }
@@ -6274,7 +6308,7 @@
 
     AbstractValue unwrappedType = kernelBuilder._typeInferenceMap
         .getReturnTypeOf(kernelBuilder._commonElements.exceptionUnwrapper);
-    if (!kernelBuilder.options.useLegacySubtyping) {
+    if (kernelBuilder.options.useNullSafety) {
       // Global type analysis does not currently understand that strong mode
       // `Object` is not nullable, so is imprecise in the return type of the
       // unwrapper, which leads to unnecessary checks for 'on Object'.
@@ -6292,7 +6326,6 @@
     int catchesIndex = 0;
 
     void pushCondition(ir.Catch catchBlock) {
-      // `guard` is often `dynamic`, which generates `true`.
       kernelBuilder._pushIsTest(catchBlock.guard, unwrappedException,
           kernelBuilder._sourceInformationBuilder.buildCatch(catchBlock));
     }
@@ -6689,7 +6722,7 @@
   final bool enableUserAssertions;
   final bool omitImplicitCasts;
 
-  final InlineData data = new InlineData();
+  final InlineData data = InlineData();
   bool seenReturn = false;
 
   /// Whether node-count is collector to determine if a function can be
@@ -6714,6 +6747,11 @@
   // TODO(25231): Make larger string constants eligible by sharing references.
   bool countReductiveNode = true;
 
+  // When handling a generative constructor factory, the super constructor calls
+  // are 'inlined', so tend to reuse the same parameters. [discountParameters]
+  // is true to avoid double-counting these parameters.
+  bool discountParameters = false;
+
   InlineWeeder(
       {this.enableUserAssertions: false, this.omitImplicitCasts: false});
 
@@ -6724,17 +6762,18 @@
         enableUserAssertions: enableUserAssertions,
         omitImplicitCasts: omitImplicitCasts);
     ir.FunctionNode node = getFunctionNode(elementMap, function);
-    node.accept(visitor);
     if (function.isConstructor) {
       visitor.data.isConstructor = true;
       MemberDefinition definition = elementMap.getMemberDefinition(function);
-      visitor.skipReductiveNodes(() {
-        ir.Node node = definition.node;
-        if (node is ir.Constructor) {
-          visitor.visitList(node.initializers);
-        }
-      });
+      ir.Node node = definition.node;
+      if (node is ir.Constructor) {
+        visitor.skipReductiveNodes(() {
+          visitor.handleGenerativeConstructorFactory(node);
+        });
+        return visitor.data;
+      }
     }
+    node.accept(visitor);
     return visitor.data;
   }
 
@@ -6752,9 +6791,9 @@
     countReductiveNode = oldCountReductiveNode;
   }
 
-  void registerRegularNode() {
+  void registerRegularNode([int count = 1]) {
     if (countRegularNode) {
-      data.regularNodeCount++;
+      data.regularNodeCount += count;
       if (seenReturn) {
         data.codeAfterReturn = true;
       }
@@ -6986,6 +7025,7 @@
 
   @override
   visitVariableGet(ir.VariableGet node) {
+    if (discountParameters && node.variable.parent is ir.FunctionNode) return;
     registerRegularNode();
     registerReductiveNode();
     skipReductiveNodes(() => visit(node.promotedType));
@@ -7097,4 +7137,175 @@
     node.visitChildren(this);
     data.hasIf = true;
   }
+
+  void handleGenerativeConstructorFactory(ir.Constructor node) {
+    // Generative constructors are compiled to a factory constructor which
+    // contains inlined all the initializations up the inheritance chain and
+    // then call each of the constructor bodies down the inheritance chain.
+    ir.Constructor constructor = node;
+
+    Set<ir.Field> initializedFields = {};
+    bool hasCallToSomeConstructorBody = false;
+
+    inheritance_loop:
+    while (constructor != null) {
+      ir.Constructor superConstructor;
+      for (var initializer in constructor.initializers) {
+        if (initializer is ir.RedirectingInitializer) {
+          // Discount the size of the arguments by references that are
+          // pass-through.
+          // TODO(sra): Need to add size of defaulted arguments.
+          var discountParametersOld = discountParameters;
+          discountParameters = true;
+          initializer.arguments.accept(this);
+          discountParameters = discountParametersOld;
+          constructor = initializer.target;
+          continue inheritance_loop;
+        } else if (initializer is ir.SuperInitializer) {
+          superConstructor = initializer.target;
+          // Discount the size of the arguments by references that are
+          // pass-through.
+          // TODO(sra): Need to add size of defaulted arguments.
+          var discountParametersOld = discountParameters;
+          discountParameters = true;
+          initializer.arguments.accept(this);
+          discountParameters = discountParametersOld;
+        } else if (initializer is ir.FieldInitializer) {
+          initializedFields.add(initializer.field);
+          initializer.value.accept(this);
+        } else if (initializer is ir.AssertInitializer) {
+          if (enableUserAssertions) {
+            initializer.accept(this);
+          }
+        } else {
+          initializer.accept(this);
+        }
+      }
+
+      _handleFields(constructor.enclosingClass, initializedFields);
+
+      // There will be a call to the constructor's body, which might be empty
+      // and inlined away.
+      var function = constructor.function;
+      var body = function.body;
+      if (!isEmptyBody(body)) {
+        // All of the parameters are passed to the body.
+        int parameterCount = function.positionalParameters.length +
+            function.namedParameters.length +
+            function.typeParameters.length;
+
+        hasCallToSomeConstructorBody = true;
+        registerCall();
+        // A body call looks like "t.Body$(arguments);", i.e. an expression
+        // statement with an instance member call, but the receiver is not
+        // counted in the arguments. I'm guessing about 6 nodes for this.
+        registerRegularNode(
+            6 + parameterCount * INLINING_NODES_OUTSIDE_LOOP_ARG_FACTOR);
+
+        // We can't inline a generative constructor factory when one of the
+        // bodies rewrites the environment to put locals or parameters into a
+        // box. The box is created in the generative constructor factory since
+        // the box may be shared between closures in the initializer list and
+        // closures in the constructor body.
+        var bodyVisitor = InlineWeederBodyClosure();
+        body.accept(bodyVisitor);
+        if (bodyVisitor.tooDifficult) {
+          data.hasClosure = true;
+        }
+      }
+
+      if (superConstructor != null) {
+        // The class of the super-constructor may not be the supertype class. In
+        // this case, we must go up the class hierarchy until we reach the class
+        // containing the super-constructor.
+        ir.Supertype supertype = constructor.enclosingClass.supertype;
+        while (supertype.classNode != superConstructor.enclosingClass) {
+          _handleFields(supertype.classNode, initializedFields);
+          supertype = supertype.classNode.supertype;
+        }
+      }
+      constructor = superConstructor;
+    }
+
+    // In addition to the initializer expressions and body calls, there is an
+    // allocator call.
+    if (hasCallToSomeConstructorBody) {
+      // A temporary is requried so we have
+      //
+      //     t=new ...;
+      //     ...;
+      //     use(t);
+      //
+      // I'm guessing it takes about 4 nodes to introduce the temporary and
+      // assign it.
+      registerRegularNode(4); // A temporary is requried.
+    }
+    // The initial field values are passed to the allocator.
+    registerRegularNode(
+        initializedFields.length * INLINING_NODES_OUTSIDE_LOOP_ARG_FACTOR);
+  }
+
+  void _handleFields(ir.Class cls, Set<ir.Field> initializedFields) {
+    for (ir.Field field in cls.fields) {
+      if (!field.isInstanceMember) continue;
+      ir.Expression initializer = field.initializer;
+      if (initializer == null ||
+          initializer is ir.ConstantExpression &&
+              initializer.constant is ir.PrimitiveConstant ||
+          initializer is ir.BasicLiteral) {
+        // Simple field initializers happen in the allocator, so do not
+        // contribute to the size of the generative constructor factory.
+        // TODO(sra): Use FieldInfo which tells us if the field is elided or
+        // initialized in the allocator.
+        continue;
+      }
+      if (!initializedFields.add(field)) continue;
+      initializer.accept(this);
+    }
+    // If [cls] is a mixin application, include fields from mixed in class.
+    if (cls.mixedInType != null) {
+      _handleFields(cls.mixedInType.classNode, initializedFields);
+    }
+  }
+
+  bool isEmptyBody(ir.Statement body) {
+    if (body is ir.EmptyStatement) return true;
+    if (body is ir.Block) return body.statements.every(isEmptyBody);
+    if (body is ir.AssertStatement && !enableUserAssertions) return true;
+    return false;
+  }
+}
+
+/// Visitor to detect environment-rewriting that prevents inlining
+/// (e.g. closures).
+class InlineWeederBodyClosure extends ir.Visitor<void> {
+  bool tooDifficult = false;
+
+  InlineWeederBodyClosure();
+
+  @override
+  defaultNode(ir.Node node) {
+    if (tooDifficult) return;
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitFunctionExpression(ir.FunctionExpression node) {
+    tooDifficult = true;
+  }
+
+  @override
+  void visitFunctionDeclaration(ir.FunctionDeclaration node) {
+    tooDifficult = true;
+  }
+
+  @override
+  void visitFunctionNode(ir.FunctionNode node) {
+    assert(false);
+    if (node.asyncMarker != ir.AsyncMarker.Sync) {
+      tooDifficult = true;
+      return;
+    }
+    node.visitChildren(this);
+  }
 }
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index dc5adf4..661962a 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -2172,8 +2172,9 @@
     }
 
     if (superElement.isField) {
+      // TODO(sra): We can lower these in the simplifier.
       js.Name fieldName = _namer.instanceFieldPropertyName(superElement);
-      use(node.inputs[0]);
+      use(node.getDartReceiver(_closedWorld));
       js.PropertyAccess access = new js.PropertyAccess(pop(), fieldName)
           .withSourceInformation(node.sourceInformation);
       if (node.isSetter) {
@@ -3031,7 +3032,7 @@
                 !dartType.baseType.isObject &&
                 dartType.baseType is! NeverType));
         InterfaceType type = dartType.withoutNullability;
-        _registry.registerTypeUse(TypeUse.instanceConstructor(type));
+        _registry.registerTypeUse(TypeUse.constructorReference(type));
         test = handleNegative(js.js('# instanceof #',
             [value, _emitter.constructorAccess(type.element)]));
     }
diff --git a/pkg/compiler/lib/src/ssa/codegen_helpers.dart b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
index be25134..6aa5a3c 100644
--- a/pkg/compiler/lib/src/ssa/codegen_helpers.dart
+++ b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
@@ -290,8 +290,7 @@
       return;
     }
 
-    ConstantValue constant =
-        DummyInterceptorConstantValue(receiverArgument.instructionType);
+    ConstantValue constant = DummyInterceptorConstantValue();
     HConstant dummy = graph.addConstant(constant, _closedWorld);
     receiverArgument.usedBy.remove(node);
     node.inputs[1] = dummy;
diff --git a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
index c981aa7..49e534a 100644
--- a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
+++ b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
@@ -85,6 +85,7 @@
         if (argumentCount == 0) {
           if (name == 'abs') return const AbsSpecializer();
           if (name == 'round') return const RoundSpecializer();
+          if (name == 'toInt') return const ToIntSpecializer();
           if (name == 'trim') return const TrimSpecializer();
         } else if (argumentCount == 1) {
           if (name == 'codeUnitAt') return const CodeUnitAtSpecializer();
@@ -108,6 +109,39 @@
   }
 }
 
+bool canBeNegativeZero(HInstruction input) {
+  bool canBePositiveZero(HInstruction input) {
+    if (input is HConstant) {
+      ConstantValue value = input.constant;
+      if (value is DoubleConstantValue && value.isZero) return true;
+      if (value is IntConstantValue && value.isZero) return true;
+      return false;
+    }
+    return true;
+  }
+
+  if (input is HConstant) {
+    ConstantValue value = input.constant;
+    if (value is DoubleConstantValue && value.isMinusZero) return true;
+    return false;
+  }
+  if (input is HAdd) {
+    // '+' can only generate -0.0 when both inputs are -0.0.
+    return canBeNegativeZero(input.left) && canBeNegativeZero(input.right);
+  }
+  if (input is HSubtract) {
+    // '-' can only generate -0.0 for inputs `-0.0` and `0`.
+    return canBeNegativeZero(input.left) && canBePositiveZero(input.right);
+  }
+  if (input is HPhi) {
+    if (input.inputs.any((phiInput) => phiInput.block.id > input.block.id)) {
+      return true; // Assume back-edge may be negative zero.
+    }
+    return input.inputs.any(canBeNegativeZero);
+  }
+  return true;
+}
+
 class IndexAssignSpecializer extends InvokeDynamicSpecializer {
   const IndexAssignSpecializer();
 
@@ -548,42 +582,10 @@
     // cannot be -0.0.  Note that -0.0 is considered to be an int, so until we
     // track -0.0 precisely, we have to syntatically filter inputs that cannot
     // generate -0.0.
-    bool canBePositiveZero(HInstruction input) {
-      if (input is HConstant) {
-        ConstantValue value = input.constant;
-        if (value is DoubleConstantValue && value.isZero) return true;
-        if (value is IntConstantValue && value.isZero) return true;
-        return false;
-      }
-      return true;
-    }
 
-    bool inPhi = false;
-    bool canBeNegativeZero(HInstruction input) {
-      if (input is HConstant) {
-        ConstantValue value = input.constant;
-        if (value is DoubleConstantValue && value.isMinusZero) return true;
-        return false;
-      }
-      if (input is HAdd) {
-        // '+' can only generate -0.0 when both inputs are -0.0.
-        return canBeNegativeZero(input.left) && canBeNegativeZero(input.right);
-      }
-      if (input is HSubtract) {
-        return canBeNegativeZero(input.left) && canBePositiveZero(input.right);
-      }
-      if (input is HPhi) {
-        if (inPhi) return true;
-        inPhi = true;
-        bool result = input.inputs.any(canBeNegativeZero);
-        inPhi = false;
-        return result;
-      }
-      return true;
-    }
-
+    HInstruction receiver = instruction.getDartReceiver(closedWorld);
     if (inputsArePositiveIntegers(instruction, closedWorld) &&
-        !canBeNegativeZero(instruction.getDartReceiver(closedWorld))) {
+        !canBeNegativeZero(receiver)) {
       return new HRemainder(instruction.inputs[1], instruction.inputs[2],
           computeTypeFromInputTypes(instruction, results, closedWorld));
     }
@@ -1434,9 +1436,7 @@
   const RoundSpecializer();
 
   @override
-  constant_system.UnaryOperation operation() {
-    return constant_system.round;
-  }
+  constant_system.UnaryOperation operation() => constant_system.round;
 
   @override
   HInstruction tryConvertToBuiltin(
@@ -1458,3 +1458,36 @@
     return null;
   }
 }
+
+class ToIntSpecializer extends InvokeDynamicSpecializer {
+  const ToIntSpecializer();
+
+  @override
+  constant_system.UnaryOperation operation() => constant_system.toInt;
+
+  @override
+  HInstruction tryConvertToBuiltin(
+      HInvokeDynamic instruction,
+      HGraph graph,
+      GlobalTypeInferenceResults results,
+      JCommonElements commonElements,
+      JClosedWorld closedWorld,
+      OptimizationTestLog log) {
+    HInstruction receiver = instruction.getDartReceiver(closedWorld);
+
+    // We would like to reduce `x.toInt()` to `x`. The web platform considers
+    // infinities to be `int` values, but it is too hard to tell if an input is
+    // a finite integral value. Further `(-0.0).toInt()` returns `0`, so
+    // `toInt()` is not strictly an identity on finite integral values.
+
+    if (receiver
+        .isNumberOrNull(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
+      // Even if there is no builtin equivalent instruction, we know the
+      // instruction does not have any side effect, and that it can be GVN'ed.
+      clearAllSideEffects(instruction);
+      log?.registerToInt(instruction);
+    }
+    return null;
+  }
+}
diff --git a/pkg/compiler/lib/src/ssa/logging.dart b/pkg/compiler/lib/src/ssa/logging.dart
index c60de58..e857648 100644
--- a/pkg/compiler/lib/src/ssa/logging.dart
+++ b/pkg/compiler/lib/src/ssa/logging.dart
@@ -231,6 +231,10 @@
     _registerSpecializer(original, null, null, 'Round');
   }
 
+  void registerToInt(HInvokeDynamic original) {
+    _registerSpecializer(original, null, null, 'ToInt');
+  }
+
   void registerPrimitiveCheck(HInstruction original, HPrimitiveCheck check) {
     Features features = new Features();
 
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index 86310fe..9e5cdc5 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -4054,7 +4054,7 @@
 /// depend on type variables and complex types.
 class HIsTest extends HInstruction {
   final AbstractValueWithPrecision checkedAbstractValue;
-  final DartType dartType;
+  DartType dartType;
 
   HIsTest(this.dartType, this.checkedAbstractValue, HInstruction checked,
       HInstruction rti, AbstractValue type)
@@ -4066,9 +4066,9 @@
   HInstruction get typeInput => inputs[0];
   HInstruction get checkedInput => inputs[1];
 
-  AbstractBool evaluate(JClosedWorld closedWorld, bool useNullSafety) =>
-      _isTestResult(checkedInput, dartType, checkedAbstractValue, closedWorld,
-          useNullSafety);
+  AbstractBool evaluate(JClosedWorld closedWorld, {bool useNullSafety}) =>
+      _typeTest(checkedInput, dartType, checkedAbstractValue, closedWorld,
+          isCast: false, useNullSafety: useNullSafety);
 
   @override
   accept(HVisitor visitor) => visitor.visitIsTest(this);
@@ -4101,9 +4101,9 @@
 
   HInstruction get checkedInput => inputs[0];
 
-  AbstractBool evaluate(JClosedWorld closedWorld, bool useNullSafety) =>
-      _isTestResult(checkedInput, dartType, checkedAbstractValue, closedWorld,
-          useNullSafety);
+  AbstractBool evaluate(JClosedWorld closedWorld, {bool useNullSafety}) =>
+      _typeTest(checkedInput, dartType, checkedAbstractValue, closedWorld,
+          isCast: false, useNullSafety: useNullSafety);
 
   @override
   accept(HVisitor visitor) => visitor.visitIsTestSimple(this);
@@ -4121,35 +4121,36 @@
   String toString() => 'HIsTestSimple()';
 }
 
-AbstractBool _isTestResult(
-    HInstruction expression,
-    DartType dartType,
-    AbstractValueWithPrecision checkedAbstractValue,
-    JClosedWorld closedWorld,
-    bool useNullSafety) {
+AbstractBool _typeTest(HInstruction expression, DartType dartType,
+    AbstractValueWithPrecision checkedAbstractValue, JClosedWorld closedWorld,
+    {bool isCast, bool useNullSafety}) {
   AbstractValueDomain abstractValueDomain = closedWorld.abstractValueDomain;
   AbstractValue subsetType = expression.instructionType;
   AbstractValue supersetType = checkedAbstractValue.abstractValue;
+  AbstractBool expressionIsNull = expression.isNull(abstractValueDomain);
 
-  if (useNullSafety &&
-      expression.isNull(abstractValueDomain).isDefinitelyTrue) {
-    if (dartType.isObject) return AbstractBool.False;
-    if (closedWorld.dartTypes.isTopType(dartType) ||
-        dartType is NullableType ||
-        dartType.isNull) {
-      return AbstractBool.True;
-    }
-    if (dartType is TypeVariableType || dartType is FunctionTypeVariable) {
-      return AbstractBool.Maybe;
-    }
-    if (dartType is LegacyType) {
-      DartType baseType = dartType.baseType;
-      if (baseType is NeverType) return AbstractBool.True;
-      if (baseType is TypeVariableType || baseType is FunctionTypeVariable) {
+  if (!isCast && useNullSafety) {
+    if (expressionIsNull.isDefinitelyTrue) {
+      if (dartType.isObject) return AbstractBool.False;
+      if (closedWorld.dartTypes.isTopType(dartType) ||
+          dartType is NullableType ||
+          dartType.isNull) {
+        return AbstractBool.True;
+      }
+      if (dartType is TypeVariableType || dartType is FunctionTypeVariable) {
         return AbstractBool.Maybe;
       }
+      if (dartType is LegacyType) {
+        DartType baseType = dartType.baseType;
+        if (baseType is NeverType) return AbstractBool.True;
+        if (baseType is TypeVariableType || baseType is FunctionTypeVariable) {
+          return AbstractBool.Maybe;
+        }
+      }
+      return AbstractBool.False;
+    } else if (expressionIsNull.isPotentiallyTrue) {
+      if (dartType.isObject) return AbstractBool.Maybe;
     }
-    return AbstractBool.False;
   }
 
   if (checkedAbstractValue.isPrecise &&
@@ -4230,7 +4231,7 @@
 /// Type cast or type check using Rti form of type expression.
 class HAsCheck extends HCheck {
   final AbstractValueWithPrecision checkedType;
-  final DartType checkedTypeExpression;
+  DartType checkedTypeExpression;
   final bool isTypeError;
 
   HAsCheck(
@@ -4265,14 +4266,10 @@
     return isTypeError == other.isTypeError;
   }
 
-  bool isRedundant(JClosedWorld closedWorld) {
-    if (!checkedType.isPrecise) return false;
-    AbstractValueDomain abstractValueDomain = closedWorld.abstractValueDomain;
-    AbstractValue inputType = checkedInput.instructionType;
-    return abstractValueDomain
-        .isIn(inputType, checkedType.abstractValue)
-        .isDefinitelyTrue;
-  }
+  bool isRedundant(JClosedWorld closedWorld, {bool useNullSafety}) =>
+      _typeTest(checkedInput, checkedTypeExpression, checkedType, closedWorld,
+              isCast: true, useNullSafety: useNullSafety)
+          .isDefinitelyTrue;
 
   @override
   String toString() {
@@ -4303,14 +4300,10 @@
   @override
   accept(HVisitor visitor) => visitor.visitAsCheckSimple(this);
 
-  bool isRedundant(JClosedWorld closedWorld) {
-    if (!checkedType.isPrecise) return false;
-    AbstractValueDomain abstractValueDomain = closedWorld.abstractValueDomain;
-    AbstractValue inputType = checkedInput.instructionType;
-    return abstractValueDomain
-        .isIn(inputType, checkedType.abstractValue)
-        .isDefinitelyTrue;
-  }
+  bool isRedundant(JClosedWorld closedWorld, {bool useNullSafety}) =>
+      _typeTest(checkedInput, dartType, checkedType, closedWorld,
+              isCast: true, useNullSafety: useNullSafety)
+          .isDefinitelyTrue;
 
   @override
   int typeCode() => HInstruction.AS_CHECK_SIMPLE_TYPECODE;
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index e21dd7d..9ff7388 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -1845,37 +1845,54 @@
     // TODO(fishythefish): Correctly constant fold `null as T` (also in
     // [visitAsCheckSimple]) when running with strong NNBD. We might get this
     // for free if nullability is precisely propagated to the typemasks.
-    if (node.isRedundant(_closedWorld)) return node.checkedInput;
 
-    // See if this check can be lowered to a simple one.
     HInstruction typeInput = node.typeInput;
     if (typeInput is HLoadType) {
       TypeExpressionRecipe recipe = typeInput.typeExpression;
-      DartType dartType = recipe.type;
-      MemberEntity specializedCheck = SpecializedChecks.findAsCheck(
-          dartType, _closedWorld.commonElements, _options.useLegacySubtyping);
-      if (specializedCheck != null) {
-        AbstractValueWithPrecision checkedType =
-            _abstractValueDomain.createFromStaticType(dartType, nullable: true);
-        return HAsCheckSimple(node.checkedInput, dartType, checkedType,
-            node.isTypeError, specializedCheck, node.instructionType);
-      }
-      if (_closedWorld.dartTypes.isTopType(dartType)) {
-        return node.checkedInput;
-      }
+      node.checkedTypeExpression = recipe.type;
+    }
+
+    if (node.isRedundant(_closedWorld, useNullSafety: _options.useNullSafety)) {
+      return node.checkedInput;
+    }
+
+    // See if this check can be lowered to a simple one.
+    MemberEntity specializedCheck = SpecializedChecks.findAsCheck(
+        node.checkedTypeExpression,
+        _closedWorld.commonElements,
+        _options.useLegacySubtyping);
+    if (specializedCheck != null) {
+      AbstractValueWithPrecision checkedType = _abstractValueDomain
+          .createFromStaticType(node.checkedTypeExpression, nullable: true);
+      return HAsCheckSimple(
+          node.checkedInput,
+          node.checkedTypeExpression,
+          checkedType,
+          node.isTypeError,
+          specializedCheck,
+          node.instructionType);
     }
     return node;
   }
 
   @override
   HInstruction visitAsCheckSimple(HAsCheckSimple node) {
-    if (node.isRedundant(_closedWorld)) return node.checkedInput;
+    if (node.isRedundant(_closedWorld, useNullSafety: _options.useNullSafety)) {
+      return node.checkedInput;
+    }
     return node;
   }
 
   @override
   HInstruction visitIsTest(HIsTest node) {
-    AbstractBool result = node.evaluate(_closedWorld, _options.useNullSafety);
+    HInstruction typeInput = node.typeInput;
+    if (typeInput is HLoadType) {
+      TypeExpressionRecipe recipe = typeInput.typeExpression;
+      node.dartType = recipe.type;
+    }
+
+    AbstractBool result =
+        node.evaluate(_closedWorld, useNullSafety: _options.useNullSafety);
     if (result.isDefinitelyFalse) {
       return _graph.addConstantBool(false, _closedWorld);
     }
@@ -1883,36 +1900,25 @@
       return _graph.addConstantBool(true, _closedWorld);
     }
 
-    HInstruction typeInput = node.typeInput;
-    if (typeInput is HLoadType) {
-      TypeExpressionRecipe recipe = typeInput.typeExpression;
-      DartType dartType = recipe.type;
-      if (_closedWorld.dartTypes.isTopType(dartType)) {
-        return _graph.addConstantBool(true, _closedWorld);
-      }
+    IsTestSpecialization specialization =
+        SpecializedChecks.findIsTestSpecialization(
+            node.dartType, _graph, _closedWorld);
 
-      IsTestSpecialization specialization =
-          SpecializedChecks.findIsTestSpecialization(
-              dartType, _graph, _closedWorld);
+    if (specialization == IsTestSpecialization.isNull ||
+        specialization == IsTestSpecialization.notNull) {
+      HInstruction nullTest = HIdentity(node.checkedInput,
+          _graph.addConstantNull(_closedWorld), _abstractValueDomain.boolType);
+      if (specialization == IsTestSpecialization.isNull) return nullTest;
+      nullTest.sourceInformation = node.sourceInformation;
+      node.block.addBefore(node, nullTest);
+      return HNot(nullTest, _abstractValueDomain.boolType);
+    }
 
-      if (specialization == IsTestSpecialization.isNull ||
-          specialization == IsTestSpecialization.notNull) {
-        HInstruction nullTest = HIdentity(
-            node.checkedInput,
-            _graph.addConstantNull(_closedWorld),
-            _abstractValueDomain.boolType);
-        if (specialization == IsTestSpecialization.isNull) return nullTest;
-        nullTest.sourceInformation = node.sourceInformation;
-        node.block.addBefore(node, nullTest);
-        return HNot(nullTest, _abstractValueDomain.boolType);
-      }
-
-      if (specialization != null) {
-        AbstractValueWithPrecision checkedType = _abstractValueDomain
-            .createFromStaticType(dartType, nullable: false);
-        return HIsTestSimple(dartType, checkedType, specialization,
-            node.checkedInput, _abstractValueDomain.boolType);
-      }
+    if (specialization != null) {
+      AbstractValueWithPrecision checkedType = _abstractValueDomain
+          .createFromStaticType(node.dartType, nullable: false);
+      return HIsTestSimple(node.dartType, checkedType, specialization,
+          node.checkedInput, _abstractValueDomain.boolType);
     }
 
     // TODO(fishythefish): Prune now-unneeded is-tests from the metadata.
@@ -1922,7 +1928,8 @@
 
   @override
   HInstruction visitIsTestSimple(HIsTestSimple node) {
-    AbstractBool result = node.evaluate(_closedWorld, _options.useNullSafety);
+    AbstractBool result =
+        node.evaluate(_closedWorld, useNullSafety: _options.useNullSafety);
     if (result.isDefinitelyFalse) {
       return _graph.addConstantBool(false, _closedWorld);
     }
diff --git a/pkg/compiler/lib/src/ssa/type_builder.dart b/pkg/compiler/lib/src/ssa/type_builder.dart
index 5e5d2b9..7a176fa 100644
--- a/pkg/compiler/lib/src/ssa/type_builder.dart
+++ b/pkg/compiler/lib/src/ssa/type_builder.dart
@@ -129,12 +129,20 @@
     CheckPolicy parameterCheckPolicy = builder.closedWorld.annotationsData
         .getParameterCheckPolicy(memberContext);
 
-    /// Dart semantics check against null outside the method definition,
-    /// however dart2js moves the null check to the callee for performance
-    /// reasons. As a result the body cannot trust or check that the type is not
-    /// nullable.
-    if (builder.options.useNullSafety && memberContext.name == '==') {
-      type = _closedWorld.dartTypes.nullableType(type);
+    if (memberContext.name == '==') {
+      // Dart semantics for `a == b` check `a` and `b` against `null` outside
+      // the method invocation. For code size reasons, dart2js implements the
+      // null check on `a` by implementing `JSNull.==`, and the null check on
+      // `b` by injecting the check into `==` methods, before any type checks.
+      //
+      // There are a small number of runtime library methods that do not have
+      // the check injected. For these we need to widen the argument type to
+      // avoid generating code that rejects `null`. In practice these are always
+      // widened to TOP.
+      if (_closedWorld.commonElements
+          .operatorEqHandlesNullArgument(memberContext)) {
+        type = _closedWorld.dartTypes.nullableType(type);
+      }
     }
     if (parameterCheckPolicy.isTrusted) {
       checkedOrTrusted = _trustType(original, type);
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
index d58a3b0..21cc9f2 100644
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
@@ -67,6 +67,8 @@
   // TODO(johnniwinther): Improve semantic precision.
   Iterable<ClassEntity> get directlyInstantiatedClasses;
 
+  Iterable<ClassEntity> get constructorReferences;
+
   /// All directly or indirectly instantiated classes.
   Iterable<ClassEntity> get instantiatedClasses;
 
@@ -108,60 +110,53 @@
   /// Invariant: Elements are declaration elements.
   // TODO(johnniwinther): [_directlyInstantiatedClasses] and
   // [_instantiatedTypes] sets should be merged.
-  final Set<ClassEntity> _directlyInstantiatedClasses = new Set<ClassEntity>();
+  final Set<ClassEntity> _directlyInstantiatedClasses = {};
 
   /// The set of all directly instantiated types, that is, the types of the
   /// directly instantiated classes.
   ///
   /// See [_directlyInstantiatedClasses].
-  final Set<InterfaceType> _instantiatedTypes = new Set<InterfaceType>();
+  final Set<InterfaceType> _instantiatedTypes = {};
 
   /// Classes implemented by directly instantiated classes.
-  final Set<ClassEntity> _implementedClasses = new Set<ClassEntity>();
+  final Set<ClassEntity> _implementedClasses = {};
 
-  final Map<String, Map<Selector, SelectorConstraints>> _invokedNames =
-      <String, Map<Selector, SelectorConstraints>>{};
-  final Map<String, Map<Selector, SelectorConstraints>> _invokedGetters =
-      <String, Map<Selector, SelectorConstraints>>{};
-  final Map<String, Map<Selector, SelectorConstraints>> _invokedSetters =
-      <String, Map<Selector, SelectorConstraints>>{};
+  final Map<String, Map<Selector, SelectorConstraints>> _invokedNames = {};
+  final Map<String, Map<Selector, SelectorConstraints>> _invokedGetters = {};
+  final Map<String, Map<Selector, SelectorConstraints>> _invokedSetters = {};
 
-  final Map<ClassEntity, ClassUsage> _processedClasses =
-      <ClassEntity, ClassUsage>{};
+  final Map<ClassEntity, ClassUsage> _processedClasses = {};
 
   Map<ClassEntity, ClassUsage> get classUsageForTesting => _processedClasses;
 
   /// Map of registered usage of static and instance members.
-  final Map<MemberEntity, MemberUsage> _memberUsage =
-      <MemberEntity, MemberUsage>{};
+  final Map<MemberEntity, MemberUsage> _memberUsage = {};
 
   /// Map containing instance members of live classes that have not yet been
   /// fully invoked dynamically.
   ///
   /// A method is fully invoked if all is optional parameter have been passed
   /// in some invocation.
-  final Map<String, Set<MemberUsage>> _invokableInstanceMembersByName =
-      <String, Set<MemberUsage>>{};
+  final Map<String, Set<MemberUsage>> _invokableInstanceMembersByName = {};
 
   /// Map containing instance members of live classes that have not yet been
   /// read from dynamically.
-  final Map<String, Set<MemberUsage>> _readableInstanceMembersByName =
-      <String, Set<MemberUsage>>{};
+  final Map<String, Set<MemberUsage>> _readableInstanceMembersByName = {};
 
   /// Map containing instance members of live classes that have not yet been
   /// written to dynamically.
-  final Map<String, Set<MemberUsage>> _writableInstanceMembersByName =
-      <String, Set<MemberUsage>>{};
+  final Map<String, Set<MemberUsage>> _writableInstanceMembersByName = {};
 
-  final Set<DartType> _isChecks = new Set<DartType>();
+  final Set<DartType> _isChecks = {};
 
   final SelectorConstraintsStrategy _selectorConstraintsStrategy;
 
-  final Set<ConstantValue> _constantValues = new Set<ConstantValue>();
+  final Set<ConstantValue> _constantValues = {};
 
-  final Set<DartType> _constTypeLiterals = new Set<DartType>();
-  final Set<DartType> _liveTypeArguments = new Set<DartType>();
+  final Set<DartType> _constTypeLiterals = {};
+  final Set<DartType> _liveTypeArguments = {};
   final Set<TypeVariableType> _namedTypeVariablesNewRti = {};
+  final Set<ClassEntity> _constructorReferences = {};
 
   CodegenWorldBuilderImpl(this._closedWorld, this._selectorConstraintsStrategy,
       this._oneShotInterceptorData);
@@ -226,18 +221,18 @@
 
   Iterable<CallStructure> _getMatchingCallStructures(
       Map<Selector, SelectorConstraints> selectors, MemberEntity member) {
-    if (selectors == null) return const <CallStructure>[];
+    if (selectors == null) return const [];
     Set<CallStructure> callStructures;
     for (Selector selector in selectors.keys) {
       if (selector.appliesUnnamed(member)) {
         SelectorConstraints masks = selectors[selector];
         if (masks.canHit(member, selector.memberName, _closedWorld)) {
-          callStructures ??= new Set<CallStructure>();
+          callStructures ??= {};
           callStructures.add(selector.callStructure);
         }
       }
     }
-    return callStructures ?? const <CallStructure>[];
+    return callStructures ?? const [];
   }
 
   Iterable<CallStructure> _getInvocationCallStructures(MemberEntity member) {
@@ -312,7 +307,7 @@
     String name = selector.name;
     Object constraint = dynamicUse.receiverConstraint;
     Map<Selector, SelectorConstraints> selectors =
-        selectorMap[name] ??= new Maplet<Selector, SelectorConstraints>();
+        selectorMap[name] ??= Maplet<Selector, SelectorConstraints>();
     UniverseSelectorConstraints constraints = selectors[selector];
     if (constraints == null) {
       selectors[selector] = _selectorConstraintsStrategy
@@ -332,7 +327,7 @@
 
   void registerStaticUse(StaticUse staticUse, MemberUsedCallback memberUsed) {
     MemberEntity element = staticUse.element;
-    EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
+    EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
     MemberUsage usage = _getMemberUsage(element, useSet);
     switch (staticUse.kind) {
       case StaticUseKind.STATIC_TEAR_OFF:
@@ -395,7 +390,7 @@
             usage.invoke(Accesses.staticAccess, staticUse.callStructure));
         if (staticUse.typeArguments?.isNotEmpty ?? false) {
           registerDynamicInvocation(
-              new Selector.call(member.memberName, staticUse.callStructure),
+              Selector.call(member.memberName, staticUse.callStructure),
               staticUse.typeArguments);
         }
         break;
@@ -425,11 +420,11 @@
       ClassEntity cls, MemberEntity member, MemberUsedCallback memberUsed,
       {bool checkEnqueuerConsistency: false}) {
     if (!member.isInstanceMember) return;
-    EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
+    EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
     MemberUsage usage = _getMemberUsage(member, useSet);
     if (useSet.isNotEmpty) {
       if (checkEnqueuerConsistency) {
-        throw new SpannableAssertionFailure(member,
+        throw SpannableAssertionFailure(member,
             'Unenqueued usage of $member: \nbefore: <none>\nafter : $usage');
       } else {
         memberUsed(member, useSet);
@@ -449,7 +444,7 @@
         String memberName = member.name;
         ClassEntity cls = member.enclosingClass;
         bool isNative = _nativeBasicData.isNativeClass(cls);
-        usage = new MemberUsage(member, potentialAccess: potentialAccess);
+        usage = MemberUsage(member, potentialAccess: potentialAccess);
         if (member.isField && !isNative) {
           useSet.addAll(usage.init());
         }
@@ -496,7 +491,7 @@
           }
         }
       } else {
-        usage = new MemberUsage(member, potentialAccess: potentialAccess);
+        usage = MemberUsage(member, potentialAccess: potentialAccess);
         if (member.isField) {
           useSet.addAll(usage.init());
         }
@@ -519,8 +514,8 @@
     // [f] might add elements to [: map[memberName] :] during the loop below
     // so we create a new list for [: map[memberName] :] and prepend the
     // [remaining] members after the loop.
-    map[memberName] = new Set<MemberUsage>();
-    Set<MemberUsage> remaining = new Set<MemberUsage>();
+    map[memberName] = {};
+    Set<MemberUsage> remaining = {};
     for (MemberUsage member in members) {
       if (!f(member)) remaining.add(member);
     }
@@ -529,7 +524,7 @@
 
   /// Return the canonical [ClassUsage] for [cls].
   ClassUsage _getClassUsage(ClassEntity cls) {
-    return _processedClasses.putIfAbsent(cls, () => new ClassUsage(cls));
+    return _processedClasses.putIfAbsent(cls, () => ClassUsage(cls));
   }
 
   void _processInstantiatedClass(ClassEntity cls, ClassUsedCallback classUsed) {
@@ -551,7 +546,7 @@
   }
 
   /// Set of all registered compiled constants.
-  final Set<ConstantValue> _compiledConstants = new Set<ConstantValue>();
+  final Set<ConstantValue> _compiledConstants = {};
 
   Iterable<ConstantValue> get compiledConstantsForTesting => _compiledConstants;
 
@@ -575,6 +570,10 @@
     _liveTypeArguments.add(type);
   }
 
+  void registerConstructorReference(InterfaceType type) {
+    _constructorReferences.add(type.element);
+  }
+
   @override
   CodegenWorld close() {
     Map<MemberEntity, MemberUsage> liveMemberUsage = {};
@@ -583,8 +582,9 @@
         liveMemberUsage[member] = usage;
       }
     });
-    return new CodegenWorldImpl(_closedWorld, liveMemberUsage,
+    return CodegenWorldImpl(_closedWorld, liveMemberUsage,
         constTypeLiterals: _constTypeLiterals,
+        constructorReferences: _constructorReferences,
         directlyInstantiatedClasses: directlyInstantiatedClasses,
         typeVariableTypeLiterals: typeVariableTypeLiterals,
         instantiatedClasses: instantiatedClasses,
@@ -611,6 +611,9 @@
   final Iterable<DartType> constTypeLiterals;
 
   @override
+  final Iterable<ClassEntity> constructorReferences;
+
+  @override
   final Iterable<ClassEntity> directlyInstantiatedClasses;
 
   @override
@@ -648,6 +651,7 @@
 
   CodegenWorldImpl(this._closedWorld, this._liveMemberUsage,
       {this.constTypeLiterals,
+      this.constructorReferences,
       this.directlyInstantiatedClasses,
       this.typeVariableTypeLiterals,
       this.instantiatedClasses,
@@ -728,7 +732,7 @@
   @override
   Iterable<FunctionEntity> get userNoSuchMethods {
     if (_userNoSuchMethodsCache == null) {
-      _userNoSuchMethodsCache = <FunctionEntity>[];
+      _userNoSuchMethodsCache = [];
 
       _liveMemberUsage.forEach((MemberEntity member, MemberUsage memberUsage) {
         if (member is FunctionEntity) {
@@ -862,7 +866,7 @@
   Map<Selector, SelectorConstraints> _asUnmodifiable(
       Map<Selector, SelectorConstraints> map) {
     if (map == null) return null;
-    return new UnmodifiableMapView(map);
+    return UnmodifiableMapView(map);
   }
 
   @override
@@ -884,8 +888,8 @@
   Iterable<ConstantValue> getConstantsForEmission(
       [Comparator<ConstantValue> preSortCompare]) {
     // We must emit dependencies before their uses.
-    Set<ConstantValue> seenConstants = new Set<ConstantValue>();
-    List<ConstantValue> result = new List<ConstantValue>();
+    Set<ConstantValue> seenConstants = {};
+    List<ConstantValue> result = [];
 
     void addConstant(ConstantValue constant) {
       if (!seenConstants.contains(constant)) {
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index cfc28bd..e103bcd 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -53,6 +53,13 @@
         "${_typeArguments?.length ?? 0} were passed.");
   }
 
+  DynamicUse withReceiverConstraint(Object otherReceiverConstraint) {
+    if (otherReceiverConstraint == receiverConstraint) {
+      return this;
+    }
+    return DynamicUse(selector, otherReceiverConstraint, _typeArguments);
+  }
+
   factory DynamicUse.readFromDataSource(DataSource source) {
     source.begin(tag);
     Selector selector = Selector.readFromDataSource(source);
@@ -698,6 +705,7 @@
   INSTANTIATION,
   NATIVE_INSTANTIATION,
   CONST_INSTANTIATION,
+  CONSTRUCTOR_REFERENCE,
   IMPLICIT_CAST,
   PARAMETER_CHECK,
   RTI_VALUE,
@@ -760,6 +768,9 @@
       case TypeUseKind.CONST_INSTANTIATION:
         sb.write('const:');
         break;
+      case TypeUseKind.CONSTRUCTOR_REFERENCE:
+        sb.write('constructor:');
+        break;
       case TypeUseKind.NATIVE_INSTANTIATION:
         sb.write('native:');
         break;
@@ -851,11 +862,9 @@
     return new TypeUse.internal(type, TypeUseKind.RTI_VALUE);
   }
 
-  /// [type] used in a `instanceof` check.
-  factory TypeUse.instanceConstructor(DartType type) {
-    // TODO(johnniwinther,sra): Use a separate use kind if constructors is no
-    // longer used for RTI.
-    return new TypeUse.internal(type, TypeUseKind.RTI_VALUE);
+  /// [type] constructor used, for example in a `instanceof` check.
+  factory TypeUse.constructorReference(DartType type) {
+    return new TypeUse.internal(type, TypeUseKind.CONSTRUCTOR_REFERENCE);
   }
 
   /// [type] used directly as a type argument.
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 5032a42..fc7f564 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -176,6 +176,15 @@
   bool fieldNeverChanges(MemberEntity element);
 
   /// Returns `true` if [selector] on [receiver] can hit a `call` method on a
+  /// subclass of `Closure` using the [abstractValueDomain].
+  ///
+  /// Every implementation of `Closure` has a 'call' method with its own
+  /// signature so it cannot be modelled by a [FunctionEntity]. Also,
+  /// call-methods for tear-off are not part of the element model.
+  bool includesClosureCallInDomain(Selector selector, AbstractValue receiver,
+      AbstractValueDomain abstractValueDomain);
+
+  /// Returns `true` if [selector] on [receiver] can hit a `call` method on a
   /// subclass of `Closure`.
   ///
   /// Every implementation of `Closure` has a 'call' method with its own
@@ -193,6 +202,13 @@
   AbstractValue computeReceiverType(Selector selector, AbstractValue receiver);
 
   /// Returns all the instance members that may be invoked with the [selector]
+  /// on the given [receiver] using the [abstractValueDomain]. The returned elements may include noSuchMethod
+  /// handlers that are potential targets indirectly through the noSuchMethod
+  /// mechanism.
+  Iterable<MemberEntity> locateMembersInDomain(Selector selector,
+      AbstractValue receiver, AbstractValueDomain abstractValueDomain);
+
+  /// Returns all the instance members that may be invoked with the [selector]
   /// on the given [receiver]. The returned elements may include noSuchMethod
   /// handlers that are potential targets indirectly through the noSuchMethod
   /// mechanism.
diff --git a/pkg/compiler/test/analyses/dart2js_allowed.json b/pkg/compiler/test/analyses/dart2js_allowed.json
index c916d07..1096f17 100644
--- a/pkg/compiler/test/analyses/dart2js_allowed.json
+++ b/pkg/compiler/test/analyses/dart2js_allowed.json
@@ -219,10 +219,7 @@
   "pkg/compiler/lib/src/inferrer/type_graph_nodes.dart": {
     "Dynamic invocation of 'add'.": 1,
     "Dynamic invocation of 'remove'.": 1,
-    "Dynamic access of 'type'.": 4,
-    "Dynamic invocation of 'containsOnlyInt'.": 1,
-    "Dynamic access of 'isEmpty'.": 1,
-    "Dynamic invocation of 'satisfies'.": 2
+    "Dynamic access of 'type'.": 4
   },
   "pkg/compiler/lib/src/inferrer/locals_handler.dart": {
     "Dynamic access of 'isEmpty'.": 1,
diff --git a/pkg/compiler/test/codegen/expect_annotations_test.dart b/pkg/compiler/test/codegen/expect_annotations_test.dart
index f25bec8..5fc56d7 100644
--- a/pkg/compiler/test/codegen/expect_annotations_test.dart
+++ b/pkg/compiler/test/codegen/expect_annotations_test.dart
@@ -9,6 +9,7 @@
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/inferrer/abstract_value_domain.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import 'package:compiler/src/inferrer/types.dart';
 import 'package:compiler/src/world.dart' show JClosedWorld;
@@ -46,6 +47,7 @@
       memorySourceFiles: MEMORY_SOURCE_FILES, options: [Flags.testMode]);
   Compiler compiler = result.compiler;
   JClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
+  AbstractValueDomain commonMasks = closedWorld.abstractValueDomain;
   Expect.isFalse(compiler.compilationFailed, 'Unsuccessful compilation');
 
   void testTypeMatch(FunctionEntity function, TypeMask expectedParameterType,
@@ -54,12 +56,12 @@
         closedWorld.globalLocalsMap, function, (Local parameter) {
       TypeMask type = results.resultOfParameter(parameter);
       Expect.equals(
-          expectedParameterType, simplify(type, closedWorld), "$parameter");
+          expectedParameterType, simplify(type, commonMasks), "$parameter");
     });
     if (expectedReturnType != null) {
       TypeMask type = results.resultOfMember(function).returnType;
       Expect.equals(
-          expectedReturnType, simplify(type, closedWorld), "$function");
+          expectedReturnType, simplify(type, commonMasks), "$function");
     }
   }
 
diff --git a/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/lib.dart b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/lib.dart
new file mode 100644
index 0000000..f920e6b
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/lib.dart
@@ -0,0 +1,96 @@
+// 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.7
+
+/*member: a:OutputUnit(1, {lib})*/
+a() => print("123");
+
+/*member: b:OutputUnit(1, {lib})*/
+b() => print("123");
+
+/*member: c:OutputUnit(1, {lib})*/
+c() => print("123");
+
+/*member: d:OutputUnit(1, {lib})*/
+d() => print("123");
+
+/*class: B:OutputUnit(1, {lib})*/
+class B {
+  /*member: B.:OutputUnit(1, {lib})*/
+  B() {
+    b();
+  }
+}
+
+/*class: B2:OutputUnit(1, {lib})*/
+/*member: B2.:OutputUnit(1, {lib})*/
+class B2 extends B {
+  // No constructor creates a synthetic constructor that has an implicit
+  // super-call.
+}
+
+/*class: A:OutputUnit(1, {lib})*/
+class A {
+  /*member: A.:OutputUnit(1, {lib})*/
+  A() {
+    a();
+  }
+}
+
+/*class: A2:OutputUnit(1, {lib})*/
+class A2 extends A {
+  // Implicit super call.
+  /*member: A2.:OutputUnit(1, {lib})*/
+  A2();
+}
+
+/*class: C1:OutputUnit(1, {lib})*/
+class C1 {}
+
+/*class: C2:OutputUnit(1, {lib})*/
+class C2 {
+  /*member: C2.:OutputUnit(1, {lib})*/
+  C2() {
+    c();
+  }
+}
+
+/*class: C2p:null*/
+class C2p {
+  C2() {
+    c();
+  }
+}
+
+/*class: C3:OutputUnit(1, {lib})*/
+/*member: C3.:OutputUnit(1, {lib})*/
+class C3 extends C2 with C1 {
+  // Implicit redirecting "super" call via mixin.
+}
+
+/*class: E:OutputUnit(1, {lib})*/
+class E {}
+
+/*class: F:OutputUnit(1, {lib})*/
+class F {}
+
+/*class: G:OutputUnit(1, {lib})*/
+/*member: G.:OutputUnit(1, {lib})*/
+class G extends C3 with C1, E, F {}
+
+/*class: D1:OutputUnit(1, {lib})*/
+class D1 {}
+
+/*class: D2:OutputUnit(1, {lib})*/
+class D2 {
+  /*member: D2.:OutputUnit(1, {lib})*/
+  D2(x) {
+    d();
+  }
+}
+
+// Implicit redirecting "super" call with a parameter via mixin.
+/*class: D3:OutputUnit(1, {lib})*/
+class D3 = D2 with D1;
diff --git a/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart
new file mode 100644
index 0000000..fe41fa5
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.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.
+
+// @dart = 2.7
+
+import "lib.dart" deferred as lib;
+
+/*member: main:OutputUnit(main, {})*/
+void main() {
+  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+    new lib.A2();
+    new lib.B2();
+    new lib.C3();
+    new lib.D3(10);
+    new lib.G();
+  });
+}
diff --git a/pkg/compiler/test/deferred_loading/data/inteface_type_variable/lib.dart b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/lib.dart
new file mode 100644
index 0000000..97e8353
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/lib.dart
@@ -0,0 +1,41 @@
+// 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.7
+
+/*class: A:OutputUnit(1, {lib})*/
+/*member: A.:OutputUnit(1, {lib})*/
+class A {}
+
+/*class: I:OutputUnit(1, {lib})*/
+class I<T> {}
+
+/*class: J:OutputUnit(1, {lib})*/
+/*member: J.:OutputUnit(1, {lib})*/
+class J<T> {}
+
+// C needs to include "N", otherwise checking for `is I<A>` will likely cause
+// problems
+/*class: C:OutputUnit(1, {lib})*/
+/*member: C.:OutputUnit(1, {lib})*/
+class C extends A implements I<N> {}
+
+/*class: C1:OutputUnit(1, {lib})*/
+/*member: C1.:OutputUnit(1, {lib})*/
+class C1 extends J<M> implements A {}
+
+/*class: C2:OutputUnit(1, {lib})*/
+/*member: C2.:OutputUnit(1, {lib})*/
+class C2 extends J<M> implements I<N> {}
+
+/*class: N:OutputUnit(1, {lib})*/
+class N extends A {}
+
+/*class: M:OutputUnit(1, {lib})*/
+class M extends A {}
+
+/*member: doCheck1:OutputUnit(1, {lib})*/
+doCheck1(x) => x is I<A>;
+/*member: doCheck2:OutputUnit(1, {lib})*/
+doCheck2(x) => x is J<A>;
diff --git a/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart
new file mode 100644
index 0000000..d9075e9
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart
@@ -0,0 +1,28 @@
+// 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.7
+
+import 'lib.dart' deferred as lib;
+
+/// Regression test: if a type variable is used, but not instantiated, it still
+/// needs to be mapped to the deferred unit where it is used.
+///
+/// If not, we may include it in the main unit and may not see that the base
+/// class is not added to the main unit.
+/*member: main:OutputUnit(main, {})*/
+main() {
+  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+    lib.doCheck1(dontInline(new lib.C()));
+    lib.doCheck1(dontInline(new lib.C1()));
+    lib.doCheck1(dontInline(new lib.C2()));
+    lib.doCheck2(dontInline(new lib.C()));
+    lib.doCheck2(dontInline(new lib.C1()));
+    lib.doCheck2(dontInline(new lib.C2()));
+  });
+}
+
+@pragma('dart2js:noInline')
+/*member: dontInline:OutputUnit(main, {})*/
+dontInline(x) => x;
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/lib.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/lib.dart
new file mode 100644
index 0000000..f8a57c2
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/lib.dart
@@ -0,0 +1,86 @@
+// 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.7
+
+/*class: Foo:OutputUnit(1, {libA, libB, libC})*/
+class Foo {
+  /*member: Foo.x:OutputUnit(1, {libA, libB, libC})*/
+  int x;
+  /*member: Foo.:OutputUnit(3, {libB})*/
+  Foo() {
+    x = DateTime.now().millisecond;
+  }
+  /*member: Foo.method:OutputUnit(1, {libA, libB, libC})*/
+  int method() => x;
+}
+
+/*member: isFoo:OutputUnit(1, {libA, libB, libC})*/
+bool isFoo(o) {
+  return o is Foo;
+}
+
+/*member: callFooMethod:OutputUnit(3, {libB})*/
+int callFooMethod() {
+  return Foo().method();
+}
+
+typedef int FunFoo(Foo a);
+typedef int FunFunFoo(FunFoo b, int c);
+
+/*member: isFunFunFoo:OutputUnit(1, {libA, libB, libC})*/
+bool isFunFunFoo(o) {
+  return o is FunFunFoo;
+}
+
+/*class: Aoo:OutputUnit(4, {libB, libC})*/
+class Aoo<T> {}
+
+/*class: Boo:OutputUnit(4, {libB, libC})*/
+class Boo<T> implements Aoo<T> {}
+
+/*class: Coo:OutputUnit(4, {libB, libC})*/
+/*member: Coo.:OutputUnit(6, {libC})*/
+class Coo<T> {}
+
+/*class: Doo:OutputUnit(4, {libB, libC})*/
+/*member: Doo.:OutputUnit(6, {libC})*/
+class Doo<T> extends Coo<T> with Boo<T> {}
+
+/*member: createDooFunFunFoo:OutputUnit(6, {libC})*/
+createDooFunFunFoo() => Doo<FunFunFoo>();
+
+/*class: B:OutputUnit(2, {libA, libC})*/
+/*member: B.:OutputUnit(6, {libC})*/
+class B {}
+
+/*class: B2:OutputUnit(2, {libA, libC})*/
+/*member: B2.:OutputUnit(6, {libC})*/
+class B2 extends B {}
+
+/*class: C1:OutputUnit(2, {libA, libC})*/
+class C1 {}
+
+/*class: C2:OutputUnit(2, {libA, libC})*/
+/*member: C2.:OutputUnit(6, {libC})*/
+class C2 {}
+
+/*class: C3:OutputUnit(2, {libA, libC})*/
+/*member: C3.:OutputUnit(6, {libC})*/
+class C3 extends C2 with C1 {}
+
+/*class: D1:OutputUnit(2, {libA, libC})*/
+class D1 {}
+
+/*class: D2:OutputUnit(2, {libA, libC})*/
+/*member: D2.:OutputUnit(6, {libC})*/
+class D2 {}
+
+/*class: D3:OutputUnit(2, {libA, libC})*/
+class D3 = D2 with D1;
+
+/*member: isMega:OutputUnit(5, {libA})*/
+bool isMega(o) {
+  return o is B2 || o is C3 || o is D3;
+}
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/liba.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/liba.dart
new file mode 100644
index 0000000..a712114
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/liba.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.
+
+// @dart = 2.7
+
+import 'lib.dart' as lib;
+
+/*member: isFoo:OutputUnit(5, {libA})*/
+bool isFoo(o) => lib.isFoo(o);
+
+/*member: isFunFunFoo:OutputUnit(5, {libA})*/
+bool isFunFunFoo(o) => lib.isFunFunFoo(o);
+
+/*member: isMega:OutputUnit(5, {libA})*/
+bool isMega(o) => lib.isMega(o);
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/libb.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/libb.dart
new file mode 100644
index 0000000..591fe47
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/libb.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.
+
+// @dart = 2.7
+
+import 'lib.dart' as lib;
+
+/*member: callFooMethod:OutputUnit(3, {libB})*/
+int callFooMethod() => lib.callFooMethod();
+
+/*member: isFoo:OutputUnit(3, {libB})*/
+bool isFoo(o) => lib.isFoo(o);
+
+/*member: isFunFunFoo:OutputUnit(3, {libB})*/
+bool isFunFunFoo(o) => lib.isFunFunFoo(o);
+
+/*member: isDooFunFunFoo:OutputUnit(3, {libB})*/
+bool isDooFunFunFoo(o) => o is lib.Doo<lib.FunFunFoo>;
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/libc.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/libc.dart
new file mode 100644
index 0000000..1c04601
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/libc.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.
+
+// @dart = 2.7
+
+import 'lib.dart' as lib;
+
+/*member: isFoo:OutputUnit(6, {libC})*/
+bool isFoo(o) => lib.isFoo(o);
+
+/*member: isFunFunFoo:OutputUnit(6, {libC})*/
+bool isFunFunFoo(o) => lib.isFunFunFoo(o);
+
+/*member: createB2:OutputUnit(6, {libC})*/
+createB2() => new lib.B2();
+
+/*member: createC3:OutputUnit(6, {libC})*/
+createC3() => new lib.C3();
+
+/*member: createD3:OutputUnit(6, {libC})*/
+createD3() => new lib.D3();
+
+/*member: createDooFunFunFoo:OutputUnit(6, {libC})*/
+createDooFunFunFoo() => lib.createDooFunFunFoo();
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart
new file mode 100644
index 0000000..885e32e
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/main.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.
+
+// @dart = 2.7
+
+import 'liba.dart' deferred as libA;
+import 'libb.dart' deferred as libB;
+import 'libc.dart' deferred as libC;
+
+/*member: foo:OutputUnit(main, {}),constants=[FunctionConstant(callFooMethod)=OutputUnit(3, {libB}),FunctionConstant(createB2)=OutputUnit(6, {libC}),FunctionConstant(createC3)=OutputUnit(6, {libC}),FunctionConstant(createD3)=OutputUnit(6, {libC}),FunctionConstant(createDooFunFunFoo)=OutputUnit(6, {libC}),FunctionConstant(isDooFunFunFoo)=OutputUnit(3, {libB}),FunctionConstant(isFoo)=OutputUnit(3, {libB}),FunctionConstant(isFoo)=OutputUnit(5, {libA}),FunctionConstant(isFoo)=OutputUnit(6, {libC}),FunctionConstant(isFunFunFoo)=OutputUnit(3, {libB}),FunctionConstant(isFunFunFoo)=OutputUnit(5, {libA}),FunctionConstant(isFunFunFoo)=OutputUnit(6, {libC}),FunctionConstant(isMega)=OutputUnit(5, {libA})]*/
+void foo() async {
+  await libA.loadLibrary();
+  await libB.loadLibrary();
+  await libC.loadLibrary();
+  print((libA.isFoo)(null as dynamic));
+  print((libA.isFunFunFoo)(null as dynamic));
+  print((libA.isFoo)(null as dynamic));
+  print((libA.isMega)(null as dynamic));
+
+  print((libB.isFoo)(null as dynamic));
+  print((libB.callFooMethod)());
+  print((libB.isFunFunFoo)(null as dynamic));
+  print((libB.isDooFunFunFoo)(null as dynamic));
+
+  print((libC.isFoo)(null as dynamic));
+  print((libC.isFunFunFoo)(null as dynamic));
+  print((libC.createB2)());
+  print((libC.createC3)());
+  print((libC.createD3)());
+  print((libC.createDooFunFunFoo)());
+}
+
+/*member: main:OutputUnit(main, {})*/
+main() {
+  foo();
+}
diff --git a/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/lib.dart b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/lib.dart
new file mode 100644
index 0000000..0379450
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/lib.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.
+
+// @dart = 2.7
+
+// All of these types are considered instantiated because we create an instance
+// of [C].
+
+/*class: A:OutputUnit(1, {lib})*/
+/*member: A.:OutputUnit(1, {lib})*/
+class A {}
+
+/*class: Box:OutputUnit(1, {lib})*/
+/*member: Box.:OutputUnit(1, {lib})*/
+class Box<T> {
+  /*member: Box.value:OutputUnit(1, {lib})*/
+  int value;
+}
+
+/*class: B:OutputUnit(1, {lib})*/
+/*member: B.:OutputUnit(1, {lib})*/
+class B<T> extends A {
+  /*member: B.box:OutputUnit(1, {lib})*/
+  final box = new Box<T>();
+}
+
+/*class: C:OutputUnit(1, {lib})*/
+/*member: C.:OutputUnit(1, {lib})*/
+class C extends B<N> {}
+
+// N is not instantiated, but used as a type argument in C and indirectly in a
+// Box<N>.
+// If we don't mark it as part of the output unit of C, we accidentally add it
+// to the main output unit. However, A is in the output unit of C so we fail
+// when trying to finalize the declaration of N while loading the main output
+// unit.
+/*class: N:OutputUnit(1, {lib})*/
+class N extends A {}
diff --git a/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart
new file mode 100644
index 0000000..0f072de
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.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.
+
+// @dart = 2.7
+
+import 'lib.dart' deferred as lib;
+
+/// Regression test: if a type variable is used, but not instantiated, it still
+/// needs to be mapped to the deferred unit where it is used.
+///
+/// If not, we may include it in the main unit and may not see that the base
+/// class is not added to the main unit.
+/*member: main:OutputUnit(main, {})*/
+main() {
+  lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
+    dontInline(new lib.C()).box.value;
+  });
+}
+
+@pragma('dart2js:noInline')
+/*member: dontInline:OutputUnit(main, {})*/
+dontInline(x) => x;
diff --git a/pkg/compiler/test/inference/list_tracer_test.dart b/pkg/compiler/test/inference/list_tracer_test.dart
index f63d8c1..9658374 100644
--- a/pkg/compiler/test/inference/list_tracer_test.dart
+++ b/pkg/compiler/test/inference/list_tracer_test.dart
@@ -220,7 +220,7 @@
     var element = findMember(closedWorld, name);
     ContainerTypeMask mask = results.resultOfMember(element).type;
     if (nullify) type = type.nullable();
-    Expect.equals(type, simplify(mask.elementType, closedWorld), name);
+    Expect.equals(type, simplify(mask.elementType, commonMasks), name);
   }
 
   checkType('listInField', commonMasks.numType);
diff --git a/pkg/compiler/test/inference/map_tracer_test.dart b/pkg/compiler/test/inference/map_tracer_test.dart
index 77f899e..4cb4c1e 100644
--- a/pkg/compiler/test/inference/map_tracer_test.dart
+++ b/pkg/compiler/test/inference/map_tracer_test.dart
@@ -252,13 +252,13 @@
   checkType(String name, keyType, valueType) {
     MemberEntity element = findMember(closedWorld, name);
     MapTypeMask mask = results.resultOfMember(element).type;
-    Expect.equals(keyType, simplify(mask.keyType, closedWorld), name);
-    Expect.equals(valueType, simplify(mask.valueType, closedWorld), name);
+    Expect.equals(keyType, simplify(mask.keyType, commonMasks), name);
+    Expect.equals(valueType, simplify(mask.valueType, commonMasks), name);
   }
 
-  K(TypeMask other) => simplify(keyType.union(other, closedWorld), closedWorld);
+  K(TypeMask other) => simplify(keyType.union(other, commonMasks), commonMasks);
   V(TypeMask other) =>
-      simplify(valueType.union(other, closedWorld), closedWorld).nullable();
+      simplify(valueType.union(other, commonMasks), commonMasks).nullable();
 
   checkType('mapInField', K(aKeyType), V(commonMasks.numType));
   checkType('mapPassedToMethod', K(aKeyType), V(commonMasks.numType));
diff --git a/pkg/compiler/test/inference/type_combination_test.dart b/pkg/compiler/test/inference/type_combination_test.dart
index e7f96a5..b949eba 100644
--- a/pkg/compiler/test/inference/type_combination_test.dart
+++ b/pkg/compiler/test/inference/type_combination_test.dart
@@ -9,6 +9,7 @@
 import 'package:compiler/src/common_elements.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/inferrer/abstract_value_domain.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import 'package:compiler/src/world.dart';
 import 'type_mask_test_helper.dart';
@@ -109,8 +110,9 @@
 }
 
 void testUnion(JClosedWorld closedWorld) {
+  AbstractValueDomain commonMasks = closedWorld.abstractValueDomain;
   RuleSet ruleSet = new RuleSet(
-      'union', (t1, t2) => simplify(t1.union(t2, closedWorld), closedWorld));
+      'union', (t1, t2) => simplify(t1.union(t2, commonMasks), commonMasks));
   rule(type1, type2, result) => ruleSet.rule(type1, type2, result);
   check(type1, type2, predicate) => ruleSet.check(type1, type2, predicate);
 
@@ -420,8 +422,8 @@
 }
 
 void testIntersection(JClosedWorld closedWorld) {
-  RuleSet ruleSet =
-      new RuleSet('intersection', (t1, t2) => t1.intersection(t2, closedWorld));
+  RuleSet ruleSet = new RuleSet('intersection',
+      (t1, t2) => t1.intersection(t2, closedWorld.abstractValueDomain));
   rule(type1, type2, result) => ruleSet.rule(type1, type2, result);
 
   rule(emptyType, emptyType, emptyType);
@@ -737,8 +739,10 @@
 void testRegressions(JClosedWorld closedWorld) {
   TypeMask nonNullPotentialString =
       new TypeMask.nonNullSubtype(patternClass, closedWorld);
-  Expect.equals(potentialString,
-      jsStringOrNull.union(nonNullPotentialString, closedWorld));
+  Expect.equals(
+      potentialString,
+      jsStringOrNull.union(
+          nonNullPotentialString, closedWorld.abstractValueDomain));
 }
 
 void main() {
diff --git a/pkg/compiler/test/inference/type_mask2_test.dart b/pkg/compiler/test/inference/type_mask2_test.dart
index c4d5bef..e5056f8 100644
--- a/pkg/compiler/test/inference/type_mask2_test.dart
+++ b/pkg/compiler/test/inference/type_mask2_test.dart
@@ -10,6 +10,7 @@
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/inferrer/abstract_value_domain.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import 'package:compiler/src/world.dart' show JClosedWorld;
 import '../helpers/type_test_helper.dart';
@@ -32,26 +33,27 @@
     List<FlatTypeMask> disjointMasks,
     FlatTypeMask flattened,
     List<ClassEntity> containedClasses}) {
+  AbstractValueDomain commonMasks = closedWorld.abstractValueDomain;
   bool isNullable = masks.any((FlatTypeMask mask) => mask.isNullable);
   List<FlatTypeMask> disjoint = <FlatTypeMask>[];
-  UnionTypeMask.unionOfHelper(masks, disjoint, closedWorld);
+  UnionTypeMask.unionOfHelper(masks, disjoint, commonMasks);
   Expect.listEquals(disjointMasks, disjoint,
       'Unexpected disjoint masks: $disjoint, expected $disjointMasks.');
   if (flattened == null) {
     Expect.throws(
-        () => UnionTypeMask.flatten(disjoint, isNullable, closedWorld),
+        () => UnionTypeMask.flatten(disjoint, isNullable, commonMasks),
         (e) => e is ArgumentError,
         'Expect argument error on flattening of $disjoint.');
   } else {
     TypeMask flattenResult =
-        UnionTypeMask.flatten(disjoint, isNullable, closedWorld);
+        UnionTypeMask.flatten(disjoint, isNullable, commonMasks);
     Expect.equals(
         flattened,
         flattenResult,
         'Unexpected flattening of $disjoint: '
         '$flattenResult, expected $flattened.');
   }
-  dynamic union = UnionTypeMask.unionOf(masks, closedWorld);
+  dynamic union = UnionTypeMask.unionOf(masks, commonMasks);
   if (result == null) {
     Expect.isTrue(union is UnionTypeMask,
         'Expected union of $masks to be a union-type: $union.');
diff --git a/pkg/compiler/test/inference/type_mask_disjoint_test.dart b/pkg/compiler/test/inference/type_mask_disjoint_test.dart
index 13732c5..519770c 100644
--- a/pkg/compiler/test/inference/type_mask_disjoint_test.dart
+++ b/pkg/compiler/test/inference/type_mask_disjoint_test.dart
@@ -9,6 +9,7 @@
 import 'package:compiler/src/common_elements.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/inferrer/abstract_value_domain.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import 'package:compiler/src/world.dart';
 
@@ -48,6 +49,7 @@
     Compiler compiler = result.compiler;
     JClosedWorld world = compiler.backendClosedWorldForTesting;
     ElementEnvironment elementEnvironment = world.elementEnvironment;
+    AbstractValueDomain commonMasks = world.abstractValueDomain;
 
     /// Checks the expectation of `isDisjoint` for two mask. Also checks that
     /// the result is consistent with an equivalent (but slower) implementation
@@ -56,9 +58,9 @@
       print('masks: $m1 $m2');
       Expect.equals(areDisjoint, m1.isDisjoint(m2, world));
       Expect.equals(areDisjoint, m2.isDisjoint(m1, world));
-      var i1 = m1.intersection(m2, world);
+      var i1 = m1.intersection(m2, commonMasks);
       Expect.equals(areDisjoint, i1.isEmpty && !i1.isNullable);
-      var i2 = m2.intersection(m1, world);
+      var i2 = m2.intersection(m1, commonMasks);
       Expect.equals(areDisjoint, i2.isEmpty && !i2.isNullable);
     }
 
@@ -123,8 +125,10 @@
     checkUnions(List<String> descriptors1, List<String> descriptors2,
         {areDisjoint: true}) {
       print('[$descriptors1] & [$descriptors2]');
-      var m1 = new TypeMask.unionOf(descriptors1.map(maskOf).toList(), world);
-      var m2 = new TypeMask.unionOf(descriptors2.map(maskOf).toList(), world);
+      var m1 =
+          new TypeMask.unionOf(descriptors1.map(maskOf).toList(), commonMasks);
+      var m2 =
+          new TypeMask.unionOf(descriptors2.map(maskOf).toList(), commonMasks);
       checkMask(m1, m2, areDisjoint: areDisjoint);
     }
 
diff --git a/pkg/compiler/test/inference/type_mask_test.dart b/pkg/compiler/test/inference/type_mask_test.dart
index d11d26d..ea40214 100644
--- a/pkg/compiler/test/inference/type_mask_test.dart
+++ b/pkg/compiler/test/inference/type_mask_test.dart
@@ -8,6 +8,7 @@
 import 'package:compiler/src/common.dart';
 import 'package:compiler/src/common_elements.dart';
 import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/inferrer/abstract_value_domain.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import 'package:compiler/src/world.dart';
 import 'package:expect/expect.dart';
@@ -32,6 +33,7 @@
     Expect.isTrue(result.isSuccess);
     Compiler compiler = result.compiler;
     JClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
+    AbstractValueDomain commonMasks = closedWorld.abstractValueDomain;
     ElementEnvironment elementEnvironment = closedWorld.elementEnvironment;
 
     dynamic classA =
@@ -54,16 +56,16 @@
     var subclassObject = new TypeMask.nonNullSubclass(
         closedWorld.commonElements.objectClass, closedWorld);
 
-    var unionABC = UnionTypeMask.unionOf([exactA, exactB, exactC], closedWorld);
+    var unionABC = UnionTypeMask.unionOf([exactA, exactB, exactC], commonMasks);
     var unionABnC =
-        UnionTypeMask.unionOf([exactA, exactB.nullable(), exactC], closedWorld);
-    var unionAB = UnionTypeMask.unionOf([exactA, exactB], closedWorld);
-    var unionSubtypeAC = UnionTypeMask.unionOf([subtypeA, exactC], closedWorld);
+        UnionTypeMask.unionOf([exactA, exactB.nullable(), exactC], commonMasks);
+    var unionAB = UnionTypeMask.unionOf([exactA, exactB], commonMasks);
+    var unionSubtypeAC = UnionTypeMask.unionOf([subtypeA, exactC], commonMasks);
     var unionSubclassAC =
-        UnionTypeMask.unionOf([subclassA, exactC], closedWorld);
-    var unionBCD = UnionTypeMask.unionOf([exactB, exactC, exactD], closedWorld);
+        UnionTypeMask.unionOf([subclassA, exactC], commonMasks);
+    var unionBCD = UnionTypeMask.unionOf([exactB, exactC, exactD], commonMasks);
     var unionBCDn =
-        UnionTypeMask.unionOf([exactB, exactC, exactD.nullable()], closedWorld);
+        UnionTypeMask.unionOf([exactB, exactC, exactD.nullable()], commonMasks);
 
     Expect.isFalse(unionABC.isNullable);
     Expect.isTrue(unionABnC.isNullable);
diff --git a/pkg/compiler/test/inference/type_mask_test_helper.dart b/pkg/compiler/test/inference/type_mask_test_helper.dart
index 3225032..9e5d665 100644
--- a/pkg/compiler/test/inference/type_mask_test_helper.dart
+++ b/pkg/compiler/test/inference/type_mask_test_helper.dart
@@ -11,12 +11,12 @@
 
 export 'package:compiler/src/inferrer/types.dart';
 
-TypeMask simplify(TypeMask mask, JClosedWorld closedWorld) {
+TypeMask simplify(TypeMask mask, CommonMasks commonMasks) {
   if (mask is ForwardingTypeMask) {
-    return simplify(mask.forwardTo, closedWorld);
+    return simplify(mask.forwardTo, commonMasks);
   } else if (mask is UnionTypeMask) {
     return UnionTypeMask.flatten(
-        mask.disjointMasks, mask.isNullable, closedWorld);
+        mask.disjointMasks, mask.isNullable, commonMasks);
   } else {
     return mask;
   }
diff --git a/pkg/compiler/test/inference/union_type_test.dart b/pkg/compiler/test/inference/union_type_test.dart
index 710264a..62b8bd4 100644
--- a/pkg/compiler/test/inference/union_type_test.dart
+++ b/pkg/compiler/test/inference/union_type_test.dart
@@ -6,6 +6,7 @@
 
 import "package:async_helper/async_helper.dart";
 import "package:expect/expect.dart";
+import 'package:compiler/src/inferrer/abstract_value_domain.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import "package:compiler/src/world.dart";
 import '../helpers/type_test_helper.dart';
@@ -22,10 +23,11 @@
       }
       """, testBackendWorld: true);
     JClosedWorld world = env.jClosedWorld;
+    AbstractValueDomain commonMasks = world.abstractValueDomain;
     FlatTypeMask mask1 = new FlatTypeMask.exact(env.getClass('A'), world);
     FlatTypeMask mask2 = new FlatTypeMask.exact(env.getClass('B'), world);
-    UnionTypeMask union1 = mask1.nonNullable().union(mask2, world);
-    UnionTypeMask union2 = mask2.nonNullable().union(mask1, world);
+    UnionTypeMask union1 = mask1.nonNullable().union(mask2, commonMasks);
+    UnionTypeMask union2 = mask2.nonNullable().union(mask1, commonMasks);
     Expect.equals(union1, union2);
   }
 
diff --git a/pkg/compiler/test/inlining/data/static_initializer.dart b/pkg/compiler/test/inlining/data/static_initializer.dart
index 91880ca..e293b16 100644
--- a/pkg/compiler/test/inlining/data/static_initializer.dart
+++ b/pkg/compiler/test/inlining/data/static_initializer.dart
@@ -40,7 +40,7 @@
 
 var _var3 = <int>[Foo().a, (Foo()..a).a];
 
-/*member: Foo.:[]*/
+/*member: Foo.:[_var3:Foo]*/
 class Foo {
   int z = 99;
   /*member: Foo.a:[_var3]*/
diff --git a/pkg/compiler/test/inlining/data/type_variables.dart b/pkg/compiler/test/inlining/data/type_variables.dart
index a757dfe..5863e69 100644
--- a/pkg/compiler/test/inlining/data/type_variables.dart
+++ b/pkg/compiler/test/inlining/data/type_variables.dart
@@ -9,12 +9,12 @@
   inlineTypeTests();
 }
 
-/*member: Mixin1.:[inlineTypeTests:Mixin1<int*>]*/
+/*member: Mixin1.:closure*/
 class Mixin1<S> {
   var field = /*[]*/ (S s) => null;
 }
 
-/*member: Class1.:[inlineTypeTests:Class1<int*>]*/
+/*member: Class1.:closure*/
 class Class1<T> extends Object with Mixin1<T> {}
 
 /*member: _inlineTypeTests:[inlineTypeTests]*/
diff --git a/pkg/compiler/test/jsinterop/declaration_test.dart b/pkg/compiler/test/jsinterop/declaration_test.dart
index 72c7d23..0c3a2ce 100644
--- a/pkg/compiler/test/jsinterop/declaration_test.dart
+++ b/pkg/compiler/test/jsinterop/declaration_test.dart
@@ -14,7 +14,7 @@
 
 const List<Test> TESTS = const <Test>[
   const Test('Empty js-interop class.', '''
-@JS() 
+@JS()
 library test;
 
 import 'package:js/js.dart';
@@ -81,19 +81,6 @@
 
 main() => new A();
 '''),
-  const Test('Js-interop class with external method with named parameters.', '''
-@JS()
-library test;
-
-import 'package:js/js.dart';
-
-@JS()
-class A {
-  external method({a, b});
-}
-
-main() => new A();
-''', errors: const [MessageKind.JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS]),
   const Test('Js-interop class with static method.', '''
 @JS()
 library test;
@@ -370,38 +357,6 @@
 
 main() => new A(a: 1);
 '''),
-  const Test('External factory constructor with required parameters.', '''
-@JS()
-library test;
-
-import 'package:js/js.dart';
-
-@JS()
-@anonymous
-class A {
-  external factory A(a, b);
-}
-
-main() => new A(1, 2);
-''', errors: const [
-    MessageKind.JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS
-  ]),
-  const Test('External factory constructor with optional parameters.', '''
-@JS()
-library test;
-
-import 'package:js/js.dart';
-
-@JS()
-@anonymous
-class A {
-  external factory A([a, b]);
-}
-
-main() => new A(1);
-''', errors: const [
-    MessageKind.JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS
-  ]),
   const Test('Function-typed return type', '''
 @JS()
 library lib;
diff --git a/pkg/compiler/test/model/native_test.dart b/pkg/compiler/test/model/native_test.dart
index 88d5340..418bf59 100644
--- a/pkg/compiler/test/model/native_test.dart
+++ b/pkg/compiler/test/model/native_test.dart
@@ -138,8 +138,8 @@
       '54',
     ]);
 
-    await runTest('tests/dart2js_2/native/native_test.dart',
-        'tests/dart2js_2/native/', {
+    await runTest(
+        'tests/dart2js_2/native/native_test.dart', 'tests/dart2js_2/native/', {
       'Class': Kind.regular,
       'NativeClass': Kind.native,
       'topLevelField': Kind.regular,
@@ -226,7 +226,10 @@
       subTest.lines[lineIndex] = line;
       int commentIndex = prefix.indexOf('// ');
       if (commentIndex != -1) {
-        subTest.expectedError = prefix.substring(commentIndex + 3).trim();
+        String combinedErrors = prefix.substring(commentIndex + 3);
+        for (String error in combinedErrors.split(',')) {
+          subTest.expectedErrors.add(error.trim());
+        }
       }
       commonLines.add('');
     } else {
@@ -325,17 +328,20 @@
       entryPoint: entryPoint,
       memorySourceFiles: sources,
       diagnosticHandler: collector);
-  Expect.isFalse(result.isSuccess, "Expected compile time error for\n$subTest");
-  Expect.equals(
-      1, collector.errors.length, "Expected compile time error for\n$subTest");
-  Expect.equals(
-      'MessageKind.${subTest.expectedError}',
-      collector.errors.first.messageKind.toString(),
-      "Unexpected compile time error for\n$subTest");
+  Expect.isFalse(result.isSuccess,
+      "Expected compile time error(s) for\n$subTest");
+  List<String> expected =
+      subTest.expectedErrors.map((error) => 'MessageKind.' + error).toList();
+  List<String> actual =
+      collector.errors.map((error) => error.messageKind.toString()).toList();
+  expected.sort();
+  actual.sort();
+  Expect.listEquals(expected, actual,
+      "Unexpected compile time error(s) for\n$subTest");
 }
 
 class SubTest {
-  String expectedError;
+  List<String> expectedErrors = [];
   final Map<int, String> lines = <int, String>{};
 
   String generateCode(List<String> commonLines) {
diff --git a/pkg/compiler/test/optimization/data/arithmetic.dart b/pkg/compiler/test/optimization/data/arithmetic.dart
index bc1843b..53f5bcb 100644
--- a/pkg/compiler/test/optimization/data/arithmetic.dart
+++ b/pkg/compiler/test/optimization/data/arithmetic.dart
@@ -114,6 +114,14 @@
   roundNull(null);
   roundString(1);
   roundString('');
+
+  toInt(1);
+  toIntNum(1);
+  toIntNum(1.5);
+  toIntNull(1);
+  toIntNull(null);
+  toIntString(1);
+  toIntString('');
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -489,3 +497,31 @@
 roundString(o) {
   return o.round();
 }
+
+////////////////////////////////////////////////////////////////////////////////
+// .toInt()
+////////////////////////////////////////////////////////////////////////////////
+
+/*member: toInt:Specializer=[ToInt]*/
+@pragma('dart2js:noInline')
+toInt(o) {
+  return o.toInt();
+}
+
+/*member: toIntNum:Specializer=[ToInt]*/
+@pragma('dart2js:noInline')
+toIntNum(o) {
+  return o.toInt();
+}
+
+/*member: toIntNull:Specializer=[ToInt]*/
+@pragma('dart2js:noInline')
+toIntNull(o) {
+  return o.toInt();
+}
+
+/*member: toIntString:Specializer=[!ToInt]*/
+@pragma('dart2js:noInline')
+toIntString(o) {
+  return o.toInt();
+}
diff --git a/pkg/compiler/test/rti/data/async_local_typed.dart b/pkg/compiler/test/rti/data/async_local_typed.dart
index bb76c5d..3b6f939 100644
--- a/pkg/compiler/test/rti/data/async_local_typed.dart
+++ b/pkg/compiler/test/rti/data/async_local_typed.dart
@@ -13,7 +13,7 @@
   // `dynamic Function(dynamic, Class<int>)`, is not a potential subtype and
   // therefore doesn't need its signature.
 
-  /*spec.needsSignature*/
+  /*needsSignature*/
   local(object, Class<int> stacktrace) => null;
 
   return local;
diff --git a/pkg/compiler/test/rti/data/closure_generic_unneeded.dart b/pkg/compiler/test/rti/data/closure_generic_unneeded.dart
index 2777f62..aa3b2cb 100644
--- a/pkg/compiler/test/rti/data/closure_generic_unneeded.dart
+++ b/pkg/compiler/test/rti/data/closure_generic_unneeded.dart
@@ -5,10 +5,11 @@
 // @dart = 2.7
 
 /*spec.class: A:direct,explicit=[A.T*],needsArgs*/
+/*prod.class: A:needsArgs*/
 class A<T> {
   @pragma('dart2js:noInline')
   m() {
-    return (T t, String s) {};
+    return /*needsSignature*/(T t, String s) {};
   }
 }
 
diff --git a/pkg/compiler/test/rti/data/closure_unneeded.dart b/pkg/compiler/test/rti/data/closure_unneeded.dart
index 2777f62..aa3b2cb 100644
--- a/pkg/compiler/test/rti/data/closure_unneeded.dart
+++ b/pkg/compiler/test/rti/data/closure_unneeded.dart
@@ -5,10 +5,11 @@
 // @dart = 2.7
 
 /*spec.class: A:direct,explicit=[A.T*],needsArgs*/
+/*prod.class: A:needsArgs*/
 class A<T> {
   @pragma('dart2js:noInline')
   m() {
-    return (T t, String s) {};
+    return /*needsSignature*/(T t, String s) {};
   }
 }
 
diff --git a/pkg/compiler/test/rti/data/generic_bounds.dart b/pkg/compiler/test/rti/data/generic_bounds.dart
index 348fd44..689e659 100644
--- a/pkg/compiler/test/rti/data/generic_bounds.dart
+++ b/pkg/compiler/test/rti/data/generic_bounds.dart
@@ -41,13 +41,13 @@
 method10<T extends Class4>() => null;
 
 main() {
-  /*spec.needsArgs,selectors=[Selector(call, call, arity=0, types=1)]*/
+  /*needsArgs,needsSignature,selectors=[Selector(call, call, arity=0, types=1)]*/
   method7<T extends Class1a>() => null;
 
-  /*spec.needsArgs,selectors=[Selector(call, call, arity=0, types=1)]*/
+  /*needsArgs,needsSignature,selectors=[Selector(call, call, arity=0, types=1)]*/
   method8<T extends Class2a<num>>() => null;
 
-  method9<T>() => null;
+  /*needsArgs,needsSignature,selectors=[Selector(call, call, arity=0, types=1)]*/method9<T>() => null;
 
   dynamic f1 = method1;
   dynamic f2 = method2;
diff --git a/pkg/compiler/test/rti/data/instantiation3.dart b/pkg/compiler/test/rti/data/instantiation3.dart
index 7bdcd01..96e7c7a 100644
--- a/pkg/compiler/test/rti/data/instantiation3.dart
+++ b/pkg/compiler/test/rti/data/instantiation3.dart
@@ -15,7 +15,7 @@
   F<S> c;
 
   method() {
-    return () {
+    return /*spec.needsSignature*/() {
       c = f;
     };
   }
diff --git a/pkg/compiler/test/rti/data/instantiation4.dart b/pkg/compiler/test/rti/data/instantiation4.dart
index 2efdd47..7ec0433 100644
--- a/pkg/compiler/test/rti/data/instantiation4.dart
+++ b/pkg/compiler/test/rti/data/instantiation4.dart
@@ -15,7 +15,7 @@
   F<S> c;
 
   method() {
-    return () {
+    return /*spec.needsSignature*/() {
       c = f;
     };
   }
diff --git a/pkg/compiler/test/rti/data/local_function_map_literal.dart b/pkg/compiler/test/rti/data/local_function_map_literal.dart
index 17c5972..5069a9a 100644
--- a/pkg/compiler/test/rti/data/local_function_map_literal.dart
+++ b/pkg/compiler/test/rti/data/local_function_map_literal.dart
@@ -13,7 +13,7 @@
 /*spec.member: method:implicit=[method.T],indirect,needsArgs*/
 /*prod.member: method:needsArgs*/
 method<T>() {
-  return () => <T, int>{};
+  return /*spec.needsSignature*/() => <T, int>{};
 }
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/data/local_function_signature2.dart b/pkg/compiler/test/rti/data/local_function_signature2.dart
index 4a69e2a..39ffbd7 100644
--- a/pkg/compiler/test/rti/data/local_function_signature2.dart
+++ b/pkg/compiler/test/rti/data/local_function_signature2.dart
@@ -8,17 +8,17 @@
 
 class Class1 {
   method1() {
-    num local<T>(num n) => null;
+    /*needsArgs,needsSignature*/num local<T>(num n) => null;
     return local;
   }
 
   method2() {
-    num local<T>(int n) => null;
+    /*needsArgs,needsSignature*/num local<T>(int n) => null;
     return local;
   }
 
   method3() {
-    int local<T>(num n) => null;
+    /*needsArgs,needsSignature*/int local<T>(num n) => null;
     return local;
   }
 }
@@ -43,9 +43,10 @@
 }
 
 class Class4 {
+  /*prod.member: Class4.method6:needsArgs,selectors=[Selector(call, method6, arity=0, types=1)]*/
   /*spec.member: Class4.method6:direct,explicit=[method6.T*],needsArgs,selectors=[Selector(call, method6, arity=0, types=1)]*/
   method6<T>() {
-    num local(num n, T t) => null;
+    /*needsSignature*/num local(num n, T t) => null;
     return local;
   }
 }
@@ -66,25 +67,26 @@
 }
 
 /*spec.member: method9:direct,explicit=[method9.T*],needsArgs*/
+/*prod.member: method9:needsArgs*/
 method9<T>() {
-  num local(num n, T t) => null;
+  /*needsSignature*/num local(num n, T t) => null;
   return local;
 }
 
 method10() {
-  /*spec.direct,explicit=[local.T*],needsArgs*/
-  num local<T>(T n) => null;
+  /*spec.direct,explicit=[local.T*],needsArgs,needsSignature*/
+  /*prod.needsArgs,needsSignature*/num local<T>(T n) => null;
   return local;
 }
 
 method11() {
-  T local<T>(num n) => null;
+  /*needsArgs,needsSignature*/T local<T>(num n) => null;
   return local;
 }
 
 method12() {
-  /*spec.direct,explicit=[local.T*],needsArgs*/
-  num local<T>(num n, T t) => null;
+  /*spec.direct,explicit=[local.T*],needsArgs,needsSignature*/
+  /*prod.needsArgs,needsSignature*/num local<T>(num n, T t) => null;
   return local;
 }
 
diff --git a/pkg/compiler/test/rti/data/local_function_signatures.dart b/pkg/compiler/test/rti/data/local_function_signatures.dart
index 297212f..7744aa6 100644
--- a/pkg/compiler/test/rti/data/local_function_signatures.dart
+++ b/pkg/compiler/test/rti/data/local_function_signatures.dart
@@ -14,12 +14,12 @@
   }
 
   method2() {
-    num local(int n) => null;
+    /*needsSignature*/num local(int n) => null;
     return local;
   }
 
   method3() {
-    Object local(num n) => null;
+    /*needsSignature*/Object local(num n) => null;
     return local;
   }
 }
@@ -44,9 +44,10 @@
 }
 
 /*spec.class: Class4:direct,explicit=[Class4.T*],needsArgs*/
+/*prod.class: Class4:needsArgs*/
 class Class4<T> {
   method6() {
-    num local(num n, T t) => null;
+    /*needsSignature*/num local(num n, T t) => null;
     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 93b62e8..dc86b33 100644
--- a/pkg/compiler/test/rti/data/local_function_signatures_generic.dart
+++ b/pkg/compiler/test/rti/data/local_function_signatures_generic.dart
@@ -14,7 +14,7 @@
   }
 
   method2() {
-    num local<T>(int n) => null;
+    /*needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/num local<T>(int n) => null;
     return local;
   }
 
@@ -45,9 +45,10 @@
 }
 
 class Class4 {
+  /*prod.member: Class4.method6:needsArgs,selectors=[Selector(call, method6, arity=0, types=1)]*/
   /*spec.member: Class4.method6:direct,explicit=[method6.T*],needsArgs,selectors=[Selector(call, method6, arity=0, types=1)]*/
   method6<T>() {
-    num local(num n, T t) => null;
+    /*needsSignature*/num local(num n, T t) => null;
     return local;
   }
 }
@@ -68,8 +69,9 @@
 }
 
 /*spec.member: method9:direct,explicit=[method9.T*],needsArgs*/
+/*prod.member: method9:needsArgs*/
 method9<T>() {
-  num local(num n, T t) => null;
+  /*needsSignature*/num local(num n, T t) => null;
   return local;
 }
 
@@ -87,8 +89,8 @@
 }
 
 method12() {
-  /*spec.direct,explicit=[local.T*],needsArgs,needsInst=[<dynamic>,<num*>,<num*>]*/
-  num local<T>(num n, T t) => null;
+  /*spec.direct,explicit=[local.T*],needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
+  /*prod.needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/num local<T>(num n, T t) => null;
   return local;
 }
 
diff --git a/pkg/compiler/test/rti/data/subtype_named_args.dart b/pkg/compiler/test/rti/data/subtype_named_args.dart
index b795bea..d1e2eb7 100644
--- a/pkg/compiler/test/rti/data/subtype_named_args.dart
+++ b/pkg/compiler/test/rti/data/subtype_named_args.dart
@@ -53,19 +53,19 @@
 
 main() {
   Expect.isTrue(
-      /*spec.needsSignature*/
+      /*needsSignature*/
       ({D a, B b, C c, A d}) {} is classesFunc);
   Expect.isTrue(
       /*needsSignature*/
       ({A a, A b, A c, A d}) {} is classesFunc);
   Expect.isTrue(
-      /*spec.needsSignature*/
+      /*needsSignature*/
       ({D a, A1 b, A1 c, A1 d}) {} is classesFunc);
   Expect.isTrue(
-      /*spec.needsSignature*/
+      /*needsSignature*/
       ({D a, A2 b, A2 c, A2 d}) {} is classesFunc);
   Expect.isTrue(
-      /*spec.needsSignature*/
+      /*needsSignature*/
       ({D a, D b, D c, D d}) {} is classesFunc);
   Expect.isTrue(
       /*needsSignature*/
@@ -79,7 +79,7 @@
       ({Map<num, num> m, List<List<A1>> l, G<A, A1, A1, A1> g}) {}
           is genericsFunc);
   Expect.isTrue(
-      /*spec.needsSignature*/
+      /*needsSignature*/
       ({Map<int, int> m, List<List<D>> l, G<D, D, D, D> g}) {} is genericsFunc);
   Expect.isTrue(
       /*needsSignature*/
@@ -89,13 +89,13 @@
       ({Object m, Object l, Object g}) {} is genericsFunc);
 
   Expect.isTrue(
-      /*spec.needsSignature*/
+      /*needsSignature*/
       ({A x, G y, mixFunc z, var v}) {} is dynamicFunc);
   Expect.isTrue(
-      /*spec.needsSignature*/
+      /*needsSignature*/
       ({int x, bool y, List<Map> z, classesFunc v}) {} is dynamicFunc);
 
-  Expect.isTrue((
+  Expect.isTrue(/*needsSignature*/(
       {okWithClassesFunc_1 f1,
       okWithGenericsFunc_1 f2,
       okWithDynamicFunc_1 f3}) {} is funcFunc);
diff --git a/pkg/compiler/test/rti/data/subtype_named_args1.dart b/pkg/compiler/test/rti/data/subtype_named_args1.dart
index e20cf27..8b797f3 100644
--- a/pkg/compiler/test/rti/data/subtype_named_args1.dart
+++ b/pkg/compiler/test/rti/data/subtype_named_args1.dart
@@ -40,16 +40,16 @@
   Expect.isTrue(/*needsSignature*/ ({A a}) {} is t1);
   Expect.isTrue(/*needsSignature*/ ({B a}) {} is t1);
   Expect.isTrue(
-      /*spec.needsSignature*/ ({C a}) {} is t1);
+      /*needsSignature*/ ({C a}) {} is t1);
   Expect.isTrue(
-      /*spec.needsSignature*/ ({D a}) {} is t1);
+      /*needsSignature*/ ({D a}) {} is t1);
   Expect.isTrue(/*needsSignature*/ ({Object a}) {} is t1);
   Expect.isTrue(/*needsSignature*/ ({var a}) {} is t1);
 
   Expect.isTrue(/*needsSignature*/ ({A c}) {} is t2);
   Expect.isTrue(/*needsSignature*/ ({B c}) {} is t2);
   Expect.isTrue(/*needsSignature*/ ({C c}) {} is t2);
-  Expect.isTrue(({D c}) {} is t2);
+  Expect.isTrue(/*needsSignature*/({D c}) {} is t2);
   Expect.isTrue(/*needsSignature*/ ({Object c}) {} is t2);
   Expect.isTrue(/*needsSignature*/ ({var c}) {} is t2);
 
@@ -58,34 +58,34 @@
   Expect.isTrue(/*needsSignature*/ ({Object i}) {} is t3);
   Expect.isTrue(/*needsSignature*/ ({var i}) {} is t3);
 
-  Expect.isTrue(({A v}) {} is t4);
-  Expect.isTrue(({B v}) {} is t4);
-  Expect.isTrue(({C v}) {} is t4);
-  Expect.isTrue(({D v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({A v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({B v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({C v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({D v}) {} is t4);
   Expect.isTrue(/*needsSignature*/ ({Object v}) {} is t4);
   Expect.isTrue(/*needsSignature*/ ({var v}) {} is t4);
-  Expect.isTrue(({num v}) {} is t4);
-  Expect.isTrue(({int v}) {} is t4);
-  Expect.isTrue(({Map v}) {} is t4);
-  Expect.isTrue(({Map<List<Map<List, List<int>>>, List> v}) {} is t4);
-  Expect.isTrue(({List v}) {} is t4);
-  Expect.isTrue(({t8 v}) {} is t4);
-  Expect.isTrue(({t7 v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({num v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({int v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({Map v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({Map<List<Map<List, List<int>>>, List> v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({List v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({t8 v}) {} is t4);
+  Expect.isTrue(/*needsSignature*/({t7 v}) {} is t4);
 
   Expect.isTrue(/*needsSignature*/ ({Map m}) {} is t5);
-  Expect.isTrue(({Map<List, t8> m}) {} is t5);
+  Expect.isTrue(/*needsSignature*/({Map<List, t8> m}) {} is t5);
   Expect.isTrue(/*needsSignature*/ ({Object m}) {} is t5);
   Expect.isTrue(/*needsSignature*/ ({var m}) {} is t5);
-  Expect.isTrue(({Map<List, List> m}) {} is t5);
-  Expect.isTrue(({Map<int, t8> m}) {} is t5);
+  Expect.isTrue(/*needsSignature*/({Map<List, List> m}) {} is t5);
+  Expect.isTrue(/*needsSignature*/({Map<int, t8> m}) {} is t5);
 
   Expect.isTrue(/*needsSignature*/ ({Map<num, num> m}) {} is t6);
-  Expect.isTrue(({Map<int, int> m}) {} is t6);
+  Expect.isTrue(/*needsSignature*/({Map<int, int> m}) {} is t6);
   Expect.isTrue(/*needsSignature*/ ({Map m}) {} is t6);
   Expect.isTrue(/*needsSignature*/ ({Object m}) {} is t6);
   Expect.isTrue(/*needsSignature*/ ({var m}) {} is t6);
 
-  Expect.isTrue(({okWithT1_1 f}) {} is t7);
+  Expect.isTrue(/*needsSignature*/({okWithT1_1 f}) {} is t7);
   Expect.isTrue(/*needsSignature*/ ({okWithT1_2 f}) {} is t7);
   Expect.isTrue(/*needsSignature*/ ({okWithT1_3 f}) {} is t7);
   Expect.isTrue(/*needsSignature*/ ({okWithT1_4 f}) {} is t7);
@@ -93,14 +93,14 @@
   Expect.isTrue(/*needsSignature*/ ({A a}) {} is t8);
   Expect.isTrue(/*needsSignature*/ ({B a}) {} is t8);
   Expect.isTrue(
-      /*spec.needsSignature*/ ({C a}) {} is t8);
+      /*needsSignature*/ ({C a}) {} is t8);
   Expect.isTrue(
-      /*spec.needsSignature*/ ({D a}) {} is t8);
+      /*needsSignature*/ ({D a}) {} is t8);
   Expect.isTrue(/*needsSignature*/ ({Object a}) {} is t8);
   Expect.isTrue(/*needsSignature*/ ({var a}) {} is t8);
-  Expect.isTrue(({num a}) {} is t8);
-  Expect.isTrue(({int a}) {} is t8);
-  Expect.isTrue(({Map a}) {} is t8);
-  Expect.isTrue(({Map<List<Map<List, List<int>>>, List> a}) {} is t8);
-  Expect.isTrue(({List a}) {} is t8);
+  Expect.isTrue(/*needsSignature*/({num a}) {} is t8);
+  Expect.isTrue(/*needsSignature*/({int a}) {} is t8);
+  Expect.isTrue(/*needsSignature*/({Map a}) {} is t8);
+  Expect.isTrue(/*needsSignature*/({Map<List<Map<List, List<int>>>, List> a}) {} is t8);
+  Expect.isTrue(/*needsSignature*/({List a}) {} is t8);
 }
diff --git a/pkg/compiler/test/rti/emission/arguments.dart b/pkg/compiler/test/rti/emission/arguments.dart
index 215e20c..7089270 100644
--- a/pkg/compiler/test/rti/emission/arguments.dart
+++ b/pkg/compiler/test/rti/emission/arguments.dart
@@ -4,10 +4,10 @@
 
 // @dart = 2.7
 
-/*class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A {}
 
-/*class: B:checks=[],typeArgument*/
+/*class: B:checks=[],onlyForRti,typeArgument*/
 class B {}
 
 /*class: C:checkedInstance,checks=[],instance*/
diff --git a/pkg/compiler/test/rti/emission/closure_function_type.dart b/pkg/compiler/test/rti/emission/closure_function_type.dart
index b40047e..98b9a7f 100644
--- a/pkg/compiler/test/rti/emission/closure_function_type.dart
+++ b/pkg/compiler/test/rti/emission/closure_function_type.dart
@@ -11,6 +11,6 @@
   test(/*checks=[$signature],instance*/ () {});
   test(
 
-      /*checks=[],instance*/
+      /*checks=[$signature],instance*/
       (a) {});
 }
diff --git a/pkg/compiler/test/rti/emission/closure_signature_unneeded.dart b/pkg/compiler/test/rti/emission/closure_signature_unneeded.dart
index 15549d7..ca88622 100644
--- a/pkg/compiler/test/rti/emission/closure_signature_unneeded.dart
+++ b/pkg/compiler/test/rti/emission/closure_signature_unneeded.dart
@@ -12,7 +12,7 @@
     // potential subtype of the checked function types.
     return
 
-        /*checks=[],instance*/
+        /*checks=[$signature],instance*/
         (T t, String s) {};
   }
 }
diff --git a/pkg/compiler/test/rti/emission/dynamic_instance.dart b/pkg/compiler/test/rti/emission/dynamic_instance.dart
index 0f3a503..14284f7 100644
--- a/pkg/compiler/test/rti/emission/dynamic_instance.dart
+++ b/pkg/compiler/test/rti/emission/dynamic_instance.dart
@@ -6,7 +6,7 @@
 
 import 'package:expect/expect.dart';
 
-/*class: B:checkedInstance,checks=[],typeArgument*/
+/*class: B:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class B {}
 
 /*class: C:checks=[],instance*/
diff --git a/pkg/compiler/test/rti/emission/dynamic_type_argument.dart b/pkg/compiler/test/rti/emission/dynamic_type_argument.dart
index 6837723..5da881f 100644
--- a/pkg/compiler/test/rti/emission/dynamic_type_argument.dart
+++ b/pkg/compiler/test/rti/emission/dynamic_type_argument.dart
@@ -9,7 +9,7 @@
 /*class: A:checkedInstance,checks=[],instance*/
 class A<T> {}
 
-/*class: B:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B {}
 
 /*class: C:checks=[],instance*/
@@ -21,10 +21,10 @@
   method2<T>() => new A<T>();
 }
 
-/*class: D:checks=[],typeArgument*/
+/*class: D:checks=[],onlyForRti,typeArgument*/
 class D extends B {}
 
-/*class: E:checks=[],typeArgument*/
+/*class: E:checks=[],onlyForRti,typeArgument*/
 class E {}
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/emission/dynamic_type_literal.dart b/pkg/compiler/test/rti/emission/dynamic_type_literal.dart
index 0d26a10..a635a06 100644
--- a/pkg/compiler/test/rti/emission/dynamic_type_literal.dart
+++ b/pkg/compiler/test/rti/emission/dynamic_type_literal.dart
@@ -4,7 +4,7 @@
 
 // @dart = 2.7
 
-/*class: global#Type:checks=[],instance,typeLiteral*/
+/*class: global#Type:checks=[],instance,onlyForRti,typeLiteral*/
 
 import "package:expect/expect.dart";
 
diff --git a/pkg/compiler/test/rti/emission/fixed_type_argument.dart b/pkg/compiler/test/rti/emission/fixed_type_argument.dart
index c00f5bf..5ae24b0 100644
--- a/pkg/compiler/test/rti/emission/fixed_type_argument.dart
+++ b/pkg/compiler/test/rti/emission/fixed_type_argument.dart
@@ -4,12 +4,12 @@
 
 // @dart = 2.7
 
-/*spec.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: A:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A {}
 
-/*spec.class: B:checkedInstance,checks=[$isA],typeArgument*/
-/*prod.class: B:checks=[$isA],typeArgument*/
+/*spec.class: B:checkedInstance,checks=[$isA],onlyForRti,typeArgument*/
+/*prod.class: B:checks=[$isA],onlyForRti,typeArgument*/
 class B implements A {}
 
 /*class: C:checks=[],indirectInstance*/
diff --git a/pkg/compiler/test/rti/emission/fixed_type_argument_implements.dart b/pkg/compiler/test/rti/emission/fixed_type_argument_implements.dart
index 29590c5..a6a9c1b 100644
--- a/pkg/compiler/test/rti/emission/fixed_type_argument_implements.dart
+++ b/pkg/compiler/test/rti/emission/fixed_type_argument_implements.dart
@@ -7,11 +7,11 @@
 // Test that we emit the relation between B and A even when B is only live
 // as a type argument through the supertype of D.
 
-/*spec.class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A {}
 
-/*spec.class: B:checks=[$isA],typeArgument*/
-/*prod.class: B:checks=[],typeArgument*/
+/*spec.class: B:checks=[$isA],onlyForRti,typeArgument*/
+/*prod.class: B:checks=[],onlyForRti,typeArgument*/
 class B implements A {}
 
 /*spec.class: C:checkedInstance*/
diff --git a/pkg/compiler/test/rti/emission/function_typed_arguments.dart b/pkg/compiler/test/rti/emission/function_typed_arguments.dart
index 58d5f14..69e8ad7 100644
--- a/pkg/compiler/test/rti/emission/function_typed_arguments.dart
+++ b/pkg/compiler/test/rti/emission/function_typed_arguments.dart
@@ -18,10 +18,10 @@
   test6();
 }
 
-/*class: B1:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B1:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B1<T> {}
 
-/*class: C1:checkedTypeArgument,checks=[],typeArgument*/
+/*class: C1:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class C1 extends B1<int> {}
 
 @pragma('dart2js:noInline')
@@ -34,10 +34,10 @@
 @pragma('dart2js:noInline')
 _test1(f) => f is A<void Function(C1)>;
 
-/*class: B2:checks=[],typeArgument*/
+/*class: B2:checks=[],onlyForRti,typeArgument*/
 class B2<T> {}
 
-/*class: C2:checkedTypeArgument,checks=[],typeArgument*/
+/*class: C2:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class C2 extends B2<int> {}
 
 @pragma('dart2js:noInline')
@@ -50,10 +50,10 @@
 @pragma('dart2js:noInline')
 _test2(f) => f is A<C2 Function()>;
 
-/*class: B3:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B3:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B3<T> {}
 
-/*class: C3:checkedTypeArgument,checks=[],typeArgument*/
+/*class: C3:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class C3 extends B3<int> {}
 
 @pragma('dart2js:noInline')
@@ -66,10 +66,10 @@
 @pragma('dart2js:noInline')
 _test3(f) => f is A<void Function(B3<int>)>;
 
-/*class: B4:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B4:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B4<T> {}
 
-/*class: C4:checks=[],typeArgument*/
+/*class: C4:checks=[],onlyForRti,typeArgument*/
 class C4 extends B4<int> {}
 
 @pragma('dart4js:noInline')
@@ -82,10 +82,10 @@
 @pragma('dart4js:noInline')
 _test4(f) => f is A<B4<int> Function()>;
 
-/*class: B5:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B5:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B5<T> {}
 
-/*class: C5:checkedTypeArgument,checks=[],typeArgument*/
+/*class: C5:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class C5 extends B5<int> {}
 
 @pragma('dart2js:noInline')
@@ -98,10 +98,10 @@
 @pragma('dart2js:noInline')
 _test5(f) => f is A<void Function(C5 Function())>;
 
-/*class: B6:checks=[],typeArgument*/
+/*class: B6:checks=[],onlyForRti,typeArgument*/
 class B6<T> {}
 
-/*class: C6:checkedTypeArgument,checks=[],typeArgument*/
+/*class: C6:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class C6 extends B6<int> {}
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/emission/future_or_as_type_argument.dart b/pkg/compiler/test/rti/emission/future_or_as_type_argument.dart
index 2b718e3..9b2fcd45 100644
--- a/pkg/compiler/test/rti/emission/future_or_as_type_argument.dart
+++ b/pkg/compiler/test/rti/emission/future_or_as_type_argument.dart
@@ -6,15 +6,15 @@
 
 import 'dart:async';
 
-/*class: global#Future:checks=[],typeArgument*/
+/*class: global#Future:checks=[],onlyForRti,typeArgument*/
 
 /*class: A:checkedInstance,checks=[],instance*/
 class A<T> {}
 
-/*class: B:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B {}
 
-/*class: C:checks=[],typeArgument*/
+/*class: C:checks=[],onlyForRti,typeArgument*/
 class C {}
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/emission/future_or_future_or_generic.dart b/pkg/compiler/test/rti/emission/future_or_future_or_generic.dart
index db1eceb..989c8de 100644
--- a/pkg/compiler/test/rti/emission/future_or_future_or_generic.dart
+++ b/pkg/compiler/test/rti/emission/future_or_future_or_generic.dart
@@ -18,10 +18,10 @@
 /*class: B:checkedInstance,checkedTypeArgument,checks=[],instance,typeArgument*/
 class B<T> {}
 
-/*class: C:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
+/*class: C:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class C {}
 
-/*class: D:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
+/*class: D:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class D {}
 
 main() {
diff --git a/pkg/compiler/test/rti/emission/future_or_generic.dart b/pkg/compiler/test/rti/emission/future_or_generic.dart
index 95dd12f..c4ece54 100644
--- a/pkg/compiler/test/rti/emission/future_or_generic.dart
+++ b/pkg/compiler/test/rti/emission/future_or_generic.dart
@@ -20,7 +20,7 @@
 
 // TODO(johnniwinther): Do we need the implied `checkedTypeArgument` from
 // the `Future<C>` test in `A.m`?
-/*class: C:checkedInstance,checks=[],typeArgument*/
+/*class: C:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class C {}
 
 /*class: FutureMock:checks=[$isFuture],instance*/
diff --git a/pkg/compiler/test/rti/emission/future_or_generic2.dart b/pkg/compiler/test/rti/emission/future_or_generic2.dart
index bd21431..5fa8720 100644
--- a/pkg/compiler/test/rti/emission/future_or_generic2.dart
+++ b/pkg/compiler/test/rti/emission/future_or_generic2.dart
@@ -18,10 +18,10 @@
 /*class: B:checkedInstance,checkedTypeArgument,checks=[],instance,typeArgument*/
 class B<T> {}
 
-/*class: C:checkedInstance,checks=[],typeArgument*/
+/*class: C:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class C {}
 
-/*class: D:checkedInstance,checks=[],typeArgument*/
+/*class: D:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class D {}
 
 main() {
diff --git a/pkg/compiler/test/rti/emission/future_or_type_argument.dart b/pkg/compiler/test/rti/emission/future_or_type_argument.dart
index e5db913..c225b61 100644
--- a/pkg/compiler/test/rti/emission/future_or_type_argument.dart
+++ b/pkg/compiler/test/rti/emission/future_or_type_argument.dart
@@ -7,15 +7,15 @@
 import 'dart:async';
 import 'package:expect/expect.dart';
 
-/*class: global#Future:checks=[],typeArgument*/
+/*class: global#Future:checks=[],onlyForRti,typeArgument*/
 
 /*class: A:checkedInstance,checks=[],instance*/
 class A<T> {}
 
-/*class: B:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B {}
 
-/*class: C:checks=[],typeArgument*/
+/*class: C:checks=[],onlyForRti,typeArgument*/
 class C {}
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/emission/generic_instanceof4.dart b/pkg/compiler/test/rti/emission/generic_instanceof4.dart
index c228394..48b6274 100644
--- a/pkg/compiler/test/rti/emission/generic_instanceof4.dart
+++ b/pkg/compiler/test/rti/emission/generic_instanceof4.dart
@@ -12,7 +12,7 @@
   }
 }
 
-/*class: BB:checkedInstance,checks=[],typeArgument*/
+/*class: BB:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class BB {}
 
 /*class: B:checks=[$isBB],instance*/
diff --git a/pkg/compiler/test/rti/emission/generic_methods_dynamic_02.dart b/pkg/compiler/test/rti/emission/generic_methods_dynamic_02.dart
index fa58b35..c4db1f9 100644
--- a/pkg/compiler/test/rti/emission/generic_methods_dynamic_02.dart
+++ b/pkg/compiler/test/rti/emission/generic_methods_dynamic_02.dart
@@ -8,7 +8,7 @@
 
 library generic_methods_dynamic_test;
 
-/*spec.class: A:checkedInstance,checks=[],typeArgument*/
+/*spec.class: A:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class A {}
 
 /*spec.class: B:checks=[],instance*/
diff --git a/pkg/compiler/test/rti/emission/indirect_through_static.dart b/pkg/compiler/test/rti/emission/indirect_through_static.dart
index 8246072..848e578 100644
--- a/pkg/compiler/test/rti/emission/indirect_through_static.dart
+++ b/pkg/compiler/test/rti/emission/indirect_through_static.dart
@@ -4,10 +4,10 @@
 
 // @dart = 2.7
 
-/*class: A:checkedInstance,checks=[],typeArgument*/
+/*class: A:checkedInstance,checks=[],onlyForRti,typeArgument*/
 abstract class A {}
 
-/*class: B:checks=[$isA],typeArgument*/
+/*class: B:checks=[$isA],onlyForRti,typeArgument*/
 class B implements A {}
 
 /*class: C:checkedInstance,checks=[],instance,typeArgument*/
diff --git a/pkg/compiler/test/rti/emission/jsinterop.dart b/pkg/compiler/test/rti/emission/jsinterop.dart
index 422ece1..f88db92 100644
--- a/pkg/compiler/test/rti/emission/jsinterop.dart
+++ b/pkg/compiler/test/rti/emission/jsinterop.dart
@@ -11,33 +11,33 @@
 
 import 'package:js/js.dart';
 
-/*class: A:checkedInstance,checks=[],instance*/
+/*class: A:checkedInstance,checks=[],instance,onlyForRti*/
 @JS()
 class A {
   external A();
 }
 
-/*class: B:checks=[],instance*/
+/*class: B:checks=[],instance,onlyForRti*/
 @JS('BClass')
 class B {
   external B();
 }
 
-/*class: C:checkedInstance,checks=[],instance*/
+/*class: C:checkedInstance,checks=[],instance,onlyForRti*/
 @JS()
 @anonymous
 class C {
   external factory C();
 }
 
-/*class: D:checks=[],instance*/
+/*class: D:checks=[],instance,onlyForRti*/
 @JS()
 @anonymous
 class D {
   external factory D();
 }
 
-/*class: E:checks=[],instance,typeLiteral*/
+/*class: E:checks=[],instance*/
 class E {
   E();
 }
diff --git a/pkg/compiler/test/rti/emission/jsinterop_generic.dart b/pkg/compiler/test/rti/emission/jsinterop_generic.dart
index 60ab4ae..cc2d44a 100644
--- a/pkg/compiler/test/rti/emission/jsinterop_generic.dart
+++ b/pkg/compiler/test/rti/emission/jsinterop_generic.dart
@@ -16,7 +16,7 @@
 import 'package:expect/expect.dart';
 import 'package:js/js.dart';
 
-/*class: A:checkedInstance,checks=[],instance*/
+/*class: A:checkedInstance,checks=[],instance,onlyForRti*/
 @JS()
 @anonymous
 class A<T> {
@@ -26,7 +26,7 @@
 /*class: B:checkedInstance*/
 class B<T> {}
 
-/*class: C:checks=[],instance*/
+/*class: C:checks=[],instance,onlyForRti*/
 @JS()
 @anonymous
 class C implements B<int> {
@@ -36,7 +36,7 @@
 /*class: D:checkedInstance*/
 class D<T> {}
 
-/*class: E:checks=[],instance*/
+/*class: E:checks=[],instance,onlyForRti*/
 @JS()
 @anonymous
 class E implements B<String> {
diff --git a/pkg/compiler/test/rti/emission/jsinterop_generic_factory_args.dart b/pkg/compiler/test/rti/emission/jsinterop_generic_factory_args.dart
index 2815d96..c7dc08b 100644
--- a/pkg/compiler/test/rti/emission/jsinterop_generic_factory_args.dart
+++ b/pkg/compiler/test/rti/emission/jsinterop_generic_factory_args.dart
@@ -4,20 +4,18 @@
 
 // @dart = 2.7
 
-// dart2jsOptions=--strong
-
 @JS()
 library foo;
 
-/*class: global#JavaScriptObject:checks=[$isA]*/
+/*class: global#JavaScriptObject:checks=[$isA],onlyForRti*/
 
 import 'package:expect/expect.dart';
 import 'package:js/js.dart';
 
 @JS()
 @anonymous
-/*spec.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: A:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A<T> {
   external factory A();
 }
diff --git a/pkg/compiler/test/rti/emission/list.dart b/pkg/compiler/test/rti/emission/list.dart
index 329b67d..5c1199c 100644
--- a/pkg/compiler/test/rti/emission/list.dart
+++ b/pkg/compiler/test/rti/emission/list.dart
@@ -9,12 +9,12 @@
 
 /*class: global#Iterable:checkedInstance*/
 
-/*spec.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: A:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A {}
 
-/*spec.class: B:checkedInstance,checks=[],typeArgument*/
-/*prod.class: B:checks=[],typeArgument*/
+/*spec.class: B:checkedInstance,checks=[],onlyForRti,typeArgument*/
+/*prod.class: B:checks=[],onlyForRti,typeArgument*/
 class B {}
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/emission/local_function_map_literal.dart b/pkg/compiler/test/rti/emission/local_function_map_literal.dart
index 03ec2a1..0468a3e 100644
--- a/pkg/compiler/test/rti/emission/local_function_map_literal.dart
+++ b/pkg/compiler/test/rti/emission/local_function_map_literal.dart
@@ -11,7 +11,8 @@
 @pragma('dart2js:noInline')
 method<T>() {
   return
-      /*checks=[],instance*/
+      /*spec.checks=[$signature],instance*/
+      /*prod.checks=[],instance*/
       () => <T, int>{};
 }
 
diff --git a/pkg/compiler/test/rti/emission/map_literal.dart b/pkg/compiler/test/rti/emission/map_literal.dart
index 6200e67..b89ceec 100644
--- a/pkg/compiler/test/rti/emission/map_literal.dart
+++ b/pkg/compiler/test/rti/emission/map_literal.dart
@@ -9,7 +9,7 @@
 /*class: global#LinkedHashMap:*/
 /*class: global#JsLinkedHashMap:checks=[],instance*/
 
-/*spec.class: global#double:checkedInstance,checks=[],instance,typeArgument*/
+/*spec.class: global#double:checkedInstance,checks=[],instance,onlyForRti,typeArgument*/
 
 /*class: global#JSDouble:checks=[],instance*/
 
diff --git a/pkg/compiler/test/rti/emission/mixin_subtype.dart b/pkg/compiler/test/rti/emission/mixin_subtype.dart
index 168c6da..adf0e05 100644
--- a/pkg/compiler/test/rti/emission/mixin_subtype.dart
+++ b/pkg/compiler/test/rti/emission/mixin_subtype.dart
@@ -12,19 +12,19 @@
 
 // A mixin with multiple super-types and implemented types.
 
-/*class: A:checkedInstance,checks=[],typeArgument*/
+/*class: A:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class A {}
 
-/*class: B:checkedInstance,checks=[],typeArgument*/
+/*class: B:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class B {}
 
-/*class: I:checkedInstance,checks=[],typeArgument*/
+/*class: I:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class I {}
 
-/*class: J:checkedInstance,checks=[],typeArgument*/
+/*class: J:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class J {}
 
-/*class: M1:checkedInstance,checks=[$isA,$isB,$isI,$isJ],typeArgument*/
+/*class: M1:checkedInstance,checks=[$isA,$isB,$isI,$isJ],onlyForRti,typeArgument*/
 mixin M1 on A, B implements I, J {}
 
 /*class: M2:checkedInstance,checks=[$isA,$isB,$isI,$isJ],typeArgument*/
@@ -42,13 +42,13 @@
 /*class: C:checkedInstance,checks=[$isA,$isB],indirectInstance,typeArgument*/
 class C implements A, B {}
 
-/*class: D1:checkedInstance,checks=[$isI,$isJ,$isM1],typeArgument*/
+/*class: D1:checkedInstance,checks=[$isI,$isJ,$isM1],onlyForRti,typeArgument*/
 class D1 = C with M1;
 
 /*class: D2:checkedInstance,checks=[$isI,$isJ],instance,typeArgument*/
 class D2 = C with M2;
 
-/*class: D3:checkedInstance,checks=[$isI,$isJ,$isM3],typeArgument*/
+/*class: D3:checkedInstance,checks=[$isI,$isJ,$isM3],onlyForRti,typeArgument*/
 class D3 = C with M3;
 
 /*class: D4:checkedInstance,checks=[$isI,$isJ],instance,typeArgument*/
@@ -61,25 +61,25 @@
 class E5 extends D5 {}
 
 // Same, with generics.
-/*class: GA:checkedInstance,checks=[],typeArgument*/
+/*class: GA:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class GA<T> {}
 
-/*class: GB:checkedInstance,checks=[],typeArgument*/
+/*class: GB:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class GB<T> {}
 
-/*class: GI:checkedInstance,checks=[],typeArgument*/
+/*class: GI:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class GI<T> {}
 
-/*class: GJ:checkedInstance,checks=[],typeArgument*/
+/*class: GJ:checkedInstance,checks=[],onlyForRti,typeArgument*/
 class GJ<T> {}
 
-/*class: GM:checkedInstance,checks=[$isGA,$isGB,$isGI,$isGJ],typeArgument*/
+/*class: GM:checkedInstance,checks=[$isGA,$isGB,$isGI,$isGJ],onlyForRti,typeArgument*/
 mixin GM<T> on GA<T>, GB<List<T>> implements GI<Iterable<T>>, GJ<Set<T>> {}
 
-/*class: GC:checkedInstance,checks=[$isGA,$isGB],typeArgument*/
+/*class: GC:checkedInstance,checks=[$isGA,$isGB],onlyForRti,typeArgument*/
 class GC<T> implements GA<T>, GB<List<T>> {}
 
-/*class: GD:checkedInstance,checks=[$isGI,$isGJ,$isGM],typeArgument*/
+/*class: GD:checkedInstance,checks=[$isGI,$isGJ,$isGM],onlyForRti,typeArgument*/
 class GD<T> = GC<T> with GM<T>;
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/emission/mixin_type_arguments.dart b/pkg/compiler/test/rti/emission/mixin_type_arguments.dart
index 8a62cab..dd2a28b 100644
--- a/pkg/compiler/test/rti/emission/mixin_type_arguments.dart
+++ b/pkg/compiler/test/rti/emission/mixin_type_arguments.dart
@@ -6,22 +6,22 @@
 
 import 'package:expect/expect.dart' show Expect;
 
-/*class: A:checks=[],typeArgument*/
+/*class: A:checks=[],onlyForRti,typeArgument*/
 class A {}
 
-/*class: B:checks=[],typeArgument*/
+/*class: B:checks=[],onlyForRti,typeArgument*/
 class B {}
 
-/*class: C:checks=[],typeArgument*/
+/*class: C:checks=[],onlyForRti,typeArgument*/
 class C {}
 
-/*class: D:checks=[],typeArgument*/
+/*class: D:checks=[],onlyForRti,typeArgument*/
 class D {}
 
-/*class: E:checks=[],typeArgument*/
+/*class: E:checks=[],onlyForRti,typeArgument*/
 class E {}
 
-/*class: F:checks=[],typeArgument*/
+/*class: F:checks=[],onlyForRti,typeArgument*/
 class F {}
 
 /*class: M1:checks=[]*/
diff --git a/pkg/compiler/test/rti/emission/optimized_is_check.dart b/pkg/compiler/test/rti/emission/optimized_is_check.dart
new file mode 100644
index 0000000..e652518
--- /dev/null
+++ b/pkg/compiler/test/rti/emission/optimized_is_check.dart
@@ -0,0 +1,84 @@
+// 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.7
+
+// It is sometimes possible to compile is-checks to 'instanceof', when the class
+// is not in an 'implements' clause or used as a mixin.
+
+// This test verifies is-checks work with simple classes that have various
+// degrees of instantiation.
+
+/*class: Instantiated:checks=[],instance,typeArgument*/
+class Instantiated {} // instantiated and used in many ways
+
+/*class: Deferred:checks=[],instance*/
+class Deferred {} // instantiated after first check
+
+class Unused {} // used only in is-check
+
+/*class: Removed:checks=[],onlyForConstructor*/
+class Removed {} // allocated but optimized out of program
+
+/*class: DeferredAndRemoved:checks=[],onlyForConstructor*/
+class DeferredAndRemoved {} // allocated after first check and removed
+
+/*class: UsedAsTypeParameter:checks=[],onlyForRti,typeArgument*/
+class UsedAsTypeParameter {} // only used as a type parameter
+
+/*class: UsedAsTestedTypeParameter:checks=[],onlyForRti,typeArgument*/
+class UsedAsTestedTypeParameter {} // only used as a type parameter
+
+/*class: Check:checks=[],instance*/
+class Check<T> {
+  bool check(x) => x is T;
+}
+
+class Check2<T> {
+  bool check(x) => x is UsedAsTypeParameter;
+}
+
+void main() {
+  var things = List(3);
+  things.setRange(0, 3, [Instantiated(), 1, Object()]);
+
+  var checkX = Check<Instantiated>();
+  var checkU1 = Check<UsedAsTestedTypeParameter>();
+  var checkU2 = Check<UsedAsTypeParameter>();
+
+  // ignore: UNUSED_LOCAL_VARIABLE
+  var removed = Removed(); // This is optimized out.
+
+  // Tests that can be compiled to instanceof:
+  if (things[0] is Instantiated) print('expected');
+  if (things[1] is Instantiated) print('unexpected');
+  if (things[1] is Removed) print('unexpected');
+  if (things[1] is DeferredAndRemoved) print('unexpected');
+  if (things[1] is Deferred) print('unexpected');
+  // Tests that might be optimized to false since there are no allocations:
+  if (things[1] is Unused) print('unexpected');
+  if (things[1] is UsedAsTypeParameter) print('unexpected');
+
+  if (checkX.check(things[0])) print('expected');
+  if (checkX.check(things[1])) print('unexpected');
+  if (checkU1.check(things[1])) print('unexpected');
+  if (checkU2.check(things[1])) print('unexpected');
+
+  // ignore: UNUSED_LOCAL_VARIABLE
+  var removed2 = DeferredAndRemoved(); // This is optimized out.
+
+  // First allocation of Deferred is after the above tests.
+  things.setRange(0, 3, [Instantiated(), 1, Deferred()]);
+
+  // Tests that can be compiled to instanceof:
+  if (things[0] is Instantiated) print('expected');
+  if (things[1] is Instantiated) print('unexpected');
+  if (things[1] is Removed) print('unexpected');
+  if (things[1] is DeferredAndRemoved) print('unexpected');
+  if (things[1] is Deferred) print('unexpected');
+  if (things[2] is Deferred) print('expected');
+  // Tests that might be optimized to false since there are no allocations:
+  if (things[1] is Unused) print('unexpected');
+  if (things[1] is UsedAsTypeParameter) print('unexpected');
+}
diff --git a/pkg/compiler/test/rti/emission/replaced_type_variable.dart b/pkg/compiler/test/rti/emission/replaced_type_variable.dart
index 6d75642..78ae756 100644
--- a/pkg/compiler/test/rti/emission/replaced_type_variable.dart
+++ b/pkg/compiler/test/rti/emission/replaced_type_variable.dart
@@ -14,7 +14,7 @@
   Type get type => T;
 }
 
-/*class: A:checks=[],typeArgument*/
+/*class: A:checks=[],onlyForRti,typeArgument*/
 class A {}
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/emission/runtime_type.dart b/pkg/compiler/test/rti/emission/runtime_type.dart
index 2d2b913..ea9d7cc 100644
--- a/pkg/compiler/test/rti/emission/runtime_type.dart
+++ b/pkg/compiler/test/rti/emission/runtime_type.dart
@@ -7,7 +7,7 @@
 /*class: A:checks=[],instance*/
 class A<T> {}
 
-/*class: B:checks=[],typeArgument*/
+/*class: B:checks=[],onlyForRti,typeArgument*/
 class B<T> {}
 
 main() {
diff --git a/pkg/compiler/test/rti/emission/self.dart b/pkg/compiler/test/rti/emission/self.dart
index bab2585..90d65cb 100644
--- a/pkg/compiler/test/rti/emission/self.dart
+++ b/pkg/compiler/test/rti/emission/self.dart
@@ -4,7 +4,7 @@
 
 // @dart = 2.7
 
-/*class: C:checks=[],instance,typeLiteral*/
+/*class: C:checks=[],instance*/
 class C {}
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/emission/subtype_named_args.dart b/pkg/compiler/test/rti/emission/subtype_named_args.dart
index f21234d..d94bedf 100644
--- a/pkg/compiler/test/rti/emission/subtype_named_args.dart
+++ b/pkg/compiler/test/rti/emission/subtype_named_args.dart
@@ -8,32 +8,32 @@
 
 import 'package:expect/expect.dart';
 
-/*spec.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: A:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A {}
 
-/*spec.class: A1:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: A1:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: A1:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: A1:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A1 {}
 
-/*spec.class: A2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: A2:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: A2:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: A2:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A2 {}
 
-/*spec.class: B:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2],typeArgument*/
-/*prod.class: B:checkedTypeArgument,checks=[$isA,$isA1,$isA2],typeArgument*/
+/*spec.class: B:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2],onlyForRti,typeArgument*/
+/*prod.class: B:checkedTypeArgument,checks=[$isA,$isA1,$isA2],onlyForRti,typeArgument*/
 class B implements A, A1, A2 {}
 
-/*spec.class: C:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],typeArgument*/
-/*prod.class: C:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],typeArgument*/
+/*spec.class: C:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],onlyForRti,typeArgument*/
+/*prod.class: C:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],onlyForRti,typeArgument*/
 class C implements B {}
 
-/*spec.class: D:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],typeArgument*/
-/*prod.class: D:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],typeArgument*/
+/*spec.class: D:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],onlyForRti,typeArgument*/
+/*prod.class: D:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],onlyForRti,typeArgument*/
 class D implements C {}
 
-/*spec.class: G:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: G:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: G:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: G:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class G<T, S, U, W> {}
 
 typedef classesFunc({A a, B b, C c, D d});
@@ -55,23 +55,19 @@
 
 main() {
   Expect.isTrue(
-      /*spec.checks=[$signature],instance*/
-      /*prod.checks=[],instance*/
+      /*checks=[$signature],instance*/
       ({D a, B b, C c, A d}) {} is classesFunc);
   Expect.isTrue(
       /*checks=[$signature],instance*/
       ({A a, A b, A c, A d}) {} is classesFunc);
   Expect.isTrue(
-      /*spec.checks=[$signature],instance*/
-      /*prod.checks=[],instance*/
+      /*checks=[$signature],instance*/
       ({D a, A1 b, A1 c, A1 d}) {} is classesFunc);
   Expect.isTrue(
-      /*spec.checks=[$signature],instance*/
-      /*prod.checks=[],instance*/
+      /*checks=[$signature],instance*/
       ({D a, A2 b, A2 c, A2 d}) {} is classesFunc);
   Expect.isTrue(
-      /*spec.checks=[$signature],instance*/
-      /*prod.checks=[],instance*/
+      /*checks=[$signature],instance*/
       ({D a, D b, D c, D d}) {} is classesFunc);
   Expect.isTrue(
       /*checks=[$signature],instance*/
@@ -85,8 +81,7 @@
       ({Map<num, num> m, List<List<A1>> l, G<A, A1, A1, A1> g}) {}
           is genericsFunc);
   Expect.isTrue(
-      /*spec.checks=[$signature],instance*/
-      /*prod.checks=[],instance*/
+      /*checks=[$signature],instance*/
       ({Map<int, int> m, List<List<D>> l, G<D, D, D, D> g}) {} is genericsFunc);
   Expect.isTrue(
       /*checks=[$signature],instance*/
@@ -96,16 +91,14 @@
       ({Object m, Object l, Object g}) {} is genericsFunc);
 
   Expect.isTrue(
-      /*spec.checks=[$signature],instance*/
-      /*prod.checks=[],instance*/
+      /*checks=[$signature],instance*/
       ({A x, G y, mixFunc z, var v}) {} is dynamicFunc);
   Expect.isTrue(
-      /*spec.checks=[$signature],instance*/
-      /*prod.checks=[],instance*/
+      /*checks=[$signature],instance*/
       ({int x, bool y, List<Map> z, classesFunc v}) {} is dynamicFunc);
 
   Expect.isTrue(
-      /*checks=[],instance*/
+      /*checks=[$signature],instance*/
       (
           {okWithClassesFunc_1 f1,
           okWithGenericsFunc_1 f2,
diff --git a/pkg/compiler/test/rti/emission/superclass.dart b/pkg/compiler/test/rti/emission/superclass.dart
index 74aa29f..8426d4f 100644
--- a/pkg/compiler/test/rti/emission/superclass.dart
+++ b/pkg/compiler/test/rti/emission/superclass.dart
@@ -4,7 +4,7 @@
 
 // @dart = 2.7
 
-/*class: B:checks=[],indirectInstance,typeLiteral*/
+/*class: B:checks=[],indirectInstance*/
 class B {}
 
 /*class: C:checks=[],instance*/
diff --git a/pkg/compiler/test/rti/emission/superclass_complex.dart b/pkg/compiler/test/rti/emission/superclass_complex.dart
index 4513fda..adc95a3 100644
--- a/pkg/compiler/test/rti/emission/superclass_complex.dart
+++ b/pkg/compiler/test/rti/emission/superclass_complex.dart
@@ -4,7 +4,7 @@
 
 // @dart = 2.7
 
-/*class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A<T> {}
 
 /*class: B:checkedInstance,checks=[],indirectInstance*/
diff --git a/pkg/compiler/test/rti/emission/superclass_supertype_complex.dart b/pkg/compiler/test/rti/emission/superclass_supertype_complex.dart
index b6a325b..0601bc9 100644
--- a/pkg/compiler/test/rti/emission/superclass_supertype_complex.dart
+++ b/pkg/compiler/test/rti/emission/superclass_supertype_complex.dart
@@ -4,7 +4,7 @@
 
 // @dart = 2.7
 
-/*class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A<T> {}
 
 /*class: B:checkedInstance*/
diff --git a/pkg/compiler/test/rti/emission/supertype_complex.dart b/pkg/compiler/test/rti/emission/supertype_complex.dart
index d51cf38..c8e26ec 100644
--- a/pkg/compiler/test/rti/emission/supertype_complex.dart
+++ b/pkg/compiler/test/rti/emission/supertype_complex.dart
@@ -4,7 +4,7 @@
 
 // @dart = 2.7
 
-/*class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A<T> {}
 
 /*class: B:checkedInstance*/
diff --git a/pkg/compiler/test/rti/emission/tear_off_types.dart b/pkg/compiler/test/rti/emission/tear_off_types.dart
index a47eaa7..14ac56a 100644
--- a/pkg/compiler/test/rti/emission/tear_off_types.dart
+++ b/pkg/compiler/test/rti/emission/tear_off_types.dart
@@ -16,10 +16,10 @@
   test7();
 }
 
-/*class: A1:checkedTypeArgument,checks=[],typeArgument*/
+/*class: A1:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A1<T> {}
 
-/*class: B1:checks=[],typeArgument*/
+/*class: B1:checks=[],onlyForRti,typeArgument*/
 class B1 extends A1<int> {}
 
 @pragma('dart2js:noInline')
@@ -36,12 +36,12 @@
 @pragma('dart2js:noInline')
 bool _test1(f) => f is A1<int> Function();
 
-/*spec.class: A2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: A2:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: A2:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: A2:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A2<T> {}
 
-/*spec.class: B2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: B2:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: B2:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: B2:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B2 extends A2<int> {}
 
 @pragma('dart2js:noInline')
@@ -58,12 +58,12 @@
 @pragma('dart2js:noInline')
 bool _test2(f) => f is void Function(A2<int>);
 
-/*spec.class: A3:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: A3:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: A3:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: A3:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A3<T> {}
 
-/*spec.class: B3:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
-/*prod.class: B3:checkedTypeArgument,checks=[],typeArgument*/
+/*spec.class: B3:checkedInstance,checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
+/*prod.class: B3:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B3 extends A3<int> {}
 
 @pragma('dart3js:noInline')
@@ -80,10 +80,10 @@
 @pragma('dart3js:noInline')
 _test3(f) => f is void Function(B3);
 
-/*class: A4:checks=[],typeArgument*/
+/*class: A4:checks=[],onlyForRti,typeArgument*/
 class A4<T> {}
 
-/*class: B4:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B4:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B4 extends A4<int> {}
 
 @pragma('dart4js:noInline')
@@ -100,10 +100,10 @@
 @pragma('dart4js:noInline')
 _test4(f) => f is B4 Function();
 
-/*class: A5:checkedTypeArgument,checks=[],typeArgument*/
+/*class: A5:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A5<T> {}
 
-/*class: B5:checks=[],typeArgument*/
+/*class: B5:checks=[],onlyForRti,typeArgument*/
 class B5 extends A5<int> {}
 
 @pragma('dart2js:noInline')
@@ -120,10 +120,10 @@
 @pragma('dart2js:noInline')
 bool _test5(f) => f is void Function(void Function(A5<int>));
 
-/*class: A6:checkedTypeArgument,checks=[],typeArgument*/
+/*class: A6:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A6<T> {}
 
-/*class: B6:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B6:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B6 extends A6<int> {}
 
 @pragma('dart6js:noInline')
@@ -140,10 +140,10 @@
 @pragma('dart6js:noInline')
 _test6(f) => f is void Function(B6) Function();
 
-/*class: A7:checks=[],typeArgument*/
+/*class: A7:checks=[],onlyForRti,typeArgument*/
 class A7<T> {}
 
-/*class: B7:checkedTypeArgument,checks=[],typeArgument*/
+/*class: B7:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class B7 extends A7<int> {}
 
 @pragma('dart7js:noInline')
diff --git a/pkg/compiler/test/rti/emission/type_argument_dynamic.dart b/pkg/compiler/test/rti/emission/type_argument_dynamic.dart
index 8ff02c5..0fb3030 100644
--- a/pkg/compiler/test/rti/emission/type_argument_dynamic.dart
+++ b/pkg/compiler/test/rti/emission/type_argument_dynamic.dart
@@ -6,16 +6,16 @@
 
 import 'package:expect/expect.dart';
 
-/*class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A {}
 
-/*class: B:checks=[$isA],typeArgument*/
+/*class: B:checks=[$isA],onlyForRti,typeArgument*/
 class B implements A {}
 
 /*class: C:checkedInstance,checks=[],instance*/
 class C<T> {}
 
-/*class: D:checks=[],typeArgument*/
+/*class: D:checks=[],onlyForRti,typeArgument*/
 class D {}
 
 /*class: E:checks=[],instance*/
diff --git a/pkg/compiler/test/rti/emission/type_argument_static.dart b/pkg/compiler/test/rti/emission/type_argument_static.dart
index d4d889b..cf1ea59 100644
--- a/pkg/compiler/test/rti/emission/type_argument_static.dart
+++ b/pkg/compiler/test/rti/emission/type_argument_static.dart
@@ -6,16 +6,16 @@
 
 import 'package:expect/expect.dart';
 
-/*class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*class: A:checkedTypeArgument,checks=[],onlyForRti,typeArgument*/
 class A {}
 
-/*class: B:checks=[$isA],typeArgument*/
+/*class: B:checks=[$isA],onlyForRti,typeArgument*/
 class B implements A {}
 
 /*class: C:checkedInstance,checks=[],instance*/
 class C<T> {}
 
-/*class: D:checks=[],typeArgument*/
+/*class: D:checks=[],onlyForRti,typeArgument*/
 class D {}
 
 @pragma('dart2js:noInline')
diff --git a/pkg/compiler/test/rti/emission/type_literal.dart b/pkg/compiler/test/rti/emission/type_literal.dart
index f14bb65..b49f32f 100644
--- a/pkg/compiler/test/rti/emission/type_literal.dart
+++ b/pkg/compiler/test/rti/emission/type_literal.dart
@@ -6,10 +6,10 @@
 
 import 'package:expect/expect.dart';
 
-/*class: Class1:checks=[],typeLiteral*/
+/*class: Class1:checks=[],onlyForRti,typeLiteral*/
 class Class1 {}
 
-/*class: Class2:checks=[],typeLiteral*/
+/*class: Class2:checks=[],onlyForRti,typeLiteral*/
 class Class2<X> {}
 
 void main() {
diff --git a/pkg/compiler/test/rti/rti_emission_test_helper.dart b/pkg/compiler/test/rti/rti_emission_test_helper.dart
index 107c597..3cca1c5 100644
--- a/pkg/compiler/test/rti/rti_emission_test_helper.dart
+++ b/pkg/compiler/test/rti/rti_emission_test_helper.dart
@@ -37,6 +37,8 @@
   static const String isChecks = 'checks';
   static const String indirectInstance = 'indirectInstance';
   static const String directInstance = 'instance';
+  static const String onlyForRti = 'onlyForRti';
+  static const String onlyForConstructor = 'onlyForConstructor';
   static const String checkedInstance = 'checkedInstance';
   static const String typeArgument = 'typeArgument';
   static const String checkedTypeArgument = 'checkedTypeArgument';
@@ -65,6 +67,12 @@
       if (cls.functionTypeIndex != null) {
         features.add(Tags.functionType);
       }
+      if (cls.onlyForRti) {
+        features.add(Tags.onlyForRti);
+      }
+      if (cls.onlyForConstructor) {
+        features.add(Tags.onlyForConstructor);
+      }
     }
     ClassUse classUse = checksBuilder.classUseMapForTesting[element];
     if (classUse != null) {
diff --git a/pkg/dart_internal/CHANGELOG.md b/pkg/dart_internal/CHANGELOG.md
new file mode 100644
index 0000000..d84bdda
--- /dev/null
+++ b/pkg/dart_internal/CHANGELOG.md
@@ -0,0 +1,3 @@
+## 0.1.10
+
+- Support the latest Dart SDK.
diff --git a/pkg/dart_internal/pubspec.yaml b/pkg/dart_internal/pubspec.yaml
index 16c322e..d499299 100644
--- a/pkg/dart_internal/pubspec.yaml
+++ b/pkg/dart_internal/pubspec.yaml
@@ -1,7 +1,6 @@
 name: dart_internal
-version: 0.1.9
-author: "Dart Team <misc@dartlang.org>"
-homepage: http://www.dartlang.org
+version: 0.1.10
+repository: https://github.com/dart-lang/sdk/tree/master/pkg/dart_internal
 description: >
   This package is not intended for wide use. It provides a temporary API to
   solve the problem: "Given an object some generic type A, how do I construct an
@@ -13,7 +12,8 @@
   into 2.0, so this package is provided as a temporary workaround.
 
   We will very likely remove support for this in a later version of Dart.
+
 environment:
   # Restrict the upper bound so that we can remove support for this in a later
   # version of the SDK without it being a breaking change.
-  sdk: ">=2.0.0-dev.12.0 <2.9.0"
+  sdk: ">=2.0.0 <2.10.0"
diff --git a/pkg/dartdev/README.md b/pkg/dartdev/README.md
index 6be1917..f2662cc 100644
--- a/pkg/dartdev/README.md
+++ b/pkg/dartdev/README.md
@@ -24,8 +24,17 @@
 Run "dart help <command>" for more information about a command.
 ```
 
+## Contributing
+
+If you'd like to contribute to the Dart CLI tool, please start by reading the
+[contribution guidelines][contributing] for the Dart project. Then familiarize
+yourself with the [design principles][design] that guide this tool's UX.
+
 ## Features and bugs
 
-Please file feature requests and bugs in the Dart SDK [issue tracker][tracker] with label `area-dart-cli`.
+Please file feature requests and bugs in the Dart SDK [issue tracker][tracker]
+with label `area-dart-cli`.
 
+[contributing]: https://github.com/dart-lang/sdk/blob/master/CONTRIBUTING.md
+[design] https://github.com/dart-lang/sdk/blob/master/pkg/dartdev/doc/design.md
 [tracker]: https://github.com/dart-lang/sdk/labels/area-dart-cli
diff --git a/pkg/dartdev/bin/dartdev.dart b/pkg/dartdev/bin/dartdev.dart
index 1a314e6..4e0f939 100644
--- a/pkg/dartdev/bin/dartdev.dart
+++ b/pkg/dartdev/bin/dartdev.dart
@@ -2,18 +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 'dart:io';
+import 'dart:async';
+import 'dart:isolate';
 
 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);
+Future<void> main(List<String> args, SendPort port) async {
+  await runDartdev(args, port);
 }
diff --git a/pkg/dartdev/doc/design.md b/pkg/dartdev/doc/design.md
new file mode 100644
index 0000000..328ead6
--- /dev/null
+++ b/pkg/dartdev/doc/design.md
@@ -0,0 +1,20 @@
+# Design Principles
+
+The purpose of this document is to capture the design principles that should be
+followed when designing new commands or updating existing ones. The goal is to
+ensure that the dartdev tool provides a consistent UX.
+
+## Status
+
+This is a work in progress. At the moment we are just capturing the ideas that
+are coming out of discussions. They will need to be organized and more fully
+documented at some point.
+
+## Command Arguments
+
+### Default Target
+
+If the command cannot have side effects (such as analyze) then the argument for
+what to operate on should default to the CWD, but if the command can have side
+effects (such as format or fix) then the argument for what to operate on should
+be required.
diff --git a/pkg/dartdev/lib/dartdev.dart b/pkg/dartdev/lib/dartdev.dart
index 3d7bb9c..3056ea5 100644
--- a/pkg/dartdev/lib/dartdev.dart
+++ b/pkg/dartdev/lib/dartdev.dart
@@ -3,10 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:io' as io;
+import 'dart:isolate';
 
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:args/args.dart';
 import 'package:args/command_runner.dart';
+import 'package:dart_style/src/cli/format_command.dart';
 import 'package:cli_util/cli_logging.dart';
 import 'package:nnbd_migration/migration_cli.dart';
 import 'package:usage/usage.dart';
@@ -15,17 +17,18 @@
 import 'src/commands/analyze.dart';
 import 'src/commands/compile.dart';
 import 'src/commands/create.dart';
-import 'src/commands/format.dart';
 import 'src/commands/pub.dart';
 import 'src/commands/run.dart';
 import 'src/commands/test.dart';
 import 'src/core.dart';
 import 'src/experiments.dart';
+import 'src/vm_interop_handler.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 {
+Future<void> runDartdev(List<String> args, SendPort port) async {
+  VmInteropHandler.initialize(port);
   final stopwatch = Stopwatch();
   int result;
 
@@ -68,6 +71,12 @@
     io.exit(0);
   }
 
+  // --launch-dds is provided by the VM if the VM service is to be enabled. In
+  // that case, we need to launch DDS as well.
+  // TODO(bkonyi): add support for pub run (#42726)
+  if (args.contains('--launch-dds')) {
+    RunCommand.launchDds = true;
+  }
   String commandName;
 
   try {
@@ -79,6 +88,22 @@
       args = List.from(args)..remove('--disable-dartdev-analytics');
     }
 
+    // Run also can't be called with '--launch-dds', remove it if it's
+    // contained in args.
+    if (args.contains('--launch-dds')) {
+      args = List.from(args)..remove('--launch-dds');
+    }
+
+    // These flags have a format that can't be handled by package:args, so
+    // while they are valid flags we'll assume the VM has verified them by this
+    // point.
+    args = args
+        .where(
+          (element) => !(element.contains('--observe') ||
+              element.contains('--enable-vm-service')),
+        )
+        .toList();
+
     // Before calling to run, send the first ping to analytics to have the first
     // ping, as well as the command itself, running in parallel.
     if (analytics.enabled) {
@@ -133,7 +158,7 @@
       analytics.enabled = true;
     }
     analytics.close();
-    io.exit(exitCode);
+    VmInteropHandler.exit(exitCode);
   }
 }
 
@@ -166,13 +191,20 @@
         help: 'Disable anonymous analytics for this `dart *` run',
         hide: true);
 
+    // Another hidden flag used by the VM to indicate that DDS should be
+    // launched. Should be removed for all commands other than `run`.
+    argParser.addFlag('launch-dds',
+        negatable: false, hide: true, help: 'Launch DDS.');
+
     addCommand(AnalyzeCommand());
     addCommand(CreateCommand(verbose: verbose));
     addCommand(CompileCommand());
+// Enable experimental `fix` command
+//    addCommand(FixCommand());
     addCommand(FormatCommand());
     addCommand(MigrateCommand(verbose: verbose));
     addCommand(PubCommand());
-    addCommand(RunCommand());
+    addCommand(RunCommand(verbose: verbose));
     addCommand(TestCommand());
   }
 
@@ -192,7 +224,7 @@
         io.stderr.writeln(
             "Error when reading '$firstArg': No such file or directory.");
         // This is the exit code used by the frontend.
-        io.exit(254);
+        VmInteropHandler.exit(254);
       }
     }
 
diff --git a/pkg/dartdev/lib/src/commands/analyze.dart b/pkg/dartdev/lib/src/commands/analyze.dart
index 57d83a5..e78e881 100644
--- a/pkg/dartdev/lib/src/commands/analyze.dart
+++ b/pkg/dartdev/lib/src/commands/analyze.dart
@@ -73,7 +73,7 @@
     });
 
     await analysisCompleter.future;
-
+    await server.dispose();
     progress.finish(showTiming: true);
 
     errors.sort();
diff --git a/pkg/dartdev/lib/src/commands/analyze_impl.dart b/pkg/dartdev/lib/src/commands/analyze_impl.dart
index 0918864..bc3a7bd 100644
--- a/pkg/dartdev/lib/src/commands/analyze_impl.dart
+++ b/pkg/dartdev/lib/src/commands/analyze_impl.dart
@@ -6,6 +6,8 @@
 import 'dart:convert';
 import 'dart:io';
 
+import 'package:analysis_server_client/protocol.dart'
+    show EditBulkFixesResult, ResponseDecoder;
 import 'package:path/path.dart' as path;
 
 import '../core.dart';
@@ -22,18 +24,24 @@
   Process _process;
   final StreamController<bool> _analyzingController =
       StreamController<bool>.broadcast();
+  final StreamController<EditBulkFixesResult> _bulkFixesController =
+      StreamController<EditBulkFixesResult>.broadcast();
   final StreamController<FileAnalysisErrors> _errorsController =
       StreamController<FileAnalysisErrors>.broadcast();
   bool _didServerErrorOccur = false;
 
   int _id = 0;
 
+  String _fixRequestId;
+
   bool get didServerErrorOccur => _didServerErrorOccur;
 
   Stream<bool> get onAnalyzing => _analyzingController.stream;
 
   Stream<FileAnalysisErrors> get onErrors => _errorsController.stream;
 
+  Stream<EditBulkFixesResult> get onBulkFixes => _bulkFixesController.stream;
+
   Future<int> get onExit => _process.exitCode;
 
   Future<void> start() async {
@@ -81,6 +89,13 @@
     });
   }
 
+  void requestBulkFixes(String filePath) {
+    _sendCommand('edit.bulkFixes', <String, dynamic>{
+      'included': [path.canonicalize(filePath)],
+    });
+    _fixRequestId = _id.toString();
+  }
+
   void _sendCommand(String method, Map<String, dynamic> params) {
     final String message = json.encode(<String, dynamic>{
       'id': (++_id).toString(),
@@ -123,6 +138,11 @@
         }
         // Dispose of the process at this point so the process doesn't hang.
         dispose();
+      } else if (response['id'] == _fixRequestId) {
+        var decoder = ResponseDecoder(null);
+        var result =
+            EditBulkFixesResult.fromJson(decoder, 'result', response['result']);
+        _bulkFixesController.add(result);
       }
     }
   }
diff --git a/pkg/dartdev/lib/src/commands/compile.dart b/pkg/dartdev/lib/src/commands/compile.dart
index d79265b..e4d67bd 100644
--- a/pkg/dartdev/lib/src/commands/compile.dart
+++ b/pkg/dartdev/lib/src/commands/compile.dart
@@ -11,6 +11,7 @@
 
 import '../core.dart';
 import '../sdk.dart';
+import '../vm_interop_handler.dart';
 
 const int compileErrorExitCode = 64;
 
@@ -65,6 +66,19 @@
 
   @override
   FutureOr<int> run() async {
+    if (!Sdk.checkArtifactExists(sdk.dart2js)) {
+      return 255;
+    }
+    final String librariesPath = path.absolute(
+      sdk.sdkPath,
+      'lib',
+      'libraries.json',
+    );
+
+    if (!Sdk.checkArtifactExists(librariesPath)) {
+      return 255;
+    }
+
     // We expect a single rest argument; the dart entry point.
     if (argResults.rest.length != 1) {
       log.stderr('Missing Dart entry point.');
@@ -76,9 +90,11 @@
       return -1;
     }
 
-    final process = await startProcess(sdk.dart2js, argResults.arguments);
-    routeToStdout(process);
-    return process.exitCode;
+    VmInteropHandler.run(sdk.dart2js, [
+      '--libraries-spec=$librariesPath',
+      ...argResults.arguments,
+    ]);
+    return 0;
   }
 }
 
@@ -135,6 +151,7 @@
     args.add(path.canonicalize(sourcePath));
 
     log.stdout('Compiling $sourcePath to $commandName file $outputFile.');
+    // TODO(bkonyi): perform compilation in same process.
     final process = await startProcess(sdk.dart, args);
     routeToStdout(process);
     return process.exitCode;
@@ -159,12 +176,12 @@
       )
       ..addMultiOption('define', abbr: 'D', valueHelp: 'key=value', help: '''
 Set values of environment variables. To specify multiple variables, use multiple options or use commas to separate key-value pairs.
-E.g.: dart2native -Da=1,b=2 main.dart''')
+E.g.: dart compile $commandName -Da=1,b=2 main.dart''')
       ..addFlag('enable-asserts',
           negatable: false, help: 'Enable assert statements.')
       ..addOption('packages', abbr: 'p', valueHelp: 'path', help: '''
 Get package locations from the specified file instead of .packages. <path> can be relative or absolute.
-E.g.: dart2native --packages=/tmp/pkgs main.dart
+E.g.: dart compile $commandName --packages=/tmp/pkgs main.dart
 ''')
       ..addOption('save-debugging-info', abbr: 'S', valueHelp: 'path', help: '''
 Remove debugging information from the output and save it separately to the specified file. <path> can be relative or absolute.
@@ -176,6 +193,10 @@
 
   @override
   FutureOr<int> run() async {
+    if (!Sdk.checkArtifactExists(genKernel) ||
+        !Sdk.checkArtifactExists(genSnapshot)) {
+      return 255;
+    }
     // We expect a single rest argument; the dart entry point.
     if (argResults.rest.length != 1) {
       log.stderr('Missing Dart entry point.');
@@ -222,6 +243,12 @@
       fileExt: 'jit',
       formatName: 'app-jit',
     ));
+    addSubcommand(CompileSnapshotCommand(
+      commandName: 'kernel',
+      help: 'to a kernel snapshot',
+      fileExt: 'dill',
+      formatName: 'kernel',
+    ));
     addSubcommand(CompileNativeCommand(
       commandName: 'exe',
       help: 'to a self-contained executable',
diff --git a/pkg/dartdev/lib/src/commands/create.dart b/pkg/dartdev/lib/src/commands/create.dart
index 55d53d8..2a2d424 100644
--- a/pkg/dartdev/lib/src/commands/create.dart
+++ b/pkg/dartdev/lib/src/commands/create.dart
@@ -96,6 +96,9 @@
     );
 
     if (argResults['pub']) {
+      if (!Sdk.checkArtifactExists(sdk.pub)) {
+        return 255;
+      }
       log.stdout('');
       var progress = log.progress('Running pub get');
       var process = await startProcess(
diff --git a/pkg/dartdev/lib/src/commands/fix.dart b/pkg/dartdev/lib/src/commands/fix.dart
new file mode 100644
index 0000000..b0c09b0
--- /dev/null
+++ b/pkg/dartdev/lib/src/commands/fix.dart
@@ -0,0 +1,86 @@
+// 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';
+
+import 'package:analysis_server_client/protocol.dart' hide AnalysisError;
+import 'package:path/path.dart' as path;
+
+import '../core.dart';
+import '../sdk.dart';
+import '../utils.dart';
+import 'analyze_impl.dart';
+
+class FixCommand extends DartdevCommand {
+  FixCommand()
+      : super(
+          'fix', 'Fix Dart source code.',
+          // Experimental.
+          hidden: true,
+        );
+
+  @override
+  FutureOr<int> run() async {
+    log.stdout('\n*** The `fix` command is provisional and subject to change '
+        'or removal in future releases. ***\n');
+
+    if (argResults.rest.length > 1) {
+      usageException('Only one file or directory is expected.');
+    }
+
+    var dir = argResults.rest.isEmpty
+        ? Directory.current
+        : Directory(argResults.rest.single);
+    if (!dir.existsSync()) {
+      usageException("Directory doesn't exist: ${dir.path}");
+    }
+
+    var bulkFixCompleter = Completer<void>();
+    var progress =
+        log.progress('Computing fixes in ${path.basename(dir.path)}');
+
+    var server = AnalysisServer(
+      Directory(sdk.sdkPath),
+      [dir],
+    );
+
+    await server.start();
+    //ignore: unawaited_futures
+    server.onExit.then((int exitCode) {
+      if (!bulkFixCompleter.isCompleted) {
+        bulkFixCompleter.completeError('analysis server exited: $exitCode');
+      }
+    });
+
+    List<SourceFileEdit> edits;
+    server.onBulkFixes.listen((EditBulkFixesResult fixes) {
+      edits = fixes.edits;
+      bulkFixCompleter.complete();
+    });
+    server.requestBulkFixes(dir.absolute.path);
+
+    await bulkFixCompleter.future;
+    await server.dispose();
+    progress.finish(showTiming: true);
+
+    if (edits.isEmpty) {
+      log.stdout('Nothing to fix!');
+    } else {
+      // todo (pq): consider a summary if more than `n` fixes are applied
+      //  (look at `dartfmt`)
+      log.stdout('Applying fixes to:');
+      for (var edit in edits) {
+        var file = File(edit.file);
+        log.stdout('  ${relativePath(file.path, dir)}');
+        var code = file.existsSync() ? file.readAsStringSync() : '';
+        code = SourceEdit.applySequence(code, edit.edits);
+        file.writeAsStringSync(code);
+      }
+      log.stdout('Done.');
+    }
+
+    return 0;
+  }
+}
diff --git a/pkg/dartdev/lib/src/commands/format.dart b/pkg/dartdev/lib/src/commands/format.dart
deleted file mode 100644
index c1dfc60..0000000
--- a/pkg/dartdev/lib/src/commands/format.dart
+++ /dev/null
@@ -1,52 +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 'dart:async';
-
-import '../core.dart';
-import '../sdk.dart';
-
-class FormatCommand extends DartdevCommand {
-  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.
-    argParser
-      ..addFlag('dry-run',
-          abbr: 'n',
-          help: 'Show which files would be modified but make no changes.')
-      ..addFlag('set-exit-if-changed',
-          help: 'Return exit code 1 if there are any formatting changes.')
-      ..addFlag('machine',
-          abbr: 'm', help: 'Produce machine-readable JSON output.')
-      ..addOption('line-length',
-          abbr: 'l',
-          help:
-              'Wrap lines longer than this length. Defaults to 80 characters.',
-          defaultsTo: '80');
-  }
-
-  @override
-  FutureOr<int> run() async {
-    List<String> args = List.from(argResults.arguments);
-
-    // By printing and returning if there are no arguments, this changes the
-    // default unix-pipe behavior of dartfmt:
-    if (args.isEmpty) {
-      printUsage();
-      return 0;
-    }
-
-    // By always adding '--overwrite', the default behavior of dartfmt by
-    // is changed to have the UX of 'flutter format *'.  The flag is not added
-    // if 'dry-run' has been passed as they are not compatible.
-    if (!argResults['dry-run']) {
-      args.add('--overwrite');
-    }
-
-    var process = await startProcess(sdk.dartfmt, args);
-    routeToStdout(process);
-    return process.exitCode;
-  }
-}
diff --git a/pkg/dartdev/lib/src/commands/pub.dart b/pkg/dartdev/lib/src/commands/pub.dart
index c062eb6..94ca988 100644
--- a/pkg/dartdev/lib/src/commands/pub.dart
+++ b/pkg/dartdev/lib/src/commands/pub.dart
@@ -3,13 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:io';
 
 import 'package:args/args.dart';
 
 import '../core.dart';
 import '../experiments.dart';
 import '../sdk.dart';
+import '../vm_interop_handler.dart';
 
 class PubCommand extends DartdevCommand<int> {
   PubCommand() : super('pub', 'Work with packages.');
@@ -22,26 +22,23 @@
     // Override [printUsage] for invocations of 'dart help pub' which won't
     // execute [run] below.  Without this, the 'dart help pub' reports the
     // command pub with no commands or flags.
+    if (!Sdk.checkArtifactExists(sdk.pub)) {
+      return;
+    }
     final command = sdk.pub;
     final args = ['help'];
 
     log.trace('$command ${args.first}');
 
     // Call 'pub help'
-    // Process.runSync(..) is used since [printUsage] is not an async method,
-    // and we want to guarantee that the result (the help text for the console)
-    // is printed before command exits.
-    final result = Process.runSync(command, args);
-    if (result.stderr.isNotEmpty) {
-      stderr.write(result.stderr);
-    }
-    if (result.stdout.isNotEmpty) {
-      stdout.write(result.stdout);
-    }
+    VmInteropHandler.run(command, args);
   }
 
   @override
   FutureOr<int> run() async {
+    if (!Sdk.checkArtifactExists(sdk.pub)) {
+      return 255;
+    }
     final command = sdk.pub;
     var args = argResults.arguments;
 
@@ -65,12 +62,7 @@
     }
 
     log.trace('$command ${args.join(' ')}');
-
-    // Starting in ProcessStartMode.inheritStdio mode means the child process
-    // can detect support for ansi chars.
-    var process =
-        await Process.start(command, args, mode: ProcessStartMode.inheritStdio);
-
-    return process.exitCode;
+    VmInteropHandler.run(command, args);
+    return 0;
   }
 }
diff --git a/pkg/dartdev/lib/src/commands/run.dart b/pkg/dartdev/lib/src/commands/run.dart
index 6ba76e0..301068b 100644
--- a/pkg/dartdev/lib/src/commands/run.dart
+++ b/pkg/dartdev/lib/src/commands/run.dart
@@ -4,77 +4,167 @@
 
 import 'dart:async';
 import 'dart:convert';
+import 'dart:developer';
 import 'dart:io';
 
 import 'package:args/args.dart';
-import 'package:dds/dds.dart';
 import 'package:path/path.dart';
 
 import '../core.dart';
 import '../experiments.dart';
 import '../sdk.dart';
 import '../utils.dart';
+import '../vm_interop_handler.dart';
 
 class RunCommand extends DartdevCommand<int> {
+  static bool launchDds = false;
+
+  // kErrorExitCode, as defined in runtime/bin/error_exit.h
+  static const errorExitCode = 255;
+
+  // This argument parser is here solely to ensure that VM specific flags are
+  // provided before any command and to provide a more consistent help message
+  // with the rest of the tool.
   @override
-  final ArgParser argParser = ArgParser.allowAnything();
+  final ArgParser argParser = ArgParser(
+    // Don't parse flags after script name.
+    allowTrailingOptions: false,
+  );
 
   @override
   final bool verbose;
 
-  RunCommand({this.verbose = false}) : super('run', '''
-Run a Dart file.''');
+  RunCommand({this.verbose = false})
+      : super(
+          'run',
+          'Run a Dart program.',
+        ) {
+    // NOTE: When updating this list of flags, be sure to add any VM flags to
+    // the list of flags in Options::ProcessVMDebuggingOptions in
+    // runtime/bin/main_options.cc. Failure to do so will result in those VM
+    // options being ignored.
+    argParser
+      ..addSeparator(
+        'Debugging options:',
+      )
+      ..addOption(
+        'observe',
+        help: 'The observe flag is a convenience flag used to run a program '
+            'with a set of common options useful for debugging.',
+        valueHelp: '[<port>[/<bind-address>]]',
+      )
+      ..addSeparator(
+        'Options implied by --observe are currently:',
+      )
+      ..addOption(
+        'enable-vm-service',
+        help: 'Enables the VM service and listens on the specified port for '
+            'connections (default port number is 8181, default bind address '
+            'is localhost).',
+        valueHelp: '[<port>[/<bind-address>]]',
+      )
+      ..addFlag(
+        'pause-isolates-on-exit',
+        help: 'Pause isolates on exit when '
+            'running with --enable-vm-service.',
+      )
+      ..addFlag(
+        'pause-isolates-on-unhandled-exceptions',
+        help: 'Pause isolates when an unhandled exception is encountered '
+            'when running with --enable-vm-service.',
+      )
+      ..addFlag(
+        'warn-on-pause-with-no-debugger',
+        help: 'Print a warning when an isolate pauses with no attached debugger'
+            ' when running with --enable-vm-service.',
+      )
+      ..addSeparator(
+        'Other debugging options include:',
+      )
+      ..addFlag(
+        'pause-isolates-on-start',
+        help: 'Pause isolates on start when '
+            'running with --enable-vm-service.',
+      )
+      ..addFlag(
+        'enable-asserts',
+        help: 'Enable assert statements.',
+      );
+
+    if (verbose) {
+      argParser
+        ..addSeparator(
+          'Advanced options:',
+        );
+    }
+    argParser
+      ..addFlag(
+        'disable-service-auth-codes',
+        hide: !verbose,
+        negatable: false,
+        help: 'Disables the requirement for an authentication code to '
+            'communicate with the VM service. Authentication codes help '
+            'protect against CSRF attacks, so it is not recommended to '
+            'disable them unless behind a firewall on a secure device.',
+      )
+      ..addFlag(
+        'enable-service-port-fallback',
+        hide: !verbose,
+        negatable: false,
+        help: 'When the VM service is told to bind to a particular port, '
+            'fallback to 0 if it fails to bind instread of failing to '
+            'start.',
+      )
+      ..addOption(
+        'namespace',
+        hide: !verbose,
+        valueHelp: 'path',
+        help: 'The path to a directory that dart:io calls will treat as the '
+            'root of the filesystem.',
+      )
+      ..addOption(
+        'root-certs-file',
+        hide: !verbose,
+        valueHelp: 'path',
+        help: 'The path to a file containing the trusted root certificates '
+            'to use for secure socket connections.',
+      )
+      ..addOption(
+        'root-certs-cache',
+        hide: !verbose,
+        valueHelp: 'path',
+        help: 'The path to a cache directory containing the trusted root '
+            'certificates to use for secure socket connections.',
+      )
+      ..addFlag(
+        'trace-loading',
+        hide: !verbose,
+        negatable: false,
+        help: 'Enables tracing of library and script loading.',
+      );
+  }
 
   @override
   String get invocation => '${super.invocation} <dart file | package target>';
 
   @override
-  void printUsage() {
-    // Override [printUsage] for invocations of 'dart help run' which won't
-    // execute [run] below.  Without this, the 'dart help run' reports the
-    // command pub with no commands or flags.
-    final command = sdk.dart;
-    final args = [
-      '--disable-dart-dev',
-      '--help',
-      if (verbose) '--verbose',
-    ];
-
-    log.trace('$command ${args.first}');
-
-    // Call 'dart --help'
-    // Process.runSync(..) is used since [printUsage] is not an async method,
-    // and we want to guarantee that the result (the help text for the console)
-    // is printed before command exits.
-    final result = Process.runSync(command, args);
-    if (result.stderr.isNotEmpty) {
-      stderr.write(result.stderr);
-    }
-    if (result.stdout.isNotEmpty) {
-      stdout.write(result.stdout);
-    }
-  }
-
-  @override
   FutureOr<int> run() async {
     // The command line arguments after 'run'
     var args = argResults.arguments.toList();
 
-    var argsContainFileOrHelp = false;
+    var argsContainFile = false;
     for (var arg in args) {
       // The arg.contains('.') matches a file name pattern, i.e. some 'foo.dart'
-      if (arg.contains('.') ||
-          arg == '--help' ||
-          arg == '-h' ||
-          arg == 'help') {
-        argsContainFileOrHelp = true;
-        break;
+      if (arg.contains('.')) {
+        argsContainFile = true;
+      } else if (arg == '--help' || arg == '-h' || arg == 'help') {
+        printUsage();
+        return 0;
       }
     }
 
     final cwd = Directory.current;
-
-    if (!argsContainFileOrHelp && cwd.existsSync()) {
+    if (!argsContainFile && cwd.existsSync()) {
       var foundImplicitFileToRun = false;
       var cwdName = cwd.name;
       for (var entity in cwd.listSync(followLinks: false)) {
@@ -100,6 +190,7 @@
           'Could not find the implicit file to run: '
           'bin$separator$cwdName.dart.',
         );
+        return errorExitCode;
       }
     }
 
@@ -117,213 +208,60 @@
     // service intermediary which implements the VM service protocol and
     // provides non-VM specific extensions (e.g., log caching, client
     // synchronization).
-    if (args.any((element) =>
-        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;
+    // TODO(bkonyi): Handle race condition made possible by Observatory
+    // listening message being printed to console before DDS is started.
+    // See https://github.com/dart-lang/sdk/issues/42727
+    launchDds = false;
+    _DebuggingSession debugSession;
+    if (launchDds) {
+      debugSession = _DebuggingSession();
+      if (!await debugSession.start()) {
+        return errorExitCode;
+      }
     }
+
+    var path = args.firstWhere((e) => !e.startsWith('-'));
+    final pathIndex = args.indexOf(path);
+    final runArgs = (pathIndex + 1 == args.length)
+        ? <String>[]
+        : args.sublist(pathIndex + 1);
+    try {
+      path = Uri.parse(path).toFilePath();
+    } catch (_) {}
+    VmInteropHandler.run(path, runArgs);
+    return 0;
   }
 }
 
 class _DebuggingSession {
-  _DebuggingSession(this._runCommand, List<String> args)
-      : _args = args.toList() {
-    // Process flags that are meant to configure the VM service HTTP server or
-    // dump VM service connection information to a file. Since the VM service
-    // clients won't actually be connecting directly to the service, we'll make
-    // DDS appear as if it is the actual VM service.
-    for (final arg in _args) {
-      final isObserve = arg.startsWith('--observe');
-      if (isObserve || arg.startsWith('--enable-vm-service')) {
-        if (isObserve) {
-          _observe = true;
-        }
-        if (arg.contains('=') || arg.contains(':')) {
-          // These flags can be provided by the embedder so we need to check for
-          // both `=` and `:` separators.
-          final observatoryBindInfo =
-              (arg.contains('=') ? arg.split('=') : arg.split(':'))[1]
-                  .split('/');
-          _port = int.tryParse(observatoryBindInfo.first) ?? 0;
-          if (observatoryBindInfo.length > 1) {
-            try {
-              _bindAddress = Uri.http(observatoryBindInfo[1], '');
-            } on FormatException {
-              // TODO(bkonyi): log invalid parse? The VM service just ignores
-              // bad input flags.
-              // Ignore.
-            }
-          }
-        }
-      } else if (arg.startsWith('--write-service-info=')) {
-        try {
-          final split = arg.split('=');
-          if (split[1].isNotEmpty) {
-            _serviceInfoUri = Uri.parse(split[1]);
-          } else {
-            _runCommand.usageException(
-                'Invalid URI argument to --write-service-info: "${split[1]}"');
-          }
-        } on FormatException {
-          // TODO(bkonyi): log invalid parse? The VM service just ignores bad
-          // input flags.
-          // Ignore.
-        }
-      } else if (arg == '--disable-service-auth-codes') {
-        _disableServiceAuthCodes = true;
-      }
+  Future<bool> start() async {
+    final serviceInfo = await Service.getInfo();
+    final ddsSnapshot = (dirname(sdk.dart).endsWith('bin'))
+        ? sdk.ddsSnapshot
+        : absolute(dirname(sdk.dart), 'gen', 'dds.dart.snapshot');
+    if (!Sdk.checkArtifactExists(ddsSnapshot)) {
+      return false;
     }
-
-    // Strip --observe and --write-service-info from the arguments as we'll be
-    // providing our own.
-    _args.removeWhere(
-      (arg) =>
-          arg.startsWith('--observe') ||
-          arg.startsWith('--enable-vm-service') ||
-          arg.startsWith('--write-service-info'),
-    );
-  }
-
-  FutureOr<int> start() async {
-    // Output the service information for the target process to a temporary
-    // file so we can avoid scraping stderr for the service URI.
-    final serviceInfoDir =
-        await Directory.systemTemp.createTemp('dart_service');
-    final serviceInfoUri = serviceInfoDir.uri.resolve('service_info.json');
-    final serviceInfoFile = await File.fromUri(serviceInfoUri).create();
-
-    // Start using ProcessStartMode.normal and forward stdio manually as we
-    // need to filter the true VM service URI and replace it with the DDS URI.
-    _process = await Process.start(
-      sdk.dart,
-      [
-        '--disable-dart-dev',
-        // We don't care which port the VM service binds to.
-        _observe ? '--observe=0' : '--enable-vm-service=0',
-        '--write-service-info=$serviceInfoUri',
-        ..._args,
-      ],
-    );
-    _forwardAndFilterStdio(_process);
-
-    // Start DDS once the VM service has finished starting up.
-    await Future.any([
-      _waitForRemoteServiceUri(serviceInfoFile).then(_startDDS),
-      _process.exitCode,
-    ]);
-
-    return _process.exitCode.then((exitCode) async {
-      // Shutdown DDS if it was started and wait for the process' stdio streams
-      // to close so we don't truncate program output.
-      await Future.wait([
-        if (_dds != null) _dds.shutdown(),
-        _stderrDone,
-        _stdoutDone,
-      ]);
-      return exitCode;
+    final process = await Process.start(
+        sdk.dart,
+        [
+          if (dirname(sdk.dart).endsWith('bin'))
+            sdk.ddsSnapshot
+          else
+            absolute(dirname(sdk.dart), 'gen', 'dds.dart.snapshot'),
+          serviceInfo.serverUri.toString()
+        ],
+        mode: ProcessStartMode.detachedWithStdio);
+    final completer = Completer<void>();
+    StreamSubscription sub;
+    sub = process.stderr.transform(utf8.decoder).listen((event) {
+      if (event == 'DDS started') {
+        sub.cancel();
+        completer.complete();
+      }
     });
+
+    await completer.future;
+    return true;
   }
-
-  Future<Uri> _waitForRemoteServiceUri(File serviceInfoFile) async {
-    // Wait for VM service to write its connection info to disk.
-    while (await serviceInfoFile.length() <= 5) {
-      await Future.delayed(const Duration(milliseconds: 50));
-    }
-    final serviceInfoStr = await serviceInfoFile.readAsString();
-    return Uri.parse(jsonDecode(serviceInfoStr)['uri']);
-  }
-
-  Future<void> _startDDS(Uri remoteVmServiceUri) async {
-    _dds = await DartDevelopmentService.startDartDevelopmentService(
-      remoteVmServiceUri,
-      serviceUri: _bindAddress.replace(port: _port),
-      enableAuthCodes: !_disableServiceAuthCodes,
-    );
-    if (_serviceInfoUri != null) {
-      // Output the service connection information.
-      await File.fromUri(_serviceInfoUri).writeAsString(
-        json.encode({
-          'uri': _dds.uri.toString(),
-        }),
-      );
-    }
-    _ddsCompleter.complete();
-  }
-
-  void _forwardAndFilterStdio(Process process) {
-    // Since VM service clients cannot connect to the real VM service once DDS
-    // has started, replace all instances of the real VM service's URI with the
-    // DDS URI. Clients should only know that they are connected to DDS if they
-    // explicitly request that information via the protocol.
-    String filterObservatoryUri(String msg) {
-      if (_dds == null) {
-        return msg;
-      }
-      if (msg.contains('Observatory listening on') ||
-          msg.contains('Connect to Observatory at')) {
-        // Search for the VM service URI in the message and replace it.
-        msg = msg.replaceFirst(
-          RegExp(r'https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.'
-              r'[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)'),
-          _dds.uri.toString(),
-        );
-      }
-      return msg;
-    }
-
-    // Wait for DDS to start before handling any stdio events from the target
-    // to ensure we don't let any unfiltered messages slip through.
-    // TODO(bkonyi): consider filtering on bytes rather than decoding the UTF8.
-    _stderrDone = process.stderr
-        .transform(const Utf8Decoder(allowMalformed: true))
-        .listen((event) async {
-      await _waitForDDS();
-      stderr.write(filterObservatoryUri(event));
-    }).asFuture();
-
-    _stdoutDone = process.stdout
-        .transform(const Utf8Decoder(allowMalformed: true))
-        .listen((event) async {
-      await _waitForDDS();
-      stdout.write(filterObservatoryUri(event));
-    }).asFuture();
-
-    stdin.listen(
-      (event) async {
-        await _waitForDDS();
-        process.stdin.add(event);
-      },
-    );
-  }
-
-  Future<void> _waitForDDS() async {
-    if (!_ddsCompleter.isCompleted) {
-      // No need to wait for DDS if the process has already exited.
-      await Future.any([
-        _ddsCompleter.future,
-        _process.exitCode,
-      ]);
-    }
-  }
-
-  Uri _bindAddress = Uri.http('127.0.0.1', '');
-  bool _disableServiceAuthCodes = false;
-  DartDevelopmentService _dds;
-  bool _observe = false;
-  int _port = 8181;
-  Process _process;
-  Uri _serviceInfoUri;
-  Future _stderrDone;
-  Future _stdoutDone;
-
-  final List<String> _args;
-  final Completer<void> _ddsCompleter = Completer();
-  final RunCommand _runCommand;
 }
diff --git a/pkg/dartdev/lib/src/commands/test.dart b/pkg/dartdev/lib/src/commands/test.dart
index ccc8268..cf40ee1 100644
--- a/pkg/dartdev/lib/src/commands/test.dart
+++ b/pkg/dartdev/lib/src/commands/test.dart
@@ -3,13 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:io';
 
 import 'package:args/args.dart';
 
 import '../core.dart';
 import '../experiments.dart';
 import '../sdk.dart';
+import '../vm_interop_handler.dart';
 
 class TestCommand extends DartdevCommand<int> {
   TestCommand() : super('test', 'Runs tests in this project.');
@@ -19,29 +19,34 @@
 
   @override
   void printUsage() {
+    if (!Sdk.checkArtifactExists(sdk.pub)) {
+      return;
+    }
+    if ((project.packageConfig != null) &&
+        !project.packageConfig.hasDependency('test')) {
+      _printPackageTestInstructions();
+    }
     final command = sdk.pub;
     final args = ['run', 'test', '--help'];
 
     log.trace('$command ${args.join(' ')}');
-
-    final result = Process.runSync(command, args);
-    if (result.stderr.isNotEmpty) {
-      stderr.write(result.stderr);
-    }
-    if (result.stdout.isNotEmpty) {
-      stdout.write(result.stdout);
-    }
-
-    // "Could not find package "test". Did you forget to add a dependency?"
-    if (result.exitCode == 65 && project.hasPackageConfigFile) {
-      if (!project.packageConfig.hasDependency('test')) {
-        _printPackageTestInstructions();
-      }
-    }
+    VmInteropHandler.run(command, args);
   }
 
   @override
   FutureOr<int> run() async {
+    if (!Sdk.checkArtifactExists(sdk.pub)) {
+      return 255;
+    }
+    // "Could not find package "test". Did you forget to add a dependency?"
+    if (project.hasPackageConfigFile) {
+      if ((project.packageConfig != null) &&
+          !project.packageConfig.hasDependency('test')) {
+        _printPackageTestInstructions();
+        return 65;
+      }
+    }
+
     final command = sdk.pub;
     final testArgs = argResults.arguments.toList();
 
@@ -54,22 +59,8 @@
     ];
 
     log.trace('$command ${args.join(' ')}');
-
-    // Starting in ProcessStartMode.inheritStdio mode means the child process
-    // can detect support for ansi chars.
-    var process =
-        await Process.start(command, args, mode: ProcessStartMode.inheritStdio);
-
-    int exitCode = await process.exitCode;
-
-    // "Could not find package "test". Did you forget to add a dependency?"
-    if (exitCode == 65 && project.hasPackageConfigFile) {
-      if (!project.packageConfig.hasDependency('test')) {
-        _printPackageTestInstructions();
-      }
-    }
-
-    return exitCode;
+    VmInteropHandler.run(command, args);
+    return 0;
   }
 
   void _printPackageTestInstructions() {
diff --git a/pkg/dartdev/lib/src/sdk.dart b/pkg/dartdev/lib/src/sdk.dart
index 8481714..ec20cc8 100644
--- a/pkg/dartdev/lib/src/sdk.dart
+++ b/pkg/dartdev/lib/src/sdk.dart
@@ -6,6 +6,8 @@
 
 import 'package:path/path.dart' as path;
 
+import 'core.dart';
+
 final Sdk sdk = Sdk();
 
 String get _computeSdkPath {
@@ -46,14 +48,48 @@
   String get dart => Platform.resolvedExecutable;
 
   String get analysisServerSnapshot => path.absolute(
-      sdkPath, 'bin', 'snapshots', 'analysis_server.dart.snapshot');
+        sdkPath,
+        'bin',
+        'snapshots',
+        'analysis_server.dart.snapshot',
+      );
 
-  String get dart2js => path.absolute(sdkPath, 'bin', _binName('dart2js'));
+  String get dart2js => path.absolute(
+        sdkPath,
+        'bin',
+        'snapshots',
+        'dart2js.dart.snapshot',
+      );
 
-  String get dartfmt => path.absolute(sdkPath, 'bin', _binName('dartfmt'));
+  String get dartfmt => path.absolute(
+        sdkPath,
+        'bin',
+        _binName('dartfmt'),
+      );
 
-  String get pub => path.absolute(sdkPath, 'bin', _binName('pub'));
+  String get ddsSnapshot => path.absolute(
+        sdkPath,
+        'bin',
+        'snapshots',
+        'dds.dart.snapshot',
+      );
+
+  String get pub => path.absolute(
+        sdkPath,
+        'bin',
+        'snapshots',
+        'pub.dart.snapshot',
+      );
 
   static String _binName(String base) =>
       Platform.isWindows ? '$base.bat' : base;
+
+  static bool checkArtifactExists(String path) {
+    if (!File(path).existsSync()) {
+      log.stderr('Could not find $path. Have you built the full '
+          'Dart SDK?');
+      return false;
+    }
+    return true;
+  }
 }
diff --git a/pkg/dartdev/lib/src/utils.dart b/pkg/dartdev/lib/src/utils.dart
index a4ec262..be9dcfb 100644
--- a/pkg/dartdev/lib/src/utils.dart
+++ b/pkg/dartdev/lib/src/utils.dart
@@ -8,6 +8,15 @@
 /// Emit the given word with the correct pluralization.
 String pluralize(String word, int count) => count == 1 ? word : '${word}s';
 
+/// Make an absolute [filePath] relative to [dir] (for display purposes).
+String relativePath(String filePath, Directory dir) {
+  var root = dir.absolute.path;
+  if (filePath.startsWith(root)) {
+    return filePath.substring(root.length + 1);
+  }
+  return filePath;
+}
+
 /// String utility to trim some suffix from the end of a [String].
 String trimEnd(String s, String suffix) {
   if (s != null && suffix != null && suffix.isNotEmpty && s.endsWith(suffix)) {
diff --git a/pkg/dartdev/lib/src/vm_interop_handler.dart b/pkg/dartdev/lib/src/vm_interop_handler.dart
new file mode 100644
index 0000000..fcf419c
--- /dev/null
+++ b/pkg/dartdev/lib/src/vm_interop_handler.dart
@@ -0,0 +1,41 @@
+// 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:isolate';
+
+/// Contains methods used to communicate DartDev results back to the VM.
+abstract class VmInteropHandler {
+  /// Initializes [VmInteropHandler] to utilize [port] to communicate with the
+  /// VM.
+  static void initialize(SendPort port) => _port = port;
+
+  /// Notifies the VM to run [script] with [args] upon DartDev exit.
+  static void run(String script, List<String> args) {
+    assert(_port != null);
+    if (_port == null) return;
+    final message = List<dynamic>.filled(3, null)
+      ..[0] = _kResultRun
+      ..[1] = script
+      // Copy the list so it doesn't get GC'd underneath us.
+      ..[2] = args.toList();
+    _port.send(message);
+  }
+
+  /// Notifies the VM that DartDev has completed running. If provided a
+  /// non-zero [exitCode], the VM will terminate with the given exit code.
+  static void exit(int exitCode) {
+    assert(_port != null);
+    if (_port == null) return;
+    final message = List<dynamic>.filled(2, null)
+      ..[0] = _kResultExit
+      ..[1] = exitCode;
+    _port.send(message);
+  }
+
+  // Note: keep in sync with runtime/bin/dartdev_isolate.h
+  static const int _kResultRun = 1;
+  static const int _kResultExit = 2;
+
+  static SendPort _port;
+}
diff --git a/pkg/dartdev/pubspec.yaml b/pkg/dartdev/pubspec.yaml
index 061f6fa..a1e7fe2 100644
--- a/pkg/dartdev/pubspec.yaml
+++ b/pkg/dartdev/pubspec.yaml
@@ -7,7 +7,7 @@
   sdk: '>=2.6.0 <3.0.0'
 dependencies:
   args: ^1.6.0
-  cli_util: ^0.1.4
+  cli_util: '>=0.1.4 <0.3.0'
   dart2native:
     path: ../dart2native
   dds:
diff --git a/pkg/dartdev/test/commands/compile_test.dart b/pkg/dartdev/test/commands/compile_test.dart
index 489181d..2daa5f2 100644
--- a/pkg/dartdev/test/commands/compile_test.dart
+++ b/pkg/dartdev/test/commands/compile_test.dart
@@ -159,6 +159,29 @@
     expect(result.exitCode, 0);
   });
 
+  test('Compile and run kernel snapshot', () {
+    final p = project(mainSrc: 'void main() { print("I love kernel"); }');
+    final outFile = path.join(p.dirPath, 'main.dill');
+    var result = p.runSync(
+      'compile',
+      [
+        'kernel',
+        '-o',
+        outFile,
+        p.relativeFilePath,
+      ],
+    );
+    expect(File(outFile).existsSync(), true,
+        reason: 'File not found: $outFile');
+    expect(result.stderr, isEmpty);
+    expect(result.exitCode, 0);
+
+    result = p.runSync('run', ['main.dill']);
+    expect(result.stdout, contains('I love kernel'));
+    expect(result.stderr, isEmpty);
+    expect(result.exitCode, 0);
+  });
+
   test('Compile JS', () {
     final p = project(mainSrc: "void main() { print('Hello from JS'); }");
     final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath));
diff --git a/pkg/dartdev/test/commands/fix_test.dart b/pkg/dartdev/test/commands/fix_test.dart
new file mode 100644
index 0000000..4da8ddb
--- /dev/null
+++ b/pkg/dartdev/test/commands/fix_test.dart
@@ -0,0 +1,15 @@
+// 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:test/test.dart';
+
+import '../utils.dart';
+
+void main() {
+  group('fix', defineFix, timeout: longTimeout);
+}
+
+void defineFix() {
+  // todo (pq): add tests when the `fix` command is enabled.
+}
diff --git a/pkg/dartdev/test/commands/flag_test.dart b/pkg/dartdev/test/commands/flag_test.dart
index 748240f..90a9040 100644
--- a/pkg/dartdev/test/commands/flag_test.dart
+++ b/pkg/dartdev/test/commands/flag_test.dart
@@ -79,7 +79,9 @@
     var result = p.runSync('--help', ['--verbose']);
 
     expect(result.exitCode, 0);
-    expect(result.stdout, contains('migrate '));
+    expect(result.stdout, isEmpty);
+    expect(result.stderr,
+        contains('The following options are only used for VM development'));
   });
 
   test('--help -v', () {
@@ -87,6 +89,42 @@
     var result = p.runSync('--help', ['-v']);
 
     expect(result.exitCode, 0);
+    expect(result.stdout, isEmpty);
+    expect(result.stderr,
+        contains('The following options are only used for VM development'));
+  });
+
+  test('help', () {
+    p = project();
+    var result = p.runSync('help', []);
+
+    expect(result.exitCode, 0);
+    expect(result.stderr, isEmpty);
+    expect(result.stdout, contains(DartdevRunner.dartdevDescription));
+    expect(result.stdout,
+        contains('Usage: dart [<vm-flags>] <command|dart-file> [<arguments>]'));
+    expect(result.stdout, contains('Global options:'));
+    expect(result.stdout, contains('Available commands:'));
+    expect(result.stdout, contains('analyze '));
+    expect(result.stdout, contains('create '));
+    expect(result.stdout, contains('compile '));
+    expect(result.stdout, contains('format '));
+    expect(result.stdout, contains('migrate '));
+  });
+
+  test('help --verbose', () {
+    p = project();
+    var result = p.runSync('help', ['--verbose']);
+
+    expect(result.exitCode, 0);
+    expect(result.stdout, contains('migrate '));
+  });
+
+  test('help -v', () {
+    p = project();
+    var result = p.runSync('help', ['-v']);
+
+    expect(result.exitCode, 0);
     expect(result.stdout, contains('migrate '));
   });
 }
diff --git a/pkg/dartdev/test/commands/format_test.dart b/pkg/dartdev/test/commands/format_test.dart
index 1b68d98..1045907 100644
--- a/pkg/dartdev/test/commands/format_test.dart
+++ b/pkg/dartdev/test/commands/format_test.dart
@@ -17,22 +17,14 @@
 
   tearDown(() => p?.dispose());
 
-  test('implicit --help', () {
-    p = project();
-    var result = p.runSync('format', []);
-    expect(result.exitCode, 0);
-    expect(result.stderr, isEmpty);
-    expect(result.stdout, contains('Format Dart source code.'));
-    expect(result.stdout, contains('Usage: dart format [arguments]'));
-  });
-
   test('--help', () {
     p = project();
     var result = p.runSync('format', ['--help']);
     expect(result.exitCode, 0);
     expect(result.stderr, isEmpty);
-    expect(result.stdout, contains('Format Dart source code.'));
-    expect(result.stdout, contains('Usage: dart format [arguments]'));
+    expect(result.stdout, contains('Idiomatically formats Dart source code.'));
+    expect(result.stdout,
+        contains('Usage: dart format [options...] <files or directories...>'));
   });
 
   test('unchanged', () {
@@ -40,7 +32,7 @@
     ProcessResult result = p.runSync('format', [p.relativeFilePath]);
     expect(result.exitCode, 0);
     expect(result.stderr, isEmpty);
-    expect(result.stdout, startsWith('Unchanged ${p.relativeFilePath}'));
+    expect(result.stdout, startsWith('Formatted 1 file (0 changed) in '));
   });
 
   test('formatted', () {
@@ -48,25 +40,10 @@
     ProcessResult result = p.runSync('format', [p.relativeFilePath]);
     expect(result.exitCode, 0);
     expect(result.stderr, isEmpty);
-    expect(result.stdout, startsWith('Formatted ${p.relativeFilePath}'));
-  });
-
-  test('dry-run changes', () {
-    p = project(mainSrc: 'int get foo =>       1;\n');
-    ProcessResult result =
-        p.runSync('format', ['--dry-run', p.relativeFilePath]);
-    expect(result.exitCode, 0);
-    expect(result.stderr, isEmpty);
-    expect(result.stdout, startsWith(p.relativeFilePath));
-  });
-
-  test('dry-run no changes', () {
-    p = project(mainSrc: 'int get foo => 1;\n');
-    ProcessResult result =
-        p.runSync('format', ['--dry-run', p.relativeFilePath]);
-    expect(result.exitCode, 0);
-    expect(result.stderr, isEmpty);
-    expect(result.stdout, isEmpty);
+    expect(
+        result.stdout,
+        startsWith(
+            'Formatted lib/main.dart\nFormatted 1 file (1 changed) in '));
   });
 
   test('unknown file', () {
@@ -76,6 +53,6 @@
     expect(result.exitCode, 0);
     expect(result.stderr,
         startsWith('No file or directory found at "$unknownFilePath".'));
-    expect(result.stdout, isEmpty);
+    expect(result.stdout, startsWith('Formatted no files in '));
   });
 }
diff --git a/pkg/dartdev/test/commands/run_test.dart b/pkg/dartdev/test/commands/run_test.dart
index ac2527a..38c40c1 100644
--- a/pkg/dartdev/test/commands/run_test.dart
+++ b/pkg/dartdev/test/commands/run_test.dart
@@ -4,6 +4,7 @@
 
 import 'dart:io';
 
+import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 
 import '../utils.dart';
@@ -21,9 +22,9 @@
     p = project();
     var result = p.runSync('run', ['--help']);
 
-    expect(result.stdout, isEmpty);
-    expect(result.stderr, contains('Executes the Dart script'));
-    expect(result.stderr, contains('Common VM flags:'));
+    expect(result.stdout, contains('Run a Dart program.'));
+    expect(result.stdout, contains('Debugging options:'));
+    expect(result.stderr, isEmpty);
     expect(result.exitCode, 0);
   });
 
@@ -82,4 +83,136 @@
         contains('Could not find the implicit file to run: bin'));
     expect(result.exitCode, 255);
   });
+
+  test('arguments are properly passed', () {
+    p = project();
+    p.file('main.dart', 'void main(args) { print(args); }');
+    ProcessResult result = p.runSync('run', [
+      '--enable-experiment=non-nullable',
+      'main.dart',
+      'argument1',
+      'argument2',
+    ]);
+
+    // --enable-experiment and main.dart should not be passed.
+    expect(result.stdout, equals('[argument1, argument2]\n'));
+    expect(result.stderr, isEmpty);
+    expect(result.exitCode, 0);
+  });
+
+  test('with absolute file path', () async {
+    p = project();
+    p.file('main.dart', 'void main(args) { print(args); }');
+    // Test with absolute path
+    final name = path.join(p.dirPath, 'main.dart');
+    final result = p.runSync('run', [
+      '--enable-experiment=non-nullable',
+      name,
+      '--argument1',
+      'argument2',
+    ]);
+
+    // --enable-experiment and main.dart should not be passed.
+    expect(result.stdout, equals('[--argument1, argument2]\n'));
+    expect(result.stderr, isEmpty);
+    expect(result.exitCode, 0);
+  });
+
+  test('with file uri', () async {
+    p = project();
+    p.file('main.dart', 'void main(args) { print(args); }');
+    // Test with File uri
+    final name = path.join(p.dirPath, 'main.dart');
+    final result = p.runSync('run', [
+      '--enable-experiment=non-nullable',
+      Uri.file(name).toString(),
+      '--argument1',
+      'argument2',
+    ]);
+
+    // --enable-experiment and main.dart should not be passed.
+    expect(result.stdout, equals('[--argument1, argument2]\n'));
+    expect(result.stderr, isEmpty);
+    expect(result.exitCode, 0);
+  });
+
+  test('with accepted VM flags', () async {
+    p = project(mainSrc: "void main() { print('Hello World'); }");
+
+    // --observe sets the following flags by default:
+    //   --enable-vm-service
+    //   --pause-isolate-on-exit
+    //   --pause-isolate-on-unhandled-exception
+    //   --warn-on-pause-with-no-debugger
+    //
+    // This test ensures that allowed arguments for dart run which are valid VM
+    // arguments are properly handled by the VM.
+    ProcessResult result = p.runSync('run', [
+      '--observe',
+      '--pause-isolates-on-start',
+      // This should negate the above flag.
+      '--no-pause-isolates-on-start',
+      '--no-pause-isolates-on-exit',
+      '--no-pause-isolates-on-unhandled-exceptions',
+      p.relativeFilePath,
+    ]);
+
+    expect(
+      result.stdout,
+      contains('Observatory listening on'),
+    );
+    expect(result.stderr, isEmpty);
+    expect(result.exitCode, 0);
+  });
+
+  test('fails when provided verbose VM flags', () async {
+    p = project(mainSrc: "void main() { print('Hello World'); }");
+
+    // Any VM flags not listed under 'dart run help --verbose' should be passed
+    // before a dartdev command.
+    ProcessResult result = p.runSync('run', [
+      '--vm-name=foo',
+      p.relativeFilePath,
+    ]);
+
+    expect(result.stdout, isEmpty);
+    expect(
+      result.stderr,
+      contains('Could not find an option named "vm-name".'),
+    );
+    expect(result.exitCode, 64);
+  });
+
+  test('fails when provided unlisted VM flags', () async {
+    p = project(mainSrc: "void main() { print('Hello World'); }");
+
+    // Any VM flags not listed under 'dart run help --verbose' should be passed
+    // before a dartdev command.
+    ProcessResult result = p.runSync('run', [
+      '--verbose_gc',
+      p.relativeFilePath,
+    ]);
+
+    expect(result.stdout, isEmpty);
+    expect(
+      result.stderr,
+      contains('Could not find an option named "verbose_gc".'),
+    );
+    expect(result.exitCode, 64);
+  });
+
+  test('--enable-asserts', () async {
+    p = project(mainSrc: 'void main() { assert(false); }');
+
+    // Ensure --enable-asserts doesn't cause the dartdev isolate to fail to
+    // load. Regression test for: https://github.com/dart-lang/sdk/issues/42831
+    ProcessResult result = p.runSync('run', [
+      '--enable-asserts',
+      p.relativeFilePath,
+    ]);
+
+    expect(result.stdout, isEmpty);
+    expect(result.stderr, contains('Unhandled exception'));
+    expect(result.exitCode, 255);
+  });
 }
diff --git a/pkg/dartdev/test/smoke/implicit_smoke_test.dart b/pkg/dartdev/test/smoke/implicit_smoke_test.dart
new file mode 100644
index 0000000..95053da
--- /dev/null
+++ b/pkg/dartdev/test/smoke/implicit_smoke_test.dart
@@ -0,0 +1,55 @@
+// 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';
+
+const numRuns = 10;
+final script = Platform.script.resolve('smoke.dart').toString();
+
+void main() {
+  group(
+    'implicit dartdev smoke -',
+    () {
+      test('dart smoke.dart', () async {
+        for (int i = 1; i <= numRuns; ++i) {
+          if (i % 5 == 0) {
+            print('Done [$i/$numRuns]');
+          }
+          final result = await Process.run(
+            Platform.executable,
+            [
+              script,
+            ],
+          );
+          expect(result.exitCode, 0);
+          expect(result.stdout, contains('Smoke test!'));
+          expect(result.stderr, isEmpty);
+        }
+      });
+
+      // This test forces dartdev to run implicitly and for
+      // DDS to spawn in a separate process.
+      test('dart --enable-vm-service smoke.dart', () async {
+        for (int i = 1; i <= numRuns; ++i) {
+          if (i % 5 == 0) {
+            print('Done [$i/$numRuns]');
+          }
+          final result = await Process.run(
+            Platform.executable,
+            [
+              '--enable-vm-service=0',
+              script,
+            ],
+          );
+          expect(result.exitCode, 0);
+          expect(result.stdout, contains('Smoke test!'));
+          expect(result.stderr, isEmpty);
+        }
+      });
+    },
+    timeout: Timeout.none,
+  );
+}
diff --git a/pkg/dartdev/test/smoke/invalid_smoke_test.dart b/pkg/dartdev/test/smoke/invalid_smoke_test.dart
new file mode 100644
index 0000000..3c2d61c
--- /dev/null
+++ b/pkg/dartdev/test/smoke/invalid_smoke_test.dart
@@ -0,0 +1,119 @@
+// 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';
+
+const numRuns = 10;
+final script = Platform.script.resolve('smoke.dart').toString();
+
+void main() {
+  group(
+    'implicit dartdev smoke -',
+    () {
+      test('dart invalid.dart', () async {
+        for (int i = 1; i <= numRuns; ++i) {
+          if (i % 5 == 0) {
+            print('Done [$i/$numRuns]');
+          }
+          final result = await Process.run(
+            Platform.executable,
+            [
+              'invalid.dart',
+            ],
+          );
+          expect(result.exitCode, 64);
+          expect(result.stdout, isEmpty);
+          expect(
+            result.stderr,
+            contains(
+              'Error when reading \'invalid.dart\':'
+              ' No such file or directory',
+            ),
+          );
+        }
+      });
+
+      // This test forces dartdev to run implicitly and for
+      // DDS to spawn in a separate process..
+      test('dart --enable-vm-service invalid.dart', () async {
+        for (int i = 1; i <= numRuns; ++i) {
+          if (i % 5 == 0) {
+            print('Done [$i/$numRuns]');
+          }
+          final result = await Process.run(
+            Platform.executable,
+            [
+              '--enable-vm-service=0',
+              'invalid.dart',
+            ],
+          );
+          expect(result.exitCode, 64);
+          expect(result.stdout, contains('Observatory listening'));
+          expect(
+            result.stderr,
+            contains(
+              'Error when reading \'invalid.dart\':'
+              ' No such file or directory',
+            ),
+          );
+        }
+      });
+
+      test('dart run invalid.dart', () async {
+        for (int i = 1; i <= numRuns; ++i) {
+          if (i % 5 == 0) {
+            print('Done [$i/$numRuns]');
+          }
+          final result = await Process.run(
+            Platform.executable,
+            [
+              'run',
+              'invalid.dart',
+            ],
+          );
+          expect(result.exitCode, 254);
+          expect(result.stdout, isEmpty);
+          expect(
+            result.stderr,
+            contains(
+              'Error when reading \'invalid.dart\':'
+              ' No such file or directory',
+            ),
+          );
+        }
+      });
+
+      // This test forces DDS to spawn in a separate process.
+      test('dart run --enable-vm-service invalid.dart', () async {
+        for (int i = 1; i <= numRuns; ++i) {
+          if (i % 5 == 0) {
+            print('Done [$i/$numRuns]');
+          }
+          final result = await Process.run(
+            Platform.executable,
+            [
+              'run',
+              '--enable-vm-service=0',
+              'invalid.dart',
+            ],
+          );
+          expect(result.exitCode, 254);
+          expect(result.stdout, contains('Observatory listening'));
+          expect(
+            result.stderr,
+            contains(
+              'Error when reading \'invalid.dart\':'
+              ' No such file or directory',
+            ),
+          );
+        }
+      });
+    },
+    timeout: Timeout.none,
+    // TODO(bkonyi): Fails consistently on bots, need to investigate.
+    skip: true,
+  );
+}
diff --git a/pkg/dartdev/test/smoke/smoke.dart b/pkg/dartdev/test/smoke/smoke.dart
new file mode 100644
index 0000000..a6a5181
--- /dev/null
+++ b/pkg/dartdev/test/smoke/smoke.dart
@@ -0,0 +1,7 @@
+// 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.
+
+void main() {
+  print('Smoke test!');
+}
diff --git a/pkg/dartdev/test/smoke/smoke_test.dart b/pkg/dartdev/test/smoke/smoke_test.dart
new file mode 100644
index 0000000..336db24
--- /dev/null
+++ b/pkg/dartdev/test/smoke/smoke_test.dart
@@ -0,0 +1,56 @@
+// 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';
+
+const numRuns = 10;
+final script = Platform.script.resolve('smoke.dart').toString();
+
+void main() {
+  group(
+    'explicit dartdev smoke -',
+    () {
+      test('dart run smoke.dart', () async {
+        for (int i = 1; i <= numRuns; ++i) {
+          if (i % 5 == 0) {
+            print('Done [$i/$numRuns]');
+          }
+          final result = await Process.run(
+            Platform.executable,
+            [
+              'run',
+              script,
+            ],
+          );
+          expect(result.exitCode, 0);
+          expect(result.stdout, contains('Smoke test!'));
+          expect(result.stderr, isEmpty);
+        }
+      });
+
+      // This test forces DDS to spawn in a separate process.
+      test('dart run --enable-vm-service smoke.dart', () async {
+        for (int i = 1; i <= numRuns; ++i) {
+          if (i % 5 == 0) {
+            print('Done [$i/$numRuns]');
+          }
+          final result = await Process.run(
+            Platform.executable,
+            [
+              'run',
+              '--enable-vm-service=0',
+              script,
+            ],
+          );
+          expect(result.exitCode, 0);
+          expect(result.stdout, contains('Smoke test!'));
+          expect(result.stderr, isEmpty);
+        }
+      });
+    },
+    timeout: Timeout.none,
+  );
+}
diff --git a/pkg/dartdev/test/test_all.dart b/pkg/dartdev/test/test_all.dart
index 153ebb9..0c45d45 100644
--- a/pkg/dartdev/test/test_all.dart
+++ b/pkg/dartdev/test/test_all.dart
@@ -8,6 +8,7 @@
 import 'commands/analyze_test.dart' as analyze;
 import 'commands/compile_test.dart' as compile;
 import 'commands/create_test.dart' as create;
+import 'commands/fix_test.dart' as fix;
 import 'commands/flag_test.dart' as flag;
 import 'commands/format_test.dart' as format;
 import 'commands/help_test.dart' as help;
@@ -24,6 +25,7 @@
     analytics.main();
     analyze.main();
     create.main();
+    fix.main();
     flag.main();
     format.main();
     help.main();
diff --git a/pkg/dartdev/test/utils.dart b/pkg/dartdev/test/utils.dart
index 7fd5c73..513f2dc 100644
--- a/pkg/dartdev/test/utils.dart
+++ b/pkg/dartdev/test/utils.dart
@@ -55,7 +55,6 @@
     String workingDir,
   }) {
     var arguments = [
-      absolutePathToDartdevFile,
       command,
       if (command == 'migrate')
         // TODO(srawlins): Enable `pub outdated` in tests.
@@ -64,7 +63,6 @@
     ];
 
     arguments.add('--disable-dartdev-analytics');
-
     return Process.runSync(
       Platform.resolvedExecutable,
       arguments,
diff --git a/pkg/dartdev/test/utils_test.dart b/pkg/dartdev/test/utils_test.dart
index 1a579c8..199d461 100644
--- a/pkg/dartdev/test/utils_test.dart
+++ b/pkg/dartdev/test/utils_test.dart
@@ -24,6 +24,18 @@
     });
   });
 
+  group('relativePath', () {
+    test('direct', () {
+      var dir = Directory('foo');
+      expect(relativePath('path', dir), 'path');
+    });
+
+    test('nested', () {
+      var dir = Directory('foo');
+      expect(relativePath(join(dir.absolute.path, 'path'), dir), 'path');
+    });
+  });
+
   group('trimEnd', () {
     test('null string', () {
       expect(trimEnd(null, 'suffix'), null);
diff --git a/pkg/dartfix/pubspec.yaml b/pkg/dartfix/pubspec.yaml
index ca488e6..8f39796 100644
--- a/pkg/dartfix/pubspec.yaml
+++ b/pkg/dartfix/pubspec.yaml
@@ -16,7 +16,7 @@
   # protocol is experimental and will continue to evolve.
   analysis_server_client: '>=1.1.3 <1.1.4'
   args: ^1.4.0
-  cli_util: ^0.1.3
+  cli_util: ^0.2.0
   path: ^1.7.0
   pub_semver: ^1.4.4
 
diff --git a/pkg/dartfix/test/src/migrate_command_test.dart b/pkg/dartfix/test/src/migrate_command_test.dart
index 4215266..a2fcf89 100644
--- a/pkg/dartfix/test/src/migrate_command_test.dart
+++ b/pkg/dartfix/test/src/migrate_command_test.dart
@@ -169,6 +169,16 @@
   }
 
   @override
+  void write(String message) {
+    stdoutBuffer.write(message);
+  }
+
+  @override
+  void writeCharCode(int charCode) {
+    stdoutBuffer.writeCharCode(charCode);
+  }
+
+  @override
   void stderr(String message) {
     stderrBuffer.writeln(message);
   }
diff --git a/pkg/dartfix/test/src/test_context.dart b/pkg/dartfix/test/src/test_context.dart
index be43d3f..9e55c3f 100644
--- a/pkg/dartfix/test/src/test_context.dart
+++ b/pkg/dartfix/test/src/test_context.dart
@@ -67,6 +67,16 @@
   }
 
   @override
+  void write(String message) {
+    stdoutBuffer.write(message);
+  }
+
+  @override
+  void writeCharCode(int charCode) {
+    stdoutBuffer.writeCharCode(charCode);
+  }
+
+  @override
   void trace(String message) {
     if (debug) {
       stdoutBuffer.writeln(message);
diff --git a/pkg/dds/CHANGELOG.md b/pkg/dds/CHANGELOG.md
index 2884166..77142a4 100644
--- a/pkg/dds/CHANGELOG.md
+++ b/pkg/dds/CHANGELOG.md
@@ -1,3 +1,27 @@
+# 1.3.1
+
+- Fixed issue where an exception could be thrown during startup if the target
+  process had an isolate without an associated pause event.
+
+# 1.3.0
+
+- Added support for SSE connections from web-based clients.
+
+# 1.2.4
+
+- Fixed another issue where a `StateError` could be raised within `DartDevelopmentService`
+  when a client has disconnected after the target VM service has shutdown.
+
+# 1.2.3
+
+- Fixed issue where DDS was expecting a client provided implementation of
+`compileExpression` to return a response with two layers of `response` objects.
+
+# 1.2.2
+
+- Fixed issue where a `StateError` could be raised within `DartDevelopmentService`
+  when a client has disconnected after the target VM service has shutdown.
+
 # 1.2.1
 
 - Fixed issue where `evaluate` and `evaluateInFrame` were not invoking client
diff --git a/pkg/dds/README.md b/pkg/dds/README.md
index 64b0c72..ec3567b 100644
--- a/pkg/dds/README.md
+++ b/pkg/dds/README.md
@@ -2,7 +2,35 @@
 
 # Functionality
 
-Existing VM Service clients can issue both HTTP and websocket requests to a running DDS instance as if it were an instance of the VM Service itself. If a request corresponds to an RPC defined in the [VM Service Protocol][service-protocol], DDS will forward the request and return the response from the VM Service. Requests corresponding to an RPC defined in the [DDS Protocol][dds-protocol] will be handled directly by the DDS instance.
+Existing VM Service clients can issue both HTTP, websocket, and SSE requests to a running DDS instance as if it were an instance of the VM Service itself. If a request corresponds to an RPC defined in the [VM Service Protocol][service-protocol], DDS will forward the request and return the response from the VM Service. Requests corresponding to an RPC defined in the [DDS Protocol][dds-protocol] will be handled directly by the DDS instance.
+
+# SSE Support
+
+For certain web clients it may be preferrable or required to communicate with DDS using server-sent events (SSE). DDS has a SSE handler listening for requests on `/$debugHandler`.
+
+## SSE and package:vm_service example
+
+```dart
+import 'package:sse/sse.dart';
+import 'package:vm_service/vm_service.dart';
+
+void main() {
+  // Establish connection with DDS using SSE.
+  final ddsChannel = SseClient('${ddsUri}\$debugHandler');
+
+  // Wait for ddsChannel to be established
+  await ddsChannel.onOpen.first;
+
+  // Initialize VmService using the sink and stream from ddsChannel.
+  final vmService = VmService(
+    ddsChannel.stream,
+    (e) => ddsChannel.sink.add(e),
+  );
+
+  // You're ready to query DDS and the VM service!
+  print(await vmService.getVersion());
+}
+```
 
 [dds-protocol]: dds_protocol.md
 [service-protocol]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md
diff --git a/pkg/dds/bin/dds.dart b/pkg/dds/bin/dds.dart
new file mode 100644
index 0000000..476e84b
--- /dev/null
+++ b/pkg/dds/bin/dds.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 'dart:io';
+
+import 'package:dds/dds.dart';
+
+/// A simple program which starts a [DartDevelopmentService] instance with a
+/// basic configuration.
+///
+/// Takes the VM service URI as its single argument.
+Future<void> main(List<String> args) async {
+  if (args.isEmpty) return;
+  final remoteVmServiceUri = Uri.parse(args.first);
+  await DartDevelopmentService.startDartDevelopmentService(remoteVmServiceUri);
+  stderr.write('DDS started');
+}
diff --git a/pkg/dds/dds_protocol.md b/pkg/dds/dds_protocol.md
index 8ac77ee..be9da7e 100644
--- a/pkg/dds/dds_protocol.md
+++ b/pkg/dds/dds_protocol.md
@@ -1,6 +1,6 @@
-# Dart Development Service Protocol 1.0
+# Dart Development Service Protocol 1.1
 
-This document describes _version 1.0_ of the Dart Development Service Protocol.
+This document describes _version 1.1_ of the Dart Development Service Protocol.
 This protocol is an extension of the Dart VM Service Protocol and implements it
 in it's entirety. For details on the VM Service Protocol, see the [Dart VM Service Protocol Specification][service-protocol].
 
diff --git a/pkg/dds/lib/dds.dart b/pkg/dds/lib/dds.dart
index 90461e6..f9c057c 100644
--- a/pkg/dds/lib/dds.dart
+++ b/pkg/dds/lib/dds.dart
@@ -21,6 +21,7 @@
 import 'package:shelf/shelf_io.dart' as io;
 import 'package:shelf_proxy/shelf_proxy.dart';
 import 'package:shelf_web_socket/shelf_web_socket.dart';
+import 'package:sse/server/sse_handler.dart';
 import 'package:stream_channel/stream_channel.dart';
 import 'package:web_socket_channel/web_socket_channel.dart';
 
@@ -111,6 +112,12 @@
   Uri get uri;
 
   /// The [Uri] VM service clients can use to communicate with this
+  /// [DartDevelopmentService] via server-sent events (SSE).
+  ///
+  /// Returns `null` if the service is not running.
+  Uri get sseUri;
+
+  /// The [Uri] VM service clients can use to communicate with this
   /// [DartDevelopmentService] via a [WebSocket].
   ///
   /// Returns `null` if the service is not running.
diff --git a/pkg/dds/lib/src/client.dart b/pkg/dds/lib/src/client.dart
index 4099128..3d796fc 100644
--- a/pkg/dds/lib/src/client.dart
+++ b/pkg/dds/lib/src/client.dart
@@ -7,24 +7,46 @@
 /// Representation of a single DDS client which manages the connection and
 /// DDS request intercepting / forwarding.
 class _DartDevelopmentServiceClient {
-  _DartDevelopmentServiceClient(
+  factory _DartDevelopmentServiceClient.fromWebSocket(
+    DartDevelopmentService dds,
+    WebSocketChannel ws,
+    json_rpc.Peer vmServicePeer,
+  ) =>
+      _DartDevelopmentServiceClient._(
+        dds,
+        ws,
+        vmServicePeer,
+      );
+
+  factory _DartDevelopmentServiceClient.fromSSEConnection(
+    DartDevelopmentService dds,
+    SseConnection sse,
+    json_rpc.Peer vmServicePeer,
+  ) =>
+      _DartDevelopmentServiceClient._(
+        dds,
+        sse,
+        vmServicePeer,
+      );
+
+  _DartDevelopmentServiceClient._(
     this.dds,
-    this.ws,
+    this.connection,
     json_rpc.Peer vmServicePeer,
   ) : _vmServicePeer = vmServicePeer {
     _clientPeer = json_rpc.Peer(
       // Manually create a StreamChannel<String> instead of calling
-      // ws.cast<String>() as cast() results in addStream() being called,
+      // .cast<String>() as cast() results in addStream() being called,
       // binding the underlying sink. This results in a StateError being thrown
       // if we try and add directly to the sink, which we do for binary events
       // in _StreamManager's streamNotify().
       StreamChannel<String>(
-        ws.stream.cast(),
+        connection.stream.cast(),
         StreamController(sync: true)
           ..stream
               .cast()
-              .listen((event) => ws.sink.add(event))
-              .onDone(() => ws.sink.close()),
+              .listen((event) => connection.sink.add(event))
+              .onDone(() => connection.sink.close()),
       ),
       strictProtocolChecks: false,
     );
@@ -231,8 +253,8 @@
   String _name;
 
   final _DartDevelopmentService dds;
+  final StreamChannel connection;
   final Map<String, String> services = {};
   final json_rpc.Peer _vmServicePeer;
-  final WebSocketChannel ws;
   json_rpc.Peer _clientPeer;
 }
diff --git a/pkg/dds/lib/src/client_manager.dart b/pkg/dds/lib/src/client_manager.dart
index 8527636..4304000 100644
--- a/pkg/dds/lib/src/client_manager.dart
+++ b/pkg/dds/lib/src/client_manager.dart
@@ -30,12 +30,26 @@
     );
     clients.add(client);
     client.listen().then((_) => removeClient(client));
+    if (clients.length == 1) {
+      dds.isolateManager.initialize().then((_) {
+        dds.streamManager.streamListen(
+          null,
+          _StreamManager.kDebugStream,
+        );
+      });
+    }
   }
 
   /// Cleanup state for a disconnected client.
   void removeClient(_DartDevelopmentServiceClient client) {
     _clearClientName(client);
     clients.remove(client);
+    if (clients.isEmpty) {
+      dds.streamManager.streamCancel(
+        null,
+        _StreamManager.kDebugStream,
+      );
+    }
   }
 
   /// Cleanup clients on DDS shutdown.
diff --git a/pkg/dds/lib/src/dds_impl.dart b/pkg/dds/lib/src/dds_impl.dart
index 221b2c9..55e9e64 100644
--- a/pkg/dds/lib/src/dds_impl.dart
+++ b/pkg/dds/lib/src/dds_impl.dart
@@ -139,10 +139,15 @@
   // Attempt to upgrade HTTP requests to a websocket before processing them as
   // standard HTTP requests. The websocket handler will fail quickly if the
   // request doesn't appear to be a websocket upgrade request.
-  Cascade _handlers() => Cascade().add(_webSocketHandler()).add(_httpHandler());
+  Cascade _handlers() {
+    return Cascade()
+        .add(_webSocketHandler())
+        .add(_sseHandler())
+        .add(_httpHandler());
+  }
 
   Handler _webSocketHandler() => webSocketHandler((WebSocketChannel ws) {
-        final client = _DartDevelopmentServiceClient(
+        final client = _DartDevelopmentServiceClient.fromWebSocket(
           this,
           ws,
           _vmServiceClient,
@@ -150,6 +155,23 @@
         clientManager.addClient(client);
       });
 
+  Handler _sseHandler() {
+    final handler = authCodesEnabled
+        ? SseHandler(Uri.parse('/$_authCode/$_kSseHandlerPath'))
+        : SseHandler(Uri.parse('/$_kSseHandlerPath'));
+
+    handler.connections.rest.listen((sseConnection) {
+      final client = _DartDevelopmentServiceClient.fromSSEConnection(
+        this,
+        sseConnection,
+        _vmServiceClient,
+      );
+      clientManager.addClient(client);
+    });
+
+    return handler.handler;
+  }
+
   Handler _httpHandler() {
     // DDS doesn't support any HTTP requests itself, so we just forward all of
     // them to the VM service.
@@ -157,10 +179,7 @@
     return cascade.handler;
   }
 
-  Uri _toWebSocket(Uri uri) {
-    if (uri == null) {
-      return null;
-    }
+  List<String> _cleanupPathSegments(Uri uri) {
     final pathSegments = <String>[];
     if (uri.pathSegments.isNotEmpty) {
       pathSegments.addAll(uri.pathSegments.where(
@@ -170,10 +189,27 @@
         (s) => s.isNotEmpty,
       ));
     }
+    return pathSegments;
+  }
+
+  Uri _toWebSocket(Uri uri) {
+    if (uri == null) {
+      return null;
+    }
+    final pathSegments = _cleanupPathSegments(uri);
     pathSegments.add('ws');
     return uri.replace(scheme: 'ws', pathSegments: pathSegments);
   }
 
+  Uri _toSse(Uri uri) {
+    if (uri == null) {
+      return null;
+    }
+    final pathSegments = _cleanupPathSegments(uri);
+    pathSegments.add(_kSseHandlerPath);
+    return uri.replace(pathSegments: pathSegments);
+  }
+
   String _getNamespace(_DartDevelopmentServiceClient client) =>
       clientManager.clients.keyOf(client);
 
@@ -186,6 +222,7 @@
   Uri _remoteVmServiceUri;
 
   Uri get uri => _uri;
+  Uri get sseUri => _toSse(_uri);
   Uri get wsUri => _toWebSocket(_uri);
   Uri _uri;
 
@@ -210,6 +247,8 @@
   _StreamManager get streamManager => _streamManager;
   _StreamManager _streamManager;
 
+  static const _kSseHandlerPath = '\$debugHandler';
+
   json_rpc.Peer _vmServiceClient;
   WebSocketChannel _vmServiceSocket;
   HttpServer _server;
diff --git a/pkg/dds/lib/src/expression_evaluator.dart b/pkg/dds/lib/src/expression_evaluator.dart
index e10af00..d514d60 100644
--- a/pkg/dds/lib/src/expression_evaluator.dart
+++ b/pkg/dds/lib/src/expression_evaluator.dart
@@ -76,7 +76,7 @@
         return (await externalClient.sendRequest(
           'compileExpression',
           compileParams,
-        ))['result']['kernelBytes'];
+        ))['kernelBytes'];
       } else {
         // Fallback to compiling using the kernel service.
         return (await dds._vmServiceClient.sendRequest(
diff --git a/pkg/dds/lib/src/isolate_manager.dart b/pkg/dds/lib/src/isolate_manager.dart
index 1ebc9f7..57711bf 100644
--- a/pkg/dds/lib/src/isolate_manager.dart
+++ b/pkg/dds/lib/src/isolate_manager.dart
@@ -85,7 +85,6 @@
     if (_resumeApprovalsByName.isEmpty) {
       return false;
     }
-
     // If all the required approvals are present, we should resume.
     return _resumeApprovalsByName.containsAll(requiredClientApprovals);
   }
@@ -171,9 +170,14 @@
       });
       final portId = isolate['number'];
       final name = isolate['name'];
-      final eventKind = isolate['pauseEvent']['kind'];
-      isolates[portId] = _RunningIsolate(this, portId, name);
-      _updateIsolateState(portId, name, eventKind);
+      if (isolate.containsKey('pauseEvent')) {
+        isolates[portId] = _RunningIsolate(this, portId, name);
+        final eventKind = isolate['pauseEvent']['kind'];
+        _updateIsolateState(portId, name, eventKind);
+      } else {
+        // If the isolate doesn't have a pauseEvent, assume it's running.
+        isolateStarted(portId, name);
+      }
     }
   }
 
diff --git a/pkg/dds/lib/src/stream_manager.dart b/pkg/dds/lib/src/stream_manager.dart
index d648d50..5704895 100644
--- a/pkg/dds/lib/src/stream_manager.dart
+++ b/pkg/dds/lib/src/stream_manager.dart
@@ -28,7 +28,7 @@
           continue;
         }
         if (isBinaryData) {
-          listener.ws.sink.add(data);
+          listener.connection.sink.add(data);
         } else {
           listener.sendNotification('streamNotify', data);
         }
@@ -117,12 +117,15 @@
   ) async {
     assert(stream != null && stream.isNotEmpty);
     if (!streamListeners.containsKey(stream)) {
-      // This will return an RPC exception if the stream doesn't exist. This
-      // will throw and the exception will be forwarded to the client.
-      final result = await dds._vmServiceClient.sendRequest('streamListen', {
-        'streamId': stream,
-      });
-      assert(result['type'] == 'Success');
+      if ((stream == kDebugStream && client == null) ||
+          stream != kDebugStream) {
+        // This will return an RPC exception if the stream doesn't exist. This
+        // will throw and the exception will be forwarded to the client.
+        final result = await dds._vmServiceClient.sendRequest('streamListen', {
+          'streamId': stream,
+        });
+        assert(result['type'] == 'Success');
+      }
       streamListeners[stream] = <_DartDevelopmentServiceClient>[];
     }
     if (streamListeners[stream].contains(client)) {
@@ -142,17 +145,23 @@
   /// send a `streamCancel` request for `stream` to the VM service.
   Future<void> streamCancel(
     _DartDevelopmentServiceClient client,
-    String stream,
-  ) async {
+    String stream, {
+    bool cancelCoreStream = false,
+  }) async {
     assert(stream != null && stream.isNotEmpty);
     final listeners = streamListeners[stream];
-    if (listeners == null || !listeners.contains(client)) {
+    if (client != null && (listeners == null || !listeners.contains(client))) {
       throw kStreamNotSubscribedException;
     }
     listeners.remove(client);
     // Don't cancel streams DDS needs to function.
-    if (listeners.isEmpty && !ddsCoreStreams.contains(stream)) {
+    if (listeners.isEmpty &&
+        (!ddsCoreStreams.contains(stream) || cancelCoreStream)) {
       streamListeners.remove(stream);
+      // Ensure the VM service hasn't shutdown.
+      if (dds._vmServiceClient.isClosed) {
+        return;
+      }
       final result = await dds._vmServiceClient.sendRequest('streamCancel', {
         'streamId': stream,
       });
@@ -167,8 +176,11 @@
     for (final streamId in streamListeners.keys.toList()) {
       streamCancel(client, streamId).catchError(
         (_) => null,
-        // Ignore 'stream not subscribed' errors.
-        test: (e) => e is json_rpc.RpcException,
+        // Ignore 'stream not subscribed' errors and StateErrors which arise
+        // when DDS is shutting down.
+        test: (e) =>
+            (e is json_rpc.RpcException) ||
+            (dds._shuttingDown && e is StateError),
       );
     }
     // Notify other service clients of service extensions that are being
diff --git a/pkg/dds/pubspec.yaml b/pkg/dds/pubspec.yaml
index 7513031..a4bccc8 100644
--- a/pkg/dds/pubspec.yaml
+++ b/pkg/dds/pubspec.yaml
@@ -3,7 +3,7 @@
   A library used to spawn the Dart Developer Service, used to communicate with
   a Dart VM Service instance.
 
-version: 1.2.1
+version: 1.3.1
 
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/dds
 
@@ -17,10 +17,13 @@
   pedantic: ^1.7.0
   shelf: ^0.7.5
   shelf_proxy: ^0.1.0+7
+  shelf_static: ^0.2.8
   shelf_web_socket: ^0.2.3
+  sse: ^3.5.0
   stream_channel: ^2.0.0
   web_socket_channel: ^1.1.0
 
 dev_dependencies:
   test: ^1.0.0
   vm_service: ^4.0.0
+  webdriver: ^2.1.2
diff --git a/pkg/dds/test/external_compilation_service_script.dart b/pkg/dds/test/external_compilation_service_script.dart
new file mode 100644
index 0000000..b01ed60
--- /dev/null
+++ b/pkg/dds/test/external_compilation_service_script.dart
@@ -0,0 +1,9 @@
+// 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:developer';
+
+main() {
+  debugger();
+}
diff --git a/pkg/dds/test/external_compilation_service_test.dart b/pkg/dds/test/external_compilation_service_test.dart
new file mode 100644
index 0000000..92e5ac8
--- /dev/null
+++ b/pkg/dds/test/external_compilation_service_test.dart
@@ -0,0 +1,81 @@
+// 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:dds/dds.dart';
+import 'package:test/test.dart';
+import 'package:vm_service/vm_service_io.dart';
+import 'common/test_helper.dart';
+
+void main() {
+  group('DDS', () {
+    Process process;
+    DartDevelopmentService dds;
+
+    setUp(() async {
+      process =
+          await spawnDartProcess('external_compilation_service_script.dart');
+    });
+
+    tearDown(() async {
+      await dds?.shutdown();
+      process?.kill();
+      dds = null;
+      process = null;
+    });
+
+    test('evaluate invokes client provided compileExpression RPC', () async {
+      dds = await DartDevelopmentService.startDartDevelopmentService(
+        remoteVmServiceUri,
+      );
+      expect(dds.isRunning, true);
+      final service = await vmServiceConnectUri(dds.wsUri.toString());
+      await service.registerService(
+        'compileExpression',
+        'Custom Expression Compilation',
+      );
+      bool invokedCompileExpression = false;
+      service.registerServiceCallback('compileExpression', (params) async {
+        invokedCompileExpression = true;
+        throw 'error';
+      });
+      final vm = await service.getVM();
+      final isolate = await service.getIsolate(vm.isolates.first.id);
+      try {
+        await service.evaluate(isolate.id, isolate.libraries.first.id, '1 + 1');
+      } catch (_) {
+        // ignore error
+      }
+      expect(invokedCompileExpression, true);
+    });
+
+    test('evaluateInFrame invokes client provided compileExpression RPC',
+        () async {
+      dds = await DartDevelopmentService.startDartDevelopmentService(
+        remoteVmServiceUri,
+      );
+      expect(dds.isRunning, true);
+      final service = await vmServiceConnectUri(dds.wsUri.toString());
+      await service.registerService(
+        'compileExpression',
+        'Custom Expression Compilation',
+      );
+      bool invokedCompileExpression = false;
+      service.registerServiceCallback('compileExpression', (params) async {
+        invokedCompileExpression = true;
+        throw 'error';
+      });
+      final vm = await service.getVM();
+      final isolate = await service.getIsolate(vm.isolates.first.id);
+      await service.resume(isolate.id);
+      try {
+        await service.evaluateInFrame(isolate.id, 0, '1 + 1');
+      } catch (_) {
+        // ignore error
+      }
+      expect(invokedCompileExpression, true);
+    });
+  });
+}
diff --git a/pkg/dds/test/smoke_test.dart b/pkg/dds/test/smoke_test.dart
index 3b8cd7b..e7e5216 100644
--- a/pkg/dds/test/smoke_test.dart
+++ b/pkg/dds/test/smoke_test.dart
@@ -27,49 +27,51 @@
       process = null;
     });
 
-    bool useAuthCodes = false;
-    for (int i = 0; i < 2; ++i) {
-      test('Smoke Test with ${useAuthCodes ? "" : "no "} authentication codes',
-          () async {
-        dds = await DartDevelopmentService.startDartDevelopmentService(
-          remoteVmServiceUri,
-          enableAuthCodes: useAuthCodes,
-        );
-        expect(dds.isRunning, true);
+    void createSmokeTest(bool useAuthCodes) {
+      test(
+        'Smoke Test with ${useAuthCodes ? "" : "no "} authentication codes',
+        () async {
+          dds = await DartDevelopmentService.startDartDevelopmentService(
+            remoteVmServiceUri,
+            enableAuthCodes: useAuthCodes,
+          );
+          expect(dds.isRunning, true);
 
-        // Ensure basic websocket requests are forwarded correctly to the VM service.
-        final service = await vmServiceConnectUri(dds.wsUri.toString());
-        final version = await service.getVersion();
-        expect(version.major > 0, true);
-        expect(version.minor > 0, true);
+          // Ensure basic websocket requests are forwarded correctly to the VM service.
+          final service = await vmServiceConnectUri(dds.wsUri.toString());
+          final version = await service.getVersion();
+          expect(version.major > 0, true);
+          expect(version.minor > 0, true);
 
-        expect(
-          remoteVmServiceUri.pathSegments,
-          useAuthCodes ? isNotEmpty : isEmpty,
-        );
+          expect(
+            dds.uri.pathSegments,
+            useAuthCodes ? isNotEmpty : isEmpty,
+          );
 
-        // Ensure we can still make requests of the VM service via HTTP.
-        HttpClient client = HttpClient();
-        final request = await client.getUrl(remoteVmServiceUri.replace(
-          pathSegments: [
-            if (remoteVmServiceUri.pathSegments.isNotEmpty)
-              remoteVmServiceUri.pathSegments.first,
-            'getVersion',
-          ],
-        ));
-        final response = await request.close();
-        final Map<String, dynamic> jsonResponse = (await response
-            .transform(utf8.decoder)
-            .transform(json.decoder)
-            .single);
-        expect(jsonResponse['result']['type'], 'Version');
-        expect(jsonResponse['result']['major'] > 0, true);
-        expect(jsonResponse['result']['minor'] > 0, true);
-      });
-
-      useAuthCodes = true;
+          // Ensure we can still make requests of the VM service via HTTP.
+          HttpClient client = HttpClient();
+          final request = await client.getUrl(remoteVmServiceUri.replace(
+            pathSegments: [
+              if (remoteVmServiceUri.pathSegments.isNotEmpty)
+                remoteVmServiceUri.pathSegments.first,
+              'getVersion',
+            ],
+          ));
+          final response = await request.close();
+          final Map<String, dynamic> jsonResponse = (await response
+              .transform(utf8.decoder)
+              .transform(json.decoder)
+              .single);
+          expect(jsonResponse['result']['type'], 'Version');
+          expect(jsonResponse['result']['major'] > 0, true);
+          expect(jsonResponse['result']['minor'] > 0, true);
+        },
+      );
     }
 
+    createSmokeTest(true);
+    createSmokeTest(false);
+
     test('startup fails when VM service has existing clients', () async {
       Uri httpToWebSocketUri(Uri httpUri) {
         final segments = (httpUri.pathSegments.isNotEmpty)
diff --git a/pkg/dds/test/sse_smoke_test.dart b/pkg/dds/test/sse_smoke_test.dart
new file mode 100644
index 0000000..682fa18
--- /dev/null
+++ b/pkg/dds/test/sse_smoke_test.dart
@@ -0,0 +1,116 @@
+// 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:dds/dds.dart';
+import 'package:shelf/shelf.dart' as shelf;
+import 'package:shelf/shelf_io.dart' as io;
+import 'package:shelf_static/shelf_static.dart';
+import 'package:sse/server/sse_handler.dart';
+import 'package:test/test.dart';
+import 'package:vm_service/vm_service.dart' as service;
+import 'package:webdriver/io.dart';
+
+import 'common/test_helper.dart';
+
+// NOTE: this test requires that Chrome is available via PATH or CHROME_PATH
+// environment variables.
+
+void main() {
+  Process chromeDriver;
+  DartDevelopmentService dds;
+  SseHandler handler;
+  Process process;
+  HttpServer server;
+  WebDriver webdriver;
+
+  setUpAll(() async {
+    final chromedriverUri = Platform.script.resolveUri(
+        Uri.parse('../../../third_party/webdriver/chrome/chromedriver'));
+    try {
+      chromeDriver = await Process.start(chromedriverUri.path, [
+        '--port=4444',
+        '--url-base=wd/hub',
+      ]);
+    } catch (e) {
+      throw StateError(
+          'Could not start ChromeDriver. Is it installed?\nError: $e');
+    }
+  });
+
+  tearDownAll(() {
+    chromeDriver.kill();
+  });
+
+  group('DDS', () {
+    setUp(() async {
+      process = await spawnDartProcess('smoke.dart');
+
+      handler = SseHandler(Uri.parse('/test'));
+      final cascade = shelf.Cascade()
+          .add(handler.handler)
+          .add(_faviconHandler)
+          .add(createStaticHandler(Platform.script.resolve('web').path,
+              listDirectories: true, defaultDocument: 'index.html'));
+
+      server = await io.serve(cascade.handler, 'localhost', 0);
+
+      final capabilities = Capabilities.chrome
+        ..addAll({
+          Capabilities.chromeOptions: {
+            'args': ['--headless'],
+            'binary': Platform.environment['CHROME_PATH'] ?? '',
+          },
+        });
+      print('Capabilities: $capabilities');
+      webdriver = await createDriver(
+        desired: capabilities,
+      );
+    });
+
+    tearDown(() async {
+      await dds?.shutdown();
+      process?.kill();
+      await webdriver.quit();
+      await server.close();
+      dds = null;
+      process = null;
+    });
+
+    void createTest(bool useAuthCodes) {
+      test(
+        'SSE Smoke Test with ${useAuthCodes ? "" : "no "}authentication codes',
+        () async {
+          dds = await DartDevelopmentService.startDartDevelopmentService(
+            remoteVmServiceUri,
+            serviceUri: Uri.parse('http://localhost:0'),
+            enableAuthCodes: useAuthCodes,
+          );
+          expect(dds.isRunning, true);
+          await webdriver.get('http://localhost:${server.port}');
+          final testeeConnection = await handler.connections.next;
+          testeeConnection.sink.add(dds.sseUri.toString());
+
+          final response = json.decode(await testeeConnection.stream.first);
+          final version = service.Version.parse(response);
+          expect(version.major > 0, isTrue);
+          expect(version.minor >= 0, isTrue);
+        },
+      );
+    }
+
+    createTest(true);
+    createTest(false);
+  });
+}
+
+FutureOr<shelf.Response> _faviconHandler(shelf.Request request) {
+  if (request.url.path.endsWith('favicon.ico')) {
+    return shelf.Response.ok('');
+  }
+  return shelf.Response.notFound('');
+}
diff --git a/pkg/dds/test/uri_test.dart b/pkg/dds/test/uri_test.dart
new file mode 100644
index 0000000..8afd523
--- /dev/null
+++ b/pkg/dds/test/uri_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:io';
+
+import 'package:dds/dds.dart';
+import 'package:test/test.dart';
+
+import 'common/test_helper.dart';
+
+void main() {
+  Process process;
+  DartDevelopmentService dds;
+  setUp(() async {
+    process = await spawnDartProcess('smoke.dart');
+  });
+
+  tearDown(() async {
+    await dds?.shutdown();
+    process?.kill();
+    dds = null;
+    process = null;
+  });
+
+  Future<int> getAvailablePort() async {
+    final tmpServer = await HttpServer.bind(InternetAddress.loopbackIPv4, 0);
+    final port = tmpServer.port;
+    await tmpServer.close();
+    return port;
+  }
+
+  group('Ensure DDS URIs are consistent', () {
+    test('without authentication codes', () async {
+      final port = await getAvailablePort();
+      final serviceUri = Uri.parse('http://127.0.0.1:$port/');
+      dds = await DartDevelopmentService.startDartDevelopmentService(
+        remoteVmServiceUri,
+        serviceUri: serviceUri,
+        enableAuthCodes: false,
+      );
+
+      expect(dds.uri, serviceUri);
+      expect(
+        dds.sseUri,
+        serviceUri.replace(
+          pathSegments: ['\$debugHandler'],
+        ),
+      );
+      expect(
+        dds.wsUri,
+        serviceUri.replace(
+          scheme: 'ws',
+          pathSegments: ['ws'],
+        ),
+      );
+    });
+
+    test('with authentication codes', () async {
+      final port = await getAvailablePort();
+      final serviceUri = Uri.parse('http://127.0.0.1:$port/');
+      dds = await DartDevelopmentService.startDartDevelopmentService(
+        remoteVmServiceUri,
+        serviceUri: serviceUri,
+      );
+
+      // We need to pull the authentication code out of the main DDS URI, so
+      // just make sure that it's at the right address and port.
+      expect(dds.uri.toString().contains(serviceUri.toString()), isTrue);
+
+      expect(dds.uri.pathSegments, isNotEmpty);
+      final authCode = dds.uri.pathSegments.first;
+      expect(
+        dds.sseUri,
+        serviceUri.replace(
+          pathSegments: [authCode, '\$debugHandler'],
+        ),
+      );
+      expect(
+        dds.wsUri,
+        serviceUri.replace(
+          scheme: 'ws',
+          pathSegments: [authCode, 'ws'],
+        ),
+      );
+    });
+  });
+}
diff --git a/pkg/dds/test/web/index.html b/pkg/dds/test/web/index.html
new file mode 100644
index 0000000..27d3952
--- /dev/null
+++ b/pkg/dds/test/web/index.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <title>DDS SSE Smoke Test</title>
+</head>
+
+<body>
+    <script type="application/javascript" src="sse_smoke_driver.dart.js"></script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/pkg/dds/test/web/sse_smoke_driver.dart b/pkg/dds/test/web/sse_smoke_driver.dart
new file mode 100644
index 0000000..66ef20c
--- /dev/null
+++ b/pkg/dds/test/web/sse_smoke_driver.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.
+
+// This file must be compiled for changes to be picked up.
+//
+// Run the following command from the root of this package if this file is
+// updated:
+//
+// dart2js -o test/web/sse_smoke_driver.dart.js test/web/sse_smoke_driver.dart
+
+import 'dart:convert';
+
+import 'package:async/async.dart';
+import 'package:sse/client/sse_client.dart';
+import 'package:vm_service/vm_service.dart';
+
+Future<void> main() async {
+  // Connect to test server
+  final channel = SseClient('/test');
+  final testerStream = StreamQueue<String>(channel.stream);
+
+  // Connect to DDS
+  final ddsUri = await testerStream.next;
+  final ddsChannel = SseClient(ddsUri);
+
+  // Wait for ddsChannel to be established.
+  await ddsChannel.onOpen.first;
+
+  final vmService = VmService(
+    ddsChannel.stream,
+    (e) => ddsChannel.sink.add(e),
+  );
+  final version = await vmService.getVersion();
+  channel.sink.add(json.encode(version.json));
+  ddsChannel.close();
+}
diff --git a/pkg/dds/test/web/sse_smoke_driver.dart.js b/pkg/dds/test/web/sse_smoke_driver.dart.js
new file mode 100644
index 0000000..1fc9758
--- /dev/null
+++ b/pkg/dds/test/web/sse_smoke_driver.dart.js
@@ -0,0 +1,14723 @@
+// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.9.0-edge.9d8087a399ebe62f6a93f21ec20f56d39dbcf1a2.
+// The code supports the following hooks:
+// dartPrint(message):
+//    if this function is defined it is called instead of the Dart [print]
+//    method.
+//
+// dartMainRunner(main, args):
+//    if this function is defined, the Dart [main] method will not be invoked
+//    directly. Instead, a closure that will invoke [main], and its arguments
+//    [args] is passed to [dartMainRunner].
+//
+// dartDeferredLibraryLoader(uri, successCallback, errorCallback):
+//    if this function is defined, it will be called when a deferred library
+//    is loaded. It should load and eval the javascript of `uri`, and call
+//    successCallback. If it fails to do so, it should call errorCallback with
+//    an error.
+//
+// dartCallInstrumentation(id, qualifiedName):
+//    if this function is defined, it will be called at each entry of a
+//    method or constructor. Used only when compiling programs with
+//    --experiment-call-instrumentation.
+(function dartProgram() {
+  function copyProperties(from, to) {
+    var keys = Object.keys(from);
+    for (var i = 0; i < keys.length; i++) {
+      var key = keys[i];
+      to[key] = from[key];
+    }
+  }
+  var supportsDirectProtoAccess = function() {
+    var cls = function() {
+    };
+    cls.prototype = {p: {}};
+    var object = new cls();
+    if (!(object.__proto__ && object.__proto__.p === cls.prototype.p))
+      return false;
+    try {
+      if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0)
+        return true;
+      if (typeof version == "function" && version.length == 0) {
+        var v = version();
+        if (/^\d+\.\d+\.\d+\.\d+$/.test(v))
+          return true;
+      }
+    } catch (_) {
+    }
+    return false;
+  }();
+  function setFunctionNamesIfNecessary(holders) {
+    function t() {
+    }
+    ;
+    if (typeof t.name == "string")
+      return;
+    for (var i = 0; i < holders.length; i++) {
+      var holder = holders[i];
+      var keys = Object.keys(holder);
+      for (var j = 0; j < keys.length; j++) {
+        var key = keys[j];
+        var f = holder[key];
+        if (typeof f == 'function')
+          f.name = key;
+      }
+    }
+  }
+  function inherit(cls, sup) {
+    cls.prototype.constructor = cls;
+    cls.prototype["$is" + cls.name] = cls;
+    if (sup != null) {
+      if (supportsDirectProtoAccess) {
+        cls.prototype.__proto__ = sup.prototype;
+        return;
+      }
+      var clsPrototype = Object.create(sup.prototype);
+      copyProperties(cls.prototype, clsPrototype);
+      cls.prototype = clsPrototype;
+    }
+  }
+  function inheritMany(sup, classes) {
+    for (var i = 0; i < classes.length; i++)
+      inherit(classes[i], sup);
+  }
+  function mixin(cls, mixin) {
+    copyProperties(mixin.prototype, cls.prototype);
+    cls.prototype.constructor = cls;
+  }
+  function lazy(holder, name, getterName, initializer) {
+    var uninitializedSentinel = holder;
+    holder[name] = uninitializedSentinel;
+    holder[getterName] = function() {
+      holder[getterName] = function() {
+        H.throwCyclicInit(name);
+      };
+      var result;
+      var sentinelInProgress = initializer;
+      try {
+        if (holder[name] === uninitializedSentinel) {
+          result = holder[name] = sentinelInProgress;
+          result = holder[name] = initializer();
+        } else
+          result = holder[name];
+      } finally {
+        if (result === sentinelInProgress)
+          holder[name] = null;
+        holder[getterName] = function() {
+          return this[name];
+        };
+      }
+      return result;
+    };
+  }
+  function makeConstList(list) {
+    list.immutable$list = Array;
+    list.fixed$length = Array;
+    return list;
+  }
+  function convertToFastObject(properties) {
+    function t() {
+    }
+    t.prototype = properties;
+    new t();
+    return properties;
+  }
+  function convertAllToFastObject(arrayOfObjects) {
+    for (var i = 0; i < arrayOfObjects.length; ++i)
+      convertToFastObject(arrayOfObjects[i]);
+  }
+  var functionCounter = 0;
+  function tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted) {
+    return isIntercepted ? new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "(receiver) {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, true, name);" + "return new c(this, funcs[0], receiver, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null) : new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, false, name);" + "return new c(this, funcs[0], null, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null);
+  }
+  function tearOff(funcs, applyTrampolineIndex, reflectionInfo, isStatic, name, isIntercepted) {
+    var cache = null;
+    return isStatic ? function() {
+      if (cache === null)
+        cache = H.closureFromTearOff(this, funcs, applyTrampolineIndex, reflectionInfo, true, false, name).prototype;
+      return cache;
+    } : tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted);
+  }
+  var typesOffset = 0;
+  function installTearOff(container, getterName, isStatic, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) {
+    var funs = [];
+    for (var i = 0; i < funsOrNames.length; i++) {
+      var fun = funsOrNames[i];
+      if (typeof fun == 'string')
+        fun = container[fun];
+      fun.$callName = callNames[i];
+      funs.push(fun);
+    }
+    var fun = funs[0];
+    fun.$requiredArgCount = requiredParameterCount;
+    fun.$defaultValues = optionalParameterDefaultValues;
+    var reflectionInfo = funType;
+    if (typeof reflectionInfo == "number")
+      reflectionInfo += typesOffset;
+    var name = funsOrNames[0];
+    fun.$stubName = name;
+    var getterFunction = tearOff(funs, applyIndex || 0, reflectionInfo, isStatic, name, isIntercepted);
+    container[getterName] = getterFunction;
+    if (isStatic)
+      fun.$tearOff = getterFunction;
+  }
+  function installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) {
+    return installTearOff(container, getterName, true, false, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex);
+  }
+  function installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex) {
+    return installTearOff(container, getterName, false, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, funsOrNames, funType, applyIndex);
+  }
+  function setOrUpdateInterceptorsByTag(newTags) {
+    var tags = init.interceptorsByTag;
+    if (!tags) {
+      init.interceptorsByTag = newTags;
+      return;
+    }
+    copyProperties(newTags, tags);
+  }
+  function setOrUpdateLeafTags(newTags) {
+    var tags = init.leafTags;
+    if (!tags) {
+      init.leafTags = newTags;
+      return;
+    }
+    copyProperties(newTags, tags);
+  }
+  function updateTypes(newTypes) {
+    var types = init.types;
+    var length = types.length;
+    types.push.apply(types, newTypes);
+    return length;
+  }
+  function updateHolder(holder, newHolder) {
+    copyProperties(newHolder, holder);
+    return holder;
+  }
+  var hunkHelpers = function() {
+    var mkInstance = function(isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) {
+        return function(container, getterName, name, funType) {
+          return installInstanceTearOff(container, getterName, isIntercepted, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex);
+        };
+      },
+      mkStatic = function(requiredParameterCount, optionalParameterDefaultValues, callNames, applyIndex) {
+        return function(container, getterName, name, funType) {
+          return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex);
+        };
+      };
+    return {inherit: inherit, inheritMany: inheritMany, mixin: mixin, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, updateHolder: updateHolder, convertToFastObject: convertToFastObject, setFunctionNamesIfNecessary: setFunctionNamesIfNecessary, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags};
+  }();
+  function initializeDeferredHunk(hunk) {
+    typesOffset = init.types.length;
+    hunk(hunkHelpers, init, holders, $);
+  }
+  function getGlobalFromName(name) {
+    for (var i = 0; i < holders.length; i++) {
+      if (holders[i] == C)
+        continue;
+      if (holders[i][name])
+        return holders[i][name];
+    }
+  }
+  var C = {},
+  H = {JS_CONST: function JS_CONST() {
+    },
+    MappedIterable_MappedIterable: function(iterable, $function, $S, $T) {
+      if (type$.EfficientLengthIterable_dynamic._is(iterable))
+        return new H.EfficientLengthMappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>"));
+      return new H.MappedIterable(iterable, $function, $S._eval$1("@<0>")._bind$1($T)._eval$1("MappedIterable<1,2>"));
+    },
+    IterableElementError_noElement: function() {
+      return new P.StateError("No element");
+    },
+    IterableElementError_tooFew: function() {
+      return new P.StateError("Too few elements");
+    },
+    EfficientLengthIterable: function EfficientLengthIterable() {
+    },
+    ListIterable: function ListIterable() {
+    },
+    ListIterator: function ListIterator(t0, t1, t2) {
+      var _ = this;
+      _._iterable = t0;
+      _.__internal$_length = t1;
+      _._index = 0;
+      _._current = null;
+      _.$ti = t2;
+    },
+    MappedIterable: function MappedIterable(t0, t1, t2) {
+      this._iterable = t0;
+      this._f = t1;
+      this.$ti = t2;
+    },
+    EfficientLengthMappedIterable: function EfficientLengthMappedIterable(t0, t1, t2) {
+      this._iterable = t0;
+      this._f = t1;
+      this.$ti = t2;
+    },
+    MappedIterator: function MappedIterator(t0, t1, t2) {
+      var _ = this;
+      _._current = null;
+      _._iterator = t0;
+      _._f = t1;
+      _.$ti = t2;
+    },
+    MappedListIterable: function MappedListIterable(t0, t1, t2) {
+      this.__internal$_source = t0;
+      this._f = t1;
+      this.$ti = t2;
+    },
+    FixedLengthListMixin: function FixedLengthListMixin() {
+    },
+    Symbol: function Symbol(t0) {
+      this.__internal$_name = t0;
+    },
+    ConstantMap__throwUnmodifiable: function() {
+      throw H.wrapException(P.UnsupportedError$("Cannot modify unmodifiable Map"));
+    },
+    unminifyOrTag: function(rawClassName) {
+      var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName);
+      if (preserved != null)
+        return preserved;
+      return rawClassName;
+    },
+    isJsIndexable: function(object, record) {
+      var result;
+      if (record != null) {
+        result = record.x;
+        if (result != null)
+          return result;
+      }
+      return type$.JavaScriptIndexingBehavior_dynamic._is(object);
+    },
+    S: function(value) {
+      var res;
+      if (typeof value == "string")
+        return value;
+      if (typeof value == "number") {
+        if (value !== 0)
+          return "" + value;
+      } else if (true === value)
+        return "true";
+      else if (false === value)
+        return "false";
+      else if (value == null)
+        return "null";
+      res = J.toString$0$(value);
+      if (typeof res != "string")
+        throw H.wrapException(H.argumentErrorValue(value));
+      return res;
+    },
+    Primitives_objectHashCode: function(object) {
+      var hash = object.$identityHash;
+      if (hash == null) {
+        hash = Math.random() * 0x3fffffff | 0;
+        object.$identityHash = hash;
+      }
+      return hash;
+    },
+    Primitives_parseInt: function(source, radix) {
+      var match, decimalMatch;
+      if (typeof source != "string")
+        H.throwExpression(H.argumentErrorValue(source));
+      match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source);
+      if (match == null)
+        return null;
+      if (3 >= match.length)
+        return H.ioore(match, 3);
+      decimalMatch = match[3];
+      if (decimalMatch != null)
+        return parseInt(source, 10);
+      if (match[2] != null)
+        return parseInt(source, 16);
+      return null;
+    },
+    Primitives_objectTypeName: function(object) {
+      var t1 = H.Primitives__objectTypeNameNewRti(object);
+      return t1;
+    },
+    Primitives__objectTypeNameNewRti: function(object) {
+      var dispatchName, $constructor, constructorName;
+      if (object instanceof P.Object)
+        return H._rtiToString(H.instanceType(object), null);
+      if (J.getInterceptor$(object) === C.Interceptor_methods || type$.UnknownJavaScriptObject._is(object)) {
+        dispatchName = C.C_JS_CONST(object);
+        if (H.Primitives__saneNativeClassName(dispatchName))
+          return dispatchName;
+        $constructor = object.constructor;
+        if (typeof $constructor == "function") {
+          constructorName = $constructor.name;
+          if (typeof constructorName == "string" && H.Primitives__saneNativeClassName(constructorName))
+            return constructorName;
+        }
+      }
+      return H._rtiToString(H.instanceType(object), null);
+    },
+    Primitives__saneNativeClassName: function($name) {
+      var t1 = $name !== "Object" && $name !== "";
+      return t1;
+    },
+    Primitives__fromCharCodeApply: function(array) {
+      var result, i, i0, chunkEnd,
+        end = array.length;
+      if (end <= 500)
+        return String.fromCharCode.apply(null, array);
+      for (result = "", i = 0; i < end; i = i0) {
+        i0 = i + 500;
+        chunkEnd = i0 < end ? i0 : end;
+        result += String.fromCharCode.apply(null, array.slice(i, chunkEnd));
+      }
+      return result;
+    },
+    Primitives_stringFromCodePoints: function(codePoints) {
+      var t1, _i, i,
+        a = H.setRuntimeTypeInfo([], type$.JSArray_int);
+      for (t1 = codePoints.length, _i = 0; _i < codePoints.length; codePoints.length === t1 || (0, H.throwConcurrentModificationError)(codePoints), ++_i) {
+        i = codePoints[_i];
+        if (!H._isInt(i))
+          throw H.wrapException(H.argumentErrorValue(i));
+        if (i <= 65535)
+          C.JSArray_methods.add$1(a, i);
+        else if (i <= 1114111) {
+          C.JSArray_methods.add$1(a, 55296 + (C.JSInt_methods._shrOtherPositive$1(i - 65536, 10) & 1023));
+          C.JSArray_methods.add$1(a, 56320 + (i & 1023));
+        } else
+          throw H.wrapException(H.argumentErrorValue(i));
+      }
+      return H.Primitives__fromCharCodeApply(a);
+    },
+    Primitives_stringFromCharCodes: function(charCodes) {
+      var t1, _i, i;
+      for (t1 = charCodes.length, _i = 0; _i < t1; ++_i) {
+        i = charCodes[_i];
+        if (!H._isInt(i))
+          throw H.wrapException(H.argumentErrorValue(i));
+        if (i < 0)
+          throw H.wrapException(H.argumentErrorValue(i));
+        if (i > 65535)
+          return H.Primitives_stringFromCodePoints(charCodes);
+      }
+      return H.Primitives__fromCharCodeApply(charCodes);
+    },
+    Primitives_stringFromNativeUint8List: function(charCodes, start, end) {
+      var i, result, i0, chunkEnd;
+      if (end <= 500 && start === 0 && end === charCodes.length)
+        return String.fromCharCode.apply(null, charCodes);
+      for (i = start, result = ""; i < end; i = i0) {
+        i0 = i + 500;
+        chunkEnd = i0 < end ? i0 : end;
+        result += String.fromCharCode.apply(null, charCodes.subarray(i, chunkEnd));
+      }
+      return result;
+    },
+    Primitives_stringFromCharCode: function(charCode) {
+      var bits;
+      if (charCode <= 65535)
+        return String.fromCharCode(charCode);
+      if (charCode <= 1114111) {
+        bits = charCode - 65536;
+        return String.fromCharCode((55296 | C.JSInt_methods._shrOtherPositive$1(bits, 10)) >>> 0, 56320 | bits & 1023);
+      }
+      throw H.wrapException(P.RangeError$range(charCode, 0, 1114111, null, null));
+    },
+    Primitives_lazyAsJsDate: function(receiver) {
+      if (receiver.date === void 0)
+        receiver.date = new Date(receiver._value);
+      return receiver.date;
+    },
+    Primitives_getYear: function(receiver) {
+      return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCFullYear() + 0 : H.Primitives_lazyAsJsDate(receiver).getFullYear() + 0;
+    },
+    Primitives_getMonth: function(receiver) {
+      return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMonth() + 1 : H.Primitives_lazyAsJsDate(receiver).getMonth() + 1;
+    },
+    Primitives_getDay: function(receiver) {
+      return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCDate() + 0 : H.Primitives_lazyAsJsDate(receiver).getDate() + 0;
+    },
+    Primitives_getHours: function(receiver) {
+      return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCHours() + 0 : H.Primitives_lazyAsJsDate(receiver).getHours() + 0;
+    },
+    Primitives_getMinutes: function(receiver) {
+      return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMinutes() + 0 : H.Primitives_lazyAsJsDate(receiver).getMinutes() + 0;
+    },
+    Primitives_getSeconds: function(receiver) {
+      return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCSeconds() + 0 : H.Primitives_lazyAsJsDate(receiver).getSeconds() + 0;
+    },
+    Primitives_getMilliseconds: function(receiver) {
+      return receiver.isUtc ? H.Primitives_lazyAsJsDate(receiver).getUTCMilliseconds() + 0 : H.Primitives_lazyAsJsDate(receiver).getMilliseconds() + 0;
+    },
+    Primitives_functionNoSuchMethod: function($function, positionalArguments, namedArguments) {
+      var $arguments, namedArgumentList, t1 = {};
+      t1.argumentCount = 0;
+      $arguments = [];
+      namedArgumentList = [];
+      t1.argumentCount = positionalArguments.length;
+      C.JSArray_methods.addAll$1($arguments, positionalArguments);
+      t1.names = "";
+      if (namedArguments != null && !namedArguments.get$isEmpty(namedArguments))
+        namedArguments.forEach$1(0, new H.Primitives_functionNoSuchMethod_closure(t1, namedArgumentList, $arguments));
+      "" + t1.argumentCount;
+      return J.noSuchMethod$1$($function, new H.JSInvocationMirror(C.Symbol_call, 0, $arguments, namedArgumentList, 0));
+    },
+    Primitives_applyFunction: function($function, positionalArguments, namedArguments) {
+      var t1, $arguments, argumentCount, jsStub;
+      if (positionalArguments instanceof Array)
+        t1 = namedArguments == null || namedArguments.get$isEmpty(namedArguments);
+      else
+        t1 = false;
+      if (t1) {
+        $arguments = positionalArguments;
+        argumentCount = $arguments.length;
+        if (argumentCount === 0) {
+          if (!!$function.call$0)
+            return $function.call$0();
+        } else if (argumentCount === 1) {
+          if (!!$function.call$1)
+            return $function.call$1($arguments[0]);
+        } else if (argumentCount === 2) {
+          if (!!$function.call$2)
+            return $function.call$2($arguments[0], $arguments[1]);
+        } else if (argumentCount === 3) {
+          if (!!$function.call$3)
+            return $function.call$3($arguments[0], $arguments[1], $arguments[2]);
+        } else if (argumentCount === 4) {
+          if (!!$function.call$4)
+            return $function.call$4($arguments[0], $arguments[1], $arguments[2], $arguments[3]);
+        } else if (argumentCount === 5)
+          if (!!$function.call$5)
+            return $function.call$5($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]);
+        jsStub = $function["call" + "$" + argumentCount];
+        if (jsStub != null)
+          return jsStub.apply($function, $arguments);
+      }
+      return H.Primitives__genericApplyFunction2($function, positionalArguments, namedArguments);
+    },
+    Primitives__genericApplyFunction2: function($function, positionalArguments, namedArguments) {
+      var $arguments, argumentCount, requiredParameterCount, defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, keys, _i, defaultValue, used, key;
+      if (positionalArguments != null)
+        $arguments = positionalArguments instanceof Array ? positionalArguments : P.List_List$from(positionalArguments, true, type$.dynamic);
+      else
+        $arguments = [];
+      argumentCount = $arguments.length;
+      requiredParameterCount = $function.$requiredArgCount;
+      if (argumentCount < requiredParameterCount)
+        return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+      defaultValuesClosure = $function.$defaultValues;
+      t1 = defaultValuesClosure == null;
+      defaultValues = !t1 ? defaultValuesClosure() : null;
+      interceptor = J.getInterceptor$($function);
+      jsFunction = interceptor["call*"];
+      if (typeof jsFunction == "string")
+        jsFunction = interceptor[jsFunction];
+      if (t1) {
+        if (namedArguments != null && namedArguments.get$isNotEmpty(namedArguments))
+          return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+        if (argumentCount === requiredParameterCount)
+          return jsFunction.apply($function, $arguments);
+        return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+      }
+      if (defaultValues instanceof Array) {
+        if (namedArguments != null && namedArguments.get$isNotEmpty(namedArguments))
+          return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+        if (argumentCount > requiredParameterCount + defaultValues.length)
+          return H.Primitives_functionNoSuchMethod($function, $arguments, null);
+        C.JSArray_methods.addAll$1($arguments, defaultValues.slice(argumentCount - requiredParameterCount));
+        return jsFunction.apply($function, $arguments);
+      } else {
+        if (argumentCount > requiredParameterCount)
+          return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+        keys = Object.keys(defaultValues);
+        if (namedArguments == null)
+          for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) {
+            defaultValue = defaultValues[H._asStringS(keys[_i])];
+            if (C.C__Required === defaultValue)
+              return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+            C.JSArray_methods.add$1($arguments, defaultValue);
+          }
+        else {
+          for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) {
+            key = H._asStringS(keys[_i]);
+            if (namedArguments.containsKey$1(key)) {
+              ++used;
+              C.JSArray_methods.add$1($arguments, namedArguments.$index(0, key));
+            } else {
+              defaultValue = defaultValues[key];
+              if (C.C__Required === defaultValue)
+                return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+              C.JSArray_methods.add$1($arguments, defaultValue);
+            }
+          }
+          if (used !== namedArguments.get$length(namedArguments))
+            return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+        }
+        return jsFunction.apply($function, $arguments);
+      }
+    },
+    iae: function(argument) {
+      throw H.wrapException(H.argumentErrorValue(argument));
+    },
+    ioore: function(receiver, index) {
+      if (receiver == null)
+        J.get$length$asx(receiver);
+      throw H.wrapException(H.diagnoseIndexError(receiver, index));
+    },
+    diagnoseIndexError: function(indexable, index) {
+      var $length, t1, _s5_ = "index";
+      if (!H._isInt(index))
+        return new P.ArgumentError(true, index, _s5_, null);
+      $length = H._asIntS(J.get$length$asx(indexable));
+      if (!(index < 0)) {
+        if (typeof $length !== "number")
+          return H.iae($length);
+        t1 = index >= $length;
+      } else
+        t1 = true;
+      if (t1)
+        return P.IndexError$(index, indexable, _s5_, null, $length);
+      return P.RangeError$value(index, _s5_);
+    },
+    argumentErrorValue: function(object) {
+      return new P.ArgumentError(true, object, null, null);
+    },
+    checkBool: function(value) {
+      return value;
+    },
+    wrapException: function(ex) {
+      var wrapper, t1;
+      if (ex == null)
+        ex = new P.NullThrownError();
+      wrapper = new Error();
+      wrapper.dartException = ex;
+      t1 = H.toStringWrapper;
+      if ("defineProperty" in Object) {
+        Object.defineProperty(wrapper, "message", {get: t1});
+        wrapper.name = "";
+      } else
+        wrapper.toString = t1;
+      return wrapper;
+    },
+    toStringWrapper: function() {
+      return J.toString$0$(this.dartException);
+    },
+    throwExpression: function(ex) {
+      throw H.wrapException(ex);
+    },
+    throwConcurrentModificationError: function(collection) {
+      throw H.wrapException(P.ConcurrentModificationError$(collection));
+    },
+    TypeErrorDecoder_extractPattern: function(message) {
+      var match, $arguments, argumentsExpr, expr, method, receiver;
+      message = H.quoteStringForRegExp(message.replace(String({}), '$receiver$'));
+      match = message.match(/\\\$[a-zA-Z]+\\\$/g);
+      if (match == null)
+        match = H.setRuntimeTypeInfo([], type$.JSArray_String);
+      $arguments = match.indexOf("\\$arguments\\$");
+      argumentsExpr = match.indexOf("\\$argumentsExpr\\$");
+      expr = match.indexOf("\\$expr\\$");
+      method = match.indexOf("\\$method\\$");
+      receiver = match.indexOf("\\$receiver\\$");
+      return new H.TypeErrorDecoder(message.replace(new RegExp('\\\\\\$arguments\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$', 'g'), '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver);
+    },
+    TypeErrorDecoder_provokeCallErrorOn: function(expression) {
+      return function($expr$) {
+        var $argumentsExpr$ = '$arguments$';
+        try {
+          $expr$.$method$($argumentsExpr$);
+        } catch (e) {
+          return e.message;
+        }
+      }(expression);
+    },
+    TypeErrorDecoder_provokePropertyErrorOn: function(expression) {
+      return function($expr$) {
+        try {
+          $expr$.$method$;
+        } catch (e) {
+          return e.message;
+        }
+      }(expression);
+    },
+    NullError$: function(_message, match) {
+      return new H.NullError(_message, match == null ? null : match.method);
+    },
+    JsNoSuchMethodError$: function(_message, match) {
+      var t1 = match == null,
+        t2 = t1 ? null : match.method;
+      return new H.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver);
+    },
+    unwrapException: function(ex) {
+      if (ex == null)
+        return new H.NullThrownFromJavaScriptException(ex);
+      if (ex instanceof H.ExceptionAndStackTrace)
+        return H.saveStackTrace(ex, ex.dartException);
+      if (typeof ex !== "object")
+        return ex;
+      if ("dartException" in ex)
+        return H.saveStackTrace(ex, ex.dartException);
+      return H._unwrapNonDartException(ex);
+    },
+    saveStackTrace: function(ex, error) {
+      if (type$.Error._is(error))
+        if (error.$thrownJsError == null)
+          error.$thrownJsError = ex;
+      return error;
+    },
+    _unwrapNonDartException: function(ex) {
+      var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, t1, _null = null;
+      if (!("message" in ex))
+        return ex;
+      message = ex.message;
+      if ("number" in ex && typeof ex.number == "number") {
+        number = ex.number;
+        ieErrorCode = number & 65535;
+        if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10)
+          switch (ieErrorCode) {
+            case 438:
+              return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", _null));
+            case 445:
+            case 5007:
+              return H.saveStackTrace(ex, H.NullError$(H.S(message) + " (Error " + ieErrorCode + ")", _null));
+          }
+      }
+      if (ex instanceof TypeError) {
+        nsme = $.$get$TypeErrorDecoder_noSuchMethodPattern();
+        notClosure = $.$get$TypeErrorDecoder_notClosurePattern();
+        nullCall = $.$get$TypeErrorDecoder_nullCallPattern();
+        nullLiteralCall = $.$get$TypeErrorDecoder_nullLiteralCallPattern();
+        undefCall = $.$get$TypeErrorDecoder_undefinedCallPattern();
+        undefLiteralCall = $.$get$TypeErrorDecoder_undefinedLiteralCallPattern();
+        nullProperty = $.$get$TypeErrorDecoder_nullPropertyPattern();
+        $.$get$TypeErrorDecoder_nullLiteralPropertyPattern();
+        undefProperty = $.$get$TypeErrorDecoder_undefinedPropertyPattern();
+        undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern();
+        match = nsme.matchTypeError$1(message);
+        if (match != null)
+          return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asStringS(message), match));
+        else {
+          match = notClosure.matchTypeError$1(message);
+          if (match != null) {
+            match.method = "call";
+            return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asStringS(message), match));
+          } else {
+            match = nullCall.matchTypeError$1(message);
+            if (match == null) {
+              match = nullLiteralCall.matchTypeError$1(message);
+              if (match == null) {
+                match = undefCall.matchTypeError$1(message);
+                if (match == null) {
+                  match = undefLiteralCall.matchTypeError$1(message);
+                  if (match == null) {
+                    match = nullProperty.matchTypeError$1(message);
+                    if (match == null) {
+                      match = nullLiteralCall.matchTypeError$1(message);
+                      if (match == null) {
+                        match = undefProperty.matchTypeError$1(message);
+                        if (match == null) {
+                          match = undefLiteralProperty.matchTypeError$1(message);
+                          t1 = match != null;
+                        } else
+                          t1 = true;
+                      } else
+                        t1 = true;
+                    } else
+                      t1 = true;
+                  } else
+                    t1 = true;
+                } else
+                  t1 = true;
+              } else
+                t1 = true;
+            } else
+              t1 = true;
+            if (t1)
+              return H.saveStackTrace(ex, H.NullError$(H._asStringS(message), match));
+          }
+        }
+        return H.saveStackTrace(ex, new H.UnknownJsTypeError(typeof message == "string" ? message : ""));
+      }
+      if (ex instanceof RangeError) {
+        if (typeof message == "string" && message.indexOf("call stack") !== -1)
+          return new P.StackOverflowError();
+        message = function(ex) {
+          try {
+            return String(ex);
+          } catch (e) {
+          }
+          return null;
+        }(ex);
+        return H.saveStackTrace(ex, new P.ArgumentError(false, _null, _null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message));
+      }
+      if (typeof InternalError == "function" && ex instanceof InternalError)
+        if (typeof message == "string" && message === "too much recursion")
+          return new P.StackOverflowError();
+      return ex;
+    },
+    getTraceFromException: function(exception) {
+      var trace;
+      if (exception instanceof H.ExceptionAndStackTrace)
+        return exception.stackTrace;
+      if (exception == null)
+        return new H._StackTrace(exception);
+      trace = exception.$cachedTrace;
+      if (trace != null)
+        return trace;
+      return exception.$cachedTrace = new H._StackTrace(exception);
+    },
+    fillLiteralMap: function(keyValuePairs, result) {
+      var index, index0, index1,
+        $length = keyValuePairs.length;
+      for (index = 0; index < $length; index = index1) {
+        index0 = index + 1;
+        index1 = index0 + 1;
+        result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]);
+      }
+      return result;
+    },
+    invokeClosure: function(closure, numberOfArguments, arg1, arg2, arg3, arg4) {
+      type$.Function._as(closure);
+      switch (H._asIntS(numberOfArguments)) {
+        case 0:
+          return closure.call$0();
+        case 1:
+          return closure.call$1(arg1);
+        case 2:
+          return closure.call$2(arg1, arg2);
+        case 3:
+          return closure.call$3(arg1, arg2, arg3);
+        case 4:
+          return closure.call$4(arg1, arg2, arg3, arg4);
+      }
+      throw H.wrapException(P.Exception_Exception("Unsupported number of arguments for wrapped closure"));
+    },
+    convertDartClosureToJS: function(closure, arity) {
+      var $function;
+      if (closure == null)
+        return null;
+      $function = closure.$identity;
+      if (!!$function)
+        return $function;
+      $function = function(closure, arity, invoke) {
+        return function(a1, a2, a3, a4) {
+          return invoke(closure, arity, a1, a2, a3, a4);
+        };
+      }(closure, arity, H.invokeClosure);
+      closure.$identity = $function;
+      return $function;
+    },
+    Closure_fromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, propertyName) {
+      var $constructor, t1, trampoline, signatureFunction, applyTrampoline, i, stub, stubCallName,
+        $function = functions[0],
+        callName = $function.$callName,
+        $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(null, null, null, "").constructor.prototype);
+      $prototype.$initialize = $prototype.constructor;
+      if (isStatic)
+        $constructor = function static_tear_off() {
+          this.$initialize();
+        };
+      else {
+        t1 = $.Closure_functionCounter;
+        if (typeof t1 !== "number")
+          return t1.$add();
+        $.Closure_functionCounter = t1 + 1;
+        t1 = new Function("a,b,c,d" + t1, "this.$initialize(a,b,c,d" + t1 + ")");
+        $constructor = t1;
+      }
+      $prototype.constructor = $constructor;
+      $constructor.prototype = $prototype;
+      if (!isStatic) {
+        trampoline = H.Closure_forwardCallTo(receiver, $function, isIntercepted);
+        trampoline.$reflectionInfo = reflectionInfo;
+      } else {
+        $prototype.$static_name = propertyName;
+        trampoline = $function;
+      }
+      signatureFunction = H.Closure__computeSignatureFunctionNewRti(reflectionInfo, isStatic, isIntercepted);
+      $prototype.$signature = signatureFunction;
+      $prototype[callName] = trampoline;
+      for (applyTrampoline = trampoline, i = 1; i < functions.length; ++i) {
+        stub = functions[i];
+        stubCallName = stub.$callName;
+        if (stubCallName != null) {
+          stub = isStatic ? stub : H.Closure_forwardCallTo(receiver, stub, isIntercepted);
+          $prototype[stubCallName] = stub;
+        }
+        if (i === applyTrampolineIndex) {
+          stub.$reflectionInfo = reflectionInfo;
+          applyTrampoline = stub;
+        }
+      }
+      $prototype["call*"] = applyTrampoline;
+      $prototype.$requiredArgCount = $function.$requiredArgCount;
+      $prototype.$defaultValues = $function.$defaultValues;
+      return $constructor;
+    },
+    Closure__computeSignatureFunctionNewRti: function(functionType, isStatic, isIntercepted) {
+      var typeEvalMethod;
+      if (typeof functionType == "number")
+        return function(getType, t) {
+          return function() {
+            return getType(t);
+          };
+        }(H.getTypeFromTypesTable, functionType);
+      if (typeof functionType == "string") {
+        if (isStatic)
+          throw H.wrapException("Cannot compute signature for static tearoff.");
+        typeEvalMethod = isIntercepted ? H.BoundClosure_evalRecipeIntercepted : H.BoundClosure_evalRecipe;
+        return function(recipe, evalOnReceiver) {
+          return function() {
+            return evalOnReceiver(this, recipe);
+          };
+        }(functionType, typeEvalMethod);
+      }
+      throw H.wrapException("Error in functionType of tearoff");
+    },
+    Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) {
+      var getSelf = H.BoundClosure_selfOf;
+      switch (isSuperCall ? -1 : arity) {
+        case 0:
+          return function(n, S) {
+            return function() {
+              return S(this)[n]();
+            };
+          }(stubName, getSelf);
+        case 1:
+          return function(n, S) {
+            return function(a) {
+              return S(this)[n](a);
+            };
+          }(stubName, getSelf);
+        case 2:
+          return function(n, S) {
+            return function(a, b) {
+              return S(this)[n](a, b);
+            };
+          }(stubName, getSelf);
+        case 3:
+          return function(n, S) {
+            return function(a, b, c) {
+              return S(this)[n](a, b, c);
+            };
+          }(stubName, getSelf);
+        case 4:
+          return function(n, S) {
+            return function(a, b, c, d) {
+              return S(this)[n](a, b, c, d);
+            };
+          }(stubName, getSelf);
+        case 5:
+          return function(n, S) {
+            return function(a, b, c, d, e) {
+              return S(this)[n](a, b, c, d, e);
+            };
+          }(stubName, getSelf);
+        default:
+          return function(f, s) {
+            return function() {
+              return f.apply(s(this), arguments);
+            };
+          }($function, getSelf);
+      }
+    },
+    Closure_forwardCallTo: function(receiver, $function, isIntercepted) {
+      var stubName, arity, lookedUpFunction, t1, t2, selfName, $arguments;
+      if (isIntercepted)
+        return H.Closure_forwardInterceptedCallTo(receiver, $function);
+      stubName = $function.$stubName;
+      arity = $function.length;
+      lookedUpFunction = receiver[stubName];
+      t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction;
+      t2 = !t1 || arity >= 27;
+      if (t2)
+        return H.Closure_cspForwardCall(arity, !t1, stubName, $function);
+      if (arity === 0) {
+        t1 = $.Closure_functionCounter;
+        if (typeof t1 !== "number")
+          return t1.$add();
+        $.Closure_functionCounter = t1 + 1;
+        selfName = "self" + t1;
+        return new Function("return function(){var " + selfName + " = this." + H.S(H.BoundClosure_selfFieldName()) + ";return " + selfName + "." + H.S(stubName) + "();}")();
+      }
+      $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(",");
+      t1 = $.Closure_functionCounter;
+      if (typeof t1 !== "number")
+        return t1.$add();
+      $.Closure_functionCounter = t1 + 1;
+      $arguments += t1;
+      return new Function("return function(" + $arguments + "){return this." + H.S(H.BoundClosure_selfFieldName()) + "." + H.S(stubName) + "(" + $arguments + ");}")();
+    },
+    Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $function) {
+      var getSelf = H.BoundClosure_selfOf,
+        getReceiver = H.BoundClosure_receiverOf;
+      switch (isSuperCall ? -1 : arity) {
+        case 0:
+          throw H.wrapException(H.RuntimeError$("Intercepted function with no arguments."));
+        case 1:
+          return function(n, s, r) {
+            return function() {
+              return s(this)[n](r(this));
+            };
+          }($name, getSelf, getReceiver);
+        case 2:
+          return function(n, s, r) {
+            return function(a) {
+              return s(this)[n](r(this), a);
+            };
+          }($name, getSelf, getReceiver);
+        case 3:
+          return function(n, s, r) {
+            return function(a, b) {
+              return s(this)[n](r(this), a, b);
+            };
+          }($name, getSelf, getReceiver);
+        case 4:
+          return function(n, s, r) {
+            return function(a, b, c) {
+              return s(this)[n](r(this), a, b, c);
+            };
+          }($name, getSelf, getReceiver);
+        case 5:
+          return function(n, s, r) {
+            return function(a, b, c, d) {
+              return s(this)[n](r(this), a, b, c, d);
+            };
+          }($name, getSelf, getReceiver);
+        case 6:
+          return function(n, s, r) {
+            return function(a, b, c, d, e) {
+              return s(this)[n](r(this), a, b, c, d, e);
+            };
+          }($name, getSelf, getReceiver);
+        default:
+          return function(f, s, r, a) {
+            return function() {
+              a = [r(this)];
+              Array.prototype.push.apply(a, arguments);
+              return f.apply(s(this), a);
+            };
+          }($function, getSelf, getReceiver);
+      }
+    },
+    Closure_forwardInterceptedCallTo: function(receiver, $function) {
+      var stubName, arity, lookedUpFunction, t1, t2, $arguments,
+        selfField = H.BoundClosure_selfFieldName(),
+        receiverField = $.BoundClosure_receiverFieldNameCache;
+      if (receiverField == null)
+        receiverField = $.BoundClosure_receiverFieldNameCache = H.BoundClosure_computeFieldNamed("receiver");
+      stubName = $function.$stubName;
+      arity = $function.length;
+      lookedUpFunction = receiver[stubName];
+      t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction;
+      t2 = !t1 || arity >= 28;
+      if (t2)
+        return H.Closure_cspForwardInterceptedCall(arity, !t1, stubName, $function);
+      if (arity === 1) {
+        t1 = "return function(){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + receiverField + ");";
+        t2 = $.Closure_functionCounter;
+        if (typeof t2 !== "number")
+          return t2.$add();
+        $.Closure_functionCounter = t2 + 1;
+        return new Function(t1 + t2 + "}")();
+      }
+      $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).join(",");
+      t1 = "return function(" + $arguments + "){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + receiverField + ", " + $arguments + ");";
+      t2 = $.Closure_functionCounter;
+      if (typeof t2 !== "number")
+        return t2.$add();
+      $.Closure_functionCounter = t2 + 1;
+      return new Function(t1 + t2 + "}")();
+    },
+    closureFromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, $name) {
+      return H.Closure_fromTearOff(receiver, functions, applyTrampolineIndex, reflectionInfo, !!isStatic, !!isIntercepted, $name);
+    },
+    BoundClosure_evalRecipe: function(closure, recipe) {
+      return H._Universe_evalInEnvironment(init.typeUniverse, H.instanceType(closure._self), recipe);
+    },
+    BoundClosure_evalRecipeIntercepted: function(closure, recipe) {
+      return H._Universe_evalInEnvironment(init.typeUniverse, H.instanceType(closure._receiver), recipe);
+    },
+    BoundClosure_selfOf: function(closure) {
+      return closure._self;
+    },
+    BoundClosure_receiverOf: function(closure) {
+      return closure._receiver;
+    },
+    BoundClosure_selfFieldName: function() {
+      var t1 = $.BoundClosure_selfFieldNameCache;
+      return t1 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t1;
+    },
+    BoundClosure_computeFieldNamed: function(fieldName) {
+      var t1, i, $name,
+        template = new H.BoundClosure("self", "target", "receiver", "name"),
+        names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template), type$.dynamic);
+      for (t1 = names.length, i = 0; i < t1; ++i) {
+        $name = names[i];
+        if (template[$name] === fieldName)
+          return $name;
+      }
+      throw H.wrapException(P.ArgumentError$("Field name " + fieldName + " not found."));
+    },
+    boolConversionCheck: function(value) {
+      if (value == null)
+        H.assertThrow("boolean expression must not be null");
+      return value;
+    },
+    assertThrow: function(message) {
+      throw H.wrapException(new H._AssertionError(message));
+    },
+    throwCyclicInit: function(staticName) {
+      throw H.wrapException(new P.CyclicInitializationError(staticName));
+    },
+    RuntimeError$: function(message) {
+      return new H.RuntimeError(message);
+    },
+    getIsolateAffinityTag: function($name) {
+      return init.getIsolateTag($name);
+    },
+    setRuntimeTypeInfo: function(target, rti) {
+      target[init.arrayRti] = rti;
+      return target;
+    },
+    getRuntimeTypeInfo: function(target) {
+      if (target == null)
+        return null;
+      return target.$ti;
+    },
+    getRuntimeTypeArguments: function(interceptor, object, substitutionName) {
+      return H.substitute(interceptor["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(object));
+    },
+    getRuntimeType: function(object) {
+      var rti = object instanceof H.Closure ? H.closureFunctionType(object) : null;
+      return H.createRuntimeType(rti == null ? H.instanceType(object) : rti);
+    },
+    substitute: function(substitution, $arguments) {
+      if (substitution == null)
+        return $arguments;
+      substitution = substitution.apply(null, $arguments);
+      if (substitution == null)
+        return null;
+      if (Array.isArray(substitution))
+        return substitution;
+      if (typeof substitution == "function")
+        return substitution.apply(null, $arguments);
+      return $arguments;
+    },
+    computeSignature: function(signature, context, contextName) {
+      return signature.apply(context, H.getRuntimeTypeArguments(J.getInterceptor$(context), context, contextName));
+    },
+    defineProperty: function(obj, property, value) {
+      Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true});
+    },
+    lookupAndCacheInterceptor: function(obj) {
+      var interceptor, interceptorClass, altTag, mark, t1,
+        tag = H._asStringS($.getTagFunction.call$1(obj)),
+        record = $.dispatchRecordsForInstanceTags[tag];
+      if (record != null) {
+        Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
+        return record.i;
+      }
+      interceptor = $.interceptorsForUncacheableTags[tag];
+      if (interceptor != null)
+        return interceptor;
+      interceptorClass = init.interceptorsByTag[tag];
+      if (interceptorClass == null) {
+        altTag = H._asStringQ($.alternateTagFunction.call$2(obj, tag));
+        if (altTag != null) {
+          record = $.dispatchRecordsForInstanceTags[altTag];
+          if (record != null) {
+            Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
+            return record.i;
+          }
+          interceptor = $.interceptorsForUncacheableTags[altTag];
+          if (interceptor != null)
+            return interceptor;
+          interceptorClass = init.interceptorsByTag[altTag];
+          tag = altTag;
+        }
+      }
+      if (interceptorClass == null)
+        return null;
+      interceptor = interceptorClass.prototype;
+      mark = tag[0];
+      if (mark === "!") {
+        record = H.makeLeafDispatchRecord(interceptor);
+        $.dispatchRecordsForInstanceTags[tag] = record;
+        Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
+        return record.i;
+      }
+      if (mark === "~") {
+        $.interceptorsForUncacheableTags[tag] = interceptor;
+        return interceptor;
+      }
+      if (mark === "-") {
+        t1 = H.makeLeafDispatchRecord(interceptor);
+        Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true});
+        return t1.i;
+      }
+      if (mark === "+")
+        return H.patchInteriorProto(obj, interceptor);
+      if (mark === "*")
+        throw H.wrapException(P.UnimplementedError$(tag));
+      if (init.leafTags[tag] === true) {
+        t1 = H.makeLeafDispatchRecord(interceptor);
+        Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true});
+        return t1.i;
+      } else
+        return H.patchInteriorProto(obj, interceptor);
+    },
+    patchInteriorProto: function(obj, interceptor) {
+      var proto = Object.getPrototypeOf(obj);
+      Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true});
+      return interceptor;
+    },
+    makeLeafDispatchRecord: function(interceptor) {
+      return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior);
+    },
+    makeDefaultDispatchRecord: function(tag, interceptorClass, proto) {
+      var interceptor = interceptorClass.prototype;
+      if (init.leafTags[tag] === true)
+        return H.makeLeafDispatchRecord(interceptor);
+      else
+        return J.makeDispatchRecord(interceptor, proto, null, null);
+    },
+    initNativeDispatch: function() {
+      if (true === $.initNativeDispatchFlag)
+        return;
+      $.initNativeDispatchFlag = true;
+      H.initNativeDispatchContinue();
+    },
+    initNativeDispatchContinue: function() {
+      var map, tags, fun, i, tag, proto, record, interceptorClass;
+      $.dispatchRecordsForInstanceTags = Object.create(null);
+      $.interceptorsForUncacheableTags = Object.create(null);
+      H.initHooks();
+      map = init.interceptorsByTag;
+      tags = Object.getOwnPropertyNames(map);
+      if (typeof window != "undefined") {
+        window;
+        fun = function() {
+        };
+        for (i = 0; i < tags.length; ++i) {
+          tag = tags[i];
+          proto = $.prototypeForTagFunction.call$1(tag);
+          if (proto != null) {
+            record = H.makeDefaultDispatchRecord(tag, map[tag], proto);
+            if (record != null) {
+              Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
+              fun.prototype = proto;
+            }
+          }
+        }
+      }
+      for (i = 0; i < tags.length; ++i) {
+        tag = tags[i];
+        if (/^[A-Za-z_]/.test(tag)) {
+          interceptorClass = map[tag];
+          map["!" + tag] = interceptorClass;
+          map["~" + tag] = interceptorClass;
+          map["-" + tag] = interceptorClass;
+          map["+" + tag] = interceptorClass;
+          map["*" + tag] = interceptorClass;
+        }
+      }
+    },
+    initHooks: function() {
+      var transformers, i, transformer, getTag, getUnknownTag, prototypeForTag,
+        hooks = C.C_JS_CONST0();
+      hooks = H.applyHooksTransformer(C.C_JS_CONST1, H.applyHooksTransformer(C.C_JS_CONST2, H.applyHooksTransformer(C.C_JS_CONST3, H.applyHooksTransformer(C.C_JS_CONST3, H.applyHooksTransformer(C.C_JS_CONST4, H.applyHooksTransformer(C.C_JS_CONST5, H.applyHooksTransformer(C.C_JS_CONST6(C.C_JS_CONST), hooks)))))));
+      if (typeof dartNativeDispatchHooksTransformer != "undefined") {
+        transformers = dartNativeDispatchHooksTransformer;
+        if (typeof transformers == "function")
+          transformers = [transformers];
+        if (transformers.constructor == Array)
+          for (i = 0; i < transformers.length; ++i) {
+            transformer = transformers[i];
+            if (typeof transformer == "function")
+              hooks = transformer(hooks) || hooks;
+          }
+      }
+      getTag = hooks.getTag;
+      getUnknownTag = hooks.getUnknownTag;
+      prototypeForTag = hooks.prototypeForTag;
+      $.getTagFunction = new H.initHooks_closure(getTag);
+      $.alternateTagFunction = new H.initHooks_closure0(getUnknownTag);
+      $.prototypeForTagFunction = new H.initHooks_closure1(prototypeForTag);
+    },
+    applyHooksTransformer: function(transformer, hooks) {
+      return transformer(hooks) || hooks;
+    },
+    quoteStringForRegExp: function(string) {
+      if (/[[\]{}()*+?.\\^$|]/.test(string))
+        return string.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&");
+      return string;
+    },
+    ConstantMapView: function ConstantMapView(t0, t1) {
+      this._collection$_map = t0;
+      this.$ti = t1;
+    },
+    ConstantMap: function ConstantMap() {
+    },
+    ConstantMap_map_closure: function ConstantMap_map_closure(t0, t1, t2) {
+      this.$this = t0;
+      this.transform = t1;
+      this.result = t2;
+    },
+    ConstantStringMap: function ConstantStringMap(t0, t1, t2, t3) {
+      var _ = this;
+      _._length = t0;
+      _._jsObject = t1;
+      _._keys = t2;
+      _.$ti = t3;
+    },
+    _ConstantMapKeyIterable: function _ConstantMapKeyIterable(t0, t1) {
+      this._map = t0;
+      this.$ti = t1;
+    },
+    JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) {
+      var _ = this;
+      _._memberName = t0;
+      _.__js_helper$_kind = t1;
+      _._arguments = t2;
+      _._namedArgumentNames = t3;
+      _._typeArgumentCount = t4;
+    },
+    Primitives_functionNoSuchMethod_closure: function Primitives_functionNoSuchMethod_closure(t0, t1, t2) {
+      this._box_0 = t0;
+      this.namedArgumentList = t1;
+      this.$arguments = t2;
+    },
+    TypeErrorDecoder: function TypeErrorDecoder(t0, t1, t2, t3, t4, t5) {
+      var _ = this;
+      _._pattern = t0;
+      _._arguments = t1;
+      _._argumentsExpr = t2;
+      _._expr = t3;
+      _._method = t4;
+      _._receiver = t5;
+    },
+    NullError: function NullError(t0, t1) {
+      this._message = t0;
+      this._method = t1;
+    },
+    JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) {
+      this._message = t0;
+      this._method = t1;
+      this._receiver = t2;
+    },
+    UnknownJsTypeError: function UnknownJsTypeError(t0) {
+      this._message = t0;
+    },
+    NullThrownFromJavaScriptException: function NullThrownFromJavaScriptException(t0) {
+      this._irritant = t0;
+    },
+    ExceptionAndStackTrace: function ExceptionAndStackTrace(t0, t1) {
+      this.dartException = t0;
+      this.stackTrace = t1;
+    },
+    _StackTrace: function _StackTrace(t0) {
+      this._exception = t0;
+      this._trace = null;
+    },
+    Closure: function Closure() {
+    },
+    TearOffClosure: function TearOffClosure() {
+    },
+    StaticClosure: function StaticClosure() {
+    },
+    BoundClosure: function BoundClosure(t0, t1, t2, t3) {
+      var _ = this;
+      _._self = t0;
+      _.__js_helper$_target = t1;
+      _._receiver = t2;
+      _._name = t3;
+    },
+    RuntimeError: function RuntimeError(t0) {
+      this.message = t0;
+    },
+    _AssertionError: function _AssertionError(t0) {
+      this.message = t0;
+    },
+    _Required: function _Required() {
+    },
+    JsLinkedHashMap: function JsLinkedHashMap(t0) {
+      var _ = this;
+      _._length = 0;
+      _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null;
+      _._modifications = 0;
+      _.$ti = t0;
+    },
+    JsLinkedHashMap_addAll_closure: function JsLinkedHashMap_addAll_closure(t0) {
+      this.$this = t0;
+    },
+    LinkedHashMapCell: function LinkedHashMapCell(t0, t1) {
+      var _ = this;
+      _.hashMapCellKey = t0;
+      _.hashMapCellValue = t1;
+      _._previous = _._next = null;
+    },
+    LinkedHashMapKeyIterable: function LinkedHashMapKeyIterable(t0, t1) {
+      this._map = t0;
+      this.$ti = t1;
+    },
+    LinkedHashMapKeyIterator: function LinkedHashMapKeyIterator(t0, t1, t2) {
+      var _ = this;
+      _._map = t0;
+      _._modifications = t1;
+      _.__js_helper$_current = _._cell = null;
+      _.$ti = t2;
+    },
+    initHooks_closure: function initHooks_closure(t0) {
+      this.getTag = t0;
+    },
+    initHooks_closure0: function initHooks_closure0(t0) {
+      this.getUnknownTag = t0;
+    },
+    initHooks_closure1: function initHooks_closure1(t0) {
+      this.prototypeForTag = t0;
+    },
+    _checkViewArguments: function(buffer, offsetInBytes, $length) {
+    },
+    _ensureNativeList: function(list) {
+      var t1, result, i;
+      if (type$.JSIndexable_dynamic._is(list))
+        return list;
+      t1 = J.getInterceptor$asx(list);
+      result = P.List_List$filled(t1.get$length(list), null, false, type$.dynamic);
+      for (i = 0; i < t1.get$length(list); ++i)
+        C.JSArray_methods.$indexSet(result, i, t1.$index(list, i));
+      return result;
+    },
+    NativeByteData_NativeByteData$view: function(buffer, offsetInBytes, $length) {
+      H._checkViewArguments(buffer, offsetInBytes, $length);
+      return $length == null ? new DataView(buffer, offsetInBytes) : new DataView(buffer, offsetInBytes, $length);
+    },
+    _checkValidIndex: function(index, list, $length) {
+      if (index >>> 0 !== index || index >= $length)
+        throw H.wrapException(H.diagnoseIndexError(list, index));
+    },
+    NativeByteBuffer: function NativeByteBuffer() {
+    },
+    NativeTypedData: function NativeTypedData() {
+    },
+    NativeByteData: function NativeByteData() {
+    },
+    NativeTypedArray: function NativeTypedArray() {
+    },
+    NativeTypedArrayOfDouble: function NativeTypedArrayOfDouble() {
+    },
+    NativeTypedArrayOfInt: function NativeTypedArrayOfInt() {
+    },
+    NativeFloat32List: function NativeFloat32List() {
+    },
+    NativeFloat64List: function NativeFloat64List() {
+    },
+    NativeInt16List: function NativeInt16List() {
+    },
+    NativeInt32List: function NativeInt32List() {
+    },
+    NativeInt8List: function NativeInt8List() {
+    },
+    NativeUint16List: function NativeUint16List() {
+    },
+    NativeUint32List: function NativeUint32List() {
+    },
+    NativeUint8ClampedList: function NativeUint8ClampedList() {
+    },
+    NativeUint8List: function NativeUint8List() {
+    },
+    _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin() {
+    },
+    _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin() {
+    },
+    _NativeTypedArrayOfInt_NativeTypedArray_ListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin() {
+    },
+    _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() {
+    },
+    Rti__getQuestionFromStar: function(universe, rti) {
+      var question = rti._precomputed1;
+      return question == null ? rti._precomputed1 = H._Universe__lookupQuestionRti(universe, rti._primary, true) : question;
+    },
+    Rti__getFutureFromFutureOr: function(universe, rti) {
+      var future = rti._precomputed1;
+      return future == null ? rti._precomputed1 = H._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future;
+    },
+    Rti__isUnionOfFunctionType: function(rti) {
+      var kind = rti._kind;
+      if (kind === 6 || kind === 7 || kind === 8)
+        return H.Rti__isUnionOfFunctionType(rti._primary);
+      return kind === 11 || kind === 12;
+    },
+    Rti__getCanonicalRecipe: function(rti) {
+      return rti._canonicalRecipe;
+    },
+    findType: function(recipe) {
+      return H._Universe_eval(init.typeUniverse, recipe, false);
+    },
+    _substitute: function(universe, rti, typeArguments, depth) {
+      var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument,
+        kind = rti._kind;
+      switch (kind) {
+        case 5:
+        case 1:
+        case 2:
+        case 3:
+        case 4:
+          return rti;
+        case 6:
+          baseType = rti._primary;
+          substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth);
+          if (substitutedBaseType === baseType)
+            return rti;
+          return H._Universe__lookupStarRti(universe, substitutedBaseType, true);
+        case 7:
+          baseType = rti._primary;
+          substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth);
+          if (substitutedBaseType === baseType)
+            return rti;
+          return H._Universe__lookupQuestionRti(universe, substitutedBaseType, true);
+        case 8:
+          baseType = rti._primary;
+          substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth);
+          if (substitutedBaseType === baseType)
+            return rti;
+          return H._Universe__lookupFutureOrRti(universe, substitutedBaseType, true);
+        case 9:
+          interfaceTypeArguments = rti._rest;
+          substitutedInterfaceTypeArguments = H._substituteArray(universe, interfaceTypeArguments, typeArguments, depth);
+          if (substitutedInterfaceTypeArguments === interfaceTypeArguments)
+            return rti;
+          return H._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments);
+        case 10:
+          base = rti._primary;
+          substitutedBase = H._substitute(universe, base, typeArguments, depth);
+          $arguments = rti._rest;
+          substitutedArguments = H._substituteArray(universe, $arguments, typeArguments, depth);
+          if (substitutedBase === base && substitutedArguments === $arguments)
+            return rti;
+          return H._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments);
+        case 11:
+          returnType = rti._primary;
+          substitutedReturnType = H._substitute(universe, returnType, typeArguments, depth);
+          functionParameters = rti._rest;
+          substitutedFunctionParameters = H._substituteFunctionParameters(universe, functionParameters, typeArguments, depth);
+          if (substitutedReturnType === returnType && substitutedFunctionParameters === functionParameters)
+            return rti;
+          return H._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters);
+        case 12:
+          bounds = rti._rest;
+          depth += bounds.length;
+          substitutedBounds = H._substituteArray(universe, bounds, typeArguments, depth);
+          base = rti._primary;
+          substitutedBase = H._substitute(universe, base, typeArguments, depth);
+          if (substitutedBounds === bounds && substitutedBase === base)
+            return rti;
+          return H._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true);
+        case 13:
+          index = rti._primary;
+          if (index < depth)
+            return rti;
+          argument = typeArguments[index - depth];
+          if (argument == null)
+            return rti;
+          return argument;
+        default:
+          throw H.wrapException(P.AssertionError$("Attempted to substitute unexpected RTI kind " + kind));
+      }
+    },
+    _substituteArray: function(universe, rtiArray, typeArguments, depth) {
+      var changed, i, rti, substitutedRti,
+        $length = rtiArray.length,
+        result = [];
+      for (changed = false, i = 0; i < $length; ++i) {
+        rti = rtiArray[i];
+        substitutedRti = H._substitute(universe, rti, typeArguments, depth);
+        if (substitutedRti !== rti)
+          changed = true;
+        result.push(substitutedRti);
+      }
+      return changed ? result : rtiArray;
+    },
+    _substituteNamed: function(universe, namedArray, typeArguments, depth) {
+      var changed, i, t1, t2, rti, substitutedRti,
+        $length = namedArray.length,
+        result = [];
+      for (changed = false, i = 0; i < $length; i += 3) {
+        t1 = namedArray[i];
+        t2 = namedArray[i + 1];
+        rti = namedArray[i + 2];
+        substitutedRti = H._substitute(universe, rti, typeArguments, depth);
+        if (substitutedRti !== rti)
+          changed = true;
+        result.push(t1);
+        result.push(t2);
+        result.push(substitutedRti);
+      }
+      return changed ? result : namedArray;
+    },
+    _substituteFunctionParameters: function(universe, functionParameters, typeArguments, depth) {
+      var result,
+        requiredPositional = functionParameters._requiredPositional,
+        substitutedRequiredPositional = H._substituteArray(universe, requiredPositional, typeArguments, depth),
+        optionalPositional = functionParameters._optionalPositional,
+        substitutedOptionalPositional = H._substituteArray(universe, optionalPositional, typeArguments, depth),
+        named = functionParameters._named,
+        substitutedNamed = H._substituteNamed(universe, named, typeArguments, depth);
+      if (substitutedRequiredPositional === requiredPositional && substitutedOptionalPositional === optionalPositional && substitutedNamed === named)
+        return functionParameters;
+      result = new H._FunctionParameters();
+      result._requiredPositional = substitutedRequiredPositional;
+      result._optionalPositional = substitutedOptionalPositional;
+      result._named = substitutedNamed;
+      return result;
+    },
+    closureFunctionType: function(closure) {
+      var signature = closure.$signature;
+      if (signature != null) {
+        if (typeof signature == "number")
+          return H.getTypeFromTypesTable(signature);
+        return closure.$signature();
+      }
+      return null;
+    },
+    instanceOrFunctionType: function(object, testRti) {
+      var rti;
+      if (H.Rti__isUnionOfFunctionType(testRti))
+        if (object instanceof H.Closure) {
+          rti = H.closureFunctionType(object);
+          if (rti != null)
+            return rti;
+        }
+      return H.instanceType(object);
+    },
+    instanceType: function(object) {
+      var rti;
+      if (object instanceof P.Object) {
+        rti = object.$ti;
+        return rti != null ? rti : H._instanceTypeFromConstructor(object);
+      }
+      if (Array.isArray(object))
+        return H._arrayInstanceType(object);
+      return H._instanceTypeFromConstructor(J.getInterceptor$(object));
+    },
+    _arrayInstanceType: function(object) {
+      var rti = object[init.arrayRti],
+        defaultRti = type$.JSArray_dynamic;
+      if (rti == null)
+        return defaultRti;
+      if (rti.constructor !== defaultRti.constructor)
+        return defaultRti;
+      return rti;
+    },
+    _instanceType: function(object) {
+      var rti = object.$ti;
+      return rti != null ? rti : H._instanceTypeFromConstructor(object);
+    },
+    _instanceTypeFromConstructor: function(instance) {
+      var $constructor = instance.constructor,
+        probe = $constructor.$ccache;
+      if (probe != null)
+        return probe;
+      return H._instanceTypeFromConstructorMiss(instance, $constructor);
+    },
+    _instanceTypeFromConstructorMiss: function(instance, $constructor) {
+      var effectiveConstructor = instance instanceof H.Closure ? instance.__proto__.__proto__.constructor : $constructor,
+        rti = H._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name);
+      $constructor.$ccache = rti;
+      return rti;
+    },
+    getTypeFromTypesTable: function(index) {
+      var table, type, rti;
+      H._asIntS(index);
+      table = init.types;
+      type = table[index];
+      if (typeof type == "string") {
+        rti = H._Universe_eval(init.typeUniverse, type, false);
+        table[index] = rti;
+        return rti;
+      }
+      return type;
+    },
+    createRuntimeType: function(rti) {
+      var recipe, starErasedRecipe, starErasedRti,
+        type = rti._cachedRuntimeType;
+      if (type != null)
+        return type;
+      recipe = rti._canonicalRecipe;
+      starErasedRecipe = recipe.replace(/\*/g, "");
+      if (starErasedRecipe === recipe)
+        return rti._cachedRuntimeType = new H._Type(rti);
+      starErasedRti = H._Universe_eval(init.typeUniverse, starErasedRecipe, true);
+      type = starErasedRti._cachedRuntimeType;
+      return rti._cachedRuntimeType = type == null ? starErasedRti._cachedRuntimeType = new H._Type(starErasedRti) : type;
+    },
+    typeLiteral: function(recipe) {
+      return H.createRuntimeType(H._Universe_eval(init.typeUniverse, recipe, false));
+    },
+    _installSpecializedIsTest: function(object) {
+      var unstarred, isFn, testRti = this,
+        t1 = type$.Object;
+      if (testRti === t1)
+        return H._finishIsFn(testRti, object, H._isObject);
+      if (!H.isStrongTopType(testRti))
+        if (!(testRti === type$.legacy_Object))
+          t1 = testRti === t1;
+        else
+          t1 = true;
+      else
+        t1 = true;
+      if (t1)
+        return H._finishIsFn(testRti, object, H._isTop);
+      t1 = testRti._kind;
+      unstarred = t1 === 6 ? testRti._primary : testRti;
+      if (unstarred === type$.int)
+        isFn = H._isInt;
+      else if (unstarred === type$.double || unstarred === type$.num)
+        isFn = H._isNum;
+      else if (unstarred === type$.String)
+        isFn = H._isString;
+      else
+        isFn = unstarred === type$.bool ? H._isBool : null;
+      if (isFn != null)
+        return H._finishIsFn(testRti, object, isFn);
+      if (unstarred._kind === 9) {
+        t1 = unstarred._primary;
+        if (unstarred._rest.every(H.isTopType)) {
+          testRti._specializedTestResource = "$is" + t1;
+          return H._finishIsFn(testRti, object, H._isTestViaProperty);
+        }
+      } else if (t1 === 7)
+        return H._finishIsFn(testRti, object, H._generalNullableIsTestImplementation);
+      return H._finishIsFn(testRti, object, H._generalIsTestImplementation);
+    },
+    _finishIsFn: function(testRti, object, isFn) {
+      testRti._is = isFn;
+      return testRti._is(object);
+    },
+    _installSpecializedAsCheck: function(object) {
+      var t1, asFn, testRti = this;
+      if (!H.isStrongTopType(testRti))
+        if (!(testRti === type$.legacy_Object))
+          t1 = testRti === type$.Object;
+        else
+          t1 = true;
+      else
+        t1 = true;
+      if (t1)
+        asFn = H._asTop;
+      else if (testRti === type$.Object)
+        asFn = H._asObject;
+      else
+        asFn = H._generalNullableAsCheckImplementation;
+      testRti._as = asFn;
+      return testRti._as(object);
+    },
+    _nullIs: function(testRti) {
+      var t2,
+        t1 = testRti._kind;
+      if (!H.isStrongTopType(testRti))
+        if (!(testRti === type$.legacy_Object))
+          t2 = testRti === type$.Object;
+        else
+          t2 = true;
+      else
+        t2 = true;
+      return t2 || testRti === type$.legacy_Never || t1 === 7 || testRti === type$.Null || testRti === type$.JSNull;
+    },
+    _generalIsTestImplementation: function(object) {
+      var testRti = this;
+      if (object == null)
+        return H._nullIs(testRti);
+      return H._isSubtype(init.typeUniverse, H.instanceOrFunctionType(object, testRti), null, testRti, null);
+    },
+    _generalNullableIsTestImplementation: function(object) {
+      if (object == null)
+        return true;
+      return this._primary._is(object);
+    },
+    _isTestViaProperty: function(object) {
+      var t1 = this,
+        tag = t1._specializedTestResource;
+      if (object instanceof P.Object)
+        return !!object[tag];
+      return !!J.getInterceptor$(object)[tag];
+    },
+    _generalAsCheckImplementation: function(object) {
+      var testRti = this;
+      if (object == null)
+        return object;
+      else if (testRti._is(object))
+        return object;
+      H._failedAsCheck(object, testRti);
+    },
+    _generalNullableAsCheckImplementation: function(object) {
+      var testRti = this;
+      if (object == null)
+        return object;
+      else if (testRti._is(object))
+        return object;
+      H._failedAsCheck(object, testRti);
+    },
+    _failedAsCheck: function(object, testRti) {
+      throw H.wrapException(H._TypeError$fromMessage(H._Error_compose(object, H.instanceOrFunctionType(object, testRti), H._rtiToString(testRti, null))));
+    },
+    _Error_compose: function(object, objectRti, checkedTypeDescription) {
+      var objectDescription = P.Error_safeToString(object),
+        objectTypeDescription = H._rtiToString(objectRti == null ? H.instanceType(object) : objectRti, null);
+      return objectDescription + ": type '" + H.S(objectTypeDescription) + "' is not a subtype of type '" + H.S(checkedTypeDescription) + "'";
+    },
+    _TypeError$fromMessage: function(message) {
+      return new H._TypeError("TypeError: " + message);
+    },
+    _TypeError__TypeError$forType: function(object, type) {
+      return new H._TypeError("TypeError: " + H._Error_compose(object, null, type));
+    },
+    _isObject: function(object) {
+      return object != null;
+    },
+    _asObject: function(object) {
+      return object;
+    },
+    _isTop: function(object) {
+      return true;
+    },
+    _asTop: function(object) {
+      return object;
+    },
+    _isBool: function(object) {
+      return true === object || false === object;
+    },
+    _asBool: function(object) {
+      if (true === object || false === object)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "bool"));
+    },
+    _asBoolS: function(object) {
+      if (true === object || false === object)
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "bool"));
+    },
+    _asBoolQ: function(object) {
+      if (true === object || false === object)
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "bool?"));
+    },
+    _asDouble: function(object) {
+      if (typeof object == "number")
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "double"));
+    },
+    _asDoubleS: function(object) {
+      if (typeof object == "number")
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "double"));
+    },
+    _asDoubleQ: function(object) {
+      if (typeof object == "number")
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "double?"));
+    },
+    _isInt: function(object) {
+      return typeof object == "number" && Math.floor(object) === object;
+    },
+    _asInt: function(object) {
+      if (typeof object == "number" && Math.floor(object) === object)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "int"));
+    },
+    _asIntS: function(object) {
+      if (typeof object == "number" && Math.floor(object) === object)
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "int"));
+    },
+    _asIntQ: function(object) {
+      if (typeof object == "number" && Math.floor(object) === object)
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "int?"));
+    },
+    _isNum: function(object) {
+      return typeof object == "number";
+    },
+    _asNum: function(object) {
+      if (typeof object == "number")
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "num"));
+    },
+    _asNumS: function(object) {
+      if (typeof object == "number")
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "num"));
+    },
+    _asNumQ: function(object) {
+      if (typeof object == "number")
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "num?"));
+    },
+    _isString: function(object) {
+      return typeof object == "string";
+    },
+    _asString: function(object) {
+      if (typeof object == "string")
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "String"));
+    },
+    _asStringS: function(object) {
+      if (typeof object == "string")
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "String"));
+    },
+    _asStringQ: function(object) {
+      if (typeof object == "string")
+        return object;
+      if (object == null)
+        return object;
+      throw H.wrapException(H._TypeError__TypeError$forType(object, "String?"));
+    },
+    _rtiArrayToString: function(array, genericContext) {
+      var s, sep, i;
+      for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ")
+        s += C.JSString_methods.$add(sep, H._rtiToString(array[i], genericContext));
+      return s;
+    },
+    _functionRtiToString: function(functionType, genericContext, bounds) {
+      var boundsLength, outerContextLength, offset, i, t1, t2, t3, typeParametersText, typeSep, t4, t5, boundRti, kind, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", ";
+      if (bounds != null) {
+        boundsLength = bounds.length;
+        if (genericContext == null) {
+          genericContext = H.setRuntimeTypeInfo([], type$.JSArray_String);
+          outerContextLength = null;
+        } else
+          outerContextLength = genericContext.length;
+        offset = genericContext.length;
+        for (i = boundsLength; i > 0; --i)
+          C.JSArray_methods.add$1(genericContext, "T" + (offset + i));
+        for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, t3 = type$.Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) {
+          typeParametersText += typeSep;
+          t4 = genericContext.length;
+          t5 = t4 - 1 - i;
+          if (t5 < 0)
+            return H.ioore(genericContext, t5);
+          typeParametersText = C.JSString_methods.$add(typeParametersText, genericContext[t5]);
+          boundRti = bounds[i];
+          kind = boundRti._kind;
+          if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1))
+            if (!(boundRti === t2))
+              t4 = boundRti === t3;
+            else
+              t4 = true;
+          else
+            t4 = true;
+          if (!t4)
+            typeParametersText += C.JSString_methods.$add(" extends ", H._rtiToString(boundRti, genericContext));
+        }
+        typeParametersText += ">";
+      } else {
+        typeParametersText = "";
+        outerContextLength = null;
+      }
+      t1 = functionType._primary;
+      parameters = functionType._rest;
+      requiredPositional = parameters._requiredPositional;
+      requiredPositionalLength = requiredPositional.length;
+      optionalPositional = parameters._optionalPositional;
+      optionalPositionalLength = optionalPositional.length;
+      named = parameters._named;
+      namedLength = named.length;
+      returnTypeText = H._rtiToString(t1, genericContext);
+      for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_)
+        argumentsText += C.JSString_methods.$add(sep, H._rtiToString(requiredPositional[i], genericContext));
+      if (optionalPositionalLength > 0) {
+        argumentsText += sep + "[";
+        for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_)
+          argumentsText += C.JSString_methods.$add(sep, H._rtiToString(optionalPositional[i], genericContext));
+        argumentsText += "]";
+      }
+      if (namedLength > 0) {
+        argumentsText += sep + "{";
+        for (sep = "", i = 0; i < namedLength; i += 3, sep = _s2_) {
+          argumentsText += sep;
+          if (named[i + 1])
+            argumentsText += "required ";
+          argumentsText += J.$add$ansx(H._rtiToString(named[i + 2], genericContext), " ") + named[i];
+        }
+        argumentsText += "}";
+      }
+      if (outerContextLength != null) {
+        genericContext.toString;
+        genericContext.length = outerContextLength;
+      }
+      return typeParametersText + "(" + argumentsText + ") => " + H.S(returnTypeText);
+    },
+    _rtiToString: function(rti, genericContext) {
+      var s, questionArgument, argumentKind, $name, $arguments, t1, t2,
+        kind = rti._kind;
+      if (kind === 5)
+        return "erased";
+      if (kind === 2)
+        return "dynamic";
+      if (kind === 3)
+        return "void";
+      if (kind === 1)
+        return "Never";
+      if (kind === 4)
+        return "any";
+      if (kind === 6) {
+        s = H._rtiToString(rti._primary, genericContext);
+        return s;
+      }
+      if (kind === 7) {
+        questionArgument = rti._primary;
+        s = H._rtiToString(questionArgument, genericContext);
+        argumentKind = questionArgument._kind;
+        return J.$add$ansx(argumentKind === 11 || argumentKind === 12 ? C.JSString_methods.$add("(", s) + ")" : s, "?");
+      }
+      if (kind === 8)
+        return "FutureOr<" + H.S(H._rtiToString(rti._primary, genericContext)) + ">";
+      if (kind === 9) {
+        $name = H._unminifyOrTag(rti._primary);
+        $arguments = rti._rest;
+        return $arguments.length !== 0 ? $name + ("<" + H._rtiArrayToString($arguments, genericContext) + ">") : $name;
+      }
+      if (kind === 11)
+        return H._functionRtiToString(rti, genericContext, null);
+      if (kind === 12)
+        return H._functionRtiToString(rti._primary, genericContext, rti._rest);
+      if (kind === 13) {
+        genericContext.toString;
+        t1 = rti._primary;
+        t2 = genericContext.length;
+        t1 = t2 - 1 - t1;
+        if (t1 < 0 || t1 >= t2)
+          return H.ioore(genericContext, t1);
+        return genericContext[t1];
+      }
+      return "?";
+    },
+    _unminifyOrTag: function(rawClassName) {
+      var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName);
+      if (preserved != null)
+        return preserved;
+      return rawClassName;
+    },
+    _Universe_findRule: function(universe, targetType) {
+      var rule = universe.tR[targetType];
+      for (; typeof rule == "string";)
+        rule = universe.tR[rule];
+      return rule;
+    },
+    _Universe_findErasedType: function(universe, cls) {
+      var $length, erased, $arguments, i, $interface,
+        metadata = universe.eT,
+        probe = metadata[cls];
+      if (probe == null)
+        return H._Universe_eval(universe, cls, false);
+      else if (typeof probe == "number") {
+        $length = probe;
+        erased = H._Universe__lookupTerminalRti(universe, 5, "#");
+        $arguments = [];
+        for (i = 0; i < $length; ++i)
+          $arguments.push(erased);
+        $interface = H._Universe__lookupInterfaceRti(universe, cls, $arguments);
+        metadata[cls] = $interface;
+        return $interface;
+      } else
+        return probe;
+    },
+    _Universe_addRules: function(universe, rules) {
+      return H._Utils_objectAssign(universe.tR, rules);
+    },
+    _Universe_addErasedTypes: function(universe, types) {
+      return H._Utils_objectAssign(universe.eT, types);
+    },
+    _Universe_eval: function(universe, recipe, normalize) {
+      var rti,
+        cache = universe.eC,
+        probe = cache.get(recipe);
+      if (probe != null)
+        return probe;
+      rti = H._Parser_parse(H._Parser_create(universe, null, recipe, normalize));
+      cache.set(recipe, rti);
+      return rti;
+    },
+    _Universe_evalInEnvironment: function(universe, environment, recipe) {
+      var probe, rti,
+        cache = environment._evalCache;
+      if (cache == null)
+        cache = environment._evalCache = new Map();
+      probe = cache.get(recipe);
+      if (probe != null)
+        return probe;
+      rti = H._Parser_parse(H._Parser_create(universe, environment, recipe, true));
+      cache.set(recipe, rti);
+      return rti;
+    },
+    _Universe_bind: function(universe, environment, argumentsRti) {
+      var argumentsRecipe, probe, rti,
+        cache = environment._bindCache;
+      if (cache == null)
+        cache = environment._bindCache = new Map();
+      argumentsRecipe = argumentsRti._canonicalRecipe;
+      probe = cache.get(argumentsRecipe);
+      if (probe != null)
+        return probe;
+      rti = H._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 10 ? argumentsRti._rest : [argumentsRti]);
+      cache.set(argumentsRecipe, rti);
+      return rti;
+    },
+    _Universe__installTypeTests: function(universe, rti) {
+      rti._as = H._installSpecializedAsCheck;
+      rti._is = H._installSpecializedIsTest;
+      return rti;
+    },
+    _Universe__lookupTerminalRti: function(universe, kind, key) {
+      var rti, t1,
+        probe = universe.eC.get(key);
+      if (probe != null)
+        return probe;
+      rti = new H.Rti(null, null);
+      rti._kind = kind;
+      rti._canonicalRecipe = key;
+      t1 = H._Universe__installTypeTests(universe, rti);
+      universe.eC.set(key, t1);
+      return t1;
+    },
+    _Universe__lookupStarRti: function(universe, baseType, normalize) {
+      var t1,
+        key = baseType._canonicalRecipe + "*",
+        probe = universe.eC.get(key);
+      if (probe != null)
+        return probe;
+      t1 = H._Universe__createStarRti(universe, baseType, key, normalize);
+      universe.eC.set(key, t1);
+      return t1;
+    },
+    _Universe__createStarRti: function(universe, baseType, key, normalize) {
+      var baseKind, t1, rti;
+      if (normalize) {
+        baseKind = baseType._kind;
+        if (!H.isStrongTopType(baseType))
+          t1 = baseType === type$.Null || baseType === type$.JSNull || baseKind === 7 || baseKind === 6;
+        else
+          t1 = true;
+        if (t1)
+          return baseType;
+      }
+      rti = new H.Rti(null, null);
+      rti._kind = 6;
+      rti._primary = baseType;
+      rti._canonicalRecipe = key;
+      return H._Universe__installTypeTests(universe, rti);
+    },
+    _Universe__lookupQuestionRti: function(universe, baseType, normalize) {
+      var t1,
+        key = baseType._canonicalRecipe + "?",
+        probe = universe.eC.get(key);
+      if (probe != null)
+        return probe;
+      t1 = H._Universe__createQuestionRti(universe, baseType, key, normalize);
+      universe.eC.set(key, t1);
+      return t1;
+    },
+    _Universe__createQuestionRti: function(universe, baseType, key, normalize) {
+      var baseKind, t1, starArgument, rti;
+      if (normalize) {
+        baseKind = baseType._kind;
+        if (!H.isStrongTopType(baseType))
+          if (!(baseType === type$.Null || baseType === type$.JSNull))
+            if (baseKind !== 7)
+              t1 = baseKind === 8 && H.isNullable(baseType._primary);
+            else
+              t1 = true;
+          else
+            t1 = true;
+        else
+          t1 = true;
+        if (t1)
+          return baseType;
+        else if (baseKind === 1 || baseType === type$.legacy_Never)
+          return type$.Null;
+        else if (baseKind === 6) {
+          starArgument = baseType._primary;
+          if (starArgument._kind === 8 && H.isNullable(starArgument._primary))
+            return starArgument;
+          else
+            return H.Rti__getQuestionFromStar(universe, baseType);
+        }
+      }
+      rti = new H.Rti(null, null);
+      rti._kind = 7;
+      rti._primary = baseType;
+      rti._canonicalRecipe = key;
+      return H._Universe__installTypeTests(universe, rti);
+    },
+    _Universe__lookupFutureOrRti: function(universe, baseType, normalize) {
+      var t1,
+        key = baseType._canonicalRecipe + "/",
+        probe = universe.eC.get(key);
+      if (probe != null)
+        return probe;
+      t1 = H._Universe__createFutureOrRti(universe, baseType, key, normalize);
+      universe.eC.set(key, t1);
+      return t1;
+    },
+    _Universe__createFutureOrRti: function(universe, baseType, key, normalize) {
+      var t1, t2, rti;
+      if (normalize) {
+        t1 = baseType._kind;
+        if (!H.isStrongTopType(baseType))
+          if (!(baseType === type$.legacy_Object))
+            t2 = baseType === type$.Object;
+          else
+            t2 = true;
+        else
+          t2 = true;
+        if (t2 || baseType === type$.Object)
+          return baseType;
+        else if (t1 === 1)
+          return H._Universe__lookupInterfaceRti(universe, "Future", [baseType]);
+        else if (baseType === type$.Null || baseType === type$.JSNull)
+          return type$.nullable_Future_Null;
+      }
+      rti = new H.Rti(null, null);
+      rti._kind = 8;
+      rti._primary = baseType;
+      rti._canonicalRecipe = key;
+      return H._Universe__installTypeTests(universe, rti);
+    },
+    _Universe__lookupGenericFunctionParameterRti: function(universe, index) {
+      var rti, t1,
+        key = "" + index + "^",
+        probe = universe.eC.get(key);
+      if (probe != null)
+        return probe;
+      rti = new H.Rti(null, null);
+      rti._kind = 13;
+      rti._primary = index;
+      rti._canonicalRecipe = key;
+      t1 = H._Universe__installTypeTests(universe, rti);
+      universe.eC.set(key, t1);
+      return t1;
+    },
+    _Universe__canonicalRecipeJoin: function($arguments) {
+      var s, sep, i,
+        $length = $arguments.length;
+      for (s = "", sep = "", i = 0; i < $length; ++i, sep = ",")
+        s += sep + $arguments[i]._canonicalRecipe;
+      return s;
+    },
+    _Universe__canonicalRecipeJoinNamed: function($arguments) {
+      var s, sep, i, t1, nameSep, s0,
+        $length = $arguments.length;
+      for (s = "", sep = "", i = 0; i < $length; i += 3, sep = ",") {
+        t1 = $arguments[i];
+        nameSep = $arguments[i + 1] ? "!" : ":";
+        s0 = $arguments[i + 2]._canonicalRecipe;
+        s += sep + t1 + nameSep + s0;
+      }
+      return s;
+    },
+    _Universe__lookupInterfaceRti: function(universe, $name, $arguments) {
+      var probe, rti, t1,
+        s = $name;
+      if ($arguments.length !== 0)
+        s += "<" + H._Universe__canonicalRecipeJoin($arguments) + ">";
+      probe = universe.eC.get(s);
+      if (probe != null)
+        return probe;
+      rti = new H.Rti(null, null);
+      rti._kind = 9;
+      rti._primary = $name;
+      rti._rest = $arguments;
+      if ($arguments.length > 0)
+        rti._precomputed1 = $arguments[0];
+      rti._canonicalRecipe = s;
+      t1 = H._Universe__installTypeTests(universe, rti);
+      universe.eC.set(s, t1);
+      return t1;
+    },
+    _Universe__lookupBindingRti: function(universe, base, $arguments) {
+      var newBase, newArguments, key, probe, rti, t1;
+      if (base._kind === 10) {
+        newBase = base._primary;
+        newArguments = base._rest.concat($arguments);
+      } else {
+        newArguments = $arguments;
+        newBase = base;
+      }
+      key = newBase._canonicalRecipe + (";<" + H._Universe__canonicalRecipeJoin(newArguments) + ">");
+      probe = universe.eC.get(key);
+      if (probe != null)
+        return probe;
+      rti = new H.Rti(null, null);
+      rti._kind = 10;
+      rti._primary = newBase;
+      rti._rest = newArguments;
+      rti._canonicalRecipe = key;
+      t1 = H._Universe__installTypeTests(universe, rti);
+      universe.eC.set(key, t1);
+      return t1;
+    },
+    _Universe__lookupFunctionRti: function(universe, returnType, parameters) {
+      var sep, t1, key, probe, rti,
+        s = returnType._canonicalRecipe,
+        requiredPositional = parameters._requiredPositional,
+        requiredPositionalLength = requiredPositional.length,
+        optionalPositional = parameters._optionalPositional,
+        optionalPositionalLength = optionalPositional.length,
+        named = parameters._named,
+        namedLength = named.length,
+        recipe = "(" + H._Universe__canonicalRecipeJoin(requiredPositional);
+      if (optionalPositionalLength > 0) {
+        sep = requiredPositionalLength > 0 ? "," : "";
+        t1 = H._Universe__canonicalRecipeJoin(optionalPositional);
+        recipe += sep + "[" + t1 + "]";
+      }
+      if (namedLength > 0) {
+        sep = requiredPositionalLength > 0 ? "," : "";
+        t1 = H._Universe__canonicalRecipeJoinNamed(named);
+        recipe += sep + "{" + t1 + "}";
+      }
+      key = s + (recipe + ")");
+      probe = universe.eC.get(key);
+      if (probe != null)
+        return probe;
+      rti = new H.Rti(null, null);
+      rti._kind = 11;
+      rti._primary = returnType;
+      rti._rest = parameters;
+      rti._canonicalRecipe = key;
+      t1 = H._Universe__installTypeTests(universe, rti);
+      universe.eC.set(key, t1);
+      return t1;
+    },
+    _Universe__lookupGenericFunctionRti: function(universe, baseFunctionType, bounds, normalize) {
+      var t1,
+        key = baseFunctionType._canonicalRecipe + ("<" + H._Universe__canonicalRecipeJoin(bounds) + ">"),
+        probe = universe.eC.get(key);
+      if (probe != null)
+        return probe;
+      t1 = H._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize);
+      universe.eC.set(key, t1);
+      return t1;
+    },
+    _Universe__createGenericFunctionRti: function(universe, baseFunctionType, bounds, key, normalize) {
+      var $length, typeArguments, count, i, bound, substitutedBase, substitutedBounds, rti;
+      if (normalize) {
+        $length = bounds.length;
+        typeArguments = new Array($length);
+        for (count = 0, i = 0; i < $length; ++i) {
+          bound = bounds[i];
+          if (bound._kind === 1) {
+            typeArguments[i] = bound;
+            ++count;
+          }
+        }
+        if (count > 0) {
+          substitutedBase = H._substitute(universe, baseFunctionType, typeArguments, 0);
+          substitutedBounds = H._substituteArray(universe, bounds, typeArguments, 0);
+          return H._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds);
+        }
+      }
+      rti = new H.Rti(null, null);
+      rti._kind = 12;
+      rti._primary = baseFunctionType;
+      rti._rest = bounds;
+      rti._canonicalRecipe = key;
+      return H._Universe__installTypeTests(universe, rti);
+    },
+    _Parser_create: function(universe, environment, recipe, normalize) {
+      return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize};
+    },
+    _Parser_parse: function(parser) {
+      var t1, i, ch, universe, array, head, base, u, parameters, optionalPositional, named, item,
+        source = parser.r,
+        stack = parser.s;
+      for (t1 = source.length, i = 0; i < t1;) {
+        ch = source.charCodeAt(i);
+        if (ch >= 48 && ch <= 57)
+          i = H._Parser_handleDigit(i + 1, ch, source, stack);
+        else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36)
+          i = H._Parser_handleIdentifier(parser, i, source, stack, false);
+        else if (ch === 46)
+          i = H._Parser_handleIdentifier(parser, i, source, stack, true);
+        else {
+          ++i;
+          switch (ch) {
+            case 44:
+              break;
+            case 58:
+              stack.push(false);
+              break;
+            case 33:
+              stack.push(true);
+              break;
+            case 59:
+              stack.push(H._Parser_toType(parser.u, parser.e, stack.pop()));
+              break;
+            case 94:
+              stack.push(H._Universe__lookupGenericFunctionParameterRti(parser.u, stack.pop()));
+              break;
+            case 35:
+              stack.push(H._Universe__lookupTerminalRti(parser.u, 5, "#"));
+              break;
+            case 64:
+              stack.push(H._Universe__lookupTerminalRti(parser.u, 2, "@"));
+              break;
+            case 126:
+              stack.push(H._Universe__lookupTerminalRti(parser.u, 3, "~"));
+              break;
+            case 60:
+              stack.push(parser.p);
+              parser.p = stack.length;
+              break;
+            case 62:
+              universe = parser.u;
+              array = stack.splice(parser.p);
+              H._Parser_toTypes(parser.u, parser.e, array);
+              parser.p = stack.pop();
+              head = stack.pop();
+              if (typeof head == "string")
+                stack.push(H._Universe__lookupInterfaceRti(universe, head, array));
+              else {
+                base = H._Parser_toType(universe, parser.e, head);
+                switch (base._kind) {
+                  case 11:
+                    stack.push(H._Universe__lookupGenericFunctionRti(universe, base, array, parser.n));
+                    break;
+                  default:
+                    stack.push(H._Universe__lookupBindingRti(universe, base, array));
+                    break;
+                }
+              }
+              break;
+            case 38:
+              H._Parser_handleExtendedOperations(parser, stack);
+              break;
+            case 42:
+              u = parser.u;
+              stack.push(H._Universe__lookupStarRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n));
+              break;
+            case 63:
+              u = parser.u;
+              stack.push(H._Universe__lookupQuestionRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n));
+              break;
+            case 47:
+              u = parser.u;
+              stack.push(H._Universe__lookupFutureOrRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n));
+              break;
+            case 40:
+              stack.push(parser.p);
+              parser.p = stack.length;
+              break;
+            case 41:
+              universe = parser.u;
+              parameters = new H._FunctionParameters();
+              optionalPositional = universe.sEA;
+              named = universe.sEA;
+              head = stack.pop();
+              if (typeof head == "number")
+                switch (head) {
+                  case -1:
+                    optionalPositional = stack.pop();
+                    break;
+                  case -2:
+                    named = stack.pop();
+                    break;
+                  default:
+                    stack.push(head);
+                    break;
+                }
+              else
+                stack.push(head);
+              array = stack.splice(parser.p);
+              H._Parser_toTypes(parser.u, parser.e, array);
+              parser.p = stack.pop();
+              parameters._requiredPositional = array;
+              parameters._optionalPositional = optionalPositional;
+              parameters._named = named;
+              stack.push(H._Universe__lookupFunctionRti(universe, H._Parser_toType(universe, parser.e, stack.pop()), parameters));
+              break;
+            case 91:
+              stack.push(parser.p);
+              parser.p = stack.length;
+              break;
+            case 93:
+              array = stack.splice(parser.p);
+              H._Parser_toTypes(parser.u, parser.e, array);
+              parser.p = stack.pop();
+              stack.push(array);
+              stack.push(-1);
+              break;
+            case 123:
+              stack.push(parser.p);
+              parser.p = stack.length;
+              break;
+            case 125:
+              array = stack.splice(parser.p);
+              H._Parser_toTypesNamed(parser.u, parser.e, array);
+              parser.p = stack.pop();
+              stack.push(array);
+              stack.push(-2);
+              break;
+            default:
+              throw "Bad character " + ch;
+          }
+        }
+      }
+      item = stack.pop();
+      return H._Parser_toType(parser.u, parser.e, item);
+    },
+    _Parser_handleDigit: function(i, digit, source, stack) {
+      var t1, ch,
+        value = digit - 48;
+      for (t1 = source.length; i < t1; ++i) {
+        ch = source.charCodeAt(i);
+        if (!(ch >= 48 && ch <= 57))
+          break;
+        value = value * 10 + (ch - 48);
+      }
+      stack.push(value);
+      return i;
+    },
+    _Parser_handleIdentifier: function(parser, start, source, stack, hasPeriod) {
+      var t1, ch, t2, string, environment, recipe,
+        i = start + 1;
+      for (t1 = source.length; i < t1; ++i) {
+        ch = source.charCodeAt(i);
+        if (ch === 46) {
+          if (hasPeriod)
+            break;
+          hasPeriod = true;
+        } else {
+          if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36))
+            t2 = ch >= 48 && ch <= 57;
+          else
+            t2 = true;
+          if (!t2)
+            break;
+        }
+      }
+      string = source.substring(start, i);
+      if (hasPeriod) {
+        t1 = parser.u;
+        environment = parser.e;
+        if (environment._kind === 10)
+          environment = environment._primary;
+        recipe = H._Universe_findRule(t1, environment._primary)[string];
+        if (recipe == null)
+          H.throwExpression('No "' + string + '" in "' + H.Rti__getCanonicalRecipe(environment) + '"');
+        stack.push(H._Universe_evalInEnvironment(t1, environment, recipe));
+      } else
+        stack.push(string);
+      return i;
+    },
+    _Parser_handleExtendedOperations: function(parser, stack) {
+      var $top = stack.pop();
+      if (0 === $top) {
+        stack.push(H._Universe__lookupTerminalRti(parser.u, 1, "0&"));
+        return;
+      }
+      if (1 === $top) {
+        stack.push(H._Universe__lookupTerminalRti(parser.u, 4, "1&"));
+        return;
+      }
+      throw H.wrapException(P.AssertionError$("Unexpected extended operation " + H.S($top)));
+    },
+    _Parser_toType: function(universe, environment, item) {
+      if (typeof item == "string")
+        return H._Universe__lookupInterfaceRti(universe, item, universe.sEA);
+      else if (typeof item == "number")
+        return H._Parser_indexToType(universe, environment, item);
+      else
+        return item;
+    },
+    _Parser_toTypes: function(universe, environment, items) {
+      var i,
+        $length = items.length;
+      for (i = 0; i < $length; ++i)
+        items[i] = H._Parser_toType(universe, environment, items[i]);
+    },
+    _Parser_toTypesNamed: function(universe, environment, items) {
+      var i,
+        $length = items.length;
+      for (i = 2; i < $length; i += 3)
+        items[i] = H._Parser_toType(universe, environment, items[i]);
+    },
+    _Parser_indexToType: function(universe, environment, index) {
+      var typeArguments, len,
+        kind = environment._kind;
+      if (kind === 10) {
+        if (index === 0)
+          return environment._primary;
+        typeArguments = environment._rest;
+        len = typeArguments.length;
+        if (index <= len)
+          return typeArguments[index - 1];
+        index -= len;
+        environment = environment._primary;
+        kind = environment._kind;
+      } else if (index === 0)
+        return environment;
+      if (kind !== 9)
+        throw H.wrapException(P.AssertionError$("Indexed base must be an interface type"));
+      typeArguments = environment._rest;
+      if (index <= typeArguments.length)
+        return typeArguments[index - 1];
+      throw H.wrapException(P.AssertionError$("Bad index " + index + " for " + environment.toString$0(0)));
+    },
+    _isSubtype: function(universe, s, sEnv, t, tEnv) {
+      var t1, sKind, leftTypeVariable, tKind, sBounds, tBounds, sLength, i, sBound, tBound;
+      if (s === t)
+        return true;
+      if (!H.isStrongTopType(t))
+        if (!(t === type$.legacy_Object))
+          t1 = t === type$.Object;
+        else
+          t1 = true;
+      else
+        t1 = true;
+      if (t1)
+        return true;
+      sKind = s._kind;
+      if (sKind === 4)
+        return true;
+      if (H.isStrongTopType(s))
+        return false;
+      if (s._kind !== 1)
+        t1 = s === type$.Null || s === type$.JSNull;
+      else
+        t1 = true;
+      if (t1)
+        return true;
+      leftTypeVariable = sKind === 13;
+      if (leftTypeVariable)
+        if (H._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv))
+          return true;
+      tKind = t._kind;
+      if (sKind === 6)
+        return H._isSubtype(universe, s._primary, sEnv, t, tEnv);
+      if (tKind === 6) {
+        t1 = t._primary;
+        return H._isSubtype(universe, s, sEnv, t1, tEnv);
+      }
+      if (sKind === 8) {
+        if (!H._isSubtype(universe, s._primary, sEnv, t, tEnv))
+          return false;
+        return H._isSubtype(universe, H.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv);
+      }
+      if (sKind === 7) {
+        t1 = H._isSubtype(universe, s._primary, sEnv, t, tEnv);
+        return t1;
+      }
+      if (tKind === 8) {
+        if (H._isSubtype(universe, s, sEnv, t._primary, tEnv))
+          return true;
+        return H._isSubtype(universe, s, sEnv, H.Rti__getFutureFromFutureOr(universe, t), tEnv);
+      }
+      if (tKind === 7) {
+        t1 = H._isSubtype(universe, s, sEnv, t._primary, tEnv);
+        return t1;
+      }
+      if (leftTypeVariable)
+        return false;
+      t1 = sKind !== 11;
+      if ((!t1 || sKind === 12) && t === type$.Function)
+        return true;
+      if (tKind === 12) {
+        if (s === type$.JavaScriptFunction)
+          return true;
+        if (sKind !== 12)
+          return false;
+        sBounds = s._rest;
+        tBounds = t._rest;
+        sLength = sBounds.length;
+        if (sLength !== tBounds.length)
+          return false;
+        sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv);
+        tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv);
+        for (i = 0; i < sLength; ++i) {
+          sBound = sBounds[i];
+          tBound = tBounds[i];
+          if (!H._isSubtype(universe, sBound, sEnv, tBound, tEnv) || !H._isSubtype(universe, tBound, tEnv, sBound, sEnv))
+            return false;
+        }
+        return H._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv);
+      }
+      if (tKind === 11) {
+        if (s === type$.JavaScriptFunction)
+          return true;
+        if (t1)
+          return false;
+        return H._isFunctionSubtype(universe, s, sEnv, t, tEnv);
+      }
+      if (sKind === 9) {
+        if (tKind !== 9)
+          return false;
+        return H._isInterfaceSubtype(universe, s, sEnv, t, tEnv);
+      }
+      return false;
+    },
+    _isFunctionSubtype: function(universe, s, sEnv, t, tEnv) {
+      var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName, sIsRequired;
+      if (!H._isSubtype(universe, s._primary, sEnv, t._primary, tEnv))
+        return false;
+      sParameters = s._rest;
+      tParameters = t._rest;
+      sRequiredPositional = sParameters._requiredPositional;
+      tRequiredPositional = tParameters._requiredPositional;
+      sRequiredPositionalLength = sRequiredPositional.length;
+      tRequiredPositionalLength = tRequiredPositional.length;
+      if (sRequiredPositionalLength > tRequiredPositionalLength)
+        return false;
+      requiredPositionalDelta = tRequiredPositionalLength - sRequiredPositionalLength;
+      sOptionalPositional = sParameters._optionalPositional;
+      tOptionalPositional = tParameters._optionalPositional;
+      sOptionalPositionalLength = sOptionalPositional.length;
+      tOptionalPositionalLength = tOptionalPositional.length;
+      if (sRequiredPositionalLength + sOptionalPositionalLength < tRequiredPositionalLength + tOptionalPositionalLength)
+        return false;
+      for (i = 0; i < sRequiredPositionalLength; ++i) {
+        t1 = sRequiredPositional[i];
+        if (!H._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv))
+          return false;
+      }
+      for (i = 0; i < requiredPositionalDelta; ++i) {
+        t1 = sOptionalPositional[i];
+        if (!H._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv))
+          return false;
+      }
+      for (i = 0; i < tOptionalPositionalLength; ++i) {
+        t1 = sOptionalPositional[requiredPositionalDelta + i];
+        if (!H._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv))
+          return false;
+      }
+      sNamed = sParameters._named;
+      tNamed = tParameters._named;
+      sNamedLength = sNamed.length;
+      tNamedLength = tNamed.length;
+      for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) {
+        tName = tNamed[tIndex];
+        for (; true;) {
+          if (sIndex >= sNamedLength)
+            return false;
+          sName = sNamed[sIndex];
+          sIndex += 3;
+          if (tName < sName)
+            return false;
+          sIsRequired = sNamed[sIndex - 2];
+          if (sName < tName) {
+            if (sIsRequired)
+              return false;
+            continue;
+          }
+          t1 = tNamed[tIndex + 1];
+          if (sIsRequired && !t1)
+            return false;
+          t1 = sNamed[sIndex - 1];
+          if (!H._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv))
+            return false;
+          break;
+        }
+      }
+      for (; sIndex < sNamedLength;) {
+        if (sNamed[sIndex + 1])
+          return false;
+        sIndex += 3;
+      }
+      return true;
+    },
+    _isInterfaceSubtype: function(universe, s, sEnv, t, tEnv) {
+      var sArgs, tArgs, $length, i, t1, t2, rule, supertypeArgs,
+        sName = s._primary,
+        tName = t._primary;
+      if (sName === tName) {
+        sArgs = s._rest;
+        tArgs = t._rest;
+        $length = sArgs.length;
+        for (i = 0; i < $length; ++i) {
+          t1 = sArgs[i];
+          t2 = tArgs[i];
+          if (!H._isSubtype(universe, t1, sEnv, t2, tEnv))
+            return false;
+        }
+        return true;
+      }
+      if (t === type$.Object)
+        return true;
+      rule = H._Universe_findRule(universe, sName);
+      if (rule == null)
+        return false;
+      supertypeArgs = rule[tName];
+      if (supertypeArgs == null)
+        return false;
+      $length = supertypeArgs.length;
+      tArgs = t._rest;
+      for (i = 0; i < $length; ++i)
+        if (!H._isSubtype(universe, H._Universe_evalInEnvironment(universe, s, supertypeArgs[i]), sEnv, tArgs[i], tEnv))
+          return false;
+      return true;
+    },
+    isNullable: function(t) {
+      var t1,
+        kind = t._kind;
+      if (!(t === type$.Null || t === type$.JSNull))
+        if (!H.isStrongTopType(t))
+          if (kind !== 7)
+            if (!(kind === 6 && H.isNullable(t._primary)))
+              t1 = kind === 8 && H.isNullable(t._primary);
+            else
+              t1 = true;
+          else
+            t1 = true;
+        else
+          t1 = true;
+      else
+        t1 = true;
+      return t1;
+    },
+    isTopType: function(t) {
+      var t1;
+      if (!H.isStrongTopType(t))
+        if (!(t === type$.legacy_Object))
+          t1 = t === type$.Object;
+        else
+          t1 = true;
+      else
+        t1 = true;
+      return t1;
+    },
+    isStrongTopType: function(t) {
+      var kind = t._kind;
+      return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object;
+    },
+    _Utils_objectAssign: function(o, other) {
+      var i, key,
+        keys = Object.keys(other),
+        $length = keys.length;
+      for (i = 0; i < $length; ++i) {
+        key = keys[i];
+        o[key] = other[key];
+      }
+    },
+    Rti: function Rti(t0, t1) {
+      var _ = this;
+      _._as = t0;
+      _._is = t1;
+      _._cachedRuntimeType = _._specializedTestResource = _._precomputed1 = null;
+      _._kind = 0;
+      _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null;
+    },
+    _FunctionParameters: function _FunctionParameters() {
+      this._named = this._optionalPositional = this._requiredPositional = null;
+    },
+    _Type: function _Type(t0) {
+      this._rti = t0;
+    },
+    _Error: function _Error() {
+    },
+    _TypeError: function _TypeError(t0) {
+      this.__rti$_message = t0;
+    },
+    unmangleGlobalNameIfPreservedAnyways: function($name) {
+      return init.mangledGlobalNames[$name];
+    }
+  },
+  J = {
+    makeDispatchRecord: function(interceptor, proto, extension, indexability) {
+      return {i: interceptor, p: proto, e: extension, x: indexability};
+    },
+    getNativeInterceptor: function(object) {
+      var proto, objectProto, $constructor, interceptor,
+        record = object[init.dispatchPropertyName];
+      if (record == null)
+        if ($.initNativeDispatchFlag == null) {
+          H.initNativeDispatch();
+          record = object[init.dispatchPropertyName];
+        }
+      if (record != null) {
+        proto = record.p;
+        if (false === proto)
+          return record.i;
+        if (true === proto)
+          return object;
+        objectProto = Object.getPrototypeOf(object);
+        if (proto === objectProto)
+          return record.i;
+        if (record.e === objectProto)
+          throw H.wrapException(P.UnimplementedError$("Return interceptor for " + H.S(proto(object, record))));
+      }
+      $constructor = object.constructor;
+      interceptor = $constructor == null ? null : $constructor[J.JS_INTEROP_INTERCEPTOR_TAG()];
+      if (interceptor != null)
+        return interceptor;
+      interceptor = H.lookupAndCacheInterceptor(object);
+      if (interceptor != null)
+        return interceptor;
+      if (typeof object == "function")
+        return C.JavaScriptFunction_methods;
+      proto = Object.getPrototypeOf(object);
+      if (proto == null)
+        return C.PlainJavaScriptObject_methods;
+      if (proto === Object.prototype)
+        return C.PlainJavaScriptObject_methods;
+      if (typeof $constructor == "function") {
+        Object.defineProperty($constructor, J.JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true});
+        return C.UnknownJavaScriptObject_methods;
+      }
+      return C.UnknownJavaScriptObject_methods;
+    },
+    JS_INTEROP_INTERCEPTOR_TAG: function() {
+      var t1 = $._JS_INTEROP_INTERCEPTOR_TAG;
+      return t1 == null ? $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js") : t1;
+    },
+    JSArray_JSArray$fixed: function($length, $E) {
+      if (!H._isInt($length))
+        throw H.wrapException(P.ArgumentError$value($length, "length", "is not an integer"));
+      if ($length < 0 || $length > 4294967295)
+        throw H.wrapException(P.RangeError$range($length, 0, 4294967295, "length", null));
+      return J.JSArray_JSArray$markFixed(new Array($length), $E);
+    },
+    JSArray_JSArray$growable: function($length, $E) {
+      if (!H._isInt($length) || $length < 0)
+        throw H.wrapException(P.ArgumentError$("Length must be a non-negative integer: " + H.S($length)));
+      return H.setRuntimeTypeInfo(new Array($length), $E._eval$1("JSArray<0>"));
+    },
+    JSArray_JSArray$markFixed: function(allocation, $E) {
+      return J.JSArray_markFixedList(H.setRuntimeTypeInfo(allocation, $E._eval$1("JSArray<0>")), $E);
+    },
+    JSArray_markFixedList: function(list, $T) {
+      list.fixed$length = Array;
+      return list;
+    },
+    getInterceptor$: function(receiver) {
+      if (typeof receiver == "number") {
+        if (Math.floor(receiver) == receiver)
+          return J.JSInt.prototype;
+        return J.JSDouble.prototype;
+      }
+      if (typeof receiver == "string")
+        return J.JSString.prototype;
+      if (receiver == null)
+        return J.JSNull.prototype;
+      if (typeof receiver == "boolean")
+        return J.JSBool.prototype;
+      if (receiver.constructor == Array)
+        return J.JSArray.prototype;
+      if (typeof receiver != "object") {
+        if (typeof receiver == "function")
+          return J.JavaScriptFunction.prototype;
+        return receiver;
+      }
+      if (receiver instanceof P.Object)
+        return receiver;
+      return J.getNativeInterceptor(receiver);
+    },
+    getInterceptor$ansx: function(receiver) {
+      if (typeof receiver == "number")
+        return J.JSNumber.prototype;
+      if (typeof receiver == "string")
+        return J.JSString.prototype;
+      if (receiver == null)
+        return receiver;
+      if (receiver.constructor == Array)
+        return J.JSArray.prototype;
+      if (typeof receiver != "object") {
+        if (typeof receiver == "function")
+          return J.JavaScriptFunction.prototype;
+        return receiver;
+      }
+      if (receiver instanceof P.Object)
+        return receiver;
+      return J.getNativeInterceptor(receiver);
+    },
+    getInterceptor$asx: function(receiver) {
+      if (typeof receiver == "string")
+        return J.JSString.prototype;
+      if (receiver == null)
+        return receiver;
+      if (receiver.constructor == Array)
+        return J.JSArray.prototype;
+      if (typeof receiver != "object") {
+        if (typeof receiver == "function")
+          return J.JavaScriptFunction.prototype;
+        return receiver;
+      }
+      if (receiver instanceof P.Object)
+        return receiver;
+      return J.getNativeInterceptor(receiver);
+    },
+    getInterceptor$ax: function(receiver) {
+      if (receiver == null)
+        return receiver;
+      if (receiver.constructor == Array)
+        return J.JSArray.prototype;
+      if (typeof receiver != "object") {
+        if (typeof receiver == "function")
+          return J.JavaScriptFunction.prototype;
+        return receiver;
+      }
+      if (receiver instanceof P.Object)
+        return receiver;
+      return J.getNativeInterceptor(receiver);
+    },
+    getInterceptor$bn: function(receiver) {
+      if (typeof receiver == "number")
+        return J.JSNumber.prototype;
+      if (receiver == null)
+        return receiver;
+      if (typeof receiver == "boolean")
+        return J.JSBool.prototype;
+      if (!(receiver instanceof P.Object))
+        return J.UnknownJavaScriptObject.prototype;
+      return receiver;
+    },
+    getInterceptor$n: function(receiver) {
+      if (typeof receiver == "number")
+        return J.JSNumber.prototype;
+      if (receiver == null)
+        return receiver;
+      if (!(receiver instanceof P.Object))
+        return J.UnknownJavaScriptObject.prototype;
+      return receiver;
+    },
+    getInterceptor$s: function(receiver) {
+      if (typeof receiver == "string")
+        return J.JSString.prototype;
+      if (receiver == null)
+        return receiver;
+      if (!(receiver instanceof P.Object))
+        return J.UnknownJavaScriptObject.prototype;
+      return receiver;
+    },
+    getInterceptor$x: function(receiver) {
+      if (receiver == null)
+        return receiver;
+      if (typeof receiver != "object") {
+        if (typeof receiver == "function")
+          return J.JavaScriptFunction.prototype;
+        return receiver;
+      }
+      if (receiver instanceof P.Object)
+        return receiver;
+      return J.getNativeInterceptor(receiver);
+    },
+    get$hashCode$: function(receiver) {
+      return J.getInterceptor$(receiver).get$hashCode(receiver);
+    },
+    get$iterator$ax: function(receiver) {
+      return J.getInterceptor$ax(receiver).get$iterator(receiver);
+    },
+    get$length$asx: function(receiver) {
+      return J.getInterceptor$asx(receiver).get$length(receiver);
+    },
+    get$runtimeType$: function(receiver) {
+      return J.getInterceptor$(receiver).get$runtimeType(receiver);
+    },
+    $add$ansx: function(receiver, a0) {
+      if (typeof receiver == "number" && typeof a0 == "number")
+        return receiver + a0;
+      return J.getInterceptor$ansx(receiver).$add(receiver, a0);
+    },
+    $and$bn: function(receiver, a0) {
+      if (typeof receiver == "number" && typeof a0 == "number")
+        return (receiver & a0) >>> 0;
+      return J.getInterceptor$bn(receiver).$and(receiver, a0);
+    },
+    $div$n: function(receiver, a0) {
+      if (typeof receiver == "number" && typeof a0 == "number")
+        return receiver / a0;
+      return J.getInterceptor$n(receiver).$div(receiver, a0);
+    },
+    $eq$: function(receiver, a0) {
+      if (receiver == null)
+        return a0 == null;
+      if (typeof receiver != "object")
+        return a0 != null && receiver === a0;
+      return J.getInterceptor$(receiver).$eq(receiver, a0);
+    },
+    $ge$n: function(receiver, a0) {
+      if (typeof receiver == "number" && typeof a0 == "number")
+        return receiver >= a0;
+      return J.getInterceptor$n(receiver).$ge(receiver, a0);
+    },
+    $index$asx: function(receiver, a0) {
+      if (typeof a0 === "number")
+        if (receiver.constructor == Array || typeof receiver == "string" || H.isJsIndexable(receiver, receiver[init.dispatchPropertyName]))
+          if (a0 >>> 0 === a0 && a0 < receiver.length)
+            return receiver[a0];
+      return J.getInterceptor$asx(receiver).$index(receiver, a0);
+    },
+    $indexSet$ax: function(receiver, a0, a1) {
+      return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1);
+    },
+    $or$bn: function(receiver, a0) {
+      if (typeof receiver == "number" && typeof a0 == "number")
+        return (receiver | a0) >>> 0;
+      return J.getInterceptor$bn(receiver).$or(receiver, a0);
+    },
+    $shl$n: function(receiver, a0) {
+      return J.getInterceptor$n(receiver).$shl(receiver, a0);
+    },
+    $sub$n: function(receiver, a0) {
+      if (typeof receiver == "number" && typeof a0 == "number")
+        return receiver - a0;
+      return J.getInterceptor$n(receiver).$sub(receiver, a0);
+    },
+    _removeEventListener$3$x: function(receiver, a0, a1, a2) {
+      return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2);
+    },
+    addEventListener$3$x: function(receiver, a0, a1, a2) {
+      return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2);
+    },
+    elementAt$1$ax: function(receiver, a0) {
+      return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0);
+    },
+    map$1$ax: function(receiver, a0) {
+      return J.getInterceptor$ax(receiver).map$1(receiver, a0);
+    },
+    map$1$1$ax: function(receiver, a0, $T1) {
+      return J.getInterceptor$ax(receiver).map$1$1(receiver, a0, $T1);
+    },
+    noSuchMethod$1$: function(receiver, a0) {
+      return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0);
+    },
+    toList$0$ax: function(receiver) {
+      return J.getInterceptor$ax(receiver).toList$0(receiver);
+    },
+    toString$0$: function(receiver) {
+      return J.getInterceptor$(receiver).toString$0(receiver);
+    },
+    Interceptor: function Interceptor() {
+    },
+    JSBool: function JSBool() {
+    },
+    JSNull: function JSNull() {
+    },
+    JSObject: function JSObject() {
+    },
+    JavaScriptObject: function JavaScriptObject() {
+    },
+    PlainJavaScriptObject: function PlainJavaScriptObject() {
+    },
+    UnknownJavaScriptObject: function UnknownJavaScriptObject() {
+    },
+    JavaScriptFunction: function JavaScriptFunction() {
+    },
+    JSArray: function JSArray(t0) {
+      this.$ti = t0;
+    },
+    JSUnmodifiableArray: function JSUnmodifiableArray(t0) {
+      this.$ti = t0;
+    },
+    ArrayIterator: function ArrayIterator(t0, t1, t2) {
+      var _ = this;
+      _.__interceptors$_iterable = t0;
+      _.__interceptors$_length = t1;
+      _.__interceptors$_index = 0;
+      _.__interceptors$_current = null;
+      _.$ti = t2;
+    },
+    JSNumber: function JSNumber() {
+    },
+    JSInt: function JSInt() {
+    },
+    JSDouble: function JSDouble() {
+    },
+    JSString: function JSString() {
+    }
+  },
+  P = {
+    _AsyncRun__initializeScheduleImmediate: function() {
+      var div, span, t1 = {};
+      if (self.scheduleImmediate != null)
+        return P.async__AsyncRun__scheduleImmediateJsOverride$closure();
+      if (self.MutationObserver != null && self.document != null) {
+        div = self.document.createElement("div");
+        span = self.document.createElement("span");
+        t1.storedCallback = null;
+        new self.MutationObserver(H.convertDartClosureToJS(new P._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true});
+        return new P._AsyncRun__initializeScheduleImmediate_closure(t1, div, span);
+      } else if (self.setImmediate != null)
+        return P.async__AsyncRun__scheduleImmediateWithSetImmediate$closure();
+      return P.async__AsyncRun__scheduleImmediateWithTimer$closure();
+    },
+    _AsyncRun__scheduleImmediateJsOverride: function(callback) {
+      self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(type$.void_Function._as(callback)), 0));
+    },
+    _AsyncRun__scheduleImmediateWithSetImmediate: function(callback) {
+      self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(type$.void_Function._as(callback)), 0));
+    },
+    _AsyncRun__scheduleImmediateWithTimer: function(callback) {
+      P.Timer__createTimer(C.Duration_0, type$.void_Function._as(callback));
+    },
+    Timer__createTimer: function(duration, callback) {
+      var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000);
+      return P._TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback);
+    },
+    _TimerImpl$: function(milliseconds, callback) {
+      var t1 = new P._TimerImpl();
+      t1._TimerImpl$2(milliseconds, callback);
+      return t1;
+    },
+    _makeAsyncAwaitCompleter: function($T) {
+      return new P._AsyncAwaitCompleter(new P._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>"));
+    },
+    _asyncStartSync: function(bodyFunction, completer) {
+      bodyFunction.call$2(0, null);
+      completer.isSync = true;
+      return completer._future;
+    },
+    _asyncAwait: function(object, bodyFunction) {
+      P._awaitOnObject(object, bodyFunction);
+    },
+    _asyncReturn: function(object, completer) {
+      completer.complete$1(object);
+    },
+    _asyncRethrow: function(object, completer) {
+      completer.completeError$2(H.unwrapException(object), H.getTraceFromException(object));
+    },
+    _awaitOnObject: function(object, bodyFunction) {
+      var t1, future,
+        thenCallback = new P._awaitOnObject_closure(bodyFunction),
+        errorCallback = new P._awaitOnObject_closure0(bodyFunction);
+      if (object instanceof P._Future)
+        object._thenAwait$1$2(thenCallback, errorCallback, type$.dynamic);
+      else {
+        t1 = type$.dynamic;
+        if (type$.Future_dynamic._is(object))
+          object.then$1$2$onError(thenCallback, errorCallback, t1);
+        else {
+          future = new P._Future($.Zone__current, type$._Future_dynamic);
+          future._state = 4;
+          future._resultOrListeners = object;
+          future._thenAwait$1$2(thenCallback, errorCallback, t1);
+        }
+      }
+    },
+    _wrapJsFunctionForAsync: function($function) {
+      var $protected = function(fn, ERROR) {
+        return function(errorCode, result) {
+          while (true)
+            try {
+              fn(errorCode, result);
+              break;
+            } catch (error) {
+              result = error;
+              errorCode = ERROR;
+            }
+        };
+      }($function, 1);
+      return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), type$.Null, type$.int, type$.dynamic);
+    },
+    _Future$zoneValue: function(value, _zone, $T) {
+      var t1 = new P._Future(_zone, $T._eval$1("_Future<0>"));
+      $T._as(value);
+      t1._state = 4;
+      t1._resultOrListeners = value;
+      return t1;
+    },
+    _Future__chainForeignFuture: function(source, target) {
+      var e, s, exception;
+      target._state = 1;
+      try {
+        source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), type$.Null);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s));
+      }
+    },
+    _Future__chainCoreFuture: function(source, target) {
+      var t1, t2, listeners;
+      for (t1 = type$._Future_dynamic; t2 = source._state, t2 === 2;)
+        source = t1._as(source._resultOrListeners);
+      if (t2 >= 4) {
+        listeners = target._removeListeners$0();
+        target._state = source._state;
+        target._resultOrListeners = source._resultOrListeners;
+        P._Future__propagateToListeners(target, listeners);
+      } else {
+        listeners = type$.nullable__FutureListener_dynamic_dynamic._as(target._resultOrListeners);
+        target._state = 2;
+        target._resultOrListeners = source;
+        source._prependListeners$1(listeners);
+      }
+    },
+    _Future__propagateToListeners: function(source, listeners) {
+      var t2, t3, t4, _box_0, hasError, asyncError, nextListener, nextListener0, t5, sourceResult, t6, t7, zone, oldZone, result, current, _null = null, _box_1 = {},
+        t1 = _box_1.source = source;
+      for (t2 = type$.AsyncError, t3 = type$.nullable__FutureListener_dynamic_dynamic, t4 = type$.Future_dynamic; true;) {
+        _box_0 = {};
+        hasError = t1._state === 8;
+        if (listeners == null) {
+          if (hasError) {
+            asyncError = t2._as(t1._resultOrListeners);
+            P._rootHandleUncaughtError(_null, _null, t1._zone, asyncError.error, asyncError.stackTrace);
+          }
+          return;
+        }
+        _box_0.listener = listeners;
+        nextListener = listeners._nextListener;
+        for (t1 = listeners; nextListener != null; t1 = nextListener, nextListener = nextListener0) {
+          t1._nextListener = null;
+          P._Future__propagateToListeners(_box_1.source, t1);
+          _box_0.listener = nextListener;
+          nextListener0 = nextListener._nextListener;
+        }
+        t5 = _box_1.source;
+        sourceResult = t5._resultOrListeners;
+        _box_0.listenerHasError = hasError;
+        _box_0.listenerValueOrError = sourceResult;
+        t6 = !hasError;
+        if (t6) {
+          t7 = t1.state;
+          t7 = (t7 & 1) !== 0 || (t7 & 15) === 8;
+        } else
+          t7 = true;
+        if (t7) {
+          zone = t1.result._zone;
+          if (hasError) {
+            t7 = t5._zone === zone;
+            t7 = !(t7 || t7);
+          } else
+            t7 = false;
+          if (t7) {
+            t2._as(sourceResult);
+            P._rootHandleUncaughtError(_null, _null, t5._zone, sourceResult.error, sourceResult.stackTrace);
+            return;
+          }
+          oldZone = $.Zone__current;
+          if (oldZone !== zone)
+            $.Zone__current = zone;
+          else
+            oldZone = _null;
+          t1 = t1.state;
+          if ((t1 & 15) === 8)
+            new P._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0();
+          else if (t6) {
+            if ((t1 & 1) !== 0)
+              new P._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0();
+          } else if ((t1 & 2) !== 0)
+            new P._Future__propagateToListeners_handleError(_box_1, _box_0).call$0();
+          if (oldZone != null)
+            $.Zone__current = oldZone;
+          t1 = _box_0.listenerValueOrError;
+          if (t4._is(t1)) {
+            result = _box_0.listener.result;
+            if (t1._state >= 4) {
+              current = t3._as(result._resultOrListeners);
+              result._resultOrListeners = null;
+              listeners = result._reverseListeners$1(current);
+              result._state = t1._state;
+              result._resultOrListeners = t1._resultOrListeners;
+              _box_1.source = t1;
+              continue;
+            } else
+              P._Future__chainCoreFuture(t1, result);
+            return;
+          }
+        }
+        result = _box_0.listener.result;
+        current = t3._as(result._resultOrListeners);
+        result._resultOrListeners = null;
+        listeners = result._reverseListeners$1(current);
+        t1 = _box_0.listenerHasError;
+        t5 = _box_0.listenerValueOrError;
+        if (!t1) {
+          result.$ti._precomputed1._as(t5);
+          result._state = 4;
+          result._resultOrListeners = t5;
+        } else {
+          t2._as(t5);
+          result._state = 8;
+          result._resultOrListeners = t5;
+        }
+        _box_1.source = result;
+        t1 = result;
+      }
+    },
+    _registerErrorHandler: function(errorHandler, zone) {
+      var t1;
+      if (type$.dynamic_Function_Object_StackTrace._is(errorHandler))
+        return zone.registerBinaryCallback$3$1(errorHandler, type$.dynamic, type$.Object, type$.StackTrace);
+      t1 = type$.dynamic_Function_Object;
+      if (t1._is(errorHandler))
+        return t1._as(errorHandler);
+      throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result"));
+    },
+    _microtaskLoop: function() {
+      var entry, next;
+      for (entry = $._nextCallback; entry != null; entry = $._nextCallback) {
+        $._lastPriorityCallback = null;
+        next = entry.next;
+        $._nextCallback = next;
+        if (next == null)
+          $._lastCallback = null;
+        entry.callback.call$0();
+      }
+    },
+    _startMicrotaskLoop: function() {
+      $._isInCallbackLoop = true;
+      try {
+        P._microtaskLoop();
+      } finally {
+        $._lastPriorityCallback = null;
+        $._isInCallbackLoop = false;
+        if ($._nextCallback != null)
+          $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure());
+      }
+    },
+    _scheduleAsyncCallback: function(callback) {
+      var newEntry = new P._AsyncCallbackEntry(callback),
+        lastCallback = $._lastCallback;
+      if (lastCallback == null) {
+        $._nextCallback = $._lastCallback = newEntry;
+        if (!$._isInCallbackLoop)
+          $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure());
+      } else
+        $._lastCallback = lastCallback.next = newEntry;
+    },
+    _schedulePriorityAsyncCallback: function(callback) {
+      var entry, lastPriorityCallback, next,
+        t1 = $._nextCallback;
+      if (t1 == null) {
+        P._scheduleAsyncCallback(callback);
+        $._lastPriorityCallback = $._lastCallback;
+        return;
+      }
+      entry = new P._AsyncCallbackEntry(callback);
+      lastPriorityCallback = $._lastPriorityCallback;
+      if (lastPriorityCallback == null) {
+        entry.next = t1;
+        $._nextCallback = $._lastPriorityCallback = entry;
+      } else {
+        next = lastPriorityCallback.next;
+        entry.next = next;
+        $._lastPriorityCallback = lastPriorityCallback.next = entry;
+        if (next == null)
+          $._lastCallback = entry;
+      }
+    },
+    scheduleMicrotask: function(callback) {
+      var _null = null,
+        currentZone = $.Zone__current;
+      if (C.C__RootZone === currentZone) {
+        P._rootScheduleMicrotask(_null, _null, C.C__RootZone, callback);
+        return;
+      }
+      P._rootScheduleMicrotask(_null, _null, currentZone, type$.void_Function._as(currentZone.bindCallbackGuarded$1(callback)));
+    },
+    StreamIterator_StreamIterator: function(stream, $T) {
+      P.ArgumentError_checkNotNull(stream, "stream", $T._eval$1("Stream<0>"));
+      return new P._StreamIterator(stream, $T._eval$1("_StreamIterator<0>"));
+    },
+    StreamController_StreamController: function($T) {
+      var _null = null;
+      return new P._AsyncStreamController(_null, _null, _null, _null, $T._eval$1("_AsyncStreamController<0>"));
+    },
+    StreamController_StreamController$broadcast: function(sync, $T) {
+      var _null = null;
+      return sync ? new P._SyncBroadcastStreamController(_null, _null, $T._eval$1("_SyncBroadcastStreamController<0>")) : new P._AsyncBroadcastStreamController(_null, _null, $T._eval$1("_AsyncBroadcastStreamController<0>"));
+    },
+    _runGuarded: function(notificationHandler) {
+      return;
+    },
+    _BufferingStreamSubscription__registerDataHandler: function(zone, handleData, $T) {
+      var t1 = handleData == null ? P.async___nullDataHandler$closure() : handleData;
+      return type$.$env_1_1_void._bind$1($T)._eval$1("1(2)")._as(t1);
+    },
+    _BufferingStreamSubscription__registerErrorHandler: function(zone, handleError) {
+      if (handleError == null)
+        handleError = P.async___nullErrorHandler$closure();
+      if (type$.void_Function_Object_StackTrace._is(handleError))
+        return zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace);
+      if (type$.void_Function_Object._is(handleError))
+        return type$.dynamic_Function_Object._as(handleError);
+      throw H.wrapException(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace."));
+    },
+    _BufferingStreamSubscription__registerDoneHandler: function(zone, handleDone) {
+      return type$.void_Function._as(handleDone);
+    },
+    _nullDataHandler: function(value) {
+    },
+    _nullErrorHandler: function(error, stackTrace) {
+      P._rootHandleUncaughtError(null, null, $.Zone__current, error, stackTrace);
+    },
+    _cancelAndValue: function(subscription, future, value) {
+      var cancelFuture = subscription.cancel$0();
+      if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture())
+        cancelFuture.whenComplete$1(new P._cancelAndValue_closure(future, value));
+      else
+        future._complete$1(value);
+    },
+    Timer_Timer: function(duration, callback) {
+      var t1 = $.Zone__current;
+      if (t1 === C.C__RootZone)
+        return P.Timer__createTimer(duration, type$.void_Function._as(callback));
+      return P.Timer__createTimer(duration, type$.void_Function._as(t1.bindCallbackGuarded$1(callback)));
+    },
+    AsyncError$: function(error, stackTrace) {
+      var t1 = stackTrace == null ? P.AsyncError_defaultStackTrace(error) : stackTrace;
+      P.ArgumentError_checkNotNull(error, "error", type$.Object);
+      return new P.AsyncError(error, t1);
+    },
+    AsyncError_defaultStackTrace: function(error) {
+      var stackTrace;
+      if (type$.Error._is(error)) {
+        stackTrace = error.get$stackTrace();
+        if (stackTrace != null)
+          return stackTrace;
+      }
+      return C.C__StringStackTrace;
+    },
+    _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) {
+      P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(error, stackTrace));
+    },
+    _rootRun: function($self, $parent, zone, f, $R) {
+      var old,
+        t1 = $.Zone__current;
+      if (t1 === zone)
+        return f.call$0();
+      $.Zone__current = zone;
+      old = t1;
+      try {
+        t1 = f.call$0();
+        return t1;
+      } finally {
+        $.Zone__current = old;
+      }
+    },
+    _rootRunUnary: function($self, $parent, zone, f, arg, $R, $T) {
+      var old,
+        t1 = $.Zone__current;
+      if (t1 === zone)
+        return f.call$1(arg);
+      $.Zone__current = zone;
+      old = t1;
+      try {
+        t1 = f.call$1(arg);
+        return t1;
+      } finally {
+        $.Zone__current = old;
+      }
+    },
+    _rootRunBinary: function($self, $parent, zone, f, arg1, arg2, $R, T1, T2) {
+      var old,
+        t1 = $.Zone__current;
+      if (t1 === zone)
+        return f.call$2(arg1, arg2);
+      $.Zone__current = zone;
+      old = t1;
+      try {
+        t1 = f.call$2(arg1, arg2);
+        return t1;
+      } finally {
+        $.Zone__current = old;
+      }
+    },
+    _rootScheduleMicrotask: function($self, $parent, zone, f) {
+      var t1;
+      type$.void_Function._as(f);
+      t1 = C.C__RootZone !== zone;
+      if (t1)
+        f = !(!t1 || false) ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, type$.void);
+      P._scheduleAsyncCallback(f);
+    },
+    _AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) {
+      this._box_0 = t0;
+    },
+    _AsyncRun__initializeScheduleImmediate_closure: function _AsyncRun__initializeScheduleImmediate_closure(t0, t1, t2) {
+      this._box_0 = t0;
+      this.div = t1;
+      this.span = t2;
+    },
+    _AsyncRun__scheduleImmediateJsOverride_internalCallback: function _AsyncRun__scheduleImmediateJsOverride_internalCallback(t0) {
+      this.callback = t0;
+    },
+    _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: function _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(t0) {
+      this.callback = t0;
+    },
+    _TimerImpl: function _TimerImpl() {
+      this._handle = null;
+    },
+    _TimerImpl_internalCallback: function _TimerImpl_internalCallback(t0, t1) {
+      this.$this = t0;
+      this.callback = t1;
+    },
+    _AsyncAwaitCompleter: function _AsyncAwaitCompleter(t0, t1) {
+      this._future = t0;
+      this.isSync = false;
+      this.$ti = t1;
+    },
+    _awaitOnObject_closure: function _awaitOnObject_closure(t0) {
+      this.bodyFunction = t0;
+    },
+    _awaitOnObject_closure0: function _awaitOnObject_closure0(t0) {
+      this.bodyFunction = t0;
+    },
+    _wrapJsFunctionForAsync_closure: function _wrapJsFunctionForAsync_closure(t0) {
+      this.$protected = t0;
+    },
+    _BroadcastSubscription: function _BroadcastSubscription(t0, t1, t2, t3, t4, t5, t6) {
+      var _ = this;
+      _._eventState = 0;
+      _._async$_previous = _._async$_next = null;
+      _._controller = t0;
+      _._async$_onData = t1;
+      _._onError = t2;
+      _._onDone = t3;
+      _._zone = t4;
+      _._state = t5;
+      _._pending = _._cancelFuture = null;
+      _.$ti = t6;
+    },
+    _BroadcastStreamController: function _BroadcastStreamController() {
+    },
+    _SyncBroadcastStreamController: function _SyncBroadcastStreamController(t0, t1, t2) {
+      var _ = this;
+      _.onListen = t0;
+      _.onCancel = t1;
+      _._state = 0;
+      _._doneFuture = _._addStreamState = _._lastSubscription = _._firstSubscription = null;
+      _.$ti = t2;
+    },
+    _SyncBroadcastStreamController__sendData_closure: function _SyncBroadcastStreamController__sendData_closure(t0, t1) {
+      this.$this = t0;
+      this.data = t1;
+    },
+    _AsyncBroadcastStreamController: function _AsyncBroadcastStreamController(t0, t1, t2) {
+      var _ = this;
+      _.onListen = t0;
+      _.onCancel = t1;
+      _._state = 0;
+      _._doneFuture = _._addStreamState = _._lastSubscription = _._firstSubscription = null;
+      _.$ti = t2;
+    },
+    Future: function Future() {
+    },
+    Completer: function Completer() {
+    },
+    _Completer: function _Completer() {
+    },
+    _AsyncCompleter: function _AsyncCompleter(t0, t1) {
+      this.future = t0;
+      this.$ti = t1;
+    },
+    _FutureListener: function _FutureListener(t0, t1, t2, t3, t4) {
+      var _ = this;
+      _._nextListener = null;
+      _.result = t0;
+      _.state = t1;
+      _.callback = t2;
+      _.errorCallback = t3;
+      _.$ti = t4;
+    },
+    _Future: function _Future(t0, t1) {
+      var _ = this;
+      _._state = 0;
+      _._zone = t0;
+      _._resultOrListeners = null;
+      _.$ti = t1;
+    },
+    _Future__addListener_closure: function _Future__addListener_closure(t0, t1) {
+      this.$this = t0;
+      this.listener = t1;
+    },
+    _Future__prependListeners_closure: function _Future__prependListeners_closure(t0, t1) {
+      this._box_0 = t0;
+      this.$this = t1;
+    },
+    _Future__chainForeignFuture_closure: function _Future__chainForeignFuture_closure(t0) {
+      this.target = t0;
+    },
+    _Future__chainForeignFuture_closure0: function _Future__chainForeignFuture_closure0(t0) {
+      this.target = t0;
+    },
+    _Future__chainForeignFuture_closure1: function _Future__chainForeignFuture_closure1(t0, t1, t2) {
+      this.target = t0;
+      this.e = t1;
+      this.s = t2;
+    },
+    _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) {
+      this.$this = t0;
+      this.value = t1;
+    },
+    _Future__chainFuture_closure: function _Future__chainFuture_closure(t0, t1) {
+      this.$this = t0;
+      this.value = t1;
+    },
+    _Future__asyncCompleteError_closure: function _Future__asyncCompleteError_closure(t0, t1, t2) {
+      this.$this = t0;
+      this.error = t1;
+      this.stackTrace = t2;
+    },
+    _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2) {
+      this._box_0 = t0;
+      this._box_1 = t1;
+      this.hasError = t2;
+    },
+    _Future__propagateToListeners_handleWhenCompleteCallback_closure: function _Future__propagateToListeners_handleWhenCompleteCallback_closure(t0) {
+      this.originalSource = t0;
+    },
+    _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1) {
+      this._box_0 = t0;
+      this.sourceResult = t1;
+    },
+    _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1) {
+      this._box_1 = t0;
+      this._box_0 = t1;
+    },
+    _AsyncCallbackEntry: function _AsyncCallbackEntry(t0) {
+      this.callback = t0;
+      this.next = null;
+    },
+    Stream: function Stream() {
+    },
+    Stream_length_closure: function Stream_length_closure(t0, t1) {
+      this._box_0 = t0;
+      this.$this = t1;
+    },
+    Stream_length_closure0: function Stream_length_closure0(t0, t1) {
+      this._box_0 = t0;
+      this.future = t1;
+    },
+    Stream_first_closure: function Stream_first_closure(t0) {
+      this.future = t0;
+    },
+    Stream_first_closure0: function Stream_first_closure0(t0, t1, t2) {
+      this.$this = t0;
+      this.subscription = t1;
+      this.future = t2;
+    },
+    StreamSubscription: function StreamSubscription() {
+    },
+    StreamTransformerBase: function StreamTransformerBase() {
+    },
+    StreamController: function StreamController() {
+    },
+    _StreamController: function _StreamController() {
+    },
+    _StreamController__subscribe_closure: function _StreamController__subscribe_closure(t0) {
+      this.$this = t0;
+    },
+    _StreamController__recordCancel_complete: function _StreamController__recordCancel_complete(t0) {
+      this.$this = t0;
+    },
+    _AsyncStreamControllerDispatch: function _AsyncStreamControllerDispatch() {
+    },
+    _AsyncStreamController: function _AsyncStreamController(t0, t1, t2, t3, t4) {
+      var _ = this;
+      _._varData = null;
+      _._state = 0;
+      _._doneFuture = null;
+      _.onListen = t0;
+      _.onPause = t1;
+      _.onResume = t2;
+      _.onCancel = t3;
+      _.$ti = t4;
+    },
+    _ControllerStream: function _ControllerStream(t0, t1) {
+      this._controller = t0;
+      this.$ti = t1;
+    },
+    _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3, t4, t5, t6) {
+      var _ = this;
+      _._controller = t0;
+      _._async$_onData = t1;
+      _._onError = t2;
+      _._onDone = t3;
+      _._zone = t4;
+      _._state = t5;
+      _._pending = _._cancelFuture = null;
+      _.$ti = t6;
+    },
+    _StreamSinkWrapper: function _StreamSinkWrapper(t0, t1) {
+      this._async$_target = t0;
+      this.$ti = t1;
+    },
+    _BufferingStreamSubscription: function _BufferingStreamSubscription() {
+    },
+    _BufferingStreamSubscription__sendError_sendError: function _BufferingStreamSubscription__sendError_sendError(t0, t1, t2) {
+      this.$this = t0;
+      this.error = t1;
+      this.stackTrace = t2;
+    },
+    _BufferingStreamSubscription__sendDone_sendDone: function _BufferingStreamSubscription__sendDone_sendDone(t0) {
+      this.$this = t0;
+    },
+    _StreamImpl: function _StreamImpl() {
+    },
+    _DelayedEvent: function _DelayedEvent() {
+    },
+    _DelayedData: function _DelayedData(t0, t1) {
+      this.value = t0;
+      this.next = null;
+      this.$ti = t1;
+    },
+    _DelayedError: function _DelayedError(t0, t1) {
+      this.error = t0;
+      this.stackTrace = t1;
+      this.next = null;
+    },
+    _DelayedDone: function _DelayedDone() {
+    },
+    _PendingEvents: function _PendingEvents() {
+    },
+    _PendingEvents_schedule_closure: function _PendingEvents_schedule_closure(t0, t1) {
+      this.$this = t0;
+      this.dispatch = t1;
+    },
+    _StreamImplEvents: function _StreamImplEvents(t0) {
+      var _ = this;
+      _.lastPendingEvent = _.firstPendingEvent = null;
+      _._state = 0;
+      _.$ti = t0;
+    },
+    _DoneStreamSubscription: function _DoneStreamSubscription(t0, t1, t2) {
+      var _ = this;
+      _._zone = t0;
+      _._state = 0;
+      _._onDone = t1;
+      _.$ti = t2;
+    },
+    _StreamIterator: function _StreamIterator(t0, t1) {
+      var _ = this;
+      _._async$_subscription = null;
+      _._stateData = t0;
+      _._isPaused = false;
+      _.$ti = t1;
+    },
+    _cancelAndValue_closure: function _cancelAndValue_closure(t0, t1) {
+      this.future = t0;
+      this.value = t1;
+    },
+    _ForwardingStream: function _ForwardingStream() {
+    },
+    _ForwardingStreamSubscription: function _ForwardingStreamSubscription(t0, t1, t2, t3, t4, t5, t6) {
+      var _ = this;
+      _._stream = t0;
+      _._async$_subscription = null;
+      _._async$_onData = t1;
+      _._onError = t2;
+      _._onDone = t3;
+      _._zone = t4;
+      _._state = t5;
+      _._pending = _._cancelFuture = null;
+      _.$ti = t6;
+    },
+    _MapStream: function _MapStream(t0, t1, t2) {
+      this._transform = t0;
+      this._async$_source = t1;
+      this.$ti = t2;
+    },
+    AsyncError: function AsyncError(t0, t1) {
+      this.error = t0;
+      this.stackTrace = t1;
+    },
+    _Zone: function _Zone() {
+    },
+    _rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) {
+      this.error = t0;
+      this.stackTrace = t1;
+    },
+    _RootZone: function _RootZone() {
+    },
+    _RootZone_bindCallback_closure: function _RootZone_bindCallback_closure(t0, t1, t2) {
+      this.$this = t0;
+      this.f = t1;
+      this.R = t2;
+    },
+    _RootZone_bindCallbackGuarded_closure: function _RootZone_bindCallbackGuarded_closure(t0, t1) {
+      this.$this = t0;
+      this.f = t1;
+    },
+    _RootZone_bindUnaryCallbackGuarded_closure: function _RootZone_bindUnaryCallbackGuarded_closure(t0, t1, t2) {
+      this.$this = t0;
+      this.f = t1;
+      this.T = t2;
+    },
+    LinkedHashMap_LinkedHashMap: function($K, $V) {
+      return new H.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>"));
+    },
+    LinkedHashMap_LinkedHashMap$_literal: function(keyValuePairs, $K, $V) {
+      return $K._eval$1("@<0>")._bind$1($V)._eval$1("LinkedHashMap<1,2>")._as(H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>"))));
+    },
+    LinkedHashMap_LinkedHashMap$_empty: function($K, $V) {
+      return new H.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>"));
+    },
+    LinkedHashSet_LinkedHashSet: function($E) {
+      return new P._LinkedHashSet($E._eval$1("_LinkedHashSet<0>"));
+    },
+    _LinkedHashSet__newHashTable: function() {
+      var table = Object.create(null);
+      table["<non-identifier-key>"] = table;
+      delete table["<non-identifier-key>"];
+      return table;
+    },
+    IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDelimiter) {
+      var parts, t1;
+      if (P._isToStringVisiting(iterable)) {
+        if (leftDelimiter === "(" && rightDelimiter === ")")
+          return "(...)";
+        return leftDelimiter + "..." + rightDelimiter;
+      }
+      parts = H.setRuntimeTypeInfo([], type$.JSArray_String);
+      C.JSArray_methods.add$1($._toStringVisiting, iterable);
+      try {
+        P._iterablePartsToStrings(iterable, parts);
+      } finally {
+        if (0 >= $._toStringVisiting.length)
+          return H.ioore($._toStringVisiting, -1);
+        $._toStringVisiting.pop();
+      }
+      t1 = P.StringBuffer__writeAll(leftDelimiter, type$.Iterable_dynamic._as(parts), ", ") + rightDelimiter;
+      return t1.charCodeAt(0) == 0 ? t1 : t1;
+    },
+    IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDelimiter) {
+      var buffer, t1;
+      if (P._isToStringVisiting(iterable))
+        return leftDelimiter + "..." + rightDelimiter;
+      buffer = new P.StringBuffer(leftDelimiter);
+      C.JSArray_methods.add$1($._toStringVisiting, iterable);
+      try {
+        t1 = buffer;
+        t1._contents = P.StringBuffer__writeAll(t1._contents, iterable, ", ");
+      } finally {
+        if (0 >= $._toStringVisiting.length)
+          return H.ioore($._toStringVisiting, -1);
+        $._toStringVisiting.pop();
+      }
+      buffer._contents += rightDelimiter;
+      t1 = buffer._contents;
+      return t1.charCodeAt(0) == 0 ? t1 : t1;
+    },
+    _isToStringVisiting: function(o) {
+      var t1, i;
+      for (t1 = $._toStringVisiting.length, i = 0; i < t1; ++i)
+        if (o === $._toStringVisiting[i])
+          return true;
+      return false;
+    },
+    _iterablePartsToStrings: function(iterable, parts) {
+      var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision,
+        it = iterable.get$iterator(iterable),
+        $length = 0, count = 0;
+      while (true) {
+        if (!($length < 80 || count < 3))
+          break;
+        if (!it.moveNext$0())
+          return;
+        next = H.S(it.get$current());
+        C.JSArray_methods.add$1(parts, next);
+        $length += next.length + 2;
+        ++count;
+      }
+      if (!it.moveNext$0()) {
+        if (count <= 5)
+          return;
+        if (0 >= parts.length)
+          return H.ioore(parts, -1);
+        ultimateString = parts.pop();
+        if (0 >= parts.length)
+          return H.ioore(parts, -1);
+        penultimateString = parts.pop();
+      } else {
+        penultimate = it.get$current();
+        ++count;
+        if (!it.moveNext$0()) {
+          if (count <= 4) {
+            C.JSArray_methods.add$1(parts, H.S(penultimate));
+            return;
+          }
+          ultimateString = H.S(penultimate);
+          if (0 >= parts.length)
+            return H.ioore(parts, -1);
+          penultimateString = parts.pop();
+          $length += ultimateString.length + 2;
+        } else {
+          ultimate = it.get$current();
+          ++count;
+          for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) {
+            ultimate0 = it.get$current();
+            ++count;
+            if (count > 100) {
+              while (true) {
+                if (!($length > 75 && count > 3))
+                  break;
+                if (0 >= parts.length)
+                  return H.ioore(parts, -1);
+                $length -= parts.pop().length + 2;
+                --count;
+              }
+              C.JSArray_methods.add$1(parts, "...");
+              return;
+            }
+          }
+          penultimateString = H.S(penultimate);
+          ultimateString = H.S(ultimate);
+          $length += ultimateString.length + penultimateString.length + 4;
+        }
+      }
+      if (count > parts.length + 2) {
+        $length += 5;
+        elision = "...";
+      } else
+        elision = null;
+      while (true) {
+        if (!($length > 80 && parts.length > 3))
+          break;
+        if (0 >= parts.length)
+          return H.ioore(parts, -1);
+        $length -= parts.pop().length + 2;
+        if (elision == null) {
+          $length += 5;
+          elision = "...";
+        }
+      }
+      if (elision != null)
+        C.JSArray_methods.add$1(parts, elision);
+      C.JSArray_methods.add$1(parts, penultimateString);
+      C.JSArray_methods.add$1(parts, ultimateString);
+    },
+    LinkedHashMap_LinkedHashMap$of: function(other, $K, $V) {
+      var t1 = P.LinkedHashMap_LinkedHashMap($K, $V);
+      t1.addAll$1(0, other);
+      return t1;
+    },
+    MapBase_mapToString: function(m) {
+      var result, t1 = {};
+      if (P._isToStringVisiting(m))
+        return "{...}";
+      result = new P.StringBuffer("");
+      try {
+        C.JSArray_methods.add$1($._toStringVisiting, m);
+        result._contents += "{";
+        t1.first = true;
+        m.forEach$1(0, new P.MapBase_mapToString_closure(t1, result));
+        result._contents += "}";
+      } finally {
+        if (0 >= $._toStringVisiting.length)
+          return H.ioore($._toStringVisiting, -1);
+        $._toStringVisiting.pop();
+      }
+      t1 = result._contents;
+      return t1.charCodeAt(0) == 0 ? t1 : t1;
+    },
+    ListQueue__calculateCapacity: function(initialCapacity) {
+      return 8;
+    },
+    _LinkedHashSet: function _LinkedHashSet(t0) {
+      var _ = this;
+      _._collection$_length = 0;
+      _._collection$_last = _._collection$_first = _._collection$_rest = _._collection$_nums = _._collection$_strings = null;
+      _._collection$_modifications = 0;
+      _.$ti = t0;
+    },
+    _LinkedHashSetCell: function _LinkedHashSetCell(t0) {
+      this._element = t0;
+      this._collection$_next = null;
+    },
+    _LinkedHashSetIterator: function _LinkedHashSetIterator(t0, t1, t2) {
+      var _ = this;
+      _._set = t0;
+      _._collection$_modifications = t1;
+      _._collection$_current = _._collection$_cell = null;
+      _.$ti = t2;
+    },
+    ListMixin: function ListMixin() {
+    },
+    MapBase: function MapBase() {
+    },
+    MapBase_mapToString_closure: function MapBase_mapToString_closure(t0, t1) {
+      this._box_0 = t0;
+      this.result = t1;
+    },
+    MapMixin: function MapMixin() {
+    },
+    _UnmodifiableMapMixin: function _UnmodifiableMapMixin() {
+    },
+    MapView: function MapView() {
+    },
+    UnmodifiableMapView: function UnmodifiableMapView() {
+    },
+    ListQueue: function ListQueue(t0, t1) {
+      var _ = this;
+      _._collection$_table = t0;
+      _._modificationCount = _._tail = _._head = 0;
+      _.$ti = t1;
+    },
+    _ListQueueIterator: function _ListQueueIterator(t0, t1, t2, t3, t4) {
+      var _ = this;
+      _._queue = t0;
+      _._end = t1;
+      _._modificationCount = t2;
+      _._position = t3;
+      _._collection$_current = null;
+      _.$ti = t4;
+    },
+    _SetBase: function _SetBase() {
+    },
+    _UnmodifiableMapView_MapView__UnmodifiableMapMixin: function _UnmodifiableMapView_MapView__UnmodifiableMapMixin() {
+    },
+    _parseJson: function(source, reviver) {
+      var parsed, e, exception, t1;
+      if (typeof source != "string")
+        throw H.wrapException(H.argumentErrorValue(source));
+      parsed = null;
+      try {
+        parsed = JSON.parse(source);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        t1 = P.FormatException$(String(e), null, null);
+        throw H.wrapException(t1);
+      }
+      t1 = P._convertJsonToDartLazy(parsed);
+      return t1;
+    },
+    _convertJsonToDartLazy: function(object) {
+      var i;
+      if (object == null)
+        return null;
+      if (typeof object != "object")
+        return object;
+      if (Object.getPrototypeOf(object) !== Array.prototype)
+        return new P._JsonMap(object, Object.create(null));
+      for (i = 0; i < object.length; ++i)
+        object[i] = P._convertJsonToDartLazy(object[i]);
+      return object;
+    },
+    Utf8Decoder__convertIntercepted: function(allowMalformed, codeUnits, start, end) {
+      var casted, result;
+      if (codeUnits instanceof Uint8Array) {
+        casted = codeUnits;
+        end = casted.length;
+        if (end - start < 15)
+          return null;
+        result = P.Utf8Decoder__convertInterceptedUint8List(allowMalformed, casted, start, end);
+        if (result != null && allowMalformed)
+          if (result.indexOf("\ufffd") >= 0)
+            return null;
+        return result;
+      }
+      return null;
+    },
+    Utf8Decoder__convertInterceptedUint8List: function(allowMalformed, codeUnits, start, end) {
+      var decoder = allowMalformed ? $.$get$Utf8Decoder__decoderNonfatal() : $.$get$Utf8Decoder__decoder();
+      if (decoder == null)
+        return null;
+      if (0 === start && end === codeUnits.length)
+        return P.Utf8Decoder__useTextDecoder(decoder, codeUnits);
+      return P.Utf8Decoder__useTextDecoder(decoder, codeUnits.subarray(start, P.RangeError_checkValidRange(start, end, codeUnits.length)));
+    },
+    Utf8Decoder__useTextDecoder: function(decoder, codeUnits) {
+      var t1, exception;
+      try {
+        t1 = decoder.decode(codeUnits);
+        return t1;
+      } catch (exception) {
+        H.unwrapException(exception);
+      }
+      return null;
+    },
+    JsonUnsupportedObjectError$: function(unsupportedObject, cause, partialResult) {
+      return new P.JsonUnsupportedObjectError(unsupportedObject, cause);
+    },
+    _defaultToEncodable: function(object) {
+      return object.toJson$0();
+    },
+    _JsonStringStringifier_stringify: function(object, toEncodable, indent) {
+      var t1,
+        output = new P.StringBuffer(""),
+        stringifier = new P._JsonStringStringifier(output, [], P.convert___defaultToEncodable$closure());
+      stringifier.writeObject$1(object);
+      t1 = output._contents;
+      return t1.charCodeAt(0) == 0 ? t1 : t1;
+    },
+    _Utf8Decoder_errorDescription: function(state) {
+      switch (state) {
+        case 65:
+          return "Missing extension byte";
+        case 67:
+          return "Unexpected extension byte";
+        case 69:
+          return "Invalid UTF-8 byte";
+        case 71:
+          return "Overlong encoding";
+        case 73:
+          return "Out of unicode range";
+        case 75:
+          return "Encoded surrogate";
+        case 77:
+          return "Unfinished UTF-8 octet sequence";
+        default:
+          return "";
+      }
+    },
+    _JsonMap: function _JsonMap(t0, t1) {
+      this._original = t0;
+      this._processed = t1;
+      this._data = null;
+    },
+    _JsonMapKeyIterable: function _JsonMapKeyIterable(t0) {
+      this._parent = t0;
+    },
+    Utf8Decoder_closure: function Utf8Decoder_closure() {
+    },
+    Utf8Decoder_closure0: function Utf8Decoder_closure0() {
+    },
+    Codec: function Codec() {
+    },
+    Converter: function Converter() {
+    },
+    JsonUnsupportedObjectError: function JsonUnsupportedObjectError(t0, t1) {
+      this.unsupportedObject = t0;
+      this.cause = t1;
+    },
+    JsonCyclicError: function JsonCyclicError(t0, t1) {
+      this.unsupportedObject = t0;
+      this.cause = t1;
+    },
+    JsonCodec: function JsonCodec() {
+    },
+    JsonEncoder: function JsonEncoder(t0) {
+      this._toEncodable = t0;
+    },
+    JsonDecoder: function JsonDecoder(t0) {
+      this._reviver = t0;
+    },
+    _JsonStringifier: function _JsonStringifier() {
+    },
+    _JsonStringifier_writeMap_closure: function _JsonStringifier_writeMap_closure(t0, t1) {
+      this._box_0 = t0;
+      this.keyValueList = t1;
+    },
+    _JsonStringStringifier: function _JsonStringStringifier(t0, t1, t2) {
+      this._sink = t0;
+      this._seen = t1;
+      this._toEncodable = t2;
+    },
+    Utf8Decoder: function Utf8Decoder(t0) {
+      this._allowMalformed = t0;
+    },
+    _Utf8Decoder: function _Utf8Decoder(t0) {
+      this.allowMalformed = t0;
+      this._convert$_state = 16;
+      this._charOrIndex = 0;
+    },
+    _symbolMapToStringMap: function(map) {
+      var result = new H.JsLinkedHashMap(type$.JsLinkedHashMap_String_dynamic);
+      map.forEach$1(0, new P._symbolMapToStringMap_closure(result));
+      return result;
+    },
+    Function_apply: function($function, positionalArguments, namedArguments) {
+      return H.Primitives_applyFunction($function, positionalArguments, namedArguments == null ? null : P._symbolMapToStringMap(namedArguments));
+    },
+    int_parse: function(source) {
+      var value = H.Primitives_parseInt(source, null);
+      if (value != null)
+        return value;
+      throw H.wrapException(P.FormatException$(source, null, null));
+    },
+    Error__objectToString: function(object) {
+      if (object instanceof H.Closure)
+        return object.toString$0(0);
+      return "Instance of '" + H.S(H.Primitives_objectTypeName(object)) + "'";
+    },
+    List_List$filled: function($length, fill, growable, $E) {
+      var i,
+        result = growable ? J.JSArray_JSArray$growable($length, $E) : J.JSArray_JSArray$fixed($length, $E);
+      if ($length !== 0 && fill != null)
+        for (i = 0; i < result.length; ++i)
+          result[i] = fill;
+      return result;
+    },
+    List_List$from: function(elements, growable, $E) {
+      var t1,
+        list = H.setRuntimeTypeInfo([], $E._eval$1("JSArray<0>"));
+      for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();)
+        C.JSArray_methods.add$1(list, $E._as(t1.get$current()));
+      return list;
+    },
+    String_String$fromCharCodes: function(charCodes, start, end) {
+      var array, len, t1;
+      if (Array.isArray(charCodes)) {
+        array = charCodes;
+        len = array.length;
+        end = P.RangeError_checkValidRange(start, end, len);
+        return H.Primitives_stringFromCharCodes(start > 0 || end < len ? array.slice(start, end) : array);
+      }
+      t1 = H.Primitives_stringFromNativeUint8List(charCodes, start, P.RangeError_checkValidRange(start, end, charCodes.length));
+      return t1;
+    },
+    StringBuffer__writeAll: function(string, objects, separator) {
+      var iterator = J.get$iterator$ax(objects);
+      if (!iterator.moveNext$0())
+        return string;
+      if (separator.length === 0) {
+        do
+          string += H.S(iterator.get$current());
+        while (iterator.moveNext$0());
+      } else {
+        string += H.S(iterator.get$current());
+        for (; iterator.moveNext$0();)
+          string = string + separator + H.S(iterator.get$current());
+      }
+      return string;
+    },
+    NoSuchMethodError$: function(receiver, memberName, positionalArguments, namedArguments) {
+      return new P.NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments);
+    },
+    StackTrace_current: function() {
+      var stackTrace, exception;
+      if (H.boolConversionCheck($.$get$_hasErrorStackProperty()))
+        return H.getTraceFromException(new Error());
+      try {
+        throw H.wrapException("");
+      } catch (exception) {
+        H.unwrapException(exception);
+        stackTrace = H.getTraceFromException(exception);
+        return stackTrace;
+      }
+    },
+    DateTime__fourDigits: function(n) {
+      var absN = Math.abs(n),
+        sign = n < 0 ? "-" : "";
+      if (absN >= 1000)
+        return "" + n;
+      if (absN >= 100)
+        return sign + "0" + absN;
+      if (absN >= 10)
+        return sign + "00" + absN;
+      return sign + "000" + absN;
+    },
+    DateTime__threeDigits: function(n) {
+      if (n >= 100)
+        return "" + n;
+      if (n >= 10)
+        return "0" + n;
+      return "00" + n;
+    },
+    DateTime__twoDigits: function(n) {
+      if (n >= 10)
+        return "" + n;
+      return "0" + n;
+    },
+    Error_safeToString: function(object) {
+      if (typeof object == "number" || H._isBool(object) || null == object)
+        return J.toString$0$(object);
+      if (typeof object == "string")
+        return JSON.stringify(object);
+      return P.Error__objectToString(object);
+    },
+    AssertionError$: function(message) {
+      return new P.AssertionError(message);
+    },
+    ArgumentError$: function(message) {
+      return new P.ArgumentError(false, null, null, message);
+    },
+    ArgumentError$value: function(value, $name, message) {
+      return new P.ArgumentError(true, value, $name, message);
+    },
+    ArgumentError_checkNotNull: function(argument, $name, $T) {
+      if (argument == null)
+        throw H.wrapException(new P.ArgumentError(false, null, $name, "Must not be null"));
+      return argument;
+    },
+    RangeError$: function(message) {
+      var _null = null;
+      return new P.RangeError(_null, _null, false, _null, _null, message);
+    },
+    RangeError$value: function(value, $name) {
+      return new P.RangeError(null, null, true, value, $name, "Value not in range");
+    },
+    RangeError$range: function(invalidValue, minValue, maxValue, $name, message) {
+      return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value");
+    },
+    RangeError_checkValidRange: function(start, end, $length) {
+      if (0 > start || start > $length)
+        throw H.wrapException(P.RangeError$range(start, 0, $length, "start", null));
+      if (end != null) {
+        if (start > end || end > $length)
+          throw H.wrapException(P.RangeError$range(end, start, $length, "end", null));
+        return end;
+      }
+      return $length;
+    },
+    RangeError_checkNotNegative: function(value, $name) {
+      if (value < 0)
+        throw H.wrapException(P.RangeError$range(value, 0, null, $name, null));
+      return value;
+    },
+    IndexError$: function(invalidValue, indexable, $name, message, $length) {
+      var t1 = H._asIntS($length == null ? J.get$length$asx(indexable) : $length);
+      return new P.IndexError(t1, true, invalidValue, $name, "Index out of range");
+    },
+    UnsupportedError$: function(message) {
+      return new P.UnsupportedError(message);
+    },
+    UnimplementedError$: function(message) {
+      return new P.UnimplementedError(message);
+    },
+    StateError$: function(message) {
+      return new P.StateError(message);
+    },
+    ConcurrentModificationError$: function(modifiedObject) {
+      return new P.ConcurrentModificationError(modifiedObject);
+    },
+    Exception_Exception: function(message) {
+      return new P._Exception(message);
+    },
+    FormatException$: function(message, source, offset) {
+      return new P.FormatException(message, source, offset);
+    },
+    _symbolMapToStringMap_closure: function _symbolMapToStringMap_closure(t0) {
+      this.result = t0;
+    },
+    NoSuchMethodError_toString_closure: function NoSuchMethodError_toString_closure(t0, t1) {
+      this._box_0 = t0;
+      this.sb = t1;
+    },
+    bool: function bool() {
+    },
+    DateTime: function DateTime(t0, t1) {
+      this._value = t0;
+      this.isUtc = t1;
+    },
+    double: function double() {
+    },
+    Duration: function Duration(t0) {
+      this._duration = t0;
+    },
+    Duration_toString_sixDigits: function Duration_toString_sixDigits() {
+    },
+    Duration_toString_twoDigits: function Duration_toString_twoDigits() {
+    },
+    Error0: function Error0() {
+    },
+    AssertionError: function AssertionError(t0) {
+      this.message = t0;
+    },
+    NullThrownError: function NullThrownError() {
+    },
+    ArgumentError: function ArgumentError(t0, t1, t2, t3) {
+      var _ = this;
+      _._hasValue = t0;
+      _.invalidValue = t1;
+      _.name = t2;
+      _.message = t3;
+    },
+    RangeError: function RangeError(t0, t1, t2, t3, t4, t5) {
+      var _ = this;
+      _.start = t0;
+      _.end = t1;
+      _._hasValue = t2;
+      _.invalidValue = t3;
+      _.name = t4;
+      _.message = t5;
+    },
+    IndexError: function IndexError(t0, t1, t2, t3, t4) {
+      var _ = this;
+      _.length = t0;
+      _._hasValue = t1;
+      _.invalidValue = t2;
+      _.name = t3;
+      _.message = t4;
+    },
+    NoSuchMethodError: function NoSuchMethodError(t0, t1, t2, t3) {
+      var _ = this;
+      _._core$_receiver = t0;
+      _._core$_memberName = t1;
+      _._core$_arguments = t2;
+      _._namedArguments = t3;
+    },
+    UnsupportedError: function UnsupportedError(t0) {
+      this.message = t0;
+    },
+    UnimplementedError: function UnimplementedError(t0) {
+      this.message = t0;
+    },
+    StateError: function StateError(t0) {
+      this.message = t0;
+    },
+    ConcurrentModificationError: function ConcurrentModificationError(t0) {
+      this.modifiedObject = t0;
+    },
+    OutOfMemoryError: function OutOfMemoryError() {
+    },
+    StackOverflowError: function StackOverflowError() {
+    },
+    CyclicInitializationError: function CyclicInitializationError(t0) {
+      this.variableName = t0;
+    },
+    _Exception: function _Exception(t0) {
+      this.message = t0;
+    },
+    FormatException: function FormatException(t0, t1, t2) {
+      this.message = t0;
+      this.source = t1;
+      this.offset = t2;
+    },
+    Function: function Function() {
+    },
+    int: function int() {
+    },
+    Iterable: function Iterable() {
+    },
+    Iterator: function Iterator() {
+    },
+    List: function List() {
+    },
+    Map: function Map() {
+    },
+    MapEntry: function MapEntry() {
+    },
+    Null: function Null() {
+    },
+    num: function num() {
+    },
+    Object: function Object() {
+    },
+    StackTrace: function StackTrace() {
+    },
+    _StringStackTrace: function _StringStackTrace() {
+    },
+    String: function String() {
+    },
+    StringBuffer: function StringBuffer(t0) {
+      this._contents = t0;
+    },
+    Symbol0: function Symbol0() {
+    },
+    convertDartToNative_Dictionary: function(dict) {
+      var object = {};
+      dict.forEach$1(0, new P.convertDartToNative_Dictionary_closure(object));
+      return object;
+    },
+    _AcceptStructuredClone: function _AcceptStructuredClone() {
+    },
+    _AcceptStructuredClone_walk_closure: function _AcceptStructuredClone_walk_closure(t0, t1) {
+      this._box_0 = t0;
+      this.$this = t1;
+    },
+    convertDartToNative_Dictionary_closure: function convertDartToNative_Dictionary_closure(t0) {
+      this.object = t0;
+    },
+    _AcceptStructuredCloneDart2Js: function _AcceptStructuredCloneDart2Js(t0, t1) {
+      this.values = t0;
+      this.copies = t1;
+      this.mustCopy = false;
+    },
+    promiseToFuture: function(jsPromise, $T) {
+      var t1 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")),
+        completer = new P._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>"));
+      jsPromise.then(H.convertDartClosureToJS(new P.promiseToFuture_closure(completer, $T), 1), H.convertDartClosureToJS(new P.promiseToFuture_closure0(completer), 1));
+      return t1;
+    },
+    promiseToFuture_closure: function promiseToFuture_closure(t0, t1) {
+      this.completer = t0;
+      this.T = t1;
+    },
+    promiseToFuture_closure0: function promiseToFuture_closure0(t0) {
+      this.completer = t0;
+    },
+    _JSRandom: function _JSRandom() {
+    },
+    ByteBuffer: function ByteBuffer() {
+    },
+    ByteData: function ByteData() {
+    },
+    Int8List: function Int8List() {
+    },
+    Uint8List: function Uint8List() {
+    },
+    Uint8ClampedList: function Uint8ClampedList() {
+    },
+    Int16List: function Int16List() {
+    },
+    Uint16List: function Uint16List() {
+    },
+    Int32List: function Int32List() {
+    },
+    Uint32List: function Uint32List() {
+    },
+    Float32List: function Float32List() {
+    },
+    Float64List: function Float64List() {
+    }
+  },
+  W = {
+    EventSource__factoryEventSource: function(url, eventSourceInitDict) {
+      var t1 = new EventSource(url, P.convertDartToNative_Dictionary(eventSourceInitDict));
+      return t1;
+    },
+    HttpRequest_request: function(url, method, sendData, withCredentials) {
+      var t2, t3, t4,
+        t1 = new P._Future($.Zone__current, type$._Future_HttpRequest),
+        completer = new P._AsyncCompleter(t1, type$._AsyncCompleter_HttpRequest),
+        xhr = new XMLHttpRequest();
+      C.HttpRequest_methods.open$3$async(xhr, method, url, true);
+      xhr.withCredentials = true;
+      t2 = type$.nullable_void_Function_legacy_ProgressEvent;
+      t3 = t2._as(new W.HttpRequest_request_closure(xhr, completer));
+      type$.nullable_void_Function._as(null);
+      t4 = type$.legacy_ProgressEvent;
+      W._EventStreamSubscription$(xhr, "load", t3, false, t4);
+      W._EventStreamSubscription$(xhr, "error", t2._as(completer.get$completeError()), false, t4);
+      xhr.send(sendData);
+      return t1;
+    },
+    _EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) {
+      var t1 = onData == null ? null : W._wrapZone(new W._EventStreamSubscription_closure(onData), type$.Event);
+      t1 = new W._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>"));
+      t1._tryResume$0();
+      return t1;
+    },
+    _wrapZone: function(callback, $T) {
+      var t1 = $.Zone__current;
+      if (t1 === C.C__RootZone)
+        return callback;
+      return t1.bindUnaryCallbackGuarded$1$1(callback, $T);
+    },
+    DomException: function DomException() {
+    },
+    Event0: function Event0() {
+    },
+    EventSource: function EventSource() {
+    },
+    EventTarget: function EventTarget() {
+    },
+    HttpRequest: function HttpRequest() {
+    },
+    HttpRequest_request_closure: function HttpRequest_request_closure(t0, t1) {
+      this.xhr = t0;
+      this.completer = t1;
+    },
+    HttpRequestEventTarget: function HttpRequestEventTarget() {
+    },
+    MessageEvent: function MessageEvent() {
+    },
+    ProgressEvent: function ProgressEvent() {
+    },
+    EventStreamProvider: function EventStreamProvider(t0, t1) {
+      this._eventType = t0;
+      this.$ti = t1;
+    },
+    _EventStream: function _EventStream(t0, t1, t2, t3) {
+      var _ = this;
+      _._target = t0;
+      _._eventType = t1;
+      _._useCapture = t2;
+      _.$ti = t3;
+    },
+    _EventStreamSubscription: function _EventStreamSubscription(t0, t1, t2, t3, t4) {
+      var _ = this;
+      _._pauseCount = 0;
+      _._target = t0;
+      _._eventType = t1;
+      _._onData = t2;
+      _._useCapture = t3;
+      _.$ti = t4;
+    },
+    _EventStreamSubscription_closure: function _EventStreamSubscription_closure(t0) {
+      this.onData = t0;
+    },
+    _EventStreamSubscription_onData_closure: function _EventStreamSubscription_onData_closure(t0) {
+      this.handleData = t0;
+    }
+  },
+  V = {ErrorResult: function ErrorResult(t0, t1) {
+      this.error = t0;
+      this.stackTrace = t1;
+    }},
+  E = {Result: function Result() {
+    },
+    main: function() {
+      var $async$goto = 0,
+        $async$completer = P._makeAsyncAwaitCompleter(type$.void),
+        ddsChannel, vmService, id, message, channel, t1, t2, t3, $async$temp1, $async$temp2, $async$temp3;
+      var $async$main = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
+        if ($async$errorCode === 1)
+          return P._asyncRethrow($async$result, $async$completer);
+        while (true)
+          switch ($async$goto) {
+            case 0:
+              // Function start
+              channel = M.SseClient$("/test");
+              t1 = channel._incomingController;
+              t2 = new Q.QueueList(type$.QueueList_legacy_Result_legacy_String);
+              t3 = new Array(8);
+              t3.fixed$length = Array;
+              t2.set$_table(H.setRuntimeTypeInfo(t3, type$.JSArray_legacy_Result_legacy_String));
+              $async$temp1 = M;
+              $async$goto = 2;
+              return P._asyncAwait(new G.StreamQueue(new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")), t2, new P.ListQueue(P.List_List$filled(P.ListQueue__calculateCapacity(null), null, false, type$.nullable__EventRequest_dynamic), type$.ListQueue_legacy__EventRequest_dynamic), type$.StreamQueue_legacy_String).get$next(), $async$main);
+            case 2:
+              // returning from await.
+              ddsChannel = $async$temp1.SseClient$($async$result);
+              t2 = new W._EventStream(ddsChannel._eventSource, "open", false, type$._EventStream_legacy_Event);
+              $async$goto = 3;
+              return P._asyncAwait(t2.get$first(t2), $async$main);
+            case 3:
+              // returning from await.
+              t2 = ddsChannel._incomingController;
+              vmService = Q.VmService$(new P._ControllerStream(t2, H._instanceType(t2)._eval$1("_ControllerStream<1>")), new E.main_closure(ddsChannel));
+              id = "" + ++vmService._id;
+              t2 = new P._Future($.Zone__current, type$._Future_legacy_Version);
+              vmService._completers.$indexSet(0, id, new P._AsyncCompleter(t2, type$._AsyncCompleter_legacy_Version));
+              vmService._methodCalls.$indexSet(0, id, "getVersion");
+              t1 = type$.dynamic;
+              message = C.C_JsonCodec.encode$2$toEncodable(P.LinkedHashMap_LinkedHashMap$_literal(["jsonrpc", "2.0", "id", id, "method", "getVersion", "params", C.Map_empty], t1, t1), null);
+              vmService._onSend.add$1(0, message);
+              vmService._writeMessage.call$1(message);
+              t1 = channel._outgoingController;
+              $async$temp1 = t1;
+              $async$temp2 = H._instanceType(t1)._precomputed1;
+              $async$temp3 = C.C_JsonCodec;
+              $async$goto = 4;
+              return P._asyncAwait(t2, $async$main);
+            case 4:
+              // returning from await.
+              $async$temp1.add$1(0, $async$temp2._as($async$temp3.encode$1($async$result.json)));
+              ddsChannel.close$0(0);
+              // implicit return
+              return P._asyncReturn(null, $async$completer);
+          }
+      });
+      return P._asyncStartSync($async$main, $async$completer);
+    },
+    main_closure: function main_closure(t0) {
+      this.ddsChannel = t0;
+    }
+  },
+  F = {ValueResult: function ValueResult(t0, t1) {
+      this.value = t0;
+      this.$ti = t1;
+    },
+    Logger_Logger: function($name) {
+      return $.Logger__loggers.putIfAbsent$2($name, new F.Logger_Logger_closure($name));
+    },
+    Logger: function Logger(t0, t1, t2) {
+      var _ = this;
+      _.name = t0;
+      _.parent = t1;
+      _._level = null;
+      _._children = t2;
+    },
+    Logger_Logger_closure: function Logger_Logger_closure(t0) {
+      this.name = t0;
+    }
+  },
+  G = {StreamQueue: function StreamQueue(t0, t1, t2, t3) {
+      var _ = this;
+      _._source = t0;
+      _._subscription = null;
+      _._isDone = false;
+      _._eventsReceived = 0;
+      _._eventQueue = t1;
+      _._requestQueue = t2;
+      _.$ti = t3;
+    }, StreamQueue__ensureListening_closure: function StreamQueue__ensureListening_closure(t0) {
+      this.$this = t0;
+    }, StreamQueue__ensureListening_closure1: function StreamQueue__ensureListening_closure1(t0) {
+      this.$this = t0;
+    }, StreamQueue__ensureListening_closure0: function StreamQueue__ensureListening_closure0(t0) {
+      this.$this = t0;
+    }, _EventRequest: function _EventRequest() {
+    }, _NextRequest: function _NextRequest(t0, t1) {
+      this._completer = t0;
+      this.$ti = t1;
+    }},
+  Q = {QueueList: function QueueList(t0) {
+      var _ = this;
+      _._table = null;
+      _._queue_list$_tail = _._queue_list$_head = 0;
+      _.$ti = t0;
+    }, _QueueList_Object_ListMixin: function _QueueList_Object_ListMixin() {
+    },
+    createServiceObject: function(json, expectedTypes) {
+      var t1, type, _null = null;
+      if (json == null)
+        return _null;
+      if (type$.legacy_List_dynamic._is(json)) {
+        t1 = J.map$1$1$ax(json, new Q.createServiceObject_closure(expectedTypes), type$.legacy_Object);
+        return P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E"));
+      } else if (type$.legacy_Map_dynamic_dynamic._is(json)) {
+        type = H._asStringS(json.$index(0, "type"));
+        if (type == null)
+          if (expectedTypes.length === 1)
+            type = (expectedTypes && C.JSArray_methods).get$first(expectedTypes);
+          else
+            return _null;
+        else if (J.$eq$(json.$index(0, "type"), "@Instance") && J.$eq$(json.$index(0, "kind"), "Null") && !(expectedTypes && C.JSArray_methods).contains$1(expectedTypes, type))
+          return _null;
+        if ($._typeFactories.$index(0, type) == null)
+          return _null;
+        else
+          return $._typeFactories.$index(0, type).call$1(json);
+      } else
+        return json;
+    },
+    _createSpecificObject: function(json, creator) {
+      var t1, t2, key;
+      if (json == null)
+        return null;
+      if (type$.legacy_List_dynamic._is(json)) {
+        t1 = J.map$1$1$ax(json, new Q._createSpecificObject_closure(creator), type$.dynamic);
+        return P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E"));
+      } else if (type$.legacy_Map_dynamic_dynamic._is(json)) {
+        t1 = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.dynamic);
+        for (t2 = json.get$keys(), t2 = t2.get$iterator(t2); t2.moveNext$0();) {
+          key = H._asStringS(t2.get$current());
+          t1.$indexSet(0, key, json.$index(0, key));
+        }
+        return creator.call$1(t1);
+      } else
+        return json;
+    },
+    _setIfNotNull: function(json, key, value) {
+      if (value == null)
+        return;
+      json.$indexSet(0, key, value);
+    },
+    VmService$: function(inStream, writeMessage) {
+      var t1 = type$.legacy_String;
+      t1 = new Q.VmService(P.LinkedHashMap_LinkedHashMap$_empty(t1, type$.legacy_Completer_dynamic), P.LinkedHashMap_LinkedHashMap$_empty(t1, t1), P.LinkedHashMap_LinkedHashMap$_empty(t1, type$.legacy_legacy_Future_legacy_Map_of_legacy_String_and_dynamic_Function_legacy_Map_of_legacy_String_and_dynamic), P.StreamController_StreamController$broadcast(true, t1), P.StreamController_StreamController$broadcast(true, t1), new P._AsyncCompleter(new P._Future($.Zone__current, type$._Future_dynamic), type$._AsyncCompleter_dynamic), P.LinkedHashMap_LinkedHashMap$_empty(t1, type$.legacy_StreamController_legacy_Event));
+      t1.VmService$5$disposeHandler$log$streamClosed(inStream, writeMessage, null, null, null);
+      return t1;
+    },
+    ExtensionData_parse: function(json) {
+      return json == null ? null : new Q.ExtensionData(json);
+    },
+    AllocationProfile_parse: function(json) {
+      var t1, t2,
+        _s24_ = "dateLastAccumulatorReset",
+        _s17_ = "dateLastServiceGC";
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.AllocationProfile(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t2 = Q.createServiceObject(json.$index(0, "members"), C.List_ClassHeapStats);
+      if (t2 == null)
+        t2 = [];
+      t1.set$members(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_ClassHeapStats));
+      t1.memoryUsage = type$.legacy_MemoryUsage._as(Q.createServiceObject(json.$index(0, "memoryUsage"), C.List_MemoryUsage));
+      t1.dateLastAccumulatorReset = H._asIntS(typeof json.$index(0, _s24_) == "string" ? P.int_parse(H._asStringS(json.$index(0, _s24_))) : json.$index(0, _s24_));
+      t1.dateLastServiceGC = H._asIntS(typeof json.$index(0, _s17_) == "string" ? P.int_parse(H._asStringS(json.$index(0, _s17_))) : json.$index(0, _s17_));
+      return t1;
+    },
+    BoundField_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.BoundField();
+      t1.decl = type$.legacy_FieldRef._as(Q.createServiceObject(json.$index(0, "decl"), C.List_FieldRef));
+      t1.value = Q.createServiceObject(json.$index(0, "value"), C.List_InstanceRef_Sentinel);
+      return t1;
+    },
+    BoundVariable_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.BoundVariable(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.value = Q.createServiceObject(json.$index(0, "value"), C.List_PAk);
+      t1.declarationTokenPos = H._asIntS(json.$index(0, "declarationTokenPos"));
+      t1.scopeStartTokenPos = H._asIntS(json.$index(0, "scopeStartTokenPos"));
+      t1.scopeEndTokenPos = H._asIntS(json.$index(0, "scopeEndTokenPos"));
+      return t1;
+    },
+    Breakpoint_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Breakpoint(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.breakpointNumber = H._asIntS(json.$index(0, "breakpointNumber"));
+      t1.resolved = H._asBoolS(json.$index(0, "resolved"));
+      t1.isSyntheticAsyncContinuation = H._asBoolS(json.$index(0, "isSyntheticAsyncContinuation"));
+      t1.location = Q.createServiceObject(json.$index(0, "location"), C.List_oqh);
+      return t1;
+    },
+    ClassRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ClassRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      return t1;
+    },
+    Class_parse: function(json) {
+      var t1, t2, t3, t4, t5;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Class(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.error = type$.legacy_ErrorRef._as(Q.createServiceObject(json.$index(0, "error"), C.List_ErrorRef));
+      t1.isAbstract = H._asBoolS(json.$index(0, "abstract"));
+      t1.isConst = H._asBoolS(json.$index(0, "const"));
+      t1.library = type$.legacy_LibraryRef._as(Q.createServiceObject(json.$index(0, "library"), C.List_LibraryRef));
+      t1.location = type$.legacy_SourceLocation._as(Q.createServiceObject(json.$index(0, "location"), C.List_SourceLocation));
+      t2 = type$.legacy_ClassRef;
+      t1.superClass = t2._as(Q.createServiceObject(json.$index(0, "super"), C.List_ClassRef));
+      t3 = type$.legacy_InstanceRef;
+      t1.superType = t3._as(Q.createServiceObject(json.$index(0, "superType"), C.List_InstanceRef));
+      t4 = Q.createServiceObject(json.$index(0, "interfaces"), C.List_InstanceRef);
+      if (t4 == null)
+        t4 = [];
+      t5 = type$.Iterable_dynamic;
+      t1.set$interfaces(P.List_List$from(t5._as(t4), true, t3));
+      t1.mixin = t3._as(Q.createServiceObject(json.$index(0, "mixin"), C.List_InstanceRef));
+      t3 = Q.createServiceObject(json.$index(0, "fields"), C.List_FieldRef);
+      t1.set$fields(P.List_List$from(t5._as(t3 == null ? [] : t3), true, type$.legacy_FieldRef));
+      t3 = Q.createServiceObject(json.$index(0, "functions"), C.List_FuncRef);
+      t1.set$functions(P.List_List$from(t5._as(t3 == null ? [] : t3), true, type$.legacy_FuncRef));
+      t3 = Q.createServiceObject(json.$index(0, "subclasses"), C.List_ClassRef);
+      t1.set$subclasses(P.List_List$from(t5._as(t3 == null ? [] : t3), true, t2));
+      return t1;
+    },
+    ClassHeapStats_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ClassHeapStats(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.classRef = type$.legacy_ClassRef._as(Q.createServiceObject(json.$index(0, "class"), C.List_ClassRef));
+      t1.accumulatedSize = H._asIntS(json.$index(0, "accumulatedSize"));
+      t1.bytesCurrent = H._asIntS(json.$index(0, "bytesCurrent"));
+      t1.instancesAccumulated = H._asIntS(json.$index(0, "instancesAccumulated"));
+      t1.instancesCurrent = H._asIntS(json.$index(0, "instancesCurrent"));
+      return t1;
+    },
+    ClassList_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ClassList(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t2 = Q.createServiceObject(json.$index(0, "classes"), C.List_ClassRef);
+      if (t2 == null)
+        t2 = [];
+      t1.set$classes(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_ClassRef));
+      return t1;
+    },
+    ClientName_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ClientName(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.name = H._asStringS(json.$index(0, "name"));
+      return t1;
+    },
+    CodeRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.CodeRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.kind = H._asStringS(json.$index(0, "kind"));
+      return t1;
+    },
+    Code_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Code(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.kind = H._asStringS(json.$index(0, "kind"));
+      return t1;
+    },
+    ContextRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ContextRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.length = H._asIntS(json.$index(0, "length"));
+      return t1;
+    },
+    Context_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Context(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.length = H._asIntS(json.$index(0, "length"));
+      t1.parent = type$.legacy_Context._as(Q.createServiceObject(json.$index(0, "parent"), C.List_Context));
+      t2 = Q.createServiceObject(json.$index(0, "variables"), C.List_ContextElement);
+      if (t2 == null)
+        t2 = [];
+      t1.set$variables(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_ContextElement));
+      return t1;
+    },
+    ContextElement_parse: function(json) {
+      var t1 = new Q.ContextElement();
+      t1.value = Q.createServiceObject(type$.legacy_Map_of_legacy_String_and_dynamic._as(json).$index(0, "value"), C.List_InstanceRef_Sentinel);
+      return t1;
+    },
+    CpuSamples_parse: function(json) {
+      var t1, t2, t3;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.CpuSamples(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.samplePeriod = H._asIntS(json.$index(0, "samplePeriod"));
+      t1.maxStackDepth = H._asIntS(json.$index(0, "maxStackDepth"));
+      t1.sampleCount = H._asIntS(json.$index(0, "sampleCount"));
+      t1.timeSpan = H._asIntS(json.$index(0, "timeSpan"));
+      t1.timeOriginMicros = H._asIntS(json.$index(0, "timeOriginMicros"));
+      t1.timeExtentMicros = H._asIntS(json.$index(0, "timeExtentMicros"));
+      t1.pid = H._asIntS(json.$index(0, "pid"));
+      t2 = Q.createServiceObject(json.$index(0, "functions"), C.List_ProfileFunction);
+      if (t2 == null)
+        t2 = [];
+      t3 = type$.Iterable_dynamic;
+      t1.set$functions(P.List_List$from(t3._as(t2), true, type$.legacy_ProfileFunction));
+      t2 = Q.createServiceObject(json.$index(0, "samples"), C.List_CpuSample);
+      t1.set$samples(P.List_List$from(t3._as(t2 == null ? [] : t2), true, type$.legacy_CpuSample));
+      return t1;
+    },
+    CpuSample_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.CpuSample();
+      t1.tid = H._asIntS(json.$index(0, "tid"));
+      t1.timestamp = H._asIntS(json.$index(0, "timestamp"));
+      t1.vmTag = H._asStringS(json.$index(0, "vmTag"));
+      t1.userTag = H._asStringS(json.$index(0, "userTag"));
+      t1.truncated = H._asBoolS(json.$index(0, "truncated"));
+      t1.set$stack(P.List_List$from(type$.Iterable_dynamic._as(json.$index(0, "stack")), true, type$.legacy_int));
+      return t1;
+    },
+    ErrorRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ErrorRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.kind = H._asStringS(json.$index(0, "kind"));
+      t1.message = H._asStringS(json.$index(0, "message"));
+      return t1;
+    },
+    Error_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Error(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.kind = H._asStringS(json.$index(0, "kind"));
+      t1.message = H._asStringS(json.$index(0, "message"));
+      t2 = type$.legacy_InstanceRef;
+      t1.exception = t2._as(Q.createServiceObject(json.$index(0, "exception"), C.List_InstanceRef));
+      t1.stacktrace = t2._as(Q.createServiceObject(json.$index(0, "stacktrace"), C.List_InstanceRef));
+      return t1;
+    },
+    Event_parse: function(json) {
+      var t1, t2, _null = null,
+        _s16_ = "pauseBreakpoints",
+        _s14_ = "timelineEvents",
+        _s14_0 = "updatedStreams";
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Event(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.kind = H._asStringS(json.$index(0, "kind"));
+      t1.isolate = type$.legacy_IsolateRef._as(Q.createServiceObject(json.$index(0, "isolate"), C.List_IsolateRef));
+      t1.vm = type$.legacy_VMRef._as(Q.createServiceObject(json.$index(0, "vm"), C.List_VMRef));
+      t1.timestamp = H._asIntS(json.$index(0, "timestamp"));
+      t2 = type$.legacy_Breakpoint;
+      t1.breakpoint = t2._as(Q.createServiceObject(json.$index(0, "breakpoint"), C.List_Breakpoint));
+      t1.set$pauseBreakpoints(json.$index(0, _s16_) == null ? _null : P.List_List$from(type$.Iterable_dynamic._as(Q.createServiceObject(json.$index(0, _s16_), C.List_Breakpoint)), true, t2));
+      t1.topFrame = type$.legacy_Frame._as(Q.createServiceObject(json.$index(0, "topFrame"), C.List_Frame));
+      t2 = type$.legacy_InstanceRef;
+      t1.exception = t2._as(Q.createServiceObject(json.$index(0, "exception"), C.List_InstanceRef));
+      t1.bytes = H._asStringS(json.$index(0, "bytes"));
+      t1.inspectee = t2._as(Q.createServiceObject(json.$index(0, "inspectee"), C.List_InstanceRef));
+      t1.extensionRPC = H._asStringS(json.$index(0, "extensionRPC"));
+      t1.extensionKind = H._asStringS(json.$index(0, "extensionKind"));
+      t2 = type$.legacy_Map_dynamic_dynamic._as(json.$index(0, "extensionData"));
+      t1.extensionData = t2 == null ? _null : new Q.ExtensionData(t2);
+      t1.set$timelineEvents(json.$index(0, _s14_) == null ? _null : P.List_List$from(type$.Iterable_dynamic._as(Q.createServiceObject(json.$index(0, _s14_), C.List_TimelineEvent)), true, type$.legacy_TimelineEvent));
+      t1.set$updatedStreams(json.$index(0, _s14_0) == null ? _null : P.List_List$from(type$.Iterable_dynamic._as(json.$index(0, _s14_0)), true, type$.legacy_String));
+      t1.atAsyncSuspension = H._asBoolS(json.$index(0, "atAsyncSuspension"));
+      t1.status = H._asStringS(json.$index(0, "status"));
+      t1.logRecord = type$.legacy_LogRecord._as(Q.createServiceObject(json.$index(0, "logRecord"), C.List_LogRecord));
+      t1.service = H._asStringS(json.$index(0, "service"));
+      t1.method = H._asStringS(json.$index(0, "method"));
+      t1.alias = H._asStringS(json.$index(0, "alias"));
+      t1.flag = H._asStringS(json.$index(0, "flag"));
+      t1.newValue = H._asStringS(json.$index(0, "newValue"));
+      t1.last = H._asBoolS(json.$index(0, "last"));
+      t1.data = type$.legacy_ByteData._as(json.$index(0, "data"));
+      return t1;
+    },
+    FieldRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.FieldRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.owner = type$.legacy_ObjRef._as(Q.createServiceObject(json.$index(0, "owner"), C.List_ObjRef));
+      t1.declaredType = type$.legacy_InstanceRef._as(Q.createServiceObject(json.$index(0, "declaredType"), C.List_InstanceRef));
+      t1.isConst = H._asBoolS(json.$index(0, "const"));
+      t1.isFinal = H._asBoolS(json.$index(0, "final"));
+      t1.isStatic = H._asBoolS(json.$index(0, "static"));
+      return t1;
+    },
+    Field_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Field(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.owner = type$.legacy_ObjRef._as(Q.createServiceObject(json.$index(0, "owner"), C.List_ObjRef));
+      t2 = type$.legacy_InstanceRef;
+      t1.declaredType = t2._as(Q.createServiceObject(json.$index(0, "declaredType"), C.List_InstanceRef));
+      t1.isConst = H._asBoolS(json.$index(0, "const"));
+      t1.isFinal = H._asBoolS(json.$index(0, "final"));
+      t1.isStatic = H._asBoolS(json.$index(0, "static"));
+      t1.staticValue = t2._as(Q.createServiceObject(json.$index(0, "staticValue"), C.List_InstanceRef));
+      t1.location = type$.legacy_SourceLocation._as(Q.createServiceObject(json.$index(0, "location"), C.List_SourceLocation));
+      return t1;
+    },
+    Flag_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Flag();
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.comment = H._asStringS(json.$index(0, "comment"));
+      t1.modified = H._asBoolS(json.$index(0, "modified"));
+      t1.valueAsString = H._asStringS(json.$index(0, "valueAsString"));
+      return t1;
+    },
+    FlagList_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.FlagList(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t2 = Q.createServiceObject(json.$index(0, "flags"), C.List_Flag);
+      if (t2 == null)
+        t2 = [];
+      t1.set$flags(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_Flag));
+      return t1;
+    },
+    Frame_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Frame(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.index = H._asIntS(json.$index(0, "index"));
+      t1.$function = type$.legacy_FuncRef._as(Q.createServiceObject(json.$index(0, "function"), C.List_FuncRef));
+      t1.code = type$.legacy_CodeRef._as(Q.createServiceObject(json.$index(0, "code"), C.List_CodeRef));
+      t1.location = type$.legacy_SourceLocation._as(Q.createServiceObject(json.$index(0, "location"), C.List_SourceLocation));
+      t1.set$vars(json.$index(0, "vars") == null ? null : P.List_List$from(type$.Iterable_dynamic._as(Q.createServiceObject(json.$index(0, "vars"), C.List_BoundVariable)), true, type$.legacy_BoundVariable));
+      t1.kind = H._asStringS(json.$index(0, "kind"));
+      return t1;
+    },
+    FuncRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.FuncRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.owner = Q.createServiceObject(json.$index(0, "owner"), C.List_LibraryRef_ClassRef_FuncRef);
+      t1.isStatic = H._asBoolS(json.$index(0, "static"));
+      t1.isConst = H._asBoolS(json.$index(0, "const"));
+      return t1;
+    },
+    Func_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Func(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.owner = Q.createServiceObject(json.$index(0, "owner"), C.List_LibraryRef_ClassRef_FuncRef);
+      t1.isStatic = H._asBoolS(json.$index(0, "static"));
+      t1.isConst = H._asBoolS(json.$index(0, "const"));
+      t1.location = type$.legacy_SourceLocation._as(Q.createServiceObject(json.$index(0, "location"), C.List_SourceLocation));
+      t1.code = type$.legacy_CodeRef._as(Q.createServiceObject(json.$index(0, "code"), C.List_CodeRef));
+      return t1;
+    },
+    InstanceRef_parse: function(json) {
+      var t1 = Q.InstanceRef$_fromJson(type$.legacy_Map_of_legacy_String_and_dynamic._as(json));
+      return t1;
+    },
+    InstanceRef$_fromJson: function(json) {
+      var t1 = new Q.InstanceRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.InstanceRef$_fromJson$1(json);
+      return t1;
+    },
+    Instance_parse: function(json) {
+      var t1 = Q.Instance$_fromJson(type$.legacy_Map_of_legacy_String_and_dynamic._as(json));
+      return t1;
+    },
+    Instance$_fromJson: function(json) {
+      var t1 = new Q.Instance(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.Instance$_fromJson$1(json);
+      return t1;
+    },
+    IsolateRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.IsolateRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.id = H._asStringS(json.$index(0, "id"));
+      t1.number = H._asStringS(json.$index(0, "number"));
+      t1.name = H._asStringS(json.$index(0, "name"));
+      return t1;
+    },
+    Isolate_parse: function(json) {
+      var t1, t2, t3, t4,
+        _s13_ = "extensionRPCs";
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Isolate(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.id = H._asStringS(json.$index(0, "id"));
+      t1.number = H._asStringS(json.$index(0, "number"));
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.startTime = H._asIntS(json.$index(0, "startTime"));
+      t1.runnable = H._asBoolS(json.$index(0, "runnable"));
+      t1.livePorts = H._asIntS(json.$index(0, "livePorts"));
+      t1.pauseOnExit = H._asBoolS(json.$index(0, "pauseOnExit"));
+      t1.pauseEvent = type$.legacy_Event._as(Q.createServiceObject(json.$index(0, "pauseEvent"), C.List_Event));
+      t2 = type$.legacy_LibraryRef;
+      t1.rootLib = t2._as(Q.createServiceObject(json.$index(0, "rootLib"), C.List_LibraryRef));
+      t3 = Q.createServiceObject(json.$index(0, "libraries"), C.List_LibraryRef);
+      if (t3 == null)
+        t3 = [];
+      t4 = type$.Iterable_dynamic;
+      t1.set$libraries(P.List_List$from(t4._as(t3), true, t2));
+      t2 = Q.createServiceObject(json.$index(0, "breakpoints"), C.List_Breakpoint);
+      t1.set$breakpoints(P.List_List$from(t4._as(t2 == null ? [] : t2), true, type$.legacy_Breakpoint));
+      t1.error = type$.legacy_Error._as(Q.createServiceObject(json.$index(0, "error"), C.List_Error));
+      t1.exceptionPauseMode = H._asStringS(json.$index(0, "exceptionPauseMode"));
+      t1.set$extensionRPCs(json.$index(0, _s13_) == null ? null : P.List_List$from(t4._as(json.$index(0, _s13_)), true, type$.legacy_String));
+      return t1;
+    },
+    IsolateGroupRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.IsolateGroupRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.id = H._asStringS(json.$index(0, "id"));
+      t1.number = H._asStringS(json.$index(0, "number"));
+      t1.name = H._asStringS(json.$index(0, "name"));
+      return t1;
+    },
+    IsolateGroup_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.IsolateGroup(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.id = H._asStringS(json.$index(0, "id"));
+      t1.number = H._asStringS(json.$index(0, "number"));
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t2 = Q.createServiceObject(json.$index(0, "isolates"), C.List_IsolateRef);
+      if (t2 == null)
+        t2 = [];
+      t1.set$isolates(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_IsolateRef));
+      return t1;
+    },
+    InboundReferences_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.InboundReferences(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t2 = Q.createServiceObject(json.$index(0, "references"), C.List_InboundReference);
+      if (t2 == null)
+        t2 = [];
+      t1.set$references(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_InboundReference));
+      return t1;
+    },
+    InboundReference_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.InboundReference();
+      t1.source = type$.legacy_ObjRef._as(Q.createServiceObject(json.$index(0, "source"), C.List_ObjRef));
+      t1.parentListIndex = H._asIntS(json.$index(0, "parentListIndex"));
+      t1.parentField = type$.legacy_FieldRef._as(Q.createServiceObject(json.$index(0, "parentField"), C.List_FieldRef));
+      return t1;
+    },
+    InstanceSet_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.InstanceSet(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.totalCount = H._asIntS(json.$index(0, "totalCount"));
+      t2 = json.$index(0, "instances");
+      t1.set$instances(P.List_List$from(type$.Iterable_dynamic._as(Q.createServiceObject(t2 == null ? json.$index(0, "samples") : t2, C.List_ObjRef)), true, type$.legacy_ObjRef));
+      return t1;
+    },
+    LibraryRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.LibraryRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.uri = H._asStringS(json.$index(0, "uri"));
+      return t1;
+    },
+    Library_parse: function(json) {
+      var t1, t2, t3;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Library(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.uri = H._asStringS(json.$index(0, "uri"));
+      t1.debuggable = H._asBoolS(json.$index(0, "debuggable"));
+      t2 = type$.Iterable_dynamic;
+      t1.set$dependencies(P.List_List$from(t2._as(Q._createSpecificObject(json.$index(0, "dependencies"), Q.vm_service_LibraryDependency_parse$closure())), true, type$.legacy_LibraryDependency));
+      t3 = Q.createServiceObject(json.$index(0, "scripts"), C.List_ScriptRef);
+      t1.set$scripts(P.List_List$from(t2._as(t3 == null ? [] : t3), true, type$.legacy_ScriptRef));
+      t3 = Q.createServiceObject(json.$index(0, "variables"), C.List_FieldRef);
+      t1.set$variables(P.List_List$from(t2._as(t3 == null ? [] : t3), true, type$.legacy_FieldRef));
+      t3 = Q.createServiceObject(json.$index(0, "functions"), C.List_FuncRef);
+      t1.set$functions(P.List_List$from(t2._as(t3 == null ? [] : t3), true, type$.legacy_FuncRef));
+      t3 = Q.createServiceObject(json.$index(0, "classes"), C.List_ClassRef);
+      t1.set$classes(P.List_List$from(t2._as(t3 == null ? [] : t3), true, type$.legacy_ClassRef));
+      return t1;
+    },
+    LibraryDependency_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      if (json == null)
+        t1 = null;
+      else {
+        t1 = new Q.LibraryDependency();
+        t1.isImport = H._asBoolS(json.$index(0, "isImport"));
+        t1.isDeferred = H._asBoolS(json.$index(0, "isDeferred"));
+        t1.prefix = H._asStringS(json.$index(0, "prefix"));
+        t1.target = type$.legacy_LibraryRef._as(Q.createServiceObject(json.$index(0, "target"), C.List_LibraryRef));
+      }
+      return t1;
+    },
+    LogRecord_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.LogRecord(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t2 = type$.legacy_InstanceRef;
+      t1.message = t2._as(Q.createServiceObject(json.$index(0, "message"), C.List_InstanceRef));
+      t1.time = H._asIntS(json.$index(0, "time"));
+      t1.level = H._asIntS(json.$index(0, "level"));
+      t1.sequenceNumber = H._asIntS(json.$index(0, "sequenceNumber"));
+      t1.loggerName = t2._as(Q.createServiceObject(json.$index(0, "loggerName"), C.List_InstanceRef));
+      t1.zone = t2._as(Q.createServiceObject(json.$index(0, "zone"), C.List_InstanceRef));
+      t1.error = t2._as(Q.createServiceObject(json.$index(0, "error"), C.List_InstanceRef));
+      t1.stackTrace = t2._as(Q.createServiceObject(json.$index(0, "stackTrace"), C.List_InstanceRef));
+      return t1;
+    },
+    MapAssociation_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      if (json == null)
+        t1 = null;
+      else {
+        t1 = new Q.MapAssociation();
+        t1.key = Q.createServiceObject(json.$index(0, "key"), C.List_InstanceRef_Sentinel);
+        t1.value = Q.createServiceObject(json.$index(0, "value"), C.List_InstanceRef_Sentinel);
+      }
+      return t1;
+    },
+    MemoryUsage_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.MemoryUsage(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.externalUsage = H._asIntS(json.$index(0, "externalUsage"));
+      t1.heapCapacity = H._asIntS(json.$index(0, "heapCapacity"));
+      t1.heapUsage = H._asIntS(json.$index(0, "heapUsage"));
+      return t1;
+    },
+    Message_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Message(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.index = H._asIntS(json.$index(0, "index"));
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.messageObjectId = H._asStringS(json.$index(0, "messageObjectId"));
+      t1.size = H._asIntS(json.$index(0, "size"));
+      t1.handler = type$.legacy_FuncRef._as(Q.createServiceObject(json.$index(0, "handler"), C.List_FuncRef));
+      t1.location = type$.legacy_SourceLocation._as(Q.createServiceObject(json.$index(0, "location"), C.List_SourceLocation));
+      return t1;
+    },
+    NativeFunction_parse: function(json) {
+      var t1 = new Q.NativeFunction();
+      t1.name = H._asStringS(type$.legacy_Map_of_legacy_String_and_dynamic._as(json).$index(0, "name"));
+      return t1;
+    },
+    NullValRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.NullValRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.InstanceRef$_fromJson$1(json);
+      t1.NullValRef_valueAsString = H._asStringS(json.$index(0, "valueAsString"));
+      return t1;
+    },
+    NullVal_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.NullVal(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.Instance$_fromJson$1(json);
+      t1.NullVal_valueAsString = H._asStringS(json.$index(0, "valueAsString"));
+      return t1;
+    },
+    ObjRef_parse: function(json) {
+      var t1 = Q.ObjRef$_fromJson(type$.legacy_Map_of_legacy_String_and_dynamic._as(json));
+      return t1;
+    },
+    ObjRef$_fromJson: function(json) {
+      var t1 = new Q.ObjRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      return t1;
+    },
+    Obj_parse: function(json) {
+      var t1 = Q.Obj$_fromJson(type$.legacy_Map_of_legacy_String_and_dynamic._as(json));
+      return t1;
+    },
+    Obj$_fromJson: function(json) {
+      var t1 = new Q.Obj(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      return t1;
+    },
+    ProfileFunction_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ProfileFunction();
+      t1.kind = H._asStringS(json.$index(0, "kind"));
+      t1.inclusiveTicks = H._asIntS(json.$index(0, "inclusiveTicks"));
+      t1.exclusiveTicks = H._asIntS(json.$index(0, "exclusiveTicks"));
+      t1.resolvedUrl = H._asStringS(json.$index(0, "resolvedUrl"));
+      t1.$function = Q.createServiceObject(json.$index(0, "function"), C.List_dynamic);
+      return t1;
+    },
+    ReloadReport_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ReloadReport(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.success = H._asBoolS(json.$index(0, "success"));
+      return t1;
+    },
+    RetainingObject_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.RetainingObject();
+      t2 = type$.legacy_ObjRef;
+      t1.value = t2._as(Q.createServiceObject(json.$index(0, "value"), C.List_ObjRef));
+      t1.parentListIndex = H._asIntS(json.$index(0, "parentListIndex"));
+      t1.parentMapKey = t2._as(Q.createServiceObject(json.$index(0, "parentMapKey"), C.List_ObjRef));
+      t1.parentField = H._asStringS(json.$index(0, "parentField"));
+      return t1;
+    },
+    RetainingPath_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.RetainingPath(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.length = H._asIntS(json.$index(0, "length"));
+      t1.gcRootType = H._asStringS(json.$index(0, "gcRootType"));
+      t2 = Q.createServiceObject(json.$index(0, "elements"), C.List_RetainingObject);
+      if (t2 == null)
+        t2 = [];
+      t1.set$elements(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_RetainingObject));
+      return t1;
+    },
+    Response_parse: function(json) {
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      return json == null ? null : Q.Response$_fromJson(json);
+    },
+    Response$_fromJson: function(json) {
+      var t1 = new Q.Response(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      return t1;
+    },
+    Sentinel_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Sentinel(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.kind = H._asStringS(json.$index(0, "kind"));
+      t1.valueAsString = H._asStringS(json.$index(0, "valueAsString"));
+      return t1;
+    },
+    Sentinel$_fromJson: function(json) {
+      var t1 = new Q.Sentinel(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.kind = H._asStringS(json.$index(0, "kind"));
+      t1.valueAsString = H._asStringS(json.$index(0, "valueAsString"));
+      return t1;
+    },
+    ScriptRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ScriptRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.uri = H._asStringS(json.$index(0, "uri"));
+      return t1;
+    },
+    Script_parse: function(json) {
+      var t1 = Q.Script$_fromJson(type$.legacy_Map_of_legacy_String_and_dynamic._as(json));
+      return t1;
+    },
+    Script$_fromJson: function(json) {
+      var t1 = type$.legacy_int;
+      t1 = new Q.Script(P.LinkedHashMap_LinkedHashMap$_empty(t1, t1), P.LinkedHashMap_LinkedHashMap$_empty(t1, t1), json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.Script$_fromJson$1(json);
+      return t1;
+    },
+    ScriptList_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.ScriptList(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t2 = Q.createServiceObject(json.$index(0, "scripts"), C.List_ScriptRef);
+      if (t2 == null)
+        t2 = [];
+      t1.set$scripts(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_ScriptRef));
+      return t1;
+    },
+    SourceLocation_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.SourceLocation(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.script = type$.legacy_ScriptRef._as(Q.createServiceObject(json.$index(0, "script"), C.List_ScriptRef));
+      t1.tokenPos = H._asIntS(json.$index(0, "tokenPos"));
+      t1.endTokenPos = H._asIntS(json.$index(0, "endTokenPos"));
+      return t1;
+    },
+    SourceReport_parse: function(json) {
+      var t1, t2, t3;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.SourceReport(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t2 = type$.Iterable_dynamic;
+      t1.set$ranges(P.List_List$from(t2._as(Q._createSpecificObject(json.$index(0, "ranges"), Q.vm_service_SourceReportRange_parse$closure())), true, type$.legacy_SourceReportRange));
+      t3 = Q.createServiceObject(json.$index(0, "scripts"), C.List_ScriptRef);
+      t1.set$scripts(P.List_List$from(t2._as(t3 == null ? [] : t3), true, type$.legacy_ScriptRef));
+      return t1;
+    },
+    SourceReportCoverage_parse: function(json) {
+      var t1, t2, t3;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      if (json == null)
+        t1 = null;
+      else {
+        t1 = new Q.SourceReportCoverage();
+        t2 = type$.Iterable_dynamic;
+        t3 = type$.legacy_int;
+        t1.set$hits(P.List_List$from(t2._as(json.$index(0, "hits")), true, t3));
+        t1.set$misses(P.List_List$from(t2._as(json.$index(0, "misses")), true, t3));
+      }
+      return t1;
+    },
+    SourceReportRange_parse: function(json) {
+      var t1,
+        _s19_ = "possibleBreakpoints";
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      if (json == null)
+        t1 = null;
+      else {
+        t1 = new Q.SourceReportRange();
+        t1.scriptIndex = H._asIntS(json.$index(0, "scriptIndex"));
+        t1.startPos = H._asIntS(json.$index(0, "startPos"));
+        t1.endPos = H._asIntS(json.$index(0, "endPos"));
+        t1.compiled = H._asBoolS(json.$index(0, "compiled"));
+        t1.error = type$.legacy_ErrorRef._as(Q.createServiceObject(json.$index(0, "error"), C.List_ErrorRef));
+        t1.coverage = type$.legacy_SourceReportCoverage._as(Q._createSpecificObject(json.$index(0, "coverage"), Q.vm_service_SourceReportCoverage_parse$closure()));
+        t1.set$possibleBreakpoints(json.$index(0, _s19_) == null ? null : P.List_List$from(type$.Iterable_dynamic._as(json.$index(0, _s19_)), true, type$.legacy_int));
+      }
+      return t1;
+    },
+    Stack_parse: function(json) {
+      var t1, t2, t3, t4,
+        _s17_ = "asyncCausalFrames",
+        _s13_ = "awaiterFrames";
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Stack(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t2 = Q.createServiceObject(json.$index(0, "frames"), C.List_Frame);
+      if (t2 == null)
+        t2 = [];
+      t3 = type$.Iterable_dynamic;
+      t4 = type$.legacy_Frame;
+      t1.set$frames(P.List_List$from(t3._as(t2), true, t4));
+      t1.set$asyncCausalFrames(json.$index(0, _s17_) == null ? null : P.List_List$from(t3._as(Q.createServiceObject(json.$index(0, _s17_), C.List_Frame)), true, t4));
+      t1.set$awaiterFrames(json.$index(0, _s13_) == null ? null : P.List_List$from(t3._as(Q.createServiceObject(json.$index(0, _s13_), C.List_Frame)), true, t4));
+      t2 = Q.createServiceObject(json.$index(0, "messages"), C.List_Message);
+      t1.set$messages(P.List_List$from(t3._as(t2 == null ? [] : t2), true, type$.legacy_Message));
+      return t1;
+    },
+    Success_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Success(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      return t1;
+    },
+    Timeline_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Timeline(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t2 = Q.createServiceObject(json.$index(0, "traceEvents"), C.List_TimelineEvent);
+      if (t2 == null)
+        t2 = [];
+      t1.set$traceEvents(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_TimelineEvent));
+      t1.timeOriginMicros = H._asIntS(json.$index(0, "timeOriginMicros"));
+      t1.timeExtentMicros = H._asIntS(json.$index(0, "timeExtentMicros"));
+      return t1;
+    },
+    TimelineEvent_parse: function(json) {
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      return new Q.TimelineEvent(json);
+    },
+    TimelineFlags_parse: function(json) {
+      var t1, t2, t3;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.TimelineFlags(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.recorderName = H._asStringS(json.$index(0, "recorderName"));
+      t2 = type$.Iterable_dynamic;
+      t3 = type$.legacy_String;
+      t1.set$availableStreams(P.List_List$from(t2._as(json.$index(0, "availableStreams")), true, t3));
+      t1.set$recordedStreams(P.List_List$from(t2._as(json.$index(0, "recordedStreams")), true, t3));
+      return t1;
+    },
+    Timestamp_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Timestamp(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.timestamp = H._asIntS(json.$index(0, "timestamp"));
+      return t1;
+    },
+    TypeArgumentsRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.TypeArgumentsRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.ObjRef$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      return t1;
+    },
+    TypeArguments_parse: function(json) {
+      var t1, t2;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.TypeArguments(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.Obj$_fromJson$1(json);
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t2 = Q.createServiceObject(json.$index(0, "types"), C.List_InstanceRef);
+      if (t2 == null)
+        t2 = [];
+      t1.set$types(P.List_List$from(type$.Iterable_dynamic._as(t2), true, type$.legacy_InstanceRef));
+      return t1;
+    },
+    UnresolvedSourceLocation_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.UnresolvedSourceLocation(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.script = type$.legacy_ScriptRef._as(Q.createServiceObject(json.$index(0, "script"), C.List_ScriptRef));
+      t1.scriptUri = H._asStringS(json.$index(0, "scriptUri"));
+      t1.tokenPos = H._asIntS(json.$index(0, "tokenPos"));
+      t1.line = H._asIntS(json.$index(0, "line"));
+      t1.column = H._asIntS(json.$index(0, "column"));
+      return t1;
+    },
+    Version_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.Version(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.major = H._asIntS(json.$index(0, "major"));
+      t1.minor = H._asIntS(json.$index(0, "minor"));
+      return t1;
+    },
+    VMRef_parse: function(json) {
+      var t1;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.VMRef(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.name = H._asStringS(json.$index(0, "name"));
+      return t1;
+    },
+    VM_parse: function(json) {
+      var t1, t2, t3;
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(json);
+      t1 = new Q.VM(json);
+      t1.type = H._asStringS(json.$index(0, "type"));
+      t1.name = H._asStringS(json.$index(0, "name"));
+      t1.architectureBits = H._asIntS(json.$index(0, "architectureBits"));
+      t1.hostCPU = H._asStringS(json.$index(0, "hostCPU"));
+      t1.operatingSystem = H._asStringS(json.$index(0, "operatingSystem"));
+      t1.targetCPU = H._asStringS(json.$index(0, "targetCPU"));
+      t1.version = H._asStringS(json.$index(0, "version"));
+      t1.pid = H._asIntS(json.$index(0, "pid"));
+      t1.startTime = H._asIntS(json.$index(0, "startTime"));
+      t2 = Q.createServiceObject(json.$index(0, "isolates"), C.List_IsolateRef);
+      if (t2 == null)
+        t2 = [];
+      t3 = type$.Iterable_dynamic;
+      t1.set$isolates(P.List_List$from(t3._as(t2), true, type$.legacy_IsolateRef));
+      t2 = Q.createServiceObject(json.$index(0, "isolateGroups"), C.List_IsolateGroupRef);
+      t1.set$isolateGroups(P.List_List$from(t3._as(t2 == null ? [] : t2), true, type$.legacy_IsolateGroupRef));
+      return t1;
+    },
+    createServiceObject_closure: function createServiceObject_closure(t0) {
+      this.expectedTypes = t0;
+    },
+    _createSpecificObject_closure: function _createSpecificObject_closure(t0) {
+      this.creator = t0;
+    },
+    VmService: function VmService(t0, t1, t2, t3, t4, t5, t6) {
+      var _ = this;
+      _._writeMessage = null;
+      _._id = 0;
+      _._completers = t0;
+      _._methodCalls = t1;
+      _._services = t2;
+      _._log = null;
+      _._onSend = t3;
+      _._onReceive = t4;
+      _._onDoneCompleter = t5;
+      _._eventControllers = t6;
+    },
+    VmService_closure: function VmService_closure(t0) {
+      this.$this = t0;
+    },
+    RPCError: function RPCError(t0, t1, t2, t3) {
+      var _ = this;
+      _.callingMethod = t0;
+      _.code = t1;
+      _.message = t2;
+      _.data = t3;
+    },
+    SentinelException: function SentinelException(t0, t1) {
+      this.callingMethod = t0;
+      this.sentinel = t1;
+    },
+    ExtensionData: function ExtensionData(t0) {
+      this.data = t0;
+    },
+    _NullLog: function _NullLog() {
+    },
+    AllocationProfile: function AllocationProfile(t0) {
+      var _ = this;
+      _.dateLastServiceGC = _.dateLastAccumulatorReset = _.memoryUsage = _.members = null;
+      _.json = t0;
+      _.type = null;
+    },
+    AllocationProfile_toJson_closure: function AllocationProfile_toJson_closure() {
+    },
+    BoundField: function BoundField() {
+      this.value = this.decl = null;
+    },
+    BoundVariable: function BoundVariable(t0) {
+      var _ = this;
+      _.scopeEndTokenPos = _.scopeStartTokenPos = _.declarationTokenPos = _.value = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Breakpoint: function Breakpoint(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = _.location = _.isSyntheticAsyncContinuation = _.resolved = _.breakpointNumber = null;
+      _.json = t0;
+      _.type = null;
+    },
+    ClassRef: function ClassRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Class: function Class(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = _.subclasses = _.functions = _.fields = _.mixin = _.interfaces = _.superType = _.superClass = _.location = _.library = _.isConst = _.isAbstract = _.error = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Class_toJson_closure: function Class_toJson_closure() {
+    },
+    Class_toJson_closure0: function Class_toJson_closure0() {
+    },
+    Class_toJson_closure1: function Class_toJson_closure1() {
+    },
+    Class_toJson_closure2: function Class_toJson_closure2() {
+    },
+    ClassHeapStats: function ClassHeapStats(t0) {
+      var _ = this;
+      _.instancesCurrent = _.instancesAccumulated = _.bytesCurrent = _.accumulatedSize = _.classRef = null;
+      _.json = t0;
+      _.type = null;
+    },
+    ClassList: function ClassList(t0) {
+      this.classes = null;
+      this.json = t0;
+      this.type = null;
+    },
+    ClassList_toJson_closure: function ClassList_toJson_closure() {
+    },
+    ClientName: function ClientName(t0) {
+      this.name = null;
+      this.json = t0;
+      this.type = null;
+    },
+    CodeRef: function CodeRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.kind = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Code: function Code(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.kind = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    ContextRef: function ContextRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.length = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Context: function Context(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = _.variables = _.parent = _.length = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Context_toJson_closure: function Context_toJson_closure() {
+    },
+    ContextElement: function ContextElement() {
+      this.value = null;
+    },
+    CpuSamples: function CpuSamples(t0) {
+      var _ = this;
+      _.samples = _.functions = _.pid = _.timeExtentMicros = _.timeOriginMicros = _.timeSpan = _.sampleCount = _.maxStackDepth = _.samplePeriod = null;
+      _.json = t0;
+      _.type = null;
+    },
+    CpuSamples_toJson_closure: function CpuSamples_toJson_closure() {
+    },
+    CpuSamples_toJson_closure0: function CpuSamples_toJson_closure0() {
+    },
+    CpuSample: function CpuSample() {
+      var _ = this;
+      _.stack = _.truncated = _.userTag = _.vmTag = _.timestamp = _.tid = null;
+    },
+    CpuSample_toJson_closure: function CpuSample_toJson_closure() {
+    },
+    ErrorRef: function ErrorRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.message = _.kind = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Error: function Error(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = _.stacktrace = _.exception = _.message = _.kind = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Event: function Event(t0) {
+      var _ = this;
+      _.data = _.last = _.newValue = _.flag = _.alias = _.method = _.service = _.logRecord = _.status = _.atAsyncSuspension = _.updatedStreams = _.timelineEvents = _.extensionData = _.extensionKind = _.extensionRPC = _.inspectee = _.bytes = _.exception = _.topFrame = _.pauseBreakpoints = _.breakpoint = _.timestamp = _.vm = _.isolate = _.kind = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Event_toJson_closure: function Event_toJson_closure() {
+    },
+    Event_toJson_closure0: function Event_toJson_closure0() {
+    },
+    Event_toJson_closure1: function Event_toJson_closure1() {
+    },
+    FieldRef: function FieldRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.isStatic = _.isFinal = _.isConst = _.declaredType = _.owner = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Field: function Field(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = _.location = _.staticValue = _.isStatic = _.isFinal = _.isConst = _.declaredType = _.owner = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Flag: function Flag() {
+      var _ = this;
+      _.valueAsString = _.modified = _.comment = _.name = null;
+    },
+    FlagList: function FlagList(t0) {
+      this.flags = null;
+      this.json = t0;
+      this.type = null;
+    },
+    FlagList_toJson_closure: function FlagList_toJson_closure() {
+    },
+    Frame: function Frame(t0) {
+      var _ = this;
+      _.kind = _.vars = _.location = _.code = _.$function = _.index = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Frame_toJson_closure: function Frame_toJson_closure() {
+    },
+    FuncRef: function FuncRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.isConst = _.isStatic = _.owner = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Func: function Func(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = _.code = _.location = _.isConst = _.isStatic = _.owner = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    InstanceRef: function InstanceRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.closureContext = _.closureFunction = _.pattern = _.parameterizedClass = _.typeClass = _.name = _.length = _.valueAsStringIsTruncated = _.valueAsString = _.classRef = _.kind = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Instance: function Instance(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = _.bound = _.targetType = _.parameterIndex = _.typeArguments = _.propertyValue = _.propertyKey = _.isMultiLine = _.isCaseSensitive = _.closureContext = _.closureFunction = _.pattern = _.mirrorReferent = _.bytes = _.associations = _.elements = _.fields = _.parameterizedClass = _.typeClass = _.name = _.count = _.offset = _.length = _.valueAsStringIsTruncated = _.valueAsString = _.Instance_classRef = _.kind = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Instance_toJson_closure: function Instance_toJson_closure() {
+    },
+    Instance_toJson_closure0: function Instance_toJson_closure0() {
+    },
+    Instance_toJson_closure1: function Instance_toJson_closure1() {
+    },
+    IsolateRef: function IsolateRef(t0) {
+      var _ = this;
+      _.name = _.number = _.id = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Isolate: function Isolate(t0) {
+      var _ = this;
+      _.extensionRPCs = _.exceptionPauseMode = _.error = _.breakpoints = _.libraries = _.rootLib = _.pauseEvent = _.pauseOnExit = _.livePorts = _.runnable = _.startTime = _.name = _.number = _.id = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Isolate_toJson_closure: function Isolate_toJson_closure() {
+    },
+    Isolate_toJson_closure0: function Isolate_toJson_closure0() {
+    },
+    Isolate_toJson_closure1: function Isolate_toJson_closure1() {
+    },
+    IsolateGroupRef: function IsolateGroupRef(t0) {
+      var _ = this;
+      _.name = _.number = _.id = null;
+      _.json = t0;
+      _.type = null;
+    },
+    IsolateGroup: function IsolateGroup(t0) {
+      var _ = this;
+      _.isolates = _.name = _.number = _.id = null;
+      _.json = t0;
+      _.type = null;
+    },
+    IsolateGroup_toJson_closure: function IsolateGroup_toJson_closure() {
+    },
+    InboundReferences: function InboundReferences(t0) {
+      this.references = null;
+      this.json = t0;
+      this.type = null;
+    },
+    InboundReferences_toJson_closure: function InboundReferences_toJson_closure() {
+    },
+    InboundReference: function InboundReference() {
+      this.parentField = this.parentListIndex = this.source = null;
+    },
+    InstanceSet: function InstanceSet(t0) {
+      var _ = this;
+      _.instances = _.totalCount = null;
+      _.json = t0;
+      _.type = null;
+    },
+    InstanceSet_toJson_closure: function InstanceSet_toJson_closure() {
+    },
+    LibraryRef: function LibraryRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.uri = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Library: function Library(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = _.classes = _.functions = _.variables = _.scripts = _.dependencies = _.debuggable = _.uri = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Library_toJson_closure: function Library_toJson_closure() {
+    },
+    Library_toJson_closure0: function Library_toJson_closure0() {
+    },
+    Library_toJson_closure1: function Library_toJson_closure1() {
+    },
+    Library_toJson_closure2: function Library_toJson_closure2() {
+    },
+    Library_toJson_closure3: function Library_toJson_closure3() {
+    },
+    LibraryDependency: function LibraryDependency() {
+      var _ = this;
+      _.target = _.prefix = _.isDeferred = _.isImport = null;
+    },
+    LogRecord: function LogRecord(t0) {
+      var _ = this;
+      _.stackTrace = _.error = _.zone = _.loggerName = _.sequenceNumber = _.level = _.time = _.message = null;
+      _.json = t0;
+      _.type = null;
+    },
+    MapAssociation: function MapAssociation() {
+      this.value = this.key = null;
+    },
+    MemoryUsage: function MemoryUsage(t0) {
+      var _ = this;
+      _.heapUsage = _.heapCapacity = _.externalUsage = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Message: function Message(t0) {
+      var _ = this;
+      _.location = _.handler = _.size = _.messageObjectId = _.name = _.index = null;
+      _.json = t0;
+      _.type = null;
+    },
+    NativeFunction: function NativeFunction() {
+      this.name = null;
+    },
+    NullValRef: function NullValRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.closureContext = _.closureFunction = _.pattern = _.parameterizedClass = _.typeClass = _.name = _.length = _.valueAsStringIsTruncated = _.valueAsString = _.classRef = _.kind = _.NullValRef_valueAsString = null;
+      _.json = t0;
+      _.type = null;
+    },
+    NullVal: function NullVal(t0) {
+      var _ = this;
+      _.classRef = _.fixedId = _.id = _.bound = _.targetType = _.parameterIndex = _.typeArguments = _.propertyValue = _.propertyKey = _.isMultiLine = _.isCaseSensitive = _.closureContext = _.closureFunction = _.pattern = _.mirrorReferent = _.bytes = _.associations = _.elements = _.fields = _.parameterizedClass = _.typeClass = _.name = _.count = _.offset = _.length = _.valueAsStringIsTruncated = _.valueAsString = _.Instance_classRef = _.kind = _.NullVal_valueAsString = null;
+      _.size = null;
+      _.json = t0;
+      _.type = null;
+    },
+    ObjRef: function ObjRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Obj: function Obj(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = null;
+      _.json = t0;
+      _.type = null;
+    },
+    ProfileFunction: function ProfileFunction() {
+      var _ = this;
+      _.$function = _.resolvedUrl = _.exclusiveTicks = _.inclusiveTicks = _.kind = null;
+    },
+    ReloadReport: function ReloadReport(t0) {
+      this.success = null;
+      this.json = t0;
+      this.type = null;
+    },
+    RetainingObject: function RetainingObject() {
+      var _ = this;
+      _.parentField = _.parentMapKey = _.parentListIndex = _.value = null;
+    },
+    RetainingPath: function RetainingPath(t0) {
+      var _ = this;
+      _.elements = _.gcRootType = _.length = null;
+      _.json = t0;
+      _.type = null;
+    },
+    RetainingPath_toJson_closure: function RetainingPath_toJson_closure() {
+    },
+    Response: function Response(t0) {
+      this.json = t0;
+      this.type = null;
+    },
+    Sentinel: function Sentinel(t0) {
+      var _ = this;
+      _.valueAsString = _.kind = null;
+      _.json = t0;
+      _.type = null;
+    },
+    ScriptRef: function ScriptRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.uri = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Script: function Script(t0, t1, t2) {
+      var _ = this;
+      _._tokenToLine = t0;
+      _._tokenToColumn = t1;
+      _.size = _.classRef = _.fixedId = _.id = _.tokenPosTable = _.source = _.columnOffset = _.lineOffset = _.library = _.uri = null;
+      _.json = t2;
+      _.type = null;
+    },
+    Script$_fromJson_closure: function Script$_fromJson_closure() {
+    },
+    Script_toJson_closure: function Script_toJson_closure() {
+    },
+    ScriptList: function ScriptList(t0) {
+      this.scripts = null;
+      this.json = t0;
+      this.type = null;
+    },
+    ScriptList_toJson_closure: function ScriptList_toJson_closure() {
+    },
+    SourceLocation: function SourceLocation(t0) {
+      var _ = this;
+      _.endTokenPos = _.tokenPos = _.script = null;
+      _.json = t0;
+      _.type = null;
+    },
+    SourceReport: function SourceReport(t0) {
+      var _ = this;
+      _.scripts = _.ranges = null;
+      _.json = t0;
+      _.type = null;
+    },
+    SourceReport_toJson_closure: function SourceReport_toJson_closure() {
+    },
+    SourceReport_toJson_closure0: function SourceReport_toJson_closure0() {
+    },
+    SourceReportCoverage: function SourceReportCoverage() {
+      this.misses = this.hits = null;
+    },
+    SourceReportCoverage_toJson_closure: function SourceReportCoverage_toJson_closure() {
+    },
+    SourceReportCoverage_toJson_closure0: function SourceReportCoverage_toJson_closure0() {
+    },
+    SourceReportRange: function SourceReportRange() {
+      var _ = this;
+      _.possibleBreakpoints = _.coverage = _.error = _.compiled = _.endPos = _.startPos = _.scriptIndex = null;
+    },
+    SourceReportRange_toJson_closure: function SourceReportRange_toJson_closure() {
+    },
+    Stack: function Stack(t0) {
+      var _ = this;
+      _.messages = _.awaiterFrames = _.asyncCausalFrames = _.frames = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Stack_toJson_closure: function Stack_toJson_closure() {
+    },
+    Stack_toJson_closure0: function Stack_toJson_closure0() {
+    },
+    Stack_toJson_closure1: function Stack_toJson_closure1() {
+    },
+    Stack_toJson_closure2: function Stack_toJson_closure2() {
+    },
+    Success: function Success(t0) {
+      this.json = t0;
+      this.type = null;
+    },
+    Timeline: function Timeline(t0) {
+      var _ = this;
+      _.timeExtentMicros = _.timeOriginMicros = _.traceEvents = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Timeline_toJson_closure: function Timeline_toJson_closure() {
+    },
+    TimelineEvent: function TimelineEvent(t0) {
+      this.json = t0;
+    },
+    TimelineFlags: function TimelineFlags(t0) {
+      var _ = this;
+      _.recordedStreams = _.availableStreams = _.recorderName = null;
+      _.json = t0;
+      _.type = null;
+    },
+    TimelineFlags_toJson_closure: function TimelineFlags_toJson_closure() {
+    },
+    TimelineFlags_toJson_closure0: function TimelineFlags_toJson_closure0() {
+    },
+    Timestamp: function Timestamp(t0) {
+      this.timestamp = null;
+      this.json = t0;
+      this.type = null;
+    },
+    TypeArgumentsRef: function TypeArgumentsRef(t0) {
+      var _ = this;
+      _.fixedId = _.id = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    TypeArguments: function TypeArguments(t0) {
+      var _ = this;
+      _.size = _.classRef = _.fixedId = _.id = _.types = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    TypeArguments_toJson_closure: function TypeArguments_toJson_closure() {
+    },
+    UnresolvedSourceLocation: function UnresolvedSourceLocation(t0) {
+      var _ = this;
+      _.column = _.line = _.tokenPos = _.scriptUri = _.script = null;
+      _.json = t0;
+      _.type = null;
+    },
+    Version: function Version(t0) {
+      var _ = this;
+      _.minor = _.major = null;
+      _.json = t0;
+      _.type = null;
+    },
+    VMRef: function VMRef(t0) {
+      this.name = null;
+      this.json = t0;
+      this.type = null;
+    },
+    VM: function VM(t0) {
+      var _ = this;
+      _.isolateGroups = _.isolates = _.startTime = _.pid = _.version = _.targetCPU = _.operatingSystem = _.hostCPU = _.architectureBits = _.name = null;
+      _.json = t0;
+      _.type = null;
+    },
+    VM_toJson_closure: function VM_toJson_closure() {
+    },
+    VM_toJson_closure0: function VM_toJson_closure0() {
+    }
+  },
+  N = {HexCodec: function HexCodec() {
+    }},
+  R = {
+    _convert: function(bytes, start, end) {
+      var t1, t2, i, bufferIndex, byteOr, byte, bufferIndex0, t3,
+        buffer = new Uint8Array((end - start) * 2);
+      for (t1 = buffer.length, t2 = bytes.length, i = start, bufferIndex = 0, byteOr = 0; i < end; ++i) {
+        if (i >= t2)
+          return H.ioore(bytes, i);
+        byte = bytes[i];
+        if (typeof byte !== "number")
+          return H.iae(byte);
+        byteOr = (byteOr | byte) >>> 0;
+        bufferIndex0 = bufferIndex + 1;
+        t3 = (byte & 240) >>> 4;
+        t3 = t3 < 10 ? t3 + 48 : t3 + 97 - 10;
+        if (bufferIndex >= t1)
+          return H.ioore(buffer, bufferIndex);
+        buffer[bufferIndex] = t3;
+        bufferIndex = bufferIndex0 + 1;
+        t3 = byte & 15;
+        t3 = t3 < 10 ? t3 + 48 : t3 + 97 - 10;
+        if (bufferIndex0 >= t1)
+          return H.ioore(buffer, bufferIndex0);
+        buffer[bufferIndex0] = t3;
+      }
+      if (byteOr >= 0 && byteOr <= 255)
+        return P.String_String$fromCharCodes(buffer, 0, null);
+      for (i = start; i < end; ++i) {
+        if (i >= t2)
+          return H.ioore(bytes, i);
+        byte = bytes[i];
+        if (typeof byte !== "number")
+          return byte.$ge();
+        if (byte >= 0 && byte <= 255)
+          continue;
+        throw H.wrapException(P.FormatException$("Invalid byte " + (byte < 0 ? "-" : "") + "0x" + C.JSInt_methods.toRadixString$1(Math.abs(byte), 16) + ".", bytes, i));
+      }
+      throw H.wrapException("unreachable");
+    },
+    HexEncoder: function HexEncoder() {
+    },
+    StreamChannelMixin: function StreamChannelMixin() {
+    }
+  },
+  Y = {Level: function Level(t0, t1) {
+      this.name = t0;
+      this.value = t1;
+    }},
+  L = {LogRecord0: function LogRecord0(t0, t1, t2) {
+      this.level = t0;
+      this.message = t1;
+      this.loggerName = t2;
+    }},
+  M = {
+    SseClient$: function(serverUrl) {
+      var t1 = type$.legacy_String;
+      t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), F.Logger_Logger("SseClient"), P.StreamController_StreamController(type$.dynamic));
+      t1.SseClient$1(serverUrl);
+      return t1;
+    },
+    SseClient: function SseClient(t0, t1, t2, t3) {
+      var _ = this;
+      _._incomingController = t0;
+      _._outgoingController = t1;
+      _._logger = t2;
+      _._errorTimer = _._serverUrl = _._eventSource = null;
+      _._messages = t3;
+    },
+    SseClient_closure: function SseClient_closure(t0) {
+      this.$this = t0;
+    },
+    SseClient_closure0: function SseClient_closure0(t0) {
+      this.$this = t0;
+    },
+    SseClient__closure: function SseClient__closure(t0, t1) {
+      this.$this = t0;
+      this.error = t1;
+    }
+  },
+  K = {
+    Uuid$: function() {
+      var options, t2, t1 = {};
+      t1.options = options;
+      t1.options = null;
+      t2 = new K.Uuid();
+      t2.Uuid$1$options(t1);
+      return t2;
+    },
+    Uuid: function Uuid() {
+      var _ = this;
+      _._clockSeq = _._nodeId = _._seedBytes = null;
+      _._lastNSecs = _._lastMSecs = 0;
+      _._hexToByte = _._byteToHex = null;
+    }
+  },
+  T = {
+    UuidUtil_mathRNG: function() {
+      var b, rand, i,
+        t1 = new Array(16);
+      t1.fixed$length = Array;
+      b = H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_int);
+      for (rand = null, i = 0; i < 16; ++i) {
+        t1 = i & 3;
+        if (t1 === 0)
+          rand = C.JSInt_methods.toInt$0(C.JSNumber_methods.floor$0(C.C__JSRandom.nextDouble$0() * 4294967296));
+        if (typeof rand !== "number")
+          return rand.$shr();
+        C.JSArray_methods.$indexSet(b, i, C.JSInt_methods._shrOtherPositive$1(rand, t1 << 3) & 255);
+      }
+      return b;
+    }
+  };
+  var holders = [C, H, J, P, W, V, E, F, G, Q, N, R, Y, L, M, K, T];
+  hunkHelpers.setFunctionNamesIfNecessary(holders);
+  var $ = {};
+  H.JS_CONST.prototype = {};
+  J.Interceptor.prototype = {
+    $eq: function(receiver, other) {
+      return receiver === other;
+    },
+    get$hashCode: function(receiver) {
+      return H.Primitives_objectHashCode(receiver);
+    },
+    toString$0: function(receiver) {
+      return "Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'";
+    },
+    noSuchMethod$1: function(receiver, invocation) {
+      type$.Invocation._as(invocation);
+      throw H.wrapException(P.NoSuchMethodError$(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments()));
+    },
+    get$runtimeType: function(receiver) {
+      return H.getRuntimeType(receiver);
+    }
+  };
+  J.JSBool.prototype = {
+    toString$0: function(receiver) {
+      return String(receiver);
+    },
+    $and: function(receiver, other) {
+      return H.checkBool(H._asBoolS(other)) && receiver;
+    },
+    $or: function(receiver, other) {
+      return H.checkBool(H._asBoolS(other)) || receiver;
+    },
+    get$hashCode: function(receiver) {
+      return receiver ? 519018 : 218159;
+    },
+    get$runtimeType: function(receiver) {
+      return C.Type_bool_lhE;
+    },
+    $isbool: 1
+  };
+  J.JSNull.prototype = {
+    $eq: function(receiver, other) {
+      return null == other;
+    },
+    toString$0: function(receiver) {
+      return "null";
+    },
+    get$hashCode: function(receiver) {
+      return 0;
+    },
+    get$runtimeType: function(receiver) {
+      return C.Type_Null_Yyn;
+    },
+    noSuchMethod$1: function(receiver, invocation) {
+      return this.super$Interceptor$noSuchMethod(receiver, type$.Invocation._as(invocation));
+    },
+    $isNull: 1
+  };
+  J.JSObject.prototype = {};
+  J.JavaScriptObject.prototype = {
+    get$hashCode: function(receiver) {
+      return 0;
+    },
+    get$runtimeType: function(receiver) {
+      return C.Type_JSObject_8k0;
+    },
+    toString$0: function(receiver) {
+      return String(receiver);
+    }
+  };
+  J.PlainJavaScriptObject.prototype = {};
+  J.UnknownJavaScriptObject.prototype = {};
+  J.JavaScriptFunction.prototype = {
+    toString$0: function(receiver) {
+      var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()];
+      if (dartClosure == null)
+        return this.super$JavaScriptObject$toString(receiver);
+      return "JavaScript function for " + H.S(J.toString$0$(dartClosure));
+    },
+    $signature: function() {
+      return {func: 1, opt: [,,,,,,,,,,,,,,,,]};
+    },
+    $isFunction: 1
+  };
+  J.JSArray.prototype = {
+    add$1: function(receiver, value) {
+      H._arrayInstanceType(receiver)._precomputed1._as(value);
+      if (!!receiver.fixed$length)
+        H.throwExpression(P.UnsupportedError$("add"));
+      receiver.push(value);
+    },
+    addAll$1: function(receiver, collection) {
+      var t1, _i;
+      H._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(collection);
+      if (!!receiver.fixed$length)
+        H.throwExpression(P.UnsupportedError$("addAll"));
+      for (t1 = collection.length, _i = 0; _i < collection.length; collection.length === t1 || (0, H.throwConcurrentModificationError)(collection), ++_i)
+        receiver.push(collection[_i]);
+    },
+    map$1$1: function(receiver, f, $T) {
+      var t1 = H._arrayInstanceType(receiver);
+      return new H.MappedListIterable(receiver, t1._bind$1($T)._eval$1("1(2)")._as(f), t1._eval$1("@<1>")._bind$1($T)._eval$1("MappedListIterable<1,2>"));
+    },
+    map$1: function($receiver, f) {
+      return this.map$1$1($receiver, f, type$.dynamic);
+    },
+    elementAt$1: function(receiver, index) {
+      if (index < 0 || index >= receiver.length)
+        return H.ioore(receiver, index);
+      return receiver[index];
+    },
+    get$first: function(receiver) {
+      if (receiver.length > 0)
+        return receiver[0];
+      throw H.wrapException(H.IterableElementError_noElement());
+    },
+    setRange$4: function(receiver, start, end, iterable, skipCount) {
+      var $length, otherList, t1, i;
+      H._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(iterable);
+      if (!!receiver.immutable$list)
+        H.throwExpression(P.UnsupportedError$("setRange"));
+      P.RangeError_checkValidRange(start, end, receiver.length);
+      $length = end - start;
+      if ($length === 0)
+        return;
+      P.RangeError_checkNotNegative(skipCount, "skipCount");
+      otherList = iterable;
+      t1 = J.getInterceptor$asx(otherList);
+      if (skipCount + $length > t1.get$length(otherList))
+        throw H.wrapException(H.IterableElementError_tooFew());
+      if (skipCount < start)
+        for (i = $length - 1; i >= 0; --i)
+          receiver[start + i] = t1.$index(otherList, skipCount + i);
+      else
+        for (i = 0; i < $length; ++i)
+          receiver[start + i] = t1.$index(otherList, skipCount + i);
+    },
+    contains$1: function(receiver, other) {
+      var i;
+      for (i = 0; i < receiver.length; ++i)
+        if (J.$eq$(receiver[i], other))
+          return true;
+      return false;
+    },
+    get$isNotEmpty: function(receiver) {
+      return receiver.length !== 0;
+    },
+    toString$0: function(receiver) {
+      return P.IterableBase_iterableToFullString(receiver, "[", "]");
+    },
+    toList$1$growable: function(receiver, growable) {
+      var t1 = H.setRuntimeTypeInfo(receiver.slice(0), H._arrayInstanceType(receiver));
+      return t1;
+    },
+    toList$0: function($receiver) {
+      return this.toList$1$growable($receiver, true);
+    },
+    get$iterator: function(receiver) {
+      return new J.ArrayIterator(receiver, receiver.length, H._arrayInstanceType(receiver)._eval$1("ArrayIterator<1>"));
+    },
+    get$hashCode: function(receiver) {
+      return H.Primitives_objectHashCode(receiver);
+    },
+    get$length: function(receiver) {
+      return receiver.length;
+    },
+    set$length: function(receiver, newLength) {
+      if (!!receiver.fixed$length)
+        H.throwExpression(P.UnsupportedError$("set length"));
+      receiver.length = newLength;
+    },
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      if (!H._isInt(index))
+        throw H.wrapException(H.diagnoseIndexError(receiver, index));
+      if (index >= receiver.length || index < 0)
+        throw H.wrapException(H.diagnoseIndexError(receiver, index));
+      return receiver[index];
+    },
+    $indexSet: function(receiver, index, value) {
+      H._asIntS(index);
+      H._arrayInstanceType(receiver)._precomputed1._as(value);
+      if (!!receiver.immutable$list)
+        H.throwExpression(P.UnsupportedError$("indexed set"));
+      if (!H._isInt(index))
+        throw H.wrapException(H.diagnoseIndexError(receiver, index));
+      if (index >= receiver.length || index < 0)
+        throw H.wrapException(H.diagnoseIndexError(receiver, index));
+      receiver[index] = value;
+    },
+    $add: function(receiver, other) {
+      var t2, _i,
+        t1 = H._arrayInstanceType(receiver);
+      t1._eval$1("List<1>")._as(other);
+      t1 = H.setRuntimeTypeInfo([], t1);
+      for (t2 = receiver.length, _i = 0; _i < receiver.length; receiver.length === t2 || (0, H.throwConcurrentModificationError)(receiver), ++_i)
+        this.add$1(t1, receiver[_i]);
+      for (t2 = other.get$iterator(other); t2.moveNext$0();)
+        this.add$1(t1, t2.get$current());
+      return t1;
+    },
+    $isJSIndexable: 1,
+    $isEfficientLengthIterable: 1,
+    $isIterable: 1,
+    $isList: 1
+  };
+  J.JSUnmodifiableArray.prototype = {};
+  J.ArrayIterator.prototype = {
+    get$current: function() {
+      return this.__interceptors$_current;
+    },
+    moveNext$0: function() {
+      var t2, _this = this,
+        t1 = _this.__interceptors$_iterable,
+        $length = t1.length;
+      if (_this.__interceptors$_length !== $length)
+        throw H.wrapException(H.throwConcurrentModificationError(t1));
+      t2 = _this.__interceptors$_index;
+      if (t2 >= $length) {
+        _this.set$__interceptors$_current(null);
+        return false;
+      }
+      _this.set$__interceptors$_current(t1[t2]);
+      ++_this.__interceptors$_index;
+      return true;
+    },
+    set$__interceptors$_current: function(_current) {
+      this.__interceptors$_current = this.$ti._eval$1("1?")._as(_current);
+    },
+    $isIterator: 1
+  };
+  J.JSNumber.prototype = {
+    toInt$0: function(receiver) {
+      var t1;
+      if (receiver >= -2147483648 && receiver <= 2147483647)
+        return receiver | 0;
+      if (isFinite(receiver)) {
+        t1 = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver);
+        return t1 + 0;
+      }
+      throw H.wrapException(P.UnsupportedError$("" + receiver + ".toInt()"));
+    },
+    floor$0: function(receiver) {
+      var truncated, d;
+      if (receiver >= 0) {
+        if (receiver <= 2147483647)
+          return receiver | 0;
+      } else if (receiver >= -2147483648) {
+        truncated = receiver | 0;
+        return receiver === truncated ? truncated : truncated - 1;
+      }
+      d = Math.floor(receiver);
+      if (isFinite(d))
+        return d;
+      throw H.wrapException(P.UnsupportedError$("" + receiver + ".floor()"));
+    },
+    toRadixString$1: function(receiver, radix) {
+      var result, match, t1, exponent;
+      if (radix < 2 || radix > 36)
+        throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", null));
+      result = receiver.toString(radix);
+      if (C.JSString_methods.codeUnitAt$1(result, result.length - 1) !== 41)
+        return result;
+      match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result);
+      if (match == null)
+        H.throwExpression(P.UnsupportedError$("Unexpected toString result: " + result));
+      t1 = match.length;
+      if (1 >= t1)
+        return H.ioore(match, 1);
+      result = match[1];
+      if (3 >= t1)
+        return H.ioore(match, 3);
+      exponent = +match[3];
+      t1 = match[2];
+      if (t1 != null) {
+        result += t1;
+        exponent -= t1.length;
+      }
+      return result + C.JSString_methods.$mul("0", exponent);
+    },
+    toString$0: function(receiver) {
+      if (receiver === 0 && 1 / receiver < 0)
+        return "-0.0";
+      else
+        return "" + receiver;
+    },
+    get$hashCode: function(receiver) {
+      var absolute, floorLog2, factor, scaled,
+        intValue = receiver | 0;
+      if (receiver === intValue)
+        return 536870911 & intValue;
+      absolute = Math.abs(receiver);
+      floorLog2 = Math.log(absolute) / 0.6931471805599453 | 0;
+      factor = Math.pow(2, floorLog2);
+      scaled = absolute < 1 ? absolute / factor : factor / absolute;
+      return 536870911 & ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259;
+    },
+    $add: function(receiver, other) {
+      H._asNumS(other);
+      return receiver + other;
+    },
+    $sub: function(receiver, other) {
+      return receiver - other;
+    },
+    $div: function(receiver, other) {
+      return receiver / other;
+    },
+    $mod: function(receiver, other) {
+      var result = receiver % other;
+      if (result === 0)
+        return 0;
+      if (result > 0)
+        return result;
+      if (other < 0)
+        return result - other;
+      else
+        return result + other;
+    },
+    _tdivFast$1: function(receiver, other) {
+      return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other);
+    },
+    _tdivSlow$1: function(receiver, other) {
+      var quotient = receiver / other;
+      if (quotient >= -2147483648 && quotient <= 2147483647)
+        return quotient | 0;
+      if (quotient > 0) {
+        if (quotient !== 1 / 0)
+          return Math.floor(quotient);
+      } else if (quotient > -1 / 0)
+        return Math.ceil(quotient);
+      throw H.wrapException(P.UnsupportedError$("Result of truncating division is " + H.S(quotient) + ": " + H.S(receiver) + " ~/ " + other));
+    },
+    $shl: function(receiver, other) {
+      if (other < 0)
+        throw H.wrapException(H.argumentErrorValue(other));
+      return other > 31 ? 0 : receiver << other >>> 0;
+    },
+    $shr: function(receiver, other) {
+      var t1;
+      if (other < 0)
+        throw H.wrapException(H.argumentErrorValue(other));
+      if (receiver > 0)
+        t1 = this._shrBothPositive$1(receiver, other);
+      else {
+        t1 = other > 31 ? 31 : other;
+        t1 = receiver >> t1 >>> 0;
+      }
+      return t1;
+    },
+    _shrOtherPositive$1: function(receiver, other) {
+      var t1;
+      if (receiver > 0)
+        t1 = this._shrBothPositive$1(receiver, other);
+      else {
+        t1 = other > 31 ? 31 : other;
+        t1 = receiver >> t1 >>> 0;
+      }
+      return t1;
+    },
+    _shrBothPositive$1: function(receiver, other) {
+      return other > 31 ? 0 : receiver >>> other;
+    },
+    $and: function(receiver, other) {
+      return (receiver & other) >>> 0;
+    },
+    $or: function(receiver, other) {
+      H._asNumS(other);
+      if (typeof other != "number")
+        throw H.wrapException(H.argumentErrorValue(other));
+      return (receiver | other) >>> 0;
+    },
+    $lt: function(receiver, other) {
+      return receiver < other;
+    },
+    $gt: function(receiver, other) {
+      return receiver > other;
+    },
+    $ge: function(receiver, other) {
+      if (typeof other != "number")
+        throw H.wrapException(H.argumentErrorValue(other));
+      return receiver >= other;
+    },
+    get$runtimeType: function(receiver) {
+      return C.Type_num_cv7;
+    },
+    $isdouble: 1,
+    $isnum: 1
+  };
+  J.JSInt.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_int_tHn;
+    },
+    $isint: 1
+  };
+  J.JSDouble.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_double_K1J;
+    }
+  };
+  J.JSString.prototype = {
+    codeUnitAt$1: function(receiver, index) {
+      if (index < 0)
+        throw H.wrapException(H.diagnoseIndexError(receiver, index));
+      if (index >= receiver.length)
+        H.throwExpression(H.diagnoseIndexError(receiver, index));
+      return receiver.charCodeAt(index);
+    },
+    _codeUnitAt$1: function(receiver, index) {
+      if (index >= receiver.length)
+        throw H.wrapException(H.diagnoseIndexError(receiver, index));
+      return receiver.charCodeAt(index);
+    },
+    $add: function(receiver, other) {
+      H._asStringS(other);
+      if (typeof other != "string")
+        throw H.wrapException(P.ArgumentError$value(other, null, null));
+      return receiver + other;
+    },
+    startsWith$1: function(receiver, pattern) {
+      var otherLength = pattern.length;
+      if (otherLength > receiver.length)
+        return false;
+      return pattern === receiver.substring(0, otherLength);
+    },
+    substring$2: function(receiver, startIndex, endIndex) {
+      if (endIndex == null)
+        endIndex = receiver.length;
+      if (startIndex < 0)
+        throw H.wrapException(P.RangeError$value(startIndex, null));
+      if (startIndex > endIndex)
+        throw H.wrapException(P.RangeError$value(startIndex, null));
+      if (endIndex > receiver.length)
+        throw H.wrapException(P.RangeError$value(endIndex, null));
+      return receiver.substring(startIndex, endIndex);
+    },
+    substring$1: function($receiver, startIndex) {
+      return this.substring$2($receiver, startIndex, null);
+    },
+    $mul: function(receiver, times) {
+      var s, result;
+      if (0 >= times)
+        return "";
+      if (times === 1 || receiver.length === 0)
+        return receiver;
+      if (times !== times >>> 0)
+        throw H.wrapException(C.C_OutOfMemoryError);
+      for (s = receiver, result = ""; true;) {
+        if ((times & 1) === 1)
+          result = s + result;
+        times = times >>> 1;
+        if (times === 0)
+          break;
+        s += s;
+      }
+      return result;
+    },
+    lastIndexOf$1: function(receiver, pattern) {
+      var start = receiver.length,
+        t1 = pattern.length;
+      if (start + t1 > start)
+        start -= t1;
+      return receiver.lastIndexOf(pattern, start);
+    },
+    toString$0: function(receiver) {
+      return receiver;
+    },
+    get$hashCode: function(receiver) {
+      var t1, hash, i;
+      for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) {
+        hash = 536870911 & hash + receiver.charCodeAt(i);
+        hash = 536870911 & hash + ((524287 & hash) << 10);
+        hash ^= hash >> 6;
+      }
+      hash = 536870911 & hash + ((67108863 & hash) << 3);
+      hash ^= hash >> 11;
+      return 536870911 & hash + ((16383 & hash) << 15);
+    },
+    get$runtimeType: function(receiver) {
+      return C.Type_String_k8F;
+    },
+    get$length: function(receiver) {
+      return receiver.length;
+    },
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      if (index >= receiver.length || false)
+        throw H.wrapException(H.diagnoseIndexError(receiver, index));
+      return receiver[index];
+    },
+    $isJSIndexable: 1,
+    $isPattern: 1,
+    $isString: 1
+  };
+  H.EfficientLengthIterable.prototype = {};
+  H.ListIterable.prototype = {
+    get$iterator: function(_) {
+      var _this = this;
+      return new H.ListIterator(_this, _this.get$length(_this), H._instanceType(_this)._eval$1("ListIterator<ListIterable.E>"));
+    },
+    get$isEmpty: function(_) {
+      return this.get$length(this) === 0;
+    },
+    map$1: function(_, f) {
+      var t1 = H._instanceType(this);
+      return new H.MappedListIterable(this, t1._eval$1("@(ListIterable.E)")._as(f), t1._eval$1("MappedListIterable<ListIterable.E,@>"));
+    }
+  };
+  H.ListIterator.prototype = {
+    get$current: function() {
+      var cur = this._current;
+      return cur;
+    },
+    moveNext$0: function() {
+      var t3, _this = this,
+        t1 = _this._iterable,
+        t2 = J.getInterceptor$asx(t1),
+        $length = t2.get$length(t1);
+      if (_this.__internal$_length !== $length)
+        throw H.wrapException(P.ConcurrentModificationError$(t1));
+      t3 = _this._index;
+      if (t3 >= $length) {
+        _this.set$_current(null);
+        return false;
+      }
+      _this.set$_current(t2.elementAt$1(t1, t3));
+      ++_this._index;
+      return true;
+    },
+    set$_current: function(_current) {
+      this._current = this.$ti._eval$1("1?")._as(_current);
+    },
+    $isIterator: 1
+  };
+  H.MappedIterable.prototype = {
+    get$iterator: function(_) {
+      var t1 = H._instanceType(this);
+      return new H.MappedIterator(J.get$iterator$ax(this._iterable), this._f, t1._eval$1("@<1>")._bind$1(t1._rest[1])._eval$1("MappedIterator<1,2>"));
+    },
+    get$length: function(_) {
+      return J.get$length$asx(this._iterable);
+    }
+  };
+  H.EfficientLengthMappedIterable.prototype = {$isEfficientLengthIterable: 1};
+  H.MappedIterator.prototype = {
+    moveNext$0: function() {
+      var _this = this,
+        t1 = _this._iterator;
+      if (t1.moveNext$0()) {
+        _this.set$_current(_this._f.call$1(t1.get$current()));
+        return true;
+      }
+      _this.set$_current(null);
+      return false;
+    },
+    get$current: function() {
+      var cur = this._current;
+      return cur;
+    },
+    set$_current: function(_current) {
+      this._current = this.$ti._eval$1("2?")._as(_current);
+    }
+  };
+  H.MappedListIterable.prototype = {
+    get$length: function(_) {
+      return J.get$length$asx(this.__internal$_source);
+    },
+    elementAt$1: function(_, index) {
+      return this._f.call$1(J.elementAt$1$ax(this.__internal$_source, index));
+    }
+  };
+  H.FixedLengthListMixin.prototype = {};
+  H.Symbol.prototype = {
+    get$hashCode: function(_) {
+      var hash = this._hashCode;
+      if (hash != null)
+        return hash;
+      hash = 536870911 & 664597 * J.get$hashCode$(this.__internal$_name);
+      this._hashCode = hash;
+      return hash;
+    },
+    toString$0: function(_) {
+      return 'Symbol("' + H.S(this.__internal$_name) + '")';
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof H.Symbol && this.__internal$_name == other.__internal$_name;
+    },
+    $isSymbol0: 1
+  };
+  H.ConstantMapView.prototype = {};
+  H.ConstantMap.prototype = {
+    get$isEmpty: function(_) {
+      return this.get$length(this) === 0;
+    },
+    toString$0: function(_) {
+      return P.MapBase_mapToString(this);
+    },
+    $indexSet: function(_, key, val) {
+      var t1 = H._instanceType(this);
+      t1._precomputed1._as(key);
+      t1._rest[1]._as(val);
+      H.ConstantMap__throwUnmodifiable();
+    },
+    map$2$1: function(_, transform, K2, V2) {
+      var result = P.LinkedHashMap_LinkedHashMap$_empty(K2, V2);
+      this.forEach$1(0, new H.ConstantMap_map_closure(this, H._instanceType(this)._bind$1(K2)._bind$1(V2)._eval$1("MapEntry<1,2>(3,4)")._as(transform), result));
+      return result;
+    },
+    map$1: function($receiver, transform) {
+      return this.map$2$1($receiver, transform, type$.dynamic, type$.dynamic);
+    },
+    $isMap: 1
+  };
+  H.ConstantMap_map_closure.prototype = {
+    call$2: function(key, value) {
+      var t1 = H._instanceType(this.$this),
+        entry = this.transform.call$2(t1._precomputed1._as(key), t1._rest[1]._as(value));
+      this.result.$indexSet(0, C.JSNull_methods.get$key(entry), entry.get$value());
+    },
+    $signature: function() {
+      return H._instanceType(this.$this)._eval$1("Null(1,2)");
+    }
+  };
+  H.ConstantStringMap.prototype = {
+    get$length: function(_) {
+      return this._length;
+    },
+    containsKey$1: function(key) {
+      if (typeof key != "string")
+        return false;
+      if ("__proto__" === key)
+        return false;
+      return this._jsObject.hasOwnProperty(key);
+    },
+    $index: function(_, key) {
+      if (!this.containsKey$1(key))
+        return null;
+      return this._fetch$1(key);
+    },
+    _fetch$1: function(key) {
+      return this._jsObject[H._asStringS(key)];
+    },
+    forEach$1: function(_, f) {
+      var keys, t2, i, key,
+        t1 = H._instanceType(this);
+      t1._eval$1("~(1,2)")._as(f);
+      keys = this._keys;
+      for (t2 = keys.length, t1 = t1._rest[1], i = 0; i < t2; ++i) {
+        key = keys[i];
+        f.call$2(key, t1._as(this._fetch$1(key)));
+      }
+    },
+    get$keys: function() {
+      return new H._ConstantMapKeyIterable(this, H._instanceType(this)._eval$1("_ConstantMapKeyIterable<1>"));
+    }
+  };
+  H._ConstantMapKeyIterable.prototype = {
+    get$iterator: function(_) {
+      var t1 = this._map._keys;
+      return new J.ArrayIterator(t1, t1.length, H._arrayInstanceType(t1)._eval$1("ArrayIterator<1>"));
+    },
+    get$length: function(_) {
+      return this._map._keys.length;
+    }
+  };
+  H.JSInvocationMirror.prototype = {
+    get$memberName: function() {
+      var t1 = this._memberName;
+      return t1;
+    },
+    get$positionalArguments: function() {
+      var t1, argumentCount, list, index, _this = this;
+      if (_this.__js_helper$_kind === 1)
+        return C.List_empty;
+      t1 = _this._arguments;
+      argumentCount = t1.length - _this._namedArgumentNames.length - _this._typeArgumentCount;
+      if (argumentCount === 0)
+        return C.List_empty;
+      list = [];
+      for (index = 0; index < argumentCount; ++index) {
+        if (index >= t1.length)
+          return H.ioore(t1, index);
+        list.push(t1[index]);
+      }
+      list.fixed$length = Array;
+      list.immutable$list = Array;
+      return list;
+    },
+    get$namedArguments: function() {
+      var t1, namedArgumentCount, t2, namedArgumentsStartIndex, map, i, t3, t4, _this = this;
+      if (_this.__js_helper$_kind !== 0)
+        return C.Map_empty0;
+      t1 = _this._namedArgumentNames;
+      namedArgumentCount = t1.length;
+      t2 = _this._arguments;
+      namedArgumentsStartIndex = t2.length - namedArgumentCount - _this._typeArgumentCount;
+      if (namedArgumentCount === 0)
+        return C.Map_empty0;
+      map = new H.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic);
+      for (i = 0; i < namedArgumentCount; ++i) {
+        if (i >= t1.length)
+          return H.ioore(t1, i);
+        t3 = t1[i];
+        t4 = namedArgumentsStartIndex + i;
+        if (t4 < 0 || t4 >= t2.length)
+          return H.ioore(t2, t4);
+        map.$indexSet(0, new H.Symbol(t3), t2[t4]);
+      }
+      return new H.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic);
+    },
+    $isInvocation: 1
+  };
+  H.Primitives_functionNoSuchMethod_closure.prototype = {
+    call$2: function($name, argument) {
+      var t1;
+      H._asStringS($name);
+      t1 = this._box_0;
+      t1.names = t1.names + "$" + H.S($name);
+      C.JSArray_methods.add$1(this.namedArgumentList, $name);
+      C.JSArray_methods.add$1(this.$arguments, argument);
+      ++t1.argumentCount;
+    },
+    $signature: 44
+  };
+  H.TypeErrorDecoder.prototype = {
+    matchTypeError$1: function(message) {
+      var result, t1, _this = this,
+        match = new RegExp(_this._pattern).exec(message);
+      if (match == null)
+        return null;
+      result = Object.create(null);
+      t1 = _this._arguments;
+      if (t1 !== -1)
+        result.arguments = match[t1 + 1];
+      t1 = _this._argumentsExpr;
+      if (t1 !== -1)
+        result.argumentsExpr = match[t1 + 1];
+      t1 = _this._expr;
+      if (t1 !== -1)
+        result.expr = match[t1 + 1];
+      t1 = _this._method;
+      if (t1 !== -1)
+        result.method = match[t1 + 1];
+      t1 = _this._receiver;
+      if (t1 !== -1)
+        result.receiver = match[t1 + 1];
+      return result;
+    }
+  };
+  H.NullError.prototype = {
+    toString$0: function(_) {
+      var t1 = this._method;
+      if (t1 == null)
+        return "NoSuchMethodError: " + H.S(this._message);
+      return "NoSuchMethodError: method not found: '" + t1 + "' on null";
+    }
+  };
+  H.JsNoSuchMethodError.prototype = {
+    toString$0: function(_) {
+      var t2, _this = this,
+        _s38_ = "NoSuchMethodError: method not found: '",
+        t1 = _this._method;
+      if (t1 == null)
+        return "NoSuchMethodError: " + H.S(_this._message);
+      t2 = _this._receiver;
+      if (t2 == null)
+        return _s38_ + t1 + "' (" + H.S(_this._message) + ")";
+      return _s38_ + t1 + "' on '" + t2 + "' (" + H.S(_this._message) + ")";
+    }
+  };
+  H.UnknownJsTypeError.prototype = {
+    toString$0: function(_) {
+      var t1 = this._message;
+      return t1.length === 0 ? "Error" : "Error: " + t1;
+    }
+  };
+  H.NullThrownFromJavaScriptException.prototype = {
+    toString$0: function(_) {
+      return "Throw of null ('" + (this._irritant === null ? "null" : "undefined") + "' from JavaScript)";
+    }
+  };
+  H.ExceptionAndStackTrace.prototype = {};
+  H._StackTrace.prototype = {
+    toString$0: function(_) {
+      var trace,
+        t1 = this._trace;
+      if (t1 != null)
+        return t1;
+      t1 = this._exception;
+      trace = t1 !== null && typeof t1 === "object" ? t1.stack : null;
+      return this._trace = trace == null ? "" : trace;
+    },
+    $isStackTrace: 1
+  };
+  H.Closure.prototype = {
+    toString$0: function(_) {
+      var $constructor = this.constructor,
+        $name = $constructor == null ? null : $constructor.name;
+      return "Closure '" + H.unminifyOrTag($name == null ? "unknown" : $name) + "'";
+    },
+    $isFunction: 1,
+    get$$call: function() {
+      return this;
+    },
+    "call*": "call$1",
+    $requiredArgCount: 1,
+    $defaultValues: null
+  };
+  H.TearOffClosure.prototype = {};
+  H.StaticClosure.prototype = {
+    toString$0: function(_) {
+      var $name = this.$static_name;
+      if ($name == null)
+        return "Closure of unknown static method";
+      return "Closure '" + H.unminifyOrTag($name) + "'";
+    }
+  };
+  H.BoundClosure.prototype = {
+    $eq: function(_, other) {
+      var _this = this;
+      if (other == null)
+        return false;
+      if (_this === other)
+        return true;
+      if (!(other instanceof H.BoundClosure))
+        return false;
+      return _this._self === other._self && _this.__js_helper$_target === other.__js_helper$_target && _this._receiver === other._receiver;
+    },
+    get$hashCode: function(_) {
+      var receiverHashCode,
+        t1 = this._receiver;
+      if (t1 == null)
+        receiverHashCode = H.Primitives_objectHashCode(this._self);
+      else
+        receiverHashCode = typeof t1 !== "object" ? J.get$hashCode$(t1) : H.Primitives_objectHashCode(t1);
+      return (receiverHashCode ^ H.Primitives_objectHashCode(this.__js_helper$_target)) >>> 0;
+    },
+    toString$0: function(_) {
+      var receiver = this._receiver;
+      if (receiver == null)
+        receiver = this._self;
+      return "Closure '" + H.S(this._name) + "' of " + ("Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'");
+    }
+  };
+  H.RuntimeError.prototype = {
+    toString$0: function(_) {
+      return "RuntimeError: " + H.S(this.message);
+    }
+  };
+  H._AssertionError.prototype = {
+    toString$0: function(_) {
+      return "Assertion failed: " + P.Error_safeToString(this.message);
+    }
+  };
+  H._Required.prototype = {};
+  H.JsLinkedHashMap.prototype = {
+    get$length: function(_) {
+      return this._length;
+    },
+    get$isEmpty: function(_) {
+      return this._length === 0;
+    },
+    get$isNotEmpty: function(_) {
+      return !this.get$isEmpty(this);
+    },
+    get$keys: function() {
+      return new H.LinkedHashMapKeyIterable(this, H._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>"));
+    },
+    containsKey$1: function(key) {
+      var strings, t1;
+      if (typeof key == "string") {
+        strings = this._strings;
+        if (strings == null)
+          return false;
+        return this._containsTableEntry$2(strings, key);
+      } else {
+        t1 = this.internalContainsKey$1(key);
+        return t1;
+      }
+    },
+    internalContainsKey$1: function(key) {
+      var _this = this,
+        rest = _this.__js_helper$_rest;
+      if (rest == null)
+        return false;
+      return _this.internalFindBucketIndex$2(_this._getTableBucket$2(rest, _this.internalComputeHashCode$1(key)), key) >= 0;
+    },
+    addAll$1: function(_, other) {
+      H._instanceType(this)._eval$1("Map<1,2>")._as(other).forEach$1(0, new H.JsLinkedHashMap_addAll_closure(this));
+    },
+    $index: function(_, key) {
+      var strings, cell, t1, nums, _this = this, _null = null;
+      if (typeof key == "string") {
+        strings = _this._strings;
+        if (strings == null)
+          return _null;
+        cell = _this._getTableCell$2(strings, key);
+        t1 = cell == null ? _null : cell.hashMapCellValue;
+        return t1;
+      } else if (typeof key == "number" && (key & 0x3ffffff) === key) {
+        nums = _this._nums;
+        if (nums == null)
+          return _null;
+        cell = _this._getTableCell$2(nums, key);
+        t1 = cell == null ? _null : cell.hashMapCellValue;
+        return t1;
+      } else
+        return _this.internalGet$1(key);
+    },
+    internalGet$1: function(key) {
+      var bucket, index, _this = this,
+        rest = _this.__js_helper$_rest;
+      if (rest == null)
+        return null;
+      bucket = _this._getTableBucket$2(rest, _this.internalComputeHashCode$1(key));
+      index = _this.internalFindBucketIndex$2(bucket, key);
+      if (index < 0)
+        return null;
+      return bucket[index].hashMapCellValue;
+    },
+    $indexSet: function(_, key, value) {
+      var strings, nums, _this = this,
+        t1 = H._instanceType(_this);
+      t1._precomputed1._as(key);
+      t1._rest[1]._as(value);
+      if (typeof key == "string") {
+        strings = _this._strings;
+        _this._addHashTableEntry$3(strings == null ? _this._strings = _this._newHashTable$0() : strings, key, value);
+      } else if (typeof key == "number" && (key & 0x3ffffff) === key) {
+        nums = _this._nums;
+        _this._addHashTableEntry$3(nums == null ? _this._nums = _this._newHashTable$0() : nums, key, value);
+      } else
+        _this.internalSet$2(key, value);
+    },
+    internalSet$2: function(key, value) {
+      var rest, hash, bucket, index, _this = this,
+        t1 = H._instanceType(_this);
+      t1._precomputed1._as(key);
+      t1._rest[1]._as(value);
+      rest = _this.__js_helper$_rest;
+      if (rest == null)
+        rest = _this.__js_helper$_rest = _this._newHashTable$0();
+      hash = _this.internalComputeHashCode$1(key);
+      bucket = _this._getTableBucket$2(rest, hash);
+      if (bucket == null)
+        _this._setTableEntry$3(rest, hash, [_this._newLinkedCell$2(key, value)]);
+      else {
+        index = _this.internalFindBucketIndex$2(bucket, key);
+        if (index >= 0)
+          bucket[index].hashMapCellValue = value;
+        else
+          bucket.push(_this._newLinkedCell$2(key, value));
+      }
+    },
+    putIfAbsent$2: function(key, ifAbsent) {
+      var value, _this = this,
+        t1 = H._instanceType(_this);
+      t1._precomputed1._as(key);
+      t1._eval$1("2()")._as(ifAbsent);
+      if (_this.containsKey$1(key))
+        return _this.$index(0, key);
+      value = ifAbsent.call$0();
+      _this.$indexSet(0, key, value);
+      return value;
+    },
+    remove$1: function(_, key) {
+      var _this = this;
+      if (typeof key == "string")
+        return _this._removeHashTableEntry$2(_this._strings, key);
+      else if (typeof key == "number" && (key & 0x3ffffff) === key)
+        return _this._removeHashTableEntry$2(_this._nums, key);
+      else
+        return _this.internalRemove$1(key);
+    },
+    internalRemove$1: function(key) {
+      var hash, bucket, index, cell, _this = this,
+        rest = _this.__js_helper$_rest;
+      if (rest == null)
+        return null;
+      hash = _this.internalComputeHashCode$1(key);
+      bucket = _this._getTableBucket$2(rest, hash);
+      index = _this.internalFindBucketIndex$2(bucket, key);
+      if (index < 0)
+        return null;
+      cell = bucket.splice(index, 1)[0];
+      _this._unlinkCell$1(cell);
+      if (bucket.length === 0)
+        _this._deleteTableEntry$2(rest, hash);
+      return cell.hashMapCellValue;
+    },
+    forEach$1: function(_, action) {
+      var cell, modifications, _this = this;
+      H._instanceType(_this)._eval$1("~(1,2)")._as(action);
+      cell = _this._first;
+      modifications = _this._modifications;
+      for (; cell != null;) {
+        action.call$2(cell.hashMapCellKey, cell.hashMapCellValue);
+        if (modifications !== _this._modifications)
+          throw H.wrapException(P.ConcurrentModificationError$(_this));
+        cell = cell._next;
+      }
+    },
+    _addHashTableEntry$3: function(table, key, value) {
+      var cell, _this = this,
+        t1 = H._instanceType(_this);
+      t1._precomputed1._as(key);
+      t1._rest[1]._as(value);
+      cell = _this._getTableCell$2(table, key);
+      if (cell == null)
+        _this._setTableEntry$3(table, key, _this._newLinkedCell$2(key, value));
+      else
+        cell.hashMapCellValue = value;
+    },
+    _removeHashTableEntry$2: function(table, key) {
+      var cell;
+      if (table == null)
+        return null;
+      cell = this._getTableCell$2(table, key);
+      if (cell == null)
+        return null;
+      this._unlinkCell$1(cell);
+      this._deleteTableEntry$2(table, key);
+      return cell.hashMapCellValue;
+    },
+    _modified$0: function() {
+      this._modifications = this._modifications + 1 & 67108863;
+    },
+    _newLinkedCell$2: function(key, value) {
+      var _this = this,
+        t1 = H._instanceType(_this),
+        cell = new H.LinkedHashMapCell(t1._precomputed1._as(key), t1._rest[1]._as(value));
+      if (_this._first == null)
+        _this._first = _this._last = cell;
+      else {
+        t1 = _this._last;
+        t1.toString;
+        cell._previous = t1;
+        _this._last = t1._next = cell;
+      }
+      ++_this._length;
+      _this._modified$0();
+      return cell;
+    },
+    _unlinkCell$1: function(cell) {
+      var _this = this,
+        previous = cell._previous,
+        next = cell._next;
+      if (previous == null)
+        _this._first = next;
+      else
+        previous._next = next;
+      if (next == null)
+        _this._last = previous;
+      else
+        next._previous = previous;
+      --_this._length;
+      _this._modified$0();
+    },
+    internalComputeHashCode$1: function(key) {
+      return J.get$hashCode$(key) & 0x3ffffff;
+    },
+    internalFindBucketIndex$2: function(bucket, key) {
+      var $length, i;
+      if (bucket == null)
+        return -1;
+      $length = bucket.length;
+      for (i = 0; i < $length; ++i)
+        if (J.$eq$(bucket[i].hashMapCellKey, key))
+          return i;
+      return -1;
+    },
+    toString$0: function(_) {
+      return P.MapBase_mapToString(this);
+    },
+    _getTableCell$2: function(table, key) {
+      return table[key];
+    },
+    _getTableBucket$2: function(table, key) {
+      return table[key];
+    },
+    _setTableEntry$3: function(table, key, value) {
+      table[key] = value;
+    },
+    _deleteTableEntry$2: function(table, key) {
+      delete table[key];
+    },
+    _containsTableEntry$2: function(table, key) {
+      return this._getTableCell$2(table, key) != null;
+    },
+    _newHashTable$0: function() {
+      var _s20_ = "<non-identifier-key>",
+        table = Object.create(null);
+      this._setTableEntry$3(table, _s20_, table);
+      this._deleteTableEntry$2(table, _s20_);
+      return table;
+    },
+    $isLinkedHashMap: 1
+  };
+  H.JsLinkedHashMap_addAll_closure.prototype = {
+    call$2: function(key, value) {
+      var t1 = this.$this,
+        t2 = H._instanceType(t1);
+      t1.$indexSet(0, t2._precomputed1._as(key), t2._rest[1]._as(value));
+    },
+    $signature: function() {
+      return H._instanceType(this.$this)._eval$1("Null(1,2)");
+    }
+  };
+  H.LinkedHashMapCell.prototype = {};
+  H.LinkedHashMapKeyIterable.prototype = {
+    get$length: function(_) {
+      return this._map._length;
+    },
+    get$isEmpty: function(_) {
+      return this._map._length === 0;
+    },
+    get$iterator: function(_) {
+      var t1 = this._map,
+        t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti._eval$1("LinkedHashMapKeyIterator<1>"));
+      t2._cell = t1._first;
+      return t2;
+    },
+    contains$1: function(_, element) {
+      return this._map.containsKey$1(element);
+    }
+  };
+  H.LinkedHashMapKeyIterator.prototype = {
+    get$current: function() {
+      return this.__js_helper$_current;
+    },
+    moveNext$0: function() {
+      var cell, _this = this,
+        t1 = _this._map;
+      if (_this._modifications !== t1._modifications)
+        throw H.wrapException(P.ConcurrentModificationError$(t1));
+      cell = _this._cell;
+      if (cell == null) {
+        _this.set$__js_helper$_current(null);
+        return false;
+      } else {
+        _this.set$__js_helper$_current(cell.hashMapCellKey);
+        _this._cell = cell._next;
+        return true;
+      }
+    },
+    set$__js_helper$_current: function(_current) {
+      this.__js_helper$_current = this.$ti._eval$1("1?")._as(_current);
+    },
+    $isIterator: 1
+  };
+  H.initHooks_closure.prototype = {
+    call$1: function(o) {
+      return this.getTag(o);
+    },
+    $signature: 3
+  };
+  H.initHooks_closure0.prototype = {
+    call$2: function(o, tag) {
+      return this.getUnknownTag(o, tag);
+    },
+    $signature: 31
+  };
+  H.initHooks_closure1.prototype = {
+    call$1: function(tag) {
+      return this.prototypeForTag(H._asStringS(tag));
+    },
+    $signature: 41
+  };
+  H.NativeByteBuffer.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_ByteBuffer_RkP;
+    }
+  };
+  H.NativeTypedData.prototype = {};
+  H.NativeByteData.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_ByteData_zNC;
+    },
+    _getUint32$2: function(receiver, byteOffset, littleEndian) {
+      return receiver.getUint32(byteOffset, littleEndian);
+    },
+    $isByteData: 1
+  };
+  H.NativeTypedArray.prototype = {
+    get$length: function(receiver) {
+      return receiver.length;
+    },
+    $isJSIndexable: 1,
+    $isJavaScriptIndexingBehavior: 1
+  };
+  H.NativeTypedArrayOfDouble.prototype = {
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      H._checkValidIndex(index, receiver, receiver.length);
+      return receiver[index];
+    },
+    $indexSet: function(receiver, index, value) {
+      H._asIntS(index);
+      H._asDoubleS(value);
+      H._checkValidIndex(index, receiver, receiver.length);
+      receiver[index] = value;
+    },
+    $isEfficientLengthIterable: 1,
+    $isIterable: 1,
+    $isList: 1
+  };
+  H.NativeTypedArrayOfInt.prototype = {
+    $indexSet: function(receiver, index, value) {
+      H._asIntS(index);
+      H._asIntS(value);
+      H._checkValidIndex(index, receiver, receiver.length);
+      receiver[index] = value;
+    },
+    $isEfficientLengthIterable: 1,
+    $isIterable: 1,
+    $isList: 1
+  };
+  H.NativeFloat32List.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_Float32List_LB7;
+    }
+  };
+  H.NativeFloat64List.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_Float64List_LB7;
+    }
+  };
+  H.NativeInt16List.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_Int16List_uXf;
+    },
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      H._checkValidIndex(index, receiver, receiver.length);
+      return receiver[index];
+    }
+  };
+  H.NativeInt32List.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_Int32List_O50;
+    },
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      H._checkValidIndex(index, receiver, receiver.length);
+      return receiver[index];
+    }
+  };
+  H.NativeInt8List.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_Int8List_ekJ;
+    },
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      H._checkValidIndex(index, receiver, receiver.length);
+      return receiver[index];
+    }
+  };
+  H.NativeUint16List.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_Uint16List_2bx;
+    },
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      H._checkValidIndex(index, receiver, receiver.length);
+      return receiver[index];
+    }
+  };
+  H.NativeUint32List.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_Uint32List_2bx;
+    },
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      H._checkValidIndex(index, receiver, receiver.length);
+      return receiver[index];
+    }
+  };
+  H.NativeUint8ClampedList.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_Uint8ClampedList_Jik;
+    },
+    get$length: function(receiver) {
+      return receiver.length;
+    },
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      H._checkValidIndex(index, receiver, receiver.length);
+      return receiver[index];
+    }
+  };
+  H.NativeUint8List.prototype = {
+    get$runtimeType: function(receiver) {
+      return C.Type_Uint8List_WLA;
+    },
+    get$length: function(receiver) {
+      return receiver.length;
+    },
+    $index: function(receiver, index) {
+      H._asIntS(index);
+      H._checkValidIndex(index, receiver, receiver.length);
+      return receiver[index];
+    },
+    $isUint8List: 1
+  };
+  H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.prototype = {};
+  H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {};
+  H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {};
+  H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {};
+  H.Rti.prototype = {
+    _eval$1: function(recipe) {
+      return H._Universe_evalInEnvironment(init.typeUniverse, this, recipe);
+    },
+    _bind$1: function(typeOrTuple) {
+      return H._Universe_bind(init.typeUniverse, this, typeOrTuple);
+    }
+  };
+  H._FunctionParameters.prototype = {};
+  H._Type.prototype = {
+    toString$0: function(_) {
+      return H._rtiToString(this._rti, null);
+    }
+  };
+  H._Error.prototype = {
+    toString$0: function(_) {
+      return this.__rti$_message;
+    }
+  };
+  H._TypeError.prototype = {};
+  P._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = {
+    call$1: function(_) {
+      var t1 = this._box_0,
+        f = t1.storedCallback;
+      t1.storedCallback = null;
+      f.call$0();
+    },
+    $signature: 11
+  };
+  P._AsyncRun__initializeScheduleImmediate_closure.prototype = {
+    call$1: function(callback) {
+      var t1, t2;
+      this._box_0.storedCallback = type$.void_Function._as(callback);
+      t1 = this.div;
+      t2 = this.span;
+      t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2);
+    },
+    $signature: 33
+  };
+  P._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = {
+    call$0: function() {
+      this.callback.call$0();
+    },
+    "call*": "call$0",
+    $requiredArgCount: 0,
+    $signature: 1
+  };
+  P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = {
+    call$0: function() {
+      this.callback.call$0();
+    },
+    "call*": "call$0",
+    $requiredArgCount: 0,
+    $signature: 1
+  };
+  P._TimerImpl.prototype = {
+    _TimerImpl$2: function(milliseconds, callback) {
+      if (self.setTimeout != null)
+        this._handle = self.setTimeout(H.convertDartClosureToJS(new P._TimerImpl_internalCallback(this, callback), 0), milliseconds);
+      else
+        throw H.wrapException(P.UnsupportedError$("`setTimeout()` not found."));
+    },
+    cancel$0: function() {
+      if (self.setTimeout != null) {
+        var t1 = this._handle;
+        if (t1 == null)
+          return;
+        self.clearTimeout(t1);
+        this._handle = null;
+      } else
+        throw H.wrapException(P.UnsupportedError$("Canceling a timer."));
+    },
+    $isTimer: 1
+  };
+  P._TimerImpl_internalCallback.prototype = {
+    call$0: function() {
+      this.$this._handle = null;
+      this.callback.call$0();
+    },
+    "call*": "call$0",
+    $requiredArgCount: 0,
+    $signature: 0
+  };
+  P._AsyncAwaitCompleter.prototype = {
+    complete$1: function(value) {
+      var t2, _this = this,
+        t1 = _this.$ti;
+      t1._eval$1("1/?")._as(value);
+      if (!_this.isSync)
+        _this._future._asyncComplete$1(value);
+      else {
+        t2 = _this._future;
+        if (t1._eval$1("Future<1>")._is(value))
+          t2._chainFuture$1(value);
+        else
+          t2._completeWithValue$1(t1._precomputed1._as(value));
+      }
+    },
+    completeError$2: function(e, st) {
+      var t1;
+      if (st == null)
+        st = P.AsyncError_defaultStackTrace(e);
+      t1 = this._future;
+      if (this.isSync)
+        t1._completeError$2(e, st);
+      else
+        t1._asyncCompleteError$2(e, st);
+    },
+    completeError$1: function(e) {
+      return this.completeError$2(e, null);
+    },
+    $isCompleter: 1
+  };
+  P._awaitOnObject_closure.prototype = {
+    call$1: function(result) {
+      return this.bodyFunction.call$2(0, result);
+    },
+    $signature: 2
+  };
+  P._awaitOnObject_closure0.prototype = {
+    call$2: function(error, stackTrace) {
+      this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace)));
+    },
+    "call*": "call$2",
+    $requiredArgCount: 2,
+    $signature: 34
+  };
+  P._wrapJsFunctionForAsync_closure.prototype = {
+    call$2: function(errorCode, result) {
+      this.$protected(H._asIntS(errorCode), result);
+    },
+    $signature: 38
+  };
+  P._BroadcastSubscription.prototype = {
+    _onPause$0: function() {
+    },
+    _onResume$0: function() {
+    },
+    set$_async$_next: function(_next) {
+      this._async$_next = this.$ti._eval$1("_BroadcastSubscription<1>?")._as(_next);
+    },
+    set$_async$_previous: function(_previous) {
+      this._async$_previous = this.$ti._eval$1("_BroadcastSubscription<1>?")._as(_previous);
+    }
+  };
+  P._BroadcastStreamController.prototype = {
+    get$_mayAddEvent: function() {
+      return this._state < 4;
+    },
+    _removeListener$1: function(subscription) {
+      var previous, next;
+      H._instanceType(this)._eval$1("_BroadcastSubscription<1>")._as(subscription);
+      previous = subscription._async$_previous;
+      next = subscription._async$_next;
+      if (previous == null)
+        this.set$_firstSubscription(next);
+      else
+        previous.set$_async$_next(next);
+      if (next == null)
+        this.set$_lastSubscription(previous);
+      else
+        next.set$_async$_previous(previous);
+      subscription.set$_async$_previous(subscription);
+      subscription.set$_async$_next(subscription);
+    },
+    _subscribe$4: function(onData, onError, onDone, cancelOnError) {
+      var t2, t3, t4, t5, subscription, oldLast, _this = this,
+        t1 = H._instanceType(_this);
+      t1._eval$1("~(1)?")._as(onData);
+      type$.nullable_void_Function._as(onDone);
+      if ((_this._state & 4) !== 0) {
+        t1 = new P._DoneStreamSubscription($.Zone__current, onDone, t1._eval$1("_DoneStreamSubscription<1>"));
+        t1._schedule$0();
+        return t1;
+      }
+      t2 = $.Zone__current;
+      t3 = cancelOnError ? 1 : 0;
+      t4 = P._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1);
+      t5 = P._BufferingStreamSubscription__registerErrorHandler(t2, onError);
+      t1 = t1._eval$1("_BroadcastSubscription<1>");
+      subscription = new P._BroadcastSubscription(_this, t4, t5, type$.void_Function._as(onDone), t2, t3, t1);
+      subscription.set$_async$_previous(subscription);
+      subscription.set$_async$_next(subscription);
+      t1._as(subscription);
+      subscription._eventState = _this._state & 1;
+      oldLast = _this._lastSubscription;
+      _this.set$_lastSubscription(subscription);
+      subscription.set$_async$_next(null);
+      subscription.set$_async$_previous(oldLast);
+      if (oldLast == null)
+        _this.set$_firstSubscription(subscription);
+      else
+        oldLast.set$_async$_next(subscription);
+      if (_this._firstSubscription == _this._lastSubscription)
+        P._runGuarded(_this.onListen);
+      return subscription;
+    },
+    _recordCancel$1: function(sub) {
+      var _this = this,
+        t1 = H._instanceType(_this);
+      sub = t1._eval$1("_BroadcastSubscription<1>")._as(t1._eval$1("StreamSubscription<1>")._as(sub));
+      if (sub._async$_next === sub)
+        return null;
+      t1 = sub._eventState;
+      if ((t1 & 2) !== 0)
+        sub._eventState = t1 | 4;
+      else {
+        _this._removeListener$1(sub);
+        if ((_this._state & 2) === 0 && _this._firstSubscription == null)
+          _this._callOnCancel$0();
+      }
+      return null;
+    },
+    _recordPause$1: function(subscription) {
+      H._instanceType(this)._eval$1("StreamSubscription<1>")._as(subscription);
+    },
+    _recordResume$1: function(subscription) {
+      H._instanceType(this)._eval$1("StreamSubscription<1>")._as(subscription);
+    },
+    _addEventError$0: function() {
+      if ((this._state & 4) !== 0)
+        return new P.StateError("Cannot add new events after calling close");
+      return new P.StateError("Cannot add new events while doing an addStream");
+    },
+    add$1: function(_, data) {
+      var _this = this;
+      H._instanceType(_this)._precomputed1._as(data);
+      if (!_this.get$_mayAddEvent())
+        throw H.wrapException(_this._addEventError$0());
+      _this._sendData$1(data);
+    },
+    _forEachListener$1: function(action) {
+      var t1, subscription, id, next, _this = this;
+      H._instanceType(_this)._eval$1("~(_BufferingStreamSubscription<1>)")._as(action);
+      t1 = _this._state;
+      if ((t1 & 2) !== 0)
+        throw H.wrapException(P.StateError$("Cannot fire new event. Controller is already firing an event"));
+      subscription = _this._firstSubscription;
+      if (subscription == null)
+        return;
+      id = t1 & 1;
+      _this._state = t1 ^ 3;
+      for (; subscription != null;) {
+        t1 = subscription._eventState;
+        if ((t1 & 1) === id) {
+          subscription._eventState = t1 | 2;
+          action.call$1(subscription);
+          t1 = subscription._eventState ^= 1;
+          next = subscription._async$_next;
+          if ((t1 & 4) !== 0)
+            _this._removeListener$1(subscription);
+          subscription._eventState &= 4294967293;
+          subscription = next;
+        } else
+          subscription = subscription._async$_next;
+      }
+      _this._state &= 4294967293;
+      if (_this._firstSubscription == null)
+        _this._callOnCancel$0();
+    },
+    _callOnCancel$0: function() {
+      if ((this._state & 4) !== 0) {
+        var doneFuture = this._doneFuture;
+        if (doneFuture._state === 0)
+          doneFuture._asyncComplete$1(null);
+      }
+      P._runGuarded(this.onCancel);
+    },
+    set$_firstSubscription: function(_firstSubscription) {
+      this._firstSubscription = H._instanceType(this)._eval$1("_BroadcastSubscription<1>?")._as(_firstSubscription);
+    },
+    set$_lastSubscription: function(_lastSubscription) {
+      this._lastSubscription = H._instanceType(this)._eval$1("_BroadcastSubscription<1>?")._as(_lastSubscription);
+    },
+    $isStreamController: 1,
+    $is_StreamControllerLifecycle: 1,
+    $is_EventSink: 1,
+    $is_EventDispatch: 1
+  };
+  P._SyncBroadcastStreamController.prototype = {
+    get$_mayAddEvent: function() {
+      return P._BroadcastStreamController.prototype.get$_mayAddEvent.call(this) && (this._state & 2) === 0;
+    },
+    _addEventError$0: function() {
+      if ((this._state & 2) !== 0)
+        return new P.StateError("Cannot fire new event. Controller is already firing an event");
+      return this.super$_BroadcastStreamController$_addEventError();
+    },
+    _sendData$1: function(data) {
+      var t2, _this = this,
+        t1 = _this.$ti;
+      t1._precomputed1._as(data);
+      t2 = _this._firstSubscription;
+      if (t2 == null)
+        return;
+      if (t2 === _this._lastSubscription) {
+        _this._state |= 2;
+        t1._eval$1("_BroadcastSubscription<1>")._as(t2)._add$1(data);
+        _this._state &= 4294967293;
+        if (_this._firstSubscription == null)
+          _this._callOnCancel$0();
+        return;
+      }
+      _this._forEachListener$1(new P._SyncBroadcastStreamController__sendData_closure(_this, data));
+    }
+  };
+  P._SyncBroadcastStreamController__sendData_closure.prototype = {
+    call$1: function(subscription) {
+      this.$this.$ti._eval$1("_BufferingStreamSubscription<1>")._as(subscription)._add$1(this.data);
+    },
+    $signature: function() {
+      return this.$this.$ti._eval$1("Null(_BufferingStreamSubscription<1>)");
+    }
+  };
+  P._AsyncBroadcastStreamController.prototype = {
+    _sendData$1: function(data) {
+      var subscription,
+        t1 = this.$ti;
+      t1._precomputed1._as(data);
+      for (subscription = this._firstSubscription, t1 = t1._eval$1("_DelayedData<1>"); subscription != null; subscription = subscription._async$_next)
+        subscription._addPending$1(new P._DelayedData(data, t1));
+    }
+  };
+  P.Future.prototype = {};
+  P.Completer.prototype = {};
+  P._Completer.prototype = {
+    completeError$2: function(error, stackTrace) {
+      var t1;
+      P.ArgumentError_checkNotNull(error, "error", type$.Object);
+      t1 = this.future;
+      if (t1._state !== 0)
+        throw H.wrapException(P.StateError$("Future already completed"));
+      if (stackTrace == null)
+        stackTrace = P.AsyncError_defaultStackTrace(error);
+      t1._asyncCompleteError$2(error, stackTrace);
+    },
+    completeError$1: function(error) {
+      return this.completeError$2(error, null);
+    },
+    $isCompleter: 1
+  };
+  P._AsyncCompleter.prototype = {
+    complete$1: function(value) {
+      var t2,
+        t1 = this.$ti;
+      t1._eval$1("1/?")._as(value);
+      t2 = this.future;
+      if (t2._state !== 0)
+        throw H.wrapException(P.StateError$("Future already completed"));
+      t2._asyncComplete$1(t1._eval$1("1/")._as(value));
+    },
+    complete$0: function() {
+      return this.complete$1(null);
+    }
+  };
+  P._FutureListener.prototype = {
+    matchesErrorTest$1: function(asyncError) {
+      if ((this.state & 15) !== 6)
+        return true;
+      return this.result._zone.runUnary$2$2(type$.bool_Function_Object._as(this.callback), asyncError.error, type$.bool, type$.Object);
+    },
+    handleError$1: function(asyncError) {
+      var errorCallback = this.errorCallback,
+        t1 = type$.dynamic,
+        t2 = type$.Object,
+        t3 = this.$ti._eval$1("2/"),
+        t4 = this.result._zone;
+      if (type$.dynamic_Function_Object_StackTrace._is(errorCallback))
+        return t3._as(t4.runBinary$3$3(errorCallback, asyncError.error, asyncError.stackTrace, t1, t2, type$.StackTrace));
+      else
+        return t3._as(t4.runUnary$2$2(type$.dynamic_Function_Object._as(errorCallback), asyncError.error, t1, t2));
+    }
+  };
+  P._Future.prototype = {
+    then$1$2$onError: function(f, onError, $R) {
+      var currentZone, result, t2,
+        t1 = this.$ti;
+      t1._bind$1($R)._eval$1("1/(2)")._as(f);
+      currentZone = $.Zone__current;
+      if (currentZone !== C.C__RootZone) {
+        $R._eval$1("@<0/>")._bind$1(t1._precomputed1)._eval$1("1(2)")._as(f);
+        if (onError != null)
+          onError = P._registerErrorHandler(onError, currentZone);
+      }
+      result = new P._Future($.Zone__current, $R._eval$1("_Future<0>"));
+      t2 = onError == null ? 1 : 3;
+      this._addListener$1(new P._FutureListener(result, t2, f, onError, t1._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>")));
+      return result;
+    },
+    then$1$1: function(f, $R) {
+      return this.then$1$2$onError(f, null, $R);
+    },
+    _thenAwait$1$2: function(f, onError, $E) {
+      var result,
+        t1 = this.$ti;
+      t1._bind$1($E)._eval$1("1/(2)")._as(f);
+      result = new P._Future($.Zone__current, $E._eval$1("_Future<0>"));
+      this._addListener$1(new P._FutureListener(result, 19, f, onError, t1._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>")));
+      return result;
+    },
+    whenComplete$1: function(action) {
+      var t1, result;
+      type$.dynamic_Function._as(action);
+      t1 = this.$ti;
+      result = new P._Future($.Zone__current, t1);
+      this._addListener$1(new P._FutureListener(result, 8, action, null, t1._eval$1("@<1>")._bind$1(t1._precomputed1)._eval$1("_FutureListener<1,2>")));
+      return result;
+    },
+    _addListener$1: function(listener) {
+      var source, _this = this,
+        t1 = _this._state;
+      if (t1 <= 1) {
+        listener._nextListener = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners);
+        _this._resultOrListeners = listener;
+      } else {
+        if (t1 === 2) {
+          source = type$._Future_dynamic._as(_this._resultOrListeners);
+          t1 = source._state;
+          if (t1 < 4) {
+            source._addListener$1(listener);
+            return;
+          }
+          _this._state = t1;
+          _this._resultOrListeners = source._resultOrListeners;
+        }
+        P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__addListener_closure(_this, listener)));
+      }
+    },
+    _prependListeners$1: function(listeners) {
+      var t1, existingListeners, next, cursor, next0, source, _this = this, _box_0 = {};
+      _box_0.listeners = listeners;
+      if (listeners == null)
+        return;
+      t1 = _this._state;
+      if (t1 <= 1) {
+        existingListeners = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners);
+        _this._resultOrListeners = listeners;
+        if (existingListeners != null) {
+          next = listeners._nextListener;
+          for (cursor = listeners; next != null; cursor = next, next = next0)
+            next0 = next._nextListener;
+          cursor._nextListener = existingListeners;
+        }
+      } else {
+        if (t1 === 2) {
+          source = type$._Future_dynamic._as(_this._resultOrListeners);
+          t1 = source._state;
+          if (t1 < 4) {
+            source._prependListeners$1(listeners);
+            return;
+          }
+          _this._state = t1;
+          _this._resultOrListeners = source._resultOrListeners;
+        }
+        _box_0.listeners = _this._reverseListeners$1(listeners);
+        P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__prependListeners_closure(_box_0, _this)));
+      }
+    },
+    _removeListeners$0: function() {
+      var current = type$.nullable__FutureListener_dynamic_dynamic._as(this._resultOrListeners);
+      this._resultOrListeners = null;
+      return this._reverseListeners$1(current);
+    },
+    _reverseListeners$1: function(listeners) {
+      var current, prev, next;
+      for (current = listeners, prev = null; current != null; prev = current, current = next) {
+        next = current._nextListener;
+        current._nextListener = prev;
+      }
+      return prev;
+    },
+    _complete$1: function(value) {
+      var listeners, _this = this,
+        t1 = _this.$ti;
+      t1._eval$1("1/")._as(value);
+      if (t1._eval$1("Future<1>")._is(value))
+        if (t1._is(value))
+          P._Future__chainCoreFuture(value, _this);
+        else
+          P._Future__chainForeignFuture(value, _this);
+      else {
+        listeners = _this._removeListeners$0();
+        t1._precomputed1._as(value);
+        _this._state = 4;
+        _this._resultOrListeners = value;
+        P._Future__propagateToListeners(_this, listeners);
+      }
+    },
+    _completeWithValue$1: function(value) {
+      var listeners, _this = this;
+      _this.$ti._precomputed1._as(value);
+      listeners = _this._removeListeners$0();
+      _this._state = 4;
+      _this._resultOrListeners = value;
+      P._Future__propagateToListeners(_this, listeners);
+    },
+    _completeError$2: function(error, stackTrace) {
+      var listeners, t1, _this = this;
+      type$.StackTrace._as(stackTrace);
+      listeners = _this._removeListeners$0();
+      t1 = P.AsyncError$(error, stackTrace);
+      _this._state = 8;
+      _this._resultOrListeners = t1;
+      P._Future__propagateToListeners(_this, listeners);
+    },
+    _asyncComplete$1: function(value) {
+      var t1 = this.$ti;
+      t1._eval$1("1/")._as(value);
+      if (t1._eval$1("Future<1>")._is(value)) {
+        this._chainFuture$1(value);
+        return;
+      }
+      this._asyncCompleteWithValue$1(t1._precomputed1._as(value));
+    },
+    _asyncCompleteWithValue$1: function(value) {
+      var _this = this;
+      _this.$ti._precomputed1._as(value);
+      _this._state = 1;
+      P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__asyncCompleteWithValue_closure(_this, value)));
+    },
+    _chainFuture$1: function(value) {
+      var _this = this,
+        t1 = _this.$ti;
+      t1._eval$1("Future<1>")._as(value);
+      if (t1._is(value)) {
+        if (value._state === 8) {
+          _this._state = 1;
+          P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__chainFuture_closure(_this, value)));
+        } else
+          P._Future__chainCoreFuture(value, _this);
+        return;
+      }
+      P._Future__chainForeignFuture(value, _this);
+    },
+    _asyncCompleteError$2: function(error, stackTrace) {
+      type$.StackTrace._as(stackTrace);
+      this._state = 1;
+      P._rootScheduleMicrotask(null, null, this._zone, type$.void_Function._as(new P._Future__asyncCompleteError_closure(this, error, stackTrace)));
+    },
+    $isFuture: 1
+  };
+  P._Future__addListener_closure.prototype = {
+    call$0: function() {
+      P._Future__propagateToListeners(this.$this, this.listener);
+    },
+    $signature: 1
+  };
+  P._Future__prependListeners_closure.prototype = {
+    call$0: function() {
+      P._Future__propagateToListeners(this.$this, this._box_0.listeners);
+    },
+    $signature: 1
+  };
+  P._Future__chainForeignFuture_closure.prototype = {
+    call$1: function(value) {
+      var t1 = this.target;
+      t1._state = 0;
+      t1._complete$1(value);
+    },
+    $signature: 11
+  };
+  P._Future__chainForeignFuture_closure0.prototype = {
+    call$2: function(error, stackTrace) {
+      type$.StackTrace._as(stackTrace);
+      this.target._completeError$2(error, stackTrace);
+    },
+    "call*": "call$2",
+    $requiredArgCount: 2,
+    $signature: 27
+  };
+  P._Future__chainForeignFuture_closure1.prototype = {
+    call$0: function() {
+      this.target._completeError$2(this.e, this.s);
+    },
+    $signature: 1
+  };
+  P._Future__asyncCompleteWithValue_closure.prototype = {
+    call$0: function() {
+      this.$this._completeWithValue$1(this.value);
+    },
+    $signature: 1
+  };
+  P._Future__chainFuture_closure.prototype = {
+    call$0: function() {
+      P._Future__chainCoreFuture(this.value, this.$this);
+    },
+    $signature: 1
+  };
+  P._Future__asyncCompleteError_closure.prototype = {
+    call$0: function() {
+      this.$this._completeError$2(this.error, this.stackTrace);
+    },
+    $signature: 1
+  };
+  P._Future__propagateToListeners_handleWhenCompleteCallback.prototype = {
+    call$0: function() {
+      var e, s, t1, exception, t2, originalSource, _this = this, completeResult = null;
+      try {
+        t1 = _this._box_0.listener;
+        completeResult = t1.result._zone.run$1$1(type$.dynamic_Function._as(t1.callback), type$.dynamic);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        if (_this.hasError) {
+          t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners).error;
+          t2 = e;
+          t2 = t1 == null ? t2 == null : t1 === t2;
+          t1 = t2;
+        } else
+          t1 = false;
+        t2 = _this._box_0;
+        if (t1)
+          t2.listenerValueOrError = type$.AsyncError._as(_this._box_1.source._resultOrListeners);
+        else
+          t2.listenerValueOrError = P.AsyncError$(e, s);
+        t2.listenerHasError = true;
+        return;
+      }
+      if (completeResult instanceof P._Future && completeResult._state >= 4) {
+        if (completeResult._state === 8) {
+          t1 = _this._box_0;
+          t1.listenerValueOrError = type$.AsyncError._as(completeResult._resultOrListeners);
+          t1.listenerHasError = true;
+        }
+        return;
+      }
+      if (type$.Future_dynamic._is(completeResult)) {
+        originalSource = _this._box_1.source;
+        t1 = _this._box_0;
+        t1.listenerValueOrError = completeResult.then$1$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), type$.dynamic);
+        t1.listenerHasError = false;
+      }
+    },
+    $signature: 0
+  };
+  P._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = {
+    call$1: function(_) {
+      return this.originalSource;
+    },
+    $signature: 28
+  };
+  P._Future__propagateToListeners_handleValueCallback.prototype = {
+    call$0: function() {
+      var e, s, t1, t2, t3, t4, t5, exception;
+      try {
+        t1 = this._box_0;
+        t2 = t1.listener;
+        t3 = t2.$ti;
+        t4 = t3._precomputed1;
+        t5 = t4._as(this.sourceResult);
+        t1.listenerValueOrError = t2.result._zone.runUnary$2$2(t3._eval$1("2/(1)")._as(t2.callback), t5, t3._eval$1("2/"), t4);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        t1 = this._box_0;
+        t1.listenerValueOrError = P.AsyncError$(e, s);
+        t1.listenerHasError = true;
+      }
+    },
+    $signature: 0
+  };
+  P._Future__propagateToListeners_handleError.prototype = {
+    call$0: function() {
+      var asyncError, e, s, t1, exception, t2, t3, t4, _this = this;
+      try {
+        asyncError = type$.AsyncError._as(_this._box_1.source._resultOrListeners);
+        t1 = _this._box_0;
+        if (H.boolConversionCheck(t1.listener.matchesErrorTest$1(asyncError)) && t1.listener.errorCallback != null) {
+          t1.listenerValueOrError = t1.listener.handleError$1(asyncError);
+          t1.listenerHasError = false;
+        }
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners);
+        t2 = t1.error;
+        t3 = e;
+        t4 = _this._box_0;
+        if (t2 == null ? t3 == null : t2 === t3)
+          t4.listenerValueOrError = t1;
+        else
+          t4.listenerValueOrError = P.AsyncError$(e, s);
+        t4.listenerHasError = true;
+      }
+    },
+    $signature: 0
+  };
+  P._AsyncCallbackEntry.prototype = {};
+  P.Stream.prototype = {
+    map$1: function(_, convert) {
+      var t1 = H._instanceType(this);
+      return new P._MapStream(t1._eval$1("@(Stream.T)")._as(convert), this, t1._eval$1("_MapStream<Stream.T,@>"));
+    },
+    get$length: function(_) {
+      var t1 = {},
+        future = new P._Future($.Zone__current, type$._Future_int);
+      t1.count = 0;
+      this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1, this), true, new P.Stream_length_closure0(t1, future), future.get$_completeError());
+      return future;
+    },
+    get$first: function(_) {
+      var future = new P._Future($.Zone__current, H._instanceType(this)._eval$1("_Future<Stream.T>")),
+        subscription = this.listen$4$cancelOnError$onDone$onError(null, true, new P.Stream_first_closure(future), future.get$_completeError());
+      subscription.onData$1(new P.Stream_first_closure0(this, subscription, future));
+      return future;
+    }
+  };
+  P.Stream_length_closure.prototype = {
+    call$1: function(_) {
+      H._instanceType(this.$this)._eval$1("Stream.T")._as(_);
+      ++this._box_0.count;
+    },
+    $signature: function() {
+      return H._instanceType(this.$this)._eval$1("Null(Stream.T)");
+    }
+  };
+  P.Stream_length_closure0.prototype = {
+    call$0: function() {
+      this.future._complete$1(this._box_0.count);
+    },
+    "call*": "call$0",
+    $requiredArgCount: 0,
+    $signature: 1
+  };
+  P.Stream_first_closure.prototype = {
+    call$0: function() {
+      var e, s, t1, exception, error, stackTrace;
+      try {
+        t1 = H.IterableElementError_noElement();
+        throw H.wrapException(t1);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        error = e;
+        stackTrace = s;
+        if (stackTrace == null)
+          stackTrace = P.AsyncError_defaultStackTrace(error);
+        this.future._completeError$2(error, stackTrace);
+      }
+    },
+    "call*": "call$0",
+    $requiredArgCount: 0,
+    $signature: 1
+  };
+  P.Stream_first_closure0.prototype = {
+    call$1: function(value) {
+      P._cancelAndValue(this.subscription, this.future, H._instanceType(this.$this)._eval$1("Stream.T")._as(value));
+    },
+    $signature: function() {
+      return H._instanceType(this.$this)._eval$1("Null(Stream.T)");
+    }
+  };
+  P.StreamSubscription.prototype = {};
+  P.StreamTransformerBase.prototype = {};
+  P.StreamController.prototype = {};
+  P._StreamController.prototype = {
+    get$_pendingEvents: function() {
+      var t1, _this = this;
+      if ((_this._state & 8) === 0)
+        return H._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(_this._varData);
+      t1 = H._instanceType(_this);
+      return t1._eval$1("_PendingEvents<1>?")._as(t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData());
+    },
+    _ensurePendingEvents$0: function() {
+      var events, t1, _this = this;
+      if ((_this._state & 8) === 0) {
+        events = _this._varData;
+        if (events == null)
+          events = _this._varData = new P._StreamImplEvents(H._instanceType(_this)._eval$1("_StreamImplEvents<1>"));
+        return H._instanceType(_this)._eval$1("_StreamImplEvents<1>")._as(events);
+      }
+      t1 = H._instanceType(_this);
+      events = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData();
+      return t1._eval$1("_StreamImplEvents<1>")._as(events);
+    },
+    get$_async$_subscription: function() {
+      var varData = this._varData;
+      if ((this._state & 8) !== 0)
+        varData = type$._StreamControllerAddStreamState_nullable_Object._as(varData).get$varData();
+      return H._instanceType(this)._eval$1("_ControllerSubscription<1>")._as(varData);
+    },
+    _badEventState$0: function() {
+      if ((this._state & 4) !== 0)
+        return new P.StateError("Cannot add event after closing");
+      return new P.StateError("Cannot add event while adding a stream");
+    },
+    _ensureDoneFuture$0: function() {
+      var t1 = this._doneFuture;
+      if (t1 == null)
+        t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new P._Future($.Zone__current, type$._Future_void);
+      return t1;
+    },
+    add$1: function(_, value) {
+      var t2, _this = this,
+        t1 = H._instanceType(_this);
+      t1._precomputed1._as(value);
+      t2 = _this._state;
+      if (t2 >= 4)
+        throw H.wrapException(_this._badEventState$0());
+      if ((t2 & 1) !== 0)
+        _this._sendData$1(value);
+      else if ((t2 & 3) === 0)
+        _this._ensurePendingEvents$0().add$1(0, new P._DelayedData(value, t1._eval$1("_DelayedData<1>")));
+    },
+    close$0: function(_) {
+      var _this = this,
+        t1 = _this._state;
+      if ((t1 & 4) !== 0)
+        return _this._ensureDoneFuture$0();
+      if (t1 >= 4)
+        throw H.wrapException(_this._badEventState$0());
+      t1 = _this._state = t1 | 4;
+      if ((t1 & 1) !== 0)
+        _this._sendDone$0();
+      else if ((t1 & 3) === 0)
+        _this._ensurePendingEvents$0().add$1(0, C.C__DelayedDone);
+      return _this._ensureDoneFuture$0();
+    },
+    _subscribe$4: function(onData, onError, onDone, cancelOnError) {
+      var t2, t3, subscription, pendingEvents, addState, _this = this,
+        t1 = H._instanceType(_this);
+      t1._eval$1("~(1)?")._as(onData);
+      type$.nullable_void_Function._as(onDone);
+      if ((_this._state & 3) !== 0)
+        throw H.wrapException(P.StateError$("Stream has already been listened to."));
+      t2 = $.Zone__current;
+      t3 = cancelOnError ? 1 : 0;
+      subscription = new P._ControllerSubscription(_this, P._BufferingStreamSubscription__registerDataHandler(t2, onData, t1._precomputed1), P._BufferingStreamSubscription__registerErrorHandler(t2, onError), P._BufferingStreamSubscription__registerDoneHandler(t2, onDone), t2, t3, t1._eval$1("_ControllerSubscription<1>"));
+      pendingEvents = _this.get$_pendingEvents();
+      t3 = _this._state |= 1;
+      if ((t3 & 8) !== 0) {
+        addState = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData);
+        addState.set$varData(subscription);
+        addState.resume$0();
+      } else
+        _this._varData = subscription;
+      subscription._setPendingEvents$1(pendingEvents);
+      subscription._guardCallback$1(new P._StreamController__subscribe_closure(_this));
+      return subscription;
+    },
+    _recordCancel$1: function(subscription) {
+      var result, onCancel, cancelResult, e, s, exception, result0, _this = this,
+        t1 = H._instanceType(_this);
+      t1._eval$1("StreamSubscription<1>")._as(subscription);
+      result = null;
+      if ((_this._state & 8) !== 0)
+        result = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).cancel$0();
+      _this._varData = null;
+      _this._state = _this._state & 4294967286 | 2;
+      onCancel = _this.onCancel;
+      if (onCancel != null)
+        if (result == null)
+          try {
+            cancelResult = onCancel.call$0();
+            if (type$.Future_void._is(cancelResult))
+              result = cancelResult;
+          } catch (exception) {
+            e = H.unwrapException(exception);
+            s = H.getTraceFromException(exception);
+            result0 = new P._Future($.Zone__current, type$._Future_void);
+            result0._asyncCompleteError$2(e, s);
+            result = result0;
+          }
+        else
+          result = result.whenComplete$1(onCancel);
+      t1 = new P._StreamController__recordCancel_complete(_this);
+      if (result != null)
+        result = result.whenComplete$1(t1);
+      else
+        t1.call$0();
+      return result;
+    },
+    _recordPause$1: function(subscription) {
+      var _this = this,
+        t1 = H._instanceType(_this);
+      t1._eval$1("StreamSubscription<1>")._as(subscription);
+      if ((_this._state & 8) !== 0)
+        t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).pause$0();
+      P._runGuarded(_this.onPause);
+    },
+    _recordResume$1: function(subscription) {
+      var _this = this,
+        t1 = H._instanceType(_this);
+      t1._eval$1("StreamSubscription<1>")._as(subscription);
+      if ((_this._state & 8) !== 0)
+        t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).resume$0();
+      P._runGuarded(_this.onResume);
+    },
+    $isStreamController: 1,
+    $is_StreamControllerLifecycle: 1,
+    $is_EventSink: 1,
+    $is_EventDispatch: 1
+  };
+  P._StreamController__subscribe_closure.prototype = {
+    call$0: function() {
+      P._runGuarded(this.$this.onListen);
+    },
+    $signature: 1
+  };
+  P._StreamController__recordCancel_complete.prototype = {
+    call$0: function() {
+      var doneFuture = this.$this._doneFuture;
+      if (doneFuture != null && doneFuture._state === 0)
+        doneFuture._asyncComplete$1(null);
+    },
+    $signature: 0
+  };
+  P._AsyncStreamControllerDispatch.prototype = {
+    _sendData$1: function(data) {
+      var t1 = this.$ti;
+      t1._precomputed1._as(data);
+      this.get$_async$_subscription()._addPending$1(new P._DelayedData(data, t1._eval$1("_DelayedData<1>")));
+    },
+    _sendError$2: function(error, stackTrace) {
+      this.get$_async$_subscription()._addPending$1(new P._DelayedError(error, stackTrace));
+    },
+    _sendDone$0: function() {
+      this.get$_async$_subscription()._addPending$1(C.C__DelayedDone);
+    }
+  };
+  P._AsyncStreamController.prototype = {};
+  P._ControllerStream.prototype = {
+    get$hashCode: function(_) {
+      return (H.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0;
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      if (this === other)
+        return true;
+      return other instanceof P._ControllerStream && other._controller === this._controller;
+    }
+  };
+  P._ControllerSubscription.prototype = {
+    _onCancel$0: function() {
+      return this._controller._recordCancel$1(this);
+    },
+    _onPause$0: function() {
+      this._controller._recordPause$1(this);
+    },
+    _onResume$0: function() {
+      this._controller._recordResume$1(this);
+    }
+  };
+  P._StreamSinkWrapper.prototype = {};
+  P._BufferingStreamSubscription.prototype = {
+    _setPendingEvents$1: function(pendingEvents) {
+      var _this = this;
+      H._instanceType(_this)._eval$1("_PendingEvents<_BufferingStreamSubscription.T>?")._as(pendingEvents);
+      if (pendingEvents == null)
+        return;
+      _this.set$_pending(pendingEvents);
+      if (pendingEvents.lastPendingEvent != null) {
+        _this._state = (_this._state | 64) >>> 0;
+        pendingEvents.schedule$1(_this);
+      }
+    },
+    onData$1: function(handleData) {
+      var t1 = H._instanceType(this);
+      this.set$_async$_onData(P._BufferingStreamSubscription__registerDataHandler(this._zone, t1._eval$1("~(_BufferingStreamSubscription.T)?")._as(handleData), t1._eval$1("_BufferingStreamSubscription.T")));
+    },
+    pause$0: function() {
+      var t2, t3, _this = this,
+        t1 = _this._state;
+      if ((t1 & 8) !== 0)
+        return;
+      t2 = (t1 + 128 | 4) >>> 0;
+      _this._state = t2;
+      if (t1 < 128) {
+        t3 = _this._pending;
+        if (t3 != null)
+          if (t3._state === 1)
+            t3._state = 3;
+      }
+      if ((t1 & 4) === 0 && (t2 & 32) === 0)
+        _this._guardCallback$1(_this.get$_onPause());
+    },
+    resume$0: function() {
+      var _this = this,
+        t1 = _this._state;
+      if ((t1 & 8) !== 0)
+        return;
+      if (t1 >= 128) {
+        t1 = _this._state = t1 - 128;
+        if (t1 < 128)
+          if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent != null)
+            _this._pending.schedule$1(_this);
+          else {
+            t1 = (t1 & 4294967291) >>> 0;
+            _this._state = t1;
+            if ((t1 & 32) === 0)
+              _this._guardCallback$1(_this.get$_onResume());
+          }
+      }
+    },
+    cancel$0: function() {
+      var _this = this,
+        t1 = (_this._state & 4294967279) >>> 0;
+      _this._state = t1;
+      if ((t1 & 8) === 0)
+        _this._cancel$0();
+      t1 = _this._cancelFuture;
+      return t1 == null ? $.$get$Future__nullFuture() : t1;
+    },
+    _cancel$0: function() {
+      var t2, _this = this,
+        t1 = _this._state = (_this._state | 8) >>> 0;
+      if ((t1 & 64) !== 0) {
+        t2 = _this._pending;
+        if (t2._state === 1)
+          t2._state = 3;
+      }
+      if ((t1 & 32) === 0)
+        _this.set$_pending(null);
+      _this._cancelFuture = _this._onCancel$0();
+    },
+    _add$1: function(data) {
+      var t2, _this = this,
+        t1 = H._instanceType(_this);
+      t1._eval$1("_BufferingStreamSubscription.T")._as(data);
+      t2 = _this._state;
+      if ((t2 & 8) !== 0)
+        return;
+      if (t2 < 32)
+        _this._sendData$1(data);
+      else
+        _this._addPending$1(new P._DelayedData(data, t1._eval$1("_DelayedData<_BufferingStreamSubscription.T>")));
+    },
+    _addError$2: function(error, stackTrace) {
+      var t1 = this._state;
+      if ((t1 & 8) !== 0)
+        return;
+      if (t1 < 32)
+        this._sendError$2(error, stackTrace);
+      else
+        this._addPending$1(new P._DelayedError(error, stackTrace));
+    },
+    _close$0: function() {
+      var _this = this,
+        t1 = _this._state;
+      if ((t1 & 8) !== 0)
+        return;
+      t1 = (t1 | 2) >>> 0;
+      _this._state = t1;
+      if (t1 < 32)
+        _this._sendDone$0();
+      else
+        _this._addPending$1(C.C__DelayedDone);
+    },
+    _onPause$0: function() {
+    },
+    _onResume$0: function() {
+    },
+    _onCancel$0: function() {
+      return null;
+    },
+    _addPending$1: function($event) {
+      var _this = this,
+        t1 = H._instanceType(_this),
+        pending = t1._eval$1("_StreamImplEvents<_BufferingStreamSubscription.T>?")._as(_this._pending);
+      if (pending == null)
+        pending = new P._StreamImplEvents(t1._eval$1("_StreamImplEvents<_BufferingStreamSubscription.T>"));
+      _this.set$_pending(pending);
+      pending.add$1(0, $event);
+      t1 = _this._state;
+      if ((t1 & 64) === 0) {
+        t1 = (t1 | 64) >>> 0;
+        _this._state = t1;
+        if (t1 < 128)
+          pending.schedule$1(_this);
+      }
+    },
+    _sendData$1: function(data) {
+      var t2, _this = this,
+        t1 = H._instanceType(_this)._eval$1("_BufferingStreamSubscription.T");
+      t1._as(data);
+      t2 = _this._state;
+      _this._state = (t2 | 32) >>> 0;
+      _this._zone.runUnaryGuarded$1$2(_this._async$_onData, data, t1);
+      _this._state = (_this._state & 4294967263) >>> 0;
+      _this._checkState$1((t2 & 4) !== 0);
+    },
+    _sendError$2: function(error, stackTrace) {
+      var cancelFuture, _this = this,
+        t1 = _this._state,
+        t2 = new P._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace);
+      if ((t1 & 1) !== 0) {
+        _this._state = (t1 | 16) >>> 0;
+        _this._cancel$0();
+        cancelFuture = _this._cancelFuture;
+        if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture())
+          cancelFuture.whenComplete$1(t2);
+        else
+          t2.call$0();
+      } else {
+        t2.call$0();
+        _this._checkState$1((t1 & 4) !== 0);
+      }
+    },
+    _sendDone$0: function() {
+      var cancelFuture, _this = this,
+        t1 = new P._BufferingStreamSubscription__sendDone_sendDone(_this);
+      _this._cancel$0();
+      _this._state = (_this._state | 16) >>> 0;
+      cancelFuture = _this._cancelFuture;
+      if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture())
+        cancelFuture.whenComplete$1(t1);
+      else
+        t1.call$0();
+    },
+    _guardCallback$1: function(callback) {
+      var t1, _this = this;
+      type$.void_Function._as(callback);
+      t1 = _this._state;
+      _this._state = (t1 | 32) >>> 0;
+      callback.call$0();
+      _this._state = (_this._state & 4294967263) >>> 0;
+      _this._checkState$1((t1 & 4) !== 0);
+    },
+    _checkState$1: function(wasInputPaused) {
+      var t2, isInputPaused, _this = this,
+        t1 = _this._state;
+      if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent == null) {
+        t1 = _this._state = (t1 & 4294967231) >>> 0;
+        if ((t1 & 4) !== 0)
+          if (t1 < 128) {
+            t2 = _this._pending;
+            t2 = t2 == null ? null : t2.lastPendingEvent == null;
+            t2 = t2 !== false;
+          } else
+            t2 = false;
+        else
+          t2 = false;
+        if (t2) {
+          t1 = (t1 & 4294967291) >>> 0;
+          _this._state = t1;
+        }
+      }
+      for (; true; wasInputPaused = isInputPaused) {
+        if ((t1 & 8) !== 0) {
+          _this.set$_pending(null);
+          return;
+        }
+        isInputPaused = (t1 & 4) !== 0;
+        if (wasInputPaused === isInputPaused)
+          break;
+        _this._state = (t1 ^ 32) >>> 0;
+        if (isInputPaused)
+          _this._onPause$0();
+        else
+          _this._onResume$0();
+        t1 = (_this._state & 4294967263) >>> 0;
+        _this._state = t1;
+      }
+      if ((t1 & 64) !== 0 && t1 < 128)
+        _this._pending.schedule$1(_this);
+    },
+    set$_async$_onData: function(_onData) {
+      this._async$_onData = H._instanceType(this)._eval$1("~(_BufferingStreamSubscription.T)")._as(_onData);
+    },
+    set$_pending: function(_pending) {
+      this._pending = H._instanceType(this)._eval$1("_PendingEvents<_BufferingStreamSubscription.T>?")._as(_pending);
+    },
+    $isStreamSubscription: 1,
+    $is_EventSink: 1,
+    $is_EventDispatch: 1
+  };
+  P._BufferingStreamSubscription__sendError_sendError.prototype = {
+    call$0: function() {
+      var onError, t3, t4,
+        t1 = this.$this,
+        t2 = t1._state;
+      if ((t2 & 8) !== 0 && (t2 & 16) === 0)
+        return;
+      t1._state = (t2 | 32) >>> 0;
+      onError = t1._onError;
+      t2 = this.error;
+      t3 = type$.Object;
+      t4 = t1._zone;
+      if (type$.void_Function_Object_StackTrace._is(onError))
+        t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, type$.StackTrace);
+      else
+        t4.runUnaryGuarded$1$2(type$.void_Function_Object._as(onError), t2, t3);
+      t1._state = (t1._state & 4294967263) >>> 0;
+    },
+    $signature: 0
+  };
+  P._BufferingStreamSubscription__sendDone_sendDone.prototype = {
+    call$0: function() {
+      var t1 = this.$this,
+        t2 = t1._state;
+      if ((t2 & 16) === 0)
+        return;
+      t1._state = (t2 | 42) >>> 0;
+      t1._zone.runGuarded$1(t1._onDone);
+      t1._state = (t1._state & 4294967263) >>> 0;
+    },
+    $signature: 0
+  };
+  P._StreamImpl.prototype = {
+    listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
+      var t1 = H._instanceType(this);
+      t1._eval$1("~(1)?")._as(onData);
+      type$.nullable_void_Function._as(onDone);
+      return this._controller._subscribe$4(t1._eval$1("~(1)?")._as(onData), onError, onDone, cancelOnError === true);
+    },
+    listen$2$onDone: function(onData, onDone) {
+      return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, null);
+    },
+    listen$3$onDone$onError: function(onData, onDone, onError) {
+      return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError);
+    }
+  };
+  P._DelayedEvent.prototype = {
+    set$next: function(next) {
+      this.next = type$.nullable__DelayedEvent_dynamic._as(next);
+    },
+    get$next: function() {
+      return this.next;
+    }
+  };
+  P._DelayedData.prototype = {
+    perform$1: function(dispatch) {
+      this.$ti._eval$1("_EventDispatch<1>")._as(dispatch)._sendData$1(this.value);
+    }
+  };
+  P._DelayedError.prototype = {
+    perform$1: function(dispatch) {
+      dispatch._sendError$2(this.error, this.stackTrace);
+    }
+  };
+  P._DelayedDone.prototype = {
+    perform$1: function(dispatch) {
+      dispatch._sendDone$0();
+    },
+    get$next: function() {
+      return null;
+    },
+    set$next: function(_) {
+      throw H.wrapException(P.StateError$("No events after a done."));
+    },
+    $is_DelayedEvent: 1
+  };
+  P._PendingEvents.prototype = {
+    schedule$1: function(dispatch) {
+      var t1, _this = this;
+      _this.$ti._eval$1("_EventDispatch<1>")._as(dispatch);
+      t1 = _this._state;
+      if (t1 === 1)
+        return;
+      if (t1 >= 1) {
+        _this._state = 1;
+        return;
+      }
+      P.scheduleMicrotask(new P._PendingEvents_schedule_closure(_this, dispatch));
+      _this._state = 1;
+    }
+  };
+  P._PendingEvents_schedule_closure.prototype = {
+    call$0: function() {
+      var t2, $event, nextEvent,
+        t1 = this.$this,
+        oldState = t1._state;
+      t1._state = 0;
+      if (oldState === 3)
+        return;
+      t2 = t1.$ti._eval$1("_EventDispatch<1>")._as(this.dispatch);
+      $event = t1.firstPendingEvent;
+      nextEvent = $event.get$next();
+      t1.firstPendingEvent = nextEvent;
+      if (nextEvent == null)
+        t1.lastPendingEvent = null;
+      $event.perform$1(t2);
+    },
+    $signature: 1
+  };
+  P._StreamImplEvents.prototype = {
+    add$1: function(_, $event) {
+      var _this = this,
+        lastEvent = _this.lastPendingEvent;
+      if (lastEvent == null)
+        _this.firstPendingEvent = _this.lastPendingEvent = $event;
+      else {
+        lastEvent.set$next($event);
+        _this.lastPendingEvent = $event;
+      }
+    }
+  };
+  P._DoneStreamSubscription.prototype = {
+    _schedule$0: function() {
+      var _this = this;
+      if ((_this._state & 2) !== 0)
+        return;
+      P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(_this.get$_sendDone()));
+      _this._state = (_this._state | 2) >>> 0;
+    },
+    onData$1: function(handleData) {
+      this.$ti._eval$1("~(1)?")._as(handleData);
+    },
+    pause$0: function() {
+      this._state += 4;
+    },
+    resume$0: function() {
+      var t1 = this._state;
+      if (t1 >= 4) {
+        t1 = this._state = t1 - 4;
+        if (t1 < 4 && (t1 & 1) === 0)
+          this._schedule$0();
+      }
+    },
+    cancel$0: function() {
+      return $.$get$Future__nullFuture();
+    },
+    _sendDone$0: function() {
+      var _this = this,
+        t1 = _this._state = (_this._state & 4294967293) >>> 0;
+      if (t1 >= 4)
+        return;
+      _this._state = (t1 | 1) >>> 0;
+      _this._zone.runGuarded$1(_this._onDone);
+    },
+    $isStreamSubscription: 1
+  };
+  P._StreamIterator.prototype = {
+    get$current: function() {
+      var _this = this;
+      if (_this._async$_subscription != null && _this._isPaused)
+        return _this.$ti._precomputed1._as(_this._stateData);
+      return _this.$ti._precomputed1._as(null);
+    },
+    moveNext$0: function() {
+      var future, _this = this,
+        subscription = _this._async$_subscription;
+      if (subscription != null) {
+        if (_this._isPaused) {
+          future = new P._Future($.Zone__current, type$._Future_bool);
+          _this._stateData = future;
+          _this._isPaused = false;
+          subscription.resume$0();
+          return future;
+        }
+        throw H.wrapException(P.StateError$("Already waiting for next."));
+      }
+      return _this._initializeOrDone$0();
+    },
+    _initializeOrDone$0: function() {
+      var _this = this,
+        stateData = _this._stateData;
+      if (stateData != null) {
+        _this.set$_async$_subscription(_this.$ti._eval$1("Stream<1>")._as(stateData).listen$4$cancelOnError$onDone$onError(_this.get$_async$_onData(), true, _this.get$_onDone(), _this.get$_onError()));
+        return _this._stateData = new P._Future($.Zone__current, type$._Future_bool);
+      }
+      return $.$get$Future__falseFuture();
+    },
+    cancel$0: function() {
+      var _this = this,
+        subscription = _this._async$_subscription,
+        stateData = _this._stateData;
+      _this._stateData = null;
+      if (subscription != null) {
+        _this.set$_async$_subscription(null);
+        if (!_this._isPaused)
+          type$._Future_bool._as(stateData)._asyncComplete$1(false);
+        return subscription.cancel$0();
+      }
+      return $.$get$Future__nullFuture();
+    },
+    _async$_onData$1: function(data) {
+      var moveNextFuture, t1, _this = this;
+      _this.$ti._precomputed1._as(data);
+      moveNextFuture = type$._Future_bool._as(_this._stateData);
+      _this._stateData = data;
+      _this._isPaused = true;
+      moveNextFuture._complete$1(true);
+      if (_this._isPaused) {
+        t1 = _this._async$_subscription;
+        if (t1 != null)
+          t1.pause$0();
+      }
+    },
+    _onError$2: function(error, stackTrace) {
+      var moveNextFuture;
+      type$.StackTrace._as(stackTrace);
+      moveNextFuture = type$._Future_bool._as(this._stateData);
+      this.set$_async$_subscription(null);
+      this._stateData = null;
+      moveNextFuture._completeError$2(error, stackTrace);
+    },
+    _onDone$0: function() {
+      var moveNextFuture = type$._Future_bool._as(this._stateData);
+      this.set$_async$_subscription(null);
+      this._stateData = null;
+      moveNextFuture._complete$1(false);
+    },
+    set$_async$_subscription: function(_subscription) {
+      this._async$_subscription = this.$ti._eval$1("StreamSubscription<1>?")._as(_subscription);
+    }
+  };
+  P._cancelAndValue_closure.prototype = {
+    call$0: function() {
+      return this.future._complete$1(this.value);
+    },
+    $signature: 0
+  };
+  P._ForwardingStream.prototype = {
+    listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
+      var t2, t3, t4, t5, t6,
+        t1 = this.$ti;
+      t1._eval$1("~(2)?")._as(onData);
+      type$.nullable_void_Function._as(onDone);
+      t2 = t1._rest[1];
+      t3 = $.Zone__current;
+      t4 = cancelOnError === true ? 1 : 0;
+      t5 = P._BufferingStreamSubscription__registerDataHandler(t3, onData, t2);
+      t6 = P._BufferingStreamSubscription__registerErrorHandler(t3, onError);
+      t1 = new P._ForwardingStreamSubscription(this, t5, t6, type$.void_Function._as(onDone), t3, t4, t1._eval$1("@<1>")._bind$1(t2)._eval$1("_ForwardingStreamSubscription<1,2>"));
+      t1.set$_async$_subscription(this._async$_source.listen$3$onDone$onError(t1.get$_handleData(), t1.get$_handleDone(), t1.get$_handleError()));
+      return t1;
+    },
+    listen$3$onDone$onError: function(onData, onDone, onError) {
+      return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError);
+    }
+  };
+  P._ForwardingStreamSubscription.prototype = {
+    _add$1: function(data) {
+      this.$ti._rest[1]._as(data);
+      if ((this._state & 2) !== 0)
+        return;
+      this.super$_BufferingStreamSubscription$_add(data);
+    },
+    _addError$2: function(error, stackTrace) {
+      if ((this._state & 2) !== 0)
+        return;
+      this.super$_BufferingStreamSubscription$_addError(error, stackTrace);
+    },
+    _onPause$0: function() {
+      var t1 = this._async$_subscription;
+      if (t1 != null)
+        t1.pause$0();
+    },
+    _onResume$0: function() {
+      var t1 = this._async$_subscription;
+      if (t1 != null)
+        t1.resume$0();
+    },
+    _onCancel$0: function() {
+      var subscription = this._async$_subscription;
+      if (subscription != null) {
+        this.set$_async$_subscription(null);
+        return subscription.cancel$0();
+      }
+      return null;
+    },
+    _handleData$1: function(data) {
+      this._stream._handleData$2(this.$ti._precomputed1._as(data), this);
+    },
+    _handleError$2: function(error, stackTrace) {
+      type$.StackTrace._as(stackTrace);
+      this._stream.$ti._eval$1("_EventSink<2>")._as(this)._addError$2(error, stackTrace);
+    },
+    _handleDone$0: function() {
+      this._stream.$ti._eval$1("_EventSink<2>")._as(this)._close$0();
+    },
+    set$_async$_subscription: function(_subscription) {
+      this._async$_subscription = this.$ti._eval$1("StreamSubscription<1>?")._as(_subscription);
+    }
+  };
+  P._MapStream.prototype = {
+    _handleData$2: function(inputEvent, sink) {
+      var outputEvent, e, s, exception,
+        t1 = this.$ti;
+      t1._precomputed1._as(inputEvent);
+      t1._eval$1("_EventSink<2>")._as(sink);
+      outputEvent = null;
+      try {
+        outputEvent = this._transform.call$1(inputEvent);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        sink._addError$2(e, s);
+        return;
+      }
+      sink._add$1(outputEvent);
+    }
+  };
+  P.AsyncError.prototype = {
+    toString$0: function(_) {
+      return H.S(this.error);
+    },
+    $isError0: 1,
+    get$stackTrace: function() {
+      return this.stackTrace;
+    }
+  };
+  P._Zone.prototype = {$isZone: 1};
+  P._rootHandleUncaughtError_closure.prototype = {
+    call$0: function() {
+      var error = H.wrapException(this.error);
+      error.stack = J.toString$0$(this.stackTrace);
+      throw error;
+    },
+    $signature: 1
+  };
+  P._RootZone.prototype = {
+    runGuarded$1: function(f) {
+      var e, s, exception, _null = null;
+      type$.void_Function._as(f);
+      try {
+        if (C.C__RootZone === $.Zone__current) {
+          f.call$0();
+          return;
+        }
+        P._rootRun(_null, _null, this, f, type$.void);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s));
+      }
+    },
+    runUnaryGuarded$1$2: function(f, arg, $T) {
+      var e, s, exception, _null = null;
+      $T._eval$1("~(0)")._as(f);
+      $T._as(arg);
+      try {
+        if (C.C__RootZone === $.Zone__current) {
+          f.call$1(arg);
+          return;
+        }
+        P._rootRunUnary(_null, _null, this, f, arg, type$.void, $T);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s));
+      }
+    },
+    runBinaryGuarded$2$3: function(f, arg1, arg2, T1, T2) {
+      var e, s, exception, _null = null;
+      T1._eval$1("@<0>")._bind$1(T2)._eval$1("~(1,2)")._as(f);
+      T1._as(arg1);
+      T2._as(arg2);
+      try {
+        if (C.C__RootZone === $.Zone__current) {
+          f.call$2(arg1, arg2);
+          return;
+        }
+        P._rootRunBinary(_null, _null, this, f, arg1, arg2, type$.void, T1, T2);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s));
+      }
+    },
+    bindCallback$1$1: function(f, $R) {
+      return new P._RootZone_bindCallback_closure(this, $R._eval$1("0()")._as(f), $R);
+    },
+    bindCallbackGuarded$1: function(f) {
+      return new P._RootZone_bindCallbackGuarded_closure(this, type$.void_Function._as(f));
+    },
+    bindUnaryCallbackGuarded$1$1: function(f, $T) {
+      return new P._RootZone_bindUnaryCallbackGuarded_closure(this, $T._eval$1("~(0)")._as(f), $T);
+    },
+    $index: function(_, key) {
+      return null;
+    },
+    run$1$1: function(f, $R) {
+      $R._eval$1("0()")._as(f);
+      if ($.Zone__current === C.C__RootZone)
+        return f.call$0();
+      return P._rootRun(null, null, this, f, $R);
+    },
+    runUnary$2$2: function(f, arg, $R, $T) {
+      $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f);
+      $T._as(arg);
+      if ($.Zone__current === C.C__RootZone)
+        return f.call$1(arg);
+      return P._rootRunUnary(null, null, this, f, arg, $R, $T);
+    },
+    runBinary$3$3: function(f, arg1, arg2, $R, T1, T2) {
+      $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f);
+      T1._as(arg1);
+      T2._as(arg2);
+      if ($.Zone__current === C.C__RootZone)
+        return f.call$2(arg1, arg2);
+      return P._rootRunBinary(null, null, this, f, arg1, arg2, $R, T1, T2);
+    },
+    registerBinaryCallback$3$1: function(f, $R, T1, T2) {
+      return $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f);
+    }
+  };
+  P._RootZone_bindCallback_closure.prototype = {
+    call$0: function() {
+      return this.$this.run$1$1(this.f, this.R);
+    },
+    $signature: function() {
+      return this.R._eval$1("0()");
+    }
+  };
+  P._RootZone_bindCallbackGuarded_closure.prototype = {
+    call$0: function() {
+      return this.$this.runGuarded$1(this.f);
+    },
+    $signature: 0
+  };
+  P._RootZone_bindUnaryCallbackGuarded_closure.prototype = {
+    call$1: function(arg) {
+      var t1 = this.T;
+      return this.$this.runUnaryGuarded$1$2(this.f, t1._as(arg), t1);
+    },
+    $signature: function() {
+      return this.T._eval$1("~(0)");
+    }
+  };
+  P._LinkedHashSet.prototype = {
+    get$iterator: function(_) {
+      var _this = this,
+        t1 = new P._LinkedHashSetIterator(_this, _this._collection$_modifications, H._instanceType(_this)._eval$1("_LinkedHashSetIterator<1>"));
+      t1._collection$_cell = _this._collection$_first;
+      return t1;
+    },
+    get$length: function(_) {
+      return this._collection$_length;
+    },
+    add$1: function(_, element) {
+      var strings, nums, _this = this;
+      H._instanceType(_this)._precomputed1._as(element);
+      if (typeof element == "string" && element !== "__proto__") {
+        strings = _this._collection$_strings;
+        return _this._collection$_addHashTableEntry$2(strings == null ? _this._collection$_strings = P._LinkedHashSet__newHashTable() : strings, element);
+      } else if (typeof element == "number" && (element & 1073741823) === element) {
+        nums = _this._collection$_nums;
+        return _this._collection$_addHashTableEntry$2(nums == null ? _this._collection$_nums = P._LinkedHashSet__newHashTable() : nums, element);
+      } else
+        return _this._collection$_add$1(element);
+    },
+    _collection$_add$1: function(element) {
+      var rest, hash, bucket, _this = this;
+      H._instanceType(_this)._precomputed1._as(element);
+      rest = _this._collection$_rest;
+      if (rest == null)
+        rest = _this._collection$_rest = P._LinkedHashSet__newHashTable();
+      hash = _this._computeHashCode$1(element);
+      bucket = rest[hash];
+      if (bucket == null)
+        rest[hash] = [_this._collection$_newLinkedCell$1(element)];
+      else {
+        if (_this._findBucketIndex$2(bucket, element) >= 0)
+          return false;
+        bucket.push(_this._collection$_newLinkedCell$1(element));
+      }
+      return true;
+    },
+    _collection$_addHashTableEntry$2: function(table, element) {
+      H._instanceType(this)._precomputed1._as(element);
+      if (type$.nullable__LinkedHashSetCell._as(table[element]) != null)
+        return false;
+      table[element] = this._collection$_newLinkedCell$1(element);
+      return true;
+    },
+    _collection$_newLinkedCell$1: function(element) {
+      var _this = this,
+        cell = new P._LinkedHashSetCell(H._instanceType(_this)._precomputed1._as(element));
+      if (_this._collection$_first == null)
+        _this._collection$_first = _this._collection$_last = cell;
+      else
+        _this._collection$_last = _this._collection$_last._collection$_next = cell;
+      ++_this._collection$_length;
+      _this._collection$_modifications = 1073741823 & _this._collection$_modifications + 1;
+      return cell;
+    },
+    _computeHashCode$1: function(element) {
+      return J.get$hashCode$(element) & 1073741823;
+    },
+    _findBucketIndex$2: function(bucket, element) {
+      var $length, i;
+      if (bucket == null)
+        return -1;
+      $length = bucket.length;
+      for (i = 0; i < $length; ++i)
+        if (J.$eq$(bucket[i]._element, element))
+          return i;
+      return -1;
+    }
+  };
+  P._LinkedHashSetCell.prototype = {};
+  P._LinkedHashSetIterator.prototype = {
+    get$current: function() {
+      return this._collection$_current;
+    },
+    moveNext$0: function() {
+      var _this = this,
+        cell = _this._collection$_cell,
+        t1 = _this._set;
+      if (_this._collection$_modifications !== t1._collection$_modifications)
+        throw H.wrapException(P.ConcurrentModificationError$(t1));
+      else if (cell == null) {
+        _this.set$_collection$_current(null);
+        return false;
+      } else {
+        _this.set$_collection$_current(_this.$ti._eval$1("1?")._as(cell._element));
+        _this._collection$_cell = cell._collection$_next;
+        return true;
+      }
+    },
+    set$_collection$_current: function(_current) {
+      this._collection$_current = this.$ti._eval$1("1?")._as(_current);
+    },
+    $isIterator: 1
+  };
+  P.ListMixin.prototype = {
+    get$iterator: function(receiver) {
+      return new H.ListIterator(receiver, this.get$length(receiver), H.instanceType(receiver)._eval$1("ListIterator<ListMixin.E>"));
+    },
+    elementAt$1: function(receiver, index) {
+      return this.$index(receiver, index);
+    },
+    get$isNotEmpty: function(receiver) {
+      return this.get$length(receiver) !== 0;
+    },
+    map$1$1: function(receiver, f, $T) {
+      var t1 = H.instanceType(receiver);
+      return new H.MappedListIterable(receiver, t1._bind$1($T)._eval$1("1(ListMixin.E)")._as(f), t1._eval$1("@<ListMixin.E>")._bind$1($T)._eval$1("MappedListIterable<1,2>"));
+    },
+    map$1: function($receiver, f) {
+      return this.map$1$1($receiver, f, type$.dynamic);
+    },
+    toList$1$growable: function(receiver, growable) {
+      var t1, first, result, i, _this = this;
+      if (_this.get$length(receiver) === 0) {
+        t1 = J.JSArray_JSArray$growable(0, H.instanceType(receiver)._eval$1("ListMixin.E"));
+        return t1;
+      }
+      first = _this.$index(receiver, 0);
+      result = P.List_List$filled(_this.get$length(receiver), first, true, H.instanceType(receiver)._eval$1("ListMixin.E"));
+      for (i = 1; i < _this.get$length(receiver); ++i)
+        C.JSArray_methods.$indexSet(result, i, _this.$index(receiver, i));
+      return result;
+    },
+    toList$0: function($receiver) {
+      return this.toList$1$growable($receiver, true);
+    },
+    $add: function(receiver, other) {
+      var t2, cur,
+        t1 = H.instanceType(receiver);
+      t1._eval$1("List<ListMixin.E>")._as(other);
+      t2 = H.setRuntimeTypeInfo([], t1._eval$1("JSArray<ListMixin.E>"));
+      for (t1 = new H.ListIterator(receiver, this.get$length(receiver), t1._eval$1("ListIterator<ListMixin.E>")); t1.moveNext$0();) {
+        cur = t1._current;
+        C.JSArray_methods.add$1(t2, cur);
+      }
+      for (t1 = other.get$iterator(other); t1.moveNext$0();)
+        C.JSArray_methods.add$1(t2, t1.get$current());
+      return t2;
+    },
+    toString$0: function(receiver) {
+      return P.IterableBase_iterableToFullString(receiver, "[", "]");
+    }
+  };
+  P.MapBase.prototype = {};
+  P.MapBase_mapToString_closure.prototype = {
+    call$2: function(k, v) {
+      var t2,
+        t1 = this._box_0;
+      if (!t1.first)
+        this.result._contents += ", ";
+      t1.first = false;
+      t1 = this.result;
+      t2 = t1._contents += H.S(k);
+      t1._contents = t2 + ": ";
+      t1._contents += H.S(v);
+    },
+    $signature: 13
+  };
+  P.MapMixin.prototype = {
+    forEach$1: function(_, action) {
+      var t1, key;
+      H._instanceType(this)._eval$1("~(MapMixin.K,MapMixin.V)")._as(action);
+      for (t1 = this.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) {
+        key = t1.get$current();
+        action.call$2(key, this.$index(0, key));
+      }
+    },
+    map$2$1: function(_, transform, K2, V2) {
+      var result, t1, key, entry;
+      H._instanceType(this)._bind$1(K2)._bind$1(V2)._eval$1("MapEntry<1,2>(MapMixin.K,MapMixin.V)")._as(transform);
+      result = P.LinkedHashMap_LinkedHashMap$_empty(K2, V2);
+      for (t1 = this.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) {
+        key = t1.get$current();
+        entry = transform.call$2(key, this.$index(0, key));
+        result.$indexSet(0, C.JSNull_methods.get$key(entry), entry.get$value());
+      }
+      return result;
+    },
+    map$1: function($receiver, transform) {
+      return this.map$2$1($receiver, transform, type$.dynamic, type$.dynamic);
+    },
+    containsKey$1: function(key) {
+      return this.get$keys().contains$1(0, key);
+    },
+    get$length: function(_) {
+      var t1 = this.get$keys();
+      return t1.get$length(t1);
+    },
+    get$isEmpty: function(_) {
+      var t1 = this.get$keys();
+      return t1.get$isEmpty(t1);
+    },
+    toString$0: function(_) {
+      return P.MapBase_mapToString(this);
+    },
+    $isMap: 1
+  };
+  P._UnmodifiableMapMixin.prototype = {
+    $indexSet: function(_, key, value) {
+      var t1 = H._instanceType(this);
+      t1._precomputed1._as(key);
+      t1._rest[1]._as(value);
+      throw H.wrapException(P.UnsupportedError$("Cannot modify unmodifiable map"));
+    }
+  };
+  P.MapView.prototype = {
+    $index: function(_, key) {
+      return this._collection$_map.$index(0, key);
+    },
+    $indexSet: function(_, key, value) {
+      var t1 = H._instanceType(this);
+      this._collection$_map.$indexSet(0, t1._precomputed1._as(key), t1._rest[1]._as(value));
+    },
+    containsKey$1: function(key) {
+      return this._collection$_map.containsKey$1(key);
+    },
+    forEach$1: function(_, action) {
+      this._collection$_map.forEach$1(0, H._instanceType(this)._eval$1("~(1,2)")._as(action));
+    },
+    get$isEmpty: function(_) {
+      var t1 = this._collection$_map;
+      return t1.get$isEmpty(t1);
+    },
+    get$length: function(_) {
+      var t1 = this._collection$_map;
+      return t1.get$length(t1);
+    },
+    get$keys: function() {
+      return this._collection$_map.get$keys();
+    },
+    toString$0: function(_) {
+      return P.MapBase_mapToString(this._collection$_map);
+    },
+    map$2$1: function(_, transform, K2, V2) {
+      return this._collection$_map.map$2$1(0, H._instanceType(this)._bind$1(K2)._bind$1(V2)._eval$1("MapEntry<1,2>(3,4)")._as(transform), K2, V2);
+    },
+    map$1: function($receiver, transform) {
+      return this.map$2$1($receiver, transform, type$.dynamic, type$.dynamic);
+    },
+    $isMap: 1
+  };
+  P.UnmodifiableMapView.prototype = {};
+  P.ListQueue.prototype = {
+    get$iterator: function(_) {
+      var _this = this;
+      return new P._ListQueueIterator(_this, _this._tail, _this._modificationCount, _this._head, _this.$ti._eval$1("_ListQueueIterator<1>"));
+    },
+    get$isEmpty: function(_) {
+      return this._head === this._tail;
+    },
+    get$length: function(_) {
+      return (this._tail - this._head & this._collection$_table.length - 1) >>> 0;
+    },
+    elementAt$1: function(_, index) {
+      var t1, t2, t3, _this = this,
+        $length = _this.get$length(_this);
+      if (0 > index || index >= $length)
+        H.throwExpression(P.IndexError$(index, _this, "index", null, $length));
+      t1 = _this._collection$_table;
+      t2 = t1.length;
+      t3 = (_this._head + index & t2 - 1) >>> 0;
+      if (t3 < 0 || t3 >= t2)
+        return H.ioore(t1, t3);
+      return t1[t3];
+    },
+    toString$0: function(_) {
+      return P.IterableBase_iterableToFullString(this, "{", "}");
+    },
+    set$_collection$_table: function(_table) {
+      this._collection$_table = this.$ti._eval$1("List<1?>")._as(_table);
+    },
+    $isQueue: 1
+  };
+  P._ListQueueIterator.prototype = {
+    get$current: function() {
+      var cur = this._collection$_current;
+      return cur;
+    },
+    moveNext$0: function() {
+      var t2, t3, _this = this,
+        t1 = _this._queue;
+      if (_this._modificationCount !== t1._modificationCount)
+        H.throwExpression(P.ConcurrentModificationError$(t1));
+      t2 = _this._position;
+      if (t2 === _this._end) {
+        _this.set$_collection$_current(null);
+        return false;
+      }
+      t3 = t1._collection$_table;
+      if (t2 >= t3.length)
+        return H.ioore(t3, t2);
+      _this.set$_collection$_current(t3[t2]);
+      _this._position = (_this._position + 1 & t1._collection$_table.length - 1) >>> 0;
+      return true;
+    },
+    set$_collection$_current: function(_current) {
+      this._collection$_current = this.$ti._eval$1("1?")._as(_current);
+    },
+    $isIterator: 1
+  };
+  P._SetBase.prototype = {
+    map$1: function(_, f) {
+      var t1 = H._instanceType(this);
+      return new H.EfficientLengthMappedIterable(this, t1._eval$1("@(1)")._as(f), t1._eval$1("EfficientLengthMappedIterable<1,@>"));
+    },
+    toString$0: function(_) {
+      return P.IterableBase_iterableToFullString(this, "{", "}");
+    },
+    $isEfficientLengthIterable: 1,
+    $isIterable: 1
+  };
+  P._UnmodifiableMapView_MapView__UnmodifiableMapMixin.prototype = {};
+  P._JsonMap.prototype = {
+    $index: function(_, key) {
+      var result,
+        t1 = this._processed;
+      if (t1 == null)
+        return this._data.$index(0, key);
+      else if (typeof key != "string")
+        return null;
+      else {
+        result = t1[key];
+        return typeof result == "undefined" ? this._process$1(key) : result;
+      }
+    },
+    get$length: function(_) {
+      var t1;
+      if (this._processed == null) {
+        t1 = this._data;
+        t1 = t1.get$length(t1);
+      } else
+        t1 = this._computeKeys$0().length;
+      return t1;
+    },
+    get$isEmpty: function(_) {
+      return this.get$length(this) === 0;
+    },
+    get$keys: function() {
+      if (this._processed == null)
+        return this._data.get$keys();
+      return new P._JsonMapKeyIterable(this);
+    },
+    $indexSet: function(_, key, value) {
+      var processed, original, _this = this;
+      if (_this._processed == null)
+        _this._data.$indexSet(0, key, value);
+      else if (_this.containsKey$1(key)) {
+        processed = _this._processed;
+        processed[key] = value;
+        original = _this._original;
+        if (original == null ? processed != null : original !== processed)
+          original[key] = null;
+      } else
+        _this._upgrade$0().$indexSet(0, key, value);
+    },
+    containsKey$1: function(key) {
+      if (this._processed == null)
+        return this._data.containsKey$1(key);
+      return Object.prototype.hasOwnProperty.call(this._original, key);
+    },
+    forEach$1: function(_, f) {
+      var keys, i, key, value, _this = this;
+      type$.void_Function_String_dynamic._as(f);
+      if (_this._processed == null)
+        return _this._data.forEach$1(0, f);
+      keys = _this._computeKeys$0();
+      for (i = 0; i < keys.length; ++i) {
+        key = keys[i];
+        value = _this._processed[key];
+        if (typeof value == "undefined") {
+          value = P._convertJsonToDartLazy(_this._original[key]);
+          _this._processed[key] = value;
+        }
+        f.call$2(key, value);
+        if (keys !== _this._data)
+          throw H.wrapException(P.ConcurrentModificationError$(_this));
+      }
+    },
+    _computeKeys$0: function() {
+      var keys = type$.nullable_List_dynamic._as(this._data);
+      if (keys == null)
+        keys = this._data = H.setRuntimeTypeInfo(Object.keys(this._original), type$.JSArray_String);
+      return keys;
+    },
+    _upgrade$0: function() {
+      var result, keys, i, t1, key, _this = this;
+      if (_this._processed == null)
+        return _this._data;
+      result = P.LinkedHashMap_LinkedHashMap$_empty(type$.String, type$.dynamic);
+      keys = _this._computeKeys$0();
+      for (i = 0; t1 = keys.length, i < t1; ++i) {
+        key = keys[i];
+        result.$indexSet(0, key, _this.$index(0, key));
+      }
+      if (t1 === 0)
+        C.JSArray_methods.add$1(keys, "");
+      else
+        C.JSArray_methods.set$length(keys, 0);
+      _this._original = _this._processed = null;
+      return _this._data = result;
+    },
+    _process$1: function(key) {
+      var result;
+      if (!Object.prototype.hasOwnProperty.call(this._original, key))
+        return null;
+      result = P._convertJsonToDartLazy(this._original[key]);
+      return this._processed[key] = result;
+    }
+  };
+  P._JsonMapKeyIterable.prototype = {
+    get$length: function(_) {
+      var t1 = this._parent;
+      return t1.get$length(t1);
+    },
+    elementAt$1: function(_, index) {
+      var t1 = this._parent;
+      if (t1._processed == null)
+        t1 = t1.get$keys().elementAt$1(0, index);
+      else {
+        t1 = t1._computeKeys$0();
+        if (index < 0 || index >= t1.length)
+          return H.ioore(t1, index);
+        t1 = t1[index];
+      }
+      return t1;
+    },
+    get$iterator: function(_) {
+      var t1 = this._parent;
+      if (t1._processed == null) {
+        t1 = t1.get$keys();
+        t1 = t1.get$iterator(t1);
+      } else {
+        t1 = t1._computeKeys$0();
+        t1 = new J.ArrayIterator(t1, t1.length, H._arrayInstanceType(t1)._eval$1("ArrayIterator<1>"));
+      }
+      return t1;
+    },
+    contains$1: function(_, key) {
+      return this._parent.containsKey$1(key);
+    }
+  };
+  P.Utf8Decoder_closure.prototype = {
+    call$0: function() {
+      var t1, exception;
+      try {
+        t1 = new TextDecoder("utf-8", {fatal: true});
+        return t1;
+      } catch (exception) {
+        H.unwrapException(exception);
+      }
+      return null;
+    },
+    $signature: 14
+  };
+  P.Utf8Decoder_closure0.prototype = {
+    call$0: function() {
+      var t1, exception;
+      try {
+        t1 = new TextDecoder("utf-8", {fatal: false});
+        return t1;
+      } catch (exception) {
+        H.unwrapException(exception);
+      }
+      return null;
+    },
+    $signature: 14
+  };
+  P.Codec.prototype = {};
+  P.Converter.prototype = {};
+  P.JsonUnsupportedObjectError.prototype = {
+    toString$0: function(_) {
+      var safeString = P.Error_safeToString(this.unsupportedObject);
+      return (this.cause != null ? "Converting object to an encodable object failed:" : "Converting object did not return an encodable object:") + " " + safeString;
+    }
+  };
+  P.JsonCyclicError.prototype = {
+    toString$0: function(_) {
+      return "Cyclic error in JSON stringify";
+    }
+  };
+  P.JsonCodec.prototype = {
+    decode$2$reviver: function(source, reviver) {
+      var t1;
+      type$.nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object._as(reviver);
+      t1 = P._parseJson(source, this.get$decoder()._reviver);
+      return t1;
+    },
+    encode$2$toEncodable: function(value, toEncodable) {
+      var t1;
+      type$.nullable_nullable_Object_Function_dynamic._as(toEncodable);
+      t1 = P._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null);
+      return t1;
+    },
+    encode$1: function(value) {
+      return this.encode$2$toEncodable(value, null);
+    },
+    get$encoder: function() {
+      return C.JsonEncoder_null;
+    },
+    get$decoder: function() {
+      return C.JsonDecoder_null;
+    }
+  };
+  P.JsonEncoder.prototype = {};
+  P.JsonDecoder.prototype = {};
+  P._JsonStringifier.prototype = {
+    writeStringContent$1: function(s) {
+      var t1, t2, offset, i, charCode, t3, t4,
+        $length = s.length;
+      for (t1 = J.getInterceptor$s(s), t2 = this._sink, offset = 0, i = 0; i < $length; ++i) {
+        charCode = t1._codeUnitAt$1(s, i);
+        if (charCode > 92) {
+          if (charCode >= 55296) {
+            t3 = charCode & 64512;
+            if (t3 === 55296) {
+              t4 = i + 1;
+              t4 = !(t4 < $length && (C.JSString_methods._codeUnitAt$1(s, t4) & 64512) === 56320);
+            } else
+              t4 = false;
+            if (!t4)
+              if (t3 === 56320) {
+                t3 = i - 1;
+                t3 = !(t3 >= 0 && (C.JSString_methods.codeUnitAt$1(s, t3) & 64512) === 55296);
+              } else
+                t3 = false;
+            else
+              t3 = true;
+            if (t3) {
+              if (i > offset)
+                t2._contents += C.JSString_methods.substring$2(s, offset, i);
+              offset = i + 1;
+              t2._contents += H.Primitives_stringFromCharCode(92);
+              t2._contents += H.Primitives_stringFromCharCode(117);
+              t2._contents += H.Primitives_stringFromCharCode(100);
+              t3 = charCode >>> 8 & 15;
+              t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3);
+              t3 = charCode >>> 4 & 15;
+              t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3);
+              t3 = charCode & 15;
+              t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3);
+            }
+          }
+          continue;
+        }
+        if (charCode < 32) {
+          if (i > offset)
+            t2._contents += C.JSString_methods.substring$2(s, offset, i);
+          offset = i + 1;
+          t2._contents += H.Primitives_stringFromCharCode(92);
+          switch (charCode) {
+            case 8:
+              t2._contents += H.Primitives_stringFromCharCode(98);
+              break;
+            case 9:
+              t2._contents += H.Primitives_stringFromCharCode(116);
+              break;
+            case 10:
+              t2._contents += H.Primitives_stringFromCharCode(110);
+              break;
+            case 12:
+              t2._contents += H.Primitives_stringFromCharCode(102);
+              break;
+            case 13:
+              t2._contents += H.Primitives_stringFromCharCode(114);
+              break;
+            default:
+              t2._contents += H.Primitives_stringFromCharCode(117);
+              t2._contents += H.Primitives_stringFromCharCode(48);
+              t2._contents += H.Primitives_stringFromCharCode(48);
+              t3 = charCode >>> 4 & 15;
+              t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3);
+              t3 = charCode & 15;
+              t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3);
+              break;
+          }
+        } else if (charCode === 34 || charCode === 92) {
+          if (i > offset)
+            t2._contents += C.JSString_methods.substring$2(s, offset, i);
+          offset = i + 1;
+          t2._contents += H.Primitives_stringFromCharCode(92);
+          t2._contents += H.Primitives_stringFromCharCode(charCode);
+        }
+      }
+      if (offset === 0)
+        t2._contents += H.S(s);
+      else if (offset < $length)
+        t2._contents += t1.substring$2(s, offset, $length);
+    },
+    _checkCycle$1: function(object) {
+      var t1, t2, i, t3;
+      for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) {
+        t3 = t1[i];
+        if (object == null ? t3 == null : object === t3)
+          throw H.wrapException(new P.JsonCyclicError(object, null));
+      }
+      C.JSArray_methods.add$1(t1, object);
+    },
+    writeObject$1: function(object) {
+      var customJson, e, t1, exception, _this = this;
+      if (_this.writeJsonValue$1(object))
+        return;
+      _this._checkCycle$1(object);
+      try {
+        customJson = _this._toEncodable.call$1(object);
+        if (!_this.writeJsonValue$1(customJson)) {
+          t1 = P.JsonUnsupportedObjectError$(object, null, _this.get$_partialResult());
+          throw H.wrapException(t1);
+        }
+        t1 = _this._seen;
+        if (0 >= t1.length)
+          return H.ioore(t1, -1);
+        t1.pop();
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        t1 = P.JsonUnsupportedObjectError$(object, e, _this.get$_partialResult());
+        throw H.wrapException(t1);
+      }
+    },
+    writeJsonValue$1: function(object) {
+      var t1, success, _this = this;
+      if (typeof object == "number") {
+        if (!isFinite(object))
+          return false;
+        _this._sink._contents += C.JSNumber_methods.toString$0(object);
+        return true;
+      } else if (object === true) {
+        _this._sink._contents += "true";
+        return true;
+      } else if (object === false) {
+        _this._sink._contents += "false";
+        return true;
+      } else if (object == null) {
+        _this._sink._contents += "null";
+        return true;
+      } else if (typeof object == "string") {
+        t1 = _this._sink;
+        t1._contents += '"';
+        _this.writeStringContent$1(object);
+        t1._contents += '"';
+        return true;
+      } else if (type$.List_dynamic._is(object)) {
+        _this._checkCycle$1(object);
+        _this.writeList$1(object);
+        t1 = _this._seen;
+        if (0 >= t1.length)
+          return H.ioore(t1, -1);
+        t1.pop();
+        return true;
+      } else if (type$.Map_dynamic_dynamic._is(object)) {
+        _this._checkCycle$1(object);
+        success = _this.writeMap$1(object);
+        t1 = _this._seen;
+        if (0 >= t1.length)
+          return H.ioore(t1, -1);
+        t1.pop();
+        return success;
+      } else
+        return false;
+    },
+    writeList$1: function(list) {
+      var t2, i,
+        t1 = this._sink;
+      t1._contents += "[";
+      t2 = J.getInterceptor$ax(list);
+      if (t2.get$isNotEmpty(list)) {
+        this.writeObject$1(t2.$index(list, 0));
+        for (i = 1; i < t2.get$length(list); ++i) {
+          t1._contents += ",";
+          this.writeObject$1(t2.$index(list, i));
+        }
+      }
+      t1._contents += "]";
+    },
+    writeMap$1: function(map) {
+      var keyValueList, i, t1, separator, t2, _this = this, _box_0 = {};
+      if (map.get$isEmpty(map)) {
+        _this._sink._contents += "{}";
+        return true;
+      }
+      keyValueList = P.List_List$filled(map.get$length(map) * 2, null, false, type$.nullable_Object);
+      i = _box_0.i = 0;
+      _box_0.allStringKeys = true;
+      map.forEach$1(0, new P._JsonStringifier_writeMap_closure(_box_0, keyValueList));
+      if (!_box_0.allStringKeys)
+        return false;
+      t1 = _this._sink;
+      t1._contents += "{";
+      for (separator = '"'; i < keyValueList.length; i += 2, separator = ',"') {
+        t1._contents += separator;
+        _this.writeStringContent$1(H._asStringS(keyValueList[i]));
+        t1._contents += '":';
+        t2 = i + 1;
+        if (t2 >= keyValueList.length)
+          return H.ioore(keyValueList, t2);
+        _this.writeObject$1(keyValueList[t2]);
+      }
+      t1._contents += "}";
+      return true;
+    }
+  };
+  P._JsonStringifier_writeMap_closure.prototype = {
+    call$2: function(key, value) {
+      var t1, t2;
+      if (typeof key != "string")
+        this._box_0.allStringKeys = false;
+      t1 = this.keyValueList;
+      t2 = this._box_0;
+      C.JSArray_methods.$indexSet(t1, t2.i++, key);
+      C.JSArray_methods.$indexSet(t1, t2.i++, value);
+    },
+    $signature: 13
+  };
+  P._JsonStringStringifier.prototype = {
+    get$_partialResult: function() {
+      var t1 = this._sink._contents;
+      return t1.charCodeAt(0) == 0 ? t1 : t1;
+    }
+  };
+  P.Utf8Decoder.prototype = {
+    convert$1: function(codeUnits) {
+      var t1, result;
+      type$.List_int._as(codeUnits);
+      t1 = this._allowMalformed;
+      result = P.Utf8Decoder__convertIntercepted(t1, codeUnits, 0, null);
+      if (result != null)
+        return result;
+      return new P._Utf8Decoder(t1).convertGeneral$4(codeUnits, 0, null, true);
+    }
+  };
+  P._Utf8Decoder.prototype = {
+    convertGeneral$4: function(codeUnits, start, maybeEnd, single) {
+      var end, result, t1, message, _this = this;
+      type$.List_int._as(codeUnits);
+      end = P.RangeError_checkValidRange(start, maybeEnd, codeUnits.length);
+      if (start === end)
+        return "";
+      result = _this._convertRecursive$4(codeUnits, start, end, true);
+      t1 = _this._convert$_state;
+      if ((t1 & 1) !== 0) {
+        message = P._Utf8Decoder_errorDescription(t1);
+        _this._convert$_state = 0;
+        throw H.wrapException(P.FormatException$(message, codeUnits, _this._charOrIndex));
+      }
+      return result;
+    },
+    _convertRecursive$4: function(bytes, start, end, single) {
+      var mid, s1, _this = this;
+      if (end - start > 1000) {
+        mid = C.JSInt_methods._tdivFast$1(start + end, 2);
+        s1 = _this._convertRecursive$4(bytes, start, mid, false);
+        if ((_this._convert$_state & 1) !== 0)
+          return s1;
+        return s1 + _this._convertRecursive$4(bytes, mid, end, single);
+      }
+      return _this.decodeGeneral$4(bytes, start, end, single);
+    },
+    decodeGeneral$4: function(bytes, start, end, single) {
+      var byte, t2, type, t3, i0, markEnd, i1, m, _this = this, _65533 = 65533,
+        state = _this._convert$_state,
+        char = _this._charOrIndex,
+        buffer = new P.StringBuffer(""),
+        i = start + 1,
+        t1 = bytes.length;
+      if (start < 0 || start >= t1)
+        return H.ioore(bytes, start);
+      byte = bytes[start];
+      $label0$0:
+        for (t2 = _this.allowMalformed; true;) {
+          for (; true; i = i0) {
+            type = C.JSString_methods._codeUnitAt$1("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHIHHHJEEBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKCCCCCCCCCCCCDCLONNNMEEEEEEEEEEE", byte) & 31;
+            char = state <= 32 ? byte & 61694 >>> type : (byte & 63 | char << 6) >>> 0;
+            state = C.JSString_methods._codeUnitAt$1(" \x000:XECCCCCN:lDb \x000:XECCCCCNvlDb \x000:XECCCCCN:lDb AAAAA\x00\x00\x00\x00\x00AAAAA00000AAAAA:::::AAAAAGG000AAAAA00KKKAAAAAG::::AAAAA:IIIIAAAAA000\x800AAAAA\x00\x00\x00\x00 AAAAA", state + type);
+            if (state === 0) {
+              buffer._contents += H.Primitives_stringFromCharCode(char);
+              if (i === end)
+                break $label0$0;
+              break;
+            } else if ((state & 1) !== 0) {
+              if (t2)
+                switch (state) {
+                  case 69:
+                  case 67:
+                    buffer._contents += H.Primitives_stringFromCharCode(_65533);
+                    break;
+                  case 65:
+                    buffer._contents += H.Primitives_stringFromCharCode(_65533);
+                    --i;
+                    break;
+                  default:
+                    t3 = buffer._contents += H.Primitives_stringFromCharCode(_65533);
+                    buffer._contents = t3 + H.Primitives_stringFromCharCode(_65533);
+                    break;
+                }
+              else {
+                _this._convert$_state = state;
+                _this._charOrIndex = i - 1;
+                return "";
+              }
+              state = 0;
+            }
+            if (i === end)
+              break $label0$0;
+            i0 = i + 1;
+            if (i < 0 || i >= t1)
+              return H.ioore(bytes, i);
+            byte = bytes[i];
+          }
+          i0 = i + 1;
+          if (i < 0 || i >= t1)
+            return H.ioore(bytes, i);
+          byte = bytes[i];
+          if (byte < 128) {
+            while (true) {
+              if (!(i0 < end)) {
+                markEnd = end;
+                break;
+              }
+              i1 = i0 + 1;
+              if (i0 < 0 || i0 >= t1)
+                return H.ioore(bytes, i0);
+              byte = bytes[i0];
+              if (byte >= 128) {
+                markEnd = i1 - 1;
+                i0 = i1;
+                break;
+              }
+              i0 = i1;
+            }
+            if (markEnd - i < 20)
+              for (m = i; m < markEnd; ++m) {
+                if (m >= t1)
+                  return H.ioore(bytes, m);
+                buffer._contents += H.Primitives_stringFromCharCode(bytes[m]);
+              }
+            else
+              buffer._contents += P.String_String$fromCharCodes(bytes, i, markEnd);
+            if (markEnd === end)
+              break $label0$0;
+            i = i0;
+          } else
+            i = i0;
+        }
+      if (single && state > 32)
+        if (t2)
+          buffer._contents += H.Primitives_stringFromCharCode(_65533);
+        else {
+          _this._convert$_state = 77;
+          _this._charOrIndex = end;
+          return "";
+        }
+      _this._convert$_state = state;
+      _this._charOrIndex = char;
+      t1 = buffer._contents;
+      return t1.charCodeAt(0) == 0 ? t1 : t1;
+    }
+  };
+  P._symbolMapToStringMap_closure.prototype = {
+    call$2: function(key, value) {
+      this.result.$indexSet(0, type$.Symbol._as(key).__internal$_name, value);
+    },
+    $signature: 15
+  };
+  P.NoSuchMethodError_toString_closure.prototype = {
+    call$2: function(key, value) {
+      var t1, t2, t3;
+      type$.Symbol._as(key);
+      t1 = this.sb;
+      t2 = this._box_0;
+      t1._contents += t2.comma;
+      t3 = t1._contents += H.S(key.__internal$_name);
+      t1._contents = t3 + ": ";
+      t1._contents += P.Error_safeToString(value);
+      t2.comma = ", ";
+    },
+    $signature: 15
+  };
+  P.bool.prototype = {};
+  P.DateTime.prototype = {
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof P.DateTime && this._value === other._value && this.isUtc === other.isUtc;
+    },
+    get$hashCode: function(_) {
+      var t1 = this._value;
+      return (t1 ^ C.JSInt_methods._shrOtherPositive$1(t1, 30)) & 1073741823;
+    },
+    toString$0: function(_) {
+      var _this = this,
+        y = P.DateTime__fourDigits(H.Primitives_getYear(_this)),
+        m = P.DateTime__twoDigits(H.Primitives_getMonth(_this)),
+        d = P.DateTime__twoDigits(H.Primitives_getDay(_this)),
+        h = P.DateTime__twoDigits(H.Primitives_getHours(_this)),
+        min = P.DateTime__twoDigits(H.Primitives_getMinutes(_this)),
+        sec = P.DateTime__twoDigits(H.Primitives_getSeconds(_this)),
+        ms = P.DateTime__threeDigits(H.Primitives_getMilliseconds(_this));
+      if (_this.isUtc)
+        return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + "Z";
+      else
+        return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms;
+    }
+  };
+  P.double.prototype = {};
+  P.Duration.prototype = {
+    $add: function(_, other) {
+      return new P.Duration(C.JSInt_methods.$add(this._duration, type$.Duration._as(other).get$_duration()));
+    },
+    $sub: function(_, other) {
+      return new P.Duration(C.JSInt_methods.$sub(this._duration, type$.Duration._as(other).get$_duration()));
+    },
+    $lt: function(_, other) {
+      return C.JSInt_methods.$lt(this._duration, type$.Duration._as(other).get$_duration());
+    },
+    $gt: function(_, other) {
+      return C.JSInt_methods.$gt(this._duration, type$.Duration._as(other).get$_duration());
+    },
+    $ge: function(_, other) {
+      return C.JSInt_methods.$ge(this._duration, type$.Duration._as(other).get$_duration());
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof P.Duration && this._duration === other._duration;
+    },
+    get$hashCode: function(_) {
+      return C.JSInt_methods.get$hashCode(this._duration);
+    },
+    toString$0: function(_) {
+      var twoDigitMinutes, twoDigitSeconds, sixDigitUs,
+        t1 = new P.Duration_toString_twoDigits(),
+        t2 = this._duration;
+      if (t2 < 0)
+        return "-" + new P.Duration(0 - t2).toString$0(0);
+      twoDigitMinutes = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 60000000) % 60);
+      twoDigitSeconds = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 1000000) % 60);
+      sixDigitUs = new P.Duration_toString_sixDigits().call$1(t2 % 1000000);
+      return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + H.S(twoDigitMinutes) + ":" + H.S(twoDigitSeconds) + "." + H.S(sixDigitUs);
+    }
+  };
+  P.Duration_toString_sixDigits.prototype = {
+    call$1: function(n) {
+      if (n >= 100000)
+        return "" + n;
+      if (n >= 10000)
+        return "0" + n;
+      if (n >= 1000)
+        return "00" + n;
+      if (n >= 100)
+        return "000" + n;
+      if (n >= 10)
+        return "0000" + n;
+      return "00000" + n;
+    },
+    $signature: 16
+  };
+  P.Duration_toString_twoDigits.prototype = {
+    call$1: function(n) {
+      if (n >= 10)
+        return "" + n;
+      return "0" + n;
+    },
+    $signature: 16
+  };
+  P.Error0.prototype = {
+    get$stackTrace: function() {
+      return H.getTraceFromException(this.$thrownJsError);
+    }
+  };
+  P.AssertionError.prototype = {
+    toString$0: function(_) {
+      var t1 = this.message;
+      if (t1 != null)
+        return "Assertion failed: " + P.Error_safeToString(t1);
+      return "Assertion failed";
+    }
+  };
+  P.NullThrownError.prototype = {
+    toString$0: function(_) {
+      return "Throw of null.";
+    }
+  };
+  P.ArgumentError.prototype = {
+    get$_errorName: function() {
+      return "Invalid argument" + (!this._hasValue ? "(s)" : "");
+    },
+    get$_errorExplanation: function() {
+      return "";
+    },
+    toString$0: function(_) {
+      var explanation, errorValue, _this = this,
+        $name = _this.name,
+        nameString = $name == null ? "" : " (" + $name + ")",
+        message = _this.message,
+        messageString = message == null ? "" : ": " + message,
+        prefix = _this.get$_errorName() + nameString + messageString;
+      if (!_this._hasValue)
+        return prefix;
+      explanation = _this.get$_errorExplanation();
+      errorValue = P.Error_safeToString(_this.invalidValue);
+      return prefix + explanation + ": " + errorValue;
+    }
+  };
+  P.RangeError.prototype = {
+    get$_errorName: function() {
+      return "RangeError";
+    },
+    get$_errorExplanation: function() {
+      var explanation,
+        start = this.start,
+        end = this.end;
+      if (start == null)
+        explanation = end != null ? ": Not less than or equal to " + H.S(end) : "";
+      else if (end == null)
+        explanation = ": Not greater than or equal to " + H.S(start);
+      else if (end > start)
+        explanation = ": Not in inclusive range " + H.S(start) + ".." + H.S(end);
+      else
+        explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + H.S(start);
+      return explanation;
+    }
+  };
+  P.IndexError.prototype = {
+    get$_errorName: function() {
+      return "RangeError";
+    },
+    get$_errorExplanation: function() {
+      var t1,
+        invalidValue = H._asIntS(this.invalidValue);
+      if (typeof invalidValue !== "number")
+        return invalidValue.$lt();
+      if (invalidValue < 0)
+        return ": index must not be negative";
+      t1 = this.length;
+      if (t1 === 0)
+        return ": no indices are valid";
+      return ": index should be less than " + H.S(t1);
+    },
+    get$length: function(receiver) {
+      return this.length;
+    }
+  };
+  P.NoSuchMethodError.prototype = {
+    toString$0: function(_) {
+      var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {},
+        sb = new P.StringBuffer("");
+      _box_0.comma = "";
+      $arguments = _this._core$_arguments;
+      for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") {
+        argument = $arguments[_i];
+        sb._contents = t2 + t3;
+        t2 = sb._contents += P.Error_safeToString(argument);
+        _box_0.comma = ", ";
+      }
+      _this._namedArguments.forEach$1(0, new P.NoSuchMethodError_toString_closure(_box_0, sb));
+      receiverText = P.Error_safeToString(_this._core$_receiver);
+      actualParameters = sb.toString$0(0);
+      t1 = "NoSuchMethodError: method not found: '" + H.S(_this._core$_memberName.__internal$_name) + "'\nReceiver: " + receiverText + "\nArguments: [" + actualParameters + "]";
+      return t1;
+    }
+  };
+  P.UnsupportedError.prototype = {
+    toString$0: function(_) {
+      return "Unsupported operation: " + this.message;
+    }
+  };
+  P.UnimplementedError.prototype = {
+    toString$0: function(_) {
+      var message = this.message;
+      return message != null ? "UnimplementedError: " + message : "UnimplementedError";
+    }
+  };
+  P.StateError.prototype = {
+    toString$0: function(_) {
+      return "Bad state: " + this.message;
+    }
+  };
+  P.ConcurrentModificationError.prototype = {
+    toString$0: function(_) {
+      var t1 = this.modifiedObject;
+      if (t1 == null)
+        return "Concurrent modification during iteration.";
+      return "Concurrent modification during iteration: " + P.Error_safeToString(t1) + ".";
+    }
+  };
+  P.OutOfMemoryError.prototype = {
+    toString$0: function(_) {
+      return "Out of Memory";
+    },
+    get$stackTrace: function() {
+      return null;
+    },
+    $isError0: 1
+  };
+  P.StackOverflowError.prototype = {
+    toString$0: function(_) {
+      return "Stack Overflow";
+    },
+    get$stackTrace: function() {
+      return null;
+    },
+    $isError0: 1
+  };
+  P.CyclicInitializationError.prototype = {
+    toString$0: function(_) {
+      var variableName = this.variableName;
+      return variableName == null ? "Reading static variable during its initialization" : "Reading static variable '" + variableName + "' during its initialization";
+    }
+  };
+  P._Exception.prototype = {
+    toString$0: function(_) {
+      return "Exception: " + this.message;
+    }
+  };
+  P.FormatException.prototype = {
+    toString$0: function(_) {
+      var message = this.message,
+        report = message != null && "" !== message ? "FormatException: " + H.S(message) : "FormatException",
+        offset = this.offset;
+      return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report;
+    }
+  };
+  P.Function.prototype = {};
+  P.int.prototype = {};
+  P.Iterable.prototype = {
+    map$1: function(_, f) {
+      var t1 = H._instanceType(this);
+      return H.MappedIterable_MappedIterable(this, t1._eval$1("@(Iterable.E)")._as(f), t1._eval$1("Iterable.E"), type$.dynamic);
+    },
+    get$length: function(_) {
+      var count,
+        it = this.get$iterator(this);
+      for (count = 0; it.moveNext$0();)
+        ++count;
+      return count;
+    },
+    elementAt$1: function(_, index) {
+      var t1, elementIndex, element;
+      P.RangeError_checkNotNegative(index, "index");
+      for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) {
+        element = t1.get$current();
+        if (index === elementIndex)
+          return element;
+        ++elementIndex;
+      }
+      throw H.wrapException(P.IndexError$(index, this, "index", null, elementIndex));
+    },
+    toString$0: function(_) {
+      return P.IterableBase_iterableToShortString(this, "(", ")");
+    }
+  };
+  P.Iterator.prototype = {};
+  P.List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1};
+  P.Map.prototype = {};
+  P.MapEntry.prototype = {};
+  P.Null.prototype = {
+    get$hashCode: function(_) {
+      return P.Object.prototype.get$hashCode.call(C.JSNull_methods, this);
+    },
+    toString$0: function(_) {
+      return "null";
+    }
+  };
+  P.num.prototype = {};
+  P.Object.prototype = {constructor: P.Object, $isObject: 1,
+    $eq: function(_, other) {
+      return this === other;
+    },
+    get$hashCode: function(_) {
+      return H.Primitives_objectHashCode(this);
+    },
+    toString$0: function(_) {
+      return "Instance of '" + H.S(H.Primitives_objectTypeName(this)) + "'";
+    },
+    noSuchMethod$1: function(_, invocation) {
+      type$.Invocation._as(invocation);
+      throw H.wrapException(P.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments()));
+    },
+    get$runtimeType: function(_) {
+      return H.getRuntimeType(this);
+    },
+    toString: function() {
+      return this.toString$0(this);
+    }
+  };
+  P.StackTrace.prototype = {};
+  P._StringStackTrace.prototype = {
+    toString$0: function(_) {
+      return "";
+    },
+    $isStackTrace: 1
+  };
+  P.String.prototype = {$isPattern: 1};
+  P.StringBuffer.prototype = {
+    get$length: function(_) {
+      return this._contents.length;
+    },
+    toString$0: function(_) {
+      var t1 = this._contents;
+      return t1.charCodeAt(0) == 0 ? t1 : t1;
+    },
+    $isStringSink: 1
+  };
+  P.Symbol0.prototype = {};
+  W.DomException.prototype = {
+    toString$0: function(receiver) {
+      return String(receiver);
+    }
+  };
+  W.Event0.prototype = {$isEvent0: 1};
+  W.EventSource.prototype = {$isEventSource: 1};
+  W.EventTarget.prototype = {
+    addEventListener$3: function(receiver, type, listener, useCapture) {
+      type$.nullable_dynamic_Function_Event._as(listener);
+      if (listener != null)
+        this._addEventListener$3(receiver, type, listener, useCapture);
+    },
+    addEventListener$2: function($receiver, type, listener) {
+      return this.addEventListener$3($receiver, type, listener, null);
+    },
+    _addEventListener$3: function(receiver, type, listener, options) {
+      return receiver.addEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), options);
+    },
+    _removeEventListener$3: function(receiver, type, listener, options) {
+      return receiver.removeEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), false);
+    },
+    $isEventTarget: 1
+  };
+  W.HttpRequest.prototype = {
+    open$3$async: function(receiver, method, url, async) {
+      return receiver.open(method, url, true);
+    },
+    $isHttpRequest: 1
+  };
+  W.HttpRequest_request_closure.prototype = {
+    call$1: function(e) {
+      var t1, t2, accepted, unknownRedirect, t3;
+      type$.ProgressEvent._as(e);
+      t1 = this.xhr;
+      t2 = t1.status;
+      if (typeof t2 !== "number")
+        return t2.$ge();
+      accepted = t2 >= 200 && t2 < 300;
+      unknownRedirect = t2 > 307 && t2 < 400;
+      t2 = accepted || t2 === 0 || t2 === 304 || unknownRedirect;
+      t3 = this.completer;
+      if (t2)
+        t3.complete$1(t1);
+      else
+        t3.completeError$1(e);
+    },
+    $signature: 40
+  };
+  W.HttpRequestEventTarget.prototype = {};
+  W.MessageEvent.prototype = {$isMessageEvent: 1};
+  W.ProgressEvent.prototype = {$isProgressEvent: 1};
+  W.EventStreamProvider.prototype = {};
+  W._EventStream.prototype = {
+    listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
+      var t1 = this.$ti;
+      t1._eval$1("~(1)?")._as(onData);
+      type$.nullable_void_Function._as(onDone);
+      return W._EventStreamSubscription$(this._target, this._eventType, onData, false, t1._precomputed1);
+    },
+    listen$3$onDone$onError: function(onData, onDone, onError) {
+      return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError);
+    }
+  };
+  W._EventStreamSubscription.prototype = {
+    cancel$0: function() {
+      var _this = this;
+      if (_this._target == null)
+        return null;
+      _this._unlisten$0();
+      _this._target = null;
+      _this.set$_onData(null);
+      return null;
+    },
+    onData$1: function(handleData) {
+      var t1, _this = this;
+      _this.$ti._eval$1("~(1)?")._as(handleData);
+      if (_this._target == null)
+        throw H.wrapException(P.StateError$("Subscription has been canceled."));
+      _this._unlisten$0();
+      t1 = W._wrapZone(new W._EventStreamSubscription_onData_closure(handleData), type$.Event);
+      _this.set$_onData(t1);
+      _this._tryResume$0();
+    },
+    pause$0: function() {
+      if (this._target == null)
+        return;
+      ++this._pauseCount;
+      this._unlisten$0();
+    },
+    resume$0: function() {
+      var _this = this;
+      if (_this._target == null || _this._pauseCount <= 0)
+        return;
+      --_this._pauseCount;
+      _this._tryResume$0();
+    },
+    _tryResume$0: function() {
+      var t2, _this = this,
+        t1 = _this._onData;
+      if (t1 != null && _this._pauseCount <= 0) {
+        t2 = _this._target;
+        t2.toString;
+        J.addEventListener$3$x(t2, _this._eventType, t1, false);
+      }
+    },
+    _unlisten$0: function() {
+      var t3,
+        t1 = this._onData,
+        t2 = t1 != null;
+      if (t2) {
+        t3 = this._target;
+        t3.toString;
+        type$.nullable_dynamic_Function_Event._as(t1);
+        if (t2)
+          J._removeEventListener$3$x(t3, this._eventType, t1, false);
+      }
+    },
+    set$_onData: function(_onData) {
+      this._onData = type$.nullable_dynamic_Function_Event._as(_onData);
+    }
+  };
+  W._EventStreamSubscription_closure.prototype = {
+    call$1: function(e) {
+      return this.onData.call$1(type$.Event._as(e));
+    },
+    $signature: 17
+  };
+  W._EventStreamSubscription_onData_closure.prototype = {
+    call$1: function(e) {
+      return this.handleData.call$1(type$.Event._as(e));
+    },
+    $signature: 17
+  };
+  P._AcceptStructuredClone.prototype = {
+    findSlot$1: function(value) {
+      var i,
+        t1 = this.values,
+        $length = t1.length;
+      for (i = 0; i < $length; ++i)
+        if (t1[i] === value)
+          return i;
+      C.JSArray_methods.add$1(t1, value);
+      C.JSArray_methods.add$1(this.copies, null);
+      return $length;
+    },
+    walk$1: function(e) {
+      var millisSinceEpoch, t1, proto, slot, copy, t2, l, $length, i, _this = this, _box_0 = {};
+      if (e == null)
+        return e;
+      if (H._isBool(e))
+        return e;
+      if (typeof e == "number")
+        return e;
+      if (typeof e == "string")
+        return e;
+      if (e instanceof Date) {
+        millisSinceEpoch = e.getTime();
+        if (Math.abs(millisSinceEpoch) <= 864e13)
+          t1 = false;
+        else
+          t1 = true;
+        if (t1)
+          H.throwExpression(P.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch));
+        P.ArgumentError_checkNotNull(true, "isUtc", type$.bool);
+        return new P.DateTime(millisSinceEpoch, true);
+      }
+      if (e instanceof RegExp)
+        throw H.wrapException(P.UnimplementedError$("structured clone of RegExp"));
+      if (typeof Promise != "undefined" && e instanceof Promise)
+        return P.promiseToFuture(e, type$.dynamic);
+      proto = Object.getPrototypeOf(e);
+      if (proto === Object.prototype || proto === null) {
+        slot = _this.findSlot$1(e);
+        t1 = _this.copies;
+        if (slot >= t1.length)
+          return H.ioore(t1, slot);
+        copy = _box_0.copy = t1[slot];
+        if (copy != null)
+          return copy;
+        t2 = type$.dynamic;
+        copy = P.LinkedHashMap_LinkedHashMap$_empty(t2, t2);
+        _box_0.copy = copy;
+        C.JSArray_methods.$indexSet(t1, slot, copy);
+        _this.forEachJsField$2(e, new P._AcceptStructuredClone_walk_closure(_box_0, _this));
+        return _box_0.copy;
+      }
+      if (e instanceof Array) {
+        l = e;
+        slot = _this.findSlot$1(l);
+        t1 = _this.copies;
+        if (slot >= t1.length)
+          return H.ioore(t1, slot);
+        copy = t1[slot];
+        if (copy != null)
+          return copy;
+        t2 = J.getInterceptor$asx(l);
+        $length = t2.get$length(l);
+        copy = _this.mustCopy ? new Array($length) : l;
+        C.JSArray_methods.$indexSet(t1, slot, copy);
+        for (t1 = J.getInterceptor$ax(copy), i = 0; i < $length; ++i)
+          t1.$indexSet(copy, i, _this.walk$1(t2.$index(l, i)));
+        return copy;
+      }
+      return e;
+    },
+    convertNativeToDart_AcceptStructuredClone$2$mustCopy: function(object, mustCopy) {
+      this.mustCopy = true;
+      return this.walk$1(object);
+    }
+  };
+  P._AcceptStructuredClone_walk_closure.prototype = {
+    call$2: function(key, value) {
+      var t1 = this._box_0.copy,
+        t2 = this.$this.walk$1(value);
+      J.$indexSet$ax(t1, key, t2);
+      return t2;
+    },
+    $signature: 47
+  };
+  P.convertDartToNative_Dictionary_closure.prototype = {
+    call$2: function(key, value) {
+      this.object[key] = value;
+    },
+    $signature: 51
+  };
+  P._AcceptStructuredCloneDart2Js.prototype = {
+    forEachJsField$2: function(object, action) {
+      var t1, t2, _i, key;
+      type$.dynamic_Function_dynamic_dynamic._as(action);
+      for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
+        key = t1[_i];
+        action.call$2(key, object[key]);
+      }
+    }
+  };
+  P.promiseToFuture_closure.prototype = {
+    call$1: function(r) {
+      return this.completer.complete$1(this.T._eval$1("0/?")._as(r));
+    },
+    $signature: 2
+  };
+  P.promiseToFuture_closure0.prototype = {
+    call$1: function(e) {
+      return this.completer.completeError$1(e);
+    },
+    $signature: 2
+  };
+  P._JSRandom.prototype = {
+    nextDouble$0: function() {
+      return Math.random();
+    }
+  };
+  P.ByteBuffer.prototype = {};
+  P.ByteData.prototype = {};
+  P.Int8List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1};
+  P.Uint8List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1};
+  P.Uint8ClampedList.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1};
+  P.Int16List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1};
+  P.Uint16List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1};
+  P.Int32List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1};
+  P.Uint32List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1};
+  P.Float32List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1};
+  P.Float64List.prototype = {$isEfficientLengthIterable: 1, $isIterable: 1, $isList: 1};
+  V.ErrorResult.prototype = {
+    complete$1: function(completer) {
+      completer.completeError$2(this.error, this.stackTrace);
+    },
+    get$hashCode: function(_) {
+      return (J.get$hashCode$(this.error) ^ J.get$hashCode$(this.stackTrace) ^ 492929599) >>> 0;
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof V.ErrorResult && J.$eq$(this.error, other.error) && this.stackTrace == other.stackTrace;
+    },
+    $isResult: 1
+  };
+  E.Result.prototype = {};
+  F.ValueResult.prototype = {
+    complete$1: function(completer) {
+      this.$ti._eval$1("Completer<1*>*")._as(completer).complete$1(this.value);
+    },
+    get$hashCode: function(_) {
+      return (J.get$hashCode$(this.value) ^ 842997089) >>> 0;
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof F.ValueResult && J.$eq$(this.value, other.value);
+    },
+    $isResult: 1
+  };
+  G.StreamQueue.prototype = {
+    get$next: function() {
+      var t1 = this.$ti,
+        t2 = new P._Future($.Zone__current, t1._eval$1("_Future<1*>"));
+      this._addRequest$1(new G._NextRequest(new P._AsyncCompleter(t2, t1._eval$1("_AsyncCompleter<1*>")), t1._eval$1("_NextRequest<1*>")));
+      return t2;
+    },
+    _updateRequests$0: function() {
+      var t1, t2, t3, t4, _this = this;
+      for (t1 = _this._requestQueue, t2 = _this._eventQueue; !t1.get$isEmpty(t1);) {
+        t3 = t1._head;
+        if (t3 === t1._tail)
+          H.throwExpression(H.IterableElementError_noElement());
+        t4 = t1._collection$_table;
+        if (t3 >= t4.length)
+          return H.ioore(t4, t3);
+        if (t4[t3].update$2(t2, _this._isDone)) {
+          t3 = t1._head;
+          if (t3 === t1._tail)
+            H.throwExpression(H.IterableElementError_noElement());
+          ++t1._modificationCount;
+          t4 = t1._collection$_table;
+          if (t3 >= t4.length)
+            return H.ioore(t4, t3);
+          C.JSArray_methods.$indexSet(t4, t3, null);
+          t1._head = (t1._head + 1 & t1._collection$_table.length - 1) >>> 0;
+        } else
+          return;
+      }
+      if (!_this._isDone)
+        _this._subscription.pause$0();
+    },
+    _ensureListening$0: function() {
+      var t1, _this = this;
+      if (_this._isDone)
+        return;
+      t1 = _this._subscription;
+      if (t1 == null)
+        _this.set$_subscription(_this._source.listen$3$onDone$onError(new G.StreamQueue__ensureListening_closure(_this), new G.StreamQueue__ensureListening_closure0(_this), new G.StreamQueue__ensureListening_closure1(_this)));
+      else
+        t1.resume$0();
+    },
+    _addResult$1: function(result) {
+      var t1, _this = this;
+      _this.$ti._eval$1("Result<1*>*")._as(result);
+      ++_this._eventsReceived;
+      t1 = _this._eventQueue;
+      t1._queue_list$_add$1(t1.$ti._eval$1("1*")._as(result));
+      _this._updateRequests$0();
+    },
+    _addRequest$1: function(request) {
+      var t1, t2, t3, t4, newTable, split, _this = this;
+      _this.$ti._eval$1("_EventRequest<1*>*")._as(request);
+      t1 = _this._requestQueue;
+      if (t1._head === t1._tail) {
+        if (request.update$2(_this._eventQueue, _this._isDone))
+          return;
+        _this._ensureListening$0();
+      }
+      t2 = t1.$ti;
+      t2._precomputed1._as(request);
+      C.JSArray_methods.$indexSet(t1._collection$_table, t1._tail, request);
+      t3 = t1._tail;
+      t4 = t1._collection$_table.length;
+      t3 = (t3 + 1 & t4 - 1) >>> 0;
+      t1._tail = t3;
+      if (t1._head === t3) {
+        newTable = P.List_List$filled(t4 * 2, null, false, t2._eval$1("1?"));
+        t2 = t1._collection$_table;
+        t3 = t1._head;
+        split = t2.length - t3;
+        C.JSArray_methods.setRange$4(newTable, 0, split, t2, t3);
+        C.JSArray_methods.setRange$4(newTable, split, split + t1._head, t1._collection$_table, 0);
+        t1._head = 0;
+        t1._tail = t1._collection$_table.length;
+        t1.set$_collection$_table(newTable);
+      }
+      ++t1._modificationCount;
+    },
+    set$_subscription: function(_subscription) {
+      this._subscription = this.$ti._eval$1("StreamSubscription<1*>*")._as(_subscription);
+    }
+  };
+  G.StreamQueue__ensureListening_closure.prototype = {
+    call$1: function(data) {
+      var t1 = this.$this,
+        t2 = t1.$ti;
+      t1._addResult$1(new F.ValueResult(t2._eval$1("1*")._as(data), t2._eval$1("ValueResult<1*>")));
+    },
+    $signature: function() {
+      return this.$this.$ti._eval$1("Null(1*)");
+    }
+  };
+  G.StreamQueue__ensureListening_closure1.prototype = {
+    call$2: function(error, stackTrace) {
+      this.$this._addResult$1(new V.ErrorResult(error, type$.legacy_StackTrace._as(stackTrace)));
+    },
+    "call*": "call$2",
+    $requiredArgCount: 2,
+    $signature: 56
+  };
+  G.StreamQueue__ensureListening_closure0.prototype = {
+    call$0: function() {
+      var t1 = this.$this;
+      t1.set$_subscription(null);
+      t1._isDone = true;
+      t1._updateRequests$0();
+    },
+    "call*": "call$0",
+    $requiredArgCount: 0,
+    $signature: 1
+  };
+  G._EventRequest.prototype = {};
+  G._NextRequest.prototype = {
+    update$2: function(events, isDone) {
+      var t1, t2, result;
+      this.$ti._eval$1("QueueList<Result<1*>*>*")._as(events);
+      if (events.get$length(events) !== 0) {
+        t1 = events._queue_list$_head;
+        if (t1 === events._queue_list$_tail)
+          H.throwExpression(P.StateError$("No element"));
+        t2 = events._table;
+        if (t1 >= t2.length)
+          return H.ioore(t2, t1);
+        result = t2[t1];
+        C.JSArray_methods.$indexSet(t2, t1, null);
+        events._queue_list$_head = (events._queue_list$_head + 1 & events._table.length - 1) >>> 0;
+        result.complete$1(this._completer);
+        return true;
+      }
+      if (isDone) {
+        this._completer.completeError$2(new P.StateError("No elements"), P.StackTrace_current());
+        return true;
+      }
+      return false;
+    },
+    $is_EventRequest: 1
+  };
+  Q.QueueList.prototype = {
+    toString$0: function(_) {
+      return P.IterableBase_iterableToFullString(this, "{", "}");
+    },
+    get$length: function(_) {
+      return (this._queue_list$_tail - this._queue_list$_head & this._table.length - 1) >>> 0;
+    },
+    $index: function(_, index) {
+      var t1, t2, t3, _this = this;
+      H._asIntS(index);
+      if (index < 0 || index >= _this.get$length(_this))
+        throw H.wrapException(P.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(_this) + ")."));
+      t1 = _this._table;
+      t2 = t1.length;
+      t3 = (_this._queue_list$_head + index & t2 - 1) >>> 0;
+      if (t3 < 0 || t3 >= t2)
+        return H.ioore(t1, t3);
+      return t1[t3];
+    },
+    $indexSet: function(_, index, value) {
+      var t1, _this = this;
+      H._asIntS(index);
+      _this.$ti._eval$1("1*")._as(value);
+      if (typeof index !== "number")
+        return index.$lt();
+      if (index < 0 || index >= _this.get$length(_this))
+        throw H.wrapException(P.RangeError$("Index " + index + " must be in the range [0.." + _this.get$length(_this) + ")."));
+      t1 = _this._table;
+      C.JSArray_methods.$indexSet(t1, (_this._queue_list$_head + index & t1.length - 1) >>> 0, value);
+    },
+    _queue_list$_add$1: function(element) {
+      var t2, t3, newTable, split, _this = this,
+        t1 = _this.$ti;
+      t1._eval$1("1*")._as(element);
+      C.JSArray_methods.$indexSet(_this._table, _this._queue_list$_tail, element);
+      t2 = _this._queue_list$_tail;
+      t3 = _this._table.length;
+      t2 = (t2 + 1 & t3 - 1) >>> 0;
+      _this._queue_list$_tail = t2;
+      if (_this._queue_list$_head === t2) {
+        t2 = new Array(t3 * 2);
+        t2.fixed$length = Array;
+        newTable = H.setRuntimeTypeInfo(t2, t1._eval$1("JSArray<1*>"));
+        t1 = _this._table;
+        t2 = _this._queue_list$_head;
+        split = t1.length - t2;
+        C.JSArray_methods.setRange$4(newTable, 0, split, t1, t2);
+        C.JSArray_methods.setRange$4(newTable, split, split + _this._queue_list$_head, _this._table, 0);
+        _this._queue_list$_head = 0;
+        _this._queue_list$_tail = _this._table.length;
+        _this.set$_table(newTable);
+      }
+    },
+    set$_table: function(_table) {
+      this._table = this.$ti._eval$1("List<1*>*")._as(_table);
+    },
+    $isEfficientLengthIterable: 1,
+    $isQueue: 1,
+    $isIterable: 1,
+    $isList: 1
+  };
+  Q._QueueList_Object_ListMixin.prototype = {};
+  N.HexCodec.prototype = {
+    get$encoder: function() {
+      return C.C_HexEncoder;
+    }
+  };
+  R.HexEncoder.prototype = {
+    convert$1: function(bytes) {
+      type$.legacy_List_legacy_int._as(bytes);
+      return R._convert(bytes, 0, bytes.length);
+    }
+  };
+  Y.Level.prototype = {
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Y.Level && this.value === other.value;
+    },
+    $gt: function(_, other) {
+      return C.JSInt_methods.$gt(this.value, type$.legacy_Level._as(other).get$value());
+    },
+    $ge: function(_, other) {
+      return this.value >= type$.legacy_Level._as(other).value;
+    },
+    get$hashCode: function(_) {
+      return this.value;
+    },
+    toString$0: function(_) {
+      return this.name;
+    }
+  };
+  L.LogRecord0.prototype = {
+    toString$0: function(_) {
+      return "[" + this.level.name + "] " + this.loggerName + ": " + H.S(this.message);
+    }
+  };
+  F.Logger.prototype = {
+    get$fullName: function() {
+      var t1 = this.parent,
+        t2 = t1 == null || t1.name === "",
+        t3 = this.name;
+      return t2 ? t3 : t1.get$fullName() + "." + t3;
+    },
+    get$level: function() {
+      var effectiveLevel, t1;
+      if (this.parent == null)
+        effectiveLevel = this._level;
+      else {
+        t1 = $.$get$Logger_root();
+        effectiveLevel = t1._level;
+      }
+      return effectiveLevel;
+    },
+    log$4: function(logLevel, message, error, stackTrace) {
+      var record, _this = this,
+        t1 = logLevel.value;
+      if (t1 >= _this.get$level().value) {
+        if (t1 >= 2000) {
+          P.StackTrace_current();
+          logLevel.toString$0(0);
+        }
+        t1 = _this.get$fullName();
+        Date.now();
+        $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1;
+        record = new L.LogRecord0(logLevel, message, t1);
+        if (_this.parent == null)
+          _this._publish$1(record);
+        else
+          $.$get$Logger_root()._publish$1(record);
+      }
+    },
+    _publish$1: function(record) {
+    }
+  };
+  F.Logger_Logger_closure.prototype = {
+    call$0: function() {
+      var dot, $parent, t1,
+        thisName = this.name;
+      if (C.JSString_methods.startsWith$1(thisName, "."))
+        H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'"));
+      dot = C.JSString_methods.lastIndexOf$1(thisName, ".");
+      if (dot === -1)
+        $parent = thisName !== "" ? F.Logger_Logger("") : null;
+      else {
+        $parent = F.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot));
+        thisName = C.JSString_methods.substring$1(thisName, dot + 1);
+      }
+      t1 = new F.Logger(thisName, $parent, P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger));
+      if ($parent == null)
+        t1._level = C.Level_INFO_800;
+      else
+        $parent._children.$indexSet(0, thisName, t1);
+      return t1;
+    },
+    $signature: 60
+  };
+  M.SseClient.prototype = {
+    SseClient$1: function(serverUrl) {
+      var t1, t2, t3, t4, _this = this,
+        clientId = K.Uuid$().v1$0();
+      _this._eventSource = W.EventSource__factoryEventSource(H.S(serverUrl) + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic));
+      _this._serverUrl = H.S(serverUrl) + "?sseClientId=" + clientId;
+      t1 = _this._outgoingController;
+      new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$onDone(_this.get$_onOutgoingMessage(), _this.get$_onOutgoingDone());
+      C.EventSource_methods.addEventListener$2(_this._eventSource, "message", _this.get$_onIncomingMessage());
+      C.EventSource_methods.addEventListener$2(_this._eventSource, "control", _this.get$_onIncomingControlMessage());
+      t1 = _this._eventSource;
+      t2 = type$.nullable_void_Function_legacy_Event;
+      t3 = t2._as(new M.SseClient_closure(_this));
+      type$.nullable_void_Function._as(null);
+      t4 = type$.legacy_Event_2;
+      W._EventStreamSubscription$(t1, "open", t3, false, t4);
+      W._EventStreamSubscription$(_this._eventSource, "error", t2._as(new M.SseClient_closure0(_this)), false, t4);
+      _this._startPostingMessages$0();
+    },
+    close$0: function(_) {
+      this._eventSource.close();
+      this._incomingController.close$0(0);
+      this._outgoingController.close$0(0);
+    },
+    _onIncomingControlMessage$1: function(message) {
+      var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event_2._as(message)).data, true);
+      if (J.$eq$(data, "close"))
+        this.close$0(0);
+      else
+        throw H.wrapException(P.UnsupportedError$('Illegal Control Message "' + H.S(data) + '"'));
+    },
+    _onIncomingMessage$1: function(message) {
+      this._incomingController.add$1(0, H._asStringS(C.C_JsonCodec.decode$2$reviver(H._asStringS(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event_2._as(message)).data, true)), null)));
+    },
+    _onOutgoingDone$0: function() {
+      this.close$0(0);
+    },
+    _onOutgoingMessage$1: function(message) {
+      var $async$goto = 0,
+        $async$completer = P._makeAsyncAwaitCompleter(type$.dynamic),
+        $async$self = this;
+      var $async$_onOutgoingMessage$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
+        if ($async$errorCode === 1)
+          return P._asyncRethrow($async$result, $async$completer);
+        while (true)
+          switch ($async$goto) {
+            case 0:
+              // Function start
+              $async$self._messages.add$1(0, message);
+              // implicit return
+              return P._asyncReturn(null, $async$completer);
+          }
+      });
+      return P._asyncStartSync($async$_onOutgoingMessage$1, $async$completer);
+    },
+    _startPostingMessages$0: function() {
+      var $async$goto = 0,
+        $async$completer = P._makeAsyncAwaitCompleter(type$.dynamic),
+        $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, message, e, e0, t2, exception, t3, t1, $async$exception, $async$temp1;
+      var $async$_startPostingMessages$0 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
+        if ($async$errorCode === 1) {
+          $async$currentError = $async$result;
+          $async$goto = $async$handler;
+        }
+        while (true)
+          switch ($async$goto) {
+            case 0:
+              // Function start
+              t1 = $async$self._messages;
+              t1 = new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>"));
+              t2 = new P._StreamIterator(t1, type$._StreamIterator_dynamic);
+              P.ArgumentError_checkNotNull(t1, "stream", type$.Stream_dynamic);
+              $async$handler = 2;
+              t1 = $async$self._logger;
+            case 5:
+              // for condition
+              $async$temp1 = H;
+              $async$goto = 7;
+              return P._asyncAwait(t2.moveNext$0(), $async$_startPostingMessages$0);
+            case 7:
+              // returning from await.
+              if (!$async$temp1.boolConversionCheck($async$result)) {
+                // goto after for
+                $async$goto = 6;
+                break;
+              }
+              message = t2.get$current();
+              $async$handler = 9;
+              $async$goto = 12;
+              return P._asyncAwait(W.HttpRequest_request($async$self._serverUrl, "POST", C.C_JsonCodec.encode$2$toEncodable(message, null), true), $async$_startPostingMessages$0);
+            case 12:
+              // returning from await.
+              $async$handler = 2;
+              // goto after finally
+              $async$goto = 11;
+              break;
+            case 9:
+              // catch
+              $async$handler = 8;
+              $async$exception = $async$currentError;
+              t3 = H.unwrapException($async$exception);
+              if (t3 instanceof P.JsonUnsupportedObjectError) {
+                e = t3;
+                t1.log$4(C.Level_WARNING_900, "Unable to encode outgoing message: " + H.S(e), null, null);
+              } else if (t3 instanceof P.ArgumentError) {
+                e0 = t3;
+                t1.log$4(C.Level_WARNING_900, "Invalid argument: " + H.S(e0), null, null);
+              } else
+                throw $async$exception;
+              // goto after finally
+              $async$goto = 11;
+              break;
+            case 8:
+              // uncaught
+              // goto uncaught
+              $async$goto = 2;
+              break;
+            case 11:
+              // after finally
+              // goto for condition
+              $async$goto = 5;
+              break;
+            case 6:
+              // after for
+              $async$next.push(4);
+              // goto finally
+              $async$goto = 3;
+              break;
+            case 2:
+              // uncaught
+              $async$next = [1];
+            case 3:
+              // finally
+              $async$handler = 1;
+              $async$goto = 13;
+              return P._asyncAwait(t2.cancel$0(), $async$_startPostingMessages$0);
+            case 13:
+              // returning from await.
+              // goto the next finally handler
+              $async$goto = $async$next.pop();
+              break;
+            case 4:
+              // after finally
+              // implicit return
+              return P._asyncReturn(null, $async$completer);
+            case 1:
+              // rethrow
+              return P._asyncRethrow($async$currentError, $async$completer);
+          }
+      });
+      return P._asyncStartSync($async$_startPostingMessages$0, $async$completer);
+    }
+  };
+  M.SseClient_closure.prototype = {
+    call$1: function(_) {
+      var t1 = this.$this._errorTimer;
+      if (t1 != null)
+        t1.cancel$0();
+    },
+    $signature: 19
+  };
+  M.SseClient_closure0.prototype = {
+    call$1: function(error) {
+      var t1 = this.$this,
+        t2 = t1._errorTimer;
+      t2 = t2 == null ? null : t2._handle != null;
+      if (t2 !== true)
+        t1._errorTimer = P.Timer_Timer(C.Duration_5000000, new M.SseClient__closure(t1, error));
+    },
+    $signature: 19
+  };
+  M.SseClient__closure.prototype = {
+    call$0: function() {
+      var stackTrace, t3,
+        t1 = this.$this,
+        t2 = t1._incomingController,
+        error = this.error;
+      P.ArgumentError_checkNotNull(error, "error", type$.Object);
+      if (t2._state >= 4)
+        H.throwExpression(t2._badEventState$0());
+      stackTrace = P.AsyncError_defaultStackTrace(error);
+      t3 = t2._state;
+      if ((t3 & 1) !== 0)
+        t2._sendError$2(error, stackTrace);
+      else if ((t3 & 3) === 0)
+        t2._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, stackTrace));
+      t1.close$0(0);
+    },
+    $signature: 1
+  };
+  R.StreamChannelMixin.prototype = {};
+  K.Uuid.prototype = {
+    Uuid$1$options: function(_box_0) {
+      var t1, t2, i, hex, t3, v1PositionalArgs, v1NamedArgs, _this = this,
+        _s19_ = "v1rngPositionalArgs",
+        _s14_ = "v1rngNamedArgs",
+        _s18_ = "grngPositionalArgs",
+        _s13_ = "grngNamedArgs",
+        options = _box_0.options;
+      if (!(options != null))
+        options = new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_dynamic);
+      _box_0.options = options;
+      t1 = new Array(256);
+      t1.fixed$length = Array;
+      _this.set$_byteToHex(H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_String));
+      _this.set$_hexToByte(new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_legacy_int));
+      for (t1 = type$.JSArray_legacy_int, t2 = type$.HexCodec._eval$1("Codec.S"), i = 0; i < 256; ++i) {
+        hex = H.setRuntimeTypeInfo([], t1);
+        C.JSArray_methods.add$1(hex, i);
+        t3 = _this._byteToHex;
+        t2._as(hex);
+        (t3 && C.JSArray_methods).$indexSet(t3, i, C.C_HexCodec.get$encoder().convert$1(hex));
+        _this._hexToByte.$indexSet(0, _this._byteToHex[i], i);
+      }
+      v1PositionalArgs = _box_0.options.$index(0, _s19_) != null ? _box_0.options.$index(0, _s19_) : [];
+      v1NamedArgs = _box_0.options.$index(0, _s14_) != null ? type$.legacy_Map_of_legacy_Symbol_and_dynamic._as(_box_0.options.$index(0, _s14_)) : C.Map_empty0;
+      _this._seedBytes = _box_0.options.$index(0, "v1rng") != null ? P.Function_apply(type$.Function._as(_box_0.options.$index(0, "v1rng")), type$.nullable_List_dynamic._as(v1PositionalArgs), v1NamedArgs) : T.UuidUtil_mathRNG();
+      if (_box_0.options.$index(0, _s18_) != null)
+        _box_0.options.$index(0, _s18_);
+      if (_box_0.options.$index(0, _s13_) != null)
+        type$.legacy_Map_of_legacy_Symbol_and_dynamic._as(_box_0.options.$index(0, _s13_));
+      _this._nodeId = [J.$or$bn(J.$index$asx(_this._seedBytes, 0), 1), J.$index$asx(_this._seedBytes, 1), J.$index$asx(_this._seedBytes, 2), J.$index$asx(_this._seedBytes, 3), J.$index$asx(_this._seedBytes, 4), J.$index$asx(_this._seedBytes, 5)];
+      t1 = J.$shl$n(J.$index$asx(_this._seedBytes, 6), 8);
+      t2 = J.$index$asx(_this._seedBytes, 7);
+      if (typeof t2 !== "number")
+        return H.iae(t2);
+      _this._clockSeq = (t1 | t2) & 262143;
+    },
+    v1$0: function() {
+      var t1, buf, options, clockSeq, mSecs, nSecs, dt, t2, tl, tmh, node, n, _this = this,
+        _s8_ = "clockSeq",
+        _s5_ = "nSecs";
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(null);
+      t1 = new Array(16);
+      t1.fixed$length = Array;
+      buf = H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_int);
+      options = new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_dynamic);
+      clockSeq = options.$index(0, _s8_) != null ? options.$index(0, _s8_) : _this._clockSeq;
+      mSecs = options.$index(0, "mSecs") != null ? options.$index(0, "mSecs") : Date.now();
+      nSecs = options.$index(0, _s5_) != null ? options.$index(0, _s5_) : _this._lastNSecs + 1;
+      t1 = J.getInterceptor$n(mSecs);
+      dt = J.$add$ansx(t1.$sub(mSecs, _this._lastMSecs), J.$div$n(J.$sub$n(nSecs, _this._lastNSecs), 10000));
+      t2 = J.getInterceptor$n(dt);
+      if (t2.$lt(dt, 0) && options.$index(0, _s8_) == null)
+        clockSeq = J.$and$bn(J.$add$ansx(clockSeq, 1), 16383);
+      if ((t2.$lt(dt, 0) || t1.$gt(mSecs, _this._lastMSecs)) && options.$index(0, _s5_) == null)
+        nSecs = 0;
+      if (J.$ge$n(nSecs, 10000))
+        throw H.wrapException(P.Exception_Exception("uuid.v1(): Can't create more than 10M uuids/sec"));
+      H._asIntS(mSecs);
+      _this._lastMSecs = mSecs;
+      H._asIntS(nSecs);
+      _this._lastNSecs = nSecs;
+      _this._clockSeq = clockSeq;
+      mSecs += 122192928e5;
+      tl = C.JSInt_methods.$mod((mSecs & 268435455) * 10000 + nSecs, 4294967296);
+      C.JSArray_methods.$indexSet(buf, 0, C.JSInt_methods._shrOtherPositive$1(tl, 24) & 255);
+      C.JSArray_methods.$indexSet(buf, 1, C.JSInt_methods._shrOtherPositive$1(tl, 16) & 255);
+      C.JSArray_methods.$indexSet(buf, 2, C.JSInt_methods._shrOtherPositive$1(tl, 8) & 255);
+      C.JSArray_methods.$indexSet(buf, 3, tl & 255);
+      tmh = C.JSDouble_methods.floor$0(mSecs / 4294967296 * 10000) & 268435455;
+      C.JSArray_methods.$indexSet(buf, 4, tmh >>> 8 & 255);
+      C.JSArray_methods.$indexSet(buf, 5, tmh & 255);
+      C.JSArray_methods.$indexSet(buf, 6, tmh >>> 24 & 15 | 16);
+      C.JSArray_methods.$indexSet(buf, 7, tmh >>> 16 & 255);
+      t1 = J.getInterceptor$n(clockSeq);
+      C.JSArray_methods.$indexSet(buf, 8, (t1.$shr(clockSeq, 8) | 128) >>> 0);
+      C.JSArray_methods.$indexSet(buf, 9, H._asIntS(t1.$and(clockSeq, 255)));
+      node = options.$index(0, "node") != null ? options.$index(0, "node") : _this._nodeId;
+      for (t1 = J.getInterceptor$asx(node), n = 0; n < 6; ++n)
+        C.JSArray_methods.$indexSet(buf, 10 + n, H._asIntS(t1.$index(node, n)));
+      type$.legacy_List_legacy_int._as(buf);
+      t1 = _this._byteToHex;
+      t1 = H.S((t1 && C.JSArray_methods).$index(t1, buf[0]));
+      t2 = _this._byteToHex;
+      t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[1]));
+      t1 = _this._byteToHex;
+      t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[2]));
+      t2 = _this._byteToHex;
+      t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[3])) + "-";
+      t1 = _this._byteToHex;
+      t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[4]));
+      t2 = _this._byteToHex;
+      t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[5])) + "-";
+      t1 = _this._byteToHex;
+      t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[6]));
+      t2 = _this._byteToHex;
+      t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[7])) + "-";
+      t1 = _this._byteToHex;
+      t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[8]));
+      t2 = _this._byteToHex;
+      t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[9])) + "-";
+      t1 = _this._byteToHex;
+      t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[10]));
+      t2 = _this._byteToHex;
+      t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[11]));
+      t1 = _this._byteToHex;
+      t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[12]));
+      t2 = _this._byteToHex;
+      t2 = t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[13]));
+      t1 = _this._byteToHex;
+      t1 = t2 + H.S((t1 && C.JSArray_methods).$index(t1, buf[14]));
+      t2 = _this._byteToHex;
+      return t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[15]));
+    },
+    set$_byteToHex: function(_byteToHex) {
+      this._byteToHex = type$.legacy_List_legacy_String._as(_byteToHex);
+    },
+    set$_hexToByte: function(_hexToByte) {
+      this._hexToByte = type$.legacy_Map_of_legacy_String_and_legacy_int._as(_hexToByte);
+    }
+  };
+  Q.createServiceObject_closure.prototype = {
+    call$1: function(e) {
+      return Q.createServiceObject(e, this.expectedTypes);
+    },
+    $signature: 29
+  };
+  Q._createSpecificObject_closure.prototype = {
+    call$1: function(e) {
+      return this.creator.call$1(type$.legacy_Map_of_legacy_String_and_dynamic._as(e));
+    },
+    $signature: 3
+  };
+  Q.VmService.prototype = {
+    _getEventController$1: function(eventName) {
+      var t1 = this._eventControllers,
+        controller = t1.$index(0, eventName);
+      if (controller == null) {
+        controller = P.StreamController_StreamController$broadcast(false, type$.legacy_Event);
+        t1.$indexSet(0, eventName, controller);
+      }
+      return controller;
+    },
+    VmService$5$disposeHandler$log$streamClosed: function(inStream, writeMessage, disposeHandler, log, streamClosed) {
+      var _this = this;
+      inStream.listen$2$onDone(_this.get$_processMessage(), new Q.VmService_closure(_this));
+      _this._writeMessage = writeMessage;
+      _this._log = new Q._NullLog();
+      _this.set$_disposeHandler(disposeHandler);
+    },
+    _processMessage$1: function(message) {
+      var t1, _this = this;
+      if (typeof message == "string")
+        _this._processMessageStr$1(message);
+      else if (type$.legacy_List_legacy_int._is(message))
+        _this._processMessageByteData$1(H.NativeByteData_NativeByteData$view(new Uint8Array(H._ensureNativeList(message)).buffer, 0, null));
+      else if (type$.legacy_ByteData._is(message))
+        _this._processMessageByteData$1(message);
+      else {
+        t1 = _this._log;
+        J.get$runtimeType$(message).toString$0(0);
+        t1.toString;
+      }
+    },
+    _processMessageByteData$1: function(bytes) {
+      var t2, t3, meta, data, map, streamId, $event,
+        dataOffset = C.NativeByteData_methods._getUint32$2(bytes, 0, true),
+        metaLength = dataOffset - 4,
+        t1 = bytes.byteLength;
+      if (typeof t1 !== "number")
+        return t1.$sub();
+      t2 = bytes.buffer;
+      t3 = bytes.byteOffset;
+      if (typeof t3 !== "number")
+        return t3.$add();
+      t3 += 4;
+      H._checkViewArguments(t2, t3, metaLength);
+      t2 = new Uint8Array(t2, t3, metaLength);
+      type$.List_int._as(t2);
+      meta = C.Utf8Decoder_false.convert$1(t2);
+      t2 = bytes.buffer;
+      t3 = bytes.byteOffset;
+      if (typeof t3 !== "number")
+        return t3.$add();
+      data = H.NativeByteData_NativeByteData$view(t2, t3 + dataOffset, t1 - dataOffset);
+      map = C.C_JsonCodec.decode$2$reviver(meta, null);
+      if (map != null && J.$eq$(J.$index$asx(map, "method"), "streamNotify")) {
+        t1 = J.getInterceptor$asx(map);
+        streamId = H._asStringS(J.$index$asx(t1.$index(map, "params"), "streamId"));
+        $event = type$.legacy_Map_dynamic_dynamic._as(J.$index$asx(t1.$index(map, "params"), "event"));
+        $event.$indexSet(0, "data", data);
+        this._getEventController$1(streamId).add$1(0, type$.legacy_Event._as(Q.createServiceObject($event, C.List_Event)));
+      }
+    },
+    _processMessageStr$1: function(message) {
+      var e, s, exception, t1, t2, completer, methodName, returnTypes, result, type, _this = this, _s2_ = "id", _s5_ = "error", json = null;
+      try {
+        _this._onReceive.add$1(0, message);
+        json = C.C_JsonCodec.decode$2$reviver(message, null);
+      } catch (exception) {
+        e = H.unwrapException(exception);
+        s = H.getTraceFromException(exception);
+        t1 = _this._log;
+        H.S(e);
+        H.S(s);
+        t1.toString;
+        return;
+      }
+      if (json.containsKey$1("method")) {
+        t1 = type$.legacy_Map_of_legacy_String_and_dynamic;
+        if (json.containsKey$1(_s2_))
+          _this._processRequest$1(t1._as(json));
+        else
+          _this._processNotification$1(t1._as(json));
+      } else {
+        if (json.containsKey$1(_s2_))
+          t1 = json.containsKey$1("result") || json.containsKey$1(_s5_);
+        else
+          t1 = false;
+        if (t1) {
+          t1 = type$.legacy_Map_of_legacy_String_and_dynamic;
+          t2 = t1._as(json);
+          completer = _this._completers.remove$1(0, t2.$index(0, _s2_));
+          methodName = _this._methodCalls.remove$1(0, t2.$index(0, _s2_));
+          returnTypes = $._methodReturnTypes.$index(0, methodName);
+          if (completer == null) {
+            t1 = _this._log;
+            C.C_JsonCodec.encode$2$toEncodable(t2, null);
+            t1.toString;
+          } else if (t2.$index(0, _s5_) != null) {
+            t1 = t2.$index(0, _s5_);
+            t2 = J.getInterceptor$asx(t1);
+            completer.completeError$1(new Q.RPCError(methodName, H._asIntS(t2.$index(t1, "code")), H._asStringS(t2.$index(t1, "message")), type$.legacy_Map_dynamic_dynamic._as(t2.$index(t1, "data"))));
+          } else {
+            result = t1._as(t2.$index(0, "result"));
+            type = H._asStringS(result.$index(0, "type"));
+            if (type === "Sentinel") {
+              t1 = Q.Sentinel$_fromJson(result);
+              completer.completeError$1(new Q.SentinelException(methodName, t1));
+            } else if ($._typeFactories.$index(0, type) == null) {
+              t1 = Q.Response$_fromJson(result);
+              completer.complete$1(t1);
+            } else
+              completer.complete$1(Q.createServiceObject(result, returnTypes));
+          }
+        } else
+          _this._log.toString;
+      }
+    },
+    _processRequest$1: function(json) {
+      return this._processRequest$body$VmService(type$.legacy_Map_of_legacy_String_and_dynamic._as(json));
+    },
+    _processRequest$body$VmService: function(json) {
+      var $async$goto = 0,
+        $async$completer = P._makeAsyncAwaitCompleter(type$.dynamic),
+        $async$self = this, m, message, t1, t2;
+      var $async$_processRequest$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
+        if ($async$errorCode === 1)
+          return P._asyncRethrow($async$result, $async$completer);
+        while (true)
+          switch ($async$goto) {
+            case 0:
+              // Function start
+              t1 = H._asStringS(json.$index(0, "method"));
+              t2 = json.$index(0, "params");
+              if (t2 == null)
+                t2 = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.dynamic);
+              $async$goto = 2;
+              return P._asyncAwait($async$self._routeRequest$2(t1, type$.legacy_Map_of_legacy_String_and_dynamic._as(t2)), $async$_processRequest$1);
+            case 2:
+              // returning from await.
+              m = $async$result;
+              m.$indexSet(0, "id", json.$index(0, "id"));
+              m.$indexSet(0, "jsonrpc", "2.0");
+              message = C.C_JsonCodec.encode$2$toEncodable(m, null);
+              $async$self._onSend.add$1(0, message);
+              $async$self._writeMessage.call$1(message);
+              // implicit return
+              return P._asyncReturn(null, $async$completer);
+          }
+      });
+      return P._asyncStartSync($async$_processRequest$1, $async$completer);
+    },
+    _processNotification$1: function(json) {
+      return this._processNotification$body$VmService(type$.legacy_Map_of_legacy_String_and_dynamic._as(json));
+    },
+    _processNotification$body$VmService: function(json) {
+      var $async$goto = 0,
+        $async$completer = P._makeAsyncAwaitCompleter(type$.dynamic),
+        $async$self = this, method, t1;
+      var $async$_processNotification$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
+        if ($async$errorCode === 1)
+          return P._asyncRethrow($async$result, $async$completer);
+        while (true)
+          switch ($async$goto) {
+            case 0:
+              // Function start
+              method = H._asStringS(json.$index(0, "method"));
+              t1 = json.$index(0, "params");
+              if (t1 == null)
+                t1 = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.dynamic);
+              type$.legacy_Map_dynamic_dynamic._as(t1);
+              $async$goto = method === "streamNotify" ? 2 : 4;
+              break;
+            case 2:
+              // then
+              $async$self._getEventController$1(H._asStringS(t1.$index(0, "streamId"))).add$1(0, type$.legacy_Event._as(Q.createServiceObject(t1.$index(0, "event"), C.List_Event)));
+              // goto join
+              $async$goto = 3;
+              break;
+            case 4:
+              // else
+              $async$goto = 5;
+              return P._asyncAwait($async$self._routeRequest$2(method, type$.legacy_Map_of_legacy_String_and_dynamic._as(t1)), $async$_processNotification$1);
+            case 5:
+              // returning from await.
+            case 3:
+              // join
+              // implicit return
+              return P._asyncReturn(null, $async$completer);
+          }
+      });
+      return P._asyncStartSync($async$_processNotification$1, $async$completer);
+    },
+    _routeRequest$2: function(method, params) {
+      type$.legacy_Map_of_legacy_String_and_dynamic._as(params);
+      return this._routeRequest$body$VmService(method, params);
+    },
+    _routeRequest$body$VmService: function(method, params) {
+      var $async$goto = 0,
+        $async$completer = P._makeAsyncAwaitCompleter(type$.legacy_Map_dynamic_dynamic),
+        $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], $async$self = this, e, st, error, exception, t2, t3, t4, t1, $async$exception;
+      var $async$_routeRequest$2 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
+        if ($async$errorCode === 1) {
+          $async$currentError = $async$result;
+          $async$goto = $async$handler;
+        }
+        while (true)
+          switch ($async$goto) {
+            case 0:
+              // Function start
+              t1 = $async$self._services;
+              if (!t1.containsKey$1(method)) {
+                t1 = type$.dynamic;
+                $async$returnValue = P.LinkedHashMap_LinkedHashMap$_literal(["error", new Q.RPCError(method, -32601, "method not found '" + H.S(method) + "'", null).toMap$0()], t1, t1);
+                // goto return
+                $async$goto = 1;
+                break;
+              }
+              $async$handler = 4;
+              $async$goto = 7;
+              return P._asyncAwait(t1.$index(0, method).call$1(params), $async$_routeRequest$2);
+            case 7:
+              // returning from await.
+              t1 = $async$result;
+              $async$returnValue = t1;
+              // goto return
+              $async$goto = 1;
+              break;
+              $async$handler = 2;
+              // goto after finally
+              $async$goto = 6;
+              break;
+            case 4:
+              // catch
+              $async$handler = 3;
+              $async$exception = $async$currentError;
+              e = H.unwrapException($async$exception);
+              st = H.getTraceFromException($async$exception);
+              t1 = H.S(e);
+              t2 = H.S(st);
+              t3 = type$.dynamic;
+              t4 = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, t3);
+              t4.$indexSet(0, "details", t2);
+              error = new Q.RPCError(method, -32000, t1, t4);
+              $async$returnValue = P.LinkedHashMap_LinkedHashMap$_literal(["error", error.toMap$0()], t3, t3);
+              // goto return
+              $async$goto = 1;
+              break;
+              // goto after finally
+              $async$goto = 6;
+              break;
+            case 3:
+              // uncaught
+              // goto rethrow
+              $async$goto = 2;
+              break;
+            case 6:
+              // after finally
+            case 1:
+              // return
+              return P._asyncReturn($async$returnValue, $async$completer);
+            case 2:
+              // rethrow
+              return P._asyncRethrow($async$currentError, $async$completer);
+          }
+      });
+      return P._asyncStartSync($async$_routeRequest$2, $async$completer);
+    },
+    set$_disposeHandler: function(_disposeHandler) {
+      type$.legacy_legacy_Future_dynamic_Function._as(_disposeHandler);
+    }
+  };
+  Q.VmService_closure.prototype = {
+    call$0: function() {
+      return this.$this._onDoneCompleter.complete$0();
+    },
+    "call*": "call$0",
+    $requiredArgCount: 0,
+    $signature: 0
+  };
+  Q.RPCError.prototype = {
+    get$details: function() {
+      var t1 = this.data;
+      return H._asStringS(t1 == null ? null : t1.$index(0, "details"));
+    },
+    toMap$0: function() {
+      var map = P.LinkedHashMap_LinkedHashMap$_literal(["code", this.code, "message", this.message], type$.legacy_String, type$.dynamic),
+        t1 = this.data;
+      if (t1 != null)
+        map.$indexSet(0, "data", t1);
+      return map;
+    },
+    toString$0: function(_) {
+      var _this = this,
+        t1 = _this.callingMethod,
+        t2 = _this.code,
+        t3 = _this.message;
+      if (_this.get$details() == null)
+        return H.S(t1) + ": (" + H.S(t2) + ") " + H.S(t3);
+      else
+        return H.S(t1) + ": (" + H.S(t2) + ") " + H.S(t3) + "\n" + H.S(_this.get$details());
+    }
+  };
+  Q.SentinelException.prototype = {
+    toString$0: function(_) {
+      return H.S(this.sentinel) + " from " + H.S(this.callingMethod) + "()";
+    }
+  };
+  Q.ExtensionData.prototype = {
+    toString$0: function(_) {
+      return "[ExtensionData " + this.data.toString$0(0) + "]";
+    }
+  };
+  Q._NullLog.prototype = {$isLog: 1};
+  Q.AllocationProfile.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "AllocationProfile");
+      t3 = _this.members;
+      t3.toString;
+      t4 = H._arrayInstanceType(t3);
+      t5 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["members", P.List_List$from(new H.MappedListIterable(t3, t4._eval$1("Map<String*,@>*(1)")._as(new Q.AllocationProfile_toJson_closure()), t5), true, t5._eval$1("ListIterable.E")), "memoryUsage", _this.memoryUsage.toJson$0()], t1, t2));
+      Q._setIfNotNull(json, "dateLastAccumulatorReset", _this.dateLastAccumulatorReset);
+      Q._setIfNotNull(json, "dateLastServiceGC", _this.dateLastServiceGC);
+      return json;
+    },
+    toString$0: function(_) {
+      return "[AllocationProfile type: " + H.S(this.type) + ", members: " + H.S(this.members) + ", memoryUsage: " + H.S(this.memoryUsage) + "]";
+    },
+    set$members: function(members) {
+      this.members = type$.legacy_List_legacy_ClassHeapStats._as(members);
+    }
+  };
+  Q.AllocationProfile_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ClassHeapStats._as(f).toJson$0();
+    },
+    $signature: 30
+  };
+  Q.BoundField.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["decl", this.decl.toJson$0(), "value", this.value.toJson$0()], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[BoundField decl: " + H.S(this.decl) + ", value: " + H.S(this.value) + "]";
+    }
+  };
+  Q.BoundVariable.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "BoundVariable");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", _this.name, "value", _this.value.toJson$0(), "declarationTokenPos", _this.declarationTokenPos, "scopeStartTokenPos", _this.scopeStartTokenPos, "scopeEndTokenPos", _this.scopeEndTokenPos], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[BoundVariable type: " + H.S(_this.type) + ", name: " + H.S(_this.name) + ", value: " + H.S(_this.value) + ", declarationTokenPos: " + H.S(_this.declarationTokenPos) + ", scopeStartTokenPos: " + H.S(_this.scopeStartTokenPos) + ", scopeEndTokenPos: " + H.S(_this.scopeEndTokenPos) + "]";
+    }
+  };
+  Q.Breakpoint.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        json = _this.super$Obj$toJson();
+      json.$indexSet(0, "type", "Breakpoint");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["breakpointNumber", _this.breakpointNumber, "resolved", _this.resolved, "location", _this.location.toJson$0()], type$.legacy_String, type$.dynamic));
+      Q._setIfNotNull(json, "isSyntheticAsyncContinuation", _this.isSyntheticAsyncContinuation);
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Breakpoint && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[Breakpoint type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", breakpointNumber: " + H.S(_this.breakpointNumber) + ", resolved: " + H.S(_this.resolved) + ", location: " + H.S(_this.location) + "]";
+    }
+  };
+  Q.ClassRef.prototype = {
+    toJson$0: function() {
+      var json = this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@Class");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", this.name], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_ClassRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      return "[ClassRef type: " + H.S(this.type) + ", id: " + H.S(this.id) + ", name: " + H.S(this.name) + "]";
+    }
+  };
+  Q.Class.prototype = {
+    toJson$0: function() {
+      var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, _this = this, _null = null,
+        json = _this.super$Obj$toJson();
+      json.$indexSet(0, "type", "Class");
+      t1 = _this.name;
+      t2 = _this.isAbstract;
+      t3 = _this.isConst;
+      t4 = _this.library.toJson$0();
+      t5 = _this.interfaces;
+      t5.toString;
+      t6 = H._arrayInstanceType(t5);
+      t7 = t6._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t7 = P.List_List$from(new H.MappedListIterable(t5, t6._eval$1("Map<String*,@>*(1)")._as(new Q.Class_toJson_closure()), t7), true, t7._eval$1("ListIterable.E"));
+      t6 = _this.fields;
+      t6.toString;
+      t5 = H._arrayInstanceType(t6);
+      t8 = t5._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t8 = P.List_List$from(new H.MappedListIterable(t6, t5._eval$1("Map<String*,@>*(1)")._as(new Q.Class_toJson_closure0()), t8), true, t8._eval$1("ListIterable.E"));
+      t5 = _this.functions;
+      t5.toString;
+      t6 = H._arrayInstanceType(t5);
+      t9 = t6._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t9 = P.List_List$from(new H.MappedListIterable(t5, t6._eval$1("Map<String*,@>*(1)")._as(new Q.Class_toJson_closure1()), t9), true, t9._eval$1("ListIterable.E"));
+      t6 = _this.subclasses;
+      t6.toString;
+      t5 = H._arrayInstanceType(t6);
+      t10 = t5._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", t1, "abstract", t2, "const", t3, "library", t4, "interfaces", t7, "fields", t8, "functions", t9, "subclasses", P.List_List$from(new H.MappedListIterable(t6, t5._eval$1("Map<String*,@>*(1)")._as(new Q.Class_toJson_closure2()), t10), true, t10._eval$1("ListIterable.E"))], type$.legacy_String, type$.dynamic));
+      t10 = _this.error;
+      Q._setIfNotNull(json, "error", t10 == null ? _null : t10.toJson$0());
+      t1 = _this.location;
+      Q._setIfNotNull(json, "location", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.superClass;
+      Q._setIfNotNull(json, "super", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.superType;
+      Q._setIfNotNull(json, "superType", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.mixin;
+      Q._setIfNotNull(json, "mixin", t1 == null ? _null : t1.toJson$0());
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Class && this.id == other.id;
+    },
+    toString$0: function(_) {
+      return "[Class]";
+    },
+    set$interfaces: function(interfaces) {
+      this.interfaces = type$.legacy_List_legacy_InstanceRef._as(interfaces);
+    },
+    set$fields: function(fields) {
+      this.fields = type$.legacy_List_legacy_FieldRef._as(fields);
+    },
+    set$functions: function(functions) {
+      this.functions = type$.legacy_List_legacy_FuncRef._as(functions);
+    },
+    set$subclasses: function(subclasses) {
+      this.subclasses = type$.legacy_List_legacy_ClassRef._as(subclasses);
+    },
+    $isClassRef: 1
+  };
+  Q.Class_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_InstanceRef._as(f).toJson$0();
+    },
+    $signature: 20
+  };
+  Q.Class_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return type$.legacy_FieldRef._as(f).toJson$0();
+    },
+    $signature: 21
+  };
+  Q.Class_toJson_closure1.prototype = {
+    call$1: function(f) {
+      return type$.legacy_FuncRef._as(f).toJson$0();
+    },
+    $signature: 22
+  };
+  Q.Class_toJson_closure2.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ClassRef._as(f).toJson$0();
+    },
+    $signature: 8
+  };
+  Q.ClassHeapStats.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "ClassHeapStats");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["class", _this.classRef.toJson$0(), "accumulatedSize", _this.accumulatedSize, "bytesCurrent", _this.bytesCurrent, "instancesAccumulated", _this.instancesAccumulated, "instancesCurrent", _this.instancesCurrent], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[ClassHeapStats type: " + H.S(_this.type) + ", classRef: " + H.S(_this.classRef) + ", accumulatedSize: " + H.S(_this.accumulatedSize) + ", bytesCurrent: " + H.S(_this.bytesCurrent) + ", instancesAccumulated: " + H.S(_this.instancesAccumulated) + ", instancesCurrent: " + H.S(_this.instancesCurrent) + "]";
+    }
+  };
+  Q.ClassList.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "ClassList");
+      t3 = this.classes;
+      t3.toString;
+      t4 = H._arrayInstanceType(t3);
+      t5 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["classes", P.List_List$from(new H.MappedListIterable(t3, t4._eval$1("Map<String*,@>*(1)")._as(new Q.ClassList_toJson_closure()), t5), true, t5._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[ClassList type: " + H.S(this.type) + ", classes: " + H.S(this.classes) + "]";
+    },
+    set$classes: function(classes) {
+      this.classes = type$.legacy_List_legacy_ClassRef._as(classes);
+    }
+  };
+  Q.ClassList_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ClassRef._as(f).toJson$0();
+    },
+    $signature: 8
+  };
+  Q.ClientName.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "ClientName");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", this.name], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[ClientName type: " + H.S(this.type) + ", name: " + H.S(this.name) + "]";
+    }
+  };
+  Q.CodeRef.prototype = {
+    toJson$0: function() {
+      var json = this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@Code");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", this.name, "kind", this.kind], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_CodeRef._is(other) && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[CodeRef type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", name: " + H.S(_this.name) + ", kind: " + H.S(_this.kind) + "]";
+    }
+  };
+  Q.Code.prototype = {
+    toJson$0: function() {
+      var json = this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "Code");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", this.name, "kind", this.kind], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Code && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[Code type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", name: " + H.S(_this.name) + ", kind: " + H.S(_this.kind) + "]";
+    },
+    $isCodeRef: 1
+  };
+  Q.ContextRef.prototype = {
+    toJson$0: function() {
+      var json = this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@Context");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["length", this.length], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_ContextRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      return "[ContextRef type: " + H.S(this.type) + ", id: " + H.S(this.id) + ", length: " + H.S(this.length) + "]";
+    },
+    get$length: function(receiver) {
+      return this.length;
+    }
+  };
+  Q.Context.prototype = {
+    toJson$0: function() {
+      var t1, t2, t3, t4, _this = this,
+        json = _this.super$Obj$toJson();
+      json.$indexSet(0, "type", "Context");
+      t1 = _this.length;
+      t2 = _this.variables;
+      t2.toString;
+      t3 = H._arrayInstanceType(t2);
+      t4 = t3._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["length", t1, "variables", P.List_List$from(new H.MappedListIterable(t2, t3._eval$1("Map<String*,@>*(1)")._as(new Q.Context_toJson_closure()), t4), true, t4._eval$1("ListIterable.E"))], type$.legacy_String, type$.dynamic));
+      t4 = _this.parent;
+      Q._setIfNotNull(json, "parent", t4 == null ? null : t4.toJson$0());
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Context && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[Context type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", length: " + H.S(_this.length) + ", variables: " + H.S(_this.variables) + "]";
+    },
+    set$variables: function(variables) {
+      this.variables = type$.legacy_List_legacy_ContextElement._as(variables);
+    },
+    $isContextRef: 1,
+    get$length: function(receiver) {
+      return this.length;
+    }
+  };
+  Q.Context_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ContextElement._as(f).toJson$0();
+    },
+    $signature: 35
+  };
+  Q.ContextElement.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["value", this.value.toJson$0()], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[ContextElement value: " + H.S(this.value) + "]";
+    }
+  };
+  Q.CpuSamples.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "CpuSamples");
+      t3 = _this.samplePeriod;
+      t4 = _this.maxStackDepth;
+      t5 = _this.sampleCount;
+      t6 = _this.timeSpan;
+      t7 = _this.timeOriginMicros;
+      t8 = _this.timeExtentMicros;
+      t9 = _this.pid;
+      t10 = _this.functions;
+      t10.toString;
+      t11 = H._arrayInstanceType(t10);
+      t12 = t11._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t12 = P.List_List$from(new H.MappedListIterable(t10, t11._eval$1("Map<String*,@>*(1)")._as(new Q.CpuSamples_toJson_closure()), t12), true, t12._eval$1("ListIterable.E"));
+      t11 = _this.samples;
+      t11.toString;
+      t10 = H._arrayInstanceType(t11);
+      t13 = t10._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["samplePeriod", t3, "maxStackDepth", t4, "sampleCount", t5, "timeSpan", t6, "timeOriginMicros", t7, "timeExtentMicros", t8, "pid", t9, "functions", t12, "samples", P.List_List$from(new H.MappedListIterable(t11, t10._eval$1("Map<String*,@>*(1)")._as(new Q.CpuSamples_toJson_closure0()), t13), true, t13._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[CpuSamples]";
+    },
+    set$functions: function(functions) {
+      this.functions = type$.legacy_List_legacy_ProfileFunction._as(functions);
+    },
+    set$samples: function(samples) {
+      this.samples = type$.legacy_List_legacy_CpuSample._as(samples);
+    }
+  };
+  Q.CpuSamples_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ProfileFunction._as(f).toJson$0();
+    },
+    $signature: 36
+  };
+  Q.CpuSamples_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return type$.legacy_CpuSample._as(f).toJson$0();
+    },
+    $signature: 37
+  };
+  Q.CpuSample.prototype = {
+    toJson$0: function() {
+      var t6, t7, _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2),
+        t3 = _this.tid,
+        t4 = _this.timestamp,
+        t5 = _this.stack;
+      t5.toString;
+      t6 = H._arrayInstanceType(t5);
+      t7 = t6._eval$1("MappedListIterable<1,int*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["tid", t3, "timestamp", t4, "stack", P.List_List$from(new H.MappedListIterable(t5, t6._eval$1("int*(1)")._as(new Q.CpuSample_toJson_closure()), t7), true, t7._eval$1("ListIterable.E"))], t1, t2));
+      Q._setIfNotNull(json, "vmTag", _this.vmTag);
+      Q._setIfNotNull(json, "userTag", _this.userTag);
+      Q._setIfNotNull(json, "truncated", _this.truncated);
+      return json;
+    },
+    toString$0: function(_) {
+      return "[CpuSample tid: " + H.S(this.tid) + ", timestamp: " + H.S(this.timestamp) + ", stack: " + H.S(this.stack) + "]";
+    },
+    set$stack: function(stack) {
+      this.stack = type$.legacy_List_legacy_int._as(stack);
+    }
+  };
+  Q.CpuSample_toJson_closure.prototype = {
+    call$1: function(f) {
+      return H._asIntS(f);
+    },
+    $signature: 4
+  };
+  Q.ErrorRef.prototype = {
+    toJson$0: function() {
+      var json = this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@Error");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["kind", this.kind, "message", this.message], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_ErrorRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[ErrorRef type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", kind: " + H.S(_this.kind) + ", message: " + H.S(_this.message) + "]";
+    }
+  };
+  Q.Error.prototype = {
+    toJson$0: function() {
+      var t1, _this = this,
+        json = _this.super$Obj$toJson();
+      json.$indexSet(0, "type", "Error");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["kind", _this.kind, "message", _this.message], type$.legacy_String, type$.dynamic));
+      t1 = _this.exception;
+      Q._setIfNotNull(json, "exception", t1 == null ? null : t1.toJson$0());
+      t1 = _this.stacktrace;
+      Q._setIfNotNull(json, "stacktrace", t1 == null ? null : t1.toJson$0());
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Error && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[Error type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", kind: " + H.S(_this.kind) + ", message: " + H.S(_this.message) + "]";
+    },
+    $isErrorRef: 1
+  };
+  Q.Event.prototype = {
+    toJson$0: function() {
+      var _this = this, _null = null,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Event");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["kind", _this.kind, "timestamp", _this.timestamp], t1, t2));
+      t2 = _this.isolate;
+      Q._setIfNotNull(json, "isolate", t2 == null ? _null : t2.toJson$0());
+      t1 = _this.vm;
+      Q._setIfNotNull(json, "vm", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.breakpoint;
+      Q._setIfNotNull(json, "breakpoint", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.pauseBreakpoints;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("Map<String*,@>*(1)")._as(new Q.Event_toJson_closure()), t2._eval$1("MappedListIterable<1,Map<String*,@>*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "pauseBreakpoints", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      t1 = _this.topFrame;
+      Q._setIfNotNull(json, "topFrame", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.exception;
+      Q._setIfNotNull(json, "exception", t1 == null ? _null : t1.toJson$0());
+      Q._setIfNotNull(json, "bytes", _this.bytes);
+      t1 = _this.inspectee;
+      Q._setIfNotNull(json, "inspectee", t1 == null ? _null : t1.toJson$0());
+      Q._setIfNotNull(json, "extensionRPC", _this.extensionRPC);
+      Q._setIfNotNull(json, "extensionKind", _this.extensionKind);
+      t1 = _this.extensionData;
+      Q._setIfNotNull(json, "extensionData", t1 == null ? _null : t1.data);
+      t1 = _this.timelineEvents;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("Map<String*,@>*(1)")._as(new Q.Event_toJson_closure0()), t2._eval$1("MappedListIterable<1,Map<String*,@>*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "timelineEvents", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      t1 = _this.updatedStreams;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("String*(1)")._as(new Q.Event_toJson_closure1()), t2._eval$1("MappedListIterable<1,String*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "updatedStreams", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      Q._setIfNotNull(json, "atAsyncSuspension", _this.atAsyncSuspension);
+      Q._setIfNotNull(json, "status", _this.status);
+      t1 = _this.logRecord;
+      Q._setIfNotNull(json, "logRecord", t1 == null ? _null : t1.toJson$0());
+      Q._setIfNotNull(json, "service", _this.service);
+      Q._setIfNotNull(json, "method", _this.method);
+      Q._setIfNotNull(json, "alias", _this.alias);
+      Q._setIfNotNull(json, "flag", _this.flag);
+      Q._setIfNotNull(json, "newValue", _this.newValue);
+      Q._setIfNotNull(json, "last", _this.last);
+      Q._setIfNotNull(json, "data", _this.data);
+      return json;
+    },
+    toString$0: function(_) {
+      return "[Event type: " + H.S(this.type) + ", kind: " + H.S(this.kind) + ", timestamp: " + H.S(this.timestamp) + "]";
+    },
+    set$pauseBreakpoints: function(pauseBreakpoints) {
+      this.pauseBreakpoints = type$.legacy_List_legacy_Breakpoint._as(pauseBreakpoints);
+    },
+    set$timelineEvents: function(timelineEvents) {
+      this.timelineEvents = type$.legacy_List_legacy_TimelineEvent._as(timelineEvents);
+    },
+    set$updatedStreams: function(updatedStreams) {
+      this.updatedStreams = type$.legacy_List_legacy_String._as(updatedStreams);
+    }
+  };
+  Q.Event_toJson_closure.prototype = {
+    call$1: function(f) {
+      type$.legacy_Breakpoint._as(f);
+      return f == null ? null : f.toJson$0();
+    },
+    $signature: 23
+  };
+  Q.Event_toJson_closure0.prototype = {
+    call$1: function(f) {
+      type$.legacy_TimelineEvent._as(f);
+      return f == null ? null : f.toJson$0();
+    },
+    $signature: 24
+  };
+  Q.Event_toJson_closure1.prototype = {
+    call$1: function(f) {
+      return H._asStringS(f);
+    },
+    $signature: 5
+  };
+  Q.FieldRef.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        json = _this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@Field");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", _this.name, "owner", _this.owner.toJson$0(), "declaredType", _this.declaredType.toJson$0(), "const", _this.isConst, "final", _this.isFinal, "static", _this.isStatic], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_FieldRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      return "[FieldRef]";
+    }
+  };
+  Q.Field.prototype = {
+    toJson$0: function() {
+      var t1, _this = this,
+        json = _this.super$Obj$toJson();
+      json.$indexSet(0, "type", "Field");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", _this.name, "owner", _this.owner.toJson$0(), "declaredType", _this.declaredType.toJson$0(), "const", _this.isConst, "final", _this.isFinal, "static", _this.isStatic], type$.legacy_String, type$.dynamic));
+      t1 = _this.staticValue;
+      Q._setIfNotNull(json, "staticValue", t1 == null ? null : t1.toJson$0());
+      t1 = _this.location;
+      Q._setIfNotNull(json, "location", t1 == null ? null : t1.toJson$0());
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Field && this.id == other.id;
+    },
+    toString$0: function(_) {
+      return "[Field]";
+    },
+    $isFieldRef: 1
+  };
+  Q.Flag.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", _this.name, "comment", _this.comment, "modified", _this.modified], t1, t2));
+      Q._setIfNotNull(json, "valueAsString", _this.valueAsString);
+      return json;
+    },
+    toString$0: function(_) {
+      return "[Flag name: " + H.S(this.name) + ", comment: " + H.S(this.comment) + ", modified: " + H.S(this.modified) + "]";
+    }
+  };
+  Q.FlagList.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "FlagList");
+      t3 = this.flags;
+      t3.toString;
+      t4 = H._arrayInstanceType(t3);
+      t5 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["flags", P.List_List$from(new H.MappedListIterable(t3, t4._eval$1("Map<String*,@>*(1)")._as(new Q.FlagList_toJson_closure()), t5), true, t5._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[FlagList type: " + H.S(this.type) + ", flags: " + H.S(this.flags) + "]";
+    },
+    set$flags: function(flags) {
+      this.flags = type$.legacy_List_legacy_Flag._as(flags);
+    }
+  };
+  Q.FlagList_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_Flag._as(f).toJson$0();
+    },
+    $signature: 42
+  };
+  Q.Frame.prototype = {
+    toJson$0: function() {
+      var _this = this, _null = null,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Frame");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["index", _this.index], t1, t2));
+      t2 = _this.$function;
+      Q._setIfNotNull(json, "function", t2 == null ? _null : t2.toJson$0());
+      t1 = _this.code;
+      Q._setIfNotNull(json, "code", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.location;
+      Q._setIfNotNull(json, "location", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.vars;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("Map<String*,@>*(1)")._as(new Q.Frame_toJson_closure()), t2._eval$1("MappedListIterable<1,Map<String*,@>*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "vars", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      Q._setIfNotNull(json, "kind", _this.kind);
+      return json;
+    },
+    toString$0: function(_) {
+      return "[Frame type: " + H.S(this.type) + ", index: " + H.S(this.index) + "]";
+    },
+    set$vars: function(vars) {
+      this.vars = type$.legacy_List_legacy_BoundVariable._as(vars);
+    }
+  };
+  Q.Frame_toJson_closure.prototype = {
+    call$1: function(f) {
+      type$.legacy_BoundVariable._as(f);
+      return f == null ? null : f.toJson$0();
+    },
+    $signature: 43
+  };
+  Q.FuncRef.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        json = _this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@Function");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", _this.name, "owner", _this.owner.toJson$0(), "static", _this.isStatic, "const", _this.isConst], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_FuncRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[FuncRef type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", name: " + H.S(_this.name) + ", owner: " + H.S(_this.owner) + ", isStatic: " + H.S(_this.isStatic) + ", isConst: " + H.S(_this.isConst) + "]";
+    }
+  };
+  Q.Func.prototype = {
+    toJson$0: function() {
+      var t1, _this = this,
+        json = _this.super$Obj$toJson();
+      json.$indexSet(0, "type", "Function");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", _this.name, "owner", _this.owner.toJson$0(), "static", _this.isStatic, "const", _this.isConst], type$.legacy_String, type$.dynamic));
+      t1 = _this.location;
+      Q._setIfNotNull(json, "location", t1 == null ? null : t1.toJson$0());
+      t1 = _this.code;
+      Q._setIfNotNull(json, "code", t1 == null ? null : t1.toJson$0());
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Func && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[Func type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", name: " + H.S(_this.name) + ", owner: " + H.S(_this.owner) + ", isStatic: " + H.S(_this.isStatic) + ", isConst: " + H.S(_this.isConst) + "]";
+    },
+    $isFuncRef: 1
+  };
+  Q.InstanceRef.prototype = {
+    InstanceRef$_fromJson$1: function(json) {
+      var t1, t2, _this = this;
+      _this.kind = H._asStringS(json.$index(0, "kind"));
+      t1 = type$.legacy_ClassRef;
+      _this.classRef = t1._as(Q.createServiceObject(json.$index(0, "class"), C.List_ClassRef));
+      _this.set$valueAsString(H._asStringS(json.$index(0, "valueAsString")));
+      t2 = json.$index(0, "valueAsStringIsTruncated");
+      _this.valueAsStringIsTruncated = H._asBoolS(t2 == null ? false : t2);
+      _this.length = H._asIntS(json.$index(0, "length"));
+      _this.name = H._asStringS(json.$index(0, "name"));
+      _this.typeClass = t1._as(Q.createServiceObject(json.$index(0, "typeClass"), C.List_ClassRef));
+      _this.parameterizedClass = t1._as(Q.createServiceObject(json.$index(0, "parameterizedClass"), C.List_ClassRef));
+      _this.pattern = type$.legacy_InstanceRef._as(Q.createServiceObject(json.$index(0, "pattern"), C.List_InstanceRef));
+      _this.closureFunction = type$.legacy_FuncRef._as(Q.createServiceObject(json.$index(0, "closureFunction"), C.List_FuncRef));
+      _this.closureContext = type$.legacy_ContextRef._as(Q.createServiceObject(json.$index(0, "closureContext"), C.List_ContextRef));
+    },
+    toJson$0: function() {
+      var t1, _this = this, _null = null,
+        json = _this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@Instance");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["kind", _this.kind, "class", _this.classRef.toJson$0()], type$.legacy_String, type$.dynamic));
+      Q._setIfNotNull(json, "valueAsString", _this.get$valueAsString());
+      t1 = _this.valueAsStringIsTruncated;
+      Q._setIfNotNull(json, "valueAsStringIsTruncated", t1 === true);
+      Q._setIfNotNull(json, "length", _this.length);
+      Q._setIfNotNull(json, "name", _this.name);
+      t1 = _this.typeClass;
+      Q._setIfNotNull(json, "typeClass", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.parameterizedClass;
+      Q._setIfNotNull(json, "parameterizedClass", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.pattern;
+      Q._setIfNotNull(json, "pattern", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.closureFunction;
+      Q._setIfNotNull(json, "closureFunction", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.closureContext;
+      Q._setIfNotNull(json, "closureContext", t1 == null ? _null : t1.toJson$0());
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_InstanceRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[InstanceRef type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", kind: " + H.S(_this.kind) + ", classRef: " + H.S(_this.classRef) + "]";
+    },
+    set$valueAsString: function(valueAsString) {
+      this.valueAsString = H._asStringS(valueAsString);
+    },
+    get$valueAsString: function() {
+      return this.valueAsString;
+    },
+    get$length: function(receiver) {
+      return this.length;
+    }
+  };
+  Q.Instance.prototype = {
+    Instance$_fromJson$1: function(json) {
+      var t1, t2, _this = this,
+        _s8_ = "elements",
+        _s12_ = "associations";
+      _this.kind = H._asStringS(json.$index(0, "kind"));
+      t1 = type$.legacy_ClassRef;
+      _this.Instance_classRef = t1._as(Q.createServiceObject(json.$index(0, "class"), C.List_ClassRef));
+      _this.set$valueAsString(H._asStringS(json.$index(0, "valueAsString")));
+      t2 = json.$index(0, "valueAsStringIsTruncated");
+      _this.valueAsStringIsTruncated = H._asBoolS(t2 == null ? false : t2);
+      _this.length = H._asIntS(json.$index(0, "length"));
+      _this.offset = H._asIntS(json.$index(0, "offset"));
+      _this.count = H._asIntS(json.$index(0, "count"));
+      _this.name = H._asStringS(json.$index(0, "name"));
+      _this.typeClass = t1._as(Q.createServiceObject(json.$index(0, "typeClass"), C.List_ClassRef));
+      _this.parameterizedClass = t1._as(Q.createServiceObject(json.$index(0, "parameterizedClass"), C.List_ClassRef));
+      _this.set$fields(json.$index(0, "fields") == null ? null : P.List_List$from(type$.Iterable_dynamic._as(Q.createServiceObject(json.$index(0, "fields"), C.List_BoundField)), true, type$.legacy_BoundField));
+      _this.elements = json.$index(0, _s8_) == null ? null : P.List_List$from(type$.Iterable_dynamic._as(Q.createServiceObject(json.$index(0, _s8_), C.List_dynamic)), true, type$.dynamic);
+      _this.set$associations(json.$index(0, _s12_) == null ? null : P.List_List$from(type$.Iterable_dynamic._as(Q._createSpecificObject(json.$index(0, _s12_), Q.vm_service_MapAssociation_parse$closure())), true, type$.legacy_MapAssociation));
+      _this.bytes = H._asStringS(json.$index(0, "bytes"));
+      t1 = type$.legacy_InstanceRef;
+      _this.mirrorReferent = t1._as(Q.createServiceObject(json.$index(0, "mirrorReferent"), C.List_InstanceRef));
+      _this.pattern = t1._as(Q.createServiceObject(json.$index(0, "pattern"), C.List_InstanceRef));
+      _this.closureFunction = type$.legacy_FuncRef._as(Q.createServiceObject(json.$index(0, "closureFunction"), C.List_FuncRef));
+      _this.closureContext = type$.legacy_ContextRef._as(Q.createServiceObject(json.$index(0, "closureContext"), C.List_ContextRef));
+      _this.isCaseSensitive = H._asBoolS(json.$index(0, "isCaseSensitive"));
+      _this.isMultiLine = H._asBoolS(json.$index(0, "isMultiLine"));
+      _this.propertyKey = t1._as(Q.createServiceObject(json.$index(0, "propertyKey"), C.List_InstanceRef));
+      _this.propertyValue = t1._as(Q.createServiceObject(json.$index(0, "propertyValue"), C.List_InstanceRef));
+      _this.typeArguments = type$.legacy_TypeArgumentsRef._as(Q.createServiceObject(json.$index(0, "typeArguments"), C.List_TypeArgumentsRef));
+      _this.parameterIndex = H._asIntS(json.$index(0, "parameterIndex"));
+      _this.targetType = t1._as(Q.createServiceObject(json.$index(0, "targetType"), C.List_InstanceRef));
+      _this.bound = t1._as(Q.createServiceObject(json.$index(0, "bound"), C.List_InstanceRef));
+    },
+    toJson$0: function() {
+      var t1, t2, _this = this, _null = null,
+        json = _this.super$Obj$toJson();
+      json.$indexSet(0, "type", "Instance");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["kind", _this.kind, "class", _this.Instance_classRef.toJson$0()], type$.legacy_String, type$.dynamic));
+      Q._setIfNotNull(json, "valueAsString", _this.get$valueAsString());
+      t1 = _this.valueAsStringIsTruncated;
+      Q._setIfNotNull(json, "valueAsStringIsTruncated", t1 === true);
+      Q._setIfNotNull(json, "length", _this.length);
+      Q._setIfNotNull(json, "offset", _this.offset);
+      Q._setIfNotNull(json, "count", _this.count);
+      Q._setIfNotNull(json, "name", _this.name);
+      t1 = _this.typeClass;
+      Q._setIfNotNull(json, "typeClass", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.parameterizedClass;
+      Q._setIfNotNull(json, "parameterizedClass", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.fields;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("Map<String*,@>*(1)")._as(new Q.Instance_toJson_closure()), t2._eval$1("MappedListIterable<1,Map<String*,@>*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "fields", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      t1 = _this.elements;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("@(1)")._as(new Q.Instance_toJson_closure0()), t2._eval$1("MappedListIterable<1,@>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "elements", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      t1 = _this.associations;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("Map<String*,@>*(1)")._as(new Q.Instance_toJson_closure1()), t2._eval$1("MappedListIterable<1,Map<String*,@>*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "associations", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      Q._setIfNotNull(json, "bytes", _this.bytes);
+      t1 = _this.mirrorReferent;
+      Q._setIfNotNull(json, "mirrorReferent", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.pattern;
+      Q._setIfNotNull(json, "pattern", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.closureFunction;
+      Q._setIfNotNull(json, "closureFunction", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.closureContext;
+      Q._setIfNotNull(json, "closureContext", t1 == null ? _null : t1.toJson$0());
+      Q._setIfNotNull(json, "isCaseSensitive", _this.isCaseSensitive);
+      Q._setIfNotNull(json, "isMultiLine", _this.isMultiLine);
+      t1 = _this.propertyKey;
+      Q._setIfNotNull(json, "propertyKey", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.propertyValue;
+      Q._setIfNotNull(json, "propertyValue", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.typeArguments;
+      Q._setIfNotNull(json, "typeArguments", t1 == null ? _null : t1.toJson$0());
+      Q._setIfNotNull(json, "parameterIndex", _this.parameterIndex);
+      t1 = _this.targetType;
+      Q._setIfNotNull(json, "targetType", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.bound;
+      Q._setIfNotNull(json, "bound", t1 == null ? _null : t1.toJson$0());
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Instance && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[Instance type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", kind: " + H.S(_this.kind) + ", classRef: " + H.S(_this.Instance_classRef) + "]";
+    },
+    set$classRef: function(classRef) {
+      this.Instance_classRef = type$.legacy_ClassRef._as(classRef);
+    },
+    set$valueAsString: function(valueAsString) {
+      this.valueAsString = H._asStringS(valueAsString);
+    },
+    set$fields: function(fields) {
+      this.fields = type$.legacy_List_legacy_BoundField._as(fields);
+    },
+    set$associations: function(associations) {
+      this.associations = type$.legacy_List_legacy_MapAssociation._as(associations);
+    },
+    $isInstanceRef: 1,
+    get$classRef: function() {
+      return this.Instance_classRef;
+    },
+    get$valueAsString: function() {
+      return this.valueAsString;
+    },
+    get$length: function(receiver) {
+      return this.length;
+    }
+  };
+  Q.Instance_toJson_closure.prototype = {
+    call$1: function(f) {
+      type$.legacy_BoundField._as(f);
+      return f == null ? null : f.toJson$0();
+    },
+    $signature: 26
+  };
+  Q.Instance_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return f == null ? null : f.toJson$0();
+    },
+    $signature: 3
+  };
+  Q.Instance_toJson_closure1.prototype = {
+    call$1: function(f) {
+      type$.legacy_MapAssociation._as(f);
+      return f == null ? null : f.toJson$0();
+    },
+    $signature: 45
+  };
+  Q.IsolateRef.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "@Isolate");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["id", this.id, "number", this.number, "name", this.name], t1, t2));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_IsolateRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[IsolateRef type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", number: " + H.S(_this.number) + ", name: " + H.S(_this.name) + "]";
+    },
+    get$id: function(receiver) {
+      return this.id;
+    }
+  };
+  Q.Isolate.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, _this = this, _null = null,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Isolate");
+      t3 = _this.id;
+      t4 = _this.number;
+      t5 = _this.name;
+      t6 = _this.startTime;
+      t7 = _this.runnable;
+      t8 = _this.livePorts;
+      t9 = _this.pauseOnExit;
+      t10 = _this.pauseEvent.toJson$0();
+      t11 = _this.libraries;
+      t11.toString;
+      t12 = H._arrayInstanceType(t11);
+      t13 = t12._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t13 = P.List_List$from(new H.MappedListIterable(t11, t12._eval$1("Map<String*,@>*(1)")._as(new Q.Isolate_toJson_closure()), t13), true, t13._eval$1("ListIterable.E"));
+      t12 = _this.breakpoints;
+      t12.toString;
+      t11 = H._arrayInstanceType(t12);
+      t14 = t11._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["id", t3, "number", t4, "name", t5, "startTime", t6, "runnable", t7, "livePorts", t8, "pauseOnExit", t9, "pauseEvent", t10, "libraries", t13, "breakpoints", P.List_List$from(new H.MappedListIterable(t12, t11._eval$1("Map<String*,@>*(1)")._as(new Q.Isolate_toJson_closure0()), t14), true, t14._eval$1("ListIterable.E")), "exceptionPauseMode", _this.exceptionPauseMode], t1, t2));
+      t2 = _this.rootLib;
+      Q._setIfNotNull(json, "rootLib", t2 == null ? _null : t2.toJson$0());
+      t1 = _this.error;
+      Q._setIfNotNull(json, "error", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.extensionRPCs;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("String*(1)")._as(new Q.Isolate_toJson_closure1()), t2._eval$1("MappedListIterable<1,String*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "extensionRPCs", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Isolate && this.id == other.id;
+    },
+    toString$0: function(_) {
+      return "[Isolate]";
+    },
+    set$libraries: function(libraries) {
+      this.libraries = type$.legacy_List_legacy_LibraryRef._as(libraries);
+    },
+    set$breakpoints: function(breakpoints) {
+      this.breakpoints = type$.legacy_List_legacy_Breakpoint._as(breakpoints);
+    },
+    set$extensionRPCs: function(extensionRPCs) {
+      this.extensionRPCs = type$.legacy_List_legacy_String._as(extensionRPCs);
+    },
+    $isIsolateRef: 1,
+    get$id: function(receiver) {
+      return this.id;
+    }
+  };
+  Q.Isolate_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_LibraryRef._as(f).toJson$0();
+    },
+    $signature: 46
+  };
+  Q.Isolate_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return type$.legacy_Breakpoint._as(f).toJson$0();
+    },
+    $signature: 23
+  };
+  Q.Isolate_toJson_closure1.prototype = {
+    call$1: function(f) {
+      return H._asStringS(f);
+    },
+    $signature: 5
+  };
+  Q.IsolateGroupRef.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "@IsolateGroup");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["id", this.id, "number", this.number, "name", this.name], t1, t2));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_IsolateGroupRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[IsolateGroupRef type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", number: " + H.S(_this.number) + ", name: " + H.S(_this.name) + "]";
+    },
+    get$id: function(receiver) {
+      return this.id;
+    }
+  };
+  Q.IsolateGroup.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, t6, t7, t8, _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "IsolateGroup");
+      t3 = _this.id;
+      t4 = _this.number;
+      t5 = _this.name;
+      t6 = _this.isolates;
+      t6.toString;
+      t7 = H._arrayInstanceType(t6);
+      t8 = t7._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["id", t3, "number", t4, "name", t5, "isolates", P.List_List$from(new H.MappedListIterable(t6, t7._eval$1("Map<String*,@>*(1)")._as(new Q.IsolateGroup_toJson_closure()), t8), true, t8._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.IsolateGroup && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[IsolateGroup type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", number: " + H.S(_this.number) + ", name: " + H.S(_this.name) + ", isolates: " + H.S(_this.isolates) + "]";
+    },
+    set$isolates: function(isolates) {
+      this.isolates = type$.legacy_List_legacy_IsolateRef._as(isolates);
+    },
+    $isIsolateGroupRef: 1,
+    get$id: function(receiver) {
+      return this.id;
+    }
+  };
+  Q.IsolateGroup_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_IsolateRef._as(f).toJson$0();
+    },
+    $signature: 25
+  };
+  Q.InboundReferences.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "InboundReferences");
+      t3 = this.references;
+      t3.toString;
+      t4 = H._arrayInstanceType(t3);
+      t5 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["references", P.List_List$from(new H.MappedListIterable(t3, t4._eval$1("Map<String*,@>*(1)")._as(new Q.InboundReferences_toJson_closure()), t5), true, t5._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[InboundReferences type: " + H.S(this.type) + ", references: " + H.S(this.references) + "]";
+    },
+    set$references: function(references) {
+      this.references = type$.legacy_List_legacy_InboundReference._as(references);
+    }
+  };
+  Q.InboundReferences_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_InboundReference._as(f).toJson$0();
+    },
+    $signature: 48
+  };
+  Q.InboundReference.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["source", this.source.toJson$0()], t1, t2));
+      Q._setIfNotNull(json, "parentListIndex", this.parentListIndex);
+      t2 = this.parentField;
+      Q._setIfNotNull(json, "parentField", t2 == null ? null : t2.toJson$0());
+      return json;
+    },
+    toString$0: function(_) {
+      return "[InboundReference source: " + H.S(this.source) + "]";
+    }
+  };
+  Q.InstanceSet.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, t6,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "InstanceSet");
+      t3 = this.totalCount;
+      t4 = this.instances;
+      t4.toString;
+      t5 = H._arrayInstanceType(t4);
+      t6 = t5._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["totalCount", t3, "instances", P.List_List$from(new H.MappedListIterable(t4, t5._eval$1("Map<String*,@>*(1)")._as(new Q.InstanceSet_toJson_closure()), t6), true, t6._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[InstanceSet type: " + H.S(this.type) + ", totalCount: " + H.S(this.totalCount) + ", instances: " + H.S(this.instances) + "]";
+    },
+    set$instances: function(instances) {
+      this.instances = type$.legacy_List_legacy_ObjRef._as(instances);
+    }
+  };
+  Q.InstanceSet_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ObjRef._as(f).toJson$0();
+    },
+    $signature: 49
+  };
+  Q.LibraryRef.prototype = {
+    toJson$0: function() {
+      var json = this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@Library");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", this.name, "uri", this.uri], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_LibraryRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[LibraryRef type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", name: " + H.S(_this.name) + ", uri: " + H.S(_this.uri) + "]";
+    }
+  };
+  Q.Library.prototype = {
+    toJson$0: function() {
+      var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, _this = this,
+        json = _this.super$Obj$toJson();
+      json.$indexSet(0, "type", "Library");
+      t1 = _this.name;
+      t2 = _this.uri;
+      t3 = _this.debuggable;
+      t4 = _this.dependencies;
+      t4.toString;
+      t5 = H._arrayInstanceType(t4);
+      t6 = t5._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t6 = P.List_List$from(new H.MappedListIterable(t4, t5._eval$1("Map<String*,@>*(1)")._as(new Q.Library_toJson_closure()), t6), true, t6._eval$1("ListIterable.E"));
+      t5 = _this.scripts;
+      t5.toString;
+      t4 = H._arrayInstanceType(t5);
+      t7 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t7 = P.List_List$from(new H.MappedListIterable(t5, t4._eval$1("Map<String*,@>*(1)")._as(new Q.Library_toJson_closure0()), t7), true, t7._eval$1("ListIterable.E"));
+      t4 = _this.variables;
+      t4.toString;
+      t5 = H._arrayInstanceType(t4);
+      t8 = t5._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t8 = P.List_List$from(new H.MappedListIterable(t4, t5._eval$1("Map<String*,@>*(1)")._as(new Q.Library_toJson_closure1()), t8), true, t8._eval$1("ListIterable.E"));
+      t5 = _this.functions;
+      t5.toString;
+      t4 = H._arrayInstanceType(t5);
+      t9 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t9 = P.List_List$from(new H.MappedListIterable(t5, t4._eval$1("Map<String*,@>*(1)")._as(new Q.Library_toJson_closure2()), t9), true, t9._eval$1("ListIterable.E"));
+      t4 = _this.classes;
+      t4.toString;
+      t5 = H._arrayInstanceType(t4);
+      t10 = t5._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", t1, "uri", t2, "debuggable", t3, "dependencies", t6, "scripts", t7, "variables", t8, "functions", t9, "classes", P.List_List$from(new H.MappedListIterable(t4, t5._eval$1("Map<String*,@>*(1)")._as(new Q.Library_toJson_closure3()), t10), true, t10._eval$1("ListIterable.E"))], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Library && this.id == other.id;
+    },
+    toString$0: function(_) {
+      return "[Library]";
+    },
+    set$dependencies: function(dependencies) {
+      this.dependencies = type$.legacy_List_legacy_LibraryDependency._as(dependencies);
+    },
+    set$scripts: function(scripts) {
+      this.scripts = type$.legacy_List_legacy_ScriptRef._as(scripts);
+    },
+    set$variables: function(variables) {
+      this.variables = type$.legacy_List_legacy_FieldRef._as(variables);
+    },
+    set$functions: function(functions) {
+      this.functions = type$.legacy_List_legacy_FuncRef._as(functions);
+    },
+    set$classes: function(classes) {
+      this.classes = type$.legacy_List_legacy_ClassRef._as(classes);
+    },
+    $isLibraryRef: 1
+  };
+  Q.Library_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_LibraryDependency._as(f).toJson$0();
+    },
+    $signature: 50
+  };
+  Q.Library_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ScriptRef._as(f).toJson$0();
+    },
+    $signature: 9
+  };
+  Q.Library_toJson_closure1.prototype = {
+    call$1: function(f) {
+      return type$.legacy_FieldRef._as(f).toJson$0();
+    },
+    $signature: 21
+  };
+  Q.Library_toJson_closure2.prototype = {
+    call$1: function(f) {
+      return type$.legacy_FuncRef._as(f).toJson$0();
+    },
+    $signature: 22
+  };
+  Q.Library_toJson_closure3.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ClassRef._as(f).toJson$0();
+    },
+    $signature: 8
+  };
+  Q.LibraryDependency.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["isImport", _this.isImport, "isDeferred", _this.isDeferred, "prefix", _this.prefix, "target", _this.target.toJson$0()], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[LibraryDependency isImport: " + H.S(_this.isImport) + ", isDeferred: " + H.S(_this.isDeferred) + ", prefix: " + H.S(_this.prefix) + ", target: " + H.S(_this.target) + "]";
+    }
+  };
+  Q.LogRecord.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "LogRecord");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["message", _this.message.toJson$0(), "time", _this.time, "level", _this.level, "sequenceNumber", _this.sequenceNumber, "loggerName", _this.loggerName.toJson$0(), "zone", _this.zone.toJson$0(), "error", _this.error.toJson$0(), "stackTrace", _this.stackTrace.toJson$0()], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[LogRecord]";
+    }
+  };
+  Q.MapAssociation.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["key", this.key.toJson$0(), "value", this.value.toJson$0()], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[MapAssociation key: " + H.S(this.key) + ", value: " + H.S(this.value) + "]";
+    }
+  };
+  Q.MemoryUsage.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "MemoryUsage");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["externalUsage", this.externalUsage, "heapCapacity", this.heapCapacity, "heapUsage", this.heapUsage], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[MemoryUsage type: " + H.S(_this.type) + ", externalUsage: " + H.S(_this.externalUsage) + ", heapCapacity: " + H.S(_this.heapCapacity) + ", heapUsage: " + H.S(_this.heapUsage) + "]";
+    }
+  };
+  Q.Message.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Message");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["index", _this.index, "name", _this.name, "messageObjectId", _this.messageObjectId, "size", _this.size], t1, t2));
+      t2 = _this.handler;
+      Q._setIfNotNull(json, "handler", t2 == null ? null : t2.toJson$0());
+      t1 = _this.location;
+      Q._setIfNotNull(json, "location", t1 == null ? null : t1.toJson$0());
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[Message type: " + H.S(_this.type) + ", index: " + H.S(_this.index) + ", name: " + H.S(_this.name) + ", messageObjectId: " + H.S(_this.messageObjectId) + ", size: " + H.S(_this.size) + "]";
+    }
+  };
+  Q.NativeFunction.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", this.name], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[NativeFunction name: " + H.S(this.name) + "]";
+    }
+  };
+  Q.NullValRef.prototype = {
+    toJson$0: function() {
+      var json = this.super$InstanceRef$toJson();
+      json.$indexSet(0, "type", "@Null");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["valueAsString", this.NullValRef_valueAsString], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_NullValRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[NullValRef type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", kind: " + H.S(_this.kind) + ", classRef: " + H.S(_this.classRef) + ", valueAsString: " + H.S(_this.NullValRef_valueAsString) + "]";
+    },
+    set$valueAsString: function(valueAsString) {
+      this.NullValRef_valueAsString = H._asStringS(valueAsString);
+    },
+    get$valueAsString: function() {
+      return this.NullValRef_valueAsString;
+    }
+  };
+  Q.NullVal.prototype = {
+    toJson$0: function() {
+      var json = this.super$Instance$toJson();
+      json.$indexSet(0, "type", "Null");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["valueAsString", this.NullVal_valueAsString], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.NullVal && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[NullVal type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", kind: " + H.S(_this.kind) + ", classRef: " + H.S(_this.Instance_classRef) + ", valueAsString: " + H.S(_this.NullVal_valueAsString) + "]";
+    },
+    set$valueAsString: function(valueAsString) {
+      this.NullVal_valueAsString = H._asStringS(valueAsString);
+    },
+    $isNullValRef: 1,
+    get$valueAsString: function() {
+      return this.NullVal_valueAsString;
+    }
+  };
+  Q.ObjRef.prototype = {
+    ObjRef$_fromJson$1: function(json) {
+      this.id = H._asStringS(json.$index(0, "id"));
+      this.fixedId = H._asBoolS(json.$index(0, "fixedId"));
+    },
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "@Object");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["id", this.id], t1, t2));
+      Q._setIfNotNull(json, "fixedId", this.fixedId);
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_ObjRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      return "[ObjRef type: " + H.S(this.type) + ", id: " + H.S(this.id) + "]";
+    },
+    get$id: function(receiver) {
+      return this.id;
+    }
+  };
+  Q.Obj.prototype = {
+    Obj$_fromJson$1: function(json) {
+      var _this = this;
+      _this.id = H._asStringS(json.$index(0, "id"));
+      _this.fixedId = H._asBoolS(json.$index(0, "fixedId"));
+      _this.set$classRef(type$.legacy_ClassRef._as(Q.createServiceObject(json.$index(0, "class"), C.List_ClassRef)));
+      _this.size = H._asIntS(json.$index(0, "size"));
+    },
+    toJson$0: function() {
+      var _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Object");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["id", _this.id], t1, t2));
+      Q._setIfNotNull(json, "fixedId", _this.fixedId);
+      t2 = _this.get$classRef();
+      Q._setIfNotNull(json, "class", t2 == null ? null : t2.toJson$0());
+      Q._setIfNotNull(json, "size", _this.size);
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Obj && this.id == other.id;
+    },
+    toString$0: function(_) {
+      return "[Obj type: " + H.S(this.type) + ", id: " + H.S(this.id) + "]";
+    },
+    set$classRef: function(classRef) {
+      this.classRef = type$.legacy_ClassRef._as(classRef);
+    },
+    $isObjRef: 1,
+    get$id: function(receiver) {
+      return this.id;
+    },
+    get$classRef: function() {
+      return this.classRef;
+    }
+  };
+  Q.ProfileFunction.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["kind", _this.kind, "inclusiveTicks", _this.inclusiveTicks, "exclusiveTicks", _this.exclusiveTicks, "resolvedUrl", _this.resolvedUrl, "function", _this.$function.toJson$0()], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[ProfileFunction kind: " + H.S(_this.kind) + ", inclusiveTicks: " + H.S(_this.inclusiveTicks) + ", exclusiveTicks: " + H.S(_this.exclusiveTicks) + ", resolvedUrl: " + H.S(_this.resolvedUrl) + ", function: " + H.S(_this.$function) + "]";
+    }
+  };
+  Q.ReloadReport.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "ReloadReport");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["success", this.success], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[ReloadReport type: " + H.S(this.type) + ", success: " + H.S(this.success) + "]";
+    }
+  };
+  Q.RetainingObject.prototype = {
+    toJson$0: function() {
+      var _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["value", _this.value.toJson$0()], t1, t2));
+      Q._setIfNotNull(json, "parentListIndex", _this.parentListIndex);
+      t2 = _this.parentMapKey;
+      Q._setIfNotNull(json, "parentMapKey", t2 == null ? null : t2.toJson$0());
+      Q._setIfNotNull(json, "parentField", _this.parentField);
+      return json;
+    },
+    toString$0: function(_) {
+      return "[RetainingObject value: " + H.S(this.value) + "]";
+    }
+  };
+  Q.RetainingPath.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, t6, t7,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "RetainingPath");
+      t3 = this.length;
+      t4 = this.gcRootType;
+      t5 = this.elements;
+      t5.toString;
+      t6 = H._arrayInstanceType(t5);
+      t7 = t6._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["length", t3, "gcRootType", t4, "elements", P.List_List$from(new H.MappedListIterable(t5, t6._eval$1("Map<String*,@>*(1)")._as(new Q.RetainingPath_toJson_closure()), t7), true, t7._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[RetainingPath type: " + H.S(_this.type) + ", length: " + H.S(_this.length) + ", gcRootType: " + H.S(_this.gcRootType) + ", elements: " + H.S(_this.elements) + "]";
+    },
+    set$elements: function(elements) {
+      this.elements = type$.legacy_List_legacy_RetainingObject._as(elements);
+    },
+    get$length: function(receiver) {
+      return this.length;
+    }
+  };
+  Q.RetainingPath_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_RetainingObject._as(f).toJson$0();
+    },
+    $signature: 52
+  };
+  Q.Response.prototype = {
+    toJson$0: function() {
+      var result = P.LinkedHashMap_LinkedHashMap$of(this.json, type$.legacy_String, type$.dynamic),
+        t1 = this.type;
+      result.$indexSet(0, "type", t1 == null ? "Response" : t1);
+      return result;
+    },
+    toString$0: function(_) {
+      return "[Response type: " + H.S(this.type) + "]";
+    }
+  };
+  Q.Sentinel.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Sentinel");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["kind", this.kind, "valueAsString", this.valueAsString], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[Sentinel type: " + H.S(this.type) + ", kind: " + H.S(this.kind) + ", valueAsString: " + H.S(this.valueAsString) + "]";
+    }
+  };
+  Q.ScriptRef.prototype = {
+    toJson$0: function() {
+      var json = this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@Script");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["uri", this.uri], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_ScriptRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      return "[ScriptRef type: " + H.S(this.type) + ", id: " + H.S(this.id) + ", uri: " + H.S(this.uri) + "]";
+    }
+  };
+  Q.Script.prototype = {
+    Script$_fromJson$1: function(json) {
+      var _this = this,
+        _s13_ = "tokenPosTable";
+      _this.uri = H._asStringS(json.$index(0, "uri"));
+      _this.library = type$.legacy_LibraryRef._as(Q.createServiceObject(json.$index(0, "library"), C.List_LibraryRef));
+      _this.lineOffset = H._asIntS(json.$index(0, "lineOffset"));
+      _this.columnOffset = H._asIntS(json.$index(0, "columnOffset"));
+      _this.source = H._asStringS(json.$index(0, "source"));
+      _this.set$tokenPosTable(json.$index(0, _s13_) == null ? null : P.List_List$from(type$.Iterable_dynamic._as(J.map$1$ax(json.$index(0, _s13_), new Q.Script$_fromJson_closure())), true, type$.legacy_List_legacy_int));
+      _this._parseTokenPosTable$0();
+    },
+    _parseTokenPosTable$0: function() {
+      var lineSet, t1, t2, t3, t4, _i, line, t5, lineNumber, pos, tokenOffset, colNumber, _this = this;
+      if (_this.tokenPosTable == null)
+        return;
+      lineSet = P.LinkedHashSet_LinkedHashSet(type$.legacy_int);
+      for (t1 = _this.tokenPosTable, t2 = t1.length, t3 = _this._tokenToLine, t4 = _this._tokenToColumn, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
+        line = t1[_i];
+        t5 = J.getInterceptor$asx(line);
+        lineNumber = H._asIntS(t5.$index(line, 0));
+        lineSet.add$1(0, lineNumber);
+        for (pos = 1; pos < t5.get$length(line); pos += 2) {
+          tokenOffset = H._asIntS(t5.$index(line, pos));
+          colNumber = H._asIntS(t5.$index(line, pos + 1));
+          t3.$indexSet(0, tokenOffset, lineNumber);
+          t4.$indexSet(0, tokenOffset, colNumber);
+        }
+      }
+    },
+    toJson$0: function() {
+      var t1, t2, _this = this,
+        json = _this.super$Obj$toJson();
+      json.$indexSet(0, "type", "Script");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["uri", _this.uri, "library", _this.library.toJson$0()], type$.legacy_String, type$.dynamic));
+      Q._setIfNotNull(json, "lineOffset", _this.lineOffset);
+      Q._setIfNotNull(json, "columnOffset", _this.columnOffset);
+      Q._setIfNotNull(json, "source", _this.source);
+      t1 = _this.tokenPosTable;
+      if (t1 == null)
+        t1 = null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("List<int*>*(1)")._as(new Q.Script_toJson_closure()), t2._eval$1("MappedListIterable<1,List<int*>*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "tokenPosTable", t1 == null ? null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.Script && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[Script type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", uri: " + H.S(_this.uri) + ", library: " + H.S(_this.library) + "]";
+    },
+    set$tokenPosTable: function(tokenPosTable) {
+      this.tokenPosTable = type$.legacy_List_legacy_List_legacy_int._as(tokenPosTable);
+    },
+    $isScriptRef: 1
+  };
+  Q.Script$_fromJson_closure.prototype = {
+    call$1: function(list) {
+      return P.List_List$from(type$.Iterable_dynamic._as(list), true, type$.legacy_int);
+    },
+    $signature: 53
+  };
+  Q.Script_toJson_closure.prototype = {
+    call$1: function(f) {
+      type$.legacy_List_legacy_int._as(f);
+      return f == null ? null : J.toList$0$ax(f);
+    },
+    $signature: 54
+  };
+  Q.ScriptList.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "ScriptList");
+      t3 = this.scripts;
+      t3.toString;
+      t4 = H._arrayInstanceType(t3);
+      t5 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["scripts", P.List_List$from(new H.MappedListIterable(t3, t4._eval$1("Map<String*,@>*(1)")._as(new Q.ScriptList_toJson_closure()), t5), true, t5._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[ScriptList type: " + H.S(this.type) + ", scripts: " + H.S(this.scripts) + "]";
+    },
+    set$scripts: function(scripts) {
+      this.scripts = type$.legacy_List_legacy_ScriptRef._as(scripts);
+    }
+  };
+  Q.ScriptList_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ScriptRef._as(f).toJson$0();
+    },
+    $signature: 9
+  };
+  Q.SourceLocation.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "SourceLocation");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["script", this.script.toJson$0(), "tokenPos", this.tokenPos], t1, t2));
+      Q._setIfNotNull(json, "endTokenPos", this.endTokenPos);
+      return json;
+    },
+    toString$0: function(_) {
+      return "[SourceLocation type: " + H.S(this.type) + ", script: " + H.S(this.script) + ", tokenPos: " + H.S(this.tokenPos) + "]";
+    }
+  };
+  Q.SourceReport.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, t6,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "SourceReport");
+      t3 = this.ranges;
+      t3.toString;
+      t4 = H._arrayInstanceType(t3);
+      t5 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t5 = P.List_List$from(new H.MappedListIterable(t3, t4._eval$1("Map<String*,@>*(1)")._as(new Q.SourceReport_toJson_closure()), t5), true, t5._eval$1("ListIterable.E"));
+      t4 = this.scripts;
+      t4.toString;
+      t3 = H._arrayInstanceType(t4);
+      t6 = t3._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["ranges", t5, "scripts", P.List_List$from(new H.MappedListIterable(t4, t3._eval$1("Map<String*,@>*(1)")._as(new Q.SourceReport_toJson_closure0()), t6), true, t6._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[SourceReport type: " + H.S(this.type) + ", ranges: " + H.S(this.ranges) + ", scripts: " + H.S(this.scripts) + "]";
+    },
+    set$ranges: function(ranges) {
+      this.ranges = type$.legacy_List_legacy_SourceReportRange._as(ranges);
+    },
+    set$scripts: function(scripts) {
+      this.scripts = type$.legacy_List_legacy_ScriptRef._as(scripts);
+    }
+  };
+  Q.SourceReport_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_SourceReportRange._as(f).toJson$0();
+    },
+    $signature: 55
+  };
+  Q.SourceReport_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return type$.legacy_ScriptRef._as(f).toJson$0();
+    },
+    $signature: 9
+  };
+  Q.SourceReportCoverage.prototype = {
+    toJson$0: function() {
+      var t4, t5, t6,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2),
+        t3 = this.hits;
+      t3.toString;
+      t4 = H._arrayInstanceType(t3);
+      t5 = t4._eval$1("MappedListIterable<1,int*>");
+      t5 = P.List_List$from(new H.MappedListIterable(t3, t4._eval$1("int*(1)")._as(new Q.SourceReportCoverage_toJson_closure()), t5), true, t5._eval$1("ListIterable.E"));
+      t4 = this.misses;
+      t4.toString;
+      t3 = H._arrayInstanceType(t4);
+      t6 = t3._eval$1("MappedListIterable<1,int*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["hits", t5, "misses", P.List_List$from(new H.MappedListIterable(t4, t3._eval$1("int*(1)")._as(new Q.SourceReportCoverage_toJson_closure0()), t6), true, t6._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[SourceReportCoverage hits: " + H.S(this.hits) + ", misses: " + H.S(this.misses) + "]";
+    },
+    set$hits: function(hits) {
+      this.hits = type$.legacy_List_legacy_int._as(hits);
+    },
+    set$misses: function(misses) {
+      this.misses = type$.legacy_List_legacy_int._as(misses);
+    }
+  };
+  Q.SourceReportCoverage_toJson_closure.prototype = {
+    call$1: function(f) {
+      return H._asIntS(f);
+    },
+    $signature: 4
+  };
+  Q.SourceReportCoverage_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return H._asIntS(f);
+    },
+    $signature: 4
+  };
+  Q.SourceReportRange.prototype = {
+    toJson$0: function() {
+      var _this = this, _null = null,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["scriptIndex", _this.scriptIndex, "startPos", _this.startPos, "endPos", _this.endPos, "compiled", _this.compiled], t1, t2));
+      t2 = _this.error;
+      Q._setIfNotNull(json, "error", t2 == null ? _null : t2.toJson$0());
+      t1 = _this.coverage;
+      Q._setIfNotNull(json, "coverage", t1 == null ? _null : t1.toJson$0());
+      t1 = _this.possibleBreakpoints;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("int*(1)")._as(new Q.SourceReportRange_toJson_closure()), t2._eval$1("MappedListIterable<1,int*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "possibleBreakpoints", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[SourceReportRange scriptIndex: " + H.S(_this.scriptIndex) + ", startPos: " + H.S(_this.startPos) + ", endPos: " + H.S(_this.endPos) + ", compiled: " + H.S(_this.compiled) + "]";
+    },
+    set$possibleBreakpoints: function(possibleBreakpoints) {
+      this.possibleBreakpoints = type$.legacy_List_legacy_int._as(possibleBreakpoints);
+    }
+  };
+  Q.SourceReportRange_toJson_closure.prototype = {
+    call$1: function(f) {
+      return H._asIntS(f);
+    },
+    $signature: 4
+  };
+  Q.Stack.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, t6, _this = this, _null = null,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Stack");
+      t3 = _this.frames;
+      t3.toString;
+      t4 = H._arrayInstanceType(t3);
+      t5 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t5 = P.List_List$from(new H.MappedListIterable(t3, t4._eval$1("Map<String*,@>*(1)")._as(new Q.Stack_toJson_closure()), t5), true, t5._eval$1("ListIterable.E"));
+      t4 = _this.messages;
+      t4.toString;
+      t3 = H._arrayInstanceType(t4);
+      t6 = t3._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["frames", t5, "messages", P.List_List$from(new H.MappedListIterable(t4, t3._eval$1("Map<String*,@>*(1)")._as(new Q.Stack_toJson_closure0()), t6), true, t6._eval$1("ListIterable.E"))], t1, t2));
+      t2 = _this.asyncCausalFrames;
+      if (t2 == null)
+        t1 = _null;
+      else {
+        t1 = H._arrayInstanceType(t2);
+        t1 = new H.MappedListIterable(t2, t1._eval$1("Map<String*,@>*(1)")._as(new Q.Stack_toJson_closure1()), t1._eval$1("MappedListIterable<1,Map<String*,@>*>"));
+      }
+      Q._setIfNotNull(json, "asyncCausalFrames", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      t1 = _this.awaiterFrames;
+      if (t1 == null)
+        t1 = _null;
+      else {
+        t2 = H._arrayInstanceType(t1);
+        t2 = new H.MappedListIterable(t1, t2._eval$1("Map<String*,@>*(1)")._as(new Q.Stack_toJson_closure2()), t2._eval$1("MappedListIterable<1,Map<String*,@>*>"));
+        t1 = t2;
+      }
+      Q._setIfNotNull(json, "awaiterFrames", t1 == null ? _null : P.List_List$from(t1, true, t1.$ti._eval$1("ListIterable.E")));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[Stack type: " + H.S(this.type) + ", frames: " + H.S(this.frames) + ", messages: " + H.S(this.messages) + "]";
+    },
+    set$frames: function($frames) {
+      this.frames = type$.legacy_List_legacy_Frame._as($frames);
+    },
+    set$asyncCausalFrames: function(asyncCausalFrames) {
+      this.asyncCausalFrames = type$.legacy_List_legacy_Frame._as(asyncCausalFrames);
+    },
+    set$awaiterFrames: function(awaiterFrames) {
+      this.awaiterFrames = type$.legacy_List_legacy_Frame._as(awaiterFrames);
+    },
+    set$messages: function(messages) {
+      this.messages = type$.legacy_List_legacy_Message._as(messages);
+    }
+  };
+  Q.Stack_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_Frame._as(f).toJson$0();
+    },
+    $signature: 10
+  };
+  Q.Stack_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return type$.legacy_Message._as(f).toJson$0();
+    },
+    $signature: 57
+  };
+  Q.Stack_toJson_closure1.prototype = {
+    call$1: function(f) {
+      type$.legacy_Frame._as(f);
+      return f == null ? null : f.toJson$0();
+    },
+    $signature: 10
+  };
+  Q.Stack_toJson_closure2.prototype = {
+    call$1: function(f) {
+      type$.legacy_Frame._as(f);
+      return f == null ? null : f.toJson$0();
+    },
+    $signature: 10
+  };
+  Q.Success.prototype = {
+    toJson$0: function() {
+      var json = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.dynamic);
+      json.$indexSet(0, "type", "Success");
+      return json;
+    },
+    toString$0: function(_) {
+      return "[Success type: " + H.S(this.type) + "]";
+    }
+  };
+  Q.Timeline.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Timeline");
+      t3 = this.traceEvents;
+      t3.toString;
+      t4 = H._arrayInstanceType(t3);
+      t5 = t4._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["traceEvents", P.List_List$from(new H.MappedListIterable(t3, t4._eval$1("Map<String*,@>*(1)")._as(new Q.Timeline_toJson_closure()), t5), true, t5._eval$1("ListIterable.E")), "timeOriginMicros", this.timeOriginMicros, "timeExtentMicros", this.timeExtentMicros], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[Timeline type: " + H.S(_this.type) + ", traceEvents: " + H.S(_this.traceEvents) + ", timeOriginMicros: " + H.S(_this.timeOriginMicros) + ", timeExtentMicros: " + H.S(_this.timeExtentMicros) + "]";
+    },
+    set$traceEvents: function(traceEvents) {
+      this.traceEvents = type$.legacy_List_legacy_TimelineEvent._as(traceEvents);
+    }
+  };
+  Q.Timeline_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_TimelineEvent._as(f).toJson$0();
+    },
+    $signature: 24
+  };
+  Q.TimelineEvent.prototype = {
+    toJson$0: function() {
+      var result = P.LinkedHashMap_LinkedHashMap$of(this.json, type$.legacy_String, type$.dynamic);
+      result.$indexSet(0, "type", "TimelineEvent");
+      return result;
+    },
+    toString$0: function(_) {
+      return "[TimelineEvent ]";
+    }
+  };
+  Q.TimelineFlags.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, t6, t7,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "TimelineFlags");
+      t3 = this.recorderName;
+      t4 = this.availableStreams;
+      t4.toString;
+      t5 = H._arrayInstanceType(t4);
+      t6 = t5._eval$1("MappedListIterable<1,String*>");
+      t6 = P.List_List$from(new H.MappedListIterable(t4, t5._eval$1("String*(1)")._as(new Q.TimelineFlags_toJson_closure()), t6), true, t6._eval$1("ListIterable.E"));
+      t5 = this.recordedStreams;
+      t5.toString;
+      t4 = H._arrayInstanceType(t5);
+      t7 = t4._eval$1("MappedListIterable<1,String*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["recorderName", t3, "availableStreams", t6, "recordedStreams", P.List_List$from(new H.MappedListIterable(t5, t4._eval$1("String*(1)")._as(new Q.TimelineFlags_toJson_closure0()), t7), true, t7._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[TimelineFlags type: " + H.S(_this.type) + ", recorderName: " + H.S(_this.recorderName) + ", availableStreams: " + H.S(_this.availableStreams) + ", recordedStreams: " + H.S(_this.recordedStreams) + "]";
+    },
+    set$availableStreams: function(availableStreams) {
+      this.availableStreams = type$.legacy_List_legacy_String._as(availableStreams);
+    },
+    set$recordedStreams: function(recordedStreams) {
+      this.recordedStreams = type$.legacy_List_legacy_String._as(recordedStreams);
+    }
+  };
+  Q.TimelineFlags_toJson_closure.prototype = {
+    call$1: function(f) {
+      return H._asStringS(f);
+    },
+    $signature: 5
+  };
+  Q.TimelineFlags_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return H._asStringS(f);
+    },
+    $signature: 5
+  };
+  Q.Timestamp.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Timestamp");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["timestamp", this.timestamp], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[Timestamp type: " + H.S(this.type) + ", timestamp: " + H.S(this.timestamp) + "]";
+    }
+  };
+  Q.TypeArgumentsRef.prototype = {
+    toJson$0: function() {
+      var json = this.super$ObjRef$toJson();
+      json.$indexSet(0, "type", "@TypeArguments");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", this.name], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return type$.legacy_TypeArgumentsRef._is(other) && this.id == other.get$id(other);
+    },
+    toString$0: function(_) {
+      return "[TypeArgumentsRef type: " + H.S(this.type) + ", id: " + H.S(this.id) + ", name: " + H.S(this.name) + "]";
+    }
+  };
+  Q.TypeArguments.prototype = {
+    toJson$0: function() {
+      var t1, t2, t3, t4,
+        json = this.super$Obj$toJson();
+      json.$indexSet(0, "type", "TypeArguments");
+      t1 = this.name;
+      t2 = this.types;
+      t2.toString;
+      t3 = H._arrayInstanceType(t2);
+      t4 = t3._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", t1, "types", P.List_List$from(new H.MappedListIterable(t2, t3._eval$1("Map<String*,@>*(1)")._as(new Q.TypeArguments_toJson_closure()), t4), true, t4._eval$1("ListIterable.E"))], type$.legacy_String, type$.dynamic));
+      return json;
+    },
+    get$hashCode: function(_) {
+      return J.get$hashCode$(this.id);
+    },
+    $eq: function(_, other) {
+      if (other == null)
+        return false;
+      return other instanceof Q.TypeArguments && this.id == other.id;
+    },
+    toString$0: function(_) {
+      var _this = this;
+      return "[TypeArguments type: " + H.S(_this.type) + ", id: " + H.S(_this.id) + ", name: " + H.S(_this.name) + ", types: " + H.S(_this.types) + "]";
+    },
+    set$types: function(types) {
+      this.types = type$.legacy_List_legacy_InstanceRef._as(types);
+    },
+    $isTypeArgumentsRef: 1
+  };
+  Q.TypeArguments_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_InstanceRef._as(f).toJson$0();
+    },
+    $signature: 20
+  };
+  Q.UnresolvedSourceLocation.prototype = {
+    toJson$0: function() {
+      var t1, _this = this,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.dynamic);
+      json.$indexSet(0, "type", "UnresolvedSourceLocation");
+      t1 = _this.script;
+      Q._setIfNotNull(json, "script", t1 == null ? null : t1.toJson$0());
+      Q._setIfNotNull(json, "scriptUri", _this.scriptUri);
+      Q._setIfNotNull(json, "tokenPos", _this.tokenPos);
+      Q._setIfNotNull(json, "line", _this.line);
+      Q._setIfNotNull(json, "column", _this.column);
+      return json;
+    },
+    toString$0: function(_) {
+      return "[UnresolvedSourceLocation type: " + H.S(this.type) + "]";
+    }
+  };
+  Q.Version.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "Version");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["major", this.major, "minor", this.minor], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[Version type: " + H.S(this.type) + ", major: " + H.S(this.major) + ", minor: " + H.S(this.minor) + "]";
+    }
+  };
+  Q.VMRef.prototype = {
+    toJson$0: function() {
+      var t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "@VM");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", this.name], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[VMRef type: " + H.S(this.type) + ", name: " + H.S(this.name) + "]";
+    }
+  };
+  Q.VM.prototype = {
+    toJson$0: function() {
+      var t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, _this = this,
+        t1 = type$.legacy_String,
+        t2 = type$.dynamic,
+        json = P.LinkedHashMap_LinkedHashMap$_empty(t1, t2);
+      json.$indexSet(0, "type", "VM");
+      t3 = _this.name;
+      t4 = _this.architectureBits;
+      t5 = _this.hostCPU;
+      t6 = _this.operatingSystem;
+      t7 = _this.targetCPU;
+      t8 = _this.version;
+      t9 = _this.pid;
+      t10 = _this.startTime;
+      t11 = _this.isolates;
+      t11.toString;
+      t12 = H._arrayInstanceType(t11);
+      t13 = t12._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      t13 = P.List_List$from(new H.MappedListIterable(t11, t12._eval$1("Map<String*,@>*(1)")._as(new Q.VM_toJson_closure()), t13), true, t13._eval$1("ListIterable.E"));
+      t12 = _this.isolateGroups;
+      t12.toString;
+      t11 = H._arrayInstanceType(t12);
+      t14 = t11._eval$1("MappedListIterable<1,Map<String*,@>*>");
+      json.addAll$1(0, P.LinkedHashMap_LinkedHashMap$_literal(["name", t3, "architectureBits", t4, "hostCPU", t5, "operatingSystem", t6, "targetCPU", t7, "version", t8, "pid", t9, "startTime", t10, "isolates", t13, "isolateGroups", P.List_List$from(new H.MappedListIterable(t12, t11._eval$1("Map<String*,@>*(1)")._as(new Q.VM_toJson_closure0()), t14), true, t14._eval$1("ListIterable.E"))], t1, t2));
+      return json;
+    },
+    toString$0: function(_) {
+      return "[VM]";
+    },
+    set$isolates: function(isolates) {
+      this.isolates = type$.legacy_List_legacy_IsolateRef._as(isolates);
+    },
+    set$isolateGroups: function(isolateGroups) {
+      this.isolateGroups = type$.legacy_List_legacy_IsolateGroupRef._as(isolateGroups);
+    },
+    $isVMRef: 1
+  };
+  Q.VM_toJson_closure.prototype = {
+    call$1: function(f) {
+      return type$.legacy_IsolateRef._as(f).toJson$0();
+    },
+    $signature: 25
+  };
+  Q.VM_toJson_closure0.prototype = {
+    call$1: function(f) {
+      return type$.legacy_IsolateGroupRef._as(f).toJson$0();
+    },
+    $signature: 58
+  };
+  E.main_closure.prototype = {
+    call$1: function(e) {
+      var t1 = this.ddsChannel._outgoingController;
+      t1.add$1(0, H._instanceType(t1)._precomputed1._as(e));
+      return null;
+    },
+    $signature: 59
+  };
+  (function aliases() {
+    var _ = J.Interceptor.prototype;
+    _.super$Interceptor$noSuchMethod = _.noSuchMethod$1;
+    _ = J.JavaScriptObject.prototype;
+    _.super$JavaScriptObject$toString = _.toString$0;
+    _ = P._BroadcastStreamController.prototype;
+    _.super$_BroadcastStreamController$_addEventError = _._addEventError$0;
+    _ = P._BufferingStreamSubscription.prototype;
+    _.super$_BufferingStreamSubscription$_add = _._add$1;
+    _.super$_BufferingStreamSubscription$_addError = _._addError$2;
+    _ = Q.InstanceRef.prototype;
+    _.super$InstanceRef$toJson = _.toJson$0;
+    _ = Q.Instance.prototype;
+    _.super$Instance$toJson = _.toJson$0;
+    _ = Q.ObjRef.prototype;
+    _.super$ObjRef$toJson = _.toJson$0;
+    _ = Q.Obj.prototype;
+    _.super$Obj$toJson = _.toJson$0;
+  })();
+  (function installTearOffs() {
+    var _static_1 = hunkHelpers._static_1,
+      _static_0 = hunkHelpers._static_0,
+      _static_2 = hunkHelpers._static_2,
+      _instance_0_u = hunkHelpers._instance_0u,
+      _instance = hunkHelpers.installInstanceTearOff,
+      _instance_2_u = hunkHelpers._instance_2u,
+      _instance_1_u = hunkHelpers._instance_1u;
+    _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 6);
+    _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 6);
+    _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 6);
+    _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0);
+    _static_1(P, "async___nullDataHandler$closure", "_nullDataHandler", 2);
+    _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 7);
+    var _;
+    _instance_0_u(_ = P._BroadcastSubscription.prototype, "get$_onPause", "_onPause$0", 0);
+    _instance_0_u(_, "get$_onResume", "_onResume$0", 0);
+    _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 39, 0);
+    _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 7);
+    _instance_0_u(_ = P._ControllerSubscription.prototype, "get$_onPause", "_onPause$0", 0);
+    _instance_0_u(_, "get$_onResume", "_onResume$0", 0);
+    _instance_0_u(_ = P._BufferingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0);
+    _instance_0_u(_, "get$_onResume", "_onResume$0", 0);
+    _instance_0_u(P._DoneStreamSubscription.prototype, "get$_sendDone", "_sendDone$0", 0);
+    _instance_1_u(_ = P._StreamIterator.prototype, "get$_async$_onData", "_async$_onData$1", 12);
+    _instance_2_u(_, "get$_onError", "_onError$2", 7);
+    _instance_0_u(_, "get$_onDone", "_onDone$0", 0);
+    _instance_0_u(_ = P._ForwardingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0);
+    _instance_0_u(_, "get$_onResume", "_onResume$0", 0);
+    _instance_1_u(_, "get$_handleData", "_handleData$1", 12);
+    _instance_2_u(_, "get$_handleError", "_handleError$2", 32);
+    _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0);
+    _static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 3);
+    _instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 18);
+    _instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 18);
+    _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0);
+    _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 2);
+    _static_1(Q, "vm_service_ExtensionData_parse$closure", "ExtensionData_parse", 61);
+    _static_1(Q, "vm_service_AllocationProfile_parse$closure", "AllocationProfile_parse", 62);
+    _static_1(Q, "vm_service_BoundField_parse$closure", "BoundField_parse", 63);
+    _static_1(Q, "vm_service_BoundVariable_parse$closure", "BoundVariable_parse", 64);
+    _static_1(Q, "vm_service_Breakpoint_parse$closure", "Breakpoint_parse", 65);
+    _static_1(Q, "vm_service_ClassRef_parse$closure", "ClassRef_parse", 66);
+    _static_1(Q, "vm_service_Class_parse$closure", "Class_parse", 67);
+    _static_1(Q, "vm_service_ClassHeapStats_parse$closure", "ClassHeapStats_parse", 68);
+    _static_1(Q, "vm_service_ClassList_parse$closure", "ClassList_parse", 69);
+    _static_1(Q, "vm_service_ClientName_parse$closure", "ClientName_parse", 70);
+    _static_1(Q, "vm_service_CodeRef_parse$closure", "CodeRef_parse", 71);
+    _static_1(Q, "vm_service_Code_parse$closure", "Code_parse", 72);
+    _static_1(Q, "vm_service_ContextRef_parse$closure", "ContextRef_parse", 73);
+    _static_1(Q, "vm_service_Context_parse$closure", "Context_parse", 74);
+    _static_1(Q, "vm_service_ContextElement_parse$closure", "ContextElement_parse", 75);
+    _static_1(Q, "vm_service_CpuSamples_parse$closure", "CpuSamples_parse", 76);
+    _static_1(Q, "vm_service_CpuSample_parse$closure", "CpuSample_parse", 77);
+    _static_1(Q, "vm_service_ErrorRef_parse$closure", "ErrorRef_parse", 78);
+    _static_1(Q, "vm_service_Error_parse$closure", "Error_parse", 79);
+    _static_1(Q, "vm_service_Event_parse$closure", "Event_parse", 80);
+    _static_1(Q, "vm_service_FieldRef_parse$closure", "FieldRef_parse", 81);
+    _static_1(Q, "vm_service_Field_parse$closure", "Field_parse", 82);
+    _static_1(Q, "vm_service_Flag_parse$closure", "Flag_parse", 83);
+    _static_1(Q, "vm_service_FlagList_parse$closure", "FlagList_parse", 84);
+    _static_1(Q, "vm_service_Frame_parse$closure", "Frame_parse", 85);
+    _static_1(Q, "vm_service_FuncRef_parse$closure", "FuncRef_parse", 86);
+    _static_1(Q, "vm_service_Func_parse$closure", "Func_parse", 87);
+    _static_1(Q, "vm_service_InstanceRef_parse$closure", "InstanceRef_parse", 133);
+    _static_1(Q, "vm_service_Instance_parse$closure", "Instance_parse", 89);
+    _static_1(Q, "vm_service_IsolateRef_parse$closure", "IsolateRef_parse", 90);
+    _static_1(Q, "vm_service_Isolate_parse$closure", "Isolate_parse", 91);
+    _static_1(Q, "vm_service_IsolateGroupRef_parse$closure", "IsolateGroupRef_parse", 92);
+    _static_1(Q, "vm_service_IsolateGroup_parse$closure", "IsolateGroup_parse", 93);
+    _static_1(Q, "vm_service_InboundReferences_parse$closure", "InboundReferences_parse", 94);
+    _static_1(Q, "vm_service_InboundReference_parse$closure", "InboundReference_parse", 95);
+    _static_1(Q, "vm_service_InstanceSet_parse$closure", "InstanceSet_parse", 96);
+    _static_1(Q, "vm_service_LibraryRef_parse$closure", "LibraryRef_parse", 97);
+    _static_1(Q, "vm_service_Library_parse$closure", "Library_parse", 98);
+    _static_1(Q, "vm_service_LibraryDependency_parse$closure", "LibraryDependency_parse", 99);
+    _static_1(Q, "vm_service_LogRecord_parse$closure", "LogRecord_parse", 100);
+    _static_1(Q, "vm_service_MapAssociation_parse$closure", "MapAssociation_parse", 101);
+    _static_1(Q, "vm_service_MemoryUsage_parse$closure", "MemoryUsage_parse", 102);
+    _static_1(Q, "vm_service_Message_parse$closure", "Message_parse", 103);
+    _static_1(Q, "vm_service_NativeFunction_parse$closure", "NativeFunction_parse", 104);
+    _static_1(Q, "vm_service_NullValRef_parse$closure", "NullValRef_parse", 105);
+    _static_1(Q, "vm_service_NullVal_parse$closure", "NullVal_parse", 106);
+    _static_1(Q, "vm_service_ObjRef_parse$closure", "ObjRef_parse", 107);
+    _static_1(Q, "vm_service_Obj_parse$closure", "Obj_parse", 108);
+    _static_1(Q, "vm_service_ProfileFunction_parse$closure", "ProfileFunction_parse", 109);
+    _static_1(Q, "vm_service_ReloadReport_parse$closure", "ReloadReport_parse", 110);
+    _static_1(Q, "vm_service_RetainingObject_parse$closure", "RetainingObject_parse", 111);
+    _static_1(Q, "vm_service_RetainingPath_parse$closure", "RetainingPath_parse", 112);
+    _static_1(Q, "vm_service_Response_parse$closure", "Response_parse", 113);
+    _static_1(Q, "vm_service_Sentinel_parse$closure", "Sentinel_parse", 114);
+    _static_1(Q, "vm_service_ScriptRef_parse$closure", "ScriptRef_parse", 115);
+    _static_1(Q, "vm_service_Script_parse$closure", "Script_parse", 116);
+    _static_1(Q, "vm_service_ScriptList_parse$closure", "ScriptList_parse", 117);
+    _static_1(Q, "vm_service_SourceLocation_parse$closure", "SourceLocation_parse", 118);
+    _static_1(Q, "vm_service_SourceReport_parse$closure", "SourceReport_parse", 119);
+    _static_1(Q, "vm_service_SourceReportCoverage_parse$closure", "SourceReportCoverage_parse", 120);
+    _static_1(Q, "vm_service_SourceReportRange_parse$closure", "SourceReportRange_parse", 121);
+    _static_1(Q, "vm_service_Stack_parse$closure", "Stack_parse", 122);
+    _static_1(Q, "vm_service_Success_parse$closure", "Success_parse", 123);
+    _static_1(Q, "vm_service_Timeline_parse$closure", "Timeline_parse", 124);
+    _static_1(Q, "vm_service_TimelineEvent_parse$closure", "TimelineEvent_parse", 125);
+    _static_1(Q, "vm_service_TimelineFlags_parse$closure", "TimelineFlags_parse", 126);
+    _static_1(Q, "vm_service_Timestamp_parse$closure", "Timestamp_parse", 127);
+    _static_1(Q, "vm_service_TypeArgumentsRef_parse$closure", "TypeArgumentsRef_parse", 128);
+    _static_1(Q, "vm_service_TypeArguments_parse$closure", "TypeArguments_parse", 129);
+    _static_1(Q, "vm_service_UnresolvedSourceLocation_parse$closure", "UnresolvedSourceLocation_parse", 130);
+    _static_1(Q, "vm_service_Version_parse$closure", "Version_parse", 131);
+    _static_1(Q, "vm_service_VMRef_parse$closure", "VMRef_parse", 132);
+    _static_1(Q, "vm_service_VM_parse$closure", "VM_parse", 88);
+    _instance_1_u(Q.VmService.prototype, "get$_processMessage", "_processMessage$1", 2);
+  })();
+  (function inheritance() {
+    var _mixin = hunkHelpers.mixin,
+      _inherit = hunkHelpers.inherit,
+      _inheritMany = hunkHelpers.inheritMany;
+    _inherit(P.Object, null);
+    _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.JSObject, J.ArrayIterator, P.Iterable, H.ListIterator, P.Iterator, H.FixedLengthListMixin, H.Symbol, P.MapView, H.ConstantMap, H.Closure, H.JSInvocationMirror, H.TypeErrorDecoder, P.Error0, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, H._Required, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, H._Type, P._TimerImpl, P._AsyncAwaitCompleter, P._BufferingStreamSubscription, P._BroadcastStreamController, P.Future, P.Completer, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P.StreamController, P._StreamController, P._AsyncStreamControllerDispatch, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._DoneStreamSubscription, P._StreamIterator, P.AsyncError, P._Zone, P._SetBase, P._LinkedHashSetCell, P._LinkedHashSetIterator, P.ListMixin, P._UnmodifiableMapMixin, P._ListQueueIterator, P.Codec, P._JsonStringifier, P._Utf8Decoder, P.bool, P.DateTime, P.num, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Function, P.List, P.Map, P.MapEntry, P.Null, P.StackTrace, P._StringStackTrace, P.String, P.StringBuffer, P.Symbol0, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, P.ByteBuffer, P.ByteData, P.Int8List, P.Uint8List, P.Uint8ClampedList, P.Int16List, P.Uint16List, P.Int32List, P.Uint32List, P.Float32List, P.Float64List, V.ErrorResult, E.Result, F.ValueResult, G.StreamQueue, G._EventRequest, G._NextRequest, Q._QueueList_Object_ListMixin, Y.Level, L.LogRecord0, F.Logger, R.StreamChannelMixin, K.Uuid, Q.VmService, Q.RPCError, Q.SentinelException, Q.ExtensionData, Q._NullLog, Q.Response, Q.BoundField, Q.ContextElement, Q.CpuSample, Q.Flag, Q.InboundReference, Q.LibraryDependency, Q.MapAssociation, Q.NativeFunction, Q.ProfileFunction, Q.RetainingObject, Q.SourceReportCoverage, Q.SourceReportRange, Q.TimelineEvent]);
+    _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeByteBuffer, H.NativeTypedData, W.DomException, W.Event0, W.EventTarget]);
+    _inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]);
+    _inherit(J.JSUnmodifiableArray, J.JSArray);
+    _inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]);
+    _inheritMany(P.Iterable, [H.EfficientLengthIterable, H.MappedIterable, H._ConstantMapKeyIterable]);
+    _inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]);
+    _inherit(H.EfficientLengthMappedIterable, H.MappedIterable);
+    _inherit(H.MappedIterator, P.Iterator);
+    _inheritMany(H.ListIterable, [H.MappedListIterable, P.ListQueue, P._JsonMapKeyIterable]);
+    _inherit(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P.MapView);
+    _inherit(P.UnmodifiableMapView, P._UnmodifiableMapView_MapView__UnmodifiableMapMixin);
+    _inherit(H.ConstantMapView, P.UnmodifiableMapView);
+    _inheritMany(H.Closure, [H.ConstantMap_map_closure, H.Primitives_functionNoSuchMethod_closure, H.TearOffClosure, H.JsLinkedHashMap_addAll_closure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._SyncBroadcastStreamController__sendData_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P.Stream_first_closure, P.Stream_first_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._cancelAndValue_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P.Utf8Decoder_closure, P.Utf8Decoder_closure0, P._JsonStringifier_writeMap_closure, P._symbolMapToStringMap_closure, P.NoSuchMethodError_toString_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, W._EventStreamSubscription_onData_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, G.StreamQueue__ensureListening_closure, G.StreamQueue__ensureListening_closure1, G.StreamQueue__ensureListening_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, Q.createServiceObject_closure, Q._createSpecificObject_closure, Q.VmService_closure, Q.AllocationProfile_toJson_closure, Q.Class_toJson_closure, Q.Class_toJson_closure0, Q.Class_toJson_closure1, Q.Class_toJson_closure2, Q.ClassList_toJson_closure, Q.Context_toJson_closure, Q.CpuSamples_toJson_closure, Q.CpuSamples_toJson_closure0, Q.CpuSample_toJson_closure, Q.Event_toJson_closure, Q.Event_toJson_closure0, Q.Event_toJson_closure1, Q.FlagList_toJson_closure, Q.Frame_toJson_closure, Q.Instance_toJson_closure, Q.Instance_toJson_closure0, Q.Instance_toJson_closure1, Q.Isolate_toJson_closure, Q.Isolate_toJson_closure0, Q.Isolate_toJson_closure1, Q.IsolateGroup_toJson_closure, Q.InboundReferences_toJson_closure, Q.InstanceSet_toJson_closure, Q.Library_toJson_closure, Q.Library_toJson_closure0, Q.Library_toJson_closure1, Q.Library_toJson_closure2, Q.Library_toJson_closure3, Q.RetainingPath_toJson_closure, Q.Script$_fromJson_closure, Q.Script_toJson_closure, Q.ScriptList_toJson_closure, Q.SourceReport_toJson_closure, Q.SourceReport_toJson_closure0, Q.SourceReportCoverage_toJson_closure, Q.SourceReportCoverage_toJson_closure0, Q.SourceReportRange_toJson_closure, Q.Stack_toJson_closure, Q.Stack_toJson_closure0, Q.Stack_toJson_closure1, Q.Stack_toJson_closure2, Q.Timeline_toJson_closure, Q.TimelineFlags_toJson_closure, Q.TimelineFlags_toJson_closure0, Q.TypeArguments_toJson_closure, Q.VM_toJson_closure, Q.VM_toJson_closure0, E.main_closure]);
+    _inherit(H.ConstantStringMap, H.ConstantMap);
+    _inheritMany(P.Error0, [H.NullError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.NoSuchMethodError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]);
+    _inheritMany(H.TearOffClosure, [H.StaticClosure, H.BoundClosure]);
+    _inherit(H._AssertionError, P.AssertionError);
+    _inherit(P.MapBase, P.MapMixin);
+    _inheritMany(P.MapBase, [H.JsLinkedHashMap, P._JsonMap]);
+    _inheritMany(H.NativeTypedData, [H.NativeByteData, H.NativeTypedArray]);
+    _inheritMany(H.NativeTypedArray, [H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin]);
+    _inherit(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin);
+    _inherit(H.NativeTypedArrayOfDouble, H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin);
+    _inherit(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin);
+    _inherit(H.NativeTypedArrayOfInt, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin);
+    _inheritMany(H.NativeTypedArrayOfDouble, [H.NativeFloat32List, H.NativeFloat64List]);
+    _inheritMany(H.NativeTypedArrayOfInt, [H.NativeInt16List, H.NativeInt32List, H.NativeInt8List, H.NativeUint16List, H.NativeUint32List, H.NativeUint8ClampedList, H.NativeUint8List]);
+    _inherit(H._TypeError, H._Error);
+    _inheritMany(P._BufferingStreamSubscription, [P._ControllerSubscription, P._ForwardingStreamSubscription]);
+    _inherit(P._BroadcastSubscription, P._ControllerSubscription);
+    _inheritMany(P._BroadcastStreamController, [P._SyncBroadcastStreamController, P._AsyncBroadcastStreamController]);
+    _inherit(P._AsyncCompleter, P._Completer);
+    _inherit(P._AsyncStreamController, P._StreamController);
+    _inheritMany(P.Stream, [P._StreamImpl, P._ForwardingStream, W._EventStream]);
+    _inherit(P._ControllerStream, P._StreamImpl);
+    _inheritMany(P._DelayedEvent, [P._DelayedData, P._DelayedError]);
+    _inherit(P._StreamImplEvents, P._PendingEvents);
+    _inherit(P._MapStream, P._ForwardingStream);
+    _inherit(P._RootZone, P._Zone);
+    _inherit(P._LinkedHashSet, P._SetBase);
+    _inherit(P.Converter, P.StreamTransformerBase);
+    _inherit(P.JsonCyclicError, P.JsonUnsupportedObjectError);
+    _inheritMany(P.Codec, [P.JsonCodec, N.HexCodec]);
+    _inheritMany(P.Converter, [P.JsonEncoder, P.JsonDecoder, P.Utf8Decoder, R.HexEncoder]);
+    _inherit(P._JsonStringStringifier, P._JsonStringifier);
+    _inheritMany(P.num, [P.double, P.int]);
+    _inheritMany(P.ArgumentError, [P.RangeError, P.IndexError]);
+    _inheritMany(W.EventTarget, [W.EventSource, W.HttpRequestEventTarget]);
+    _inherit(W.HttpRequest, W.HttpRequestEventTarget);
+    _inheritMany(W.Event0, [W.MessageEvent, W.ProgressEvent]);
+    _inherit(W._EventStreamSubscription, P.StreamSubscription);
+    _inherit(P._AcceptStructuredCloneDart2Js, P._AcceptStructuredClone);
+    _inherit(Q.QueueList, Q._QueueList_Object_ListMixin);
+    _inherit(M.SseClient, R.StreamChannelMixin);
+    _inheritMany(Q.Response, [Q.AllocationProfile, Q.BoundVariable, Q.Obj, Q.ObjRef, Q.ClassHeapStats, Q.ClassList, Q.ClientName, Q.CpuSamples, Q.Event, Q.FlagList, Q.Frame, Q.IsolateRef, Q.Isolate, Q.IsolateGroupRef, Q.IsolateGroup, Q.InboundReferences, Q.InstanceSet, Q.LogRecord, Q.MemoryUsage, Q.Message, Q.ReloadReport, Q.RetainingPath, Q.Sentinel, Q.ScriptList, Q.SourceLocation, Q.SourceReport, Q.Stack, Q.Success, Q.Timeline, Q.TimelineFlags, Q.Timestamp, Q.UnresolvedSourceLocation, Q.Version, Q.VMRef, Q.VM]);
+    _inheritMany(Q.Obj, [Q.Breakpoint, Q.Class, Q.Context, Q.Error, Q.Field, Q.Func, Q.Instance, Q.Library, Q.Script, Q.TypeArguments]);
+    _inheritMany(Q.ObjRef, [Q.ClassRef, Q.CodeRef, Q.Code, Q.ContextRef, Q.ErrorRef, Q.FieldRef, Q.FuncRef, Q.InstanceRef, Q.LibraryRef, Q.ScriptRef, Q.TypeArgumentsRef]);
+    _inherit(Q.NullValRef, Q.InstanceRef);
+    _inherit(Q.NullVal, Q.Instance);
+    _mixin(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, P.ListMixin);
+    _mixin(H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin, H.FixedLengthListMixin);
+    _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin, P.ListMixin);
+    _mixin(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H.FixedLengthListMixin);
+    _mixin(P._AsyncStreamController, P._AsyncStreamControllerDispatch);
+    _mixin(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P._UnmodifiableMapMixin);
+    _mixin(Q._QueueList_Object_ListMixin, P.ListMixin);
+  })();
+  var init = {
+    typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []},
+    mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"},
+    mangledNames: {},
+    getTypeFromName: getGlobalFromName,
+    metadata: [],
+    types: ["~()", "Null()", "~(@)", "@(@)", "int*(int*)", "String*(String*)", "~(~())", "~(Object,StackTrace)", "Map<String*,@>*(ClassRef*)", "Map<String*,@>*(ScriptRef*)", "Map<String*,@>*(Frame*)", "Null(@)", "~(Object?)", "Null(Object?,Object?)", "@()", "Null(Symbol0,@)", "String(int)", "@(Event0)", "~(Event0*)", "Null(Event0*)", "Map<String*,@>*(InstanceRef*)", "Map<String*,@>*(FieldRef*)", "Map<String*,@>*(FuncRef*)", "Map<String*,@>*(Breakpoint*)", "Map<String*,@>*(TimelineEvent*)", "Map<String*,@>*(IsolateRef*)", "Map<String*,@>*(BoundField*)", "Null(Object,StackTrace)", "_Future<@>(@)", "Object*(@)", "Map<String*,@>*(ClassHeapStats*)", "@(@,String)", "~(@,StackTrace)", "Null(~())", "Null(@,StackTrace)", "Map<String*,@>*(ContextElement*)", "Map<String*,@>*(ProfileFunction*)", "Map<String*,@>*(CpuSample*)", "Null(int,@)", "~(Object[StackTrace?])", "Null(ProgressEvent)", "@(String)", "Map<String*,@>*(Flag*)", "Map<String*,@>*(BoundVariable*)", "Null(String,@)", "Map<String*,@>*(MapAssociation*)", "Map<String*,@>*(LibraryRef*)", "@(@,@)", "Map<String*,@>*(InboundReference*)", "Map<String*,@>*(ObjRef*)", "Map<String*,@>*(LibraryDependency*)", "Null(@,@)", "Map<String*,@>*(RetainingObject*)", "List<int*>*(@)", "List<int*>*(List<int*>*)", "Map<String*,@>*(SourceReportRange*)", "Null(@,StackTrace*)", "Map<String*,@>*(Message*)", "Map<String*,@>*(IsolateGroupRef*)", "~(String*)", "Logger*()", "ExtensionData*(Map<@,@>*)", "AllocationProfile*(Map<String*,@>*)", "BoundField*(Map<String*,@>*)", "BoundVariable*(Map<String*,@>*)", "Breakpoint*(Map<String*,@>*)", "ClassRef*(Map<String*,@>*)", "Class*(Map<String*,@>*)", "ClassHeapStats*(Map<String*,@>*)", "ClassList*(Map<String*,@>*)", "ClientName*(Map<String*,@>*)", "CodeRef*(Map<String*,@>*)", "Code*(Map<String*,@>*)", "ContextRef*(Map<String*,@>*)", "Context*(Map<String*,@>*)", "ContextElement*(Map<String*,@>*)", "CpuSamples*(Map<String*,@>*)", "CpuSample*(Map<String*,@>*)", "ErrorRef*(Map<String*,@>*)", "Error*(Map<String*,@>*)", "Event*(Map<String*,@>*)", "FieldRef*(Map<String*,@>*)", "Field*(Map<String*,@>*)", "Flag*(Map<String*,@>*)", "FlagList*(Map<String*,@>*)", "Frame*(Map<String*,@>*)", "FuncRef*(Map<String*,@>*)", "Func*(Map<String*,@>*)", "VM*(Map<String*,@>*)", "Instance*(Map<String*,@>*)", "IsolateRef*(Map<String*,@>*)", "Isolate*(Map<String*,@>*)", "IsolateGroupRef*(Map<String*,@>*)", "IsolateGroup*(Map<String*,@>*)", "InboundReferences*(Map<String*,@>*)", "InboundReference*(Map<String*,@>*)", "InstanceSet*(Map<String*,@>*)", "LibraryRef*(Map<String*,@>*)", "Library*(Map<String*,@>*)", "LibraryDependency*(Map<String*,@>*)", "LogRecord*(Map<String*,@>*)", "MapAssociation*(Map<String*,@>*)", "MemoryUsage*(Map<String*,@>*)", "Message*(Map<String*,@>*)", "NativeFunction*(Map<String*,@>*)", "NullValRef*(Map<String*,@>*)", "NullVal*(Map<String*,@>*)", "ObjRef*(Map<String*,@>*)", "Obj*(Map<String*,@>*)", "ProfileFunction*(Map<String*,@>*)", "ReloadReport*(Map<String*,@>*)", "RetainingObject*(Map<String*,@>*)", "RetainingPath*(Map<String*,@>*)", "Response*(Map<String*,@>*)", "Sentinel*(Map<String*,@>*)", "ScriptRef*(Map<String*,@>*)", "Script*(Map<String*,@>*)", "ScriptList*(Map<String*,@>*)", "SourceLocation*(Map<String*,@>*)", "SourceReport*(Map<String*,@>*)", "SourceReportCoverage*(Map<String*,@>*)", "SourceReportRange*(Map<String*,@>*)", "Stack*(Map<String*,@>*)", "Success*(Map<String*,@>*)", "Timeline*(Map<String*,@>*)", "TimelineEvent*(Map<String*,@>*)", "TimelineFlags*(Map<String*,@>*)", "Timestamp*(Map<String*,@>*)", "TypeArgumentsRef*(Map<String*,@>*)", "TypeArguments*(Map<String*,@>*)", "UnresolvedSourceLocation*(Map<String*,@>*)", "Version*(Map<String*,@>*)", "VMRef*(Map<String*,@>*)", "InstanceRef*(Map<String*,@>*)"],
+    interceptorsByTag: null,
+    leafTags: null,
+    arrayRti: typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol("$ti") : "$ti"
+  };
+  H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event0","ExtendableEvent":"Event0","_ResourceProgressEvent":"ProgressEvent","MessagePort":"EventTarget","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"JSIndexable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"JSIndexable":["1"]},"ArrayIterator":{"Iterator":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[],"JSIndexable":["@"]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"ListIterator":{"Iterator":["1"]},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedIterator":{"Iterator":["2"]},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_ConstantMapKeyIterable":{"Iterable":["1"],"Iterable.E":"1"},"JSInvocationMirror":{"Invocation":[]},"NullError":{"Error0":[]},"JsNoSuchMethodError":{"Error0":[]},"UnknownJsTypeError":{"Error0":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error0":[]},"_AssertionError":{"Error0":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapKeyIterator":{"Iterator":["1"]},"NativeByteData":{"ByteData":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JSIndexable":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"EfficientLengthIterable":["double"],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"EfficientLengthIterable":["double"],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeFloat64List":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"EfficientLengthIterable":["double"],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"Uint8List":[],"JavaScriptIndexingBehavior":["int"],"List":["int"],"EfficientLengthIterable":["int"],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error0":[]},"_TypeError":{"Error0":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_BroadcastSubscription":{"_ControllerSubscription":["1"],"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_BroadcastStreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_SyncBroadcastStreamController":{"_BroadcastStreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_AsyncBroadcastStreamController":{"_BroadcastStreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"_DoneStreamSubscription":{"StreamSubscription":["1"]},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_EventSink":["2"],"_EventDispatch":["2"],"_BufferingStreamSubscription.T":"2"},"_MapStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"AsyncError":{"Error0":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_LinkedHashSet":{"_SetBase":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_LinkedHashSetIterator":{"Iterator":["1"]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"ListIterable":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_ListQueueIterator":{"Iterator":["1"]},"_SetBase":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"JsonUnsupportedObjectError":{"Error0":[]},"JsonCyclicError":{"Error0":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"Utf8Decoder":{"Converter":["List<int>","String"]},"double":{"num":[]},"AssertionError":{"Error0":[]},"NullThrownError":{"Error0":[]},"ArgumentError":{"Error0":[]},"RangeError":{"Error0":[]},"IndexError":{"Error0":[]},"NoSuchMethodError":{"Error0":[]},"UnsupportedError":{"Error0":[]},"UnimplementedError":{"Error0":[]},"StateError":{"Error0":[]},"ConcurrentModificationError":{"Error0":[]},"OutOfMemoryError":{"Error0":[]},"StackOverflowError":{"Error0":[]},"CyclicInitializationError":{"Error0":[]},"int":{"num":[]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"_StringStackTrace":{"StackTrace":[]},"String":{"Pattern":[]},"StringBuffer":{"StringSink":[]},"EventSource":{"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event0":[]},"ProgressEvent":{"Event0":[]},"_EventStream":{"Stream":["1"],"Stream.T":"1"},"_EventStreamSubscription":{"StreamSubscription":["1"]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"ErrorResult":{"Result":["Null"]},"ValueResult":{"Result":["1*"]},"_NextRequest":{"_EventRequest":["1*"]},"QueueList":{"ListMixin":["1*"],"List":["1*"],"Queue":["1*"],"EfficientLengthIterable":["1*"],"Iterable":["1*"],"ListMixin.E":"1*"},"HexCodec":{"Codec":["List<int*>*","String*"],"Codec.S":"List<int*>*"},"HexEncoder":{"Converter":["List<int*>*","String*"]},"_NullLog":{"Log":[]},"Breakpoint":{"ObjRef":[]},"ClassRef":{"ObjRef":[]},"Class":{"ClassRef":[],"ObjRef":[]},"CodeRef":{"ObjRef":[]},"Code":{"CodeRef":[],"ObjRef":[]},"ContextRef":{"ObjRef":[]},"Context":{"ContextRef":[],"ObjRef":[]},"ErrorRef":{"ObjRef":[]},"Error":{"ErrorRef":[],"ObjRef":[]},"FieldRef":{"ObjRef":[]},"Field":{"FieldRef":[],"ObjRef":[]},"FuncRef":{"ObjRef":[]},"Func":{"FuncRef":[],"ObjRef":[]},"InstanceRef":{"ObjRef":[]},"Instance":{"InstanceRef":[],"ObjRef":[]},"Isolate":{"IsolateRef":[]},"IsolateGroup":{"IsolateGroupRef":[]},"LibraryRef":{"ObjRef":[]},"Library":{"LibraryRef":[],"ObjRef":[]},"NullValRef":{"InstanceRef":[],"ObjRef":[]},"NullVal":{"NullValRef":[],"InstanceRef":[],"ObjRef":[]},"Obj":{"ObjRef":[]},"ScriptRef":{"ObjRef":[]},"Script":{"ScriptRef":[],"ObjRef":[]},"TypeArgumentsRef":{"ObjRef":[]},"TypeArguments":{"TypeArgumentsRef":[],"ObjRef":[]},"VM":{"VMRef":[]}}'));
+  H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"MapEntry":2,"_QueueList_Object_ListMixin":1,"StreamChannelMixin":1}'));
+  var type$ = (function rtii() {
+    var findType = H.findType;
+    return {
+      $env_1_1_void: findType("@<~>"),
+      AsyncError: findType("AsyncError"),
+      ConstantMapView_Symbol_dynamic: findType("ConstantMapView<Symbol0,@>"),
+      Duration: findType("Duration"),
+      EfficientLengthIterable_dynamic: findType("EfficientLengthIterable<@>"),
+      Error: findType("Error0"),
+      Event: findType("Event0"),
+      Function: findType("Function"),
+      Future_dynamic: findType("Future<@>"),
+      Future_void: findType("Future<~>"),
+      HexCodec: findType("HexCodec"),
+      Invocation: findType("Invocation"),
+      Iterable_dynamic: findType("Iterable<@>"),
+      JSArray_String: findType("JSArray<String>"),
+      JSArray_dynamic: findType("JSArray<@>"),
+      JSArray_int: findType("JSArray<int>"),
+      JSArray_legacy_Result_legacy_String: findType("JSArray<Result<String*>*>"),
+      JSArray_legacy_String: findType("JSArray<String*>"),
+      JSArray_legacy_int: findType("JSArray<int*>"),
+      JSIndexable_dynamic: findType("JSIndexable<@>"),
+      JSNull: findType("JSNull"),
+      JavaScriptFunction: findType("JavaScriptFunction"),
+      JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"),
+      JsLinkedHashMap_String_dynamic: findType("JsLinkedHashMap<String,@>"),
+      JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap<Symbol0,@>"),
+      JsLinkedHashMap_of_legacy_String_and_dynamic: findType("JsLinkedHashMap<String*,@>"),
+      JsLinkedHashMap_of_legacy_String_and_legacy_int: findType("JsLinkedHashMap<String*,int*>"),
+      ListQueue_legacy__EventRequest_dynamic: findType("ListQueue<_EventRequest<@>*>"),
+      List_dynamic: findType("List<@>"),
+      List_int: findType("List<int>"),
+      Map_dynamic_dynamic: findType("Map<@,@>"),
+      Null: findType("Null"),
+      Object: findType("Object"),
+      ProgressEvent: findType("ProgressEvent"),
+      QueueList_legacy_Result_legacy_String: findType("QueueList<Result<String*>*>"),
+      StackTrace: findType("StackTrace"),
+      StreamQueue_legacy_String: findType("StreamQueue<String*>"),
+      Stream_dynamic: findType("Stream<@>"),
+      String: findType("String"),
+      Symbol: findType("Symbol0"),
+      UnknownJavaScriptObject: findType("UnknownJavaScriptObject"),
+      _AsyncCompleter_HttpRequest: findType("_AsyncCompleter<HttpRequest>"),
+      _AsyncCompleter_dynamic: findType("_AsyncCompleter<@>"),
+      _AsyncCompleter_legacy_Version: findType("_AsyncCompleter<Version*>"),
+      _EventStream_legacy_Event: findType("_EventStream<Event0*>"),
+      _Future_HttpRequest: findType("_Future<HttpRequest>"),
+      _Future_bool: findType("_Future<bool>"),
+      _Future_dynamic: findType("_Future<@>"),
+      _Future_int: findType("_Future<int>"),
+      _Future_legacy_Version: findType("_Future<Version*>"),
+      _Future_void: findType("_Future<~>"),
+      _StreamControllerAddStreamState_nullable_Object: findType("_StreamControllerAddStreamState<Object?>"),
+      _StreamIterator_dynamic: findType("_StreamIterator<@>"),
+      bool: findType("bool"),
+      bool_Function_Object: findType("bool(Object)"),
+      double: findType("double"),
+      dynamic: findType("@"),
+      dynamic_Function: findType("@()"),
+      dynamic_Function_Object: findType("@(Object)"),
+      dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"),
+      dynamic_Function_dynamic_dynamic: findType("@(@,@)"),
+      int: findType("int"),
+      legacy_BoundField: findType("BoundField*"),
+      legacy_BoundVariable: findType("BoundVariable*"),
+      legacy_Breakpoint: findType("Breakpoint*"),
+      legacy_ByteData: findType("ByteData*"),
+      legacy_ClassHeapStats: findType("ClassHeapStats*"),
+      legacy_ClassRef: findType("ClassRef*"),
+      legacy_CodeRef: findType("CodeRef*"),
+      legacy_Completer_dynamic: findType("Completer<@>*"),
+      legacy_Context: findType("Context*"),
+      legacy_ContextElement: findType("ContextElement*"),
+      legacy_ContextRef: findType("ContextRef*"),
+      legacy_CpuSample: findType("CpuSample*"),
+      legacy_Error: findType("Error*"),
+      legacy_ErrorRef: findType("ErrorRef*"),
+      legacy_Event: findType("Event*"),
+      legacy_Event_2: findType("Event0*"),
+      legacy_FieldRef: findType("FieldRef*"),
+      legacy_Flag: findType("Flag*"),
+      legacy_Frame: findType("Frame*"),
+      legacy_FuncRef: findType("FuncRef*"),
+      legacy_InboundReference: findType("InboundReference*"),
+      legacy_InstanceRef: findType("InstanceRef*"),
+      legacy_IsolateGroupRef: findType("IsolateGroupRef*"),
+      legacy_IsolateRef: findType("IsolateRef*"),
+      legacy_Level: findType("Level*"),
+      legacy_LibraryDependency: findType("LibraryDependency*"),
+      legacy_LibraryRef: findType("LibraryRef*"),
+      legacy_List_dynamic: findType("List<@>*"),
+      legacy_List_legacy_BoundField: findType("List<BoundField*>*"),
+      legacy_List_legacy_BoundVariable: findType("List<BoundVariable*>*"),
+      legacy_List_legacy_Breakpoint: findType("List<Breakpoint*>*"),
+      legacy_List_legacy_ClassHeapStats: findType("List<ClassHeapStats*>*"),
+      legacy_List_legacy_ClassRef: findType("List<ClassRef*>*"),
+      legacy_List_legacy_ContextElement: findType("List<ContextElement*>*"),
+      legacy_List_legacy_CpuSample: findType("List<CpuSample*>*"),
+      legacy_List_legacy_FieldRef: findType("List<FieldRef*>*"),
+      legacy_List_legacy_Flag: findType("List<Flag*>*"),
+      legacy_List_legacy_Frame: findType("List<Frame*>*"),
+      legacy_List_legacy_FuncRef: findType("List<FuncRef*>*"),
+      legacy_List_legacy_InboundReference: findType("List<InboundReference*>*"),
+      legacy_List_legacy_InstanceRef: findType("List<InstanceRef*>*"),
+      legacy_List_legacy_IsolateGroupRef: findType("List<IsolateGroupRef*>*"),
+      legacy_List_legacy_IsolateRef: findType("List<IsolateRef*>*"),
+      legacy_List_legacy_LibraryDependency: findType("List<LibraryDependency*>*"),
+      legacy_List_legacy_LibraryRef: findType("List<LibraryRef*>*"),
+      legacy_List_legacy_List_legacy_int: findType("List<List<int*>*>*"),
+      legacy_List_legacy_MapAssociation: findType("List<MapAssociation*>*"),
+      legacy_List_legacy_Message: findType("List<Message*>*"),
+      legacy_List_legacy_ObjRef: findType("List<ObjRef*>*"),
+      legacy_List_legacy_ProfileFunction: findType("List<ProfileFunction*>*"),
+      legacy_List_legacy_RetainingObject: findType("List<RetainingObject*>*"),
+      legacy_List_legacy_ScriptRef: findType("List<ScriptRef*>*"),
+      legacy_List_legacy_SourceReportRange: findType("List<SourceReportRange*>*"),
+      legacy_List_legacy_String: findType("List<String*>*"),
+      legacy_List_legacy_TimelineEvent: findType("List<TimelineEvent*>*"),
+      legacy_List_legacy_int: findType("List<int*>*"),
+      legacy_LogRecord: findType("LogRecord*"),
+      legacy_Logger: findType("Logger*"),
+      legacy_MapAssociation: findType("MapAssociation*"),
+      legacy_Map_dynamic_dynamic: findType("Map<@,@>*"),
+      legacy_Map_of_legacy_String_and_dynamic: findType("Map<String*,@>*"),
+      legacy_Map_of_legacy_String_and_legacy_int: findType("Map<String*,int*>*"),
+      legacy_Map_of_legacy_Symbol_and_dynamic: findType("Map<Symbol0*,@>*"),
+      legacy_MemoryUsage: findType("MemoryUsage*"),
+      legacy_Message: findType("Message*"),
+      legacy_MessageEvent: findType("MessageEvent*"),
+      legacy_Never: findType("0&*"),
+      legacy_NullValRef: findType("NullValRef*"),
+      legacy_ObjRef: findType("ObjRef*"),
+      legacy_Object: findType("Object*"),
+      legacy_ProfileFunction: findType("ProfileFunction*"),
+      legacy_ProgressEvent: findType("ProgressEvent*"),
+      legacy_RetainingObject: findType("RetainingObject*"),
+      legacy_ScriptRef: findType("ScriptRef*"),
+      legacy_SourceLocation: findType("SourceLocation*"),
+      legacy_SourceReportCoverage: findType("SourceReportCoverage*"),
+      legacy_SourceReportRange: findType("SourceReportRange*"),
+      legacy_StackTrace: findType("StackTrace*"),
+      legacy_StreamController_legacy_Event: findType("StreamController<Event*>*"),
+      legacy_String: findType("String*"),
+      legacy_TimelineEvent: findType("TimelineEvent*"),
+      legacy_TypeArgumentsRef: findType("TypeArgumentsRef*"),
+      legacy_VMRef: findType("VMRef*"),
+      legacy_int: findType("int*"),
+      legacy_legacy_Future_dynamic_Function: findType("Future<@>*()*"),
+      legacy_legacy_Future_legacy_Map_of_legacy_String_and_dynamic_Function_legacy_Map_of_legacy_String_and_dynamic: findType("Future<Map<String*,@>*>*(Map<String*,@>*)*"),
+      nullable_Future_Null: findType("Future<Null>?"),
+      nullable_List_dynamic: findType("List<@>?"),
+      nullable_Object: findType("Object?"),
+      nullable__DelayedEvent_dynamic: findType("_DelayedEvent<@>?"),
+      nullable__EventRequest_dynamic: findType("_EventRequest<@>?"),
+      nullable__FutureListener_dynamic_dynamic: findType("_FutureListener<@,@>?"),
+      nullable__LinkedHashSetCell: findType("_LinkedHashSetCell?"),
+      nullable_dynamic_Function_Event: findType("@(Event0)?"),
+      nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object: findType("Object?(Object?,Object?)?"),
+      nullable_nullable_Object_Function_dynamic: findType("Object?(@)?"),
+      nullable_void_Function: findType("~()?"),
+      nullable_void_Function_legacy_Event: findType("~(Event0*)?"),
+      nullable_void_Function_legacy_ProgressEvent: findType("~(ProgressEvent*)?"),
+      num: findType("num"),
+      void: findType("~"),
+      void_Function: findType("~()"),
+      void_Function_Object: findType("~(Object)"),
+      void_Function_Object_StackTrace: findType("~(Object,StackTrace)"),
+      void_Function_String_dynamic: findType("~(String,@)")
+    };
+  })();
+  (function constants() {
+    var makeConstList = hunkHelpers.makeConstList;
+    C.EventSource_methods = W.EventSource.prototype;
+    C.HttpRequest_methods = W.HttpRequest.prototype;
+    C.Interceptor_methods = J.Interceptor.prototype;
+    C.JSArray_methods = J.JSArray.prototype;
+    C.JSDouble_methods = J.JSDouble.prototype;
+    C.JSInt_methods = J.JSInt.prototype;
+    C.JSNull_methods = J.JSNull.prototype;
+    C.JSNumber_methods = J.JSNumber.prototype;
+    C.JSString_methods = J.JSString.prototype;
+    C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype;
+    C.NativeByteData_methods = H.NativeByteData.prototype;
+    C.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype;
+    C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype;
+    C.C_HexCodec = new N.HexCodec();
+    C.C_HexEncoder = new R.HexEncoder();
+    C.C_JS_CONST = function getTagFallback(o) {
+  var s = Object.prototype.toString.call(o);
+  return s.substring(8, s.length - 1);
+};
+    C.C_JS_CONST0 = function() {
+  var toStringFunction = Object.prototype.toString;
+  function getTag(o) {
+    var s = toStringFunction.call(o);
+    return s.substring(8, s.length - 1);
+  }
+  function getUnknownTag(object, tag) {
+    if (/^HTML[A-Z].*Element$/.test(tag)) {
+      var name = toStringFunction.call(object);
+      if (name == "[object Object]") return null;
+      return "HTMLElement";
+    }
+  }
+  function getUnknownTagGenericBrowser(object, tag) {
+    if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement";
+    return getUnknownTag(object, tag);
+  }
+  function prototypeForTag(tag) {
+    if (typeof window == "undefined") return null;
+    if (typeof window[tag] == "undefined") return null;
+    var constructor = window[tag];
+    if (typeof constructor != "function") return null;
+    return constructor.prototype;
+  }
+  function discriminator(tag) { return null; }
+  var isBrowser = typeof navigator == "object";
+  return {
+    getTag: getTag,
+    getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag,
+    prototypeForTag: prototypeForTag,
+    discriminator: discriminator };
+};
+    C.C_JS_CONST6 = function(getTagFallback) {
+  return function(hooks) {
+    if (typeof navigator != "object") return hooks;
+    var ua = navigator.userAgent;
+    if (ua.indexOf("DumpRenderTree") >= 0) return hooks;
+    if (ua.indexOf("Chrome") >= 0) {
+      function confirm(p) {
+        return typeof window == "object" && window[p] && window[p].name == p;
+      }
+      if (confirm("Window") && confirm("HTMLElement")) return hooks;
+    }
+    hooks.getTag = getTagFallback;
+  };
+};
+    C.C_JS_CONST1 = function(hooks) {
+  if (typeof dartExperimentalFixupGetTag != "function") return hooks;
+  hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);
+};
+    C.C_JS_CONST2 = function(hooks) {
+  var getTag = hooks.getTag;
+  var prototypeForTag = hooks.prototypeForTag;
+  function getTagFixed(o) {
+    var tag = getTag(o);
+    if (tag == "Document") {
+      if (!!o.xmlVersion) return "!Document";
+      return "!HTMLDocument";
+    }
+    return tag;
+  }
+  function prototypeForTagFixed(tag) {
+    if (tag == "Document") return null;
+    return prototypeForTag(tag);
+  }
+  hooks.getTag = getTagFixed;
+  hooks.prototypeForTag = prototypeForTagFixed;
+};
+    C.C_JS_CONST5 = function(hooks) {
+  var userAgent = typeof navigator == "object" ? navigator.userAgent : "";
+  if (userAgent.indexOf("Firefox") == -1) return hooks;
+  var getTag = hooks.getTag;
+  var quickMap = {
+    "BeforeUnloadEvent": "Event",
+    "DataTransfer": "Clipboard",
+    "GeoGeolocation": "Geolocation",
+    "Location": "!Location",
+    "WorkerMessageEvent": "MessageEvent",
+    "XMLDocument": "!Document"};
+  function getTagFirefox(o) {
+    var tag = getTag(o);
+    return quickMap[tag] || tag;
+  }
+  hooks.getTag = getTagFirefox;
+};
+    C.C_JS_CONST4 = function(hooks) {
+  var userAgent = typeof navigator == "object" ? navigator.userAgent : "";
+  if (userAgent.indexOf("Trident/") == -1) return hooks;
+  var getTag = hooks.getTag;
+  var quickMap = {
+    "BeforeUnloadEvent": "Event",
+    "DataTransfer": "Clipboard",
+    "HTMLDDElement": "HTMLElement",
+    "HTMLDTElement": "HTMLElement",
+    "HTMLPhraseElement": "HTMLElement",
+    "Position": "Geoposition"
+  };
+  function getTagIE(o) {
+    var tag = getTag(o);
+    var newTag = quickMap[tag];
+    if (newTag) return newTag;
+    if (tag == "Object") {
+      if (window.DataView && (o instanceof window.DataView)) return "DataView";
+    }
+    return tag;
+  }
+  function prototypeForTagIE(tag) {
+    var constructor = window[tag];
+    if (constructor == null) return null;
+    return constructor.prototype;
+  }
+  hooks.getTag = getTagIE;
+  hooks.prototypeForTag = prototypeForTagIE;
+};
+    C.C_JS_CONST3 = function(hooks) { return hooks; }
+;
+    C.C_JsonCodec = new P.JsonCodec();
+    C.C_OutOfMemoryError = new P.OutOfMemoryError();
+    C.C__DelayedDone = new P._DelayedDone();
+    C.C__JSRandom = new P._JSRandom();
+    C.C__Required = new H._Required();
+    C.C__RootZone = new P._RootZone();
+    C.C__StringStackTrace = new P._StringStackTrace();
+    C.Duration_0 = new P.Duration(0);
+    C.Duration_5000000 = new P.Duration(5000000);
+    C.JsonDecoder_null = new P.JsonDecoder(null);
+    C.JsonEncoder_null = new P.JsonEncoder(null);
+    C.Level_INFO_800 = new Y.Level("INFO", 800);
+    C.Level_WARNING_900 = new Y.Level("WARNING", 900);
+    C.List_AllocationProfile = H.setRuntimeTypeInfo(makeConstList(["AllocationProfile"]), type$.JSArray_legacy_String);
+    C.List_BoundField = H.setRuntimeTypeInfo(makeConstList(["BoundField"]), type$.JSArray_legacy_String);
+    C.List_BoundVariable = H.setRuntimeTypeInfo(makeConstList(["BoundVariable"]), type$.JSArray_legacy_String);
+    C.List_Breakpoint = H.setRuntimeTypeInfo(makeConstList(["Breakpoint"]), type$.JSArray_legacy_String);
+    C.List_ClassHeapStats = H.setRuntimeTypeInfo(makeConstList(["ClassHeapStats"]), type$.JSArray_legacy_String);
+    C.List_ClassList = H.setRuntimeTypeInfo(makeConstList(["ClassList"]), type$.JSArray_legacy_String);
+    C.List_ClassRef = H.setRuntimeTypeInfo(makeConstList(["ClassRef"]), type$.JSArray_legacy_String);
+    C.List_ClientName = H.setRuntimeTypeInfo(makeConstList(["ClientName"]), type$.JSArray_legacy_String);
+    C.List_CodeRef = H.setRuntimeTypeInfo(makeConstList(["CodeRef"]), type$.JSArray_legacy_String);
+    C.List_Context = H.setRuntimeTypeInfo(makeConstList(["Context"]), type$.JSArray_legacy_String);
+    C.List_ContextElement = H.setRuntimeTypeInfo(makeConstList(["ContextElement"]), type$.JSArray_legacy_String);
+    C.List_ContextRef = H.setRuntimeTypeInfo(makeConstList(["ContextRef"]), type$.JSArray_legacy_String);
+    C.List_CpuSample = H.setRuntimeTypeInfo(makeConstList(["CpuSample"]), type$.JSArray_legacy_String);
+    C.List_CpuSamples = H.setRuntimeTypeInfo(makeConstList(["CpuSamples"]), type$.JSArray_legacy_String);
+    C.List_Error = H.setRuntimeTypeInfo(makeConstList(["Error"]), type$.JSArray_legacy_String);
+    C.List_ErrorRef = H.setRuntimeTypeInfo(makeConstList(["ErrorRef"]), type$.JSArray_legacy_String);
+    C.List_Event = H.setRuntimeTypeInfo(makeConstList(["Event"]), type$.JSArray_legacy_String);
+    C.List_FieldRef = H.setRuntimeTypeInfo(makeConstList(["FieldRef"]), type$.JSArray_legacy_String);
+    C.List_Flag = H.setRuntimeTypeInfo(makeConstList(["Flag"]), type$.JSArray_legacy_String);
+    C.List_FlagList = H.setRuntimeTypeInfo(makeConstList(["FlagList"]), type$.JSArray_legacy_String);
+    C.List_Frame = H.setRuntimeTypeInfo(makeConstList(["Frame"]), type$.JSArray_legacy_String);
+    C.List_FuncRef = H.setRuntimeTypeInfo(makeConstList(["FuncRef"]), type$.JSArray_legacy_String);
+    C.List_InboundReference = H.setRuntimeTypeInfo(makeConstList(["InboundReference"]), type$.JSArray_legacy_String);
+    C.List_InboundReferences = H.setRuntimeTypeInfo(makeConstList(["InboundReferences"]), type$.JSArray_legacy_String);
+    C.List_InstanceRef = H.setRuntimeTypeInfo(makeConstList(["InstanceRef"]), type$.JSArray_legacy_String);
+    C.List_InstanceRef_ErrorRef = H.setRuntimeTypeInfo(makeConstList(["InstanceRef", "ErrorRef"]), type$.JSArray_legacy_String);
+    C.List_InstanceRef_Sentinel = H.setRuntimeTypeInfo(makeConstList(["InstanceRef", "Sentinel"]), type$.JSArray_legacy_String);
+    C.List_InstanceSet = H.setRuntimeTypeInfo(makeConstList(["InstanceSet"]), type$.JSArray_legacy_String);
+    C.List_Isolate = H.setRuntimeTypeInfo(makeConstList(["Isolate"]), type$.JSArray_legacy_String);
+    C.List_IsolateGroup = H.setRuntimeTypeInfo(makeConstList(["IsolateGroup"]), type$.JSArray_legacy_String);
+    C.List_IsolateGroupRef = H.setRuntimeTypeInfo(makeConstList(["IsolateGroupRef"]), type$.JSArray_legacy_String);
+    C.List_IsolateRef = H.setRuntimeTypeInfo(makeConstList(["IsolateRef"]), type$.JSArray_legacy_String);
+    C.List_LibraryRef = H.setRuntimeTypeInfo(makeConstList(["LibraryRef"]), type$.JSArray_legacy_String);
+    C.List_LibraryRef_ClassRef_FuncRef = H.setRuntimeTypeInfo(makeConstList(["LibraryRef", "ClassRef", "FuncRef"]), type$.JSArray_legacy_String);
+    C.List_LogRecord = H.setRuntimeTypeInfo(makeConstList(["LogRecord"]), type$.JSArray_legacy_String);
+    C.List_MemoryUsage = H.setRuntimeTypeInfo(makeConstList(["MemoryUsage"]), type$.JSArray_legacy_String);
+    C.List_Message = H.setRuntimeTypeInfo(makeConstList(["Message"]), type$.JSArray_legacy_String);
+    C.List_Obj = H.setRuntimeTypeInfo(makeConstList(["Obj"]), type$.JSArray_legacy_String);
+    C.List_ObjRef = H.setRuntimeTypeInfo(makeConstList(["ObjRef"]), type$.JSArray_legacy_String);
+    C.List_PAk = H.setRuntimeTypeInfo(makeConstList(["InstanceRef", "TypeArgumentsRef", "Sentinel"]), type$.JSArray_legacy_String);
+    C.List_ProfileFunction = H.setRuntimeTypeInfo(makeConstList(["ProfileFunction"]), type$.JSArray_legacy_String);
+    C.List_ReloadReport = H.setRuntimeTypeInfo(makeConstList(["ReloadReport"]), type$.JSArray_legacy_String);
+    C.List_RetainingObject = H.setRuntimeTypeInfo(makeConstList(["RetainingObject"]), type$.JSArray_legacy_String);
+    C.List_RetainingPath = H.setRuntimeTypeInfo(makeConstList(["RetainingPath"]), type$.JSArray_legacy_String);
+    C.List_ScriptList = H.setRuntimeTypeInfo(makeConstList(["ScriptList"]), type$.JSArray_legacy_String);
+    C.List_ScriptRef = H.setRuntimeTypeInfo(makeConstList(["ScriptRef"]), type$.JSArray_legacy_String);
+    C.List_SourceLocation = H.setRuntimeTypeInfo(makeConstList(["SourceLocation"]), type$.JSArray_legacy_String);
+    C.List_SourceReport = H.setRuntimeTypeInfo(makeConstList(["SourceReport"]), type$.JSArray_legacy_String);
+    C.List_Stack = H.setRuntimeTypeInfo(makeConstList(["Stack"]), type$.JSArray_legacy_String);
+    C.List_Success = H.setRuntimeTypeInfo(makeConstList(["Success"]), type$.JSArray_legacy_String);
+    C.List_Success_Error = H.setRuntimeTypeInfo(makeConstList(["Success", "Error"]), type$.JSArray_legacy_String);
+    C.List_Timeline = H.setRuntimeTypeInfo(makeConstList(["Timeline"]), type$.JSArray_legacy_String);
+    C.List_TimelineEvent = H.setRuntimeTypeInfo(makeConstList(["TimelineEvent"]), type$.JSArray_legacy_String);
+    C.List_TimelineFlags = H.setRuntimeTypeInfo(makeConstList(["TimelineFlags"]), type$.JSArray_legacy_String);
+    C.List_Timestamp = H.setRuntimeTypeInfo(makeConstList(["Timestamp"]), type$.JSArray_legacy_String);
+    C.List_TypeArgumentsRef = H.setRuntimeTypeInfo(makeConstList(["TypeArgumentsRef"]), type$.JSArray_legacy_String);
+    C.List_VM = H.setRuntimeTypeInfo(makeConstList(["VM"]), type$.JSArray_legacy_String);
+    C.List_VMRef = H.setRuntimeTypeInfo(makeConstList(["VMRef"]), type$.JSArray_legacy_String);
+    C.List_Version = H.setRuntimeTypeInfo(makeConstList(["Version"]), type$.JSArray_legacy_String);
+    C.List_dynamic = H.setRuntimeTypeInfo(makeConstList(["dynamic"]), type$.JSArray_legacy_String);
+    C.List_empty = H.setRuntimeTypeInfo(makeConstList([]), type$.JSArray_dynamic);
+    C.List_oqh = H.setRuntimeTypeInfo(makeConstList(["SourceLocation", "UnresolvedSourceLocation"]), type$.JSArray_legacy_String);
+    C.Map_empty = new H.ConstantStringMap(0, {}, C.List_empty, H.findType("ConstantStringMap<@,@>"));
+    C.List_empty0 = H.setRuntimeTypeInfo(makeConstList([]), H.findType("JSArray<Symbol0*>"));
+    C.Map_empty0 = new H.ConstantStringMap(0, {}, C.List_empty0, H.findType("ConstantStringMap<Symbol0*,@>"));
+    C.Symbol_call = new H.Symbol("call");
+    C.Type_ByteBuffer_RkP = H.typeLiteral("ByteBuffer");
+    C.Type_ByteData_zNC = H.typeLiteral("ByteData");
+    C.Type_Float32List_LB7 = H.typeLiteral("Float32List");
+    C.Type_Float64List_LB7 = H.typeLiteral("Float64List");
+    C.Type_Int16List_uXf = H.typeLiteral("Int16List");
+    C.Type_Int32List_O50 = H.typeLiteral("Int32List");
+    C.Type_Int8List_ekJ = H.typeLiteral("Int8List");
+    C.Type_JSObject_8k0 = H.typeLiteral("JSObject");
+    C.Type_Null_Yyn = H.typeLiteral("Null");
+    C.Type_String_k8F = H.typeLiteral("String");
+    C.Type_Uint16List_2bx = H.typeLiteral("Uint16List");
+    C.Type_Uint32List_2bx = H.typeLiteral("Uint32List");
+    C.Type_Uint8ClampedList_Jik = H.typeLiteral("Uint8ClampedList");
+    C.Type_Uint8List_WLA = H.typeLiteral("Uint8List");
+    C.Type_bool_lhE = H.typeLiteral("bool");
+    C.Type_double_K1J = H.typeLiteral("double");
+    C.Type_int_tHn = H.typeLiteral("int");
+    C.Type_num_cv7 = H.typeLiteral("num");
+    C.Utf8Decoder_false = new P.Utf8Decoder(false);
+  })();
+  (function staticFields() {
+    $._JS_INTEROP_INTERCEPTOR_TAG = null;
+    $.Closure_functionCounter = 0;
+    $.BoundClosure_selfFieldNameCache = null;
+    $.BoundClosure_receiverFieldNameCache = null;
+    $.getTagFunction = null;
+    $.alternateTagFunction = null;
+    $.prototypeForTagFunction = null;
+    $.dispatchRecordsForInstanceTags = null;
+    $.interceptorsForUncacheableTags = null;
+    $.initNativeDispatchFlag = null;
+    $._nextCallback = null;
+    $._lastCallback = null;
+    $._lastPriorityCallback = null;
+    $._isInCallbackLoop = false;
+    $.Zone__current = C.C__RootZone;
+    $._toStringVisiting = H.setRuntimeTypeInfo([], H.findType("JSArray<Object>"));
+    $.LogRecord__nextNumber = 0;
+    $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger);
+    $._typeFactories = P.LinkedHashMap_LinkedHashMap$_literal(["AllocationProfile", Q.vm_service_AllocationProfile_parse$closure(), "BoundField", Q.vm_service_BoundField_parse$closure(), "BoundVariable", Q.vm_service_BoundVariable_parse$closure(), "Breakpoint", Q.vm_service_Breakpoint_parse$closure(), "@Class", Q.vm_service_ClassRef_parse$closure(), "Class", Q.vm_service_Class_parse$closure(), "ClassHeapStats", Q.vm_service_ClassHeapStats_parse$closure(), "ClassList", Q.vm_service_ClassList_parse$closure(), "ClientName", Q.vm_service_ClientName_parse$closure(), "@Code", Q.vm_service_CodeRef_parse$closure(), "Code", Q.vm_service_Code_parse$closure(), "@Context", Q.vm_service_ContextRef_parse$closure(), "Context", Q.vm_service_Context_parse$closure(), "ContextElement", Q.vm_service_ContextElement_parse$closure(), "CpuSamples", Q.vm_service_CpuSamples_parse$closure(), "CpuSample", Q.vm_service_CpuSample_parse$closure(), "@Error", Q.vm_service_ErrorRef_parse$closure(), "Error", Q.vm_service_Error_parse$closure(), "Event", Q.vm_service_Event_parse$closure(), "ExtensionData", Q.vm_service_ExtensionData_parse$closure(), "@Field", Q.vm_service_FieldRef_parse$closure(), "Field", Q.vm_service_Field_parse$closure(), "Flag", Q.vm_service_Flag_parse$closure(), "FlagList", Q.vm_service_FlagList_parse$closure(), "Frame", Q.vm_service_Frame_parse$closure(), "@Function", Q.vm_service_FuncRef_parse$closure(), "Function", Q.vm_service_Func_parse$closure(), "@Instance", Q.vm_service_InstanceRef_parse$closure(), "Instance", Q.vm_service_Instance_parse$closure(), "@Isolate", Q.vm_service_IsolateRef_parse$closure(), "Isolate", Q.vm_service_Isolate_parse$closure(), "@IsolateGroup", Q.vm_service_IsolateGroupRef_parse$closure(), "IsolateGroup", Q.vm_service_IsolateGroup_parse$closure(), "InboundReferences", Q.vm_service_InboundReferences_parse$closure(), "InboundReference", Q.vm_service_InboundReference_parse$closure(), "InstanceSet", Q.vm_service_InstanceSet_parse$closure(), "@Library", Q.vm_service_LibraryRef_parse$closure(), "Library", Q.vm_service_Library_parse$closure(), "LibraryDependency", Q.vm_service_LibraryDependency_parse$closure(), "LogRecord", Q.vm_service_LogRecord_parse$closure(), "MapAssociation", Q.vm_service_MapAssociation_parse$closure(), "MemoryUsage", Q.vm_service_MemoryUsage_parse$closure(), "Message", Q.vm_service_Message_parse$closure(), "NativeFunction", Q.vm_service_NativeFunction_parse$closure(), "@Null", Q.vm_service_NullValRef_parse$closure(), "Null", Q.vm_service_NullVal_parse$closure(), "@Object", Q.vm_service_ObjRef_parse$closure(), "Object", Q.vm_service_Obj_parse$closure(), "ProfileFunction", Q.vm_service_ProfileFunction_parse$closure(), "ReloadReport", Q.vm_service_ReloadReport_parse$closure(), "RetainingObject", Q.vm_service_RetainingObject_parse$closure(), "RetainingPath", Q.vm_service_RetainingPath_parse$closure(), "Response", Q.vm_service_Response_parse$closure(), "Sentinel", Q.vm_service_Sentinel_parse$closure(), "@Script", Q.vm_service_ScriptRef_parse$closure(), "Script", Q.vm_service_Script_parse$closure(), "ScriptList", Q.vm_service_ScriptList_parse$closure(), "SourceLocation", Q.vm_service_SourceLocation_parse$closure(), "SourceReport", Q.vm_service_SourceReport_parse$closure(), "SourceReportCoverage", Q.vm_service_SourceReportCoverage_parse$closure(), "SourceReportRange", Q.vm_service_SourceReportRange_parse$closure(), "Stack", Q.vm_service_Stack_parse$closure(), "Success", Q.vm_service_Success_parse$closure(), "Timeline", Q.vm_service_Timeline_parse$closure(), "TimelineEvent", Q.vm_service_TimelineEvent_parse$closure(), "TimelineFlags", Q.vm_service_TimelineFlags_parse$closure(), "Timestamp", Q.vm_service_Timestamp_parse$closure(), "@TypeArguments", Q.vm_service_TypeArgumentsRef_parse$closure(), "TypeArguments", Q.vm_service_TypeArguments_parse$closure(), "UnresolvedSourceLocation", Q.vm_service_UnresolvedSourceLocation_parse$closure(), "Version", Q.vm_service_Version_parse$closure(), "@VM", Q.vm_service_VMRef_parse$closure(), "VM", Q.vm_service_VM_parse$closure()], type$.legacy_String, H.findType("Function*"));
+    $._methodReturnTypes = P.LinkedHashMap_LinkedHashMap$_literal(["addBreakpoint", C.List_Breakpoint, "addBreakpointWithScriptUri", C.List_Breakpoint, "addBreakpointAtEntry", C.List_Breakpoint, "clearCpuSamples", C.List_Success, "clearVMTimeline", C.List_Success, "invoke", C.List_InstanceRef_ErrorRef, "evaluate", C.List_InstanceRef_ErrorRef, "evaluateInFrame", C.List_InstanceRef_ErrorRef, "getAllocationProfile", C.List_AllocationProfile, "getClassList", C.List_ClassList, "getClientName", C.List_ClientName, "getCpuSamples", C.List_CpuSamples, "getFlagList", C.List_FlagList, "getInboundReferences", C.List_InboundReferences, "getInstances", C.List_InstanceSet, "getIsolate", C.List_Isolate, "getIsolateGroup", C.List_IsolateGroup, "getMemoryUsage", C.List_MemoryUsage, "getIsolateGroupMemoryUsage", C.List_MemoryUsage, "getScripts", C.List_ScriptList, "getObject", C.List_Obj, "getRetainingPath", C.List_RetainingPath, "getStack", C.List_Stack, "getSourceReport", C.List_SourceReport, "getVersion", C.List_Version, "getVM", C.List_VM, "getVMTimeline", C.List_Timeline, "getVMTimelineFlags", C.List_TimelineFlags, "getVMTimelineMicros", C.List_Timestamp, "pause", C.List_Success, "kill", C.List_Success, "registerService", C.List_Success, "reloadSources", C.List_ReloadReport, "removeBreakpoint", C.List_Success, "requestHeapSnapshot", C.List_Success, "requirePermissionToResume", C.List_Success, "resume", C.List_Success, "setClientName", C.List_Success, "setExceptionPauseMode", C.List_Success, "setFlag", C.List_Success_Error, "setLibraryDebuggable", C.List_Success, "setName", C.List_Success, "setVMName", C.List_Success, "setVMTimelineFlags", C.List_Success, "streamCancel", C.List_Success, "streamListen", C.List_Success], type$.legacy_String, type$.legacy_List_legacy_String);
+  })();
+  (function lazyInitializers() {
+    var _lazy = hunkHelpers.lazy;
+    _lazy($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() {
+      return H.getIsolateAffinityTag("_$dart_dartClosure");
+    });
+    _lazy($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() {
+      return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({
+        toString: function() {
+          return "$receiver$";
+        }
+      }));
+    });
+    _lazy($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() {
+      return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({$method$: null,
+        toString: function() {
+          return "$receiver$";
+        }
+      }));
+    });
+    _lazy($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() {
+      return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(null));
+    });
+    _lazy($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() {
+      return H.TypeErrorDecoder_extractPattern(function() {
+        var $argumentsExpr$ = '$arguments$';
+        try {
+          null.$method$($argumentsExpr$);
+        } catch (e) {
+          return e.message;
+        }
+      }());
+    });
+    _lazy($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() {
+      return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(void 0));
+    });
+    _lazy($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() {
+      return H.TypeErrorDecoder_extractPattern(function() {
+        var $argumentsExpr$ = '$arguments$';
+        try {
+          (void 0).$method$($argumentsExpr$);
+        } catch (e) {
+          return e.message;
+        }
+      }());
+    });
+    _lazy($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() {
+      return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(null));
+    });
+    _lazy($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() {
+      return H.TypeErrorDecoder_extractPattern(function() {
+        try {
+          null.$method$;
+        } catch (e) {
+          return e.message;
+        }
+      }());
+    });
+    _lazy($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() {
+      return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(void 0));
+    });
+    _lazy($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() {
+      return H.TypeErrorDecoder_extractPattern(function() {
+        try {
+          (void 0).$method$;
+        } catch (e) {
+          return e.message;
+        }
+      }());
+    });
+    _lazy($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() {
+      return P._AsyncRun__initializeScheduleImmediate();
+    });
+    _lazy($, "Future__nullFuture", "$get$Future__nullFuture", function() {
+      return P._Future$zoneValue(null, C.C__RootZone, type$.Null);
+    });
+    _lazy($, "Future__falseFuture", "$get$Future__falseFuture", function() {
+      return P._Future$zoneValue(false, C.C__RootZone, type$.bool);
+    });
+    _lazy($, "Utf8Decoder__decoder", "$get$Utf8Decoder__decoder", function() {
+      return new P.Utf8Decoder_closure().call$0();
+    });
+    _lazy($, "Utf8Decoder__decoderNonfatal", "$get$Utf8Decoder__decoderNonfatal", function() {
+      return new P.Utf8Decoder_closure0().call$0();
+    });
+    _lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() {
+      return new Error().stack != void 0;
+    });
+    _lazy($, "Logger_root", "$get$Logger_root", function() {
+      return F.Logger_Logger("");
+    });
+  })();
+  (function nativeSupport() {
+    !function() {
+      var intern = function(s) {
+        var o = {};
+        o[s] = 1;
+        return Object.keys(hunkHelpers.convertToFastObject(o))[0];
+      };
+      init.getIsolateTag = function(name) {
+        return intern("___dart_" + name + init.isolateTag);
+      };
+      var tableProperty = "___dart_isolate_tags_";
+      var usedProperties = Object[tableProperty] || (Object[tableProperty] = Object.create(null));
+      var rootProperty = "_ZxYxX";
+      for (var i = 0;; i++) {
+        var property = intern(rootProperty + "_" + i + "_");
+        if (!(property in usedProperties)) {
+          usedProperties[property] = 1;
+          init.isolateTag = property;
+          break;
+        }
+      }
+      init.dispatchPropertyName = init.getIsolateTag("dispatch_record");
+    }();
+    hunkHelpers.setOrUpdateInterceptorsByTag({Blob: J.Interceptor, DOMError: J.Interceptor, File: J.Interceptor, MediaError: J.Interceptor, NavigatorUserMediaError: J.Interceptor, OverconstrainedError: J.Interceptor, PositionError: J.Interceptor, SQLError: J.Interceptor, ArrayBuffer: H.NativeByteBuffer, ArrayBufferView: H.NativeTypedData, DataView: H.NativeByteData, Float32Array: H.NativeFloat32List, Float64Array: H.NativeFloat64List, Int16Array: H.NativeInt16List, Int32Array: H.NativeInt32List, Int8Array: H.NativeInt8List, Uint16Array: H.NativeUint16List, Uint32Array: H.NativeUint32List, Uint8ClampedArray: H.NativeUint8ClampedList, CanvasPixelArray: H.NativeUint8ClampedList, Uint8Array: H.NativeUint8List, DOMException: W.DomException, AbortPaymentEvent: W.Event0, AnimationEvent: W.Event0, AnimationPlaybackEvent: W.Event0, ApplicationCacheErrorEvent: W.Event0, BackgroundFetchClickEvent: W.Event0, BackgroundFetchEvent: W.Event0, BackgroundFetchFailEvent: W.Event0, BackgroundFetchedEvent: W.Event0, BeforeInstallPromptEvent: W.Event0, BeforeUnloadEvent: W.Event0, BlobEvent: W.Event0, CanMakePaymentEvent: W.Event0, ClipboardEvent: W.Event0, CloseEvent: W.Event0, CompositionEvent: W.Event0, CustomEvent: W.Event0, DeviceMotionEvent: W.Event0, DeviceOrientationEvent: W.Event0, ErrorEvent: W.Event0, ExtendableEvent: W.Event0, ExtendableMessageEvent: W.Event0, FetchEvent: W.Event0, FocusEvent: W.Event0, FontFaceSetLoadEvent: W.Event0, ForeignFetchEvent: W.Event0, GamepadEvent: W.Event0, HashChangeEvent: W.Event0, InstallEvent: W.Event0, KeyboardEvent: W.Event0, MediaEncryptedEvent: W.Event0, MediaKeyMessageEvent: W.Event0, MediaQueryListEvent: W.Event0, MediaStreamEvent: W.Event0, MediaStreamTrackEvent: W.Event0, MIDIConnectionEvent: W.Event0, MIDIMessageEvent: W.Event0, MouseEvent: W.Event0, DragEvent: W.Event0, MutationEvent: W.Event0, NotificationEvent: W.Event0, PageTransitionEvent: W.Event0, PaymentRequestEvent: W.Event0, PaymentRequestUpdateEvent: W.Event0, PointerEvent: W.Event0, PopStateEvent: W.Event0, PresentationConnectionAvailableEvent: W.Event0, PresentationConnectionCloseEvent: W.Event0, PromiseRejectionEvent: W.Event0, PushEvent: W.Event0, RTCDataChannelEvent: W.Event0, RTCDTMFToneChangeEvent: W.Event0, RTCPeerConnectionIceEvent: W.Event0, RTCTrackEvent: W.Event0, SecurityPolicyViolationEvent: W.Event0, SensorErrorEvent: W.Event0, SpeechRecognitionError: W.Event0, SpeechRecognitionEvent: W.Event0, SpeechSynthesisEvent: W.Event0, StorageEvent: W.Event0, SyncEvent: W.Event0, TextEvent: W.Event0, TouchEvent: W.Event0, TrackEvent: W.Event0, TransitionEvent: W.Event0, WebKitTransitionEvent: W.Event0, UIEvent: W.Event0, VRDeviceEvent: W.Event0, VRDisplayEvent: W.Event0, VRSessionEvent: W.Event0, WheelEvent: W.Event0, MojoInterfaceRequestEvent: W.Event0, USBConnectionEvent: W.Event0, IDBVersionChangeEvent: W.Event0, AudioProcessingEvent: W.Event0, OfflineAudioCompletionEvent: W.Event0, WebGLContextEvent: W.Event0, Event: W.Event0, InputEvent: W.Event0, SubmitEvent: W.Event0, EventSource: W.EventSource, MessagePort: W.EventTarget, EventTarget: W.EventTarget, XMLHttpRequest: W.HttpRequest, XMLHttpRequestEventTarget: W.HttpRequestEventTarget, MessageEvent: W.MessageEvent, ProgressEvent: W.ProgressEvent, ResourceProgressEvent: W.ProgressEvent});
+    hunkHelpers.setOrUpdateLeafTags({Blob: true, DOMError: true, File: true, MediaError: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, SQLError: true, ArrayBuffer: true, ArrayBufferView: false, DataView: true, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, DOMException: true, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CompositionEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FocusEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, KeyboardEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MouseEvent: true, DragEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PointerEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TextEvent: true, TouchEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, UIEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, WheelEvent: true, MojoInterfaceRequestEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, SubmitEvent: false, EventSource: true, MessagePort: true, EventTarget: false, XMLHttpRequest: true, XMLHttpRequestEventTarget: false, MessageEvent: true, ProgressEvent: true, ResourceProgressEvent: true});
+    H.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView";
+    H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView";
+    H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView";
+    H.NativeTypedArrayOfDouble.$nativeSuperclassTag = "ArrayBufferView";
+    H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView";
+    H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView";
+    H.NativeTypedArrayOfInt.$nativeSuperclassTag = "ArrayBufferView";
+  })();
+  convertAllToFastObject(holders);
+  convertToFastObject($);
+  (function(callback) {
+    if (typeof document === "undefined") {
+      callback(null);
+      return;
+    }
+    if (typeof document.currentScript != 'undefined') {
+      callback(document.currentScript);
+      return;
+    }
+    var scripts = document.scripts;
+    function onLoad(event) {
+      for (var i = 0; i < scripts.length; ++i)
+        scripts[i].removeEventListener("load", onLoad, false);
+      callback(event.target);
+    }
+    for (var i = 0; i < scripts.length; ++i)
+      scripts[i].addEventListener("load", onLoad, false);
+  })(function(currentScript) {
+    init.currentScript = currentScript;
+    if (typeof dartMainRunner === "function")
+      dartMainRunner(E.main, []);
+    else
+      E.main([]);
+  });
+})();
+
+//# sourceMappingURL=sse_smoke_driver.dart.js.map
diff --git a/pkg/dev_compiler/LICENSE b/pkg/dev_compiler/LICENSE
new file mode 100644
index 0000000..9276409
--- /dev/null
+++ b/pkg/dev_compiler/LICENSE
@@ -0,0 +1,27 @@
+Copyright 2015, the Dart project authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+    * Neither the name of Google Inc. nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/dev_compiler/LICENSE.md b/pkg/dev_compiler/LICENSE.md
deleted file mode 100644
index bab6a8c..0000000
--- a/pkg/dev_compiler/LICENSE.md
+++ /dev/null
@@ -1,35 +0,0 @@
-This license applies to all files contained here with the following
-exceptions:
-
-- All code in test/js_test_tools is externally maintained with
-  corresponding licenses in those individual files and directories.
-
----
-
-Copyright 2015, the Dart project authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials provided
-      with the distribution.
-    * Neither the name of Google Inc. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pkg/dev_compiler/lib/src/js_ast/printer.dart b/pkg/dev_compiler/lib/src/js_ast/printer.dart
index c7891b4..ccf3275 100644
--- a/pkg/dev_compiler/lib/src/js_ast/printer.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/printer.dart
@@ -1326,11 +1326,11 @@
     if (node.isStar) {
       out('*');
     } else {
-      var name = node.name.name;
+      var localName = localNamer.getName(node.name);
       if (node.asName == null) {
         // If our local was renamed, generate an implicit "as".
         // This is a convenience feature so imports and exports can be renamed.
-        var localName = localNamer.getName(node.name);
+        var name = node.name.name;
         if (localName != name) {
           out(export ? localName : name);
           out(' as ');
@@ -1338,7 +1338,7 @@
           return;
         }
       }
-      out(name);
+      out(localName);
     }
     if (node.asName != null) {
       out(' as ');
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index d6f0fa5..a040dc9 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -3239,7 +3239,8 @@
 
       if (_annotatedNullCheck(p.annotations)) {
         body.add(_nullParameterCheck(jsParam));
-      } else if (_mustBeNonNullable(p.type) &&
+      } else if (!_options.soundNullSafety &&
+          _mustBeNonNullable(p.type) &&
           !_annotatedNotNull(p.annotations)) {
         // TODO(vsm): Remove if / when CFE does this:
         // https://github.com/dart-lang/sdk/issues/40597
@@ -4849,6 +4850,14 @@
         if (name == 'extensionSymbol' && firstArg is StringLiteral) {
           return getExtensionSymbolInternal(firstArg.value);
         }
+
+        if (name == 'compileTimeFlag' && firstArg is StringLiteral) {
+          var flagName = firstArg.value;
+          if (flagName == 'soundNullSafety') {
+            return js.boolean(_options.soundNullSafety);
+          }
+          throw UnsupportedError('Invalid flag in call to $name: $flagName');
+        }
       } else if (node.arguments.positional.length == 2) {
         var firstArg = node.arguments.positional[0];
         var secondArg = node.arguments.positional[1];
@@ -5212,8 +5221,9 @@
   @override
   js_ast.Expression visitNullCheck(NullCheck node) {
     var expr = node.operand;
+    var jsExpr = _visitExpression(expr);
     // If the expression is non-nullable already, this is a no-op.
-    return isNullable(expr) ? notNull(expr) : _visitExpression(expr);
+    return isNullable(expr) ? runtimeCall('nullCheck(#)', [jsExpr]) : jsExpr;
   }
 
   @override
@@ -5290,11 +5300,11 @@
     // Generate `is` as `dart.is` or `typeof` depending on the RHS type.
     var lhs = _visitExpression(operand);
     var typeofName = _typeRep.typeFor(type).primitiveTypeOf;
-    // Inline primitives other than int (which requires a Math.floor check).
+    // Inline non-nullable primitive types other than int (which requires a
+    // Math.floor check).
     if (typeofName != null &&
-        type != _types.coreTypes.intLegacyRawType &&
-        type != _types.coreTypes.intNonNullableRawType &&
-        type != _types.coreTypes.intNullableRawType) {
+        type.nullability == Nullability.nonNullable &&
+        type != _types.coreTypes.intNonNullableRawType) {
       return js.call('typeof # == #', [lhs, js.string(typeofName, "'")]);
     } else {
       return js.call('#.is(#)', [_emitType(type), lhs]);
diff --git a/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart b/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart
index 25fce07..363f13a 100644
--- a/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart
+++ b/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart
@@ -68,6 +68,12 @@
   bool visitNullLiteral(NullLiteral node) => true;
 
   @override
+  bool visitNullCheck(NullCheck node) {
+    node.operand.accept(this);
+    return false;
+  }
+
+  @override
   bool visitVariableGet(VariableGet node) {
     return _variableInference.variableIsNullable(node.variable);
   }
diff --git a/pkg/dev_compiler/lib/src/kernel/target.dart b/pkg/dev_compiler/lib/src/kernel/target.dart
index 6d31716..33e19e8 100644
--- a/pkg/dev_compiler/lib/src/kernel/target.dart
+++ b/pkg/dev_compiler/lib/src/kernel/target.dart
@@ -186,10 +186,8 @@
       return createInvocation('getter', [SymbolLiteral(name.substring(4))]);
     }
     if (name.startsWith('set:')) {
-      return createInvocation('setter', [
-        SymbolLiteral(name.substring(4) + '='),
-        arguments.positional.single
-      ]);
+      return createInvocation('setter',
+          [SymbolLiteral(name.substring(4)), arguments.positional.single]);
     }
     var ctorArgs = <Expression>[
       SymbolLiteral(name),
diff --git a/pkg/dev_compiler/test/modular_suite.dart b/pkg/dev_compiler/test/modular_suite.dart
index ab721cb..3d47edc 100644
--- a/pkg/dev_compiler/test/modular_suite.dart
+++ b/pkg/dev_compiler/test/modular_suite.dart
@@ -259,8 +259,6 @@
     var runjs = '''
     import { dart, _isolate_helper } from 'dart_sdk.js';
     import { main } from 'main.js';
-    // Run with weak null safety.
-    dart.nullSafety(false);
     _isolate_helper.startRootIsolate(() => {}, []);
     main.main();
     ''';
diff --git a/pkg/dev_compiler/test/modular_suite_nnbd.dart b/pkg/dev_compiler/test/modular_suite_nnbd.dart
index 0970e54..6677465 100644
--- a/pkg/dev_compiler/test/modular_suite_nnbd.dart
+++ b/pkg/dev_compiler/test/modular_suite_nnbd.dart
@@ -263,7 +263,6 @@
     var runjs = '''
     import { dart, _isolate_helper } from 'dart_sdk.js';
     import { main } from 'main.js';
-    dart.nullSafety(false);
     _isolate_helper.startRootIsolate(() => {}, []);
     main.main();
     ''';
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 e5b469e..1abf518 100644
--- a/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt
+++ b/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt
@@ -3,8 +3,8 @@
 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'.
+ERROR|COMPILE_TIME_ERROR|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1676|28|1|The operator '&' isn't defined for the type 'JSInt'.
+ERROR|COMPILE_TIME_ERROR|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1678|27|1|The operator '&' isn't defined for the type 'JSInt'.
+ERROR|COMPILE_TIME_ERROR|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1681|17|1|The operator '&' isn't defined for the type 'JSInt'.
+ERROR|COMPILE_TIME_ERROR|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1686|18|1|The operator '&' isn't defined for the type 'JSInt'.
+ERROR|COMPILE_TIME_ERROR|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 21a638c..004f021 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|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|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'.
+ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|3725|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|939|5|95|Const constructors can't throw exceptions.
+ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|972|5|94|Const constructors can't throw exceptions.
+ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|3723|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|937|3|5|Only redirecting factory constructors can be declared to be 'const'.
+ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|970|3|5|Only redirecting factory constructors can be declared to be 'const'.
diff --git a/pkg/dev_compiler/tool/ddb b/pkg/dev_compiler/tool/ddb
index 642d148..b2cd5ce 100755
--- a/pkg/dev_compiler/tool/ddb
+++ b/pkg/dev_compiler/tool/ddb
@@ -16,6 +16,8 @@
 
 import 'package:args/args.dart' show ArgParser;
 import 'package:path/path.dart' as p;
+import 'package:dev_compiler/src/compiler/module_builder.dart'
+    as module_builder;
 
 enum NullSafety { strict, weak, disabled }
 
@@ -42,13 +44,16 @@
         help: 'Option to (compile|run|all). Default is all (compile and run).',
         allowed: ['compile', 'run', 'all'],
         defaultsTo: 'all')
-    ..addOption('nnbd',
-        help: 'Runtime null safety mode (strong|weak|disabled). When enabled '
-            'will automatically enable the "non-nullable" experiment. Defaults '
-            'to strong if the experiment is also passed manually, otherwise '
-            'to disabled.',
-        allowed: ['strong', 'weak', 'disabled'],
-        defaultsTo: 'disabled')
+    ..addFlag('sound-null-safety',
+        help: 'Compile for sound null safety at runtime. Passed through to the '
+            'DDC binary. Defaults to false.',
+        defaultsTo: false,
+        negatable: true)
+    ..addFlag('null-assertions',
+        help: 'Run with assertions that values passed to non-nullable method '
+            'parameters are not null.',
+        defaultsTo: false,
+        negatable: true)
     ..addFlag('observe',
         help:
             'Run the compiler in the Dart VM with --observe. Implies --debug.',
@@ -77,10 +82,7 @@
         negatable: false,
         defaultsTo: false)
     ..addOption('vm-service-port',
-        help: 'Specify the observatory port. Implied --observe.')
-    ..addSeparator('Deprecated and will be removed:')
-    ..addFlag('kernel',
-        abbr: 'k', help: 'Ignored. The kernel based DDC is always used.');
+        help: 'Specify the observatory port. Implied --observe.');
 
   var options = parser.parse(args);
   if (options['help'] as bool) {
@@ -106,15 +108,15 @@
   var compile = mode == 'compile' || mode == 'all';
   var run = mode == 'run' || mode == 'all';
   var verbose = options['verbose'] as bool;
+  var nonNullAsserts = options['null-assertions'] as bool;
 
-  // Enable null-safety either by passing the experiment flag
-  // or by requesting an nnbd mode:
-  var nnbd =
-      experiments.contains('non-nullable') || options['nnbd'] != 'disabled';
-  // Unless weak-mode is specified, default to strict checks
-  var isNnbdStrong = nnbd && options['nnbd'] != 'weak';
-  // Ensure non-nullable is passed as a flag
-  if (nnbd && !experiments.contains('non-nullable')) {
+  var soundNullSafety = options['sound-null-safety'] as bool;
+  // Enable null safety either by passing the `non-nullable` experiment flag or
+  // `sound-null-safety`.
+  var nnbd = experiments.contains('non-nullable') || soundNullSafety;
+
+  // Ensure non-nullable is passed as a flag.
+  if (soundNullSafety && !experiments.contains('non-nullable')) {
     experiments.add('non-nullable');
   }
 
@@ -122,8 +124,8 @@
   var out = (options['out'] as String) ?? p.setExtension(entry, '.js');
   var libRoot = p.dirname(entry);
   var basename = p.basenameWithoutExtension(entry);
-  var libname = p.relative(p.withoutExtension(entry)).replaceAll('/', '__');
-  libname = libname.replaceAll('-', '_');
+  var libname =
+      module_builder.pathToJSIdentifier(p.relative(p.withoutExtension(entry)));
 
   // By default (no `-d`), we use the `dartdevc` binary on the user's path to
   // compute the SDK we use for execution.  I.e., we assume that `dart` is
@@ -210,14 +212,14 @@
   String ddcSdk;
   String sdkJsPath;
   String requirePath;
-  var suffix = isNnbdStrong ? p.join('sound', mod) : p.join('kernel', mod);
+  var suffix = soundNullSafety ? p.join('sound', mod) : p.join('kernel', mod);
   if (debug) {
     var sdkRoot = p.dirname(p.dirname(ddcPath));
     var buildDir =
         p.join(sdkRoot, Platform.isMacOS ? 'xcodebuild' : 'out', 'ReleaseX64');
     dartSdk = p.join(buildDir, 'dart-sdk');
-    ddcSdk = p.join(
-        buildDir, isNnbdStrong ? 'ddc_outline_sound.dill' : 'ddc_outline.dill');
+    ddcSdk = p.join(buildDir,
+        soundNullSafety ? 'ddc_outline_sound.dill' : 'ddc_outline.dill');
     sdkJsPath = p.join(buildDir, 'gen', 'utils', 'dartdevc', suffix);
     requirePath = p.join(sdkRoot, 'third_party', 'requirejs');
   } else {
@@ -227,17 +229,18 @@
   }
 
   // Print an initial empty line to separate the invocation from the output.
-  print('');
+  if (verbose) {
+    print('');
+  }
 
   if (compile) {
     var ddcArgs = [
-      '--kernel',
       if (summarizeText) '--summarize-text',
       '--modules=$mod',
       '--dart-sdk-summary=$ddcSdk',
       for (var summary in summaries) '--summary=$summary',
       for (var experiment in experiments) '--enable-experiment=$experiment',
-      if (isNnbdStrong) '--sound-null-safety',
+      if (soundNullSafety) '--sound-null-safety',
       if (options['packages'] != null) '--packages=${options['packages']}',
       '-o',
       out,
@@ -275,11 +278,11 @@
         function(sdk, app) {
     'use strict';
     if ($nnbd) {
-      sdk.dart.nullSafety($isNnbdStrong);
-      sdk.dart.weakNullSafetyWarnings(!$isNnbdStrong);
+      sdk.dart.weakNullSafetyWarnings(!$soundNullSafety);
+      sdk.dart.nonNullAsserts($nonNullAsserts);
     }
     sdk._debugger.registerDevtoolsFormatter();
-    app.$libname.main();
+    app.$libname.main([]);
   });
 </script>
 ''';
@@ -305,11 +308,13 @@
 } catch(e) {
 }
 let sdk = require(\"dart_sdk\");
+// Create a self reference for JS interop tests that set fields on self.
+sdk.dart.global.self = sdk.dart.global;
 let main = require(\"./$basename\").$libname.main;
 try {
   if ($nnbd) {
-    sdk.dart.nullSafety($isNnbdStrong);
-    sdk.dart.weakNullSafetyWarnings(!$isNnbdStrong);
+    sdk.dart.weakNullSafetyWarnings(!$soundNullSafety);
+    sdk.dart.nonNullAsserts($nonNullAsserts);
   }
   sdk._isolate_helper.startRootIsolate(main, []);
 } catch(e) {
@@ -339,14 +344,16 @@
       var runjs = '''
 import { dart, _isolate_helper } from '$sdkJsPath/dart_sdk.js';
 import { $libname } from '$basename.js';
+// Create a self reference for JS interop tests that set fields on self.
+dart.global.self = dart.global;
 let main = $libname.main;
 try {
   if ($nnbd) {
-    dart.nullSafety($isNnbdStrong);
-    dart.weakNullSafetyWarnings(!$isNnbdStrong);
+    dart.weakNullSafetyWarnings(!$soundNullSafety);
+    dart.nonNullAsserts($nonNullAsserts);
   }
   _isolate_helper.startRootIsolate(() => {}, []);
-  main();
+  main([]);
 } catch(e) {
   console.error(e);
 }
diff --git a/pkg/dev_compiler/tool/patch_sdk.dart b/pkg/dev_compiler/tool/patch_sdk.dart
index 06c87db..74b3ec5 100755
--- a/pkg/dev_compiler/tool/patch_sdk.dart
+++ b/pkg/dev_compiler/tool/patch_sdk.dart
@@ -40,7 +40,7 @@
   var outDir = resolveInputUri(outPath.endsWith('/') ? outPath : '$outPath/');
   var outLibRoot = outDir.resolve('lib/');
 
-  var inputVersion = Platform.script.resolve('../../../tools/VERSION');
+  var inputVersion = Uri.file(Platform.executable).resolve('../version');
   var outVersion = outDir.resolve('version');
 
   var specification = LibrariesSpecification.parse(
diff --git a/pkg/front_end/lib/src/api_prototype/compiler_options.dart b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
index 2e8dc26..558db46 100644
--- a/pkg/front_end/lib/src/api_prototype/compiler_options.dart
+++ b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
@@ -236,6 +236,10 @@
       "."
       "${kernel.defaultLanguageVersion.minor}";
 
+  /// If `true`, a '.d' file with input dependencies is generated when
+  /// compiling the platform dill.
+  bool emitDeps = true;
+
   bool equivalent(CompilerOptions other,
       {bool ignoreOnDiagnostic: true,
       bool ignoreVerbose: true,
@@ -290,6 +294,7 @@
     if (writeFileOnCrashReport != other.writeFileOnCrashReport) return false;
     if (nnbdMode != other.nnbdMode) return false;
     if (currentSdkVersion != other.currentSdkVersion) return false;
+    if (emitDeps != other.emitDeps) return false;
 
     return true;
   }
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 26c702a..bd92018b 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
@@ -19,20 +19,22 @@
   setLiterals,
   spreadCollections,
   tripleShift,
+  valueClass,
   variance,
 }
 
 const Version enableAlternativeInvalidationStrategyVersion =
-    const Version(2, 9);
+    const Version(2, 10);
 const Version enableConstantUpdate2018Version = const Version(2, 4);
 const Version enableControlFlowCollectionsVersion = const Version(2, 2);
 const Version enableExtensionMethodsVersion = const Version(2, 6);
-const Version enableNonNullableVersion = const Version(2, 9);
-const Version enableNonfunctionTypeAliasesVersion = const Version(2, 9);
+const Version enableNonNullableVersion = const Version(2, 10);
+const Version enableNonfunctionTypeAliasesVersion = const Version(2, 10);
 const Version enableSetLiteralsVersion = const Version(2, 2);
 const Version enableSpreadCollectionsVersion = const Version(2, 2);
-const Version enableTripleShiftVersion = const Version(2, 9);
-const Version enableVarianceVersion = const Version(2, 9);
+const Version enableTripleShiftVersion = const Version(2, 10);
+const Version enableValueClassVersion = const Version(2, 10);
+const Version enableVarianceVersion = const Version(2, 10);
 
 ExperimentalFlag parseExperimentalFlag(String flag) {
   switch (flag) {
@@ -54,6 +56,8 @@
       return ExperimentalFlag.spreadCollections;
     case "triple-shift":
       return ExperimentalFlag.tripleShift;
+    case "value-class":
+      return ExperimentalFlag.valueClass;
     case "variance":
       return ExperimentalFlag.variance;
   }
@@ -70,6 +74,7 @@
   ExperimentalFlag.setLiterals: true,
   ExperimentalFlag.spreadCollections: true,
   ExperimentalFlag.tripleShift: false,
+  ExperimentalFlag.valueClass: false,
   ExperimentalFlag.variance: false,
 };
 
@@ -83,6 +88,7 @@
   ExperimentalFlag.setLiterals: true,
   ExperimentalFlag.spreadCollections: true,
   ExperimentalFlag.tripleShift: false,
+  ExperimentalFlag.valueClass: false,
   ExperimentalFlag.variance: false,
 };
 
@@ -108,12 +114,24 @@
   "collection": {
     ExperimentalFlag.nonNullable,
   },
+  "convert": {
+    ExperimentalFlag.nonNullable,
+  },
+  "crypto": {
+    ExperimentalFlag.nonNullable,
+  },
+  "csslib": {
+    ExperimentalFlag.nonNullable,
+  },
   "dart_internal": {
     ExperimentalFlag.nonNullable,
   },
   "fake_async": {
     ExperimentalFlag.nonNullable,
   },
+  "file": {
+    ExperimentalFlag.nonNullable,
+  },
   "fixnum": {
     ExperimentalFlag.nonNullable,
   },
@@ -123,6 +141,12 @@
   "flutter_test": {
     ExperimentalFlag.nonNullable,
   },
+  "flutter_goldens": {
+    ExperimentalFlag.nonNullable,
+  },
+  "flutter_goldens_client": {
+    ExperimentalFlag.nonNullable,
+  },
   "js": {
     ExperimentalFlag.nonNullable,
   },
@@ -138,9 +162,15 @@
   "pedantic": {
     ExperimentalFlag.nonNullable,
   },
+  "platform": {
+    ExperimentalFlag.nonNullable,
+  },
   "pool": {
     ExperimentalFlag.nonNullable,
   },
+  "process": {
+    ExperimentalFlag.nonNullable,
+  },
   "sky_engine": {
     ExperimentalFlag.nonNullable,
   },
diff --git a/pkg/front_end/lib/src/base/command_line_options.dart b/pkg/front_end/lib/src/base/command_line_options.dart
index 03fe3a2..d8c5e33 100644
--- a/pkg/front_end/lib/src/base/command_line_options.dart
+++ b/pkg/front_end/lib/src/base/command_line_options.dart
@@ -27,6 +27,7 @@
   static const String help = "--help";
   static const String librariesJson = "--libraries-json";
   static const String noDefines = "--no-defines";
+  static const String noDeps = "--no-deps";
   static const String output = "--output";
   static const String packages = "--packages";
   static const String platform = "--platform";
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index e832549..9421858 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -170,6 +170,8 @@
 
   bool get throwOnWarningsForDebugging => _raw.throwOnWarningsForDebugging;
 
+  bool get emitDeps => _raw.emitDeps;
+
   NnbdMode get nnbdMode => _raw.nnbdMode;
 
   /// The entry-points provided to the compiler.
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 2b7f3a1..7a7f258 100644
--- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
@@ -62,7 +62,7 @@
 
 import '../modifier.dart';
 
-import '../names.dart' show noSuchMethodName;
+import '../names.dart' show equalsName, noSuchMethodName;
 
 import '../problems.dart' show internalProblem, unhandled, unimplemented;
 
@@ -791,27 +791,30 @@
           "Constructor in override check.", declaredMember.fileOffset, fileUri);
     }
     if (declaredMember is Procedure && interfaceMember is Procedure) {
-      if (declaredMember.kind == ProcedureKind.Method &&
-          interfaceMember.kind == ProcedureKind.Method) {
-        bool seenCovariant = checkMethodOverride(
-            types, declaredMember, interfaceMember, isInterfaceCheck);
-        if (seenCovariant) {
-          handleSeenCovariant(
-              types, declaredMember, interfaceMember, isSetter, callback);
-        }
-      }
-      if (declaredMember.kind == ProcedureKind.Getter &&
-          interfaceMember.kind == ProcedureKind.Getter) {
-        checkGetterOverride(
-            types, declaredMember, interfaceMember, isInterfaceCheck);
-      }
-      if (declaredMember.kind == ProcedureKind.Setter &&
-          interfaceMember.kind == ProcedureKind.Setter) {
-        bool seenCovariant = checkSetterOverride(
-            types, declaredMember, interfaceMember, isInterfaceCheck);
-        if (seenCovariant) {
-          handleSeenCovariant(
-              types, declaredMember, interfaceMember, isSetter, callback);
+      if (declaredMember.kind == interfaceMember.kind) {
+        if (declaredMember.kind == ProcedureKind.Method ||
+            declaredMember.kind == ProcedureKind.Operator) {
+          bool seenCovariant = checkMethodOverride(
+              types, declaredMember, interfaceMember, isInterfaceCheck);
+          if (seenCovariant) {
+            handleSeenCovariant(
+                types, declaredMember, interfaceMember, isSetter, callback);
+          }
+        } else if (declaredMember.kind == ProcedureKind.Getter) {
+          checkGetterOverride(
+              types, declaredMember, interfaceMember, isInterfaceCheck);
+        } else if (declaredMember.kind == ProcedureKind.Setter) {
+          bool seenCovariant = checkSetterOverride(
+              types, declaredMember, interfaceMember, isInterfaceCheck);
+          if (seenCovariant) {
+            handleSeenCovariant(
+                types, declaredMember, interfaceMember, isSetter, callback);
+          }
+        } else {
+          assert(
+              false,
+              "Unexpected procedure kind in override check: "
+              "${declaredMember.kind}");
         }
       }
     } else {
@@ -854,10 +857,12 @@
       Member noSuchMethodInterface, KernelTarget target, Procedure procedure) {
     String prefix =
         procedure.isGetter ? 'get:' : procedure.isSetter ? 'set:' : '';
+    String invocationName = prefix + procedure.name.name;
+    if (procedure.isSetter) invocationName += '=';
     Expression invocation = target.backendTarget.instantiateInvocation(
         target.loader.coreTypes,
         new ThisExpression(),
-        prefix + procedure.name.name,
+        invocationName,
         new Arguments.forwarded(procedure.function, library.library),
         procedure.fileOffset,
         /*isSuper=*/ false);
@@ -1093,8 +1098,9 @@
   @override
   bool checkMethodOverride(Types types, Procedure declaredMember,
       Procedure interfaceMember, bool isInterfaceCheck) {
-    assert(declaredMember.kind == ProcedureKind.Method);
-    assert(interfaceMember.kind == ProcedureKind.Method);
+    assert(declaredMember.kind == interfaceMember.kind);
+    assert(declaredMember.kind == ProcedureKind.Method ||
+        declaredMember.kind == ProcedureKind.Operator);
     bool seenCovariant = false;
     FunctionNode declaredFunction = declaredMember.function;
     FunctionNode interfaceFunction = interfaceMember.function;
@@ -1167,6 +1173,17 @@
           declaredFunction.positionalParameters[i];
       VariableDeclaration interfaceParameter =
           interfaceFunction.positionalParameters[i];
+      if (i == 0 &&
+          declaredMember.name == equalsName &&
+          declaredParameter.type ==
+              types.hierarchy.coreTypes.objectNonNullableRawType &&
+          interfaceParameter.type is DynamicType) {
+        // TODO(johnniwinther): Add check for opt-in overrides of operator ==.
+        // `operator ==` methods in opt-out classes have type
+        // `bool Function(dynamic)`.
+        continue;
+      }
+
       _checkTypes(
           types,
           interfaceSubstitution,
@@ -1174,7 +1191,7 @@
           declaredMember,
           interfaceMember,
           declaredParameter.type,
-          interfaceFunction.positionalParameters[i].type,
+          interfaceParameter.type,
           declaredParameter.isCovariant || interfaceParameter.isCovariant,
           declaredParameter,
           isInterfaceCheck);
@@ -1340,6 +1357,10 @@
   void reportInvalidOverride(bool isInterfaceCheck, Member declaredMember,
       Message message, int fileOffset, int length,
       {List<LocatedMessage> context}) {
+    if (shouldOverrideProblemBeOverlooked(this)) {
+      return;
+    }
+
     if (declaredMember.enclosingClass == cls) {
       // Ordinary override
       library.addProblem(message, fileOffset, length, declaredMember.fileUri,
@@ -1400,15 +1421,15 @@
     InterfaceType supertype = cls.supertype.asInterfaceType;
     Substitution substitution = Substitution.fromSupertype(cls.mixedInType);
     for (Supertype constraint in cls.mixedInClass.superclassConstraints()) {
-      InterfaceType interface =
+      InterfaceType requiredInterface =
           substitution.substituteSupertype(constraint).asInterfaceType;
-      if (hierarchy.getTypeAsInstanceOf(
-              supertype, interface.classNode, library.library, coreTypes) !=
-          interface) {
+      InterfaceType implementedInterface = hierarchy.getTypeAsInstanceOf(
+          supertype, requiredInterface.classNode, library.library, coreTypes);
+      if (implementedInterface != requiredInterface) {
         library.addProblem(
             templateMixinApplicationIncompatibleSupertype.withArguments(
                 supertype,
-                interface,
+                requiredInterface,
                 cls.mixedInType.asInterfaceType,
                 library.isNonNullableByDefault),
             cls.fileOffset,
@@ -1769,3 +1790,17 @@
 
   ConstructorRedirection(this.target) : cycleReported = false;
 }
+
+/// Returns `true` if override problems should be overlooked.
+///
+/// This is needed for the current encoding of some JavaScript implementation
+/// classes that are not valid Dart. For instance `JSInt` in
+/// 'dart:_interceptors' that implements both `int` and `double`, and `JsArray`
+/// in `dart:js` that implement both `ListMixin` and `JsObject`.
+bool shouldOverrideProblemBeOverlooked(ClassBuilder classBuilder) {
+  String uri = '${classBuilder.library.importUri}';
+  return uri == 'dart:js' &&
+          classBuilder.fileUri.pathSegments.last == 'js.dart' ||
+      uri == 'dart:_interceptors' &&
+          classBuilder.fileUri.pathSegments.last == 'js_number.dart';
+}
diff --git a/pkg/front_end/lib/src/fasta/builder/field_builder.dart b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
index a04c39f..cbcc354 100644
--- a/pkg/front_end/lib/src/fasta/builder/field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
@@ -115,16 +115,14 @@
       Procedure setterReferenceFrom)
       : super(libraryBuilder, charOffset) {
     Uri fileUri = libraryBuilder?.fileUri;
-    if (isExternal) {
-      _fieldEncoding = new ExternalFieldEncoding(
-          fileUri,
-          charOffset,
-          charEndOffset,
-          getterReferenceFrom,
-          setterReferenceFrom,
-          isFinal,
-          isCovariant,
-          library.isNonNullableByDefault);
+    if (isAbstract || isExternal) {
+      _fieldEncoding = new AbstractOrExternalFieldEncoding(fileUri, charOffset,
+          charEndOffset, getterReferenceFrom, setterReferenceFrom,
+          isAbstract: isAbstract,
+          isExternal: isExternal,
+          isFinal: isFinal,
+          isCovariant: isCovariant,
+          isNonNullableByDefault: library.isNonNullableByDefault);
     } else if (isLate &&
         !libraryBuilder.loader.target.backendTarget.supportsLateFields) {
       if (hasInitializer) {
@@ -1321,19 +1319,25 @@
       '_ClassMember($fieldBuilder,$_member,forSetter=${forSetter})';
 }
 
-class ExternalFieldEncoding implements FieldEncoding {
+class AbstractOrExternalFieldEncoding implements FieldEncoding {
+  final bool isAbstract;
+  final bool isExternal;
+
   Procedure _getter;
   Procedure _setter;
 
-  ExternalFieldEncoding(
-      Uri fileUri,
-      int charOffset,
-      int charEndOffset,
-      Procedure getterReference,
-      Procedure setterReference,
+  AbstractOrExternalFieldEncoding(Uri fileUri, int charOffset,
+      int charEndOffset, Procedure getterReference, Procedure setterReference,
+      {this.isAbstract,
+      this.isExternal,
       bool isFinal,
       bool isCovariant,
-      bool isNonNullableByDefault) {
+      bool isNonNullableByDefault})
+      : assert(isAbstract != null),
+        assert(isExternal != null),
+        assert(isFinal != null),
+        assert(isCovariant != null),
+        assert(isNonNullableByDefault != null) {
     _getter = new Procedure(null, ProcedureKind.Getter, new FunctionNode(null),
         fileUri: fileUri, reference: getterReference?.reference)
       ..fileOffset = charOffset
@@ -1406,7 +1410,8 @@
     _getter
       ..isStatic = !isInstanceMember
       ..isExtensionMember = isExtensionMember
-      ..isExternal = true;
+      ..isAbstract = isAbstract && !isExternal
+      ..isExternal = isExternal;
     // TODO(johnniwinther): How can the name already have been computed?
     _getter.name ??= new Name(getterName, libraryBuilder.library);
 
@@ -1423,7 +1428,8 @@
       _setter
         ..isStatic = !isInstanceMember
         ..isExtensionMember = isExtensionMember
-        ..isExternal = true;
+        ..isAbstract = isAbstract && !isExternal
+        ..isExternal = isExternal;
       // TODO(johnniwinther): How can the name already have been computed?
       _setter?.name ??= new Name(setterName, libraryBuilder.library);
     }
diff --git a/pkg/front_end/lib/src/fasta/builder/member_builder.dart b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
index d1a3f67..05c1bc4 100644
--- a/pkg/front_end/lib/src/fasta/builder/member_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
@@ -59,6 +59,8 @@
 
   bool get isExternal;
 
+  bool get isAbstract;
+
   void buildOutlineExpressions(LibraryBuilder library, CoreTypes coreTypes);
 
   /// Returns the [ClassMember]s for the non-setter members created for this
@@ -124,6 +126,9 @@
   bool get isExternal => (modifiers & externalMask) != 0;
 
   @override
+  bool get isAbstract => (modifiers & abstractMask) != 0;
+
+  @override
   LibraryBuilder get library {
     if (parent is LibraryBuilder) {
       LibraryBuilder library = parent;
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
index b4d3941..6927bdd7 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_cfe_generated.dart
@@ -2042,6 +2042,84 @@
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
+    Message Function(
+        DartType _type,
+        DartType _type2,
+        bool
+            isNonNullableByDefault)> templateInvalidReturn = const Template<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+    messageTemplate:
+        r"""A value of type '#type' can't be returned from a function with return type '#type2'.""",
+    withArguments: _withArgumentsInvalidReturn);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    codeInvalidReturn = const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+  "InvalidReturn",
+  templateInvalidReturn,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidReturn(
+    DartType _type, DartType _type2, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeInvalidReturn,
+      message:
+          """A value of type '${type}' can't be returned from a function with return type '${type2}'.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        DartType _type,
+        DartType _type2,
+        bool
+            isNonNullableByDefault)> templateInvalidReturnAsync = const Template<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+    messageTemplate:
+        r"""A value of type '#type' can't be returned from an async function with return type '#type2'.""",
+    withArguments: _withArgumentsInvalidReturnAsync);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>
+    codeInvalidReturnAsync = const Code<
+        Message Function(
+            DartType _type, DartType _type2, bool isNonNullableByDefault)>(
+  "InvalidReturnAsync",
+  templateInvalidReturnAsync,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvalidReturnAsync(
+    DartType _type, DartType _type2, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeInvalidReturnAsync,
+      message:
+          """A value of type '${type}' can't be returned from an async function with return type '${type2}'.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
         Message Function(DartType _type, DartType _type2, DartType _type3,
             bool isNonNullableByDefault)>
     templateMixinApplicationIncompatibleSupertype = const Template<
@@ -2119,6 +2197,33 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(DartType _type, bool isNonNullableByDefault)>
+    templateNonNullAwareSpreadIsNull = const Template<
+            Message Function(DartType _type, bool isNonNullableByDefault)>(
+        messageTemplate: r"""Can't spread a value with static type '#type'.""",
+        withArguments: _withArgumentsNonNullAwareSpreadIsNull);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, bool isNonNullableByDefault)>
+    codeNonNullAwareSpreadIsNull =
+    const Code<Message Function(DartType _type, bool isNonNullableByDefault)>(
+  "NonNullAwareSpreadIsNull",
+  templateNonNullAwareSpreadIsNull,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsNonNullAwareSpreadIsNull(
+    DartType _type, bool isNonNullableByDefault) {
+  TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault);
+  List<Object> typeParts = labeler.labelType(_type);
+  String type = typeParts.join();
+  return new Message(codeNonNullAwareSpreadIsNull,
+      message: """Can't spread a value with static type '${type}'.""" +
+          labeler.originMessages,
+      arguments: {'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
         Message Function(
             String name, DartType _type, bool isNonNullableByDefault)>
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 69f4d72..4610fe5 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -696,6 +696,7 @@
 
   @override
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -707,6 +708,10 @@
     debugEvent("Fields");
     if (!libraryBuilder.isNonNullableByDefault) {
       reportNonNullableModifierError(lateToken);
+      if (abstractToken != null) {
+        handleRecoverableError(
+            fasta.messageAbstractClassMember, abstractToken, abstractToken);
+      }
       if (externalToken != null) {
         handleRecoverableError(
             fasta.messageExternalField, externalToken, externalToken);
@@ -2394,22 +2399,25 @@
     bool isFinal = (currentLocalVariableModifiers & finalMask) != 0;
     bool isLate = (currentLocalVariableModifiers & lateMask) != 0;
     Expression initializer;
-    if (!optional("in", token)) {
+    if (!optional("in", token.next)) {
       // A for-in loop-variable can't have an initializer. So let's remain
       // silent if the next token is `in`. Since a for-in loop can only have
       // one variable it must be followed by `in`.
-      if (isConst) {
-        initializer = buildProblem(
-            fasta.templateConstFieldWithoutInitializer
-                .withArguments(token.lexeme),
-            token.charOffset,
-            token.length);
-      } else if (isFinal && !isLate) {
-        initializer = buildProblem(
-            fasta.templateFinalFieldWithoutInitializer
-                .withArguments(token.lexeme),
-            token.charOffset,
-            token.length);
+      if (!token.isSynthetic) {
+        // If [token] is synthetic it is created from error recovery.
+        if (isConst) {
+          initializer = buildProblem(
+              fasta.templateConstFieldWithoutInitializer
+                  .withArguments(token.lexeme),
+              token.charOffset,
+              token.length);
+        } else if (isFinal && !isLate) {
+          initializer = buildProblem(
+              fasta.templateFinalFieldWithoutInitializer
+                  .withArguments(token.lexeme),
+              token.charOffset,
+              token.length);
+        }
       }
     }
     pushNewLocalVariable(initializer);
@@ -2452,6 +2460,13 @@
     if (member is FieldBuilder) {
       FieldBuilder fieldBuilder = member;
       inLateFieldInitializer = fieldBuilder.isLate;
+      if (fieldBuilder.isAbstract) {
+        addProblem(
+            fasta.messageAbstractFieldInitializer, token.charOffset, noLength);
+      } else if (fieldBuilder.isExternal) {
+        addProblem(
+            fasta.messageExternalFieldInitializer, token.charOffset, noLength);
+      }
     } else {
       inLateFieldInitializer = false;
     }
@@ -5863,7 +5878,21 @@
         ];
       }
       initializedFields[name] = assignmentOffset;
-      if (builder.isFinal && builder.hasInitializer) {
+      if (builder.isAbstract) {
+        return <Initializer>[
+          buildInvalidInitializer(
+              buildProblem(fasta.messageAbstractFieldConstructorInitializer,
+                  fieldNameOffset, name.length),
+              fieldNameOffset)
+        ];
+      } else if (builder.isExternal) {
+        return <Initializer>[
+          buildInvalidInitializer(
+              buildProblem(fasta.messageExternalFieldConstructorInitializer,
+                  fieldNameOffset, name.length),
+              fieldNameOffset)
+        ];
+      } else if (builder.isFinal && builder.hasInitializer) {
         addProblem(
             fasta.templateFinalInstanceVariableAlreadyInitialized
                 .withArguments(name),
diff --git a/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
index 1b9fa19..e6a04b2 100644
--- a/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
@@ -17,6 +17,7 @@
 import 'package:kernel/src/legacy_erasure.dart';
 import 'package:kernel/src/nnbd_top_merge.dart';
 import 'package:kernel/src/norm.dart';
+import 'package:kernel/src/standard_bounds.dart';
 import 'package:kernel/src/types.dart' show Types;
 
 import '../../testing/id_testing_utils.dart' show typeToText;
@@ -67,7 +68,7 @@
 
 import '../source/source_loader.dart' show SourceLoader;
 
-import '../type_inference/standard_bounds.dart' show StandardBounds;
+import '../type_inference/standard_bounds.dart' show TypeSchemaStandardBounds;
 
 import '../type_inference/type_constraint_gatherer.dart'
     show TypeConstraintGatherer;
@@ -512,7 +513,8 @@
     return asSupertypeOf(type, superclass)?.typeArguments;
   }
 
-  InterfaceType getKernelLegacyLeastUpperBound(
+  @override
+  InterfaceType getLegacyLeastUpperBound(
       InterfaceType type1, InterfaceType type2, Library clientLibrary) {
     if (type1 == type2) return type1;
 
@@ -2529,7 +2531,7 @@
 }
 
 class TypeBuilderConstraintGatherer extends TypeConstraintGatherer
-    with StandardBounds {
+    with StandardBounds, TypeSchemaStandardBounds {
   final ClassHierarchyBuilder hierarchy;
 
   TypeBuilderConstraintGatherer(this.hierarchy,
@@ -2587,13 +2589,6 @@
   bool areMutualSubtypes(DartType s, DartType t, SubtypeCheckMode mode) {
     return isSubtypeOf(s, t, mode) && isSubtypeOf(t, s, mode);
   }
-
-  @override
-  InterfaceType getLegacyLeastUpperBound(
-      InterfaceType type1, InterfaceType type2, Library clientLibrary) {
-    return hierarchy.getKernelLegacyLeastUpperBound(
-        type1, type2, clientLibrary);
-  }
 }
 
 class DelayedOverrideCheck {
@@ -3038,14 +3033,7 @@
           debug?.log("Combined Member Signature: "
               "${bestSoFar.fullName} !<: ${candidate.fullName}");
 
-          String uri = '${classBuilder.library.importUri}';
-          if (uri == 'dart:js' &&
-                  classBuilder.fileUri.pathSegments.last == 'js.dart' ||
-              uri == 'dart:_interceptors' &&
-                  classBuilder.fileUri.pathSegments.last == 'js_number.dart') {
-            // TODO(johnniwinther): Fix the dart2js libraries and remove the
-            // above URIs.
-          } else {
+          if (!shouldOverrideProblemBeOverlooked(classBuilder)) {
             bestSoFar = null;
             bestTypeSoFar = null;
             mutualSubtypes = null;
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
index e39ecdb..d7755a4 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -42,6 +42,7 @@
         messageConstEvalFailedAssertion,
         messageConstEvalNotListOrSetInSpread,
         messageConstEvalNotMapInSpread,
+        messageConstEvalNonNull,
         messageConstEvalNullValue,
         messageConstEvalStartingPoint,
         messageConstEvalUnevaluated,
@@ -76,13 +77,16 @@
     Map<String, String> environmentDefines,
     ErrorReporter errorReporter,
     EvaluationMode evaluationMode,
-    {bool keepFields: true,
-    bool evaluateAnnotations: true,
-    bool desugarSets: false,
-    bool enableTripleShift: false,
-    bool errorOnUnevaluatedConstant: false,
+    {bool evaluateAnnotations,
+    bool desugarSets,
+    bool enableTripleShift,
+    bool errorOnUnevaluatedConstant,
     CoreTypes coreTypes,
     ClassHierarchy hierarchy}) {
+  assert(evaluateAnnotations != null);
+  assert(desugarSets != null);
+  assert(enableTripleShift != null);
+  assert(errorOnUnevaluatedConstant != null);
   coreTypes ??= new CoreTypes(component);
   hierarchy ??= new ClassHierarchy(component, coreTypes);
 
@@ -91,7 +95,6 @@
 
   transformLibraries(component.libraries, backend, environmentDefines,
       typeEnvironment, errorReporter, evaluationMode,
-      keepFields: keepFields,
       desugarSets: desugarSets,
       enableTripleShift: enableTripleShift,
       errorOnUnevaluatedConstant: errorOnUnevaluatedConstant,
@@ -106,15 +109,17 @@
     TypeEnvironment typeEnvironment,
     ErrorReporter errorReporter,
     EvaluationMode evaluationMode,
-    {bool keepFields: true,
-    bool evaluateAnnotations: true,
-    bool desugarSets: false,
-    bool enableTripleShift: false,
-    bool errorOnUnevaluatedConstant: false}) {
+    {bool evaluateAnnotations,
+    bool desugarSets,
+    bool enableTripleShift,
+    bool errorOnUnevaluatedConstant}) {
+  assert(evaluateAnnotations != null);
+  assert(desugarSets != null);
+  assert(enableTripleShift != null);
+  assert(errorOnUnevaluatedConstant != null);
   final ConstantsTransformer constantsTransformer = new ConstantsTransformer(
       backend,
       environmentDefines,
-      keepFields,
       evaluateAnnotations,
       desugarSets,
       enableTripleShift,
@@ -127,6 +132,34 @@
   }
 }
 
+void transformProcedure(
+    Procedure procedure,
+    ConstantsBackend backend,
+    Map<String, String> environmentDefines,
+    TypeEnvironment typeEnvironment,
+    ErrorReporter errorReporter,
+    EvaluationMode evaluationMode,
+    {bool evaluateAnnotations: true,
+    bool desugarSets: false,
+    bool enableTripleShift: false,
+    bool errorOnUnevaluatedConstant: false}) {
+  assert(evaluateAnnotations != null);
+  assert(desugarSets != null);
+  assert(enableTripleShift != null);
+  assert(errorOnUnevaluatedConstant != null);
+  final ConstantsTransformer constantsTransformer = new ConstantsTransformer(
+      backend,
+      environmentDefines,
+      evaluateAnnotations,
+      desugarSets,
+      enableTripleShift,
+      errorOnUnevaluatedConstant,
+      typeEnvironment,
+      errorReporter,
+      evaluationMode);
+  constantsTransformer.visitProcedure(procedure);
+}
+
 enum EvaluationMode {
   weak,
   agnostic,
@@ -292,8 +325,6 @@
   final TypeEnvironment typeEnvironment;
   StaticTypeContext _staticTypeContext;
 
-  /// Whether to preserve constant [Field]s.  All use-sites will be rewritten.
-  final bool keepFields;
   final bool evaluateAnnotations;
   final bool desugarSets;
   final bool enableTripleShift;
@@ -302,7 +333,6 @@
   ConstantsTransformer(
       this.backend,
       Map<String, String> environmentDefines,
-      this.keepFields,
       this.evaluateAnnotations,
       this.desugarSets,
       this.enableTripleShift,
@@ -317,6 +347,13 @@
             errorOnUnevaluatedConstant: errorOnUnevaluatedConstant,
             evaluationMode: evaluationMode);
 
+  /// Whether to preserve constant [Field]s. All use-sites will be rewritten.
+  bool get keepFields => backend.keepFields;
+
+  /// Whether to preserve constant [VariableDeclaration]s. All use-sites will be
+  /// rewritten.
+  bool get keepLocals => backend.keepLocals;
+
   // Transform the library/class members:
 
   void convertLibrary(Library library) {
@@ -489,7 +526,7 @@
           ..parent = node;
 
         // If this constant is inlined, remove it.
-        if (shouldInline(node.initializer)) {
+        if (!keepLocals && shouldInline(node.initializer)) {
           if (constant is! UnevaluatedConstant) {
             // If the constant is unevaluated we need to keep the expression,
             // so that, in the case the constant contains error but the local
@@ -2203,6 +2240,18 @@
   }
 
   @override
+  Constant visitNullCheck(NullCheck node) {
+    final Constant constant = _evaluateSubexpression(node.operand);
+    if (constant is NullConstant) {
+      return report(node, messageConstEvalNonNull);
+    }
+    if (shouldBeUnevaluated) {
+      return unevaluated(node, new NullCheck(extract(constant)));
+    }
+    return constant;
+  }
+
+  @override
   Constant visitSymbolLiteral(SymbolLiteral node) {
     final Reference libraryReference =
         node.value.startsWith('_') ? libraryOf(node).reference : null;
@@ -2253,6 +2302,14 @@
       if (a.value.isNaN && b.value.isNaN) return falseConstant;
       if (a.value == 0.0 && b.value == 0.0) return trueConstant;
     }
+
+    if (a is DoubleConstant && b is IntConstant) {
+      return makeBoolConstant(a.value == b.value);
+    }
+
+    if (a is IntConstant && b is DoubleConstant) {
+      return makeBoolConstant(a.value == b.value);
+    }
     return null;
   }
 
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 1e8e21e..bf4ca5e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -6,6 +6,7 @@
 
 import 'package:_fe_analyzer_shared/src/util/link.dart';
 import 'package:kernel/ast.dart';
+import 'package:kernel/src/legacy_erasure.dart';
 import 'package:kernel/type_algebra.dart' show Substitution;
 import 'package:kernel/type_environment.dart';
 
@@ -432,14 +433,12 @@
     inferrer.inferConstructorParameterTypes(node.target);
     bool hasExplicitTypeArguments =
         getExplicitTypeArguments(node.arguments) != null;
-    InvocationInferenceResult result = inferrer.inferInvocation(
-        typeContext,
-        node.fileOffset,
+    FunctionType functionType = replaceReturnType(
         node.target.function
             .computeThisFunctionType(inferrer.library.nonNullable),
-        node.arguments,
-        returnType:
-            computeConstructorReturnType(node.target, inferrer.coreTypes),
+        computeConstructorReturnType(node.target, inferrer.coreTypes));
+    InvocationInferenceResult result = inferrer.inferInvocation(
+        typeContext, node.fileOffset, functionType, node.arguments,
         isConst: node.isConst);
     if (!inferrer.isTopLevel) {
       SourceLibraryBuilder library = inferrer.library;
@@ -599,11 +598,6 @@
         ..fileOffset = node.readOffset;
     }
 
-    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
-        node.binaryOffset, read, readType, node.binaryName, node.rhs);
-    Expression binary = binaryResult.expression;
-    DartType binaryType = binaryResult.inferredType;
-
     ObjectAccessTarget writeTarget = node.setter == null
         ? const ObjectAccessTarget.missing()
         : new ExtensionAccessTarget(
@@ -611,6 +605,17 @@
 
     DartType valueType = inferrer.getSetterType(writeTarget, receiverType);
 
+    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
+        node.binaryOffset,
+        valueType,
+        read,
+        readType,
+        node.binaryName,
+        node.rhs);
+
+    Expression binary = binaryResult.expression;
+    DartType binaryType = binaryResult.inferredType;
+
     Expression value = inferrer.ensureAssignable(valueType, binaryType, binary,
         isVoidAllowed: true);
 
@@ -714,14 +719,14 @@
       FactoryConstructorInvocationJudgment node, DartType typeContext) {
     bool hadExplicitTypeArguments =
         getExplicitTypeArguments(node.arguments) != null;
-    InvocationInferenceResult result = inferrer.inferInvocation(
-        typeContext,
-        node.fileOffset,
+
+    FunctionType functionType = replaceReturnType(
         node.target.function
             .computeThisFunctionType(inferrer.library.nonNullable),
-        node.arguments,
-        returnType:
-            computeConstructorReturnType(node.target, inferrer.coreTypes),
+        computeConstructorReturnType(node.target, inferrer.coreTypes));
+
+    InvocationInferenceResult result = inferrer.inferInvocation(
+        typeContext, node.fileOffset, functionType, node.arguments,
         isConst: node.isConst);
     node.hasBeenInferred = true;
     Expression resultNode = node;
@@ -750,9 +755,10 @@
     FunctionType calleeType = node.target.function
         .computeAliasedConstructorFunctionType(
             typedef, inferrer.library.library);
+    calleeType = replaceReturnType(calleeType, calleeType.returnType.unalias);
     InvocationInferenceResult result = inferrer.inferInvocation(
         typeContext, node.fileOffset, calleeType, node.arguments,
-        returnType: calleeType.returnType.unalias, isConst: node.isConst);
+        isConst: node.isConst);
     node.hasBeenInferred = true;
     Expression resultNode = node;
     if (!inferrer.isTopLevel) {
@@ -777,9 +783,10 @@
     Typedef typedef = node.typeAliasBuilder.typedef;
     FunctionType calleeType = node.target.function
         .computeAliasedFactoryFunctionType(typedef, inferrer.library.library);
+    calleeType = replaceReturnType(calleeType, calleeType.returnType.unalias);
     InvocationInferenceResult result = inferrer.inferInvocation(
         typeContext, node.fileOffset, calleeType, node.arguments,
-        returnType: calleeType.returnType.unalias, isConst: node.isConst);
+        isConst: node.isConst);
     node.hasBeenInferred = true;
     Expression resultNode = node;
     if (!inferrer.isTopLevel) {
@@ -1126,14 +1133,13 @@
     Substitution substitution = Substitution.fromSupertype(
         inferrer.classHierarchy.getClassAsInstanceOf(
             inferrer.thisType.classNode, node.target.enclosingClass));
-    inferrer.inferInvocation(
-        null,
-        node.fileOffset,
+    FunctionType functionType = replaceReturnType(
         substitution.substituteType(node.target.function
             .computeThisFunctionType(inferrer.library.nonNullable)
             .withoutTypeParameters),
-        node.argumentsJudgment,
-        returnType: inferrer.thisType,
+        inferrer.thisType);
+    inferrer.inferInvocation(
+        null, node.fileOffset, functionType, node.argumentsJudgment,
         skipTypeArgumentInference: true);
   }
 
@@ -1321,21 +1327,27 @@
   }
 
   DartType getSpreadElementType(DartType spreadType, bool isNullAware) {
-    if (spreadType is InterfaceType) {
-      if (spreadType.classNode == inferrer.coreTypes.nullClass) {
-        if (inferrer.isNonNullableByDefault) {
-          return isNullAware ? const NeverType(Nullability.nonNullable) : null;
-        } else {
-          return isNullAware ? spreadType : null;
-        }
+    DartType typeBound = inferrer.resolveTypeParameter(spreadType);
+    if (inferrer.coreTypes.isNull(typeBound)) {
+      if (inferrer.isNonNullableByDefault) {
+        return isNullAware ? const NeverType(Nullability.nonNullable) : null;
+      } else {
+        return isNullAware ? inferrer.coreTypes.nullType : null;
       }
+    }
+    if (typeBound is InterfaceType) {
       List<DartType> supertypeArguments = inferrer.typeSchemaEnvironment
           .getTypeArgumentsAsInstanceOf(
-              spreadType, inferrer.coreTypes.iterableClass);
-      if (supertypeArguments == null) return null;
+              typeBound, inferrer.coreTypes.iterableClass);
+      if (supertypeArguments == null) {
+        return null;
+      }
       return supertypeArguments.single;
+    } else if (spreadType is DynamicType) {
+      return const DynamicType();
+    } else if (inferrer.coreTypes.isBottom(spreadType)) {
+      return const NeverType(Nullability.nonNullable);
     }
-    if (spreadType is DynamicType) return const DynamicType();
     return null;
   }
 
@@ -1367,11 +1379,12 @@
         DartType spreadElementType =
             getSpreadElementType(spreadType, element.isNullAware);
         if (spreadElementType == null) {
-          if (spreadType is InterfaceType &&
-              spreadType.classNode == inferrer.coreTypes.nullClass &&
+          if (inferrer.coreTypes
+                  .isNull(inferrer.resolveTypeParameter(spreadType)) &&
               !element.isNullAware) {
             replacement = inferrer.helper.buildProblem(
-                messageNonNullAwareSpreadIsNull,
+                templateNonNullAwareSpreadIsNull.withArguments(
+                    spreadType, inferrer.isNonNullableByDefault),
                 element.expression.fileOffset,
                 1);
           } else {
@@ -1727,28 +1740,28 @@
   // is a function type, the original values in output are preserved.
   void storeSpreadMapEntryElementTypes(DartType spreadMapEntryType,
       bool isNullAware, List<DartType> output, int offset) {
-    if (spreadMapEntryType is InterfaceType) {
-      if (spreadMapEntryType.classNode == inferrer.coreTypes.nullClass) {
-        if (isNullAware) {
-          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
-            .getTypeArgumentsAsInstanceOf(
-                spreadMapEntryType, inferrer.coreTypes.mapClass);
-        if (supertypeArguments != null) {
-          output[offset] = supertypeArguments[0];
-          output[offset + 1] = supertypeArguments[1];
+    DartType typeBound = inferrer.resolveTypeParameter(spreadMapEntryType);
+    if (inferrer.coreTypes.isNull(typeBound)) {
+      if (isNullAware) {
+        if (inferrer.isNonNullableByDefault) {
+          output[offset] =
+              output[offset + 1] = const NeverType(Nullability.nonNullable);
+        } else {
+          output[offset] = output[offset + 1] = inferrer.coreTypes.nullType;
         }
       }
-    }
-    if (spreadMapEntryType is DynamicType) {
+    } else if (typeBound is InterfaceType) {
+      List<DartType> supertypeArguments = inferrer.typeSchemaEnvironment
+          .getTypeArgumentsAsInstanceOf(typeBound, inferrer.coreTypes.mapClass);
+      if (supertypeArguments != null) {
+        output[offset] = supertypeArguments[0];
+        output[offset + 1] = supertypeArguments[1];
+      }
+    } else if (spreadMapEntryType is DynamicType) {
       output[offset] = output[offset + 1] = const DynamicType();
+    } else if (inferrer.coreTypes.isBottom(spreadMapEntryType)) {
+      output[offset] =
+          output[offset + 1] = const NeverType(Nullability.nonNullable);
     }
   }
 
@@ -1793,12 +1806,15 @@
       MapEntry replacement = entry;
       if (typeChecksNeeded) {
         if (actualKeyType == null) {
-          if (spreadType is InterfaceType &&
-              spreadType.classNode == inferrer.coreTypes.nullClass &&
+          if (inferrer.coreTypes
+                  .isNull(inferrer.resolveTypeParameter(spreadType)) &&
               !entry.isNullAware) {
             replacement = new MapEntry(
-                inferrer.helper.buildProblem(messageNonNullAwareSpreadIsNull,
-                    entry.expression.fileOffset, 1),
+                inferrer.helper.buildProblem(
+                    templateNonNullAwareSpreadIsNull.withArguments(
+                        spreadType, inferrer.isNonNullableByDefault),
+                    entry.expression.fileOffset,
+                    1),
                 new NullLiteral())
               ..fileOffset = entry.fileOffset;
           } else if (actualElementType != null) {
@@ -2611,14 +2627,20 @@
     Expression read = readResult.expression;
     DartType readType = readResult.inferredType;
 
-    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
-        node.binaryOffset, read, readType, node.binaryName, node.rhs);
-    DartType binaryType = binaryResult.inferredType;
-
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         receiverType, node.propertyName, node.writeOffset,
         setter: true, instrumented: true, includeExtensionMethods: true);
     DartType writeType = inferrer.getSetterType(writeTarget, receiverType);
+
+    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
+        node.binaryOffset,
+        writeType,
+        read,
+        readType,
+        node.binaryName,
+        node.rhs);
+    DartType binaryType = binaryResult.inferredType;
+
     Expression binary =
         inferrer.ensureAssignableResult(writeType, binaryResult);
 
@@ -3549,8 +3571,13 @@
   /// [fileOffset] is used as the file offset for created nodes. [leftType] is
   /// the already inferred type of the [left] expression. The inferred type of
   /// [right] is computed by this method.
-  ExpressionInferenceResult _computeBinaryExpression(int fileOffset,
-      Expression left, DartType leftType, Name binaryName, Expression right) {
+  ExpressionInferenceResult _computeBinaryExpression(
+      int fileOffset,
+      DartType contextType,
+      Expression left,
+      DartType leftType,
+      Name binaryName,
+      Expression right) {
     assert(binaryName != equalsName);
 
     ObjectAccessTarget binaryTarget = inferrer.findInterfaceMember(
@@ -3565,13 +3592,21 @@
     DartType rightType =
         inferrer.getPositionalParameterTypeForTarget(binaryTarget, leftType, 0);
 
-    bool isOverloadedArithmeticOperatorAndType =
-        inferrer.isOverloadedArithmeticOperatorAndType(binaryTarget, leftType);
+    bool isSpecialCasedBinaryOperator = inferrer
+        .isSpecialCasedBinaryOperatorForReceiverType(binaryTarget, leftType);
 
-    bool typeNeeded =
-        !inferrer.isTopLevel || isOverloadedArithmeticOperatorAndType;
-    ExpressionInferenceResult rightResult = inferrer
-        .inferExpression(right, rightType, typeNeeded, isVoidAllowed: true);
+    bool typeNeeded = !inferrer.isTopLevel || isSpecialCasedBinaryOperator;
+
+    DartType rightContextType = rightType;
+    if (isSpecialCasedBinaryOperator) {
+      rightContextType = inferrer.typeSchemaEnvironment
+          .getContextTypeOfSpecialCasedBinaryOperator(
+              contextType, leftType, rightType,
+              isNonNullableByDefault: inferrer.isNonNullableByDefault);
+    }
+    ExpressionInferenceResult rightResult = inferrer.inferExpression(
+        right, rightContextType, typeNeeded,
+        isVoidAllowed: true);
     if (rightResult.inferredType == null) {
       assert(!typeNeeded,
           "Missing right type for overloaded arithmetic operator.");
@@ -3583,9 +3618,11 @@
 
     right = inferrer.ensureAssignableResult(rightType, rightResult);
 
-    if (isOverloadedArithmeticOperatorAndType) {
+    if (isSpecialCasedBinaryOperator) {
       binaryType = inferrer.typeSchemaEnvironment
-          .getTypeOfOverloadedArithmetic(leftType, rightResult.inferredType);
+          .getTypeOfSpecialCasedBinaryOperator(
+              leftType, rightResult.inferredType,
+              isNonNullableByDefault: inferrer.isNonNullableByDefault);
     }
 
     Expression binary;
@@ -3655,6 +3692,11 @@
         }
         break;
     }
+
+    if (!inferrer.isNonNullableByDefault) {
+      binaryType = legacyErasure(inferrer.coreTypes, binaryType);
+    }
+
     if (!inferrer.isTopLevel && binaryTarget.isNullable) {
       return new ExpressionInferenceResult(
           binaryType,
@@ -3747,6 +3789,11 @@
         }
         break;
     }
+
+    if (!inferrer.isNonNullableByDefault) {
+      unaryType = legacyErasure(inferrer.coreTypes, unaryType);
+    }
+
     if (!inferrer.isTopLevel && unaryTarget.isNullable) {
       // TODO(johnniwinther): Special case 'unary-' in messages. It should
       // probably be referred to as "Unary operator '-' ...".
@@ -3830,6 +3877,11 @@
         }
         break;
     }
+
+    if (!inferrer.isNonNullableByDefault) {
+      readType = legacyErasure(inferrer.coreTypes, readType);
+    }
+
     if (!inferrer.isTopLevel && readTarget.isNullable) {
       return new ExpressionInferenceResult(
           readType,
@@ -4023,6 +4075,11 @@
         }
         break;
     }
+
+    if (!inferrer.isNonNullableByDefault) {
+      readType = legacyErasure(inferrer.coreTypes, readType);
+    }
+
     readResult ??= new ExpressionInferenceResult(readType, read);
     if (!inferrer.isTopLevel && readTarget.isNullable) {
       readResult = inferrer.wrapExpressionInferenceResultInProblem(
@@ -4181,23 +4238,30 @@
       left = read;
     }
 
-    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
-        node.binaryOffset, left, readType, node.binaryName, node.rhs);
-    Expression binary = binaryResult.expression;
-    DartType binaryType = binaryResult.inferredType;
-
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         receiverType, indexSetName, node.writeOffset,
         includeExtensionMethods: true);
 
     DartType writeIndexType =
         inferrer.getIndexKeyType(writeTarget, receiverType);
+
+    DartType valueType =
+        inferrer.getIndexSetValueType(writeTarget, receiverType);
+
+    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
+        node.binaryOffset,
+        valueType,
+        left,
+        readType,
+        node.binaryName,
+        node.rhs);
+    Expression binary = binaryResult.expression;
+    DartType binaryType = binaryResult.inferredType;
+
     Expression writeIndex = createVariableGet(indexVariable);
     writeIndex = inferrer.ensureAssignable(
         writeIndexType, indexResult.inferredType, writeIndex);
 
-    DartType valueType =
-        inferrer.getIndexSetValueType(writeTarget, receiverType);
     binary = inferrer.ensureAssignable(valueType, binaryType, binary,
         fileOffset: node.fileOffset);
 
@@ -4321,17 +4385,23 @@
       left = read;
     }
 
-    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
-        node.binaryOffset, left, readType, node.binaryName, node.rhs);
-    Expression binary = binaryResult.expression;
-    DartType binaryType = binaryResult.inferredType;
-
     ObjectAccessTarget writeTarget = inferrer.findInterfaceMember(
         nonNullReceiverType, node.propertyName, node.writeOffset,
         setter: true, includeExtensionMethods: true);
 
     DartType valueType =
         inferrer.getSetterType(writeTarget, nonNullReceiverType);
+
+    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
+        node.binaryOffset,
+        valueType,
+        left,
+        readType,
+        node.binaryName,
+        node.rhs);
+    Expression binary = binaryResult.expression;
+    DartType binaryType = binaryResult.inferredType;
+
     binary = inferrer.ensureAssignable(valueType, binaryType, binary,
         fileOffset: node.fileOffset);
 
@@ -4456,12 +4526,6 @@
     } else {
       left = read;
     }
-
-    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
-        node.binaryOffset, left, readType, node.binaryName, node.rhs);
-    Expression binary = binaryResult.expression;
-    DartType binaryType = binaryResult.inferredType;
-
     ObjectAccessTarget writeTarget = node.setter != null
         ? new ObjectAccessTarget.interfaceMember(node.setter,
             isPotentiallyNullable: false)
@@ -4469,12 +4533,24 @@
 
     DartType writeIndexType =
         inferrer.getIndexKeyType(writeTarget, inferrer.thisType);
+
+    DartType valueType =
+        inferrer.getIndexSetValueType(writeTarget, inferrer.thisType);
+
+    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
+        node.binaryOffset,
+        valueType,
+        left,
+        readType,
+        node.binaryName,
+        node.rhs);
+    Expression binary = binaryResult.expression;
+    DartType binaryType = binaryResult.inferredType;
+
     Expression writeIndex = createVariableGet(indexVariable);
     writeIndex = inferrer.ensureAssignable(
         writeIndexType, indexResult.inferredType, writeIndex);
 
-    DartType valueType =
-        inferrer.getIndexSetValueType(writeTarget, inferrer.thisType);
     Expression binaryReplacement = inferrer.ensureAssignable(
         valueType, binaryType, binary,
         fileOffset: node.fileOffset);
@@ -4622,11 +4698,6 @@
       left = read;
     }
 
-    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
-        node.binaryOffset, left, readType, node.binaryName, node.rhs);
-    Expression binary = binaryResult.expression;
-    DartType binaryType = binaryResult.inferredType;
-
     ObjectAccessTarget writeTarget = node.setter != null
         ? new ExtensionAccessTarget(
             node.setter, null, ProcedureKind.Operator, extensionTypeArguments)
@@ -4634,12 +4705,24 @@
 
     DartType writeIndexType =
         inferrer.getIndexKeyType(writeTarget, receiverType);
-    Expression writeIndex = createVariableGet(indexVariable);
-    writeIndex = inferrer.ensureAssignable(
-        writeIndexType, indexResult.inferredType, writeIndex);
 
     DartType valueType =
         inferrer.getIndexSetValueType(writeTarget, inferrer.thisType);
+
+    ExpressionInferenceResult binaryResult = _computeBinaryExpression(
+        node.binaryOffset,
+        valueType,
+        left,
+        readType,
+        node.binaryName,
+        node.rhs);
+
+    Expression binary = binaryResult.expression;
+    DartType binaryType = binaryResult.inferredType;
+
+    Expression writeIndex = createVariableGet(indexVariable);
+    writeIndex = inferrer.ensureAssignable(
+        writeIndexType, indexResult.inferredType, writeIndex);
     binary = inferrer.ensureAssignable(valueType, binaryType, binary,
         fileOffset: node.fileOffset);
 
@@ -4929,14 +5012,13 @@
           classTypeParameters[i], inferrer.library.library);
     }
     ArgumentsImpl.setNonInferrableArgumentTypes(node.arguments, typeArguments);
-    inferrer.inferInvocation(
-        null,
-        node.fileOffset,
+    FunctionType functionType = replaceReturnType(
         node.target.function
             .computeThisFunctionType(inferrer.library.nonNullable),
-        node.arguments,
-        returnType: inferrer.coreTypes.thisInterfaceType(
-            node.target.enclosingClass, inferrer.library.nonNullable),
+        inferrer.coreTypes.thisInterfaceType(
+            node.target.enclosingClass, inferrer.library.nonNullable));
+    inferrer.inferInvocation(
+        null, node.fileOffset, functionType, node.arguments,
         skipTypeArgumentInference: true);
     ArgumentsImpl.removeNonInferrableArgumentTypes(node.arguments);
   }
@@ -5080,6 +5162,11 @@
     Member target = node.target;
     TypeInferenceEngine.resolveInferenceNode(target);
     DartType type = target.getterType;
+
+    if (!inferrer.isNonNullableByDefault) {
+      type = legacyErasure(inferrer.coreTypes, type);
+    }
+
     if (target is Procedure && target.kind == ProcedureKind.Method) {
       return inferrer.instantiateTearOff(type, typeContext, node);
     } else {
@@ -5136,14 +5223,13 @@
     Substitution substitution = Substitution.fromSupertype(
         inferrer.classHierarchy.getClassAsInstanceOf(
             inferrer.thisType.classNode, node.target.enclosingClass));
-    inferrer.inferInvocation(
-        null,
-        node.fileOffset,
+    FunctionType functionType = replaceReturnType(
         substitution.substituteType(node.target.function
             .computeThisFunctionType(inferrer.library.nonNullable)
             .withoutTypeParameters),
-        node.arguments,
-        returnType: inferrer.thisType,
+        inferrer.thisType);
+    inferrer.inferInvocation(
+        null, node.fileOffset, functionType, node.arguments,
         skipTypeArgumentInference: true);
   }
 
@@ -5422,12 +5508,17 @@
       isDefinitelyAssigned = inferrer.flowAnalysis.isAssigned(variable);
     }
     DartType declaredOrInferredType = variable.lateType ?? variable.type;
-    DartType writeContext = declaredOrInferredType;
-    ExpressionInferenceResult rhsResult = inferrer.inferExpression(
-        node.value, writeContext ?? const UnknownType(), true,
+    DartType promotedType;
+    if (inferrer.isNonNullableByDefault) {
+      promotedType = inferrer.flowAnalysis.promotedType(variable);
+    }
+    ExpressionInferenceResult rhsResult = inferrer.inferExpression(node.value,
+        promotedType ?? declaredOrInferredType ?? const UnknownType(), true,
         isVoidAllowed: true);
-    Expression rhs = inferrer.ensureAssignableResult(writeContext, rhsResult,
-        fileOffset: node.fileOffset, isVoidAllowed: writeContext is VoidType);
+    Expression rhs = inferrer.ensureAssignableResult(
+        declaredOrInferredType, rhsResult,
+        fileOffset: node.fileOffset,
+        isVoidAllowed: declaredOrInferredType is VoidType);
     inferrer.flowAnalysis.write(variable, rhsResult.inferredType);
     DartType resultType = rhsResult.inferredType;
     Expression resultExpression;
@@ -5806,8 +5897,13 @@
       BinaryExpression node, DartType typeContext) {
     ExpressionInferenceResult leftResult =
         inferrer.inferExpression(node.left, const UnknownType(), true);
-    return _computeBinaryExpression(node.fileOffset, leftResult.expression,
-        leftResult.inferredType, node.binaryName, node.right);
+    return _computeBinaryExpression(
+        node.fileOffset,
+        typeContext,
+        leftResult.expression,
+        leftResult.inferredType,
+        node.binaryName,
+        node.right);
   }
 
   ExpressionInferenceResult visitUnary(
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 76b40ba..68d00f9 100644
--- a/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
@@ -3555,6 +3555,16 @@
   String toString() {
     return "BinaryExpression(${toStringInternal()})";
   }
+
+  @override
+  int get precedence => Precedence.binaryPrecedence[binaryName.name];
+
+  @override
+  void toTextInternal(AstPrinter printer) {
+    printer.writeExpression(left, minimumPrecedence: precedence);
+    printer.write(' ${binaryName.name} ');
+    printer.writeExpression(right, minimumPrecedence: precedence);
+  }
 }
 
 /// Internal expression for a unary expression.
@@ -3589,9 +3599,22 @@
   }
 
   @override
+  int get precedence => Precedence.PREFIX;
+
+  @override
   String toString() {
     return "UnaryExpression(${toStringInternal()})";
   }
+
+  @override
+  void toTextInternal(AstPrinter printer) {
+    if (unaryName == unaryMinusName) {
+      printer.write('-');
+    } else {
+      printer.write('${unaryName.name}');
+    }
+    printer.writeExpression(expression, minimumPrecedence: precedence);
+  }
 }
 
 /// Internal expression for a parenthesized expression.
@@ -3625,9 +3648,19 @@
   }
 
   @override
+  int get precedence => Precedence.CALLEE;
+
+  @override
   String toString() {
     return "ParenthesizedExpression(${toStringInternal()})";
   }
+
+  @override
+  void toTextInternal(AstPrinter printer) {
+    printer.write('(');
+    printer.writeExpression(expression);
+    printer.write(')');
+  }
 }
 
 /// Creates a [Let] of [variable] with the given [body] using
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index d3e1c96..2940119 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -55,6 +55,8 @@
 import 'package:kernel/type_environment.dart' show TypeEnvironment;
 import 'package:kernel/verifier.dart' show verifyGetStaticType;
 
+import 'package:kernel/transformations/value_class.dart' as valueClass;
+
 import 'package:package_config/package_config.dart';
 
 import '../../api_prototype/file_system.dart' show FileSystem;
@@ -97,7 +99,6 @@
         messageConstConstructorNonFinalField,
         messageConstConstructorNonFinalFieldCause,
         messageConstConstructorRedirectionToNonConst,
-        messageStrongModeNNBDButOptOut,
         noLength,
         templateFieldNonNullableNotInitializedByConstructorError,
         templateFieldNonNullableWithoutInitializerError,
@@ -122,7 +123,7 @@
 import '../uri_translator.dart' show UriTranslator;
 
 import 'constant_evaluator.dart' as constants
-    show EvaluationMode, transformLibraries;
+    show EvaluationMode, transformLibraries, transformProcedure;
 
 import 'kernel_constants.dart' show KernelConstantErrorReporter;
 
@@ -255,7 +256,7 @@
         if (loader.nnbdMode == NnbdMode.Strong ||
             loader.nnbdMode == NnbdMode.Agnostic) {
           if (!builder.isNonNullableByDefault) {
-            loader.addProblem(messageStrongModeNNBDButOptOut, -1, 1, fileUri);
+            loader.registerStrongOptOutLibrary(builder);
           }
         }
         return builder;
@@ -770,9 +771,9 @@
     List<FieldBuilder> lateFinalFields = <FieldBuilder>[];
 
     builder.forEachDeclaredField((String name, FieldBuilder fieldBuilder) {
-      if (fieldBuilder.isExternal) {
-        // Skip external fields. These are external getters/setters and have
-        // no initialization.
+      if (fieldBuilder.isAbstract || fieldBuilder.isExternal) {
+        // Skip abstract and external fields. These are abstract/external
+        // getters/setters and have no initialization.
         return;
       }
       if (fieldBuilder.isDeclarationInstanceMember && !fieldBuilder.isFinal) {
@@ -871,27 +872,6 @@
           constructor.function.body.parent = constructor.function;
         }
 
-        Set<Field> myInitializedFields = new Set<Field>();
-        for (Initializer initializer in constructor.initializers) {
-          if (initializer is FieldInitializer) {
-            myInitializedFields.add(initializer.field);
-          }
-        }
-        for (VariableDeclaration formal
-            in constructor.function.positionalParameters) {
-          if (formal.isFieldFormal) {
-            Builder fieldBuilder =
-                builder.scope.lookupLocalMember(formal.name, setter: false) ??
-                    builder.origin.scope
-                        .lookupLocalMember(formal.name, setter: false);
-            // If next is not null it's a duplicated field,
-            // and it doesn't need to be initialized to null below
-            // (and doing it will crash serialization).
-            if (fieldBuilder?.next == null && fieldBuilder is FieldBuilder) {
-              myInitializedFields.add(fieldBuilder.field);
-            }
-          }
-        }
         if (constructor.isConst && nonFinalFields.isNotEmpty) {
           builder.addProblem(messageConstConstructorNonFinalField,
               constructor.fileOffset, noLength,
@@ -1092,6 +1072,67 @@
 
     TypeEnvironment environment =
         new TypeEnvironment(loader.coreTypes, loader.hierarchy);
+    constants.EvaluationMode evaluationMode = _getConstantEvaluationMode();
+
+    constants.transformLibraries(
+        loader.libraries,
+        backendTarget.constantsBackend(loader.coreTypes),
+        environmentDefines,
+        environment,
+        new KernelConstantErrorReporter(loader),
+        evaluationMode,
+        evaluateAnnotations: true,
+        desugarSets: !backendTarget.supportsSetLiterals,
+        enableTripleShift:
+            isExperimentEnabledGlobally(ExperimentalFlag.tripleShift),
+        errorOnUnevaluatedConstant: errorOnUnevaluatedConstant);
+    ticker.logMs("Evaluated constants");
+
+    if (loader.target.context.options
+        .isExperimentEnabledGlobally(ExperimentalFlag.valueClass)) {
+      valueClass.transformComponent(component);
+      ticker.logMs("Lowered value classes");
+    }
+
+    backendTarget.performModularTransformationsOnLibraries(
+        component,
+        loader.coreTypes,
+        loader.hierarchy,
+        loader.libraries,
+        environmentDefines,
+        new KernelDiagnosticReporter(loader),
+        loader.referenceFromIndex,
+        logger: (String msg) => ticker.logMs(msg),
+        changedStructureNotifier: changedStructureNotifier);
+  }
+
+  ChangedStructureNotifier get changedStructureNotifier => null;
+
+  void runProcedureTransformations(Procedure procedure) {
+    TypeEnvironment environment =
+        new TypeEnvironment(loader.coreTypes, loader.hierarchy);
+    constants.EvaluationMode evaluationMode = _getConstantEvaluationMode();
+
+    constants.transformProcedure(
+        procedure,
+        backendTarget.constantsBackend(loader.coreTypes),
+        environmentDefines,
+        environment,
+        new KernelConstantErrorReporter(loader),
+        evaluationMode,
+        evaluateAnnotations: true,
+        desugarSets: !backendTarget.supportsSetLiterals,
+        enableTripleShift:
+            isExperimentEnabledGlobally(ExperimentalFlag.tripleShift),
+        errorOnUnevaluatedConstant: errorOnUnevaluatedConstant);
+    ticker.logMs("Evaluated constants");
+
+    backendTarget.performTransformationsOnProcedure(
+        loader.coreTypes, loader.hierarchy, procedure,
+        logger: (String msg) => ticker.logMs(msg));
+  }
+
+  constants.EvaluationMode _getConstantEvaluationMode() {
     constants.EvaluationMode evaluationMode;
     // If nnbd is not enabled we will use weak evaluation mode. This is needed
     // because the SDK might be agnostic and therefore needs to be weakened
@@ -1112,38 +1153,7 @@
         evaluationMode = constants.EvaluationMode.agnostic;
         break;
     }
-
-    constants.transformLibraries(
-        loader.libraries,
-        backendTarget.constantsBackend(loader.coreTypes),
-        environmentDefines,
-        environment,
-        new KernelConstantErrorReporter(loader),
-        evaluationMode,
-        desugarSets: !backendTarget.supportsSetLiterals,
-        enableTripleShift:
-            isExperimentEnabledGlobally(ExperimentalFlag.tripleShift),
-        errorOnUnevaluatedConstant: errorOnUnevaluatedConstant);
-    ticker.logMs("Evaluated constants");
-
-    backendTarget.performModularTransformationsOnLibraries(
-        component,
-        loader.coreTypes,
-        loader.hierarchy,
-        loader.libraries,
-        environmentDefines,
-        new KernelDiagnosticReporter(loader),
-        loader.referenceFromIndex,
-        logger: (String msg) => ticker.logMs(msg),
-        changedStructureNotifier: changedStructureNotifier);
-  }
-
-  ChangedStructureNotifier get changedStructureNotifier => null;
-
-  void runProcedureTransformations(Procedure procedure) {
-    backendTarget.performTransformationsOnProcedure(
-        loader.coreTypes, loader.hierarchy, procedure,
-        logger: (String msg) => ticker.logMs(msg));
+    return evaluationMode;
   }
 
   void verify() {
diff --git a/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart b/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
index d6682d4..e7f565a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
@@ -154,9 +154,8 @@
   }
 
   void visitNeverType(NeverType node) {
-    // TODO(askesc): Consider throwing internal error if NeverType appears in
-    //  diagnostics.
     result.add("Never");
+    addNullability(node.declaredNullability);
   }
 
   void visitDynamicType(DynamicType node) {
diff --git a/pkg/front_end/lib/src/fasta/modifier.dart b/pkg/front_end/lib/src/fasta/modifier.dart
index 0d6a2b1..c93ef12 100644
--- a/pkg/front_end/lib/src/fasta/modifier.dart
+++ b/pkg/front_end/lib/src/fasta/modifier.dart
@@ -51,7 +51,7 @@
 const int declaresConstConstructorMask = initializingFormalMask << 1;
 
 /// Not a real modifier, and by setting it to zero, it is automatically ignored
-/// by [Modifier.validate] below.
+/// by [Modifier.toMask] below.
 const int varMask = 0;
 
 const Modifier Abstract = const Modifier(ModifierEnum.Abstract, abstractMask);
@@ -90,10 +90,8 @@
 
   toString() => "modifier(${'$kind'.substring('ModifierEnum.'.length)})";
 
-  static int validate(List<Modifier> modifiers, {bool isAbstract: false}) {
-    // TODO(ahe): Rename this method, validation is now taken care of by the
-    // parser.
-    int result = isAbstract ? abstractMask : 0;
+  static int toMask(List<Modifier> modifiers) {
+    int result = 0;
     if (modifiers == null) return result;
     for (Modifier modifier in modifiers) {
       result |= modifier.mask;
@@ -108,4 +106,13 @@
     if (identical('var', lexeme)) return Var.mask;
     return unhandled(lexeme, "Modifier.validateVarFinalOrConst", -1, null);
   }
+
+  /// Returns [modifier] with [abstractMask] added if [isAbstract] and
+  /// [modifiers] doesn't contain [externalMask].
+  static int addAbstractMask(int modifiers, {bool isAbstract: false}) {
+    if (isAbstract && (modifiers & externalMask) == 0) {
+      modifiers |= abstractMask;
+    }
+    return modifiers;
+  }
 }
diff --git a/pkg/front_end/lib/src/fasta/scope.dart b/pkg/front_end/lib/src/fasta/scope.dart
index 67008ef..c222a16 100644
--- a/pkg/front_end/lib/src/fasta/scope.dart
+++ b/pkg/front_end/lib/src/fasta/scope.dart
@@ -680,6 +680,9 @@
   bool get isExternal => false;
 
   @override
+  bool get isAbstract => false;
+
+  @override
   void set parent(Builder value) {
     throw new UnsupportedError('AmbiguousMemberBuilder.parent=');
   }
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
index bf3499e..bc81fc6 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -326,6 +326,7 @@
 
   @override
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
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 37a9535..7fa2286 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -813,9 +813,7 @@
       }
     }
     int modifiers = pop();
-    if (isAbstract) {
-      modifiers |= abstractMask;
-    }
+    modifiers = Modifier.addAbstractMask(modifiers, isAbstract: isAbstract);
     if (nativeMethodName != null) {
       modifiers |= externalMask;
     }
@@ -1059,13 +1057,11 @@
         isAbstract = false;
       }
     }
-    int modifiers = Modifier.validate(pop(), isAbstract: isAbstract);
+    int modifiers = Modifier.toMask(pop());
+    modifiers = Modifier.addAbstractMask(modifiers, isAbstract: isAbstract);
     if (nativeMethodName != null) {
       modifiers |= externalMask;
     }
-    if ((modifiers & externalMask) != 0) {
-      modifiers &= ~abstractMask;
-    }
     bool isConst = (modifiers & constMask) != 0;
     int varFinalOrConstOffset = pop();
     List<MetadataBuilder> metadata = pop();
@@ -1686,12 +1682,18 @@
       Token beginToken,
       Token endToken) {
     debugEvent("endTopLevelFields");
-    if (lateToken != null && !libraryBuilder.isNonNullableByDefault) {
+    if (!libraryBuilder.isNonNullableByDefault) {
       reportNonNullableModifierError(lateToken);
       if (externalToken != null) {
-        externalToken = null;
         handleRecoverableError(
             messageExternalField, externalToken, externalToken);
+        externalToken = null;
+      }
+    } else {
+      if (externalToken != null && lateToken != null) {
+        handleRecoverableError(
+            messageExternalLateField, externalToken, externalToken);
+        externalToken = null;
       }
     }
     List<FieldInfo> fieldInfos = popFieldInfos(count);
@@ -1711,6 +1713,7 @@
 
   @override
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -1720,17 +1723,38 @@
       Token beginToken,
       Token endToken) {
     debugEvent("Fields");
-    if (lateToken != null && !libraryBuilder.isNonNullableByDefault) {
+    if (!libraryBuilder.isNonNullableByDefault) {
       reportNonNullableModifierError(lateToken);
+      if (abstractToken != null) {
+        handleRecoverableError(
+            messageAbstractClassMember, abstractToken, abstractToken);
+        abstractToken = null;
+      }
       if (externalToken != null) {
-        externalToken = null;
         handleRecoverableError(
             messageExternalField, externalToken, externalToken);
+        externalToken = null;
+      }
+    } else {
+      if (staticToken != null && abstractToken != null) {
+        handleRecoverableError(
+            messageAbstractStaticField, abstractToken, abstractToken);
+        abstractToken = null;
+      }
+      if (abstractToken != null && lateToken != null) {
+        handleRecoverableError(
+            messageAbstractLateField, abstractToken, abstractToken);
+        abstractToken = null;
+      } else if (externalToken != null && lateToken != null) {
+        handleRecoverableError(
+            messageExternalLateField, externalToken, externalToken);
+        externalToken = null;
       }
     }
     List<FieldInfo> fieldInfos = popFieldInfos(count);
     TypeBuilder type = pop();
-    int modifiers = (externalToken != null ? externalMask : 0) |
+    int modifiers = (abstractToken != null ? abstractMask : 0) |
+        (externalToken != null ? externalMask : 0) |
         (staticToken != null ? staticMask : 0) |
         (covariantToken != null ? covariantMask : 0) |
         (lateToken != null ? lateMask : 0) |
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 9d489d6..0f9c220 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
@@ -453,15 +453,42 @@
 
   LanguageVersion get languageVersion => _languageVersion;
 
+  void markLanguageVersionFinal() {
+    if (enableNonNullableInLibrary &&
+        (loader.nnbdMode == NnbdMode.Strong ||
+            loader.nnbdMode == NnbdMode.Agnostic)) {
+      // In strong and agnostic mode, the language version is not allowed to
+      // opt a library out of nnbd.
+      if (!isNonNullableByDefault) {
+        if (_languageVersion.isExplicit) {
+          addPostponedProblem(messageStrongModeNNBDButOptOut,
+              _languageVersion.charOffset, _languageVersion.charCount, fileUri);
+        } else {
+          loader.registerStrongOptOutLibrary(this);
+        }
+        _languageVersion = new InvalidLanguageVersion(
+            fileUri,
+            _languageVersion.charOffset,
+            _languageVersion.charCount,
+            _languageVersion.isExplicit,
+            loader.target.currentSdkVersion);
+      }
+    }
+    _languageVersion.isFinal = true;
+  }
+
   @override
   void setLanguageVersion(Version version,
       {int offset: 0, int length: noLength, bool explicit: false}) {
+    assert(!_languageVersion.isFinal);
     if (languageVersion.isExplicit) return;
 
     if (version == null) {
       addPostponedProblem(
           messageLanguageVersionInvalidInDotPackages, offset, length, fileUri);
       if (_languageVersion is ImplicitLanguageVersion) {
+        // If the package set an OK version, but the file set an invalid version
+        // we want to use the package version.
         _languageVersion = new InvalidLanguageVersion(
             fileUri, offset, length, explicit, loader.target.currentSdkVersion);
         library.setLanguageVersion(_languageVersion.version);
@@ -480,6 +507,8 @@
           length,
           fileUri);
       if (_languageVersion is ImplicitLanguageVersion) {
+        // If the package set an OK version, but the file set an invalid version
+        // we want to use the package version.
         _languageVersion = new InvalidLanguageVersion(
             fileUri, offset, length, explicit, loader.target.currentSdkVersion);
         library.setLanguageVersion(_languageVersion.version);
@@ -490,19 +519,6 @@
     _languageVersion =
         new LanguageVersion(version, fileUri, offset, length, explicit);
     library.setLanguageVersion(version);
-
-    if (enableNonNullableInLibrary &&
-        (loader.nnbdMode == NnbdMode.Strong ||
-            loader.nnbdMode == NnbdMode.Agnostic)) {
-      // In strong and agnostic mode, the language version is not allowed to
-      // opt a library out of nnbd.
-      if (!isNonNullableByDefault) {
-        addPostponedProblem(
-            messageStrongModeNNBDButOptOut, offset, length, fileUri);
-        _languageVersion = new InvalidLanguageVersion(
-            fileUri, offset, length, explicit, loader.target.currentSdkVersion);
-      }
-    }
   }
 
   ConstructorReferenceBuilder addConstructorReference(Object name,
@@ -3780,6 +3796,7 @@
   final int charOffset;
   final int charCount;
   final bool isExplicit;
+  bool isFinal = false;
 
   LanguageVersion(this.version, this.fileUri, this.charOffset, this.charCount,
       this.isExplicit);
@@ -3807,6 +3824,7 @@
   final int charCount;
   final bool isExplicit;
   final Version version;
+  bool isFinal = false;
 
   InvalidLanguageVersion(this.fileUri, this.charOffset, this.charCount,
       this.isExplicit, this.version);
@@ -3830,6 +3848,7 @@
 class ImplicitLanguageVersion implements LanguageVersion {
   @override
   final Version version;
+  bool isFinal = false;
 
   ImplicitLanguageVersion(this.version);
 
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 dd1021b..6376960 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -25,6 +25,7 @@
         ScannerResult,
         Token,
         scan;
+import 'package:front_end/src/api_prototype/experimental_flags.dart';
 
 import 'package:kernel/ast.dart'
     show
@@ -53,6 +54,8 @@
 
 import 'package:kernel/reference_from_index.dart' show ReferenceFromIndex;
 
+import 'package:package_config/package_config.dart';
+
 import '../../api_prototype/file_system.dart';
 
 import '../../base/common.dart';
@@ -78,11 +81,8 @@
 
 import '../export.dart' show Export;
 
-import '../import.dart' show Import;
-
 import '../fasta_codes.dart'
     show
-        LocatedMessage,
         Message,
         SummaryTemplate,
         Template,
@@ -90,16 +90,13 @@
         messageObjectImplements,
         messageObjectMixesIn,
         messagePartOrphan,
+        messageStrongModeNNBDButOptOut,
         messageTypedefCause,
         messageTypedefUnaliasedTypeCause,
         noLength,
         templateAmbiguousSupertypes,
         templateCantReadFile,
         templateCyclicClassHierarchy,
-        templateDuplicatedLibraryExport,
-        templateDuplicatedLibraryExportContext,
-        templateDuplicatedLibraryImport,
-        templateDuplicatedLibraryImportContext,
         templateExtendingEnum,
         templateExtendingRestricted,
         templateIllegalMixin,
@@ -107,6 +104,7 @@
         templateIllegalMixinDueToConstructorsCause,
         templateInternalProblemUriMissingScheme,
         templateSourceOutlineSummary,
+        templateStrongModeNNBDPackageOptOut,
         templateUntranslatableUri;
 
 import '../kernel/kernel_builder.dart'
@@ -262,8 +260,10 @@
             enableNonNullable: library.isNonNullableByDefault),
         languageVersionChanged:
             (Scanner scanner, LanguageVersionToken version) {
-      library.setLanguageVersion(new Version(version.major, version.minor),
-          offset: version.offset, length: version.length, explicit: true);
+      if (!suppressLexicalErrors) {
+        library.setLanguageVersion(new Version(version.major, version.minor),
+            offset: version.offset, length: version.length, explicit: true);
+      }
       scanner.configuration = new ScannerConfiguration(
           enableTripleShift: library.enableTripleShiftInLibrary,
           enableExtensionMethods: library.enableExtensionMethodsInLibrary,
@@ -290,6 +290,7 @@
           importUri, library.fileUri, result.lineStarts, source);
     }
     library.issuePostponedProblems();
+    library.markLanguageVersionFinal();
     while (token is ErrorToken) {
       if (!suppressLexicalErrors) {
         ErrorToken error = token;
@@ -323,6 +324,79 @@
     }
   }
 
+  Set<LibraryBuilder> _strongOptOutLibraries;
+
+  void registerStrongOptOutLibrary(LibraryBuilder libraryBuilder) {
+    _strongOptOutLibraries ??= {};
+    _strongOptOutLibraries.add(libraryBuilder);
+  }
+
+  @override
+  Future<Null> buildOutlines() async {
+    await super.buildOutlines();
+
+    if (_strongOptOutLibraries != null) {
+      // We have libraries that are opted out in strong mode "non-explicitly",
+      // that is, either implicitly through the package version or loaded from
+      // .dill as opt out.
+      //
+      // To reduce the verbosity of the error messages we try to reduce the
+      // message to only include the package name once for packages that are
+      // opted out.
+      //
+      // We use the current package config to retrieve the package based
+      // language version to determine whether the package as a whole is opted
+      // out. If so, we only include the package name and not the library uri
+      // in the message. For package libraries with no corresponding package
+      // config we include each library uri in the message. For non-package
+      // libraries with no corresponding package config we generate a message
+      // per library.
+      Map<String, List<LibraryBuilder>> libraryByPackage = {};
+      for (LibraryBuilder libraryBuilder in _strongOptOutLibraries) {
+        Package package =
+            target.uriTranslator.getPackage(libraryBuilder.importUri);
+
+        if (package != null &&
+            package.languageVersion != null &&
+            package.languageVersion is! InvalidLanguageVersion) {
+          Version version = new Version(
+              package.languageVersion.major, package.languageVersion.minor);
+          if (version < enableNonNullableVersion) {
+            (libraryByPackage[package?.name] ??= []).add(libraryBuilder);
+            continue;
+          }
+        }
+        if (libraryBuilder.importUri.scheme == 'package') {
+          (libraryByPackage[null] ??= []).add(libraryBuilder);
+        } else {
+          // Emit a message that doesn't mention running 'pub'.
+          addProblem(messageStrongModeNNBDButOptOut, -1, noLength,
+              libraryBuilder.fileUri);
+        }
+      }
+      if (libraryByPackage.isNotEmpty) {
+        List<String> dependencies = [];
+        libraryByPackage.forEach((String name, List<LibraryBuilder> libraries) {
+          if (name != null) {
+            dependencies.add('package:$name');
+          } else {
+            for (LibraryBuilder libraryBuilder in libraries) {
+              dependencies.add(libraryBuilder.importUri.toString());
+            }
+          }
+        });
+        // Emit a message that suggests to run 'pub' to check for opted in
+        // versions of the packages.
+        addProblem(
+            templateStrongModeNNBDPackageOptOut.withArguments(dependencies),
+            -1,
+            -1,
+            null);
+        _strongOptOutLibraries = null;
+      }
+    }
+  }
+
   List<int> getSource(List<int> bytes) {
     // bytes is 0-terminated. We don't want that included.
     if (bytes is Uint8List) {
@@ -354,7 +428,7 @@
           // Part was included in multiple libraries. Skip it here.
           continue;
         }
-        Token tokens = await tokenize(part);
+        Token tokens = await tokenize(part, suppressLexicalErrors: true);
         if (tokens != null) {
           listener.uri = part.fileUri;
           parser.parseUnit(tokens);
@@ -835,82 +909,7 @@
 
   List<SourceClassBuilder> checkSemantics(ClassBuilder objectClass) {
     checkObjectClassHierarchy(objectClass);
-    List<SourceClassBuilder> classes = handleHierarchyCycles(objectClass);
-
-    // Check imports and exports for duplicate names.
-    // This is rather silly, e.g. it makes importing 'foo' and exporting another
-    // 'foo' ok.
-    builders.forEach((Uri uri, LibraryBuilder library) {
-      if (library is SourceLibraryBuilder && library.loader == this) {
-        // Check exports.
-        if (library.exports.isNotEmpty) {
-          Map<String, List<Export>> nameToExports;
-          bool errorExports = false;
-          for (Export export in library.exports) {
-            String name = export.exported?.name ?? '';
-            if (name != '') {
-              nameToExports ??= new Map<String, List<Export>>();
-              List<Export> exports = nameToExports[name] ??= <Export>[];
-              exports.add(export);
-              if (exports[0].exported != export.exported) errorExports = true;
-            }
-          }
-          if (errorExports) {
-            for (String name in nameToExports.keys) {
-              List<Export> exports = nameToExports[name];
-              if (exports.length < 2) continue;
-              List<LocatedMessage> context = <LocatedMessage>[];
-              for (Export export in exports.skip(1)) {
-                context.add(templateDuplicatedLibraryExportContext
-                    .withArguments(name)
-                    .withLocation(uri, export.charOffset, noLength));
-              }
-              library.addProblem(
-                  templateDuplicatedLibraryExport.withArguments(name),
-                  exports[0].charOffset,
-                  noLength,
-                  uri,
-                  context: context);
-            }
-          }
-        }
-
-        // Check imports.
-        if (library.imports.isNotEmpty) {
-          Map<String, List<Import>> nameToImports;
-          bool errorImports;
-          for (Import import in library.imports) {
-            String name = import.imported?.name ?? '';
-            if (name != '') {
-              nameToImports ??= new Map<String, List<Import>>();
-              List<Import> imports = nameToImports[name] ??= <Import>[];
-              imports.add(import);
-              if (imports[0].imported != import.imported) errorImports = true;
-            }
-          }
-          if (errorImports != null) {
-            for (String name in nameToImports.keys) {
-              List<Import> imports = nameToImports[name];
-              if (imports.length < 2) continue;
-              List<LocatedMessage> context = <LocatedMessage>[];
-              for (Import import in imports.skip(1)) {
-                context.add(templateDuplicatedLibraryImportContext
-                    .withArguments(name)
-                    .withLocation(uri, import.charOffset, noLength));
-              }
-              library.addProblem(
-                  templateDuplicatedLibraryImport.withArguments(name),
-                  imports[0].charOffset,
-                  noLength,
-                  uri,
-                  context: context);
-            }
-          }
-        }
-      }
-    });
-    ticker.logMs("Checked imports and exports for duplicate names");
-    return classes;
+    return handleHierarchyCycles(objectClass);
   }
 
   void buildComponent() {
@@ -1205,12 +1204,6 @@
     }
   }
 
-  Expression instantiateInvocation(Expression receiver, String name,
-      Arguments arguments, int offset, bool isSuper) {
-    return target.backendTarget.instantiateInvocation(
-        coreTypes, receiver, name, arguments, offset, isSuper);
-  }
-
   Expression instantiateNoSuchMethodError(
       Expression receiver, String name, Arguments arguments, int offset,
       {bool isMethod: false,
@@ -1296,6 +1289,8 @@
   factory List() => null;
   factory List.unmodifiable(elements) => null;
   factory List.filled(int length, E fill, {bool growable = false}) => null;
+  factory List.generate(int length, E generator(int index),
+      {bool growable = true}) => null;
   void add(E) {}
   E operator [](int index) => null;
 }
@@ -1303,11 +1298,13 @@
 class _GrowableList<E> {
   factory _GrowableList() => null;
   factory _GrowableList.filled() => null;
+  factory _GrowableList.generate(int length, E generator(int index)) => null;
 }
 
 class _List<E> {
   factory _List() => null;
   factory _List.filled() => null;
+  factory _List.generate(int length, E generator(int index)) => null;
 }
 
 class MapEntry<K, V> {
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 0251f0c..2aad555 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
@@ -106,16 +106,8 @@
 class _SyncClosureContext implements ClosureContext {
   bool get isAsync => false;
 
-  /// The typing expectation for the subexpression of a `return` or `yield`
-  /// statement inside the function.
-  ///
-  /// For non-generator async functions, this will be a "FutureOr" type (since
-  /// it is permissible for such a function to return either a direct value or
-  /// a future).
-  ///
-  /// For generator functions containing a `yield*` statement, the expected type
-  /// for the subexpression of the `yield*` statement is the result of wrapping
-  /// this typing expectation in `Stream` or `Iterator`, as appropriate.
+  /// The typing expectation for the subexpression of a `return` statement
+  /// inside the function.
   final DartType _returnContext;
 
   @override
@@ -195,7 +187,8 @@
           // nor dynamic, and S is void.
           statement.expression = inferrer.helper.wrapInProblem(
               statement.expression,
-              messageVoidExpression,
+              templateInvalidReturn.withArguments(expressionType,
+                  _declaredReturnType, inferrer.isNonNullableByDefault),
               statement.expression.fileOffset,
               noLength)
             ..parent = statement;
@@ -204,7 +197,9 @@
           // S is not assignable to T.
           Expression expression = inferrer.ensureAssignable(
               _returnContext, expressionType, statement.expression,
-              fileOffset: statement.expression.fileOffset, isVoidAllowed: true);
+              fileOffset: statement.expression.fileOffset,
+              isVoidAllowed: true,
+              errorTemplate: templateInvalidReturn);
           statement.expression = expression..parent = statement;
         }
       }
@@ -300,7 +295,15 @@
     assert(_needToInferReturnType);
     assert(hasImplicitReturn != null);
     DartType inferredType;
-    if (_returnStatements.isNotEmpty) {
+    if (inferrer.isNonNullableByDefault) {
+      if (hasImplicitReturn) {
+        // No explicit returns we have an implicit `return null`.
+        inferredType = inferrer.typeSchemaEnvironment.nullType;
+      } else {
+        // No explicit return and the function doesn't complete normally; that
+        // is, it throws.
+        inferredType = new NeverType(inferrer.library.nonNullable);
+      }
       // Use the types seen from the explicit return statements.
       for (int i = 0; i < _returnStatements.length; i++) {
         ReturnStatement statement = _returnStatements[i];
@@ -319,15 +322,32 @@
               inferredType, type, inferrer.library.library);
         }
       }
-    } else if (hasImplicitReturn) {
-      // No explicit returns we have an implicit `return null`.
-      inferredType = inferrer.typeSchemaEnvironment.nullType;
     } else {
-      // No explicit return and the function doesn't complete normally; that is,
-      // it throws.
-      if (inferrer.isNonNullableByDefault) {
-        inferredType = new NeverType(inferrer.library.nonNullable);
+      if (_returnStatements.isNotEmpty) {
+        // Use the types seen from the explicit return statements.
+        for (int i = 0; i < _returnStatements.length; i++) {
+          ReturnStatement statement = _returnStatements[i];
+          DartType type = _returnExpressionTypes[i];
+          // The return expression has to be assignable to the return type
+          // expectation from the downwards inference context.
+          if (statement.expression != null) {
+            if (!inferrer.isAssignable(_returnContext, type)) {
+              type = inferrer.computeGreatestClosure(_returnContext);
+            }
+          }
+          if (inferredType == null) {
+            inferredType = type;
+          } else {
+            inferredType = inferrer.typeSchemaEnvironment.getStandardUpperBound(
+                inferredType, type, inferrer.library.library);
+          }
+        }
+      } else if (hasImplicitReturn) {
+        // No explicit returns we have an implicit `return null`.
+        inferredType = inferrer.typeSchemaEnvironment.nullType;
       } else {
+        // No explicit return and the function doesn't complete normally; that
+        // is, it throws.
         inferredType = inferrer.typeSchemaEnvironment.nullType;
       }
     }
@@ -395,16 +415,11 @@
 class _AsyncClosureContext implements ClosureContext {
   bool get isAsync => true;
 
-  /// The typing expectation for the subexpression of a `return` or `yield`
-  /// statement inside the function.
+  /// The typing expectation for the subexpression of a `return` statement
+  /// inside the function.
   ///
-  /// For non-generator async functions, this will be a "FutureOr" type (since
-  /// it is permissible for such a function to return either a direct value or
-  /// a future).
-  ///
-  /// For generator functions containing a `yield*` statement, the expected type
-  /// for the subexpression of the `yield*` statement is the result of wrapping
-  /// this typing expectation in `Stream` or `Iterator`, as appropriate.
+  /// This will be a "FutureOr" type (since it is permissible for such a
+  /// function to return either a direct value or a future).
   final DartType _returnContext;
 
   @override
@@ -481,7 +496,8 @@
           // flatten(S) is neither void, dynamic, Null.
           statement.expression = inferrer.helper.wrapInProblem(
               new NullLiteral()..fileOffset = statement.fileOffset,
-              messageReturnFromVoidFunction,
+              templateInvalidReturnAsync.withArguments(
+                  expressionType, returnType, inferrer.isNonNullableByDefault),
               statement.expression.fileOffset,
               noLength)
             ..parent = statement;
@@ -492,25 +508,11 @@
           // nor dynamic, and flatten(S) is void.
           statement.expression = inferrer.helper.wrapInProblem(
               new NullLiteral()..fileOffset = statement.fileOffset,
-              messageVoidExpression,
+              templateInvalidReturnAsync.withArguments(
+                  expressionType, returnType, inferrer.isNonNullableByDefault),
               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(
@@ -522,8 +524,11 @@
           statement.expression = inferrer.ensureAssignable(
               futureValueType, expressionType, statement.expression,
               fileOffset: statement.expression.fileOffset,
-              runtimeCheckedType: _returnContext,
-              isVoidAllowed: false)
+              runtimeCheckedType:
+                  inferrer.computeGreatestClosure2(_returnContext),
+              declaredContextType: returnType,
+              isVoidAllowed: false,
+              errorTemplate: templateInvalidReturnAsync)
             ..parent = statement;
         }
       }
@@ -559,7 +564,8 @@
               statement.expression,
               fileOffset: statement.fileOffset,
               isVoidAllowed: true,
-              runtimeCheckedType: _returnContext);
+              runtimeCheckedType:
+                  inferrer.computeGreatestClosure(_returnContext));
           statement.expression = expression..parent = statement;
         }
 
@@ -655,23 +661,20 @@
     assert(_needToInferReturnType);
     assert(hasImplicitReturn != null);
     DartType inferredType;
-    if (_returnStatements.isNotEmpty) {
+
+    if (inferrer.isNonNullableByDefault) {
+      if (hasImplicitReturn) {
+        // No explicit returns we have an implicit `return null`.
+        inferredType = inferrer.typeSchemaEnvironment.nullType;
+      } else {
+        // No explicit return and the function doesn't complete normally; that
+        // is, it throws.
+        inferredType = new NeverType(inferrer.library.nonNullable);
+      }
       // Use the types seen from the explicit return statements.
       for (int i = 0; i < _returnStatements.length; i++) {
-        ReturnStatement statement = _returnStatements[i];
         DartType type = _returnExpressionTypes[i];
 
-        // The return expression has to be assignable to the return type
-        // expectation from the downwards inference context.
-        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.flatten(type);
         if (inferredType == null) {
           inferredType = unwrappedType;
@@ -680,30 +683,60 @@
               inferredType, unwrappedType, inferrer.library.library);
         }
       }
-    } else if (hasImplicitReturn) {
-      // No explicit returns we have an implicit `return null`.
-      inferredType = inferrer.typeSchemaEnvironment.nullType;
-    } else {
-      // No explicit return and the function doesn't complete normally; that is,
-      // it throws.
-      if (inferrer.isNonNullableByDefault) {
-        inferredType = new NeverType(inferrer.library.nonNullable);
-      } else {
-        inferredType = inferrer.typeSchemaEnvironment.nullType;
-      }
-    }
 
-    if (inferrer.isNonNullableByDefault) {
-      if (!inferrer.typeSchemaEnvironment.isSubtypeOf(
-          inferredType, _returnContext, SubtypeCheckMode.withNullabilities)) {
+      // Let `T` be the **actual returned type** of a function literal as
+      // computed above.
+
+      // Let `R` be the greatest closure of the typing context `K` as computed
+      // above. If `R` is `void`, or the function literal is marked `async` and
+      // `R` is `FutureOr<void>`, let `S` be `void`. Otherwise, if `T <: R` then
+      // let `S` be `T`.  Otherwise, let `S` be `R`.
+      DartType returnContext = inferrer.computeGreatestClosure2(_returnContext);
+      if (returnContext is VoidType ||
+          returnContext is FutureOrType &&
+              returnContext.typeArgument is VoidType) {
+        inferredType = const VoidType();
+      } else 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 = returnContext;
       }
       inferredType = inferrer.wrapFutureType(
           inferrer.typeSchemaEnvironment.flatten(inferredType),
           inferrer.library.nonNullable);
     } else {
+      if (_returnStatements.isNotEmpty) {
+        // Use the types seen from the explicit return statements.
+        for (int i = 0; i < _returnStatements.length; i++) {
+          ReturnStatement statement = _returnStatements[i];
+          DartType type = _returnExpressionTypes[i];
+
+          // 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);
+            }
+          }
+          DartType unwrappedType = inferrer.typeSchemaEnvironment.flatten(type);
+          if (inferredType == null) {
+            inferredType = unwrappedType;
+          } else {
+            inferredType = inferrer.typeSchemaEnvironment.getStandardUpperBound(
+                inferredType, unwrappedType, inferrer.library.library);
+          }
+        }
+      } else if (hasImplicitReturn) {
+        // No explicit returns we have an implicit `return null`.
+        inferredType = inferrer.typeSchemaEnvironment.nullType;
+      } else {
+        // No explicit return and the function doesn't complete normally;
+        // that is, it throws.
+        inferredType = inferrer.typeSchemaEnvironment.nullType;
+      }
       inferredType =
           inferrer.wrapFutureType(inferredType, inferrer.library.nonNullable);
 
diff --git a/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart b/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart
index 2f29335..4d04ad4 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart
@@ -2,300 +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.md file.
 
-import 'dart:math' as math;
+import 'package:kernel/ast.dart' show DartType, Library, NeverType, Nullability;
 
-import 'package:front_end/src/fasta/fasta_codes.dart';
-import 'package:kernel/ast.dart'
-    show
-        BottomType,
-        Class,
-        DartType,
-        DynamicType,
-        FunctionType,
-        FutureOrType,
-        InterfaceType,
-        InvalidType,
-        Library,
-        NamedType,
-        NeverType,
-        Nullability,
-        TypeParameter,
-        TypeParameterType,
-        Variance,
-        VoidType;
-
-import 'package:kernel/core_types.dart';
-
-import 'package:kernel/type_algebra.dart';
-
-import 'package:kernel/type_environment.dart';
-
-import 'package:kernel/src/legacy_erasure.dart';
+import 'package:kernel/src/standard_bounds.dart';
 
 import 'type_schema.dart' show UnknownType;
 
 import 'type_schema_elimination.dart';
 
-import '../problems.dart';
-
-abstract class StandardBounds {
-  CoreTypes get coreTypes;
-
-  bool isSubtypeOf(DartType subtype, DartType supertype, SubtypeCheckMode mode);
-
-  bool areMutualSubtypes(DartType s, DartType t, SubtypeCheckMode mode);
-
-  InterfaceType getLegacyLeastUpperBound(
-      InterfaceType type1, InterfaceType type2, Library clientLibrary);
-
-  /// Checks the value of the MORETOP predicate for [s] and [t].
-  ///
-  /// For the definition of MORETOP see the following:
-  /// https://github.com/dart-lang/language/blob/master/resources/type-system/upper-lower-bounds.md#helper-predicates
-  bool moretop(DartType s, DartType t) {
-    assert(coreTypes.isTop(s) || coreTypes.isObject(s));
-    assert(coreTypes.isTop(t) || coreTypes.isObject(t));
-
-    // MORETOP(void, T) = true.
-    if (s is VoidType) return true;
-
-    // MORETOP(S, void) = false.
-    if (t is VoidType) return false;
-
-    // MORETOP(dynamic, T) = true.
-    if (s is DynamicType) return true;
-
-    // MORETOP(S, dynamic) = false.
-    if (t is DynamicType) return false;
-
-    // MORETOP(Object, T) = true.
-    if (s is InterfaceType &&
-        s.classNode == coreTypes.objectClass &&
-        s.declaredNullability == Nullability.nonNullable) {
-      return true;
-    }
-
-    // MORETOP(S, Object) = false.
-    if (t is InterfaceType &&
-        t.classNode == coreTypes.objectClass &&
-        t.declaredNullability == Nullability.nonNullable) {
-      return false;
-    }
-
-    // MORETOP(S*, T*) = MORETOP(S, T).
-    if (s.declaredNullability == Nullability.legacy &&
-        t.declaredNullability == Nullability.legacy) {
-      DartType nonNullableS =
-          s.withDeclaredNullability(Nullability.nonNullable);
-      assert(!identical(s, nonNullableS));
-      DartType nonNullableT =
-          t.withDeclaredNullability(Nullability.nonNullable);
-      assert(!identical(t, nonNullableT));
-      return moretop(nonNullableS, nonNullableT);
-    }
-
-    // MORETOP(S, T*) = true.
-    if (s.declaredNullability == Nullability.nonNullable &&
-        t.declaredNullability == Nullability.legacy) {
-      return true;
-    }
-
-    // MORETOP(S*, T) = false.
-    if (s.declaredNullability == Nullability.legacy &&
-        t.declaredNullability == Nullability.nonNullable) {
-      return false;
-    }
-
-    // MORETOP(S?, T?) == MORETOP(S, T).
-    if (s.declaredNullability == Nullability.nullable &&
-        t.declaredNullability == Nullability.nullable) {
-      DartType nonNullableS =
-          s.withDeclaredNullability(Nullability.nonNullable);
-      assert(!identical(s, nonNullableS));
-      DartType nonNullableT =
-          t.withDeclaredNullability(Nullability.nonNullable);
-      assert(!identical(t, nonNullableT));
-      return moretop(nonNullableS, nonNullableT);
-    }
-
-    // MORETOP(S, T?) = true.
-    if (s.declaredNullability == Nullability.nonNullable &&
-        t.declaredNullability == Nullability.nullable) {
-      return true;
-    }
-
-    // MORETOP(S?, T) = false.
-    if (s.declaredNullability == Nullability.nullable &&
-        t.declaredNullability == Nullability.nonNullable) {
-      return false;
-    }
-
-    // TODO(dmitryas): Update the following after the spec is updated.
-    if (s.declaredNullability == Nullability.nullable &&
-        t.declaredNullability == Nullability.legacy) {
-      return true;
-    }
-    if (s.declaredNullability == Nullability.legacy &&
-        t.declaredNullability == Nullability.nullable) {
-      return false;
-    }
-
-    // MORETOP(FutureOr<S>, FutureOr<T>) = MORETOP(S, T).
-    if (s is FutureOrType &&
-        s.declaredNullability == Nullability.nonNullable &&
-        t is FutureOrType &&
-        t.declaredNullability == Nullability.nonNullable) {
-      return moretop(s.typeArgument, t.typeArgument);
-    }
-
-    return internalProblem(
-        templateInternalProblemUnsupported.withArguments("moretop($s, $t)"),
-        -1,
-        null);
-  }
-
-  /// Checks the value of the MOREBOTTOM predicate for [s] and [t].
-  ///
-  /// For the definition of MOREBOTTOM see the following:
-  /// https://github.com/dart-lang/language/blob/master/resources/type-system/upper-lower-bounds.md#helper-predicates
-  bool morebottom(DartType s, DartType t) {
-    assert(coreTypes.isBottom(s) || coreTypes.isNull(s));
-    assert(coreTypes.isBottom(t) || coreTypes.isNull(t));
-
-    // MOREBOTTOM(Never, T) = true.
-    if (s is NeverType && s.declaredNullability == Nullability.nonNullable) {
-      return true;
-    }
-
-    // MOREBOTTOM(S, Never) = false.
-    if (t is NeverType && t.declaredNullability == Nullability.nonNullable) {
-      return false;
-    }
-
-    // MOREBOTTOM(Null, T) = true.
-    if (s == coreTypes.nullType) {
-      return true;
-    }
-
-    // MOREBOTTOM(S, Null) = false.
-    if (t == coreTypes.nullType) {
-      return false;
-    }
-
-    // MOREBOTTOM(S?, T?) = MOREBOTTOM(S, T).
-    if (t.declaredNullability == Nullability.nullable &&
-        s.declaredNullability == Nullability.nullable) {
-      DartType nonNullableS =
-          s.withDeclaredNullability(Nullability.nonNullable);
-      assert(s != nonNullableS);
-      DartType nonNullableT =
-          t.withDeclaredNullability(Nullability.nonNullable);
-      assert(t != nonNullableT);
-      return morebottom(nonNullableS, nonNullableT);
-    }
-
-    // MOREBOTTOM(S, T?) = true.
-    if (s.declaredNullability == Nullability.nonNullable &&
-        t.declaredNullability == Nullability.nullable) {
-      return true;
-    }
-
-    // MOREBOTTOM(S?, T) = false.
-    if (s.declaredNullability == Nullability.nullable &&
-        t.declaredNullability == Nullability.nonNullable) {
-      return false;
-    }
-
-    // MOREBOTTOM(S*, T*) = MOREBOTTOM(S, T)
-    if (s.declaredNullability == Nullability.legacy &&
-        t.declaredNullability == Nullability.legacy) {
-      DartType nonNullableS =
-          s.withDeclaredNullability(Nullability.nonNullable);
-      assert(s != nonNullableS);
-      DartType nonNullableT =
-          t.withDeclaredNullability(Nullability.nonNullable);
-      assert(t != nonNullableT);
-      return morebottom(nonNullableS, nonNullableT);
-    }
-
-    // MOREBOTTOM(S, T*) = true.
-    if (s.declaredNullability == Nullability.nonNullable &&
-        t.declaredNullability == Nullability.legacy) {
-      return true;
-    }
-
-    // MOREBOTTOM(S*, T) = false.
-    if (s.declaredNullability == Nullability.legacy &&
-        t.declaredNullability == Nullability.nonNullable) {
-      return false;
-    }
-
-    // TODO(dmitryas): Update the following after the spec is updated.
-    if (s.declaredNullability == Nullability.nullable &&
-        t.declaredNullability == Nullability.legacy) {
-      return true;
-    }
-    if (s.declaredNullability == Nullability.legacy &&
-        t.declaredNullability == Nullability.nullable) {
-      return false;
-    }
-
-    // MOREBOTTOM(X&S, Y&T) = MOREBOTTOM(S, T).
-    if (s is TypeParameterType &&
-        s.promotedBound != null &&
-        t is TypeParameterType &&
-        t.promotedBound != null) {
-      return morebottom(s.promotedBound, t.promotedBound);
-    }
-
-    // MOREBOTTOM(X&S, T) = true.
-    if (s is TypeParameterType && s.promotedBound != null) {
-      return true;
-    }
-
-    // MOREBOTTOM(S, X&T) = false.
-    if (t is TypeParameterType && t.promotedBound != null) {
-      return false;
-    }
-
-    // MOREBOTTOM(X extends S, Y extends T) = MOREBOTTOM(S, T).
-    if (s is TypeParameterType && t is TypeParameterType) {
-      assert(s.promotedBound == null);
-      assert(t.promotedBound == null);
-      return morebottom(s.parameter.bound, t.parameter.bound);
-    }
-
-    return internalProblem(
-        templateInternalProblemUnsupported.withArguments("morebottom($s, $t)"),
-        -1,
-        null);
-  }
-
-  /// Computes the standard lower bound of [type1] and [type2].
-  ///
-  /// Standard lower bound is a lower bound function that imposes an
-  /// ordering on the top types `void`, `dynamic`, and `object`.  This function
-  /// additionally handles the unknown type that appears during type inference.
-  DartType getStandardLowerBound(
+mixin TypeSchemaStandardBounds on StandardBounds {
+  @override
+  DartType getNullabilityAwareStandardLowerBoundInternal(
       DartType type1, DartType type2, Library clientLibrary) {
-    if (type1 is InvalidType || type2 is InvalidType) {
-      return const InvalidType();
-    }
-    if (clientLibrary.isNonNullableByDefault) {
-      return _getNullabilityAwareStandardLowerBound(
-          type1, type2, clientLibrary);
-    }
-    return _getNullabilityObliviousStandardLowerBound(
-        legacyErasure(coreTypes, type1),
-        legacyErasure(coreTypes, type2),
-        clientLibrary);
-  }
-
-  DartType _getNullabilityAwareStandardLowerBound(
-      DartType type1, DartType type2, Library clientLibrary) {
-    // DOWN(T, T) = T.
-    if (identical(type1, type2)) return type1;
-
     //  - We add the axiom that `DOWN(T, _) == T` and the symmetric version.
     //  - We replace all uses of `T1 <: T2` in the `DOWN` algorithm by `S1 <:
     //  S2` where `Si` is the greatest closure of `Ti` with respect to `_`.
@@ -306,199 +24,13 @@
     type2 = greatestClosure(type2, coreTypes.objectNullableRawType,
         const NeverType(Nullability.nonNullable));
 
-    // DOWN(T1, T2) where TOP(T1) and TOP(T2) =
-    //   T1 if MORETOP(T2, T1)
-    //   T2 otherwise
-    // DOWN(T1, T2) = T2 if TOP(T1)
-    // DOWN(T1, T2) = T1 if TOP(T2)
-    if (coreTypes.isTop(type1)) {
-      if (coreTypes.isTop(type2)) return moretop(type2, type1) ? type1 : type2;
-      return type2;
-    } else if (coreTypes.isTop(type2)) {
-      return type1;
-    }
-
-    // DOWN(T1, T2) where BOTTOM(T1) and BOTTOM(T2) =
-    //   T1 if MOREBOTTOM(T1, T2)
-    //   T2 otherwise
-    // DOWN(T1, T2) = T2 if BOTTOM(T2)
-    // DOWN(T1, T2) = T1 if BOTTOM(T1)
-    if (coreTypes.isBottom(type1)) {
-      if (coreTypes.isBottom(type2)) {
-        return morebottom(type1, type2) ? type1 : type2;
-      }
-      return type1;
-    } else if (coreTypes.isBottom(type2)) {
-      return type2;
-    }
-
-    // DOWN(T1, T2) where NULL(T1) and NULL(T2) =
-    //   T1 if MOREBOTTOM(T1, T2)
-    //   T2 otherwise
-    // DOWN(Null, T2) =
-    //   Null if Null <: T2
-    //   Never otherwise
-    // DOWN(T1, Null) =
-    //  Null if Null <: T1
-    //  Never otherwise
-    if (coreTypes.isNull(type1)) {
-      if (coreTypes.isNull(type2)) {
-        return morebottom(type1, type2) ? type1 : type2;
-      }
-      Nullability type2Nullability = type2.declaredNullability;
-      if (type2Nullability == Nullability.legacy ||
-          type2Nullability == Nullability.nullable) {
-        return type1;
-      }
-      return const NeverType(Nullability.nonNullable);
-    } else if (coreTypes.isNull(type2)) {
-      Nullability type1Nullability = type1.declaredNullability;
-      if (type1Nullability == Nullability.legacy ||
-          type1Nullability == Nullability.nullable) {
-        return type2;
-      }
-      return const NeverType(Nullability.nonNullable);
-    }
-
-    // DOWN(T1, T2) where OBJECT(T1) and OBJECT(T2) =
-    //   T1 if MORETOP(T2, T1)
-    //   T2 otherwise
-    // DOWN(T1, T2) where OBJECT(T1) =
-    //   T2 if T2 is non-nullable
-    //   NonNull(T2) if NonNull(T2) is non-nullable
-    //   Never otherwise
-    // DOWN(T1, T2) where OBJECT(T2) =
-    //   T1 if T1 is non-nullable
-    //   NonNull(T1) if NonNull(T1) is non-nullable
-    //   Never otherwise
-    if (coreTypes.isObject(type1)) {
-      if (coreTypes.isObject(type2)) {
-        return moretop(type2, type1) ? type1 : type2;
-      }
-      if (type2.declaredNullability == Nullability.nonNullable) {
-        return type2;
-      }
-      type2 = type2.withDeclaredNullability(Nullability.nonNullable);
-      if (type2.declaredNullability == Nullability.nonNullable) {
-        return type2;
-      }
-      return const NeverType(Nullability.nonNullable);
-    } else if (coreTypes.isObject(type2)) {
-      if (type1.declaredNullability == Nullability.nonNullable) {
-        return type1;
-      }
-      type1 = type1.withDeclaredNullability(Nullability.nonNullable);
-      if (type1.declaredNullability == Nullability.nonNullable) {
-        return type1;
-      }
-      return const NeverType(Nullability.nonNullable);
-    }
-
-    // The effect of the following rules is accounted for in the code below via
-    // the invocations of intersectNullabilities.
-    // DOWN(T1*, T2*) = S* where S is DOWN(T1, T2)
-    // DOWN(T1*, T2?) = S* where S is DOWN(T1, T2)
-    // DOWN(T1?, T2*) = S* where S is DOWN(T1, T2)
-    // DOWN(T1*, T2) = S where S is DOWN(T1, T2)
-    // DOWN(T1, T2*) = S where S is DOWN(T1, T2)
-    // DOWN(T1?, T2?) = S? where S is DOWN(T1, T2)
-    // DOWN(T1?, T2) = S where S is DOWN(T1, T2)
-    // DOWN(T1, T2?) = S where S is DOWN(T1, T2)
-
-    if (type1 is FunctionType && type2 is FunctionType) {
-      return _getNullabilityAwareFunctionStandardLowerBound(
-          type1, type2, clientLibrary);
-    }
-
-    // DOWN(T1, T2) = T1 if T1 <: T2.
-    // DOWN(T1, T2) = T2 if T2 <: T1.
-
-    // We use the non-nullable variants of the two types to determine T1 <: T2
-    // without using the nullability of the outermost type. The result uses
-    // [intersectNullabilities] to compute the resulting type if the subtype
-    // relation is established.
-    DartType nonNullableType1 =
-        type1.withDeclaredNullability(Nullability.nonNullable);
-    DartType nonNullableType2 =
-        type2.withDeclaredNullability(Nullability.nonNullable);
-    if (isSubtypeOf(nonNullableType1, nonNullableType2,
-        SubtypeCheckMode.withNullabilities)) {
-      return type1.withDeclaredNullability(intersectNullabilities(
-          type1.declaredNullability, type2.declaredNullability));
-    }
-    if (isSubtypeOf(nonNullableType2, nonNullableType1,
-        SubtypeCheckMode.withNullabilities)) {
-      return type2.withDeclaredNullability(intersectNullabilities(
-          type1.declaredNullability, type2.declaredNullability));
-    }
-
-    // See https://github.com/dart-lang/sdk/issues/37439#issuecomment-519654959.
-    if (type1 is FutureOrType) {
-      if (type2 is FutureOrType) {
-        // GLB(FutureOr<A>, FutureOr<B>) == FutureOr<GLB(A, B)>
-        DartType argument = getStandardLowerBound(
-            type1.typeArgument, type2.typeArgument, clientLibrary);
-        return new FutureOrType(argument, argument.declaredNullability);
-      }
-      if (type2 is InterfaceType && type2.classNode == coreTypes.futureClass) {
-        // GLB(FutureOr<A>, Future<B>) == Future<GLB(A, B)>
-        return new InterfaceType(
-            coreTypes.futureClass,
-            intersectNullabilities(
-                type1.declaredNullability, type2.declaredNullability),
-            <DartType>[
-              getStandardLowerBound(
-                  type1.typeArgument, type2.typeArguments[0], clientLibrary)
-            ]);
-      }
-      // GLB(FutureOr<A>, B) == GLB(A, B)
-      return getStandardLowerBound(type1.typeArgument, type2, clientLibrary);
-    }
-    // The if-statement below handles the following rule:
-    //     GLB(A, FutureOr<B>) ==  GLB(FutureOr<B>, A)
-    // It's broken down into sub-cases instead of making a recursive call to
-    // avoid making the checks that were already made above.  Note that at this
-    // point it's not possible for type1 to be a FutureOr.
-    if (type2 is FutureOrType) {
-      if (type1 is InterfaceType && type1.classNode == coreTypes.futureClass) {
-        // GLB(Future<A>, FutureOr<B>) == Future<GLB(B, A)>
-        return new InterfaceType(
-            coreTypes.futureClass,
-            intersectNullabilities(
-                type1.declaredNullability, type2.declaredNullability),
-            <DartType>[
-              getStandardLowerBound(
-                  type2.typeArgument, type1.typeArguments[0], clientLibrary)
-            ]);
-      }
-      // GLB(A, FutureOr<B>) == GLB(B, A)
-      return getStandardLowerBound(type2.typeArgument, type1, clientLibrary);
-    }
-
-    // DOWN(T1, T2) = Never otherwise.
-    return new NeverType(intersectNullabilities(
-        type1.declaredNullability, type2.declaredNullability));
+    return super.getNullabilityAwareStandardLowerBoundInternal(
+        type1, type2, clientLibrary);
   }
 
-  DartType _getNullabilityObliviousStandardLowerBound(
-      DartType type1, DartType type2, Library clientLibrary) {
-    // Do legacy erasure on the argument, so that the result types that are
-    // computed from arguments are legacy.
-    type1 = type1 == coreTypes.nullType
-        ? type1
-        : type1.withDeclaredNullability(Nullability.legacy);
-    type2 = type2 == coreTypes.nullType
-        ? type2
-        : type2.withDeclaredNullability(Nullability.legacy);
-
-    // For all types T, SLB(T,T) = T.  Note that we don't test for equality
-    // because we don't want to make the algorithm quadratic.  This is ok
-    // because the check is not needed for correctness; it's just a speed
-    // optimization.
-    if (identical(type1, type2)) {
-      return type1;
-    }
-
+  @override
+  DartType getNullabilityObliviousStandardLowerBoundInternal(
+      type1, type2, clientLibrary) {
     // For any type T, SLB(?, T) = SLB(T, ?) = T.
     if (type1 is UnknownType) {
       return type2;
@@ -506,125 +38,13 @@
     if (type2 is UnknownType) {
       return type1;
     }
-
-    // SLB(void, T) = SLB(T, void) = T.
-    if (type1 is VoidType) {
-      return type2;
-    }
-    if (type2 is VoidType) {
-      return type1;
-    }
-
-    // SLB(dynamic, T) = SLB(T, dynamic) = T if T is not void.
-    if (type1 is DynamicType) {
-      return type2;
-    }
-    if (type2 is DynamicType) {
-      return type1;
-    }
-
-    // SLB(Object, T) = SLB(T, Object) = T if T is not void or dynamic.
-    if (type1 == coreTypes.objectLegacyRawType) {
-      return type2;
-    }
-    if (type2 == coreTypes.objectLegacyRawType) {
-      return type1;
-    }
-
-    // SLB(bottom, T) = SLB(T, bottom) = bottom.
-    if (type1 is BottomType) return type1;
-    if (type2 is BottomType) return type2;
-    if (type1 == coreTypes.nullType) return type1;
-    if (type2 == coreTypes.nullType) return type2;
-
-    // Function types have structural lower bounds.
-    if (type1 is FunctionType && type2 is FunctionType) {
-      return _getNullabilityObliviousFunctionStandardLowerBound(
-          type1, type2, clientLibrary);
-    }
-
-    // Otherwise, the lower bounds  of two types is one of them it if it is a
-    // subtype of the other.
-    if (isSubtypeOf(type1, type2, SubtypeCheckMode.ignoringNullabilities)) {
-      return type1;
-    }
-
-    if (isSubtypeOf(type2, type1, SubtypeCheckMode.ignoringNullabilities)) {
-      return type2;
-    }
-
-    // See https://github.com/dart-lang/sdk/issues/37439#issuecomment-519654959.
-    if (type1 is FutureOrType) {
-      if (type2 is FutureOrType) {
-        // GLB(FutureOr<A>, FutureOr<B>) == FutureOr<GLB(A, B)>
-        DartType argument = getStandardLowerBound(
-            type1.typeArgument, type2.typeArgument, clientLibrary);
-        return new FutureOrType(argument, argument.declaredNullability);
-      }
-      if (type2 is InterfaceType && type2.classNode == coreTypes.futureClass) {
-        // GLB(FutureOr<A>, Future<B>) == Future<GLB(A, B)>
-        return new InterfaceType(
-            coreTypes.futureClass,
-            intersectNullabilities(
-                type1.declaredNullability, type2.declaredNullability),
-            <DartType>[
-              getStandardLowerBound(
-                  type1.typeArgument, type2.typeArguments[0], clientLibrary)
-            ]);
-      }
-      // GLB(FutureOr<A>, B) == GLB(A, B)
-      return getStandardLowerBound(type1.typeArgument, type2, clientLibrary);
-    }
-    // The if-statement below handles the following rule:
-    //     GLB(A, FutureOr<B>) ==  GLB(FutureOr<B>, A)
-    // It's broken down into sub-cases instead of making a recursive call to
-    // avoid making the checks that were already made above.  Note that at this
-    // point it's not possible for type1 to be a FutureOr.
-    if (type2 is FutureOrType) {
-      if (type1 is FutureOrType) {
-        // GLB(Future<A>, FutureOr<B>) == Future<GLB(B, A)>
-        return new InterfaceType(
-            coreTypes.futureClass,
-            intersectNullabilities(
-                type1.declaredNullability, type2.declaredNullability),
-            <DartType>[
-              getStandardLowerBound(
-                  type2.typeArgument, type1.typeArgument, clientLibrary)
-            ]);
-      }
-      // GLB(A, FutureOr<B>) == GLB(B, A)
-      return getStandardLowerBound(type2.typeArgument, type1, clientLibrary);
-    }
-
-    // No subtype relation, so the lower bound is bottom.
-    return const BottomType();
+    return super.getNullabilityObliviousStandardLowerBoundInternal(
+        type1, type2, clientLibrary);
   }
 
-  /// Computes the standard upper bound of two types.
-  ///
-  /// Standard upper bound is an upper bound function that imposes an ordering
-  /// on the top types 'void', 'dynamic', and `object`.  This function
-  /// additionally handles the unknown type that appears during type inference.
-  DartType getStandardUpperBound(
+  @override
+  DartType getNullabilityAwareStandardUpperBoundInternal(
       DartType type1, DartType type2, Library clientLibrary) {
-    if (type1 is InvalidType || type2 is InvalidType) {
-      return const InvalidType();
-    }
-    if (clientLibrary.isNonNullableByDefault) {
-      return _getNullabilityAwareStandardUpperBound(
-          type1, type2, clientLibrary);
-    }
-    return _getNullabilityObliviousStandardUpperBound(
-        legacyErasure(coreTypes, type1),
-        legacyErasure(coreTypes, type2),
-        clientLibrary);
-  }
-
-  DartType _getNullabilityAwareStandardUpperBound(
-      DartType type1, DartType type2, Library clientLibrary) {
-    // UP(T, T) = T
-    if (identical(type1, type2)) return type1;
-
     //  - We add the axiom that `UP(T, _) == T` and the symmetric version.
     //  - We replace all uses of `T1 <: T2` in the `UP` algorithm by `S1 <: S2`
     //  where `Si` is the least closure of `Ti` with respect to `_`.
@@ -634,605 +54,13 @@
         const NeverType(Nullability.nonNullable));
     type2 = leastClosure(type2, coreTypes.objectNullableRawType,
         const NeverType(Nullability.nonNullable));
-
-    // UP(T1, T2) where TOP(T1) and TOP(T2) =
-    //   T1 if MORETOP(T1, T2)
-    //   T2 otherwise
-    // UP(T1, T2) = T1 if TOP(T1)
-    // UP(T1, T2) = T2 if TOP(T2)
-    if (coreTypes.isTop(type1)) {
-      if (coreTypes.isTop(type2)) return moretop(type1, type2) ? type1 : type2;
-      return type1;
-    } else if (coreTypes.isTop(type2)) {
-      return type2;
-    }
-
-    // UP(T1, T2) where BOTTOM(T1) and BOTTOM(T2) =
-    //   T2 if MOREBOTTOM(T1, T2)
-    //   T1 otherwise
-    // UP(T1, T2) = T2 if BOTTOM(T1)
-    // UP(T1, T2) = T1 if BOTTOM(T2)
-    if (coreTypes.isBottom(type1)) {
-      if (coreTypes.isBottom(type2)) {
-        return morebottom(type1, type2) ? type2 : type1;
-      }
-      return type2;
-    } else if (coreTypes.isBottom(type2)) {
-      return type1;
-    }
-
-    // UP(T1, T2) where NULL(T1) and NULL(T2) =
-    //   T2 if MOREBOTTOM(T1, T2)
-    //   T1 otherwise
-    // UP(T1, T2) where NULL(T1) =
-    //   T2 if T2 is nullable
-    //   T2? otherwise
-    // UP(T1, T2) where NULL(T2) =
-    //   T1 if T1 is nullable
-    //   T1? otherwise
-    if (coreTypes.isNull(type1)) {
-      if (coreTypes.isNull(type2)) {
-        return morebottom(type1, type2) ? type2 : type1;
-      }
-      return type2.withDeclaredNullability(Nullability.nullable);
-    } else if (coreTypes.isNull(type2)) {
-      return type1.withDeclaredNullability(Nullability.nullable);
-    }
-
-    // UP(T1, T2) where OBJECT(T1) and OBJECT(T2) =
-    //   T1 if MORETOP(T1, T2)
-    //   T2 otherwise
-    // UP(T1, T2) where OBJECT(T1) =
-    //   T1 if T2 is non-nullable
-    //   T1? otherwise
-    // UP(T1, T2) where OBJECT(T2) =
-    //   T2 if T1 is non-nullable
-    //   T2? otherwise
-    if (coreTypes.isObject(type1)) {
-      if (coreTypes.isObject(type2)) {
-        return moretop(type1, type2) ? type1 : type2;
-      }
-      if (type2.declaredNullability == Nullability.nonNullable) {
-        return type1;
-      }
-      return type1.withDeclaredNullability(Nullability.nullable);
-    } else if (coreTypes.isObject(type2)) {
-      if (type1.declaredNullability == Nullability.nonNullable) {
-        return type2;
-      }
-      return type2.withDeclaredNullability(Nullability.nullable);
-    }
-
-    // The effect of the following rules is accounted for in the code below via
-    // the invocations of uniteNullabilities.
-    // UP(T1*, T2*) = S* where S is UP(T1, T2)
-    // UP(T1*, T2?) = S? where S is UP(T1, T2)
-    // UP(T1?, T2*) = S? where S is UP(T1, T2)
-    // UP(T1*, T2) = S* where S is UP(T1, T2)
-    // UP(T1, T2*) = S* where S is UP(T1, T2)
-    // UP(T1?, T2?) = S? where S is UP(T1, T2)
-    // UP(T1?, T2) = S? where S is UP(T1, T2)
-    // UP(T1, T2?) = S? where S is UP(T1, T2)
-
-    if (type1 is TypeParameterType) {
-      return _getNullabilityAwareTypeParameterStandardUpperBound(
-          type1, type2, clientLibrary);
-    }
-
-    if (type2 is TypeParameterType) {
-      return _getNullabilityAwareTypeParameterStandardUpperBound(
-          type2, type1, clientLibrary);
-    }
-
-    if (type1 is FunctionType) {
-      if (type2 is FunctionType) {
-        return _getNullabilityAwareFunctionStandardUpperBound(
-            type1, type2, clientLibrary);
-      }
-
-      if (type2 is InterfaceType &&
-          type2.classNode == coreTypes.functionClass) {
-        // UP(T Function<...>(...), Function) = Function
-        return coreTypes.functionRawType(uniteNullabilities(
-            type1.declaredNullability, type2.declaredNullability));
-      }
-
-      // UP(T Function<...>(...), T2) = Object
-      return coreTypes.objectRawType(uniteNullabilities(
-          type1.declaredNullability, type2.declaredNullability));
-    } else if (type2 is FunctionType) {
-      if (type1 is InterfaceType &&
-          type1.classNode == coreTypes.functionClass) {
-        // UP(Function, T Function<...>(...)) = Function
-        return coreTypes.functionRawType(uniteNullabilities(
-            type1.declaredNullability, type2.declaredNullability));
-      }
-
-      // UP(T1, T Function<...>(...)) = Object
-      return coreTypes.objectRawType(uniteNullabilities(
-          type1.declaredNullability, type2.declaredNullability));
-    }
-
-    if (type1 is FutureOrType || type2 is FutureOrType) {
-      if (isSubtypeOf(type1, type2, SubtypeCheckMode.withNullabilities)) {
-        return type2;
-      }
-      if (isSubtypeOf(type2, type1, SubtypeCheckMode.withNullabilities)) {
-        return type1;
-      }
-      if (type1 is FutureOrType && type2 is FutureOrType) {
-        return new FutureOrType(
-            getStandardUpperBound(
-                type1.typeArgument, type2.typeArgument, clientLibrary),
-            uniteNullabilities(
-                type1.declaredNullability, type2.declaredNullability));
-      }
-    }
-
-    // UP(T1, T2) = T2 if T1 <: T2
-    //   Note that both types must be class types at this point.
-    assert(type1 is InterfaceType,
-        "Expected type1 to be an interface type, got '${type1.runtimeType}'.");
-    assert(type2 is InterfaceType,
-        "Expected type2 to be an interface type, got '${type2.runtimeType}'.");
-
-    // We use the non-nullable variants of the two interfaces types to determine
-    // T1 <: T2 without using the nullability of the outermost type. The result
-    // uses [uniteNullabilities] to compute the resulting type if the subtype
-    // relation is established.
-    InterfaceType nonNonNullableType1 =
-        type1.withDeclaredNullability(Nullability.nonNullable);
-    InterfaceType nonNonNullableType2 =
-        type2.withDeclaredNullability(Nullability.nonNullable);
-
-    if (isSubtypeOf(nonNonNullableType1, nonNonNullableType2,
-        SubtypeCheckMode.withNullabilities)) {
-      return type2.withDeclaredNullability(
-          uniteNullabilities(type1.nullability, type2.nullability));
-    }
-
-    // UP(T1, T2) = T1 if T2 <: T1
-    //   Note that both types must be class types at this point.
-    if (isSubtypeOf(nonNonNullableType2, nonNonNullableType1,
-        SubtypeCheckMode.withNullabilities)) {
-      return type1.withDeclaredNullability(uniteNullabilities(
-          type1.declaredNullability, type2.declaredNullability));
-    }
-
-    // UP(C<T0, ..., Tn>, C<S0, ..., Sn>) = C<R0,..., Rn> where Ri is UP(Ti, Si)
-    if (type1 is InterfaceType && type2 is InterfaceType) {
-      Class klass = type1.classNode;
-      if (type2.classNode == klass) {
-        int n = klass.typeParameters.length;
-        List<DartType> leftArguments = type1.typeArguments;
-        List<DartType> rightArguments = type2.typeArguments;
-        List<DartType> typeArguments = new List<DartType>(n);
-        for (int i = 0; i < n; ++i) {
-          int variance = klass.typeParameters[i].variance;
-          if (variance == Variance.contravariant) {
-            typeArguments[i] = _getNullabilityAwareStandardLowerBound(
-                leftArguments[i], rightArguments[i], clientLibrary);
-          } else if (variance == Variance.invariant) {
-            if (!areMutualSubtypes(leftArguments[i], rightArguments[i],
-                SubtypeCheckMode.withNullabilities)) {
-              return getLegacyLeastUpperBound(type1, type2, clientLibrary);
-            }
-          } else {
-            typeArguments[i] = _getNullabilityAwareStandardUpperBound(
-                leftArguments[i], rightArguments[i], clientLibrary);
-          }
-        }
-        return new InterfaceType(
-            klass,
-            uniteNullabilities(
-                type1.declaredNullability, type2.declaredNullability),
-            typeArguments);
-      }
-    }
-
-    // UP(C0<T0, ..., Tn>, C1<S0, ..., Sk>)
-    //   = least upper bound of two interfaces as in Dart 1.
-    return getLegacyLeastUpperBound(type1, type2, clientLibrary);
+    return super.getNullabilityAwareStandardUpperBoundInternal(
+        type1, type2, clientLibrary);
   }
 
-  /// Computes the nullability-aware lower bound of two function types.
-  ///
-  /// The algorithm is defined as follows:
-  /// DOWN(
-  ///   <X0 extends B00, ..., Xm extends B0m>(P00, ..., P0k) -> T0,
-  ///   <X0 extends B10, ..., Xm extends B1m>(P10, ..., P1l) -> T1)
-  /// =
-  ///   <X0 extends B20, ..., Xm extends B2m>(P20, ..., P2q) -> R0
-  /// if:
-  ///   each B0i and B1i are equal types (syntactically),
-  ///   q is max(k, l),
-  ///   R0 is DOWN(T0, T1),
-  ///   B2i is B0i,
-  ///   P2i is UP(P0i, P1i) for i <= than min(k, l),
-  ///   P2i is P0i for k < i <= q,
-  ///   P2i is P1i for l < i <= q, and
-  ///   P2i is optional if P0i or P1i is optional.
-  ///
-  /// DOWN(
-  ///   <X0 extends B00, ..., Xm extends B0m>(P00, ..., P0k, Named0) -> T0,
-  ///   <X0 extends B10, ..., Xm extends B1m>(P10, ..., P1k, Named1) -> T1)
-  /// =
-  ///   <X0 extends B20, ..., Xm extends B2m>(P20, ..., P2k, Named2) -> R0
-  /// if:
-  ///   each B0i and B1i are equal types (syntactically),
-  ///   R0 is DOWN(T0, T1),
-  ///   B2i is B0i,
-  ///   P2i is UP(P0i, P1i),
-  ///   Named2 contains R2i xi for each xi in both Named0 and Named1,
-  ///     where R0i xi is in Named0,
-  ///     where R1i xi is in Named1,
-  ///     and R2i is UP(R0i, R1i),
-  ///     and R2i xi is required if xi is required in both Named0 and Named1,
-  ///   Named2 contains R0i xi for each xi in Named0 and not Named1,
-  ///     where xi is optional in Named2,
-  ///   Named2 contains R1i xi for each xi in Named1 and not Named0, and
-  ///     where xi is optional in Named2.
-  /// DOWN(T Function<...>(...), S Function<...>(...)) = Never otherwise.
-  DartType _getNullabilityAwareFunctionStandardLowerBound(
-      FunctionType f, FunctionType g, Library clientLibrary) {
-    bool haveNamed =
-        f.namedParameters.isNotEmpty || g.namedParameters.isNotEmpty;
-    bool haveOptionalPositional =
-        f.requiredParameterCount < f.positionalParameters.length ||
-            g.requiredParameterCount < g.positionalParameters.length;
-
-    // The fallback result for whenever the following rule applies:
-    //     DOWN(T Function<...>(...), S Function<...>(...)) = Never otherwise.
-    final DartType fallbackResult = new NeverType(
-        intersectNullabilities(f.declaredNullability, g.declaredNullability));
-
-    if (haveNamed && haveOptionalPositional) return fallbackResult;
-    if (haveNamed &&
-        f.positionalParameters.length != g.positionalParameters.length) {
-      return fallbackResult;
-    }
-
-    int m = f.typeParameters.length;
-    bool boundsMatch = false;
-    Substitution substitution = Substitution.empty;
-    if (g.typeParameters.length == m) {
-      boundsMatch = true;
-      if (m != 0) {
-        Map<TypeParameter, DartType> substitutionMap =
-            <TypeParameter, DartType>{};
-        for (int i = 0; i < m; ++i) {
-          substitutionMap[g.typeParameters[i]] =
-              new TypeParameterType.forAlphaRenaming(
-                  g.typeParameters[i], f.typeParameters[i]);
-        }
-        substitution = Substitution.fromMap(substitutionMap);
-        for (int i = 0; i < m && boundsMatch; ++i) {
-          // TODO(dmitryas): Figure out if a procedure for syntactic equality
-          // should be used instead.
-          if (!areMutualSubtypes(
-              f.typeParameters[i].bound,
-              substitution.substituteType(g.typeParameters[i].bound),
-              SubtypeCheckMode.withNullabilities)) {
-            boundsMatch = false;
-          }
-        }
-      }
-    }
-    if (!boundsMatch) return fallbackResult;
-    int maxPos =
-        math.max(f.positionalParameters.length, g.positionalParameters.length);
-    int minPos =
-        math.min(f.positionalParameters.length, g.positionalParameters.length);
-
-    List<TypeParameter> typeParameters = f.typeParameters;
-
-    List<DartType> positionalParameters =
-        new List<DartType>.filled(maxPos, null);
-    for (int i = 0; i < minPos; ++i) {
-      positionalParameters[i] = _getNullabilityAwareStandardUpperBound(
-          f.positionalParameters[i],
-          substitution.substituteType(g.positionalParameters[i]),
-          clientLibrary);
-    }
-    for (int i = minPos; i < f.positionalParameters.length; ++i) {
-      positionalParameters[i] = f.positionalParameters[i];
-    }
-    for (int i = minPos; i < g.positionalParameters.length; ++i) {
-      positionalParameters[i] =
-          substitution.substituteType(g.positionalParameters[i]);
-    }
-
-    List<NamedType> namedParameters = <NamedType>[];
-    {
-      // Assuming that the named parameters of both types are sorted
-      // lexicographically.
-      int i = 0;
-      int j = 0;
-      while (i < f.namedParameters.length && j < g.namedParameters.length) {
-        NamedType named1 = f.namedParameters[i];
-        NamedType named2 = g.namedParameters[j];
-        int order = named1.name.compareTo(named2.name);
-        NamedType named;
-        if (order < 0) {
-          named = new NamedType(named1.name, named1.type, isRequired: false);
-          ++i;
-        } else if (order > 0) {
-          named = !named2.isRequired
-              ? named2
-              : new NamedType(
-                  named2.name, substitution.substituteType(named2.type),
-                  isRequired: false);
-          ++j;
-        } else {
-          named = new NamedType(
-              named1.name,
-              _getNullabilityAwareStandardUpperBound(named1.type,
-                  substitution.substituteType(named2.type), clientLibrary),
-              isRequired: named1.isRequired && named2.isRequired);
-          ++i;
-          ++j;
-        }
-        namedParameters.add(named);
-      }
-      while (i < f.namedParameters.length) {
-        NamedType named1 = f.namedParameters[i];
-        namedParameters.add(!named1.isRequired
-            ? named1
-            : new NamedType(named1.name, named1.type, isRequired: false));
-        ++i;
-      }
-      while (j < g.namedParameters.length) {
-        NamedType named2 = g.namedParameters[j];
-        namedParameters.add(new NamedType(
-            named2.name, substitution.substituteType(named2.type),
-            isRequired: false));
-        ++j;
-      }
-    }
-
-    DartType returnType = _getNullabilityAwareStandardLowerBound(
-        f.returnType, substitution.substituteType(g.returnType), clientLibrary);
-
-    return new FunctionType(positionalParameters, returnType,
-        intersectNullabilities(f.declaredNullability, g.declaredNullability),
-        namedParameters: namedParameters,
-        typeParameters: typeParameters,
-        requiredParameterCount: minPos);
-  }
-
-  /// Computes the nullability-aware lower bound of two function types.
-  ///
-  /// UP(
-  ///   <X0 extends B00, ... Xm extends B0m>(P00, ... P0k) -> T0,
-  ///   <X0 extends B10, ... Xm extends B1m>(P10, ... P1l) -> T1)
-  /// =
-  ///   <X0 extends B20, ..., Xm extends B2m>(P20, ..., P2q) -> R0
-  /// if:
-  ///   each B0i and B1i are equal types (syntactically)
-  ///   Both have the same number of required positional parameters
-  ///   q is min(k, l)
-  ///   R0 is UP(T0, T1)
-  ///   B2i is B0i
-  ///   P2i is DOWN(P0i, P1i)
-  /// UP(
-  ///   <X0 extends B00, ... Xm extends B0m>(P00, ... P0k, Named0) -> T0,
-  ///   <X0 extends B10, ... Xm extends B1m>(P10, ... P1k, Named1) -> T1)
-  /// =
-  ///   <X0 extends B20, ..., Xm extends B2m>(P20, ..., P2k, Named2) -> R0
-  /// if:
-  ///   each B0i and B1i are equal types (syntactically)
-  ///   All positional parameters are required
-  ///   R0 is UP(T0, T1)
-  ///   B2i is B0i
-  ///   P2i is DOWN(P0i, P1i)
-  ///   Named0 contains R0i xi
-  ///       if R1i xi is a required named parameter in Named1
-  ///   Named1 contains R1i xi
-  ///       if R0i xi is a required named parameter in Named0
-  ///   Named2 contains exactly R2i xi
-  ///       for each xi in both Named0 and Named1
-  ///     where R0i xi is in Named0
-  ///     where R1i xi is in Named1
-  ///     and R2i is DOWN(R0i, R1i)
-  ///     and R2i xi is required
-  ///         if xi is required in either Named0 or Named1
-  /// UP(T Function<...>(...), S Function<...>(...)) = Function otherwise
-  DartType _getNullabilityAwareFunctionStandardUpperBound(
-      FunctionType f, FunctionType g, Library clientLibrary) {
-    bool haveNamed =
-        f.namedParameters.isNotEmpty || g.namedParameters.isNotEmpty;
-    bool haveOptionalPositional =
-        f.requiredParameterCount < f.positionalParameters.length ||
-            g.requiredParameterCount < g.positionalParameters.length;
-
-    // The return value for whenever the following applies:
-    //     UP(T Function<...>(...), S Function<...>(...)) = Function otherwise
-    final DartType fallbackResult = coreTypes.functionRawType(
-        uniteNullabilities(f.declaredNullability, g.declaredNullability));
-
-    if (haveNamed && haveOptionalPositional) return fallbackResult;
-    if (!haveNamed && f.requiredParameterCount != g.requiredParameterCount) {
-      return fallbackResult;
-    }
-    // Here we perform a quick check on the function types to figure out if we
-    // can compute a non-trivial upper bound for them.  The check isn't merged
-    // with the computation of the non-trivial upper bound itself to avoid
-    // performing unnecessary computations.
-    if (haveNamed) {
-      if (f.positionalParameters.length != g.positionalParameters.length) {
-        return fallbackResult;
-      }
-      // Assuming that the named parameters are sorted lexicographically in
-      // both type1 and type2.
-      int i = 0;
-      int j = 0;
-      while (i < f.namedParameters.length && j < g.namedParameters.length) {
-        NamedType named1 = f.namedParameters[i];
-        NamedType named2 = g.namedParameters[j];
-        int order = named1.name.compareTo(named2.name);
-        if (order < 0) {
-          if (named1.isRequired) return fallbackResult;
-          ++i;
-        } else if (order > 0) {
-          if (named2.isRequired) return fallbackResult;
-          ++j;
-        } else {
-          ++i;
-          ++j;
-        }
-      }
-      while (i < f.namedParameters.length) {
-        if (f.namedParameters[i].isRequired) return fallbackResult;
-        ++i;
-      }
-      while (j < g.namedParameters.length) {
-        if (g.namedParameters[j].isRequired) return fallbackResult;
-        ++j;
-      }
-    }
-
-    int m = f.typeParameters.length;
-    bool boundsMatch = false;
-    Substitution substitution = Substitution.empty;
-    if (g.typeParameters.length == m) {
-      boundsMatch = true;
-      if (m != 0) {
-        Map<TypeParameter, DartType> substitutionMap =
-            <TypeParameter, DartType>{};
-        for (int i = 0; i < m; ++i) {
-          substitutionMap[g.typeParameters[i]] =
-              new TypeParameterType.forAlphaRenaming(
-                  g.typeParameters[i], f.typeParameters[i]);
-        }
-        substitution = Substitution.fromMap(substitutionMap);
-        for (int i = 0; i < m && boundsMatch; ++i) {
-          // TODO(dmitryas): Figure out if a procedure for syntactic
-          // equality should be used instead.
-          if (!areMutualSubtypes(
-              f.typeParameters[i].bound,
-              substitution.substituteType(g.typeParameters[i].bound),
-              SubtypeCheckMode.withNullabilities)) {
-            boundsMatch = false;
-          }
-        }
-      }
-    }
-    if (!boundsMatch) return fallbackResult;
-    int minPos =
-        math.min(f.positionalParameters.length, g.positionalParameters.length);
-
-    List<TypeParameter> typeParameters = f.typeParameters;
-
-    List<DartType> positionalParameters =
-        new List<DartType>.filled(minPos, null);
-    for (int i = 0; i < minPos; ++i) {
-      positionalParameters[i] = _getNullabilityAwareStandardLowerBound(
-          f.positionalParameters[i],
-          substitution.substituteType(g.positionalParameters[i]),
-          clientLibrary);
-    }
-
-    List<NamedType> namedParameters = <NamedType>[];
-    {
-      // Assuming that the named parameters of both types are sorted
-      // lexicographically.
-      int i = 0;
-      int j = 0;
-      while (i < f.namedParameters.length && j < g.namedParameters.length) {
-        NamedType named1 = f.namedParameters[i];
-        NamedType named2 = g.namedParameters[j];
-        int order = named1.name.compareTo(named2.name);
-        if (order < 0) {
-          ++i;
-        } else if (order > 0) {
-          ++j;
-        } else {
-          namedParameters.add(new NamedType(
-              named1.name,
-              _getNullabilityAwareStandardLowerBound(named1.type,
-                  substitution.substituteType(named2.type), clientLibrary),
-              isRequired: named1.isRequired || named2.isRequired));
-          ++i;
-          ++j;
-        }
-      }
-    }
-
-    DartType returnType = _getNullabilityAwareStandardUpperBound(
-        f.returnType, substitution.substituteType(g.returnType), clientLibrary);
-
-    return new FunctionType(positionalParameters, returnType,
-        uniteNullabilities(f.declaredNullability, g.declaredNullability),
-        namedParameters: namedParameters,
-        typeParameters: typeParameters,
-        requiredParameterCount: f.requiredParameterCount);
-  }
-
-  DartType _getNullabilityAwareTypeParameterStandardUpperBound(
-      TypeParameterType type1, DartType type2, Library clientLibrary) {
-    if (type1.promotedBound == null) {
-      // UP(X1 extends B1, T2) =
-      //   T2 if X1 <: T2
-      //   otherwise X1 if T2 <: X1
-      //   otherwise UP(B1[Object/X1], T2)
-      if (isSubtypeOf(type1, type2, SubtypeCheckMode.withNullabilities)) {
-        return type2.withDeclaredNullability(uniteNullabilities(
-            type1.declaredNullability, type2.declaredNullability));
-      }
-      if (isSubtypeOf(type2, type1, SubtypeCheckMode.withNullabilities)) {
-        return type1.withDeclaredNullability(uniteNullabilities(
-            type1.declaredNullability, type2.declaredNullability));
-      }
-      Map<TypeParameter, DartType> substitution = <TypeParameter, DartType>{
-        type1.parameter: coreTypes.objectNonNullableRawType
-      };
-      return _getNullabilityAwareStandardUpperBound(
-              substitute(type1.parameter.bound, substitution),
-              type2,
-              clientLibrary)
-          .withDeclaredNullability(uniteNullabilities(
-              type1.declaredNullability, type2.declaredNullability));
-    } else {
-      // UP(X1 & B1, T2) =
-      //   T2 if X1 <: T2
-      //   otherwise X1 if T2 <: X1
-      //   otherwise UP(B1[Object/X1], T2)
-      DartType demoted =
-          new TypeParameterType(type1.parameter, type1.declaredNullability);
-      if (isSubtypeOf(demoted, type2, SubtypeCheckMode.withNullabilities)) {
-        return type2.withDeclaredNullability(uniteNullabilities(
-            type1.declaredNullability, type2.declaredNullability));
-      }
-      if (isSubtypeOf(type2, demoted, SubtypeCheckMode.withNullabilities)) {
-        return demoted.withDeclaredNullability(uniteNullabilities(
-            type1.declaredNullability, type2.declaredNullability));
-      }
-      Map<TypeParameter, DartType> substitution = <TypeParameter, DartType>{
-        type1.parameter: coreTypes.objectNonNullableRawType
-      };
-      return _getNullabilityAwareStandardUpperBound(
-              substitute(type1.promotedBound, substitution),
-              type2,
-              clientLibrary)
-          .withDeclaredNullability(uniteNullabilities(
-              type1.declaredNullability, type2.declaredNullability));
-    }
-  }
-
-  DartType _getNullabilityObliviousStandardUpperBound(
+  @override
+  DartType getNullabilityObliviousStandardUpperBoundInternal(
       DartType type1, DartType type2, Library clientLibrary) {
-    /*assert(type1 == legacyErasure(coreTypes, type1),
-        "Non-legacy type $type1 in inference.");
-    assert(type2 == legacyErasure(coreTypes, type2),
-        "Non-legacy type $type2 in inference.");*/
-    // For all types T, SUB(T,T) = T.  Note that we don't test for equality
-    // because we don't want to make the algorithm quadratic.  This is ok
-    // because the check is not needed for correctness; it's just a speed
-    // optimization.
-    if (identical(type1, type2)) {
-      return type1;
-    }
-
     // For any type T, SUB(?, T) = SUB(T, ?) = T.
     if (type1 is UnknownType) {
       return type2;
@@ -1240,382 +68,7 @@
     if (type2 is UnknownType) {
       return type1;
     }
-
-    // SUB(void, T) = SUB(T, void) = void.
-    if (type1 is VoidType) {
-      return type1;
-    }
-    if (type2 is VoidType) {
-      return type2;
-    }
-
-    // SUB(dynamic, T) = SUB(T, dynamic) = dynamic if T is not void.
-    if (type1 is DynamicType) {
-      return type1;
-    }
-    if (type2 is DynamicType) {
-      return type2;
-    }
-
-    // SUB(Object, T) = SUB(T, Object) = Object if T is not void or dynamic.
-    if (type1 == coreTypes.objectLegacyRawType) {
-      return type1;
-    }
-    if (type2 == coreTypes.objectLegacyRawType) {
-      return type2;
-    }
-
-    // SUB(bottom, T) = SUB(T, bottom) = T.
-    if (type1 is BottomType) return type2;
-    if (type2 is BottomType) return type1;
-    if (type1 == coreTypes.nullType) return type2;
-    if (type2 == coreTypes.nullType) return type1;
-
-    if (type1 is TypeParameterType || type2 is TypeParameterType) {
-      return _getNullabilityObliviousTypeParameterStandardUpperBound(
-          type1, type2, clientLibrary);
-    }
-
-    // The standard upper bound of a function type and an interface type T is
-    // the standard upper bound of Function and T.
-    if (type1 is FunctionType &&
-        (type2 is InterfaceType || type2 is FutureOrType)) {
-      type1 = coreTypes.functionLegacyRawType;
-    }
-    if (type2 is FunctionType &&
-        (type1 is InterfaceType || type2 is FutureOrType)) {
-      type2 = coreTypes.functionLegacyRawType;
-    }
-
-    // At this point type1 and type2 should both either be interface types or
-    // function types.
-    if (type1 is InterfaceType && type2 is InterfaceType) {
-      return _getInterfaceStandardUpperBound(type1, type2, clientLibrary);
-    }
-
-    if (type1 is FunctionType && type2 is FunctionType) {
-      return _getNullabilityObliviousFunctionStandardUpperBound(
-          type1, type2, clientLibrary);
-    }
-
-    if (type1 is FutureOrType || type2 is FutureOrType) {
-      if (isSubtypeOf(type1, type2, SubtypeCheckMode.ignoringNullabilities)) {
-        return type2;
-      }
-      if (isSubtypeOf(type2, type1, SubtypeCheckMode.ignoringNullabilities)) {
-        return type1;
-      }
-      if (type1 is FutureOrType && type2 is FutureOrType) {
-        return new FutureOrType(
-            getStandardUpperBound(
-                type1.typeArgument, type2.typeArgument, clientLibrary),
-            uniteNullabilities(
-                type1.declaredNullability, type2.declaredNullability));
-      }
-    }
-
-    if (type1 is InvalidType || type2 is InvalidType) {
-      return const InvalidType();
-    }
-
-    // Should never happen. As a defensive measure, return the dynamic type.
-    assert(false, "type1 = $type1; type2 = $type2");
-    return const DynamicType();
-  }
-
-  /// Compute the standard lower bound of function types [f] and [g].
-  ///
-  /// The spec rules for SLB on function types, informally, are pretty simple:
-  ///
-  /// - If a parameter is required in both, it stays required.
-  ///
-  /// - If a positional parameter is optional or missing in one, it becomes
-  ///   optional.  (This is because we're trying to build a function type which
-  ///   is a subtype of both [f] and [g], meaning it accepts all possible inputs
-  ///   that [f] and [g] accept.)
-  ///
-  /// - Named parameters are unioned together.
-  ///
-  /// - For any parameter that exists in both functions, use the SUB of them as
-  ///   the resulting parameter type.
-  ///
-  /// - Use the SLB of their return types.
-  DartType _getNullabilityObliviousFunctionStandardLowerBound(
-      FunctionType f, FunctionType g, Library clientLibrary) {
-    // TODO(rnystrom,paulberry): Right now, this assumes f and g do not have any
-    // type parameters. Revisit that in the presence of generic methods.
-
-    // Calculate the SUB of each corresponding pair of parameters.
-    int totalPositional =
-        math.max(f.positionalParameters.length, g.positionalParameters.length);
-    List<DartType> positionalParameters = new List<DartType>(totalPositional);
-    for (int i = 0; i < totalPositional; i++) {
-      if (i < f.positionalParameters.length) {
-        DartType fType = f.positionalParameters[i];
-        if (i < g.positionalParameters.length) {
-          DartType gType = g.positionalParameters[i];
-          positionalParameters[i] =
-              getStandardUpperBound(fType, gType, clientLibrary);
-        } else {
-          positionalParameters[i] = fType;
-        }
-      } else {
-        positionalParameters[i] = g.positionalParameters[i];
-      }
-    }
-
-    // Parameters that are required in both functions are required in the
-    // result.  Parameters that are optional or missing in either end up
-    // optional.
-    int requiredParameterCount =
-        math.min(f.requiredParameterCount, g.requiredParameterCount);
-    bool hasPositional = requiredParameterCount < totalPositional;
-
-    // Union the named parameters together.
-    List<NamedType> namedParameters = [];
-    {
-      int i = 0;
-      int j = 0;
-      while (true) {
-        if (i < f.namedParameters.length) {
-          if (j < g.namedParameters.length) {
-            String fName = f.namedParameters[i].name;
-            String gName = g.namedParameters[j].name;
-            int order = fName.compareTo(gName);
-            if (order < 0) {
-              namedParameters.add(f.namedParameters[i++]);
-            } else if (order > 0) {
-              namedParameters.add(g.namedParameters[j++]);
-            } else {
-              namedParameters.add(new NamedType(
-                  fName,
-                  getStandardUpperBound(f.namedParameters[i++].type,
-                      g.namedParameters[j++].type, clientLibrary)));
-            }
-          } else {
-            namedParameters.addAll(f.namedParameters.skip(i));
-            break;
-          }
-        } else {
-          namedParameters.addAll(g.namedParameters.skip(j));
-          break;
-        }
-      }
-    }
-    bool hasNamed = namedParameters.isNotEmpty;
-
-    // Edge case. Dart does not support functions with both optional positional
-    // and named parameters. If we would synthesize that, give up.
-    if (hasPositional && hasNamed) return const BottomType();
-
-    // Calculate the SLB of the return type.
-    DartType returnType =
-        getStandardLowerBound(f.returnType, g.returnType, clientLibrary);
-    return new FunctionType(positionalParameters, returnType,
-        intersectNullabilities(f.declaredNullability, g.declaredNullability),
-        namedParameters: namedParameters,
-        requiredParameterCount: requiredParameterCount);
-  }
-
-  /// Compute the standard upper bound of function types [f] and [g].
-  ///
-  /// The rules for SUB on function types, informally, are pretty simple:
-  ///
-  /// - If the functions don't have the same number of required parameters,
-  ///   always return `Function`.
-  ///
-  /// - Discard any optional named or positional parameters the two types do not
-  ///   have in common.
-  ///
-  /// - Compute the SLB of each corresponding pair of parameter types, and the
-  ///   SUB of the return types.  Return a function type with those types.
-  DartType _getNullabilityObliviousFunctionStandardUpperBound(
-      FunctionType f, FunctionType g, Library clientLibrary) {
-    // TODO(rnystrom): Right now, this assumes f and g do not have any type
-    // parameters. Revisit that in the presence of generic methods.
-
-    // If F and G differ in their number of required parameters, then the
-    // standard upper bound of F and G is Function.
-    // TODO(paulberry): We could do better here, e.g.:
-    //   SUB(([int]) -> void, (int) -> void) = (int) -> void
-    if (f.requiredParameterCount != g.requiredParameterCount) {
-      return new InterfaceType(
-          coreTypes.functionClass,
-          uniteNullabilities(f.declaredNullability, g.declaredNullability),
-          const <DynamicType>[]);
-    }
-    int requiredParameterCount = f.requiredParameterCount;
-
-    // Calculate the SLB of each corresponding pair of parameters.
-    // Ignore any extra optional positional parameters if one has more than the
-    // other.
-    int totalPositional =
-        math.min(f.positionalParameters.length, g.positionalParameters.length);
-    List<DartType> positionalParameters = new List<DartType>(totalPositional);
-    for (int i = 0; i < totalPositional; i++) {
-      positionalParameters[i] = getStandardLowerBound(
-          f.positionalParameters[i], g.positionalParameters[i], clientLibrary);
-    }
-
-    // Intersect the named parameters.
-    List<NamedType> namedParameters = [];
-    {
-      int i = 0;
-      int j = 0;
-      while (true) {
-        if (i < f.namedParameters.length) {
-          if (j < g.namedParameters.length) {
-            String fName = f.namedParameters[i].name;
-            String gName = g.namedParameters[j].name;
-            int order = fName.compareTo(gName);
-            if (order < 0) {
-              i++;
-            } else if (order > 0) {
-              j++;
-            } else {
-              namedParameters.add(new NamedType(
-                  fName,
-                  getStandardLowerBound(f.namedParameters[i++].type,
-                      g.namedParameters[j++].type, clientLibrary)));
-            }
-          } else {
-            break;
-          }
-        } else {
-          break;
-        }
-      }
-    }
-
-    // Calculate the SUB of the return type.
-    DartType returnType =
-        getStandardUpperBound(f.returnType, g.returnType, clientLibrary);
-    return new FunctionType(positionalParameters, returnType,
-        uniteNullabilities(f.declaredNullability, g.declaredNullability),
-        namedParameters: namedParameters,
-        requiredParameterCount: requiredParameterCount);
-  }
-
-  DartType _getInterfaceStandardUpperBound(
-      InterfaceType type1, InterfaceType type2, Library clientLibrary) {
-    // This currently does not implement a very complete standard upper bound
-    // algorithm, but handles a couple of the very common cases that are
-    // causing pain in real code.  The current algorithm is:
-    // 1. If either of the types is a supertype of the other, return it.
-    //    This is in fact the best result in this case.
-    // 2. If the two types have the same class element and is implicitly or
-    //    explicitly covariant, then take the pointwise standard upper bound of
-    //    the type arguments. This is again the best result, except that the
-    //    recursive calls may not return the true standard upper bounds.  The
-    //    result is guaranteed to be a well-formed type under the assumption
-    //    that the input types were well-formed (and assuming that the
-    //    recursive calls return well-formed types).
-    //    If the variance of the type parameter is contravariant, we take the
-    //    standard lower bound of the type arguments. If the variance of the
-    //    type parameter is invariant, we verify if the type arguments satisfy
-    //    subtyping in both directions, then choose a bound.
-    // 3. Otherwise return the spec-defined standard upper bound.  This will
-    //    be an upper bound, might (or might not) be least, and might
-    //    (or might not) be a well-formed type.
-    if (isSubtypeOf(type1, type2, SubtypeCheckMode.withNullabilities)) {
-      return type2;
-    }
-    if (isSubtypeOf(type2, type1, SubtypeCheckMode.withNullabilities)) {
-      return type1;
-    }
-    if (identical(type1.classNode, type2.classNode)) {
-      List<DartType> tArgs1 = type1.typeArguments;
-      List<DartType> tArgs2 = type2.typeArguments;
-      List<TypeParameter> tParams = type1.classNode.typeParameters;
-
-      assert(tArgs1.length == tArgs2.length);
-      assert(tArgs1.length == tParams.length);
-      List<DartType> tArgs = new List(tArgs1.length);
-      for (int i = 0; i < tArgs1.length; i++) {
-        if (tParams[i].variance == Variance.contravariant) {
-          tArgs[i] = getStandardLowerBound(tArgs1[i], tArgs2[i], clientLibrary);
-        } else if (tParams[i].variance == Variance.invariant) {
-          if (!areMutualSubtypes(
-              tArgs1[i], tArgs2[i], SubtypeCheckMode.withNullabilities)) {
-            // No bound will be valid, find bound at the interface level.
-            return getLegacyLeastUpperBound(type1, type2, clientLibrary);
-          }
-          // TODO (kallentu) : Fix asymmetric bounds behavior for invariant type
-          //  parameters.
-          tArgs[i] = tArgs1[i];
-        } else {
-          tArgs[i] = getStandardUpperBound(tArgs1[i], tArgs2[i], clientLibrary);
-        }
-      }
-      return new InterfaceType(
-          type1.classNode,
-          uniteNullabilities(
-              type1.declaredNullability, type2.declaredNullability),
-          tArgs);
-    }
-    return getLegacyLeastUpperBound(type1, type2, clientLibrary);
-  }
-
-  DartType _getNullabilityObliviousTypeParameterStandardUpperBound(
-      DartType type1, DartType type2, Library clientLibrary) {
-    // This currently just implements a simple standard upper bound to
-    // handle some common cases.  It also avoids some termination issues
-    // with the naive spec algorithm.  The standard upper bound of two types
-    // (at least one of which is a type parameter) is computed here as:
-    // 1. If either type is a supertype of the other, return it.
-    // 2. If the first type is a type parameter, replace it with its bound,
-    //    with recursive occurrences of itself replaced with Object.
-    //    The second part of this should ensure termination.  Informally,
-    //    each type variable instantiation in one of the arguments to the
-    //    standard upper bound algorithm now strictly reduces the number
-    //    of bound variables in scope in that argument position.
-    // 3. If the second type is a type parameter, do the symmetric operation
-    //    to #2.
-    //
-    // It's not immediately obvious why this is symmetric in the case that both
-    // of them are type parameters.  For #1, symmetry holds since subtype
-    // is antisymmetric.  For #2, it's clearly not symmetric if upper bounds of
-    // bottom are allowed.  Ignoring this (for various reasons, not least
-    // of which that there's no way to write it), there's an informal
-    // argument (that might even be right) that you will always either
-    // end up expanding both of them or else returning the same result no matter
-    // which order you expand them in.  A key observation is that
-    // identical(expand(type1), type2) => subtype(type1, type2)
-    // and hence the contra-positive.
-    //
-    // TODO(leafp): Think this through and figure out what's the right
-    // definition.  Be careful about termination.
-    //
-    // I suspect in general a reasonable algorithm is to expand the innermost
-    // type variable first.  Alternatively, you could probably choose to treat
-    // it as just an instance of the interface type upper bound problem, with
-    // the "inheritance" chain extended by the bounds placed on the variables.
-    if (isSubtypeOf(type1, type2, SubtypeCheckMode.ignoringNullabilities)) {
-      return type2;
-    }
-    if (isSubtypeOf(type2, type1, SubtypeCheckMode.ignoringNullabilities)) {
-      return type1;
-    }
-    if (type1 is TypeParameterType) {
-      // TODO(paulberry): Analyzer collapses simple bounds in one step, i.e. for
-      // C<T extends U, U extends List>, T gets resolved directly to List.  Do
-      // we need to replicate that behavior?
-      return getStandardUpperBound(
-          Substitution.fromMap({type1.parameter: coreTypes.objectLegacyRawType})
-              .substituteType(type1.parameter.bound),
-          type2,
-          clientLibrary);
-    } else if (type2 is TypeParameterType) {
-      return getStandardUpperBound(
-          type1,
-          Substitution.fromMap({type2.parameter: coreTypes.objectLegacyRawType})
-              .substituteType(type2.parameter.bound),
-          clientLibrary);
-    } else {
-      // We should only be called when at least one of the types is a
-      // TypeParameterType
-      assert(false);
-      return const DynamicType();
-    }
+    return super.getNullabilityObliviousStandardUpperBoundInternal(
+        type1, type2, clientLibrary);
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index 5f9c59e..78e2f3e 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -276,6 +276,11 @@
         !variable.hasDeclaredInitializer;
   }
 
+  @override
+  bool isNever(DartType type) {
+    return typeEnvironment.coreTypes.isBottom(type);
+  }
+
   // TODO(dmitryas): Consider checking for mutual subtypes instead of ==.
   @override
   bool isSameType(DartType type1, DartType type2) => type1 == type2;
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 6e43379..0603833 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
@@ -218,14 +218,6 @@
   /// inside a closure.
   ClosureContext closureContext;
 
-  /// The [Substitution] inferred by the last [inferInvocation], or `null` if
-  /// the last invocation didn't require any inference.
-  Substitution lastInferredSubstitution;
-
-  /// The [FunctionType] of the callee in the last [inferInvocation], or `null`
-  /// if the last invocation didn't require any inference.
-  FunctionType lastCalleeType;
-
   TypeInferrerImpl(this.engine, this.uriForInstrumentation, bool topLevel,
       this.thisType, this.library, this.assignedVariables, this.dataForTesting)
       : assert(library != null),
@@ -387,6 +379,13 @@
   /// [contextType], and inserts an implicit downcast, inserts a tear-off, or
   /// reports an error if appropriate.
   ///
+  /// If [declaredContextType] is provided, this is used instead of
+  /// [contextType] for reporting the type against which [expressionType] isn't
+  /// assignable. This is used when checking the assignability of return
+  /// statements in async functions in which the assignability is checked
+  /// against the future value type but the reporting should refer to the
+  /// declared return type.
+  ///
   /// If [runtimeCheckedType] is provided, this is used for the implicit cast,
   /// otherwise [contextType] is used. This is used for return from async
   /// where the returned expression is wrapped in a `Future`, if necessary,
@@ -395,6 +394,7 @@
   Expression ensureAssignable(
       DartType contextType, DartType expressionType, Expression expression,
       {int fileOffset,
+      DartType declaredContextType,
       DartType runtimeCheckedType,
       bool isVoidAllowed: false,
       Template<Message Function(DartType, DartType, bool)> errorTemplate}) {
@@ -444,8 +444,8 @@
         break;
       case AssignabilityKind.unassignable:
         // Error: not assignable.  Perform error recovery.
-        result = _wrapUnassignableExpression(
-            expression, expressionType, contextType, errorTemplate);
+        result = _wrapUnassignableExpression(expression, expressionType,
+            contextType, declaredContextType, errorTemplate);
         break;
       case AssignabilityKind.unassignableVoid:
         // Error: not assignable.  Perform error recovery.
@@ -465,8 +465,12 @@
       case AssignabilityKind.unassignableTearoff:
         TypedTearoff typedTearoff =
             _tearOffCall(expression, expressionType, fileOffset);
-        result = _wrapUnassignableExpression(typedTearoff.tearoff,
-            typedTearoff.tearoffType, contextType, errorTemplate);
+        result = _wrapUnassignableExpression(
+            typedTearoff.tearoff,
+            typedTearoff.tearoffType,
+            contextType,
+            declaredContextType,
+            errorTemplate);
         break;
       case AssignabilityKind.unassignableCantTearoff:
         result = _wrapTearoffErrorExpression(
@@ -505,6 +509,7 @@
       Expression expression,
       DartType expressionType,
       DartType contextType,
+      DartType declaredContextType,
       Template<Message Function(DartType, DartType, bool)> template) {
     Expression errorNode = new AsExpression(
         expression,
@@ -520,7 +525,9 @@
       errorNode = helper.wrapInProblem(
           errorNode,
           (template ?? templateInvalidAssignmentError).withArguments(
-              expressionType, contextType, isNonNullableByDefault),
+              expressionType,
+              declaredContextType ?? contextType,
+              isNonNullableByDefault),
           errorNode.fileOffset,
           noLength);
     }
@@ -845,7 +852,8 @@
       }
       if (includeExtensionMethods) {
         ObjectAccessTarget target = _findExtensionMember(
-            receiverBound, coreTypes.objectClass, name, fileOffset);
+            receiverBound, coreTypes.objectClass, name, fileOffset,
+            setter: setter);
         if (target != null) {
           return target;
         }
@@ -1587,7 +1595,7 @@
             messageVoidExpression, expression.fileOffset, noLength);
       }
     }
-    if (result.inferredType is NeverType) {
+    if (coreTypes.isBottom(result.inferredType)) {
       flowAnalysis.handleExit();
     }
     return result;
@@ -1635,24 +1643,19 @@
   InvocationInferenceResult inferInvocation(DartType typeContext, int offset,
       FunctionType calleeType, Arguments arguments,
       {List<VariableDeclaration> hoistedExpressions,
-      bool isOverloadedArithmeticOperator: false,
-      DartType returnType,
+      bool isSpecialCasedBinaryOperator: false,
+      bool isSpecialCasedTernaryOperator: false,
       DartType receiverType,
       bool skipTypeArgumentInference: false,
       bool isConst: false,
       bool isImplicitExtensionMember: false,
       bool isImplicitCall: false}) {
-    assert(
-        returnType == null || !containsFreeFunctionTypeVariables(returnType),
-        "Return type $returnType contains free variables."
-        "Provided function type: $calleeType.");
     int extensionTypeParameterCount = getExtensionTypeParameterCount(arguments);
     if (extensionTypeParameterCount != 0) {
-      assert(returnType == null,
-          "Unexpected explicit return type for extension method invocation.");
       return _inferGenericExtensionMethodInvocation(extensionTypeParameterCount,
           typeContext, offset, calleeType, arguments, hoistedExpressions,
-          isOverloadedArithmeticOperator: isOverloadedArithmeticOperator,
+          isSpecialCasedBinaryOperator: isSpecialCasedBinaryOperator,
+          isSpecialCasedTernaryOperator: isSpecialCasedTernaryOperator,
           receiverType: receiverType,
           skipTypeArgumentInference: skipTypeArgumentInference,
           isConst: isConst,
@@ -1660,9 +1663,9 @@
     }
     return _inferInvocation(
         typeContext, offset, calleeType, arguments, hoistedExpressions,
-        isOverloadedArithmeticOperator: isOverloadedArithmeticOperator,
+        isSpecialCasedBinaryOperator: isSpecialCasedBinaryOperator,
+        isSpecialCasedTernaryOperator: isSpecialCasedTernaryOperator,
         receiverType: receiverType,
-        returnType: returnType,
         skipTypeArgumentInference: skipTypeArgumentInference,
         isConst: isConst,
         isImplicitExtensionMember: isImplicitExtensionMember,
@@ -1676,7 +1679,8 @@
       FunctionType calleeType,
       Arguments arguments,
       List<VariableDeclaration> hoistedExpressions,
-      {bool isOverloadedArithmeticOperator: false,
+      {bool isSpecialCasedBinaryOperator: false,
+      bool isSpecialCasedTernaryOperator: false,
       DartType receiverType,
       bool skipTypeArgumentInference: false,
       bool isConst: false,
@@ -1721,7 +1725,8 @@
         named: arguments.named, types: getExplicitTypeArguments(arguments));
     InvocationInferenceResult result = _inferInvocation(typeContext, offset,
         targetFunctionType, targetArguments, hoistedExpressions,
-        isOverloadedArithmeticOperator: isOverloadedArithmeticOperator,
+        isSpecialCasedBinaryOperator: isSpecialCasedBinaryOperator,
+        isSpecialCasedTernaryOperator: isSpecialCasedTernaryOperator,
         skipTypeArgumentInference: skipTypeArgumentInference,
         isConst: isConst,
         isImplicitCall: isImplicitCall);
@@ -1746,20 +1751,13 @@
       FunctionType calleeType,
       Arguments arguments,
       List<VariableDeclaration> hoistedExpressions,
-      {bool isOverloadedArithmeticOperator: false,
-      bool isBinaryOperator: false,
+      {bool isSpecialCasedBinaryOperator: false,
+      bool isSpecialCasedTernaryOperator: false,
       DartType receiverType,
-      DartType returnType,
       bool skipTypeArgumentInference: false,
       bool isConst: false,
       bool isImplicitExtensionMember: false,
       bool isImplicitCall}) {
-    assert(
-        returnType == null || !containsFreeFunctionTypeVariables(returnType),
-        "Return type $returnType contains free variables."
-        "Provided function type: $calleeType.");
-    lastInferredSubstitution = null;
-    lastCalleeType = null;
     List<TypeParameter> calleeTypeParameters = calleeType.typeParameters;
     if (calleeTypeParameters.isNotEmpty) {
       // It's possible that one of the callee type parameters might match a type
@@ -1773,9 +1771,6 @@
       // in which me must do this, to avoid a performance regression?
       FreshTypeParameters fresh = getFreshTypeParameters(calleeTypeParameters);
       calleeType = fresh.applyToFunctionType(calleeType);
-      if (returnType != null) {
-        returnType = fresh.substitute(returnType);
-      }
       calleeTypeParameters = fresh.freshTypeParameters;
     }
     List<DartType> explicitTypeArguments = getExplicitTypeArguments(arguments);
@@ -1804,8 +1799,8 @@
           calleeTypeParameters.length, const UnknownType());
       typeSchemaEnvironment.inferGenericFunctionOrType(
           isNonNullableByDefault
-              ? returnType ?? calleeType.returnType
-              : legacyErasure(coreTypes, returnType ?? calleeType.returnType),
+              ? calleeType.returnType
+              : legacyErasure(coreTypes, calleeType.returnType),
           calleeTypeParameters,
           null,
           null,
@@ -1839,13 +1834,25 @@
             "invocation.");
         continue;
       } else {
+        if (isSpecialCasedBinaryOperator) {
+          inferredFormalType =
+              typeSchemaEnvironment.getContextTypeOfSpecialCasedBinaryOperator(
+                  typeContext, receiverType, inferredFormalType,
+                  isNonNullableByDefault: isNonNullableByDefault);
+        } else if (isSpecialCasedTernaryOperator) {
+          inferredFormalType =
+              typeSchemaEnvironment.getContextTypeOfSpecialCasedTernaryOperator(
+                  typeContext, receiverType, inferredFormalType,
+                  isNonNullableByDefault: isNonNullableByDefault);
+        }
         ExpressionInferenceResult result = inferExpression(
             arguments.positional[position],
             isNonNullableByDefault
                 ? inferredFormalType
                 : legacyErasure(coreTypes, inferredFormalType),
             inferenceNeeded ||
-                isOverloadedArithmeticOperator ||
+                isSpecialCasedBinaryOperator ||
+                isSpecialCasedTernaryOperator ||
                 typeChecksNeeded);
         inferredType = result.inferredType == null || isNonNullableByDefault
             ? result.inferredType
@@ -1858,10 +1865,18 @@
         formalTypes.add(formalType);
         actualTypes.add(inferredType);
       }
-      if (isOverloadedArithmeticOperator) {
-        returnType = typeSchemaEnvironment.getTypeOfOverloadedArithmetic(
-            receiverType, inferredType);
-      }
+    }
+    if (isSpecialCasedBinaryOperator) {
+      calleeType = replaceReturnType(
+          calleeType,
+          typeSchemaEnvironment.getTypeOfSpecialCasedBinaryOperator(
+              receiverType, actualTypes[0],
+              isNonNullableByDefault: isNonNullableByDefault));
+    } else if (isSpecialCasedTernaryOperator) {
+      calleeType = replaceReturnType(
+          calleeType,
+          typeSchemaEnvironment.getTypeOfSpecialCasedTernaryOperator(
+              receiverType, actualTypes[0], actualTypes[1], library.library));
     }
     for (NamedExpression namedArgument in arguments.named) {
       DartType formalType =
@@ -1874,9 +1889,7 @@
           isNonNullableByDefault
               ? inferredFormalType
               : legacyErasure(coreTypes, inferredFormalType),
-          inferenceNeeded ||
-              isOverloadedArithmeticOperator ||
-              typeChecksNeeded);
+          inferenceNeeded || isSpecialCasedBinaryOperator || typeChecksNeeded);
       DartType inferredType =
           result.inferredType == null || isNonNullableByDefault
               ? result.inferredType
@@ -1933,7 +1946,7 @@
 
     if (inferenceNeeded) {
       typeSchemaEnvironment.inferGenericFunctionOrType(
-          returnType ?? calleeType.returnType,
+          calleeType.returnType,
           calleeTypeParameters,
           formalTypes,
           actualTypes,
@@ -1999,24 +2012,20 @@
       }
     }
     DartType inferredType;
-    lastInferredSubstitution = substitution;
-    lastCalleeType = calleeType;
-    if (returnType != null) {
-      inferredType = substitution == null
-          ? returnType
-          : substitution.substituteType(returnType);
-    } else {
-      if (substitution != null) {
-        calleeType =
-            substitution.substituteType(calleeType.withoutTypeParameters);
-      }
-      inferredType = calleeType.returnType;
+    if (substitution != null) {
+      calleeType =
+          substitution.substituteType(calleeType.withoutTypeParameters);
     }
+    inferredType = calleeType.returnType;
     assert(
         !containsFreeFunctionTypeVariables(inferredType),
         "Inferred return type $inferredType contains free variables."
         "Inferred function type: $calleeType.");
 
+    if (!isNonNullableByDefault) {
+      inferredType = legacyErasure(coreTypes, inferredType);
+    }
+
     return new SuccessfulInferenceResult(inferredType);
   }
 
@@ -2073,7 +2082,8 @@
     Substitution substitution;
     List<DartType> formalTypesFromContext =
         new List<DartType>.filled(formals.length, null);
-    if (typeContext is FunctionType) {
+    if (typeContext is FunctionType &&
+        typeContext.typeParameters.length == typeParameters.length) {
       for (int i = 0; i < formals.length; i++) {
         if (i < function.positionalParameters.length) {
           formalTypesFromContext[i] =
@@ -2115,12 +2125,15 @@
       if (formal.isImplicitlyTyped) {
         DartType inferredType;
         if (formalTypesFromContext[i] != null) {
-          if (coreTypes.isBottom(formalTypesFromContext[i]) ||
-              coreTypes.isNull(formalTypesFromContext[i])) {
+          inferredType = computeGreatestClosure2(
+              substitution.substituteType(formalTypesFromContext[i]));
+          if (typeSchemaEnvironment.isSubtypeOf(
+              inferredType,
+              coreTypes.nullType,
+              isNonNullableByDefault
+                  ? SubtypeCheckMode.withNullabilities
+                  : SubtypeCheckMode.ignoringNullabilities)) {
             inferredType = coreTypes.objectRawType(library.nullable);
-          } else {
-            inferredType = computeGreatestClosure2(
-                substitution.substituteType(formalTypesFromContext[i]));
           }
         } else {
           inferredType = const DynamicType();
@@ -2460,8 +2473,12 @@
       Arguments arguments,
       DartType typeContext,
       List<VariableDeclaration> hoistedExpressions,
-      {bool isImplicitCall}) {
+      {bool isImplicitCall,
+      bool isSpecialCasedBinaryOperator,
+      bool isSpecialCasedTernaryOperator}) {
     assert(isImplicitCall != null);
+    assert(isSpecialCasedBinaryOperator != null);
+    assert(isSpecialCasedTernaryOperator != null);
     assert(target.isInstanceMember || target.isNullableInstanceMember);
     Procedure method = target.member;
     assert(method.kind == ProcedureKind.Method,
@@ -2502,7 +2519,9 @@
         typeContext, fileOffset, functionType, arguments,
         hoistedExpressions: hoistedExpressions,
         receiverType: receiverType,
-        isImplicitCall: isImplicitCall);
+        isImplicitCall: isImplicitCall,
+        isSpecialCasedBinaryOperator: isSpecialCasedBinaryOperator,
+        isSpecialCasedTernaryOperator: isSpecialCasedTernaryOperator);
 
     Expression replacement;
     if (contravariantCheck) {
@@ -2818,6 +2837,7 @@
     ObjectAccessTarget target = findInterfaceMember(
         receiverType, name, fileOffset,
         instrumented: true, includeExtensionMethods: true);
+
     switch (target.kind) {
       case ObjectAccessTargetKind.instanceMember:
       case ObjectAccessTargetKind.nullableInstanceMember:
@@ -2835,6 +2855,9 @@
                 hoistedExpressions,
                 isExpressionInvocation: isExpressionInvocation);
           } else {
+            bool isSpecialCasedBinaryOperator =
+                isSpecialCasedBinaryOperatorForReceiverType(
+                    target, receiverType);
             return _inferInstanceMethodInvocation(
                 fileOffset,
                 nullAwareGuards,
@@ -2844,7 +2867,10 @@
                 arguments,
                 typeContext,
                 hoistedExpressions,
-                isImplicitCall: isImplicitCall);
+                isImplicitCall: isImplicitCall,
+                isSpecialCasedBinaryOperator: isSpecialCasedBinaryOperator,
+                isSpecialCasedTernaryOperator:
+                    isSpecialCasedTernaryOperator(target));
           }
         } else {
           return _inferInstanceFieldInvocation(
@@ -2950,12 +2976,20 @@
     }
   }
 
-  bool isOverloadedArithmeticOperatorAndType(
+  bool isSpecialCasedBinaryOperatorForReceiverType(
       ObjectAccessTarget target, DartType receiverType) {
     return (target.isInstanceMember || target.isNullableInstanceMember) &&
         target.member is Procedure &&
-        typeSchemaEnvironment.isOverloadedArithmeticOperatorAndType(
-            target.member, receiverType);
+        typeSchemaEnvironment.isSpecialCasesBinaryForReceiverType(
+            target.member, receiverType,
+            isNonNullableByDefault: isNonNullableByDefault);
+  }
+
+  bool isSpecialCasedTernaryOperator(ObjectAccessTarget target) {
+    return (target.isInstanceMember || target.isNullableInstanceMember) &&
+        target.member is Procedure &&
+        typeSchemaEnvironment.isSpecialCasedTernaryOperator(target.member,
+            isNonNullableByDefault: isNonNullableByDefault);
   }
 
   /// Performs the core type inference algorithm for super method invocations.
@@ -2968,14 +3002,22 @@
     Name methodName = expression.name;
     Arguments arguments = expression.arguments;
     DartType receiverType = thisType;
-    bool isOverloadedArithmeticOperator =
-        isOverloadedArithmeticOperatorAndType(target, receiverType);
+    bool isSpecialCasedBinaryOperator =
+        isSpecialCasedBinaryOperatorForReceiverType(target, receiverType);
     DartType calleeType = getGetterType(target, receiverType);
     FunctionType functionType = getFunctionType(target, receiverType);
-
+    if (isNonNullableByDefault &&
+        expression.name == equalsName &&
+        functionType.positionalParameters.length == 1) {
+      // operator == always allows nullable arguments.
+      functionType = new FunctionType([
+        functionType.positionalParameters.single
+            .withDeclaredNullability(library.nullable)
+      ], functionType.returnType, functionType.declaredNullability);
+    }
     InvocationInferenceResult result = inferInvocation(
         typeContext, fileOffset, functionType, arguments,
-        isOverloadedArithmeticOperator: isOverloadedArithmeticOperator,
+        isSpecialCasedBinaryOperator: isSpecialCasedBinaryOperator,
         receiverType: receiverType,
         isImplicitExtensionMember: target.isExtensionMember);
     DartType inferredType = result.inferredType;
@@ -3156,7 +3198,7 @@
       DartType step1 = resolveOneStep(hare);
       if (step1 == null) return hare;
       DartType step2 = resolveOneStep(step1);
-      if (step2 == null) return hare;
+      if (step2 == null) return step1;
       hare = step2;
 
       // Tortoise takes one step
@@ -4155,3 +4197,11 @@
 
   TypedTearoff(this.tearoffType, this.tearoff);
 }
+
+FunctionType replaceReturnType(FunctionType functionType, DartType returnType) {
+  return new FunctionType(functionType.positionalParameters, returnType,
+      functionType.declaredNullability,
+      requiredParameterCount: functionType.requiredParameterCount,
+      namedParameters: functionType.namedParameters,
+      typeParameters: functionType.typeParameters);
+}
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
index db7ce6d..1b89f55 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
@@ -2,20 +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.md file.
 
-import 'package:kernel/ast.dart'
-    show
-        DartType,
-        DynamicType,
-        FunctionType,
-        FutureOrType,
-        InterfaceType,
-        Library,
-        NamedType,
-        NeverType,
-        Nullability,
-        Procedure,
-        TypeParameter,
-        Variance;
+import 'package:kernel/ast.dart' hide MapEntry;
 
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 
@@ -28,7 +15,7 @@
 import 'package:kernel/src/hierarchy_based_type_environment.dart'
     show HierarchyBasedTypeEnvironment;
 
-import 'standard_bounds.dart' show StandardBounds;
+import 'standard_bounds.dart' show TypeSchemaStandardBounds;
 
 import 'type_constraint_gatherer.dart' show TypeConstraintGatherer;
 
@@ -38,8 +25,6 @@
 
 import 'type_schema_elimination.dart' show greatestClosure, leastClosure;
 
-import '../problems.dart';
-
 // TODO(paulberry): try to push this functionality into kernel.
 FunctionType substituteTypeParams(
     FunctionType type,
@@ -101,7 +86,7 @@
 }
 
 class TypeSchemaEnvironment extends HierarchyBasedTypeEnvironment
-    with StandardBounds {
+    with TypeSchemaStandardBounds {
   final ClassHierarchy hierarchy;
 
   TypeSchemaEnvironment(CoreTypes coreTypes, this.hierarchy)
@@ -119,24 +104,6 @@
     return coreTypes.objectRawType(nullability);
   }
 
-  bool areMutualSubtypes(DartType s, DartType t, SubtypeCheckMode mode) {
-    IsSubtypeOf result = performNullabilityAwareMutualSubtypesCheck(s, t);
-    switch (mode) {
-      case SubtypeCheckMode.ignoringNullabilities:
-        return result.isSubtypeWhenIgnoringNullabilities();
-      case SubtypeCheckMode.withNullabilities:
-        return result.isSubtypeWhenUsingNullabilities();
-    }
-    return unhandled(
-        "$mode", "TypeSchemaEnvironment.areMutualSubtypes", -1, null);
-  }
-
-  InterfaceType getLegacyLeastUpperBound(
-      InterfaceType type1, InterfaceType type2, Library clientLibrary) {
-    return hierarchy.getLegacyLeastUpperBound(
-        type1, type2, clientLibrary, this.coreTypes);
-  }
-
   /// Modify the given [constraint]'s lower bound to include [lower].
   void addLowerBound(
       TypeConstraint constraint, DartType lower, Library clientLibrary) {
@@ -152,19 +119,103 @@
   }
 
   @override
-  DartType getTypeOfOverloadedArithmetic(DartType type1, DartType type2) {
-    // TODO(paulberry): this matches what is defined in the spec.  It would be
-    // nice if we could change kernel to match the spec and not have to
-    // override.
-    if (type1 is InterfaceType && type1.classNode == coreTypes.intClass) {
-      if (type2 is InterfaceType && type2.classNode == coreTypes.intClass) {
-        return type2.withDeclaredNullability(type1.nullability);
+  DartType getTypeOfSpecialCasedBinaryOperator(DartType type1, DartType type2,
+      {bool isNonNullableByDefault: false}) {
+    if (isNonNullableByDefault) {
+      return super.getTypeOfSpecialCasedBinaryOperator(type1, type2,
+          isNonNullableByDefault: isNonNullableByDefault);
+    } else {
+      // TODO(paulberry): this matches what is defined in the spec.  It would be
+      // nice if we could change kernel to match the spec and not have to
+      // override.
+      if (type1 is InterfaceType && type1.classNode == coreTypes.intClass) {
+        if (type2 is InterfaceType && type2.classNode == coreTypes.intClass) {
+          return type2.withDeclaredNullability(type1.nullability);
+        }
+        if (type2 is InterfaceType &&
+            type2.classNode == coreTypes.doubleClass) {
+          return type2.withDeclaredNullability(type1.nullability);
+        }
       }
-      if (type2 is InterfaceType && type2.classNode == coreTypes.doubleClass) {
-        return type2.withDeclaredNullability(type1.nullability);
+      return coreTypes.numRawType(type1.nullability);
+    }
+  }
+
+  DartType getContextTypeOfSpecialCasedBinaryOperator(
+      DartType contextType, DartType type1, DartType type2,
+      {bool isNonNullableByDefault: false}) {
+    if (isNonNullableByDefault) {
+      if (contextType is! NeverType &&
+          type1 is! NeverType &&
+          isSubtypeOf(contextType, coreTypes.numNonNullableRawType,
+              SubtypeCheckMode.withNullabilities) &&
+          isSubtypeOf(type1, coreTypes.numNonNullableRawType,
+              SubtypeCheckMode.withNullabilities)) {
+        // If e is an expression of the form e1 + e2, e1 - e2, e1 * e2, e1 % e2
+        // or e1.remainder(e2), where C is the context type of e and T is the
+        // static type of e1, and where T is a non-Never subtype of num, then:
+        if (isSubtypeOf(coreTypes.intNonNullableRawType, contextType,
+                SubtypeCheckMode.withNullabilities) &&
+            !isSubtypeOf(coreTypes.numNonNullableRawType, contextType,
+                SubtypeCheckMode.withNullabilities) &&
+            isSubtypeOf(type1, coreTypes.intNonNullableRawType,
+                SubtypeCheckMode.withNullabilities)) {
+          // If int <: C, not num <: C, and T <: int, then the context type of
+          // e2 is int.
+          return coreTypes.intNonNullableRawType;
+        } else if (isSubtypeOf(coreTypes.doubleNonNullableRawType, contextType,
+                SubtypeCheckMode.withNullabilities) &&
+            !isSubtypeOf(coreTypes.numNonNullableRawType, contextType,
+                SubtypeCheckMode.withNullabilities) &&
+            !isSubtypeOf(type1, coreTypes.doubleNonNullableRawType,
+                SubtypeCheckMode.withNullabilities)) {
+          // If double <: C, not num <: C, and not T <: double, then the context
+          // type of e2 is double.
+          return coreTypes.doubleNonNullableRawType;
+        } else {
+          // Otherwise, the context type of e2 is num.
+          return coreTypes.numNonNullableRawType;
+        }
       }
     }
-    return coreTypes.numRawType(type1.nullability);
+    return type2;
+  }
+
+  DartType getContextTypeOfSpecialCasedTernaryOperator(
+      DartType contextType, DartType receiverType, DartType operandType,
+      {bool isNonNullableByDefault: false}) {
+    if (isNonNullableByDefault) {
+      if (receiverType is! NeverType &&
+          isSubtypeOf(receiverType, coreTypes.numNonNullableRawType,
+              SubtypeCheckMode.withNullabilities)) {
+        // If e is an expression of the form e1.clamp(e2, e3) where C is the
+        // context type of e and T is the static type of e1 where T is a
+        // non-Never subtype of num, then:
+        if (isSubtypeOf(coreTypes.intNonNullableRawType, contextType,
+                SubtypeCheckMode.withNullabilities) &&
+            !isSubtypeOf(coreTypes.numNonNullableRawType, contextType,
+                SubtypeCheckMode.withNullabilities) &&
+            isSubtypeOf(receiverType, coreTypes.intNonNullableRawType,
+                SubtypeCheckMode.withNullabilities)) {
+          // If int <: C, not num <: C, and T <: int, then the context type of
+          // e2 and e3 is int.
+          return coreTypes.intNonNullableRawType;
+        } else if (isSubtypeOf(coreTypes.doubleNonNullableRawType, contextType,
+                SubtypeCheckMode.withNullabilities) &&
+            !isSubtypeOf(coreTypes.numNonNullableRawType, contextType,
+                SubtypeCheckMode.withNullabilities) &&
+            isSubtypeOf(receiverType, coreTypes.doubleNonNullableRawType,
+                SubtypeCheckMode.withNullabilities)) {
+          // If double <: C, not num <: C, and T <: double, then the context
+          // type of e2 and e3 is double.
+          return coreTypes.doubleNonNullableRawType;
+        } else {
+          // Otherwise the context type of e2 an e3 is num
+          return coreTypes.numNonNullableRawType;
+        }
+      }
+    }
+    return operandType;
   }
 
   /// Infers a generic type, function, method, or list/map literal
@@ -306,46 +357,6 @@
             preferUpwardsInference: !typeParam.isLegacyCovariant);
       }
     }
-
-    // If the downwards infer phase has failed, we'll catch this in the upwards
-    // phase later on.
-    if (downwardsInferPhase) {
-      return;
-    }
-
-    // Check the inferred types against all of the constraints.
-    Map<TypeParameter, DartType> knownTypes = <TypeParameter, DartType>{};
-    for (int i = 0; i < typeParametersToInfer.length; i++) {
-      TypeParameter typeParam = typeParametersToInfer[i];
-      TypeConstraint constraint = constraints[typeParam];
-      DartType typeParamBound =
-          Substitution.fromPairs(typeParametersToInfer, inferredTypes)
-              .substituteType(typeParam.bound);
-
-      DartType inferred = inferredTypes[i];
-      bool success = typeSatisfiesConstraint(inferred, constraint);
-      if (success && !hasOmittedBound(typeParam)) {
-        // If everything else succeeded, check the `extends` constraint.
-        DartType extendsConstraint = typeParamBound;
-        success = isSubtypeOf(
-            inferred, extendsConstraint, SubtypeCheckMode.withNullabilities);
-      }
-
-      if (!success) {
-        // TODO(paulberry): report error.
-
-        // Heuristic: even if we failed, keep the erroneous type.
-        // It should satisfy at least some of the constraints (e.g. the return
-        // context). If we fall back to instantiateToBounds, we'll typically get
-        // more errors (e.g. because `dynamic` is the most common bound).
-      }
-
-      if (isKnown(inferred)) {
-        knownTypes[typeParam] = inferred;
-      }
-    }
-
-    // TODO(paulberry): report any errors from instantiateToBounds.
   }
 
   @override
@@ -380,17 +391,22 @@
   ///
   /// This is a case of type-based overloading, which in Dart is only supported
   /// by giving special treatment to certain arithmetic operators.
-  bool isOverloadedArithmeticOperatorAndType(
-      Procedure member, DartType receiverType) {
-    // TODO(paulberry): this matches what is defined in the spec.  It would be
-    // nice if we could change kernel to match the spec and not have to
-    // override.
-    if (member.name.name == 'remainder') return false;
-    if (!(receiverType is InterfaceType &&
-        identical(receiverType.classNode, coreTypes.intClass))) {
-      return false;
+  bool isSpecialCasesBinaryForReceiverType(
+      Procedure member, DartType receiverType,
+      {bool isNonNullableByDefault}) {
+    assert(isNonNullableByDefault != null);
+    if (!isNonNullableByDefault) {
+      // TODO(paulberry): this matches what is defined in the spec.  It would be
+      // nice if we could change kernel to match the spec and not have to
+      // override.
+      if (member.name.name == 'remainder') return false;
+      if (!(receiverType is InterfaceType &&
+          identical(receiverType.classNode, coreTypes.intClass))) {
+        return false;
+      }
     }
-    return isOverloadedArithmeticOperator(member);
+    return isSpecialCasedBinaryOperator(member,
+        isNonNullableByDefault: isNonNullableByDefault);
   }
 
   @override
@@ -411,7 +427,8 @@
   /// If [isContravariant] is `true`, then we are solving for a contravariant
   /// type parameter which means we choose the upper bound rather than the
   /// lower bound for normally covariant type parameters.
-  DartType solveTypeConstraint(TypeConstraint constraint, DartType bottomType,
+  DartType solveTypeConstraint(
+      TypeConstraint constraint, DartType topType, DartType bottomType,
       {bool grounded: false, bool isContravariant: false}) {
     assert(bottomType == const NeverType(Nullability.nonNullable) ||
         bottomType == coreTypes.nullType);
@@ -424,12 +441,14 @@
       // e.g. `Iterable<?>`
       if (constraint.lower is! UnknownType) {
         return grounded
-            ? leastClosure(constraint.lower, const DynamicType(), bottomType)
+            ? leastClosure(constraint.lower, topType, bottomType)
             : constraint.lower;
-      } else {
+      } else if (constraint.upper is! UnknownType) {
         return grounded
-            ? greatestClosure(constraint.upper, const DynamicType(), bottomType)
+            ? greatestClosure(constraint.upper, topType, bottomType)
             : constraint.upper;
+      } else {
+        return grounded ? const DynamicType() : const UnknownType();
       }
     } else {
       // Prefer the known bound, if any.
@@ -440,12 +459,14 @@
       // e.g. `Iterable<?>`
       if (constraint.upper is! UnknownType) {
         return grounded
-            ? greatestClosure(constraint.upper, const DynamicType(), bottomType)
+            ? greatestClosure(constraint.upper, topType, bottomType)
             : constraint.upper;
-      } else {
+      } else if (constraint.lower is! UnknownType) {
         return grounded
-            ? leastClosure(constraint.lower, const DynamicType(), bottomType)
+            ? leastClosure(constraint.lower, topType, bottomType)
             : constraint.lower;
+      } else {
+        return grounded ? bottomType : const UnknownType();
       }
     }
   }
@@ -479,6 +500,9 @@
     return solveTypeConstraint(
         constraint,
         clientLibrary.isNonNullableByDefault
+            ? coreTypes.objectNullableRawType
+            : const DynamicType(),
+        clientLibrary.isNonNullableByDefault
             ? const NeverType(Nullability.nonNullable)
             : nullType,
         grounded: true,
@@ -490,6 +514,9 @@
     DartType t = solveTypeConstraint(
         constraint,
         clientLibrary.isNonNullableByDefault
+            ? coreTypes.objectNullableRawType
+            : const DynamicType(),
+        clientLibrary.isNonNullableByDefault
             ? const NeverType(Nullability.nonNullable)
             : nullType);
     if (!isKnown(t)) {
@@ -509,6 +536,9 @@
       return solveTypeConstraint(
           constraint,
           clientLibrary.isNonNullableByDefault
+              ? coreTypes.objectNullableRawType
+              : const DynamicType(),
+          clientLibrary.isNonNullableByDefault
               ? const NeverType(Nullability.nonNullable)
               : nullType);
     }
diff --git a/pkg/front_end/lib/src/fasta/util/textual_outline.dart b/pkg/front_end/lib/src/fasta/util/textual_outline.dart
index c3401cb..dca418e 100644
--- a/pkg/front_end/lib/src/fasta/util/textual_outline.dart
+++ b/pkg/front_end/lib/src/fasta/util/textual_outline.dart
@@ -311,7 +311,7 @@
 
 String _textualizeClass(TextualOutlineListener listener, Token beginToken,
     Token endToken, _TextualOutlineState originalState,
-    {bool throwOnUnexpected: false, bool model: false}) {
+    {bool throwOnUnexpected: false}) {
   Token token = beginToken;
   TokenPrinter tokenPrinter = new TokenPrinter();
   // Class header.
@@ -388,6 +388,7 @@
 
   @override
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index f5a8184..e375f71 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -5,16 +5,16 @@
 # Note that test/spelling: Status will have no effect. Spelling errors can
 # always be fixed by either spelling correctly or updating the dictionary.
 
-StrongModeNNBDButOptOut/analyzerCode: Fail
-StrongModeNNBDButOptOut/example: Fail
-
 AbstractClassInstantiation/example: Fail
-AbstractClassMember/part_wrapped_script5: Fail
-AbstractClassMember/part_wrapped_script6: Fail
-AbstractClassMember/script5: Fail
-AbstractClassMember/script6: Fail
+AbstractFieldConstructorInitializer/analyzerCode: Fail
+AbstractFieldInitializer/analyzerCode: Fail
+AbstractExtensionField/analyzerCode: Fail
+AbstractExtensionField/example: Fail
+AbstractExternalField/analyzerCode: Fail
+AbstractLateField/analyzerCode: Fail
 AbstractNotSync/example: Fail
 AbstractRedirectedClassInstantiation/example: Fail
+AbstractStaticField/analyzerCode: Fail
 AccessError/analyzerCode: Fail
 AccessError/example: Fail
 AmbiguousExtensionMethod/analyzerCode: Fail
@@ -122,6 +122,8 @@
 ConstEvalNonConstantVariableGet/example: Fail
 ConstEvalNotListOrSetInSpread/example: Fail
 ConstEvalNotMapInSpread/example: Fail
+ConstEvalNonNull/analyzerCode: Fail
+ConstEvalNonNull/example: Fail
 ConstEvalNullValue/example: Fail
 ConstEvalStartingPoint/analyzerCode: Fail # This is just used for displaying the starting point.
 ConstEvalStartingPoint/example: Fail # This is just used for displaying the starting point.
@@ -259,6 +261,9 @@
 ExternalFactoryRedirection/example: Fail
 ExternalFactoryWithBody/part_wrapped_script1: Fail
 ExternalFactoryWithBody/script1: Fail
+ExternalFieldConstructorInitializer/analyzerCode: Fail
+ExternalFieldInitializer/analyzerCode: Fail
+ExternalLateField/analyzerCode: Fail
 ExtraneousModifier/part_wrapped_script1: Fail
 ExtraneousModifier/part_wrapped_script10: Fail
 ExtraneousModifier/part_wrapped_script11: Fail
@@ -415,6 +420,8 @@
 InvalidInitializer/example: Fail
 InvalidPackageUri/analyzerCode: Fail
 InvalidPackageUri/example: Fail
+InvalidReturn/analyzerCode: Fail
+InvalidReturnAsync/analyzerCode: Fail
 InvalidSuperInInitializer/example: Fail
 InvalidThisInInitializer/example: Fail
 InvalidTypeVariableInSupertype/analyzerCode: Fail
@@ -432,8 +439,14 @@
 InvalidVoid/part_wrapped_script2: Fail
 InvalidVoid/script1: Fail
 InvalidVoid/script2: Fail
+JsInteropAnonymousFactoryPositionalParameters/analyzerCode: Fail # Web compiler specific
+JsInteropAnonymousFactoryPositionalParameters/example: Fail # Web compiler specific
+JsInteropEnclosingClassJSAnnotation/analyzerCode: Fail # Web compiler specific
+JsInteropEnclosingClassJSAnnotation/example: Fail # Web compiler specific
 JsInteropIndexNotSupported/analyzerCode: Fail # Web compiler specific
 JsInteropIndexNotSupported/example: Fail # Web compiler specific
+JsInteropNamedParameters/analyzerCode: Fail # Web compiler specific
+JsInteropNamedParameters/example: Fail # Web compiler specific
 JsInteropNonExternalConstructor/analyzerCode: Fail # Web compiler specific
 JsInteropNonExternalConstructor/example: Fail # Web compiler specific
 LanguageVersionInvalidInDotPackages/analyzerCode: Fail
@@ -636,6 +649,10 @@
 SpreadMapEntryTypeMismatch/analyzerCode: Fail # There's no analyzer code for that error yet.
 SpreadTypeMismatch/analyzerCode: Fail # There's no analyzer code for that error yet.
 StackOverflow/example: Fail
+StrongModeNNBDButOptOut/analyzerCode: Fail
+StrongModeNNBDButOptOut/example: Fail
+StrongModeNNBDPackageOptOut/analyzerCode: Fail
+StrongModeNNBDPackageOptOut/example: Fail
 SuperAsExpression/example: Fail
 SuperAsIdentifier/example: Fail
 SuperclassHasNoDefaultConstructor/example: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 7b44c74..f317340 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -132,6 +132,9 @@
 ConstEvalTruncateError:
   template: "Binary operator '#string ~/ #string2' results is Infinity or NaN."
 
+ConstEvalNonNull:
+  template: "Constant expression must be non-null."
+
 ConstEvalInvalidMethodInvocation:
   template: "The method '#string' can't be invoked on '#constant' in a constant expression."
   analyzerCode: UNDEFINED_OPERATOR
@@ -548,8 +551,53 @@
     - "abstract class C {abstract m();}"
     - "abstract class C {abstract get m;}"
     - "abstract class C {abstract set m(int x);}"
-    - "abstract class C {abstract f;}"
-    - "abstract class C {abstract static f;}"
+    - "abstract class C {abstract var f;}"
+    - "abstract class C {abstract static var f;}"
+
+AbstractExternalField:
+  template: "Fields can't be declared both 'abstract' and 'external'."
+  tip: "Try removing the 'abstract' or 'external' keyword."
+  configuration: nnbd-strong
+  script:
+    - "abstract class C {abstract external var f;}"
+    - "abstract class C {external abstract var f;}"
+
+AbstractStaticField:
+  template: "Static fields can't be declared 'abstract'."
+  tip: "Try removing the 'abstract' or 'static' keyword."
+  configuration: nnbd-strong
+  script:
+    - "abstract class C {abstract static var f;}"
+
+AbstractExtensionField:
+  template: "Extension fields can't be declared 'abstract'."
+  tip: "Try removing the 'abstract' keyword."
+# Separate class and extension field handling to to support this.
+#  configuration: nnbd-strong
+#  script:
+#    - "extension C on int {abstract static var f;}"
+
+AbstractFieldInitializer:
+  template: "Abstract fields cannot have initializers."
+  tip: "Try removing the initializer or the 'abstract' keyword."
+  configuration: nnbd-strong
+  script:
+    - "abstract class C {abstract var f = 0;}"
+
+AbstractFieldConstructorInitializer:
+  template: "Abstract fields cannot have initializers."
+  tip: "Try removing the field initializer or the 'abstract' keyword from the field declaration."
+  configuration: nnbd-strong
+  script:
+    - "abstract class C {abstract var f; C(this.f);}"
+    - "abstract class C {abstract var f; C() : this.f = 0;}"
+
+AbstractLateField:
+  template: "Abstract fields cannot be late."
+  tip: "Try removing the 'abstract' or 'late' keyword."
+  configuration: nnbd-strong
+  script:
+    - "abstract class C {abstract late var f;}"
 
 ClassInClass:
   index: 53
@@ -735,6 +783,31 @@
   script:
     - "class C { external var f; }"
 
+
+ExternalFieldInitializer:
+  template: "External fields cannot have initializers."
+  tip: "Try removing the initializer or the 'external' keyword."
+  configuration: nnbd-strong
+  script:
+    - "external var f = 0;"
+    - "abstract class C {external var f = 0;}"
+
+ExternalFieldConstructorInitializer:
+  template: "External fields cannot have initializers."
+  tip: "Try removing the field initializer or the 'external' keyword from the field declaration."
+  configuration: nnbd-strong
+  script:
+    - "abstract class C {external var f; C(this.f);}"
+    - "abstract class C {external var f; C() : this.f = 0;}"
+
+ExternalLateField:
+  template: "External fields cannot be late."
+  tip: "Try removing the 'external' or 'late' keyword."
+  configuration: nnbd-strong
+  script:
+    - "external late var f;"
+    - "abstract class C {external late var f;}"
+
 InitializerForStaticField:
   template: "'#name' isn't an instance field of this class."
   analyzerCode: INITIALIZER_FOR_STATIC_FIELD
@@ -1188,6 +1261,16 @@
 StrongModeNNBDButOptOut:
   template: "A library can't opt out of null safety by default, when using sound null safety."
 
+StrongModeNNBDPackageOptOut:
+  template:  |
+    Cannot run with sound null safety as one or more dependencies do not
+    support null safety:
+
+    #names
+
+    Run 'pub outdated --mode=null-safety' to determine if versions of your
+    dependencies supporting null safety are available.
+
 AbstractNotSync:
   template: "Abstract methods can't use 'async', 'async*', or 'sync*'."
   analyzerCode: NON_SYNC_ABSTRACT_METHOD
@@ -1819,18 +1902,6 @@
     lib2.dart: "class A {}"
     main.dart: "export 'lib1.dart'; export 'lib2.dart';"
 
-DuplicatedLibraryExport:
-  template: "A library with name '#name' is exported more than once."
-  analyzerCode: EXPORT_DUPLICATED_LIBRARY_NAMED
-  script:
-    lib1.dart: "library foo;"
-    lib2.dart: "library foo;"
-    main.dart: "export 'lib1.dart'; export 'lib2.dart';"
-
-DuplicatedLibraryExportContext:
-  template: "'#name' is also exported here."
-  severity: CONTEXT
-
 DuplicatedExportInType:
   template: "'#name' is exported from both '#uri' and '#uri2'."
 
@@ -1838,19 +1909,6 @@
   template: "'#name' is imported from both '#uri' and '#uri2'."
   severity: IGNORED
 
-DuplicatedLibraryImport:
-  template: "A library with name '#name' is imported more than once."
-  severity: WARNING
-  analyzerCode: IMPORT_DUPLICATED_LIBRARY_NAMED
-  script:
-    lib1.dart: "library foo;"
-    lib2.dart: "library foo;"
-    main.dart: "import 'lib1.dart'; import 'lib2.dart';"
-
-DuplicatedLibraryImportContext:
-  template: "'#name' is also imported here."
-  severity: CONTEXT
-
 DuplicatedImportInType:
   template: "'#name' is imported from both '#uri' and '#uri2'."
   analyzerCode: AMBIGUOUS_IMPORT
@@ -3413,6 +3471,16 @@
   configuration: nnbd-strong
   declaration: "Future<int> foo() async { return; }"
 
+InvalidReturn:
+  template: "A value of type '#type' can't be returned from a function with return type '#type2'."
+  configuration: nnbd-strong
+  declaration: "int foo() { return true; }"
+
+InvalidReturnAsync:
+  template: "A value of type '#type' can't be returned from an async function with return type '#type2'."
+  configuration: nnbd-strong
+  declaration: "Future<int> foo() async { return true; }"
+
 ImplicitReturnNull:
   template: "A non-null value must be returned since the return type '#type' doesn't allow null."
   configuration: nnbd-strong
@@ -3821,7 +3889,7 @@
   severity: CONTEXT
 
 NonNullAwareSpreadIsNull:
-  template: "Can't spread a value with static type Null."
+  template: "Can't spread a value with static type '#type'."
   script: >
     main() {
       <int>[...null];
@@ -4018,10 +4086,26 @@
 NullableMixinError:
   template: "Can't mix '#name' in because it's marked with '?'."
 
+JsInteropAnonymousFactoryPositionalParameters:
+  template: "Factory constructors for @anonymous JS interop classes should not contain any positional parameters."
+  tip: "Try replacing them with named parameters instead."
+
+JsInteropEnclosingClassJSAnnotation:
+  template: "Member has a JS interop annotation but the enclosing class does not."
+  tip: "Try adding the annotation to the enclosing class."
+
+JsInteropEnclosingClassJSAnnotationContext:
+  template: "This is the enclosing class."
+  severity: CONTEXT
+
 JsInteropIndexNotSupported:
   template: "JS interop classes do not support [] and []= operator methods."
   tip: "Try replacing with a normal method."
 
+JsInteropNamedParameters:
+  template: "Named parameters for JS interop functions are only allowed in a factory constructor of an @anonymous JS class."
+  tip: "Try replacing them with normal or optional parameters."
+
 JsInteropNonExternalConstructor:
   template: "JS interop classes do not support non-external constructors."
   tip: "Try annotating with `external`."
diff --git a/pkg/front_end/parser_testcases/error_recovery/bracket_mismatch_01.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/bracket_mismatch_01.dart.intertwined.expect
index 5b5ca89..75db5c6 100644
--- a/pkg/front_end/parser_testcases/error_recovery/bracket_mismatch_01.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/bracket_mismatch_01.dart.intertwined.expect
@@ -33,7 +33,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, C, DeclarationKind.Class, C, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, C, DeclarationKind.Class, C, false)
                 listener: beginMethod(null, null, null, null, null, C)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -76,7 +76,7 @@
                 listener: beginMetadataStar(C)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'SimpleType', null, m, DeclarationKind.Class, C, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', null, m, DeclarationKind.Class, C, false)
                 listener: beginMethod(null, null, null, null, null, m)
                 listener: handleIdentifier(C, typeReference)
                 listener: handleNoTypeArguments(m)
@@ -278,7 +278,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, D, DeclarationKind.Class, D, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, D, DeclarationKind.Class, D, false)
                 listener: beginMethod(null, null, null, null, null, D)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -321,7 +321,7 @@
                 listener: beginMetadataStar(D)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'SimpleType', null, m, DeclarationKind.Class, D, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', null, m, DeclarationKind.Class, D, false)
                 listener: beginMethod(null, null, null, null, null, m)
                 listener: handleIdentifier(D, typeReference)
                 listener: handleNoTypeArguments(m)
diff --git a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_general.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_general.crash_dart.intertwined.expect
index fec79f8..a6f2bc7 100644
--- a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_general.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_general.crash_dart.intertwined.expect
@@ -33,7 +33,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, foo)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -71,7 +71,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
@@ -133,7 +133,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
@@ -190,7 +190,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -227,7 +227,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -271,7 +271,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -318,7 +318,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -372,7 +372,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -439,7 +439,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -517,7 +517,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -560,7 +560,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -610,7 +610,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -657,7 +657,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -711,7 +711,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -778,7 +778,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -857,7 +857,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, external, null, null, null, null, external, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, external, null, null, null, null, external, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(external, null, null, null, null, Foo)
                 listener: handleNoType(external)
                 ensureIdentifierPotentiallyRecovered(external, methodDeclaration, false)
@@ -913,7 +913,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod(;, external, null, null, null, null, external, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, external, null, null, null, null, external, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(external, null, null, null, null, Foo)
                 listener: handleNoType(external)
                 ensureIdentifierPotentiallyRecovered(external, methodDeclaration, false)
@@ -990,13 +990,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(}, null, null, null, null, null, }, Instance of 'SimpleType', Foo, DeclarationKind.Class, Foo, false)
+              parseFields(}, null, null, null, null, null, null, }, Instance of 'SimpleType', Foo, DeclarationKind.Class, Foo, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(Foo)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(Foo, fieldDeclaration)
-                parseFieldInitializerOpt(Foo, Foo, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(Foo, Foo, null, null, null, null, DeclarationKind.Class, Foo)
                   reportRecoverableError(Foo, MemberWithSameNameAsClass)
                     listener: handleRecoverableError(MemberWithSameNameAsClass, Foo, Foo)
                   listener: handleNoFieldInitializer(;)
@@ -1008,23 +1008,23 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', A, DeclarationKind.Class, Foo, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', A, DeclarationKind.Class, Foo, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(A)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(A, fieldDeclaration)
-                parseFieldInitializerOpt(A, A, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(A, A, null, null, null, null, DeclarationKind.Class, Foo)
                   listener: handleNoFieldInitializer(,)
                 ensureIdentifier(,, fieldDeclaration)
                   listener: handleIdentifier(Foo, fieldDeclaration)
-                parseFieldInitializerOpt(Foo, Foo, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(Foo, Foo, null, null, null, null, DeclarationKind.Class, Foo)
                   reportRecoverableError(Foo, MemberWithSameNameAsClass)
                     listener: handleRecoverableError(MemberWithSameNameAsClass, Foo, Foo)
                   listener: handleNoFieldInitializer(,)
                 ensureIdentifier(,, fieldDeclaration)
                   listener: handleIdentifier(B, fieldDeclaration)
-                parseFieldInitializerOpt(B, B, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(B, B, null, null, null, null, DeclarationKind.Class, Foo)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, null, null, 3, int, ;)
               listener: endMember()
diff --git a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_get.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_get.crash_dart.intertwined.expect
index c85db7e..5d87d53 100644
--- a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_get.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_get.crash_dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', get, foo, DeclarationKind.Class, Foo, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', get, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, foo)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -71,7 +71,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', get, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', get, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -134,7 +134,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', get, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', get, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.intertwined.expect
index 65a470c..9fd9286 100644
--- a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'VoidType', null, foo, DeclarationKind.Class, Foo, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'VoidType', null, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, foo)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
@@ -71,7 +71,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'VoidType', null, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'VoidType', null, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, foo)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
@@ -134,7 +134,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'VoidType', null, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'VoidType', null, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, foo)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_set.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_set.crash_dart.intertwined.expect
index 700b32f..41adc50 100644
--- a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_set.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_bad_name_set.crash_dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', set, foo, DeclarationKind.Class, Foo, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', set, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, foo)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -71,7 +71,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', set, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', set, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -134,7 +134,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', set, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', set, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_get.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_get.dart.intertwined.expect
index 942c9f8..8dd7398 100644
--- a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_get.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_get.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -67,7 +67,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -126,7 +126,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
@@ -163,7 +163,7 @@
                 listener: beginMetadataStar(get)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', get, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, get, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(get, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_ok.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_ok.dart.intertwined.expect
index fa9e673..742aa8b 100644
--- a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_ok.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_ok.dart.intertwined.expect
@@ -33,7 +33,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -65,7 +65,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
@@ -121,7 +121,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
@@ -157,7 +157,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_operator.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_operator.crash_dart.intertwined.expect
index 83c7426..a035119 100644
--- a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_operator.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_operator.crash_dart.intertwined.expect
@@ -33,7 +33,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -68,12 +68,12 @@
                 listener: beginMetadataStar(/)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(}, }, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, Foo)
-                parseInvalidOperatorDeclaration(}, null, null, null, null, null, }, DeclarationKind.Class, Foo)
+              recoverFromInvalidMember(}, }, null, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, Foo)
+                parseInvalidOperatorDeclaration(}, null, null, null, null, null, null, }, DeclarationKind.Class, Foo)
                   reportRecoverableError(/, MissingOperatorKeyword)
                     listener: handleRecoverableError(MissingOperatorKeyword, /, /)
                   rewriter()
-                  parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, operator, DeclarationKind.Class, Foo, false)
+                  parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, operator, DeclarationKind.Class, Foo, false)
                     listener: beginMethod(null, null, null, null, null, operator)
                     listener: handleNoType(})
                     parseOperatorName(})
@@ -128,7 +128,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
@@ -163,7 +163,7 @@
                 listener: beginMetadataStar(.)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(}, }, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, Foo)
+              recoverFromInvalidMember(}, }, null, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, Foo)
                 reportRecoverableErrorWithToken(., Instance of 'Template<(Token) => Message>')
                   listener: handleRecoverableError(Message[ExpectedClassMember, Expected a class member, but got '.'., null, {token: .}], ., .)
                 listener: handleInvalidMember(.)
@@ -174,12 +174,12 @@
                 listener: beginMetadataStar(/)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(., ., null, null, null, null, null, ., Instance of 'NoType', null, DeclarationKind.Class, Foo)
-                parseInvalidOperatorDeclaration(., null, null, null, null, null, ., DeclarationKind.Class, Foo)
+              recoverFromInvalidMember(., ., null, null, null, null, null, null, ., Instance of 'NoType', null, DeclarationKind.Class, Foo)
+                parseInvalidOperatorDeclaration(., null, null, null, null, null, null, ., DeclarationKind.Class, Foo)
                   reportRecoverableError(/, MissingOperatorKeyword)
                     listener: handleRecoverableError(MissingOperatorKeyword, /, /)
                   rewriter()
-                  parseMethod(., null, null, null, null, null, ., Instance of 'NoType', null, operator, DeclarationKind.Class, Foo, false)
+                  parseMethod(., null, null, null, null, null, null, ., Instance of 'NoType', null, operator, DeclarationKind.Class, Foo, false)
                     listener: beginMethod(null, null, null, null, null, operator)
                     listener: handleNoType(.)
                     parseOperatorName(.)
@@ -234,7 +234,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
@@ -269,12 +269,12 @@
                 listener: beginMetadataStar(/)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(}, }, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, Foo)
-                parseInvalidOperatorDeclaration(}, null, null, null, null, null, }, DeclarationKind.Class, Foo)
+              recoverFromInvalidMember(}, }, null, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, Foo)
+                parseInvalidOperatorDeclaration(}, null, null, null, null, null, null, }, DeclarationKind.Class, Foo)
                   reportRecoverableError(/, MissingOperatorKeyword)
                     listener: handleRecoverableError(MissingOperatorKeyword, /, /)
                   rewriter()
-                  parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, operator, DeclarationKind.Class, Foo, false)
+                  parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, operator, DeclarationKind.Class, Foo, false)
                     listener: beginMethod(null, null, null, null, null, operator)
                     listener: handleNoType(})
                     parseOperatorName(})
@@ -329,7 +329,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
@@ -364,7 +364,7 @@
                 listener: beginMetadataStar(.)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(}, }, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, Foo)
+              recoverFromInvalidMember(}, }, null, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, Foo)
                 reportRecoverableErrorWithToken(., Instance of 'Template<(Token) => Message>')
                   listener: handleRecoverableError(Message[ExpectedClassMember, Expected a class member, but got '.'., null, {token: .}], ., .)
                 listener: handleInvalidMember(.)
@@ -375,12 +375,12 @@
                 listener: beginMetadataStar(/)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(., ., null, null, null, null, null, ., Instance of 'NoType', null, DeclarationKind.Class, Foo)
-                parseInvalidOperatorDeclaration(., null, null, null, null, null, ., DeclarationKind.Class, Foo)
+              recoverFromInvalidMember(., ., null, null, null, null, null, null, ., Instance of 'NoType', null, DeclarationKind.Class, Foo)
+                parseInvalidOperatorDeclaration(., null, null, null, null, null, null, ., DeclarationKind.Class, Foo)
                   reportRecoverableError(/, MissingOperatorKeyword)
                     listener: handleRecoverableError(MissingOperatorKeyword, /, /)
                   rewriter()
-                  parseMethod(., null, null, null, null, null, ., Instance of 'NoType', null, operator, DeclarationKind.Class, Foo, false)
+                  parseMethod(., null, null, null, null, null, null, ., Instance of 'NoType', null, operator, DeclarationKind.Class, Foo, false)
                     listener: beginMethod(null, null, null, null, null, operator)
                     listener: handleNoType(.)
                     parseOperatorName(.)
diff --git a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_return_type.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_return_type.dart.intertwined.expect
index b1b218d..4bbafcb 100644
--- a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_return_type.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_return_type.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'VoidType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'VoidType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
@@ -65,7 +65,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'VoidType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'VoidType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
@@ -122,7 +122,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'VoidType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'VoidType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
@@ -159,7 +159,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'VoidType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'VoidType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_set.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_set.dart.intertwined.expect
index 572e2e5..223fd14 100644
--- a/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_set.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/constructor_recovery_set.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -65,7 +65,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -122,7 +122,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -159,7 +159,7 @@
                 listener: beginMetadataStar(set)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', set, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, set, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_39026.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_39026.crash_dart.intertwined.expect
index a182540..740482c 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_39026.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_39026.crash_dart.intertwined.expect
@@ -32,11 +32,11 @@
                 listener: beginMetadataStar(co)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseInvalidOperatorDeclaration({, null, null, null, null, null, {, DeclarationKind.Class, A)
+              parseInvalidOperatorDeclaration({, null, null, null, null, null, null, {, DeclarationKind.Class, A)
                 reportRecoverableError(<, MissingOperatorKeyword)
                   listener: handleRecoverableError(MissingOperatorKeyword, <, <)
                 rewriter()
-                parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', null, operator, DeclarationKind.Class, A, false)
+                parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, operator, DeclarationKind.Class, A, false)
                   listener: beginMethod(null, null, null, null, null, operator)
                   listener: handleIdentifier(co, typeReference)
                   listener: handleNoTypeArguments(operator)
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_39026_prime.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_39026_prime.crash_dart.intertwined.expect
index cc5f502..cb81bba 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_39026_prime.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_39026_prime.crash_dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(co)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', null, operator, DeclarationKind.Class, A, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, operator, DeclarationKind.Class, A, false)
                 listener: beginMethod(null, null, null, null, null, operator)
                 listener: handleIdentifier(co, typeReference)
                 listener: handleNoTypeArguments(operator)
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_39060.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_39060.dart.expect
index a94d802..9d88a31 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_39060.dart.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_39060.dart.expect
@@ -37,7 +37,7 @@
           beginVariablesDeclaration(A, null, null)
             handleIdentifier(A, localVariableDeclaration)
             beginInitializedIdentifier(A)
-              handleNoVariableInitializer(<)
+              handleNoVariableInitializer(A)
             endInitializedIdentifier(A)
             handleRecoverableError(Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}], A, A)
           endVariablesDeclaration(1, ;)
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_39060.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_39060.dart.intertwined.expect
index e5d85d2..5c0352c 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_39060.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_39060.dart.intertwined.expect
@@ -49,7 +49,7 @@
                             listener: handleIdentifier(A, localVariableDeclaration)
                           listener: beginInitializedIdentifier(A)
                           parseVariableInitializerOpt(A)
-                            listener: handleNoVariableInitializer(<)
+                            listener: handleNoVariableInitializer(A)
                           listener: endInitializedIdentifier(A)
                         ensureSemicolon(A)
                           reportRecoverableError(A, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_39202.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_39202.crash_dart.intertwined.expect
index bcf47c6..7bc6caa 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_39202.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_39202.crash_dart.intertwined.expect
@@ -75,7 +75,7 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(b)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', $, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', $, DeclarationKind.TopLevel, null, false)
         ensureIdentifier(;, typeReference)
           listener: handleIdentifier(b, typeReference)
         listener: beginTypeArguments(<)
@@ -92,7 +92,7 @@
               listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got ''., null, {token: }], , )
             rewriter()
           listener: handleIdentifier(, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(, , null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(, , null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer()
         ensureSemicolon()
           reportRecoverableError(, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_39230.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_39230.crash_dart.intertwined.expect
index 2310e8e..3784f8cb 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_39230.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_39230.crash_dart.intertwined.expect
@@ -33,7 +33,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, C, DeclarationKind.Class, C, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, C, DeclarationKind.Class, C, false)
                 listener: beginMethod(null, null, null, null, null, C)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -68,12 +68,12 @@
                 listener: beginMetadataStar(/)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(}, }, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, C)
-                parseInvalidOperatorDeclaration(}, null, null, null, null, null, }, DeclarationKind.Class, C)
+              recoverFromInvalidMember(}, }, null, null, null, null, null, null, }, Instance of 'NoType', null, DeclarationKind.Class, C)
+                parseInvalidOperatorDeclaration(}, null, null, null, null, null, null, }, DeclarationKind.Class, C)
                   reportRecoverableError(/, MissingOperatorKeyword)
                     listener: handleRecoverableError(MissingOperatorKeyword, /, /)
                   rewriter()
-                  parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, operator, DeclarationKind.Class, C, false)
+                  parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, operator, DeclarationKind.Class, C, false)
                     listener: beginMethod(null, null, null, null, null, operator)
                     listener: handleNoType(})
                     parseOperatorName(})
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.expect
index d5d26ac..885081b 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.expect
@@ -60,8 +60,8 @@
       handleType(Object, null)
       handleClassExtends(extends)
       beginTypeList(M)
-        handleNoTypeVariables(()
         beginFunctionType(M)
+          handleNoTypeVariables(()
           handleIdentifier(M, typeReference)
           beginTypeArguments(<)
             handleIdentifier(dynamic, typeReference)
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.intertwined.expect
index 52766bc..bceda2e 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.intertwined.expect
@@ -92,8 +92,8 @@
             parseWithClauseOpt(Object)
               parseTypeList(with)
                 listener: beginTypeList(M)
-                listener: handleNoTypeVariables(()
                 listener: beginFunctionType(M)
+                listener: handleNoTypeVariables(()
                 ensureIdentifier(with, typeReference)
                   listener: handleIdentifier(M, typeReference)
                 listener: beginTypeArguments(<)
diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_fields.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_fields.dart.intertwined.expect
index 880586e..71e5c0c 100644
--- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_fields.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_fields.dart.intertwined.expect
@@ -32,13 +32,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleType', abstract, DeclarationKind.Class, WrapperClass, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleType', abstract, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(abstract)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(abstract, fieldDeclaration)
-                parseFieldInitializerOpt(abstract, abstract, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(abstract, abstract, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -55,13 +55,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', as, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', as, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(as)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(as, fieldDeclaration)
-                parseFieldInitializerOpt(as, as, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(as, as, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -80,7 +80,7 @@
               listener: beginMember()
               isReservedKeyword(assert)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', assert, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', assert, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(assert)
                 listener: handleType(int, null)
@@ -88,7 +88,7 @@
                   reportRecoverableErrorWithToken(assert, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'assert'., null, {token: assert}], assert, assert)
                   listener: handleIdentifier(assert, fieldDeclaration)
-                parseFieldInitializerOpt(assert, assert, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(assert, assert, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -105,13 +105,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', async, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', async, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(async)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(async, fieldDeclaration)
-                parseFieldInitializerOpt(async, async, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(async, async, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -128,13 +128,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', await, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', await, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(await)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(await, fieldDeclaration)
-                parseFieldInitializerOpt(await, await, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(await, await, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -153,7 +153,7 @@
               listener: beginMember()
               isReservedKeyword(break)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', break, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', break, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(break)
                 listener: handleType(int, null)
@@ -161,7 +161,7 @@
                   reportRecoverableErrorWithToken(break, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'break'., null, {token: break}], break, break)
                   listener: handleIdentifier(break, fieldDeclaration)
-                parseFieldInitializerOpt(break, break, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(break, break, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -180,7 +180,7 @@
               listener: beginMember()
               isReservedKeyword(case)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', case, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', case, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(case)
                 listener: handleType(int, null)
@@ -188,7 +188,7 @@
                   reportRecoverableErrorWithToken(case, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'case'., null, {token: case}], case, case)
                   listener: handleIdentifier(case, fieldDeclaration)
-                parseFieldInitializerOpt(case, case, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(case, case, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -207,7 +207,7 @@
               listener: beginMember()
               isReservedKeyword(catch)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', catch, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', catch, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(catch)
                 listener: handleType(int, null)
@@ -215,7 +215,7 @@
                   reportRecoverableErrorWithToken(catch, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'catch'., null, {token: catch}], catch, catch)
                   listener: handleIdentifier(catch, fieldDeclaration)
-                parseFieldInitializerOpt(catch, catch, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(catch, catch, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -234,7 +234,7 @@
               listener: beginMember()
               isReservedKeyword(class)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', class, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', class, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(class)
                 listener: handleType(int, null)
@@ -242,7 +242,7 @@
                   reportRecoverableErrorWithToken(class, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'class'., null, {token: class}], class, class)
                   listener: handleIdentifier(class, fieldDeclaration)
-                parseFieldInitializerOpt(class, class, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(class, class, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -261,7 +261,7 @@
               listener: beginMember()
               isReservedKeyword(const)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', const, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', const, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(const)
                 listener: handleType(int, null)
@@ -269,7 +269,7 @@
                   reportRecoverableErrorWithToken(const, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'const'., null, {token: const}], const, const)
                   listener: handleIdentifier(const, fieldDeclaration)
-                parseFieldInitializerOpt(const, const, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(const, const, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -288,7 +288,7 @@
               listener: beginMember()
               isReservedKeyword(continue)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', continue, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', continue, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(continue)
                 listener: handleType(int, null)
@@ -296,7 +296,7 @@
                   reportRecoverableErrorWithToken(continue, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'continue'., null, {token: continue}], continue, continue)
                   listener: handleIdentifier(continue, fieldDeclaration)
-                parseFieldInitializerOpt(continue, continue, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(continue, continue, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -313,13 +313,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', covariant, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', covariant, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(covariant)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(covariant, fieldDeclaration)
-                parseFieldInitializerOpt(covariant, covariant, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(covariant, covariant, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -338,7 +338,7 @@
               listener: beginMember()
               isReservedKeyword(default)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', default, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', default, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(default)
                 listener: handleType(int, null)
@@ -346,7 +346,7 @@
                   reportRecoverableErrorWithToken(default, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'default'., null, {token: default}], default, default)
                   listener: handleIdentifier(default, fieldDeclaration)
-                parseFieldInitializerOpt(default, default, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(default, default, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -363,13 +363,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', deferred, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', deferred, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(deferred)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(deferred, fieldDeclaration)
-                parseFieldInitializerOpt(deferred, deferred, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(deferred, deferred, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -388,7 +388,7 @@
               listener: beginMember()
               isReservedKeyword(do)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', do, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', do, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(do)
                 listener: handleType(int, null)
@@ -396,7 +396,7 @@
                   reportRecoverableErrorWithToken(do, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'do'., null, {token: do}], do, do)
                   listener: handleIdentifier(do, fieldDeclaration)
-                parseFieldInitializerOpt(do, do, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(do, do, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -413,13 +413,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', dynamic, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', dynamic, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(dynamic)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(dynamic, fieldDeclaration)
-                parseFieldInitializerOpt(dynamic, dynamic, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(dynamic, dynamic, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -438,7 +438,7 @@
               listener: beginMember()
               isReservedKeyword(else)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', else, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', else, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(else)
                 listener: handleType(int, null)
@@ -446,7 +446,7 @@
                   reportRecoverableErrorWithToken(else, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'else'., null, {token: else}], else, else)
                   listener: handleIdentifier(else, fieldDeclaration)
-                parseFieldInitializerOpt(else, else, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(else, else, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -465,7 +465,7 @@
               listener: beginMember()
               isReservedKeyword(enum)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', enum, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', enum, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(enum)
                 listener: handleType(int, null)
@@ -473,7 +473,7 @@
                   reportRecoverableErrorWithToken(enum, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'enum'., null, {token: enum}], enum, enum)
                   listener: handleIdentifier(enum, fieldDeclaration)
-                parseFieldInitializerOpt(enum, enum, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(enum, enum, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -490,13 +490,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', export, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', export, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(export)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(export, fieldDeclaration)
-                parseFieldInitializerOpt(export, export, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(export, export, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -515,7 +515,7 @@
               listener: beginMember()
               isReservedKeyword(extends)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', extends, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', extends, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(extends)
                 listener: handleType(int, null)
@@ -523,7 +523,7 @@
                   reportRecoverableErrorWithToken(extends, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extends'., null, {token: extends}], extends, extends)
                   listener: handleIdentifier(extends, fieldDeclaration)
-                parseFieldInitializerOpt(extends, extends, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(extends, extends, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -540,13 +540,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', extension, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', extension, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(extension)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(extension, fieldDeclaration)
-                parseFieldInitializerOpt(extension, extension, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(extension, extension, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -563,13 +563,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', external, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', external, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(external)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(external, fieldDeclaration)
-                parseFieldInitializerOpt(external, external, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(external, external, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -586,13 +586,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', factory, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', factory, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(factory)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(factory, fieldDeclaration)
-                parseFieldInitializerOpt(factory, factory, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(factory, factory, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -611,7 +611,7 @@
               listener: beginMember()
               isReservedKeyword(false)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', false, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', false, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(false)
                 listener: handleType(int, null)
@@ -619,7 +619,7 @@
                   reportRecoverableErrorWithToken(false, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'false'., null, {token: false}], false, false)
                   listener: handleIdentifier(false, fieldDeclaration)
-                parseFieldInitializerOpt(false, false, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(false, false, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -638,7 +638,7 @@
               listener: beginMember()
               isReservedKeyword(final)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', final, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', final, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(final)
                 listener: handleType(int, null)
@@ -646,7 +646,7 @@
                   reportRecoverableErrorWithToken(final, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'final'., null, {token: final}], final, final)
                   listener: handleIdentifier(final, fieldDeclaration)
-                parseFieldInitializerOpt(final, final, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(final, final, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -665,7 +665,7 @@
               listener: beginMember()
               isReservedKeyword(finally)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', finally, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', finally, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(finally)
                 listener: handleType(int, null)
@@ -673,7 +673,7 @@
                   reportRecoverableErrorWithToken(finally, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'finally'., null, {token: finally}], finally, finally)
                   listener: handleIdentifier(finally, fieldDeclaration)
-                parseFieldInitializerOpt(finally, finally, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(finally, finally, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -692,7 +692,7 @@
               listener: beginMember()
               isReservedKeyword(for)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', for, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', for, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(for)
                 listener: handleType(int, null)
@@ -700,7 +700,7 @@
                   reportRecoverableErrorWithToken(for, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'for'., null, {token: for}], for, for)
                   listener: handleIdentifier(for, fieldDeclaration)
-                parseFieldInitializerOpt(for, for, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(for, for, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -717,13 +717,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', Function, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', Function, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(Function)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(Function, fieldDeclaration)
-                parseFieldInitializerOpt(Function, Function, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(Function, Function, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -741,13 +741,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', get, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', get, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(get, fieldDeclaration)
-                parseFieldInitializerOpt(get, get, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(get, get, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -764,13 +764,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', hide, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', hide, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(hide)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(hide, fieldDeclaration)
-                parseFieldInitializerOpt(hide, hide, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(hide, hide, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -789,7 +789,7 @@
               listener: beginMember()
               isReservedKeyword(if)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', if, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', if, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(if)
                 listener: handleType(int, null)
@@ -797,7 +797,7 @@
                   reportRecoverableErrorWithToken(if, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'if'., null, {token: if}], if, if)
                   listener: handleIdentifier(if, fieldDeclaration)
-                parseFieldInitializerOpt(if, if, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(if, if, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -814,13 +814,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', implements, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', implements, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(implements)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(implements, fieldDeclaration)
-                parseFieldInitializerOpt(implements, implements, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(implements, implements, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -837,13 +837,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', import, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', import, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(import)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(import, fieldDeclaration)
-                parseFieldInitializerOpt(import, import, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(import, import, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -862,7 +862,7 @@
               listener: beginMember()
               isReservedKeyword(in)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', in, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', in, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(in)
                 listener: handleType(int, null)
@@ -870,7 +870,7 @@
                   reportRecoverableErrorWithToken(in, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'in'., null, {token: in}], in, in)
                   listener: handleIdentifier(in, fieldDeclaration)
-                parseFieldInitializerOpt(in, in, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(in, in, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -887,13 +887,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', inout, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', inout, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(inout)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(inout, fieldDeclaration)
-                parseFieldInitializerOpt(inout, inout, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(inout, inout, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -910,13 +910,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', interface, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', interface, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(interface)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(interface, fieldDeclaration)
-                parseFieldInitializerOpt(interface, interface, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(interface, interface, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -935,7 +935,7 @@
               listener: beginMember()
               isReservedKeyword(is)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', is, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', is, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(is)
                 listener: handleType(int, null)
@@ -943,7 +943,7 @@
                   reportRecoverableErrorWithToken(is, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'is'., null, {token: is}], is, is)
                   listener: handleIdentifier(is, fieldDeclaration)
-                parseFieldInitializerOpt(is, is, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(is, is, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -960,13 +960,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', late, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', late, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(late)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(late, fieldDeclaration)
-                parseFieldInitializerOpt(late, late, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(late, late, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -983,13 +983,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', library, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', library, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(library)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(library, fieldDeclaration)
-                parseFieldInitializerOpt(library, library, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(library, library, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1006,13 +1006,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', mixin, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', mixin, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(mixin)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(mixin, fieldDeclaration)
-                parseFieldInitializerOpt(mixin, mixin, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(mixin, mixin, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1029,13 +1029,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', native, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', native, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(native)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(native, fieldDeclaration)
-                parseFieldInitializerOpt(native, native, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(native, native, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1054,7 +1054,7 @@
               listener: beginMember()
               isReservedKeyword(new)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', new, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', new, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(new)
                 listener: handleType(int, null)
@@ -1062,7 +1062,7 @@
                   reportRecoverableErrorWithToken(new, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'new'., null, {token: new}], new, new)
                   listener: handleIdentifier(new, fieldDeclaration)
-                parseFieldInitializerOpt(new, new, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(new, new, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1081,7 +1081,7 @@
               listener: beginMember()
               isReservedKeyword(null)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', null, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', null, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(null)
                 listener: handleType(int, null)
@@ -1089,7 +1089,7 @@
                   reportRecoverableErrorWithToken(null, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'null'., null, {token: null}], null, null)
                   listener: handleIdentifier(null, fieldDeclaration)
-                parseFieldInitializerOpt(null, null, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(null, null, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1106,13 +1106,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', of, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', of, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(of)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(of, fieldDeclaration)
-                parseFieldInitializerOpt(of, of, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(of, of, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1129,13 +1129,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', on, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', on, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(on)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(on, fieldDeclaration)
-                parseFieldInitializerOpt(on, on, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(on, on, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1153,13 +1153,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isUnaryMinus(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', operator, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', operator, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(operator)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(operator, fieldDeclaration)
-                parseFieldInitializerOpt(operator, operator, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(operator, operator, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1176,13 +1176,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', out, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', out, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(out)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(out, fieldDeclaration)
-                parseFieldInitializerOpt(out, out, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(out, out, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1199,13 +1199,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', part, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', part, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(part)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(part, fieldDeclaration)
-                parseFieldInitializerOpt(part, part, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(part, part, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1222,13 +1222,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', patch, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', patch, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(patch)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(patch, fieldDeclaration)
-                parseFieldInitializerOpt(patch, patch, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(patch, patch, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1245,13 +1245,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', required, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', required, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(required)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(required, fieldDeclaration)
-                parseFieldInitializerOpt(required, required, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(required, required, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1270,7 +1270,7 @@
               listener: beginMember()
               isReservedKeyword(rethrow)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', rethrow, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', rethrow, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(rethrow)
                 listener: handleType(int, null)
@@ -1278,7 +1278,7 @@
                   reportRecoverableErrorWithToken(rethrow, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'rethrow'., null, {token: rethrow}], rethrow, rethrow)
                   listener: handleIdentifier(rethrow, fieldDeclaration)
-                parseFieldInitializerOpt(rethrow, rethrow, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(rethrow, rethrow, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1297,7 +1297,7 @@
               listener: beginMember()
               isReservedKeyword(return)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', return, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', return, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(return)
                 listener: handleType(int, null)
@@ -1305,7 +1305,7 @@
                   reportRecoverableErrorWithToken(return, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'return'., null, {token: return}], return, return)
                   listener: handleIdentifier(return, fieldDeclaration)
-                parseFieldInitializerOpt(return, return, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(return, return, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1323,13 +1323,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', set, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', set, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(set)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(set, fieldDeclaration)
-                parseFieldInitializerOpt(set, set, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(set, set, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1346,13 +1346,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', show, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', show, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(show)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(show, fieldDeclaration)
-                parseFieldInitializerOpt(show, show, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(show, show, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1369,13 +1369,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', source, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', source, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(source)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(source, fieldDeclaration)
-                parseFieldInitializerOpt(source, source, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(source, source, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1392,13 +1392,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', static, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', static, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(static)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(static, fieldDeclaration)
-                parseFieldInitializerOpt(static, static, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(static, static, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1417,7 +1417,7 @@
               listener: beginMember()
               isReservedKeyword(super)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', super, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', super, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(super)
                 listener: handleType(int, null)
@@ -1425,7 +1425,7 @@
                   reportRecoverableErrorWithToken(super, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'super'., null, {token: super}], super, super)
                   listener: handleIdentifier(super, fieldDeclaration)
-                parseFieldInitializerOpt(super, super, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(super, super, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1444,7 +1444,7 @@
               listener: beginMember()
               isReservedKeyword(switch)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', switch, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', switch, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(switch)
                 listener: handleType(int, null)
@@ -1452,7 +1452,7 @@
                   reportRecoverableErrorWithToken(switch, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'switch'., null, {token: switch}], switch, switch)
                   listener: handleIdentifier(switch, fieldDeclaration)
-                parseFieldInitializerOpt(switch, switch, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(switch, switch, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1469,13 +1469,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', sync, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', sync, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(sync)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(sync, fieldDeclaration)
-                parseFieldInitializerOpt(sync, sync, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(sync, sync, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1492,8 +1492,8 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(int, ;, null, null, null, null, null, ;, Instance of 'SimpleType', null, DeclarationKind.Class, WrapperClass)
-                parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', this, DeclarationKind.Class, WrapperClass, false)
+              recoverFromInvalidMember(int, ;, null, null, null, null, null, null, ;, Instance of 'SimpleType', null, DeclarationKind.Class, WrapperClass)
+                parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', this, DeclarationKind.Class, WrapperClass, false)
                   listener: handleIdentifier(int, typeReference)
                   listener: handleNoTypeArguments(this)
                   listener: handleType(int, null)
@@ -1501,7 +1501,7 @@
                     reportRecoverableErrorWithToken(this, Instance of 'Template<(Token) => Message>')
                       listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'this'., null, {token: this}], this, this)
                     listener: handleIdentifier(this, fieldDeclaration)
-                  parseFieldInitializerOpt(this, this, null, null, DeclarationKind.Class, WrapperClass)
+                  parseFieldInitializerOpt(this, this, null, null, null, null, DeclarationKind.Class, WrapperClass)
                     listener: beginFieldInitializer(=)
                     parseExpression(=)
                       parsePrecedenceExpression(=, 1, true)
@@ -1520,7 +1520,7 @@
               listener: beginMember()
               isReservedKeyword(throw)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', throw, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', throw, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(throw)
                 listener: handleType(int, null)
@@ -1528,7 +1528,7 @@
                   reportRecoverableErrorWithToken(throw, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'throw'., null, {token: throw}], throw, throw)
                   listener: handleIdentifier(throw, fieldDeclaration)
-                parseFieldInitializerOpt(throw, throw, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(throw, throw, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1547,7 +1547,7 @@
               listener: beginMember()
               isReservedKeyword(true)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', true, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', true, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(true)
                 listener: handleType(int, null)
@@ -1555,7 +1555,7 @@
                   reportRecoverableErrorWithToken(true, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'true'., null, {token: true}], true, true)
                   listener: handleIdentifier(true, fieldDeclaration)
-                parseFieldInitializerOpt(true, true, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(true, true, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1574,7 +1574,7 @@
               listener: beginMember()
               isReservedKeyword(try)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', try, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', try, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(try)
                 listener: handleType(int, null)
@@ -1582,7 +1582,7 @@
                   reportRecoverableErrorWithToken(try, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'try'., null, {token: try}], try, try)
                   listener: handleIdentifier(try, fieldDeclaration)
-                parseFieldInitializerOpt(try, try, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(try, try, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1599,13 +1599,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', typedef, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', typedef, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(typedef)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(typedef, fieldDeclaration)
-                parseFieldInitializerOpt(typedef, typedef, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(typedef, typedef, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1624,7 +1624,7 @@
               listener: beginMember()
               isReservedKeyword(var)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', var, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', var, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(var)
                 listener: handleType(int, null)
@@ -1632,7 +1632,7 @@
                   reportRecoverableErrorWithToken(var, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'var'., null, {token: var}], var, var)
                   listener: handleIdentifier(var, fieldDeclaration)
-                parseFieldInitializerOpt(var, var, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(var, var, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1651,7 +1651,7 @@
               listener: beginMember()
               isReservedKeyword(void)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', void, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', void, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(void)
                 listener: handleType(int, null)
@@ -1659,7 +1659,7 @@
                   reportRecoverableErrorWithToken(void, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'void'., null, {token: void}], void, void)
                   listener: handleIdentifier(void, fieldDeclaration)
-                parseFieldInitializerOpt(void, void, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(void, void, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1678,7 +1678,7 @@
               listener: beginMember()
               isReservedKeyword(while)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', while, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', while, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(while)
                 listener: handleType(int, null)
@@ -1686,7 +1686,7 @@
                   reportRecoverableErrorWithToken(while, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'while'., null, {token: while}], while, while)
                   listener: handleIdentifier(while, fieldDeclaration)
-                parseFieldInitializerOpt(while, while, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(while, while, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1705,7 +1705,7 @@
               listener: beginMember()
               isReservedKeyword(with)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', with, DeclarationKind.Class, WrapperClass, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', with, DeclarationKind.Class, WrapperClass, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(with)
                 listener: handleType(int, null)
@@ -1713,7 +1713,7 @@
                   reportRecoverableErrorWithToken(with, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'with'., null, {token: with}], with, with)
                   listener: handleIdentifier(with, fieldDeclaration)
-                parseFieldInitializerOpt(with, with, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(with, with, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -1730,13 +1730,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', yield, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', yield, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(yield)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(yield, fieldDeclaration)
-                parseFieldInitializerOpt(yield, yield, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(yield, yield, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.expect
index b80ddaf..d64400c 100644
--- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.expect
@@ -1992,7 +1992,7 @@
                 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got '('., null, {token: (}], (, ()
                 handleIdentifier(, localVariableDeclaration)
                 beginInitializedIdentifier()
-                  handleNoVariableInitializer(x)
+                  handleNoVariableInitializer()
                 endInitializedIdentifier()
                 handleRecoverableError(Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}], x, x)
               endVariablesDeclaration(1, ;)
@@ -4433,7 +4433,7 @@
               handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got '('., null, {token: (}], (, ()
               handleIdentifier(, localVariableDeclaration)
               beginInitializedIdentifier()
-                handleNoVariableInitializer(x)
+                handleNoVariableInitializer()
               endInitializedIdentifier()
               handleRecoverableError(Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}], x, x)
             endVariablesDeclaration(1, ;)
@@ -4520,7 +4520,7 @@
               handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got '('., null, {token: (}], (, ()
               handleIdentifier(, localVariableDeclaration)
               beginInitializedIdentifier()
-                handleNoVariableInitializer(x)
+                handleNoVariableInitializer()
               endInitializedIdentifier()
               handleRecoverableError(Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}], x, x)
             endVariablesDeclaration(1, ;)
diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.intertwined.expect
index 7c40ac6..eccfc71 100644
--- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_class_methods.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', null, abstract, DeclarationKind.Class, WrapperClass, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, abstract, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, abstract)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(abstract)
@@ -173,7 +173,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, as, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, as, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, as)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(as)
@@ -316,7 +316,7 @@
               listener: beginMember()
               isReservedKeyword(assert)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, assert, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, assert, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, assert)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(assert)
@@ -451,7 +451,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, async, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, async, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, async)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(async)
@@ -592,7 +592,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, await, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, await, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, await)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(await)
@@ -738,7 +738,7 @@
               listener: beginMember()
               isReservedKeyword(break)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, break, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, break, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, break)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(break)
@@ -914,7 +914,7 @@
               listener: beginMember()
               isReservedKeyword(case)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, case, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, case, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, case)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(case)
@@ -1058,7 +1058,7 @@
               listener: beginMember()
               isReservedKeyword(catch)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, catch, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, catch, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, catch)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(catch)
@@ -1202,7 +1202,7 @@
               listener: beginMember()
               isReservedKeyword(class)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, class, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, class, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, class)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(class)
@@ -1346,7 +1346,7 @@
               listener: beginMember()
               isReservedKeyword(const)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, const, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, const, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, const)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(const)
@@ -1496,7 +1496,7 @@
               listener: beginMember()
               isReservedKeyword(continue)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, continue, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, continue, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, continue)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(continue)
@@ -1670,7 +1670,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, covariant, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, covariant, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, covariant)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(covariant)
@@ -1813,7 +1813,7 @@
               listener: beginMember()
               isReservedKeyword(default)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, default, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, default, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, default)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(default)
@@ -1955,7 +1955,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, deferred, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, deferred, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, deferred)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(deferred)
@@ -2098,7 +2098,7 @@
               listener: beginMember()
               isReservedKeyword(do)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, do, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, do, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, do)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(do)
@@ -2295,7 +2295,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, dynamic, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, dynamic, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, dynamic)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(dynamic)
@@ -2438,7 +2438,7 @@
               listener: beginMember()
               isReservedKeyword(else)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, else, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, else, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, else)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(else)
@@ -2631,7 +2631,7 @@
               listener: beginMember()
               isReservedKeyword(enum)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, enum, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, enum, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, enum)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(enum)
@@ -2773,7 +2773,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, export, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, export, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, export)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(export)
@@ -2916,7 +2916,7 @@
               listener: beginMember()
               isReservedKeyword(extends)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, extends, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, extends, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, extends)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(extends)
@@ -3058,7 +3058,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, extension, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, extension, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, extension)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(extension)
@@ -3199,7 +3199,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, external, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, external, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, external)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(external)
@@ -3340,7 +3340,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, factory, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, factory, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, factory)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(factory)
@@ -3483,7 +3483,7 @@
               listener: beginMember()
               isReservedKeyword(false)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, false, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, false, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(false)
@@ -3623,7 +3623,7 @@
               listener: beginMember()
               isReservedKeyword(final)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, final, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, final, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, final)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(final)
@@ -3748,7 +3748,7 @@
                               listener: handleIdentifier(, localVariableDeclaration)
                             listener: beginInitializedIdentifier()
                             parseVariableInitializerOpt()
-                              listener: handleNoVariableInitializer(x)
+                              listener: handleNoVariableInitializer()
                             listener: endInitializedIdentifier()
                           ensureSemicolon()
                             reportRecoverableError(, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -3857,7 +3857,7 @@
               listener: beginMember()
               isReservedKeyword(finally)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, finally, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, finally, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, finally)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(finally)
@@ -4001,7 +4001,7 @@
               listener: beginMember()
               isReservedKeyword(for)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, for, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, for, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, for)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(for)
@@ -4208,7 +4208,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, Function, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, Function, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, Function)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(Function)
@@ -4350,7 +4350,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, get, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, get, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, get)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
@@ -4491,7 +4491,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, hide, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, hide, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, hide)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(hide)
@@ -4634,7 +4634,7 @@
               listener: beginMember()
               isReservedKeyword(if)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, if, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, if, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, if)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(if)
@@ -4813,7 +4813,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, implements, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, implements, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, implements)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(implements)
@@ -4954,7 +4954,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, import, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, import, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, import)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(import)
@@ -5097,7 +5097,7 @@
               listener: beginMember()
               isReservedKeyword(in)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, in, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, in, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, in)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(in)
@@ -5239,7 +5239,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, inout, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, inout, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, inout)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(inout)
@@ -5380,7 +5380,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, interface, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, interface, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, interface)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(interface)
@@ -5523,7 +5523,7 @@
               listener: beginMember()
               isReservedKeyword(is)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, is, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, is, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, is)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(is)
@@ -5697,7 +5697,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, late, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, late, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, late)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(late)
@@ -5838,7 +5838,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, library, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, library, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, library)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(library)
@@ -5979,7 +5979,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, mixin, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, mixin, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, mixin)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(mixin)
@@ -6120,7 +6120,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, native, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, native, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, native)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(native)
@@ -6263,7 +6263,7 @@
               listener: beginMember()
               isReservedKeyword(new)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, new, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, new, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, new)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(new)
@@ -6413,7 +6413,7 @@
               listener: beginMember()
               isReservedKeyword(null)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, null, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, null, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, null)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(null)
@@ -6551,7 +6551,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, of, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, of, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, of)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(of)
@@ -6692,7 +6692,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, on, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, on, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, on)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(on)
@@ -6834,7 +6834,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isUnaryMinus(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, operator, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, operator, DeclarationKind.Class, WrapperClass, false)
                 isUnaryMinus(()
                 listener: beginMethod(null, null, null, null, null, operator)
                 listener: handleIdentifier(int, typeReference)
@@ -6976,7 +6976,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, out, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, out, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, out)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(out)
@@ -7117,7 +7117,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, part, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, part, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, part)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(part)
@@ -7258,7 +7258,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, patch, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, patch, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, patch)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(patch)
@@ -7399,7 +7399,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, required, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, required, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, required)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(required)
@@ -7542,7 +7542,7 @@
               listener: beginMember()
               isReservedKeyword(rethrow)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, rethrow, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, rethrow, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, rethrow)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(rethrow)
@@ -7686,7 +7686,7 @@
               listener: beginMember()
               isReservedKeyword(return)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, return, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, return, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, return)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(return)
@@ -7826,7 +7826,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, set, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, set, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, set)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(set)
@@ -7967,7 +7967,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, show, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, show, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, show)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(show)
@@ -8108,7 +8108,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, source, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, source, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, source)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(source)
@@ -8249,7 +8249,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, static, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, static, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, static)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(static)
@@ -8392,7 +8392,7 @@
               listener: beginMember()
               isReservedKeyword(super)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, super, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, super, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, super)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(super)
@@ -8531,7 +8531,7 @@
               listener: beginMember()
               isReservedKeyword(switch)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, switch, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, switch, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, switch)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(switch)
@@ -8719,7 +8719,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, sync, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, sync, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, sync)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(sync)
@@ -8860,8 +8860,8 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(int, }, null, null, null, null, null, }, Instance of 'SimpleType', null, DeclarationKind.Class, WrapperClass)
-                parseFields(}, null, null, null, null, null, }, Instance of 'SimpleType', this, DeclarationKind.Class, WrapperClass, false)
+              recoverFromInvalidMember(int, }, null, null, null, null, null, null, }, Instance of 'SimpleType', null, DeclarationKind.Class, WrapperClass)
+                parseFields(}, null, null, null, null, null, null, }, Instance of 'SimpleType', this, DeclarationKind.Class, WrapperClass, false)
                   listener: handleIdentifier(int, typeReference)
                   listener: handleNoTypeArguments(this)
                   listener: handleType(int, null)
@@ -8869,7 +8869,7 @@
                     reportRecoverableErrorWithToken(this, Instance of 'Template<(Token) => Message>')
                       listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'this'., null, {token: this}], this, this)
                     listener: handleIdentifier(this, fieldDeclaration)
-                  parseFieldInitializerOpt(this, this, null, null, DeclarationKind.Class, WrapperClass)
+                  parseFieldInitializerOpt(this, this, null, null, null, null, DeclarationKind.Class, WrapperClass)
                     listener: handleNoFieldInitializer(()
                   ensureSemicolon(this)
                     reportRecoverableError(this, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -8883,8 +8883,8 @@
                 listener: beginMetadataStar(()
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(;, ;, null, null, null, null, null, ;, Instance of 'NoType', null, DeclarationKind.Class, WrapperClass)
-                parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, (, DeclarationKind.Class, WrapperClass, false)
+              recoverFromInvalidMember(;, ;, null, null, null, null, null, null, ;, Instance of 'NoType', null, DeclarationKind.Class, WrapperClass)
+                parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, (, DeclarationKind.Class, WrapperClass, false)
                   listener: beginMethod(null, null, null, null, null, ()
                   listener: handleNoType(;)
                   ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
@@ -9023,7 +9023,7 @@
               listener: beginMember()
               isReservedKeyword(throw)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, throw, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, throw, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, throw)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(throw)
@@ -9163,7 +9163,7 @@
               listener: beginMember()
               isReservedKeyword(true)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, true, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, true, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(true)
@@ -9303,7 +9303,7 @@
               listener: beginMember()
               isReservedKeyword(try)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, try, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, try, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, try)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(try)
@@ -9483,7 +9483,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, typedef, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, typedef, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, typedef)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(typedef)
@@ -9626,7 +9626,7 @@
               listener: beginMember()
               isReservedKeyword(var)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, var, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, var, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, var)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(var)
@@ -9751,7 +9751,7 @@
                               listener: handleIdentifier(, localVariableDeclaration)
                             listener: beginInitializedIdentifier()
                             parseVariableInitializerOpt()
-                              listener: handleNoVariableInitializer(x)
+                              listener: handleNoVariableInitializer()
                             listener: endInitializedIdentifier()
                           ensureSemicolon()
                             reportRecoverableError(, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -9860,7 +9860,7 @@
               listener: beginMember()
               isReservedKeyword(void)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, void, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, void, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, void)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(void)
@@ -9986,7 +9986,7 @@
                                 listener: handleIdentifier(, localVariableDeclaration)
                               listener: beginInitializedIdentifier()
                               parseVariableInitializerOpt()
-                                listener: handleNoVariableInitializer(x)
+                                listener: handleNoVariableInitializer()
                               listener: endInitializedIdentifier()
                             ensureSemicolon()
                               reportRecoverableError(, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -10095,7 +10095,7 @@
               listener: beginMember()
               isReservedKeyword(while)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, while, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, while, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, while)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(while)
@@ -10276,7 +10276,7 @@
               listener: beginMember()
               isReservedKeyword(with)
               indicatesMethodOrField(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, with, DeclarationKind.Class, WrapperClass, true)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, with, DeclarationKind.Class, WrapperClass, true)
                 listener: beginMethod(null, null, null, null, null, with)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(with)
@@ -10418,7 +10418,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, yield, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, yield, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, yield)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(yield)
diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_fields.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_fields.dart.intertwined.expect
index 20430f0..cf78306 100644
--- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_fields.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_fields.dart.intertwined.expect
@@ -8,13 +8,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl()
       listener: beginTopLevelMember(int)
-      parseFields(, null, null, null, null, null, , Instance of 'SimpleType', abstract, DeclarationKind.TopLevel, null, false)
+      parseFields(, null, null, null, null, null, null, , Instance of 'SimpleType', abstract, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(abstract)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(abstract, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(abstract, abstract, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(abstract, abstract, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -31,13 +31,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', as, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', as, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(as)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(as, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(as, as, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(as, as, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -56,7 +56,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(assert)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', assert, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', assert, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(assert)
         listener: handleType(int, null)
@@ -64,7 +64,7 @@
           reportRecoverableErrorWithToken(assert, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'assert'., null, {token: assert}], assert, assert)
           listener: handleIdentifier(assert, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(assert, assert, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(assert, assert, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -81,13 +81,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', async, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', async, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(async)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(async, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(async, async, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(async, async, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -104,13 +104,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', await, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', await, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(await)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(await, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(await, await, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(await, await, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -129,7 +129,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(break)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', break, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', break, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(break)
         listener: handleType(int, null)
@@ -137,7 +137,7 @@
           reportRecoverableErrorWithToken(break, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'break'., null, {token: break}], break, break)
           listener: handleIdentifier(break, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(break, break, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(break, break, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -156,7 +156,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(case)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', case, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', case, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(case)
         listener: handleType(int, null)
@@ -164,7 +164,7 @@
           reportRecoverableErrorWithToken(case, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'case'., null, {token: case}], case, case)
           listener: handleIdentifier(case, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(case, case, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(case, case, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -183,7 +183,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(catch)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', catch, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', catch, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(catch)
         listener: handleType(int, null)
@@ -191,7 +191,7 @@
           reportRecoverableErrorWithToken(catch, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'catch'., null, {token: catch}], catch, catch)
           listener: handleIdentifier(catch, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(catch, catch, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(catch, catch, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -210,7 +210,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(class)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', class, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', class, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(class)
         listener: handleType(int, null)
@@ -218,7 +218,7 @@
           reportRecoverableErrorWithToken(class, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'class'., null, {token: class}], class, class)
           listener: handleIdentifier(class, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(class, class, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(class, class, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -237,7 +237,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(const)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', const, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', const, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(const)
         listener: handleType(int, null)
@@ -245,7 +245,7 @@
           reportRecoverableErrorWithToken(const, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'const'., null, {token: const}], const, const)
           listener: handleIdentifier(const, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(const, const, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(const, const, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -264,7 +264,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(continue)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', continue, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', continue, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(continue)
         listener: handleType(int, null)
@@ -272,7 +272,7 @@
           reportRecoverableErrorWithToken(continue, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'continue'., null, {token: continue}], continue, continue)
           listener: handleIdentifier(continue, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(continue, continue, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(continue, continue, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -289,13 +289,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', covariant, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', covariant, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(covariant)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(covariant, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(covariant, covariant, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(covariant, covariant, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -314,7 +314,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(default)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', default, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', default, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(default)
         listener: handleType(int, null)
@@ -322,7 +322,7 @@
           reportRecoverableErrorWithToken(default, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'default'., null, {token: default}], default, default)
           listener: handleIdentifier(default, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(default, default, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(default, default, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -339,13 +339,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', deferred, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', deferred, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(deferred)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(deferred, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(deferred, deferred, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(deferred, deferred, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -364,7 +364,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(do)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', do, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', do, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(do)
         listener: handleType(int, null)
@@ -372,7 +372,7 @@
           reportRecoverableErrorWithToken(do, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'do'., null, {token: do}], do, do)
           listener: handleIdentifier(do, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(do, do, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(do, do, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -389,13 +389,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', dynamic, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', dynamic, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(dynamic)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(dynamic, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(dynamic, dynamic, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(dynamic, dynamic, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -414,7 +414,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(else)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', else, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', else, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(else)
         listener: handleType(int, null)
@@ -422,7 +422,7 @@
           reportRecoverableErrorWithToken(else, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'else'., null, {token: else}], else, else)
           listener: handleIdentifier(else, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(else, else, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(else, else, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -441,7 +441,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(enum)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', enum, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', enum, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(enum)
         listener: handleType(int, null)
@@ -449,7 +449,7 @@
           reportRecoverableErrorWithToken(enum, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'enum'., null, {token: enum}], enum, enum)
           listener: handleIdentifier(enum, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(enum, enum, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(enum, enum, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -466,13 +466,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', export, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', export, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(export)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(export, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(export, export, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(export, export, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -491,7 +491,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(extends)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', extends, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', extends, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(extends)
         listener: handleType(int, null)
@@ -499,7 +499,7 @@
           reportRecoverableErrorWithToken(extends, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extends'., null, {token: extends}], extends, extends)
           listener: handleIdentifier(extends, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(extends, extends, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(extends, extends, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -516,13 +516,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', extension, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', extension, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(extension)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(extension, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(extension, extension, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(extension, extension, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -539,13 +539,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', external, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', external, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(external)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(external, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(external, external, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(external, external, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -562,13 +562,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', factory, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', factory, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(factory)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(factory, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(factory, factory, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(factory, factory, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -587,7 +587,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(false)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', false, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', false, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(false)
         listener: handleType(int, null)
@@ -595,7 +595,7 @@
           reportRecoverableErrorWithToken(false, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'false'., null, {token: false}], false, false)
           listener: handleIdentifier(false, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(false, false, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(false, false, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -614,7 +614,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(final)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', final, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', final, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(final)
         listener: handleType(int, null)
@@ -622,7 +622,7 @@
           reportRecoverableErrorWithToken(final, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'final'., null, {token: final}], final, final)
           listener: handleIdentifier(final, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(final, final, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(final, final, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -641,7 +641,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(finally)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', finally, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', finally, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(finally)
         listener: handleType(int, null)
@@ -649,7 +649,7 @@
           reportRecoverableErrorWithToken(finally, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'finally'., null, {token: finally}], finally, finally)
           listener: handleIdentifier(finally, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(finally, finally, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(finally, finally, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -668,7 +668,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(for)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', for, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', for, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(for)
         listener: handleType(int, null)
@@ -676,7 +676,7 @@
           reportRecoverableErrorWithToken(for, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'for'., null, {token: for}], for, for)
           listener: handleIdentifier(for, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(for, for, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(for, for, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -693,13 +693,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', Function, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', Function, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(Function)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(Function, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(Function, Function, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(Function, Function, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -716,13 +716,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', get, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', get, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(get)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(get, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(get, get, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(get, get, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -739,13 +739,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', hide, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', hide, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(hide)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(hide, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(hide, hide, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(hide, hide, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -764,7 +764,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(if)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', if, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', if, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(if)
         listener: handleType(int, null)
@@ -772,7 +772,7 @@
           reportRecoverableErrorWithToken(if, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'if'., null, {token: if}], if, if)
           listener: handleIdentifier(if, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(if, if, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(if, if, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -789,13 +789,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', implements, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', implements, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(implements)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(implements, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(implements, implements, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(implements, implements, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -812,13 +812,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', import, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', import, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(import)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(import, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(import, import, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(import, import, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -837,7 +837,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(in)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', in, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', in, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(in)
         listener: handleType(int, null)
@@ -845,7 +845,7 @@
           reportRecoverableErrorWithToken(in, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'in'., null, {token: in}], in, in)
           listener: handleIdentifier(in, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(in, in, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(in, in, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -862,13 +862,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', inout, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', inout, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(inout)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(inout, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(inout, inout, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(inout, inout, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -885,13 +885,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', interface, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', interface, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(interface)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(interface, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(interface, interface, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(interface, interface, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -910,7 +910,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(is)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', is, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', is, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(is)
         listener: handleType(int, null)
@@ -918,7 +918,7 @@
           reportRecoverableErrorWithToken(is, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'is'., null, {token: is}], is, is)
           listener: handleIdentifier(is, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(is, is, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(is, is, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -935,13 +935,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', late, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', late, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(late)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(late, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(late, late, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(late, late, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -958,13 +958,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', library, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', library, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(library)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(library, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(library, library, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(library, library, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -981,13 +981,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', mixin, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', mixin, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(mixin)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(mixin, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(mixin, mixin, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(mixin, mixin, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1004,13 +1004,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', native, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', native, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(native)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(native, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(native, native, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(native, native, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1029,7 +1029,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(new)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', new, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', new, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(new)
         listener: handleType(int, null)
@@ -1037,7 +1037,7 @@
           reportRecoverableErrorWithToken(new, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'new'., null, {token: new}], new, new)
           listener: handleIdentifier(new, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(new, new, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(new, new, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1056,7 +1056,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(null)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', null, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', null, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(null)
         listener: handleType(int, null)
@@ -1064,7 +1064,7 @@
           reportRecoverableErrorWithToken(null, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'null'., null, {token: null}], null, null)
           listener: handleIdentifier(null, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(null, null, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(null, null, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1081,13 +1081,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', of, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', of, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(of)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(of, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(of, of, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(of, of, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1104,13 +1104,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', on, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', on, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(on)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(on, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(on, on, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(on, on, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1127,13 +1127,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', operator, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', operator, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(operator)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(operator, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(operator, operator, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(operator, operator, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1150,13 +1150,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', out, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', out, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(out)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(out, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(out, out, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(out, out, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1173,13 +1173,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', part, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', part, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(part)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(part, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(part, part, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(part, part, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1196,13 +1196,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', patch, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', patch, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(patch)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(patch, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(patch, patch, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(patch, patch, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1219,13 +1219,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', required, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', required, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(required)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(required, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(required, required, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(required, required, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1244,7 +1244,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(rethrow)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', rethrow, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', rethrow, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(rethrow)
         listener: handleType(int, null)
@@ -1252,7 +1252,7 @@
           reportRecoverableErrorWithToken(rethrow, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'rethrow'., null, {token: rethrow}], rethrow, rethrow)
           listener: handleIdentifier(rethrow, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(rethrow, rethrow, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(rethrow, rethrow, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1271,7 +1271,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(return)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', return, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', return, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(return)
         listener: handleType(int, null)
@@ -1279,7 +1279,7 @@
           reportRecoverableErrorWithToken(return, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'return'., null, {token: return}], return, return)
           listener: handleIdentifier(return, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(return, return, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(return, return, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1296,13 +1296,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', set, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', set, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(set)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(set, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(set, set, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(set, set, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1319,13 +1319,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', show, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', show, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(show)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(show, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(show, show, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(show, show, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1342,13 +1342,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', source, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', source, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(source)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(source, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(source, source, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(source, source, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1365,13 +1365,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', static, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', static, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(static)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(static, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(static, static, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(static, static, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1390,7 +1390,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(super)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', super, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', super, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(super)
         listener: handleType(int, null)
@@ -1398,7 +1398,7 @@
           reportRecoverableErrorWithToken(super, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'super'., null, {token: super}], super, super)
           listener: handleIdentifier(super, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(super, super, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(super, super, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1417,7 +1417,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(switch)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', switch, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', switch, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(switch)
         listener: handleType(int, null)
@@ -1425,7 +1425,7 @@
           reportRecoverableErrorWithToken(switch, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'switch'., null, {token: switch}], switch, switch)
           listener: handleIdentifier(switch, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(switch, switch, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(switch, switch, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1442,13 +1442,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', sync, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', sync, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(sync)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(sync, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(sync, sync, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(sync, sync, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1465,7 +1465,7 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', this, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', this, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(this)
         listener: handleType(int, null)
@@ -1473,7 +1473,7 @@
           reportRecoverableErrorWithToken(this, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'this'., null, {token: this}], this, this)
           listener: handleIdentifier(this, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(this, this, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(this, this, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1492,7 +1492,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(throw)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', throw, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', throw, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(throw)
         listener: handleType(int, null)
@@ -1500,7 +1500,7 @@
           reportRecoverableErrorWithToken(throw, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'throw'., null, {token: throw}], throw, throw)
           listener: handleIdentifier(throw, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(throw, throw, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(throw, throw, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1519,7 +1519,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(true)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', true, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', true, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(true)
         listener: handleType(int, null)
@@ -1527,7 +1527,7 @@
           reportRecoverableErrorWithToken(true, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'true'., null, {token: true}], true, true)
           listener: handleIdentifier(true, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(true, true, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(true, true, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1546,7 +1546,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(try)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', try, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', try, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(try)
         listener: handleType(int, null)
@@ -1554,7 +1554,7 @@
           reportRecoverableErrorWithToken(try, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'try'., null, {token: try}], try, try)
           listener: handleIdentifier(try, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(try, try, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(try, try, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1571,13 +1571,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', typedef, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', typedef, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(typedef)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(typedef, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(typedef, typedef, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(typedef, typedef, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1596,7 +1596,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(var)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', var, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', var, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(var)
         listener: handleType(int, null)
@@ -1604,7 +1604,7 @@
           reportRecoverableErrorWithToken(var, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'var'., null, {token: var}], var, var)
           listener: handleIdentifier(var, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(var, var, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(var, var, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1623,7 +1623,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(void)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', void, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', void, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(void)
         listener: handleType(int, null)
@@ -1631,7 +1631,7 @@
           reportRecoverableErrorWithToken(void, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'void'., null, {token: void}], void, void)
           listener: handleIdentifier(void, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(void, void, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(void, void, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1650,7 +1650,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(while)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', while, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', while, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(while)
         listener: handleType(int, null)
@@ -1658,7 +1658,7 @@
           reportRecoverableErrorWithToken(while, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'while'., null, {token: while}], while, while)
           listener: handleIdentifier(while, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(while, while, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(while, while, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1677,7 +1677,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(with)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', with, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', with, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(with)
         listener: handleType(int, null)
@@ -1685,7 +1685,7 @@
           reportRecoverableErrorWithToken(with, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'with'., null, {token: with}], with, with)
           listener: handleIdentifier(with, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(with, with, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(with, with, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -1702,13 +1702,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', yield, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', yield, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(yield)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(yield, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(yield, yield, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(yield, yield, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.expect
index fffb7b5..45af522 100644
--- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.expect
@@ -1947,7 +1947,7 @@
           handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got '('., null, {token: (}], (, ()
           handleIdentifier(, localVariableDeclaration)
           beginInitializedIdentifier()
-            handleNoVariableInitializer(x)
+            handleNoVariableInitializer()
           endInitializedIdentifier()
           handleRecoverableError(Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}], x, x)
         endVariablesDeclaration(1, ;)
@@ -4338,7 +4338,7 @@
           handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got '('., null, {token: (}], (, ()
           handleIdentifier(, localVariableDeclaration)
           beginInitializedIdentifier()
-            handleNoVariableInitializer(x)
+            handleNoVariableInitializer()
           endInitializedIdentifier()
           handleRecoverableError(Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}], x, x)
         endVariablesDeclaration(1, ;)
@@ -4424,7 +4424,7 @@
           handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got '('., null, {token: (}], (, ()
           handleIdentifier(, localVariableDeclaration)
           beginInitializedIdentifier()
-            handleNoVariableInitializer(x)
+            handleNoVariableInitializer()
           endInitializedIdentifier()
           handleRecoverableError(Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}], x, x)
         endVariablesDeclaration(1, ;)
diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.intertwined.expect
index c54e05b..f6e0e65 100644
--- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_top_level_methods.dart.intertwined.expect
@@ -3624,7 +3624,7 @@
                       listener: handleIdentifier(, localVariableDeclaration)
                     listener: beginInitializedIdentifier()
                     parseVariableInitializerOpt()
-                      listener: handleNoVariableInitializer(x)
+                      listener: handleNoVariableInitializer()
                     listener: endInitializedIdentifier()
                   ensureSemicolon()
                     reportRecoverableError(, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -9439,7 +9439,7 @@
                       listener: handleIdentifier(, localVariableDeclaration)
                     listener: beginInitializedIdentifier()
                     parseVariableInitializerOpt()
-                      listener: handleNoVariableInitializer(x)
+                      listener: handleNoVariableInitializer()
                     listener: endInitializedIdentifier()
                   ensureSemicolon()
                     reportRecoverableError(, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -9670,7 +9670,7 @@
                         listener: handleIdentifier(, localVariableDeclaration)
                       listener: beginInitializedIdentifier()
                       parseVariableInitializerOpt()
-                        listener: handleNoVariableInitializer(x)
+                        listener: handleNoVariableInitializer()
                       listener: endInitializedIdentifier()
                     ensureSemicolon()
                       reportRecoverableError(, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.expect
index 5aa54f3..5a39839 100644
--- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.expect
@@ -482,8 +482,8 @@
   handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'abstract'., null, {token: abstract}], abstract, abstract)
   handleIdentifier(abstract, typedefDeclaration)
   handleNoTypeVariables(=)
-  handleNoTypeVariables(()
   beginFunctionType(void)
+    handleNoTypeVariables(()
     handleVoidKeyword(void)
     beginFormalParameters((, MemberKind.GeneralizedFunctionType)
     endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -507,8 +507,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'as'., null, {token: as}], as, as)
 handleIdentifier(as, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -532,8 +532,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'assert'., null, {token: assert}], assert, assert)
 handleIdentifier(assert, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -555,8 +555,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(async, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -578,8 +578,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(await, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -603,8 +603,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'break'., null, {token: break}], break, break)
 handleIdentifier(break, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -628,8 +628,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'case'., null, {token: case}], case, case)
 handleIdentifier(case, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -653,8 +653,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'catch'., null, {token: catch}], catch, catch)
 handleIdentifier(catch, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -678,8 +678,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'class'., null, {token: class}], class, class)
 handleIdentifier(class, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -703,8 +703,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'const'., null, {token: const}], const, const)
 handleIdentifier(const, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -728,8 +728,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'continue'., null, {token: continue}], continue, continue)
 handleIdentifier(continue, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -753,8 +753,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'covariant'., null, {token: covariant}], covariant, covariant)
 handleIdentifier(covariant, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -778,8 +778,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'default'., null, {token: default}], default, default)
 handleIdentifier(default, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -803,8 +803,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'deferred'., null, {token: deferred}], deferred, deferred)
 handleIdentifier(deferred, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -828,8 +828,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'do'., null, {token: do}], do, do)
 handleIdentifier(do, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -853,8 +853,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'dynamic'., null, {token: dynamic}], dynamic, dynamic)
 handleIdentifier(dynamic, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -878,8 +878,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'else'., null, {token: else}], else, else)
 handleIdentifier(else, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -903,8 +903,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'enum'., null, {token: enum}], enum, enum)
 handleIdentifier(enum, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -928,8 +928,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'export'., null, {token: export}], export, export)
 handleIdentifier(export, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -953,8 +953,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extends'., null, {token: extends}], extends, extends)
 handleIdentifier(extends, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -978,8 +978,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extension'., null, {token: extension}], extension, extension)
 handleIdentifier(extension, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1003,8 +1003,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'external'., null, {token: external}], external, external)
 handleIdentifier(external, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1028,8 +1028,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'factory'., null, {token: factory}], factory, factory)
 handleIdentifier(factory, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1053,8 +1053,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'false'., null, {token: false}], false, false)
 handleIdentifier(false, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1078,8 +1078,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'final'., null, {token: final}], final, final)
 handleIdentifier(final, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1103,8 +1103,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'finally'., null, {token: finally}], finally, finally)
 handleIdentifier(finally, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1128,8 +1128,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'for'., null, {token: for}], for, for)
 handleIdentifier(for, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1153,8 +1153,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'Function'., null, {token: Function}], Function, Function)
 handleIdentifier(Function, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1178,8 +1178,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'get'., null, {token: get}], get, get)
 handleIdentifier(get, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1201,8 +1201,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(hide, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1226,8 +1226,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'if'., null, {token: if}], if, if)
 handleIdentifier(if, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1251,8 +1251,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'implements'., null, {token: implements}], implements, implements)
 handleIdentifier(implements, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1276,8 +1276,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'import'., null, {token: import}], import, import)
 handleIdentifier(import, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1301,8 +1301,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'in'., null, {token: in}], in, in)
 handleIdentifier(in, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1324,8 +1324,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(inout, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1349,8 +1349,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'interface'., null, {token: interface}], interface, interface)
 handleIdentifier(interface, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1374,8 +1374,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'is'., null, {token: is}], is, is)
 handleIdentifier(is, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1399,8 +1399,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'late'., null, {token: late}], late, late)
 handleIdentifier(late, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1424,8 +1424,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'library'., null, {token: library}], library, library)
 handleIdentifier(library, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1449,8 +1449,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'mixin'., null, {token: mixin}], mixin, mixin)
 handleIdentifier(mixin, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1472,8 +1472,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(native, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1497,8 +1497,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'new'., null, {token: new}], new, new)
 handleIdentifier(new, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1522,8 +1522,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'null'., null, {token: null}], null, null)
 handleIdentifier(null, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1545,8 +1545,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(of, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1568,8 +1568,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(on, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1593,8 +1593,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'operator'., null, {token: operator}], operator, operator)
 handleIdentifier(operator, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1616,8 +1616,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(out, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1641,8 +1641,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'part'., null, {token: part}], part, part)
 handleIdentifier(part, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1664,8 +1664,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(patch, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1689,8 +1689,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'required'., null, {token: required}], required, required)
 handleIdentifier(required, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1714,8 +1714,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'rethrow'., null, {token: rethrow}], rethrow, rethrow)
 handleIdentifier(rethrow, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1739,8 +1739,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'return'., null, {token: return}], return, return)
 handleIdentifier(return, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1764,8 +1764,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'set'., null, {token: set}], set, set)
 handleIdentifier(set, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1787,8 +1787,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(show, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1810,8 +1810,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(source, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1835,8 +1835,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'static'., null, {token: static}], static, static)
 handleIdentifier(static, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1860,8 +1860,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'super'., null, {token: super}], super, super)
 handleIdentifier(super, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1885,8 +1885,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'switch'., null, {token: switch}], switch, switch)
 handleIdentifier(switch, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1908,8 +1908,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(sync, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1933,8 +1933,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'this'., null, {token: this}], this, this)
 handleIdentifier(this, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1958,8 +1958,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'throw'., null, {token: throw}], throw, throw)
 handleIdentifier(throw, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -1983,8 +1983,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'true'., null, {token: true}], true, true)
 handleIdentifier(true, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -2008,8 +2008,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'try'., null, {token: try}], try, try)
 handleIdentifier(try, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -2033,8 +2033,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'typedef'., null, {token: typedef}], typedef, typedef)
 handleIdentifier(typedef, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -2058,8 +2058,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'var'., null, {token: var}], var, var)
 handleIdentifier(var, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -2127,8 +2127,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'while'., null, {token: while}], while, while)
 handleIdentifier(while, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -2152,8 +2152,8 @@
 handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'with'., null, {token: with}], with, with)
 handleIdentifier(with, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
@@ -2175,8 +2175,8 @@
 beginFunctionTypeAlias(typedef)
 handleIdentifier(yield, typedefDeclaration)
 handleNoTypeVariables(=)
-handleNoTypeVariables(()
 beginFunctionType(void)
+handleNoTypeVariables(()
 handleVoidKeyword(void)
 beginFormalParameters((, MemberKind.GeneralizedFunctionType)
 endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.intertwined.expect
index eea917a..80fc687 100644
--- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.intertwined.expect
@@ -36,8 +36,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'abstract'., null, {token: abstract}], abstract, abstract)
           listener: handleIdentifier(abstract, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -81,8 +81,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'as'., null, {token: as}], as, as)
           listener: handleIdentifier(as, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -126,8 +126,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'assert'., null, {token: assert}], assert, assert)
           listener: handleIdentifier(assert, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -167,8 +167,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(async, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -208,8 +208,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(await, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -253,8 +253,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'break'., null, {token: break}], break, break)
           listener: handleIdentifier(break, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -298,8 +298,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'case'., null, {token: case}], case, case)
           listener: handleIdentifier(case, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -343,8 +343,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'catch'., null, {token: catch}], catch, catch)
           listener: handleIdentifier(catch, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -388,8 +388,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'class'., null, {token: class}], class, class)
           listener: handleIdentifier(class, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -433,8 +433,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'const'., null, {token: const}], const, const)
           listener: handleIdentifier(const, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -478,8 +478,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'continue'., null, {token: continue}], continue, continue)
           listener: handleIdentifier(continue, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -523,8 +523,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'covariant'., null, {token: covariant}], covariant, covariant)
           listener: handleIdentifier(covariant, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -568,8 +568,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'default'., null, {token: default}], default, default)
           listener: handleIdentifier(default, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -613,8 +613,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'deferred'., null, {token: deferred}], deferred, deferred)
           listener: handleIdentifier(deferred, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -658,8 +658,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'do'., null, {token: do}], do, do)
           listener: handleIdentifier(do, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -703,8 +703,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'dynamic'., null, {token: dynamic}], dynamic, dynamic)
           listener: handleIdentifier(dynamic, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -748,8 +748,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'else'., null, {token: else}], else, else)
           listener: handleIdentifier(else, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -793,8 +793,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'enum'., null, {token: enum}], enum, enum)
           listener: handleIdentifier(enum, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -838,8 +838,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'export'., null, {token: export}], export, export)
           listener: handleIdentifier(export, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -883,8 +883,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extends'., null, {token: extends}], extends, extends)
           listener: handleIdentifier(extends, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -928,8 +928,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extension'., null, {token: extension}], extension, extension)
           listener: handleIdentifier(extension, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -973,8 +973,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'external'., null, {token: external}], external, external)
           listener: handleIdentifier(external, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1018,8 +1018,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'factory'., null, {token: factory}], factory, factory)
           listener: handleIdentifier(factory, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1063,8 +1063,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'false'., null, {token: false}], false, false)
           listener: handleIdentifier(false, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1108,8 +1108,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'final'., null, {token: final}], final, final)
           listener: handleIdentifier(final, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1153,8 +1153,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'finally'., null, {token: finally}], finally, finally)
           listener: handleIdentifier(finally, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1198,8 +1198,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'for'., null, {token: for}], for, for)
           listener: handleIdentifier(for, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1243,8 +1243,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'Function'., null, {token: Function}], Function, Function)
           listener: handleIdentifier(Function, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1288,8 +1288,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'get'., null, {token: get}], get, get)
           listener: handleIdentifier(get, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1329,8 +1329,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(hide, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1374,8 +1374,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'if'., null, {token: if}], if, if)
           listener: handleIdentifier(if, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1419,8 +1419,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'implements'., null, {token: implements}], implements, implements)
           listener: handleIdentifier(implements, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1464,8 +1464,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'import'., null, {token: import}], import, import)
           listener: handleIdentifier(import, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1509,8 +1509,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'in'., null, {token: in}], in, in)
           listener: handleIdentifier(in, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1550,8 +1550,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(inout, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1595,8 +1595,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'interface'., null, {token: interface}], interface, interface)
           listener: handleIdentifier(interface, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1640,8 +1640,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'is'., null, {token: is}], is, is)
           listener: handleIdentifier(is, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1685,8 +1685,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'late'., null, {token: late}], late, late)
           listener: handleIdentifier(late, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1730,8 +1730,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'library'., null, {token: library}], library, library)
           listener: handleIdentifier(library, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1775,8 +1775,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'mixin'., null, {token: mixin}], mixin, mixin)
           listener: handleIdentifier(mixin, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1816,8 +1816,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(native, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1861,8 +1861,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'new'., null, {token: new}], new, new)
           listener: handleIdentifier(new, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1906,8 +1906,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'null'., null, {token: null}], null, null)
           listener: handleIdentifier(null, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1947,8 +1947,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(of, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -1988,8 +1988,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(on, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2033,8 +2033,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'operator'., null, {token: operator}], operator, operator)
           listener: handleIdentifier(operator, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2074,8 +2074,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(out, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2119,8 +2119,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'part'., null, {token: part}], part, part)
           listener: handleIdentifier(part, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2160,8 +2160,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(patch, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2205,8 +2205,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'required'., null, {token: required}], required, required)
           listener: handleIdentifier(required, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2250,8 +2250,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'rethrow'., null, {token: rethrow}], rethrow, rethrow)
           listener: handleIdentifier(rethrow, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2295,8 +2295,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'return'., null, {token: return}], return, return)
           listener: handleIdentifier(return, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2340,8 +2340,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'set'., null, {token: set}], set, set)
           listener: handleIdentifier(set, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2381,8 +2381,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(show, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2422,8 +2422,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(source, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2467,8 +2467,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'static'., null, {token: static}], static, static)
           listener: handleIdentifier(static, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2512,8 +2512,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'super'., null, {token: super}], super, super)
           listener: handleIdentifier(super, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2557,8 +2557,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'switch'., null, {token: switch}], switch, switch)
           listener: handleIdentifier(switch, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2598,8 +2598,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(sync, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2643,8 +2643,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'this'., null, {token: this}], this, this)
           listener: handleIdentifier(this, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2688,8 +2688,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'throw'., null, {token: throw}], throw, throw)
           listener: handleIdentifier(throw, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2733,8 +2733,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'true'., null, {token: true}], true, true)
           listener: handleIdentifier(true, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2778,8 +2778,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'try'., null, {token: try}], try, try)
           listener: handleIdentifier(try, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2823,8 +2823,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'typedef'., null, {token: typedef}], typedef, typedef)
           listener: handleIdentifier(typedef, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -2868,8 +2868,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'var'., null, {token: var}], var, var)
           listener: handleIdentifier(var, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -3001,8 +3001,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'while'., null, {token: while}], while, while)
           listener: handleIdentifier(while, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -3046,8 +3046,8 @@
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'with'., null, {token: with}], with, with)
           listener: handleIdentifier(with, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
@@ -3087,8 +3087,8 @@
         ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
           listener: handleIdentifier(yield, typedefDeclaration)
         listener: handleNoTypeVariables(=)
-        listener: handleNoTypeVariables(()
         listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
         listener: handleVoidKeyword(void)
         parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
           parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
diff --git a/pkg/front_end/parser_testcases/error_recovery/method_called_with.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/method_called_with.dart.intertwined.expect
index 34e33bb..f865ff8 100644
--- a/pkg/front_end/parser_testcases/error_recovery/method_called_with.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/method_called_with.dart.intertwined.expect
@@ -34,7 +34,7 @@
               listener: beginMember()
               isReservedKeyword(with)
               indicatesMethodOrField(()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', null, with, DeclarationKind.Class, C, true)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, with, DeclarationKind.Class, C, true)
                 listener: beginMethod(null, null, null, null, null, with)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(with)
@@ -78,7 +78,7 @@
               listener: beginMember()
               isReservedKeyword(with)
               indicatesMethodOrField(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', with, DeclarationKind.Class, C, true)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', with, DeclarationKind.Class, C, true)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(with)
                 listener: handleType(int, null)
@@ -86,7 +86,7 @@
                   reportRecoverableErrorWithToken(with, Instance of 'Template<(Token) => Message>')
                     listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'with'., null, {token: with}], with, with)
                   listener: handleIdentifier(with, fieldDeclaration)
-                parseFieldInitializerOpt(with, with, null, null, DeclarationKind.Class, C)
+                parseFieldInitializerOpt(with, with, null, null, null, null, DeclarationKind.Class, C)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -105,7 +105,7 @@
               listener: beginMember()
               isReservedKeyword(with)
               indicatesMethodOrField(=>)
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'SimpleType', get, with, DeclarationKind.Class, C, true)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', get, with, DeclarationKind.Class, C, true)
                 listener: beginMethod(null, null, null, null, get, with)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
@@ -146,7 +146,7 @@
               listener: beginMember()
               isReservedKeyword(with)
               indicatesMethodOrField(()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'VoidType', set, with, DeclarationKind.Class, C, true)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'VoidType', set, with, DeclarationKind.Class, C, true)
                 listener: beginMethod(null, null, null, null, set, with)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, true)
@@ -237,7 +237,7 @@
       listener: beginTopLevelMember(int)
       isReservedKeyword(with)
       indicatesMethodOrField(=)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', with, DeclarationKind.TopLevel, null, true)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', with, DeclarationKind.TopLevel, null, true)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(with)
         listener: handleType(int, null)
@@ -245,7 +245,7 @@
           reportRecoverableErrorWithToken(with, Instance of 'Template<(Token) => Message>')
             listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'with'., null, {token: with}], with, with)
           listener: handleIdentifier(with, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(with, with, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(with, with, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/error_recovery/method_called_with_prime.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/method_called_with_prime.dart.intertwined.expect
index bd0176a..06a6ce3 100644
--- a/pkg/front_end/parser_testcases/error_recovery/method_called_with_prime.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/method_called_with_prime.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', null, With, DeclarationKind.Class, C, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, With, DeclarationKind.Class, C, false)
                 listener: beginMethod(null, null, null, null, null, With)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(With)
@@ -72,13 +72,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', With, DeclarationKind.Class, C, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', With, DeclarationKind.Class, C, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(With)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(With, fieldDeclaration)
-                parseFieldInitializerOpt(With, With, null, null, DeclarationKind.Class, C)
+                parseFieldInitializerOpt(With, With, null, null, null, null, DeclarationKind.Class, C)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -95,7 +95,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'SimpleType', get, With, DeclarationKind.Class, C, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', get, With, DeclarationKind.Class, C, false)
                 listener: beginMethod(null, null, null, null, get, With)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
@@ -132,7 +132,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'VoidType', set, With, DeclarationKind.Class, C, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'VoidType', set, With, DeclarationKind.Class, C, false)
                 listener: beginMethod(null, null, null, null, set, With)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -215,13 +215,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', With, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', With, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(With)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(With, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(With, With, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(With, With, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/error_recovery/method_called_with_prime2.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/method_called_with_prime2.dart.intertwined.expect
index 1dcb53c..c7abc22 100644
--- a/pkg/front_end/parser_testcases/error_recovery/method_called_with_prime2.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/method_called_with_prime2.dart.intertwined.expect
@@ -38,13 +38,13 @@
       listener: beginTopLevelMember(foo)
       isReservedKeyword(class)
       indicatesMethodOrField(M1)
-      parseFields(}, null, null, null, null, null, }, Instance of 'NoType', foo, DeclarationKind.TopLevel, null, false)
+      parseFields(}, null, null, null, null, null, null, }, Instance of 'NoType', foo, DeclarationKind.TopLevel, null, false)
         reportRecoverableError(foo, MissingConstFinalVarOrType)
           listener: handleRecoverableError(MissingConstFinalVarOrType, foo, foo)
         listener: handleNoType(})
         ensureIdentifierPotentiallyRecovered(}, topLevelVariableDeclaration, false)
           listener: handleIdentifier(foo, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(foo, foo, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(foo, foo, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(class)
         ensureSemicolon(foo)
           reportRecoverableError(foo, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -84,13 +84,13 @@
               listener: beginMember()
               isReservedKeyword(class)
               indicatesMethodOrField(M2)
-              parseFields({, null, null, null, null, null, {, Instance of 'NoType', foo, DeclarationKind.Class, M1, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'NoType', foo, DeclarationKind.Class, M1, false)
                 reportRecoverableError(foo, MissingConstFinalVarOrType)
                   listener: handleRecoverableError(MissingConstFinalVarOrType, foo, foo)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, fieldDeclaration, false)
                   listener: handleIdentifier(foo, fieldDeclaration)
-                parseFieldInitializerOpt(foo, foo, null, null, DeclarationKind.Class, M1)
+                parseFieldInitializerOpt(foo, foo, null, null, null, null, DeclarationKind.Class, M1)
                   listener: handleNoFieldInitializer(class)
                 ensureSemicolon(foo)
                   reportRecoverableError(foo, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -104,7 +104,7 @@
                 listener: beginMetadataStar(class)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              recoverFromInvalidMember(;, ;, null, null, null, null, null, ;, Instance of 'NoType', null, DeclarationKind.Class, M1)
+              recoverFromInvalidMember(;, ;, null, null, null, null, null, null, ;, Instance of 'NoType', null, DeclarationKind.Class, M1)
                 reportAndSkipClassInClass(class)
                   reportRecoverableError(class, ClassInClass)
                     listener: handleRecoverableError(ClassInClass, class, class)
diff --git a/pkg/front_end/parser_testcases/error_recovery/utf_16_le_content.crash_dart.expect b/pkg/front_end/parser_testcases/error_recovery/utf_16_le_content.crash_dart.expect
index 3f36091..15abefb 100644
--- a/pkg/front_end/parser_testcases/error_recovery/utf_16_le_content.crash_dart.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/utf_16_le_content.crash_dart.expect
Binary files differ
diff --git a/pkg/front_end/parser_testcases/error_recovery/utf_16_le_content.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/utf_16_le_content.crash_dart.intertwined.expect
index 3fa4232..4e3a324 100644
--- a/pkg/front_end/parser_testcases/error_recovery/utf_16_le_content.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/utf_16_le_content.crash_dart.intertwined.expect
@@ -28,13 +28,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(/)
       listener: beginTopLevelMember(C)
-      parseFields(/, null, null, null, null, null, /, Instance of 'SimpleType', o, DeclarationKind.TopLevel, null, false)
+      parseFields(/, null, null, null, null, null, null, /, Instance of 'SimpleType', o, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(C, typeReference)
         listener: handleNoTypeArguments(o)
         listener: handleType(C, null)
         ensureIdentifierPotentiallyRecovered(C, topLevelVariableDeclaration, false)
           listener: handleIdentifier(o, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(o, o, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(o, o, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(p)
         ensureSemicolon(o)
           reportRecoverableError(o, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -48,13 +48,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(p)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', y, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', y, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(p, typeReference)
         listener: handleNoTypeArguments(y)
         listener: handleType(p, null)
         ensureIdentifierPotentiallyRecovered(p, topLevelVariableDeclaration, false)
           listener: handleIdentifier(y, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(y, y, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(y, y, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(r)
         ensureSemicolon(y)
           reportRecoverableError(y, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -68,13 +68,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(r)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(r, typeReference)
         listener: handleNoTypeArguments(i)
         listener: handleType(r, null)
         ensureIdentifierPotentiallyRecovered(r, topLevelVariableDeclaration, false)
           listener: handleIdentifier(i, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(i, i, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(i, i, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(g)
         ensureSemicolon(i)
           reportRecoverableError(i, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -88,13 +88,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(g)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(g, typeReference)
         listener: handleNoTypeArguments(h)
         listener: handleType(g, null)
         ensureIdentifierPotentiallyRecovered(g, topLevelVariableDeclaration, false)
           listener: handleIdentifier(h, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(h, h, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(h, h, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(t)
         ensureSemicolon(h)
           reportRecoverableError(h, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -200,13 +200,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(,)
       listener: beginTopLevelMember(t)
-      parseFields(,, null, null, null, null, null, ,, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
+      parseFields(,, null, null, null, null, null, null, ,, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(t, typeReference)
         listener: handleNoTypeArguments(h)
         listener: handleType(t, null)
         ensureIdentifierPotentiallyRecovered(t, topLevelVariableDeclaration, false)
           listener: handleIdentifier(h, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(h, h, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(h, h, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(h)
           reportRecoverableError(h, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -220,13 +220,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', D, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', D, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(D)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(D, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(D, D, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(D, D, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(a)
         ensureSemicolon(D)
           reportRecoverableError(D, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -240,13 +240,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(a)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(a, typeReference)
         listener: handleNoTypeArguments(r)
         listener: handleType(a, null)
         ensureIdentifierPotentiallyRecovered(a, topLevelVariableDeclaration, false)
           listener: handleIdentifier(r, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(r, r, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(r, r, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(t)
         ensureSemicolon(r)
           reportRecoverableError(r, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -260,13 +260,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(t)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', p, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', p, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(t, typeReference)
         listener: handleNoTypeArguments(p)
         listener: handleType(t, null)
         ensureIdentifierPotentiallyRecovered(t, topLevelVariableDeclaration, false)
           listener: handleIdentifier(p, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(p, p, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(p, p, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(r)
         ensureSemicolon(p)
           reportRecoverableError(p, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -280,13 +280,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(r)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', o, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', o, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(r, typeReference)
         listener: handleNoTypeArguments(o)
         listener: handleType(r, null)
         ensureIdentifierPotentiallyRecovered(r, topLevelVariableDeclaration, false)
           listener: handleIdentifier(o, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(o, o, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(o, o, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(j)
         ensureSemicolon(o)
           reportRecoverableError(o, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -300,13 +300,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(j)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(j, typeReference)
         listener: handleNoTypeArguments(e)
         listener: handleType(j, null)
         ensureIdentifierPotentiallyRecovered(j, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(c)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -320,13 +320,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(c)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(c, typeReference)
         listener: handleNoTypeArguments(t)
         listener: handleType(c, null)
         ensureIdentifierPotentiallyRecovered(c, topLevelVariableDeclaration, false)
           listener: handleIdentifier(t, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(t, t, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(t, t, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(a)
         ensureSemicolon(t)
           reportRecoverableError(t, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -340,13 +340,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(a)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', u, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', u, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(a, typeReference)
         listener: handleNoTypeArguments(u)
         listener: handleType(a, null)
         ensureIdentifierPotentiallyRecovered(a, topLevelVariableDeclaration, false)
           listener: handleIdentifier(u, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(u, u, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(u, u, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(t)
         ensureSemicolon(u)
           reportRecoverableError(u, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -360,13 +360,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(t)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(t, typeReference)
         listener: handleNoTypeArguments(h)
         listener: handleType(t, null)
         ensureIdentifierPotentiallyRecovered(t, topLevelVariableDeclaration, false)
           listener: handleIdentifier(h, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(h, h, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(h, h, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(o)
         ensureSemicolon(h)
           reportRecoverableError(h, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -380,13 +380,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(o)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(o, typeReference)
         listener: handleNoTypeArguments(r)
         listener: handleType(o, null)
         ensureIdentifierPotentiallyRecovered(o, topLevelVariableDeclaration, false)
           listener: handleIdentifier(r, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(r, r, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(r, r, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(s)
         ensureSemicolon(r)
           reportRecoverableError(r, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -400,7 +400,7 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(s)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'PrefixedType', l, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'PrefixedType', l, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, prefixedTypeReference)
         listener: handleIdentifier(P, typeReferenceContinuation)
         listener: handleQualified(.)
@@ -408,7 +408,7 @@
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(P, topLevelVariableDeclaration, false)
           listener: handleIdentifier(l, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(l, l, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(l, l, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(l)
           reportRecoverableError(l, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -422,13 +422,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(a)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(a, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(a, a, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(a, a, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(s)
         ensureSemicolon(a)
           reportRecoverableError(a, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -442,13 +442,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(s)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, typeReference)
         listener: handleNoTypeArguments(e)
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(s, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(s)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -462,13 +462,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(s)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, typeReference)
         listener: handleNoTypeArguments(e)
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(s, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -482,13 +482,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(t)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(t, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(t, t, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(t, t, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(h)
         ensureSemicolon(t)
           reportRecoverableError(t, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -502,13 +502,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(h)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(h, typeReference)
         listener: handleNoTypeArguments(e)
         listener: handleType(h, null)
         ensureIdentifierPotentiallyRecovered(h, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(A)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -522,13 +522,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(A)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', U, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', U, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(A, typeReference)
         listener: handleNoTypeArguments(U)
         listener: handleType(A, null)
         ensureIdentifierPotentiallyRecovered(A, topLevelVariableDeclaration, false)
           listener: handleIdentifier(U, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(U, U, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(U, U, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(T)
         ensureSemicolon(U)
           reportRecoverableError(U, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -542,13 +542,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(T)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', H, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', H, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(T, typeReference)
         listener: handleNoTypeArguments(H)
         listener: handleType(T, null)
         ensureIdentifierPotentiallyRecovered(T, topLevelVariableDeclaration, false)
           listener: handleIdentifier(H, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(H, H, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(H, H, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(O)
         ensureSemicolon(H)
           reportRecoverableError(H, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -562,13 +562,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(O)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', R, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', R, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(O, typeReference)
         listener: handleNoTypeArguments(R)
         listener: handleType(O, null)
         ensureIdentifierPotentiallyRecovered(O, topLevelVariableDeclaration, false)
           listener: handleIdentifier(R, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(R, R, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(R, R, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(S)
         ensureSemicolon(R)
           reportRecoverableError(R, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -582,13 +582,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(S)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', f, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', f, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(S, typeReference)
         listener: handleNoTypeArguments(f)
         listener: handleType(S, null)
         ensureIdentifierPotentiallyRecovered(S, topLevelVariableDeclaration, false)
           listener: handleIdentifier(f, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(f, f, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(f, f, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(i)
         ensureSemicolon(f)
           reportRecoverableError(f, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -602,13 +602,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(i)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', l, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', l, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(i, typeReference)
         listener: handleNoTypeArguments(l)
         listener: handleType(i, null)
         ensureIdentifierPotentiallyRecovered(i, topLevelVariableDeclaration, false)
           listener: handleIdentifier(l, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(l, l, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(l, l, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(l)
           reportRecoverableError(l, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -623,13 +623,13 @@
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
       isReservedKeyword(/)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'NoType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'NoType', e, DeclarationKind.TopLevel, null, false)
         reportRecoverableError(e, MissingConstFinalVarOrType)
           listener: handleRecoverableError(MissingConstFinalVarOrType, e, e)
         listener: handleNoType(;)
         ensureIdentifierPotentiallyRecovered(;, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(/)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -663,13 +663,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(/)
       listener: beginTopLevelMember(f)
-      parseFields(/, null, null, null, null, null, /, Instance of 'SimpleType', o, DeclarationKind.TopLevel, null, false)
+      parseFields(/, null, null, null, null, null, null, /, Instance of 'SimpleType', o, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(f, typeReference)
         listener: handleNoTypeArguments(o)
         listener: handleType(f, null)
         ensureIdentifierPotentiallyRecovered(f, topLevelVariableDeclaration, false)
           listener: handleIdentifier(o, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(o, o, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(o, o, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(r)
         ensureSemicolon(o)
           reportRecoverableError(o, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -683,13 +683,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(r)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', d, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', d, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(r, typeReference)
         listener: handleNoTypeArguments(d)
         listener: handleType(r, null)
         ensureIdentifierPotentiallyRecovered(r, topLevelVariableDeclaration, false)
           listener: handleIdentifier(d, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(d, d, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(d, d, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(d)
           reportRecoverableError(d, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -703,13 +703,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(t)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(t, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(t, t, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(t, t, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(a)
         ensureSemicolon(t)
           reportRecoverableError(t, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -723,13 +723,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(a)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(a, typeReference)
         listener: handleNoTypeArguments(i)
         listener: handleType(a, null)
         ensureIdentifierPotentiallyRecovered(a, topLevelVariableDeclaration, false)
           listener: handleIdentifier(i, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(i, i, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(i, i, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(l)
         ensureSemicolon(i)
           reportRecoverableError(i, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -789,13 +789,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(.)
       listener: beginTopLevelMember(A)
-      parseFields(., null, null, null, null, null, ., Instance of 'SimpleType', l, DeclarationKind.TopLevel, null, false)
+      parseFields(., null, null, null, null, null, null, ., Instance of 'SimpleType', l, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(A, typeReference)
         listener: handleNoTypeArguments(l)
         listener: handleType(A, null)
         ensureIdentifierPotentiallyRecovered(A, topLevelVariableDeclaration, false)
           listener: handleIdentifier(l, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(l, l, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(l, l, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(l)
         ensureSemicolon(l)
           reportRecoverableError(l, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -809,13 +809,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(l)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(l, typeReference)
         listener: handleNoTypeArguments(r)
         listener: handleType(l, null)
         ensureIdentifierPotentiallyRecovered(l, topLevelVariableDeclaration, false)
           listener: handleIdentifier(r, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(r, r, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(r, r, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(i)
         ensureSemicolon(r)
           reportRecoverableError(r, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -829,13 +829,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(i)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', g, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', g, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(i, typeReference)
         listener: handleNoTypeArguments(g)
         listener: handleType(i, null)
         ensureIdentifierPotentiallyRecovered(i, topLevelVariableDeclaration, false)
           listener: handleIdentifier(g, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(g, g, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(g, g, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(h)
         ensureSemicolon(g)
           reportRecoverableError(g, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -849,13 +849,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(h)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(h, typeReference)
         listener: handleNoTypeArguments(t)
         listener: handleType(h, null)
         ensureIdentifierPotentiallyRecovered(h, topLevelVariableDeclaration, false)
           listener: handleIdentifier(t, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(t, t, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(t, t, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(s)
         ensureSemicolon(t)
           reportRecoverableError(t, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -869,13 +869,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(s)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, typeReference)
         listener: handleNoTypeArguments(r)
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(s, topLevelVariableDeclaration, false)
           listener: handleIdentifier(r, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(r, r, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(r, r, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(r)
           reportRecoverableError(r, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -889,13 +889,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', s, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', s, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(s)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(s, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(s, s, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(s, s, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(s)
           reportRecoverableError(s, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -909,13 +909,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(r)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(r, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(r, r, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(r, r, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(v)
         ensureSemicolon(r)
           reportRecoverableError(r, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -929,13 +929,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(v)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(v, typeReference)
         listener: handleNoTypeArguments(e)
         listener: handleType(v, null)
         ensureIdentifierPotentiallyRecovered(v, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(d)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -949,7 +949,7 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(d)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'PrefixedType', s, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'PrefixedType', s, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(d, prefixedTypeReference)
         listener: handleIdentifier(U, typeReferenceContinuation)
         listener: handleQualified(.)
@@ -957,7 +957,7 @@
         listener: handleType(d, null)
         ensureIdentifierPotentiallyRecovered(U, topLevelVariableDeclaration, false)
           listener: handleIdentifier(s, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(s, s, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(s, s, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(s)
           reportRecoverableError(s, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -971,13 +971,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', o, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', o, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(o)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(o, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(o, o, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(o, o, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(f)
         ensureSemicolon(o)
           reportRecoverableError(o, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -991,13 +991,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(f)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(f, typeReference)
         listener: handleNoTypeArguments(t)
         listener: handleType(f, null)
         ensureIdentifierPotentiallyRecovered(f, topLevelVariableDeclaration, false)
           listener: handleIdentifier(t, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(t, t, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(t, t, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(h)
         ensureSemicolon(t)
           reportRecoverableError(t, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1011,13 +1011,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(h)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(h, typeReference)
         listener: handleNoTypeArguments(i)
         listener: handleType(h, null)
         ensureIdentifierPotentiallyRecovered(h, topLevelVariableDeclaration, false)
           listener: handleIdentifier(i, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(i, i, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(i, i, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(s)
         ensureSemicolon(i)
           reportRecoverableError(i, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1031,13 +1031,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(s)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', s, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', s, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, typeReference)
         listener: handleNoTypeArguments(s)
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(s, topLevelVariableDeclaration, false)
           listener: handleIdentifier(s, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(s, s, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(s, s, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(o)
         ensureSemicolon(s)
           reportRecoverableError(s, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1051,13 +1051,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(o)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', u, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', u, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(o, typeReference)
         listener: handleNoTypeArguments(u)
         listener: handleType(o, null)
         ensureIdentifierPotentiallyRecovered(o, topLevelVariableDeclaration, false)
           listener: handleIdentifier(u, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(u, u, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(u, u, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(r)
         ensureSemicolon(u)
           reportRecoverableError(u, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1071,13 +1071,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(r)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', c, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', c, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(r, typeReference)
         listener: handleNoTypeArguments(c)
         listener: handleType(r, null)
         ensureIdentifierPotentiallyRecovered(r, topLevelVariableDeclaration, false)
           listener: handleIdentifier(c, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(c, c, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(c, c, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(c)
           reportRecoverableError(c, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1091,13 +1091,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', c, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', c, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(c)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(c, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(c, c, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(c, c, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(o)
         ensureSemicolon(c)
           reportRecoverableError(c, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1111,13 +1111,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(o)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', d, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', d, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(o, typeReference)
         listener: handleNoTypeArguments(d)
         listener: handleType(o, null)
         ensureIdentifierPotentiallyRecovered(o, topLevelVariableDeclaration, false)
           listener: handleIdentifier(d, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(d, d, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(d, d, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(d)
           reportRecoverableError(d, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1131,13 +1131,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(i)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(i, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(i, i, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(i, i, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(s)
         ensureSemicolon(i)
           reportRecoverableError(i, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1151,13 +1151,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(s)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', g, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', g, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, typeReference)
         listener: handleNoTypeArguments(g)
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(s, topLevelVariableDeclaration, false)
           listener: handleIdentifier(g, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(g, g, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(g, g, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(o)
         ensureSemicolon(g)
           reportRecoverableError(g, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1171,13 +1171,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(o)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', v, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', v, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(o, typeReference)
         listener: handleNoTypeArguments(v)
         listener: handleType(o, null)
         ensureIdentifierPotentiallyRecovered(o, topLevelVariableDeclaration, false)
           listener: handleIdentifier(v, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(v, v, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(v, v, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(v)
           reportRecoverableError(v, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1191,13 +1191,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(r)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(r, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(r, r, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(r, r, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(n)
         ensureSemicolon(r)
           reportRecoverableError(r, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1211,13 +1211,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(n)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(n, typeReference)
         listener: handleNoTypeArguments(e)
         listener: handleType(n, null)
         ensureIdentifierPotentiallyRecovered(n, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(d)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1231,13 +1231,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(d)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', b, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', b, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(d, typeReference)
         listener: handleNoTypeArguments(b)
         listener: handleType(d, null)
         ensureIdentifierPotentiallyRecovered(d, topLevelVariableDeclaration, false)
           listener: handleIdentifier(b, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(b, b, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(b, b, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(y)
         ensureSemicolon(b)
           reportRecoverableError(b, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1251,13 +1251,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(y)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(y, typeReference)
         listener: handleNoTypeArguments(a)
         listener: handleType(y, null)
         ensureIdentifierPotentiallyRecovered(y, topLevelVariableDeclaration, false)
           listener: handleIdentifier(a, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(a, a, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(a, a, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(/)
         ensureSemicolon(a)
           reportRecoverableError(a, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1291,13 +1291,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(/)
       listener: beginTopLevelMember(B)
-      parseFields(/, null, null, null, null, null, /, Instance of 'SimpleType', S, DeclarationKind.TopLevel, null, false)
+      parseFields(/, null, null, null, null, null, null, /, Instance of 'SimpleType', S, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(B, typeReference)
         listener: handleNoTypeArguments(S)
         listener: handleType(B, null)
         ensureIdentifierPotentiallyRecovered(B, topLevelVariableDeclaration, false)
           listener: handleIdentifier(S, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(S, S, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(S, S, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(D)
         ensureSemicolon(S)
           reportRecoverableError(S, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1312,13 +1312,13 @@
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(D)
       isReservedKeyword(-)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'NoType', D, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'NoType', D, DeclarationKind.TopLevel, null, false)
         reportRecoverableError(D, MissingConstFinalVarOrType)
           listener: handleRecoverableError(MissingConstFinalVarOrType, D, D)
         listener: handleNoType(;)
         ensureIdentifierPotentiallyRecovered(;, topLevelVariableDeclaration, false)
           listener: handleIdentifier(D, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(D, D, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(D, D, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(-)
         ensureSemicolon(D)
           reportRecoverableError(D, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1342,13 +1342,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(-)
       listener: beginTopLevelMember(s)
-      parseFields(-, null, null, null, null, null, -, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
+      parseFields(-, null, null, null, null, null, null, -, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, typeReference)
         listener: handleNoTypeArguments(t)
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(s, topLevelVariableDeclaration, false)
           listener: handleIdentifier(t, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(t, t, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(t, t, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(y)
         ensureSemicolon(t)
           reportRecoverableError(t, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1362,13 +1362,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(y)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', l, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', l, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(y, typeReference)
         listener: handleNoTypeArguments(l)
         listener: handleType(y, null)
         ensureIdentifierPotentiallyRecovered(y, topLevelVariableDeclaration, false)
           listener: handleIdentifier(l, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(l, l, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(l, l, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(l)
           reportRecoverableError(l, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1382,13 +1382,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', l, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', l, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(l)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(l, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(l, l, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(l, l, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(i)
         ensureSemicolon(l)
           reportRecoverableError(l, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1402,13 +1402,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(i)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', c, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', c, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(i, typeReference)
         listener: handleNoTypeArguments(c)
         listener: handleType(i, null)
         ensureIdentifierPotentiallyRecovered(i, topLevelVariableDeclaration, false)
           listener: handleIdentifier(c, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(c, c, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(c, c, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(c)
           reportRecoverableError(c, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1422,13 +1422,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', n, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', n, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(n)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(n, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(n, n, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(n, n, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(s)
         ensureSemicolon(n)
           reportRecoverableError(n, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1442,13 +1442,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(s)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, typeReference)
         listener: handleNoTypeArguments(e)
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(s, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(t)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1462,13 +1462,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(t)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(t, typeReference)
         listener: handleNoTypeArguments(h)
         listener: handleType(t, null)
         ensureIdentifierPotentiallyRecovered(t, topLevelVariableDeclaration, false)
           listener: handleIdentifier(h, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(h, h, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(h, h, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(a)
         ensureSemicolon(h)
           reportRecoverableError(h, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1482,13 +1482,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(a)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', t, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(a, typeReference)
         listener: handleNoTypeArguments(t)
         listener: handleType(a, null)
         ensureIdentifierPotentiallyRecovered(a, topLevelVariableDeclaration, false)
           listener: handleIdentifier(t, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(t, t, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(t, t, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(c)
         ensureSemicolon(t)
           reportRecoverableError(t, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1502,13 +1502,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(c)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(c, typeReference)
         listener: handleNoTypeArguments(a)
         listener: handleType(c, null)
         ensureIdentifierPotentiallyRecovered(c, topLevelVariableDeclaration, false)
           listener: handleIdentifier(a, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(a, a, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(a, a, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(n)
         ensureSemicolon(a)
           reportRecoverableError(a, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1522,13 +1522,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(n)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', b, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', b, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(n, typeReference)
         listener: handleNoTypeArguments(b)
         listener: handleType(n, null)
         ensureIdentifierPotentiallyRecovered(n, topLevelVariableDeclaration, false)
           listener: handleIdentifier(b, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(b, b, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(b, b, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(b)
           reportRecoverableError(b, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1542,13 +1542,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', f, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', f, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(f)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(f, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(f, f, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(f, f, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(o)
         ensureSemicolon(f)
           reportRecoverableError(f, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1562,13 +1562,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(o)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', u, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', u, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(o, typeReference)
         listener: handleNoTypeArguments(u)
         listener: handleType(o, null)
         ensureIdentifierPotentiallyRecovered(o, topLevelVariableDeclaration, false)
           listener: handleIdentifier(u, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(u, u, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(u, u, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(n)
         ensureSemicolon(u)
           reportRecoverableError(u, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1582,13 +1582,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(n)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', d, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', d, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(n, typeReference)
         listener: handleNoTypeArguments(d)
         listener: handleType(n, null)
         ensureIdentifierPotentiallyRecovered(n, topLevelVariableDeclaration, false)
           listener: handleIdentifier(d, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(d, d, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(d, d, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(i)
         ensureSemicolon(d)
           reportRecoverableError(d, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1602,13 +1602,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(i)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', n, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', n, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(i, typeReference)
         listener: handleNoTypeArguments(n)
         listener: handleType(i, null)
         ensureIdentifierPotentiallyRecovered(i, topLevelVariableDeclaration, false)
           listener: handleIdentifier(n, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(n, n, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(n, n, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(t)
         ensureSemicolon(n)
           reportRecoverableError(n, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1622,13 +1622,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(t)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(t, typeReference)
         listener: handleNoTypeArguments(h)
         listener: handleType(t, null)
         ensureIdentifierPotentiallyRecovered(t, topLevelVariableDeclaration, false)
           listener: handleIdentifier(h, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(h, h, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(h, h, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(e)
         ensureSemicolon(h)
           reportRecoverableError(h, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1642,13 +1642,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(e)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', L, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', L, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(e, typeReference)
         listener: handleNoTypeArguments(L)
         listener: handleType(e, null)
         ensureIdentifierPotentiallyRecovered(e, topLevelVariableDeclaration, false)
           listener: handleIdentifier(L, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(L, L, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(L, L, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(I)
         ensureSemicolon(L)
           reportRecoverableError(L, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1662,13 +1662,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(I)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', C, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', C, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(I, typeReference)
         listener: handleNoTypeArguments(C)
         listener: handleType(I, null)
         ensureIdentifierPotentiallyRecovered(I, topLevelVariableDeclaration, false)
           listener: handleIdentifier(C, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(C, C, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(C, C, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(E)
         ensureSemicolon(C)
           reportRecoverableError(C, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1682,13 +1682,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(E)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', N, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', N, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(E, typeReference)
         listener: handleNoTypeArguments(N)
         listener: handleType(E, null)
         ensureIdentifierPotentiallyRecovered(E, topLevelVariableDeclaration, false)
           listener: handleIdentifier(N, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(N, N, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(N, N, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(S)
         ensureSemicolon(N)
           reportRecoverableError(N, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1748,13 +1748,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(.)
       listener: beginTopLevelMember(m)
-      parseFields(., null, null, null, null, null, ., Instance of 'SimpleType', d, DeclarationKind.TopLevel, null, false)
+      parseFields(., null, null, null, null, null, null, ., Instance of 'SimpleType', d, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(m, typeReference)
         listener: handleNoTypeArguments(d)
         listener: handleType(m, null)
         ensureIdentifierPotentiallyRecovered(m, topLevelVariableDeclaration, false)
           listener: handleIdentifier(d, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(d, d, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(d, d, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(f)
         ensureSemicolon(d)
           reportRecoverableError(d, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1768,13 +1768,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(f)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(f, typeReference)
         listener: handleNoTypeArguments(i)
         listener: handleType(f, null)
         ensureIdentifierPotentiallyRecovered(f, topLevelVariableDeclaration, false)
           listener: handleIdentifier(i, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(i, i, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(i, i, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(l)
         ensureSemicolon(i)
           reportRecoverableError(i, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1854,13 +1854,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(/)
       listener: beginTopLevelMember(T)
-      parseFields(/, null, null, null, null, null, /, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
+      parseFields(/, null, null, null, null, null, null, /, Instance of 'SimpleType', h, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(T, typeReference)
         listener: handleNoTypeArguments(h)
         listener: handleType(T, null)
         ensureIdentifierPotentiallyRecovered(T, topLevelVariableDeclaration, false)
           listener: handleIdentifier(h, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(h, h, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(h, h, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(i)
         ensureSemicolon(h)
           reportRecoverableError(h, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1874,13 +1874,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(i)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', s, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', s, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(i, typeReference)
         listener: handleNoTypeArguments(s)
         listener: handleType(i, null)
         ensureIdentifierPotentiallyRecovered(i, topLevelVariableDeclaration, false)
           listener: handleIdentifier(s, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(s, s, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(s, s, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(f)
         ensureSemicolon(s)
           reportRecoverableError(s, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1894,13 +1894,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(f)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', i, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(f, typeReference)
         listener: handleNoTypeArguments(i)
         listener: handleType(f, null)
         ensureIdentifierPotentiallyRecovered(f, topLevelVariableDeclaration, false)
           listener: handleIdentifier(i, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(i, i, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(i, i, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(l)
         ensureSemicolon(i)
           reportRecoverableError(i, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1914,13 +1914,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(l)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(l, typeReference)
         listener: handleNoTypeArguments(e)
         listener: handleType(l, null)
         ensureIdentifierPotentiallyRecovered(l, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(i)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1934,13 +1934,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(i)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', s, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', s, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(i, typeReference)
         listener: handleNoTypeArguments(s)
         listener: handleType(i, null)
         ensureIdentifierPotentiallyRecovered(i, topLevelVariableDeclaration, false)
           listener: handleIdentifier(s, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(s, s, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(s, s, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(s)
         ensureSemicolon(s)
           reportRecoverableError(s, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1954,13 +1954,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(s)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, typeReference)
         listener: handleNoTypeArguments(a)
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(s, topLevelVariableDeclaration, false)
           listener: handleIdentifier(a, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(a, a, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(a, a, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(v)
         ensureSemicolon(a)
           reportRecoverableError(a, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1974,13 +1974,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(v)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', e, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(v, typeReference)
         listener: handleNoTypeArguments(e)
         listener: handleType(v, null)
         ensureIdentifierPotentiallyRecovered(v, topLevelVariableDeclaration, false)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(d)
         ensureSemicolon(e)
           reportRecoverableError(e, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -1994,13 +1994,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(d)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(d, typeReference)
         listener: handleNoTypeArguments(a)
         listener: handleType(d, null)
         ensureIdentifierPotentiallyRecovered(d, topLevelVariableDeclaration, false)
           listener: handleIdentifier(a, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(a, a, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(a, a, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(s)
         ensureSemicolon(a)
           reportRecoverableError(a, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -2014,13 +2014,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(s)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', U, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', U, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(s, typeReference)
         listener: handleNoTypeArguments(U)
         listener: handleType(s, null)
         ensureIdentifierPotentiallyRecovered(s, topLevelVariableDeclaration, false)
           listener: handleIdentifier(U, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(U, U, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(U, U, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(T)
         ensureSemicolon(U)
           reportRecoverableError(U, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -2034,13 +2034,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(T)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', F, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', F, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(T, typeReference)
         listener: handleNoTypeArguments(F)
         listener: handleType(T, null)
         ensureIdentifierPotentiallyRecovered(T, topLevelVariableDeclaration, false)
           listener: handleIdentifier(F, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(F, F, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(F, F, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(-)
         ensureSemicolon(F)
           reportRecoverableError(F, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -2130,13 +2130,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(.)
       listener: beginTopLevelMember(m)
-      parseFields(., null, null, null, null, null, ., Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
+      parseFields(., null, null, null, null, null, null, ., Instance of 'SimpleType', a, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(m, typeReference)
         listener: handleNoTypeArguments(a)
         listener: handleType(m, null)
         ensureIdentifierPotentiallyRecovered(m, topLevelVariableDeclaration, false)
           listener: handleIdentifier(a, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(a, a, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(a, a, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(i)
         ensureSemicolon(a)
           reportRecoverableError(a, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -2186,7 +2186,7 @@
                       listener: handleIdentifier(r, localVariableDeclaration)
                     listener: beginInitializedIdentifier(r)
                     parseVariableInitializerOpt(r)
-                      listener: handleNoVariableInitializer(i)
+                      listener: handleNoVariableInitializer(r)
                     listener: endInitializedIdentifier(r)
                   ensureSemicolon(r)
                     reportRecoverableError(r, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
@@ -2210,7 +2210,7 @@
                       listener: handleIdentifier(n, localVariableDeclaration)
                     listener: beginInitializedIdentifier(n)
                     parseVariableInitializerOpt(n)
-                      listener: handleNoVariableInitializer(t)
+                      listener: handleNoVariableInitializer(n)
                     listener: endInitializedIdentifier(n)
                   ensureSemicolon(n)
                     reportRecoverableError(n, Message[ExpectedAfterButGot, Expected ';' after this., null, {string: ;}])
diff --git a/pkg/front_end/parser_testcases/extensions/covariant.dart.intertwined.expect b/pkg/front_end/parser_testcases/extensions/covariant.dart.intertwined.expect
index 6f54ea6..a6bfc1c 100644
--- a/pkg/front_end/parser_testcases/extensions/covariant.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/extensions/covariant.dart.intertwined.expect
@@ -82,7 +82,7 @@
               listener: endMetadataStar(0)
             listener: beginMember()
             isReservedKeyword(()
-            parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, addChild, DeclarationKind.Extension, null, false)
+            parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, addChild, DeclarationKind.Extension, null, false)
               listener: beginMethod(null, null, null, null, null, addChild)
               listener: handleNoType({)
               ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/extensions/not_covariant.dart.intertwined.expect b/pkg/front_end/parser_testcases/extensions/not_covariant.dart.intertwined.expect
index 309c3b2..9bfe405 100644
--- a/pkg/front_end/parser_testcases/extensions/not_covariant.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/extensions/not_covariant.dart.intertwined.expect
@@ -82,7 +82,7 @@
               listener: endMetadataStar(0)
             listener: beginMember()
             isReservedKeyword(()
-            parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, addChild, DeclarationKind.Extension, null, false)
+            parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, addChild, DeclarationKind.Extension, null, false)
               listener: beginMethod(null, null, null, null, null, addChild)
               listener: handleNoType({)
               ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/extensions/static.dart.intertwined.expect b/pkg/front_end/parser_testcases/extensions/static.dart.intertwined.expect
index 8c2fff7..cd427ab 100644
--- a/pkg/front_end/parser_testcases/extensions/static.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/extensions/static.dart.intertwined.expect
@@ -82,7 +82,7 @@
               listener: endMetadataStar(0)
             listener: beginMember()
             isReservedKeyword(()
-            parseMethod({, null, static, null, null, null, static, Instance of 'NoType', null, addChild, DeclarationKind.Extension, null, false)
+            parseMethod({, null, null, static, null, null, null, static, Instance of 'NoType', null, addChild, DeclarationKind.Extension, null, false)
               listener: beginMethod(null, static, null, null, null, addChild)
               listener: handleNoType(static)
               ensureIdentifierPotentiallyRecovered(static, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/extensions/static_covariant.dart.intertwined.expect b/pkg/front_end/parser_testcases/extensions/static_covariant.dart.intertwined.expect
index e53f220..ff30f70 100644
--- a/pkg/front_end/parser_testcases/extensions/static_covariant.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/extensions/static_covariant.dart.intertwined.expect
@@ -82,7 +82,7 @@
               listener: endMetadataStar(0)
             listener: beginMember()
             isReservedKeyword(()
-            parseMethod({, null, static, null, null, null, static, Instance of 'NoType', null, addChild, DeclarationKind.Extension, null, false)
+            parseMethod({, null, null, static, null, null, null, static, Instance of 'NoType', null, addChild, DeclarationKind.Extension, null, false)
               listener: beginMethod(null, static, null, null, null, addChild)
               listener: handleNoType(static)
               ensureIdentifierPotentiallyRecovered(static, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/general/ambiguous_builder_01.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/ambiguous_builder_01.dart.intertwined.expect
index e4575db..5a9bafc 100644
--- a/pkg/front_end/parser_testcases/general/ambiguous_builder_01.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/general/ambiguous_builder_01.dart.intertwined.expect
@@ -54,13 +54,13 @@
     parseTopLevelMemberImpl(.)
       listener: beginTopLevelMember(y)
       isReservedKeyword(=)
-      parseFields(., null, null, null, null, null, ., Instance of 'NoType', y, DeclarationKind.TopLevel, null, false)
+      parseFields(., null, null, null, null, null, null, ., Instance of 'NoType', y, DeclarationKind.TopLevel, null, false)
         reportRecoverableError(y, MissingConstFinalVarOrType)
           listener: handleRecoverableError(MissingConstFinalVarOrType, y, y)
         listener: handleNoType(.)
         ensureIdentifierPotentiallyRecovered(., topLevelVariableDeclaration, false)
           listener: handleIdentifier(y, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(y, y, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(y, y, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -123,13 +123,13 @@
     parseTopLevelMemberImpl(.)
       listener: beginTopLevelMember(z)
       isReservedKeyword(=)
-      parseFields(., null, null, null, null, null, ., Instance of 'NoType', z, DeclarationKind.TopLevel, null, false)
+      parseFields(., null, null, null, null, null, null, ., Instance of 'NoType', z, DeclarationKind.TopLevel, null, false)
         reportRecoverableError(z, MissingConstFinalVarOrType)
           listener: handleRecoverableError(MissingConstFinalVarOrType, z, z)
         listener: handleNoType(.)
         ensureIdentifierPotentiallyRecovered(., topLevelVariableDeclaration, false)
           listener: handleIdentifier(z, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(z, z, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(z, z, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/general/built_in_identifier_class_fields.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/built_in_identifier_class_fields.dart.intertwined.expect
index 82ec9c3..4f0fae4 100644
--- a/pkg/front_end/parser_testcases/general/built_in_identifier_class_fields.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/general/built_in_identifier_class_fields.dart.intertwined.expect
@@ -32,13 +32,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleType', abstract, DeclarationKind.Class, WrapperClass, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleType', abstract, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(abstract)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(abstract, fieldDeclaration)
-                parseFieldInitializerOpt(abstract, abstract, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(abstract, abstract, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -55,13 +55,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', as, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', as, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(as)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(as, fieldDeclaration)
-                parseFieldInitializerOpt(as, as, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(as, as, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -78,13 +78,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', covariant, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', covariant, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(covariant)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(covariant, fieldDeclaration)
-                parseFieldInitializerOpt(covariant, covariant, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(covariant, covariant, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -101,13 +101,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', deferred, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', deferred, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(deferred)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(deferred, fieldDeclaration)
-                parseFieldInitializerOpt(deferred, deferred, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(deferred, deferred, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -124,13 +124,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', dynamic, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', dynamic, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(dynamic)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(dynamic, fieldDeclaration)
-                parseFieldInitializerOpt(dynamic, dynamic, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(dynamic, dynamic, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -147,13 +147,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', export, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', export, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(export)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(export, fieldDeclaration)
-                parseFieldInitializerOpt(export, export, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(export, export, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -170,13 +170,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', external, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', external, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(external)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(external, fieldDeclaration)
-                parseFieldInitializerOpt(external, external, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(external, external, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -193,13 +193,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', factory, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', factory, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(factory)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(factory, fieldDeclaration)
-                parseFieldInitializerOpt(factory, factory, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(factory, factory, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -216,13 +216,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', Function, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', Function, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(Function)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(Function, fieldDeclaration)
-                parseFieldInitializerOpt(Function, Function, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(Function, Function, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -240,13 +240,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', get, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', get, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(get, fieldDeclaration)
-                parseFieldInitializerOpt(get, get, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(get, get, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -263,13 +263,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', implements, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', implements, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(implements)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(implements, fieldDeclaration)
-                parseFieldInitializerOpt(implements, implements, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(implements, implements, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -286,13 +286,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', import, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', import, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(import)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(import, fieldDeclaration)
-                parseFieldInitializerOpt(import, import, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(import, import, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -309,13 +309,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', interface, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', interface, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(interface)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(interface, fieldDeclaration)
-                parseFieldInitializerOpt(interface, interface, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(interface, interface, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -332,13 +332,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', library, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', library, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(library)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(library, fieldDeclaration)
-                parseFieldInitializerOpt(library, library, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(library, library, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -356,13 +356,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isUnaryMinus(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', operator, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', operator, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(operator)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(operator, fieldDeclaration)
-                parseFieldInitializerOpt(operator, operator, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(operator, operator, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -379,13 +379,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', mixin, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', mixin, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(mixin)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(mixin, fieldDeclaration)
-                parseFieldInitializerOpt(mixin, mixin, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(mixin, mixin, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -402,13 +402,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', part, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', part, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(part)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(part, fieldDeclaration)
-                parseFieldInitializerOpt(part, part, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(part, part, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -426,13 +426,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(=)
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', set, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', set, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(set)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(set, fieldDeclaration)
-                parseFieldInitializerOpt(set, set, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(set, set, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -449,13 +449,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', static, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', static, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(static)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(static, fieldDeclaration)
-                parseFieldInitializerOpt(static, static, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(static, static, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -472,13 +472,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', typedef, DeclarationKind.Class, WrapperClass, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', typedef, DeclarationKind.Class, WrapperClass, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(typedef)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(typedef, fieldDeclaration)
-                parseFieldInitializerOpt(typedef, typedef, null, null, DeclarationKind.Class, WrapperClass)
+                parseFieldInitializerOpt(typedef, typedef, null, null, null, null, DeclarationKind.Class, WrapperClass)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/general/built_in_identifier_class_methods.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/built_in_identifier_class_methods.dart.intertwined.expect
index 70d5893..b7770f9 100644
--- a/pkg/front_end/parser_testcases/general/built_in_identifier_class_methods.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/general/built_in_identifier_class_methods.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', null, abstract, DeclarationKind.Class, WrapperClass, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, abstract, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, abstract)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(abstract)
@@ -166,7 +166,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, as, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, as, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, as)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(as)
@@ -300,7 +300,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, covariant, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, covariant, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, covariant)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(covariant)
@@ -434,7 +434,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, deferred, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, deferred, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, deferred)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(deferred)
@@ -568,7 +568,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, dynamic, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, dynamic, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, dynamic)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(dynamic)
@@ -702,7 +702,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, export, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, export, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, export)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(export)
@@ -836,7 +836,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, external, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, external, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, external)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(external)
@@ -970,7 +970,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, factory, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, factory, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, factory)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(factory)
@@ -1104,7 +1104,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, Function, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, Function, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, Function)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(Function)
@@ -1239,7 +1239,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, get, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, get, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, get)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
@@ -1373,7 +1373,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, implements, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, implements, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, implements)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(implements)
@@ -1507,7 +1507,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, import, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, import, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, import)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(import)
@@ -1641,7 +1641,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, interface, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, interface, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, interface)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(interface)
@@ -1775,7 +1775,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, library, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, library, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, library)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(library)
@@ -1910,7 +1910,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isUnaryMinus(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, operator, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, operator, DeclarationKind.Class, WrapperClass, false)
                 isUnaryMinus(()
                 listener: beginMethod(null, null, null, null, null, operator)
                 listener: handleIdentifier(int, typeReference)
@@ -2045,7 +2045,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, mixin, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, mixin, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, mixin)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(mixin)
@@ -2179,7 +2179,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, part, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, part, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, part)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(part)
@@ -2314,7 +2314,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, set, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, set, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, set)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(set)
@@ -2448,7 +2448,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, static, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, static, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, static)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(static)
@@ -2582,7 +2582,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', null, typedef, DeclarationKind.Class, WrapperClass, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', null, typedef, DeclarationKind.Class, WrapperClass, false)
                 listener: beginMethod(null, null, null, null, null, typedef)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(typedef)
diff --git a/pkg/front_end/parser_testcases/general/built_in_identifier_top_level_fields.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/built_in_identifier_top_level_fields.dart.intertwined.expect
index 33c529a..4ab6b44 100644
--- a/pkg/front_end/parser_testcases/general/built_in_identifier_top_level_fields.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/general/built_in_identifier_top_level_fields.dart.intertwined.expect
@@ -8,13 +8,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl()
       listener: beginTopLevelMember(int)
-      parseFields(, null, null, null, null, null, , Instance of 'SimpleType', abstract, DeclarationKind.TopLevel, null, false)
+      parseFields(, null, null, null, null, null, null, , Instance of 'SimpleType', abstract, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(abstract)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(abstract, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(abstract, abstract, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(abstract, abstract, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -31,13 +31,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', as, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', as, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(as)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(as, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(as, as, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(as, as, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -54,13 +54,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', covariant, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', covariant, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(covariant)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(covariant, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(covariant, covariant, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(covariant, covariant, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -77,13 +77,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', deferred, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', deferred, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(deferred)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(deferred, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(deferred, deferred, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(deferred, deferred, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -100,13 +100,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', dynamic, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', dynamic, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(dynamic)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(dynamic, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(dynamic, dynamic, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(dynamic, dynamic, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -123,13 +123,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', export, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', export, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(export)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(export, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(export, export, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(export, export, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -146,13 +146,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', external, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', external, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(external)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(external, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(external, external, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(external, external, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -169,13 +169,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', factory, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', factory, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(factory)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(factory, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(factory, factory, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(factory, factory, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -192,13 +192,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', Function, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', Function, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(Function)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(Function, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(Function, Function, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(Function, Function, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -215,13 +215,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', get, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', get, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(get)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(get, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(get, get, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(get, get, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -238,13 +238,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', implements, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', implements, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(implements)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(implements, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(implements, implements, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(implements, implements, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -261,13 +261,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', import, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', import, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(import)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(import, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(import, import, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(import, import, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -284,13 +284,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', interface, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', interface, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(interface)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(interface, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(interface, interface, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(interface, interface, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -307,13 +307,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', library, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', library, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(library)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(library, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(library, library, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(library, library, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -330,13 +330,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', operator, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', operator, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(operator)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(operator, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(operator, operator, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(operator, operator, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -353,13 +353,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', mixin, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', mixin, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(mixin)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(mixin, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(mixin, mixin, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(mixin, mixin, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -376,13 +376,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', part, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', part, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(part)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(part, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(part, part, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(part, part, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -399,13 +399,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', set, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', set, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(set)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(set, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(set, set, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(set, set, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -422,13 +422,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', static, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', static, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(static)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(static, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(static, static, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(static, static, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
@@ -445,13 +445,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(int)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', typedef, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', typedef, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(int, typeReference)
         listener: handleNoTypeArguments(typedef)
         listener: handleType(int, null)
         ensureIdentifierPotentiallyRecovered(int, topLevelVariableDeclaration, false)
           listener: handleIdentifier(typedef, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(typedef, typedef, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(typedef, typedef, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: beginFieldInitializer(=)
           parseExpression(=)
             parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/general/for_in.dart.expect b/pkg/front_end/parser_testcases/general/for_in.dart.expect
index b075cf9..c00444c 100644
--- a/pkg/front_end/parser_testcases/general/for_in.dart.expect
+++ b/pkg/front_end/parser_testcases/general/for_in.dart.expect
@@ -17,7 +17,7 @@
           beginVariablesDeclaration(i, null, var)
             handleIdentifier(i, localVariableDeclaration)
             beginInitializedIdentifier(i)
-              handleNoVariableInitializer(in)
+              handleNoVariableInitializer(i)
             endInitializedIdentifier(i)
           endVariablesDeclaration(1, null)
           handleForInitializerLocalVariableDeclaration(i, true)
diff --git a/pkg/front_end/parser_testcases/general/for_in.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/for_in.dart.intertwined.expect
index d06605e..6be8639 100644
--- a/pkg/front_end/parser_testcases/general/for_in.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/general/for_in.dart.intertwined.expect
@@ -45,7 +45,7 @@
                         listener: handleIdentifier(i, localVariableDeclaration)
                       listener: beginInitializedIdentifier(i)
                       parseVariableInitializerOpt(i)
-                        listener: handleNoVariableInitializer(in)
+                        listener: handleNoVariableInitializer(i)
                       listener: endInitializedIdentifier(i)
                     listener: endVariablesDeclaration(1, null)
                   listener: handleForInitializerLocalVariableDeclaration(i, true)
diff --git a/pkg/front_end/parser_testcases/general/for_in_no_decl.dart.expect b/pkg/front_end/parser_testcases/general/for_in_no_decl.dart.expect
index e8e3110..54e4fc4 100644
--- a/pkg/front_end/parser_testcases/general/for_in_no_decl.dart.expect
+++ b/pkg/front_end/parser_testcases/general/for_in_no_decl.dart.expect
@@ -16,7 +16,7 @@
         beginVariablesDeclaration(i, null, var)
           handleIdentifier(i, localVariableDeclaration)
           beginInitializedIdentifier(i)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(i)
           endInitializedIdentifier(i)
         endVariablesDeclaration(1, ;)
         beginForStatement(for)
diff --git a/pkg/front_end/parser_testcases/general/for_in_no_decl.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/for_in_no_decl.dart.intertwined.expect
index 14660b8..a7f2679 100644
--- a/pkg/front_end/parser_testcases/general/for_in_no_decl.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/general/for_in_no_decl.dart.intertwined.expect
@@ -41,7 +41,7 @@
                       listener: handleIdentifier(i, localVariableDeclaration)
                     listener: beginInitializedIdentifier(i)
                     parseVariableInitializerOpt(i)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(i)
                     listener: endInitializedIdentifier(i)
                   ensureSemicolon(i)
                   listener: endVariablesDeclaration(1, ;)
diff --git a/pkg/front_end/parser_testcases/general/for_no_decl.dart.expect b/pkg/front_end/parser_testcases/general/for_no_decl.dart.expect
index d5af7db..bbe4ce5 100644
--- a/pkg/front_end/parser_testcases/general/for_no_decl.dart.expect
+++ b/pkg/front_end/parser_testcases/general/for_no_decl.dart.expect
@@ -18,7 +18,7 @@
         beginVariablesDeclaration(i, null, null)
           handleIdentifier(i, localVariableDeclaration)
           beginInitializedIdentifier(i)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(i)
           endInitializedIdentifier(i)
         endVariablesDeclaration(1, ;)
         beginForStatement(for)
diff --git a/pkg/front_end/parser_testcases/general/for_no_decl.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/for_no_decl.dart.intertwined.expect
index 710c4157..dce6b08 100644
--- a/pkg/front_end/parser_testcases/general/for_no_decl.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/general/for_no_decl.dart.intertwined.expect
@@ -43,7 +43,7 @@
                       listener: handleIdentifier(i, localVariableDeclaration)
                     listener: beginInitializedIdentifier(i)
                     parseVariableInitializerOpt(i)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(i)
                     listener: endInitializedIdentifier(i)
                   ensureSemicolon(i)
                   listener: endVariablesDeclaration(1, ;)
diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart
new file mode 100644
index 0000000..4cdd14e
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart
@@ -0,0 +1,41 @@
+// 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.
+
+typedef E1<T> = void Function();
+typedef E2<T extends num> = void Function();
+typedef E3<T, S> = void Function();
+typedef E4<T extends num, S extends num> = void Function();
+typedef E5<T extends S, S extends num> = void Function();
+typedef E6<T extends num, S extends T> = void Function();
+
+typedef F1 = void Function<T>();
+typedef F2 = void Function<T extends num>();
+typedef F3 = void Function<T, S>();
+typedef F4 = void Function<T extends num, S extends num>();
+typedef F5 = void Function<T extends S, S extends num>();
+typedef F6 = void Function<T extends num, S extends T>();
+
+typedef G1<X> = void Function<T extends X>();
+typedef G2<X extends num> = void Function<T extends X>();
+typedef G3<X, Y> = void Function<T extends X, S extends Y>();
+typedef G4<X extends num, Y extends num> = void
+    Function<T extends X, S extends Y>();
+typedef G5<X extends num> = void Function<T extends S, S extends X>();
+typedef G6<X extends num> = void Function<T extends X, S extends T>();
+
+typedef H1 = void Function(void Function<T>());
+typedef H2 = void Function(void Function<T extends num>());
+typedef H3 = void Function(void Function<T, S>());
+typedef H4 = void Function(void Function<T extends num, S extends num>());
+typedef H5 = void Function(void Function<T extends S, S extends num>());
+typedef H6 = void Function(void Function<T extends num, S extends T>());
+
+void Function<T>() f1;
+void Function<T extends num>() f2;
+void Function<T, S>() f3;
+void Function<T extends num, S extends num>() f4;
+void Function<T extends S, S extends num>() f5;
+void Function<T extends num, S extends T>() f6;
+
+main() {}
diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.expect b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.expect
new file mode 100644
index 0000000..e210455
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.expect
@@ -0,0 +1,984 @@
+beginCompilationUnit(typedef)
+  beginMetadataStar(typedef)
+  endMetadataStar(0)
+  beginFunctionTypeAlias(typedef)
+    handleIdentifier(E1, typedefDeclaration)
+    beginTypeVariables(<)
+      beginMetadataStar(T)
+      endMetadataStar(0)
+      handleIdentifier(T, typeVariableDeclaration)
+      beginTypeVariable(T)
+        handleTypeVariablesDefined(T, 1)
+        handleNoType(T)
+      endTypeVariable(>, 0, null, null)
+    endTypeVariables(<, >)
+    beginFunctionType(void)
+      handleNoTypeVariables(()
+      handleVoidKeyword(void)
+      beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+      endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+    endFunctionType(Function, null)
+  endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+  handleIdentifier(E2, typedefDeclaration)
+  beginTypeVariables(<)
+    beginMetadataStar(T)
+    endMetadataStar(0)
+    handleIdentifier(T, typeVariableDeclaration)
+    beginTypeVariable(T)
+      handleTypeVariablesDefined(num, 1)
+      handleIdentifier(num, typeReference)
+      handleNoTypeArguments(>)
+      handleType(num, null)
+    endTypeVariable(>, 0, extends, null)
+  endTypeVariables(<, >)
+  beginFunctionType(void)
+    handleNoTypeVariables(()
+    handleVoidKeyword(void)
+    beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+    endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+  endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(E3, typedefDeclaration)
+beginTypeVariables(<)
+  beginMetadataStar(T)
+  endMetadataStar(0)
+  handleIdentifier(T, typeVariableDeclaration)
+  beginTypeVariable(T)
+    beginMetadataStar(S)
+    endMetadataStar(0)
+    handleIdentifier(S, typeVariableDeclaration)
+    beginTypeVariable(S)
+      handleTypeVariablesDefined(S, 2)
+      handleNoType(S)
+    endTypeVariable(>, 1, null, null)
+    handleNoType(T)
+  endTypeVariable(,, 0, null, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+  handleNoTypeVariables(()
+  handleVoidKeyword(void)
+  beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+  endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(E4, typedefDeclaration)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+  beginMetadataStar(S)
+  endMetadataStar(0)
+  handleIdentifier(S, typeVariableDeclaration)
+  beginTypeVariable(S)
+    handleTypeVariablesDefined(num, 2)
+    handleIdentifier(num, typeReference)
+    handleNoTypeArguments(>)
+    handleType(num, null)
+  endTypeVariable(>, 1, extends, null)
+  handleIdentifier(num, typeReference)
+  handleNoTypeArguments(,)
+  handleType(num, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+handleNoTypeVariables(()
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(E5, typedefDeclaration)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+  handleTypeVariablesDefined(num, 2)
+  handleIdentifier(num, typeReference)
+  handleNoTypeArguments(>)
+  handleType(num, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(S, typeReference)
+handleNoTypeArguments(,)
+handleType(S, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+handleNoTypeVariables(()
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(E6, typedefDeclaration)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(T, 2)
+handleIdentifier(T, typeReference)
+handleNoTypeArguments(>)
+handleType(T, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(,)
+handleType(num, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+handleNoTypeVariables(()
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(F1, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+handleTypeVariablesDefined(T, 1)
+handleNoType(T)
+endTypeVariable(>, 0, null, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(F2, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+handleTypeVariablesDefined(num, 1)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(F3, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(S, 2)
+handleNoType(S)
+endTypeVariable(>, 1, null, null)
+handleNoType(T)
+endTypeVariable(,, 0, null, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(F4, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(num, 2)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(,)
+handleType(num, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(F5, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(num, 2)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(S, typeReference)
+handleNoTypeArguments(,)
+handleType(S, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(F6, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(T, 2)
+handleIdentifier(T, typeReference)
+handleNoTypeArguments(>)
+handleType(T, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(,)
+handleType(num, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(G1, typedefDeclaration)
+beginTypeVariables(<)
+beginMetadataStar(X)
+endMetadataStar(0)
+handleIdentifier(X, typeVariableDeclaration)
+beginTypeVariable(X)
+handleTypeVariablesDefined(X, 1)
+handleNoType(X)
+endTypeVariable(>, 0, null, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+handleTypeVariablesDefined(X, 1)
+handleIdentifier(X, typeReference)
+handleNoTypeArguments(>)
+handleType(X, null)
+endTypeVariable(>, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(G2, typedefDeclaration)
+beginTypeVariables(<)
+beginMetadataStar(X)
+endMetadataStar(0)
+handleIdentifier(X, typeVariableDeclaration)
+beginTypeVariable(X)
+handleTypeVariablesDefined(num, 1)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 0, extends, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+handleTypeVariablesDefined(X, 1)
+handleIdentifier(X, typeReference)
+handleNoTypeArguments(>)
+handleType(X, null)
+endTypeVariable(>, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(G3, typedefDeclaration)
+beginTypeVariables(<)
+beginMetadataStar(X)
+endMetadataStar(0)
+handleIdentifier(X, typeVariableDeclaration)
+beginTypeVariable(X)
+beginMetadataStar(Y)
+endMetadataStar(0)
+handleIdentifier(Y, typeVariableDeclaration)
+beginTypeVariable(Y)
+handleTypeVariablesDefined(Y, 2)
+handleNoType(Y)
+endTypeVariable(>, 1, null, null)
+handleNoType(X)
+endTypeVariable(,, 0, null, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(Y, 2)
+handleIdentifier(Y, typeReference)
+handleNoTypeArguments(>)
+handleType(Y, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(X, typeReference)
+handleNoTypeArguments(,)
+handleType(X, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(G4, typedefDeclaration)
+beginTypeVariables(<)
+beginMetadataStar(X)
+endMetadataStar(0)
+handleIdentifier(X, typeVariableDeclaration)
+beginTypeVariable(X)
+beginMetadataStar(Y)
+endMetadataStar(0)
+handleIdentifier(Y, typeVariableDeclaration)
+beginTypeVariable(Y)
+handleTypeVariablesDefined(num, 2)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(,)
+handleType(num, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(Y, 2)
+handleIdentifier(Y, typeReference)
+handleNoTypeArguments(>)
+handleType(Y, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(X, typeReference)
+handleNoTypeArguments(,)
+handleType(X, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(G5, typedefDeclaration)
+beginTypeVariables(<)
+beginMetadataStar(X)
+endMetadataStar(0)
+handleIdentifier(X, typeVariableDeclaration)
+beginTypeVariable(X)
+handleTypeVariablesDefined(num, 1)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 0, extends, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(X, 2)
+handleIdentifier(X, typeReference)
+handleNoTypeArguments(>)
+handleType(X, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(S, typeReference)
+handleNoTypeArguments(,)
+handleType(S, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(G6, typedefDeclaration)
+beginTypeVariables(<)
+beginMetadataStar(X)
+endMetadataStar(0)
+handleIdentifier(X, typeVariableDeclaration)
+beginTypeVariable(X)
+handleTypeVariablesDefined(num, 1)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 0, extends, null)
+endTypeVariables(<, >)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(T, 2)
+handleIdentifier(T, typeReference)
+handleNoTypeArguments(>)
+handleType(T, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(X, typeReference)
+handleNoTypeArguments(,)
+handleType(X, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(H1, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+handleNoTypeVariables(()
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+handleTypeVariablesDefined(T, 1)
+handleNoType(T)
+endTypeVariable(>, 0, null, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleNoName())
+handleFormalParameterWithoutValue())
+endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(H2, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+handleNoTypeVariables(()
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+handleTypeVariablesDefined(num, 1)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleNoName())
+handleFormalParameterWithoutValue())
+endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(H3, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+handleNoTypeVariables(()
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(S, 2)
+handleNoType(S)
+endTypeVariable(>, 1, null, null)
+handleNoType(T)
+endTypeVariable(,, 0, null, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleNoName())
+handleFormalParameterWithoutValue())
+endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(H4, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+handleNoTypeVariables(()
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(num, 2)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(,)
+handleType(num, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleNoName())
+handleFormalParameterWithoutValue())
+endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(H5, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+handleNoTypeVariables(()
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(num, 2)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(S, typeReference)
+handleNoTypeArguments(,)
+handleType(S, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleNoName())
+handleFormalParameterWithoutValue())
+endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(typedef)
+beginMetadataStar(typedef)
+endMetadataStar(0)
+beginFunctionTypeAlias(typedef)
+handleIdentifier(H6, typedefDeclaration)
+handleNoTypeVariables(=)
+beginFunctionType(void)
+handleNoTypeVariables(()
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(T, 2)
+handleIdentifier(T, typeReference)
+handleNoTypeArguments(>)
+handleType(T, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(,)
+handleType(num, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleNoName())
+handleFormalParameterWithoutValue())
+endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+endFunctionTypeAlias(typedef, =, ;)
+endTopLevelDeclaration(void)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginTopLevelMember(void)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+handleTypeVariablesDefined(T, 1)
+handleNoType(T)
+endTypeVariable(>, 0, null, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleIdentifier(f1, topLevelVariableDeclaration)
+handleNoFieldInitializer(;)
+endTopLevelFields(null, null, null, null, 1, void, ;)
+endTopLevelDeclaration(void)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginTopLevelMember(void)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+handleTypeVariablesDefined(num, 1)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleIdentifier(f2, topLevelVariableDeclaration)
+handleNoFieldInitializer(;)
+endTopLevelFields(null, null, null, null, 1, void, ;)
+endTopLevelDeclaration(void)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginTopLevelMember(void)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(S, 2)
+handleNoType(S)
+endTypeVariable(>, 1, null, null)
+handleNoType(T)
+endTypeVariable(,, 0, null, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleIdentifier(f3, topLevelVariableDeclaration)
+handleNoFieldInitializer(;)
+endTopLevelFields(null, null, null, null, 1, void, ;)
+endTopLevelDeclaration(void)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginTopLevelMember(void)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(num, 2)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(,)
+handleType(num, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleIdentifier(f4, topLevelVariableDeclaration)
+handleNoFieldInitializer(;)
+endTopLevelFields(null, null, null, null, 1, void, ;)
+endTopLevelDeclaration(void)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginTopLevelMember(void)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(num, 2)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(>)
+handleType(num, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(S, typeReference)
+handleNoTypeArguments(,)
+handleType(S, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleIdentifier(f5, topLevelVariableDeclaration)
+handleNoFieldInitializer(;)
+endTopLevelFields(null, null, null, null, 1, void, ;)
+endTopLevelDeclaration(void)
+beginMetadataStar(void)
+endMetadataStar(0)
+beginTopLevelMember(void)
+beginFunctionType(void)
+beginTypeVariables(<)
+beginMetadataStar(T)
+endMetadataStar(0)
+handleIdentifier(T, typeVariableDeclaration)
+beginTypeVariable(T)
+beginMetadataStar(S)
+endMetadataStar(0)
+handleIdentifier(S, typeVariableDeclaration)
+beginTypeVariable(S)
+handleTypeVariablesDefined(T, 2)
+handleIdentifier(T, typeReference)
+handleNoTypeArguments(>)
+handleType(T, null)
+endTypeVariable(>, 1, extends, null)
+handleIdentifier(num, typeReference)
+handleNoTypeArguments(,)
+handleType(num, null)
+endTypeVariable(,, 0, extends, null)
+endTypeVariables(<, >)
+handleVoidKeyword(void)
+beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+endFunctionType(Function, null)
+handleIdentifier(f6, topLevelVariableDeclaration)
+handleNoFieldInitializer(;)
+endTopLevelFields(null, null, null, null, 1, void, ;)
+endTopLevelDeclaration(main)
+beginMetadataStar(main)
+endMetadataStar(0)
+beginTopLevelMember(main)
+beginTopLevelMethod(;, null)
+handleNoType(;)
+handleIdentifier(main, topLevelFunctionDeclaration)
+handleNoTypeVariables(()
+beginFormalParameters((, MemberKind.TopLevelMethod)
+endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+handleAsyncModifier(null, null)
+beginBlockFunctionBody({)
+endBlockFunctionBody(0, {, })
+endTopLevelMethod(main, null, })
+endTopLevelDeclaration()
+endCompilationUnit(31, )
diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.intertwined.expect
new file mode 100644
index 0000000..b6c6730
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.intertwined.expect
@@ -0,0 +1,1396 @@
+parseUnit(typedef)
+  skipErrorTokens(typedef)
+  listener: beginCompilationUnit(typedef)
+  syntheticPreviousToken(typedef)
+  parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+    parseMetadataStar()
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(E1, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        listener: beginMetadataStar(T)
+        listener: endMetadataStar(0)
+        listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        listener: handleTypeVariablesDefined(T, 1)
+        listener: handleNoType(T)
+        listener: endTypeVariable(>, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(E2, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        listener: handleTypeVariablesDefined(num, 1)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(E3, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(S, 2)
+        listener: handleNoType(S)
+        listener: endTypeVariable(>, 1, null, null)
+        listener: handleNoType(T)
+        listener: endTypeVariable(,, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(E4, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(num, 2)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(num, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(E5, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(num, 2)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(S, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(S, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(E6, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(T, 2)
+        listener: handleIdentifier(T, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(T, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(num, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(F1, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        listener: beginMetadataStar(T)
+        listener: endMetadataStar(0)
+        listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        listener: handleTypeVariablesDefined(T, 1)
+        listener: handleNoType(T)
+        listener: endTypeVariable(>, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(F2, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        listener: handleTypeVariablesDefined(num, 1)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(F3, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(S, 2)
+        listener: handleNoType(S)
+        listener: endTypeVariable(>, 1, null, null)
+        listener: handleNoType(T)
+        listener: endTypeVariable(,, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(F4, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(num, 2)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(num, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(F5, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(num, 2)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(S, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(S, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(F6, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(T, 2)
+        listener: handleIdentifier(T, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(T, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(num, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(G1, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        listener: beginMetadataStar(X)
+        listener: endMetadataStar(0)
+        listener: handleIdentifier(X, typeVariableDeclaration)
+        listener: beginTypeVariable(X)
+        listener: handleTypeVariablesDefined(X, 1)
+        listener: handleNoType(X)
+        listener: endTypeVariable(>, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        listener: handleTypeVariablesDefined(X, 1)
+        listener: handleIdentifier(X, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(X, null)
+        listener: endTypeVariable(>, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(G2, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(X)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(X, typeVariableDeclaration)
+        listener: beginTypeVariable(X)
+        listener: handleTypeVariablesDefined(num, 1)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        listener: handleTypeVariablesDefined(X, 1)
+        listener: handleIdentifier(X, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(X, null)
+        listener: endTypeVariable(>, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(G3, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(X)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(X, typeVariableDeclaration)
+        listener: beginTypeVariable(X)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(Y)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(Y, typeVariableDeclaration)
+        listener: beginTypeVariable(Y)
+        listener: handleTypeVariablesDefined(Y, 2)
+        listener: handleNoType(Y)
+        listener: endTypeVariable(>, 1, null, null)
+        listener: handleNoType(X)
+        listener: endTypeVariable(,, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(Y, 2)
+        listener: handleIdentifier(Y, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(Y, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(X, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(X, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(G4, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(X)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(X, typeVariableDeclaration)
+        listener: beginTypeVariable(X)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(Y)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(Y, typeVariableDeclaration)
+        listener: beginTypeVariable(Y)
+        listener: handleTypeVariablesDefined(num, 2)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(num, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(Y, 2)
+        listener: handleIdentifier(Y, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(Y, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(X, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(X, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(G5, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(X)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(X, typeVariableDeclaration)
+        listener: beginTypeVariable(X)
+        listener: handleTypeVariablesDefined(num, 1)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(X, 2)
+        listener: handleIdentifier(X, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(X, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(S, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(S, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(G6, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(X)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(X, typeVariableDeclaration)
+        listener: beginTypeVariable(X)
+        listener: handleTypeVariablesDefined(num, 1)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(T, 2)
+        listener: handleIdentifier(T, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(T, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(X, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(X, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(H1, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+              parseMetadataStar(()
+                listener: beginMetadataStar(void)
+                listener: endMetadataStar(0)
+              listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+              listener: beginFunctionType(void)
+              listener: beginTypeVariables(<)
+              listener: beginMetadataStar(T)
+              listener: endMetadataStar(0)
+              listener: handleIdentifier(T, typeVariableDeclaration)
+              listener: beginTypeVariable(T)
+              listener: handleTypeVariablesDefined(T, 1)
+              listener: handleNoType(T)
+              listener: endTypeVariable(>, 0, null, null)
+              listener: endTypeVariables(<, >)
+              listener: handleVoidKeyword(void)
+              parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+                parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+                  listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+                  listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+              listener: endFunctionType(Function, null)
+              listener: handleNoName())
+              listener: handleFormalParameterWithoutValue())
+              listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(H2, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+              parseMetadataStar(()
+                listener: beginMetadataStar(void)
+                listener: endMetadataStar(0)
+              listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+              listener: beginFunctionType(void)
+              listener: beginTypeVariables(<)
+              parseMetadataStar(<)
+                listener: beginMetadataStar(T)
+                listener: endMetadataStar(0)
+              ensureIdentifier(<, typeVariableDeclaration)
+                listener: handleIdentifier(T, typeVariableDeclaration)
+              listener: beginTypeVariable(T)
+              listener: handleTypeVariablesDefined(num, 1)
+              listener: handleIdentifier(num, typeReference)
+              listener: handleNoTypeArguments(>)
+              listener: handleType(num, null)
+              listener: endTypeVariable(>, 0, extends, null)
+              listener: endTypeVariables(<, >)
+              listener: handleVoidKeyword(void)
+              parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+                parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+                  listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+                  listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+              listener: endFunctionType(Function, null)
+              listener: handleNoName())
+              listener: handleFormalParameterWithoutValue())
+              listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(H3, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+              parseMetadataStar(()
+                listener: beginMetadataStar(void)
+                listener: endMetadataStar(0)
+              listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+              listener: beginFunctionType(void)
+              listener: beginTypeVariables(<)
+              parseMetadataStar(<)
+                listener: beginMetadataStar(T)
+                listener: endMetadataStar(0)
+              ensureIdentifier(<, typeVariableDeclaration)
+                listener: handleIdentifier(T, typeVariableDeclaration)
+              listener: beginTypeVariable(T)
+              parseMetadataStar(,)
+                listener: beginMetadataStar(S)
+                listener: endMetadataStar(0)
+              ensureIdentifier(,, typeVariableDeclaration)
+                listener: handleIdentifier(S, typeVariableDeclaration)
+              listener: beginTypeVariable(S)
+              listener: handleTypeVariablesDefined(S, 2)
+              listener: handleNoType(S)
+              listener: endTypeVariable(>, 1, null, null)
+              listener: handleNoType(T)
+              listener: endTypeVariable(,, 0, null, null)
+              listener: endTypeVariables(<, >)
+              listener: handleVoidKeyword(void)
+              parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+                parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+                  listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+                  listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+              listener: endFunctionType(Function, null)
+              listener: handleNoName())
+              listener: handleFormalParameterWithoutValue())
+              listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(H4, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+              parseMetadataStar(()
+                listener: beginMetadataStar(void)
+                listener: endMetadataStar(0)
+              listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+              listener: beginFunctionType(void)
+              listener: beginTypeVariables(<)
+              parseMetadataStar(<)
+                listener: beginMetadataStar(T)
+                listener: endMetadataStar(0)
+              ensureIdentifier(<, typeVariableDeclaration)
+                listener: handleIdentifier(T, typeVariableDeclaration)
+              listener: beginTypeVariable(T)
+              parseMetadataStar(,)
+                listener: beginMetadataStar(S)
+                listener: endMetadataStar(0)
+              ensureIdentifier(,, typeVariableDeclaration)
+                listener: handleIdentifier(S, typeVariableDeclaration)
+              listener: beginTypeVariable(S)
+              listener: handleTypeVariablesDefined(num, 2)
+              listener: handleIdentifier(num, typeReference)
+              listener: handleNoTypeArguments(>)
+              listener: handleType(num, null)
+              listener: endTypeVariable(>, 1, extends, null)
+              listener: handleIdentifier(num, typeReference)
+              listener: handleNoTypeArguments(,)
+              listener: handleType(num, null)
+              listener: endTypeVariable(,, 0, extends, null)
+              listener: endTypeVariables(<, >)
+              listener: handleVoidKeyword(void)
+              parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+                parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+                  listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+                  listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+              listener: endFunctionType(Function, null)
+              listener: handleNoName())
+              listener: handleFormalParameterWithoutValue())
+              listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(H5, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+              parseMetadataStar(()
+                listener: beginMetadataStar(void)
+                listener: endMetadataStar(0)
+              listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+              listener: beginFunctionType(void)
+              listener: beginTypeVariables(<)
+              parseMetadataStar(<)
+                listener: beginMetadataStar(T)
+                listener: endMetadataStar(0)
+              ensureIdentifier(<, typeVariableDeclaration)
+                listener: handleIdentifier(T, typeVariableDeclaration)
+              listener: beginTypeVariable(T)
+              parseMetadataStar(,)
+                listener: beginMetadataStar(S)
+                listener: endMetadataStar(0)
+              ensureIdentifier(,, typeVariableDeclaration)
+                listener: handleIdentifier(S, typeVariableDeclaration)
+              listener: beginTypeVariable(S)
+              listener: handleTypeVariablesDefined(num, 2)
+              listener: handleIdentifier(num, typeReference)
+              listener: handleNoTypeArguments(>)
+              listener: handleType(num, null)
+              listener: endTypeVariable(>, 1, extends, null)
+              listener: handleIdentifier(S, typeReference)
+              listener: handleNoTypeArguments(,)
+              listener: handleType(S, null)
+              listener: endTypeVariable(,, 0, extends, null)
+              listener: endTypeVariables(<, >)
+              listener: handleVoidKeyword(void)
+              parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+                parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+                  listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+                  listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+              listener: endFunctionType(Function, null)
+              listener: handleNoName())
+              listener: handleFormalParameterWithoutValue())
+              listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext')
+      parseTopLevelKeywordModifiers(;, typedef)
+      parseTypedef(typedef)
+        listener: beginFunctionTypeAlias(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(H6, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: beginFunctionType(void)
+        listener: handleNoTypeVariables(()
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+              parseMetadataStar(()
+                listener: beginMetadataStar(void)
+                listener: endMetadataStar(0)
+              listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null)
+              listener: beginFunctionType(void)
+              listener: beginTypeVariables(<)
+              parseMetadataStar(<)
+                listener: beginMetadataStar(T)
+                listener: endMetadataStar(0)
+              ensureIdentifier(<, typeVariableDeclaration)
+                listener: handleIdentifier(T, typeVariableDeclaration)
+              listener: beginTypeVariable(T)
+              parseMetadataStar(,)
+                listener: beginMetadataStar(S)
+                listener: endMetadataStar(0)
+              ensureIdentifier(,, typeVariableDeclaration)
+                listener: handleIdentifier(S, typeVariableDeclaration)
+              listener: beginTypeVariable(S)
+              listener: handleTypeVariablesDefined(T, 2)
+              listener: handleIdentifier(T, typeReference)
+              listener: handleNoTypeArguments(>)
+              listener: handleType(T, null)
+              listener: endTypeVariable(>, 1, extends, null)
+              listener: handleIdentifier(num, typeReference)
+              listener: handleNoTypeArguments(,)
+              listener: handleType(num, null)
+              listener: endTypeVariable(,, 0, extends, null)
+              listener: endTypeVariables(<, >)
+              listener: handleVoidKeyword(void)
+              parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+                parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+                  listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+                  listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+              listener: endFunctionType(Function, null)
+              listener: handleNoName())
+              listener: handleFormalParameterWithoutValue())
+              listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureSemicolon())
+        listener: endFunctionTypeAlias(typedef, =, ;)
+  listener: endTopLevelDeclaration(void)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(void)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(;)
+      listener: beginTopLevelMember(void)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f1, DeclarationKind.TopLevel, null, false)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        listener: beginMetadataStar(T)
+        listener: endMetadataStar(0)
+        listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        listener: handleTypeVariablesDefined(T, 1)
+        listener: handleNoType(T)
+        listener: endTypeVariable(>, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false)
+          listener: handleIdentifier(f1, topLevelVariableDeclaration)
+        parseFieldInitializerOpt(f1, f1, null, null, null, null, DeclarationKind.TopLevel, null)
+          listener: handleNoFieldInitializer(;)
+        listener: endTopLevelFields(null, null, null, null, 1, void, ;)
+  listener: endTopLevelDeclaration(void)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(void)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(;)
+      listener: beginTopLevelMember(void)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f2, DeclarationKind.TopLevel, null, false)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        listener: handleTypeVariablesDefined(num, 1)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false)
+          listener: handleIdentifier(f2, topLevelVariableDeclaration)
+        parseFieldInitializerOpt(f2, f2, null, null, null, null, DeclarationKind.TopLevel, null)
+          listener: handleNoFieldInitializer(;)
+        listener: endTopLevelFields(null, null, null, null, 1, void, ;)
+  listener: endTopLevelDeclaration(void)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(void)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(;)
+      listener: beginTopLevelMember(void)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f3, DeclarationKind.TopLevel, null, false)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(S, 2)
+        listener: handleNoType(S)
+        listener: endTypeVariable(>, 1, null, null)
+        listener: handleNoType(T)
+        listener: endTypeVariable(,, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false)
+          listener: handleIdentifier(f3, topLevelVariableDeclaration)
+        parseFieldInitializerOpt(f3, f3, null, null, null, null, DeclarationKind.TopLevel, null)
+          listener: handleNoFieldInitializer(;)
+        listener: endTopLevelFields(null, null, null, null, 1, void, ;)
+  listener: endTopLevelDeclaration(void)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(void)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(;)
+      listener: beginTopLevelMember(void)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f4, DeclarationKind.TopLevel, null, false)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(num, 2)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(num, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false)
+          listener: handleIdentifier(f4, topLevelVariableDeclaration)
+        parseFieldInitializerOpt(f4, f4, null, null, null, null, DeclarationKind.TopLevel, null)
+          listener: handleNoFieldInitializer(;)
+        listener: endTopLevelFields(null, null, null, null, 1, void, ;)
+  listener: endTopLevelDeclaration(void)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(void)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(;)
+      listener: beginTopLevelMember(void)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f5, DeclarationKind.TopLevel, null, false)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(num, 2)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(num, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(S, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(S, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false)
+          listener: handleIdentifier(f5, topLevelVariableDeclaration)
+        parseFieldInitializerOpt(f5, f5, null, null, null, null, DeclarationKind.TopLevel, null)
+          listener: handleNoFieldInitializer(;)
+        listener: endTopLevelFields(null, null, null, null, 1, void, ;)
+  listener: endTopLevelDeclaration(void)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(void)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(;)
+      listener: beginTopLevelMember(void)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f6, DeclarationKind.TopLevel, null, false)
+        listener: beginFunctionType(void)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(T)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          listener: handleIdentifier(T, typeVariableDeclaration)
+        listener: beginTypeVariable(T)
+        parseMetadataStar(,)
+          listener: beginMetadataStar(S)
+          listener: endMetadataStar(0)
+        ensureIdentifier(,, typeVariableDeclaration)
+          listener: handleIdentifier(S, typeVariableDeclaration)
+        listener: beginTypeVariable(S)
+        listener: handleTypeVariablesDefined(T, 2)
+        listener: handleIdentifier(T, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(T, null)
+        listener: endTypeVariable(>, 1, extends, null)
+        listener: handleIdentifier(num, typeReference)
+        listener: handleNoTypeArguments(,)
+        listener: handleType(num, null)
+        listener: endTypeVariable(,, 0, extends, null)
+        listener: endTypeVariables(<, >)
+        listener: handleVoidKeyword(void)
+        parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType)
+          parseFormalParametersRest((, MemberKind.GeneralizedFunctionType)
+            listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType)
+            listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType)
+        listener: endFunctionType(Function, null)
+        ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false)
+          listener: handleIdentifier(f6, topLevelVariableDeclaration)
+        parseFieldInitializerOpt(f6, f6, null, null, null, null, DeclarationKind.TopLevel, null)
+          listener: handleNoFieldInitializer(;)
+        listener: endTopLevelFields(null, null, null, null, 1, void, ;)
+  listener: endTopLevelDeclaration(main)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(main)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(;)
+      listener: beginTopLevelMember(main)
+      isReservedKeyword(()
+      parseTopLevelMethod(;, null, ;, Instance of 'NoType', null, main, false)
+        listener: beginTopLevelMethod(;, null)
+        listener: handleNoType(;)
+        ensureIdentifierPotentiallyRecovered(;, topLevelFunctionDeclaration, false)
+          listener: handleIdentifier(main, topLevelFunctionDeclaration)
+        parseMethodTypeVar(main)
+          listener: handleNoTypeVariables(()
+        parseGetterOrFormalParameters(main, main, false, MemberKind.TopLevelMethod)
+          parseFormalParameters(main, MemberKind.TopLevelMethod)
+            parseFormalParametersRest((, MemberKind.TopLevelMethod)
+              listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+              listener: endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+        parseAsyncModifierOpt())
+          listener: handleAsyncModifier(null, null)
+          inPlainSync()
+        parseFunctionBody(), false, false)
+          listener: beginBlockFunctionBody({)
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(0, {, })
+        listener: endTopLevelMethod(main, null, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(typedef)
+  listener: endCompilationUnit(31, )
diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.parser.expect b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.parser.expect
new file mode 100644
index 0000000..ac7315e
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.parser.expect
@@ -0,0 +1,77 @@
+typedef E1<T> = void Function();
+typedef E2<T extends num> = void Function();
+typedef E3<T, S> = void Function();
+typedef E4<T extends num, S extends num> = void Function();
+typedef E5<T extends S, S extends num> = void Function();
+typedef E6<T extends num, S extends T> = void Function();
+
+typedef F1 = void Function<T>();
+typedef F2 = void Function<T extends num>();
+typedef F3 = void Function<T, S>();
+typedef F4 = void Function<T extends num, S extends num>();
+typedef F5 = void Function<T extends S, S extends num>();
+typedef F6 = void Function<T extends num, S extends T>();
+
+typedef G1<X> = void Function<T extends X>();
+typedef G2<X extends num> = void Function<T extends X>();
+typedef G3<X, Y> = void Function<T extends X, S extends Y>();
+typedef G4<X extends num, Y extends num> = void
+Function<T extends X, S extends Y>();
+typedef G5<X extends num> = void Function<T extends S, S extends X>();
+typedef G6<X extends num> = void Function<T extends X, S extends T>();
+
+typedef H1 = void Function(void Function<T>());
+typedef H2 = void Function(void Function<T extends num>());
+typedef H3 = void Function(void Function<T, S>());
+typedef H4 = void Function(void Function<T extends num, S extends num>());
+typedef H5 = void Function(void Function<T extends S, S extends num>());
+typedef H6 = void Function(void Function<T extends num, S extends T>());
+
+void Function<T>() f1;
+void Function<T extends num>() f2;
+void Function<T, S>() f3;
+void Function<T extends num, S extends num>() f4;
+void Function<T extends S, S extends num>() f5;
+void Function<T extends num, S extends T>() f6;
+
+main() {}
+
+
+typedef[KeywordToken] E1[StringToken]<[BeginToken]T[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E2[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E3[StringToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E4[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E5[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E6[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+
+typedef[KeywordToken] F1[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F2[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F3[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F4[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F5[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F6[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+
+typedef[KeywordToken] G1[StringToken]<[BeginToken]X[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G2[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G3[StringToken]<[BeginToken]X[StringToken],[SimpleToken] Y[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] Y[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G4[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] Y[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken]
+Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] Y[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G5[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G6[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+
+typedef[KeywordToken] H1[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H2[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H3[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H4[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H5[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H6[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f1[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f2[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f3[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f4[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f5[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f6[StringToken];[SimpleToken]
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.scanner.expect b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.scanner.expect
new file mode 100644
index 0000000..ac7315e
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.scanner.expect
@@ -0,0 +1,77 @@
+typedef E1<T> = void Function();
+typedef E2<T extends num> = void Function();
+typedef E3<T, S> = void Function();
+typedef E4<T extends num, S extends num> = void Function();
+typedef E5<T extends S, S extends num> = void Function();
+typedef E6<T extends num, S extends T> = void Function();
+
+typedef F1 = void Function<T>();
+typedef F2 = void Function<T extends num>();
+typedef F3 = void Function<T, S>();
+typedef F4 = void Function<T extends num, S extends num>();
+typedef F5 = void Function<T extends S, S extends num>();
+typedef F6 = void Function<T extends num, S extends T>();
+
+typedef G1<X> = void Function<T extends X>();
+typedef G2<X extends num> = void Function<T extends X>();
+typedef G3<X, Y> = void Function<T extends X, S extends Y>();
+typedef G4<X extends num, Y extends num> = void
+Function<T extends X, S extends Y>();
+typedef G5<X extends num> = void Function<T extends S, S extends X>();
+typedef G6<X extends num> = void Function<T extends X, S extends T>();
+
+typedef H1 = void Function(void Function<T>());
+typedef H2 = void Function(void Function<T extends num>());
+typedef H3 = void Function(void Function<T, S>());
+typedef H4 = void Function(void Function<T extends num, S extends num>());
+typedef H5 = void Function(void Function<T extends S, S extends num>());
+typedef H6 = void Function(void Function<T extends num, S extends T>());
+
+void Function<T>() f1;
+void Function<T extends num>() f2;
+void Function<T, S>() f3;
+void Function<T extends num, S extends num>() f4;
+void Function<T extends S, S extends num>() f5;
+void Function<T extends num, S extends T>() f6;
+
+main() {}
+
+
+typedef[KeywordToken] E1[StringToken]<[BeginToken]T[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E2[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E3[StringToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E4[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E5[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] E6[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken]
+
+typedef[KeywordToken] F1[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F2[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F3[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F4[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F5[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] F6[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+
+typedef[KeywordToken] G1[StringToken]<[BeginToken]X[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G2[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G3[StringToken]<[BeginToken]X[StringToken],[SimpleToken] Y[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] Y[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G4[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] Y[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken]
+Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] Y[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G5[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] G6[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken]
+
+typedef[KeywordToken] H1[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H2[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H3[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H4[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H5[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+typedef[KeywordToken] H6[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken]
+
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f1[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f2[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f3[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f4[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f5[StringToken];[SimpleToken]
+void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f6[StringToken];[SimpleToken]
+
+main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_41121.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/issue_41121.dart.intertwined.expect
index af39092..f010597 100644
--- a/pkg/front_end/parser_testcases/general/issue_41121.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/general/issue_41121.dart.intertwined.expect
@@ -32,13 +32,13 @@
                 listener: beginMetadataStar(Configuration)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleType', _configuration, DeclarationKind.Class, ConfigurationService, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleType', _configuration, DeclarationKind.Class, ConfigurationService, false)
                 listener: handleIdentifier(Configuration, typeReference)
                 listener: handleNoTypeArguments(_configuration)
                 listener: handleType(Configuration, null)
                 ensureIdentifierPotentiallyRecovered(Configuration, fieldDeclaration, false)
                   listener: handleIdentifier(_configuration, fieldDeclaration)
-                parseFieldInitializerOpt(_configuration, _configuration, null, null, DeclarationKind.Class, ConfigurationService)
+                parseFieldInitializerOpt(_configuration, _configuration, null, null, null, null, DeclarationKind.Class, ConfigurationService)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, null, null, 1, Configuration, ;)
               listener: endMember()
@@ -49,7 +49,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, ConfigurationService, DeclarationKind.Class, ConfigurationService, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, ConfigurationService, DeclarationKind.Class, ConfigurationService, false)
                 listener: beginMethod(null, null, null, null, null, ConfigurationService)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
@@ -147,7 +147,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'VoidType', set, configuration, DeclarationKind.Class, ConfigurationService, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'VoidType', set, configuration, DeclarationKind.Class, ConfigurationService, false)
                 listener: beginMethod(null, null, null, null, set, configuration)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(set, methodDeclaration, false)
@@ -251,7 +251,7 @@
                 listener: beginMetadataStar(Configuration)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'SimpleType', get, configuration, DeclarationKind.Class, ConfigurationService, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'SimpleType', get, configuration, DeclarationKind.Class, ConfigurationService, false)
                 listener: beginMethod(null, null, null, null, get, configuration)
                 listener: handleIdentifier(Configuration, typeReference)
                 listener: handleNoTypeArguments(get)
@@ -378,7 +378,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'VoidType', null, method, DeclarationKind.Class, ConfigurationService, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'VoidType', null, method, DeclarationKind.Class, ConfigurationService, false)
                 listener: beginMethod(null, null, null, null, null, method)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
@@ -438,7 +438,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, ConfigurationService, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, ConfigurationService, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(})
                 ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
@@ -523,7 +523,7 @@
                 listener: beginMetadataStar(Configuration)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', get, foo, DeclarationKind.Class, Configuration, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', get, foo, DeclarationKind.Class, Configuration, false)
                 listener: beginMethod(null, null, null, null, get, foo)
                 listener: handleIdentifier(Configuration, typeReference)
                 listener: handleNoTypeArguments(get)
diff --git a/pkg/front_end/parser_testcases/general/operator_hat_class.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/general/operator_hat_class.crash_dart.intertwined.expect
index 0f64958..beab6b7 100644
--- a/pkg/front_end/parser_testcases/general/operator_hat_class.crash_dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/general/operator_hat_class.crash_dart.intertwined.expect
@@ -34,7 +34,7 @@
                 listener: beginMetadataStar(operator)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, operator, DeclarationKind.Class, operator, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, operator, DeclarationKind.Class, operator, false)
                 listener: beginMethod(null, null, null, null, null, operator)
                 listener: handleNoType({)
                 parseOperatorName({)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_39326.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_39326.dart.expect
index 235826c..fa7ddf9 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_39326.dart.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_39326.dart.expect
@@ -16,7 +16,7 @@
         beginVariablesDeclaration(c, null, var)
           handleIdentifier(c, localVariableDeclaration)
           beginInitializedIdentifier(c)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(c)
           endInitializedIdentifier(c)
         endVariablesDeclaration(1, ;)
         handleIdentifier(c, expression)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_39326.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_39326.dart.intertwined.expect
index 7b47813..1368e76 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_39326.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_39326.dart.intertwined.expect
@@ -41,7 +41,7 @@
                       listener: handleIdentifier(c, localVariableDeclaration)
                     listener: beginInitializedIdentifier(c)
                     parseVariableInitializerOpt(c)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(c)
                     listener: endInitializedIdentifier(c)
                   ensureSemicolon(c)
                   listener: endVariablesDeclaration(1, ;)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_39723.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_39723.dart.intertwined.expect
index 8ae8297..183b237 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_39723.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_39723.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(operator)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, operator, DeclarationKind.Class, A, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, operator, DeclarationKind.Class, A, false)
                 listener: beginMethod(null, null, null, null, null, operator)
                 listener: handleNoType({)
                 parseOperatorName({)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_39723_prime.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_39723_prime.dart.intertwined.expect
index 2c43271..3af8393 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_39723_prime.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_39723_prime.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(operator)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, operator, DeclarationKind.Class, A, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, operator, DeclarationKind.Class, A, false)
                 listener: beginMethod(null, null, null, null, null, operator)
                 listener: handleNoType({)
                 parseOperatorName({)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_39858.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_39858.dart.intertwined.expect
index f4f808b..8162b63 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_39858.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_39858.dart.intertwined.expect
@@ -33,13 +33,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(;)
-              parseFields({, null, null, null, late, null, late, Instance of 'NoType', x1, DeclarationKind.Class, X, false)
+              parseFields({, null, null, null, null, late, null, late, Instance of 'NoType', x1, DeclarationKind.Class, X, false)
                 reportRecoverableError(x1, MissingConstFinalVarOrType)
                   listener: handleRecoverableError(MissingConstFinalVarOrType, x1, x1)
                 listener: handleNoType(late)
                 ensureIdentifierPotentiallyRecovered(late, fieldDeclaration, false)
                   listener: handleIdentifier(x1, fieldDeclaration)
-                parseFieldInitializerOpt(x1, x1, late, null, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x1, x1, late, null, null, null, DeclarationKind.Class, X)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, late, null, 1, late, ;)
               listener: endMember()
@@ -50,13 +50,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(;)
-              parseFields(;, null, static, null, late, null, late, Instance of 'NoType', x2, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, static, null, late, null, late, Instance of 'NoType', x2, DeclarationKind.Class, X, false)
                 reportRecoverableError(x2, MissingConstFinalVarOrType)
                   listener: handleRecoverableError(MissingConstFinalVarOrType, x2, x2)
                 listener: handleNoType(late)
                 ensureIdentifierPotentiallyRecovered(late, fieldDeclaration, false)
                   listener: handleIdentifier(x2, fieldDeclaration)
-                parseFieldInitializerOpt(x2, x2, late, null, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x2, x2, late, null, null, null, DeclarationKind.Class, X)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(static, null, late, null, 1, static, ;)
               listener: endMember()
@@ -67,13 +67,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(;)
-              parseFields(;, null, null, covariant, late, null, late, Instance of 'NoType', x3, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, null, covariant, late, null, late, Instance of 'NoType', x3, DeclarationKind.Class, X, false)
                 reportRecoverableError(x3, MissingConstFinalVarOrType)
                   listener: handleRecoverableError(MissingConstFinalVarOrType, x3, x3)
                 listener: handleNoType(late)
                 ensureIdentifierPotentiallyRecovered(late, fieldDeclaration, false)
                   listener: handleIdentifier(x3, fieldDeclaration)
-                parseFieldInitializerOpt(x3, x3, late, null, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x3, x3, late, null, null, null, DeclarationKind.Class, X)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, covariant, late, null, 1, covariant, ;)
               listener: endMember()
@@ -84,13 +84,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(=)
-              parseFields(;, null, null, null, late, null, late, Instance of 'NoType', x4, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, null, null, late, null, late, Instance of 'NoType', x4, DeclarationKind.Class, X, false)
                 reportRecoverableError(x4, MissingConstFinalVarOrType)
                   listener: handleRecoverableError(MissingConstFinalVarOrType, x4, x4)
                 listener: handleNoType(late)
                 ensureIdentifierPotentiallyRecovered(late, fieldDeclaration, false)
                   listener: handleIdentifier(x4, fieldDeclaration)
-                parseFieldInitializerOpt(x4, x4, late, null, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x4, x4, late, null, null, null, DeclarationKind.Class, X)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -108,13 +108,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(=)
-              parseFields(;, null, static, null, late, null, late, Instance of 'NoType', x5, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, static, null, late, null, late, Instance of 'NoType', x5, DeclarationKind.Class, X, false)
                 reportRecoverableError(x5, MissingConstFinalVarOrType)
                   listener: handleRecoverableError(MissingConstFinalVarOrType, x5, x5)
                 listener: handleNoType(late)
                 ensureIdentifierPotentiallyRecovered(late, fieldDeclaration, false)
                   listener: handleIdentifier(x5, fieldDeclaration)
-                parseFieldInitializerOpt(x5, x5, late, null, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x5, x5, late, null, null, null, DeclarationKind.Class, X)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -132,13 +132,13 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(=)
-              parseFields(;, null, null, covariant, late, null, late, Instance of 'NoType', x6, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, null, covariant, late, null, late, Instance of 'NoType', x6, DeclarationKind.Class, X, false)
                 reportRecoverableError(x6, MissingConstFinalVarOrType)
                   listener: handleRecoverableError(MissingConstFinalVarOrType, x6, x6)
                 listener: handleNoType(late)
                 ensureIdentifierPotentiallyRecovered(late, fieldDeclaration, false)
                   listener: handleIdentifier(x6, fieldDeclaration)
-                parseFieldInitializerOpt(x6, x6, late, null, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x6, x6, late, null, null, null, DeclarationKind.Class, X)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_39858_prime1.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_39858_prime1.dart.intertwined.expect
index d224ea7..c807ed8 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_39858_prime1.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_39858_prime1.dart.intertwined.expect
@@ -32,11 +32,11 @@
                 listener: beginMetadataStar(var)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, var, var, Instance of 'NoType', x1, DeclarationKind.Class, X, false)
+              parseFields({, null, null, null, null, null, var, var, Instance of 'NoType', x1, DeclarationKind.Class, X, false)
                 listener: handleNoType(var)
                 ensureIdentifierPotentiallyRecovered(var, fieldDeclaration, false)
                   listener: handleIdentifier(x1, fieldDeclaration)
-                parseFieldInitializerOpt(x1, x1, null, var, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x1, x1, null, null, null, var, DeclarationKind.Class, X)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, null, var, 1, var, ;)
               listener: endMember()
@@ -46,11 +46,11 @@
                 listener: beginMetadataStar(static)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, static, null, null, var, var, Instance of 'NoType', x2, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, static, null, null, var, var, Instance of 'NoType', x2, DeclarationKind.Class, X, false)
                 listener: handleNoType(var)
                 ensureIdentifierPotentiallyRecovered(var, fieldDeclaration, false)
                   listener: handleIdentifier(x2, fieldDeclaration)
-                parseFieldInitializerOpt(x2, x2, null, var, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x2, x2, null, null, null, var, DeclarationKind.Class, X)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(static, null, null, var, 1, static, ;)
               listener: endMember()
@@ -60,11 +60,11 @@
                 listener: beginMetadataStar(covariant)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, covariant, null, var, var, Instance of 'NoType', x3, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, null, covariant, null, var, var, Instance of 'NoType', x3, DeclarationKind.Class, X, false)
                 listener: handleNoType(var)
                 ensureIdentifierPotentiallyRecovered(var, fieldDeclaration, false)
                   listener: handleIdentifier(x3, fieldDeclaration)
-                parseFieldInitializerOpt(x3, x3, null, var, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x3, x3, null, null, null, var, DeclarationKind.Class, X)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, covariant, null, var, 1, covariant, ;)
               listener: endMember()
@@ -74,11 +74,11 @@
                 listener: beginMetadataStar(var)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, var, var, Instance of 'NoType', x4, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, null, null, null, var, var, Instance of 'NoType', x4, DeclarationKind.Class, X, false)
                 listener: handleNoType(var)
                 ensureIdentifierPotentiallyRecovered(var, fieldDeclaration, false)
                   listener: handleIdentifier(x4, fieldDeclaration)
-                parseFieldInitializerOpt(x4, x4, null, var, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x4, x4, null, null, null, var, DeclarationKind.Class, X)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -95,11 +95,11 @@
                 listener: beginMetadataStar(static)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, static, null, null, var, var, Instance of 'NoType', x5, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, static, null, null, var, var, Instance of 'NoType', x5, DeclarationKind.Class, X, false)
                 listener: handleNoType(var)
                 ensureIdentifierPotentiallyRecovered(var, fieldDeclaration, false)
                   listener: handleIdentifier(x5, fieldDeclaration)
-                parseFieldInitializerOpt(x5, x5, null, var, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x5, x5, null, null, null, var, DeclarationKind.Class, X)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -116,11 +116,11 @@
                 listener: beginMetadataStar(covariant)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, covariant, null, var, var, Instance of 'NoType', x6, DeclarationKind.Class, X, false)
+              parseFields(;, null, null, null, covariant, null, var, var, Instance of 'NoType', x6, DeclarationKind.Class, X, false)
                 listener: handleNoType(var)
                 ensureIdentifierPotentiallyRecovered(var, fieldDeclaration, false)
                   listener: handleIdentifier(x6, fieldDeclaration)
-                parseFieldInitializerOpt(x6, x6, null, var, DeclarationKind.Class, X)
+                parseFieldInitializerOpt(x6, x6, null, null, null, var, DeclarationKind.Class, X)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional.dart.expect
index b143be7..51ede43 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional.dart.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional.dart.expect
@@ -16,15 +16,15 @@
         beginVariablesDeclaration(a, null, var)
           handleIdentifier(a, localVariableDeclaration)
           beginInitializedIdentifier(a)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(a)
           endInitializedIdentifier(a)
           handleIdentifier(b, localVariableDeclaration)
           beginInitializedIdentifier(b)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(b)
           endInitializedIdentifier(b)
           handleIdentifier(c, localVariableDeclaration)
           beginInitializedIdentifier(c)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(c)
           endInitializedIdentifier(c)
         endVariablesDeclaration(3, ;)
         handleIdentifier(a, expression)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional.dart.intertwined.expect
index 6761e0c..caa1810 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional.dart.intertwined.expect
@@ -41,21 +41,21 @@
                       listener: handleIdentifier(a, localVariableDeclaration)
                     listener: beginInitializedIdentifier(a)
                     parseVariableInitializerOpt(a)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(a)
                     listener: endInitializedIdentifier(a)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(b, localVariableDeclaration)
                     listener: beginInitializedIdentifier(b)
                     parseVariableInitializerOpt(b)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(b)
                     listener: endInitializedIdentifier(b)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(c, localVariableDeclaration)
                     listener: beginInitializedIdentifier(c)
                     parseVariableInitializerOpt(c)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(c)
                     listener: endInitializedIdentifier(c)
                   ensureSemicolon(c)
                   listener: endVariablesDeclaration(3, ;)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional_2.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional_2.dart.expect
index 6acafe8..947256d 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional_2.dart.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional_2.dart.expect
@@ -16,11 +16,11 @@
         beginVariablesDeclaration(a, null, var)
           handleIdentifier(a, localVariableDeclaration)
           beginInitializedIdentifier(a)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(a)
           endInitializedIdentifier(a)
           handleIdentifier(b, localVariableDeclaration)
           beginInitializedIdentifier(b)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(b)
           endInitializedIdentifier(b)
         endVariablesDeclaration(2, ;)
         beginReturnStatement(return)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional_2.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional_2.dart.intertwined.expect
index a4a13e9..2b95e24 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional_2.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_conditional_2.dart.intertwined.expect
@@ -41,14 +41,14 @@
                       listener: handleIdentifier(a, localVariableDeclaration)
                     listener: beginInitializedIdentifier(a)
                     parseVariableInitializerOpt(a)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(a)
                     listener: endInitializedIdentifier(a)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(b, localVariableDeclaration)
                     listener: beginInitializedIdentifier(b)
                     parseVariableInitializerOpt(b)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(b)
                     listener: endInitializedIdentifier(b)
                   ensureSemicolon(b)
                   listener: endVariablesDeclaration(2, ;)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_index_access.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_index_access.dart.expect
index b2e3729..3c6833e 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_index_access.dart.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_index_access.dart.expect
@@ -16,11 +16,11 @@
         beginVariablesDeclaration(a, null, var)
           handleIdentifier(a, localVariableDeclaration)
           beginInitializedIdentifier(a)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(a)
           endInitializedIdentifier(a)
           handleIdentifier(b, localVariableDeclaration)
           beginInitializedIdentifier(b)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(b)
           endInitializedIdentifier(b)
         endVariablesDeclaration(2, ;)
         handleIdentifier(a, expression)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_index_access.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_index_access.dart.intertwined.expect
index 7582fd9..da5c160 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_index_access.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_index_access.dart.intertwined.expect
@@ -41,14 +41,14 @@
                       listener: handleIdentifier(a, localVariableDeclaration)
                     listener: beginInitializedIdentifier(a)
                     parseVariableInitializerOpt(a)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(a)
                     listener: endInitializedIdentifier(a)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(b, localVariableDeclaration)
                     listener: beginInitializedIdentifier(b)
                     parseVariableInitializerOpt(b)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(b)
                     listener: endInitializedIdentifier(b)
                   ensureSemicolon(b)
                   listener: endVariablesDeclaration(2, ;)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_index_set.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_index_set.dart.expect
index a4ed432..32e3968 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_index_set.dart.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_index_set.dart.expect
@@ -16,15 +16,15 @@
         beginVariablesDeclaration(a, null, var)
           handleIdentifier(a, localVariableDeclaration)
           beginInitializedIdentifier(a)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(a)
           endInitializedIdentifier(a)
           handleIdentifier(b, localVariableDeclaration)
           beginInitializedIdentifier(b)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(b)
           endInitializedIdentifier(b)
           handleIdentifier(c, localVariableDeclaration)
           beginInitializedIdentifier(c)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(c)
           endInitializedIdentifier(c)
         endVariablesDeclaration(3, ;)
         handleIdentifier(a, expression)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_index_set.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_index_set.dart.intertwined.expect
index 0c65fee..05def0c 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_index_set.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_index_set.dart.intertwined.expect
@@ -41,21 +41,21 @@
                       listener: handleIdentifier(a, localVariableDeclaration)
                     listener: beginInitializedIdentifier(a)
                     parseVariableInitializerOpt(a)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(a)
                     listener: endInitializedIdentifier(a)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(b, localVariableDeclaration)
                     listener: beginInitializedIdentifier(b)
                     parseVariableInitializerOpt(b)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(b)
                     listener: endInitializedIdentifier(b)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(c, localVariableDeclaration)
                     listener: beginInitializedIdentifier(c)
                     parseVariableInitializerOpt(c)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(c)
                     listener: endInitializedIdentifier(c)
                   ensureSemicolon(c)
                   listener: endVariablesDeclaration(3, ;)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_no_type_arguments.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_no_type_arguments.dart.expect
index 1b1476d..df0efbe 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_no_type_arguments.dart.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_no_type_arguments.dart.expect
@@ -26,11 +26,11 @@
         beginVariablesDeclaration(a, null, var)
           handleIdentifier(a, localVariableDeclaration)
           beginInitializedIdentifier(a)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(a)
           endInitializedIdentifier(a)
           handleIdentifier(b, localVariableDeclaration)
           beginInitializedIdentifier(b)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(b)
           endInitializedIdentifier(b)
         endVariablesDeclaration(2, ;)
         handleIdentifier(a, expression)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_no_type_arguments.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_no_type_arguments.dart.intertwined.expect
index 0fe0966..65987de 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_no_type_arguments.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_no_type_arguments.dart.intertwined.expect
@@ -41,14 +41,14 @@
                       listener: handleIdentifier(a, localVariableDeclaration)
                     listener: beginInitializedIdentifier(a)
                     parseVariableInitializerOpt(a)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(a)
                     listener: endInitializedIdentifier(a)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(b, localVariableDeclaration)
                     listener: beginInitializedIdentifier(b)
                     parseVariableInitializerOpt(b)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(b)
                     listener: endInitializedIdentifier(b)
                   ensureSemicolon(b)
                   listener: endVariablesDeclaration(2, ;)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_with_type_arguments.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_with_type_arguments.dart.expect
index 5832363..8839c76 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_with_type_arguments.dart.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_with_type_arguments.dart.expect
@@ -38,11 +38,11 @@
         beginVariablesDeclaration(a, null, var)
           handleIdentifier(a, localVariableDeclaration)
           beginInitializedIdentifier(a)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(a)
           endInitializedIdentifier(a)
           handleIdentifier(b, localVariableDeclaration)
           beginInitializedIdentifier(b)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(b)
           endInitializedIdentifier(b)
         endVariablesDeclaration(2, ;)
         handleIdentifier(a, expression)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_with_type_arguments.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_with_type_arguments.dart.intertwined.expect
index d4d40f7..76f08fd 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_with_type_arguments.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40267_method_call_with_type_arguments.dart.intertwined.expect
@@ -41,14 +41,14 @@
                       listener: handleIdentifier(a, localVariableDeclaration)
                     listener: beginInitializedIdentifier(a)
                     parseVariableInitializerOpt(a)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(a)
                     listener: endInitializedIdentifier(a)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(b, localVariableDeclaration)
                     listener: beginInitializedIdentifier(b)
                     parseVariableInitializerOpt(b)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(b)
                     listener: endInitializedIdentifier(b)
                   ensureSemicolon(b)
                   listener: endVariablesDeclaration(2, ;)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40805_01.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40805_01.dart.intertwined.expect
index d815fea..abe076a 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40805_01.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40805_01.dart.intertwined.expect
@@ -32,13 +32,13 @@
                 listener: beginMetadataStar(covariant)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, covariant, late, final, final, Instance of 'SimpleType', x, DeclarationKind.Class, C, false)
+              parseFields({, null, null, null, covariant, late, final, final, Instance of 'SimpleType', x, DeclarationKind.Class, C, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(x)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(x, fieldDeclaration)
-                parseFieldInitializerOpt(x, x, late, final, DeclarationKind.Class, C)
+                parseFieldInitializerOpt(x, x, late, null, null, final, DeclarationKind.Class, C)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, covariant, late, final, 1, covariant, ;)
               listener: endMember()
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40805_02.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40805_02.dart.intertwined.expect
index ca8c3f6..73d8eb0 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40805_02.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40805_02.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(covariant)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, covariant, late, final, final, Instance of 'SimpleType', x, DeclarationKind.Class, C, false)
+              parseFields({, null, null, null, covariant, late, final, final, Instance of 'SimpleType', x, DeclarationKind.Class, C, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(x)
                 listener: handleType(int, null)
@@ -40,7 +40,7 @@
                   listener: handleIdentifier(x, fieldDeclaration)
                 reportRecoverableError(covariant, FinalAndCovariantLateWithInitializer)
                   listener: handleRecoverableError(FinalAndCovariantLateWithInitializer, covariant, covariant)
-                parseFieldInitializerOpt(x, x, late, final, DeclarationKind.Class, C)
+                parseFieldInitializerOpt(x, x, late, null, null, final, DeclarationKind.Class, C)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40805_03.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40805_03.dart.intertwined.expect
index 9854745..a73b460 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40805_03.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40805_03.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(covariant)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, covariant, null, final, final, Instance of 'SimpleType', x, DeclarationKind.Class, C, false)
+              parseFields({, null, null, null, covariant, null, final, final, Instance of 'SimpleType', x, DeclarationKind.Class, C, false)
                 reportRecoverableError(covariant, FinalAndCovariant)
                   listener: handleRecoverableError(FinalAndCovariant, covariant, covariant)
                 listener: handleIdentifier(int, typeReference)
@@ -40,7 +40,7 @@
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(x, fieldDeclaration)
-                parseFieldInitializerOpt(x, x, null, final, DeclarationKind.Class, C)
+                parseFieldInitializerOpt(x, x, null, null, null, final, DeclarationKind.Class, C)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40834_01.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40834_01.dart.intertwined.expect
index 3f329b4..490e20d 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40834_01.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40834_01.dart.intertwined.expect
@@ -32,13 +32,13 @@
                 listener: beginMetadataStar(String)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleNullableType', x, DeclarationKind.Class, Foo, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleNullableType', x, DeclarationKind.Class, Foo, false)
                 listener: handleIdentifier(String, typeReference)
                 listener: handleNoTypeArguments(?)
                 listener: handleType(String, ?)
                 ensureIdentifierPotentiallyRecovered(?, fieldDeclaration, false)
                   listener: handleIdentifier(x, fieldDeclaration)
-                parseFieldInitializerOpt(x, x, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(x, x, null, null, null, null, DeclarationKind.Class, Foo)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, null, null, 1, String, ;)
               listener: endMember()
@@ -48,13 +48,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', y, DeclarationKind.Class, Foo, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', y, DeclarationKind.Class, Foo, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(y)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(y, fieldDeclaration)
-                parseFieldInitializerOpt(y, y, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(y, y, null, null, null, null, DeclarationKind.Class, Foo)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, null, null, 1, int, ;)
               listener: endMember()
@@ -65,7 +65,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
@@ -168,7 +168,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
@@ -308,7 +308,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
@@ -448,7 +448,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
@@ -588,7 +588,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40834_02.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40834_02.dart.intertwined.expect
index b87bd16..3354446 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40834_02.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40834_02.dart.intertwined.expect
@@ -32,13 +32,13 @@
                 listener: beginMetadataStar(String)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleNullableType', x, DeclarationKind.Class, Foo, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleNullableType', x, DeclarationKind.Class, Foo, false)
                 listener: handleIdentifier(String, typeReference)
                 listener: handleNoTypeArguments(?)
                 listener: handleType(String, ?)
                 ensureIdentifierPotentiallyRecovered(?, fieldDeclaration, false)
                   listener: handleIdentifier(x, fieldDeclaration)
-                parseFieldInitializerOpt(x, x, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(x, x, null, null, null, null, DeclarationKind.Class, Foo)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, null, null, 1, String, ;)
               listener: endMember()
@@ -48,13 +48,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', y, DeclarationKind.Class, Foo, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', y, DeclarationKind.Class, Foo, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(y)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(y, fieldDeclaration)
-                parseFieldInitializerOpt(y, y, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(y, y, null, null, null, null, DeclarationKind.Class, Foo)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, null, null, 1, int, ;)
               listener: endMember()
@@ -65,7 +65,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40834_03.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40834_03.dart.intertwined.expect
index a2ada84..830eaf7 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_40834_03.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_40834_03.dart.intertwined.expect
@@ -32,13 +32,13 @@
                 listener: beginMetadataStar(String)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleNullableType', x, DeclarationKind.Class, Foo, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleNullableType', x, DeclarationKind.Class, Foo, false)
                 listener: handleIdentifier(String, typeReference)
                 listener: handleNoTypeArguments(?)
                 listener: handleType(String, ?)
                 ensureIdentifierPotentiallyRecovered(?, fieldDeclaration, false)
                   listener: handleIdentifier(x, fieldDeclaration)
-                parseFieldInitializerOpt(x, x, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(x, x, null, null, null, null, DeclarationKind.Class, Foo)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, null, null, 1, String, ;)
               listener: endMember()
@@ -48,13 +48,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', y, DeclarationKind.Class, Foo, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', y, DeclarationKind.Class, Foo, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(y)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(y, fieldDeclaration)
-                parseFieldInitializerOpt(y, y, null, null, DeclarationKind.Class, Foo)
+                parseFieldInitializerOpt(y, y, null, null, null, null, DeclarationKind.Class, Foo)
                   listener: handleNoFieldInitializer(;)
                 listener: endClassFields(null, null, null, null, 1, int, ;)
               listener: endMember()
@@ -65,7 +65,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, Foo)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
@@ -197,7 +197,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'VoidType', null, foo, DeclarationKind.Class, Foo, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'VoidType', null, foo, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, foo)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
@@ -336,7 +336,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(}, null, null, null, null, null, }, Instance of 'VoidType', null, bar, DeclarationKind.Class, Foo, false)
+              parseMethod(}, null, null, null, null, null, null, }, Instance of 'VoidType', null, bar, DeclarationKind.Class, Foo, false)
                 listener: beginMethod(null, null, null, null, null, bar)
                 listener: handleVoidKeyword(void)
                 ensureIdentifierPotentiallyRecovered(void, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_41597.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_41597.dart.intertwined.expect
index 0aa114d..4d70eea 100644
--- a/pkg/front_end/parser_testcases/nnbd/issue_41597.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/issue_41597.dart.intertwined.expect
@@ -8,13 +8,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl()
       listener: beginTopLevelMember(bool)
-      parseFields(, null, null, null, null, null, , Instance of 'SimpleType', x, DeclarationKind.TopLevel, null, false)
+      parseFields(, null, null, null, null, null, null, , Instance of 'SimpleType', x, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(bool, typeReference)
         listener: handleNoTypeArguments(x)
         listener: handleType(bool, null)
         ensureIdentifierPotentiallyRecovered(bool, topLevelVariableDeclaration, false)
           listener: handleIdentifier(x, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(x, x, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(x, x, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(;)
         listener: endTopLevelFields(null, null, null, null, 1, bool, ;)
   listener: endTopLevelDeclaration(bool)
@@ -24,13 +24,13 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl(;)
       listener: beginTopLevelMember(bool)
-      parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', x, DeclarationKind.TopLevel, null, false)
+      parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', x, DeclarationKind.TopLevel, null, false)
         listener: handleIdentifier(bool, typeReference)
         listener: handleNoTypeArguments(x)
         listener: handleType(bool, null)
         ensureIdentifierPotentiallyRecovered(bool, topLevelVariableDeclaration, false)
           listener: handleIdentifier(x, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(x, x, null, null, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(x, x, null, null, null, null, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(;)
         listener: endTopLevelFields(null, null, null, null, 1, bool, ;)
   listener: endTopLevelDeclaration(errors)
@@ -205,7 +205,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, C, DeclarationKind.Class, C, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, C, DeclarationKind.Class, C, false)
                 listener: beginMethod(null, null, null, null, null, C)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -258,7 +258,7 @@
                 listener: endMetadataStar(0)
               listener: beginMember()
               isReservedKeyword(.)
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'NoType', null, C, DeclarationKind.Class, C, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'NoType', null, C, DeclarationKind.Class, C, false)
                 listener: beginMethod(null, null, null, null, null, C)
                 listener: handleNoType(;)
                 ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_42621.dart b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart
new file mode 100644
index 0000000..c5704c1
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart
@@ -0,0 +1,27 @@
+Order method1(Map<String, dynamic> json) {
+  return Order()
+    ..x = json['x'] as List
+    ..y = json['y'] as int;
+}
+
+Order method2(Map<String, dynamic> json) {
+  return Order()
+    ..x = json['x'] as List?
+    ..y = json['y'] as int;
+}
+
+Order method3(Map<String, dynamic> json) {
+  return Order()
+    ..x = (json['x'] as List?)
+    ..y = json['y'] as int;
+}
+
+Order method4(Map<String, dynamic> json) {
+  return Order()
+    ..x = json['x'] as List?;
+}
+
+class Order {
+  List? x;
+  int? y;
+}
\ No newline at end of file
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.expect
new file mode 100644
index 0000000..616be0b
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.expect
@@ -0,0 +1,341 @@
+beginCompilationUnit(Order)
+  beginMetadataStar(Order)
+  endMetadataStar(0)
+  beginTopLevelMember(Order)
+    beginTopLevelMethod(, null)
+      handleIdentifier(Order, typeReference)
+      handleNoTypeArguments(method1)
+      handleType(Order, null)
+      handleIdentifier(method1, topLevelFunctionDeclaration)
+      handleNoTypeVariables(()
+      beginFormalParameters((, MemberKind.TopLevelMethod)
+        beginMetadataStar(Map)
+        endMetadataStar(0)
+        beginFormalParameter(Map, MemberKind.TopLevelMethod, null, null, null)
+          handleIdentifier(Map, typeReference)
+          beginTypeArguments(<)
+            handleIdentifier(String, typeReference)
+            handleNoTypeArguments(,)
+            handleType(String, null)
+            handleIdentifier(dynamic, typeReference)
+            handleNoTypeArguments(>)
+            handleType(dynamic, null)
+          endTypeArguments(2, <, >)
+          handleType(Map, null)
+          handleIdentifier(json, formalParameterDeclaration)
+          handleFormalParameterWithoutValue())
+        endFormalParameter(null, null, json, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+      endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+      handleAsyncModifier(null, null)
+      beginBlockFunctionBody({)
+        beginReturnStatement(return)
+          handleIdentifier(Order, expression)
+          handleNoTypeArguments(()
+          beginArguments(()
+          endArguments(0, (, ))
+          handleSend(Order, ..)
+          beginCascade(..)
+            handleIdentifier(x, expressionContinuation)
+            handleNoTypeArguments(=)
+            handleNoArguments(=)
+            handleSend(x, =)
+            endBinaryExpression(..)
+            handleIdentifier(json, expression)
+            handleNoTypeArguments([)
+            handleNoArguments([)
+            handleSend(json, [)
+            beginLiteralString('x')
+            endLiteralString(0, ])
+            handleIndexedExpression(null, [, ])
+            beginAsOperatorType(as)
+              handleIdentifier(List, typeReference)
+              handleNoTypeArguments(..)
+              handleType(List, null)
+            endAsOperatorType(as)
+            handleAsOperator(as)
+            handleAssignmentExpression(=)
+          endCascade()
+          beginCascade(..)
+            handleIdentifier(y, expressionContinuation)
+            handleNoTypeArguments(=)
+            handleNoArguments(=)
+            handleSend(y, =)
+            endBinaryExpression(..)
+            handleIdentifier(json, expression)
+            handleNoTypeArguments([)
+            handleNoArguments([)
+            handleSend(json, [)
+            beginLiteralString('y')
+            endLiteralString(0, ])
+            handleIndexedExpression(null, [, ])
+            beginAsOperatorType(as)
+              handleIdentifier(int, typeReference)
+              handleNoTypeArguments(;)
+              handleType(int, null)
+            endAsOperatorType(as)
+            handleAsOperator(as)
+            handleAssignmentExpression(=)
+          endCascade()
+        endReturnStatement(true, return, ;)
+      endBlockFunctionBody(1, {, })
+    endTopLevelMethod(Order, null, })
+  endTopLevelDeclaration(Order)
+  beginMetadataStar(Order)
+  endMetadataStar(0)
+  beginTopLevelMember(Order)
+    beginTopLevelMethod(}, null)
+      handleIdentifier(Order, typeReference)
+      handleNoTypeArguments(method2)
+      handleType(Order, null)
+      handleIdentifier(method2, topLevelFunctionDeclaration)
+      handleNoTypeVariables(()
+      beginFormalParameters((, MemberKind.TopLevelMethod)
+        beginMetadataStar(Map)
+        endMetadataStar(0)
+        beginFormalParameter(Map, MemberKind.TopLevelMethod, null, null, null)
+          handleIdentifier(Map, typeReference)
+          beginTypeArguments(<)
+            handleIdentifier(String, typeReference)
+            handleNoTypeArguments(,)
+            handleType(String, null)
+            handleIdentifier(dynamic, typeReference)
+            handleNoTypeArguments(>)
+            handleType(dynamic, null)
+          endTypeArguments(2, <, >)
+          handleType(Map, null)
+          handleIdentifier(json, formalParameterDeclaration)
+          handleFormalParameterWithoutValue())
+        endFormalParameter(null, null, json, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+      endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+      handleAsyncModifier(null, null)
+      beginBlockFunctionBody({)
+        beginReturnStatement(return)
+          handleIdentifier(Order, expression)
+          handleNoTypeArguments(()
+          beginArguments(()
+          endArguments(0, (, ))
+          handleSend(Order, ..)
+          beginCascade(..)
+            handleIdentifier(x, expressionContinuation)
+            handleNoTypeArguments(=)
+            handleNoArguments(=)
+            handleSend(x, =)
+            endBinaryExpression(..)
+            handleIdentifier(json, expression)
+            handleNoTypeArguments([)
+            handleNoArguments([)
+            handleSend(json, [)
+            beginLiteralString('x')
+            endLiteralString(0, ])
+            handleIndexedExpression(null, [, ])
+            beginAsOperatorType(as)
+              handleIdentifier(List, typeReference)
+              handleNoTypeArguments(?)
+              handleType(List, ?)
+            endAsOperatorType(as)
+            handleAsOperator(as)
+            handleAssignmentExpression(=)
+          endCascade()
+          beginCascade(..)
+            handleIdentifier(y, expressionContinuation)
+            handleNoTypeArguments(=)
+            handleNoArguments(=)
+            handleSend(y, =)
+            endBinaryExpression(..)
+            handleIdentifier(json, expression)
+            handleNoTypeArguments([)
+            handleNoArguments([)
+            handleSend(json, [)
+            beginLiteralString('y')
+            endLiteralString(0, ])
+            handleIndexedExpression(null, [, ])
+            beginAsOperatorType(as)
+              handleIdentifier(int, typeReference)
+              handleNoTypeArguments(;)
+              handleType(int, null)
+            endAsOperatorType(as)
+            handleAsOperator(as)
+            handleAssignmentExpression(=)
+          endCascade()
+        endReturnStatement(true, return, ;)
+      endBlockFunctionBody(1, {, })
+    endTopLevelMethod(Order, null, })
+  endTopLevelDeclaration(Order)
+  beginMetadataStar(Order)
+  endMetadataStar(0)
+  beginTopLevelMember(Order)
+    beginTopLevelMethod(}, null)
+      handleIdentifier(Order, typeReference)
+      handleNoTypeArguments(method3)
+      handleType(Order, null)
+      handleIdentifier(method3, topLevelFunctionDeclaration)
+      handleNoTypeVariables(()
+      beginFormalParameters((, MemberKind.TopLevelMethod)
+        beginMetadataStar(Map)
+        endMetadataStar(0)
+        beginFormalParameter(Map, MemberKind.TopLevelMethod, null, null, null)
+          handleIdentifier(Map, typeReference)
+          beginTypeArguments(<)
+            handleIdentifier(String, typeReference)
+            handleNoTypeArguments(,)
+            handleType(String, null)
+            handleIdentifier(dynamic, typeReference)
+            handleNoTypeArguments(>)
+            handleType(dynamic, null)
+          endTypeArguments(2, <, >)
+          handleType(Map, null)
+          handleIdentifier(json, formalParameterDeclaration)
+          handleFormalParameterWithoutValue())
+        endFormalParameter(null, null, json, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+      endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+      handleAsyncModifier(null, null)
+      beginBlockFunctionBody({)
+        beginReturnStatement(return)
+          handleIdentifier(Order, expression)
+          handleNoTypeArguments(()
+          beginArguments(()
+          endArguments(0, (, ))
+          handleSend(Order, ..)
+          beginCascade(..)
+            handleIdentifier(x, expressionContinuation)
+            handleNoTypeArguments(=)
+            handleNoArguments(=)
+            handleSend(x, =)
+            endBinaryExpression(..)
+            handleIdentifier(json, expression)
+            handleNoTypeArguments([)
+            handleNoArguments([)
+            handleSend(json, [)
+            beginLiteralString('x')
+            endLiteralString(0, ])
+            handleIndexedExpression(null, [, ])
+            beginAsOperatorType(as)
+              handleIdentifier(List, typeReference)
+              handleNoTypeArguments(?)
+              handleType(List, ?)
+            endAsOperatorType(as)
+            handleAsOperator(as)
+            handleParenthesizedExpression(()
+            handleAssignmentExpression(=)
+          endCascade()
+          beginCascade(..)
+            handleIdentifier(y, expressionContinuation)
+            handleNoTypeArguments(=)
+            handleNoArguments(=)
+            handleSend(y, =)
+            endBinaryExpression(..)
+            handleIdentifier(json, expression)
+            handleNoTypeArguments([)
+            handleNoArguments([)
+            handleSend(json, [)
+            beginLiteralString('y')
+            endLiteralString(0, ])
+            handleIndexedExpression(null, [, ])
+            beginAsOperatorType(as)
+              handleIdentifier(int, typeReference)
+              handleNoTypeArguments(;)
+              handleType(int, null)
+            endAsOperatorType(as)
+            handleAsOperator(as)
+            handleAssignmentExpression(=)
+          endCascade()
+        endReturnStatement(true, return, ;)
+      endBlockFunctionBody(1, {, })
+    endTopLevelMethod(Order, null, })
+  endTopLevelDeclaration(Order)
+  beginMetadataStar(Order)
+  endMetadataStar(0)
+  beginTopLevelMember(Order)
+    beginTopLevelMethod(}, null)
+      handleIdentifier(Order, typeReference)
+      handleNoTypeArguments(method4)
+      handleType(Order, null)
+      handleIdentifier(method4, topLevelFunctionDeclaration)
+      handleNoTypeVariables(()
+      beginFormalParameters((, MemberKind.TopLevelMethod)
+        beginMetadataStar(Map)
+        endMetadataStar(0)
+        beginFormalParameter(Map, MemberKind.TopLevelMethod, null, null, null)
+          handleIdentifier(Map, typeReference)
+          beginTypeArguments(<)
+            handleIdentifier(String, typeReference)
+            handleNoTypeArguments(,)
+            handleType(String, null)
+            handleIdentifier(dynamic, typeReference)
+            handleNoTypeArguments(>)
+            handleType(dynamic, null)
+          endTypeArguments(2, <, >)
+          handleType(Map, null)
+          handleIdentifier(json, formalParameterDeclaration)
+          handleFormalParameterWithoutValue())
+        endFormalParameter(null, null, json, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+      endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+      handleAsyncModifier(null, null)
+      beginBlockFunctionBody({)
+        beginReturnStatement(return)
+          handleIdentifier(Order, expression)
+          handleNoTypeArguments(()
+          beginArguments(()
+          endArguments(0, (, ))
+          handleSend(Order, ..)
+          beginCascade(..)
+            handleIdentifier(x, expressionContinuation)
+            handleNoTypeArguments(=)
+            handleNoArguments(=)
+            handleSend(x, =)
+            endBinaryExpression(..)
+            handleIdentifier(json, expression)
+            handleNoTypeArguments([)
+            handleNoArguments([)
+            handleSend(json, [)
+            beginLiteralString('x')
+            endLiteralString(0, ])
+            handleIndexedExpression(null, [, ])
+            beginAsOperatorType(as)
+              handleIdentifier(List, typeReference)
+              handleNoTypeArguments(?)
+              handleType(List, ?)
+            endAsOperatorType(as)
+            handleAsOperator(as)
+            handleAssignmentExpression(=)
+          endCascade()
+        endReturnStatement(true, return, ;)
+      endBlockFunctionBody(1, {, })
+    endTopLevelMethod(Order, null, })
+  endTopLevelDeclaration(class)
+  beginMetadataStar(class)
+  endMetadataStar(0)
+  beginClassOrNamedMixinApplicationPrelude(class)
+    handleIdentifier(Order, classOrMixinDeclaration)
+    handleNoTypeVariables({)
+    beginClassDeclaration(class, null, Order)
+      handleNoType(Order)
+      handleClassExtends(null)
+      handleClassNoWithClause()
+      handleClassOrMixinImplements(null, 0)
+      handleClassHeader(class, class, null)
+      beginClassOrMixinBody(DeclarationKind.Class, {)
+        beginMetadataStar(List)
+        endMetadataStar(0)
+        beginMember()
+          handleIdentifier(List, typeReference)
+          handleNoTypeArguments(?)
+          handleType(List, ?)
+          handleIdentifier(x, fieldDeclaration)
+          handleNoFieldInitializer(;)
+        endClassFields(null, null, null, null, 1, List, ;)
+      endMember()
+      beginMetadataStar(int)
+      endMetadataStar(0)
+      beginMember()
+        handleIdentifier(int, typeReference)
+        handleNoTypeArguments(?)
+        handleType(int, ?)
+        handleIdentifier(y, fieldDeclaration)
+        handleNoFieldInitializer(;)
+      endClassFields(null, null, null, null, 1, int, ;)
+    endMember()
+  endClassOrMixinBody(DeclarationKind.Class, 2, {, })
+endClassDeclaration(class, })
+endTopLevelDeclaration()
+endCompilationUnit(5, )
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.intertwined.expect
new file mode 100644
index 0000000..536f1f7
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.intertwined.expect
@@ -0,0 +1,676 @@
+parseUnit(Order)
+  skipErrorTokens(Order)
+  listener: beginCompilationUnit(Order)
+  syntheticPreviousToken(Order)
+  parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+    parseMetadataStar()
+      listener: beginMetadataStar(Order)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl()
+      listener: beginTopLevelMember(Order)
+      parseTopLevelMethod(, null, , Instance of 'SimpleType', null, method1, false)
+        listener: beginTopLevelMethod(, null)
+        listener: handleIdentifier(Order, typeReference)
+        listener: handleNoTypeArguments(method1)
+        listener: handleType(Order, null)
+        ensureIdentifierPotentiallyRecovered(Order, topLevelFunctionDeclaration, false)
+          listener: handleIdentifier(method1, topLevelFunctionDeclaration)
+        parseMethodTypeVar(method1)
+          listener: handleNoTypeVariables(()
+        parseGetterOrFormalParameters(method1, method1, false, MemberKind.TopLevelMethod)
+          parseFormalParameters(method1, MemberKind.TopLevelMethod)
+            parseFormalParametersRest((, MemberKind.TopLevelMethod)
+              listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+              parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+                parseMetadataStar(()
+                  listener: beginMetadataStar(Map)
+                  listener: endMetadataStar(0)
+                listener: beginFormalParameter(Map, MemberKind.TopLevelMethod, null, null, null)
+                ensureIdentifier((, typeReference)
+                  listener: handleIdentifier(Map, typeReference)
+                listener: beginTypeArguments(<)
+                listener: handleIdentifier(String, typeReference)
+                listener: handleNoTypeArguments(,)
+                listener: handleType(String, null)
+                listener: handleIdentifier(dynamic, typeReference)
+                listener: handleNoTypeArguments(>)
+                listener: handleType(dynamic, null)
+                listener: endTypeArguments(2, <, >)
+                listener: handleType(Map, null)
+                ensureIdentifier(>, formalParameterDeclaration)
+                  listener: handleIdentifier(json, formalParameterDeclaration)
+                listener: handleFormalParameterWithoutValue())
+                listener: endFormalParameter(null, null, json, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+              listener: endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+        parseAsyncModifierOpt())
+          listener: handleAsyncModifier(null, null)
+          inPlainSync()
+        parseFunctionBody(), false, false)
+          listener: beginBlockFunctionBody({)
+          notEofOrValue(}, return)
+          parseStatement({)
+            parseStatementX({)
+              parseReturnStatement({)
+                listener: beginReturnStatement(return)
+                parseExpression(return)
+                  parsePrecedenceExpression(return, 1, true)
+                    parseUnaryExpression(return, true)
+                      parsePrimary(return, expression)
+                        parseSendOrFunctionLiteral(return, expression)
+                          looksLikeFunctionBody(..)
+                          parseSend(return, expression)
+                            ensureIdentifier(return, expression)
+                              listener: handleIdentifier(Order, expression)
+                            listener: handleNoTypeArguments(()
+                            parseArgumentsOpt(Order)
+                              parseArguments(Order)
+                                parseArgumentsRest(()
+                                  listener: beginArguments(()
+                                  listener: endArguments(0, (, ))
+                            listener: handleSend(Order, ..)
+                    parseCascadeExpression())
+                      listener: beginCascade(..)
+                      parseSend(.., expressionContinuation)
+                        ensureIdentifier(.., expressionContinuation)
+                          listener: handleIdentifier(x, expressionContinuation)
+                        listener: handleNoTypeArguments(=)
+                        parseArgumentsOpt(x)
+                          listener: handleNoArguments(=)
+                        listener: handleSend(x, =)
+                      listener: endBinaryExpression(..)
+                      parseArgumentOrIndexStar(x, Instance of 'NoTypeParamOrArg', false)
+                      parseExpressionWithoutCascade(=)
+                        parsePrecedenceExpression(=, 1, false)
+                          parseUnaryExpression(=, false)
+                            parsePrimary(=, expression)
+                              parseSendOrFunctionLiteral(=, expression)
+                                parseSend(=, expression)
+                                  ensureIdentifier(=, expression)
+                                    listener: handleIdentifier(json, expression)
+                                  listener: handleNoTypeArguments([)
+                                  parseArgumentsOpt(json)
+                                    listener: handleNoArguments([)
+                                  listener: handleSend(json, [)
+                          parseArgumentOrIndexStar(json, Instance of 'NoTypeParamOrArg', false)
+                            parseExpression([)
+                              parsePrecedenceExpression([, 1, true)
+                                parseUnaryExpression([, true)
+                                  parsePrimary([, expression)
+                                    parseLiteralString([)
+                                      parseSingleLiteralString([)
+                                        listener: beginLiteralString('x')
+                                        listener: endLiteralString(0, ])
+                            listener: handleIndexedExpression(null, [, ])
+                          parseAsOperatorRest(])
+                            listener: beginAsOperatorType(as)
+                            computeTypeAfterIsOrAs(as)
+                            listener: handleIdentifier(List, typeReference)
+                            listener: handleNoTypeArguments(..)
+                            listener: handleType(List, null)
+                            listener: endAsOperatorType(as)
+                            listener: handleAsOperator(as)
+                            skipChainedAsIsOperators(List)
+                      listener: handleAssignmentExpression(=)
+                      listener: endCascade()
+                    parseCascadeExpression(List)
+                      listener: beginCascade(..)
+                      parseSend(.., expressionContinuation)
+                        ensureIdentifier(.., expressionContinuation)
+                          listener: handleIdentifier(y, expressionContinuation)
+                        listener: handleNoTypeArguments(=)
+                        parseArgumentsOpt(y)
+                          listener: handleNoArguments(=)
+                        listener: handleSend(y, =)
+                      listener: endBinaryExpression(..)
+                      parseArgumentOrIndexStar(y, Instance of 'NoTypeParamOrArg', false)
+                      parseExpressionWithoutCascade(=)
+                        parsePrecedenceExpression(=, 1, false)
+                          parseUnaryExpression(=, false)
+                            parsePrimary(=, expression)
+                              parseSendOrFunctionLiteral(=, expression)
+                                parseSend(=, expression)
+                                  ensureIdentifier(=, expression)
+                                    listener: handleIdentifier(json, expression)
+                                  listener: handleNoTypeArguments([)
+                                  parseArgumentsOpt(json)
+                                    listener: handleNoArguments([)
+                                  listener: handleSend(json, [)
+                          parseArgumentOrIndexStar(json, Instance of 'NoTypeParamOrArg', false)
+                            parseExpression([)
+                              parsePrecedenceExpression([, 1, true)
+                                parseUnaryExpression([, true)
+                                  parsePrimary([, expression)
+                                    parseLiteralString([)
+                                      parseSingleLiteralString([)
+                                        listener: beginLiteralString('y')
+                                        listener: endLiteralString(0, ])
+                            listener: handleIndexedExpression(null, [, ])
+                          parseAsOperatorRest(])
+                            listener: beginAsOperatorType(as)
+                            computeTypeAfterIsOrAs(as)
+                            listener: handleIdentifier(int, typeReference)
+                            listener: handleNoTypeArguments(;)
+                            listener: handleType(int, null)
+                            listener: endAsOperatorType(as)
+                            listener: handleAsOperator(as)
+                            skipChainedAsIsOperators(int)
+                      listener: handleAssignmentExpression(=)
+                      listener: endCascade()
+                ensureSemicolon(int)
+                listener: endReturnStatement(true, return, ;)
+                inGenerator()
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(1, {, })
+        listener: endTopLevelMethod(Order, null, })
+  listener: endTopLevelDeclaration(Order)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(Order)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(})
+      listener: beginTopLevelMember(Order)
+      parseTopLevelMethod(}, null, }, Instance of 'SimpleType', null, method2, false)
+        listener: beginTopLevelMethod(}, null)
+        listener: handleIdentifier(Order, typeReference)
+        listener: handleNoTypeArguments(method2)
+        listener: handleType(Order, null)
+        ensureIdentifierPotentiallyRecovered(Order, topLevelFunctionDeclaration, false)
+          listener: handleIdentifier(method2, topLevelFunctionDeclaration)
+        parseMethodTypeVar(method2)
+          listener: handleNoTypeVariables(()
+        parseGetterOrFormalParameters(method2, method2, false, MemberKind.TopLevelMethod)
+          parseFormalParameters(method2, MemberKind.TopLevelMethod)
+            parseFormalParametersRest((, MemberKind.TopLevelMethod)
+              listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+              parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+                parseMetadataStar(()
+                  listener: beginMetadataStar(Map)
+                  listener: endMetadataStar(0)
+                listener: beginFormalParameter(Map, MemberKind.TopLevelMethod, null, null, null)
+                ensureIdentifier((, typeReference)
+                  listener: handleIdentifier(Map, typeReference)
+                listener: beginTypeArguments(<)
+                listener: handleIdentifier(String, typeReference)
+                listener: handleNoTypeArguments(,)
+                listener: handleType(String, null)
+                listener: handleIdentifier(dynamic, typeReference)
+                listener: handleNoTypeArguments(>)
+                listener: handleType(dynamic, null)
+                listener: endTypeArguments(2, <, >)
+                listener: handleType(Map, null)
+                ensureIdentifier(>, formalParameterDeclaration)
+                  listener: handleIdentifier(json, formalParameterDeclaration)
+                listener: handleFormalParameterWithoutValue())
+                listener: endFormalParameter(null, null, json, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+              listener: endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+        parseAsyncModifierOpt())
+          listener: handleAsyncModifier(null, null)
+          inPlainSync()
+        parseFunctionBody(), false, false)
+          listener: beginBlockFunctionBody({)
+          notEofOrValue(}, return)
+          parseStatement({)
+            parseStatementX({)
+              parseReturnStatement({)
+                listener: beginReturnStatement(return)
+                parseExpression(return)
+                  parsePrecedenceExpression(return, 1, true)
+                    parseUnaryExpression(return, true)
+                      parsePrimary(return, expression)
+                        parseSendOrFunctionLiteral(return, expression)
+                          looksLikeFunctionBody(..)
+                          parseSend(return, expression)
+                            ensureIdentifier(return, expression)
+                              listener: handleIdentifier(Order, expression)
+                            listener: handleNoTypeArguments(()
+                            parseArgumentsOpt(Order)
+                              parseArguments(Order)
+                                parseArgumentsRest(()
+                                  listener: beginArguments(()
+                                  listener: endArguments(0, (, ))
+                            listener: handleSend(Order, ..)
+                    parseCascadeExpression())
+                      listener: beginCascade(..)
+                      parseSend(.., expressionContinuation)
+                        ensureIdentifier(.., expressionContinuation)
+                          listener: handleIdentifier(x, expressionContinuation)
+                        listener: handleNoTypeArguments(=)
+                        parseArgumentsOpt(x)
+                          listener: handleNoArguments(=)
+                        listener: handleSend(x, =)
+                      listener: endBinaryExpression(..)
+                      parseArgumentOrIndexStar(x, Instance of 'NoTypeParamOrArg', false)
+                      parseExpressionWithoutCascade(=)
+                        parsePrecedenceExpression(=, 1, false)
+                          parseUnaryExpression(=, false)
+                            parsePrimary(=, expression)
+                              parseSendOrFunctionLiteral(=, expression)
+                                parseSend(=, expression)
+                                  ensureIdentifier(=, expression)
+                                    listener: handleIdentifier(json, expression)
+                                  listener: handleNoTypeArguments([)
+                                  parseArgumentsOpt(json)
+                                    listener: handleNoArguments([)
+                                  listener: handleSend(json, [)
+                          parseArgumentOrIndexStar(json, Instance of 'NoTypeParamOrArg', false)
+                            parseExpression([)
+                              parsePrecedenceExpression([, 1, true)
+                                parseUnaryExpression([, true)
+                                  parsePrimary([, expression)
+                                    parseLiteralString([)
+                                      parseSingleLiteralString([)
+                                        listener: beginLiteralString('x')
+                                        listener: endLiteralString(0, ])
+                            listener: handleIndexedExpression(null, [, ])
+                          parseAsOperatorRest(])
+                            listener: beginAsOperatorType(as)
+                            computeTypeAfterIsOrAs(as)
+                            listener: handleIdentifier(List, typeReference)
+                            listener: handleNoTypeArguments(?)
+                            listener: handleType(List, ?)
+                            listener: endAsOperatorType(as)
+                            listener: handleAsOperator(as)
+                            skipChainedAsIsOperators(?)
+                      listener: handleAssignmentExpression(=)
+                      listener: endCascade()
+                    parseCascadeExpression(?)
+                      listener: beginCascade(..)
+                      parseSend(.., expressionContinuation)
+                        ensureIdentifier(.., expressionContinuation)
+                          listener: handleIdentifier(y, expressionContinuation)
+                        listener: handleNoTypeArguments(=)
+                        parseArgumentsOpt(y)
+                          listener: handleNoArguments(=)
+                        listener: handleSend(y, =)
+                      listener: endBinaryExpression(..)
+                      parseArgumentOrIndexStar(y, Instance of 'NoTypeParamOrArg', false)
+                      parseExpressionWithoutCascade(=)
+                        parsePrecedenceExpression(=, 1, false)
+                          parseUnaryExpression(=, false)
+                            parsePrimary(=, expression)
+                              parseSendOrFunctionLiteral(=, expression)
+                                parseSend(=, expression)
+                                  ensureIdentifier(=, expression)
+                                    listener: handleIdentifier(json, expression)
+                                  listener: handleNoTypeArguments([)
+                                  parseArgumentsOpt(json)
+                                    listener: handleNoArguments([)
+                                  listener: handleSend(json, [)
+                          parseArgumentOrIndexStar(json, Instance of 'NoTypeParamOrArg', false)
+                            parseExpression([)
+                              parsePrecedenceExpression([, 1, true)
+                                parseUnaryExpression([, true)
+                                  parsePrimary([, expression)
+                                    parseLiteralString([)
+                                      parseSingleLiteralString([)
+                                        listener: beginLiteralString('y')
+                                        listener: endLiteralString(0, ])
+                            listener: handleIndexedExpression(null, [, ])
+                          parseAsOperatorRest(])
+                            listener: beginAsOperatorType(as)
+                            computeTypeAfterIsOrAs(as)
+                            listener: handleIdentifier(int, typeReference)
+                            listener: handleNoTypeArguments(;)
+                            listener: handleType(int, null)
+                            listener: endAsOperatorType(as)
+                            listener: handleAsOperator(as)
+                            skipChainedAsIsOperators(int)
+                      listener: handleAssignmentExpression(=)
+                      listener: endCascade()
+                ensureSemicolon(int)
+                listener: endReturnStatement(true, return, ;)
+                inGenerator()
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(1, {, })
+        listener: endTopLevelMethod(Order, null, })
+  listener: endTopLevelDeclaration(Order)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(Order)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(})
+      listener: beginTopLevelMember(Order)
+      parseTopLevelMethod(}, null, }, Instance of 'SimpleType', null, method3, false)
+        listener: beginTopLevelMethod(}, null)
+        listener: handleIdentifier(Order, typeReference)
+        listener: handleNoTypeArguments(method3)
+        listener: handleType(Order, null)
+        ensureIdentifierPotentiallyRecovered(Order, topLevelFunctionDeclaration, false)
+          listener: handleIdentifier(method3, topLevelFunctionDeclaration)
+        parseMethodTypeVar(method3)
+          listener: handleNoTypeVariables(()
+        parseGetterOrFormalParameters(method3, method3, false, MemberKind.TopLevelMethod)
+          parseFormalParameters(method3, MemberKind.TopLevelMethod)
+            parseFormalParametersRest((, MemberKind.TopLevelMethod)
+              listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+              parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+                parseMetadataStar(()
+                  listener: beginMetadataStar(Map)
+                  listener: endMetadataStar(0)
+                listener: beginFormalParameter(Map, MemberKind.TopLevelMethod, null, null, null)
+                ensureIdentifier((, typeReference)
+                  listener: handleIdentifier(Map, typeReference)
+                listener: beginTypeArguments(<)
+                listener: handleIdentifier(String, typeReference)
+                listener: handleNoTypeArguments(,)
+                listener: handleType(String, null)
+                listener: handleIdentifier(dynamic, typeReference)
+                listener: handleNoTypeArguments(>)
+                listener: handleType(dynamic, null)
+                listener: endTypeArguments(2, <, >)
+                listener: handleType(Map, null)
+                ensureIdentifier(>, formalParameterDeclaration)
+                  listener: handleIdentifier(json, formalParameterDeclaration)
+                listener: handleFormalParameterWithoutValue())
+                listener: endFormalParameter(null, null, json, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+              listener: endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+        parseAsyncModifierOpt())
+          listener: handleAsyncModifier(null, null)
+          inPlainSync()
+        parseFunctionBody(), false, false)
+          listener: beginBlockFunctionBody({)
+          notEofOrValue(}, return)
+          parseStatement({)
+            parseStatementX({)
+              parseReturnStatement({)
+                listener: beginReturnStatement(return)
+                parseExpression(return)
+                  parsePrecedenceExpression(return, 1, true)
+                    parseUnaryExpression(return, true)
+                      parsePrimary(return, expression)
+                        parseSendOrFunctionLiteral(return, expression)
+                          looksLikeFunctionBody(..)
+                          parseSend(return, expression)
+                            ensureIdentifier(return, expression)
+                              listener: handleIdentifier(Order, expression)
+                            listener: handleNoTypeArguments(()
+                            parseArgumentsOpt(Order)
+                              parseArguments(Order)
+                                parseArgumentsRest(()
+                                  listener: beginArguments(()
+                                  listener: endArguments(0, (, ))
+                            listener: handleSend(Order, ..)
+                    parseCascadeExpression())
+                      listener: beginCascade(..)
+                      parseSend(.., expressionContinuation)
+                        ensureIdentifier(.., expressionContinuation)
+                          listener: handleIdentifier(x, expressionContinuation)
+                        listener: handleNoTypeArguments(=)
+                        parseArgumentsOpt(x)
+                          listener: handleNoArguments(=)
+                        listener: handleSend(x, =)
+                      listener: endBinaryExpression(..)
+                      parseArgumentOrIndexStar(x, Instance of 'NoTypeParamOrArg', false)
+                      parseExpressionWithoutCascade(=)
+                        parsePrecedenceExpression(=, 1, false)
+                          parseUnaryExpression(=, false)
+                            parsePrimary(=, expression)
+                              parseParenthesizedExpressionOrFunctionLiteral(=)
+                                parseParenthesizedExpression(=)
+                                  parseExpressionInParenthesis(=)
+                                    parseExpressionInParenthesisRest(()
+                                      parseExpression(()
+                                        parsePrecedenceExpression((, 1, true)
+                                          parseUnaryExpression((, true)
+                                            parsePrimary((, expression)
+                                              parseSendOrFunctionLiteral((, expression)
+                                                parseSend((, expression)
+                                                  ensureIdentifier((, expression)
+                                                    listener: handleIdentifier(json, expression)
+                                                  listener: handleNoTypeArguments([)
+                                                  parseArgumentsOpt(json)
+                                                    listener: handleNoArguments([)
+                                                  listener: handleSend(json, [)
+                                          parseArgumentOrIndexStar(json, Instance of 'NoTypeParamOrArg', false)
+                                            parseExpression([)
+                                              parsePrecedenceExpression([, 1, true)
+                                                parseUnaryExpression([, true)
+                                                  parsePrimary([, expression)
+                                                    parseLiteralString([)
+                                                      parseSingleLiteralString([)
+                                                        listener: beginLiteralString('x')
+                                                        listener: endLiteralString(0, ])
+                                            listener: handleIndexedExpression(null, [, ])
+                                          parseAsOperatorRest(])
+                                            listener: beginAsOperatorType(as)
+                                            computeTypeAfterIsOrAs(as)
+                                            listener: handleIdentifier(List, typeReference)
+                                            listener: handleNoTypeArguments(?)
+                                            listener: handleType(List, ?)
+                                            listener: endAsOperatorType(as)
+                                            listener: handleAsOperator(as)
+                                            skipChainedAsIsOperators(?)
+                                      ensureCloseParen(?, ()
+                                  listener: handleParenthesizedExpression(()
+                      listener: handleAssignmentExpression(=)
+                      listener: endCascade()
+                    parseCascadeExpression())
+                      listener: beginCascade(..)
+                      parseSend(.., expressionContinuation)
+                        ensureIdentifier(.., expressionContinuation)
+                          listener: handleIdentifier(y, expressionContinuation)
+                        listener: handleNoTypeArguments(=)
+                        parseArgumentsOpt(y)
+                          listener: handleNoArguments(=)
+                        listener: handleSend(y, =)
+                      listener: endBinaryExpression(..)
+                      parseArgumentOrIndexStar(y, Instance of 'NoTypeParamOrArg', false)
+                      parseExpressionWithoutCascade(=)
+                        parsePrecedenceExpression(=, 1, false)
+                          parseUnaryExpression(=, false)
+                            parsePrimary(=, expression)
+                              parseSendOrFunctionLiteral(=, expression)
+                                parseSend(=, expression)
+                                  ensureIdentifier(=, expression)
+                                    listener: handleIdentifier(json, expression)
+                                  listener: handleNoTypeArguments([)
+                                  parseArgumentsOpt(json)
+                                    listener: handleNoArguments([)
+                                  listener: handleSend(json, [)
+                          parseArgumentOrIndexStar(json, Instance of 'NoTypeParamOrArg', false)
+                            parseExpression([)
+                              parsePrecedenceExpression([, 1, true)
+                                parseUnaryExpression([, true)
+                                  parsePrimary([, expression)
+                                    parseLiteralString([)
+                                      parseSingleLiteralString([)
+                                        listener: beginLiteralString('y')
+                                        listener: endLiteralString(0, ])
+                            listener: handleIndexedExpression(null, [, ])
+                          parseAsOperatorRest(])
+                            listener: beginAsOperatorType(as)
+                            computeTypeAfterIsOrAs(as)
+                            listener: handleIdentifier(int, typeReference)
+                            listener: handleNoTypeArguments(;)
+                            listener: handleType(int, null)
+                            listener: endAsOperatorType(as)
+                            listener: handleAsOperator(as)
+                            skipChainedAsIsOperators(int)
+                      listener: handleAssignmentExpression(=)
+                      listener: endCascade()
+                ensureSemicolon(int)
+                listener: endReturnStatement(true, return, ;)
+                inGenerator()
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(1, {, })
+        listener: endTopLevelMethod(Order, null, })
+  listener: endTopLevelDeclaration(Order)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(Order)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(})
+      listener: beginTopLevelMember(Order)
+      parseTopLevelMethod(}, null, }, Instance of 'SimpleType', null, method4, false)
+        listener: beginTopLevelMethod(}, null)
+        listener: handleIdentifier(Order, typeReference)
+        listener: handleNoTypeArguments(method4)
+        listener: handleType(Order, null)
+        ensureIdentifierPotentiallyRecovered(Order, topLevelFunctionDeclaration, false)
+          listener: handleIdentifier(method4, topLevelFunctionDeclaration)
+        parseMethodTypeVar(method4)
+          listener: handleNoTypeVariables(()
+        parseGetterOrFormalParameters(method4, method4, false, MemberKind.TopLevelMethod)
+          parseFormalParameters(method4, MemberKind.TopLevelMethod)
+            parseFormalParametersRest((, MemberKind.TopLevelMethod)
+              listener: beginFormalParameters((, MemberKind.TopLevelMethod)
+              parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+                parseMetadataStar(()
+                  listener: beginMetadataStar(Map)
+                  listener: endMetadataStar(0)
+                listener: beginFormalParameter(Map, MemberKind.TopLevelMethod, null, null, null)
+                ensureIdentifier((, typeReference)
+                  listener: handleIdentifier(Map, typeReference)
+                listener: beginTypeArguments(<)
+                listener: handleIdentifier(String, typeReference)
+                listener: handleNoTypeArguments(,)
+                listener: handleType(String, null)
+                listener: handleIdentifier(dynamic, typeReference)
+                listener: handleNoTypeArguments(>)
+                listener: handleType(dynamic, null)
+                listener: endTypeArguments(2, <, >)
+                listener: handleType(Map, null)
+                ensureIdentifier(>, formalParameterDeclaration)
+                  listener: handleIdentifier(json, formalParameterDeclaration)
+                listener: handleFormalParameterWithoutValue())
+                listener: endFormalParameter(null, null, json, null, null, FormalParameterKind.mandatory, MemberKind.TopLevelMethod)
+              listener: endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
+        parseAsyncModifierOpt())
+          listener: handleAsyncModifier(null, null)
+          inPlainSync()
+        parseFunctionBody(), false, false)
+          listener: beginBlockFunctionBody({)
+          notEofOrValue(}, return)
+          parseStatement({)
+            parseStatementX({)
+              parseReturnStatement({)
+                listener: beginReturnStatement(return)
+                parseExpression(return)
+                  parsePrecedenceExpression(return, 1, true)
+                    parseUnaryExpression(return, true)
+                      parsePrimary(return, expression)
+                        parseSendOrFunctionLiteral(return, expression)
+                          looksLikeFunctionBody(..)
+                          parseSend(return, expression)
+                            ensureIdentifier(return, expression)
+                              listener: handleIdentifier(Order, expression)
+                            listener: handleNoTypeArguments(()
+                            parseArgumentsOpt(Order)
+                              parseArguments(Order)
+                                parseArgumentsRest(()
+                                  listener: beginArguments(()
+                                  listener: endArguments(0, (, ))
+                            listener: handleSend(Order, ..)
+                    parseCascadeExpression())
+                      listener: beginCascade(..)
+                      parseSend(.., expressionContinuation)
+                        ensureIdentifier(.., expressionContinuation)
+                          listener: handleIdentifier(x, expressionContinuation)
+                        listener: handleNoTypeArguments(=)
+                        parseArgumentsOpt(x)
+                          listener: handleNoArguments(=)
+                        listener: handleSend(x, =)
+                      listener: endBinaryExpression(..)
+                      parseArgumentOrIndexStar(x, Instance of 'NoTypeParamOrArg', false)
+                      parseExpressionWithoutCascade(=)
+                        parsePrecedenceExpression(=, 1, false)
+                          parseUnaryExpression(=, false)
+                            parsePrimary(=, expression)
+                              parseSendOrFunctionLiteral(=, expression)
+                                parseSend(=, expression)
+                                  ensureIdentifier(=, expression)
+                                    listener: handleIdentifier(json, expression)
+                                  listener: handleNoTypeArguments([)
+                                  parseArgumentsOpt(json)
+                                    listener: handleNoArguments([)
+                                  listener: handleSend(json, [)
+                          parseArgumentOrIndexStar(json, Instance of 'NoTypeParamOrArg', false)
+                            parseExpression([)
+                              parsePrecedenceExpression([, 1, true)
+                                parseUnaryExpression([, true)
+                                  parsePrimary([, expression)
+                                    parseLiteralString([)
+                                      parseSingleLiteralString([)
+                                        listener: beginLiteralString('x')
+                                        listener: endLiteralString(0, ])
+                            listener: handleIndexedExpression(null, [, ])
+                          parseAsOperatorRest(])
+                            listener: beginAsOperatorType(as)
+                            computeTypeAfterIsOrAs(as)
+                            listener: handleIdentifier(List, typeReference)
+                            listener: handleNoTypeArguments(?)
+                            listener: handleType(List, ?)
+                            listener: endAsOperatorType(as)
+                            listener: handleAsOperator(as)
+                            skipChainedAsIsOperators(?)
+                      listener: handleAssignmentExpression(=)
+                      listener: endCascade()
+                ensureSemicolon(?)
+                listener: endReturnStatement(true, return, ;)
+                inGenerator()
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(1, {, })
+        listener: endTopLevelMethod(Order, null, })
+  listener: endTopLevelDeclaration(class)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(class)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(}, class, Instance of 'DirectiveContext')
+      parseClassDeclarationModifiers(}, class)
+      parseClassOrNamedMixinApplication(null, class)
+        listener: beginClassOrNamedMixinApplicationPrelude(class)
+        ensureIdentifier(class, classOrMixinDeclaration)
+          listener: handleIdentifier(Order, classOrMixinDeclaration)
+        listener: handleNoTypeVariables({)
+        listener: beginClassDeclaration(class, null, Order)
+        parseClass(Order, class, class, Order)
+          parseClassHeaderOpt(Order, class, class)
+            parseClassExtendsOpt(Order)
+              listener: handleNoType(Order)
+              listener: handleClassExtends(null)
+            parseWithClauseOpt(Order)
+              listener: handleClassNoWithClause()
+            parseClassOrMixinImplementsOpt(Order)
+              listener: handleClassOrMixinImplements(null, 0)
+            listener: handleClassHeader(class, class, null)
+          parseClassOrMixinOrExtensionBody(Order, DeclarationKind.Class, Order)
+            listener: beginClassOrMixinBody(DeclarationKind.Class, {)
+            notEofOrValue(}, List)
+            parseClassOrMixinOrExtensionMemberImpl({, DeclarationKind.Class, Order)
+              parseMetadataStar({)
+                listener: beginMetadataStar(List)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleNullableType', x, DeclarationKind.Class, Order, false)
+                listener: handleIdentifier(List, typeReference)
+                listener: handleNoTypeArguments(?)
+                listener: handleType(List, ?)
+                ensureIdentifierPotentiallyRecovered(?, fieldDeclaration, false)
+                  listener: handleIdentifier(x, fieldDeclaration)
+                parseFieldInitializerOpt(x, x, null, null, null, null, DeclarationKind.Class, Order)
+                  listener: handleNoFieldInitializer(;)
+                listener: endClassFields(null, null, null, null, 1, List, ;)
+              listener: endMember()
+            notEofOrValue(}, int)
+            parseClassOrMixinOrExtensionMemberImpl(;, DeclarationKind.Class, Order)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(int)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleNullableType', y, DeclarationKind.Class, Order, false)
+                listener: handleIdentifier(int, typeReference)
+                listener: handleNoTypeArguments(?)
+                listener: handleType(int, ?)
+                ensureIdentifierPotentiallyRecovered(?, fieldDeclaration, false)
+                  listener: handleIdentifier(y, fieldDeclaration)
+                parseFieldInitializerOpt(y, y, null, null, null, null, DeclarationKind.Class, Order)
+                  listener: handleNoFieldInitializer(;)
+                listener: endClassFields(null, null, null, null, 1, int, ;)
+              listener: endMember()
+            notEofOrValue(}, })
+            listener: endClassOrMixinBody(DeclarationKind.Class, 2, {, })
+          listener: endClassDeclaration(class, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(Order)
+  listener: endCompilationUnit(5, )
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.parser.expect b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.parser.expect
new file mode 100644
index 0000000..6da417a0
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.parser.expect
@@ -0,0 +1,55 @@
+Order method1(Map<String, dynamic> json) {
+return Order()
+..x = json['x'] as List
+..y = json['y'] as int;
+}
+
+Order method2(Map<String, dynamic> json) {
+return Order()
+..x = json['x'] as List?
+..y = json['y'] as int;
+}
+
+Order method3(Map<String, dynamic> json) {
+return Order()
+..x = (json['x'] as List?)
+..y = json['y'] as int;
+}
+
+Order method4(Map<String, dynamic> json) {
+return Order()
+..x = json['x'] as List?;
+}
+
+class Order {
+List? x;
+int? y;
+}
+
+Order[StringToken] method1[StringToken]([BeginToken]Map[StringToken]<[BeginToken]String[StringToken],[SimpleToken] dynamic[KeywordToken]>[SimpleToken] json[StringToken])[SimpleToken] {[BeginToken]
+return[KeywordToken] Order[StringToken]([BeginToken])[SimpleToken]
+..[SimpleToken]x[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'x'[StringToken]][SimpleToken] as[KeywordToken] List[StringToken]
+..[SimpleToken]y[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'y'[StringToken]][SimpleToken] as[KeywordToken] int[StringToken];[SimpleToken]
+}[SimpleToken]
+
+Order[StringToken] method2[StringToken]([BeginToken]Map[StringToken]<[BeginToken]String[StringToken],[SimpleToken] dynamic[KeywordToken]>[SimpleToken] json[StringToken])[SimpleToken] {[BeginToken]
+return[KeywordToken] Order[StringToken]([BeginToken])[SimpleToken]
+..[SimpleToken]x[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'x'[StringToken]][SimpleToken] as[KeywordToken] List[StringToken]?[SimpleToken]
+..[SimpleToken]y[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'y'[StringToken]][SimpleToken] as[KeywordToken] int[StringToken];[SimpleToken]
+}[SimpleToken]
+
+Order[StringToken] method3[StringToken]([BeginToken]Map[StringToken]<[BeginToken]String[StringToken],[SimpleToken] dynamic[KeywordToken]>[SimpleToken] json[StringToken])[SimpleToken] {[BeginToken]
+return[KeywordToken] Order[StringToken]([BeginToken])[SimpleToken]
+..[SimpleToken]x[StringToken] =[SimpleToken] ([BeginToken]json[StringToken][[BeginToken]'x'[StringToken]][SimpleToken] as[KeywordToken] List[StringToken]?[SimpleToken])[SimpleToken]
+..[SimpleToken]y[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'y'[StringToken]][SimpleToken] as[KeywordToken] int[StringToken];[SimpleToken]
+}[SimpleToken]
+
+Order[StringToken] method4[StringToken]([BeginToken]Map[StringToken]<[BeginToken]String[StringToken],[SimpleToken] dynamic[KeywordToken]>[SimpleToken] json[StringToken])[SimpleToken] {[BeginToken]
+return[KeywordToken] Order[StringToken]([BeginToken])[SimpleToken]
+..[SimpleToken]x[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'x'[StringToken]][SimpleToken] as[KeywordToken] List[StringToken]?[SimpleToken];[SimpleToken]
+}[SimpleToken]
+
+class[KeywordToken] Order[StringToken] {[BeginToken]
+List[StringToken]?[SimpleToken] x[StringToken];[SimpleToken]
+int[StringToken]?[SimpleToken] y[StringToken];[SimpleToken]
+}[SimpleToken][SimpleToken]
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.scanner.expect b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.scanner.expect
new file mode 100644
index 0000000..6da417a0
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_42621.dart.scanner.expect
@@ -0,0 +1,55 @@
+Order method1(Map<String, dynamic> json) {
+return Order()
+..x = json['x'] as List
+..y = json['y'] as int;
+}
+
+Order method2(Map<String, dynamic> json) {
+return Order()
+..x = json['x'] as List?
+..y = json['y'] as int;
+}
+
+Order method3(Map<String, dynamic> json) {
+return Order()
+..x = (json['x'] as List?)
+..y = json['y'] as int;
+}
+
+Order method4(Map<String, dynamic> json) {
+return Order()
+..x = json['x'] as List?;
+}
+
+class Order {
+List? x;
+int? y;
+}
+
+Order[StringToken] method1[StringToken]([BeginToken]Map[StringToken]<[BeginToken]String[StringToken],[SimpleToken] dynamic[KeywordToken]>[SimpleToken] json[StringToken])[SimpleToken] {[BeginToken]
+return[KeywordToken] Order[StringToken]([BeginToken])[SimpleToken]
+..[SimpleToken]x[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'x'[StringToken]][SimpleToken] as[KeywordToken] List[StringToken]
+..[SimpleToken]y[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'y'[StringToken]][SimpleToken] as[KeywordToken] int[StringToken];[SimpleToken]
+}[SimpleToken]
+
+Order[StringToken] method2[StringToken]([BeginToken]Map[StringToken]<[BeginToken]String[StringToken],[SimpleToken] dynamic[KeywordToken]>[SimpleToken] json[StringToken])[SimpleToken] {[BeginToken]
+return[KeywordToken] Order[StringToken]([BeginToken])[SimpleToken]
+..[SimpleToken]x[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'x'[StringToken]][SimpleToken] as[KeywordToken] List[StringToken]?[SimpleToken]
+..[SimpleToken]y[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'y'[StringToken]][SimpleToken] as[KeywordToken] int[StringToken];[SimpleToken]
+}[SimpleToken]
+
+Order[StringToken] method3[StringToken]([BeginToken]Map[StringToken]<[BeginToken]String[StringToken],[SimpleToken] dynamic[KeywordToken]>[SimpleToken] json[StringToken])[SimpleToken] {[BeginToken]
+return[KeywordToken] Order[StringToken]([BeginToken])[SimpleToken]
+..[SimpleToken]x[StringToken] =[SimpleToken] ([BeginToken]json[StringToken][[BeginToken]'x'[StringToken]][SimpleToken] as[KeywordToken] List[StringToken]?[SimpleToken])[SimpleToken]
+..[SimpleToken]y[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'y'[StringToken]][SimpleToken] as[KeywordToken] int[StringToken];[SimpleToken]
+}[SimpleToken]
+
+Order[StringToken] method4[StringToken]([BeginToken]Map[StringToken]<[BeginToken]String[StringToken],[SimpleToken] dynamic[KeywordToken]>[SimpleToken] json[StringToken])[SimpleToken] {[BeginToken]
+return[KeywordToken] Order[StringToken]([BeginToken])[SimpleToken]
+..[SimpleToken]x[StringToken] =[SimpleToken] json[StringToken][[BeginToken]'x'[StringToken]][SimpleToken] as[KeywordToken] List[StringToken]?[SimpleToken];[SimpleToken]
+}[SimpleToken]
+
+class[KeywordToken] Order[StringToken] {[BeginToken]
+List[StringToken]?[SimpleToken] x[StringToken];[SimpleToken]
+int[StringToken]?[SimpleToken] y[StringToken];[SimpleToken]
+}[SimpleToken][SimpleToken]
diff --git a/pkg/front_end/parser_testcases/nnbd/late_member.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/late_member.dart.intertwined.expect
index ca211fe..0824b96 100644
--- a/pkg/front_end/parser_testcases/nnbd/late_member.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/late_member.dart.intertwined.expect
@@ -341,7 +341,7 @@
                 listener: beginMetadataStar(late)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, late, DeclarationKind.Class, X, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, late, DeclarationKind.Class, X, false)
                 listener: beginMethod(null, null, null, null, null, late)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -432,13 +432,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleType', late, DeclarationKind.Class, Y, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleType', late, DeclarationKind.Class, Y, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(late)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(late, fieldDeclaration)
-                parseFieldInitializerOpt(late, late, null, null, DeclarationKind.Class, Y)
+                parseFieldInitializerOpt(late, late, null, null, null, null, DeclarationKind.Class, Y)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/nnbd/late_modifier.dart.expect b/pkg/front_end/parser_testcases/nnbd/late_modifier.dart.expect
index 8faa8f7..155bdd0 100644
--- a/pkg/front_end/parser_testcases/nnbd/late_modifier.dart.expect
+++ b/pkg/front_end/parser_testcases/nnbd/late_modifier.dart.expect
@@ -101,7 +101,7 @@
         beginVariablesDeclaration(foo, late, null)
           handleIdentifier(foo, localVariableDeclaration)
           beginInitializedIdentifier(foo)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(foo)
           endInitializedIdentifier(foo)
         endVariablesDeclaration(1, ;)
         handleIdentifier(foo, expression)
diff --git a/pkg/front_end/parser_testcases/nnbd/late_modifier.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/late_modifier.dart.intertwined.expect
index 2fecad0..42ff91b 100644
--- a/pkg/front_end/parser_testcases/nnbd/late_modifier.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/late_modifier.dart.intertwined.expect
@@ -265,7 +265,7 @@
                         listener: handleIdentifier(foo, localVariableDeclaration)
                       listener: beginInitializedIdentifier(foo)
                       parseVariableInitializerOpt(foo)
-                        listener: handleNoVariableInitializer(;)
+                        listener: handleNoVariableInitializer(foo)
                       listener: endInitializedIdentifier(foo)
                     ensureSemicolon(foo)
                     listener: endVariablesDeclaration(1, ;)
@@ -389,7 +389,7 @@
                 listener: beginMetadataStar(late)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, late, DeclarationKind.Class, X, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, late, DeclarationKind.Class, X, false)
                 listener: beginMethod(null, null, null, null, null, late)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -480,13 +480,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleType', late, DeclarationKind.Class, Y, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleType', late, DeclarationKind.Class, Y, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(late)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(late, fieldDeclaration)
-                parseFieldInitializerOpt(late, late, null, null, DeclarationKind.Class, Y)
+                parseFieldInitializerOpt(late, late, null, null, null, null, DeclarationKind.Class, Y)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/nnbd/null_shorting_index.dart.expect b/pkg/front_end/parser_testcases/nnbd/null_shorting_index.dart.expect
index 6774f62..b5fe182 100644
--- a/pkg/front_end/parser_testcases/nnbd/null_shorting_index.dart.expect
+++ b/pkg/front_end/parser_testcases/nnbd/null_shorting_index.dart.expect
@@ -95,7 +95,7 @@
         beginVariablesDeclaration(c1, null, null)
           handleIdentifier(c1, localVariableDeclaration)
           beginInitializedIdentifier(c1)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(c1)
           endInitializedIdentifier(c1)
         endVariablesDeclaration(1, ;)
         handleIdentifier(c1, expression)
diff --git a/pkg/front_end/parser_testcases/nnbd/null_shorting_index.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/null_shorting_index.dart.intertwined.expect
index d6e66a9..2a6ddba 100644
--- a/pkg/front_end/parser_testcases/nnbd/null_shorting_index.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/null_shorting_index.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', null, operator, DeclarationKind.Class, Class1, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', null, operator, DeclarationKind.Class, Class1, false)
                 listener: beginMethod(null, null, null, null, null, operator)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(operator)
@@ -89,7 +89,7 @@
                 listener: beginMetadataStar(void)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod(;, null, null, null, null, null, ;, Instance of 'VoidType', null, operator, DeclarationKind.Class, Class1, false)
+              parseMethod(;, null, null, null, null, null, null, ;, Instance of 'VoidType', null, operator, DeclarationKind.Class, Class1, false)
                 listener: beginMethod(null, null, null, null, null, operator)
                 listener: handleVoidKeyword(void)
                 parseOperatorName(void)
@@ -182,7 +182,7 @@
                       listener: handleIdentifier(c1, localVariableDeclaration)
                     listener: beginInitializedIdentifier(c1)
                     parseVariableInitializerOpt(c1)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(c1)
                     listener: endInitializedIdentifier(c1)
                   ensureSemicolon(c1)
                   listener: endVariablesDeclaration(1, ;)
diff --git a/pkg/front_end/parser_testcases/nnbd/required_member.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/required_member.dart.intertwined.expect
index 993b8d5..d96a3c0 100644
--- a/pkg/front_end/parser_testcases/nnbd/required_member.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/required_member.dart.intertwined.expect
@@ -341,7 +341,7 @@
                 listener: beginMetadataStar(required)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, required, DeclarationKind.Class, X, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, required, DeclarationKind.Class, X, false)
                 listener: beginMethod(null, null, null, null, null, required)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -432,13 +432,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleType', required, DeclarationKind.Class, Y, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleType', required, DeclarationKind.Class, Y, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(required)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(required, fieldDeclaration)
-                parseFieldInitializerOpt(required, required, null, null, DeclarationKind.Class, Y)
+                parseFieldInitializerOpt(required, required, null, null, null, null, DeclarationKind.Class, Y)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/nnbd/required_modifier.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/required_modifier.dart.intertwined.expect
index a8ff973..dce54ab 100644
--- a/pkg/front_end/parser_testcases/nnbd/required_modifier.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/nnbd/required_modifier.dart.intertwined.expect
@@ -357,7 +357,7 @@
                 listener: beginMetadataStar(required)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'NoType', null, required, DeclarationKind.Class, X, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'NoType', null, required, DeclarationKind.Class, X, false)
                 listener: beginMethod(null, null, null, null, null, required)
                 listener: handleNoType({)
                 ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
@@ -448,13 +448,13 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleType', required, DeclarationKind.Class, Y, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleType', required, DeclarationKind.Class, Y, false)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(required)
                 listener: handleType(int, null)
                 ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
                   listener: handleIdentifier(required, fieldDeclaration)
-                parseFieldInitializerOpt(required, required, null, null, DeclarationKind.Class, Y)
+                parseFieldInitializerOpt(required, required, null, null, null, null, DeclarationKind.Class, Y)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_39326.dart.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_39326.dart.expect
index fa50909..1b5dade 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_39326.dart.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_39326.dart.expect
@@ -16,7 +16,7 @@
         beginVariablesDeclaration(c, null, var)
           handleIdentifier(c, localVariableDeclaration)
           beginInitializedIdentifier(c)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(c)
           endInitializedIdentifier(c)
         endVariablesDeclaration(1, ;)
         handleIdentifier(c, expression)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_39326.dart.intertwined.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_39326.dart.intertwined.expect
index 35d43d6..4fc4b624 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_39326.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_39326.dart.intertwined.expect
@@ -41,7 +41,7 @@
                       listener: handleIdentifier(c, localVariableDeclaration)
                     listener: beginInitializedIdentifier(c)
                     parseVariableInitializerOpt(c)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(c)
                     listener: endInitializedIdentifier(c)
                   ensureSemicolon(c)
                   listener: endVariablesDeclaration(1, ;)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional.dart.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional.dart.expect
index b143be7..51ede43 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional.dart.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional.dart.expect
@@ -16,15 +16,15 @@
         beginVariablesDeclaration(a, null, var)
           handleIdentifier(a, localVariableDeclaration)
           beginInitializedIdentifier(a)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(a)
           endInitializedIdentifier(a)
           handleIdentifier(b, localVariableDeclaration)
           beginInitializedIdentifier(b)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(b)
           endInitializedIdentifier(b)
           handleIdentifier(c, localVariableDeclaration)
           beginInitializedIdentifier(c)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(c)
           endInitializedIdentifier(c)
         endVariablesDeclaration(3, ;)
         handleIdentifier(a, expression)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional.dart.intertwined.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional.dart.intertwined.expect
index 6761e0c..caa1810 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional.dart.intertwined.expect
@@ -41,21 +41,21 @@
                       listener: handleIdentifier(a, localVariableDeclaration)
                     listener: beginInitializedIdentifier(a)
                     parseVariableInitializerOpt(a)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(a)
                     listener: endInitializedIdentifier(a)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(b, localVariableDeclaration)
                     listener: beginInitializedIdentifier(b)
                     parseVariableInitializerOpt(b)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(b)
                     listener: endInitializedIdentifier(b)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(c, localVariableDeclaration)
                     listener: beginInitializedIdentifier(c)
                     parseVariableInitializerOpt(c)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(c)
                     listener: endInitializedIdentifier(c)
                   ensureSemicolon(c)
                   listener: endVariablesDeclaration(3, ;)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_2.dart.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_2.dart.expect
index 6acafe8..947256d 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_2.dart.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_2.dart.expect
@@ -16,11 +16,11 @@
         beginVariablesDeclaration(a, null, var)
           handleIdentifier(a, localVariableDeclaration)
           beginInitializedIdentifier(a)
-            handleNoVariableInitializer(,)
+            handleNoVariableInitializer(a)
           endInitializedIdentifier(a)
           handleIdentifier(b, localVariableDeclaration)
           beginInitializedIdentifier(b)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(b)
           endInitializedIdentifier(b)
         endVariablesDeclaration(2, ;)
         beginReturnStatement(return)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_2.dart.intertwined.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_2.dart.intertwined.expect
index a4a13e9..2b95e24 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_2.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_2.dart.intertwined.expect
@@ -41,14 +41,14 @@
                       listener: handleIdentifier(a, localVariableDeclaration)
                     listener: beginInitializedIdentifier(a)
                     parseVariableInitializerOpt(a)
-                      listener: handleNoVariableInitializer(,)
+                      listener: handleNoVariableInitializer(a)
                     listener: endInitializedIdentifier(a)
                   parseOptionallyInitializedIdentifier(,)
                     ensureIdentifier(,, localVariableDeclaration)
                       listener: handleIdentifier(b, localVariableDeclaration)
                     listener: beginInitializedIdentifier(b)
                     parseVariableInitializerOpt(b)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(b)
                     listener: endInitializedIdentifier(b)
                   ensureSemicolon(b)
                   listener: endVariablesDeclaration(2, ;)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_3.dart.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_3.dart.expect
index cad0a56..b24106f 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_3.dart.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_3.dart.expect
@@ -16,7 +16,7 @@
         beginVariablesDeclaration(a, null, var)
           handleIdentifier(a, localVariableDeclaration)
           beginInitializedIdentifier(a)
-            handleNoVariableInitializer(;)
+            handleNoVariableInitializer(a)
           endInitializedIdentifier(a)
         endVariablesDeclaration(1, ;)
         beginReturnStatement(return)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_3.dart.intertwined.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_3.dart.intertwined.expect
index ac9fa6e..ba903a4 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_3.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_3.dart.intertwined.expect
@@ -41,7 +41,7 @@
                       listener: handleIdentifier(a, localVariableDeclaration)
                     listener: beginInitializedIdentifier(a)
                     parseVariableInitializerOpt(a)
-                      listener: handleNoVariableInitializer(;)
+                      listener: handleNoVariableInitializer(a)
                     listener: endInitializedIdentifier(a)
                   ensureSemicolon(a)
                   listener: endVariablesDeclaration(1, ;)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_4.dart.intertwined.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_4.dart.intertwined.expect
index 4ff7912..5f46730 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_4.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_4.dart.intertwined.expect
@@ -8,27 +8,27 @@
       listener: endMetadataStar(0)
     parseTopLevelMemberImpl()
       listener: beginTopLevelMember(var)
-      parseFields(, null, null, null, null, var, var, Instance of 'NoType', a, DeclarationKind.TopLevel, null, false)
+      parseFields(, null, null, null, null, null, var, var, Instance of 'NoType', a, DeclarationKind.TopLevel, null, false)
         listener: handleNoType(var)
         ensureIdentifierPotentiallyRecovered(var, topLevelVariableDeclaration, false)
           listener: handleIdentifier(a, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(a, a, null, var, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(a, a, null, null, null, var, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(,)
         ensureIdentifier(,, topLevelVariableDeclaration)
           listener: handleIdentifier(b, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(b, b, null, var, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(b, b, null, null, null, var, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(,)
         ensureIdentifier(,, topLevelVariableDeclaration)
           listener: handleIdentifier(c, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(c, c, null, var, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(c, c, null, null, null, var, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(,)
         ensureIdentifier(,, topLevelVariableDeclaration)
           listener: handleIdentifier(d, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(d, d, null, var, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(d, d, null, null, null, var, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(,)
         ensureIdentifier(,, topLevelVariableDeclaration)
           listener: handleIdentifier(e, topLevelVariableDeclaration)
-        parseFieldInitializerOpt(e, e, null, var, DeclarationKind.TopLevel, null)
+        parseFieldInitializerOpt(e, e, null, null, null, var, DeclarationKind.TopLevel, null)
           listener: handleNoFieldInitializer(;)
         listener: endTopLevelFields(null, null, null, var, 5, var, ;)
   listener: endTopLevelDeclaration(List)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40288.dart.intertwined.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40288.dart.intertwined.expect
index 223ac8e..4d741e9 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_40288.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40288.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', get, g, DeclarationKind.Class, late, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', get, g, DeclarationKind.Class, late, false)
                 listener: beginMethod(null, null, null, null, get, g)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
@@ -97,7 +97,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', get, g, DeclarationKind.Class, required, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', get, g, DeclarationKind.Class, required, false)
                 listener: beginMethod(null, null, null, null, get, g)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
@@ -162,13 +162,13 @@
                 listener: beginMetadataStar(late)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleType', l, DeclarationKind.Class, C, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleType', l, DeclarationKind.Class, C, false)
                 listener: handleIdentifier(late, typeReference)
                 listener: handleNoTypeArguments(l)
                 listener: handleType(late, null)
                 ensureIdentifierPotentiallyRecovered(late, fieldDeclaration, false)
                   listener: handleIdentifier(l, fieldDeclaration)
-                parseFieldInitializerOpt(l, l, null, null, DeclarationKind.Class, C)
+                parseFieldInitializerOpt(l, l, null, null, null, null, DeclarationKind.Class, C)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -195,13 +195,13 @@
                 listener: beginMetadataStar(required)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.Class, C, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.Class, C, false)
                 listener: handleIdentifier(required, typeReference)
                 listener: handleNoTypeArguments(r)
                 listener: handleType(required, null)
                 ensureIdentifierPotentiallyRecovered(required, fieldDeclaration, false)
                   listener: handleIdentifier(r, fieldDeclaration)
-                parseFieldInitializerOpt(r, r, null, null, DeclarationKind.Class, C)
+                parseFieldInitializerOpt(r, r, null, null, null, null, DeclarationKind.Class, C)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40288_prime.dart.intertwined.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40288_prime.dart.intertwined.expect
index 0d80626..5e5e660 100644
--- a/pkg/front_end/parser_testcases/non-nnbd/issue_40288_prime.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40288_prime.dart.intertwined.expect
@@ -32,7 +32,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', get, g, DeclarationKind.Class, Xlate, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', get, g, DeclarationKind.Class, Xlate, false)
                 listener: beginMethod(null, null, null, null, get, g)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
@@ -97,7 +97,7 @@
                 listener: beginMetadataStar(int)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseMethod({, null, null, null, null, null, {, Instance of 'SimpleType', get, g, DeclarationKind.Class, Xrequired, false)
+              parseMethod({, null, null, null, null, null, null, {, Instance of 'SimpleType', get, g, DeclarationKind.Class, Xrequired, false)
                 listener: beginMethod(null, null, null, null, get, g)
                 listener: handleIdentifier(int, typeReference)
                 listener: handleNoTypeArguments(get)
@@ -162,13 +162,13 @@
                 listener: beginMetadataStar(Xlate)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields({, null, null, null, null, null, {, Instance of 'SimpleType', l, DeclarationKind.Class, C, false)
+              parseFields({, null, null, null, null, null, null, {, Instance of 'SimpleType', l, DeclarationKind.Class, C, false)
                 listener: handleIdentifier(Xlate, typeReference)
                 listener: handleNoTypeArguments(l)
                 listener: handleType(Xlate, null)
                 ensureIdentifierPotentiallyRecovered(Xlate, fieldDeclaration, false)
                   listener: handleIdentifier(l, fieldDeclaration)
-                parseFieldInitializerOpt(l, l, null, null, DeclarationKind.Class, C)
+                parseFieldInitializerOpt(l, l, null, null, null, null, DeclarationKind.Class, C)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
@@ -195,13 +195,13 @@
                 listener: beginMetadataStar(Xrequired)
                 listener: endMetadataStar(0)
               listener: beginMember()
-              parseFields(;, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.Class, C, false)
+              parseFields(;, null, null, null, null, null, null, ;, Instance of 'SimpleType', r, DeclarationKind.Class, C, false)
                 listener: handleIdentifier(Xrequired, typeReference)
                 listener: handleNoTypeArguments(r)
                 listener: handleType(Xrequired, null)
                 ensureIdentifierPotentiallyRecovered(Xrequired, fieldDeclaration, false)
                   listener: handleIdentifier(r, fieldDeclaration)
-                parseFieldInitializerOpt(r, r, null, null, DeclarationKind.Class, C)
+                parseFieldInitializerOpt(r, r, null, null, null, null, DeclarationKind.Class, C)
                   listener: beginFieldInitializer(=)
                   parseExpression(=)
                     parsePrecedenceExpression(=, 1, true)
diff --git a/pkg/front_end/test/crashing_test_case_minimizer.dart b/pkg/front_end/test/crashing_test_case_minimizer.dart
index 8d661f0..c6aca7f 100644
--- a/pkg/front_end/test/crashing_test_case_minimizer.dart
+++ b/pkg/front_end/test/crashing_test_case_minimizer.dart
@@ -20,6 +20,9 @@
 import 'package:front_end/src/api_prototype/compiler_options.dart'
     show CompilerOptions, DiagnosticMessage;
 
+import 'package:front_end/src/api_prototype/experimental_flags.dart'
+    show ExperimentalFlag;
+
 import 'package:front_end/src/api_prototype/file_system.dart'
     show FileSystem, FileSystemEntity, FileSystemException;
 
@@ -56,6 +59,7 @@
 String expectedCrashLine;
 bool byteDelete = false;
 bool askAboutRedirectCrashTarget = false;
+int stackTraceMatches = 1;
 Set<String> askedAboutRedirect = {};
 
 main(List<String> arguments) async {
@@ -85,6 +89,9 @@
         byteDelete = true;
       } else if (arg == "--ask-redirect-target") {
         askAboutRedirectCrashTarget = true;
+      } else if (arg.startsWith("--stack-matches=")) {
+        String stackMatches = arg.substring("--stack-matches=".length);
+        stackTraceMatches = int.parse(stackMatches);
       } else {
         throw "Unknown option $arg";
       }
@@ -487,16 +494,22 @@
     // Find line with #0 in it.
     String eWithSt = "$e\n\n$st";
     List<String> lines = eWithSt.split("\n");
-    String foundLine;
+    String foundLine = "";
+    int lookFor = 0;
     for (String line in lines) {
-      if (line.startsWith("#0")) {
-        foundLine = line;
-        break;
+      if (line.startsWith("#$lookFor")) {
+        foundLine += line;
+        lookFor++;
+        if (lookFor >= stackTraceMatches) {
+          break;
+        } else {
+          foundLine += "\n";
+        }
       }
     }
     if (foundLine == null) throw "Unexpected crash without stacktrace: $e";
     if (expectedCrashLine == null) {
-      print("Got $foundLine");
+      print("Got '$foundLine'");
       expectedCrashLine = foundLine;
       return true;
     } else if (foundLine == expectedCrashLine) {
@@ -536,6 +549,10 @@
 CompilerContext setupCompilerContext() {
   CompilerOptions options = getOptions();
 
+  if (nnbd) {
+    options.experimentalFlags = {ExperimentalFlag.nonNullable: true};
+  }
+
   TargetFlags targetFlags = new TargetFlags(
       enableNullSafety: nnbd, trackWidgetCreation: widgetTransformation);
   Target target;
diff --git a/pkg/front_end/test/fasta/expression_suite.dart b/pkg/front_end/test/fasta/expression_suite.dart
index 7ca9e56..03865e8 100644
--- a/pkg/front_end/test/fasta/expression_suite.dart
+++ b/pkg/front_end/test/fasta/expression_suite.dart
@@ -113,7 +113,9 @@
     if (compiledProcedure == null) {
       buffer.write("<no procedure>");
     } else {
-      new Printer(buffer).visitProcedure(compiledProcedure);
+      Printer printer = new Printer(buffer);
+      printer.visitProcedure(compiledProcedure);
+      printer.writeConstantTable(new Component());
     }
     Uri base = entryPoint.resolve(".");
     return "$buffer".replaceAll("$base", "org-dartlang-testcase:///");
diff --git a/pkg/front_end/test/fasta/parser/literal_entry_info_test.dart b/pkg/front_end/test/fasta/parser/literal_entry_info_test.dart
index 91d645b..1cdea58 100644
--- a/pkg/front_end/test/fasta/parser/literal_entry_info_test.dart
+++ b/pkg/front_end/test/fasta/parser/literal_entry_info_test.dart
@@ -153,7 +153,7 @@
         'beginVariablesDeclaration a var',
         'handleIdentifier a localVariableDeclaration',
         'beginInitializedIdentifier a',
-        'handleNoVariableInitializer in',
+        'handleNoVariableInitializer a',
         'endInitializedIdentifier a',
         'endVariablesDeclaration 1 null',
         'handleForInitializerLocalVariableDeclaration a',
@@ -188,7 +188,7 @@
         'beginVariablesDeclaration x var',
         'handleIdentifier x localVariableDeclaration',
         'beginInitializedIdentifier x',
-        'handleNoVariableInitializer in',
+        'handleNoVariableInitializer x',
         'endInitializedIdentifier x',
         'endVariablesDeclaration 1 null',
         'handleForInitializerLocalVariableDeclaration x',
@@ -250,7 +250,7 @@
         'beginVariablesDeclaration x var',
         'handleIdentifier x localVariableDeclaration',
         'beginInitializedIdentifier x',
-        'handleNoVariableInitializer in',
+        'handleNoVariableInitializer x',
         'endInitializedIdentifier x',
         'endVariablesDeclaration 1 null',
         'handleForInitializerLocalVariableDeclaration x',
@@ -280,7 +280,7 @@
         'beginVariablesDeclaration x var',
         'handleIdentifier x localVariableDeclaration',
         'beginInitializedIdentifier x',
-        'handleNoVariableInitializer in',
+        'handleNoVariableInitializer x',
         'endInitializedIdentifier x',
         'endVariablesDeclaration 1 null',
         'handleForInitializerLocalVariableDeclaration x',
@@ -675,7 +675,7 @@
         'beginVariablesDeclaration x var',
         'handleIdentifier x localVariableDeclaration',
         'beginInitializedIdentifier x',
-        'handleNoVariableInitializer in',
+        'handleNoVariableInitializer x',
         'endInitializedIdentifier x',
         'endVariablesDeclaration 1 null',
         'handleForInitializerLocalVariableDeclaration x',
@@ -706,7 +706,7 @@
         'beginVariablesDeclaration x var',
         'handleIdentifier x localVariableDeclaration',
         'beginInitializedIdentifier x',
-        'handleNoVariableInitializer in',
+        'handleNoVariableInitializer x',
         'endInitializedIdentifier x',
         'endVariablesDeclaration 1 null',
         'handleForInitializerLocalVariableDeclaration x',
diff --git a/pkg/front_end/test/fasta/parser/type_info_test.dart b/pkg/front_end/test/fasta/parser/type_info_test.dart
index 5f473d7..9aeb485 100644
--- a/pkg/front_end/test/fasta/parser/type_info_test.dart
+++ b/pkg/front_end/test/fasta/parser/type_info_test.dart
@@ -680,14 +680,15 @@
 
   void test_computeType_gft() {
     expectComplexInfo('Function() m', expectedAfter: 'm', expectedCalls: [
-      'handleNoTypeVariables (',
       'beginFunctionType Function',
+      'handleNoTypeVariables (',
       'handleNoType ',
       'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
       'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
       'endFunctionType Function null',
     ]);
     expectComplexInfo('Function<T>() m', expectedAfter: 'm', expectedCalls: [
+      'beginFunctionType Function',
       'beginTypeVariables <',
       'beginMetadataStar T',
       'endMetadataStar 0',
@@ -697,15 +698,14 @@
       'handleNoType T',
       'endTypeVariable > 0 null null',
       'endTypeVariables < >',
-      'beginFunctionType Function',
       'handleNoType ',
       'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
       'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
       'endFunctionType Function null',
     ]);
     expectComplexInfo('Function(int) m', expectedAfter: 'm', expectedCalls: [
-      'handleNoTypeVariables (',
       'beginFunctionType Function',
+      'handleNoTypeVariables (',
       'handleNoType ',
       'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
       'beginMetadataStar int',
@@ -722,6 +722,7 @@
       'endFunctionType Function null',
     ]);
     expectComplexInfo('Function<T>(int) m', expectedAfter: 'm', expectedCalls: [
+      'beginFunctionType Function',
       'beginTypeVariables <',
       'beginMetadataStar T',
       'endMetadataStar 0',
@@ -731,7 +732,6 @@
       'handleNoType T',
       'endTypeVariable > 0 null null',
       'endTypeVariables < >',
-      'beginFunctionType Function',
       'handleNoType ',
       'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
       'beginMetadataStar int',
@@ -774,8 +774,8 @@
     expectComplexInfo('C Function(', // Scanner inserts synthetic ')'.
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType C',
+          'handleNoTypeVariables (',
           'handleIdentifier C typeReference',
           'handleNoTypeArguments Function',
           'handleType C null',
@@ -787,8 +787,8 @@
 
   void test_computeType_identifierComplex_questionMark() {
     expectComplexInfo('C? Function()', required: true, expectedCalls: [
-      'handleNoTypeVariables (',
       'beginFunctionType C',
+      'handleNoTypeVariables (',
       'handleIdentifier C typeReference',
       'handleNoTypeArguments ?',
       'handleType C ?',
@@ -800,8 +800,8 @@
 
   void test_computeType_identifierComplex_questionMark2() {
     expectComplexInfo('C Function()?', required: true, expectedCalls: [
-      'handleNoTypeVariables (',
       'beginFunctionType C',
+      'handleNoTypeVariables (',
       'handleIdentifier C typeReference',
       'handleNoTypeArguments Function',
       'handleType C null',
@@ -813,8 +813,8 @@
 
   void test_computeType_identifierComplex_questionMark3() {
     expectComplexInfo('C<T>? Function()', required: true, expectedCalls: [
-      'handleNoTypeVariables (',
       'beginFunctionType C',
+      'handleNoTypeVariables (',
       'handleIdentifier C typeReference',
       'beginTypeArguments <',
       'handleIdentifier T typeReference',
@@ -830,8 +830,8 @@
 
   void test_computeType_identifierComplex_questionMark4() {
     expectComplexInfo('C<S,T>? Function()', required: true, expectedCalls: [
-      'handleNoTypeVariables (',
       'beginFunctionType C',
+      'handleNoTypeVariables (',
       'handleIdentifier C typeReference',
       'beginTypeArguments <',
       'handleIdentifier S typeReference',
@@ -852,10 +852,10 @@
     expectComplexInfo('C Function()? Function()',
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType C',
           'handleNoTypeVariables (',
           'beginFunctionType C',
+          'handleNoTypeVariables (',
           'handleIdentifier C typeReference',
           'handleNoTypeArguments Function',
           'handleType C null',
@@ -872,10 +872,10 @@
     expectComplexInfo('C Function() Function()?',
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType C',
           'handleNoTypeVariables (',
           'beginFunctionType C',
+          'handleNoTypeVariables (',
           'handleIdentifier C typeReference',
           'handleNoTypeArguments Function',
           'handleType C null',
@@ -892,10 +892,10 @@
     expectComplexInfo('C? Function() Function()?',
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType C',
           'handleNoTypeVariables (',
           'beginFunctionType C',
+          'handleNoTypeVariables (',
           'handleIdentifier C typeReference',
           'handleNoTypeArguments ?',
           'handleType C ?',
@@ -912,10 +912,10 @@
     expectComplexInfo('C Function()? Function()?',
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType C',
           'handleNoTypeVariables (',
           'beginFunctionType C',
+          'handleNoTypeVariables (',
           'handleIdentifier C typeReference',
           'handleNoTypeArguments Function',
           'handleType C null',
@@ -932,10 +932,10 @@
     expectComplexInfo('C? Function()? Function()?',
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType C',
           'handleNoTypeVariables (',
           'beginFunctionType C',
+          'handleNoTypeVariables (',
           'handleIdentifier C typeReference',
           'handleNoTypeArguments ?',
           'handleType C ?',
@@ -1176,8 +1176,8 @@
     expectComplexInfo('C<T> Function(', // Scanner inserts synthetic ')'.
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType C',
+          'handleNoTypeVariables (',
           'handleIdentifier C typeReference',
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
@@ -1289,8 +1289,8 @@
     expectComplexInfo('C.a Function(', // Scanner inserts synthetic ')'.
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType C',
+          'handleNoTypeVariables (',
           'handleIdentifier C prefixedTypeReference',
           'handleIdentifier a typeReferenceContinuation',
           'handleQualified .',
@@ -1310,8 +1310,8 @@
     expectComplexInfo('C.a? Function(', // Scanner inserts synthetic ')'.
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType C',
+          'handleNoTypeVariables (',
           'handleIdentifier C prefixedTypeReference',
           'handleIdentifier a typeReferenceContinuation',
           'handleQualified .',
@@ -1370,6 +1370,7 @@
     expectComplexInfo('C.a<T> Function<T>(int x) Function<T>(int x)',
         required: true,
         expectedCalls: [
+          'beginFunctionType C',
           'beginTypeVariables <',
           'beginMetadataStar T',
           'endMetadataStar 0',
@@ -1389,7 +1390,6 @@
           'handleNoType T',
           'endTypeVariable > 0 null null',
           'endTypeVariables < >',
-          'beginFunctionType C',
           'handleIdentifier C prefixedTypeReference',
           'handleIdentifier a typeReferenceContinuation',
           'handleQualified .',
@@ -1432,8 +1432,8 @@
     expectComplexInfo('void Function(', // Scanner inserts synthetic ')'.
         required: true,
         expectedCalls: [
-          'handleNoTypeVariables (',
           'beginFunctionType void',
+          'handleNoTypeVariables (',
           'handleVoidKeyword void',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
@@ -1443,8 +1443,8 @@
 
   void test_computeType_voidComplex() {
     expectComplexInfo('void Function()', required: true, expectedCalls: [
-      'handleNoTypeVariables (',
       'beginFunctionType void',
+      'handleNoTypeVariables (',
       'handleVoidKeyword void',
       'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
       'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
@@ -1700,8 +1700,8 @@
         typeArgumentCount: 1,
         expectedCalls: [
           'beginTypeArguments <',
-          'handleNoTypeVariables (',
           'beginFunctionType S',
+          'handleNoTypeVariables (',
           'handleIdentifier S typeReference',
           'handleNoTypeArguments Function',
           'handleType S null',
@@ -1714,8 +1714,8 @@
         typeArgumentCount: 1,
         expectedCalls: [
           'beginTypeArguments <',
-          'handleNoTypeVariables (',
           'beginFunctionType void',
+          'handleNoTypeVariables (',
           'handleVoidKeyword void',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
@@ -1825,8 +1825,8 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'beginTypeArguments <',
-          'handleNoTypeVariables (',
           'beginFunctionType Function',
+          'handleNoTypeVariables (',
           'handleNoType <',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
@@ -1842,8 +1842,8 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'beginTypeArguments <',
-          'handleNoTypeVariables (',
           'beginFunctionType Function',
+          'handleNoTypeVariables (',
           'handleNoType <',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
@@ -1858,8 +1858,8 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'beginTypeArguments <',
-          'handleNoTypeVariables (',
           'beginFunctionType void', // was 'beginFunctionType Function'
+          'handleNoTypeVariables (',
           'handleVoidKeyword void', // was 'handleNoType <'
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
@@ -1876,8 +1876,8 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'beginTypeArguments <',
-          'handleNoTypeVariables (',
           'beginFunctionType void', // was 'beginFunctionType Function'
+          'handleNoTypeVariables (',
           'handleVoidKeyword void', // was 'handleNoType <'
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
@@ -1897,8 +1897,8 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'beginTypeArguments <',
-          'handleNoTypeVariables (',
           'beginFunctionType void', // was 'beginFunctionType Function'
+          'handleNoTypeVariables (',
           'handleVoidKeyword void', // was 'handleNoType <'
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
@@ -2075,8 +2075,8 @@
           'handleIdentifier S typeVariableDeclaration',
           'beginTypeVariable S',
           'handleTypeVariablesDefined ) 2',
-          'handleNoTypeVariables (',
           'beginFunctionType void',
+          'handleNoTypeVariables (',
           'handleVoidKeyword void',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
@@ -2329,8 +2329,8 @@
           'handleIdentifier T typeVariableDeclaration',
           'beginTypeVariable T',
           'handleTypeVariablesDefined ) 1',
-          'handleNoTypeVariables (',
           'beginFunctionType Function',
+          'handleNoTypeVariables (',
           'handleNoType extends',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'beginMetadataStar T',
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index 4b03080..99af171 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -203,7 +203,7 @@
   final Map<Component, List<Iterable<String>>> componentToDiagnostics =
       <Component, List<Iterable<String>>>{};
   final Uri platformBinaries;
-  final Map<Uri, UriTranslator> _uriTranslators = {};
+  final Map<UriConfiguration, UriTranslator> _uriTranslators = {};
   final Map<Uri, TestOptions> _testOptions = {};
   final Map<Uri, LinkDependenciesOptions> _linkDependencies = {};
   final Map<Uri, Uri> _librariesJson = {};
@@ -364,9 +364,8 @@
 
   Future<UriTranslator> computeUriTranslator(
       TestDescription description) async {
-    Uri librariesSpecificationUri =
-        computeLibrariesSpecificationUri(description);
-    UriTranslator uriTranslator = _uriTranslators[librariesSpecificationUri];
+    UriConfiguration uriConfiguration = computeUriConfiguration(description);
+    UriTranslator uriTranslator = _uriTranslators[uriConfiguration];
     if (uriTranslator == null) {
       Uri sdk = Uri.base.resolve("sdk/");
       Uri packages = Uri.base.resolve(".packages");
@@ -376,7 +375,7 @@
           throw message.plainTextFormatted.join("\n");
         }
         ..sdkRoot = sdk
-        ..packagesFileUri = packages
+        ..packagesFileUri = uriConfiguration.packageConfigUri ?? packages
         ..environmentDefines = {}
         ..experimentalFlags =
             testOptions.computeExperimentalFlags(experimentalFlags)
@@ -385,14 +384,15 @@
             : (testOptions.nnbdAgnosticMode
                 ? NnbdMode.Agnostic
                 : NnbdMode.Strong)
-        ..librariesSpecificationUri = librariesSpecificationUri;
+        ..librariesSpecificationUri =
+            uriConfiguration.librariesSpecificationUri;
       if (testOptions.overwriteCurrentSdkVersion != null) {
         compilerOptions.currentSdkVersion =
             testOptions.overwriteCurrentSdkVersion;
       }
       ProcessedOptions options = new ProcessedOptions(options: compilerOptions);
       uriTranslator = await options.getUriTranslator();
-      _uriTranslators[librariesSpecificationUri] = uriTranslator;
+      _uriTranslators[uriConfiguration] = uriTranslator;
     }
     return uriTranslator;
   }
@@ -431,11 +431,15 @@
             }
             nnbdMode = NnbdMode.Weak;
           } else {
-            File f = new File.fromUri(description.uri.resolve(line));
-            if (!f.existsSync()) {
-              throw new UnsupportedError("No file found: $f ($line)");
+            Uri uri = description.uri.resolve(line);
+            if (uri.scheme != 'package') {
+              File f = new File.fromUri(uri);
+              if (!f.existsSync()) {
+                throw new UnsupportedError("No file found: $f ($line)");
+              }
+              uri = f.uri;
             }
-            content.add(f.uri);
+            content.add(uri);
           }
         }
       }
@@ -461,6 +465,20 @@
     }
   }
 
+  /// Custom package config used for [description].
+  Uri computePackageConfigUri(TestDescription description) {
+    Uri packageConfig =
+        description.uri.resolve(".dart_tool/package_config.json");
+    return new File.fromUri(packageConfig).existsSync() ? packageConfig : null;
+  }
+
+  UriConfiguration computeUriConfiguration(TestDescription description) {
+    Uri librariesSpecificationUri =
+        computeLibrariesSpecificationUri(description);
+    Uri packageConfigUri = computePackageConfigUri(description);
+    return new UriConfiguration(librariesSpecificationUri, packageConfigUri);
+  }
+
   Expectation get verificationError => expectationSet["VerificationError"];
 
   Future ensurePlatformUris() async {
@@ -574,7 +592,7 @@
           if (experimentalFlags[ExperimentalFlag.nonNullable]) {
             args.add("--enable-experiment=non-nullable");
             if (!context.weak) {
-              args.add("--null-safety");
+              args.add("--sound-null-safety");
             }
           }
           args.add(generated.path);
@@ -663,10 +681,28 @@
         if (fullCompile) {
           p = await sourceTarget.buildComponent(verify: context.verify);
         }
+
+        // To avoid possible crash in mixin transformation in the transformation
+        // of the user of this linked dependency we have to transform this too.
+        // We do that now.
+        Target backendTarget = sourceTarget.backendTarget;
+        if (backendTarget is TestVmTarget) {
+          backendTarget.enabled = true;
+        }
+        try {
+          if (sourceTarget.loader.coreTypes != null) {
+            sourceTarget.runBuildTransformations();
+          }
+        } finally {
+          if (backendTarget is TestVmTarget) {
+            backendTarget.enabled = false;
+          }
+        }
+
         linkDependenciesOptions.component = p;
         List<Library> keepLibraries = new List<Library>();
         for (Library lib in p.libraries) {
-          if (linkDependenciesOptions.content.contains(lib.fileUri)) {
+          if (linkDependenciesOptions.content.contains(lib.importUri)) {
             keepLibraries.add(lib);
           }
         }
@@ -678,9 +714,13 @@
     }
 
     return await CompilerContext.runWithOptions(options, (_) async {
+      Component alsoAppend = linkDependenciesOptions.component;
+      if (description.uri.pathSegments.last.endsWith(".no_link.dart")) {
+        alsoAppend = null;
+      }
       KernelTarget sourceTarget = await outlineInitialization(
           context, description, testOptions, <Uri>[description.uri],
-          alsoAppend: linkDependenciesOptions.component);
+          alsoAppend: alsoAppend);
       ValidatingInstrumentation instrumentation =
           new ValidatingInstrumentation();
       await instrumentation.loadExpectations(description.uri);
@@ -896,3 +936,22 @@
         ".hierarchy.expect", "$sb", uri, result);
   }
 }
+
+class UriConfiguration {
+  final Uri librariesSpecificationUri;
+  final Uri packageConfigUri;
+
+  UriConfiguration(this.librariesSpecificationUri, this.packageConfigUri);
+
+  @override
+  int get hashCode =>
+      librariesSpecificationUri.hashCode * 13 + packageConfigUri.hashCode * 17;
+
+  @override
+  bool operator ==(Object other) {
+    if (identical(this, other)) return true;
+    return other is UriConfiguration &&
+        librariesSpecificationUri == other.librariesSpecificationUri &&
+        packageConfigUri == other.packageConfigUri;
+  }
+}
diff --git a/pkg/front_end/test/fasta/type_inference/type_schema_environment_nnbd_test.dart b/pkg/front_end/test/fasta/type_inference/type_schema_environment_nnbd_test.dart
index 168cf74..0d4d9c9 100644
--- a/pkg/front_end/test/fasta/type_inference/type_schema_environment_nnbd_test.dart
+++ b/pkg/front_end/test/fasta/type_inference/type_schema_environment_nnbd_test.dart
@@ -41,6 +41,8 @@
 
   DartType get bottomType => const NeverType(Nullability.nonNullable);
 
+  DartType get topType => coreTypes.objectNullableRawType;
+
   /// Converts the [text] representation of a type into a type.
   ///
   /// If [environment] is passed it's used to resolve the type terms in [text].
@@ -734,7 +736,8 @@
 
     // Upwards inference should refine that to List<List<dynamic>*>*
     env.inferTypeFromConstraints(constraints, [T], inferredTypes, testLib);
-    expect(inferredTypes[0], _list(new DynamicType()));
+    expect(inferredTypes[0],
+        _list(new InterfaceType(objectClass, Nullability.nullable)));
   }
 
   void test_upper_bound_classic() {
@@ -1095,71 +1098,73 @@
     // TODO(dmitryas): Test for various nullabilities.
 
     // Solve(? <: T <: ?) => ?
-    expect(env.solveTypeConstraint(_makeConstraint(), bottomType),
+    expect(env.solveTypeConstraint(_makeConstraint(), topType, bottomType),
         new UnknownType());
 
     // Solve(? <: T <: ?, grounded) => dynamic
     expect(
-        env.solveTypeConstraint(_makeConstraint(), bottomType, grounded: true),
+        env.solveTypeConstraint(_makeConstraint(), topType, bottomType,
+            grounded: true),
         new DynamicType());
 
     // Solve(A <: T <: ?) => A
     expect(
         env.solveTypeConstraint(
-            _makeConstraint(lower: toType("A<dynamic>*")), bottomType),
+            _makeConstraint(lower: toType("A<dynamic>*")), topType, bottomType),
         toType("A<dynamic>*"));
 
     // Solve(A <: T <: ?, grounded) => A
     expect(
         env.solveTypeConstraint(
-            _makeConstraint(lower: toType("A<dynamic>*")), bottomType,
+            _makeConstraint(lower: toType("A<dynamic>*")), topType, bottomType,
             grounded: true),
         toType("A<dynamic>*"));
 
     // Solve(A<?>* <: T <: ?) => A<?>*
     expect(
         env.solveTypeConstraint(
-            _makeConstraint(lower: toType("A<unknown>*")), bottomType),
+            _makeConstraint(lower: toType("A<unknown>*")), topType, bottomType),
         toType("A<unknown>*"));
 
     // Solve(A<?>* <: T <: ?, grounded) => A<Never>*
     expect(
         env.solveTypeConstraint(
-            _makeConstraint(lower: toType("A<unknown>*")), bottomType,
+            _makeConstraint(lower: toType("A<unknown>*")), topType, bottomType,
             grounded: true),
         toType("A<Never>*"));
 
     // Solve(? <: T <: A*) => A*
     expect(
         env.solveTypeConstraint(
-            _makeConstraint(upper: toType("A<dynamic>*")), bottomType),
+            _makeConstraint(upper: toType("A<dynamic>*")), topType, bottomType),
         toType("A<dynamic>*"));
 
     // Solve(? <: T <: A*, grounded) => A*
     expect(
         env.solveTypeConstraint(
-            _makeConstraint(upper: toType("A<dynamic>*")), bottomType,
+            _makeConstraint(upper: toType("A<dynamic>*")), topType, bottomType,
             grounded: true),
         toType("A<dynamic>*"));
 
     // Solve(? <: T <: A<?>*) => A<?>*
     expect(
         env.solveTypeConstraint(
-            _makeConstraint(upper: toType("A<unknown>*")), bottomType),
+            _makeConstraint(upper: toType("A<unknown>*")), topType, bottomType),
         toType("A<unknown>*"));
 
     // Solve(? <: T <: A<?>*, grounded) => A<dynamic>*
     expect(
         env.solveTypeConstraint(
-            _makeConstraint(upper: toType("A<unknown>*")), bottomType,
+            _makeConstraint(upper: toType("A<unknown>*")), topType, bottomType,
             grounded: true),
-        toType("A<dynamic>*"));
+        toType("A<Object?>*"));
 
     // Solve(B* <: T <: A*) => B*
     expect(
         env.solveTypeConstraint(
             _makeConstraint(
                 lower: toType("B<dynamic>*"), upper: toType("A<dynamic>*")),
+            topType,
             bottomType),
         toType("B<dynamic>*"));
 
@@ -1168,6 +1173,7 @@
         env.solveTypeConstraint(
             _makeConstraint(
                 lower: toType("B<dynamic>*"), upper: toType("A<dynamic>*")),
+            topType,
             bottomType,
             grounded: true),
         toType("B<dynamic>*"));
@@ -1177,6 +1183,7 @@
         env.solveTypeConstraint(
             _makeConstraint(
                 lower: toType("B<unknown>*"), upper: toType("A<dynamic>*")),
+            topType,
             bottomType),
         toType("A<dynamic>*"));
 
@@ -1185,6 +1192,7 @@
         env.solveTypeConstraint(
             _makeConstraint(
                 lower: toType("B<unknown>*"), upper: toType("A<dynamic>*")),
+            topType,
             bottomType,
             grounded: true),
         toType("A<dynamic>*"));
@@ -1194,6 +1202,7 @@
         env.solveTypeConstraint(
             _makeConstraint(
                 lower: toType("B<dynamic>*"), upper: toType("A<unknown>*")),
+            topType,
             bottomType),
         toType("B<dynamic>*"));
 
@@ -1202,6 +1211,7 @@
         env.solveTypeConstraint(
             _makeConstraint(
                 lower: toType("B<dynamic>*"), upper: toType("A<unknown>*")),
+            topType,
             bottomType,
             grounded: true),
         toType("B<dynamic>*"));
@@ -1211,6 +1221,7 @@
         env.solveTypeConstraint(
             _makeConstraint(
                 lower: toType("B<unknown>*"), upper: toType("A<unknown>*")),
+            topType,
             bottomType),
         toType("B<unknown>*"));
 
@@ -1219,6 +1230,7 @@
         env.solveTypeConstraint(
             _makeConstraint(
                 lower: toType("B<unknown>*"), upper: toType("A<unknown>*")),
+            topType,
             bottomType,
             grounded: true),
         toType("B<Never>*"));
diff --git a/pkg/front_end/test/fasta/type_inference/type_schema_environment_test.dart b/pkg/front_end/test/fasta/type_inference/type_schema_environment_test.dart
index c1c1468..aedad18 100644
--- a/pkg/front_end/test/fasta/type_inference/type_schema_environment_test.dart
+++ b/pkg/front_end/test/fasta/type_inference/type_schema_environment_test.dart
@@ -60,6 +60,8 @@
 
   DartType get bottomType => nullType;
 
+  DartType get topType => const DynamicType();
+
   void test_addLowerBound() {
     var A = coreTypes.legacyRawType(_addClass(_class('A')));
     var B = coreTypes.legacyRawType(
@@ -636,17 +638,20 @@
         Nullability.legacy);
     var env = _makeEnv();
     // Solve(? <: T <: ?) => ?
-    expect(env.solveTypeConstraint(_makeConstraint(), bottomType),
+    expect(env.solveTypeConstraint(_makeConstraint(), topType, bottomType),
         same(unknownType));
     // Solve(? <: T <: ?, grounded) => dynamic
     expect(
-        env.solveTypeConstraint(_makeConstraint(), bottomType, grounded: true),
+        env.solveTypeConstraint(_makeConstraint(), topType, bottomType,
+            grounded: true),
         dynamicType);
     // Solve(A <: T <: ?) => A
-    expect(env.solveTypeConstraint(_makeConstraint(lower: A), bottomType), A);
+    expect(
+        env.solveTypeConstraint(_makeConstraint(lower: A), topType, bottomType),
+        A);
     // Solve(A <: T <: ?, grounded) => A
     expect(
-        env.solveTypeConstraint(_makeConstraint(lower: A), bottomType,
+        env.solveTypeConstraint(_makeConstraint(lower: A), topType, bottomType,
             grounded: true),
         A);
     // Solve(A<?> <: T <: ?) => A<?>
@@ -655,6 +660,7 @@
             _makeConstraint(
                 lower: new InterfaceType(
                     A.classNode, Nullability.legacy, [unknownType])),
+            topType,
             bottomType),
         new InterfaceType(A.classNode, Nullability.legacy, [unknownType]));
     // Solve(A<?> <: T <: ?, grounded) => A<Null>
@@ -663,14 +669,17 @@
             _makeConstraint(
                 lower: new InterfaceType(
                     A.classNode, Nullability.legacy, [unknownType])),
+            topType,
             bottomType,
             grounded: true),
         new InterfaceType(A.classNode, Nullability.legacy, [nullType]));
     // Solve(? <: T <: A) => A
-    expect(env.solveTypeConstraint(_makeConstraint(upper: A), bottomType), A);
+    expect(
+        env.solveTypeConstraint(_makeConstraint(upper: A), topType, bottomType),
+        A);
     // Solve(? <: T <: A, grounded) => A
     expect(
-        env.solveTypeConstraint(_makeConstraint(upper: A), bottomType,
+        env.solveTypeConstraint(_makeConstraint(upper: A), topType, bottomType,
             grounded: true),
         A);
     // Solve(? <: T <: A<?>) => A<?>
@@ -679,6 +688,7 @@
             _makeConstraint(
                 upper: new InterfaceType(
                     A.classNode, Nullability.legacy, [unknownType])),
+            topType,
             bottomType),
         new InterfaceType(A.classNode, Nullability.legacy, [unknownType]));
     // Solve(? <: T <: A<?>, grounded) => A<dynamic>
@@ -687,17 +697,19 @@
             _makeConstraint(
                 upper: new InterfaceType(
                     A.classNode, Nullability.legacy, [unknownType])),
+            topType,
             bottomType,
             grounded: true),
         new InterfaceType(A.classNode, Nullability.legacy, [dynamicType]));
     // Solve(B <: T <: A) => B
     expect(
         env.solveTypeConstraint(
-            _makeConstraint(lower: B, upper: A), bottomType),
+            _makeConstraint(lower: B, upper: A), topType, bottomType),
         B);
     // Solve(B <: T <: A, grounded) => B
     expect(
-        env.solveTypeConstraint(_makeConstraint(lower: B, upper: A), bottomType,
+        env.solveTypeConstraint(
+            _makeConstraint(lower: B, upper: A), topType, bottomType,
             grounded: true),
         B);
     // Solve(B<?> <: T <: A) => A
@@ -707,6 +719,7 @@
                 lower: new InterfaceType(
                     B.classNode, Nullability.legacy, [unknownType]),
                 upper: A),
+            topType,
             bottomType),
         A);
     // Solve(B<?> <: T <: A, grounded) => A
@@ -716,6 +729,7 @@
                 lower: new InterfaceType(
                     B.classNode, Nullability.legacy, [unknownType]),
                 upper: A),
+            topType,
             bottomType,
             grounded: true),
         A);
@@ -726,6 +740,7 @@
                 lower: B,
                 upper: new InterfaceType(
                     A.classNode, Nullability.legacy, [unknownType])),
+            topType,
             bottomType),
         B);
     // Solve(B <: T <: A<?>, grounded) => B
@@ -735,6 +750,7 @@
                 lower: B,
                 upper: new InterfaceType(
                     A.classNode, Nullability.legacy, [unknownType])),
+            topType,
             bottomType,
             grounded: true),
         B);
@@ -746,6 +762,7 @@
                     B.classNode, Nullability.legacy, [unknownType]),
                 upper: new InterfaceType(
                     A.classNode, Nullability.legacy, [unknownType])),
+            topType,
             bottomType),
         new InterfaceType(B.classNode, Nullability.legacy, [unknownType]));
     // Solve(B<?> <: T <: A<?>) => B<Null>
@@ -756,6 +773,7 @@
                     B.classNode, Nullability.legacy, [unknownType]),
                 upper: new InterfaceType(
                     A.classNode, Nullability.legacy, [unknownType])),
+            topType,
             bottomType,
             grounded: true),
         new InterfaceType(B.classNode, Nullability.legacy, [nullType]));
diff --git a/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart b/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
index ebfcd28..0f771da 100644
--- a/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
+++ b/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
@@ -4,8 +4,6 @@
 
 import "package:kernel/ast.dart" show DartType, Library;
 
-import "package:kernel/core_types.dart" show CoreTypes;
-
 import "package:kernel/target/targets.dart" show NoneTarget, TargetFlags;
 
 import "package:front_end/src/api_prototype/compiler_options.dart"
@@ -55,8 +53,8 @@
 
   @override
   DartType getLegacyLeastUpperBound(
-      DartType a, DartType b, Library clientLibrary, CoreTypes coreTypes) {
-    return hierarchy.getKernelLegacyLeastUpperBound(a, b, clientLibrary);
+      DartType a, DartType b, Library clientLibrary) {
+    return hierarchy.getLegacyLeastUpperBound(a, b, clientLibrary);
   }
 }
 
diff --git a/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart b/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
index 5ffe4df..152d8d6 100644
--- a/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
+++ b/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
@@ -8,8 +8,6 @@
 
 import "package:kernel/class_hierarchy.dart" show ClassHierarchy;
 
-import "package:kernel/core_types.dart" show CoreTypes;
-
 class KernelLegacyUpperBoundTest extends LegacyUpperBoundTest {
   ClassHierarchy hierarchy;
 
@@ -22,8 +20,8 @@
 
   @override
   DartType getLegacyLeastUpperBound(
-      DartType a, DartType b, Library clientLibrary, CoreTypes coreTypes) {
-    return hierarchy.getLegacyLeastUpperBound(a, b, clientLibrary, coreTypes);
+      DartType a, DartType b, Library clientLibrary) {
+    return hierarchy.getLegacyLeastUpperBound(a, b, clientLibrary);
   }
 }
 
diff --git a/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart b/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
index 686768e..d316988 100644
--- a/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
+++ b/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
@@ -50,11 +50,11 @@
   }
 
   DartType getLegacyLeastUpperBound(
-      DartType a, DartType b, Library clientLibrary, CoreTypes coreTypes);
+      DartType a, DartType b, Library clientLibrary);
 
   void checkGetLegacyLeastUpperBound(
       DartType a, DartType b, Library clientLibrary, DartType expected) {
-    DartType actual = getLegacyLeastUpperBound(a, b, clientLibrary, coreTypes);
+    DartType actual = getLegacyLeastUpperBound(a, b, clientLibrary);
     Expect.equals(expected, actual);
   }
 
diff --git a/pkg/front_end/test/hot_reload_e2e_test.dart b/pkg/front_end/test/hot_reload_e2e_test.dart
index d58ec7f..939d3a0 100644
--- a/pkg/front_end/test/hot_reload_e2e_test.dart
+++ b/pkg/front_end/test/hot_reload_e2e_test.dart
@@ -103,6 +103,10 @@
       '--enable-vm-service=0', // Note: use 0 to avoid port collisions.
       '--pause_isolates_on_start',
       '--disable-service-auth-codes',
+      // TODO(bkonyi): The service isolate starts before DartDev has a chance
+      // to spawn DDS. We should suppress the Observatory message until DDS
+      // starts (#42727).
+      '--disable-dart-dev',
       outputUri.toFilePath()
     ];
     vmArgs.add('$reloadCount');
diff --git a/pkg/front_end/test/incremental_compiler_leak_test.dart b/pkg/front_end/test/incremental_compiler_leak_test.dart
index 03f68dd..326c2e2 100644
--- a/pkg/front_end/test/incremental_compiler_leak_test.dart
+++ b/pkg/front_end/test/incremental_compiler_leak_test.dart
@@ -13,6 +13,7 @@
   LeakFinder heapHelper = new LeakFinder();
 
   heapHelper.start([
+    "--disable-dart-dev",
     "--enable-asserts",
     Platform.script.resolve("incremental_dart2js_tester.dart").toString(),
     "--addDebugBreaks",
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 52c9a86..9131713 100644
--- a/pkg/front_end/test/incremental_load_from_dill_suite.dart
+++ b/pkg/front_end/test/incremental_load_from_dill_suite.dart
@@ -26,6 +26,8 @@
 import "package:front_end/src/api_prototype/memory_file_system.dart"
     show MemoryFileSystem;
 
+import 'package:front_end/src/base/nnbd_mode.dart' show NnbdMode;
+
 import 'package:front_end/src/base/processed_options.dart'
     show ProcessedOptions;
 
@@ -112,6 +114,7 @@
   @override
   Future<void> cleanUp(TestDescription description, Result result) async {
     await cleanupHelper?.outDir?.delete(recursive: true);
+    cleanupHelper?.outDir = null;
   }
 
   TestData cleanupHelper;
@@ -328,6 +331,12 @@
   Component component2;
   Component component3;
 
+  String doStringReplacements(String input) {
+    String output = input.replaceAll("%NNBD_VERSION_MARKER%",
+        "${enableNonNullableVersion.major}.${enableNonNullableVersion.minor}");
+    return output;
+  }
+
   Future<Null> newWorldTest(
       TestData data,
       Context context,
@@ -458,6 +467,9 @@
         if (filename == ".packages") {
           packagesUri = uri;
         }
+        if (world["enableStringReplacement"] == true) {
+          data = doStringReplacements(data);
+        }
         fs.entityForUri(uri).writeAsStringSync(data);
       }
       if (world["dotPackagesFile"] != null) {
@@ -481,6 +493,16 @@
                       throw "Error on parsing experiments flags: $e");
           options.experimentalFlags = experimentalFlags;
         }
+        if (world["nnbdMode"] != null) {
+          String nnbdMode = world["nnbdMode"];
+          switch (nnbdMode) {
+            case "strong":
+              options.nnbdMode = NnbdMode.Strong;
+              break;
+            default:
+              throw "Not supported nnbd mode: $nnbdMode";
+          }
+        }
       }
       if (packagesUri != null) {
         options.packagesFileUri = packagesUri;
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/.dart_tool/package_config.json b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/.dart_tool/package_config.json
new file mode 100644
index 0000000..8304b63
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/.dart_tool/package_config.json
@@ -0,0 +1,10 @@
+{
+    "configVersion": 2,
+    "packages": [
+        {
+            "name": "collection",
+            "rootUri": "../foo/",
+            "packageUri": "lib/"
+        }
+    ]
+}
\ No newline at end of file
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/foo/bin/bin_file.dart b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/foo/bin/bin_file.dart
new file mode 100644
index 0000000..80e69b3
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/foo/bin/bin_file.dart
@@ -0,0 +1,10 @@
+// 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.
+
+/*library: 
+ languageVersion=2.8,
+ packageUri=package:collection
+*/
+
+method1() {}
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/foo/lib/foo.dart b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/foo/lib/foo.dart
new file mode 100644
index 0000000..68a5188
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/foo/lib/foo.dart
@@ -0,0 +1,7 @@
+// 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.
+
+/*library: languageVersion=2.8*/
+
+method2() {}
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/foo/test/test_file.dart b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/foo/test/test_file.dart
new file mode 100644
index 0000000..641941e
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/foo/test/test_file.dart
@@ -0,0 +1,10 @@
+// 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.
+
+/*library: 
+ languageVersion=2.8,
+ packageUri=package:collection
+*/
+
+method3() {}
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/main.dart b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/main.dart
new file mode 100644
index 0000000..07a2598
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_json/main.dart
@@ -0,0 +1,15 @@
+// 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.
+
+/*library: languageVersion=2.8*/
+
+import 'foo/bin/bin_file.dart';
+import 'foo/test/test_file.dart';
+import 'package:collection/foo.dart';
+
+main() {
+  method1();
+  method2();
+  method3();
+}
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/.packages b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/.packages
new file mode 100644
index 0000000..00d3dbb
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/.packages
@@ -0,0 +1 @@
+collection:foo/lib/
\ No newline at end of file
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/foo/bin/bin_file.dart b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/foo/bin/bin_file.dart
new file mode 100644
index 0000000..1046332
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/foo/bin/bin_file.dart
@@ -0,0 +1,10 @@
+// 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.
+
+/*library: 
+ languageVersion=2.7,
+ packageUri=package:collection
+*/
+
+method1() {}
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/foo/lib/foo.dart b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/foo/lib/foo.dart
new file mode 100644
index 0000000..e72d3b0
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/foo/lib/foo.dart
@@ -0,0 +1,7 @@
+// 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.
+
+/*library: languageVersion=2.7*/
+
+method2() {}
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/foo/test/test_file.dart b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/foo/test/test_file.dart
new file mode 100644
index 0000000..4c47d9b
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/foo/test/test_file.dart
@@ -0,0 +1,10 @@
+// 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.
+
+/*library: 
+ languageVersion=2.7,
+ packageUri=package:collection
+*/
+
+method3() {}
diff --git a/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/main.dart b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/main.dart
new file mode 100644
index 0000000..cb6feec
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/allowed_experiments_with_packages/main.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.
+
+/*library: languageVersion=2.8*/
+
+import 'foo/bin/bin_file.dart';
+import 'foo/test/test_file.dart';
+import 'package:collection/foo.dart';
+
+main() {}
diff --git a/pkg/front_end/test/language_versioning/data/issue42661a/.dart_tool/package_config.json b/pkg/front_end/test/language_versioning/data/issue42661a/.dart_tool/package_config.json
new file mode 100644
index 0000000..0286844
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/issue42661a/.dart_tool/package_config.json
@@ -0,0 +1,10 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "pack",
+      "rootUri": "../pack/lib/",
+      "languageVersion": "2.7"
+    }
+  ]
+}
\ No newline at end of file
diff --git a/pkg/front_end/test/language_versioning/data/issue42661a/main.dart b/pkg/front_end/test/language_versioning/data/issue42661a/main.dart
new file mode 100644
index 0000000..06c234a
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/issue42661a/main.dart
@@ -0,0 +1,3 @@
+/*library: languageVersion=2.8*/
+
+import 'pack/web/pack.dart';
diff --git a/pkg/front_end/test/language_versioning/data/issue42661a/pack/lib/src/part.dart b/pkg/front_end/test/language_versioning/data/issue42661a/pack/lib/src/part.dart
new file mode 100644
index 0000000..835902f
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/issue42661a/pack/lib/src/part.dart
@@ -0,0 +1 @@
+part of pack;
diff --git a/pkg/front_end/test/language_versioning/data/issue42661a/pack/web/pack.dart b/pkg/front_end/test/language_versioning/data/issue42661a/pack/web/pack.dart
new file mode 100644
index 0000000..68e26be
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/issue42661a/pack/web/pack.dart
@@ -0,0 +1,4 @@
+/*library: languageVersion=2.8*/
+library pack;
+
+part /*error: errors=LanguageVersionMismatchInPart*/ 'package:pack/src/part.dart';
diff --git a/pkg/front_end/test/language_versioning/data/issue42661b/.dart_tool/package_config.json b/pkg/front_end/test/language_versioning/data/issue42661b/.dart_tool/package_config.json
new file mode 100644
index 0000000..00f6b8c
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/issue42661b/.dart_tool/package_config.json
@@ -0,0 +1,11 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "pack",
+      "rootUri": "../",
+      "packageUri": "lib/",
+      "languageVersion": "2.7"
+    }
+  ]
+}
\ No newline at end of file
diff --git a/pkg/front_end/test/language_versioning/data/issue42661b/lib/src/part.dart b/pkg/front_end/test/language_versioning/data/issue42661b/lib/src/part.dart
new file mode 100644
index 0000000..835902f
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/issue42661b/lib/src/part.dart
@@ -0,0 +1 @@
+part of pack;
diff --git a/pkg/front_end/test/language_versioning/data/issue42661b/main.dart b/pkg/front_end/test/language_versioning/data/issue42661b/main.dart
new file mode 100644
index 0000000..bd8fb96
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/issue42661b/main.dart
@@ -0,0 +1,6 @@
+/*library: 
+ languageVersion=2.7,
+ packageUri=package:pack
+*/
+
+import 'web/pack.dart';
diff --git a/pkg/front_end/test/language_versioning/data/issue42661b/web/pack.dart b/pkg/front_end/test/language_versioning/data/issue42661b/web/pack.dart
new file mode 100644
index 0000000..217ed77
--- /dev/null
+++ b/pkg/front_end/test/language_versioning/data/issue42661b/web/pack.dart
@@ -0,0 +1,7 @@
+/*library: 
+ languageVersion=2.7,
+ packageUri=package:pack
+*/
+library pack;
+
+part 'package:pack/src/part.dart';
diff --git a/pkg/front_end/test/lint_suite.dart b/pkg/front_end/test/lint_suite.dart
index 5ae80a7..d047ab7 100644
--- a/pkg/front_end/test/lint_suite.dart
+++ b/pkg/front_end/test/lint_suite.dart
@@ -233,6 +233,7 @@
   }
 
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
diff --git a/pkg/front_end/test/parser_test_listener.dart b/pkg/front_end/test/parser_test_listener.dart
index e0aa818..620cdef 100644
--- a/pkg/front_end/test/parser_test_listener.dart
+++ b/pkg/front_end/test/parser_test_listener.dart
@@ -520,6 +520,7 @@
   }
 
   void endClassFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -529,6 +530,7 @@
       Token beginToken,
       Token endToken) {
     indent--;
+    seen(abstractToken);
     seen(staticToken);
     seen(covariantToken);
     seen(lateToken);
@@ -546,6 +548,7 @@
   }
 
   void endMixinFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -555,6 +558,7 @@
       Token beginToken,
       Token endToken) {
     indent--;
+    seen(abstractToken);
     seen(staticToken);
     seen(covariantToken);
     seen(lateToken);
@@ -572,6 +576,7 @@
   }
 
   void endExtensionFields(
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
diff --git a/pkg/front_end/test/parser_test_parser.dart b/pkg/front_end/test/parser_test_parser.dart
index a0499fb..8033a37 100644
--- a/pkg/front_end/test/parser_test_parser.dart
+++ b/pkg/front_end/test/parser_test_parser.dart
@@ -694,6 +694,7 @@
 
   Token parseFields(
       Token beforeStart,
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -707,6 +708,7 @@
       bool nameIsRecovered) {
     doPrint('parseFields('
         '$beforeStart, '
+        '$abstractToken, '
         '$externalToken, '
         '$staticToken, '
         '$covariantToken, '
@@ -721,6 +723,7 @@
     indent++;
     var result = super.parseFields(
         beforeStart,
+        abstractToken,
         externalToken,
         staticToken,
         covariantToken,
@@ -771,6 +774,7 @@
       Token token,
       Token name,
       Token lateToken,
+      Token abstractToken,
       Token externalToken,
       Token varFinalOrConst,
       DeclarationKind kind,
@@ -779,12 +783,21 @@
         '$token, '
         '$name, '
         '$lateToken, '
+        '$abstractToken, '
+        '$externalToken, '
         '$varFinalOrConst, '
         '$kind, '
         '$enclosingDeclarationName)');
     indent++;
-    var result = super.parseFieldInitializerOpt(token, name, lateToken,
-        externalToken, varFinalOrConst, kind, enclosingDeclarationName);
+    var result = super.parseFieldInitializerOpt(
+        token,
+        name,
+        lateToken,
+        abstractToken,
+        externalToken,
+        varFinalOrConst,
+        kind,
+        enclosingDeclarationName);
     indent--;
     return result;
   }
@@ -1004,6 +1017,7 @@
 
   Token parseMethod(
       Token beforeStart,
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -1018,6 +1032,7 @@
       bool nameIsRecovered) {
     doPrint('parseMethod('
         '$beforeStart, '
+        '$abstractToken, '
         '$externalToken, '
         '$staticToken, '
         '$covariantToken, '
@@ -1033,6 +1048,7 @@
     indent++;
     var result = super.parseMethod(
         beforeStart,
+        abstractToken,
         externalToken,
         staticToken,
         covariantToken,
@@ -1948,6 +1964,7 @@
 
   Token parseInvalidOperatorDeclaration(
       Token beforeStart,
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -1958,6 +1975,7 @@
       String enclosingDeclarationName) {
     doPrint('parseInvalidOperatorDeclaration('
         '$beforeStart, '
+        '$abstractToken, '
         '$externalToken, '
         '$staticToken, '
         '$covariantToken, '
@@ -1969,6 +1987,7 @@
     indent++;
     var result = super.parseInvalidOperatorDeclaration(
         beforeStart,
+        abstractToken,
         externalToken,
         staticToken,
         covariantToken,
@@ -1984,6 +2003,7 @@
   Token recoverFromInvalidMember(
       Token token,
       Token beforeStart,
+      Token abstractToken,
       Token externalToken,
       Token staticToken,
       Token covariantToken,
@@ -1997,6 +2017,7 @@
     doPrint('recoverFromInvalidMember('
         '$token, '
         '$beforeStart, '
+        '$abstractToken, '
         '$externalToken, '
         '$staticToken, '
         '$covariantToken, '
@@ -2011,6 +2032,7 @@
     var result = super.recoverFromInvalidMember(
         token,
         beforeStart,
+        abstractToken,
         externalToken,
         staticToken,
         covariantToken,
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 0dba39a..a29800c 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -154,6 +154,7 @@
 cast
 casted
 casts
+ce
 cfe
 ch
 channel
@@ -167,6 +168,7 @@
 cl
 claim
 claimed
+clamp
 clarification
 clashes
 class's
@@ -184,6 +186,7 @@
 class6b
 clazz
 cli
+clil
 clock
 cls
 cn
@@ -404,6 +407,7 @@
 field1a
 field1b
 field2
+fieldformal
 file's
 filenames
 finv
@@ -432,6 +436,7 @@
 frontends
 fs
 fsource
+fue
 fuller
 function's
 fuse
@@ -453,6 +458,7 @@
 globally
 glyph
 gn
+goldens
 googlesource
 goto
 gotos
@@ -493,6 +499,7 @@
 i
 i'll
 i2b
+ic
 id
 identifies
 identifying
@@ -577,6 +584,8 @@
 lattice
 layer
 layout
+lc
+ld
 leafp
 len
 lets
@@ -593,6 +602,7 @@
 linebreak
 linter
 lives
+ll
 llub
 lm
 locationd
@@ -622,6 +632,7 @@
 master
 matcher
 mb
+mc
 md
 me
 merely
@@ -679,6 +690,7 @@
 namer
 natively
 nbsp
+nc
 ncs
 ncurses
 nd
@@ -742,6 +754,7 @@
 outputting
 overlap
 overloader
+overlooked
 overshadowed
 overwrite
 overwriting
@@ -1041,6 +1054,7 @@
 substed
 substitutes
 substitutor
+suggests
 sum
 summarizing
 superclasses
@@ -1130,6 +1144,9 @@
 tuple2
 tuple3
 tuple4
+tuple5
+tuple6
+tuple7
 type1
 type2
 typeref
@@ -1184,6 +1201,7 @@
 unreachable
 unseen
 unshadowed
+unwrapper
 unwraps
 unzip
 upcast
@@ -1210,6 +1228,7 @@
 vb
 vector
 vegorov
+verbosity
 versa
 vice
 violated
diff --git a/pkg/front_end/test/spell_checking_list_common.txt b/pkg/front_end/test/spell_checking_list_common.txt
index 2812378..0850a28 100644
--- a/pkg/front_end/test/spell_checking_list_common.txt
+++ b/pkg/front_end/test/spell_checking_list_common.txt
@@ -1083,8 +1083,8 @@
 experimentally
 experiments
 expired
-explanation
 explain
+explanation
 explicit
 explicitly
 exponent
@@ -1152,6 +1152,7 @@
 field's
 fieldname
 fields
+fifth
 figure
 file
 filename
@@ -1910,6 +1911,7 @@
 nearest
 necessarily
 necessary
+necessity
 need
 needed
 needing
@@ -2642,6 +2644,7 @@
 settings
 settled
 setup
+seventh
 several
 severity
 shadow
@@ -2700,6 +2703,7 @@
 sites
 situation
 situations
+sixth
 skip
 skipped
 skipping
diff --git a/pkg/front_end/test/spell_checking_list_messages.txt b/pkg/front_end/test/spell_checking_list_messages.txt
index 0a521d2..3b3a9ce 100644
--- a/pkg/front_end/test/spell_checking_list_messages.txt
+++ b/pkg/front_end/test/spell_checking_list_messages.txt
@@ -45,6 +45,7 @@
 o
 opt
 opts
+outdated
 part(s)
 patch(es)
 pubspec.yaml
diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt
index e62b6c1..cad7625 100644
--- a/pkg/front_end/test/spell_checking_list_tests.txt
+++ b/pkg/front_end/test/spell_checking_list_tests.txt
@@ -26,6 +26,7 @@
 alt
 amortized
 analyses
+animal
 anon
 aoo
 approval
@@ -56,6 +57,7 @@
 besides
 beta
 bigger
+bkonyi
 blah
 blindly
 blocked
@@ -83,6 +85,7 @@
 ccc
 charcode
 charset
+checkme
 checkout
 cipd
 circular
@@ -118,6 +121,7 @@
 cov
 crashes
 cumulative
+cx
 dacoharkes
 dadd
 daemon
@@ -128,6 +132,7 @@
 dashes
 day
 db
+dds
 debugger
 decrease
 decrements
@@ -160,6 +165,7 @@
 dispatcher
 dispose
 dist
+divergent
 doctype
 doesnt
 dog
@@ -204,6 +210,7 @@
 falling
 favors
 fetched
+fi
 fibonacci
 filesystem
 filler
@@ -241,6 +248,7 @@
 fulfill
 func
 futures
+fx
 gallery
 gamma
 gave
@@ -326,6 +334,7 @@
 lc
 ld
 le
+legs
 lengths
 lightly
 likewise
@@ -383,9 +392,11 @@
 misspelled
 mistake
 mistakes
+mod
 modelled
 month
 moo
+mul
 mx
 mysdk
 naturally
@@ -409,6 +420,7 @@
 oracle
 outbound
 overlay
+pack
 party
 pause
 paused
@@ -444,6 +456,8 @@
 py
 python
 quot
+quux
+qux
 r"
 r"\s
 r"k
@@ -497,6 +511,7 @@
 smoke
 somehow
 spans
+spawn
 spell
 spellcheck
 spelled
@@ -538,6 +553,8 @@
 tails
 talk
 templates
+test3a
+test3b
 thereof
 thing
 threw
@@ -586,6 +603,7 @@
 walt
 warmup
 wherever
+whiskers
 wins
 workflow
 worlds
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 787ad07..d449d21 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
@@ -644,11 +644,59 @@
 0 != 1''');
 }
 
-void _testBinaryExpression() {}
+void _testBinaryExpression() {
+  testExpression(
+      new BinaryExpression(new IntLiteral(0), new Name('+'), new IntLiteral(1)),
+      '''
+0 + 1''');
+  testExpression(
+      new BinaryExpression(
+          new BinaryExpression(
+              new IntLiteral(0), new Name('-'), new IntLiteral(1)),
+          new Name('+'),
+          new BinaryExpression(
+              new IntLiteral(2), new Name('-'), new IntLiteral(3))),
+      '''
+0 - 1 + 2 - 3''');
+  testExpression(
+      new BinaryExpression(
+          new BinaryExpression(
+              new IntLiteral(0), new Name('*'), new IntLiteral(1)),
+          new Name('+'),
+          new BinaryExpression(
+              new IntLiteral(2), new Name('/'), new IntLiteral(3))),
+      '''
+0 * 1 + 2 / 3''');
+  testExpression(
+      new BinaryExpression(
+          new BinaryExpression(
+              new IntLiteral(0), new Name('+'), new IntLiteral(1)),
+          new Name('*'),
+          new BinaryExpression(
+              new IntLiteral(2), new Name('-'), new IntLiteral(3))),
+      '''
+(0 + 1) * (2 - 3)''');
+}
 
-void _testUnaryExpression() {}
+void _testUnaryExpression() {
+  testExpression(new UnaryExpression(new Name('unary-'), new IntLiteral(0)), '''
+-0''');
+  testExpression(new UnaryExpression(new Name('~'), new IntLiteral(0)), '''
+~0''');
 
-void _testParenthesizedExpression() {}
+  testExpression(
+      new UnaryExpression(
+          new Name('unary-'),
+          new BinaryExpression(
+              new IntLiteral(0), new Name('+'), new IntLiteral(1))),
+      '''
+-(0 + 1)''');
+}
+
+void _testParenthesizedExpression() {
+  testExpression(new ParenthesizedExpression(new IntLiteral(0)), '''
+(0)''');
+}
 
 void _testSpreadElement() {
   testExpression(new SpreadElement(new IntLiteral(0), false), '''
diff --git a/pkg/front_end/test/utils/kernel_chain.dart b/pkg/front_end/test/utils/kernel_chain.dart
index bf5e04b..9e0988a 100644
--- a/pkg/front_end/test/utils/kernel_chain.dart
+++ b/pkg/front_end/test/utils/kernel_chain.dart
@@ -362,6 +362,7 @@
           });
     return await CompilerContext.runWithOptions(options,
         (compilerContext) async {
+      component.computeCanonicalNames();
       compilerContext.uriToSource.addAll(component.uriToSource);
       TextSerializationVerifier verifier =
           new TextSerializationVerifier(root: component.root);
diff --git a/pkg/front_end/testcases/expression/const_usage.expression.yaml b/pkg/front_end/testcases/expression/const_usage.expression.yaml
new file mode 100644
index 0000000..b017b26
--- /dev/null
+++ b/pkg/front_end/testcases/expression/const_usage.expression.yaml
@@ -0,0 +1,9 @@
+# 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.
+
+entry_point: "main.dart"
+definitions: []
+position: "main.dart"
+expression: |
+  const42.x
diff --git a/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect b/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect
new file mode 100644
index 0000000..1d2b890
--- /dev/null
+++ b/pkg/front_end/testcases/expression/const_usage.expression.yaml.expect
@@ -0,0 +1,8 @@
+Errors: {
+}
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
+  return (#C2).{main::ConstClass::x};
+constants  {
+  #C1 = 42
+  #C2 = main::ConstClass {x:#C1}
+}
diff --git a/pkg/front_end/testcases/expression/const_usage_class.expression.yaml b/pkg/front_end/testcases/expression/const_usage_class.expression.yaml
new file mode 100644
index 0000000..9425ebb
--- /dev/null
+++ b/pkg/front_end/testcases/expression/const_usage_class.expression.yaml
@@ -0,0 +1,9 @@
+# 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.
+
+entry_point: "main.dart"
+definitions: []
+position: "main.dart#ConstClass"
+expression: |
+  classConst42.x
diff --git a/pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect b/pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect
new file mode 100644
index 0000000..1d2b890
--- /dev/null
+++ b/pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect
@@ -0,0 +1,8 @@
+Errors: {
+}
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
+  return (#C2).{main::ConstClass::x};
+constants  {
+  #C1 = 42
+  #C2 = main::ConstClass {x:#C1}
+}
diff --git a/pkg/front_end/testcases/expression/lib_ctor.expression.yaml.expect b/pkg/front_end/testcases/expression/lib_ctor.expression.yaml.expect
index dc61171..45805ec 100644
--- a/pkg/front_end/testcases/expression/lib_ctor.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/lib_ctor.expression.yaml.expect
@@ -3,5 +3,9 @@
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
   return () → dart.core::Null? {
     new main::A::•<dynamic>();
-    const main::A::•<dynamic>();
+    #C2;
   };
+constants  {
+  #C1 = 0
+  #C2 = main::A<dynamic> {_priv:#C1}
+}
diff --git a/pkg/front_end/testcases/expression/main.dart b/pkg/front_end/testcases/expression/main.dart
index bdf80a9..e38cbea 100644
--- a/pkg/front_end/testcases/expression/main.dart
+++ b/pkg/front_end/testcases/expression/main.dart
@@ -14,6 +14,14 @@
 int globalVar = 6;
 int _globalPrivate = 7;
 
+const ConstClass const42 = ConstClass(42);
+
+class ConstClass {
+  static const ConstClass classConst42 = ConstClass(42);
+  final int x;
+  const ConstClass(this.x);
+}
+
 class A<T> {
   const A();
   static int doit(int x) => x + 1;
diff --git a/pkg/front_end/testcases/extensions/extension_setter.dart.strong.expect b/pkg/front_end/testcases/extensions/extension_setter.dart.strong.expect
index 686d8d2..8e500e2 100644
--- a/pkg/front_end/testcases/extensions/extension_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/extensions/extension_setter.dart.strong.expect
@@ -91,7 +91,7 @@
   self::expect(2, #this.{self::Class::field});
   self::expect(3, let final core::int* #t5 = 3 in let final void #t6 = self::Extension|set#setterWithReturn(#this, #t5) in #t5);
   self::expect(3, #this.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final core::int #t7 = 4.{core::int::unary-}() in let final void #t8 = self::Extension|set#setterWithReturn(#this, #t7) in #t7);
+  self::expect(4.{core::int::unary-}(), let final core::int* #t7 = 4.{core::int::unary-}() in let final void #t8 = self::Extension|set#setterWithReturn(#this, #t7) in #t7);
   self::expect(4, #this.{self::Class::field});
   self::Extension|set#setterWithClosure(#this, 1);
   self::expect(1, #this.{self::Class::field});
@@ -99,7 +99,7 @@
   self::expect(2, #this.{self::Class::field});
   self::expect(3, let final core::int* #t9 = 3 in let final void #t10 = self::Extension|set#setterWithClosure(#this, #t9) in #t9);
   self::expect(3, #this.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final core::int #t11 = 4.{core::int::unary-}() in let final void #t12 = self::Extension|set#setterWithClosure(#this, #t11) in #t11);
+  self::expect(4.{core::int::unary-}(), let final core::int* #t11 = 4.{core::int::unary-}() in let final void #t12 = self::Extension|set#setterWithClosure(#this, #t11) in #t11);
   self::expect(4, #this.{self::Class::field});
 }
 static method Extension|get#testInternal(final self::Class* #this) → () →* dynamic
@@ -128,7 +128,7 @@
   self::expect(2, c.{self::Class::field});
   self::expect(3, let final core::int* #t23 = 3 in let final void #t24 = self::Extension|set#setterWithReturn(c, #t23) in #t23);
   self::expect(3, c.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final core::int #t25 = 4.{core::int::unary-}() in let final void #t26 = self::Extension|set#setterWithReturn(c, #t25) in #t25);
+  self::expect(4.{core::int::unary-}(), let final core::int* #t25 = 4.{core::int::unary-}() in let final void #t26 = self::Extension|set#setterWithReturn(c, #t25) in #t25);
   self::expect(4, c.{self::Class::field});
   self::Extension|set#setterWithReturn(c, 5);
   self::expect(5, c.{self::Class::field});
@@ -136,7 +136,7 @@
   self::expect(6, c.{self::Class::field});
   self::expect(7, let final self::Class* #t27 = c in let final core::int* #t28 = 7 in let final void #t29 = self::Extension|set#setterWithReturn(#t27, #t28) in #t28);
   self::expect(7, c.{self::Class::field});
-  self::expect(8.{core::int::unary-}(), let final self::Class* #t30 = c in let final core::int #t31 = 8.{core::int::unary-}() in let final void #t32 = self::Extension|set#setterWithReturn(#t30, #t31) in #t31);
+  self::expect(8.{core::int::unary-}(), let final self::Class* #t30 = c in let final core::int* #t31 = 8.{core::int::unary-}() in let final void #t32 = self::Extension|set#setterWithReturn(#t30, #t31) in #t31);
   self::expect(8, c.{self::Class::field});
   self::Extension|set#setterWithClosure(c, 1);
   self::expect(1, c.{self::Class::field});
@@ -144,7 +144,7 @@
   self::expect(2, c.{self::Class::field});
   self::expect(3, let final core::int* #t33 = 3 in let final void #t34 = self::Extension|set#setterWithClosure(c, #t33) in #t33);
   self::expect(3, c.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final core::int #t35 = 4.{core::int::unary-}() in let final void #t36 = self::Extension|set#setterWithClosure(c, #t35) in #t35);
+  self::expect(4.{core::int::unary-}(), let final core::int* #t35 = 4.{core::int::unary-}() in let final void #t36 = self::Extension|set#setterWithClosure(c, #t35) in #t35);
   self::expect(4, c.{self::Class::field});
   self::Extension|set#setterWithClosure(c, 5);
   self::expect(5, c.{self::Class::field});
@@ -152,7 +152,7 @@
   self::expect(6, c.{self::Class::field});
   self::expect(7, let final self::Class* #t37 = c in let final core::int* #t38 = 7 in let final void #t39 = self::Extension|set#setterWithClosure(#t37, #t38) in #t38);
   self::expect(7, c.{self::Class::field});
-  self::expect(8.{core::int::unary-}(), let final self::Class* #t40 = c in let final core::int #t41 = 8.{core::int::unary-}() in let final void #t42 = self::Extension|set#setterWithClosure(#t40, #t41) in #t41);
+  self::expect(8.{core::int::unary-}(), let final self::Class* #t40 = c in let final core::int* #t41 = 8.{core::int::unary-}() in let final void #t42 = self::Extension|set#setterWithClosure(#t40, #t41) in #t41);
   self::expect(8, c.{self::Class::field});
   self::Extension|set#simpleSetter(c, 0);
   self::expect(0, let final self::Class* #t43 = c in #t43.{self::Class::==}(null) ?{core::int*} null : #t43.{self::Class::field});
@@ -174,7 +174,7 @@
   self::expect(2, let final self::Class* #t64 = c in #t64.{self::Class::==}(null) ?{core::int*} null : #t64.{self::Class::field});
   self::expect(3, let final self::Class* #t65 = c in #t65.{self::Class::==}(null) ?{core::int*} null : let final core::int* #t66 = 3 in let final void #t67 = self::Extension|set#setterWithReturn(#t65, #t66) in #t66);
   self::expect(3, let final self::Class* #t68 = c in #t68.{self::Class::==}(null) ?{core::int*} null : #t68.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final self::Class* #t69 = c in #t69.{self::Class::==}(null) ?{core::int*} null : let final core::int #t70 = 4.{core::int::unary-}() in let final void #t71 = self::Extension|set#setterWithReturn(#t69, #t70) in #t70);
+  self::expect(4.{core::int::unary-}(), let final self::Class* #t69 = c in #t69.{self::Class::==}(null) ?{core::int*} null : let final core::int* #t70 = 4.{core::int::unary-}() in let final void #t71 = self::Extension|set#setterWithReturn(#t69, #t70) in #t70);
   self::expect(4, let final self::Class* #t72 = c in #t72.{self::Class::==}(null) ?{core::int*} null : #t72.{self::Class::field});
   self::Extension|set#setterWithReturn(c, 5);
   self::expect(5, let final self::Class* #t73 = c in #t73.{self::Class::==}(null) ?{core::int*} null : #t73.{self::Class::field});
@@ -182,7 +182,7 @@
   self::expect(6, let final self::Class* #t74 = c in #t74.{self::Class::==}(null) ?{core::int*} null : #t74.{self::Class::field});
   self::expect(7, let final self::Class* #t75 = c in let final core::int* #t76 = 7 in let final void #t77 = self::Extension|set#setterWithReturn(#t75, #t76) in #t76);
   self::expect(7, let final self::Class* #t78 = c in #t78.{self::Class::==}(null) ?{core::int*} null : #t78.{self::Class::field});
-  self::expect(8.{core::int::unary-}(), let final self::Class* #t79 = c in let final core::int #t80 = 8.{core::int::unary-}() in let final void #t81 = self::Extension|set#setterWithReturn(#t79, #t80) in #t80);
+  self::expect(8.{core::int::unary-}(), let final self::Class* #t79 = c in let final core::int* #t80 = 8.{core::int::unary-}() in let final void #t81 = self::Extension|set#setterWithReturn(#t79, #t80) in #t80);
   self::expect(8, let final self::Class* #t82 = c in #t82.{self::Class::==}(null) ?{core::int*} null : #t82.{self::Class::field});
   let final self::Class* #t83 = c in #t83.{self::Class::==}(null) ?{core::int*} null : self::Extension|set#setterWithClosure(#t83, 1);
   self::expect(1, let final self::Class* #t84 = c in #t84.{self::Class::==}(null) ?{core::int*} null : #t84.{self::Class::field});
@@ -190,7 +190,7 @@
   self::expect(2, let final self::Class* #t86 = c in #t86.{self::Class::==}(null) ?{core::int*} null : #t86.{self::Class::field});
   self::expect(3, let final self::Class* #t87 = c in #t87.{self::Class::==}(null) ?{core::int*} null : let final core::int* #t88 = 3 in let final void #t89 = self::Extension|set#setterWithClosure(#t87, #t88) in #t88);
   self::expect(3, let final self::Class* #t90 = c in #t90.{self::Class::==}(null) ?{core::int*} null : #t90.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final self::Class* #t91 = c in #t91.{self::Class::==}(null) ?{core::int*} null : let final core::int #t92 = 4.{core::int::unary-}() in let final void #t93 = self::Extension|set#setterWithClosure(#t91, #t92) in #t92);
+  self::expect(4.{core::int::unary-}(), let final self::Class* #t91 = c in #t91.{self::Class::==}(null) ?{core::int*} null : let final core::int* #t92 = 4.{core::int::unary-}() in let final void #t93 = self::Extension|set#setterWithClosure(#t91, #t92) in #t92);
   self::expect(4, let final self::Class* #t94 = c in #t94.{self::Class::==}(null) ?{core::int*} null : #t94.{self::Class::field});
   self::Extension|set#setterWithClosure(c, 5);
   self::expect(5, let final self::Class* #t95 = c in #t95.{self::Class::==}(null) ?{core::int*} null : #t95.{self::Class::field});
@@ -198,7 +198,7 @@
   self::expect(6, let final self::Class* #t96 = c in #t96.{self::Class::==}(null) ?{core::int*} null : #t96.{self::Class::field});
   self::expect(7, let final self::Class* #t97 = c in let final core::int* #t98 = 7 in let final void #t99 = self::Extension|set#setterWithClosure(#t97, #t98) in #t98);
   self::expect(7, let final self::Class* #t100 = c in #t100.{self::Class::==}(null) ?{core::int*} null : #t100.{self::Class::field});
-  self::expect(8.{core::int::unary-}(), let final self::Class* #t101 = c in let final core::int #t102 = 8.{core::int::unary-}() in let final void #t103 = self::Extension|set#setterWithClosure(#t101, #t102) in #t102);
+  self::expect(8.{core::int::unary-}(), let final self::Class* #t101 = c in let final core::int* #t102 = 8.{core::int::unary-}() in let final void #t103 = self::Extension|set#setterWithClosure(#t101, #t102) in #t102);
   self::expect(8, let final self::Class* #t104 = c in #t104.{self::Class::==}(null) ?{core::int*} null : #t104.{self::Class::field});
   c.{self::Class::field} = null;
   let final self::Class* #t105 = c in self::Extension|get#simpleSetter(#t105).{core::num::==}(null) ?{core::int*} self::Extension|set#simpleSetter(#t105, 1) : null;
diff --git a/pkg/front_end/testcases/extensions/extension_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/extensions/extension_setter.dart.strong.transformed.expect
index 686d8d2..8e500e2 100644
--- a/pkg/front_end/testcases/extensions/extension_setter.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/extensions/extension_setter.dart.strong.transformed.expect
@@ -91,7 +91,7 @@
   self::expect(2, #this.{self::Class::field});
   self::expect(3, let final core::int* #t5 = 3 in let final void #t6 = self::Extension|set#setterWithReturn(#this, #t5) in #t5);
   self::expect(3, #this.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final core::int #t7 = 4.{core::int::unary-}() in let final void #t8 = self::Extension|set#setterWithReturn(#this, #t7) in #t7);
+  self::expect(4.{core::int::unary-}(), let final core::int* #t7 = 4.{core::int::unary-}() in let final void #t8 = self::Extension|set#setterWithReturn(#this, #t7) in #t7);
   self::expect(4, #this.{self::Class::field});
   self::Extension|set#setterWithClosure(#this, 1);
   self::expect(1, #this.{self::Class::field});
@@ -99,7 +99,7 @@
   self::expect(2, #this.{self::Class::field});
   self::expect(3, let final core::int* #t9 = 3 in let final void #t10 = self::Extension|set#setterWithClosure(#this, #t9) in #t9);
   self::expect(3, #this.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final core::int #t11 = 4.{core::int::unary-}() in let final void #t12 = self::Extension|set#setterWithClosure(#this, #t11) in #t11);
+  self::expect(4.{core::int::unary-}(), let final core::int* #t11 = 4.{core::int::unary-}() in let final void #t12 = self::Extension|set#setterWithClosure(#this, #t11) in #t11);
   self::expect(4, #this.{self::Class::field});
 }
 static method Extension|get#testInternal(final self::Class* #this) → () →* dynamic
@@ -128,7 +128,7 @@
   self::expect(2, c.{self::Class::field});
   self::expect(3, let final core::int* #t23 = 3 in let final void #t24 = self::Extension|set#setterWithReturn(c, #t23) in #t23);
   self::expect(3, c.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final core::int #t25 = 4.{core::int::unary-}() in let final void #t26 = self::Extension|set#setterWithReturn(c, #t25) in #t25);
+  self::expect(4.{core::int::unary-}(), let final core::int* #t25 = 4.{core::int::unary-}() in let final void #t26 = self::Extension|set#setterWithReturn(c, #t25) in #t25);
   self::expect(4, c.{self::Class::field});
   self::Extension|set#setterWithReturn(c, 5);
   self::expect(5, c.{self::Class::field});
@@ -136,7 +136,7 @@
   self::expect(6, c.{self::Class::field});
   self::expect(7, let final self::Class* #t27 = c in let final core::int* #t28 = 7 in let final void #t29 = self::Extension|set#setterWithReturn(#t27, #t28) in #t28);
   self::expect(7, c.{self::Class::field});
-  self::expect(8.{core::int::unary-}(), let final self::Class* #t30 = c in let final core::int #t31 = 8.{core::int::unary-}() in let final void #t32 = self::Extension|set#setterWithReturn(#t30, #t31) in #t31);
+  self::expect(8.{core::int::unary-}(), let final self::Class* #t30 = c in let final core::int* #t31 = 8.{core::int::unary-}() in let final void #t32 = self::Extension|set#setterWithReturn(#t30, #t31) in #t31);
   self::expect(8, c.{self::Class::field});
   self::Extension|set#setterWithClosure(c, 1);
   self::expect(1, c.{self::Class::field});
@@ -144,7 +144,7 @@
   self::expect(2, c.{self::Class::field});
   self::expect(3, let final core::int* #t33 = 3 in let final void #t34 = self::Extension|set#setterWithClosure(c, #t33) in #t33);
   self::expect(3, c.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final core::int #t35 = 4.{core::int::unary-}() in let final void #t36 = self::Extension|set#setterWithClosure(c, #t35) in #t35);
+  self::expect(4.{core::int::unary-}(), let final core::int* #t35 = 4.{core::int::unary-}() in let final void #t36 = self::Extension|set#setterWithClosure(c, #t35) in #t35);
   self::expect(4, c.{self::Class::field});
   self::Extension|set#setterWithClosure(c, 5);
   self::expect(5, c.{self::Class::field});
@@ -152,7 +152,7 @@
   self::expect(6, c.{self::Class::field});
   self::expect(7, let final self::Class* #t37 = c in let final core::int* #t38 = 7 in let final void #t39 = self::Extension|set#setterWithClosure(#t37, #t38) in #t38);
   self::expect(7, c.{self::Class::field});
-  self::expect(8.{core::int::unary-}(), let final self::Class* #t40 = c in let final core::int #t41 = 8.{core::int::unary-}() in let final void #t42 = self::Extension|set#setterWithClosure(#t40, #t41) in #t41);
+  self::expect(8.{core::int::unary-}(), let final self::Class* #t40 = c in let final core::int* #t41 = 8.{core::int::unary-}() in let final void #t42 = self::Extension|set#setterWithClosure(#t40, #t41) in #t41);
   self::expect(8, c.{self::Class::field});
   self::Extension|set#simpleSetter(c, 0);
   self::expect(0, let final self::Class* #t43 = c in #t43.{self::Class::==}(null) ?{core::int*} null : #t43.{self::Class::field});
@@ -174,7 +174,7 @@
   self::expect(2, let final self::Class* #t64 = c in #t64.{self::Class::==}(null) ?{core::int*} null : #t64.{self::Class::field});
   self::expect(3, let final self::Class* #t65 = c in #t65.{self::Class::==}(null) ?{core::int*} null : let final core::int* #t66 = 3 in let final void #t67 = self::Extension|set#setterWithReturn(#t65, #t66) in #t66);
   self::expect(3, let final self::Class* #t68 = c in #t68.{self::Class::==}(null) ?{core::int*} null : #t68.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final self::Class* #t69 = c in #t69.{self::Class::==}(null) ?{core::int*} null : let final core::int #t70 = 4.{core::int::unary-}() in let final void #t71 = self::Extension|set#setterWithReturn(#t69, #t70) in #t70);
+  self::expect(4.{core::int::unary-}(), let final self::Class* #t69 = c in #t69.{self::Class::==}(null) ?{core::int*} null : let final core::int* #t70 = 4.{core::int::unary-}() in let final void #t71 = self::Extension|set#setterWithReturn(#t69, #t70) in #t70);
   self::expect(4, let final self::Class* #t72 = c in #t72.{self::Class::==}(null) ?{core::int*} null : #t72.{self::Class::field});
   self::Extension|set#setterWithReturn(c, 5);
   self::expect(5, let final self::Class* #t73 = c in #t73.{self::Class::==}(null) ?{core::int*} null : #t73.{self::Class::field});
@@ -182,7 +182,7 @@
   self::expect(6, let final self::Class* #t74 = c in #t74.{self::Class::==}(null) ?{core::int*} null : #t74.{self::Class::field});
   self::expect(7, let final self::Class* #t75 = c in let final core::int* #t76 = 7 in let final void #t77 = self::Extension|set#setterWithReturn(#t75, #t76) in #t76);
   self::expect(7, let final self::Class* #t78 = c in #t78.{self::Class::==}(null) ?{core::int*} null : #t78.{self::Class::field});
-  self::expect(8.{core::int::unary-}(), let final self::Class* #t79 = c in let final core::int #t80 = 8.{core::int::unary-}() in let final void #t81 = self::Extension|set#setterWithReturn(#t79, #t80) in #t80);
+  self::expect(8.{core::int::unary-}(), let final self::Class* #t79 = c in let final core::int* #t80 = 8.{core::int::unary-}() in let final void #t81 = self::Extension|set#setterWithReturn(#t79, #t80) in #t80);
   self::expect(8, let final self::Class* #t82 = c in #t82.{self::Class::==}(null) ?{core::int*} null : #t82.{self::Class::field});
   let final self::Class* #t83 = c in #t83.{self::Class::==}(null) ?{core::int*} null : self::Extension|set#setterWithClosure(#t83, 1);
   self::expect(1, let final self::Class* #t84 = c in #t84.{self::Class::==}(null) ?{core::int*} null : #t84.{self::Class::field});
@@ -190,7 +190,7 @@
   self::expect(2, let final self::Class* #t86 = c in #t86.{self::Class::==}(null) ?{core::int*} null : #t86.{self::Class::field});
   self::expect(3, let final self::Class* #t87 = c in #t87.{self::Class::==}(null) ?{core::int*} null : let final core::int* #t88 = 3 in let final void #t89 = self::Extension|set#setterWithClosure(#t87, #t88) in #t88);
   self::expect(3, let final self::Class* #t90 = c in #t90.{self::Class::==}(null) ?{core::int*} null : #t90.{self::Class::field});
-  self::expect(4.{core::int::unary-}(), let final self::Class* #t91 = c in #t91.{self::Class::==}(null) ?{core::int*} null : let final core::int #t92 = 4.{core::int::unary-}() in let final void #t93 = self::Extension|set#setterWithClosure(#t91, #t92) in #t92);
+  self::expect(4.{core::int::unary-}(), let final self::Class* #t91 = c in #t91.{self::Class::==}(null) ?{core::int*} null : let final core::int* #t92 = 4.{core::int::unary-}() in let final void #t93 = self::Extension|set#setterWithClosure(#t91, #t92) in #t92);
   self::expect(4, let final self::Class* #t94 = c in #t94.{self::Class::==}(null) ?{core::int*} null : #t94.{self::Class::field});
   self::Extension|set#setterWithClosure(c, 5);
   self::expect(5, let final self::Class* #t95 = c in #t95.{self::Class::==}(null) ?{core::int*} null : #t95.{self::Class::field});
@@ -198,7 +198,7 @@
   self::expect(6, let final self::Class* #t96 = c in #t96.{self::Class::==}(null) ?{core::int*} null : #t96.{self::Class::field});
   self::expect(7, let final self::Class* #t97 = c in let final core::int* #t98 = 7 in let final void #t99 = self::Extension|set#setterWithClosure(#t97, #t98) in #t98);
   self::expect(7, let final self::Class* #t100 = c in #t100.{self::Class::==}(null) ?{core::int*} null : #t100.{self::Class::field});
-  self::expect(8.{core::int::unary-}(), let final self::Class* #t101 = c in let final core::int #t102 = 8.{core::int::unary-}() in let final void #t103 = self::Extension|set#setterWithClosure(#t101, #t102) in #t102);
+  self::expect(8.{core::int::unary-}(), let final self::Class* #t101 = c in let final core::int* #t102 = 8.{core::int::unary-}() in let final void #t103 = self::Extension|set#setterWithClosure(#t101, #t102) in #t102);
   self::expect(8, let final self::Class* #t104 = c in #t104.{self::Class::==}(null) ?{core::int*} null : #t104.{self::Class::field});
   c.{self::Class::field} = null;
   let final self::Class* #t105 = c in self::Extension|get#simpleSetter(#t105).{core::num::==}(null) ?{core::int*} self::Extension|set#simpleSetter(#t105, 1) : null;
diff --git a/pkg/front_end/testcases/general/abstract_operator_override.dart b/pkg/front_end/testcases/general/abstract_operator_override.dart
new file mode 100644
index 0000000..89d5f93
--- /dev/null
+++ b/pkg/front_end/testcases/general/abstract_operator_override.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.
+
+class A {
+  A operator +(B b) => new A();
+  A operator -() => new A();
+  A operator [](B b) => new A();
+  void operator []=(B b1, B b2) {}
+}
+
+class B extends A {
+  A operator +(A a);
+  B operator -();
+  A operator [](A a);
+  void operator []=(A a, B b);
+}
+
+class C extends A {
+  B operator [](B b);
+  void operator []=(B b, A a);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/abstract_operator_override.dart.outline.expect b/pkg/front_end/testcases/general/abstract_operator_override.dart.outline.expect
new file mode 100644
index 0000000..954d77d
--- /dev/null
+++ b/pkg/front_end/testcases/general/abstract_operator_override.dart.outline.expect
@@ -0,0 +1,123 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of '+' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:6:18: Context: The parameter 'b' of the method 'A.+' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'B.+'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator +(B b) => new A();
+//                  ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:13:14: Context: This is the overridden method ('+').
+//   A operator +(A a);
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of 'unary-' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:7:14: Context: The return type of the method 'A.unary-' is 'A', which does not match the return type, 'B', of the overridden method, 'B.unary-'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator -() => new A();
+//              ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:14:14: Context: This is the overridden method ('unary-').
+//   B operator -();
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of '[]' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:8:19: Context: The parameter 'b' of the method 'A.[]' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'B.[]'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator [](B b) => new A();
+//                   ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:15:14: Context: This is the overridden method ('[]').
+//   A operator [](A a);
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of '[]=' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:9:23: Context: The parameter 'b1' of the method 'A.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'B.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(B b1, B b2) {}
+//                       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:16:17: Context: This is the overridden method ('[]=').
+//   void operator []=(A a, B b);
+//                 ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:19:7: Error: The implementation of '[]' in the non-abstract class 'C' does not conform to its interface.
+// class C extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:8:14: Context: The return type of the method 'A.[]' is 'A', which does not match the return type, 'B', of the overridden method, 'C.[]'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator [](B b) => new A();
+//              ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:20:14: Context: This is the overridden method ('[]').
+//   B operator [](B b);
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:19:7: Error: The implementation of '[]=' in the non-abstract class 'C' does not conform to its interface.
+// class C extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:9:29: Context: The parameter 'b2' of the method 'A.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(B b1, B b2) {}
+//                             ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:21:17: Context: This is the overridden method ('[]=').
+//   void operator []=(B b, A a);
+//                 ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A*
+    ;
+  operator +(self::B* b) → self::A*
+    ;
+  operator unary-() → self::A*
+    ;
+  operator [](self::B* b) → self::A*
+    ;
+  operator []=(self::B* b1, self::B* b2) → 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*;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B*
+    ;
+  abstract operator +(self::A* a) → self::A*;
+  abstract operator unary-() → self::B*;
+  abstract operator [](self::A* a) → self::A*;
+  abstract operator []=(self::A* a, self::B* b) → void;
+}
+class C extends self::A {
+  synthetic constructor •() → self::C*
+    ;
+  abstract operator [](self::B* b) → self::B*;
+  abstract operator []=(self::B* b, self::A* a) → void;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/abstract_operator_override.dart.strong.expect b/pkg/front_end/testcases/general/abstract_operator_override.dart.strong.expect
new file mode 100644
index 0000000..7fc1b8e
--- /dev/null
+++ b/pkg/front_end/testcases/general/abstract_operator_override.dart.strong.expect
@@ -0,0 +1,124 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of '+' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:6:18: Context: The parameter 'b' of the method 'A.+' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'B.+'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator +(B b) => new A();
+//                  ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:13:14: Context: This is the overridden method ('+').
+//   A operator +(A a);
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of 'unary-' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:7:14: Context: The return type of the method 'A.unary-' is 'A', which does not match the return type, 'B', of the overridden method, 'B.unary-'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator -() => new A();
+//              ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:14:14: Context: This is the overridden method ('unary-').
+//   B operator -();
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of '[]' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:8:19: Context: The parameter 'b' of the method 'A.[]' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'B.[]'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator [](B b) => new A();
+//                   ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:15:14: Context: This is the overridden method ('[]').
+//   A operator [](A a);
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of '[]=' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:9:23: Context: The parameter 'b1' of the method 'A.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'B.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(B b1, B b2) {}
+//                       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:16:17: Context: This is the overridden method ('[]=').
+//   void operator []=(A a, B b);
+//                 ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:19:7: Error: The implementation of '[]' in the non-abstract class 'C' does not conform to its interface.
+// class C extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:8:14: Context: The return type of the method 'A.[]' is 'A', which does not match the return type, 'B', of the overridden method, 'C.[]'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator [](B b) => new A();
+//              ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:20:14: Context: This is the overridden method ('[]').
+//   B operator [](B b);
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:19:7: Error: The implementation of '[]=' in the non-abstract class 'C' does not conform to its interface.
+// class C extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:9:29: Context: The parameter 'b2' of the method 'A.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(B b1, B b2) {}
+//                             ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:21:17: Context: This is the overridden method ('[]=').
+//   void operator []=(B b, A a);
+//                 ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A*
+    : super core::Object::•()
+    ;
+  operator +(self::B* b) → self::A*
+    return new self::A::•();
+  operator unary-() → self::A*
+    return new self::A::•();
+  operator [](self::B* b) → self::A*
+    return new self::A::•();
+  operator []=(self::B* b1, self::B* b2) → 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*;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B*
+    : super self::A::•()
+    ;
+  abstract operator +(self::A* a) → self::A*;
+  abstract operator unary-() → self::B*;
+  abstract operator [](self::A* a) → self::A*;
+  abstract operator []=(self::A* a, self::B* b) → void;
+}
+class C extends self::A {
+  synthetic constructor •() → self::C*
+    : super self::A::•()
+    ;
+  abstract operator [](self::B* b) → self::B*;
+  abstract operator []=(self::B* b, self::A* a) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/abstract_operator_override.dart.strong.transformed.expect b/pkg/front_end/testcases/general/abstract_operator_override.dart.strong.transformed.expect
new file mode 100644
index 0000000..7fc1b8e
--- /dev/null
+++ b/pkg/front_end/testcases/general/abstract_operator_override.dart.strong.transformed.expect
@@ -0,0 +1,124 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of '+' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:6:18: Context: The parameter 'b' of the method 'A.+' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'B.+'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator +(B b) => new A();
+//                  ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:13:14: Context: This is the overridden method ('+').
+//   A operator +(A a);
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of 'unary-' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:7:14: Context: The return type of the method 'A.unary-' is 'A', which does not match the return type, 'B', of the overridden method, 'B.unary-'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator -() => new A();
+//              ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:14:14: Context: This is the overridden method ('unary-').
+//   B operator -();
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of '[]' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:8:19: Context: The parameter 'b' of the method 'A.[]' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'B.[]'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator [](B b) => new A();
+//                   ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:15:14: Context: This is the overridden method ('[]').
+//   A operator [](A a);
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:12:7: Error: The implementation of '[]=' in the non-abstract class 'B' does not conform to its interface.
+// class B extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:9:23: Context: The parameter 'b1' of the method 'A.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'B.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(B b1, B b2) {}
+//                       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:16:17: Context: This is the overridden method ('[]=').
+//   void operator []=(A a, B b);
+//                 ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:19:7: Error: The implementation of '[]' in the non-abstract class 'C' does not conform to its interface.
+// class C extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:8:14: Context: The return type of the method 'A.[]' is 'A', which does not match the return type, 'B', of the overridden method, 'C.[]'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator [](B b) => new A();
+//              ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:20:14: Context: This is the overridden method ('[]').
+//   B operator [](B b);
+//              ^
+//
+// pkg/front_end/testcases/general/abstract_operator_override.dart:19:7: Error: The implementation of '[]=' in the non-abstract class 'C' does not conform to its interface.
+// class C extends A {
+//       ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:9:29: Context: The parameter 'b2' of the method 'A.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/abstract_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(B b1, B b2) {}
+//                             ^
+// pkg/front_end/testcases/general/abstract_operator_override.dart:21:17: Context: This is the overridden method ('[]=').
+//   void operator []=(B b, A a);
+//                 ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A*
+    : super core::Object::•()
+    ;
+  operator +(self::B* b) → self::A*
+    return new self::A::•();
+  operator unary-() → self::A*
+    return new self::A::•();
+  operator [](self::B* b) → self::A*
+    return new self::A::•();
+  operator []=(self::B* b1, self::B* b2) → 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*;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B*
+    : super self::A::•()
+    ;
+  abstract operator +(self::A* a) → self::A*;
+  abstract operator unary-() → self::B*;
+  abstract operator [](self::A* a) → self::A*;
+  abstract operator []=(self::A* a, self::B* b) → void;
+}
+class C extends self::A {
+  synthetic constructor •() → self::C*
+    : super self::A::•()
+    ;
+  abstract operator [](self::B* b) → self::B*;
+  abstract operator []=(self::B* b, self::A* a) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/abstract_operator_override.dart.textual_outline.expect b/pkg/front_end/testcases/general/abstract_operator_override.dart.textual_outline.expect
new file mode 100644
index 0000000..cbb8adc
--- /dev/null
+++ b/pkg/front_end/testcases/general/abstract_operator_override.dart.textual_outline.expect
@@ -0,0 +1,20 @@
+class A {
+  A operator +(B b) => new A();
+  A operator -() => new A();
+  A operator [](B b) => new A();
+  void operator []=(B b1, B b2) {}
+}
+
+class B extends A {
+  A operator +(A a);
+  B operator -();
+  A operator [](A a);
+  void operator []=(A a, B b);
+}
+
+class C extends A {
+  B operator [](B b);
+  void operator []=(B b, A a);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/abstract_operator_override.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/abstract_operator_override.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..a8a7f31
--- /dev/null
+++ b/pkg/front_end/testcases/general/abstract_operator_override.dart.textual_outline_modelled.expect
@@ -0,0 +1,20 @@
+class A {
+  A operator +(B b) => new A();
+  A operator -() => new A();
+  A operator [](B b) => new A();
+  void operator []=(B b1, B b2) {}
+}
+
+class B extends A {
+  A operator +(A a);
+  A operator [](A a);
+  B operator -();
+  void operator []=(A a, B b);
+}
+
+class C extends A {
+  B operator [](B b);
+  void operator []=(B b, A a);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/cascade_context.dart b/pkg/front_end/testcases/general/cascade_context.dart
new file mode 100644
index 0000000..4242a2f
--- /dev/null
+++ b/pkg/front_end/testcases/general/cascade_context.dart
@@ -0,0 +1,15 @@
+// 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.
+
+T f<T>() => null;
+
+test() {
+  int v1 = f();
+  int v2 = f()..isEven;
+  int v3 = f()
+    ..isEven
+    ..isEven;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/cascade_context.dart.outline.expect b/pkg/front_end/testcases/general/cascade_context.dart.outline.expect
new file mode 100644
index 0000000..10a6773
--- /dev/null
+++ b/pkg/front_end/testcases/general/cascade_context.dart.outline.expect
@@ -0,0 +1,10 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method f<T extends core::Object* = dynamic>() → self::f::T*
+  ;
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/cascade_context.dart.strong.expect b/pkg/front_end/testcases/general/cascade_context.dart.strong.expect
new file mode 100644
index 0000000..309a682
--- /dev/null
+++ b/pkg/front_end/testcases/general/cascade_context.dart.strong.expect
@@ -0,0 +1,17 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method f<T extends core::Object* = dynamic>() → self::f::T*
+  return null;
+static method test() → dynamic {
+  core::int* v1 = self::f<core::int*>();
+  core::int* v2 = let final core::int* #t1 = self::f<core::int*>() in block {
+    #t1.{core::int::isEven};
+  } =>#t1;
+  core::int* v3 = let final core::int* #t2 = self::f<core::int*>() in block {
+    #t2.{core::int::isEven};
+    #t2.{core::int::isEven};
+  } =>#t2;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/cascade_context.dart.strong.transformed.expect b/pkg/front_end/testcases/general/cascade_context.dart.strong.transformed.expect
new file mode 100644
index 0000000..309a682
--- /dev/null
+++ b/pkg/front_end/testcases/general/cascade_context.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method f<T extends core::Object* = dynamic>() → self::f::T*
+  return null;
+static method test() → dynamic {
+  core::int* v1 = self::f<core::int*>();
+  core::int* v2 = let final core::int* #t1 = self::f<core::int*>() in block {
+    #t1.{core::int::isEven};
+  } =>#t1;
+  core::int* v3 = let final core::int* #t2 = self::f<core::int*>() in block {
+    #t2.{core::int::isEven};
+    #t2.{core::int::isEven};
+  } =>#t2;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/cascade_context.dart.textual_outline.expect b/pkg/front_end/testcases/general/cascade_context.dart.textual_outline.expect
new file mode 100644
index 0000000..efa753c
--- /dev/null
+++ b/pkg/front_end/testcases/general/cascade_context.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+T f<T>() => null;
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/general/cascade_context.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/cascade_context.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..3be1b3a
--- /dev/null
+++ b/pkg/front_end/testcases/general/cascade_context.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+T f<T>() => null;
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/general/external_method.dart b/pkg/front_end/testcases/general/external_method.dart
new file mode 100644
index 0000000..976d23b
--- /dev/null
+++ b/pkg/front_end/testcases/general/external_method.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.
+
+external void externalMethod();
+
+class Class {
+  external void externalMethod();
+}
+
+void main() {}
diff --git a/pkg/front_end/testcases/general/external_method.dart.outline.expect b/pkg/front_end/testcases/general/external_method.dart.outline.expect
new file mode 100644
index 0000000..b9975e3
--- /dev/null
+++ b/pkg/front_end/testcases/general/external_method.dart.outline.expect
@@ -0,0 +1,22 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class*
+    ;
+  external method externalMethod() → 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*;
+}
+external static method externalMethod() → void;
+static method main() → void
+  ;
diff --git a/pkg/front_end/testcases/general/external_method.dart.strong.expect b/pkg/front_end/testcases/general/external_method.dart.strong.expect
new file mode 100644
index 0000000..1fed66d
--- /dev/null
+++ b/pkg/front_end/testcases/general/external_method.dart.strong.expect
@@ -0,0 +1,22 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class*
+    : super core::Object::•()
+    ;
+  external method externalMethod() → 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*;
+}
+external static method externalMethod() → void;
+static method main() → void {}
diff --git a/pkg/front_end/testcases/general/external_method.dart.strong.transformed.expect b/pkg/front_end/testcases/general/external_method.dart.strong.transformed.expect
new file mode 100644
index 0000000..1fed66d
--- /dev/null
+++ b/pkg/front_end/testcases/general/external_method.dart.strong.transformed.expect
@@ -0,0 +1,22 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object {
+  synthetic constructor •() → self::Class*
+    : super core::Object::•()
+    ;
+  external method externalMethod() → 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*;
+}
+external static method externalMethod() → void;
+static method main() → void {}
diff --git a/pkg/front_end/testcases/general/external_method.dart.textual_outline.expect b/pkg/front_end/testcases/general/external_method.dart.textual_outline.expect
new file mode 100644
index 0000000..a36e380
--- /dev/null
+++ b/pkg/front_end/testcases/general/external_method.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+external void externalMethod();
+
+class Class {
+  external void externalMethod();
+}
+
+void main() {}
diff --git a/pkg/front_end/testcases/general/external_method.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/external_method.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..b902ad8
--- /dev/null
+++ b/pkg/front_end/testcases/general/external_method.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+class Class {
+  external void externalMethod();
+}
+
+external void externalMethod();
+void main() {}
diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart b/pkg/front_end/testcases/general/generic_function_typedef.dart
new file mode 100644
index 0000000..4cdd14e
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_function_typedef.dart
@@ -0,0 +1,41 @@
+// 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.
+
+typedef E1<T> = void Function();
+typedef E2<T extends num> = void Function();
+typedef E3<T, S> = void Function();
+typedef E4<T extends num, S extends num> = void Function();
+typedef E5<T extends S, S extends num> = void Function();
+typedef E6<T extends num, S extends T> = void Function();
+
+typedef F1 = void Function<T>();
+typedef F2 = void Function<T extends num>();
+typedef F3 = void Function<T, S>();
+typedef F4 = void Function<T extends num, S extends num>();
+typedef F5 = void Function<T extends S, S extends num>();
+typedef F6 = void Function<T extends num, S extends T>();
+
+typedef G1<X> = void Function<T extends X>();
+typedef G2<X extends num> = void Function<T extends X>();
+typedef G3<X, Y> = void Function<T extends X, S extends Y>();
+typedef G4<X extends num, Y extends num> = void
+    Function<T extends X, S extends Y>();
+typedef G5<X extends num> = void Function<T extends S, S extends X>();
+typedef G6<X extends num> = void Function<T extends X, S extends T>();
+
+typedef H1 = void Function(void Function<T>());
+typedef H2 = void Function(void Function<T extends num>());
+typedef H3 = void Function(void Function<T, S>());
+typedef H4 = void Function(void Function<T extends num, S extends num>());
+typedef H5 = void Function(void Function<T extends S, S extends num>());
+typedef H6 = void Function(void Function<T extends num, S extends T>());
+
+void Function<T>() f1;
+void Function<T extends num>() f2;
+void Function<T, S>() f3;
+void Function<T extends num, S extends num>() f4;
+void Function<T extends S, S extends num>() f5;
+void Function<T extends num, S extends T>() f6;
+
+main() {}
diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.outline.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.outline.expect
new file mode 100644
index 0000000..338c05f
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.outline.expect
@@ -0,0 +1,36 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+typedef E1<unrelated T extends core::Object* = dynamic> = () →* void;
+typedef E2<unrelated T extends core::num* = core::num*> = () →* void;
+typedef E3<unrelated T extends core::Object* = dynamic, unrelated S extends core::Object* = dynamic> = () →* void;
+typedef E4<unrelated T extends core::num* = core::num*, unrelated S extends core::num* = core::num*> = () →* void;
+typedef E5<unrelated T extends S* = core::num*, unrelated S extends core::num* = core::num*> = () →* void;
+typedef E6<unrelated T extends core::num* = core::num*, unrelated S extends T* = core::num*> = () →* void;
+typedef F1 = <T extends core::Object* = dynamic>() →* void;
+typedef F2 = <T extends core::num* = dynamic>() →* void;
+typedef F3 = <T extends core::Object* = dynamic, S extends core::Object* = dynamic>() →* void;
+typedef F4 = <T extends core::num* = dynamic, S extends core::num* = dynamic>() →* void;
+typedef F5 = <T extends S* = dynamic, S extends core::num* = dynamic>() →* void;
+typedef F6 = <T extends core::num* = dynamic, S extends T* = dynamic>() →* void;
+typedef G1<invariant X extends core::Object* = dynamic> = <T extends X* = dynamic>() →* void;
+typedef G2<invariant X extends core::num* = core::num*> = <T extends X* = dynamic>() →* void;
+typedef G3<invariant X extends core::Object* = dynamic, invariant Y extends core::Object* = dynamic> = <T extends X* = dynamic, S extends Y* = dynamic>() →* void;
+typedef G4<invariant X extends core::num* = core::num*, invariant Y extends core::num* = core::num*> = <T extends X* = dynamic, S extends Y* = dynamic>() →* void;
+typedef G5<invariant X extends core::num* = core::num*> = <T extends S* = dynamic, S extends X* = dynamic>() →* void;
+typedef G6<invariant X extends core::num* = core::num*> = <T extends X* = dynamic, S extends T* = dynamic>() →* void;
+typedef H1 = (<T extends core::Object* = dynamic>() →* void) →* void;
+typedef H2 = (<T extends core::num* = dynamic>() →* void) →* void;
+typedef H3 = (<T extends core::Object* = dynamic, S extends core::Object* = dynamic>() →* void) →* void;
+typedef H4 = (<T extends core::num* = dynamic, S extends core::num* = dynamic>() →* void) →* void;
+typedef H5 = (<T extends S* = dynamic, S extends core::num* = dynamic>() →* void) →* void;
+typedef H6 = (<T extends core::num* = dynamic, S extends T* = dynamic>() →* void) →* void;
+static field <T extends core::Object* = dynamic>() →* void f1;
+static field <T extends core::num* = dynamic>() →* void f2;
+static field <T extends core::Object* = dynamic, S extends core::Object* = dynamic>() →* void f3;
+static field <T extends core::num* = dynamic, S extends core::num* = dynamic>() →* void f4;
+static field <T extends S* = dynamic, S extends core::num* = dynamic>() →* void f5;
+static field <T extends core::num* = dynamic, S extends T* = dynamic>() →* void f6;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.expect
new file mode 100644
index 0000000..adf2f0d
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.expect
@@ -0,0 +1,35 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+typedef E1<unrelated T extends core::Object* = dynamic> = () →* void;
+typedef E2<unrelated T extends core::num* = core::num*> = () →* void;
+typedef E3<unrelated T extends core::Object* = dynamic, unrelated S extends core::Object* = dynamic> = () →* void;
+typedef E4<unrelated T extends core::num* = core::num*, unrelated S extends core::num* = core::num*> = () →* void;
+typedef E5<unrelated T extends S* = core::num*, unrelated S extends core::num* = core::num*> = () →* void;
+typedef E6<unrelated T extends core::num* = core::num*, unrelated S extends T* = core::num*> = () →* void;
+typedef F1 = <T extends core::Object* = dynamic>() →* void;
+typedef F2 = <T extends core::num* = dynamic>() →* void;
+typedef F3 = <T extends core::Object* = dynamic, S extends core::Object* = dynamic>() →* void;
+typedef F4 = <T extends core::num* = dynamic, S extends core::num* = dynamic>() →* void;
+typedef F5 = <T extends S* = dynamic, S extends core::num* = dynamic>() →* void;
+typedef F6 = <T extends core::num* = dynamic, S extends T* = dynamic>() →* void;
+typedef G1<invariant X extends core::Object* = dynamic> = <T extends X* = dynamic>() →* void;
+typedef G2<invariant X extends core::num* = core::num*> = <T extends X* = dynamic>() →* void;
+typedef G3<invariant X extends core::Object* = dynamic, invariant Y extends core::Object* = dynamic> = <T extends X* = dynamic, S extends Y* = dynamic>() →* void;
+typedef G4<invariant X extends core::num* = core::num*, invariant Y extends core::num* = core::num*> = <T extends X* = dynamic, S extends Y* = dynamic>() →* void;
+typedef G5<invariant X extends core::num* = core::num*> = <T extends S* = dynamic, S extends X* = dynamic>() →* void;
+typedef G6<invariant X extends core::num* = core::num*> = <T extends X* = dynamic, S extends T* = dynamic>() →* void;
+typedef H1 = (<T extends core::Object* = dynamic>() →* void) →* void;
+typedef H2 = (<T extends core::num* = dynamic>() →* void) →* void;
+typedef H3 = (<T extends core::Object* = dynamic, S extends core::Object* = dynamic>() →* void) →* void;
+typedef H4 = (<T extends core::num* = dynamic, S extends core::num* = dynamic>() →* void) →* void;
+typedef H5 = (<T extends S* = dynamic, S extends core::num* = dynamic>() →* void) →* void;
+typedef H6 = (<T extends core::num* = dynamic, S extends T* = dynamic>() →* void) →* void;
+static field <T extends core::Object* = dynamic>() →* void f1;
+static field <T extends core::num* = dynamic>() →* void f2;
+static field <T extends core::Object* = dynamic, S extends core::Object* = dynamic>() →* void f3;
+static field <T extends core::num* = dynamic, S extends core::num* = dynamic>() →* void f4;
+static field <T extends S* = dynamic, S extends core::num* = dynamic>() →* void f5;
+static field <T extends core::num* = dynamic, S extends T* = dynamic>() →* void f6;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.transformed.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.transformed.expect
new file mode 100644
index 0000000..adf2f0d
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.transformed.expect
@@ -0,0 +1,35 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+typedef E1<unrelated T extends core::Object* = dynamic> = () →* void;
+typedef E2<unrelated T extends core::num* = core::num*> = () →* void;
+typedef E3<unrelated T extends core::Object* = dynamic, unrelated S extends core::Object* = dynamic> = () →* void;
+typedef E4<unrelated T extends core::num* = core::num*, unrelated S extends core::num* = core::num*> = () →* void;
+typedef E5<unrelated T extends S* = core::num*, unrelated S extends core::num* = core::num*> = () →* void;
+typedef E6<unrelated T extends core::num* = core::num*, unrelated S extends T* = core::num*> = () →* void;
+typedef F1 = <T extends core::Object* = dynamic>() →* void;
+typedef F2 = <T extends core::num* = dynamic>() →* void;
+typedef F3 = <T extends core::Object* = dynamic, S extends core::Object* = dynamic>() →* void;
+typedef F4 = <T extends core::num* = dynamic, S extends core::num* = dynamic>() →* void;
+typedef F5 = <T extends S* = dynamic, S extends core::num* = dynamic>() →* void;
+typedef F6 = <T extends core::num* = dynamic, S extends T* = dynamic>() →* void;
+typedef G1<invariant X extends core::Object* = dynamic> = <T extends X* = dynamic>() →* void;
+typedef G2<invariant X extends core::num* = core::num*> = <T extends X* = dynamic>() →* void;
+typedef G3<invariant X extends core::Object* = dynamic, invariant Y extends core::Object* = dynamic> = <T extends X* = dynamic, S extends Y* = dynamic>() →* void;
+typedef G4<invariant X extends core::num* = core::num*, invariant Y extends core::num* = core::num*> = <T extends X* = dynamic, S extends Y* = dynamic>() →* void;
+typedef G5<invariant X extends core::num* = core::num*> = <T extends S* = dynamic, S extends X* = dynamic>() →* void;
+typedef G6<invariant X extends core::num* = core::num*> = <T extends X* = dynamic, S extends T* = dynamic>() →* void;
+typedef H1 = (<T extends core::Object* = dynamic>() →* void) →* void;
+typedef H2 = (<T extends core::num* = dynamic>() →* void) →* void;
+typedef H3 = (<T extends core::Object* = dynamic, S extends core::Object* = dynamic>() →* void) →* void;
+typedef H4 = (<T extends core::num* = dynamic, S extends core::num* = dynamic>() →* void) →* void;
+typedef H5 = (<T extends S* = dynamic, S extends core::num* = dynamic>() →* void) →* void;
+typedef H6 = (<T extends core::num* = dynamic, S extends T* = dynamic>() →* void) →* void;
+static field <T extends core::Object* = dynamic>() →* void f1;
+static field <T extends core::num* = dynamic>() →* void f2;
+static field <T extends core::Object* = dynamic, S extends core::Object* = dynamic>() →* void f3;
+static field <T extends core::num* = dynamic, S extends core::num* = dynamic>() →* void f4;
+static field <T extends S* = dynamic, S extends core::num* = dynamic>() →* void f5;
+static field <T extends core::num* = dynamic, S extends T* = dynamic>() →* void f6;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline.expect
new file mode 100644
index 0000000..fd63028
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline.expect
@@ -0,0 +1,32 @@
+typedef E1<T> = void Function();
+typedef E2<T extends num> = void Function();
+typedef E3<T, S> = void Function();
+typedef E4<T extends num, S extends num> = void Function();
+typedef E5<T extends S, S extends num> = void Function();
+typedef E6<T extends num, S extends T> = void Function();
+typedef F1 = void Function<T>();
+typedef F2 = void Function<T extends num>();
+typedef F3 = void Function<T, S>();
+typedef F4 = void Function<T extends num, S extends num>();
+typedef F5 = void Function<T extends S, S extends num>();
+typedef F6 = void Function<T extends num, S extends T>();
+typedef G1<X> = void Function<T extends X>();
+typedef G2<X extends num> = void Function<T extends X>();
+typedef G3<X, Y> = void Function<T extends X, S extends Y>();
+typedef G4<X extends num, Y extends num> = void
+    Function<T extends X, S extends Y>();
+typedef G5<X extends num> = void Function<T extends S, S extends X>();
+typedef G6<X extends num> = void Function<T extends X, S extends T>();
+typedef H1 = void Function(void Function<T>());
+typedef H2 = void Function(void Function<T extends num>());
+typedef H3 = void Function(void Function<T, S>());
+typedef H4 = void Function(void Function<T extends num, S extends num>());
+typedef H5 = void Function(void Function<T extends S, S extends num>());
+typedef H6 = void Function(void Function<T extends num, S extends T>());
+void Function<T>() f1;
+void Function<T extends num>() f2;
+void Function<T, S>() f3;
+void Function<T extends num, S extends num>() f4;
+void Function<T extends S, S extends num>() f5;
+void Function<T extends num, S extends T>() f6;
+main() {}
diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..5df2b1e
--- /dev/null
+++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline_modelled.expect
@@ -0,0 +1,32 @@
+main() {}
+typedef E1<T> = void Function();
+typedef E2<T extends num> = void Function();
+typedef E3<T, S> = void Function();
+typedef E4<T extends num, S extends num> = void Function();
+typedef E5<T extends S, S extends num> = void Function();
+typedef E6<T extends num, S extends T> = void Function();
+typedef F1 = void Function<T>();
+typedef F2 = void Function<T extends num>();
+typedef F3 = void Function<T, S>();
+typedef F4 = void Function<T extends num, S extends num>();
+typedef F5 = void Function<T extends S, S extends num>();
+typedef F6 = void Function<T extends num, S extends T>();
+typedef G1<X> = void Function<T extends X>();
+typedef G2<X extends num> = void Function<T extends X>();
+typedef G3<X, Y> = void Function<T extends X, S extends Y>();
+typedef G4<X extends num, Y extends num> = void
+    Function<T extends X, S extends Y>();
+typedef G5<X extends num> = void Function<T extends S, S extends X>();
+typedef G6<X extends num> = void Function<T extends X, S extends T>();
+typedef H1 = void Function(void Function<T>());
+typedef H2 = void Function(void Function<T extends num>());
+typedef H3 = void Function(void Function<T, S>());
+typedef H4 = void Function(void Function<T extends num, S extends num>());
+typedef H5 = void Function(void Function<T extends S, S extends num>());
+typedef H6 = void Function(void Function<T extends num, S extends T>());
+void Function<T extends S, S extends num>() f5;
+void Function<T extends num, S extends T>() f6;
+void Function<T extends num, S extends num>() f4;
+void Function<T extends num>() f2;
+void Function<T, S>() f3;
+void Function<T>() f1;
diff --git a/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart
new file mode 100644
index 0000000..981a32f
--- /dev/null
+++ b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart
@@ -0,0 +1,53 @@
+// 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.
+
+typedef F<T> = T Function(T, T);
+
+test1() {
+  F<int> d = (int a, int b) => a;
+  d = <S>(S a, S b) => a;
+}
+
+test2() {
+  F<int> d = (int a, int b) => a;
+  var f = <S>(S a, S b) => a;
+  d = f;
+}
+
+test3a() {
+  F<int> d = (int a, int b) => a;
+  d = <S>(a, S b) => a;
+}
+
+test3b() {
+  F<int> d = (int a, int b) => a;
+  d = <S>(a, S b) => b;
+}
+
+test4() {
+  F<int> d = (int a, int b) => a;
+  d = <S>(a, b) => a;
+}
+
+test5() {
+  F<int> d = (int a, int b) => a;
+  d = (a, b, c) => a;
+}
+
+test6() {
+  F<int> d = (int a, int b) => a;
+  d = (a) => a;
+}
+
+test7() {
+  F<int> d = (int a, int b) => a;
+  d = <S>(a, b, c) => a;
+}
+
+test8() {
+  F<int> d = (int a, int b) => a;
+  d = <S>(a) => a;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.outline.expect b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.outline.expect
new file mode 100644
index 0000000..cce5025
--- /dev/null
+++ b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.outline.expect
@@ -0,0 +1,25 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+typedef F<invariant T extends core::Object* = dynamic> = (T*, T*) →* T*;
+static method test1() → dynamic
+  ;
+static method test2() → dynamic
+  ;
+static method test3a() → dynamic
+  ;
+static method test3b() → dynamic
+  ;
+static method test4() → dynamic
+  ;
+static method test5() → dynamic
+  ;
+static method test6() → dynamic
+  ;
+static method test7() → dynamic
+  ;
+static method test8() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.strong.expect b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.strong.expect
new file mode 100644
index 0000000..0ee5386
--- /dev/null
+++ b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.strong.expect
@@ -0,0 +1,100 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:9:10: Error: A value of type 'S Function<S>(S, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(S a, S b) => a;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:15:7: Error: A value of type 'S Function<S>(S, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = f;
+//       ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:20:10: Error: A value of type 'dynamic Function<S>(dynamic, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a, S b) => a;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:25:10: Error: A value of type 'S Function<S>(dynamic, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a, S b) => b;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:30:10: Error: A value of type 'dynamic Function<S>(dynamic, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a, b) => a;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:35:7: Error: A value of type 'int Function(int, int, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = (a, b, c) => a;
+//       ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:40:7: Error: A value of type 'int Function(int)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = (a) => a;
+//       ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:45:10: Error: A value of type 'dynamic Function<S>(dynamic, dynamic, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a, b, c) => a;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:50:10: Error: A value of type 'dynamic Function<S>(dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a) => a;
+//          ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef F<invariant T extends core::Object* = dynamic> = (T*, T*) →* T*;
+static method test1() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:9:10: Error: A value of type 'S Function<S>(S, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(S a, S b) => a;
+         ^" in (<S extends core::Object* = dynamic>(S* a, S* b) → S* => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test2() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  <S extends core::Object* = dynamic>(S*, S*) →* S* f = <S extends core::Object* = dynamic>(S* a, S* b) → S* => a;
+  d = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:15:7: Error: A value of type 'S Function<S>(S, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = f;
+      ^" in f as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test3a() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:20:10: Error: A value of type 'dynamic Function<S>(dynamic, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a, S b) => a;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a, S* b) → dynamic => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test3b() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:25:10: Error: A value of type 'S Function<S>(dynamic, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a, S b) => b;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a, S* b) → S* => b) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test4() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:30:10: Error: A value of type 'dynamic Function<S>(dynamic, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a, b) => a;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a, dynamic b) → dynamic => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test5() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:35:7: Error: A value of type 'int Function(int, int, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = (a, b, c) => a;
+      ^" in ((core::int* a, core::int* b, dynamic c) → core::int* => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test6() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:40:7: Error: A value of type 'int Function(int)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = (a) => a;
+      ^" in ((core::int* a) → core::int* => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test7() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:45:10: Error: A value of type 'dynamic Function<S>(dynamic, dynamic, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a, b, c) => a;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a, dynamic b, dynamic c) → dynamic => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test8() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:50:10: Error: A value of type 'dynamic Function<S>(dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a) => a;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a) → dynamic => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.strong.transformed.expect b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.strong.transformed.expect
new file mode 100644
index 0000000..0ee5386
--- /dev/null
+++ b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.strong.transformed.expect
@@ -0,0 +1,100 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:9:10: Error: A value of type 'S Function<S>(S, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(S a, S b) => a;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:15:7: Error: A value of type 'S Function<S>(S, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = f;
+//       ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:20:10: Error: A value of type 'dynamic Function<S>(dynamic, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a, S b) => a;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:25:10: Error: A value of type 'S Function<S>(dynamic, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a, S b) => b;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:30:10: Error: A value of type 'dynamic Function<S>(dynamic, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a, b) => a;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:35:7: Error: A value of type 'int Function(int, int, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = (a, b, c) => a;
+//       ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:40:7: Error: A value of type 'int Function(int)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = (a) => a;
+//       ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:45:10: Error: A value of type 'dynamic Function<S>(dynamic, dynamic, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a, b, c) => a;
+//          ^
+//
+// pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:50:10: Error: A value of type 'dynamic Function<S>(dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+//   d = <S>(a) => a;
+//          ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef F<invariant T extends core::Object* = dynamic> = (T*, T*) →* T*;
+static method test1() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:9:10: Error: A value of type 'S Function<S>(S, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(S a, S b) => a;
+         ^" in (<S extends core::Object* = dynamic>(S* a, S* b) → S* => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test2() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  <S extends core::Object* = dynamic>(S*, S*) →* S* f = <S extends core::Object* = dynamic>(S* a, S* b) → S* => a;
+  d = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:15:7: Error: A value of type 'S Function<S>(S, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = f;
+      ^" in f as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test3a() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:20:10: Error: A value of type 'dynamic Function<S>(dynamic, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a, S b) => a;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a, S* b) → dynamic => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test3b() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:25:10: Error: A value of type 'S Function<S>(dynamic, S)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a, S b) => b;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a, S* b) → S* => b) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test4() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:30:10: Error: A value of type 'dynamic Function<S>(dynamic, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a, b) => a;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a, dynamic b) → dynamic => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test5() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:35:7: Error: A value of type 'int Function(int, int, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = (a, b, c) => a;
+      ^" in ((core::int* a, core::int* b, dynamic c) → core::int* => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test6() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:40:7: Error: A value of type 'int Function(int)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = (a) => a;
+      ^" in ((core::int* a) → core::int* => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test7() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:45:10: Error: A value of type 'dynamic Function<S>(dynamic, dynamic, dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a, b, c) => a;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a, dynamic b, dynamic c) → dynamic => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method test8() → dynamic {
+  (core::int*, core::int*) →* core::int* d = (core::int* a, core::int* b) → core::int* => a;
+  d = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart:50:10: Error: A value of type 'dynamic Function<S>(dynamic)' can't be assigned to a variable of type 'int Function(int, int)'.
+  d = <S>(a) => a;
+         ^" in (<S extends core::Object* = dynamic>(dynamic a) → dynamic => a) as{TypeError} (core::int*, core::int*) →* core::int*;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.textual_outline.expect b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.textual_outline.expect
new file mode 100644
index 0000000..7f419b2
--- /dev/null
+++ b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.textual_outline.expect
@@ -0,0 +1,11 @@
+typedef F<T> = T Function(T, T);
+test1() {}
+test2() {}
+test3a() {}
+test3b() {}
+test4() {}
+test5() {}
+test6() {}
+test7() {}
+test8() {}
+main() {}
diff --git a/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..4a807d3
--- /dev/null
+++ b/pkg/front_end/testcases/general/infer_generic_type_parameter_mismatch.dart.textual_outline_modelled.expect
@@ -0,0 +1,11 @@
+main() {}
+test1() {}
+test2() {}
+test3a() {}
+test3b() {}
+test4() {}
+test5() {}
+test6() {}
+test7() {}
+test8() {}
+typedef F<T> = T Function(T, T);
diff --git a/pkg/front_end/testcases/general/invalid_operator.dart.outline.expect b/pkg/front_end/testcases/general/invalid_operator.dart.outline.expect
index d4cd135..02fda71 100644
--- a/pkg/front_end/testcases/general/invalid_operator.dart.outline.expect
+++ b/pkg/front_end/testcases/general/invalid_operator.dart.outline.expect
@@ -560,6 +560,42 @@
 //   operator ~<T>() => true;
 //              ^
 //
+// pkg/front_end/testcases/general/invalid_operator.dart:6:12: Error: The method 'Operators1.==' has fewer positional arguments than those of overridden method 'Object.=='.
+//   operator ==() => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator.dart:27:12: Error: The method 'Operators2.==' has more required arguments than those of overridden method 'Object.=='.
+//   operator ==(a, b) => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator.dart:71:12: Error: The method 'Operators4.==' has fewer positional arguments than those of overridden method 'Object.=='.
+//   operator ==({a}) => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator.dart:137:12: Error: Declared type variables of 'Operators7.==' doesn't match those on overridden method 'Object.=='.
+//   operator ==<T>(a) => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator.dart:137:12: Error: The return type of the method 'Operators7.==' is 'dynamic', which does not match the return type, 'bool', of the overridden method, 'Object.=='.
+// Change to a subtype of 'bool'.
+//   operator ==<T>(a) => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/general/invalid_operator.dart.strong.expect b/pkg/front_end/testcases/general/invalid_operator.dart.strong.expect
index 2dac239..6a1e770 100644
--- a/pkg/front_end/testcases/general/invalid_operator.dart.strong.expect
+++ b/pkg/front_end/testcases/general/invalid_operator.dart.strong.expect
@@ -560,6 +560,42 @@
 //   operator ~<T>() => true;
 //              ^
 //
+// pkg/front_end/testcases/general/invalid_operator.dart:6:12: Error: The method 'Operators1.==' has fewer positional arguments than those of overridden method 'Object.=='.
+//   operator ==() => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator.dart:27:12: Error: The method 'Operators2.==' has more required arguments than those of overridden method 'Object.=='.
+//   operator ==(a, b) => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator.dart:71:12: Error: The method 'Operators4.==' has fewer positional arguments than those of overridden method 'Object.=='.
+//   operator ==({a}) => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator.dart:137:12: Error: Declared type variables of 'Operators7.==' doesn't match those on overridden method 'Object.=='.
+//   operator ==<T>(a) => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator.dart:137:12: Error: The return type of the method 'Operators7.==' is 'dynamic', which does not match the return type, 'bool', of the overridden method, 'Object.=='.
+// Change to a subtype of 'bool'.
+//   operator ==<T>(a) => true;
+//            ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/general/invalid_operator_override.dart b/pkg/front_end/testcases/general/invalid_operator_override.dart
new file mode 100644
index 0000000..9767d57
--- /dev/null
+++ b/pkg/front_end/testcases/general/invalid_operator_override.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.
+
+class A {
+  A operator +(A a) => a;
+  B operator -() => new B();
+  B operator [](A a) => new B();
+  void operator []=(A a1, A a2) {}
+}
+
+class B extends A {
+  A operator +(B b) => b;
+  A operator -() => this;
+  B operator [](B b) => b;
+  void operator []=(B b, A a) {}
+}
+
+class C extends A {
+  A operator [](B b) => b;
+  void operator []=(A a, B b) {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/invalid_operator_override.dart.outline.expect b/pkg/front_end/testcases/general/invalid_operator_override.dart.outline.expect
new file mode 100644
index 0000000..a34493c
--- /dev/null
+++ b/pkg/front_end/testcases/general/invalid_operator_override.dart.outline.expect
@@ -0,0 +1,121 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:13:18: Error: The parameter 'b' of the method 'B.+' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.+'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator +(B b) => b;
+//                  ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:6:14: Context: This is the overridden method ('+').
+//   A operator +(A a) => a;
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:14:14: Error: The return type of the method 'B.unary-' is 'A', which does not match the return type, 'B', of the overridden method, 'A.unary-'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator -() => this;
+//              ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:7:14: Context: This is the overridden method ('unary-').
+//   B operator -() => new B();
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:15:19: Error: The parameter 'b' of the method 'B.[]' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.[]'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   B operator [](B b) => b;
+//                   ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:8:14: Context: This is the overridden method ('[]').
+//   B operator [](A a) => new B();
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:16:23: Error: The parameter 'b' of the method 'B.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(B b, A a) {}
+//                       ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:9:17: Context: This is the overridden method ('[]=').
+//   void operator []=(A a1, A a2) {}
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:20:14: Error: The return type of the method 'C.[]' is 'A', which does not match the return type, 'B', of the overridden method, 'A.[]'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator [](B b) => b;
+//              ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:8:14: Context: This is the overridden method ('[]').
+//   B operator [](A a) => new B();
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:20:19: Error: The parameter 'b' of the method 'C.[]' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.[]'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator [](B b) => b;
+//                   ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:8:14: Context: This is the overridden method ('[]').
+//   B operator [](A a) => new B();
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:21:28: Error: The parameter 'b' of the method 'C.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(A a, B b) {}
+//                            ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:9:17: Context: This is the overridden method ('[]=').
+//   void operator []=(A a1, A a2) {}
+//                 ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A*
+    ;
+  operator +(self::A* a) → self::A*
+    ;
+  operator unary-() → self::B*
+    ;
+  operator [](self::A* a) → self::B*
+    ;
+  operator []=(self::A* a1, self::A* a2) → 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*;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B*
+    ;
+  operator +(self::B* b) → self::A*
+    ;
+  operator unary-() → self::A*
+    ;
+  operator [](self::B* b) → self::B*
+    ;
+  operator []=(self::B* b, self::A* a) → void
+    ;
+}
+class C extends self::A {
+  synthetic constructor •() → self::C*
+    ;
+  operator [](self::B* b) → self::A*
+    ;
+  operator []=(self::A* a, self::B* b) → void
+    ;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/invalid_operator_override.dart.strong.expect b/pkg/front_end/testcases/general/invalid_operator_override.dart.strong.expect
new file mode 100644
index 0000000..8ad0fbc
--- /dev/null
+++ b/pkg/front_end/testcases/general/invalid_operator_override.dart.strong.expect
@@ -0,0 +1,120 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:13:18: Error: The parameter 'b' of the method 'B.+' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.+'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator +(B b) => b;
+//                  ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:6:14: Context: This is the overridden method ('+').
+//   A operator +(A a) => a;
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:14:14: Error: The return type of the method 'B.unary-' is 'A', which does not match the return type, 'B', of the overridden method, 'A.unary-'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator -() => this;
+//              ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:7:14: Context: This is the overridden method ('unary-').
+//   B operator -() => new B();
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:15:19: Error: The parameter 'b' of the method 'B.[]' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.[]'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   B operator [](B b) => b;
+//                   ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:8:14: Context: This is the overridden method ('[]').
+//   B operator [](A a) => new B();
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:16:23: Error: The parameter 'b' of the method 'B.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(B b, A a) {}
+//                       ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:9:17: Context: This is the overridden method ('[]=').
+//   void operator []=(A a1, A a2) {}
+//                 ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:20:14: Error: The return type of the method 'C.[]' is 'A', which does not match the return type, 'B', of the overridden method, 'A.[]'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a subtype of 'B'.
+//   A operator [](B b) => b;
+//              ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:8:14: Context: This is the overridden method ('[]').
+//   B operator [](A a) => new B();
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:20:19: Error: The parameter 'b' of the method 'C.[]' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.[]'.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   A operator [](B b) => b;
+//                   ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:8:14: Context: This is the overridden method ('[]').
+//   B operator [](A a) => new B();
+//              ^
+//
+// pkg/front_end/testcases/general/invalid_operator_override.dart:21:28: Error: The parameter 'b' of the method 'C.[]=' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'A.[]='.
+//  - 'B' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+//  - 'A' is from 'pkg/front_end/testcases/general/invalid_operator_override.dart'.
+// Change to a supertype of 'A', or, for a covariant parameter, a subtype.
+//   void operator []=(A a, B b) {}
+//                            ^
+// pkg/front_end/testcases/general/invalid_operator_override.dart:9:17: Context: This is the overridden method ('[]=').
+//   void operator []=(A a1, A a2) {}
+//                 ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A*
+    : super core::Object::•()
+    ;
+  operator +(self::A* a) → self::A*
+    return a;
+  operator unary-() → self::B*
+    return new self::B::•();
+  operator [](self::A* a) → self::B*
+    return new self::B::•();
+  operator []=(self::A* a1, self::A* a2) → 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*;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B*
+    : super self::A::•()
+    ;
+  operator +(self::B* b) → self::A*
+    return b;
+  operator unary-() → self::A*
+    return this;
+  operator [](self::B* b) → self::B*
+    return b;
+  operator []=(self::B* b, self::A* a) → void {}
+}
+class C extends self::A {
+  synthetic constructor •() → self::C*
+    : super self::A::•()
+    ;
+  operator [](self::B* b) → self::A*
+    return b;
+  operator []=(self::A* a, self::B* b) → void {}
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/invalid_operator_override.dart.textual_outline.expect b/pkg/front_end/testcases/general/invalid_operator_override.dart.textual_outline.expect
new file mode 100644
index 0000000..f4a5167
--- /dev/null
+++ b/pkg/front_end/testcases/general/invalid_operator_override.dart.textual_outline.expect
@@ -0,0 +1,20 @@
+class A {
+  A operator +(A a) => a;
+  B operator -() => new B();
+  B operator [](A a) => new B();
+  void operator []=(A a1, A a2) {}
+}
+
+class B extends A {
+  A operator +(B b) => b;
+  A operator -() => this;
+  B operator [](B b) => b;
+  void operator []=(B b, A a) {}
+}
+
+class C extends A {
+  A operator [](B b) => b;
+  void operator []=(A a, B b) {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/invalid_operator_override.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/invalid_operator_override.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..f4a5167
--- /dev/null
+++ b/pkg/front_end/testcases/general/invalid_operator_override.dart.textual_outline_modelled.expect
@@ -0,0 +1,20 @@
+class A {
+  A operator +(A a) => a;
+  B operator -() => new B();
+  B operator [](A a) => new B();
+  void operator []=(A a1, A a2) {}
+}
+
+class B extends A {
+  A operator +(B b) => b;
+  A operator -() => this;
+  B operator [](B b) => b;
+  void operator []=(B b, A a) {}
+}
+
+class C extends A {
+  A operator [](B b) => b;
+  void operator []=(A a, B b) {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210.dart.outline.expect b/pkg/front_end/testcases/general/issue41210b/issue41210.dart.outline.expect
index d371a15..7c3edaa 100644
--- a/pkg/front_end/testcases/general/issue41210b/issue41210.dart.outline.expect
+++ b/pkg/front_end/testcases/general/issue41210b/issue41210.dart.outline.expect
@@ -88,7 +88,7 @@
   abstract member-signature get runtimeType() → core::Type*;
 }
 abstract class A extends core::Object implements iss::Interface /*isMixinDeclaration*/  {
-  method method(core::num* i, {core::String* s = "hello"}) → core::String*
+  method method(core::num* i, {core::String* s = #C1}) → core::String*
     ;
   abstract member-signature get _identityHashCode() → core::int*;
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
@@ -131,3 +131,7 @@
   abstract member-signature get runtimeType() → core::Type*;
   abstract forwarding-stub method method(covariant core::num* i) → core::String*;
 }
+
+constants  {
+  #C1 = "hello"
+}
diff --git a/pkg/front_end/testcases/general/issue42610.dart b/pkg/front_end/testcases/general/issue42610.dart
new file mode 100644
index 0000000..df912e3
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42610.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.
+
+void test() {
+  #final;
+  final x;
+  const y;
+  final int z;
+  const int w;
+}
+
+void main() {}
diff --git a/pkg/front_end/testcases/general/issue42610.dart.outline.expect b/pkg/front_end/testcases/general/issue42610.dart.outline.expect
new file mode 100644
index 0000000..a440da0
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42610.dart.outline.expect
@@ -0,0 +1,7 @@
+library;
+import self as self;
+
+static method test() → void
+  ;
+static method main() → void
+  ;
diff --git a/pkg/front_end/testcases/general/issue42610.dart.strong.expect b/pkg/front_end/testcases/general/issue42610.dart.strong.expect
new file mode 100644
index 0000000..77e5fc9
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42610.dart.strong.expect
@@ -0,0 +1,40 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue42610.dart:6:4: Error: Expected an identifier, but got 'final'.
+//   #final;
+//    ^^^^^
+//
+// pkg/front_end/testcases/general/issue42610.dart:6:4: Error: Expected ';' after this.
+//   #final;
+//    ^^^^^
+//
+// pkg/front_end/testcases/general/issue42610.dart:6:9: Error: Expected an identifier, but got ';'.
+//   #final;
+//         ^
+//
+// pkg/front_end/testcases/general/issue42610.dart:7:9: Error: The final variable 'x' must be initialized.
+// Try adding an initializer ('= expression') to the declaration.
+//   final x;
+//         ^
+//
+// pkg/front_end/testcases/general/issue42610.dart:8:9: Error: The const variable 'y' must be initialized.
+// Try adding an initializer ('= expression') to the declaration.
+//   const y;
+//         ^
+//
+// pkg/front_end/testcases/general/issue42610.dart:9:13: Error: The final variable 'z' must be initialized.
+// Try adding an initializer ('= expression') to the declaration.
+//   final int z;
+//             ^
+//
+// pkg/front_end/testcases/general/issue42610.dart:10:13: Error: The const variable 'w' must be initialized.
+// Try adding an initializer ('= expression') to the declaration.
+//   const int w;
+//             ^
+//
+import self as self;
+
+static method test() → void {}
+static method main() → void {}
diff --git a/pkg/front_end/testcases/general/issue42610.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue42610.dart.strong.transformed.expect
new file mode 100644
index 0000000..77e5fc9
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42610.dart.strong.transformed.expect
@@ -0,0 +1,40 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue42610.dart:6:4: Error: Expected an identifier, but got 'final'.
+//   #final;
+//    ^^^^^
+//
+// pkg/front_end/testcases/general/issue42610.dart:6:4: Error: Expected ';' after this.
+//   #final;
+//    ^^^^^
+//
+// pkg/front_end/testcases/general/issue42610.dart:6:9: Error: Expected an identifier, but got ';'.
+//   #final;
+//         ^
+//
+// pkg/front_end/testcases/general/issue42610.dart:7:9: Error: The final variable 'x' must be initialized.
+// Try adding an initializer ('= expression') to the declaration.
+//   final x;
+//         ^
+//
+// pkg/front_end/testcases/general/issue42610.dart:8:9: Error: The const variable 'y' must be initialized.
+// Try adding an initializer ('= expression') to the declaration.
+//   const y;
+//         ^
+//
+// pkg/front_end/testcases/general/issue42610.dart:9:13: Error: The final variable 'z' must be initialized.
+// Try adding an initializer ('= expression') to the declaration.
+//   final int z;
+//             ^
+//
+// pkg/front_end/testcases/general/issue42610.dart:10:13: Error: The const variable 'w' must be initialized.
+// Try adding an initializer ('= expression') to the declaration.
+//   const int w;
+//             ^
+//
+import self as self;
+
+static method test() → void {}
+static method main() → void {}
diff --git a/pkg/front_end/testcases/general/issue42610.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue42610.dart.textual_outline.expect
new file mode 100644
index 0000000..41786bb
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42610.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+void test() {}
+void main() {}
diff --git a/pkg/front_end/testcases/general/issue42610.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue42610.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0e0980f
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42610.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+void main() {}
+void test() {}
diff --git a/pkg/front_end/testcases/general/issue42615.dart b/pkg/front_end/testcases/general/issue42615.dart
new file mode 100644
index 0000000..b18b51f
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42615.dart
@@ -0,0 +1,15 @@
+// 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';
+
+class Class<T> {
+  Class({FutureOr<List<T>> Function() a});
+}
+
+dynamic method() => null;
+
+main() {
+  Class(a: () async => method());
+}
diff --git a/pkg/front_end/testcases/general/issue42615.dart.outline.expect b/pkg/front_end/testcases/general/issue42615.dart.outline.expect
new file mode 100644
index 0000000..77a5b08
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42615.dart.outline.expect
@@ -0,0 +1,24 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+import "dart:async";
+
+class Class<T extends core::Object* = dynamic> extends core::Object {
+  constructor •({() →* FutureOr<core::List<self::Class::T*>*>* a}) → self::Class<self::Class::T*>*
+    ;
+  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*;
+}
+static method method() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/issue42615.dart.strong.expect b/pkg/front_end/testcases/general/issue42615.dart.strong.expect
new file mode 100644
index 0000000..2f569f8
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42615.dart.strong.expect
@@ -0,0 +1,30 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+import "dart:async";
+
+class Class<T extends core::Object* = dynamic> extends core::Object {
+  constructor •({() →* FutureOr<core::List<self::Class::T*>*>* a = #C1}) → self::Class<self::Class::T*>*
+    : 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*;
+}
+static method method() → dynamic
+  return null;
+static method main() → dynamic {
+  new self::Class::•<dynamic>(a: () → FutureOr<core::List<dynamic>*>* async => self::method() as{TypeError} FutureOr<core::List<dynamic>*>*);
+}
+
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/general/issue42615.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue42615.dart.strong.transformed.expect
new file mode 100644
index 0000000..6057834
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue42615.dart.strong.transformed.expect
@@ -0,0 +1,57 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+import "dart:async";
+
+class Class<T extends core::Object* = dynamic> extends core::Object {
+  constructor •({() →* FutureOr<core::List<self::Class::T*>*>* a = #C1}) → self::Class<self::Class::T*>*
+    : 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*;
+}
+static method method() → dynamic
+  return null;
+static method main() → dynamic {
+  new self::Class::•<dynamic>(a: () → FutureOr<core::List<dynamic>*>* /* originally async */ {
+    final asy::_AsyncAwaitCompleter<core::List<dynamic>*>* :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<dynamic>*>();
+    FutureOr<core::List<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;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L1:
+        {
+          :return_value = self::method() as{TypeError} FutureOr<core::List<dynamic>*>*;
+          break #L1;
+        }
+        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};
+  });
+}
+
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/general/micro.dart.outline.expect b/pkg/front_end/testcases/general/micro.dart.outline.expect
index 110be54..7f70142 100644
--- a/pkg/front_end/testcases/general/micro.dart.outline.expect
+++ b/pkg/front_end/testcases/general/micro.dart.outline.expect
@@ -115,8 +115,8 @@
 }
 static method staticMethod() → dynamic
   ;
-external static abstract method externalStatic() → core::bool*;
-external static abstract method createBar() → self::Bar*;
+external static method externalStatic() → core::bool*;
+external static method createBar() → self::Bar*;
 static method stringArgument(dynamic x) → dynamic
   ;
 static method intArgument(dynamic x) → dynamic
diff --git a/pkg/front_end/testcases/general/micro.dart.strong.expect b/pkg/front_end/testcases/general/micro.dart.strong.expect
index 5170680..302f493 100644
--- a/pkg/front_end/testcases/general/micro.dart.strong.expect
+++ b/pkg/front_end/testcases/general/micro.dart.strong.expect
@@ -123,8 +123,8 @@
 static method staticMethod() → dynamic {
   return "sdfg";
 }
-external static abstract method externalStatic() → core::bool*;
-external static abstract method createBar() → self::Bar*;
+external static method externalStatic() → core::bool*;
+external static method createBar() → self::Bar*;
 static method stringArgument(dynamic x) → dynamic {}
 static method intArgument(dynamic x) → dynamic {}
 static method makeDynamicCall(dynamic receiver) → void {
diff --git a/pkg/front_end/testcases/general/micro.dart.strong.transformed.expect b/pkg/front_end/testcases/general/micro.dart.strong.transformed.expect
index 5170680..302f493 100644
--- a/pkg/front_end/testcases/general/micro.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/micro.dart.strong.transformed.expect
@@ -123,8 +123,8 @@
 static method staticMethod() → dynamic {
   return "sdfg";
 }
-external static abstract method externalStatic() → core::bool*;
-external static abstract method createBar() → self::Bar*;
+external static method externalStatic() → core::bool*;
+external static method createBar() → self::Bar*;
 static method stringArgument(dynamic x) → dynamic {}
 static method intArgument(dynamic x) → dynamic {}
 static method makeDynamicCall(dynamic receiver) → void {
diff --git a/pkg/front_end/testcases/general/optional.dart.outline.expect b/pkg/front_end/testcases/general/optional.dart.outline.expect
index fc765ff..7960d64 100644
--- a/pkg/front_end/testcases/general/optional.dart.outline.expect
+++ b/pkg/front_end/testcases/general/optional.dart.outline.expect
@@ -77,6 +77,6 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
-external static abstract method createExternal() → self::External*;
+external static method createExternal() → self::External*;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/general/optional.dart.strong.expect b/pkg/front_end/testcases/general/optional.dart.strong.expect
index 699fb55..fdbfad7 100644
--- a/pkg/front_end/testcases/general/optional.dart.strong.expect
+++ b/pkg/front_end/testcases/general/optional.dart.strong.expect
@@ -108,7 +108,7 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
-external static abstract method createExternal() → self::External*;
+external static method createExternal() → self::External*;
 static method main() → dynamic {
   self::Foo* foo = new self::Foo::•();
   dynamic string1 = foo.{self::Foo::method}(1);
diff --git a/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.expect b/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.expect
index 48f5952..ae46db2 100644
--- a/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.expect
@@ -76,15 +76,15 @@
 //   Map<String, String> map61 = <String, String>{...mapSpread};
 //                                                   ^
 //
-// pkg/front_end/testcases/general/spread_collection_inference.dart:131:30: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general/spread_collection_inference.dart:131:30: Error: Can't spread a value with static type 'Null'.
 //   List<int> lhs70 = <int>[...null];
 //                              ^
 //
-// pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
 //   Set<int> set70 = <int>{...null};
 //                             ^
 //
-// pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Can't spread a value with static type 'Null'.
 //     ...null,
 //        ^
 //
@@ -92,7 +92,7 @@
 //     ...null,
 //        ^
 //
-// pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type 'Null'.
 //   Map<String, int> map70 = <String, int>{...null};
 //                                             ^
 //
@@ -302,10 +302,10 @@
   core::Map<core::String*, core::String*>* map61 = <core::String*, core::String*>{null: invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:129:51: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
   Map<String, String> map61 = <String, String>{...mapSpread};
                                                   ^"};
-  core::List<core::int*>* lhs70 = <core::int*>[invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:131:30: Error: Can't spread a value with static type Null.
+  core::List<core::int*>* lhs70 = <core::int*>[invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:131:30: Error: Can't spread a value with static type 'Null'.
   List<int> lhs70 = <int>[...null];
                              ^"];
-  core::Set<core::int*>* set70 = let final core::Set<core::int*>* #t66 = col::LinkedHashSet::•<core::int*>() in let final dynamic #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type Null.
+  core::Set<core::int*>* set70 = let final core::Set<core::int*>* #t66 = col::LinkedHashSet::•<core::int*>() in let final dynamic #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
   Set<int> set70 = <int>{...null};
                             ^") in #t66;
   core::Set<dynamic>* set71ambiguous = block {
@@ -318,7 +318,7 @@
       #t68.{core::Set::add}(#t70);
     }
   } =>#t68;
-  core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type Null.
+  core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type 'Null'.
   Map<String, int> map70 = <String, int>{...null};
                                             ^": null};
   core::List<core::int*>* lhs80 = block {
diff --git a/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.transformed.expect
index 91386ae..e42c97f 100644
--- a/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/spread_collection_inference.dart.strong.transformed.expect
@@ -76,15 +76,15 @@
 //   Map<String, String> map61 = <String, String>{...mapSpread};
 //                                                   ^
 //
-// pkg/front_end/testcases/general/spread_collection_inference.dart:131:30: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general/spread_collection_inference.dart:131:30: Error: Can't spread a value with static type 'Null'.
 //   List<int> lhs70 = <int>[...null];
 //                              ^
 //
-// pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
 //   Set<int> set70 = <int>{...null};
 //                             ^
 //
-// pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general/spread_collection_inference.dart:137:8: Error: Can't spread a value with static type 'Null'.
 //     ...null,
 //        ^
 //
@@ -92,7 +92,7 @@
 //     ...null,
 //        ^
 //
-// pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type 'Null'.
 //   Map<String, int> map70 = <String, int>{...null};
 //                                             ^
 //
@@ -431,10 +431,10 @@
   core::Map<core::String*, core::String*>* map61 = <core::String*, core::String*>{null: invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:129:51: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
   Map<String, String> map61 = <String, String>{...mapSpread};
                                                   ^"};
-  core::List<core::int*>* lhs70 = <core::int*>[invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:131:30: Error: Can't spread a value with static type Null.
+  core::List<core::int*>* lhs70 = <core::int*>[invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:131:30: Error: Can't spread a value with static type 'Null'.
   List<int> lhs70 = <int>[...null];
                              ^"];
-  core::Set<core::int*>* set70 = let final core::Set<core::int*>* #t66 = col::LinkedHashSet::•<core::int*>() in let final core::bool #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type Null.
+  core::Set<core::int*>* set70 = let final core::Set<core::int*>* #t66 = col::LinkedHashSet::•<core::int*>() in let final core::bool #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:133:29: Error: Can't spread a value with static type 'Null'.
   Set<int> set70 = <int>{...null};
                             ^") in #t66;
   core::Set<dynamic>* set71ambiguous = block {
@@ -453,7 +453,7 @@
       }
     }
   } =>#t68;
-  core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type Null.
+  core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general/spread_collection_inference.dart:142:45: Error: Can't spread a value with static type 'Null'.
   Map<String, int> map70 = <String, int>{...null};
                                             ^": null};
   core::List<core::int*>* lhs80 = block {
diff --git a/pkg/front_end/testcases/general/type_variable_bound_access.dart b/pkg/front_end/testcases/general/type_variable_bound_access.dart
index 720e493..b25ab04 100644
--- a/pkg/front_end/testcases/general/type_variable_bound_access.dart
+++ b/pkg/front_end/testcases/general/type_variable_bound_access.dart
@@ -22,6 +22,25 @@
   num method2() => field1 + field2.length;
 }
 
+class Class<X5 extends X4, X4 extends X3, X3 extends X2, X2 extends X1,
+    X1 extends X0, X0 extends int> {
+  X0 field0;
+  X1 field1;
+  X2 field2;
+  X3 field3;
+  X4 field4;
+  X5 field5;
+
+  method() {
+    field0.isEven;
+    field1.isEven;
+    field2.isEven;
+    field3.isEven;
+    field4.isEven;
+    field5.isEven;
+  }
+}
+
 main() {
   new DynamicClass<num, int>(0.5, 2).method();
   new NumClass<num, double>(2, 0.5).method1();
diff --git a/pkg/front_end/testcases/general/type_variable_bound_access.dart.outline.expect b/pkg/front_end/testcases/general/type_variable_bound_access.dart.outline.expect
index 6638397..b79b1d4 100644
--- a/pkg/front_end/testcases/general/type_variable_bound_access.dart.outline.expect
+++ b/pkg/front_end/testcases/general/type_variable_bound_access.dart.outline.expect
@@ -40,5 +40,27 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
+class Class<X5 extends self::Class::X4* = core::int*, X4 extends self::Class::X3* = core::int*, X3 extends self::Class::X2* = core::int*, X2 extends self::Class::X1* = core::int*, X1 extends self::Class::X0* = core::int*, X0 extends core::int* = core::int*> extends core::Object {
+  generic-covariant-impl field self::Class::X0* field0;
+  generic-covariant-impl field self::Class::X1* field1;
+  generic-covariant-impl field self::Class::X2* field2;
+  generic-covariant-impl field self::Class::X3* field3;
+  generic-covariant-impl field self::Class::X4* field4;
+  generic-covariant-impl field self::Class::X5* field5;
+  synthetic constructor •() → self::Class<self::Class::X5*, self::Class::X4*, self::Class::X3*, self::Class::X2*, self::Class::X1*, self::Class::X0*>*
+    ;
+  method method() → 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 method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get runtimeType() → core::Type*;
+}
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/general/type_variable_bound_access.dart.strong.expect b/pkg/front_end/testcases/general/type_variable_bound_access.dart.strong.expect
index b39193d..e9cd064 100644
--- a/pkg/front_end/testcases/general/type_variable_bound_access.dart.strong.expect
+++ b/pkg/front_end/testcases/general/type_variable_bound_access.dart.strong.expect
@@ -53,6 +53,35 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
+class Class<X5 extends self::Class::X4* = core::int*, X4 extends self::Class::X3* = core::int*, X3 extends self::Class::X2* = core::int*, X2 extends self::Class::X1* = core::int*, X1 extends self::Class::X0* = core::int*, X0 extends core::int* = core::int*> extends core::Object {
+  generic-covariant-impl field self::Class::X0* field0 = null;
+  generic-covariant-impl field self::Class::X1* field1 = null;
+  generic-covariant-impl field self::Class::X2* field2 = null;
+  generic-covariant-impl field self::Class::X3* field3 = null;
+  generic-covariant-impl field self::Class::X4* field4 = null;
+  generic-covariant-impl field self::Class::X5* field5 = null;
+  synthetic constructor •() → self::Class<self::Class::X5*, self::Class::X4*, self::Class::X3*, self::Class::X2*, self::Class::X1*, self::Class::X0*>*
+    : super core::Object::•()
+    ;
+  method method() → dynamic {
+    this.{self::Class::field0}.{core::int::isEven};
+    this.{self::Class::field1}.{core::int::isEven};
+    this.{self::Class::field2}.{core::int::isEven};
+    this.{self::Class::field3}.{core::int::isEven};
+    this.{self::Class::field4}.{core::int::isEven};
+    this.{self::Class::field5}.{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*;
+}
 static method main() → dynamic {
   new self::DynamicClass::•<core::num*, core::int*>(0.5, 2).{self::DynamicClass::method}();
   new self::NumClass::•<core::num*, core::double*>(2, 0.5).{self::NumClass::method1}();
diff --git a/pkg/front_end/testcases/general/type_variable_bound_access.dart.textual_outline.expect b/pkg/front_end/testcases/general/type_variable_bound_access.dart.textual_outline.expect
index d7f2e46..1b5e45c 100644
--- a/pkg/front_end/testcases/general/type_variable_bound_access.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/general/type_variable_bound_access.dart.textual_outline.expect
@@ -13,4 +13,15 @@
   num method2() => field1 + field2.length;
 }
 
+class Class<X5 extends X4, X4 extends X3, X3 extends X2, X2 extends X1,
+    X1 extends X0, X0 extends int> {
+  X0 field0;
+  X1 field1;
+  X2 field2;
+  X3 field3;
+  X4 field4;
+  X5 field5;
+  method() {}
+}
+
 main() {}
diff --git a/pkg/front_end/testcases/general/type_variable_bound_access.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/type_variable_bound_access.dart.textual_outline_modelled.expect
index b92c57e..fdcee0a 100644
--- a/pkg/front_end/testcases/general/type_variable_bound_access.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/general/type_variable_bound_access.dart.textual_outline_modelled.expect
@@ -1,3 +1,14 @@
+class Class<X5 extends X4, X4 extends X3, X3 extends X2, X2 extends X1,
+    X1 extends X0, X0 extends int> {
+  X0 field0;
+  X1 field1;
+  X2 field2;
+  X3 field3;
+  X4 field4;
+  X5 field5;
+  method() {}
+}
+
 class DynamicClass<T extends dynamic, S extends T> {
   DynamicClass(this.field1, this.field2);
   T field1;
diff --git a/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.outline.expect
index ab86f3d..9e34fc2 100644
--- a/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.outline.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.outline.expect
@@ -18,7 +18,7 @@
 class A extends core::Object {
   synthetic constructor •() → mai::A*
     ;
-  @core::override
+  @#C1
   abstract 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*;
@@ -30,3 +30,7 @@
   abstract member-signature method toString() → core::String*;
   abstract member-signature get runtimeType() → core::Type*;
 }
+
+constants  {
+  #C1 = core::_Override {}
+}
diff --git a/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.outline.expect
index 5fecce1..4d03c6d 100644
--- a/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.outline.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.outline.expect
@@ -73,10 +73,23 @@
 import self as self3;
 import "dart:core" as core;
 
-abstract class _Foo&B&D = self3::B with self3::D /*isAnonymousMixin*/  {
+abstract class _Foo&B&D extends self3::B implements self3::D /*isAnonymousMixin,isEliminatedMixin*/  {
   synthetic constructor •() → self3::_Foo&B&D*
     : super self3::B::•()
     ;
+  operator ==(dynamic dynamic) → core::bool*
+    ;
+  method x() → 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 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*;
 }
 class Foo extends self3::_Foo&B&D {
   synthetic constructor •() → self3::Foo*
diff --git a/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.expect b/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.expect
index b8e0c04..7ee0498 100644
--- a/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.expect
@@ -8,11 +8,11 @@
 
 static method main() → dynamic {
   mix::Foo* foo1 = new mix::Foo::•();
-  if(foo1.{mix::D::==}(null))
+  if(foo1.{mix::_Foo&B&D::==}(null))
     throw "what?";
-  if(!foo1.{mix::D::==}(foo1))
+  if(!foo1.{mix::_Foo&B&D::==}(foo1))
     throw "what?";
-  foo1.{mix::D::x}();
+  foo1.{mix::_Foo&B&D::x}();
   mix2::Foo* foo2 = new mix2::Foo::•();
   if(foo2.{mix2::D::==}(null))
     throw "what?";
@@ -97,10 +97,26 @@
 import self as mix;
 import "dart:core" as core;
 
-abstract class _Foo&B&D = mix::B with mix::D /*isAnonymousMixin*/  {
+abstract class _Foo&B&D extends mix::B implements mix::D /*isAnonymousMixin,isEliminatedMixin*/  {
   synthetic constructor •() → mix::_Foo&B&D*
     : super mix::B::•()
     ;
+  operator ==(dynamic dynamic) → core::bool* {
+    core::print("D.==");
+    return true;
+  }
+  method x() → void {
+    core::print("D.x");
+  }
+  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 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*;
 }
 class Foo extends mix::_Foo&B&D {
   synthetic constructor •() → mix::Foo*
diff --git a/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.transformed.expect
index 15b0ec5..133d5d8 100644
--- a/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.transformed.expect
@@ -8,11 +8,11 @@
 
 static method main() → dynamic {
   mix::Foo* foo1 = new mix::Foo::•();
-  if(foo1.{mix::D::==}(null))
+  if(foo1.{mix::_Foo&B&D::==}(null))
     throw "what?";
-  if(!foo1.{mix::D::==}(foo1))
+  if(!foo1.{mix::_Foo&B&D::==}(foo1))
     throw "what?";
-  foo1.{mix::D::x}();
+  foo1.{mix::_Foo&B&D::x}();
   mix2::Foo* foo2 = new mix2::Foo::•();
   if(foo2.{mix2::D::==}(null))
     throw "what?";
@@ -113,10 +113,26 @@
 import self as mix;
 import "dart:core" as core;
 
-abstract class _Foo&B&D = mix::B with mix::D /*isAnonymousMixin*/  {
+abstract class _Foo&B&D extends mix::B implements mix::D /*isAnonymousMixin,isEliminatedMixin*/  {
   synthetic constructor •() → mix::_Foo&B&D*
     : super mix::B::•()
     ;
+  operator ==(dynamic dynamic) → core::bool* {
+    core::print("D.==");
+    return true;
+  }
+  method x() → void {
+    core::print("D.x");
+  }
+  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 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*;
 }
 class Foo extends mix::_Foo&B&D {
   synthetic constructor •() → mix::Foo*
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/link.options b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/link.options
new file mode 100644
index 0000000..dae3436
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/link.options
@@ -0,0 +1,2 @@
+stub_or_not_lib1.dart
+stub_or_not_lib2.dart
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart
new file mode 100644
index 0000000..5a443a4
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart
@@ -0,0 +1,9 @@
+// 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 'stub_or_not_lib1.dart';
+
+class ProblemClass extends Foo {}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.outline.expect
new file mode 100644
index 0000000..35b37a6
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.outline.expect
@@ -0,0 +1,85 @@
+library;
+import self as self;
+import "stub_or_not_lib1.dart" as stu;
+
+import "org-dartlang-testcase:///stub_or_not_lib1.dart";
+
+class ProblemClass extends stu::Foo {
+  synthetic constructor •() → self::ProblemClass*
+    ;
+}
+static method main() → dynamic
+  ;
+
+library;
+import self as stu;
+import "dart:core" as core;
+import "stub_or_not_lib2.dart" as stu2;
+
+import "org-dartlang-testcase:///stub_or_not_lib2.dart";
+
+abstract class Qux extends core::Object implements stu2::EventFileA {
+  synthetic constructor •() → stu::Qux*
+    ;
+  method handleEvent(covariant stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileBPrime extends stu2::EvenFileB {
+  synthetic constructor •() → stu::EvenFileBPrime*
+    ;
+}
+abstract class Baz extends stu::Qux {
+  synthetic constructor •() → stu::Baz*
+    ;
+  method handleEvent(covariant stu::EvenFileBPrime* entry) → void
+    ;
+}
+abstract class Foo extends stu::Baz implements stu::Qux {
+  synthetic constructor •() → stu::Foo*
+    ;
+  abstract forwarding-stub method handleEvent(covariant stu2::EvenFileB* entry) → void;
+}
+
+library;
+import self as stu2;
+import "dart:core" as core;
+
+abstract class EventFileA extends core::Object {
+  synthetic constructor •() → stu2::EventFileA*
+    ;
+  abstract method handleEvent(stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileB extends core::Object {
+  synthetic constructor •() → stu2::EvenFileB*
+    ;
+  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/general/with_dependencies/stub_or_not/stub_or_not.dart.strong.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.strong.expect
new file mode 100644
index 0000000..e5802ab
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.strong.expect
@@ -0,0 +1,89 @@
+library;
+import self as self;
+import "stub_or_not_lib1.dart" as stu;
+
+import "org-dartlang-testcase:///stub_or_not_lib1.dart";
+
+class ProblemClass extends stu::Foo {
+  synthetic constructor •() → self::ProblemClass*
+    : super stu::Foo::•()
+    ;
+}
+static method main() → dynamic {}
+
+library;
+import self as stu;
+import "dart:core" as core;
+import "stub_or_not_lib2.dart" as stu2;
+
+import "org-dartlang-testcase:///stub_or_not_lib2.dart";
+
+abstract class Qux extends core::Object implements stu2::EventFileA {
+  synthetic constructor •() → stu::Qux*
+    : super core::Object::•()
+    ;
+  method handleEvent(covariant stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileBPrime extends stu2::EvenFileB {
+  synthetic constructor •() → stu::EvenFileBPrime*
+    : super stu2::EvenFileB::•()
+    ;
+}
+abstract class Baz extends stu::Qux {
+  synthetic constructor •() → stu::Baz*
+    : super stu::Qux::•()
+    ;
+  method handleEvent(covariant stu::EvenFileBPrime* entry) → void {}
+}
+abstract class Foo extends stu::Baz implements stu::Qux {
+  synthetic constructor •() → stu::Foo*
+    : super stu::Baz::•()
+    ;
+  abstract forwarding-stub method handleEvent(covariant stu2::EvenFileB* entry) → void;
+}
+
+library;
+import self as stu2;
+import "dart:core" as core;
+
+abstract class EventFileA extends core::Object {
+  synthetic constructor •() → stu2::EventFileA*
+    : super core::Object::•()
+    ;
+  abstract method handleEvent(stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileB extends core::Object {
+  synthetic constructor •() → stu2::EvenFileB*
+    : 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/general/with_dependencies/stub_or_not/stub_or_not.dart.strong.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.strong.transformed.expect
new file mode 100644
index 0000000..e5802ab
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.strong.transformed.expect
@@ -0,0 +1,89 @@
+library;
+import self as self;
+import "stub_or_not_lib1.dart" as stu;
+
+import "org-dartlang-testcase:///stub_or_not_lib1.dart";
+
+class ProblemClass extends stu::Foo {
+  synthetic constructor •() → self::ProblemClass*
+    : super stu::Foo::•()
+    ;
+}
+static method main() → dynamic {}
+
+library;
+import self as stu;
+import "dart:core" as core;
+import "stub_or_not_lib2.dart" as stu2;
+
+import "org-dartlang-testcase:///stub_or_not_lib2.dart";
+
+abstract class Qux extends core::Object implements stu2::EventFileA {
+  synthetic constructor •() → stu::Qux*
+    : super core::Object::•()
+    ;
+  method handleEvent(covariant stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileBPrime extends stu2::EvenFileB {
+  synthetic constructor •() → stu::EvenFileBPrime*
+    : super stu2::EvenFileB::•()
+    ;
+}
+abstract class Baz extends stu::Qux {
+  synthetic constructor •() → stu::Baz*
+    : super stu::Qux::•()
+    ;
+  method handleEvent(covariant stu::EvenFileBPrime* entry) → void {}
+}
+abstract class Foo extends stu::Baz implements stu::Qux {
+  synthetic constructor •() → stu::Foo*
+    : super stu::Baz::•()
+    ;
+  abstract forwarding-stub method handleEvent(covariant stu2::EvenFileB* entry) → void;
+}
+
+library;
+import self as stu2;
+import "dart:core" as core;
+
+abstract class EventFileA extends core::Object {
+  synthetic constructor •() → stu2::EventFileA*
+    : super core::Object::•()
+    ;
+  abstract method handleEvent(stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileB extends core::Object {
+  synthetic constructor •() → stu2::EvenFileB*
+    : 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/general/with_dependencies/stub_or_not/stub_or_not.dart.textual_outline.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.textual_outline.expect
new file mode 100644
index 0000000..33ce9da
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+import 'stub_or_not_lib1.dart';
+
+class ProblemClass extends Foo {}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..33ce9da
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+import 'stub_or_not_lib1.dart';
+
+class ProblemClass extends Foo {}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart
new file mode 100644
index 0000000..5a443a4
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart
@@ -0,0 +1,9 @@
+// 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 'stub_or_not_lib1.dart';
+
+class ProblemClass extends Foo {}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.outline.expect
new file mode 100644
index 0000000..2d74190
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.outline.expect
@@ -0,0 +1,87 @@
+library;
+import self as self;
+import "stub_or_not_lib1.dart" as stu;
+import "stub_or_not_lib2.dart" as stu2;
+
+import "org-dartlang-testcase:///stub_or_not_lib1.dart";
+
+class ProblemClass extends stu::Foo {
+  synthetic constructor •() → self::ProblemClass*
+    ;
+  abstract forwarding-stub method handleEvent(covariant stu2::EvenFileB* entry) → void;
+}
+static method main() → dynamic
+  ;
+
+library;
+import self as stu;
+import "dart:core" as core;
+import "stub_or_not_lib2.dart" as stu2;
+
+import "org-dartlang-testcase:///stub_or_not_lib2.dart";
+
+abstract class Qux extends core::Object implements stu2::EventFileA {
+  synthetic constructor •() → stu::Qux*
+    ;
+  method handleEvent(covariant stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileBPrime extends stu2::EvenFileB {
+  synthetic constructor •() → stu::EvenFileBPrime*
+    ;
+}
+abstract class Baz extends stu::Qux {
+  synthetic constructor •() → stu::Baz*
+    ;
+  method handleEvent(covariant stu::EvenFileBPrime* entry) → void
+    ;
+}
+abstract class Foo extends stu::Baz implements stu::Qux {
+  synthetic constructor •() → stu::Foo*
+    ;
+  abstract forwarding-stub method handleEvent(covariant stu2::EvenFileB* entry) → void;
+}
+
+library;
+import self as stu2;
+import "dart:core" as core;
+
+abstract class EventFileA extends core::Object {
+  synthetic constructor •() → stu2::EventFileA*
+    ;
+  abstract method handleEvent(stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileB extends core::Object {
+  synthetic constructor •() → stu2::EvenFileB*
+    ;
+  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/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.strong.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.strong.expect
new file mode 100644
index 0000000..077097a
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.strong.expect
@@ -0,0 +1,91 @@
+library;
+import self as self;
+import "stub_or_not_lib1.dart" as stu;
+import "stub_or_not_lib2.dart" as stu2;
+
+import "org-dartlang-testcase:///stub_or_not_lib1.dart";
+
+class ProblemClass extends stu::Foo {
+  synthetic constructor •() → self::ProblemClass*
+    : super stu::Foo::•()
+    ;
+  abstract forwarding-stub method handleEvent(covariant stu2::EvenFileB* entry) → void;
+}
+static method main() → dynamic {}
+
+library;
+import self as stu;
+import "dart:core" as core;
+import "stub_or_not_lib2.dart" as stu2;
+
+import "org-dartlang-testcase:///stub_or_not_lib2.dart";
+
+abstract class Qux extends core::Object implements stu2::EventFileA {
+  synthetic constructor •() → stu::Qux*
+    : super core::Object::•()
+    ;
+  method handleEvent(covariant stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileBPrime extends stu2::EvenFileB {
+  synthetic constructor •() → stu::EvenFileBPrime*
+    : super stu2::EvenFileB::•()
+    ;
+}
+abstract class Baz extends stu::Qux {
+  synthetic constructor •() → stu::Baz*
+    : super stu::Qux::•()
+    ;
+  method handleEvent(covariant stu::EvenFileBPrime* entry) → void {}
+}
+abstract class Foo extends stu::Baz implements stu::Qux {
+  synthetic constructor •() → stu::Foo*
+    : super stu::Baz::•()
+    ;
+  abstract forwarding-stub method handleEvent(covariant stu2::EvenFileB* entry) → void;
+}
+
+library;
+import self as stu2;
+import "dart:core" as core;
+
+abstract class EventFileA extends core::Object {
+  synthetic constructor •() → stu2::EventFileA*
+    : super core::Object::•()
+    ;
+  abstract method handleEvent(stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileB extends core::Object {
+  synthetic constructor •() → stu2::EvenFileB*
+    : 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/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.strong.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.strong.transformed.expect
new file mode 100644
index 0000000..077097a
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.strong.transformed.expect
@@ -0,0 +1,91 @@
+library;
+import self as self;
+import "stub_or_not_lib1.dart" as stu;
+import "stub_or_not_lib2.dart" as stu2;
+
+import "org-dartlang-testcase:///stub_or_not_lib1.dart";
+
+class ProblemClass extends stu::Foo {
+  synthetic constructor •() → self::ProblemClass*
+    : super stu::Foo::•()
+    ;
+  abstract forwarding-stub method handleEvent(covariant stu2::EvenFileB* entry) → void;
+}
+static method main() → dynamic {}
+
+library;
+import self as stu;
+import "dart:core" as core;
+import "stub_or_not_lib2.dart" as stu2;
+
+import "org-dartlang-testcase:///stub_or_not_lib2.dart";
+
+abstract class Qux extends core::Object implements stu2::EventFileA {
+  synthetic constructor •() → stu::Qux*
+    : super core::Object::•()
+    ;
+  method handleEvent(covariant stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileBPrime extends stu2::EvenFileB {
+  synthetic constructor •() → stu::EvenFileBPrime*
+    : super stu2::EvenFileB::•()
+    ;
+}
+abstract class Baz extends stu::Qux {
+  synthetic constructor •() → stu::Baz*
+    : super stu::Qux::•()
+    ;
+  method handleEvent(covariant stu::EvenFileBPrime* entry) → void {}
+}
+abstract class Foo extends stu::Baz implements stu::Qux {
+  synthetic constructor •() → stu::Foo*
+    : super stu::Baz::•()
+    ;
+  abstract forwarding-stub method handleEvent(covariant stu2::EvenFileB* entry) → void;
+}
+
+library;
+import self as stu2;
+import "dart:core" as core;
+
+abstract class EventFileA extends core::Object {
+  synthetic constructor •() → stu2::EventFileA*
+    : super core::Object::•()
+    ;
+  abstract method handleEvent(stu2::EvenFileB* entry) → 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*;
+}
+class EvenFileB extends core::Object {
+  synthetic constructor •() → stu2::EvenFileB*
+    : 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/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.textual_outline.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.textual_outline.expect
new file mode 100644
index 0000000..33ce9da
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+import 'stub_or_not_lib1.dart';
+
+class ProblemClass extends Foo {}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..33ce9da
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not.no_link.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+import 'stub_or_not_lib1.dart';
+
+class ProblemClass extends Foo {}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not_lib1.dart b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not_lib1.dart
new file mode 100644
index 0000000..ae62042
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not_lib1.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.
+
+import 'stub_or_not_lib2.dart';
+
+abstract class Qux implements EventFileA {
+  void handleEvent(covariant EvenFileB entry) {}
+}
+
+class EvenFileBPrime extends EvenFileB {}
+
+abstract class Baz extends Qux {
+  void handleEvent(EvenFileBPrime entry) {}
+}
+
+abstract class Foo extends Baz implements Qux {}
diff --git a/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not_lib2.dart b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not_lib2.dart
new file mode 100644
index 0000000..9a30c0e
--- /dev/null
+++ b/pkg/front_end/testcases/general/with_dependencies/stub_or_not/stub_or_not_lib2.dart
@@ -0,0 +1,9 @@
+// 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 EventFileA {
+  void handleEvent(EvenFileB entry);
+}
+
+class EvenFileB {}
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/micro.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/micro.dart.weak.expect
index 5170680..302f493 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/micro.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/micro.dart.weak.expect
@@ -123,8 +123,8 @@
 static method staticMethod() → dynamic {
   return "sdfg";
 }
-external static abstract method externalStatic() → core::bool*;
-external static abstract method createBar() → self::Bar*;
+external static method externalStatic() → core::bool*;
+external static method createBar() → self::Bar*;
 static method stringArgument(dynamic x) → dynamic {}
 static method intArgument(dynamic x) → dynamic {}
 static method makeDynamicCall(dynamic receiver) → void {
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/micro.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/micro.dart.weak.transformed.expect
index 5170680..302f493 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/micro.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/micro.dart.weak.transformed.expect
@@ -123,8 +123,8 @@
 static method staticMethod() → dynamic {
   return "sdfg";
 }
-external static abstract method externalStatic() → core::bool*;
-external static abstract method createBar() → self::Bar*;
+external static method externalStatic() → core::bool*;
+external static method createBar() → self::Bar*;
 static method stringArgument(dynamic x) → dynamic {}
 static method intArgument(dynamic x) → dynamic {}
 static method makeDynamicCall(dynamic receiver) → void {
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/optional.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/optional.dart.weak.expect
index 6e7a5a8..79679d1 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/optional.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/optional.dart.weak.expect
@@ -108,7 +108,7 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
-external static abstract method createExternal() → self::External*;
+external static method createExternal() → self::External*;
 static method main() → dynamic {
   self::Foo* foo = new self::Foo::•();
   dynamic string1 = foo.{self::Foo::method}(1);
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart.weak.expect
index 5ff3546..977c606 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart.weak.expect
@@ -76,15 +76,15 @@
 //   Map<String, String> map61 = <String, String>{...mapSpread};
 //                                                   ^
 //
-// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:133:30: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:133:30: Error: Can't spread a value with static type 'Null'.
 //   List<int> lhs70 = <int>[...null];
 //                              ^
 //
-// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type 'Null'.
 //   Set<int> set70 = <int>{...null};
 //                             ^
 //
-// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:139:8: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:139:8: Error: Can't spread a value with static type 'Null'.
 //     ...null,
 //        ^
 //
@@ -92,7 +92,7 @@
 //     ...null,
 //        ^
 //
-// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:144:45: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:144:45: Error: Can't spread a value with static type 'Null'.
 //   Map<String, int> map70 = <String, int>{...null};
 //                                             ^
 //
@@ -302,10 +302,10 @@
   core::Map<core::String*, core::String*>* map61 = <core::String*, core::String*>{null: invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:131:51: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
   Map<String, String> map61 = <String, String>{...mapSpread};
                                                   ^"};
-  core::List<core::int*>* lhs70 = <core::int*>[invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:133:30: Error: Can't spread a value with static type Null.
+  core::List<core::int*>* lhs70 = <core::int*>[invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:133:30: Error: Can't spread a value with static type 'Null'.
   List<int> lhs70 = <int>[...null];
                              ^"];
-  core::Set<core::int*>* set70 = let final core::Set<core::int*>* #t66 = col::LinkedHashSet::•<core::int*>() in let final dynamic #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type Null.
+  core::Set<core::int*>* set70 = let final core::Set<core::int*>* #t66 = col::LinkedHashSet::•<core::int*>() in let final dynamic #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type 'Null'.
   Set<int> set70 = <int>{...null};
                             ^") in #t66;
   core::Set<dynamic>* set71ambiguous = block {
@@ -318,7 +318,7 @@
       #t68.{core::Set::add}(#t70);
     }
   } =>#t68;
-  core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:144:45: Error: Can't spread a value with static type Null.
+  core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:144:45: Error: Can't spread a value with static type 'Null'.
   Map<String, int> map70 = <String, int>{...null};
                                             ^": null};
   core::List<core::int*>* lhs80 = block {
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart.weak.transformed.expect
index 69e0bad..6e97878 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart.weak.transformed.expect
@@ -76,15 +76,15 @@
 //   Map<String, String> map61 = <String, String>{...mapSpread};
 //                                                   ^
 //
-// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:133:30: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:133:30: Error: Can't spread a value with static type 'Null'.
 //   List<int> lhs70 = <int>[...null];
 //                              ^
 //
-// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type 'Null'.
 //   Set<int> set70 = <int>{...null};
 //                             ^
 //
-// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:139:8: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:139:8: Error: Can't spread a value with static type 'Null'.
 //     ...null,
 //        ^
 //
@@ -92,7 +92,7 @@
 //     ...null,
 //        ^
 //
-// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:144:45: Error: Can't spread a value with static type Null.
+// pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:144:45: Error: Can't spread a value with static type 'Null'.
 //   Map<String, int> map70 = <String, int>{...null};
 //                                             ^
 //
@@ -431,10 +431,10 @@
   core::Map<core::String*, core::String*>* map61 = <core::String*, core::String*>{null: invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:131:51: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
   Map<String, String> map61 = <String, String>{...mapSpread};
                                                   ^"};
-  core::List<core::int*>* lhs70 = <core::int*>[invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:133:30: Error: Can't spread a value with static type Null.
+  core::List<core::int*>* lhs70 = <core::int*>[invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:133:30: Error: Can't spread a value with static type 'Null'.
   List<int> lhs70 = <int>[...null];
                              ^"];
-  core::Set<core::int*>* set70 = let final core::Set<core::int*>* #t66 = col::LinkedHashSet::•<core::int*>() in let final core::bool #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type Null.
+  core::Set<core::int*>* set70 = let final core::Set<core::int*>* #t66 = col::LinkedHashSet::•<core::int*>() in let final core::bool #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:135:29: Error: Can't spread a value with static type 'Null'.
   Set<int> set70 = <int>{...null};
                             ^") in #t66;
   core::Set<dynamic>* set71ambiguous = block {
@@ -453,7 +453,7 @@
       }
     }
   } =>#t68;
-  core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:144:45: Error: Can't spread a value with static type Null.
+  core::Map<core::String*, core::int*>* map70 = <core::String*, core::int*>{invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/spread_collection_inference.dart:144:45: Error: Can't spread a value with static type 'Null'.
   Map<String, int> map70 = <String, int>{...null};
                                             ^": null};
   core::List<core::int*>* lhs80 = block {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml
new file mode 100644
index 0000000..ccf7702
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml
@@ -0,0 +1,82 @@
+# 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.
+
+type: newworld
+target: DDC
+trackWidgetCreation: true
+worlds:
+  - entry: main.dart
+    experiments: non-nullable
+    sources:
+      main.dart: |
+        import 'foo.dart';
+      foo.dart:
+        import 'package:flutter/src/widgets/framework.dart';
+        import 'package:flutter/src/widgets/widget_inspector.dart';
+
+        class Foo extends Widget {
+          const Foo();
+        }
+      flutter/lib/src/widgets/framework.dart: |
+        abstract class Bar {
+          const Bar();
+        }
+
+        abstract class Widget extends Bar {
+          const Widget();
+        }
+      flutter/lib/src/widgets/widget_inspector.dart: |
+        abstract class _HasCreationLocation {
+          _Location get _location;
+        }
+
+        /// A tuple with file, line, and column number, for displaying human-readable
+        /// file locations.
+        class _Location {
+          const _Location({
+            required this.file,
+            required this.line,
+            required this.column,
+            required this.name,
+            required this.parameterLocations,
+          });
+
+          /// File path of the location.
+          final String file;
+
+          /// 1-based line number.
+          final int line;
+
+          /// 1-based column number.
+          final int column;
+
+          /// Optional name of the parameter or function at this location.
+          final String name;
+
+          /// Optional locations of the parameters of the member at this location.
+          final List<_Location> parameterLocations;
+        }
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "flutter",
+              "rootUri": "../flutter",
+              "packageUri": "lib/"
+            }
+          ]
+        }
+    expectedLibraryCount: 4
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        import 'foo.dart';
+
+        Foo foo = const Foo();
+    expectedLibraryCount: 4
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.1.expect
new file mode 100644
index 0000000..cf1b295
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.1.expect
@@ -0,0 +1,53 @@
+main = <No Member>;
+library from "package:flutter/src/widgets/framework.dart" as fra {
+
+  abstract class Bar extends dart.core::Object /*hasConstConstructor*/  {
+    const constructor •() → fra::Bar
+      : super dart.core::Object::•()
+      ;
+  }
+  abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
+    final field wid::_Location? _location /*isNullableByDefault, from null */;
+    const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      ;
+  }
+}
+library from "package:flutter/src/widgets/widget_inspector.dart" as wid {
+
+  abstract class _HasCreationLocation extends dart.core::Object {
+    synthetic constructor •() → wid::_HasCreationLocation
+      : super dart.core::Object::•()
+      ;
+    abstract get _location() → wid::_Location;
+  }
+  class _Location extends dart.core::Object /*hasConstConstructor*/  {
+    final field dart.core::String file;
+    final field dart.core::int line;
+    final field dart.core::int column;
+    final field dart.core::String name;
+    final field dart.core::List<wid::_Location> parameterLocations;
+    const constructor •({required dart.core::String file = #C1, required dart.core::int line = #C1, required dart.core::int column = #C1, required dart.core::String name = #C1, required dart.core::List<wid::_Location> parameterLocations = #C1}) → wid::_Location
+      : wid::_Location::file = file, wid::_Location::line = line, wid::_Location::column = column, wid::_Location::name = name, wid::_Location::parameterLocations = parameterLocations, super dart.core::Object::•()
+      ;
+  }
+}
+library from "org-dartlang-test:///foo.dart" as foo {
+
+  import "package:flutter/src/widgets/framework.dart";
+  import "package:flutter/src/widgets/widget_inspector.dart";
+
+  class Foo extends fra::Widget /*hasConstConstructor*/  {
+    const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → foo::Foo
+      : super fra::Widget::•($creationLocationd_0dea112b090073317d4: $creationLocationd_0dea112b090073317d4)
+      ;
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///foo.dart";
+
+}
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.2.expect
new file mode 100644
index 0000000..c2ce924
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.2.expect
@@ -0,0 +1,60 @@
+main = <No Member>;
+library from "package:flutter/src/widgets/framework.dart" as fra {
+
+  abstract class Bar extends dart.core::Object /*hasConstConstructor*/  {
+    const constructor •() → fra::Bar
+      : super dart.core::Object::•()
+      ;
+  }
+  abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
+    final field wid::_Location? _location /*isNullableByDefault, from null */;
+    const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      ;
+  }
+}
+library from "package:flutter/src/widgets/widget_inspector.dart" as wid {
+
+  abstract class _HasCreationLocation extends dart.core::Object {
+    synthetic constructor •() → wid::_HasCreationLocation
+      : super dart.core::Object::•()
+      ;
+    abstract get _location() → wid::_Location;
+  }
+  class _Location extends dart.core::Object /*hasConstConstructor*/  {
+    final field dart.core::String file;
+    final field dart.core::int line;
+    final field dart.core::int column;
+    final field dart.core::String name;
+    final field dart.core::List<wid::_Location> parameterLocations;
+    const constructor •({required dart.core::String file = #C1, required dart.core::int line = #C1, required dart.core::int column = #C1, required dart.core::String name = #C1, required dart.core::List<wid::_Location> parameterLocations = #C1}) → wid::_Location
+      : wid::_Location::file = file, wid::_Location::line = line, wid::_Location::column = column, wid::_Location::name = name, wid::_Location::parameterLocations = parameterLocations, super dart.core::Object::•()
+      ;
+  }
+}
+library from "org-dartlang-test:///foo.dart" as foo {
+
+  import "package:flutter/src/widgets/framework.dart";
+  import "package:flutter/src/widgets/widget_inspector.dart";
+
+  class Foo extends fra::Widget /*hasConstConstructor*/  {
+    const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → foo::Foo
+      : super fra::Widget::•($creationLocationd_0dea112b090073317d4: $creationLocationd_0dea112b090073317d4)
+      ;
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///foo.dart";
+
+  static field foo::Foo foo = #C7;
+}
+constants  {
+  #C1 = null
+  #C2 = "org-dartlang-test:///main.dart"
+  #C3 = 3.0
+  #C4 = 17.0
+  #C5 = <wid::_Location*>[]
+  #C6 = wid::_Location {file:#C2, line:#C3, column:#C4, name:#C1, parameterLocations:#C5}
+  #C7 = foo::Foo {_location:#C6}
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml
new file mode 100644
index 0000000..4f4309f
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml
@@ -0,0 +1,76 @@
+# 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.
+
+type: newworld
+target: DDC
+trackWidgetCreation: true
+worlds:
+  - entry: main.dart
+    experiments: non-nullable
+    sources:
+      main.dart: |
+        import 'foo.dart';
+      foo.dart:
+        import 'package:flutter/src/widgets/framework.dart';
+        import 'package:flutter/src/widgets/widget_inspector.dart';
+
+        class Foo extends Widget {
+          final String name;
+
+          Foo({required this.name});
+        }
+      flutter/lib/src/widgets/framework.dart: |
+        abstract class Bar {
+          const Bar();
+        }
+        abstract class Widget extends Bar {
+          const Widget();
+        }
+      flutter/lib/src/widgets/widget_inspector.dart: |
+        abstract class _HasCreationLocation {
+          _Location get _location;
+        }
+        /// A tuple with file, line, and column number, for displaying human-readable
+        /// file locations.
+        class _Location {
+          const _Location({
+            required this.file,
+            required this.line,
+            required this.column,
+            required this.name,
+            required this.parameterLocations,
+          });
+          /// File path of the location.
+          final String file;
+          /// 1-based line number.
+          final int line;
+          /// 1-based column number.
+          final int column;
+          /// Optional name of the parameter or function at this location.
+          final String name;
+          /// Optional locations of the parameters of the member at this location.
+          final List<_Location> parameterLocations;
+        }
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "flutter",
+              "rootUri": "../flutter",
+              "packageUri": "lib/"
+            }
+          ]
+        }
+    expectedLibraryCount: 4
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        import 'foo.dart';
+        Foo foo = new Foo(name: 'foo');
+    expectedLibraryCount: 4
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.1.expect
new file mode 100644
index 0000000..ad57ba5
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.1.expect
@@ -0,0 +1,54 @@
+main = <No Member>;
+library from "package:flutter/src/widgets/framework.dart" as fra {
+
+  abstract class Bar extends dart.core::Object /*hasConstConstructor*/  {
+    const constructor •() → fra::Bar
+      : super dart.core::Object::•()
+      ;
+  }
+  abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
+    final field wid::_Location? _location /*isNullableByDefault, from null */;
+    const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      ;
+  }
+}
+library from "package:flutter/src/widgets/widget_inspector.dart" as wid {
+
+  abstract class _HasCreationLocation extends dart.core::Object {
+    synthetic constructor •() → wid::_HasCreationLocation
+      : super dart.core::Object::•()
+      ;
+    abstract get _location() → wid::_Location;
+  }
+  class _Location extends dart.core::Object /*hasConstConstructor*/  {
+    final field dart.core::String file;
+    final field dart.core::int line;
+    final field dart.core::int column;
+    final field dart.core::String name;
+    final field dart.core::List<wid::_Location> parameterLocations;
+    const constructor •({required dart.core::String file = #C1, required dart.core::int line = #C1, required dart.core::int column = #C1, required dart.core::String name = #C1, required dart.core::List<wid::_Location> parameterLocations = #C1}) → wid::_Location
+      : wid::_Location::file = file, wid::_Location::line = line, wid::_Location::column = column, wid::_Location::name = name, wid::_Location::parameterLocations = parameterLocations, super dart.core::Object::•()
+      ;
+  }
+}
+library from "org-dartlang-test:///foo.dart" as foo {
+
+  import "package:flutter/src/widgets/framework.dart";
+  import "package:flutter/src/widgets/widget_inspector.dart";
+
+  class Foo extends fra::Widget {
+    final field dart.core::String name;
+    constructor •({required dart.core::String name = #C1, wid::_Location? $creationLocationd_0dea112b090073317d4}) → foo::Foo
+      : foo::Foo::name = name, super fra::Widget::•($creationLocationd_0dea112b090073317d4: $creationLocationd_0dea112b090073317d4)
+      ;
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///foo.dart";
+
+}
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.2.expect
new file mode 100644
index 0000000..1990ba5
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.2.expect
@@ -0,0 +1,63 @@
+main = <No Member>;
+library from "package:flutter/src/widgets/framework.dart" as fra {
+
+  abstract class Bar extends dart.core::Object /*hasConstConstructor*/  {
+    const constructor •() → fra::Bar
+      : super dart.core::Object::•()
+      ;
+  }
+  abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
+    final field wid::_Location? _location /*isNullableByDefault, from null */;
+    const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      ;
+  }
+}
+library from "package:flutter/src/widgets/widget_inspector.dart" as wid {
+
+  abstract class _HasCreationLocation extends dart.core::Object {
+    synthetic constructor •() → wid::_HasCreationLocation
+      : super dart.core::Object::•()
+      ;
+    abstract get _location() → wid::_Location;
+  }
+  class _Location extends dart.core::Object /*hasConstConstructor*/  {
+    final field dart.core::String file;
+    final field dart.core::int line;
+    final field dart.core::int column;
+    final field dart.core::String name;
+    final field dart.core::List<wid::_Location> parameterLocations;
+    const constructor •({required dart.core::String file = #C1, required dart.core::int line = #C1, required dart.core::int column = #C1, required dart.core::String name = #C1, required dart.core::List<wid::_Location> parameterLocations = #C1}) → wid::_Location
+      : wid::_Location::file = file, wid::_Location::line = line, wid::_Location::column = column, wid::_Location::name = name, wid::_Location::parameterLocations = parameterLocations, super dart.core::Object::•()
+      ;
+  }
+}
+library from "org-dartlang-test:///foo.dart" as foo {
+
+  import "package:flutter/src/widgets/framework.dart";
+  import "package:flutter/src/widgets/widget_inspector.dart";
+
+  class Foo extends fra::Widget {
+    final field dart.core::String name;
+    constructor •({required dart.core::String name = #C1, wid::_Location? $creationLocationd_0dea112b090073317d4}) → foo::Foo
+      : foo::Foo::name = name, super fra::Widget::•($creationLocationd_0dea112b090073317d4: $creationLocationd_0dea112b090073317d4)
+      ;
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///foo.dart";
+
+  static field foo::Foo foo = new foo::Foo::•(name: "foo", $creationLocationd_0dea112b090073317d4: #C9);
+}
+constants  {
+  #C1 = null
+  #C2 = "org-dartlang-test:///main.dart"
+  #C3 = 2.0
+  #C4 = 15.0
+  #C5 = 19.0
+  #C6 = "name"
+  #C7 = wid::_Location {file:#C1, line:#C3, column:#C5, name:#C6, parameterLocations:#C1}
+  #C8 = <wid::_Location*>[#C7]
+  #C9 = wid::_Location {file:#C2, line:#C3, column:#C4, name:#C1, parameterLocations:#C8}
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323.yaml
new file mode 100644
index 0000000..0b2d164
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323.yaml
@@ -0,0 +1,33 @@
+# 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.
+
+# This is not actually an incremental compiler test as much as a compiler test.
+# Test what happens when running a package file as strong NNBD (and it's marked
+# with a matching language version) in a package that's with a lower language
+# version (nothing should really happen --- it should just work).
+# See https://github.com/dart-lang/sdk/issues/42323.
+
+type: newworld
+worlds:
+  - entry: bin/runMe.dart
+    experiments: non-nullable
+    nnbdMode: strong
+    enableStringReplacement: true
+    sources:
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "issue42323",
+              "rootUri": "../",
+              "packageUri": "lib/",
+              "languageVersion": "2.8"
+            }
+          ]
+        }
+      bin/runMe.dart: |
+        // @dart = %NNBD_VERSION_MARKER%
+        main() {}
+    expectedLibraryCount: 1
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323.yaml.world.1.expect
new file mode 100644
index 0000000..6176fb2
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323.yaml.world.1.expect
@@ -0,0 +1,5 @@
+main = <No Member>;
+library from "org-dartlang-test:///bin/runMe.dart" as run {
+
+  static method main() → dynamic {}
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323_prime.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323_prime.yaml
new file mode 100644
index 0000000..59e9a32
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323_prime.yaml
@@ -0,0 +1,33 @@
+# 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.
+
+# This is not actually an incremental compiler test as much as a compiler test.
+# Test what happens when running a package file as strong NNBD (and it's marked
+# with a non-nnbd language version) in a package that's with a lower language
+# version (an error should be reported).
+# Good "variant" of https://github.com/dart-lang/sdk/issues/42323.
+
+type: newworld
+worlds:
+  - entry: bin/runMe.dart
+    experiments: non-nullable
+    nnbdMode: strong
+    errors: true
+    sources:
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "issue42323",
+              "rootUri": "../",
+              "packageUri": "lib/",
+              "languageVersion": "2.8"
+            }
+          ]
+        }
+      bin/runMe.dart: |
+        // @dart = 2.8
+        main() {}
+    expectedLibraryCount: 1
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323_prime.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323_prime.yaml.world.1.expect
new file mode 100644
index 0000000..6c8e984
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/issue_42323_prime.yaml.world.1.expect
@@ -0,0 +1,12 @@
+main = <No Member>;
+library from "org-dartlang-test:///bin/runMe.dart" as run {
+//
+// Problems in library:
+//
+// org-dartlang-test:///bin/runMe.dart:1:1: Error: A library can't opt out of null safety by default, when using sound null safety.
+// // @dart = 2.8
+// ^^^^^^^^^^^^^^
+//
+
+  static method main() → dynamic {}
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.1.expect
index 5ea6e57..2e894e1 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.1.expect
@@ -424,14 +424,13 @@
     }
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insert(dart.core::int index, generic-covariant-impl dart.core::int* element) → void {
       dart.core::ArgumentError::checkNotNull<dart.core::int>(index, "index");
-      dart.core::RangeError::checkValueInInterval(index, 0, this.{dart.core::List::length}, "index");
-      if(index.{dart.core::num::==}(this.{dart.core::List::length})) {
-        this.{dart.collection::ListMixin::add}(element);
-        return;
+      dart.core::int length = this.{dart.core::List::length};
+      dart.core::RangeError::checkValueInInterval(index, 0, length, "index");
+      this.{dart.collection::ListMixin::add}(element);
+      if(!index.{dart.core::num::==}(length)) {
+        this.{dart.collection::ListMixin::setRange}(index.{dart.core::num::+}(1), length.{dart.core::num::+}(1), this, index);
+        this.{dart.core::List::[]=}(index, element);
       }
-      this.{dart.core::List::length} = this.{dart.core::List::length}.{dart.core::num::+}(1);
-      this.{dart.collection::ListMixin::setRange}(index.{dart.core::num::+}(1), this.{dart.core::List::length}, this, index);
-      this.{dart.core::List::[]=}(index, element);
     }
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ removeAt(dart.core::int index) → dart.core::int* {
       dart.core::int* result = this.{dart.core::List::[]}(index);
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.2.expect
index 5ea6e57..2e894e1 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_22.yaml.world.2.expect
@@ -424,14 +424,13 @@
     }
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ insert(dart.core::int index, generic-covariant-impl dart.core::int* element) → void {
       dart.core::ArgumentError::checkNotNull<dart.core::int>(index, "index");
-      dart.core::RangeError::checkValueInInterval(index, 0, this.{dart.core::List::length}, "index");
-      if(index.{dart.core::num::==}(this.{dart.core::List::length})) {
-        this.{dart.collection::ListMixin::add}(element);
-        return;
+      dart.core::int length = this.{dart.core::List::length};
+      dart.core::RangeError::checkValueInInterval(index, 0, length, "index");
+      this.{dart.collection::ListMixin::add}(element);
+      if(!index.{dart.core::num::==}(length)) {
+        this.{dart.collection::ListMixin::setRange}(index.{dart.core::num::+}(1), length.{dart.core::num::+}(1), this, index);
+        this.{dart.core::List::[]=}(index, element);
       }
-      this.{dart.core::List::length} = this.{dart.core::List::length}.{dart.core::num::+}(1);
-      this.{dart.collection::ListMixin::setRange}(index.{dart.core::num::+}(1), this.{dart.core::List::length}, this, index);
-      this.{dart.core::List::[]=}(index, element);
     }
     method /*isNonNullableByDefault, from org-dartlang-sdk:///sdk/lib/collection/list.dart */ removeAt(dart.core::int index) → dart.core::int* {
       dart.core::int* result = this.{dart.core::List::[]}(index);
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart.strong.expect b/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart.strong.expect
index cea3286..29f3dec 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart.strong.expect
@@ -37,10 +37,10 @@
     core::num* v4 = let final self::Test2* #t16 = t in #t16.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t17 = #t16.{self::Test2::prop} in #t17.{core::num::==}(null) ?{core::num*} #t16.{self::Test2::prop} = self::getInt() : #t17;
     core::num* v5 = let final self::Test2* #t18 = t in #t18.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t19 = #t18.{self::Test2::prop} in #t19.{core::num::==}(null) ?{core::num*} #t18.{self::Test2::prop} = self::getNum() : #t19;
     core::num* v6 = let final self::Test2* #t20 = t in #t20.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t21 = #t20.{self::Test2::prop} in #t21.{core::num::==}(null) ?{core::num*} #t20.{self::Test2::prop} = self::getDouble() : #t21;
-    core::num* v7 = let final self::Test2* #t22 = t in #t22.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t23 = #t22.{self::Test2::prop}.{core::num::+}(self::getInt()) in let final void #t24 = #t22.{self::Test2::prop} = #t23 in #t23;
-    core::num* v8 = let final self::Test2* #t25 = t in #t25.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t26 = #t25.{self::Test2::prop}.{core::num::+}(self::getNum()) in let final void #t27 = #t25.{self::Test2::prop} = #t26 in #t26;
-    core::num* v9 = let final self::Test2* #t28 = t in #t28.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t29 = #t28.{self::Test2::prop}.{core::num::+}(self::getDouble()) in let final void #t30 = #t28.{self::Test2::prop} = #t29 in #t29;
-    core::num* v10 = let final self::Test2* #t31 = t in #t31.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t32 = #t31.{self::Test2::prop}.{core::num::+}(1) in let final void #t33 = #t31.{self::Test2::prop} = #t32 in #t32;
+    core::num* v7 = let final self::Test2* #t22 = t in #t22.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t23 = #t22.{self::Test2::prop}.{core::num::+}(self::getInt()) in let final void #t24 = #t22.{self::Test2::prop} = #t23 in #t23;
+    core::num* v8 = let final self::Test2* #t25 = t in #t25.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t26 = #t25.{self::Test2::prop}.{core::num::+}(self::getNum()) in let final void #t27 = #t25.{self::Test2::prop} = #t26 in #t26;
+    core::num* v9 = let final self::Test2* #t28 = t in #t28.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t29 = #t28.{self::Test2::prop}.{core::num::+}(self::getDouble()) in let final void #t30 = #t28.{self::Test2::prop} = #t29 in #t29;
+    core::num* v10 = let final self::Test2* #t31 = t in #t31.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t32 = #t31.{self::Test2::prop}.{core::num::+}(1) in let final void #t33 = #t31.{self::Test2::prop} = #t32 in #t32;
     core::num* v11 = let final self::Test2* #t34 = t in #t34.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t35 = #t34.{self::Test2::prop} in let final void #t36 = #t34.{self::Test2::prop} = #t35.{core::num::+}(1) in #t35;
   }
   abstract member-signature get _identityHashCode() → core::int*;
@@ -62,10 +62,10 @@
   static method test3(self::Test3* t) → void {
     core::double* v3 = let final self::Test3* #t37 = t in #t37.{self::Test3::==}(null) ?{core::double*} null : #t37.{self::Test3::prop} = self::getDouble();
     core::double* v6 = let final self::Test3* #t38 = t in #t38.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t39 = #t38.{self::Test3::prop} in #t39.{core::num::==}(null) ?{core::double*} #t38.{self::Test3::prop} = self::getDouble() : #t39;
-    core::double* v7 = let final self::Test3* #t40 = t in #t40.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t41 = #t40.{self::Test3::prop}.{core::double::+}(self::getInt()) in let final void #t42 = #t40.{self::Test3::prop} = #t41 in #t41;
-    core::double* v8 = let final self::Test3* #t43 = t in #t43.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t44 = #t43.{self::Test3::prop}.{core::double::+}(self::getNum()) in let final void #t45 = #t43.{self::Test3::prop} = #t44 in #t44;
-    core::double* v9 = let final self::Test3* #t46 = t in #t46.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t47 = #t46.{self::Test3::prop}.{core::double::+}(self::getDouble()) in let final void #t48 = #t46.{self::Test3::prop} = #t47 in #t47;
-    core::double* v10 = let final self::Test3* #t49 = t in #t49.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t50 = #t49.{self::Test3::prop}.{core::double::+}(1) in let final void #t51 = #t49.{self::Test3::prop} = #t50 in #t50;
+    core::double* v7 = let final self::Test3* #t40 = t in #t40.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t41 = #t40.{self::Test3::prop}.{core::double::+}(self::getInt()) in let final void #t42 = #t40.{self::Test3::prop} = #t41 in #t41;
+    core::double* v8 = let final self::Test3* #t43 = t in #t43.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t44 = #t43.{self::Test3::prop}.{core::double::+}(self::getNum()) in let final void #t45 = #t43.{self::Test3::prop} = #t44 in #t44;
+    core::double* v9 = let final self::Test3* #t46 = t in #t46.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t47 = #t46.{self::Test3::prop}.{core::double::+}(self::getDouble()) in let final void #t48 = #t46.{self::Test3::prop} = #t47 in #t47;
+    core::double* v10 = let final self::Test3* #t49 = t in #t49.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t50 = #t49.{self::Test3::prop}.{core::double::+}(1) in let final void #t51 = #t49.{self::Test3::prop} = #t50 in #t50;
     core::double* v11 = let final self::Test3* #t52 = t in #t52.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t53 = #t52.{self::Test3::prop} in let final void #t54 = #t52.{self::Test3::prop} = #t53.{core::double::+}(1) in #t53;
   }
   abstract member-signature get _identityHashCode() → core::int*;
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart.strong.transformed.expect
index cea3286..29f3dec 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_null_aware_upwards.dart.strong.transformed.expect
@@ -37,10 +37,10 @@
     core::num* v4 = let final self::Test2* #t16 = t in #t16.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t17 = #t16.{self::Test2::prop} in #t17.{core::num::==}(null) ?{core::num*} #t16.{self::Test2::prop} = self::getInt() : #t17;
     core::num* v5 = let final self::Test2* #t18 = t in #t18.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t19 = #t18.{self::Test2::prop} in #t19.{core::num::==}(null) ?{core::num*} #t18.{self::Test2::prop} = self::getNum() : #t19;
     core::num* v6 = let final self::Test2* #t20 = t in #t20.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t21 = #t20.{self::Test2::prop} in #t21.{core::num::==}(null) ?{core::num*} #t20.{self::Test2::prop} = self::getDouble() : #t21;
-    core::num* v7 = let final self::Test2* #t22 = t in #t22.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t23 = #t22.{self::Test2::prop}.{core::num::+}(self::getInt()) in let final void #t24 = #t22.{self::Test2::prop} = #t23 in #t23;
-    core::num* v8 = let final self::Test2* #t25 = t in #t25.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t26 = #t25.{self::Test2::prop}.{core::num::+}(self::getNum()) in let final void #t27 = #t25.{self::Test2::prop} = #t26 in #t26;
-    core::num* v9 = let final self::Test2* #t28 = t in #t28.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t29 = #t28.{self::Test2::prop}.{core::num::+}(self::getDouble()) in let final void #t30 = #t28.{self::Test2::prop} = #t29 in #t29;
-    core::num* v10 = let final self::Test2* #t31 = t in #t31.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t32 = #t31.{self::Test2::prop}.{core::num::+}(1) in let final void #t33 = #t31.{self::Test2::prop} = #t32 in #t32;
+    core::num* v7 = let final self::Test2* #t22 = t in #t22.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t23 = #t22.{self::Test2::prop}.{core::num::+}(self::getInt()) in let final void #t24 = #t22.{self::Test2::prop} = #t23 in #t23;
+    core::num* v8 = let final self::Test2* #t25 = t in #t25.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t26 = #t25.{self::Test2::prop}.{core::num::+}(self::getNum()) in let final void #t27 = #t25.{self::Test2::prop} = #t26 in #t26;
+    core::num* v9 = let final self::Test2* #t28 = t in #t28.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t29 = #t28.{self::Test2::prop}.{core::num::+}(self::getDouble()) in let final void #t30 = #t28.{self::Test2::prop} = #t29 in #t29;
+    core::num* v10 = let final self::Test2* #t31 = t in #t31.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t32 = #t31.{self::Test2::prop}.{core::num::+}(1) in let final void #t33 = #t31.{self::Test2::prop} = #t32 in #t32;
     core::num* v11 = let final self::Test2* #t34 = t in #t34.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t35 = #t34.{self::Test2::prop} in let final void #t36 = #t34.{self::Test2::prop} = #t35.{core::num::+}(1) in #t35;
   }
   abstract member-signature get _identityHashCode() → core::int*;
@@ -62,10 +62,10 @@
   static method test3(self::Test3* t) → void {
     core::double* v3 = let final self::Test3* #t37 = t in #t37.{self::Test3::==}(null) ?{core::double*} null : #t37.{self::Test3::prop} = self::getDouble();
     core::double* v6 = let final self::Test3* #t38 = t in #t38.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t39 = #t38.{self::Test3::prop} in #t39.{core::num::==}(null) ?{core::double*} #t38.{self::Test3::prop} = self::getDouble() : #t39;
-    core::double* v7 = let final self::Test3* #t40 = t in #t40.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t41 = #t40.{self::Test3::prop}.{core::double::+}(self::getInt()) in let final void #t42 = #t40.{self::Test3::prop} = #t41 in #t41;
-    core::double* v8 = let final self::Test3* #t43 = t in #t43.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t44 = #t43.{self::Test3::prop}.{core::double::+}(self::getNum()) in let final void #t45 = #t43.{self::Test3::prop} = #t44 in #t44;
-    core::double* v9 = let final self::Test3* #t46 = t in #t46.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t47 = #t46.{self::Test3::prop}.{core::double::+}(self::getDouble()) in let final void #t48 = #t46.{self::Test3::prop} = #t47 in #t47;
-    core::double* v10 = let final self::Test3* #t49 = t in #t49.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t50 = #t49.{self::Test3::prop}.{core::double::+}(1) in let final void #t51 = #t49.{self::Test3::prop} = #t50 in #t50;
+    core::double* v7 = let final self::Test3* #t40 = t in #t40.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t41 = #t40.{self::Test3::prop}.{core::double::+}(self::getInt()) in let final void #t42 = #t40.{self::Test3::prop} = #t41 in #t41;
+    core::double* v8 = let final self::Test3* #t43 = t in #t43.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t44 = #t43.{self::Test3::prop}.{core::double::+}(self::getNum()) in let final void #t45 = #t43.{self::Test3::prop} = #t44 in #t44;
+    core::double* v9 = let final self::Test3* #t46 = t in #t46.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t47 = #t46.{self::Test3::prop}.{core::double::+}(self::getDouble()) in let final void #t48 = #t46.{self::Test3::prop} = #t47 in #t47;
+    core::double* v10 = let final self::Test3* #t49 = t in #t49.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t50 = #t49.{self::Test3::prop}.{core::double::+}(1) in let final void #t51 = #t49.{self::Test3::prop} = #t50 in #t50;
     core::double* v11 = let final self::Test3* #t52 = t in #t52.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t53 = #t52.{self::Test3::prop} in let final void #t54 = #t52.{self::Test3::prop} = #t53.{core::double::+}(1) in #t53;
   }
   abstract member-signature get _identityHashCode() → core::int*;
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.strong.expect
index 1f2b516..9af1595 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.strong.expect
@@ -118,9 +118,9 @@
     core::num* v2 = let final core::String* #t98 = "x" in let final core::num* #t99 = self::getNum() as{TypeError} core::int* in let final void #t100 = super.{self::Base::[]=}(#t98, #t99) in #t99;
     core::num* v4 = let final core::String* #t101 = "x" in let final core::num* #t102 = super.{self::Base::[]}(#t101) in #t102.{core::num::==}(null) ?{core::num*} let final core::int* #t103 = self::getInt() in let final void #t104 = super.{self::Base::[]=}(#t101, #t103) in #t103 : #t102;
     core::num* v5 = let final core::String* #t105 = "x" in let final core::num* #t106 = super.{self::Base::[]}(#t105) in #t106.{core::num::==}(null) ?{core::num*} let final core::num* #t107 = self::getNum() as{TypeError} core::int* in let final void #t108 = super.{self::Base::[]=}(#t105, #t107) in #t107 : #t106;
-    core::num* v7 = let final core::String* #t109 = "x" in let final core::num #t110 = super.{self::Base::[]}(#t109).{core::num::+}(self::getInt()) as{TypeError} core::int* in let final void #t111 = super.{self::Base::[]=}(#t109, #t110) in #t110;
-    core::num* v8 = let final core::String* #t112 = "x" in let final core::num #t113 = super.{self::Base::[]}(#t112).{core::num::+}(self::getNum()) as{TypeError} core::int* in let final void #t114 = super.{self::Base::[]=}(#t112, #t113) in #t113;
-    core::num* v10 = let final core::String* #t115 = "x" in let final core::num #t116 = super.{self::Base::[]}(#t115).{core::num::+}(1) as{TypeError} core::int* in let final void #t117 = super.{self::Base::[]=}(#t115, #t116) in #t116;
+    core::num* v7 = let final core::String* #t109 = "x" in let final core::num* #t110 = super.{self::Base::[]}(#t109).{core::num::+}(self::getInt()) as{TypeError} core::int* in let final void #t111 = super.{self::Base::[]=}(#t109, #t110) in #t110;
+    core::num* v8 = let final core::String* #t112 = "x" in let final core::num* #t113 = super.{self::Base::[]}(#t112).{core::num::+}(self::getNum()) as{TypeError} core::int* in let final void #t114 = super.{self::Base::[]=}(#t112, #t113) in #t113;
+    core::num* v10 = let final core::String* #t115 = "x" in let final core::num* #t116 = super.{self::Base::[]}(#t115).{core::num::+}(1) as{TypeError} core::int* in let final void #t117 = super.{self::Base::[]=}(#t115, #t116) in #t116;
     core::num* v11 = let final core::String* #t118 = "x" in let final core::num* #t119 = super.{self::Base::[]}(#t118) in let final void #t120 = super.{self::Base::[]=}(#t118, #t119.{core::num::+}(1) as{TypeError} core::int*) in #t119;
   }
 }
@@ -135,10 +135,10 @@
     core::num* v4 = let final core::String* #t130 = "x" in let final core::num* #t131 = super.{self::Base::[]}(#t130) in #t131.{core::num::==}(null) ?{core::num*} let final core::int* #t132 = self::getInt() in let final void #t133 = super.{self::Base::[]=}(#t130, #t132) in #t132 : #t131;
     core::num* v5 = let final core::String* #t134 = "x" in let final core::num* #t135 = super.{self::Base::[]}(#t134) in #t135.{core::num::==}(null) ?{core::num*} let final core::num* #t136 = self::getNum() in let final void #t137 = super.{self::Base::[]=}(#t134, #t136) in #t136 : #t135;
     core::num* v6 = let final core::String* #t138 = "x" in let final core::num* #t139 = super.{self::Base::[]}(#t138) in #t139.{core::num::==}(null) ?{core::num*} let final core::double* #t140 = self::getDouble() in let final void #t141 = super.{self::Base::[]=}(#t138, #t140) in #t140 : #t139;
-    core::num* v7 = let final core::String* #t142 = "x" in let final core::num #t143 = super.{self::Base::[]}(#t142).{core::num::+}(self::getInt()) in let final void #t144 = super.{self::Base::[]=}(#t142, #t143) in #t143;
-    core::num* v8 = let final core::String* #t145 = "x" in let final core::num #t146 = super.{self::Base::[]}(#t145).{core::num::+}(self::getNum()) in let final void #t147 = super.{self::Base::[]=}(#t145, #t146) in #t146;
-    core::num* v9 = let final core::String* #t148 = "x" in let final core::num #t149 = super.{self::Base::[]}(#t148).{core::num::+}(self::getDouble()) in let final void #t150 = super.{self::Base::[]=}(#t148, #t149) in #t149;
-    core::num* v10 = let final core::String* #t151 = "x" in let final core::num #t152 = super.{self::Base::[]}(#t151).{core::num::+}(1) in let final void #t153 = super.{self::Base::[]=}(#t151, #t152) in #t152;
+    core::num* v7 = let final core::String* #t142 = "x" in let final core::num* #t143 = super.{self::Base::[]}(#t142).{core::num::+}(self::getInt()) in let final void #t144 = super.{self::Base::[]=}(#t142, #t143) in #t143;
+    core::num* v8 = let final core::String* #t145 = "x" in let final core::num* #t146 = super.{self::Base::[]}(#t145).{core::num::+}(self::getNum()) in let final void #t147 = super.{self::Base::[]=}(#t145, #t146) in #t146;
+    core::num* v9 = let final core::String* #t148 = "x" in let final core::num* #t149 = super.{self::Base::[]}(#t148).{core::num::+}(self::getDouble()) in let final void #t150 = super.{self::Base::[]=}(#t148, #t149) in #t149;
+    core::num* v10 = let final core::String* #t151 = "x" in let final core::num* #t152 = super.{self::Base::[]}(#t151).{core::num::+}(1) in let final void #t153 = super.{self::Base::[]=}(#t151, #t152) in #t152;
     core::num* v11 = let final core::String* #t154 = "x" in let final core::num* #t155 = super.{self::Base::[]}(#t154) in let final void #t156 = super.{self::Base::[]=}(#t154, #t155.{core::num::+}(1)) in #t155;
   }
 }
@@ -151,10 +151,10 @@
     core::double* v3 = let final core::String* #t160 = "x" in let final core::double* #t161 = self::getDouble() in let final void #t162 = super.{self::Base::[]=}(#t160, #t161) in #t161;
     core::num* v5 = let final core::String* #t163 = "x" in let final core::num* #t164 = super.{self::Base::[]}(#t163) in #t164.{core::num::==}(null) ?{core::num*} let final core::num* #t165 = self::getNum() as{TypeError} core::double* in let final void #t166 = super.{self::Base::[]=}(#t163, #t165) in #t165 : #t164;
     core::num* v6 = let final core::String* #t167 = "x" in let final core::num* #t168 = super.{self::Base::[]}(#t167) in #t168.{core::num::==}(null) ?{core::num*} let final core::double* #t169 = self::getDouble() in let final void #t170 = super.{self::Base::[]=}(#t167, #t169) in #t169 : #t168;
-    core::num* v7 = let final core::String* #t171 = "x" in let final core::num #t172 = super.{self::Base::[]}(#t171).{core::num::+}(self::getInt()) as{TypeError} core::double* in let final void #t173 = super.{self::Base::[]=}(#t171, #t172) in #t172;
-    core::num* v8 = let final core::String* #t174 = "x" in let final core::num #t175 = super.{self::Base::[]}(#t174).{core::num::+}(self::getNum()) as{TypeError} core::double* in let final void #t176 = super.{self::Base::[]=}(#t174, #t175) in #t175;
-    core::num* v9 = let final core::String* #t177 = "x" in let final core::num #t178 = super.{self::Base::[]}(#t177).{core::num::+}(self::getDouble()) as{TypeError} core::double* in let final void #t179 = super.{self::Base::[]=}(#t177, #t178) in #t178;
-    core::num* v10 = let final core::String* #t180 = "x" in let final core::num #t181 = super.{self::Base::[]}(#t180).{core::num::+}(1) as{TypeError} core::double* in let final void #t182 = super.{self::Base::[]=}(#t180, #t181) in #t181;
+    core::num* v7 = let final core::String* #t171 = "x" in let final core::num* #t172 = super.{self::Base::[]}(#t171).{core::num::+}(self::getInt()) as{TypeError} core::double* in let final void #t173 = super.{self::Base::[]=}(#t171, #t172) in #t172;
+    core::num* v8 = let final core::String* #t174 = "x" in let final core::num* #t175 = super.{self::Base::[]}(#t174).{core::num::+}(self::getNum()) as{TypeError} core::double* in let final void #t176 = super.{self::Base::[]=}(#t174, #t175) in #t175;
+    core::num* v9 = let final core::String* #t177 = "x" in let final core::num* #t178 = super.{self::Base::[]}(#t177).{core::num::+}(self::getDouble()) as{TypeError} core::double* in let final void #t179 = super.{self::Base::[]=}(#t177, #t178) in #t178;
+    core::num* v10 = let final core::String* #t180 = "x" in let final core::num* #t181 = super.{self::Base::[]}(#t180).{core::num::+}(1) as{TypeError} core::double* in let final void #t182 = super.{self::Base::[]=}(#t180, #t181) in #t181;
     core::num* v11 = let final core::String* #t183 = "x" in let final core::num* #t184 = super.{self::Base::[]}(#t183) in let final void #t185 = super.{self::Base::[]=}(#t183, #t184.{core::num::+}(1) as{TypeError} core::double*) in #t184;
   }
 }
@@ -167,13 +167,13 @@
     core::num* v2 = let final core::String* #t189 = "x" in let final core::num* #t190 = self::getNum() as{TypeError} core::int* in let final void #t191 = super.{self::Base::[]=}(#t189, #t190) in #t190;
     core::num* v4 = let final core::String* #t192 = "x" in let final core::double* #t193 = super.{self::Base::[]}(#t192) in #t193.{core::num::==}(null) ?{core::num*} let final core::int* #t194 = self::getInt() in let final void #t195 = super.{self::Base::[]=}(#t192, #t194) in #t194 : #t193;
     core::num* v5 = let final core::String* #t196 = "x" in let final core::double* #t197 = super.{self::Base::[]}(#t196) in #t197.{core::num::==}(null) ?{core::num*} let final core::num* #t198 = self::getNum() as{TypeError} core::int* in let final void #t199 = super.{self::Base::[]=}(#t196, #t198) in #t198 : #t197;
-    core::double* v7 = let final core::String* #t200 = "x" in let final core::double #t201 = let final<BottomType> #t202 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart:244:34: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+    core::double* v7 = let final core::String* #t200 = "x" in let final core::double* #t201 = let final<BottomType> #t202 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart:244:34: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
             /*@target=double.+*/ += getInt();
                                  ^" in super.{self::Base::[]}(#t200).{core::double::+}(self::getInt()) as{TypeError} core::int* in let final void #t203 = super.{self::Base::[]=}(#t200, #t201) in #t201;
-    core::double* v8 = let final core::String* #t204 = "x" in let final core::double #t205 = let final<BottomType> #t206 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart:248:34: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+    core::double* v8 = let final core::String* #t204 = "x" in let final core::double* #t205 = let final<BottomType> #t206 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart:248:34: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
             /*@target=double.+*/ += getNum();
                                  ^" in super.{self::Base::[]}(#t204).{core::double::+}(self::getNum()) as{TypeError} core::int* in let final void #t207 = super.{self::Base::[]=}(#t204, #t205) in #t205;
-    core::double* v10 = let final core::String* #t208 = "x" in let final core::double #t209 = let final<BottomType> #t210 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart:250:56: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+    core::double* v10 = let final core::String* #t208 = "x" in let final core::double* #t209 = let final<BottomType> #t210 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart:250:56: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
     var /*@ type=double* */ v10 = /*@target=double.+*/ ++super
                                                        ^" in super.{self::Base::[]}(#t208).{core::double::+}(1) as{TypeError} core::int* in let final void #t211 = super.{self::Base::[]=}(#t208, #t209) in #t209;
     core::double* v11 = let final core::String* #t212 = "x" in let final core::double* #t213 = super.{self::Base::[]}(#t212) in let final void #t214 = super.{self::Base::[]=}(#t212, let final<BottomType> #t215 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart:254:36: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
@@ -192,10 +192,10 @@
     core::num* v4 = let final core::String* #t225 = "x" in let final core::double* #t226 = super.{self::Base::[]}(#t225) in #t226.{core::num::==}(null) ?{core::num*} let final core::int* #t227 = self::getInt() in let final void #t228 = super.{self::Base::[]=}(#t225, #t227) in #t227 : #t226;
     core::num* v5 = let final core::String* #t229 = "x" in let final core::double* #t230 = super.{self::Base::[]}(#t229) in #t230.{core::num::==}(null) ?{core::num*} let final core::num* #t231 = self::getNum() in let final void #t232 = super.{self::Base::[]=}(#t229, #t231) in #t231 : #t230;
     core::double* v6 = let final core::String* #t233 = "x" in let final core::double* #t234 = super.{self::Base::[]}(#t233) in #t234.{core::num::==}(null) ?{core::double*} let final core::double* #t235 = self::getDouble() in let final void #t236 = super.{self::Base::[]=}(#t233, #t235) in #t235 : #t234;
-    core::double* v7 = let final core::String* #t237 = "x" in let final core::double #t238 = super.{self::Base::[]}(#t237).{core::double::+}(self::getInt()) in let final void #t239 = super.{self::Base::[]=}(#t237, #t238) in #t238;
-    core::double* v8 = let final core::String* #t240 = "x" in let final core::double #t241 = super.{self::Base::[]}(#t240).{core::double::+}(self::getNum()) in let final void #t242 = super.{self::Base::[]=}(#t240, #t241) in #t241;
-    core::double* v9 = let final core::String* #t243 = "x" in let final core::double #t244 = super.{self::Base::[]}(#t243).{core::double::+}(self::getDouble()) in let final void #t245 = super.{self::Base::[]=}(#t243, #t244) in #t244;
-    core::double* v10 = let final core::String* #t246 = "x" in let final core::double #t247 = super.{self::Base::[]}(#t246).{core::double::+}(1) in let final void #t248 = super.{self::Base::[]=}(#t246, #t247) in #t247;
+    core::double* v7 = let final core::String* #t237 = "x" in let final core::double* #t238 = super.{self::Base::[]}(#t237).{core::double::+}(self::getInt()) in let final void #t239 = super.{self::Base::[]=}(#t237, #t238) in #t238;
+    core::double* v8 = let final core::String* #t240 = "x" in let final core::double* #t241 = super.{self::Base::[]}(#t240).{core::double::+}(self::getNum()) in let final void #t242 = super.{self::Base::[]=}(#t240, #t241) in #t241;
+    core::double* v9 = let final core::String* #t243 = "x" in let final core::double* #t244 = super.{self::Base::[]}(#t243).{core::double::+}(self::getDouble()) in let final void #t245 = super.{self::Base::[]=}(#t243, #t244) in #t244;
+    core::double* v10 = let final core::String* #t246 = "x" in let final core::double* #t247 = super.{self::Base::[]}(#t246).{core::double::+}(1) in let final void #t248 = super.{self::Base::[]=}(#t246, #t247) in #t247;
     core::double* v11 = let final core::String* #t249 = "x" in let final core::double* #t250 = super.{self::Base::[]}(#t249) in let final void #t251 = super.{self::Base::[]=}(#t249, #t250.{core::double::+}(1)) in #t250;
   }
 }
@@ -208,10 +208,10 @@
     core::double* v3 = let final core::String* #t255 = "x" in let final core::double* #t256 = self::getDouble() in let final void #t257 = super.{self::Base::[]=}(#t255, #t256) in #t256;
     core::num* v5 = let final core::String* #t258 = "x" in let final core::double* #t259 = super.{self::Base::[]}(#t258) in #t259.{core::num::==}(null) ?{core::num*} let final core::num* #t260 = self::getNum() as{TypeError} core::double* in let final void #t261 = super.{self::Base::[]=}(#t258, #t260) in #t260 : #t259;
     core::double* v6 = let final core::String* #t262 = "x" in let final core::double* #t263 = super.{self::Base::[]}(#t262) in #t263.{core::num::==}(null) ?{core::double*} let final core::double* #t264 = self::getDouble() in let final void #t265 = super.{self::Base::[]=}(#t262, #t264) in #t264 : #t263;
-    core::double* v7 = let final core::String* #t266 = "x" in let final core::double #t267 = super.{self::Base::[]}(#t266).{core::double::+}(self::getInt()) in let final void #t268 = super.{self::Base::[]=}(#t266, #t267) in #t267;
-    core::double* v8 = let final core::String* #t269 = "x" in let final core::double #t270 = super.{self::Base::[]}(#t269).{core::double::+}(self::getNum()) in let final void #t271 = super.{self::Base::[]=}(#t269, #t270) in #t270;
-    core::double* v9 = let final core::String* #t272 = "x" in let final core::double #t273 = super.{self::Base::[]}(#t272).{core::double::+}(self::getDouble()) in let final void #t274 = super.{self::Base::[]=}(#t272, #t273) in #t273;
-    core::double* v10 = let final core::String* #t275 = "x" in let final core::double #t276 = super.{self::Base::[]}(#t275).{core::double::+}(1) in let final void #t277 = super.{self::Base::[]=}(#t275, #t276) in #t276;
+    core::double* v7 = let final core::String* #t266 = "x" in let final core::double* #t267 = super.{self::Base::[]}(#t266).{core::double::+}(self::getInt()) in let final void #t268 = super.{self::Base::[]=}(#t266, #t267) in #t267;
+    core::double* v8 = let final core::String* #t269 = "x" in let final core::double* #t270 = super.{self::Base::[]}(#t269).{core::double::+}(self::getNum()) in let final void #t271 = super.{self::Base::[]=}(#t269, #t270) in #t270;
+    core::double* v9 = let final core::String* #t272 = "x" in let final core::double* #t273 = super.{self::Base::[]}(#t272).{core::double::+}(self::getDouble()) in let final void #t274 = super.{self::Base::[]=}(#t272, #t273) in #t273;
+    core::double* v10 = let final core::String* #t275 = "x" in let final core::double* #t276 = super.{self::Base::[]}(#t275).{core::double::+}(1) in let final void #t277 = super.{self::Base::[]=}(#t275, #t276) in #t276;
     core::double* v11 = let final core::String* #t278 = "x" in let final core::double* #t279 = super.{self::Base::[]}(#t278) in let final void #t280 = super.{self::Base::[]=}(#t278, #t279.{core::double::+}(1)) in #t279;
   }
 }
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart.strong.expect
index de71071..cb16def 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart.strong.expect
@@ -135,9 +135,9 @@
     core::num* v2 = let final core::String* #t98 = "x" in let final core::num* #t99 = self::getNum() as{TypeError} core::int* in let final void #t100 = this.{self::Test4::[]=}(#t98, #t99) in #t99;
     core::num* v4 = let final core::String* #t101 = "x" in let final core::num* #t102 = this.{self::Test4::[]}(#t101) in #t102.{core::num::==}(null) ?{core::num*} let final core::int* #t103 = self::getInt() in let final void #t104 = this.{self::Test4::[]=}(#t101, #t103) in #t103 : #t102;
     core::num* v5 = let final core::String* #t105 = "x" in let final core::num* #t106 = this.{self::Test4::[]}(#t105) in #t106.{core::num::==}(null) ?{core::num*} let final core::num* #t107 = self::getNum() as{TypeError} core::int* in let final void #t108 = this.{self::Test4::[]=}(#t105, #t107) in #t107 : #t106;
-    core::num* v7 = let final core::String* #t109 = "x" in let final core::num #t110 = this.{self::Test4::[]}(#t109).{core::num::+}(self::getInt()) as{TypeError} core::int* in let final void #t111 = this.{self::Test4::[]=}(#t109, #t110) in #t110;
-    core::num* v8 = let final core::String* #t112 = "x" in let final core::num #t113 = this.{self::Test4::[]}(#t112).{core::num::+}(self::getNum()) as{TypeError} core::int* in let final void #t114 = this.{self::Test4::[]=}(#t112, #t113) in #t113;
-    core::num* v10 = let final core::String* #t115 = "x" in let final core::num #t116 = this.{self::Test4::[]}(#t115).{core::num::+}(1) as{TypeError} core::int* in let final void #t117 = this.{self::Test4::[]=}(#t115, #t116) in #t116;
+    core::num* v7 = let final core::String* #t109 = "x" in let final core::num* #t110 = this.{self::Test4::[]}(#t109).{core::num::+}(self::getInt()) as{TypeError} core::int* in let final void #t111 = this.{self::Test4::[]=}(#t109, #t110) in #t110;
+    core::num* v8 = let final core::String* #t112 = "x" in let final core::num* #t113 = this.{self::Test4::[]}(#t112).{core::num::+}(self::getNum()) as{TypeError} core::int* in let final void #t114 = this.{self::Test4::[]=}(#t112, #t113) in #t113;
+    core::num* v10 = let final core::String* #t115 = "x" in let final core::num* #t116 = this.{self::Test4::[]}(#t115).{core::num::+}(1) as{TypeError} core::int* in let final void #t117 = this.{self::Test4::[]=}(#t115, #t116) in #t116;
     core::num* v11 = let final core::String* #t118 = "x" in let final core::num* #t119 = this.{self::Test4::[]}(#t118) in let final void #t120 = this.{self::Test4::[]=}(#t118, #t119.{core::num::+}(1) as{TypeError} core::int*) in #t119;
   }
   abstract member-signature get _identityHashCode() → core::int*;
@@ -164,10 +164,10 @@
     core::num* v4 = let final core::String* #t130 = "x" in let final core::num* #t131 = this.{self::Test5::[]}(#t130) in #t131.{core::num::==}(null) ?{core::num*} let final core::int* #t132 = self::getInt() in let final void #t133 = this.{self::Test5::[]=}(#t130, #t132) in #t132 : #t131;
     core::num* v5 = let final core::String* #t134 = "x" in let final core::num* #t135 = this.{self::Test5::[]}(#t134) in #t135.{core::num::==}(null) ?{core::num*} let final core::num* #t136 = self::getNum() in let final void #t137 = this.{self::Test5::[]=}(#t134, #t136) in #t136 : #t135;
     core::num* v6 = let final core::String* #t138 = "x" in let final core::num* #t139 = this.{self::Test5::[]}(#t138) in #t139.{core::num::==}(null) ?{core::num*} let final core::double* #t140 = self::getDouble() in let final void #t141 = this.{self::Test5::[]=}(#t138, #t140) in #t140 : #t139;
-    core::num* v7 = let final core::String* #t142 = "x" in let final core::num #t143 = this.{self::Test5::[]}(#t142).{core::num::+}(self::getInt()) in let final void #t144 = this.{self::Test5::[]=}(#t142, #t143) in #t143;
-    core::num* v8 = let final core::String* #t145 = "x" in let final core::num #t146 = this.{self::Test5::[]}(#t145).{core::num::+}(self::getNum()) in let final void #t147 = this.{self::Test5::[]=}(#t145, #t146) in #t146;
-    core::num* v9 = let final core::String* #t148 = "x" in let final core::num #t149 = this.{self::Test5::[]}(#t148).{core::num::+}(self::getDouble()) in let final void #t150 = this.{self::Test5::[]=}(#t148, #t149) in #t149;
-    core::num* v10 = let final core::String* #t151 = "x" in let final core::num #t152 = this.{self::Test5::[]}(#t151).{core::num::+}(1) in let final void #t153 = this.{self::Test5::[]=}(#t151, #t152) in #t152;
+    core::num* v7 = let final core::String* #t142 = "x" in let final core::num* #t143 = this.{self::Test5::[]}(#t142).{core::num::+}(self::getInt()) in let final void #t144 = this.{self::Test5::[]=}(#t142, #t143) in #t143;
+    core::num* v8 = let final core::String* #t145 = "x" in let final core::num* #t146 = this.{self::Test5::[]}(#t145).{core::num::+}(self::getNum()) in let final void #t147 = this.{self::Test5::[]=}(#t145, #t146) in #t146;
+    core::num* v9 = let final core::String* #t148 = "x" in let final core::num* #t149 = this.{self::Test5::[]}(#t148).{core::num::+}(self::getDouble()) in let final void #t150 = this.{self::Test5::[]=}(#t148, #t149) in #t149;
+    core::num* v10 = let final core::String* #t151 = "x" in let final core::num* #t152 = this.{self::Test5::[]}(#t151).{core::num::+}(1) in let final void #t153 = this.{self::Test5::[]=}(#t151, #t152) in #t152;
     core::num* v11 = let final core::String* #t154 = "x" in let final core::num* #t155 = this.{self::Test5::[]}(#t154) in let final void #t156 = this.{self::Test5::[]=}(#t154, #t155.{core::num::+}(1)) in #t155;
   }
   abstract member-signature get _identityHashCode() → core::int*;
@@ -192,10 +192,10 @@
     core::double* v3 = let final core::String* #t160 = "x" in let final core::double* #t161 = self::getDouble() in let final void #t162 = this.{self::Test6::[]=}(#t160, #t161) in #t161;
     core::num* v5 = let final core::String* #t163 = "x" in let final core::num* #t164 = this.{self::Test6::[]}(#t163) in #t164.{core::num::==}(null) ?{core::num*} let final core::num* #t165 = self::getNum() as{TypeError} core::double* in let final void #t166 = this.{self::Test6::[]=}(#t163, #t165) in #t165 : #t164;
     core::num* v6 = let final core::String* #t167 = "x" in let final core::num* #t168 = this.{self::Test6::[]}(#t167) in #t168.{core::num::==}(null) ?{core::num*} let final core::double* #t169 = self::getDouble() in let final void #t170 = this.{self::Test6::[]=}(#t167, #t169) in #t169 : #t168;
-    core::num* v7 = let final core::String* #t171 = "x" in let final core::num #t172 = this.{self::Test6::[]}(#t171).{core::num::+}(self::getInt()) as{TypeError} core::double* in let final void #t173 = this.{self::Test6::[]=}(#t171, #t172) in #t172;
-    core::num* v8 = let final core::String* #t174 = "x" in let final core::num #t175 = this.{self::Test6::[]}(#t174).{core::num::+}(self::getNum()) as{TypeError} core::double* in let final void #t176 = this.{self::Test6::[]=}(#t174, #t175) in #t175;
-    core::num* v9 = let final core::String* #t177 = "x" in let final core::num #t178 = this.{self::Test6::[]}(#t177).{core::num::+}(self::getDouble()) as{TypeError} core::double* in let final void #t179 = this.{self::Test6::[]=}(#t177, #t178) in #t178;
-    core::num* v10 = let final core::String* #t180 = "x" in let final core::num #t181 = this.{self::Test6::[]}(#t180).{core::num::+}(1) as{TypeError} core::double* in let final void #t182 = this.{self::Test6::[]=}(#t180, #t181) in #t181;
+    core::num* v7 = let final core::String* #t171 = "x" in let final core::num* #t172 = this.{self::Test6::[]}(#t171).{core::num::+}(self::getInt()) as{TypeError} core::double* in let final void #t173 = this.{self::Test6::[]=}(#t171, #t172) in #t172;
+    core::num* v8 = let final core::String* #t174 = "x" in let final core::num* #t175 = this.{self::Test6::[]}(#t174).{core::num::+}(self::getNum()) as{TypeError} core::double* in let final void #t176 = this.{self::Test6::[]=}(#t174, #t175) in #t175;
+    core::num* v9 = let final core::String* #t177 = "x" in let final core::num* #t178 = this.{self::Test6::[]}(#t177).{core::num::+}(self::getDouble()) as{TypeError} core::double* in let final void #t179 = this.{self::Test6::[]=}(#t177, #t178) in #t178;
+    core::num* v10 = let final core::String* #t180 = "x" in let final core::num* #t181 = this.{self::Test6::[]}(#t180).{core::num::+}(1) as{TypeError} core::double* in let final void #t182 = this.{self::Test6::[]=}(#t180, #t181) in #t181;
     core::num* v11 = let final core::String* #t183 = "x" in let final core::num* #t184 = this.{self::Test6::[]}(#t183) in let final void #t185 = this.{self::Test6::[]=}(#t183, #t184.{core::num::+}(1) as{TypeError} core::double*) in #t184;
   }
   abstract member-signature get _identityHashCode() → core::int*;
@@ -220,13 +220,13 @@
     core::num* v2 = let final core::String* #t189 = "x" in let final core::num* #t190 = self::getNum() as{TypeError} core::int* in let final void #t191 = this.{self::Test7::[]=}(#t189, #t190) in #t190;
     core::num* v4 = let final core::String* #t192 = "x" in let final core::double* #t193 = this.{self::Test7::[]}(#t192) in #t193.{core::num::==}(null) ?{core::num*} let final core::int* #t194 = self::getInt() in let final void #t195 = this.{self::Test7::[]=}(#t192, #t194) in #t194 : #t193;
     core::num* v5 = let final core::String* #t196 = "x" in let final core::double* #t197 = this.{self::Test7::[]}(#t196) in #t197.{core::num::==}(null) ?{core::num*} let final core::num* #t198 = self::getNum() as{TypeError} core::int* in let final void #t199 = this.{self::Test7::[]=}(#t196, #t198) in #t198 : #t197;
-    core::double* v7 = let final core::String* #t200 = "x" in let final core::double #t201 = let final<BottomType> #t202 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart:264:30: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+    core::double* v7 = let final core::String* #t200 = "x" in let final core::double* #t201 = let final<BottomType> #t202 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart:264:30: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
         /*@target=double.+*/ += getInt();
                              ^" in this.{self::Test7::[]}(#t200).{core::double::+}(self::getInt()) as{TypeError} core::int* in let final void #t203 = this.{self::Test7::[]=}(#t200, #t201) in #t201;
-    core::double* v8 = let final core::String* #t204 = "x" in let final core::double #t205 = let final<BottomType> #t206 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart:268:30: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+    core::double* v8 = let final core::String* #t204 = "x" in let final core::double* #t205 = let final<BottomType> #t206 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart:268:30: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
         /*@target=double.+*/ += getNum();
                              ^" in this.{self::Test7::[]}(#t204).{core::double::+}(self::getNum()) as{TypeError} core::int* in let final void #t207 = this.{self::Test7::[]=}(#t204, #t205) in #t205;
-    core::double* v10 = let final core::String* #t208 = "x" in let final core::double #t209 = let final<BottomType> #t210 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart:270:56: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+    core::double* v10 = let final core::String* #t208 = "x" in let final core::double* #t209 = let final<BottomType> #t210 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart:270:56: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
     var /*@ type=double* */ v10 = /*@target=double.+*/ ++this
                                                        ^" in this.{self::Test7::[]}(#t208).{core::double::+}(1) as{TypeError} core::int* in let final void #t211 = this.{self::Test7::[]=}(#t208, #t209) in #t209;
     core::double* v11 = let final core::String* #t212 = "x" in let final core::double* #t213 = this.{self::Test7::[]}(#t212) in let final void #t214 = this.{self::Test7::[]=}(#t212, let final<BottomType> #t215 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_this_upwards.dart:275:30: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
@@ -257,10 +257,10 @@
     core::num* v4 = let final core::String* #t225 = "x" in let final core::double* #t226 = this.{self::Test8::[]}(#t225) in #t226.{core::num::==}(null) ?{core::num*} let final core::int* #t227 = self::getInt() in let final void #t228 = this.{self::Test8::[]=}(#t225, #t227) in #t227 : #t226;
     core::num* v5 = let final core::String* #t229 = "x" in let final core::double* #t230 = this.{self::Test8::[]}(#t229) in #t230.{core::num::==}(null) ?{core::num*} let final core::num* #t231 = self::getNum() in let final void #t232 = this.{self::Test8::[]=}(#t229, #t231) in #t231 : #t230;
     core::double* v6 = let final core::String* #t233 = "x" in let final core::double* #t234 = this.{self::Test8::[]}(#t233) in #t234.{core::num::==}(null) ?{core::double*} let final core::double* #t235 = self::getDouble() in let final void #t236 = this.{self::Test8::[]=}(#t233, #t235) in #t235 : #t234;
-    core::double* v7 = let final core::String* #t237 = "x" in let final core::double #t238 = this.{self::Test8::[]}(#t237).{core::double::+}(self::getInt()) in let final void #t239 = this.{self::Test8::[]=}(#t237, #t238) in #t238;
-    core::double* v8 = let final core::String* #t240 = "x" in let final core::double #t241 = this.{self::Test8::[]}(#t240).{core::double::+}(self::getNum()) in let final void #t242 = this.{self::Test8::[]=}(#t240, #t241) in #t241;
-    core::double* v9 = let final core::String* #t243 = "x" in let final core::double #t244 = this.{self::Test8::[]}(#t243).{core::double::+}(self::getDouble()) in let final void #t245 = this.{self::Test8::[]=}(#t243, #t244) in #t244;
-    core::double* v10 = let final core::String* #t246 = "x" in let final core::double #t247 = this.{self::Test8::[]}(#t246).{core::double::+}(1) in let final void #t248 = this.{self::Test8::[]=}(#t246, #t247) in #t247;
+    core::double* v7 = let final core::String* #t237 = "x" in let final core::double* #t238 = this.{self::Test8::[]}(#t237).{core::double::+}(self::getInt()) in let final void #t239 = this.{self::Test8::[]=}(#t237, #t238) in #t238;
+    core::double* v8 = let final core::String* #t240 = "x" in let final core::double* #t241 = this.{self::Test8::[]}(#t240).{core::double::+}(self::getNum()) in let final void #t242 = this.{self::Test8::[]=}(#t240, #t241) in #t241;
+    core::double* v9 = let final core::String* #t243 = "x" in let final core::double* #t244 = this.{self::Test8::[]}(#t243).{core::double::+}(self::getDouble()) in let final void #t245 = this.{self::Test8::[]=}(#t243, #t244) in #t244;
+    core::double* v10 = let final core::String* #t246 = "x" in let final core::double* #t247 = this.{self::Test8::[]}(#t246).{core::double::+}(1) in let final void #t248 = this.{self::Test8::[]=}(#t246, #t247) in #t247;
     core::double* v11 = let final core::String* #t249 = "x" in let final core::double* #t250 = this.{self::Test8::[]}(#t249) in let final void #t251 = this.{self::Test8::[]=}(#t249, #t250.{core::double::+}(1)) in #t250;
   }
   abstract member-signature get _identityHashCode() → core::int*;
@@ -285,10 +285,10 @@
     core::double* v3 = let final core::String* #t255 = "x" in let final core::double* #t256 = self::getDouble() in let final void #t257 = this.{self::Test9::[]=}(#t255, #t256) in #t256;
     core::num* v5 = let final core::String* #t258 = "x" in let final core::double* #t259 = this.{self::Test9::[]}(#t258) in #t259.{core::num::==}(null) ?{core::num*} let final core::num* #t260 = self::getNum() as{TypeError} core::double* in let final void #t261 = this.{self::Test9::[]=}(#t258, #t260) in #t260 : #t259;
     core::double* v6 = let final core::String* #t262 = "x" in let final core::double* #t263 = this.{self::Test9::[]}(#t262) in #t263.{core::num::==}(null) ?{core::double*} let final core::double* #t264 = self::getDouble() in let final void #t265 = this.{self::Test9::[]=}(#t262, #t264) in #t264 : #t263;
-    core::double* v7 = let final core::String* #t266 = "x" in let final core::double #t267 = this.{self::Test9::[]}(#t266).{core::double::+}(self::getInt()) in let final void #t268 = this.{self::Test9::[]=}(#t266, #t267) in #t267;
-    core::double* v8 = let final core::String* #t269 = "x" in let final core::double #t270 = this.{self::Test9::[]}(#t269).{core::double::+}(self::getNum()) in let final void #t271 = this.{self::Test9::[]=}(#t269, #t270) in #t270;
-    core::double* v9 = let final core::String* #t272 = "x" in let final core::double #t273 = this.{self::Test9::[]}(#t272).{core::double::+}(self::getDouble()) in let final void #t274 = this.{self::Test9::[]=}(#t272, #t273) in #t273;
-    core::double* v10 = let final core::String* #t275 = "x" in let final core::double #t276 = this.{self::Test9::[]}(#t275).{core::double::+}(1) in let final void #t277 = this.{self::Test9::[]=}(#t275, #t276) in #t276;
+    core::double* v7 = let final core::String* #t266 = "x" in let final core::double* #t267 = this.{self::Test9::[]}(#t266).{core::double::+}(self::getInt()) in let final void #t268 = this.{self::Test9::[]=}(#t266, #t267) in #t267;
+    core::double* v8 = let final core::String* #t269 = "x" in let final core::double* #t270 = this.{self::Test9::[]}(#t269).{core::double::+}(self::getNum()) in let final void #t271 = this.{self::Test9::[]=}(#t269, #t270) in #t270;
+    core::double* v9 = let final core::String* #t272 = "x" in let final core::double* #t273 = this.{self::Test9::[]}(#t272).{core::double::+}(self::getDouble()) in let final void #t274 = this.{self::Test9::[]=}(#t272, #t273) in #t273;
+    core::double* v10 = let final core::String* #t275 = "x" in let final core::double* #t276 = this.{self::Test9::[]}(#t275).{core::double::+}(1) in let final void #t277 = this.{self::Test9::[]=}(#t275, #t276) in #t276;
     core::double* v11 = let final core::String* #t278 = "x" in let final core::double* #t279 = this.{self::Test9::[]}(#t278) in let final void #t280 = this.{self::Test9::[]=}(#t278, #t279.{core::double::+}(1)) in #t279;
   }
   abstract member-signature get _identityHashCode() → core::int*;
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.strong.expect
index 4b4c09b..28e8772 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.strong.expect
@@ -101,9 +101,9 @@
   core::num* v2 = let final self::Test<core::num*, core::int*>* #t127 = t in let final core::String* #t128 = "x" in let final core::num* #t129 = self::getNum() as{TypeError} core::int* in let final void #t130 = #t127.{self::Test::[]=}(#t128, #t129) in #t129;
   core::num* v4 = let final self::Test<core::num*, core::int*>* #t131 = t in let final core::String* #t132 = "x" in let final core::num* #t133 = #t131.{self::Test::[]}(#t132) in #t133.{core::num::==}(null) ?{core::num*} let final core::int* #t134 = self::getInt() in let final void #t135 = #t131.{self::Test::[]=}(#t132, #t134) in #t134 : #t133;
   core::num* v5 = let final self::Test<core::num*, core::int*>* #t136 = t in let final core::String* #t137 = "x" in let final core::num* #t138 = #t136.{self::Test::[]}(#t137) in #t138.{core::num::==}(null) ?{core::num*} let final core::num* #t139 = self::getNum() as{TypeError} core::int* in let final void #t140 = #t136.{self::Test::[]=}(#t137, #t139) in #t139 : #t138;
-  core::num* v7 = let final self::Test<core::num*, core::int*>* #t141 = t in let final core::String* #t142 = "x" in let final core::num #t143 = #t141.{self::Test::[]}(#t142).{core::num::+}(self::getInt()) as{TypeError} core::int* in let final void #t144 = #t141.{self::Test::[]=}(#t142, #t143) in #t143;
-  core::num* v8 = let final self::Test<core::num*, core::int*>* #t145 = t in let final core::String* #t146 = "x" in let final core::num #t147 = #t145.{self::Test::[]}(#t146).{core::num::+}(self::getNum()) as{TypeError} core::int* in let final void #t148 = #t145.{self::Test::[]=}(#t146, #t147) in #t147;
-  core::num* v10 = let final self::Test<core::num*, core::int*>* #t149 = t in let final core::String* #t150 = "x" in let final core::num #t151 = #t149.{self::Test::[]}(#t150).{core::num::+}(1) as{TypeError} core::int* in let final void #t152 = #t149.{self::Test::[]=}(#t150, #t151) in #t151;
+  core::num* v7 = let final self::Test<core::num*, core::int*>* #t141 = t in let final core::String* #t142 = "x" in let final core::num* #t143 = #t141.{self::Test::[]}(#t142).{core::num::+}(self::getInt()) as{TypeError} core::int* in let final void #t144 = #t141.{self::Test::[]=}(#t142, #t143) in #t143;
+  core::num* v8 = let final self::Test<core::num*, core::int*>* #t145 = t in let final core::String* #t146 = "x" in let final core::num* #t147 = #t145.{self::Test::[]}(#t146).{core::num::+}(self::getNum()) as{TypeError} core::int* in let final void #t148 = #t145.{self::Test::[]=}(#t146, #t147) in #t147;
+  core::num* v10 = let final self::Test<core::num*, core::int*>* #t149 = t in let final core::String* #t150 = "x" in let final core::num* #t151 = #t149.{self::Test::[]}(#t150).{core::num::+}(1) as{TypeError} core::int* in let final void #t152 = #t149.{self::Test::[]=}(#t150, #t151) in #t151;
   core::num* v11 = let final self::Test<core::num*, core::int*>* #t153 = t in let final core::String* #t154 = "x" in let final core::num* #t155 = #t153.{self::Test::[]}(#t154) in let final void #t156 = #t153.{self::Test::[]=}(#t154, #t155.{core::num::+}(1) as{TypeError} core::int*) in #t155;
 }
 static method test5(self::Test<core::num*, core::num*>* t) → void {
@@ -113,10 +113,10 @@
   core::num* v4 = let final self::Test<core::num*, core::num*>* #t169 = t in let final core::String* #t170 = "x" in let final core::num* #t171 = #t169.{self::Test::[]}(#t170) in #t171.{core::num::==}(null) ?{core::num*} let final core::int* #t172 = self::getInt() in let final void #t173 = #t169.{self::Test::[]=}(#t170, #t172) in #t172 : #t171;
   core::num* v5 = let final self::Test<core::num*, core::num*>* #t174 = t in let final core::String* #t175 = "x" in let final core::num* #t176 = #t174.{self::Test::[]}(#t175) in #t176.{core::num::==}(null) ?{core::num*} let final core::num* #t177 = self::getNum() in let final void #t178 = #t174.{self::Test::[]=}(#t175, #t177) in #t177 : #t176;
   core::num* v6 = let final self::Test<core::num*, core::num*>* #t179 = t in let final core::String* #t180 = "x" in let final core::num* #t181 = #t179.{self::Test::[]}(#t180) in #t181.{core::num::==}(null) ?{core::num*} let final core::double* #t182 = self::getDouble() in let final void #t183 = #t179.{self::Test::[]=}(#t180, #t182) in #t182 : #t181;
-  core::num* v7 = let final self::Test<core::num*, core::num*>* #t184 = t in let final core::String* #t185 = "x" in let final core::num #t186 = #t184.{self::Test::[]}(#t185).{core::num::+}(self::getInt()) in let final void #t187 = #t184.{self::Test::[]=}(#t185, #t186) in #t186;
-  core::num* v8 = let final self::Test<core::num*, core::num*>* #t188 = t in let final core::String* #t189 = "x" in let final core::num #t190 = #t188.{self::Test::[]}(#t189).{core::num::+}(self::getNum()) in let final void #t191 = #t188.{self::Test::[]=}(#t189, #t190) in #t190;
-  core::num* v9 = let final self::Test<core::num*, core::num*>* #t192 = t in let final core::String* #t193 = "x" in let final core::num #t194 = #t192.{self::Test::[]}(#t193).{core::num::+}(self::getDouble()) in let final void #t195 = #t192.{self::Test::[]=}(#t193, #t194) in #t194;
-  core::num* v10 = let final self::Test<core::num*, core::num*>* #t196 = t in let final core::String* #t197 = "x" in let final core::num #t198 = #t196.{self::Test::[]}(#t197).{core::num::+}(1) in let final void #t199 = #t196.{self::Test::[]=}(#t197, #t198) in #t198;
+  core::num* v7 = let final self::Test<core::num*, core::num*>* #t184 = t in let final core::String* #t185 = "x" in let final core::num* #t186 = #t184.{self::Test::[]}(#t185).{core::num::+}(self::getInt()) in let final void #t187 = #t184.{self::Test::[]=}(#t185, #t186) in #t186;
+  core::num* v8 = let final self::Test<core::num*, core::num*>* #t188 = t in let final core::String* #t189 = "x" in let final core::num* #t190 = #t188.{self::Test::[]}(#t189).{core::num::+}(self::getNum()) in let final void #t191 = #t188.{self::Test::[]=}(#t189, #t190) in #t190;
+  core::num* v9 = let final self::Test<core::num*, core::num*>* #t192 = t in let final core::String* #t193 = "x" in let final core::num* #t194 = #t192.{self::Test::[]}(#t193).{core::num::+}(self::getDouble()) in let final void #t195 = #t192.{self::Test::[]=}(#t193, #t194) in #t194;
+  core::num* v10 = let final self::Test<core::num*, core::num*>* #t196 = t in let final core::String* #t197 = "x" in let final core::num* #t198 = #t196.{self::Test::[]}(#t197).{core::num::+}(1) in let final void #t199 = #t196.{self::Test::[]=}(#t197, #t198) in #t198;
   core::num* v11 = let final self::Test<core::num*, core::num*>* #t200 = t in let final core::String* #t201 = "x" in let final core::num* #t202 = #t200.{self::Test::[]}(#t201) in let final void #t203 = #t200.{self::Test::[]=}(#t201, #t202.{core::num::+}(1)) in #t202;
 }
 static method test6(self::Test<core::num*, core::double*>* t) → void {
@@ -124,10 +124,10 @@
   core::double* v3 = let final self::Test<core::num*, core::double*>* #t208 = t in let final core::String* #t209 = "x" in let final core::double* #t210 = self::getDouble() in let final void #t211 = #t208.{self::Test::[]=}(#t209, #t210) in #t210;
   core::num* v5 = let final self::Test<core::num*, core::double*>* #t212 = t in let final core::String* #t213 = "x" in let final core::num* #t214 = #t212.{self::Test::[]}(#t213) in #t214.{core::num::==}(null) ?{core::num*} let final core::num* #t215 = self::getNum() as{TypeError} core::double* in let final void #t216 = #t212.{self::Test::[]=}(#t213, #t215) in #t215 : #t214;
   core::num* v6 = let final self::Test<core::num*, core::double*>* #t217 = t in let final core::String* #t218 = "x" in let final core::num* #t219 = #t217.{self::Test::[]}(#t218) in #t219.{core::num::==}(null) ?{core::num*} let final core::double* #t220 = self::getDouble() in let final void #t221 = #t217.{self::Test::[]=}(#t218, #t220) in #t220 : #t219;
-  core::num* v7 = let final self::Test<core::num*, core::double*>* #t222 = t in let final core::String* #t223 = "x" in let final core::num #t224 = #t222.{self::Test::[]}(#t223).{core::num::+}(self::getInt()) as{TypeError} core::double* in let final void #t225 = #t222.{self::Test::[]=}(#t223, #t224) in #t224;
-  core::num* v8 = let final self::Test<core::num*, core::double*>* #t226 = t in let final core::String* #t227 = "x" in let final core::num #t228 = #t226.{self::Test::[]}(#t227).{core::num::+}(self::getNum()) as{TypeError} core::double* in let final void #t229 = #t226.{self::Test::[]=}(#t227, #t228) in #t228;
-  core::num* v9 = let final self::Test<core::num*, core::double*>* #t230 = t in let final core::String* #t231 = "x" in let final core::num #t232 = #t230.{self::Test::[]}(#t231).{core::num::+}(self::getDouble()) as{TypeError} core::double* in let final void #t233 = #t230.{self::Test::[]=}(#t231, #t232) in #t232;
-  core::num* v10 = let final self::Test<core::num*, core::double*>* #t234 = t in let final core::String* #t235 = "x" in let final core::num #t236 = #t234.{self::Test::[]}(#t235).{core::num::+}(1) as{TypeError} core::double* in let final void #t237 = #t234.{self::Test::[]=}(#t235, #t236) in #t236;
+  core::num* v7 = let final self::Test<core::num*, core::double*>* #t222 = t in let final core::String* #t223 = "x" in let final core::num* #t224 = #t222.{self::Test::[]}(#t223).{core::num::+}(self::getInt()) as{TypeError} core::double* in let final void #t225 = #t222.{self::Test::[]=}(#t223, #t224) in #t224;
+  core::num* v8 = let final self::Test<core::num*, core::double*>* #t226 = t in let final core::String* #t227 = "x" in let final core::num* #t228 = #t226.{self::Test::[]}(#t227).{core::num::+}(self::getNum()) as{TypeError} core::double* in let final void #t229 = #t226.{self::Test::[]=}(#t227, #t228) in #t228;
+  core::num* v9 = let final self::Test<core::num*, core::double*>* #t230 = t in let final core::String* #t231 = "x" in let final core::num* #t232 = #t230.{self::Test::[]}(#t231).{core::num::+}(self::getDouble()) as{TypeError} core::double* in let final void #t233 = #t230.{self::Test::[]=}(#t231, #t232) in #t232;
+  core::num* v10 = let final self::Test<core::num*, core::double*>* #t234 = t in let final core::String* #t235 = "x" in let final core::num* #t236 = #t234.{self::Test::[]}(#t235).{core::num::+}(1) as{TypeError} core::double* in let final void #t237 = #t234.{self::Test::[]=}(#t235, #t236) in #t236;
   core::num* v11 = let final self::Test<core::num*, core::double*>* #t238 = t in let final core::String* #t239 = "x" in let final core::num* #t240 = #t238.{self::Test::[]}(#t239) in let final void #t241 = #t238.{self::Test::[]=}(#t239, #t240.{core::num::+}(1) as{TypeError} core::double*) in #t240;
 }
 static method test7(self::Test<core::double*, core::int*>* t) → void {
@@ -135,13 +135,13 @@
   core::num* v2 = let final self::Test<core::double*, core::int*>* #t246 = t in let final core::String* #t247 = "x" in let final core::num* #t248 = self::getNum() as{TypeError} core::int* in let final void #t249 = #t246.{self::Test::[]=}(#t247, #t248) in #t248;
   core::num* v4 = let final self::Test<core::double*, core::int*>* #t250 = t in let final core::String* #t251 = "x" in let final core::double* #t252 = #t250.{self::Test::[]}(#t251) in #t252.{core::num::==}(null) ?{core::num*} let final core::int* #t253 = self::getInt() in let final void #t254 = #t250.{self::Test::[]=}(#t251, #t253) in #t253 : #t252;
   core::num* v5 = let final self::Test<core::double*, core::int*>* #t255 = t in let final core::String* #t256 = "x" in let final core::double* #t257 = #t255.{self::Test::[]}(#t256) in #t257.{core::num::==}(null) ?{core::num*} let final core::num* #t258 = self::getNum() as{TypeError} core::int* in let final void #t259 = #t255.{self::Test::[]=}(#t256, #t258) in #t258 : #t257;
-  core::double* v7 = let final self::Test<core::double*, core::int*>* #t260 = t in let final core::String* #t261 = "x" in let final core::double #t262 = let final<BottomType> #t263 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart:211:77: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  core::double* v7 = let final self::Test<core::double*, core::int*>* #t260 = t in let final core::String* #t261 = "x" in let final core::double* #t262 = let final<BottomType> #t263 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart:211:77: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=double.+*/ +=
                                                                             ^" in #t260.{self::Test::[]}(#t261).{core::double::+}(self::getInt()) as{TypeError} core::int* in let final void #t264 = #t260.{self::Test::[]=}(#t261, #t262) in #t262;
-  core::double* v8 = let final self::Test<core::double*, core::int*>* #t265 = t in let final core::String* #t266 = "x" in let final core::double #t267 = let final<BottomType> #t268 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart:215:77: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  core::double* v8 = let final self::Test<core::double*, core::int*>* #t265 = t in let final core::String* #t266 = "x" in let final core::double* #t267 = let final<BottomType> #t268 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart:215:77: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
       t /*@target=Test.[]*/ /*@target=Test.[]=*/ ['x'] /*@target=double.+*/ +=
                                                                             ^" in #t265.{self::Test::[]}(#t266).{core::double::+}(self::getNum()) as{TypeError} core::int* in let final void #t269 = #t265.{self::Test::[]=}(#t266, #t267) in #t267;
-  core::double* v10 = let final self::Test<core::double*, core::int*>* #t270 = t in let final core::String* #t271 = "x" in let final core::double #t272 = let final<BottomType> #t273 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart:219:28: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  core::double* v10 = let final self::Test<core::double*, core::int*>* #t270 = t in let final core::String* #t271 = "x" in let final core::double* #t272 = let final<BottomType> #t273 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart:219:28: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
       /*@target=double.+*/ ++t
                            ^" in #t270.{self::Test::[]}(#t271).{core::double::+}(1) as{TypeError} core::int* in let final void #t274 = #t270.{self::Test::[]=}(#t271, #t272) in #t272;
   core::double* v11 = let final self::Test<core::double*, core::int*>* #t275 = t in let final core::String* #t276 = "x" in let final core::double* #t277 = #t275.{self::Test::[]}(#t276) in let final void #t278 = #t275.{self::Test::[]=}(#t276, let final<BottomType> #t279 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart:223:77: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
@@ -155,10 +155,10 @@
   core::num* v4 = let final self::Test<core::double*, core::num*>* #t292 = t in let final core::String* #t293 = "x" in let final core::double* #t294 = #t292.{self::Test::[]}(#t293) in #t294.{core::num::==}(null) ?{core::num*} let final core::int* #t295 = self::getInt() in let final void #t296 = #t292.{self::Test::[]=}(#t293, #t295) in #t295 : #t294;
   core::num* v5 = let final self::Test<core::double*, core::num*>* #t297 = t in let final core::String* #t298 = "x" in let final core::double* #t299 = #t297.{self::Test::[]}(#t298) in #t299.{core::num::==}(null) ?{core::num*} let final core::num* #t300 = self::getNum() in let final void #t301 = #t297.{self::Test::[]=}(#t298, #t300) in #t300 : #t299;
   core::double* v6 = let final self::Test<core::double*, core::num*>* #t302 = t in let final core::String* #t303 = "x" in let final core::double* #t304 = #t302.{self::Test::[]}(#t303) in #t304.{core::num::==}(null) ?{core::double*} let final core::double* #t305 = self::getDouble() in let final void #t306 = #t302.{self::Test::[]=}(#t303, #t305) in #t305 : #t304;
-  core::double* v7 = let final self::Test<core::double*, core::num*>* #t307 = t in let final core::String* #t308 = "x" in let final core::double #t309 = #t307.{self::Test::[]}(#t308).{core::double::+}(self::getInt()) in let final void #t310 = #t307.{self::Test::[]=}(#t308, #t309) in #t309;
-  core::double* v8 = let final self::Test<core::double*, core::num*>* #t311 = t in let final core::String* #t312 = "x" in let final core::double #t313 = #t311.{self::Test::[]}(#t312).{core::double::+}(self::getNum()) in let final void #t314 = #t311.{self::Test::[]=}(#t312, #t313) in #t313;
-  core::double* v9 = let final self::Test<core::double*, core::num*>* #t315 = t in let final core::String* #t316 = "x" in let final core::double #t317 = #t315.{self::Test::[]}(#t316).{core::double::+}(self::getDouble()) in let final void #t318 = #t315.{self::Test::[]=}(#t316, #t317) in #t317;
-  core::double* v10 = let final self::Test<core::double*, core::num*>* #t319 = t in let final core::String* #t320 = "x" in let final core::double #t321 = #t319.{self::Test::[]}(#t320).{core::double::+}(1) in let final void #t322 = #t319.{self::Test::[]=}(#t320, #t321) in #t321;
+  core::double* v7 = let final self::Test<core::double*, core::num*>* #t307 = t in let final core::String* #t308 = "x" in let final core::double* #t309 = #t307.{self::Test::[]}(#t308).{core::double::+}(self::getInt()) in let final void #t310 = #t307.{self::Test::[]=}(#t308, #t309) in #t309;
+  core::double* v8 = let final self::Test<core::double*, core::num*>* #t311 = t in let final core::String* #t312 = "x" in let final core::double* #t313 = #t311.{self::Test::[]}(#t312).{core::double::+}(self::getNum()) in let final void #t314 = #t311.{self::Test::[]=}(#t312, #t313) in #t313;
+  core::double* v9 = let final self::Test<core::double*, core::num*>* #t315 = t in let final core::String* #t316 = "x" in let final core::double* #t317 = #t315.{self::Test::[]}(#t316).{core::double::+}(self::getDouble()) in let final void #t318 = #t315.{self::Test::[]=}(#t316, #t317) in #t317;
+  core::double* v10 = let final self::Test<core::double*, core::num*>* #t319 = t in let final core::String* #t320 = "x" in let final core::double* #t321 = #t319.{self::Test::[]}(#t320).{core::double::+}(1) in let final void #t322 = #t319.{self::Test::[]=}(#t320, #t321) in #t321;
   core::double* v11 = let final self::Test<core::double*, core::num*>* #t323 = t in let final core::String* #t324 = "x" in let final core::double* #t325 = #t323.{self::Test::[]}(#t324) in let final void #t326 = #t323.{self::Test::[]=}(#t324, #t325.{core::double::+}(1)) in #t325;
 }
 static method test9(self::Test<core::double*, core::double*>* t) → void {
@@ -166,10 +166,10 @@
   core::double* v3 = let final self::Test<core::double*, core::double*>* #t331 = t in let final core::String* #t332 = "x" in let final core::double* #t333 = self::getDouble() in let final void #t334 = #t331.{self::Test::[]=}(#t332, #t333) in #t333;
   core::num* v5 = let final self::Test<core::double*, core::double*>* #t335 = t in let final core::String* #t336 = "x" in let final core::double* #t337 = #t335.{self::Test::[]}(#t336) in #t337.{core::num::==}(null) ?{core::num*} let final core::num* #t338 = self::getNum() as{TypeError} core::double* in let final void #t339 = #t335.{self::Test::[]=}(#t336, #t338) in #t338 : #t337;
   core::double* v6 = let final self::Test<core::double*, core::double*>* #t340 = t in let final core::String* #t341 = "x" in let final core::double* #t342 = #t340.{self::Test::[]}(#t341) in #t342.{core::num::==}(null) ?{core::double*} let final core::double* #t343 = self::getDouble() in let final void #t344 = #t340.{self::Test::[]=}(#t341, #t343) in #t343 : #t342;
-  core::double* v7 = let final self::Test<core::double*, core::double*>* #t345 = t in let final core::String* #t346 = "x" in let final core::double #t347 = #t345.{self::Test::[]}(#t346).{core::double::+}(self::getInt()) in let final void #t348 = #t345.{self::Test::[]=}(#t346, #t347) in #t347;
-  core::double* v8 = let final self::Test<core::double*, core::double*>* #t349 = t in let final core::String* #t350 = "x" in let final core::double #t351 = #t349.{self::Test::[]}(#t350).{core::double::+}(self::getNum()) in let final void #t352 = #t349.{self::Test::[]=}(#t350, #t351) in #t351;
-  core::double* v9 = let final self::Test<core::double*, core::double*>* #t353 = t in let final core::String* #t354 = "x" in let final core::double #t355 = #t353.{self::Test::[]}(#t354).{core::double::+}(self::getDouble()) in let final void #t356 = #t353.{self::Test::[]=}(#t354, #t355) in #t355;
-  core::double* v10 = let final self::Test<core::double*, core::double*>* #t357 = t in let final core::String* #t358 = "x" in let final core::double #t359 = #t357.{self::Test::[]}(#t358).{core::double::+}(1) in let final void #t360 = #t357.{self::Test::[]=}(#t358, #t359) in #t359;
+  core::double* v7 = let final self::Test<core::double*, core::double*>* #t345 = t in let final core::String* #t346 = "x" in let final core::double* #t347 = #t345.{self::Test::[]}(#t346).{core::double::+}(self::getInt()) in let final void #t348 = #t345.{self::Test::[]=}(#t346, #t347) in #t347;
+  core::double* v8 = let final self::Test<core::double*, core::double*>* #t349 = t in let final core::String* #t350 = "x" in let final core::double* #t351 = #t349.{self::Test::[]}(#t350).{core::double::+}(self::getNum()) in let final void #t352 = #t349.{self::Test::[]=}(#t350, #t351) in #t351;
+  core::double* v9 = let final self::Test<core::double*, core::double*>* #t353 = t in let final core::String* #t354 = "x" in let final core::double* #t355 = #t353.{self::Test::[]}(#t354).{core::double::+}(self::getDouble()) in let final void #t356 = #t353.{self::Test::[]=}(#t354, #t355) in #t355;
+  core::double* v10 = let final self::Test<core::double*, core::double*>* #t357 = t in let final core::String* #t358 = "x" in let final core::double* #t359 = #t357.{self::Test::[]}(#t358).{core::double::+}(1) in let final void #t360 = #t357.{self::Test::[]=}(#t358, #t359) in #t359;
   core::double* v11 = let final self::Test<core::double*, core::double*>* #t361 = t in let final core::String* #t362 = "x" in let final core::double* #t363 = #t361.{self::Test::[]}(#t362) in let final void #t364 = #t361.{self::Test::[]=}(#t362, #t363.{core::double::+}(1)) in #t363;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart.strong.expect
index 4f02efd..c1ec8db 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart.strong.expect
@@ -40,10 +40,10 @@
     core::num* v4 = let final self::Test2* #t22 = t in #t22.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t23 = #t22.{self::Test2::prop} in #t23.{core::num::==}(null) ?{core::num*} #t22.{self::Test2::prop} = self::getInt() : #t23;
     core::num* v5 = let final self::Test2* #t24 = t in #t24.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t25 = #t24.{self::Test2::prop} in #t25.{core::num::==}(null) ?{core::num*} #t24.{self::Test2::prop} = self::getNum() : #t25;
     core::num* v6 = let final self::Test2* #t26 = t in #t26.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t27 = #t26.{self::Test2::prop} in #t27.{core::num::==}(null) ?{core::num*} #t26.{self::Test2::prop} = self::getDouble() : #t27;
-    core::num* v7 = let final self::Test2* #t28 = t in #t28.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t29 = #t28.{self::Test2::prop}.{core::num::+}(self::getInt()) in let final void #t30 = #t28.{self::Test2::prop} = #t29 in #t29;
-    core::num* v8 = let final self::Test2* #t31 = t in #t31.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t32 = #t31.{self::Test2::prop}.{core::num::+}(self::getNum()) in let final void #t33 = #t31.{self::Test2::prop} = #t32 in #t32;
-    core::num* v9 = let final self::Test2* #t34 = t in #t34.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t35 = #t34.{self::Test2::prop}.{core::num::+}(self::getDouble()) in let final void #t36 = #t34.{self::Test2::prop} = #t35 in #t35;
-    core::num* v10 = let final self::Test2* #t37 = t in #t37.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t38 = #t37.{self::Test2::prop}.{core::num::+}(1) in let final void #t39 = #t37.{self::Test2::prop} = #t38 in #t38;
+    core::num* v7 = let final self::Test2* #t28 = t in #t28.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t29 = #t28.{self::Test2::prop}.{core::num::+}(self::getInt()) in let final void #t30 = #t28.{self::Test2::prop} = #t29 in #t29;
+    core::num* v8 = let final self::Test2* #t31 = t in #t31.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t32 = #t31.{self::Test2::prop}.{core::num::+}(self::getNum()) in let final void #t33 = #t31.{self::Test2::prop} = #t32 in #t32;
+    core::num* v9 = let final self::Test2* #t34 = t in #t34.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t35 = #t34.{self::Test2::prop}.{core::num::+}(self::getDouble()) in let final void #t36 = #t34.{self::Test2::prop} = #t35 in #t35;
+    core::num* v10 = let final self::Test2* #t37 = t in #t37.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t38 = #t37.{self::Test2::prop}.{core::num::+}(1) in let final void #t39 = #t37.{self::Test2::prop} = #t38 in #t38;
     core::num* v11 = let final self::Test2* #t40 = t in #t40.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t41 = #t40.{self::Test2::prop} in let final void #t42 = #t40.{self::Test2::prop} = #t41.{core::num::+}(1) in #t41;
   }
   abstract member-signature get _identityHashCode() → core::int*;
@@ -67,10 +67,10 @@
     core::double* v3 = let final self::Test3* #t44 = t in #t44.{self::Test3::==}(null) ?{core::double*} null : #t44.{self::Test3::prop} = self::getDouble();
     core::num* v5 = let final self::Test3* #t45 = t in #t45.{self::Test3::==}(null) ?{core::num*} null : let final core::double* #t46 = #t45.{self::Test3::prop} in #t46.{core::num::==}(null) ?{core::num*} #t45.{self::Test3::prop} = self::getNum() as{TypeError} core::double* : #t46;
     core::double* v6 = let final self::Test3* #t47 = t in #t47.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t48 = #t47.{self::Test3::prop} in #t48.{core::num::==}(null) ?{core::double*} #t47.{self::Test3::prop} = self::getDouble() : #t48;
-    core::double* v7 = let final self::Test3* #t49 = t in #t49.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t50 = #t49.{self::Test3::prop}.{core::double::+}(self::getInt()) in let final void #t51 = #t49.{self::Test3::prop} = #t50 in #t50;
-    core::double* v8 = let final self::Test3* #t52 = t in #t52.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t53 = #t52.{self::Test3::prop}.{core::double::+}(self::getNum()) in let final void #t54 = #t52.{self::Test3::prop} = #t53 in #t53;
-    core::double* v9 = let final self::Test3* #t55 = t in #t55.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t56 = #t55.{self::Test3::prop}.{core::double::+}(self::getDouble()) in let final void #t57 = #t55.{self::Test3::prop} = #t56 in #t56;
-    core::double* v10 = let final self::Test3* #t58 = t in #t58.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t59 = #t58.{self::Test3::prop}.{core::double::+}(1) in let final void #t60 = #t58.{self::Test3::prop} = #t59 in #t59;
+    core::double* v7 = let final self::Test3* #t49 = t in #t49.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t50 = #t49.{self::Test3::prop}.{core::double::+}(self::getInt()) in let final void #t51 = #t49.{self::Test3::prop} = #t50 in #t50;
+    core::double* v8 = let final self::Test3* #t52 = t in #t52.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t53 = #t52.{self::Test3::prop}.{core::double::+}(self::getNum()) in let final void #t54 = #t52.{self::Test3::prop} = #t53 in #t53;
+    core::double* v9 = let final self::Test3* #t55 = t in #t55.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t56 = #t55.{self::Test3::prop}.{core::double::+}(self::getDouble()) in let final void #t57 = #t55.{self::Test3::prop} = #t56 in #t56;
+    core::double* v10 = let final self::Test3* #t58 = t in #t58.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t59 = #t58.{self::Test3::prop}.{core::double::+}(1) in let final void #t60 = #t58.{self::Test3::prop} = #t59 in #t59;
     core::double* v11 = let final self::Test3* #t61 = t in #t61.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t62 = #t61.{self::Test3::prop} in let final void #t63 = #t61.{self::Test3::prop} = #t62.{core::double::+}(1) in #t62;
   }
   abstract member-signature get _identityHashCode() → core::int*;
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart.strong.transformed.expect
index 4f02efd..c1ec8db 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_null_aware_upwards.dart.strong.transformed.expect
@@ -40,10 +40,10 @@
     core::num* v4 = let final self::Test2* #t22 = t in #t22.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t23 = #t22.{self::Test2::prop} in #t23.{core::num::==}(null) ?{core::num*} #t22.{self::Test2::prop} = self::getInt() : #t23;
     core::num* v5 = let final self::Test2* #t24 = t in #t24.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t25 = #t24.{self::Test2::prop} in #t25.{core::num::==}(null) ?{core::num*} #t24.{self::Test2::prop} = self::getNum() : #t25;
     core::num* v6 = let final self::Test2* #t26 = t in #t26.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t27 = #t26.{self::Test2::prop} in #t27.{core::num::==}(null) ?{core::num*} #t26.{self::Test2::prop} = self::getDouble() : #t27;
-    core::num* v7 = let final self::Test2* #t28 = t in #t28.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t29 = #t28.{self::Test2::prop}.{core::num::+}(self::getInt()) in let final void #t30 = #t28.{self::Test2::prop} = #t29 in #t29;
-    core::num* v8 = let final self::Test2* #t31 = t in #t31.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t32 = #t31.{self::Test2::prop}.{core::num::+}(self::getNum()) in let final void #t33 = #t31.{self::Test2::prop} = #t32 in #t32;
-    core::num* v9 = let final self::Test2* #t34 = t in #t34.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t35 = #t34.{self::Test2::prop}.{core::num::+}(self::getDouble()) in let final void #t36 = #t34.{self::Test2::prop} = #t35 in #t35;
-    core::num* v10 = let final self::Test2* #t37 = t in #t37.{self::Test2::==}(null) ?{core::num*} null : let final core::num #t38 = #t37.{self::Test2::prop}.{core::num::+}(1) in let final void #t39 = #t37.{self::Test2::prop} = #t38 in #t38;
+    core::num* v7 = let final self::Test2* #t28 = t in #t28.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t29 = #t28.{self::Test2::prop}.{core::num::+}(self::getInt()) in let final void #t30 = #t28.{self::Test2::prop} = #t29 in #t29;
+    core::num* v8 = let final self::Test2* #t31 = t in #t31.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t32 = #t31.{self::Test2::prop}.{core::num::+}(self::getNum()) in let final void #t33 = #t31.{self::Test2::prop} = #t32 in #t32;
+    core::num* v9 = let final self::Test2* #t34 = t in #t34.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t35 = #t34.{self::Test2::prop}.{core::num::+}(self::getDouble()) in let final void #t36 = #t34.{self::Test2::prop} = #t35 in #t35;
+    core::num* v10 = let final self::Test2* #t37 = t in #t37.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t38 = #t37.{self::Test2::prop}.{core::num::+}(1) in let final void #t39 = #t37.{self::Test2::prop} = #t38 in #t38;
     core::num* v11 = let final self::Test2* #t40 = t in #t40.{self::Test2::==}(null) ?{core::num*} null : let final core::num* #t41 = #t40.{self::Test2::prop} in let final void #t42 = #t40.{self::Test2::prop} = #t41.{core::num::+}(1) in #t41;
   }
   abstract member-signature get _identityHashCode() → core::int*;
@@ -67,10 +67,10 @@
     core::double* v3 = let final self::Test3* #t44 = t in #t44.{self::Test3::==}(null) ?{core::double*} null : #t44.{self::Test3::prop} = self::getDouble();
     core::num* v5 = let final self::Test3* #t45 = t in #t45.{self::Test3::==}(null) ?{core::num*} null : let final core::double* #t46 = #t45.{self::Test3::prop} in #t46.{core::num::==}(null) ?{core::num*} #t45.{self::Test3::prop} = self::getNum() as{TypeError} core::double* : #t46;
     core::double* v6 = let final self::Test3* #t47 = t in #t47.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t48 = #t47.{self::Test3::prop} in #t48.{core::num::==}(null) ?{core::double*} #t47.{self::Test3::prop} = self::getDouble() : #t48;
-    core::double* v7 = let final self::Test3* #t49 = t in #t49.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t50 = #t49.{self::Test3::prop}.{core::double::+}(self::getInt()) in let final void #t51 = #t49.{self::Test3::prop} = #t50 in #t50;
-    core::double* v8 = let final self::Test3* #t52 = t in #t52.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t53 = #t52.{self::Test3::prop}.{core::double::+}(self::getNum()) in let final void #t54 = #t52.{self::Test3::prop} = #t53 in #t53;
-    core::double* v9 = let final self::Test3* #t55 = t in #t55.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t56 = #t55.{self::Test3::prop}.{core::double::+}(self::getDouble()) in let final void #t57 = #t55.{self::Test3::prop} = #t56 in #t56;
-    core::double* v10 = let final self::Test3* #t58 = t in #t58.{self::Test3::==}(null) ?{core::double*} null : let final core::double #t59 = #t58.{self::Test3::prop}.{core::double::+}(1) in let final void #t60 = #t58.{self::Test3::prop} = #t59 in #t59;
+    core::double* v7 = let final self::Test3* #t49 = t in #t49.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t50 = #t49.{self::Test3::prop}.{core::double::+}(self::getInt()) in let final void #t51 = #t49.{self::Test3::prop} = #t50 in #t50;
+    core::double* v8 = let final self::Test3* #t52 = t in #t52.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t53 = #t52.{self::Test3::prop}.{core::double::+}(self::getNum()) in let final void #t54 = #t52.{self::Test3::prop} = #t53 in #t53;
+    core::double* v9 = let final self::Test3* #t55 = t in #t55.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t56 = #t55.{self::Test3::prop}.{core::double::+}(self::getDouble()) in let final void #t57 = #t55.{self::Test3::prop} = #t56 in #t56;
+    core::double* v10 = let final self::Test3* #t58 = t in #t58.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t59 = #t58.{self::Test3::prop}.{core::double::+}(1) in let final void #t60 = #t58.{self::Test3::prop} = #t59 in #t59;
     core::double* v11 = let final self::Test3* #t61 = t in #t61.{self::Test3::==}(null) ?{core::double*} null : let final core::double* #t62 = #t61.{self::Test3::prop} in let final void #t63 = #t61.{self::Test3::prop} = #t62.{core::double::+}(1) in #t62;
   }
   abstract member-signature get _identityHashCode() → core::int*;
diff --git a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart
new file mode 100644
index 0000000..3fd4ae8
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.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.
+
+abstract int topLevelField;
+
+abstract final int finalTopLevelField = 0;
+
+abstract const int constField = 0;
+
+abstract class A {
+  abstract int fieldWithInitializer = 0;
+
+  abstract int initializedField1;
+
+  abstract int initializedField2;
+
+  A(this.initializedField1) : this.initializedField2 = 0;
+
+  abstract static int staticField;
+
+  abstract static final int finalStaticField;
+
+  abstract late int lateInstanceField;
+
+  external abstract int externalInstanceField;
+
+  external abstract final int externalFinalInstanceField;
+
+  external abstract covariant num externalCovariantInstanceField;
+
+  abstract external int externalInstanceField;
+
+  abstract external final int externalFinalInstanceField;
+
+  abstract external covariant num externalCovariantInstanceField;
+
+  external abstract late int externalLateInstanceField;
+}
+
+mixin B {
+  abstract static int staticField;
+
+  abstract static final int finalStaticField;
+
+  external abstract int externalInstanceField;
+
+  external abstract final int externalFinalInstanceField;
+
+  external abstract covariant num externalCovariantInstanceField;
+
+}
+
+extension Extension on A {
+  abstract int extensionInstanceField;
+  abstract final int finalExtensionInstanceField;
+  abstract static int extensionStaticField;
+  abstract static final int finalExtensionStaticField;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.outline.expect b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.outline.expect
new file mode 100644
index 0000000..4ac62a9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.outline.expect
@@ -0,0 +1,229 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract int topLevelField;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:7:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract final int finalTopLevelField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:9:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract const int constField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:24:3: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   abstract late int lateInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external int externalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:25: Error: 'externalInstanceField' is already declared in this scope.
+//   abstract external int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:25: Context: Previous declaration of 'externalInstanceField'.
+//   external abstract int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external final int externalFinalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:31: Error: 'externalFinalInstanceField' is already declared in this scope.
+//   abstract external final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:31: Context: Previous declaration of 'externalFinalInstanceField'.
+//   external abstract final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external covariant num externalCovariantInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:35: Error: 'externalCovariantInstanceField' is already declared in this scope.
+//   abstract external covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:35: Context: Previous declaration of 'externalCovariantInstanceField'.
+//   external abstract covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:46:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:48:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:50:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:23: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static int extensionStaticField;
+//                       ^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int extensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:29: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static final int finalExtensionStaticField;
+//                             ^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalExtensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:14: Error: Field 'topLevelField' should be initialized because its type 'int' doesn't allow null.
+// abstract int topLevelField;
+//              ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  static field core::int staticField;
+  static final field core::int finalStaticField;
+  late field core::int lateInstanceField;
+  constructor •(core::int initializedField1) → self::A
+    ;
+  abstract get fieldWithInitializer() → core::int;
+  abstract set fieldWithInitializer(core::int #t1) → void;
+  abstract get initializedField1() → core::int;
+  abstract set initializedField1(core::int #t2) → void;
+  abstract get initializedField2() → core::int;
+  abstract set initializedField2(core::int #t3) → void;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t4) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t5) → void;
+  external get externalLateInstanceField() → core::int;
+  external set externalLateInstanceField(core::int #t6) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  static field core::int staticField;
+  static final field core::int finalStaticField;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t7) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t8) → void;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static field extensionStaticField = self::Extension|extensionStaticField;
+  static field finalExtensionStaticField = self::Extension|finalExtensionStaticField;
+}
+static field core::int topLevelField;
+static final field core::int finalTopLevelField;
+static const field core::int constField = 0;
+static field core::int Extension|extensionStaticField;
+static final field core::int Extension|finalExtensionStaticField;
+static abstract get Extension|extensionInstanceField() → core::int;
+static abstract set Extension|extensionInstanceField(core::int #t9) → void;
+static abstract get Extension|finalExtensionInstanceField() → core::int;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.strong.expect b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.strong.expect
new file mode 100644
index 0000000..8181af4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.strong.expect
@@ -0,0 +1,264 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract int topLevelField;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:7:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract final int finalTopLevelField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:9:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract const int constField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:24:3: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   abstract late int lateInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external int externalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:25: Error: 'externalInstanceField' is already declared in this scope.
+//   abstract external int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:25: Context: Previous declaration of 'externalInstanceField'.
+//   external abstract int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external final int externalFinalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:31: Error: 'externalFinalInstanceField' is already declared in this scope.
+//   abstract external final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:31: Context: Previous declaration of 'externalFinalInstanceField'.
+//   external abstract final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external covariant num externalCovariantInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:35: Error: 'externalCovariantInstanceField' is already declared in this scope.
+//   abstract external covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:35: Context: Previous declaration of 'externalCovariantInstanceField'.
+//   external abstract covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:46:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:48:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:50:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:23: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static int extensionStaticField;
+//                       ^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int extensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:29: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static final int finalExtensionStaticField;
+//                             ^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalExtensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:14: Error: Field 'topLevelField' should be initialized because its type 'int' doesn't allow null.
+// abstract int topLevelField;
+//              ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:12:37: Error: Abstract fields cannot have initializers.
+// Try removing the initializer or the 'abstract' keyword.
+//   abstract int fieldWithInitializer = 0;
+//                                     ^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:10: Error: Abstract fields cannot have initializers.
+// Try removing the field initializer or the 'abstract' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//          ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:36: Error: Abstract fields cannot have initializers.
+// Try removing the field initializer or the 'abstract' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//                                    ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:29: Error: Final field 'finalStaticField' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:29: Error: Final field 'finalStaticField' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  static field core::int staticField = null;
+  static final field core::int finalStaticField = null;
+  late field core::int lateInstanceField;
+  constructor •(core::int initializedField1) → self::A
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:10: Error: Abstract fields cannot have initializers.
+Try removing the field initializer or the 'abstract' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+         ^^^^^^^^^^^^^^^^^", final dynamic #t2 = invalid-expression "pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:36: Error: Abstract fields cannot have initializers.
+Try removing the field initializer or the 'abstract' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+                                   ^^^^^^^^^^^^^^^^^"
+    ;
+  abstract get fieldWithInitializer() → core::int;
+  abstract set fieldWithInitializer(core::int #t3) → void;
+  abstract get initializedField1() → core::int;
+  abstract set initializedField1(core::int #t4) → void;
+  abstract get initializedField2() → core::int;
+  abstract set initializedField2(core::int #t5) → void;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t6) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t7) → void;
+  external get externalLateInstanceField() → core::int;
+  external set externalLateInstanceField(core::int #t8) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  static field core::int staticField = null;
+  static final field core::int finalStaticField = null;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t9) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t10) → void;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static field extensionStaticField = self::Extension|extensionStaticField;
+  static field finalExtensionStaticField = self::Extension|finalExtensionStaticField;
+}
+static field core::int topLevelField;
+static final field core::int finalTopLevelField = 0;
+static const field core::int constField = #C1;
+static field core::int Extension|extensionStaticField;
+static final field core::int Extension|finalExtensionStaticField;
+static abstract get Extension|extensionInstanceField() → core::int;
+static abstract set Extension|extensionInstanceField(core::int #t11) → void;
+static abstract get Extension|finalExtensionInstanceField() → core::int;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = 0
+}
diff --git a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.strong.transformed.expect
new file mode 100644
index 0000000..8181af4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.strong.transformed.expect
@@ -0,0 +1,264 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract int topLevelField;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:7:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract final int finalTopLevelField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:9:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract const int constField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:24:3: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   abstract late int lateInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external int externalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:25: Error: 'externalInstanceField' is already declared in this scope.
+//   abstract external int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:25: Context: Previous declaration of 'externalInstanceField'.
+//   external abstract int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external final int externalFinalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:31: Error: 'externalFinalInstanceField' is already declared in this scope.
+//   abstract external final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:31: Context: Previous declaration of 'externalFinalInstanceField'.
+//   external abstract final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external covariant num externalCovariantInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:35: Error: 'externalCovariantInstanceField' is already declared in this scope.
+//   abstract external covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:35: Context: Previous declaration of 'externalCovariantInstanceField'.
+//   external abstract covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:46:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:48:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:50:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:23: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static int extensionStaticField;
+//                       ^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int extensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:29: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static final int finalExtensionStaticField;
+//                             ^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalExtensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:14: Error: Field 'topLevelField' should be initialized because its type 'int' doesn't allow null.
+// abstract int topLevelField;
+//              ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:12:37: Error: Abstract fields cannot have initializers.
+// Try removing the initializer or the 'abstract' keyword.
+//   abstract int fieldWithInitializer = 0;
+//                                     ^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:10: Error: Abstract fields cannot have initializers.
+// Try removing the field initializer or the 'abstract' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//          ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:36: Error: Abstract fields cannot have initializers.
+// Try removing the field initializer or the 'abstract' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//                                    ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:29: Error: Final field 'finalStaticField' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:29: Error: Final field 'finalStaticField' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  static field core::int staticField = null;
+  static final field core::int finalStaticField = null;
+  late field core::int lateInstanceField;
+  constructor •(core::int initializedField1) → self::A
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:10: Error: Abstract fields cannot have initializers.
+Try removing the field initializer or the 'abstract' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+         ^^^^^^^^^^^^^^^^^", final dynamic #t2 = invalid-expression "pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:36: Error: Abstract fields cannot have initializers.
+Try removing the field initializer or the 'abstract' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+                                   ^^^^^^^^^^^^^^^^^"
+    ;
+  abstract get fieldWithInitializer() → core::int;
+  abstract set fieldWithInitializer(core::int #t3) → void;
+  abstract get initializedField1() → core::int;
+  abstract set initializedField1(core::int #t4) → void;
+  abstract get initializedField2() → core::int;
+  abstract set initializedField2(core::int #t5) → void;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t6) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t7) → void;
+  external get externalLateInstanceField() → core::int;
+  external set externalLateInstanceField(core::int #t8) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  static field core::int staticField = null;
+  static final field core::int finalStaticField = null;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t9) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t10) → void;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static field extensionStaticField = self::Extension|extensionStaticField;
+  static field finalExtensionStaticField = self::Extension|finalExtensionStaticField;
+}
+static field core::int topLevelField;
+static final field core::int finalTopLevelField = 0;
+static const field core::int constField = #C1;
+static field core::int Extension|extensionStaticField;
+static final field core::int Extension|finalExtensionStaticField;
+static abstract get Extension|extensionInstanceField() → core::int;
+static abstract set Extension|extensionInstanceField(core::int #t11) → void;
+static abstract get Extension|finalExtensionInstanceField() → core::int;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = 0
+}
diff --git a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.textual_outline.expect
new file mode 100644
index 0000000..b49127a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.textual_outline.expect
@@ -0,0 +1,31 @@
+abstract int topLevelField;
+abstract final int finalTopLevelField = 0;
+abstract const int constField = 0;
+abstract class A {
+  abstract int fieldWithInitializer = 0;
+  abstract int initializedField1;
+  abstract int initializedField2;
+  A(this.initializedField1) : this.initializedField2 = 0;
+  abstract static int staticField;
+  abstract static final int finalStaticField;
+  abstract late int ;
+  lateInstanceField;
+  external abstract int externalInstanceField;
+  external abstract final int externalFinalInstanceField;
+  external abstract covariant num externalCovariantInstanceField;
+  abstract external int externalInstanceField;
+  abstract external final int externalFinalInstanceField;
+  abstract external covariant num externalCovariantInstanceField;
+  external abstract late int ;
+  externalLateInstanceField;
+}
+mixin B {
+  abstract static int staticField;
+  abstract static final int finalStaticField;
+  external abstract int externalInstanceField;
+  external abstract final int externalFinalInstanceField;
+  external abstract covariant num externalCovariantInstanceField;
+}
+extension Extension ;
+on A (){ }
+main() { }
diff --git a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.expect b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.expect
new file mode 100644
index 0000000..8181af4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.expect
@@ -0,0 +1,264 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract int topLevelField;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:7:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract final int finalTopLevelField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:9:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract const int constField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:24:3: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   abstract late int lateInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external int externalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:25: Error: 'externalInstanceField' is already declared in this scope.
+//   abstract external int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:25: Context: Previous declaration of 'externalInstanceField'.
+//   external abstract int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external final int externalFinalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:31: Error: 'externalFinalInstanceField' is already declared in this scope.
+//   abstract external final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:31: Context: Previous declaration of 'externalFinalInstanceField'.
+//   external abstract final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external covariant num externalCovariantInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:35: Error: 'externalCovariantInstanceField' is already declared in this scope.
+//   abstract external covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:35: Context: Previous declaration of 'externalCovariantInstanceField'.
+//   external abstract covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:46:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:48:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:50:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:23: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static int extensionStaticField;
+//                       ^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int extensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:29: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static final int finalExtensionStaticField;
+//                             ^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalExtensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:14: Error: Field 'topLevelField' should be initialized because its type 'int' doesn't allow null.
+// abstract int topLevelField;
+//              ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:12:37: Error: Abstract fields cannot have initializers.
+// Try removing the initializer or the 'abstract' keyword.
+//   abstract int fieldWithInitializer = 0;
+//                                     ^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:10: Error: Abstract fields cannot have initializers.
+// Try removing the field initializer or the 'abstract' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//          ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:36: Error: Abstract fields cannot have initializers.
+// Try removing the field initializer or the 'abstract' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//                                    ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:29: Error: Final field 'finalStaticField' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:29: Error: Final field 'finalStaticField' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  static field core::int staticField = null;
+  static final field core::int finalStaticField = null;
+  late field core::int lateInstanceField;
+  constructor •(core::int initializedField1) → self::A
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:10: Error: Abstract fields cannot have initializers.
+Try removing the field initializer or the 'abstract' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+         ^^^^^^^^^^^^^^^^^", final dynamic #t2 = invalid-expression "pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:36: Error: Abstract fields cannot have initializers.
+Try removing the field initializer or the 'abstract' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+                                   ^^^^^^^^^^^^^^^^^"
+    ;
+  abstract get fieldWithInitializer() → core::int;
+  abstract set fieldWithInitializer(core::int #t3) → void;
+  abstract get initializedField1() → core::int;
+  abstract set initializedField1(core::int #t4) → void;
+  abstract get initializedField2() → core::int;
+  abstract set initializedField2(core::int #t5) → void;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t6) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t7) → void;
+  external get externalLateInstanceField() → core::int;
+  external set externalLateInstanceField(core::int #t8) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  static field core::int staticField = null;
+  static final field core::int finalStaticField = null;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t9) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t10) → void;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static field extensionStaticField = self::Extension|extensionStaticField;
+  static field finalExtensionStaticField = self::Extension|finalExtensionStaticField;
+}
+static field core::int topLevelField;
+static final field core::int finalTopLevelField = 0;
+static const field core::int constField = #C1;
+static field core::int Extension|extensionStaticField;
+static final field core::int Extension|finalExtensionStaticField;
+static abstract get Extension|extensionInstanceField() → core::int;
+static abstract set Extension|extensionInstanceField(core::int #t11) → void;
+static abstract get Extension|finalExtensionInstanceField() → core::int;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = 0
+}
diff --git a/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.transformed.expect
new file mode 100644
index 0000000..8181af4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_field_errors.dart.weak.transformed.expect
@@ -0,0 +1,264 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract int topLevelField;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:7:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract final int finalTopLevelField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:9:1: Error: Can't have modifier 'abstract' here.
+// Try removing 'abstract'.
+// abstract const int constField = 0;
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:24:3: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   abstract late int lateInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external int externalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:32:25: Error: 'externalInstanceField' is already declared in this scope.
+//   abstract external int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:26:25: Context: Previous declaration of 'externalInstanceField'.
+//   external abstract int externalInstanceField;
+//                         ^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external final int externalFinalInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:34:31: Error: 'externalFinalInstanceField' is already declared in this scope.
+//   abstract external final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:28:31: Context: Previous declaration of 'externalFinalInstanceField'.
+//   external abstract final int externalFinalInstanceField;
+//                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:3: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   abstract external covariant num externalCovariantInstanceField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:36:35: Error: 'externalCovariantInstanceField' is already declared in this scope.
+//   abstract external covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:30:35: Context: Previous declaration of 'externalCovariantInstanceField'.
+//   external abstract covariant num externalCovariantInstanceField;
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:38:12: Error: Abstract fields cannot be late.
+// Try removing the 'abstract' or 'late' keyword.
+//   external abstract late int externalLateInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int staticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:46:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract int externalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:48:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract final int externalFinalInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:50:12: Error: Fields can't be declared both 'abstract' and 'external'.
+// Try removing the 'abstract' or 'external' keyword.
+//   external abstract covariant num externalCovariantInstanceField;
+//            ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:55:16: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract int extensionInstanceField;
+//                ^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:56:22: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   abstract final int finalExtensionInstanceField;
+//                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:23: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static int extensionStaticField;
+//                       ^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:57:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static int extensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:29: Error: Extension fields can't be declared 'abstract'.
+// Try removing the 'abstract' keyword.
+//   abstract static final int finalExtensionStaticField;
+//                             ^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:58:3: Error: Static fields can't be declared 'abstract'.
+// Try removing the 'abstract' or 'static' keyword.
+//   abstract static final int finalExtensionStaticField;
+//   ^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:5:14: Error: Field 'topLevelField' should be initialized because its type 'int' doesn't allow null.
+// abstract int topLevelField;
+//              ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:20:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:42:23: Error: Field 'staticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static int staticField;
+//                       ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:29: Error: Field 'finalStaticField' should be initialized because its type 'int' doesn't allow null.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:12:37: Error: Abstract fields cannot have initializers.
+// Try removing the initializer or the 'abstract' keyword.
+//   abstract int fieldWithInitializer = 0;
+//                                     ^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:10: Error: Abstract fields cannot have initializers.
+// Try removing the field initializer or the 'abstract' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//          ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:36: Error: Abstract fields cannot have initializers.
+// Try removing the field initializer or the 'abstract' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//                                    ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:22:29: Error: Final field 'finalStaticField' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/abstract_field_errors.dart:44:29: Error: Final field 'finalStaticField' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+//   abstract static final int finalStaticField;
+//                             ^^^^^^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  static field core::int staticField = null;
+  static final field core::int finalStaticField = null;
+  late field core::int lateInstanceField;
+  constructor •(core::int initializedField1) → self::A
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:10: Error: Abstract fields cannot have initializers.
+Try removing the field initializer or the 'abstract' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+         ^^^^^^^^^^^^^^^^^", final dynamic #t2 = invalid-expression "pkg/front_end/testcases/nnbd/abstract_field_errors.dart:18:36: Error: Abstract fields cannot have initializers.
+Try removing the field initializer or the 'abstract' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+                                   ^^^^^^^^^^^^^^^^^"
+    ;
+  abstract get fieldWithInitializer() → core::int;
+  abstract set fieldWithInitializer(core::int #t3) → void;
+  abstract get initializedField1() → core::int;
+  abstract set initializedField1(core::int #t4) → void;
+  abstract get initializedField2() → core::int;
+  abstract set initializedField2(core::int #t5) → void;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t6) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t7) → void;
+  external get externalLateInstanceField() → core::int;
+  external set externalLateInstanceField(core::int #t8) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  static field core::int staticField = null;
+  static final field core::int finalStaticField = null;
+  external get externalInstanceField() → core::int;
+  external set externalInstanceField(core::int #t9) → void;
+  external get externalFinalInstanceField() → core::int;
+  external get externalCovariantInstanceField() → core::num;
+  external set externalCovariantInstanceField(covariant core::num #t10) → void;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static field extensionStaticField = self::Extension|extensionStaticField;
+  static field finalExtensionStaticField = self::Extension|finalExtensionStaticField;
+}
+static field core::int topLevelField;
+static final field core::int finalTopLevelField = 0;
+static const field core::int constField = #C1;
+static field core::int Extension|extensionStaticField;
+static final field core::int Extension|finalExtensionStaticField;
+static abstract get Extension|extensionInstanceField() → core::int;
+static abstract set Extension|extensionInstanceField(core::int #t11) → void;
+static abstract get Extension|finalExtensionInstanceField() → core::int;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = 0
+}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart b/pkg/front_end/testcases/nnbd/abstract_fields.dart
new file mode 100644
index 0000000..7b2d06f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.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.
+
+abstract class A {
+  abstract int instanceField; // ok
+
+  abstract final int finalInstanceField; // ok
+
+  abstract covariant num covariantInstanceField; // ok
+}
+
+mixin B {
+  abstract int instanceField; // ok
+
+  abstract final int finalInstanceField; // ok
+
+  abstract covariant num covariantInstanceField; // ok
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart.outline.expect b/pkg/front_end/testcases/nnbd/abstract_fields.dart.outline.expect
new file mode 100644
index 0000000..e13a36a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.outline.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t1) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t2) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t3) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t4) → void;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.expect b/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.expect
new file mode 100644
index 0000000..d5823fb
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t1) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t2) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t3) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t4) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.transformed.expect
new file mode 100644
index 0000000..d5823fb
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.strong.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t1) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t2) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t3) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t4) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/abstract_fields.dart.textual_outline.expect
new file mode 100644
index 0000000..9d0e9ba
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.textual_outline.expect
@@ -0,0 +1,11 @@
+abstract class A {
+  abstract int instanceField;
+  abstract final int finalInstanceField;
+  abstract covariant num covariantInstanceField;
+}
+mixin B {
+  abstract int instanceField;
+  abstract final int finalInstanceField;
+  abstract covariant num covariantInstanceField;
+}
+main() { }
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.expect b/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.expect
new file mode 100644
index 0000000..d5823fb
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t1) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t2) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t3) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t4) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.transformed.expect
new file mode 100644
index 0000000..d5823fb
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields.dart.weak.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t1) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t2) → void;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  abstract get instanceField() → core::int;
+  abstract set instanceField(core::int #t3) → void;
+  abstract get finalInstanceField() → core::int;
+  abstract get covariantInstanceField() → core::num;
+  abstract set covariantInstanceField(covariant core::num #t4) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart
new file mode 100644
index 0000000..3164945
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.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.
+
+abstract class A {
+  abstract int i1, i2;
+  abstract var x;
+  abstract final int fi;
+  abstract final fx;
+  abstract covariant num cn;
+  abstract covariant var cx;
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.outline.expect b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.outline.expect
new file mode 100644
index 0000000..492b9a7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.outline.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  abstract get i1() → core::int;
+  abstract set i1(core::int #t1) → void;
+  abstract get i2() → core::int;
+  abstract set i2(core::int #t2) → void;
+  abstract get x() → dynamic;
+  abstract set x(dynamic #t3) → void;
+  abstract get fi() → core::int;
+  abstract get fx() → dynamic;
+  abstract get cn() → core::num;
+  abstract set cn(covariant core::num #t4) → void;
+  abstract get cx() → dynamic;
+  abstract set cx(covariant dynamic #t5) → void;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.strong.expect b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.strong.expect
new file mode 100644
index 0000000..345a7f1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.strong.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract get i1() → core::int;
+  abstract set i1(core::int #t1) → void;
+  abstract get i2() → core::int;
+  abstract set i2(core::int #t2) → void;
+  abstract get x() → dynamic;
+  abstract set x(dynamic #t3) → void;
+  abstract get fi() → core::int;
+  abstract get fx() → dynamic;
+  abstract get cn() → core::num;
+  abstract set cn(covariant core::num #t4) → void;
+  abstract get cx() → dynamic;
+  abstract set cx(covariant dynamic #t5) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.strong.transformed.expect
new file mode 100644
index 0000000..345a7f1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.strong.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract get i1() → core::int;
+  abstract set i1(core::int #t1) → void;
+  abstract get i2() → core::int;
+  abstract set i2(core::int #t2) → void;
+  abstract get x() → dynamic;
+  abstract set x(dynamic #t3) → void;
+  abstract get fi() → core::int;
+  abstract get fx() → dynamic;
+  abstract get cn() → core::num;
+  abstract set cn(covariant core::num #t4) → void;
+  abstract get cx() → dynamic;
+  abstract set cx(covariant dynamic #t5) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.textual_outline.expect
new file mode 100644
index 0000000..eb8f57c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.textual_outline.expect
@@ -0,0 +1,9 @@
+abstract class A {
+  abstract int i1, i2;
+  abstract var x;
+  abstract final int fi;
+  abstract final fx;
+  abstract covariant num cn;
+  abstract covariant var cx;
+}
+main() { }
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.expect b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.expect
new file mode 100644
index 0000000..345a7f1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract get i1() → core::int;
+  abstract set i1(core::int #t1) → void;
+  abstract get i2() → core::int;
+  abstract set i2(core::int #t2) → void;
+  abstract get x() → dynamic;
+  abstract set x(dynamic #t3) → void;
+  abstract get fi() → core::int;
+  abstract get fx() → dynamic;
+  abstract get cn() → core::num;
+  abstract set cn(covariant core::num #t4) → void;
+  abstract get cx() → dynamic;
+  abstract set cx(covariant dynamic #t5) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.transformed.expect
new file mode 100644
index 0000000..345a7f1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.weak.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract get i1() → core::int;
+  abstract set i1(core::int #t1) → void;
+  abstract get i2() → core::int;
+  abstract set i2(core::int #t2) → void;
+  abstract get x() → dynamic;
+  abstract set x(dynamic #t3) → void;
+  abstract get fi() → core::int;
+  abstract get fx() → dynamic;
+  abstract get cn() → core::num;
+  abstract set cn(covariant core::num #t4) → void;
+  abstract get cx() → dynamic;
+  abstract set cx(covariant dynamic #t5) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart b/pkg/front_end/testcases/nnbd/constant_null_check.dart
new file mode 100644
index 0000000..3ebe34f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.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.
+
+const int? a = 42;
+const int b = a!;
+
+const int? c = null;
+const int? d = c!;
+
+class Class {
+  final int y;
+  const Class(int? x) : y = x!;
+}
+
+const Class e = const Class(a);
+const Class f = const Class(c);
+
+main() {
+  expect(42, a);
+  expect(42, b);
+  expect(42, e.y);
+}
+
+expect(expected, actual) {
+  if (expected != actual) throw 'Expected $expected, actual $actual';
+}
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.outline.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.outline.expect
new file mode 100644
index 0000000..dc7afba
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.outline.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object /*hasConstConstructor*/  {
+  final field core::int y;
+  const constructor •(core::int? x) → self::Class
+    : self::Class::y = x!, super core::Object::•()
+    ;
+}
+static const field core::int? a = 42;
+static const field core::int b = self::a!;
+static const field core::int? c = null;
+static const field core::int? d = self::c!;
+static const field self::Class e = const self::Class::•(self::a);
+static const field self::Class f = const self::Class::•(self::c);
+static method main() → dynamic
+  ;
+static method expect(dynamic expected, dynamic actual) → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.expect
new file mode 100644
index 0000000..ca8683f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.expect
@@ -0,0 +1,54 @@
+//
+// Problems in component:
+//
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Error: Constant evaluation error:
+// const int? d = c!;
+//                 ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Context: Constant expression must be non-null.
+// const int? d = c!;
+//                 ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:12: Context: While analyzing:
+// const int? d = c!;
+//            ^
+//
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:17:23: Error: Constant evaluation error:
+// const Class f = const Class(c);
+//                       ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:13:30: Context: Constant expression must be non-null.
+//   const Class(int? x) : y = x!;
+//                              ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:17:13: Context: While analyzing:
+// const Class f = const Class(c);
+//             ^
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object /*hasConstConstructor*/  {
+  final field core::int y;
+  const constructor •(core::int? x) → self::Class
+    : self::Class::y = x!, super core::Object::•()
+    ;
+}
+static const field core::int? a = #C1;
+static const field core::int b = #C1;
+static const field core::int? c = #C2;
+static const field core::int? d = invalid-expression "Constant expression must be non-null.";
+static const field self::Class e = #C3;
+static const field self::Class f = invalid-expression "Constant expression must be non-null.";
+static method main() → dynamic {
+  self::expect(42, #C1);
+  self::expect(42, #C1);
+  self::expect(42, (#C3).{self::Class::y});
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
+
+constants  {
+  #C1 = 42
+  #C2 = null
+  #C3 = self::Class {y:#C1}
+}
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.transformed.expect
new file mode 100644
index 0000000..ca8683f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.transformed.expect
@@ -0,0 +1,54 @@
+//
+// Problems in component:
+//
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Error: Constant evaluation error:
+// const int? d = c!;
+//                 ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Context: Constant expression must be non-null.
+// const int? d = c!;
+//                 ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:12: Context: While analyzing:
+// const int? d = c!;
+//            ^
+//
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:17:23: Error: Constant evaluation error:
+// const Class f = const Class(c);
+//                       ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:13:30: Context: Constant expression must be non-null.
+//   const Class(int? x) : y = x!;
+//                              ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:17:13: Context: While analyzing:
+// const Class f = const Class(c);
+//             ^
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object /*hasConstConstructor*/  {
+  final field core::int y;
+  const constructor •(core::int? x) → self::Class
+    : self::Class::y = x!, super core::Object::•()
+    ;
+}
+static const field core::int? a = #C1;
+static const field core::int b = #C1;
+static const field core::int? c = #C2;
+static const field core::int? d = invalid-expression "Constant expression must be non-null.";
+static const field self::Class e = #C3;
+static const field self::Class f = invalid-expression "Constant expression must be non-null.";
+static method main() → dynamic {
+  self::expect(42, #C1);
+  self::expect(42, #C1);
+  self::expect(42, (#C3).{self::Class::y});
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
+
+constants  {
+  #C1 = 42
+  #C2 = null
+  #C3 = self::Class {y:#C1}
+}
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.textual_outline.expect
new file mode 100644
index 0000000..a5a28c9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.textual_outline.expect
@@ -0,0 +1,14 @@
+const int? a = 42;
+const int b = a!;
+const int? c = null;
+const int? d = c!;
+
+class Class {
+  final int y;
+  const Class(int? x) : y = x!;
+}
+
+const Class e = const Class(a);
+const Class f = const Class(c);
+main() {}
+expect(expected, actual) {}
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..c4a2339
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.textual_outline_modelled.expect
@@ -0,0 +1,13 @@
+class Class {
+  const Class(int? x) : y = x!;
+  final int y;
+}
+
+const Class e = const Class(a);
+const Class f = const Class(c);
+const int b = a!;
+const int? a = 42;
+const int? c = null;
+const int? d = c!;
+expect(expected, actual) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.expect
new file mode 100644
index 0000000..ca8683f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.expect
@@ -0,0 +1,54 @@
+//
+// Problems in component:
+//
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Error: Constant evaluation error:
+// const int? d = c!;
+//                 ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Context: Constant expression must be non-null.
+// const int? d = c!;
+//                 ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:12: Context: While analyzing:
+// const int? d = c!;
+//            ^
+//
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:17:23: Error: Constant evaluation error:
+// const Class f = const Class(c);
+//                       ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:13:30: Context: Constant expression must be non-null.
+//   const Class(int? x) : y = x!;
+//                              ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:17:13: Context: While analyzing:
+// const Class f = const Class(c);
+//             ^
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object /*hasConstConstructor*/  {
+  final field core::int y;
+  const constructor •(core::int? x) → self::Class
+    : self::Class::y = x!, super core::Object::•()
+    ;
+}
+static const field core::int? a = #C1;
+static const field core::int b = #C1;
+static const field core::int? c = #C2;
+static const field core::int? d = invalid-expression "Constant expression must be non-null.";
+static const field self::Class e = #C3;
+static const field self::Class f = invalid-expression "Constant expression must be non-null.";
+static method main() → dynamic {
+  self::expect(42, #C1);
+  self::expect(42, #C1);
+  self::expect(42, (#C3).{self::Class::y});
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
+
+constants  {
+  #C1 = 42
+  #C2 = null
+  #C3 = self::Class {y:#C1}
+}
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.transformed.expect
new file mode 100644
index 0000000..ca8683f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.transformed.expect
@@ -0,0 +1,54 @@
+//
+// Problems in component:
+//
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Error: Constant evaluation error:
+// const int? d = c!;
+//                 ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Context: Constant expression must be non-null.
+// const int? d = c!;
+//                 ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:12: Context: While analyzing:
+// const int? d = c!;
+//            ^
+//
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:17:23: Error: Constant evaluation error:
+// const Class f = const Class(c);
+//                       ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:13:30: Context: Constant expression must be non-null.
+//   const Class(int? x) : y = x!;
+//                              ^
+// pkg/front_end/testcases/nnbd/constant_null_check.dart:17:13: Context: While analyzing:
+// const Class f = const Class(c);
+//             ^
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Class extends core::Object /*hasConstConstructor*/  {
+  final field core::int y;
+  const constructor •(core::int? x) → self::Class
+    : self::Class::y = x!, super core::Object::•()
+    ;
+}
+static const field core::int? a = #C1;
+static const field core::int b = #C1;
+static const field core::int? c = #C2;
+static const field core::int? d = invalid-expression "Constant expression must be non-null.";
+static const field self::Class e = #C3;
+static const field self::Class f = invalid-expression "Constant expression must be non-null.";
+static method main() → dynamic {
+  self::expect(42, #C1);
+  self::expect(42, #C1);
+  self::expect(42, (#C3).{self::Class::y});
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
+
+constants  {
+  #C1 = 42
+  #C2 = null
+  #C3 = self::Class {y:#C1}
+}
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import.dart b/pkg/front_end/testcases/nnbd/duplicate_import.dart
new file mode 100644
index 0000000..1192cd9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import.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.
+
+import 'duplicate_import_lib1.dart';
+import 'duplicate_import_lib2.dart';
+
+export 'duplicate_import_lib1.dart';
+export 'duplicate_import_lib2.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import.dart.outline.expect b/pkg/front_end/testcases/nnbd/duplicate_import.dart.outline.expect
new file mode 100644
index 0000000..b60fe11
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import.dart.outline.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///duplicate_import_lib1.dart";
+import "org-dartlang-testcase:///duplicate_import_lib2.dart";
+export "org-dartlang-testcase:///duplicate_import_lib1.dart";
+export "org-dartlang-testcase:///duplicate_import_lib2.dart";
+
+static method main() → dynamic
+  ;
+
+library foo /*isNonNullableByDefault*/;
+import self as self2;
+
+
+library foo /*isNonNullableByDefault*/;
+import self as self3;
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import.dart.strong.expect b/pkg/front_end/testcases/nnbd/duplicate_import.dart.strong.expect
new file mode 100644
index 0000000..78771c5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import.dart.strong.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///duplicate_import_lib1.dart";
+import "org-dartlang-testcase:///duplicate_import_lib2.dart";
+export "org-dartlang-testcase:///duplicate_import_lib1.dart";
+export "org-dartlang-testcase:///duplicate_import_lib2.dart";
+
+static method main() → dynamic {}
+
+library foo /*isNonNullableByDefault*/;
+import self as self2;
+
+
+library foo /*isNonNullableByDefault*/;
+import self as self3;
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/duplicate_import.dart.strong.transformed.expect
new file mode 100644
index 0000000..78771c5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import.dart.strong.transformed.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///duplicate_import_lib1.dart";
+import "org-dartlang-testcase:///duplicate_import_lib2.dart";
+export "org-dartlang-testcase:///duplicate_import_lib1.dart";
+export "org-dartlang-testcase:///duplicate_import_lib2.dart";
+
+static method main() → dynamic {}
+
+library foo /*isNonNullableByDefault*/;
+import self as self2;
+
+
+library foo /*isNonNullableByDefault*/;
+import self as self3;
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/duplicate_import.dart.textual_outline.expect
new file mode 100644
index 0000000..0be0855
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+import 'duplicate_import_lib1.dart';
+import 'duplicate_import_lib2.dart';
+export 'duplicate_import_lib1.dart';
+export 'duplicate_import_lib2.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/duplicate_import.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0be0855
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+import 'duplicate_import_lib1.dart';
+import 'duplicate_import_lib2.dart';
+export 'duplicate_import_lib1.dart';
+export 'duplicate_import_lib2.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import.dart.weak.expect b/pkg/front_end/testcases/nnbd/duplicate_import.dart.weak.expect
new file mode 100644
index 0000000..78771c5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import.dart.weak.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///duplicate_import_lib1.dart";
+import "org-dartlang-testcase:///duplicate_import_lib2.dart";
+export "org-dartlang-testcase:///duplicate_import_lib1.dart";
+export "org-dartlang-testcase:///duplicate_import_lib2.dart";
+
+static method main() → dynamic {}
+
+library foo /*isNonNullableByDefault*/;
+import self as self2;
+
+
+library foo /*isNonNullableByDefault*/;
+import self as self3;
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/duplicate_import.dart.weak.transformed.expect
new file mode 100644
index 0000000..78771c5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import.dart.weak.transformed.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///duplicate_import_lib1.dart";
+import "org-dartlang-testcase:///duplicate_import_lib2.dart";
+export "org-dartlang-testcase:///duplicate_import_lib1.dart";
+export "org-dartlang-testcase:///duplicate_import_lib2.dart";
+
+static method main() → dynamic {}
+
+library foo /*isNonNullableByDefault*/;
+import self as self2;
+
+
+library foo /*isNonNullableByDefault*/;
+import self as self3;
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import_lib1.dart b/pkg/front_end/testcases/nnbd/duplicate_import_lib1.dart
new file mode 100644
index 0000000..cb00fab
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import_lib1.dart
@@ -0,0 +1,5 @@
+// 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.
+
+library foo;
diff --git a/pkg/front_end/testcases/nnbd/duplicate_import_lib2.dart b/pkg/front_end/testcases/nnbd/duplicate_import_lib2.dart
new file mode 100644
index 0000000..cb00fab
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/duplicate_import_lib2.dart
@@ -0,0 +1,5 @@
+// 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.
+
+library foo;
diff --git a/pkg/front_end/testcases/nnbd/dynamic_object_call.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/dynamic_object_call.dart.textual_outline.expect
new file mode 100644
index 0000000..5c9aa73
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/dynamic_object_call.dart.textual_outline.expect
@@ -0,0 +1,9 @@
+class Class {
+  @override
+  noSuchMethod(Object o, {String foo = ''}) => 42;
+  @override
+  toString({String foo = ''}) => 'foo';
+}
+
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/nnbd/dynamic_object_call.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/dynamic_object_call.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..5c9aa73
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/dynamic_object_call.dart.textual_outline_modelled.expect
@@ -0,0 +1,9 @@
+class Class {
+  @override
+  noSuchMethod(Object o, {String foo = ''}) => 42;
+  @override
+  toString({String foo = ''}) => 'foo';
+}
+
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/nnbd/external_field_errors.dart b/pkg/front_end/testcases/nnbd/external_field_errors.dart
new file mode 100644
index 0000000..66fd83b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart
@@ -0,0 +1,38 @@
+// 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.
+
+external int topLevelField = 0;
+
+external final int finalTopLevelField = 0;
+
+external const int constField = 0;
+
+abstract class A {
+  external int fieldWithInitializer = 0;
+
+  external int initializedField1;
+
+  external int initializedField2;
+
+  A(this.initializedField1) : this.initializedField2 = 0;
+
+  external static int staticField = 0;
+
+  external static final int finalStaticField = 0;
+}
+
+mixin B {
+  external static int staticField = 0;
+
+  external static final int finalStaticField = 0;
+}
+
+extension Extension on A {
+  external int extensionInstanceField = 0;
+  external final int finalExtensionInstanceField = 0;
+  external static int extensionStaticField = 0;
+  external static final int finalExtensionStaticField = 0;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/external_field_errors.dart.outline.expect b/pkg/front_end/testcases/nnbd/external_field_errors.dart.outline.expect
new file mode 100644
index 0000000..197f942
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart.outline.expect
@@ -0,0 +1,43 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  constructor •(core::int initializedField1) → self::A
+    ;
+  external get fieldWithInitializer() → core::int;
+  external set fieldWithInitializer(core::int #t1) → void;
+  external get initializedField1() → core::int;
+  external set initializedField1(core::int #t2) → void;
+  external get initializedField2() → core::int;
+  external set initializedField2(core::int #t3) → void;
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t4) → void;
+  external static get finalStaticField() → core::int;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t5) → void;
+  external static get finalStaticField() → core::int;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static get extensionStaticField = get self::Extension|extensionStaticField;
+  static set extensionStaticField = set self::Extension|extensionStaticField;
+  static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
+}
+external static get topLevelField() → core::int;
+external static set topLevelField(core::int #t6) → void;
+external static get finalTopLevelField() → core::int;
+external static get constField() → core::int;
+external static set constField(core::int #t7) → void;
+external static get Extension|extensionInstanceField() → core::int;
+external static set Extension|extensionInstanceField(core::int #t8) → void;
+external static get Extension|finalExtensionInstanceField() → core::int;
+external static get Extension|extensionStaticField() → core::int;
+external static set Extension|extensionStaticField(core::int #t9) → void;
+external static get Extension|finalExtensionStaticField() → core::int;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/external_field_errors.dart.strong.expect b/pkg/front_end/testcases/nnbd/external_field_errors.dart.strong.expect
new file mode 100644
index 0000000..895696f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart.strong.expect
@@ -0,0 +1,122 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:5:28: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external int topLevelField = 0;
+//                            ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:7:39: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external final int finalTopLevelField = 0;
+//                                       ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:9:31: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external const int constField = 0;
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:12:37: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external int fieldWithInitializer = 0;
+//                                     ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:18:10: Error: External fields cannot have initializers.
+// Try removing the field initializer or the 'external' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//          ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:18:36: Error: External fields cannot have initializers.
+// Try removing the field initializer or the 'external' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//                                    ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:20:35: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int staticField = 0;
+//                                   ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:22:46: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalStaticField = 0;
+//                                              ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:26:35: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int staticField = 0;
+//                                   ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:28:46: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalStaticField = 0;
+//                                              ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:32:39: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external int extensionInstanceField = 0;
+//                                       ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:33:50: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external final int finalExtensionInstanceField = 0;
+//                                                  ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:34:44: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int extensionStaticField = 0;
+//                                            ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:35:55: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalExtensionStaticField = 0;
+//                                                       ^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  constructor •(core::int initializedField1) → self::A
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/nnbd/external_field_errors.dart:18:10: Error: External fields cannot have initializers.
+Try removing the field initializer or the 'external' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+         ^^^^^^^^^^^^^^^^^", final dynamic #t2 = invalid-expression "pkg/front_end/testcases/nnbd/external_field_errors.dart:18:36: Error: External fields cannot have initializers.
+Try removing the field initializer or the 'external' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+                                   ^^^^^^^^^^^^^^^^^"
+    ;
+  external get fieldWithInitializer() → core::int;
+  external set fieldWithInitializer(core::int #t3) → void;
+  external get initializedField1() → core::int;
+  external set initializedField1(core::int #t4) → void;
+  external get initializedField2() → core::int;
+  external set initializedField2(core::int #t5) → void;
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t6) → void;
+  external static get finalStaticField() → core::int;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t7) → void;
+  external static get finalStaticField() → core::int;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static get extensionStaticField = get self::Extension|extensionStaticField;
+  static set extensionStaticField = set self::Extension|extensionStaticField;
+  static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
+}
+external static get topLevelField() → core::int;
+external static set topLevelField(core::int #t8) → void;
+external static get finalTopLevelField() → core::int;
+external static get constField() → core::int;
+external static set constField(core::int #t9) → void;
+external static get Extension|extensionInstanceField() → core::int;
+external static set Extension|extensionInstanceField(core::int #t10) → void;
+external static get Extension|finalExtensionInstanceField() → core::int;
+external static get Extension|extensionStaticField() → core::int;
+external static set Extension|extensionStaticField(core::int #t11) → void;
+external static get Extension|finalExtensionStaticField() → core::int;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/external_field_errors.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/external_field_errors.dart.strong.transformed.expect
new file mode 100644
index 0000000..895696f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart.strong.transformed.expect
@@ -0,0 +1,122 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:5:28: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external int topLevelField = 0;
+//                            ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:7:39: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external final int finalTopLevelField = 0;
+//                                       ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:9:31: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external const int constField = 0;
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:12:37: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external int fieldWithInitializer = 0;
+//                                     ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:18:10: Error: External fields cannot have initializers.
+// Try removing the field initializer or the 'external' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//          ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:18:36: Error: External fields cannot have initializers.
+// Try removing the field initializer or the 'external' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//                                    ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:20:35: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int staticField = 0;
+//                                   ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:22:46: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalStaticField = 0;
+//                                              ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:26:35: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int staticField = 0;
+//                                   ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:28:46: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalStaticField = 0;
+//                                              ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:32:39: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external int extensionInstanceField = 0;
+//                                       ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:33:50: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external final int finalExtensionInstanceField = 0;
+//                                                  ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:34:44: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int extensionStaticField = 0;
+//                                            ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:35:55: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalExtensionStaticField = 0;
+//                                                       ^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  constructor •(core::int initializedField1) → self::A
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/nnbd/external_field_errors.dart:18:10: Error: External fields cannot have initializers.
+Try removing the field initializer or the 'external' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+         ^^^^^^^^^^^^^^^^^", final dynamic #t2 = invalid-expression "pkg/front_end/testcases/nnbd/external_field_errors.dart:18:36: Error: External fields cannot have initializers.
+Try removing the field initializer or the 'external' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+                                   ^^^^^^^^^^^^^^^^^"
+    ;
+  external get fieldWithInitializer() → core::int;
+  external set fieldWithInitializer(core::int #t3) → void;
+  external get initializedField1() → core::int;
+  external set initializedField1(core::int #t4) → void;
+  external get initializedField2() → core::int;
+  external set initializedField2(core::int #t5) → void;
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t6) → void;
+  external static get finalStaticField() → core::int;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t7) → void;
+  external static get finalStaticField() → core::int;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static get extensionStaticField = get self::Extension|extensionStaticField;
+  static set extensionStaticField = set self::Extension|extensionStaticField;
+  static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
+}
+external static get topLevelField() → core::int;
+external static set topLevelField(core::int #t8) → void;
+external static get finalTopLevelField() → core::int;
+external static get constField() → core::int;
+external static set constField(core::int #t9) → void;
+external static get Extension|extensionInstanceField() → core::int;
+external static set Extension|extensionInstanceField(core::int #t10) → void;
+external static get Extension|finalExtensionInstanceField() → core::int;
+external static get Extension|extensionStaticField() → core::int;
+external static set Extension|extensionStaticField(core::int #t11) → void;
+external static get Extension|finalExtensionStaticField() → core::int;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/external_field_errors.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/external_field_errors.dart.textual_outline.expect
new file mode 100644
index 0000000..933da15
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart.textual_outline.expect
@@ -0,0 +1,18 @@
+external int topLevelField = 0;
+external final int finalTopLevelField = 0;
+external const int constField = 0;
+abstract class A {
+  external int fieldWithInitializer = 0;
+  external int initializedField1;
+  external int initializedField2;
+  A(this.initializedField1) : this.initializedField2 = 0;
+  external static int staticField = 0;
+  external static final int finalStaticField = 0;
+}
+mixin B {
+  external static int staticField = 0;
+  external static final int finalStaticField = 0;
+}
+extension Extension ;
+on A (){ }
+main() { }
diff --git a/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.expect b/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.expect
new file mode 100644
index 0000000..895696f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.expect
@@ -0,0 +1,122 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:5:28: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external int topLevelField = 0;
+//                            ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:7:39: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external final int finalTopLevelField = 0;
+//                                       ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:9:31: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external const int constField = 0;
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:12:37: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external int fieldWithInitializer = 0;
+//                                     ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:18:10: Error: External fields cannot have initializers.
+// Try removing the field initializer or the 'external' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//          ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:18:36: Error: External fields cannot have initializers.
+// Try removing the field initializer or the 'external' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//                                    ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:20:35: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int staticField = 0;
+//                                   ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:22:46: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalStaticField = 0;
+//                                              ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:26:35: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int staticField = 0;
+//                                   ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:28:46: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalStaticField = 0;
+//                                              ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:32:39: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external int extensionInstanceField = 0;
+//                                       ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:33:50: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external final int finalExtensionInstanceField = 0;
+//                                                  ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:34:44: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int extensionStaticField = 0;
+//                                            ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:35:55: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalExtensionStaticField = 0;
+//                                                       ^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  constructor •(core::int initializedField1) → self::A
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/nnbd/external_field_errors.dart:18:10: Error: External fields cannot have initializers.
+Try removing the field initializer or the 'external' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+         ^^^^^^^^^^^^^^^^^", final dynamic #t2 = invalid-expression "pkg/front_end/testcases/nnbd/external_field_errors.dart:18:36: Error: External fields cannot have initializers.
+Try removing the field initializer or the 'external' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+                                   ^^^^^^^^^^^^^^^^^"
+    ;
+  external get fieldWithInitializer() → core::int;
+  external set fieldWithInitializer(core::int #t3) → void;
+  external get initializedField1() → core::int;
+  external set initializedField1(core::int #t4) → void;
+  external get initializedField2() → core::int;
+  external set initializedField2(core::int #t5) → void;
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t6) → void;
+  external static get finalStaticField() → core::int;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t7) → void;
+  external static get finalStaticField() → core::int;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static get extensionStaticField = get self::Extension|extensionStaticField;
+  static set extensionStaticField = set self::Extension|extensionStaticField;
+  static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
+}
+external static get topLevelField() → core::int;
+external static set topLevelField(core::int #t8) → void;
+external static get finalTopLevelField() → core::int;
+external static get constField() → core::int;
+external static set constField(core::int #t9) → void;
+external static get Extension|extensionInstanceField() → core::int;
+external static set Extension|extensionInstanceField(core::int #t10) → void;
+external static get Extension|finalExtensionInstanceField() → core::int;
+external static get Extension|extensionStaticField() → core::int;
+external static set Extension|extensionStaticField(core::int #t11) → void;
+external static get Extension|finalExtensionStaticField() → core::int;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.transformed.expect
new file mode 100644
index 0000000..895696f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_field_errors.dart.weak.transformed.expect
@@ -0,0 +1,122 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:5:28: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external int topLevelField = 0;
+//                            ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:7:39: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external final int finalTopLevelField = 0;
+//                                       ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:9:31: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+// external const int constField = 0;
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:12:37: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external int fieldWithInitializer = 0;
+//                                     ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:18:10: Error: External fields cannot have initializers.
+// Try removing the field initializer or the 'external' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//          ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:18:36: Error: External fields cannot have initializers.
+// Try removing the field initializer or the 'external' keyword from the field declaration.
+//   A(this.initializedField1) : this.initializedField2 = 0;
+//                                    ^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:20:35: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int staticField = 0;
+//                                   ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:22:46: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalStaticField = 0;
+//                                              ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:26:35: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int staticField = 0;
+//                                   ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:28:46: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalStaticField = 0;
+//                                              ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:32:39: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external int extensionInstanceField = 0;
+//                                       ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:33:50: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external final int finalExtensionInstanceField = 0;
+//                                                  ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:34:44: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static int extensionStaticField = 0;
+//                                            ^
+//
+// pkg/front_end/testcases/nnbd/external_field_errors.dart:35:55: Error: External fields cannot have initializers.
+// Try removing the initializer or the 'external' keyword.
+//   external static final int finalExtensionStaticField = 0;
+//                                                       ^
+//
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  constructor •(core::int initializedField1) → self::A
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/nnbd/external_field_errors.dart:18:10: Error: External fields cannot have initializers.
+Try removing the field initializer or the 'external' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+         ^^^^^^^^^^^^^^^^^", final dynamic #t2 = invalid-expression "pkg/front_end/testcases/nnbd/external_field_errors.dart:18:36: Error: External fields cannot have initializers.
+Try removing the field initializer or the 'external' keyword from the field declaration.
+  A(this.initializedField1) : this.initializedField2 = 0;
+                                   ^^^^^^^^^^^^^^^^^"
+    ;
+  external get fieldWithInitializer() → core::int;
+  external set fieldWithInitializer(core::int #t3) → void;
+  external get initializedField1() → core::int;
+  external set initializedField1(core::int #t4) → void;
+  external get initializedField2() → core::int;
+  external set initializedField2(core::int #t5) → void;
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t6) → void;
+  external static get finalStaticField() → core::int;
+}
+abstract class B extends core::Object /*isMixinDeclaration*/  {
+  external static get staticField() → core::int;
+  external static set staticField(core::int #t7) → void;
+  external static get finalStaticField() → core::int;
+}
+extension Extension on self::A {
+  get extensionInstanceField = get self::Extension|extensionInstanceField;
+  set extensionInstanceField = set self::Extension|extensionInstanceField;
+  get finalExtensionInstanceField = get self::Extension|finalExtensionInstanceField;
+  static get extensionStaticField = get self::Extension|extensionStaticField;
+  static set extensionStaticField = set self::Extension|extensionStaticField;
+  static get finalExtensionStaticField = get self::Extension|finalExtensionStaticField;
+}
+external static get topLevelField() → core::int;
+external static set topLevelField(core::int #t8) → void;
+external static get finalTopLevelField() → core::int;
+external static get constField() → core::int;
+external static set constField(core::int #t9) → void;
+external static get Extension|extensionInstanceField() → core::int;
+external static set Extension|extensionInstanceField(core::int #t10) → void;
+external static get Extension|finalExtensionInstanceField() → core::int;
+external static get Extension|extensionStaticField() → core::int;
+external static set Extension|extensionStaticField(core::int #t11) → void;
+external static get Extension|finalExtensionStaticField() → core::int;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/external_fields_spec.dart b/pkg/front_end/testcases/nnbd/external_fields_spec.dart
new file mode 100644
index 0000000..c4e5f80
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.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.
+
+external int s1;
+external final fx;
+
+class A {
+  external int i1;
+  external covariant var cx;
+
+  external static int s1;
+  external static final fx;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.outline.expect b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.outline.expect
new file mode 100644
index 0000000..832b31d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.outline.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  external get i1() → core::int;
+  external set i1(core::int #t1) → void;
+  external get cx() → dynamic;
+  external set cx(covariant dynamic #t2) → void;
+  external static get s1() → core::int;
+  external static set s1(core::int #t3) → void;
+  external static get fx() → dynamic;
+}
+external static get s1() → core::int;
+external static set s1(core::int #t4) → void;
+external static get fx() → dynamic;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.strong.expect b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.strong.expect
new file mode 100644
index 0000000..57dc59d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.strong.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  external get i1() → core::int;
+  external set i1(core::int #t1) → void;
+  external get cx() → dynamic;
+  external set cx(covariant dynamic #t2) → void;
+  external static get s1() → core::int;
+  external static set s1(core::int #t3) → void;
+  external static get fx() → dynamic;
+}
+external static get s1() → core::int;
+external static set s1(core::int #t4) → void;
+external static get fx() → dynamic;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.strong.transformed.expect
new file mode 100644
index 0000000..57dc59d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.strong.transformed.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  external get i1() → core::int;
+  external set i1(core::int #t1) → void;
+  external get cx() → dynamic;
+  external set cx(covariant dynamic #t2) → void;
+  external static get s1() → core::int;
+  external static set s1(core::int #t3) → void;
+  external static get fx() → dynamic;
+}
+external static get s1() → core::int;
+external static set s1(core::int #t4) → void;
+external static get fx() → dynamic;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.textual_outline.expect
new file mode 100644
index 0000000..bd0f4a6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.textual_outline.expect
@@ -0,0 +1,9 @@
+external int s1;
+external final fx;
+class A {
+  external int i1;
+  external covariant var cx;
+  external static int s1;
+  external static final fx;
+}
+main() { }
diff --git a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.expect b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.expect
new file mode 100644
index 0000000..57dc59d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  external get i1() → core::int;
+  external set i1(core::int #t1) → void;
+  external get cx() → dynamic;
+  external set cx(covariant dynamic #t2) → void;
+  external static get s1() → core::int;
+  external static set s1(core::int #t3) → void;
+  external static get fx() → dynamic;
+}
+external static get s1() → core::int;
+external static set s1(core::int #t4) → void;
+external static get fx() → dynamic;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.transformed.expect
new file mode 100644
index 0000000..57dc59d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/external_fields_spec.dart.weak.transformed.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  external get i1() → core::int;
+  external set i1(core::int #t1) → void;
+  external get cx() → dynamic;
+  external set cx(covariant dynamic #t2) → void;
+  external static get s1() → core::int;
+  external static set s1(core::int #t3) → void;
+  external static get fx() → dynamic;
+}
+external static get s1() → core::int;
+external static set s1(core::int #t4) → void;
+external static get fx() → dynamic;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.outline.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.outline.expect
index 9aa640b..decf707 100644
--- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.outline.expect
@@ -17,5 +17,10 @@
 import self as fro;
 import "dart:core" as core;
 
-static const field core::List<core::int> a = const <core::int>[];
-static const field core::List<core::int?> b = const <core::int?>[];
+static const field core::List<core::int> a = #C1;
+static const field core::List<core::int?> b = #C2;
+
+constants  {
+  #C1 = <core::int>[]
+  #C2 = <core::int?>[]
+}
diff --git a/pkg/front_end/testcases/nnbd/infer_from_promoted.dart b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart
new file mode 100644
index 0000000..745b6b5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/infer_from_promoted.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.
+
+typedef F<T> = T Function(T, T);
+
+test1() {
+  dynamic d = (int a, int b) => a;
+  d as F<int>; // Promote [d] to `int Function(int, int)`.
+  d = <S>(S a, S b) => a;
+}
+
+test2() {
+  dynamic d = (int a, int b) => a;
+  d as F<int>; // Promote [d] to `int Function(int, int)`.
+  d = (a, b) => '$a';
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.outline.expect b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.outline.expect
new file mode 100644
index 0000000..c2a211c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<invariant T extends core::Object? = dynamic> = (T%, T%) → T%;
+static method test1() → dynamic
+  ;
+static method test2() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.strong.expect b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.strong.expect
new file mode 100644
index 0000000..3de8d0f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.strong.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/infer_from_promoted.dart:16:21: Error: A value of type 'String' can't be returned from a function with return type 'int'.
+//   d = (a, b) => '$a';
+//                     ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef F<invariant T extends core::Object? = dynamic> = (T%, T%) → T%;
+static method test1() → dynamic {
+  dynamic d = (core::int a, core::int b) → core::int => a;
+  d as{ForNonNullableByDefault} (core::int, core::int) → core::int;
+  d = <S extends core::Object? = dynamic>(S% a, S% b) → S% => a;
+}
+static method test2() → dynamic {
+  dynamic d = (core::int a, core::int b) → core::int => a;
+  d as{ForNonNullableByDefault} (core::int, core::int) → core::int;
+  d = (core::int a, core::int b) → core::int => let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/infer_from_promoted.dart:16:21: Error: A value of type 'String' can't be returned from a function with return type 'int'.
+  d = (a, b) => '\$a';
+                    ^" in "${a}" as{TypeError,ForNonNullableByDefault} core::int;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.strong.transformed.expect
new file mode 100644
index 0000000..3de8d0f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.strong.transformed.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/infer_from_promoted.dart:16:21: Error: A value of type 'String' can't be returned from a function with return type 'int'.
+//   d = (a, b) => '$a';
+//                     ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef F<invariant T extends core::Object? = dynamic> = (T%, T%) → T%;
+static method test1() → dynamic {
+  dynamic d = (core::int a, core::int b) → core::int => a;
+  d as{ForNonNullableByDefault} (core::int, core::int) → core::int;
+  d = <S extends core::Object? = dynamic>(S% a, S% b) → S% => a;
+}
+static method test2() → dynamic {
+  dynamic d = (core::int a, core::int b) → core::int => a;
+  d as{ForNonNullableByDefault} (core::int, core::int) → core::int;
+  d = (core::int a, core::int b) → core::int => let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/infer_from_promoted.dart:16:21: Error: A value of type 'String' can't be returned from a function with return type 'int'.
+  d = (a, b) => '\$a';
+                    ^" in "${a}" as{TypeError,ForNonNullableByDefault} core::int;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.textual_outline.expect
new file mode 100644
index 0000000..56fe1c0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+typedef F<T> = T Function(T, T);
+test1() {}
+test2() {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..6091e0d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.textual_outline_modelled.expect
@@ -0,0 +1,4 @@
+main() {}
+test1() {}
+test2() {}
+typedef F<T> = T Function(T, T);
diff --git a/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.weak.expect b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.weak.expect
new file mode 100644
index 0000000..3de8d0f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.weak.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/infer_from_promoted.dart:16:21: Error: A value of type 'String' can't be returned from a function with return type 'int'.
+//   d = (a, b) => '$a';
+//                     ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef F<invariant T extends core::Object? = dynamic> = (T%, T%) → T%;
+static method test1() → dynamic {
+  dynamic d = (core::int a, core::int b) → core::int => a;
+  d as{ForNonNullableByDefault} (core::int, core::int) → core::int;
+  d = <S extends core::Object? = dynamic>(S% a, S% b) → S% => a;
+}
+static method test2() → dynamic {
+  dynamic d = (core::int a, core::int b) → core::int => a;
+  d as{ForNonNullableByDefault} (core::int, core::int) → core::int;
+  d = (core::int a, core::int b) → core::int => let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/infer_from_promoted.dart:16:21: Error: A value of type 'String' can't be returned from a function with return type 'int'.
+  d = (a, b) => '\$a';
+                    ^" in "${a}" as{TypeError,ForNonNullableByDefault} core::int;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.weak.transformed.expect
new file mode 100644
index 0000000..3de8d0f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/infer_from_promoted.dart.weak.transformed.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/infer_from_promoted.dart:16:21: Error: A value of type 'String' can't be returned from a function with return type 'int'.
+//   d = (a, b) => '$a';
+//                     ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef F<invariant T extends core::Object? = dynamic> = (T%, T%) → T%;
+static method test1() → dynamic {
+  dynamic d = (core::int a, core::int b) → core::int => a;
+  d as{ForNonNullableByDefault} (core::int, core::int) → core::int;
+  d = <S extends core::Object? = dynamic>(S% a, S% b) → S% => a;
+}
+static method test2() → dynamic {
+  dynamic d = (core::int a, core::int b) → core::int => a;
+  d as{ForNonNullableByDefault} (core::int, core::int) → core::int;
+  d = (core::int a, core::int b) → core::int => let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/infer_from_promoted.dart:16:21: Error: A value of type 'String' can't be returned from a function with return type 'int'.
+  d = (a, b) => '\$a';
+                    ^" in "${a}" as{TypeError,ForNonNullableByDefault} core::int;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue40954.dart b/pkg/front_end/testcases/nnbd/issue40954.dart
new file mode 100644
index 0000000..1f4585c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue40954.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.
+
+class A {}
+
+class C {
+  static void test1(var v, [A a]) {}
+
+  static void test2(var v, {A a}) {}
+
+  void test11(var v, [A a]) {}
+
+  void test22(var v, {A a}) {}
+}
+
+void test1(var v, [A a]) {}
+
+void test2(var v, {A a}) {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue40954.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue40954.dart.outline.expect
new file mode 100644
index 0000000..c6641b9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue40954.dart.outline.expect
@@ -0,0 +1,59 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:8:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test1(var v, [A a]) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:10:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test2(var v, {A a}) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:12:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test11(var v, [A a]) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:14:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test22(var v, {A a}) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:17:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test1(var v, [A a]) {}
+//                      ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:19:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test2(var v, {A a}) {}
+//                      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+}
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    ;
+  static method test1(dynamic v, [self::A a]) → void
+    ;
+  static method test2(dynamic v, {self::A a}) → void
+    ;
+  method test11(dynamic v, [self::A a]) → void
+    ;
+  method test22(dynamic v, {self::A a}) → void
+    ;
+}
+static method test1(dynamic v, [self::A a]) → void
+  ;
+static method test2(dynamic v, {self::A a}) → void
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue40954.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue40954.dart.strong.expect
new file mode 100644
index 0000000..e94c384
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue40954.dart.strong.expect
@@ -0,0 +1,58 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:8:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test1(var v, [A a]) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:10:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test2(var v, {A a}) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:12:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test11(var v, [A a]) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:14:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test22(var v, {A a}) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:17:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test1(var v, [A a]) {}
+//                      ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:19:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test2(var v, {A a}) {}
+//                      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  static method test1(dynamic v, [self::A a = #C1]) → void {}
+  static method test2(dynamic v, {self::A a = #C1}) → void {}
+  method test11(dynamic v, [self::A a = #C1]) → void {}
+  method test22(dynamic v, {self::A a = #C1}) → void {}
+}
+static method test1(dynamic v, [self::A a = #C1]) → void {}
+static method test2(dynamic v, {self::A a = #C1}) → void {}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd/issue40954.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue40954.dart.strong.transformed.expect
new file mode 100644
index 0000000..e94c384
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue40954.dart.strong.transformed.expect
@@ -0,0 +1,58 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:8:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test1(var v, [A a]) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:10:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test2(var v, {A a}) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:12:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test11(var v, [A a]) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:14:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test22(var v, {A a}) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:17:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test1(var v, [A a]) {}
+//                      ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:19:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test2(var v, {A a}) {}
+//                      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  static method test1(dynamic v, [self::A a = #C1]) → void {}
+  static method test2(dynamic v, {self::A a = #C1}) → void {}
+  method test11(dynamic v, [self::A a = #C1]) → void {}
+  method test22(dynamic v, {self::A a = #C1}) → void {}
+}
+static method test1(dynamic v, [self::A a = #C1]) → void {}
+static method test2(dynamic v, {self::A a = #C1}) → void {}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd/issue40954.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue40954.dart.textual_outline.expect
new file mode 100644
index 0000000..7998ca1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue40954.dart.textual_outline.expect
@@ -0,0 +1,12 @@
+class A {}
+
+class C {
+  static void test1(var v, [A a]) {}
+  static void test2(var v, {A a}) {}
+  void test11(var v, [A a]) {}
+  void test22(var v, {A a}) {}
+}
+
+void test1(var v, [A a]) {}
+void test2(var v, {A a}) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue40954.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue40954.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..53c9a4f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue40954.dart.textual_outline_modelled.expect
@@ -0,0 +1,12 @@
+class A {}
+
+class C {
+  static void test1(var v, [A a]) {}
+  static void test2(var v, {A a}) {}
+  void test11(var v, [A a]) {}
+  void test22(var v, {A a}) {}
+}
+
+main() {}
+void test1(var v, [A a]) {}
+void test2(var v, {A a}) {}
diff --git a/pkg/front_end/testcases/nnbd/issue40954.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue40954.dart.weak.expect
new file mode 100644
index 0000000..e94c384
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue40954.dart.weak.expect
@@ -0,0 +1,58 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:8:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test1(var v, [A a]) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:10:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test2(var v, {A a}) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:12:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test11(var v, [A a]) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:14:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test22(var v, {A a}) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:17:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test1(var v, [A a]) {}
+//                      ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:19:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test2(var v, {A a}) {}
+//                      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  static method test1(dynamic v, [self::A a = #C1]) → void {}
+  static method test2(dynamic v, {self::A a = #C1}) → void {}
+  method test11(dynamic v, [self::A a = #C1]) → void {}
+  method test22(dynamic v, {self::A a = #C1}) → void {}
+}
+static method test1(dynamic v, [self::A a = #C1]) → void {}
+static method test2(dynamic v, {self::A a = #C1}) → void {}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd/issue40954.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue40954.dart.weak.transformed.expect
new file mode 100644
index 0000000..e94c384
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue40954.dart.weak.transformed.expect
@@ -0,0 +1,58 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:8:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test1(var v, [A a]) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:10:31: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   static void test2(var v, {A a}) {}
+//                               ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:12:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test11(var v, [A a]) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:14:25: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+//   void test22(var v, {A a}) {}
+//                         ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:17:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test1(var v, [A a]) {}
+//                      ^
+//
+// pkg/front_end/testcases/nnbd/issue40954.dart:19:22: Error: Optional parameter 'a' should have a default value because its type 'A' doesn't allow null.
+//  - 'A' is from 'pkg/front_end/testcases/nnbd/issue40954.dart'.
+// void test2(var v, {A a}) {}
+//                      ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  static method test1(dynamic v, [self::A a = #C1]) → void {}
+  static method test2(dynamic v, {self::A a = #C1}) → void {}
+  method test11(dynamic v, [self::A a = #C1]) → void {}
+  method test22(dynamic v, {self::A a = #C1}) → void {}
+}
+static method test1(dynamic v, [self::A a = #C1]) → void {}
+static method test2(dynamic v, {self::A a = #C1}) → void {}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.outline.expect
index 34eb654..652f6a1 100644
--- a/pkg/front_end/testcases/nnbd/issue41102.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41102.dart.outline.expect
@@ -11,7 +11,7 @@
 static final field core::List<core::int> s3;
 static final field dynamic s4;
 static field core::int? s5;
-static final field core::int? s6;
+static final field core::num s6;
 static field core::List<dynamic>? s7;
 static final field dynamic s8;
 static final field core::int s9;
diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect
index 3daaf3e..2889d4d 100644
--- a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect
@@ -90,7 +90,7 @@
   }
 }).call();
 static field core::int? s5;
-static final field core::int? s6 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:31:15: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+static final field core::num s6 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:31:15: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 final s6 = s5 + 0;
               ^" in self::s5.{core::num::+}(0);
 static field core::List<dynamic>? s7;
diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect
index 673da56..d6311c9 100644
--- a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect
@@ -90,7 +90,7 @@
   }
 }).call();
 static field core::int? s5;
-static final field core::int? s6 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:31:15: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+static final field core::num s6 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:31:15: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 final s6 = s5 + 0;
               ^" in self::s5.{core::num::+}(0);
 static field core::List<dynamic>? s7;
diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.expect
index 3daaf3e..2889d4d 100644
--- a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.expect
@@ -90,7 +90,7 @@
   }
 }).call();
 static field core::int? s5;
-static final field core::int? s6 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:31:15: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+static final field core::num s6 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:31:15: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 final s6 = s5 + 0;
               ^" in self::s5.{core::num::+}(0);
 static field core::List<dynamic>? s7;
diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.transformed.expect
index 673da56..d6311c9 100644
--- a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.transformed.expect
@@ -90,7 +90,7 @@
   }
 }).call();
 static field core::int? s5;
-static final field core::int? s6 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:31:15: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+static final field core::num s6 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41102.dart:31:15: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 final s6 = s5 + 0;
               ^" in self::s5.{core::num::+}(0);
 static field core::List<dynamic>? s7;
diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart b/pkg/front_end/testcases/nnbd/issue41108.dart
new file mode 100644
index 0000000..3c86077
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41108.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.
+
+test() async {
+  List y = await l(); // should be a List?
+}
+
+Future<List>? l() => null;
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.outline.expect
new file mode 100644
index 0000000..2975c48
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41108.dart.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method test() → dynamic async 
+  ;
+static method l() → asy::Future<core::List<dynamic>>?
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.expect
new file mode 100644
index 0000000..778d86e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>'.
+//  - 'List' is from 'dart:core'.
+//   List y = await l(); // should be a List?
+//            ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+static method test() → dynamic async {
+  core::List<dynamic> y = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>'.
+ - 'List' is from 'dart:core'.
+  List y = await l(); // should be a List?
+           ^" in await self::l() as{TypeError,ForNonNullableByDefault} core::List<dynamic>;
+}
+static method l() → asy::Future<core::List<dynamic>>?
+  return null;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.transformed.expect
new file mode 100644
index 0000000..87e1bf1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41108.dart.strong.transformed.expect
@@ -0,0 +1,49 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>'.
+//  - 'List' is from 'dart:core'.
+//   List y = await l(); // should be a List?
+//            ^
+//
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+static method test() → dynamic /* 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:
+      {
+        final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>'.
+ - 'List' is from 'dart:core'.
+  List y = await l(); // should be a List?
+           ^";
+        [yield] let dynamic #t2 = asy::_awaitHelper(self::l(), :async_op_then, :async_op_error, :async_op) in null;
+        core::List<dynamic> y = let core::List<dynamic>? #t3 = _in::unsafeCast<core::List<dynamic>?>(:result) in #t3.==(null) ?{core::List<dynamic>} #t3 as{TypeError,ForNonNullableByDefault} core::List<dynamic> : #t3{core::List<dynamic>};
+      }
+      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 l() → asy::Future<core::List<dynamic>>?
+  return null;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.textual_outline.expect
new file mode 100644
index 0000000..da7cfbd
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41108.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+test() async {}
+Future<List>? l() => null;
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..933af90
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41108.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+Future<List>? l() => null;
+main() {}
+test() async {}
diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.weak.expect
new file mode 100644
index 0000000..778d86e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41108.dart.weak.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>'.
+//  - 'List' is from 'dart:core'.
+//   List y = await l(); // should be a List?
+//            ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+static method test() → dynamic async {
+  core::List<dynamic> y = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>'.
+ - 'List' is from 'dart:core'.
+  List y = await l(); // should be a List?
+           ^" in await self::l() as{TypeError,ForNonNullableByDefault} core::List<dynamic>;
+}
+static method l() → asy::Future<core::List<dynamic>>?
+  return null;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue41108.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41108.dart.weak.transformed.expect
new file mode 100644
index 0000000..255b564
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41108.dart.weak.transformed.expect
@@ -0,0 +1,49 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>'.
+//  - 'List' is from 'dart:core'.
+//   List y = await l(); // should be a List?
+//            ^
+//
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+static method test() → dynamic /* 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:
+      {
+        final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>'.
+ - 'List' is from 'dart:core'.
+  List y = await l(); // should be a List?
+           ^";
+        [yield] let dynamic #t2 = asy::_awaitHelper(self::l(), :async_op_then, :async_op_error, :async_op) in null;
+        core::List<dynamic> y = _in::unsafeCast<core::List<dynamic>?>(: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 l() → asy::Future<core::List<dynamic>>?
+  return null;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue41156.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41156.dart.strong.expect
index 5e2f0fe..11217a1 100644
--- a/pkg/front_end/testcases/nnbd/issue41156.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41156.dart.strong.expect
@@ -6,7 +6,7 @@
 //   String Function(int) x2 = (int v) /* error */ {
 //                             ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   String Function(int) x3 = (int v) /* error */ {
 //                             ^
 //
@@ -14,7 +14,7 @@
 //   String Function(int) x5 = (int v) /* error */ {
 //                             ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   String Function(int) x6 = (int v) /* error */ {
 //                             ^
 //
@@ -22,7 +22,7 @@
 //   Future<String> Function(int) y2 = (int v) async /* error */ {
 //                                     ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   Future<String> Function(int) y3 = (int v) async /* error */ {
 //                                     ^
 //
@@ -30,7 +30,7 @@
 //   Future<String> Function(int) y5 = (int v) async /* error */ {
 //                                     ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   Future<String> Function(int) y6 = (int v) async /* error */ {
 //                                     ^
 //
@@ -81,13 +81,13 @@
   String Function(int) x2 = (int v) /* error */ {
                             ^" in null;
   };
-  (core::int) → core::String x3 = (core::int v) → Never {
+  (core::int) → core::String x3 = (core::int v) → core::String {
     try {
       return throw v;
     }
     on core::Object catch(final core::Object _) {
     }
-    return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+    return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   String Function(int) x3 = (int v) /* error */ {
                             ^" in null;
   };
@@ -101,13 +101,13 @@
   String Function(int) x5 = (int v) /* error */ {
                             ^" in null;
   };
-  (core::int) → core::String x6 = (core::int v) → Never {
+  (core::int) → core::String x6 = (core::int v) → core::String {
     try {
       return self::throwing();
     }
     on core::Object catch(final core::Object _) {
     }
-    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   String Function(int) x6 = (int v) /* error */ {
                             ^" in null;
   };
@@ -121,13 +121,13 @@
   Future<String> Function(int) y2 = (int v) async /* error */ {
                                     ^" in null;
   };
-  (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<Never> async {
+  (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<core::String> async {
     try {
       return throw v;
     }
     on core::Object catch(final core::Object _) {
     }
-    return let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+    return let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   Future<String> Function(int) y3 = (int v) async /* error */ {
                                     ^" in null;
   };
@@ -141,13 +141,13 @@
   Future<String> Function(int) y5 = (int v) async /* error */ {
                                     ^" in null;
   };
-  (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<Never> async {
+  (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<core::String> async {
     try {
       return self::throwing();
     }
     on core::Object catch(final core::Object _) {
     }
-    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   Future<String> Function(int) y6 = (int v) async /* error */ {
                                     ^" in null;
   };
diff --git a/pkg/front_end/testcases/nnbd/issue41156.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41156.dart.strong.transformed.expect
index 96a261f..07174dc 100644
--- a/pkg/front_end/testcases/nnbd/issue41156.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41156.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
 //   String Function(int) x2 = (int v) /* error */ {
 //                             ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   String Function(int) x3 = (int v) /* error */ {
 //                             ^
 //
@@ -14,7 +14,7 @@
 //   String Function(int) x5 = (int v) /* error */ {
 //                             ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   String Function(int) x6 = (int v) /* error */ {
 //                             ^
 //
@@ -22,7 +22,7 @@
 //   Future<String> Function(int) y2 = (int v) async /* error */ {
 //                                     ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   Future<String> Function(int) y3 = (int v) async /* error */ {
 //                                     ^
 //
@@ -30,7 +30,7 @@
 //   Future<String> Function(int) y5 = (int v) async /* error */ {
 //                                     ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   Future<String> Function(int) y6 = (int v) async /* error */ {
 //                                     ^
 //
@@ -238,13 +238,13 @@
   String Function(int) x2 = (int v) /* error */ {
                             ^" in null;
         };
-        (core::int) → core::String x3 = (core::int v) → Never {
+        (core::int) → core::String x3 = (core::int v) → core::String {
           try {
             return throw v;
           }
           on core::Object catch(final core::Object _) {
           }
-          return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+          return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   String Function(int) x3 = (int v) /* error */ {
                             ^" in null;
         };
@@ -258,13 +258,13 @@
   String Function(int) x5 = (int v) /* error */ {
                             ^" in null;
         };
-        (core::int) → core::String x6 = (core::int v) → Never {
+        (core::int) → core::String x6 = (core::int v) → core::String {
           try {
             return self::throwing();
           }
           on core::Object catch(final core::Object _) {
           }
-          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   String Function(int) x6 = (int v) /* error */ {
                             ^" in null;
         };
@@ -302,9 +302,9 @@
           :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
           return :async_completer.{asy::Completer::future};
         };
-        (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<Never> /* originally async */ {
-          final asy::_AsyncAwaitCompleter<Never> :async_completer = new asy::_AsyncAwaitCompleter::•<Never>();
-          FutureOr<Never>? :return_value;
+        (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<core::String> /* originally async */ {
+          final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
+          FutureOr<core::String>? :return_value;
           dynamic :async_stack_trace;
           (dynamic) → dynamic :async_op_then;
           (core::Object, core::StackTrace) → dynamic :async_op_error;
@@ -320,7 +320,7 @@
                 }
                 on core::Object catch(final core::Object _) {
                 }
-                :return_value = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+                :return_value = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   Future<String> Function(int) y3 = (int v) async /* error */ {
                                     ^" in null;
                 break #L9;
@@ -371,9 +371,9 @@
           :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
           return :async_completer.{asy::Completer::future};
         };
-        (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<Never> /* originally async */ {
-          final asy::_AsyncAwaitCompleter<Never> :async_completer = new asy::_AsyncAwaitCompleter::•<Never>();
-          FutureOr<Never>? :return_value;
+        (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<core::String> /* originally async */ {
+          final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
+          FutureOr<core::String>? :return_value;
           dynamic :async_stack_trace;
           (dynamic) → dynamic :async_op_then;
           (core::Object, core::StackTrace) → dynamic :async_op_error;
@@ -389,7 +389,7 @@
                 }
                 on core::Object catch(final core::Object _) {
                 }
-                :return_value = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+                :return_value = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   Future<String> Function(int) y6 = (int v) async /* error */ {
                                     ^" in null;
                 break #L11;
diff --git a/pkg/front_end/testcases/nnbd/issue41156.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41156.dart.weak.expect
index 5e2f0fe..11217a1 100644
--- a/pkg/front_end/testcases/nnbd/issue41156.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41156.dart.weak.expect
@@ -6,7 +6,7 @@
 //   String Function(int) x2 = (int v) /* error */ {
 //                             ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   String Function(int) x3 = (int v) /* error */ {
 //                             ^
 //
@@ -14,7 +14,7 @@
 //   String Function(int) x5 = (int v) /* error */ {
 //                             ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   String Function(int) x6 = (int v) /* error */ {
 //                             ^
 //
@@ -22,7 +22,7 @@
 //   Future<String> Function(int) y2 = (int v) async /* error */ {
 //                                     ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   Future<String> Function(int) y3 = (int v) async /* error */ {
 //                                     ^
 //
@@ -30,7 +30,7 @@
 //   Future<String> Function(int) y5 = (int v) async /* error */ {
 //                                     ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   Future<String> Function(int) y6 = (int v) async /* error */ {
 //                                     ^
 //
@@ -81,13 +81,13 @@
   String Function(int) x2 = (int v) /* error */ {
                             ^" in null;
   };
-  (core::int) → core::String x3 = (core::int v) → Never {
+  (core::int) → core::String x3 = (core::int v) → core::String {
     try {
       return throw v;
     }
     on core::Object catch(final core::Object _) {
     }
-    return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+    return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   String Function(int) x3 = (int v) /* error */ {
                             ^" in null;
   };
@@ -101,13 +101,13 @@
   String Function(int) x5 = (int v) /* error */ {
                             ^" in null;
   };
-  (core::int) → core::String x6 = (core::int v) → Never {
+  (core::int) → core::String x6 = (core::int v) → core::String {
     try {
       return self::throwing();
     }
     on core::Object catch(final core::Object _) {
     }
-    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   String Function(int) x6 = (int v) /* error */ {
                             ^" in null;
   };
@@ -121,13 +121,13 @@
   Future<String> Function(int) y2 = (int v) async /* error */ {
                                     ^" in null;
   };
-  (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<Never> async {
+  (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<core::String> async {
     try {
       return throw v;
     }
     on core::Object catch(final core::Object _) {
     }
-    return let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+    return let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   Future<String> Function(int) y3 = (int v) async /* error */ {
                                     ^" in null;
   };
@@ -141,13 +141,13 @@
   Future<String> Function(int) y5 = (int v) async /* error */ {
                                     ^" in null;
   };
-  (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<Never> async {
+  (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<core::String> async {
     try {
       return self::throwing();
     }
     on core::Object catch(final core::Object _) {
     }
-    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   Future<String> Function(int) y6 = (int v) async /* error */ {
                                     ^" in null;
   };
diff --git a/pkg/front_end/testcases/nnbd/issue41156.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41156.dart.weak.transformed.expect
index 96a261f..07174dc 100644
--- a/pkg/front_end/testcases/nnbd/issue41156.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41156.dart.weak.transformed.expect
@@ -6,7 +6,7 @@
 //   String Function(int) x2 = (int v) /* error */ {
 //                             ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   String Function(int) x3 = (int v) /* error */ {
 //                             ^
 //
@@ -14,7 +14,7 @@
 //   String Function(int) x5 = (int v) /* error */ {
 //                             ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   String Function(int) x6 = (int v) /* error */ {
 //                             ^
 //
@@ -22,7 +22,7 @@
 //   Future<String> Function(int) y2 = (int v) async /* error */ {
 //                                     ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   Future<String> Function(int) y3 = (int v) async /* error */ {
 //                                     ^
 //
@@ -30,7 +30,7 @@
 //   Future<String> Function(int) y5 = (int v) async /* error */ {
 //                                     ^
 //
-// pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+// pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
 //   Future<String> Function(int) y6 = (int v) async /* error */ {
 //                                     ^
 //
@@ -238,13 +238,13 @@
   String Function(int) x2 = (int v) /* error */ {
                             ^" in null;
         };
-        (core::int) → core::String x3 = (core::int v) → Never {
+        (core::int) → core::String x3 = (core::int v) → core::String {
           try {
             return throw v;
           }
           on core::Object catch(final core::Object _) {
           }
-          return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+          return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   String Function(int) x3 = (int v) /* error */ {
                             ^" in null;
         };
@@ -258,13 +258,13 @@
   String Function(int) x5 = (int v) /* error */ {
                             ^" in null;
         };
-        (core::int) → core::String x6 = (core::int v) → Never {
+        (core::int) → core::String x6 = (core::int v) → core::String {
           try {
             return self::throwing();
           }
           on core::Object catch(final core::Object _) {
           }
-          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   String Function(int) x6 = (int v) /* error */ {
                             ^" in null;
         };
@@ -302,9 +302,9 @@
           :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
           return :async_completer.{asy::Completer::future};
         };
-        (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<Never> /* originally async */ {
-          final asy::_AsyncAwaitCompleter<Never> :async_completer = new asy::_AsyncAwaitCompleter::•<Never>();
-          FutureOr<Never>? :return_value;
+        (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<core::String> /* originally async */ {
+          final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
+          FutureOr<core::String>? :return_value;
           dynamic :async_stack_trace;
           (dynamic) → dynamic :async_op_then;
           (core::Object, core::StackTrace) → dynamic :async_op_error;
@@ -320,7 +320,7 @@
                 }
                 on core::Object catch(final core::Object _) {
                 }
-                :return_value = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+                :return_value = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   Future<String> Function(int) y3 = (int v) async /* error */ {
                                     ^" in null;
                 break #L9;
@@ -371,9 +371,9 @@
           :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
           return :async_completer.{asy::Completer::future};
         };
-        (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<Never> /* originally async */ {
-          final asy::_AsyncAwaitCompleter<Never> :async_completer = new asy::_AsyncAwaitCompleter::•<Never>();
-          FutureOr<Never>? :return_value;
+        (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<core::String> /* originally async */ {
+          final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
+          FutureOr<core::String>? :return_value;
           dynamic :async_stack_trace;
           (dynamic) → dynamic :async_op_then;
           (core::Object, core::StackTrace) → dynamic :async_op_error;
@@ -389,7 +389,7 @@
                 }
                 on core::Object catch(final core::Object _) {
                 }
-                :return_value = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
+                :return_value = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null.
   Future<String> Function(int) y6 = (int v) async /* error */ {
                                     ^" in null;
                 break #L11;
diff --git a/pkg/front_end/testcases/nnbd/issue41386.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41386.dart.textual_outline.expect
new file mode 100644
index 0000000..cfc22c4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41386.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+bool Function(T) predicate<T>(bool Function(T) fn) => (T val) => fn(val);
+void test() {}
+void main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41386.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41386.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..5bfe1f4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41386.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+bool Function(T) predicate<T>(bool Function(T) fn) => (T val) => fn(val);
+void main() {}
+void test() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41386b.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41386b.dart.textual_outline.expect
new file mode 100644
index 0000000..31c91a2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41386b.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+void test() {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41386b.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41386b.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..4742c78
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41386b.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+void test() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41415.dart b/pkg/front_end/testcases/nnbd/issue41415.dart
index 1b33195..be4be43 100644
--- a/pkg/front_end/testcases/nnbd/issue41415.dart
+++ b/pkg/front_end/testcases/nnbd/issue41415.dart
@@ -2,14 +2,28 @@
 // for 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() {
+main() {}
+test<X extends Null, Y extends Never?, Z extends Never>() {
   // Pre-NNBD bottom type.
   int Function(Null) f = (x) => 1; // Runtime type is int Function(Object?)
+
   // NNBD bottom type.
   int Function(Never) g = (x) => 1; // Runtime type is int Function(Object?)
-  // NNBD bottom type.
 
+  // NNBD bottom type.
   int Function(Never?) h = (x) => 1; // Runtime type is int Function(Object?)
 
   int Function(String) i = (x) => 1; // Runtime type is int Function(String)
+
+  // Pre-NNBD bottom type.
+  int Function(X) j = (x) => 1; // Runtime type is int Function(Object?)
+
+  // NNBD bottom type.
+  int Function(Y) k = (x) => 1; // Runtime type is int Function(Object?)
+
+  // NNBD bottom type.
+  int Function(Z) l = (x) => 1; // Runtime type is int Function(Object?)
+
+  // NNBD bottom type.
+  int Function(Z?) m = (x) => 1; // Runtime type is int Function(Object?)
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41415.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41415.dart.outline.expect
index e2cba6b..0213dd7 100644
--- a/pkg/front_end/testcases/nnbd/issue41415.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41415.dart.outline.expect
@@ -1,5 +1,8 @@
 library /*isNonNullableByDefault*/;
 import self as self;
+import "dart:core" as core;
 
 static method main() → dynamic
   ;
+static method test<X extends core::Null? = core::Null?, Y extends Never? = Never?, Z extends Never = Never>() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue41415.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41415.dart.strong.expect
index 4c844e6..4419497 100644
--- a/pkg/front_end/testcases/nnbd/issue41415.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41415.dart.strong.expect
@@ -2,9 +2,14 @@
 import self as self;
 import "dart:core" as core;
 
-static method main() → dynamic {
+static method main() → dynamic {}
+static method test<X extends core::Null? = core::Null?, Y extends Never? = Never?, Z extends Never = Never>() → dynamic {
   (core::Null?) → core::int f = (core::Object? x) → core::int => 1;
   (Never) → core::int g = (core::Object? x) → core::int => 1;
   (Never?) → core::int h = (core::Object? x) → core::int => 1;
   (core::String) → core::int i = (core::String x) → core::int => 1;
+  (self::test::X%) → core::int j = (core::Object? x) → core::int => 1;
+  (self::test::Y%) → core::int k = (core::Object? x) → core::int => 1;
+  (self::test::Z) → core::int l = (core::Object? x) → core::int => 1;
+  (self::test::Z?) → core::int m = (core::Object? x) → core::int => 1;
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41415.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41415.dart.strong.transformed.expect
index 4c844e6..4419497 100644
--- a/pkg/front_end/testcases/nnbd/issue41415.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41415.dart.strong.transformed.expect
@@ -2,9 +2,14 @@
 import self as self;
 import "dart:core" as core;
 
-static method main() → dynamic {
+static method main() → dynamic {}
+static method test<X extends core::Null? = core::Null?, Y extends Never? = Never?, Z extends Never = Never>() → dynamic {
   (core::Null?) → core::int f = (core::Object? x) → core::int => 1;
   (Never) → core::int g = (core::Object? x) → core::int => 1;
   (Never?) → core::int h = (core::Object? x) → core::int => 1;
   (core::String) → core::int i = (core::String x) → core::int => 1;
+  (self::test::X%) → core::int j = (core::Object? x) → core::int => 1;
+  (self::test::Y%) → core::int k = (core::Object? x) → core::int => 1;
+  (self::test::Z) → core::int l = (core::Object? x) → core::int => 1;
+  (self::test::Z?) → core::int m = (core::Object? x) → core::int => 1;
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41415.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41415.dart.textual_outline.expect
index bae895a..181fe21 100644
--- a/pkg/front_end/testcases/nnbd/issue41415.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41415.dart.textual_outline.expect
@@ -1 +1,2 @@
 main() {}
+test<X extends Null, Y extends Never?, Z extends Never>() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41415.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41415.dart.textual_outline_modelled.expect
index bae895a..181fe21 100644
--- a/pkg/front_end/testcases/nnbd/issue41415.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/nnbd/issue41415.dart.textual_outline_modelled.expect
@@ -1 +1,2 @@
 main() {}
+test<X extends Null, Y extends Never?, Z extends Never>() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41415.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41415.dart.weak.expect
index 4c844e6..4419497 100644
--- a/pkg/front_end/testcases/nnbd/issue41415.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41415.dart.weak.expect
@@ -2,9 +2,14 @@
 import self as self;
 import "dart:core" as core;
 
-static method main() → dynamic {
+static method main() → dynamic {}
+static method test<X extends core::Null? = core::Null?, Y extends Never? = Never?, Z extends Never = Never>() → dynamic {
   (core::Null?) → core::int f = (core::Object? x) → core::int => 1;
   (Never) → core::int g = (core::Object? x) → core::int => 1;
   (Never?) → core::int h = (core::Object? x) → core::int => 1;
   (core::String) → core::int i = (core::String x) → core::int => 1;
+  (self::test::X%) → core::int j = (core::Object? x) → core::int => 1;
+  (self::test::Y%) → core::int k = (core::Object? x) → core::int => 1;
+  (self::test::Z) → core::int l = (core::Object? x) → core::int => 1;
+  (self::test::Z?) → core::int m = (core::Object? x) → core::int => 1;
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41415.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41415.dart.weak.transformed.expect
index 4c844e6..4419497 100644
--- a/pkg/front_end/testcases/nnbd/issue41415.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41415.dart.weak.transformed.expect
@@ -2,9 +2,14 @@
 import self as self;
 import "dart:core" as core;
 
-static method main() → dynamic {
+static method main() → dynamic {}
+static method test<X extends core::Null? = core::Null?, Y extends Never? = Never?, Z extends Never = Never>() → dynamic {
   (core::Null?) → core::int f = (core::Object? x) → core::int => 1;
   (Never) → core::int g = (core::Object? x) → core::int => 1;
   (Never?) → core::int h = (core::Object? x) → core::int => 1;
   (core::String) → core::int i = (core::String x) → core::int => 1;
+  (self::test::X%) → core::int j = (core::Object? x) → core::int => 1;
+  (self::test::Y%) → core::int k = (core::Object? x) → core::int => 1;
+  (self::test::Z) → core::int l = (core::Object? x) → core::int => 1;
+  (self::test::Z?) → core::int m = (core::Object? x) → core::int => 1;
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.expect
index 7b35002..fbcd99e 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.expect
@@ -2,12 +2,12 @@
 //
 // Problems in library:
 //
-// 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>'.
+// pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 // Future<bool> test5() => 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>'.
+// pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 //   Future<bool> test5() => getFutureNull(); // error
 //                           ^
@@ -48,7 +48,7 @@
 static method test4() → asy::Future<core::bool> async 
   return await self::getFutureNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
 static method test5() → asy::Future<core::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>'.
+  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 returned from a function with return type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
 Future<bool> test5() => getFutureNull(); // error
                         ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -66,7 +66,7 @@
   function test4() → asy::Future<core::bool> async 
     return await self::getFutureNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
   function test5() → asy::Future<core::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>'.
+    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 returned from a function with return type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> test5() => getFutureNull(); // error
                           ^" in self::getFutureNull() 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 4efaadf..e54c5af 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.transformed.expect
@@ -2,12 +2,12 @@
 //
 // Problems in library:
 //
-// 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>'.
+// pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 // Future<bool> test5() => 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>'.
+// pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 //   Future<bool> test5() => getFutureNull(); // error
 //                           ^
@@ -150,7 +150,7 @@
   return :async_completer.{asy::Completer::future};
 }
 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> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
 Future<bool> test5() => getFutureNull(); // error
                         ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -258,7 +258,7 @@
           return :async_completer.{asy::Completer::future};
         }
         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> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> test5() => getFutureNull(); // error
                           ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.expect
index 7b35002..fbcd99e 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.expect
@@ -2,12 +2,12 @@
 //
 // Problems in library:
 //
-// 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>'.
+// pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 // Future<bool> test5() => 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>'.
+// pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 //   Future<bool> test5() => getFutureNull(); // error
 //                           ^
@@ -48,7 +48,7 @@
 static method test4() → asy::Future<core::bool> async 
   return await self::getFutureNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
 static method test5() → asy::Future<core::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>'.
+  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 returned from a function with return type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
 Future<bool> test5() => getFutureNull(); // error
                         ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -66,7 +66,7 @@
   function test4() → asy::Future<core::bool> async 
     return await self::getFutureNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
   function test5() → asy::Future<core::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>'.
+    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 returned from a function with return type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> test5() => getFutureNull(); // error
                           ^" in self::getFutureNull() 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 4efaadf..e54c5af 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.transformed.expect
@@ -2,12 +2,12 @@
 //
 // Problems in library:
 //
-// 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>'.
+// pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 // Future<bool> test5() => 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>'.
+// pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 //   Future<bool> test5() => getFutureNull(); // error
 //                           ^
@@ -150,7 +150,7 @@
   return :async_completer.{asy::Completer::future};
 }
 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> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
 Future<bool> test5() => getFutureNull(); // error
                         ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -258,7 +258,7 @@
           return :async_completer.{asy::Completer::future};
         }
         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> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be returned from a function with return type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> test5() => getFutureNull(); // error
                           ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.expect
index 3c4069e..ca9e764 100644
--- a/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.expect
@@ -7,7 +7,7 @@
 //   yield* getIterableNull(); // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
 //  - 'Iterable' is from 'dart:core'.
 // Iterable<bool> test5() => getIterableNull(); // error
 //                           ^
@@ -17,7 +17,7 @@
 //     yield* getIterableNull(); // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
 //  - 'Iterable' is from 'dart:core'.
 //   Iterable<bool> test5() => getIterableNull(); // error
 //                             ^
@@ -62,7 +62,7 @@
          ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
 }
 static method test5() → core::Iterable<core::bool>
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
 Iterable<bool> test5() => getIterableNull(); // error
                           ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
@@ -86,7 +86,7 @@
            ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   }
   function test5() → core::Iterable<core::bool>
-    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   Iterable<bool> test5() => getIterableNull(); // error
                             ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.transformed.expect
index 17b627a..36cb9dd 100644
--- a/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.transformed.expect
@@ -7,7 +7,7 @@
 //   yield* getIterableNull(); // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
 //  - 'Iterable' is from 'dart:core'.
 // Iterable<bool> test5() => getIterableNull(); // error
 //                           ^
@@ -17,7 +17,7 @@
 //     yield* getIterableNull(); // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
 //  - 'Iterable' is from 'dart:core'.
 //   Iterable<bool> test5() => getIterableNull(); // error
 //                             ^
@@ -115,7 +115,7 @@
   return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
 }
 static method test5() → core::Iterable<core::bool>
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
 Iterable<bool> test5() => getIterableNull(); // error
                           ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
@@ -189,7 +189,7 @@
           return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
         }
         function test5() → core::Iterable<core::bool>
-          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   Iterable<bool> test5() => getIterableNull(); // error
                             ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437b.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41437b.dart.textual_outline.expect
new file mode 100644
index 0000000..cec88c6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41437b.dart.textual_outline.expect
@@ -0,0 +1,12 @@
+dynamic getNull() => null;
+Iterable<dynamic> getIterableNull() sync* {}
+Iterable<bool> getIterableBool() sync* {}
+Iterable<bool> test1() sync* {}
+Iterable<bool> test2() => getNull();
+bool test3() => getNull();
+Iterable<bool> test4() sync* {}
+Iterable<bool> test5() => getIterableNull();
+Iterable<bool> test6() => getIterableBool();
+Iterable<bool> test7() sync* {}
+test() async {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41437b.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41437b.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..f215cc1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41437b.dart.textual_outline_modelled.expect
@@ -0,0 +1,12 @@
+Iterable<bool> getIterableBool() sync* {}
+Iterable<bool> test1() sync* {}
+Iterable<bool> test2() => getNull();
+Iterable<bool> test4() sync* {}
+Iterable<bool> test5() => getIterableNull();
+Iterable<bool> test6() => getIterableBool();
+Iterable<bool> test7() sync* {}
+Iterable<dynamic> getIterableNull() sync* {}
+bool test3() => getNull();
+dynamic getNull() => null;
+main() {}
+test() async {}
diff --git a/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.expect
index 3c4069e..ca9e764 100644
--- a/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.expect
@@ -7,7 +7,7 @@
 //   yield* getIterableNull(); // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
 //  - 'Iterable' is from 'dart:core'.
 // Iterable<bool> test5() => getIterableNull(); // error
 //                           ^
@@ -17,7 +17,7 @@
 //     yield* getIterableNull(); // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
 //  - 'Iterable' is from 'dart:core'.
 //   Iterable<bool> test5() => getIterableNull(); // error
 //                             ^
@@ -62,7 +62,7 @@
          ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
 }
 static method test5() → core::Iterable<core::bool>
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
 Iterable<bool> test5() => getIterableNull(); // error
                           ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
@@ -86,7 +86,7 @@
            ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   }
   function test5() → core::Iterable<core::bool>
-    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   Iterable<bool> test5() => getIterableNull(); // error
                             ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.transformed.expect
index 17b627a..36cb9dd 100644
--- a/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
 //   yield* getIterableNull(); // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
 //  - 'Iterable' is from 'dart:core'.
 // Iterable<bool> test5() => getIterableNull(); // error
 //                           ^
@@ -17,7 +17,7 @@
 //     yield* getIterableNull(); // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
 //  - 'Iterable' is from 'dart:core'.
 //   Iterable<bool> test5() => getIterableNull(); // error
 //                             ^
@@ -115,7 +115,7 @@
   return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
 }
 static method test5() → core::Iterable<core::bool>
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
 Iterable<bool> test5() => getIterableNull(); // error
                           ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
@@ -189,7 +189,7 @@
           return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
         }
         function test5() → core::Iterable<core::bool>
-          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   Iterable<bool> test5() => getIterableNull(); // error
                             ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437c.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41437c.dart.strong.expect
index 16b4fb1..c020c72 100644
--- a/pkg/front_end/testcases/nnbd/issue41437c.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437c.dart.strong.expect
@@ -7,7 +7,7 @@
 //   yield* getStreamNull(); // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
 //  - 'Stream' is from 'dart:async'.
 // Stream<bool> test5() => getStreamNull(); // error
 //                         ^
@@ -17,7 +17,7 @@
 //     yield* getStreamNull(); // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
 //  - 'Stream' is from 'dart:async'.
 //   Stream<bool> test5() => getStreamNull(); // error
 //                           ^
@@ -63,7 +63,7 @@
          ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
 }
 static method test5() → asy::Stream<core::bool>
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
  - 'Stream' is from 'dart:async'.
 Stream<bool> test5() => getStreamNull(); // error
                         ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
@@ -87,7 +87,7 @@
            ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
   }
   function test5() → asy::Stream<core::bool>
-    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
  - 'Stream' is from 'dart:async'.
   Stream<bool> test5() => getStreamNull(); // error
                           ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437c.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41437c.dart.strong.transformed.expect
index 06f62bb..71bc53a 100644
--- a/pkg/front_end/testcases/nnbd/issue41437c.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437c.dart.strong.transformed.expect
@@ -7,7 +7,7 @@
 //   yield* getStreamNull(); // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
 //  - 'Stream' is from 'dart:async'.
 // Stream<bool> test5() => getStreamNull(); // error
 //                         ^
@@ -17,7 +17,7 @@
 //     yield* getStreamNull(); // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
 //  - 'Stream' is from 'dart:async'.
 //   Stream<bool> test5() => getStreamNull(); // error
 //                           ^
@@ -191,7 +191,7 @@
   return :controller_stream;
 }
 static method test5() → asy::Stream<core::bool>
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
  - 'Stream' is from 'dart:async'.
 Stream<bool> test5() => getStreamNull(); // error
                         ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
@@ -322,7 +322,7 @@
           return :controller_stream;
         }
         function test5() → asy::Stream<core::bool>
-          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
  - 'Stream' is from 'dart:async'.
   Stream<bool> test5() => getStreamNull(); // error
                           ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437c.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41437c.dart.textual_outline.expect
new file mode 100644
index 0000000..25fb625
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41437c.dart.textual_outline.expect
@@ -0,0 +1,12 @@
+dynamic getNull() => null;
+Stream<dynamic> getStreamNull() async* {}
+Stream<bool> getStreamBool() async* {}
+Stream<bool> test1() async* {}
+Stream<bool> test2() => getNull();
+bool test3() => getNull();
+Stream<bool> test4() async* {}
+Stream<bool> test5() => getStreamNull();
+Stream<bool> test6() => getStreamBool();
+Stream<bool> test7() async* {}
+test() async {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41437c.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41437c.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..08bd153
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41437c.dart.textual_outline_modelled.expect
@@ -0,0 +1,12 @@
+Stream<bool> getStreamBool() async* {}
+Stream<bool> test1() async* {}
+Stream<bool> test2() => getNull();
+Stream<bool> test4() async* {}
+Stream<bool> test5() => getStreamNull();
+Stream<bool> test6() => getStreamBool();
+Stream<bool> test7() async* {}
+Stream<dynamic> getStreamNull() async* {}
+bool test3() => getNull();
+dynamic getNull() => null;
+main() {}
+test() async {}
diff --git a/pkg/front_end/testcases/nnbd/issue41437c.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41437c.dart.weak.expect
index 16b4fb1..c020c72 100644
--- a/pkg/front_end/testcases/nnbd/issue41437c.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437c.dart.weak.expect
@@ -7,7 +7,7 @@
 //   yield* getStreamNull(); // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
 //  - 'Stream' is from 'dart:async'.
 // Stream<bool> test5() => getStreamNull(); // error
 //                         ^
@@ -17,7 +17,7 @@
 //     yield* getStreamNull(); // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
 //  - 'Stream' is from 'dart:async'.
 //   Stream<bool> test5() => getStreamNull(); // error
 //                           ^
@@ -63,7 +63,7 @@
          ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
 }
 static method test5() → asy::Stream<core::bool>
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
  - 'Stream' is from 'dart:async'.
 Stream<bool> test5() => getStreamNull(); // error
                         ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
@@ -87,7 +87,7 @@
            ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
   }
   function test5() → asy::Stream<core::bool>
-    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
  - 'Stream' is from 'dart:async'.
   Stream<bool> test5() => getStreamNull(); // error
                           ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437c.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41437c.dart.weak.transformed.expect
index 06f62bb..71bc53a 100644
--- a/pkg/front_end/testcases/nnbd/issue41437c.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437c.dart.weak.transformed.expect
@@ -7,7 +7,7 @@
 //   yield* getStreamNull(); // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
 //  - 'Stream' is from 'dart:async'.
 // Stream<bool> test5() => getStreamNull(); // error
 //                         ^
@@ -17,7 +17,7 @@
 //     yield* getStreamNull(); // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+// pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
 //  - 'Stream' is from 'dart:async'.
 //   Stream<bool> test5() => getStreamNull(); // error
 //                           ^
@@ -191,7 +191,7 @@
   return :controller_stream;
 }
 static method test5() → asy::Stream<core::bool>
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
  - 'Stream' is from 'dart:async'.
 Stream<bool> test5() => getStreamNull(); // error
                         ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
@@ -322,7 +322,7 @@
           return :controller_stream;
         }
         function test5() → asy::Stream<core::bool>
-          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
+          return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
  - 'Stream' is from 'dart:async'.
   Stream<bool> test5() => getStreamNull(); // error
                           ^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41520.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41520.dart.textual_outline.expect
new file mode 100644
index 0000000..1abae43
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41520.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+void errors() {}
+void _takesObject(Object o) {}
+void _takesStackTrace(StackTrace o) {}
+void main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41520.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41520.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..10c705d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41520.dart.textual_outline_modelled.expect
@@ -0,0 +1,4 @@
+void _takesObject(Object o) {}
+void _takesStackTrace(StackTrace o) {}
+void errors() {}
+void main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41697.dart b/pkg/front_end/testcases/nnbd/issue41697.dart
index 726edd9..5c4ea86 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart
@@ -4,8 +4,8 @@
 
 import 'dart:async';
 
-typedef G<T> = void Function<S extends T>(S);
-typedef H<T> = void Function<S extends FutureOr<T>>(S, FutureOr<T>);
+typedef G<T> = dynamic Function<S extends T>(S);
+typedef H<T> = dynamic Function<S extends FutureOr<T>>(S, FutureOr<T>);
 // TODO(johnniwinther): Enable and use these when #41951 is fixed to test that
 //  updating self referencing type parameters works.
 //typedef I<T> = void Function<S extends FutureOr<S>>(S, T);
diff --git a/pkg/front_end/testcases/nnbd/issue41697.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.outline.expect
index f8add27..424dea6 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.outline.expect
@@ -4,12 +4,12 @@
 
 import "dart:async";
 
-typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → void;
-typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → void;
+typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → dynamic;
+typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → dynamic;
 class C<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → void field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2;
-  constructor •(<S extends self::C::T% = dynamic>(S%) → void field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2) → self::C<self::C::T%>
+  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  constructor •(<S extends self::C::T% = dynamic>(S%) → dynamic field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2) → self::C<self::C::T%>
     ;
 }
 static method test1(self::C<core::num> c) → dynamic
diff --git a/pkg/front_end/testcases/nnbd/issue41697.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.strong.expect
index 1d85ea2..f0b15fb 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.strong.expect
@@ -20,12 +20,12 @@
 
 import "dart:async";
 
-typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → void;
-typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → void;
+typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → dynamic;
+typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → dynamic;
 class C<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → void field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2;
-  constructor •(<S extends self::C::T% = dynamic>(S%) → void field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2) → self::C<self::C::T%>
+  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  constructor •(<S extends self::C::T% = dynamic>(S%) → dynamic field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2) → self::C<self::C::T%>
     : self::C::field1 = field1, self::C::field2 = field2, super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41697.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.strong.transformed.expect
index 6179e4f..3355e4f 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.strong.transformed.expect
@@ -21,12 +21,12 @@
 
 import "dart:async";
 
-typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → void;
-typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → void;
+typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → dynamic;
+typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → dynamic;
 class C<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → void field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2;
-  constructor •(<S extends self::C::T% = dynamic>(S%) → void field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2) → self::C<self::C::T%>
+  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  constructor •(<S extends self::C::T% = dynamic>(S%) → dynamic field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2) → self::C<self::C::T%>
     : self::C::field1 = field1, self::C::field2 = field2, super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41697.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.textual_outline.expect
index 12ddfd2..33eaf3e 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.textual_outline.expect
@@ -1,7 +1,7 @@
 import 'dart:async';
 
-typedef G<T> = void Function<S extends T>(S);
-typedef H<T> = void Function<S extends FutureOr<T>>(S, FutureOr<T>);
+typedef G<T> = dynamic Function<S extends T>(S);
+typedef H<T> = dynamic Function<S extends FutureOr<T>>(S, FutureOr<T>);
 
 class C<T> {
   G<T> field1;
diff --git a/pkg/front_end/testcases/nnbd/issue41697.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.textual_outline_modelled.expect
index 7db15d5..fccb4e7 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.textual_outline_modelled.expect
@@ -10,5 +10,5 @@
 test1(C<num> c) {}
 test2(C<num?> c) {}
 test3<S extends num?>(S s) => s + 1;
-typedef G<T> = void Function<S extends T>(S);
-typedef H<T> = void Function<S extends FutureOr<T>>(S, FutureOr<T>);
+typedef G<T> = dynamic Function<S extends T>(S);
+typedef H<T> = dynamic Function<S extends FutureOr<T>>(S, FutureOr<T>);
diff --git a/pkg/front_end/testcases/nnbd/issue41697.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.weak.expect
index 1d85ea2..f0b15fb 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.weak.expect
@@ -20,12 +20,12 @@
 
 import "dart:async";
 
-typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → void;
-typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → void;
+typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → dynamic;
+typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → dynamic;
 class C<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → void field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2;
-  constructor •(<S extends self::C::T% = dynamic>(S%) → void field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2) → self::C<self::C::T%>
+  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  constructor •(<S extends self::C::T% = dynamic>(S%) → dynamic field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2) → self::C<self::C::T%>
     : self::C::field1 = field1, self::C::field2 = field2, super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41697.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41697.dart.weak.transformed.expect
index 6179e4f..3355e4f 100644
--- a/pkg/front_end/testcases/nnbd/issue41697.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697.dart.weak.transformed.expect
@@ -21,12 +21,12 @@
 
 import "dart:async";
 
-typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → void;
-typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → void;
+typedef G<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>(S%) → dynamic;
+typedef H<invariant T extends core::Object? = dynamic> = <S extends FutureOr<T%> = dynamic>(S%, FutureOr<T%>) → dynamic;
 class C<T extends core::Object? = dynamic> extends core::Object {
-  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → void field1;
-  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2;
-  constructor •(<S extends self::C::T% = dynamic>(S%) → void field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → void field2) → self::C<self::C::T%>
+  generic-covariant-impl field <S extends self::C::T% = dynamic>(S%) → dynamic field1;
+  generic-covariant-impl field <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2;
+  constructor •(<S extends self::C::T% = dynamic>(S%) → dynamic field1, <S extends FutureOr<self::C::T%> = dynamic>(S%, FutureOr<self::C::T%>) → dynamic field2) → self::C<self::C::T%>
     : self::C::field1 = field1, self::C::field2 = field2, super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/nnbd/issue41697b.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41697b.dart.strong.expect
index 4be6607..e385e2e 100644
--- a/pkg/front_end/testcases/nnbd/issue41697b.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697b.dart.strong.expect
@@ -22,7 +22,7 @@
             ^" in s.{core::num::+}(1);
 }
 static method test3<S extends core::int = core::int>(self::test3::S s) → dynamic {
-  core::num t = s.{core::num::+}(1);
+  core::int t = s.{core::num::+}(1);
 }
 static method test4<S extends core::int? = core::int?>(self::test4::S% s) → dynamic {
   core::num t = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41697b.dart:18:13: Error: Operator '+' cannot be called on 'S' because it is potentially null.
diff --git a/pkg/front_end/testcases/nnbd/issue41697b.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41697b.dart.strong.transformed.expect
index 4be6607..e385e2e 100644
--- a/pkg/front_end/testcases/nnbd/issue41697b.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697b.dart.strong.transformed.expect
@@ -22,7 +22,7 @@
             ^" in s.{core::num::+}(1);
 }
 static method test3<S extends core::int = core::int>(self::test3::S s) → dynamic {
-  core::num t = s.{core::num::+}(1);
+  core::int t = s.{core::num::+}(1);
 }
 static method test4<S extends core::int? = core::int?>(self::test4::S% s) → dynamic {
   core::num t = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41697b.dart:18:13: Error: Operator '+' cannot be called on 'S' because it is potentially null.
diff --git a/pkg/front_end/testcases/nnbd/issue41697b.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41697b.dart.weak.expect
index 4be6607..e385e2e 100644
--- a/pkg/front_end/testcases/nnbd/issue41697b.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697b.dart.weak.expect
@@ -22,7 +22,7 @@
             ^" in s.{core::num::+}(1);
 }
 static method test3<S extends core::int = core::int>(self::test3::S s) → dynamic {
-  core::num t = s.{core::num::+}(1);
+  core::int t = s.{core::num::+}(1);
 }
 static method test4<S extends core::int? = core::int?>(self::test4::S% s) → dynamic {
   core::num t = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41697b.dart:18:13: Error: Operator '+' cannot be called on 'S' because it is potentially null.
diff --git a/pkg/front_end/testcases/nnbd/issue41697b.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41697b.dart.weak.transformed.expect
index 4be6607..e385e2e 100644
--- a/pkg/front_end/testcases/nnbd/issue41697b.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41697b.dart.weak.transformed.expect
@@ -22,7 +22,7 @@
             ^" in s.{core::num::+}(1);
 }
 static method test3<S extends core::int = core::int>(self::test3::S s) → dynamic {
-  core::num t = s.{core::num::+}(1);
+  core::int t = s.{core::num::+}(1);
 }
 static method test4<S extends core::int? = core::int?>(self::test4::S% s) → dynamic {
   core::num t = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41697b.dart:18:13: Error: Operator '+' cannot be called on 'S' because it is potentially null.
diff --git a/pkg/front_end/testcases/nnbd/issue41700a.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41700a.dart.textual_outline.expect
new file mode 100644
index 0000000..ec6b9e0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41700a.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41700a.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41700a.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..f67dbb0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41700a.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41700b.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41700b.dart.textual_outline.expect
new file mode 100644
index 0000000..54124f5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41700b.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+class Null {}
+
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41700b.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41700b.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..6684200
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41700b.dart.textual_outline_modelled.expect
@@ -0,0 +1,4 @@
+class Null {}
+
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42199.dart b/pkg/front_end/testcases/nnbd/issue42199.dart
new file mode 100644
index 0000000..92b4e35
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42199.dart
@@ -0,0 +1,9 @@
+// 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 A {
+  operator ==(dynamic other);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42199.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42199.dart.outline.expect
new file mode 100644
index 0000000..46b84b0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42199.dart.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+  abstract operator ==(dynamic other) → core::bool;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42199.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42199.dart.strong.expect
new file mode 100644
index 0000000..3ae4f33
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42199.dart.strong.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator ==(dynamic other) → core::bool;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42199.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42199.dart.strong.transformed.expect
new file mode 100644
index 0000000..3ae4f33
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42199.dart.strong.transformed.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator ==(dynamic other) → core::bool;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42199.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42199.dart.textual_outline.expect
new file mode 100644
index 0000000..d5032a7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42199.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class A {
+  operator ==(dynamic other);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42199.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42199.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..d5032a7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42199.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+class A {
+  operator ==(dynamic other);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42199.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42199.dart.weak.expect
new file mode 100644
index 0000000..3ae4f33
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42199.dart.weak.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator ==(dynamic other) → core::bool;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42199.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42199.dart.weak.transformed.expect
new file mode 100644
index 0000000..3ae4f33
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42199.dart.weak.transformed.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  abstract operator ==(dynamic other) → core::bool;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart b/pkg/front_end/testcases/nnbd/issue42433.dart
new file mode 100644
index 0000000..4d3d4ed
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42433.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.
+
+class X {}
+
+checkme<T extends X>(T? t) {}
+typedef Test<T extends X>(T? t);
+
+main() {
+  Test<X> t2 = checkme;
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.outline.expect
new file mode 100644
index 0000000..3c8de2a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.outline.expect
@@ -0,0 +1,13 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef Test<contravariant T extends self::X = self::X> = (T?) → dynamic;
+class X extends core::Object {
+  synthetic constructor •() → self::X
+    ;
+}
+static method checkme<T extends self::X = self::X>(self::checkme::T? t) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.strong.expect
new file mode 100644
index 0000000..db8fd3e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.strong.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef Test<contravariant T extends self::X = self::X> = (T?) → dynamic;
+class X extends core::Object {
+  synthetic constructor •() → self::X
+    : super core::Object::•()
+    ;
+}
+static method checkme<T extends self::X = self::X>(self::checkme::T? t) → dynamic {}
+static method main() → dynamic {
+  (self::X?) → dynamic t2 = #C1<self::X>;
+}
+
+constants  {
+  #C1 = tearoff self::checkme
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.strong.transformed.expect
new file mode 100644
index 0000000..db8fd3e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.strong.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef Test<contravariant T extends self::X = self::X> = (T?) → dynamic;
+class X extends core::Object {
+  synthetic constructor •() → self::X
+    : super core::Object::•()
+    ;
+}
+static method checkme<T extends self::X = self::X>(self::checkme::T? t) → dynamic {}
+static method main() → dynamic {
+  (self::X?) → dynamic t2 = #C1<self::X>;
+}
+
+constants  {
+  #C1 = tearoff self::checkme
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.textual_outline.expect
new file mode 100644
index 0000000..b3831cf
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+class X {}
+
+checkme<T extends X>(T? t) {}
+typedef Test<T extends X>(T? t);
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..4c84bdf
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+checkme<T extends X>(T? t) {}
+
+class X {}
+
+main() {}
+typedef Test<T extends X>(T? t);
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.weak.expect
new file mode 100644
index 0000000..db8fd3e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.weak.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef Test<contravariant T extends self::X = self::X> = (T?) → dynamic;
+class X extends core::Object {
+  synthetic constructor •() → self::X
+    : super core::Object::•()
+    ;
+}
+static method checkme<T extends self::X = self::X>(self::checkme::T? t) → dynamic {}
+static method main() → dynamic {
+  (self::X?) → dynamic t2 = #C1<self::X>;
+}
+
+constants  {
+  #C1 = tearoff self::checkme
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.weak.transformed.expect
new file mode 100644
index 0000000..db8fd3e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.weak.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef Test<contravariant T extends self::X = self::X> = (T?) → dynamic;
+class X extends core::Object {
+  synthetic constructor •() → self::X
+    : super core::Object::•()
+    ;
+}
+static method checkme<T extends self::X = self::X>(self::checkme::T? t) → dynamic {}
+static method main() → dynamic {
+  (self::X?) → dynamic t2 = #C1<self::X>;
+}
+
+constants  {
+  #C1 = tearoff self::checkme
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42459.dart b/pkg/front_end/testcases/nnbd/issue42459.dart
new file mode 100644
index 0000000..71e71e0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42459.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.
+
+test() {
+  (x) {
+    if (x) {
+      return 1;
+    } else {
+      return;
+    }
+  };
+
+  void local(x) {
+    if (x) {
+      return print('');
+    } else {
+      return;
+    }
+  }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42459.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42459.dart.outline.expect
new file mode 100644
index 0000000..64923de
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42459.dart.outline.expect
@@ -0,0 +1,7 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42459.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42459.dart.strong.expect
new file mode 100644
index 0000000..640dbba
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42459.dart.strong.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
+//       return;
+//       ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → dynamic {
+  (dynamic x) → core::int? {
+    if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+      return 1;
+    }
+    else {
+      return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
+      return;
+      ^" in null;
+    }
+  };
+  function local(dynamic x) → void {
+    if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+      return core::print("");
+    }
+    else {
+      return;
+    }
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42459.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42459.dart.strong.transformed.expect
new file mode 100644
index 0000000..640dbba
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42459.dart.strong.transformed.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
+//       return;
+//       ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → dynamic {
+  (dynamic x) → core::int? {
+    if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+      return 1;
+    }
+    else {
+      return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
+      return;
+      ^" in null;
+    }
+  };
+  function local(dynamic x) → void {
+    if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+      return core::print("");
+    }
+    else {
+      return;
+    }
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42459.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42459.dart.textual_outline.expect
new file mode 100644
index 0000000..ec6b9e0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42459.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42459.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42459.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..f67dbb0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42459.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42459.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42459.dart.weak.expect
new file mode 100644
index 0000000..640dbba
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42459.dart.weak.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
+//       return;
+//       ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → dynamic {
+  (dynamic x) → core::int? {
+    if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+      return 1;
+    }
+    else {
+      return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
+      return;
+      ^" in null;
+    }
+  };
+  function local(dynamic x) → void {
+    if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+      return core::print("");
+    }
+    else {
+      return;
+    }
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42459.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42459.dart.weak.transformed.expect
new file mode 100644
index 0000000..640dbba
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42459.dart.weak.transformed.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
+//       return;
+//       ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test() → dynamic {
+  (dynamic x) → core::int? {
+    if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+      return 1;
+    }
+    else {
+      return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
+      return;
+      ^" in null;
+    }
+  };
+  function local(dynamic x) → void {
+    if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
+      return core::print("");
+    }
+    else {
+      return;
+    }
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42540.dart b/pkg/front_end/testcases/nnbd/issue42540.dart
new file mode 100644
index 0000000..92a2d76
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42540.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.
+
+dynamic getNull() => null;
+
+Future<Object> fn() async {
+  Object o = await getNull();
+  return await getNull();
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42540.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42540.dart.outline.expect
new file mode 100644
index 0000000..51057a4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42540.dart.outline.expect
@@ -0,0 +1,11 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method getNull() → dynamic
+  ;
+static method fn() → asy::Future<core::Object> async 
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42540.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42540.dart.strong.expect
new file mode 100644
index 0000000..aaf931d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42540.dart.strong.expect
@@ -0,0 +1,12 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method getNull() → dynamic
+  return null;
+static method fn() → asy::Future<core::Object> async {
+  core::Object o = await self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::Object;
+  return await self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::Object>;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42540.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42540.dart.strong.transformed.expect
new file mode 100644
index 0000000..5fbd656
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42540.dart.strong.transformed.expect
@@ -0,0 +1,39 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method getNull() → dynamic
+  return null;
+static method fn() → asy::Future<core::Object> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<core::Object> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Object>();
+  FutureOr<core::Object>? :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(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+        core::Object o = let dynamic #t2 = :result in #t2.==(null) ?{core::Object} #t2 as{TypeError,ForDynamic,ForNonNullableByDefault} core::Object : #t2{core::Object};
+        [yield] let dynamic #t3 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+        :return_value = let dynamic #t4 = :result in #t4.==(null) ?{FutureOr<core::Object>} #t4 as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::Object> : #t4{FutureOr<core::Object>};
+        break #L1;
+      }
+      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/issue42540.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42540.dart.textual_outline.expect
new file mode 100644
index 0000000..326ff56
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42540.dart.textual_outline.expect
@@ -0,0 +1,3 @@
+dynamic getNull() => null;
+Future<Object> fn() async {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42540.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42540.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..a6184d9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42540.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@
+Future<Object> fn() async {}
+dynamic getNull() => null;
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42540.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42540.dart.weak.expect
new file mode 100644
index 0000000..aaf931d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42540.dart.weak.expect
@@ -0,0 +1,12 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method getNull() → dynamic
+  return null;
+static method fn() → asy::Future<core::Object> async {
+  core::Object o = await self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::Object;
+  return await self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::Object>;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42540.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42540.dart.weak.transformed.expect
new file mode 100644
index 0000000..ae9a451
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42540.dart.weak.transformed.expect
@@ -0,0 +1,39 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method getNull() → dynamic
+  return null;
+static method fn() → asy::Future<core::Object> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<core::Object> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Object>();
+  FutureOr<core::Object>? :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(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+        core::Object o = :result;
+        [yield] let dynamic #t2 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+        :return_value = :result;
+        break #L1;
+      }
+      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/issue42546.dart b/pkg/front_end/testcases/nnbd/issue42546.dart
new file mode 100644
index 0000000..42ccf0c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42546.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.
+
+// Based on tests/language/unsorted/flatten_test/12
+
+import 'dart:async';
+
+class Divergent<T> implements Future<Divergent<Divergent<T>>> {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+test() async {
+  Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())();
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42546.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.outline.expect
new file mode 100644
index 0000000..0f8217b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.outline.expect
@@ -0,0 +1,31 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+import "dart:async";
+
+class Divergent<T extends core::Object? = dynamic> extends core::Object implements asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>> {
+  synthetic constructor •() → self::Divergent<self::Divergent::T%>
+    ;
+  method noSuchMethod(core::Invocation invocation) → dynamic
+    ;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ catchError(core::Function onError, {(core::Object) →? core::bool test = #C1}) → asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#test: test}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → FutureOr<void>action) → asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () →? FutureOr<self::Divergent<self::Divergent<self::Divergent::T%>>>onTimeout = #C1}) → asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::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,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ then<R extends core::Object? = dynamic>((self::Divergent<self::Divergent<self::Divergent::T%>>) → FutureOr<self::Divergent::then::R%>onValue, {core::Function? onError = #C1}) → asy::Future<self::Divergent::then::R%>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#then, 0, core::List::unmodifiable<core::Type*>(<core::Type*>[self::Divergent::then::R%]), core::List::unmodifiable<dynamic>(<dynamic>[onValue]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onError: onError}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent::then::R%>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+}
+static method test() → dynamic async 
+  ;
+static method main() → dynamic
+  ;
+
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42546.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.strong.expect
new file mode 100644
index 0000000..e5372a7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.strong.expect
@@ -0,0 +1,66 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42546.dart:14:58: Error: A value of type 'Divergent<int>' can't be returned from an async function with return type 'Future<Divergent<Divergent<Divergent<int>>>>'.
+//  - 'Divergent' is from 'pkg/front_end/testcases/nnbd/issue42546.dart'.
+//  - 'Future' is from 'dart:async'.
+//   Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())();
+//                                                          ^
+//
+// pkg/front_end/testcases/nnbd/issue42546.dart:14:75: Error: A value of type 'Future<Divergent<Divergent<Divergent<int>>>>' can't be assigned to a variable of type 'Future<Divergent<Divergent<int>>>'.
+//  - 'Future' is from 'dart:async'.
+//  - 'Divergent' is from 'pkg/front_end/testcases/nnbd/issue42546.dart'.
+//   Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())();
+//                                                                           ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+import "dart:async";
+
+class Divergent<T extends core::Object? = dynamic> extends core::Object implements asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>> {
+  synthetic constructor •() → self::Divergent<self::Divergent::T%>
+    : super core::Object::•()
+    ;
+  method noSuchMethod(core::Invocation invocation) → dynamic
+    return super.{core::Object::noSuchMethod}(invocation);
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ catchError(core::Function onError, {(core::Object) →? core::bool test = #C1}) → asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → FutureOr<void>action) → asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () →? FutureOr<self::Divergent<self::Divergent<self::Divergent::T%>>>onTimeout = #C1}) → asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C9: onTimeout}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ then<R extends core::Object? = dynamic>((self::Divergent<self::Divergent<self::Divergent::T%>>) → FutureOr<self::Divergent::then::R%>onValue, {core::Function? onError = #C1}) → asy::Future<self::Divergent::then::R%>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C10, 0, core::List::unmodifiable<core::Type*>(<core::Type*>[self::Divergent::then::R%]), core::List::unmodifiable<dynamic>(<dynamic>[onValue]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C11: onError}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent::then::R%>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+}
+static method test() → dynamic async {
+  asy::Future<self::Divergent<self::Divergent<core::int>>> x = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42546.dart:14:75: Error: A value of type 'Future<Divergent<Divergent<Divergent<int>>>>' can't be assigned to a variable of type 'Future<Divergent<Divergent<int>>>'.
+ - 'Future' is from 'dart:async'.
+ - 'Divergent' is from 'pkg/front_end/testcases/nnbd/issue42546.dart'.
+  Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())();
+                                                                          ^" in (() → asy::Future<self::Divergent<self::Divergent<self::Divergent<core::int>>>> async => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue42546.dart:14:58: Error: A value of type 'Divergent<int>' can't be returned from an async function with return type 'Future<Divergent<Divergent<Divergent<int>>>>'.
+ - 'Divergent' is from 'pkg/front_end/testcases/nnbd/issue42546.dart'.
+ - 'Future' is from 'dart:async'.
+  Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())();
+                                                         ^" in new self::Divergent::•<core::int>() as{TypeError,ForNonNullableByDefault} self::Divergent<self::Divergent<self::Divergent<core::int>>>).call() as{TypeError,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<core::int>>>;
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = null
+  #C2 = #catchError
+  #C3 = <core::Type*>[]
+  #C4 = #test
+  #C5 = #whenComplete
+  #C6 = <dynamic>[]
+  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
+  #C8 = #timeout
+  #C9 = #onTimeout
+  #C10 = #then
+  #C11 = #onError
+  #C12 = #asStream
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42546.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.textual_outline.expect
new file mode 100644
index 0000000..0303360
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+import 'dart:async';
+
+class Divergent<T> implements Future<Divergent<Divergent<T>>> {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+test() async {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42546.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..5198cb8
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+import 'dart:async';
+
+class Divergent<T> implements Future<Divergent<Divergent<T>>> {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+main() {}
+test() async {}
diff --git a/pkg/front_end/testcases/nnbd/issue42546.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42546.dart.weak.expect
new file mode 100644
index 0000000..e5372a7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42546.dart.weak.expect
@@ -0,0 +1,66 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42546.dart:14:58: Error: A value of type 'Divergent<int>' can't be returned from an async function with return type 'Future<Divergent<Divergent<Divergent<int>>>>'.
+//  - 'Divergent' is from 'pkg/front_end/testcases/nnbd/issue42546.dart'.
+//  - 'Future' is from 'dart:async'.
+//   Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())();
+//                                                          ^
+//
+// pkg/front_end/testcases/nnbd/issue42546.dart:14:75: Error: A value of type 'Future<Divergent<Divergent<Divergent<int>>>>' can't be assigned to a variable of type 'Future<Divergent<Divergent<int>>>'.
+//  - 'Future' is from 'dart:async'.
+//  - 'Divergent' is from 'pkg/front_end/testcases/nnbd/issue42546.dart'.
+//   Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())();
+//                                                                           ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+import "dart:async";
+
+class Divergent<T extends core::Object? = dynamic> extends core::Object implements asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>> {
+  synthetic constructor •() → self::Divergent<self::Divergent::T%>
+    : super core::Object::•()
+    ;
+  method noSuchMethod(core::Invocation invocation) → dynamic
+    return super.{core::Object::noSuchMethod}(invocation);
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ catchError(core::Function onError, {(core::Object) →? core::bool test = #C1}) → asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C4: test}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → FutureOr<void>action) → asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () →? FutureOr<self::Divergent<self::Divergent<self::Divergent::T%>>>onTimeout = #C1}) → asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C8, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C9: onTimeout}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ then<R extends core::Object? = dynamic>((self::Divergent<self::Divergent<self::Divergent::T%>>) → FutureOr<self::Divergent::then::R%>onValue, {core::Function? onError = #C1}) → asy::Future<self::Divergent::then::R%>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C10, 0, core::List::unmodifiable<core::Type*>(<core::Type*>[self::Divergent::then::R%]), core::List::unmodifiable<dynamic>(<dynamic>[onValue]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#C11: onError}))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<self::Divergent::then::R%>;
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>
+    return this.{self::Divergent::noSuchMethod}(new core::_InvocationMirror::_withType(#C12, 0, #C3, #C6, core::Map::unmodifiable<core::Symbol*, dynamic>(#C7))) as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<self::Divergent<self::Divergent<self::Divergent::T%>>>;
+}
+static method test() → dynamic async {
+  asy::Future<self::Divergent<self::Divergent<core::int>>> x = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42546.dart:14:75: Error: A value of type 'Future<Divergent<Divergent<Divergent<int>>>>' can't be assigned to a variable of type 'Future<Divergent<Divergent<int>>>'.
+ - 'Future' is from 'dart:async'.
+ - 'Divergent' is from 'pkg/front_end/testcases/nnbd/issue42546.dart'.
+  Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())();
+                                                                          ^" in (() → asy::Future<self::Divergent<self::Divergent<self::Divergent<core::int>>>> async => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue42546.dart:14:58: Error: A value of type 'Divergent<int>' can't be returned from an async function with return type 'Future<Divergent<Divergent<Divergent<int>>>>'.
+ - 'Divergent' is from 'pkg/front_end/testcases/nnbd/issue42546.dart'.
+ - 'Future' is from 'dart:async'.
+  Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())();
+                                                         ^" in new self::Divergent::•<core::int>() as{TypeError,ForNonNullableByDefault} self::Divergent<self::Divergent<self::Divergent<core::int>>>).call() as{TypeError,ForNonNullableByDefault} asy::Future<self::Divergent<self::Divergent<core::int>>>;
+}
+static method main() → dynamic {}
+
+constants  {
+  #C1 = null
+  #C2 = #catchError
+  #C3 = <core::Type*>[]
+  #C4 = #test
+  #C5 = #whenComplete
+  #C6 = <dynamic>[]
+  #C7 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C6}
+  #C8 = #timeout
+  #C9 = #onTimeout
+  #C10 = #then
+  #C11 = #onError
+  #C12 = #asStream
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42579.dart b/pkg/front_end/testcases/nnbd/issue42579.dart
new file mode 100644
index 0000000..2541b06
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579.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.
+
+class A<T> {}
+
+S foo<S>() => throw "foo";
+
+bar<R>(A<R> a) {}
+
+baz() => bar(foo());
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42579.dart.outline.expect
new file mode 100644
index 0000000..226d626
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579.dart.outline.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    ;
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  ;
+static method bar<R extends core::Object? = dynamic>(self::A<self::bar::R%> a) → dynamic
+  ;
+static method baz() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42579.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42579.dart.strong.expect
new file mode 100644
index 0000000..6ee7128
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579.dart.strong.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    : super core::Object::•()
+    ;
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  return throw "foo";
+static method bar<R extends core::Object? = dynamic>(self::A<self::bar::R%> a) → dynamic {}
+static method baz() → dynamic
+  return self::bar<core::Object?>(self::foo<self::A<core::Object?>>());
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42579.dart.strong.transformed.expect
new file mode 100644
index 0000000..6ee7128
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579.dart.strong.transformed.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    : super core::Object::•()
+    ;
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  return throw "foo";
+static method bar<R extends core::Object? = dynamic>(self::A<self::bar::R%> a) → dynamic {}
+static method baz() → dynamic
+  return self::bar<core::Object?>(self::foo<self::A<core::Object?>>());
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42579.dart.weak.expect
new file mode 100644
index 0000000..6ee7128
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579.dart.weak.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    : super core::Object::•()
+    ;
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  return throw "foo";
+static method bar<R extends core::Object? = dynamic>(self::A<self::bar::R%> a) → dynamic {}
+static method baz() → dynamic
+  return self::bar<core::Object?>(self::foo<self::A<core::Object?>>());
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42579.dart.weak.transformed.expect
new file mode 100644
index 0000000..6ee7128
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579.dart.weak.transformed.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    : super core::Object::•()
+    ;
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  return throw "foo";
+static method bar<R extends core::Object? = dynamic>(self::A<self::bar::R%> a) → dynamic {}
+static method baz() → dynamic
+  return self::bar<core::Object?>(self::foo<self::A<core::Object?>>());
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_2.dart b/pkg/front_end/testcases/nnbd/issue42579_2.dart
new file mode 100644
index 0000000..2624bf7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_2.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.
+
+class A<T> {
+  T get property => throw "A.property";
+}
+
+S foo<S>() => throw "foo";
+
+wrap<R>(R Function() f) {}
+
+wrap2<R>(A<R> Function() f) {}
+
+bar() {
+  A().property.unknown();
+  foo().unknown();
+  wrap(() => foo()..unknown());
+  wrap2(() => foo()..property?.unknown());
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_2.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42579_2.dart.outline.expect
new file mode 100644
index 0000000..8ef9e6d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_2.dart.outline.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    ;
+  get property() → self::A::T%
+    ;
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  ;
+static method wrap<R extends core::Object? = dynamic>(() → self::wrap::R% f) → dynamic
+  ;
+static method wrap2<R extends core::Object? = dynamic>(() → self::A<self::wrap2::R%> f) → dynamic
+  ;
+static method bar() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42579_2.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42579_2.dart.strong.expect
new file mode 100644
index 0000000..922a2af
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_2.dart.strong.expect
@@ -0,0 +1,39 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42579_2.dart:19:32: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   wrap2(() => foo()..property?.unknown());
+//                                ^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    : super core::Object::•()
+    ;
+  get property() → self::A::T%
+    return throw "A.property";
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  return throw "foo";
+static method wrap<R extends core::Object? = dynamic>(() → self::wrap::R% f) → dynamic {}
+static method wrap2<R extends core::Object? = dynamic>(() → self::A<self::wrap2::R%> f) → dynamic {}
+static method bar() → dynamic {
+  new self::A::•<dynamic>().{self::A::property}.unknown();
+  self::foo<dynamic>().unknown();
+  self::wrap<dynamic>(() → dynamic => let final dynamic #t1 = self::foo<dynamic>() in block {
+    #t1.unknown();
+  } =>#t1);
+  self::wrap2<core::Object?>(() → self::A<core::Object?> => let final self::A<core::Object?> #t2 = self::foo<self::A<core::Object?>>() in block {
+    let final core::Object? #t3 = #t2.{self::A::property} in #t3.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_2.dart:19:32: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  wrap2(() => foo()..property?.unknown());
+                               ^^^^^^^";
+  } =>#t2);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_2.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42579_2.dart.strong.transformed.expect
new file mode 100644
index 0000000..922a2af
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_2.dart.strong.transformed.expect
@@ -0,0 +1,39 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42579_2.dart:19:32: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   wrap2(() => foo()..property?.unknown());
+//                                ^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    : super core::Object::•()
+    ;
+  get property() → self::A::T%
+    return throw "A.property";
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  return throw "foo";
+static method wrap<R extends core::Object? = dynamic>(() → self::wrap::R% f) → dynamic {}
+static method wrap2<R extends core::Object? = dynamic>(() → self::A<self::wrap2::R%> f) → dynamic {}
+static method bar() → dynamic {
+  new self::A::•<dynamic>().{self::A::property}.unknown();
+  self::foo<dynamic>().unknown();
+  self::wrap<dynamic>(() → dynamic => let final dynamic #t1 = self::foo<dynamic>() in block {
+    #t1.unknown();
+  } =>#t1);
+  self::wrap2<core::Object?>(() → self::A<core::Object?> => let final self::A<core::Object?> #t2 = self::foo<self::A<core::Object?>>() in block {
+    let final core::Object? #t3 = #t2.{self::A::property} in #t3.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_2.dart:19:32: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  wrap2(() => foo()..property?.unknown());
+                               ^^^^^^^";
+  } =>#t2);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_2.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42579_2.dart.weak.expect
new file mode 100644
index 0000000..922a2af
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_2.dart.weak.expect
@@ -0,0 +1,39 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42579_2.dart:19:32: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   wrap2(() => foo()..property?.unknown());
+//                                ^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    : super core::Object::•()
+    ;
+  get property() → self::A::T%
+    return throw "A.property";
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  return throw "foo";
+static method wrap<R extends core::Object? = dynamic>(() → self::wrap::R% f) → dynamic {}
+static method wrap2<R extends core::Object? = dynamic>(() → self::A<self::wrap2::R%> f) → dynamic {}
+static method bar() → dynamic {
+  new self::A::•<dynamic>().{self::A::property}.unknown();
+  self::foo<dynamic>().unknown();
+  self::wrap<dynamic>(() → dynamic => let final dynamic #t1 = self::foo<dynamic>() in block {
+    #t1.unknown();
+  } =>#t1);
+  self::wrap2<core::Object?>(() → self::A<core::Object?> => let final self::A<core::Object?> #t2 = self::foo<self::A<core::Object?>>() in block {
+    let final core::Object? #t3 = #t2.{self::A::property} in #t3.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_2.dart:19:32: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  wrap2(() => foo()..property?.unknown());
+                               ^^^^^^^";
+  } =>#t2);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_2.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42579_2.dart.weak.transformed.expect
new file mode 100644
index 0000000..922a2af
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_2.dart.weak.transformed.expect
@@ -0,0 +1,39 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42579_2.dart:19:32: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   wrap2(() => foo()..property?.unknown());
+//                                ^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::T%>
+    : super core::Object::•()
+    ;
+  get property() → self::A::T%
+    return throw "A.property";
+}
+static method foo<S extends core::Object? = dynamic>() → self::foo::S%
+  return throw "foo";
+static method wrap<R extends core::Object? = dynamic>(() → self::wrap::R% f) → dynamic {}
+static method wrap2<R extends core::Object? = dynamic>(() → self::A<self::wrap2::R%> f) → dynamic {}
+static method bar() → dynamic {
+  new self::A::•<dynamic>().{self::A::property}.unknown();
+  self::foo<dynamic>().unknown();
+  self::wrap<dynamic>(() → dynamic => let final dynamic #t1 = self::foo<dynamic>() in block {
+    #t1.unknown();
+  } =>#t1);
+  self::wrap2<core::Object?>(() → self::A<core::Object?> => let final self::A<core::Object?> #t2 = self::foo<self::A<core::Object?>>() in block {
+    let final core::Object? #t3 = #t2.{self::A::property} in #t3.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_2.dart:19:32: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  wrap2(() => foo()..property?.unknown());
+                               ^^^^^^^";
+  } =>#t2);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_3.dart b/pkg/front_end/testcases/nnbd/issue42579_3.dart
new file mode 100644
index 0000000..0eb607f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_3.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.
+
+class A<X> {}
+
+class B<Y1, Y2 extends List<Y3>, Y3> extends A<Y1> {
+  Y1 get y1 => throw "B.y1";
+  Y2 get y2 => throw "B.y2";
+  Y3 get y3 => throw "B.y3";
+}
+
+foo<Z>(A<List<Z>> Function() f) {}
+
+bar() {
+  foo(() => B()..y1[0]?.unknown());
+  foo(() => B()..y2[0]?.unknown());
+  foo(() => B()..y3?.unknown());
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_3.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42579_3.dart.outline.expect
new file mode 100644
index 0000000..51b67d5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_3.dart.outline.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X%>
+    ;
+}
+class B<Y1 extends core::Object? = dynamic, Y2 extends core::List<self::B::Y3%> = core::List<dynamic>, Y3 extends core::Object? = dynamic> extends self::A<self::B::Y1%> {
+  synthetic constructor •() → self::B<self::B::Y1%, self::B::Y2, self::B::Y3%>
+    ;
+  get y1() → self::B::Y1%
+    ;
+  get y2() → self::B::Y2
+    ;
+  get y3() → self::B::Y3%
+    ;
+}
+static method foo<Z extends core::Object? = dynamic>(() → self::A<core::List<self::foo::Z%>> f) → dynamic
+  ;
+static method bar() → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42579_3.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42579_3.dart.strong.expect
new file mode 100644
index 0000000..9c59159
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_3.dart.strong.expect
@@ -0,0 +1,56 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42579_3.dart:16:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   foo(() => B()..y1[0]?.unknown());
+//                         ^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/issue42579_3.dart:17:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   foo(() => B()..y2[0]?.unknown());
+//                         ^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X%>
+    : super core::Object::•()
+    ;
+}
+class B<Y1 extends core::Object? = dynamic, Y2 extends core::List<self::B::Y3%> = core::List<dynamic>, Y3 extends core::Object? = dynamic> extends self::A<self::B::Y1%> {
+  synthetic constructor •() → self::B<self::B::Y1%, self::B::Y2, self::B::Y3%>
+    : super self::A::•()
+    ;
+  get y1() → self::B::Y1%
+    return throw "B.y1";
+  get y2() → self::B::Y2
+    return throw "B.y2";
+  get y3() → self::B::Y3%
+    return throw "B.y3";
+}
+static method foo<Z extends core::Object? = dynamic>(() → self::A<core::List<self::foo::Z%>> f) → dynamic {}
+static method bar() → dynamic {
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t1 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final core::Object? #t2 = #t1.{self::B::y1}.{core::List::[]}(0) in #t2.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_3.dart:16:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  foo(() => B()..y1[0]?.unknown());
+                        ^^^^^^^";
+  } =>#t1);
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t3 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final core::Object? #t4 = #t3.{self::B::y2}.{core::List::[]}(0) in #t4.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_3.dart:17:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  foo(() => B()..y2[0]?.unknown());
+                        ^^^^^^^";
+  } =>#t3);
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t5 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final dynamic #t6 = #t5.{self::B::y3} in #t6.{core::Object::==}(null) ?{dynamic} null : #t6.unknown();
+  } =>#t5);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_3.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42579_3.dart.strong.transformed.expect
new file mode 100644
index 0000000..9c59159
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_3.dart.strong.transformed.expect
@@ -0,0 +1,56 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42579_3.dart:16:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   foo(() => B()..y1[0]?.unknown());
+//                         ^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/issue42579_3.dart:17:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   foo(() => B()..y2[0]?.unknown());
+//                         ^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X%>
+    : super core::Object::•()
+    ;
+}
+class B<Y1 extends core::Object? = dynamic, Y2 extends core::List<self::B::Y3%> = core::List<dynamic>, Y3 extends core::Object? = dynamic> extends self::A<self::B::Y1%> {
+  synthetic constructor •() → self::B<self::B::Y1%, self::B::Y2, self::B::Y3%>
+    : super self::A::•()
+    ;
+  get y1() → self::B::Y1%
+    return throw "B.y1";
+  get y2() → self::B::Y2
+    return throw "B.y2";
+  get y3() → self::B::Y3%
+    return throw "B.y3";
+}
+static method foo<Z extends core::Object? = dynamic>(() → self::A<core::List<self::foo::Z%>> f) → dynamic {}
+static method bar() → dynamic {
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t1 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final core::Object? #t2 = #t1.{self::B::y1}.{core::List::[]}(0) in #t2.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_3.dart:16:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  foo(() => B()..y1[0]?.unknown());
+                        ^^^^^^^";
+  } =>#t1);
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t3 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final core::Object? #t4 = #t3.{self::B::y2}.{core::List::[]}(0) in #t4.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_3.dart:17:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  foo(() => B()..y2[0]?.unknown());
+                        ^^^^^^^";
+  } =>#t3);
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t5 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final dynamic #t6 = #t5.{self::B::y3} in #t6.{core::Object::==}(null) ?{dynamic} null : #t6.unknown();
+  } =>#t5);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_3.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42579_3.dart.weak.expect
new file mode 100644
index 0000000..9c59159
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_3.dart.weak.expect
@@ -0,0 +1,56 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42579_3.dart:16:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   foo(() => B()..y1[0]?.unknown());
+//                         ^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/issue42579_3.dart:17:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   foo(() => B()..y2[0]?.unknown());
+//                         ^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X%>
+    : super core::Object::•()
+    ;
+}
+class B<Y1 extends core::Object? = dynamic, Y2 extends core::List<self::B::Y3%> = core::List<dynamic>, Y3 extends core::Object? = dynamic> extends self::A<self::B::Y1%> {
+  synthetic constructor •() → self::B<self::B::Y1%, self::B::Y2, self::B::Y3%>
+    : super self::A::•()
+    ;
+  get y1() → self::B::Y1%
+    return throw "B.y1";
+  get y2() → self::B::Y2
+    return throw "B.y2";
+  get y3() → self::B::Y3%
+    return throw "B.y3";
+}
+static method foo<Z extends core::Object? = dynamic>(() → self::A<core::List<self::foo::Z%>> f) → dynamic {}
+static method bar() → dynamic {
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t1 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final core::Object? #t2 = #t1.{self::B::y1}.{core::List::[]}(0) in #t2.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_3.dart:16:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  foo(() => B()..y1[0]?.unknown());
+                        ^^^^^^^";
+  } =>#t1);
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t3 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final core::Object? #t4 = #t3.{self::B::y2}.{core::List::[]}(0) in #t4.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_3.dart:17:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  foo(() => B()..y2[0]?.unknown());
+                        ^^^^^^^";
+  } =>#t3);
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t5 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final dynamic #t6 = #t5.{self::B::y3} in #t6.{core::Object::==}(null) ?{dynamic} null : #t6.unknown();
+  } =>#t5);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42579_3.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42579_3.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c59159
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42579_3.dart.weak.transformed.expect
@@ -0,0 +1,56 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42579_3.dart:16:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   foo(() => B()..y1[0]?.unknown());
+//                         ^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/issue42579_3.dart:17:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+//  - 'Object' is from 'dart:core'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+//   foo(() => B()..y2[0]?.unknown());
+//                         ^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X%>
+    : super core::Object::•()
+    ;
+}
+class B<Y1 extends core::Object? = dynamic, Y2 extends core::List<self::B::Y3%> = core::List<dynamic>, Y3 extends core::Object? = dynamic> extends self::A<self::B::Y1%> {
+  synthetic constructor •() → self::B<self::B::Y1%, self::B::Y2, self::B::Y3%>
+    : super self::A::•()
+    ;
+  get y1() → self::B::Y1%
+    return throw "B.y1";
+  get y2() → self::B::Y2
+    return throw "B.y2";
+  get y3() → self::B::Y3%
+    return throw "B.y3";
+}
+static method foo<Z extends core::Object? = dynamic>(() → self::A<core::List<self::foo::Z%>> f) → dynamic {}
+static method bar() → dynamic {
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t1 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final core::Object? #t2 = #t1.{self::B::y1}.{core::List::[]}(0) in #t2.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_3.dart:16:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  foo(() => B()..y1[0]?.unknown());
+                        ^^^^^^^";
+  } =>#t1);
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t3 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final core::Object? #t4 = #t3.{self::B::y2}.{core::List::[]}(0) in #t4.{core::Object::==}(null) ?{dynamic} null : invalid-expression "pkg/front_end/testcases/nnbd/issue42579_3.dart:17:25: Error: The method 'unknown' isn't defined for the class 'Object'.
+ - 'Object' is from 'dart:core'.
+Try correcting the name to the name of an existing method, or defining a method named 'unknown'.
+  foo(() => B()..y2[0]?.unknown());
+                        ^^^^^^^";
+  } =>#t3);
+  self::foo<core::Object?>(() → self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> => let final self::B<core::List<core::Object?>, core::List<core::Object?>, dynamic> #t5 = new self::B::•<core::List<core::Object?>, core::List<core::Object?>, dynamic>() in block {
+    let final dynamic #t6 = #t5.{self::B::y3} in #t6.{core::Object::==}(null) ?{dynamic} null : #t6.unknown();
+  } =>#t5);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42603.dart b/pkg/front_end/testcases/nnbd/issue42603.dart
new file mode 100644
index 0000000..26b7215
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42603.dart
@@ -0,0 +1,33 @@
+// 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 C {
+  bool operator ==(Object other) => true;
+}
+
+class D extends C {
+  bool operator ==(Object? other) => super == other;
+
+  bool method1(dynamic o) => super == o;
+
+  bool method2(Null o) => super == o;
+}
+
+class E {
+  bool operator ==() => true;
+}
+
+class F extends E {
+  bool operator ==(Object? other) => super == other;
+}
+
+main() {
+  expect(true, D() == D());
+  expect(false, D().method1(null));
+  expect(false, D().method2(null));
+}
+
+expect(expected, actual) {
+  if (expected != actual) throw 'Expected $expected, actual $actual';
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42603.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42603.dart.outline.expect
new file mode 100644
index 0000000..384e012
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42603.dart.outline.expect
@@ -0,0 +1,57 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:18:17: Error: Operator '==' should have exactly one parameter.
+//   bool operator ==() => true;
+//                 ^^
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:18:17: Error: The method 'E.==' has fewer positional arguments than those of overridden method 'Object.=='.
+//   bool operator ==() => true;
+//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:22:17: Error: The method 'F.==' has more required arguments than those of overridden method 'E.=='.
+//   bool operator ==(Object? other) => super == other;
+//                 ^
+// pkg/front_end/testcases/nnbd/issue42603.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==() => true;
+//                 ^
+//
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    ;
+  operator ==(core::Object other) → core::bool
+    ;
+}
+class D extends self::C {
+  synthetic constructor •() → self::D
+    ;
+  operator ==(core::Object? other) → core::bool
+    ;
+  method method1(dynamic o) → core::bool
+    ;
+  method method2(core::Null? o) → core::bool
+    ;
+}
+class E extends core::Object {
+  synthetic constructor •() → self::E
+    ;
+  operator ==() → core::bool
+    ;
+}
+class F extends self::E {
+  synthetic constructor •() → self::F
+    ;
+  operator ==(core::Object? other) → core::bool
+    ;
+}
+static method main() → dynamic
+  ;
+static method expect(dynamic expected, dynamic actual) → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42603.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42603.dart.strong.expect
new file mode 100644
index 0000000..91362db
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42603.dart.strong.expect
@@ -0,0 +1,74 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:18:17: Error: Operator '==' should have exactly one parameter.
+//   bool operator ==() => true;
+//                 ^^
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:18:17: Error: The method 'E.==' has fewer positional arguments than those of overridden method 'Object.=='.
+//   bool operator ==() => true;
+//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:22:17: Error: The method 'F.==' has more required arguments than those of overridden method 'E.=='.
+//   bool operator ==(Object? other) => super == other;
+//                 ^
+// pkg/front_end/testcases/nnbd/issue42603.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==() => true;
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:22:44: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+//   bool operator ==(Object? other) => super == other;
+//                                            ^
+//
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  operator ==(core::Object other) → core::bool
+    return true;
+}
+class D extends self::C {
+  synthetic constructor •() → self::D
+    : super self::C::•()
+    ;
+  operator ==(core::Object? other) → core::bool
+    return super.{self::C::==}(other);
+  method method1(dynamic o) → core::bool
+    return super.{self::C::==}(o);
+  method method2(core::Null? o) → core::bool
+    return super.{self::C::==}(o);
+}
+class E extends core::Object {
+  synthetic constructor •() → self::E
+    : super core::Object::•()
+    ;
+  operator ==() → core::bool
+    return true;
+}
+class F extends self::E {
+  synthetic constructor •() → self::F
+    : super self::E::•()
+    ;
+  operator ==(core::Object? other) → core::bool
+    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42603.dart:22:44: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+  bool operator ==(Object? other) => super == other;
+                                           ^" in super.{self::E::==}(other);
+}
+static method main() → dynamic {
+  self::expect(true, new self::D::•().{self::D::==}(new self::D::•()));
+  self::expect(false, new self::D::•().{self::D::method1}(null));
+  self::expect(false, new self::D::•().{self::D::method2}(null));
+}
+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/issue42603.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42603.dart.textual_outline.expect
new file mode 100644
index 0000000..9897d454
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42603.dart.textual_outline.expect
@@ -0,0 +1,20 @@
+class C {
+  bool operator ==(Object other) => true;
+}
+
+class D extends C {
+  bool operator ==(Object? other) => super == other;
+  bool method1(dynamic o) => super == o;
+  bool method2(Null o) => super == o;
+}
+
+class E {
+  bool operator ==() => true;
+}
+
+class F extends E {
+  bool operator ==(Object? other) => super == other;
+}
+
+main() {}
+expect(expected, actual) {}
diff --git a/pkg/front_end/testcases/nnbd/issue42603.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42603.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..de73fe7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42603.dart.textual_outline_modelled.expect
@@ -0,0 +1,20 @@
+class C {
+  bool operator ==(Object other) => true;
+}
+
+class D extends C {
+  bool method1(dynamic o) => super == o;
+  bool method2(Null o) => super == o;
+  bool operator ==(Object? other) => super == other;
+}
+
+class E {
+  bool operator ==() => true;
+}
+
+class F extends E {
+  bool operator ==(Object? other) => super == other;
+}
+
+expect(expected, actual) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42603.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42603.dart.weak.expect
new file mode 100644
index 0000000..91362db
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42603.dart.weak.expect
@@ -0,0 +1,74 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:18:17: Error: Operator '==' should have exactly one parameter.
+//   bool operator ==() => true;
+//                 ^^
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:18:17: Error: The method 'E.==' has fewer positional arguments than those of overridden method 'Object.=='.
+//   bool operator ==() => true;
+//                 ^
+// sdk/lib/_internal/vm/lib/object_patch.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==(Object other) native "Object_equals";
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:22:17: Error: The method 'F.==' has more required arguments than those of overridden method 'E.=='.
+//   bool operator ==(Object? other) => super == other;
+//                 ^
+// pkg/front_end/testcases/nnbd/issue42603.dart:18:17: Context: This is the overridden method ('==').
+//   bool operator ==() => true;
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42603.dart:22:44: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+//   bool operator ==(Object? other) => super == other;
+//                                            ^
+//
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  operator ==(core::Object other) → core::bool
+    return true;
+}
+class D extends self::C {
+  synthetic constructor •() → self::D
+    : super self::C::•()
+    ;
+  operator ==(core::Object? other) → core::bool
+    return super.{self::C::==}(other);
+  method method1(dynamic o) → core::bool
+    return super.{self::C::==}(o);
+  method method2(core::Null? o) → core::bool
+    return super.{self::C::==}(o);
+}
+class E extends core::Object {
+  synthetic constructor •() → self::E
+    : super core::Object::•()
+    ;
+  operator ==() → core::bool
+    return true;
+}
+class F extends self::E {
+  synthetic constructor •() → self::F
+    : super self::E::•()
+    ;
+  operator ==(core::Object? other) → core::bool
+    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42603.dart:22:44: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+  bool operator ==(Object? other) => super == other;
+                                           ^" in super.{self::E::==}(other);
+}
+static method main() → dynamic {
+  self::expect(true, new self::D::•().{self::D::==}(new self::D::•()));
+  self::expect(false, new self::D::•().{self::D::method1}(null));
+  self::expect(false, new self::D::•().{self::D::method2}(null));
+}
+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/issue42743.dart b/pkg/front_end/testcases/nnbd/issue42743.dart
new file mode 100644
index 0000000..2ac0239
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42743.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.
+
+main() async {
+  bool b = true;
+  (_) {
+    if (b) return 42;
+  };
+  (_) async {
+    if (b) return 42;
+  };
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42743.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42743.dart.outline.expect
new file mode 100644
index 0000000..074fe5d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42743.dart.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method main() → dynamic async 
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42743.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42743.dart.strong.expect
new file mode 100644
index 0000000..ca71c73
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42743.dart.strong.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+static method main() → dynamic async {
+  core::bool b = true;
+  (dynamic _) → core::int? {
+    if(b)
+      return 42;
+  };
+  (dynamic _) → asy::Future<core::int?> async {
+    if(b)
+      return 42;
+  };
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42743.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42743.dart.strong.transformed.expect
new file mode 100644
index 0000000..454a896
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42743.dart.strong.transformed.expect
@@ -0,0 +1,64 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method main() → dynamic /* 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;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L1:
+      {
+        core::bool b = true;
+        (dynamic _) → core::int? {
+          if(b)
+            return 42;
+        };
+        (dynamic _) → asy::Future<core::int?> /* originally async */ {
+          final asy::_AsyncAwaitCompleter<core::int?> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int?>();
+          FutureOr<core::int?>? :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 {
+              #L2:
+              {
+                if(b) {
+                  :return_value = 42;
+                  break #L2;
+                }
+              }
+              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};
+        };
+      }
+      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};
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42743.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42743.dart.textual_outline.expect
new file mode 100644
index 0000000..386f405
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42743.dart.textual_outline.expect
@@ -0,0 +1 @@
+main() async {}
diff --git a/pkg/front_end/testcases/nnbd/issue42743.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42743.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..386f405
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42743.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+main() async {}
diff --git a/pkg/front_end/testcases/nnbd/issue42743.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42743.dart.weak.expect
new file mode 100644
index 0000000..ca71c73
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42743.dart.weak.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+static method main() → dynamic async {
+  core::bool b = true;
+  (dynamic _) → core::int? {
+    if(b)
+      return 42;
+  };
+  (dynamic _) → asy::Future<core::int?> async {
+    if(b)
+      return 42;
+  };
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42743.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42743.dart.weak.transformed.expect
new file mode 100644
index 0000000..454a896
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42743.dart.weak.transformed.expect
@@ -0,0 +1,64 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+static method main() → dynamic /* 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;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L1:
+      {
+        core::bool b = true;
+        (dynamic _) → core::int? {
+          if(b)
+            return 42;
+        };
+        (dynamic _) → asy::Future<core::int?> /* originally async */ {
+          final asy::_AsyncAwaitCompleter<core::int?> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int?>();
+          FutureOr<core::int?>? :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 {
+              #L2:
+              {
+                if(b) {
+                  :return_value = 42;
+                  break #L2;
+                }
+              }
+              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};
+        };
+      }
+      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};
+}
diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart b/pkg/front_end/testcases/nnbd/issue42758.dart
new file mode 100644
index 0000000..38474ee
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42758.dart
@@ -0,0 +1,48 @@
+// 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.
+
+test1(Never n1, Never? n2, Null n3) {
+  var l1 = [...n1];
+  var l2 = [...?n1];
+  var l3 = [...n2];
+  var l4 = [...?n2];
+  var l5 = [...n3];
+  var l6 = [...?n3];
+  var s1 = {...n1, n1};
+  var s2 = {...?n1, n1};
+  var s3 = {...n2, n1};
+  var s4 = {...?n2, n1};
+  var s5 = {...n3, n1};
+  var s6 = {...?n3, n1};
+  var m1 = {...n1, n1: n1};
+  var m2 = {...?n1, n1: n1};
+  var m3 = {...n2, n1: n1};
+  var m4 = {...?n2, n1: n1};
+  var m5 = {...n3, n1: n1};
+  var m6 = {...?n3, n1: n1};
+}
+
+test2<N1 extends Never, N2 extends Never?, N3 extends Null>(
+    N1 n1, N2 n2, N3 n3) {
+  var l1 = [...n1];
+  var l2 = [...?n1];
+  var l3 = [...n2];
+  var l4 = [...?n2];
+  var l5 = [...n3];
+  var l6 = [...?n3];
+  var s1 = {...n1, n1};
+  var s2 = {...?n1, n1};
+  var s3 = {...n2, n1};
+  var s4 = {...?n2, n1};
+  var s5 = {...n3, n1};
+  var s6 = {...?n3, n1};
+  var m1 = {...n1, n1: n1};
+  var m2 = {...?n1, n1: n1};
+  var m3 = {...n2, n1: n1};
+  var m4 = {...?n2, n1: n1};
+  var m5 = {...n3, n1: n1};
+  var m6 = {...?n3, n1: n1};
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.outline.expect
new file mode 100644
index 0000000..3ada4d6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42758.dart.outline.expect
@@ -0,0 +1,10 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test1(Never n1, Never? n2, core::Null? n3) → dynamic
+  ;
+static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 extends core::Null? = core::Null?>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.expect
new file mode 100644
index 0000000..6e4b63d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.expect
@@ -0,0 +1,293 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var l2 = [...?n1];
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
+//   var l3 = [...n2];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
+//   var l5 = [...n3];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var s2 = {...?n1, n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
+//   var s3 = {...n2, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
+//   var s5 = {...n3, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var m2 = {...?n1, n1: n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
+//   var m3 = {...n2, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
+//   var m5 = {...n3, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var l2 = [...?n1];
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
+//   var l3 = [...n2];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
+//   var l5 = [...n3];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var s2 = {...?n1, n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
+//   var s3 = {...n2, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
+//   var s5 = {...n3, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var m2 = {...?n1, n1: n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
+//   var m3 = {...n2, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
+//   var m5 = {...n3, n1: n1};
+//                ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method test1(Never n1, Never? n2, core::Null? n3) → dynamic {
+  core::List<Never> l1 = block {
+    final core::List<Never> #t1 = <Never>[];
+    for (final Never #t2 in n1)
+      #t1.{core::List::add}(#t2);
+  } =>#t1;
+  core::List<Never> l2 = block {
+    final core::List<Never> #t3 = <Never>[];
+    final core::Iterable<Never>? #t4 = n1;
+    if(!#t4.{core::Object::==}(null))
+      for (final Never #t5 in #t4{core::Iterable<Never>})
+        #t3.{core::List::add}(#t5);
+  } =>#t3;
+  core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
+  var l3 = [...n2];
+               ^"];
+  core::List<Never> l4 = block {
+    final core::List<Never> #t6 = <Never>[];
+    final core::Iterable<Never>? #t7 = n2;
+    if(!#t7.{core::Object::==}(null))
+      for (final Never #t8 in #t7{core::Iterable<Never>})
+        #t6.{core::List::add}(#t8);
+  } =>#t6;
+  core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
+  var l5 = [...n3];
+               ^"];
+  core::List<Never> l6 = block {
+    final core::List<Never> #t9 = <Never>[];
+    final core::Iterable<Never>? #t10 = n3;
+    if(!#t10.{core::Object::==}(null))
+      for (final Never #t11 in #t10{core::Iterable<Never>})
+        #t9.{core::List::add}(#t11);
+  } =>#t9;
+  core::Set<Never> s1 = block {
+    final core::Set<Never> #t12 = col::LinkedHashSet::•<Never>();
+    for (final Never #t13 in n1)
+      #t12.{core::Set::add}(#t13);
+    #t12.{core::Set::add}(n1);
+  } =>#t12;
+  core::Set<Never> s2 = block {
+    final core::Set<Never> #t14 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t15 = n1;
+    if(!#t15.{core::Object::==}(null))
+      for (final Never #t16 in #t15{core::Iterable<Never>})
+        #t14.{core::Set::add}(#t16);
+    #t14.{core::Set::add}(n1);
+  } =>#t14;
+  core::Set<dynamic> s3 = let final core::Set<dynamic> #t17 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t18 = #t17.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
+  var s3 = {...n2, n1};
+               ^") in let final dynamic #t19 = #t17.{core::Set::add}(n1) in #t17;
+  core::Set<Never> s4 = block {
+    final core::Set<Never> #t20 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t21 = n2;
+    if(!#t21.{core::Object::==}(null))
+      for (final Never #t22 in #t21{core::Iterable<Never>})
+        #t20.{core::Set::add}(#t22);
+    #t20.{core::Set::add}(n1);
+  } =>#t20;
+  core::Set<dynamic> s5 = let final core::Set<dynamic> #t23 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t24 = #t23.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
+  var s5 = {...n3, n1};
+               ^") in let final dynamic #t25 = #t23.{core::Set::add}(n1) in #t23;
+  core::Set<Never> s6 = block {
+    final core::Set<Never> #t26 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t27 = n3;
+    if(!#t27.{core::Object::==}(null))
+      for (final Never #t28 in #t27{core::Iterable<Never>})
+        #t26.{core::Set::add}(#t28);
+    #t26.{core::Set::add}(n1);
+  } =>#t26;
+  core::Map<Never, Never> m1 = block {
+    final core::Map<Never, Never> #t29 = <Never, Never>{};
+    for (final core::MapEntry<Never, Never> #t30 in n1.{core::Map::entries})
+      #t29.{core::Map::[]=}(#t30.{core::MapEntry::key}, #t30.{core::MapEntry::value});
+    #t29.{core::Map::[]=}(n1, n1);
+  } =>#t29;
+  core::Map<Never, Never> m2 = block {
+    final core::Map<Never, Never> #t31 = <Never, Never>{};
+    final core::Map<Never, Never>? #t32 = n1;
+    if(!#t32.{core::Object::==}(null))
+      for (final core::MapEntry<Never, Never> #t33 in #t32{core::Map<Never, Never>}.{core::Map::entries})
+        #t31.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+    #t31.{core::Map::[]=}(n1, n1);
+  } =>#t31;
+  core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
+  var m3 = {...n2, n1: n1};
+               ^": null, n1: n1};
+  core::Map<Never, Never> m4 = block {
+    final core::Map<Never, Never> #t34 = <Never, Never>{};
+    final core::Map<Never, Never>? #t35 = n2;
+    if(!#t35.{core::Object::==}(null))
+      for (final core::MapEntry<Never, Never> #t36 in #t35{core::Map<Never, Never>}.{core::Map::entries})
+        #t34.{core::Map::[]=}(#t36.{core::MapEntry::key}, #t36.{core::MapEntry::value});
+    #t34.{core::Map::[]=}(n1, n1);
+  } =>#t34;
+  core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
+  var m5 = {...n3, n1: n1};
+               ^": null, n1: n1};
+  core::Map<Never, Never> m6 = block {
+    final core::Map<Never, Never> #t37 = <Never, Never>{};
+    final core::Map<Never, Never>? #t38 = n3;
+    if(!#t38.{core::Object::==}(null))
+      for (final core::MapEntry<Never, Never> #t39 in #t38{core::Map<Never, Never>}.{core::Map::entries})
+        #t37.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t37.{core::Map::[]=}(n1, n1);
+  } =>#t37;
+}
+static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 extends core::Null? = core::Null?>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic {
+  core::List<Never> l1 = block {
+    final core::List<Never> #t40 = <Never>[];
+    for (final Never #t41 in n1)
+      #t40.{core::List::add}(#t41);
+  } =>#t40;
+  core::List<Never> l2 = block {
+    final core::List<Never> #t42 = <Never>[];
+    final core::Iterable<Never>? #t43 = n1;
+    if(!#t43.{core::Object::==}(null))
+      for (final Never #t44 in #t43{core::Iterable<Never>})
+        #t42.{core::List::add}(#t44);
+  } =>#t42;
+  core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
+  var l3 = [...n2];
+               ^"];
+  core::List<Never> l4 = block {
+    final core::List<Never> #t45 = <Never>[];
+    final core::Iterable<Never>? #t46 = n2;
+    if(!#t46.{core::Object::==}(null))
+      for (final Never #t47 in #t46{core::Iterable<Never>})
+        #t45.{core::List::add}(#t47);
+  } =>#t45;
+  core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
+  var l5 = [...n3];
+               ^"];
+  core::List<Never> l6 = block {
+    final core::List<Never> #t48 = <Never>[];
+    final core::Iterable<Never>? #t49 = n3;
+    if(!#t49.{core::Object::==}(null))
+      for (final Never #t50 in #t49{core::Iterable<Never>})
+        #t48.{core::List::add}(#t50);
+  } =>#t48;
+  core::Set<self::test2::N1> s1 = block {
+    final core::Set<self::test2::N1> #t51 = col::LinkedHashSet::•<self::test2::N1>();
+    for (final self::test2::N1 #t52 in n1)
+      #t51.{core::Set::add}(#t52);
+    #t51.{core::Set::add}(n1);
+  } =>#t51;
+  core::Set<self::test2::N1> s2 = block {
+    final core::Set<self::test2::N1> #t53 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t54 = n1;
+    if(!#t54.{core::Object::==}(null))
+      for (final self::test2::N1 #t55 in #t54{core::Iterable<self::test2::N1>})
+        #t53.{core::Set::add}(#t55);
+    #t53.{core::Set::add}(n1);
+  } =>#t53;
+  core::Set<dynamic> s3 = let final core::Set<dynamic> #t56 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t57 = #t56.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
+  var s3 = {...n2, n1};
+               ^") in let final dynamic #t58 = #t56.{core::Set::add}(n1) in #t56;
+  core::Set<self::test2::N1> s4 = block {
+    final core::Set<self::test2::N1> #t59 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t60 = n2;
+    if(!#t60.{core::Object::==}(null))
+      for (final self::test2::N1 #t61 in #t60{core::Iterable<self::test2::N1>})
+        #t59.{core::Set::add}(#t61);
+    #t59.{core::Set::add}(n1);
+  } =>#t59;
+  core::Set<dynamic> s5 = let final core::Set<dynamic> #t62 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
+  var s5 = {...n3, n1};
+               ^") in let final dynamic #t64 = #t62.{core::Set::add}(n1) in #t62;
+  core::Set<self::test2::N1> s6 = block {
+    final core::Set<self::test2::N1> #t65 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t66 = n3;
+    if(!#t66.{core::Object::==}(null))
+      for (final self::test2::N1 #t67 in #t66{core::Iterable<self::test2::N1>})
+        #t65.{core::Set::add}(#t67);
+    #t65.{core::Set::add}(n1);
+  } =>#t65;
+  core::Map<self::test2::N1, self::test2::N1> m1 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t68 = <self::test2::N1, self::test2::N1>{};
+    for (final core::MapEntry<self::test2::N1, self::test2::N1> #t69 in n1.{core::Map::entries})
+      #t68.{core::Map::[]=}(#t69.{core::MapEntry::key}, #t69.{core::MapEntry::value});
+    #t68.{core::Map::[]=}(n1, n1);
+  } =>#t68;
+  core::Map<self::test2::N1, self::test2::N1> m2 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t70 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t71 = n1;
+    if(!#t71.{core::Object::==}(null))
+      for (final core::MapEntry<self::test2::N1, self::test2::N1> #t72 in #t71{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
+        #t70.{core::Map::[]=}(#t72.{core::MapEntry::key}, #t72.{core::MapEntry::value});
+    #t70.{core::Map::[]=}(n1, n1);
+  } =>#t70;
+  core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
+  var m3 = {...n2, n1: n1};
+               ^": null, n1: n1};
+  core::Map<self::test2::N1, self::test2::N1> m4 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t73 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t74 = n2;
+    if(!#t74.{core::Object::==}(null))
+      for (final core::MapEntry<self::test2::N1, self::test2::N1> #t75 in #t74{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
+        #t73.{core::Map::[]=}(#t75.{core::MapEntry::key}, #t75.{core::MapEntry::value});
+    #t73.{core::Map::[]=}(n1, n1);
+  } =>#t73;
+  core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
+  var m5 = {...n3, n1: n1};
+               ^": null, n1: n1};
+  core::Map<self::test2::N1, self::test2::N1> m6 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t76 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t77 = n3;
+    if(!#t77.{core::Object::==}(null))
+      for (final core::MapEntry<self::test2::N1, self::test2::N1> #t78 in #t77{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
+        #t76.{core::Map::[]=}(#t78.{core::MapEntry::key}, #t78.{core::MapEntry::value});
+    #t76.{core::Map::[]=}(n1, n1);
+  } =>#t76;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect
new file mode 100644
index 0000000..f24f351
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect
@@ -0,0 +1,375 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var l2 = [...?n1];
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
+//   var l3 = [...n2];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
+//   var l5 = [...n3];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var s2 = {...?n1, n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
+//   var s3 = {...n2, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
+//   var s5 = {...n3, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var m2 = {...?n1, n1: n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
+//   var m3 = {...n2, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
+//   var m5 = {...n3, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var l2 = [...?n1];
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
+//   var l3 = [...n2];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
+//   var l5 = [...n3];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var s2 = {...?n1, n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
+//   var s3 = {...n2, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
+//   var s5 = {...n3, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var m2 = {...?n1, n1: n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
+//   var m3 = {...n2, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
+//   var m5 = {...n3, n1: n1};
+//                ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method test1(Never n1, Never? n2, core::Null? n3) → dynamic {
+  core::List<Never> l1 = block {
+    final core::List<Never> #t1 = <Never>[];
+    for (final Never #t2 in n1)
+      #t1.{core::List::add}(#t2);
+  } =>#t1;
+  core::List<Never> l2 = block {
+    final core::List<Never> #t3 = <Never>[];
+    final core::Iterable<Never>? #t4 = n1;
+    if(!#t4.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t4{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t5 = :sync-for-iterator.{core::Iterator::current};
+        #t3.{core::List::add}(#t5);
+      }
+    }
+  } =>#t3;
+  core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
+  var l3 = [...n2];
+               ^"];
+  core::List<Never> l4 = block {
+    final core::List<Never> #t6 = <Never>[];
+    final core::Iterable<Never>? #t7 = n2;
+    if(!#t7.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t7{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t8 = :sync-for-iterator.{core::Iterator::current};
+        #t6.{core::List::add}(#t8);
+      }
+    }
+  } =>#t6;
+  core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
+  var l5 = [...n3];
+               ^"];
+  core::List<Never> l6 = block {
+    final core::List<Never> #t9 = <Never>[];
+    final core::Iterable<Never>? #t10 = n3;
+    if(!#t10.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t10{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t11 = :sync-for-iterator.{core::Iterator::current};
+        #t9.{core::List::add}(#t11);
+      }
+    }
+  } =>#t9;
+  core::Set<Never> s1 = block {
+    final core::Set<Never> #t12 = col::LinkedHashSet::•<Never>();
+    for (final Never #t13 in n1)
+      #t12.{core::Set::add}(#t13);
+    #t12.{core::Set::add}(n1);
+  } =>#t12;
+  core::Set<Never> s2 = block {
+    final core::Set<Never> #t14 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t15 = n1;
+    if(!#t15.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t15{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t16 = :sync-for-iterator.{core::Iterator::current};
+        #t14.{core::Set::add}(#t16);
+      }
+    }
+    #t14.{core::Set::add}(n1);
+  } =>#t14;
+  core::Set<dynamic> s3 = let final core::Set<dynamic> #t17 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t18 = #t17.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
+  var s3 = {...n2, n1};
+               ^") in let final core::bool #t19 = #t17.{core::Set::add}(n1) in #t17;
+  core::Set<Never> s4 = block {
+    final core::Set<Never> #t20 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t21 = n2;
+    if(!#t21.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t21{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t22 = :sync-for-iterator.{core::Iterator::current};
+        #t20.{core::Set::add}(#t22);
+      }
+    }
+    #t20.{core::Set::add}(n1);
+  } =>#t20;
+  core::Set<dynamic> s5 = let final core::Set<dynamic> #t23 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t24 = #t23.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
+  var s5 = {...n3, n1};
+               ^") in let final core::bool #t25 = #t23.{core::Set::add}(n1) in #t23;
+  core::Set<Never> s6 = block {
+    final core::Set<Never> #t26 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t27 = n3;
+    if(!#t27.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t27{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t28 = :sync-for-iterator.{core::Iterator::current};
+        #t26.{core::Set::add}(#t28);
+      }
+    }
+    #t26.{core::Set::add}(n1);
+  } =>#t26;
+  core::Map<Never, Never> m1 = block {
+    final core::Map<Never, Never> #t29 = <Never, Never>{};
+    {
+      core::Iterator<core::MapEntry<<BottomType>, <BottomType>>> :sync-for-iterator = n1.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<Never, Never> #t30 = :sync-for-iterator.{core::Iterator::current};
+        #t29.{core::Map::[]=}(#t30.{core::MapEntry::key}, #t30.{core::MapEntry::value});
+      }
+    }
+    #t29.{core::Map::[]=}(n1, n1);
+  } =>#t29;
+  core::Map<Never, Never> m2 = block {
+    final core::Map<Never, Never> #t31 = <Never, Never>{};
+    final core::Map<Never, Never>? #t32 = n1;
+    if(!#t32.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t32{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<Never, Never> #t33 = :sync-for-iterator.{core::Iterator::current};
+        #t31.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+      }
+    }
+    #t31.{core::Map::[]=}(n1, n1);
+  } =>#t31;
+  core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
+  var m3 = {...n2, n1: n1};
+               ^": null, n1: n1};
+  core::Map<Never, Never> m4 = block {
+    final core::Map<Never, Never> #t34 = <Never, Never>{};
+    final core::Map<Never, Never>? #t35 = n2;
+    if(!#t35.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t35{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<Never, Never> #t36 = :sync-for-iterator.{core::Iterator::current};
+        #t34.{core::Map::[]=}(#t36.{core::MapEntry::key}, #t36.{core::MapEntry::value});
+      }
+    }
+    #t34.{core::Map::[]=}(n1, n1);
+  } =>#t34;
+  core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
+  var m5 = {...n3, n1: n1};
+               ^": null, n1: n1};
+  core::Map<Never, Never> m6 = block {
+    final core::Map<Never, Never> #t37 = <Never, Never>{};
+    final core::Map<Never, Never>? #t38 = n3;
+    if(!#t38.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t38{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<Never, Never> #t39 = :sync-for-iterator.{core::Iterator::current};
+        #t37.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+      }
+    }
+    #t37.{core::Map::[]=}(n1, n1);
+  } =>#t37;
+}
+static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 extends core::Null? = core::Null?>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic {
+  core::List<Never> l1 = block {
+    final core::List<Never> #t40 = <Never>[];
+    for (final Never #t41 in n1)
+      #t40.{core::List::add}(#t41);
+  } =>#t40;
+  core::List<Never> l2 = block {
+    final core::List<Never> #t42 = <Never>[];
+    final core::Iterable<Never>? #t43 = n1;
+    if(!#t43.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t43{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t44 = :sync-for-iterator.{core::Iterator::current};
+        #t42.{core::List::add}(#t44);
+      }
+    }
+  } =>#t42;
+  core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
+  var l3 = [...n2];
+               ^"];
+  core::List<Never> l4 = block {
+    final core::List<Never> #t45 = <Never>[];
+    final core::Iterable<Never>? #t46 = n2;
+    if(!#t46.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t46{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t47 = :sync-for-iterator.{core::Iterator::current};
+        #t45.{core::List::add}(#t47);
+      }
+    }
+  } =>#t45;
+  core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
+  var l5 = [...n3];
+               ^"];
+  core::List<Never> l6 = block {
+    final core::List<Never> #t48 = <Never>[];
+    final core::Iterable<Never>? #t49 = n3;
+    if(!#t49.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t49{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t50 = :sync-for-iterator.{core::Iterator::current};
+        #t48.{core::List::add}(#t50);
+      }
+    }
+  } =>#t48;
+  core::Set<self::test2::N1> s1 = block {
+    final core::Set<self::test2::N1> #t51 = col::LinkedHashSet::•<self::test2::N1>();
+    for (final self::test2::N1 #t52 in n1)
+      #t51.{core::Set::add}(#t52);
+    #t51.{core::Set::add}(n1);
+  } =>#t51;
+  core::Set<self::test2::N1> s2 = block {
+    final core::Set<self::test2::N1> #t53 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t54 = n1;
+    if(!#t54.{core::Object::==}(null)) {
+      core::Iterator<self::test2::N1> :sync-for-iterator = #t54{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final self::test2::N1 #t55 = :sync-for-iterator.{core::Iterator::current};
+        #t53.{core::Set::add}(#t55);
+      }
+    }
+    #t53.{core::Set::add}(n1);
+  } =>#t53;
+  core::Set<dynamic> s3 = let final core::Set<dynamic> #t56 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t57 = #t56.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
+  var s3 = {...n2, n1};
+               ^") in let final core::bool #t58 = #t56.{core::Set::add}(n1) in #t56;
+  core::Set<self::test2::N1> s4 = block {
+    final core::Set<self::test2::N1> #t59 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t60 = n2;
+    if(!#t60.{core::Object::==}(null)) {
+      core::Iterator<self::test2::N1> :sync-for-iterator = #t60{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final self::test2::N1 #t61 = :sync-for-iterator.{core::Iterator::current};
+        #t59.{core::Set::add}(#t61);
+      }
+    }
+    #t59.{core::Set::add}(n1);
+  } =>#t59;
+  core::Set<dynamic> s5 = let final core::Set<dynamic> #t62 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
+  var s5 = {...n3, n1};
+               ^") in let final core::bool #t64 = #t62.{core::Set::add}(n1) in #t62;
+  core::Set<self::test2::N1> s6 = block {
+    final core::Set<self::test2::N1> #t65 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t66 = n3;
+    if(!#t66.{core::Object::==}(null)) {
+      core::Iterator<self::test2::N1> :sync-for-iterator = #t66{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final self::test2::N1 #t67 = :sync-for-iterator.{core::Iterator::current};
+        #t65.{core::Set::add}(#t67);
+      }
+    }
+    #t65.{core::Set::add}(n1);
+  } =>#t65;
+  core::Map<self::test2::N1, self::test2::N1> m1 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t68 = <self::test2::N1, self::test2::N1>{};
+    {
+      core::Iterator<core::MapEntry<<BottomType>, <BottomType>>> :sync-for-iterator = n1.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<self::test2::N1, self::test2::N1> #t69 = :sync-for-iterator.{core::Iterator::current};
+        #t68.{core::Map::[]=}(#t69.{core::MapEntry::key}, #t69.{core::MapEntry::value});
+      }
+    }
+    #t68.{core::Map::[]=}(n1, n1);
+  } =>#t68;
+  core::Map<self::test2::N1, self::test2::N1> m2 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t70 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t71 = n1;
+    if(!#t71.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t71{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<self::test2::N1, self::test2::N1> #t72 = :sync-for-iterator.{core::Iterator::current};
+        #t70.{core::Map::[]=}(#t72.{core::MapEntry::key}, #t72.{core::MapEntry::value});
+      }
+    }
+    #t70.{core::Map::[]=}(n1, n1);
+  } =>#t70;
+  core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
+  var m3 = {...n2, n1: n1};
+               ^": null, n1: n1};
+  core::Map<self::test2::N1, self::test2::N1> m4 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t73 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t74 = n2;
+    if(!#t74.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t74{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<self::test2::N1, self::test2::N1> #t75 = :sync-for-iterator.{core::Iterator::current};
+        #t73.{core::Map::[]=}(#t75.{core::MapEntry::key}, #t75.{core::MapEntry::value});
+      }
+    }
+    #t73.{core::Map::[]=}(n1, n1);
+  } =>#t73;
+  core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
+  var m5 = {...n3, n1: n1};
+               ^": null, n1: n1};
+  core::Map<self::test2::N1, self::test2::N1> m6 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t76 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t77 = n3;
+    if(!#t77.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t77{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<self::test2::N1, self::test2::N1> #t78 = :sync-for-iterator.{core::Iterator::current};
+        #t76.{core::Map::[]=}(#t78.{core::MapEntry::key}, #t78.{core::MapEntry::value});
+      }
+    }
+    #t76.{core::Map::[]=}(n1, n1);
+  } =>#t76;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.textual_outline.expect
new file mode 100644
index 0000000..09008cc
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42758.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+test1(Never n1, Never? n2, Null n3) {}
+test2<N1 extends Never, N2 extends Never?, N3 extends Null>(
+    N1 n1, N2 n2, N3 n3) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..7dc1872
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42758.dart.textual_outline_modelled.expect
@@ -0,0 +1,4 @@
+main() {}
+test1(Never n1, Never? n2, Null n3) {}
+test2<N1 extends Never, N2 extends Never?, N3 extends Null>(
+    N1 n1, N2 n2, N3 n3) {}
diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.expect
new file mode 100644
index 0000000..6e4b63d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.expect
@@ -0,0 +1,293 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var l2 = [...?n1];
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
+//   var l3 = [...n2];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
+//   var l5 = [...n3];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var s2 = {...?n1, n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
+//   var s3 = {...n2, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
+//   var s5 = {...n3, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var m2 = {...?n1, n1: n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
+//   var m3 = {...n2, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
+//   var m5 = {...n3, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var l2 = [...?n1];
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
+//   var l3 = [...n2];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
+//   var l5 = [...n3];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var s2 = {...?n1, n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
+//   var s3 = {...n2, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
+//   var s5 = {...n3, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var m2 = {...?n1, n1: n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
+//   var m3 = {...n2, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
+//   var m5 = {...n3, n1: n1};
+//                ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method test1(Never n1, Never? n2, core::Null? n3) → dynamic {
+  core::List<Never> l1 = block {
+    final core::List<Never> #t1 = <Never>[];
+    for (final Never #t2 in n1)
+      #t1.{core::List::add}(#t2);
+  } =>#t1;
+  core::List<Never> l2 = block {
+    final core::List<Never> #t3 = <Never>[];
+    final core::Iterable<Never>? #t4 = n1;
+    if(!#t4.{core::Object::==}(null))
+      for (final Never #t5 in #t4{core::Iterable<Never>})
+        #t3.{core::List::add}(#t5);
+  } =>#t3;
+  core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
+  var l3 = [...n2];
+               ^"];
+  core::List<Never> l4 = block {
+    final core::List<Never> #t6 = <Never>[];
+    final core::Iterable<Never>? #t7 = n2;
+    if(!#t7.{core::Object::==}(null))
+      for (final Never #t8 in #t7{core::Iterable<Never>})
+        #t6.{core::List::add}(#t8);
+  } =>#t6;
+  core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
+  var l5 = [...n3];
+               ^"];
+  core::List<Never> l6 = block {
+    final core::List<Never> #t9 = <Never>[];
+    final core::Iterable<Never>? #t10 = n3;
+    if(!#t10.{core::Object::==}(null))
+      for (final Never #t11 in #t10{core::Iterable<Never>})
+        #t9.{core::List::add}(#t11);
+  } =>#t9;
+  core::Set<Never> s1 = block {
+    final core::Set<Never> #t12 = col::LinkedHashSet::•<Never>();
+    for (final Never #t13 in n1)
+      #t12.{core::Set::add}(#t13);
+    #t12.{core::Set::add}(n1);
+  } =>#t12;
+  core::Set<Never> s2 = block {
+    final core::Set<Never> #t14 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t15 = n1;
+    if(!#t15.{core::Object::==}(null))
+      for (final Never #t16 in #t15{core::Iterable<Never>})
+        #t14.{core::Set::add}(#t16);
+    #t14.{core::Set::add}(n1);
+  } =>#t14;
+  core::Set<dynamic> s3 = let final core::Set<dynamic> #t17 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t18 = #t17.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
+  var s3 = {...n2, n1};
+               ^") in let final dynamic #t19 = #t17.{core::Set::add}(n1) in #t17;
+  core::Set<Never> s4 = block {
+    final core::Set<Never> #t20 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t21 = n2;
+    if(!#t21.{core::Object::==}(null))
+      for (final Never #t22 in #t21{core::Iterable<Never>})
+        #t20.{core::Set::add}(#t22);
+    #t20.{core::Set::add}(n1);
+  } =>#t20;
+  core::Set<dynamic> s5 = let final core::Set<dynamic> #t23 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t24 = #t23.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
+  var s5 = {...n3, n1};
+               ^") in let final dynamic #t25 = #t23.{core::Set::add}(n1) in #t23;
+  core::Set<Never> s6 = block {
+    final core::Set<Never> #t26 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t27 = n3;
+    if(!#t27.{core::Object::==}(null))
+      for (final Never #t28 in #t27{core::Iterable<Never>})
+        #t26.{core::Set::add}(#t28);
+    #t26.{core::Set::add}(n1);
+  } =>#t26;
+  core::Map<Never, Never> m1 = block {
+    final core::Map<Never, Never> #t29 = <Never, Never>{};
+    for (final core::MapEntry<Never, Never> #t30 in n1.{core::Map::entries})
+      #t29.{core::Map::[]=}(#t30.{core::MapEntry::key}, #t30.{core::MapEntry::value});
+    #t29.{core::Map::[]=}(n1, n1);
+  } =>#t29;
+  core::Map<Never, Never> m2 = block {
+    final core::Map<Never, Never> #t31 = <Never, Never>{};
+    final core::Map<Never, Never>? #t32 = n1;
+    if(!#t32.{core::Object::==}(null))
+      for (final core::MapEntry<Never, Never> #t33 in #t32{core::Map<Never, Never>}.{core::Map::entries})
+        #t31.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+    #t31.{core::Map::[]=}(n1, n1);
+  } =>#t31;
+  core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
+  var m3 = {...n2, n1: n1};
+               ^": null, n1: n1};
+  core::Map<Never, Never> m4 = block {
+    final core::Map<Never, Never> #t34 = <Never, Never>{};
+    final core::Map<Never, Never>? #t35 = n2;
+    if(!#t35.{core::Object::==}(null))
+      for (final core::MapEntry<Never, Never> #t36 in #t35{core::Map<Never, Never>}.{core::Map::entries})
+        #t34.{core::Map::[]=}(#t36.{core::MapEntry::key}, #t36.{core::MapEntry::value});
+    #t34.{core::Map::[]=}(n1, n1);
+  } =>#t34;
+  core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
+  var m5 = {...n3, n1: n1};
+               ^": null, n1: n1};
+  core::Map<Never, Never> m6 = block {
+    final core::Map<Never, Never> #t37 = <Never, Never>{};
+    final core::Map<Never, Never>? #t38 = n3;
+    if(!#t38.{core::Object::==}(null))
+      for (final core::MapEntry<Never, Never> #t39 in #t38{core::Map<Never, Never>}.{core::Map::entries})
+        #t37.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t37.{core::Map::[]=}(n1, n1);
+  } =>#t37;
+}
+static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 extends core::Null? = core::Null?>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic {
+  core::List<Never> l1 = block {
+    final core::List<Never> #t40 = <Never>[];
+    for (final Never #t41 in n1)
+      #t40.{core::List::add}(#t41);
+  } =>#t40;
+  core::List<Never> l2 = block {
+    final core::List<Never> #t42 = <Never>[];
+    final core::Iterable<Never>? #t43 = n1;
+    if(!#t43.{core::Object::==}(null))
+      for (final Never #t44 in #t43{core::Iterable<Never>})
+        #t42.{core::List::add}(#t44);
+  } =>#t42;
+  core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
+  var l3 = [...n2];
+               ^"];
+  core::List<Never> l4 = block {
+    final core::List<Never> #t45 = <Never>[];
+    final core::Iterable<Never>? #t46 = n2;
+    if(!#t46.{core::Object::==}(null))
+      for (final Never #t47 in #t46{core::Iterable<Never>})
+        #t45.{core::List::add}(#t47);
+  } =>#t45;
+  core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
+  var l5 = [...n3];
+               ^"];
+  core::List<Never> l6 = block {
+    final core::List<Never> #t48 = <Never>[];
+    final core::Iterable<Never>? #t49 = n3;
+    if(!#t49.{core::Object::==}(null))
+      for (final Never #t50 in #t49{core::Iterable<Never>})
+        #t48.{core::List::add}(#t50);
+  } =>#t48;
+  core::Set<self::test2::N1> s1 = block {
+    final core::Set<self::test2::N1> #t51 = col::LinkedHashSet::•<self::test2::N1>();
+    for (final self::test2::N1 #t52 in n1)
+      #t51.{core::Set::add}(#t52);
+    #t51.{core::Set::add}(n1);
+  } =>#t51;
+  core::Set<self::test2::N1> s2 = block {
+    final core::Set<self::test2::N1> #t53 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t54 = n1;
+    if(!#t54.{core::Object::==}(null))
+      for (final self::test2::N1 #t55 in #t54{core::Iterable<self::test2::N1>})
+        #t53.{core::Set::add}(#t55);
+    #t53.{core::Set::add}(n1);
+  } =>#t53;
+  core::Set<dynamic> s3 = let final core::Set<dynamic> #t56 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t57 = #t56.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
+  var s3 = {...n2, n1};
+               ^") in let final dynamic #t58 = #t56.{core::Set::add}(n1) in #t56;
+  core::Set<self::test2::N1> s4 = block {
+    final core::Set<self::test2::N1> #t59 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t60 = n2;
+    if(!#t60.{core::Object::==}(null))
+      for (final self::test2::N1 #t61 in #t60{core::Iterable<self::test2::N1>})
+        #t59.{core::Set::add}(#t61);
+    #t59.{core::Set::add}(n1);
+  } =>#t59;
+  core::Set<dynamic> s5 = let final core::Set<dynamic> #t62 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
+  var s5 = {...n3, n1};
+               ^") in let final dynamic #t64 = #t62.{core::Set::add}(n1) in #t62;
+  core::Set<self::test2::N1> s6 = block {
+    final core::Set<self::test2::N1> #t65 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t66 = n3;
+    if(!#t66.{core::Object::==}(null))
+      for (final self::test2::N1 #t67 in #t66{core::Iterable<self::test2::N1>})
+        #t65.{core::Set::add}(#t67);
+    #t65.{core::Set::add}(n1);
+  } =>#t65;
+  core::Map<self::test2::N1, self::test2::N1> m1 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t68 = <self::test2::N1, self::test2::N1>{};
+    for (final core::MapEntry<self::test2::N1, self::test2::N1> #t69 in n1.{core::Map::entries})
+      #t68.{core::Map::[]=}(#t69.{core::MapEntry::key}, #t69.{core::MapEntry::value});
+    #t68.{core::Map::[]=}(n1, n1);
+  } =>#t68;
+  core::Map<self::test2::N1, self::test2::N1> m2 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t70 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t71 = n1;
+    if(!#t71.{core::Object::==}(null))
+      for (final core::MapEntry<self::test2::N1, self::test2::N1> #t72 in #t71{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
+        #t70.{core::Map::[]=}(#t72.{core::MapEntry::key}, #t72.{core::MapEntry::value});
+    #t70.{core::Map::[]=}(n1, n1);
+  } =>#t70;
+  core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
+  var m3 = {...n2, n1: n1};
+               ^": null, n1: n1};
+  core::Map<self::test2::N1, self::test2::N1> m4 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t73 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t74 = n2;
+    if(!#t74.{core::Object::==}(null))
+      for (final core::MapEntry<self::test2::N1, self::test2::N1> #t75 in #t74{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
+        #t73.{core::Map::[]=}(#t75.{core::MapEntry::key}, #t75.{core::MapEntry::value});
+    #t73.{core::Map::[]=}(n1, n1);
+  } =>#t73;
+  core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
+  var m5 = {...n3, n1: n1};
+               ^": null, n1: n1};
+  core::Map<self::test2::N1, self::test2::N1> m6 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t76 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t77 = n3;
+    if(!#t77.{core::Object::==}(null))
+      for (final core::MapEntry<self::test2::N1, self::test2::N1> #t78 in #t77{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries})
+        #t76.{core::Map::[]=}(#t78.{core::MapEntry::key}, #t78.{core::MapEntry::value});
+    #t76.{core::Map::[]=}(n1, n1);
+  } =>#t76;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect
new file mode 100644
index 0000000..f24f351
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect
@@ -0,0 +1,375 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var l2 = [...?n1];
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
+//   var l3 = [...n2];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
+//   var l5 = [...n3];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var s2 = {...?n1, n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
+//   var s3 = {...n2, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
+//   var s5 = {...n3, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null.
+//   var m2 = {...?n1, n1: n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
+//   var m3 = {...n2, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
+//   var m5 = {...n3, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var l2 = [...?n1];
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
+//   var l3 = [...n2];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
+//   var l5 = [...n3];
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var s2 = {...?n1, n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
+//   var s3 = {...n2, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
+//   var s5 = {...n3, n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null.
+//   var m2 = {...?n1, n1: n1};
+//                 ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
+//   var m3 = {...n2, n1: n1};
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
+//   var m5 = {...n3, n1: n1};
+//                ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method test1(Never n1, Never? n2, core::Null? n3) → dynamic {
+  core::List<Never> l1 = block {
+    final core::List<Never> #t1 = <Never>[];
+    for (final Never #t2 in n1)
+      #t1.{core::List::add}(#t2);
+  } =>#t1;
+  core::List<Never> l2 = block {
+    final core::List<Never> #t3 = <Never>[];
+    final core::Iterable<Never>? #t4 = n1;
+    if(!#t4.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t4{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t5 = :sync-for-iterator.{core::Iterator::current};
+        #t3.{core::List::add}(#t5);
+      }
+    }
+  } =>#t3;
+  core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'.
+  var l3 = [...n2];
+               ^"];
+  core::List<Never> l4 = block {
+    final core::List<Never> #t6 = <Never>[];
+    final core::Iterable<Never>? #t7 = n2;
+    if(!#t7.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t7{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t8 = :sync-for-iterator.{core::Iterator::current};
+        #t6.{core::List::add}(#t8);
+      }
+    }
+  } =>#t6;
+  core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:10:16: Error: Can't spread a value with static type 'Null'.
+  var l5 = [...n3];
+               ^"];
+  core::List<Never> l6 = block {
+    final core::List<Never> #t9 = <Never>[];
+    final core::Iterable<Never>? #t10 = n3;
+    if(!#t10.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t10{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t11 = :sync-for-iterator.{core::Iterator::current};
+        #t9.{core::List::add}(#t11);
+      }
+    }
+  } =>#t9;
+  core::Set<Never> s1 = block {
+    final core::Set<Never> #t12 = col::LinkedHashSet::•<Never>();
+    for (final Never #t13 in n1)
+      #t12.{core::Set::add}(#t13);
+    #t12.{core::Set::add}(n1);
+  } =>#t12;
+  core::Set<Never> s2 = block {
+    final core::Set<Never> #t14 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t15 = n1;
+    if(!#t15.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t15{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t16 = :sync-for-iterator.{core::Iterator::current};
+        #t14.{core::Set::add}(#t16);
+      }
+    }
+    #t14.{core::Set::add}(n1);
+  } =>#t14;
+  core::Set<dynamic> s3 = let final core::Set<dynamic> #t17 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t18 = #t17.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'.
+  var s3 = {...n2, n1};
+               ^") in let final core::bool #t19 = #t17.{core::Set::add}(n1) in #t17;
+  core::Set<Never> s4 = block {
+    final core::Set<Never> #t20 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t21 = n2;
+    if(!#t21.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t21{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t22 = :sync-for-iterator.{core::Iterator::current};
+        #t20.{core::Set::add}(#t22);
+      }
+    }
+    #t20.{core::Set::add}(n1);
+  } =>#t20;
+  core::Set<dynamic> s5 = let final core::Set<dynamic> #t23 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t24 = #t23.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:16:16: Error: Can't spread a value with static type 'Null'.
+  var s5 = {...n3, n1};
+               ^") in let final core::bool #t25 = #t23.{core::Set::add}(n1) in #t23;
+  core::Set<Never> s6 = block {
+    final core::Set<Never> #t26 = col::LinkedHashSet::•<Never>();
+    final core::Iterable<Never>? #t27 = n3;
+    if(!#t27.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t27{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t28 = :sync-for-iterator.{core::Iterator::current};
+        #t26.{core::Set::add}(#t28);
+      }
+    }
+    #t26.{core::Set::add}(n1);
+  } =>#t26;
+  core::Map<Never, Never> m1 = block {
+    final core::Map<Never, Never> #t29 = <Never, Never>{};
+    {
+      core::Iterator<core::MapEntry<<BottomType>, <BottomType>>> :sync-for-iterator = n1.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<Never, Never> #t30 = :sync-for-iterator.{core::Iterator::current};
+        #t29.{core::Map::[]=}(#t30.{core::MapEntry::key}, #t30.{core::MapEntry::value});
+      }
+    }
+    #t29.{core::Map::[]=}(n1, n1);
+  } =>#t29;
+  core::Map<Never, Never> m2 = block {
+    final core::Map<Never, Never> #t31 = <Never, Never>{};
+    final core::Map<Never, Never>? #t32 = n1;
+    if(!#t32.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t32{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<Never, Never> #t33 = :sync-for-iterator.{core::Iterator::current};
+        #t31.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+      }
+    }
+    #t31.{core::Map::[]=}(n1, n1);
+  } =>#t31;
+  core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'.
+  var m3 = {...n2, n1: n1};
+               ^": null, n1: n1};
+  core::Map<Never, Never> m4 = block {
+    final core::Map<Never, Never> #t34 = <Never, Never>{};
+    final core::Map<Never, Never>? #t35 = n2;
+    if(!#t35.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t35{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<Never, Never> #t36 = :sync-for-iterator.{core::Iterator::current};
+        #t34.{core::Map::[]=}(#t36.{core::MapEntry::key}, #t36.{core::MapEntry::value});
+      }
+    }
+    #t34.{core::Map::[]=}(n1, n1);
+  } =>#t34;
+  core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:22:16: Error: Can't spread a value with static type 'Null'.
+  var m5 = {...n3, n1: n1};
+               ^": null, n1: n1};
+  core::Map<Never, Never> m6 = block {
+    final core::Map<Never, Never> #t37 = <Never, Never>{};
+    final core::Map<Never, Never>? #t38 = n3;
+    if(!#t38.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<Never, Never>> :sync-for-iterator = #t38{core::Map<Never, Never>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<Never, Never> #t39 = :sync-for-iterator.{core::Iterator::current};
+        #t37.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+      }
+    }
+    #t37.{core::Map::[]=}(n1, n1);
+  } =>#t37;
+}
+static method test2<N1 extends Never = Never, N2 extends Never? = Never?, N3 extends core::Null? = core::Null?>(self::test2::N1 n1, self::test2::N2% n2, self::test2::N3% n3) → dynamic {
+  core::List<Never> l1 = block {
+    final core::List<Never> #t40 = <Never>[];
+    for (final Never #t41 in n1)
+      #t40.{core::List::add}(#t41);
+  } =>#t40;
+  core::List<Never> l2 = block {
+    final core::List<Never> #t42 = <Never>[];
+    final core::Iterable<Never>? #t43 = n1;
+    if(!#t43.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t43{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t44 = :sync-for-iterator.{core::Iterator::current};
+        #t42.{core::List::add}(#t44);
+      }
+    }
+  } =>#t42;
+  core::List<dynamic> l3 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'.
+  var l3 = [...n2];
+               ^"];
+  core::List<Never> l4 = block {
+    final core::List<Never> #t45 = <Never>[];
+    final core::Iterable<Never>? #t46 = n2;
+    if(!#t46.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t46{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t47 = :sync-for-iterator.{core::Iterator::current};
+        #t45.{core::List::add}(#t47);
+      }
+    }
+  } =>#t45;
+  core::List<dynamic> l5 = <dynamic>[invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:32:16: Error: Can't spread a value with static type 'N3'.
+  var l5 = [...n3];
+               ^"];
+  core::List<Never> l6 = block {
+    final core::List<Never> #t48 = <Never>[];
+    final core::Iterable<Never>? #t49 = n3;
+    if(!#t49.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t49{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t50 = :sync-for-iterator.{core::Iterator::current};
+        #t48.{core::List::add}(#t50);
+      }
+    }
+  } =>#t48;
+  core::Set<self::test2::N1> s1 = block {
+    final core::Set<self::test2::N1> #t51 = col::LinkedHashSet::•<self::test2::N1>();
+    for (final self::test2::N1 #t52 in n1)
+      #t51.{core::Set::add}(#t52);
+    #t51.{core::Set::add}(n1);
+  } =>#t51;
+  core::Set<self::test2::N1> s2 = block {
+    final core::Set<self::test2::N1> #t53 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t54 = n1;
+    if(!#t54.{core::Object::==}(null)) {
+      core::Iterator<self::test2::N1> :sync-for-iterator = #t54{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final self::test2::N1 #t55 = :sync-for-iterator.{core::Iterator::current};
+        #t53.{core::Set::add}(#t55);
+      }
+    }
+    #t53.{core::Set::add}(n1);
+  } =>#t53;
+  core::Set<dynamic> s3 = let final core::Set<dynamic> #t56 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t57 = #t56.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'.
+  var s3 = {...n2, n1};
+               ^") in let final core::bool #t58 = #t56.{core::Set::add}(n1) in #t56;
+  core::Set<self::test2::N1> s4 = block {
+    final core::Set<self::test2::N1> #t59 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t60 = n2;
+    if(!#t60.{core::Object::==}(null)) {
+      core::Iterator<self::test2::N1> :sync-for-iterator = #t60{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final self::test2::N1 #t61 = :sync-for-iterator.{core::Iterator::current};
+        #t59.{core::Set::add}(#t61);
+      }
+    }
+    #t59.{core::Set::add}(n1);
+  } =>#t59;
+  core::Set<dynamic> s5 = let final core::Set<dynamic> #t62 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:38:16: Error: Can't spread a value with static type 'N3'.
+  var s5 = {...n3, n1};
+               ^") in let final core::bool #t64 = #t62.{core::Set::add}(n1) in #t62;
+  core::Set<self::test2::N1> s6 = block {
+    final core::Set<self::test2::N1> #t65 = col::LinkedHashSet::•<self::test2::N1>();
+    final core::Iterable<self::test2::N1>? #t66 = n3;
+    if(!#t66.{core::Object::==}(null)) {
+      core::Iterator<self::test2::N1> :sync-for-iterator = #t66{core::Iterable<self::test2::N1>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final self::test2::N1 #t67 = :sync-for-iterator.{core::Iterator::current};
+        #t65.{core::Set::add}(#t67);
+      }
+    }
+    #t65.{core::Set::add}(n1);
+  } =>#t65;
+  core::Map<self::test2::N1, self::test2::N1> m1 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t68 = <self::test2::N1, self::test2::N1>{};
+    {
+      core::Iterator<core::MapEntry<<BottomType>, <BottomType>>> :sync-for-iterator = n1.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<self::test2::N1, self::test2::N1> #t69 = :sync-for-iterator.{core::Iterator::current};
+        #t68.{core::Map::[]=}(#t69.{core::MapEntry::key}, #t69.{core::MapEntry::value});
+      }
+    }
+    #t68.{core::Map::[]=}(n1, n1);
+  } =>#t68;
+  core::Map<self::test2::N1, self::test2::N1> m2 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t70 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t71 = n1;
+    if(!#t71.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t71{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<self::test2::N1, self::test2::N1> #t72 = :sync-for-iterator.{core::Iterator::current};
+        #t70.{core::Map::[]=}(#t72.{core::MapEntry::key}, #t72.{core::MapEntry::value});
+      }
+    }
+    #t70.{core::Map::[]=}(n1, n1);
+  } =>#t70;
+  core::Map<dynamic, dynamic> m3 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'.
+  var m3 = {...n2, n1: n1};
+               ^": null, n1: n1};
+  core::Map<self::test2::N1, self::test2::N1> m4 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t73 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t74 = n2;
+    if(!#t74.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t74{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<self::test2::N1, self::test2::N1> #t75 = :sync-for-iterator.{core::Iterator::current};
+        #t73.{core::Map::[]=}(#t75.{core::MapEntry::key}, #t75.{core::MapEntry::value});
+      }
+    }
+    #t73.{core::Map::[]=}(n1, n1);
+  } =>#t73;
+  core::Map<dynamic, dynamic> m5 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/nnbd/issue42758.dart:44:16: Error: Can't spread a value with static type 'N3'.
+  var m5 = {...n3, n1: n1};
+               ^": null, n1: n1};
+  core::Map<self::test2::N1, self::test2::N1> m6 = block {
+    final core::Map<self::test2::N1, self::test2::N1> #t76 = <self::test2::N1, self::test2::N1>{};
+    final core::Map<self::test2::N1, self::test2::N1>? #t77 = n3;
+    if(!#t77.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<self::test2::N1, self::test2::N1>> :sync-for-iterator = #t77{core::Map<self::test2::N1, self::test2::N1>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<self::test2::N1, self::test2::N1> #t78 = :sync-for-iterator.{core::Iterator::current};
+        #t76.{core::Map::[]=}(#t78.{core::MapEntry::key}, #t78.{core::MapEntry::value});
+      }
+    }
+    #t76.{core::Map::[]=}(n1, n1);
+  } =>#t76;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/never_calls.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/never_calls.dart.textual_outline.expect
new file mode 100644
index 0000000..54bd347
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/never_calls.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+propertyGet(Never never) {}
+propertySet(Never never) {}
+methodInvocation(Never never, Invocation invocation) {}
+equals(Never never) {}
+operator(Never never) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/never_calls.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/never_calls.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..4dcbb4a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/never_calls.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+equals(Never never) {}
+main() {}
+methodInvocation(Never never, Invocation invocation) {}
+operator(Never never) {}
+propertyGet(Never never) {}
+propertySet(Never never) {}
diff --git a/pkg/front_end/testcases/nnbd/never_equals.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/never_equals.dart.textual_outline.expect
new file mode 100644
index 0000000..a38ad66
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/never_equals.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+test(Never nonNullableNever, Never? nullableNever) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/never_equals.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/never_equals.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..d9aa494
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/never_equals.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+test(Never nonNullableNever, Never? nullableNever) {}
diff --git a/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.expect b/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.expect
index 40260d9..64f137e 100644
--- a/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.expect
@@ -22,42 +22,42 @@
 //   x?.[42] = 42; // Warning.
 //   ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing method, or defining a method named 'foo'.
 //   y.foo(); // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'bar'.
 //   y.bar; // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
 //   y.baz = 42; // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
 //   y(); // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '+' operator.
 //   y++; // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '+' operator.
 //   y += 1; // Error.
 //     ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '[]' operator.
 //   y[42]; // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '[]=' operator.
 //   y[42] = 42; // Error.
 //    ^
@@ -87,35 +87,35 @@
   let final Never #t9 = x in #t9.{core::Object::==}(null) ?{core::int?} null : #t9.baz = 42;
   let final Never #t10 = x in #t10.{core::Object::==}(null) ?{core::Null?} null : #t10.[](42);
   let final Never #t11 = x in #t11.{core::Object::==}(null) ?{core::int?} null : #t11.[]=(42, 42);
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing method, or defining a method named 'foo'.
   y.foo(); // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'bar'.
   y.bar; // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
   y.baz = 42; // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
   y(); // Error.
    ^";
-  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never'.
+  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '+' operator.
   y++; // Error.
    ^" as{TypeError,ForDynamic,ForNonNullableByDefault} Never?;
-  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never'.
+  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '+' operator.
   y += 1; // Error.
     ^" as{TypeError,ForDynamic,ForNonNullableByDefault} Never?;
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '[]' operator.
   y[42]; // Error.
    ^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '[]=' operator.
   y[42] = 42; // Error.
    ^";
diff --git a/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.transformed.expect
index 1eb7ae3..2a5f9c5 100644
--- a/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.transformed.expect
@@ -22,42 +22,42 @@
 //   x?.[42] = 42; // Warning.
 //   ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing method, or defining a method named 'foo'.
 //   y.foo(); // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'bar'.
 //   y.bar; // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
 //   y.baz = 42; // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
 //   y(); // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '+' operator.
 //   y++; // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '+' operator.
 //   y += 1; // Error.
 //     ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '[]' operator.
 //   y[42]; // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '[]=' operator.
 //   y[42] = 42; // Error.
 //    ^
@@ -87,35 +87,35 @@
   let final Never #t9 = x in #t9.{core::Object::==}(null) ?{core::int?} null : #t9.baz = 42;
   let final Never #t10 = x in #t10.{core::Object::==}(null) ?{core::Null?} null : #t10.[](42);
   let final Never #t11 = x in #t11.{core::Object::==}(null) ?{core::int?} null : #t11.[]=(42, 42);
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing method, or defining a method named 'foo'.
   y.foo(); // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'bar'.
   y.bar; // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
   y.baz = 42; // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
   y(); // Error.
    ^";
-  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never'.
+  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '+' operator.
   y++; // Error.
    ^";
-  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never'.
+  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '+' operator.
   y += 1; // Error.
     ^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '[]' operator.
   y[42]; // Error.
    ^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '[]=' operator.
   y[42] = 42; // Error.
    ^";
diff --git a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.expect b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.expect
index 40260d9..64f137e 100644
--- a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.expect
@@ -22,42 +22,42 @@
 //   x?.[42] = 42; // Warning.
 //   ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing method, or defining a method named 'foo'.
 //   y.foo(); // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'bar'.
 //   y.bar; // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
 //   y.baz = 42; // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
 //   y(); // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '+' operator.
 //   y++; // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '+' operator.
 //   y += 1; // Error.
 //     ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '[]' operator.
 //   y[42]; // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '[]=' operator.
 //   y[42] = 42; // Error.
 //    ^
@@ -87,35 +87,35 @@
   let final Never #t9 = x in #t9.{core::Object::==}(null) ?{core::int?} null : #t9.baz = 42;
   let final Never #t10 = x in #t10.{core::Object::==}(null) ?{core::Null?} null : #t10.[](42);
   let final Never #t11 = x in #t11.{core::Object::==}(null) ?{core::int?} null : #t11.[]=(42, 42);
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing method, or defining a method named 'foo'.
   y.foo(); // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'bar'.
   y.bar; // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
   y.baz = 42; // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
   y(); // Error.
    ^";
-  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never'.
+  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '+' operator.
   y++; // Error.
    ^" as{TypeError,ForDynamic,ForNonNullableByDefault} Never?;
-  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never'.
+  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '+' operator.
   y += 1; // Error.
     ^" as{TypeError,ForDynamic,ForNonNullableByDefault} Never?;
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '[]' operator.
   y[42]; // Error.
    ^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '[]=' operator.
   y[42] = 42; // Error.
    ^";
diff --git a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.transformed.expect
index 1eb7ae3..2a5f9c5 100644
--- a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.transformed.expect
@@ -22,42 +22,42 @@
 //   x?.[42] = 42; // Warning.
 //   ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing method, or defining a method named 'foo'.
 //   y.foo(); // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'bar'.
 //   y.bar; // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
 //   y.baz = 42; // Error.
 //     ^^^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never?'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
 //   y(); // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '+' operator.
 //   y++; // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '+' operator.
 //   y += 1; // Error.
 //     ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '[]' operator.
 //   y[42]; // Error.
 //    ^
 //
-// pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never'.
+// pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never?'.
 // Try correcting the operator to an existing operator, or defining a '[]=' operator.
 //   y[42] = 42; // Error.
 //    ^
@@ -87,35 +87,35 @@
   let final Never #t9 = x in #t9.{core::Object::==}(null) ?{core::int?} null : #t9.baz = 42;
   let final Never #t10 = x in #t10.{core::Object::==}(null) ?{core::Null?} null : #t10.[](42);
   let final Never #t11 = x in #t11.{core::Object::==}(null) ?{core::int?} null : #t11.[]=(42, 42);
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing method, or defining a method named 'foo'.
   y.foo(); // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:31:5: Error: The getter 'bar' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'bar'.
   y.bar; // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:32:5: Error: The setter 'baz' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing setter, or defining a setter or field named 'baz'.
   y.baz = 42; // Error.
     ^^^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:33:4: Error: The method 'call' isn't defined for the class 'Never?'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
   y(); // Error.
    ^";
-  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never'.
+  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:34:4: Error: The operator '+' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '+' operator.
   y++; // Error.
    ^";
-  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never'.
+  y = invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:35:5: Error: The operator '+' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '+' operator.
   y += 1; // Error.
     ^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:36:4: Error: The operator '[]' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '[]' operator.
   y[42]; // Error.
    ^";
-  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never'.
+  invalid-expression "pkg/front_end/testcases/nnbd/never_receiver.dart:37:4: Error: The operator '[]=' isn't defined for the class 'Never?'.
 Try correcting the operator to an existing operator, or defining a '[]=' operator.
   y[42] = 42; // Error.
    ^";
diff --git a/pkg/front_end/testcases/nnbd/null_access.dart.strong.expect b/pkg/front_end/testcases/nnbd/null_access.dart.strong.expect
index 066a5f6..6c5d89f 100644
--- a/pkg/front_end/testcases/nnbd/null_access.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/null_access.dart.strong.expect
@@ -62,10 +62,18 @@
 //   nonNullableClass.nullableField += 2; // error
 //                                  ^
 //
+// pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+//   nonNullableClass.nullableField += 2; // error
+//                                  ^
+//
 // pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 //   nullableClass?.nullableField += 2; // error
 //                                ^
 //
+// pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+//   nullableClass?.nullableField += 2; // error
+//                                ^
+//
 // pkg/front_end/testcases/nnbd/null_access.dart:54:35: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null.
 //   nullableClass?.nonNullableClass.nonNullableField ??= 0; // ok
 //                                   ^
@@ -171,22 +179,26 @@
   let final self::Class? #t28 = nullableClass in #t28.{core::Object::==}(null) ?{core::int?} null : #t28.{self::Class::nonNullableField} = #t28.{self::Class::nonNullableField}.{core::num::+}(2);
   let final self::Class? #t29 = nullableClass in #t29.{core::Object::==}(null) ?{core::int?} null : #t29{self::Class}.{self::Class::nonNullableClass}.{self::Class::nonNullableField};
   let final self::Class? #t30 = nullableClass in #t30.{core::Object::==}(null) ?{core::int?} null : #t30{self::Class}.{self::Class::nonNullableClass}.{self::Class::nonNullableField} = 2;
-  let final self::Class #t31 = nonNullableClass in #t31.{self::Class::nullableField} = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  let final self::Class #t31 = nonNullableClass in #t31.{self::Class::nullableField} = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
   nonNullableClass.nullableField += 2; // error
-                                 ^" in #t31.{self::Class::nullableField}.{core::num::+}(2);
-  let final self::Class? #t33 = nullableClass in #t33.{core::Object::==}(null) ?{core::int?} null : #t33.{self::Class::nullableField} = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+                                 ^" in (let final<BottomType> #t33 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  nonNullableClass.nullableField += 2; // error
+                                 ^" in #t31.{self::Class::nullableField}.{core::num::+}(2)) as{TypeError,ForNonNullableByDefault} core::int?;
+  let final self::Class? #t34 = nullableClass in #t34.{core::Object::==}(null) ?{core::num?} null : #t34.{self::Class::nullableField} = let final<BottomType> #t35 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
   nullableClass?.nullableField += 2; // error
-                               ^" in #t33.{self::Class::nullableField}.{core::num::+}(2);
-  let final self::Class? #t35 = nullableClass in #t35.{core::Object::==}(null) ?{core::int?} null : #t35.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t35.{self::Class::nonNullableField} = 0 : null;
-  let final self::Class? #t36 = nullableClass in #t36.{core::Object::==}(null) ?{core::int?} null : #t36.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t36.{self::Class::nullableField} = 0 : null;
-  let final self::Class? #t37 = nullableClass in #t37.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t38 = #t37{self::Class}.{self::Class::nonNullableClass} in #t38{self::Class}.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t38{self::Class}.{self::Class::nonNullableField} = 0 : null;
-  let final self::Class? #t39 = nullableClass in #t39.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t40 = #t39{self::Class}.{self::Class::nonNullableClass} in #t40{self::Class}.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t40{self::Class}.{self::Class::nullableField} = 0 : null;
-  let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null.
+                               ^" in (let final<BottomType> #t36 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  nullableClass?.nullableField += 2; // error
+                               ^" in #t34.{self::Class::nullableField}.{core::num::+}(2)) as{TypeError,ForNonNullableByDefault} core::int?;
+  let final self::Class? #t37 = nullableClass in #t37.{core::Object::==}(null) ?{core::int?} null : #t37.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t37.{self::Class::nonNullableField} = 0 : null;
+  let final self::Class? #t38 = nullableClass in #t38.{core::Object::==}(null) ?{core::int?} null : #t38.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t38.{self::Class::nullableField} = 0 : null;
+  let final self::Class? #t39 = nullableClass in #t39.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t40 = #t39{self::Class}.{self::Class::nonNullableClass} in #t40{self::Class}.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t40{self::Class}.{self::Class::nonNullableField} = 0 : null;
+  let final self::Class? #t41 = nullableClass in #t41.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t42 = #t41{self::Class}.{self::Class::nonNullableClass} in #t42{self::Class}.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t42{self::Class}.{self::Class::nullableField} = 0 : null;
+  let final<BottomType> #t43 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null.
  - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'.
 Try calling using ?.call instead.
   nullableClass(); // error
                ^" in nullableClass.{self::Class::call}();
   nonNullableClass.{self::Class::call}();
-  let final self::Class #t42 = nonNullableClass in #t42.{core::Object::==}(null) ?{self::Class?} null : #t42.{self::Class::nonNullableClass}.{self::Class::call}();
-  let final self::Class #t43 = nonNullableClass in #t43.{core::Object::==}(null) ?{self::Class?} null : #t43.{self::Class::nonNullableClass}.{self::Class::nonNullableClass}.{self::Class::call}();
+  let final self::Class #t44 = nonNullableClass in #t44.{core::Object::==}(null) ?{self::Class?} null : #t44.{self::Class::nonNullableClass}.{self::Class::call}();
+  let final self::Class #t45 = nonNullableClass in #t45.{core::Object::==}(null) ?{self::Class?} null : #t45.{self::Class::nonNullableClass}.{self::Class::nonNullableClass}.{self::Class::call}();
 }
diff --git a/pkg/front_end/testcases/nnbd/null_access.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/null_access.dart.strong.transformed.expect
index 066a5f6..980d82f 100644
--- a/pkg/front_end/testcases/nnbd/null_access.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/null_access.dart.strong.transformed.expect
@@ -62,10 +62,18 @@
 //   nonNullableClass.nullableField += 2; // error
 //                                  ^
 //
+// pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+//   nonNullableClass.nullableField += 2; // error
+//                                  ^
+//
 // pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 //   nullableClass?.nullableField += 2; // error
 //                                ^
 //
+// pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+//   nullableClass?.nullableField += 2; // error
+//                                ^
+//
 // pkg/front_end/testcases/nnbd/null_access.dart:54:35: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null.
 //   nullableClass?.nonNullableClass.nonNullableField ??= 0; // ok
 //                                   ^
@@ -171,22 +179,26 @@
   let final self::Class? #t28 = nullableClass in #t28.{core::Object::==}(null) ?{core::int?} null : #t28.{self::Class::nonNullableField} = #t28.{self::Class::nonNullableField}.{core::num::+}(2);
   let final self::Class? #t29 = nullableClass in #t29.{core::Object::==}(null) ?{core::int?} null : #t29{self::Class}.{self::Class::nonNullableClass}.{self::Class::nonNullableField};
   let final self::Class? #t30 = nullableClass in #t30.{core::Object::==}(null) ?{core::int?} null : #t30{self::Class}.{self::Class::nonNullableClass}.{self::Class::nonNullableField} = 2;
-  let final self::Class #t31 = nonNullableClass in #t31.{self::Class::nullableField} = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  let final self::Class #t31 = nonNullableClass in #t31.{self::Class::nullableField} = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+  nonNullableClass.nullableField += 2; // error
+                                 ^" in let final<BottomType> #t33 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   nonNullableClass.nullableField += 2; // error
                                  ^" in #t31.{self::Class::nullableField}.{core::num::+}(2);
-  let final self::Class? #t33 = nullableClass in #t33.{core::Object::==}(null) ?{core::int?} null : #t33.{self::Class::nullableField} = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  let final self::Class? #t34 = nullableClass in #t34.{core::Object::==}(null) ?{core::num?} null : #t34.{self::Class::nullableField} = let final<BottomType> #t35 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
   nullableClass?.nullableField += 2; // error
-                               ^" in #t33.{self::Class::nullableField}.{core::num::+}(2);
-  let final self::Class? #t35 = nullableClass in #t35.{core::Object::==}(null) ?{core::int?} null : #t35.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t35.{self::Class::nonNullableField} = 0 : null;
-  let final self::Class? #t36 = nullableClass in #t36.{core::Object::==}(null) ?{core::int?} null : #t36.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t36.{self::Class::nullableField} = 0 : null;
-  let final self::Class? #t37 = nullableClass in #t37.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t38 = #t37{self::Class}.{self::Class::nonNullableClass} in #t38{self::Class}.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t38{self::Class}.{self::Class::nonNullableField} = 0 : null;
-  let final self::Class? #t39 = nullableClass in #t39.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t40 = #t39{self::Class}.{self::Class::nonNullableClass} in #t40{self::Class}.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t40{self::Class}.{self::Class::nullableField} = 0 : null;
-  let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null.
+                               ^" in let final<BottomType> #t36 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  nullableClass?.nullableField += 2; // error
+                               ^" in #t34.{self::Class::nullableField}.{core::num::+}(2);
+  let final self::Class? #t37 = nullableClass in #t37.{core::Object::==}(null) ?{core::int?} null : #t37.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t37.{self::Class::nonNullableField} = 0 : null;
+  let final self::Class? #t38 = nullableClass in #t38.{core::Object::==}(null) ?{core::int?} null : #t38.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t38.{self::Class::nullableField} = 0 : null;
+  let final self::Class? #t39 = nullableClass in #t39.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t40 = #t39{self::Class}.{self::Class::nonNullableClass} in #t40{self::Class}.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t40{self::Class}.{self::Class::nonNullableField} = 0 : null;
+  let final self::Class? #t41 = nullableClass in #t41.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t42 = #t41{self::Class}.{self::Class::nonNullableClass} in #t42{self::Class}.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t42{self::Class}.{self::Class::nullableField} = 0 : null;
+  let final<BottomType> #t43 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null.
  - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'.
 Try calling using ?.call instead.
   nullableClass(); // error
                ^" in nullableClass.{self::Class::call}();
   nonNullableClass.{self::Class::call}();
-  let final self::Class #t42 = nonNullableClass in #t42.{core::Object::==}(null) ?{self::Class?} null : #t42.{self::Class::nonNullableClass}.{self::Class::call}();
-  let final self::Class #t43 = nonNullableClass in #t43.{core::Object::==}(null) ?{self::Class?} null : #t43.{self::Class::nonNullableClass}.{self::Class::nonNullableClass}.{self::Class::call}();
+  let final self::Class #t44 = nonNullableClass in #t44.{core::Object::==}(null) ?{self::Class?} null : #t44.{self::Class::nonNullableClass}.{self::Class::call}();
+  let final self::Class #t45 = nonNullableClass in #t45.{core::Object::==}(null) ?{self::Class?} null : #t45.{self::Class::nonNullableClass}.{self::Class::nonNullableClass}.{self::Class::call}();
 }
diff --git a/pkg/front_end/testcases/nnbd/null_access.dart.weak.expect b/pkg/front_end/testcases/nnbd/null_access.dart.weak.expect
index 066a5f6..6c5d89f 100644
--- a/pkg/front_end/testcases/nnbd/null_access.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/null_access.dart.weak.expect
@@ -62,10 +62,18 @@
 //   nonNullableClass.nullableField += 2; // error
 //                                  ^
 //
+// pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+//   nonNullableClass.nullableField += 2; // error
+//                                  ^
+//
 // pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 //   nullableClass?.nullableField += 2; // error
 //                                ^
 //
+// pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+//   nullableClass?.nullableField += 2; // error
+//                                ^
+//
 // pkg/front_end/testcases/nnbd/null_access.dart:54:35: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null.
 //   nullableClass?.nonNullableClass.nonNullableField ??= 0; // ok
 //                                   ^
@@ -171,22 +179,26 @@
   let final self::Class? #t28 = nullableClass in #t28.{core::Object::==}(null) ?{core::int?} null : #t28.{self::Class::nonNullableField} = #t28.{self::Class::nonNullableField}.{core::num::+}(2);
   let final self::Class? #t29 = nullableClass in #t29.{core::Object::==}(null) ?{core::int?} null : #t29{self::Class}.{self::Class::nonNullableClass}.{self::Class::nonNullableField};
   let final self::Class? #t30 = nullableClass in #t30.{core::Object::==}(null) ?{core::int?} null : #t30{self::Class}.{self::Class::nonNullableClass}.{self::Class::nonNullableField} = 2;
-  let final self::Class #t31 = nonNullableClass in #t31.{self::Class::nullableField} = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  let final self::Class #t31 = nonNullableClass in #t31.{self::Class::nullableField} = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
   nonNullableClass.nullableField += 2; // error
-                                 ^" in #t31.{self::Class::nullableField}.{core::num::+}(2);
-  let final self::Class? #t33 = nullableClass in #t33.{core::Object::==}(null) ?{core::int?} null : #t33.{self::Class::nullableField} = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+                                 ^" in (let final<BottomType> #t33 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  nonNullableClass.nullableField += 2; // error
+                                 ^" in #t31.{self::Class::nullableField}.{core::num::+}(2)) as{TypeError,ForNonNullableByDefault} core::int?;
+  let final self::Class? #t34 = nullableClass in #t34.{core::Object::==}(null) ?{core::num?} null : #t34.{self::Class::nullableField} = let final<BottomType> #t35 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
   nullableClass?.nullableField += 2; // error
-                               ^" in #t33.{self::Class::nullableField}.{core::num::+}(2);
-  let final self::Class? #t35 = nullableClass in #t35.{core::Object::==}(null) ?{core::int?} null : #t35.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t35.{self::Class::nonNullableField} = 0 : null;
-  let final self::Class? #t36 = nullableClass in #t36.{core::Object::==}(null) ?{core::int?} null : #t36.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t36.{self::Class::nullableField} = 0 : null;
-  let final self::Class? #t37 = nullableClass in #t37.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t38 = #t37{self::Class}.{self::Class::nonNullableClass} in #t38{self::Class}.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t38{self::Class}.{self::Class::nonNullableField} = 0 : null;
-  let final self::Class? #t39 = nullableClass in #t39.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t40 = #t39{self::Class}.{self::Class::nonNullableClass} in #t40{self::Class}.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t40{self::Class}.{self::Class::nullableField} = 0 : null;
-  let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null.
+                               ^" in (let final<BottomType> #t36 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  nullableClass?.nullableField += 2; // error
+                               ^" in #t34.{self::Class::nullableField}.{core::num::+}(2)) as{TypeError,ForNonNullableByDefault} core::int?;
+  let final self::Class? #t37 = nullableClass in #t37.{core::Object::==}(null) ?{core::int?} null : #t37.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t37.{self::Class::nonNullableField} = 0 : null;
+  let final self::Class? #t38 = nullableClass in #t38.{core::Object::==}(null) ?{core::int?} null : #t38.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t38.{self::Class::nullableField} = 0 : null;
+  let final self::Class? #t39 = nullableClass in #t39.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t40 = #t39{self::Class}.{self::Class::nonNullableClass} in #t40{self::Class}.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t40{self::Class}.{self::Class::nonNullableField} = 0 : null;
+  let final self::Class? #t41 = nullableClass in #t41.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t42 = #t41{self::Class}.{self::Class::nonNullableClass} in #t42{self::Class}.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t42{self::Class}.{self::Class::nullableField} = 0 : null;
+  let final<BottomType> #t43 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null.
  - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'.
 Try calling using ?.call instead.
   nullableClass(); // error
                ^" in nullableClass.{self::Class::call}();
   nonNullableClass.{self::Class::call}();
-  let final self::Class #t42 = nonNullableClass in #t42.{core::Object::==}(null) ?{self::Class?} null : #t42.{self::Class::nonNullableClass}.{self::Class::call}();
-  let final self::Class #t43 = nonNullableClass in #t43.{core::Object::==}(null) ?{self::Class?} null : #t43.{self::Class::nonNullableClass}.{self::Class::nonNullableClass}.{self::Class::call}();
+  let final self::Class #t44 = nonNullableClass in #t44.{core::Object::==}(null) ?{self::Class?} null : #t44.{self::Class::nonNullableClass}.{self::Class::call}();
+  let final self::Class #t45 = nonNullableClass in #t45.{core::Object::==}(null) ?{self::Class?} null : #t45.{self::Class::nonNullableClass}.{self::Class::nonNullableClass}.{self::Class::call}();
 }
diff --git a/pkg/front_end/testcases/nnbd/null_access.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/null_access.dart.weak.transformed.expect
index 066a5f6..980d82f 100644
--- a/pkg/front_end/testcases/nnbd/null_access.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/null_access.dart.weak.transformed.expect
@@ -62,10 +62,18 @@
 //   nonNullableClass.nullableField += 2; // error
 //                                  ^
 //
+// pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+//   nonNullableClass.nullableField += 2; // error
+//                                  ^
+//
 // pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 //   nullableClass?.nullableField += 2; // error
 //                                ^
 //
+// pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+//   nullableClass?.nullableField += 2; // error
+//                                ^
+//
 // pkg/front_end/testcases/nnbd/null_access.dart:54:35: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null.
 //   nullableClass?.nonNullableClass.nonNullableField ??= 0; // ok
 //                                   ^
@@ -171,22 +179,26 @@
   let final self::Class? #t28 = nullableClass in #t28.{core::Object::==}(null) ?{core::int?} null : #t28.{self::Class::nonNullableField} = #t28.{self::Class::nonNullableField}.{core::num::+}(2);
   let final self::Class? #t29 = nullableClass in #t29.{core::Object::==}(null) ?{core::int?} null : #t29{self::Class}.{self::Class::nonNullableClass}.{self::Class::nonNullableField};
   let final self::Class? #t30 = nullableClass in #t30.{core::Object::==}(null) ?{core::int?} null : #t30{self::Class}.{self::Class::nonNullableClass}.{self::Class::nonNullableField} = 2;
-  let final self::Class #t31 = nonNullableClass in #t31.{self::Class::nullableField} = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  let final self::Class #t31 = nonNullableClass in #t31.{self::Class::nullableField} = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
+  nonNullableClass.nullableField += 2; // error
+                                 ^" in let final<BottomType> #t33 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:48:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   nonNullableClass.nullableField += 2; // error
                                  ^" in #t31.{self::Class::nullableField}.{core::num::+}(2);
-  let final self::Class? #t33 = nullableClass in #t33.{core::Object::==}(null) ?{core::int?} null : #t33.{self::Class::nullableField} = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  let final self::Class? #t34 = nullableClass in #t34.{core::Object::==}(null) ?{core::num?} null : #t34.{self::Class::nullableField} = let final<BottomType> #t35 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: A value of type 'num' can't be assigned to a variable of type 'int?'.
   nullableClass?.nullableField += 2; // error
-                               ^" in #t33.{self::Class::nullableField}.{core::num::+}(2);
-  let final self::Class? #t35 = nullableClass in #t35.{core::Object::==}(null) ?{core::int?} null : #t35.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t35.{self::Class::nonNullableField} = 0 : null;
-  let final self::Class? #t36 = nullableClass in #t36.{core::Object::==}(null) ?{core::int?} null : #t36.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t36.{self::Class::nullableField} = 0 : null;
-  let final self::Class? #t37 = nullableClass in #t37.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t38 = #t37{self::Class}.{self::Class::nonNullableClass} in #t38{self::Class}.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t38{self::Class}.{self::Class::nonNullableField} = 0 : null;
-  let final self::Class? #t39 = nullableClass in #t39.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t40 = #t39{self::Class}.{self::Class::nonNullableClass} in #t40{self::Class}.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t40{self::Class}.{self::Class::nullableField} = 0 : null;
-  let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null.
+                               ^" in let final<BottomType> #t36 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:49:32: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  nullableClass?.nullableField += 2; // error
+                               ^" in #t34.{self::Class::nullableField}.{core::num::+}(2);
+  let final self::Class? #t37 = nullableClass in #t37.{core::Object::==}(null) ?{core::int?} null : #t37.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t37.{self::Class::nonNullableField} = 0 : null;
+  let final self::Class? #t38 = nullableClass in #t38.{core::Object::==}(null) ?{core::int?} null : #t38.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t38.{self::Class::nullableField} = 0 : null;
+  let final self::Class? #t39 = nullableClass in #t39.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t40 = #t39{self::Class}.{self::Class::nonNullableClass} in #t40{self::Class}.{self::Class::nonNullableField}.{core::num::==}(null) ?{core::int} #t40{self::Class}.{self::Class::nonNullableField} = 0 : null;
+  let final self::Class? #t41 = nullableClass in #t41.{core::Object::==}(null) ?{core::int?} null : let final self::Class? #t42 = #t41{self::Class}.{self::Class::nonNullableClass} in #t42{self::Class}.{self::Class::nullableField}.{core::num::==}(null) ?{core::int} #t42{self::Class}.{self::Class::nullableField} = 0 : null;
+  let final<BottomType> #t43 = invalid-expression "pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null.
  - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'.
 Try calling using ?.call instead.
   nullableClass(); // error
                ^" in nullableClass.{self::Class::call}();
   nonNullableClass.{self::Class::call}();
-  let final self::Class #t42 = nonNullableClass in #t42.{core::Object::==}(null) ?{self::Class?} null : #t42.{self::Class::nonNullableClass}.{self::Class::call}();
-  let final self::Class #t43 = nonNullableClass in #t43.{core::Object::==}(null) ?{self::Class?} null : #t43.{self::Class::nonNullableClass}.{self::Class::nonNullableClass}.{self::Class::call}();
+  let final self::Class #t44 = nonNullableClass in #t44.{core::Object::==}(null) ?{self::Class?} null : #t44.{self::Class::nonNullableClass}.{self::Class::call}();
+  let final self::Class #t45 = nonNullableClass in #t45.{core::Object::==}(null) ?{self::Class?} null : #t45.{self::Class::nonNullableClass}.{self::Class::nonNullableClass}.{self::Class::call}();
 }
diff --git a/pkg/front_end/testcases/nnbd/nullable_setter.dart b/pkg/front_end/testcases/nnbd/nullable_setter.dart
new file mode 100644
index 0000000..8e9d230
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_setter.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class C {
+  String m = "";
+  void set setter(String v) {}
+  void operator []=(int index, String value) {}
+}
+
+extension on C? {
+  void set setter(String v) {
+    this?.m = v;
+  }
+
+  void operator []=(int index, String value) {
+    this?.m = '$index$value';
+  }
+}
+
+main() {
+  C? c = new C();
+  expect("", c?.m);
+  c.setter = "42";
+  expect("42", c?.m);
+  c[42] = "87";
+  expect("4287", c?.m);
+}
+
+expect(expected, actual) {
+  if (expected != actual) throw 'Expected $expected, actual $actual';
+}
diff --git a/pkg/front_end/testcases/nnbd/nullable_setter.dart.outline.expect b/pkg/front_end/testcases/nnbd/nullable_setter.dart.outline.expect
new file mode 100644
index 0000000..3f88610
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_setter.dart.outline.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  field core::String m;
+  synthetic constructor •() → self::C
+    ;
+  set setter(core::String v) → void
+    ;
+  operator []=(core::int index, core::String value) → void
+    ;
+}
+extension _extension#0 on self::C? {
+  operator []= = self::_extension#0|[]=;
+  set setter = self::_extension#0|set#setter;
+}
+static method _extension#0|set#setter(final self::C? #this, core::String v) → void
+  ;
+static method _extension#0|[]=(final self::C? #this, core::int index, core::String value) → void
+  ;
+static method main() → dynamic
+  ;
+static method expect(dynamic expected, dynamic actual) → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/nullable_setter.dart.strong.expect b/pkg/front_end/testcases/nnbd/nullable_setter.dart.strong.expect
new file mode 100644
index 0000000..d367854
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_setter.dart.strong.expect
@@ -0,0 +1,34 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  field core::String m = "";
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  set setter(core::String v) → void {}
+  operator []=(core::int index, core::String value) → void {}
+}
+extension _extension#0 on self::C? {
+  operator []= = self::_extension#0|[]=;
+  set setter = self::_extension#0|set#setter;
+}
+static method _extension#0|set#setter(final self::C? #this, core::String v) → void {
+  let final self::C? #t1 = #this in #t1.{core::Object::==}(null) ?{core::String?} null : #t1{self::C}.{self::C::m} = v;
+}
+static method _extension#0|[]=(final self::C? #this, core::int index, core::String value) → void {
+  let final self::C? #t2 = #this in #t2.{core::Object::==}(null) ?{core::String?} null : #t2{self::C}.{self::C::m} = "${index}${value}";
+}
+static method main() → dynamic {
+  self::C? c = new self::C::•();
+  self::expect("", let final self::C? #t3 = c in #t3.{core::Object::==}(null) ?{core::String?} null : #t3{self::C}.{self::C::m});
+  self::_extension#0|set#setter(c, "42");
+  self::expect("42", let final self::C? #t4 = c in #t4.{core::Object::==}(null) ?{core::String?} null : #t4{self::C}.{self::C::m});
+  self::_extension#0|[]=(c, 42, "87");
+  self::expect("4287", let final self::C? #t5 = c in #t5.{core::Object::==}(null) ?{core::String?} null : #t5{self::C}.{self::C::m});
+}
+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_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/nullable_setter.dart.strong.transformed.expect
new file mode 100644
index 0000000..d367854
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_setter.dart.strong.transformed.expect
@@ -0,0 +1,34 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  field core::String m = "";
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  set setter(core::String v) → void {}
+  operator []=(core::int index, core::String value) → void {}
+}
+extension _extension#0 on self::C? {
+  operator []= = self::_extension#0|[]=;
+  set setter = self::_extension#0|set#setter;
+}
+static method _extension#0|set#setter(final self::C? #this, core::String v) → void {
+  let final self::C? #t1 = #this in #t1.{core::Object::==}(null) ?{core::String?} null : #t1{self::C}.{self::C::m} = v;
+}
+static method _extension#0|[]=(final self::C? #this, core::int index, core::String value) → void {
+  let final self::C? #t2 = #this in #t2.{core::Object::==}(null) ?{core::String?} null : #t2{self::C}.{self::C::m} = "${index}${value}";
+}
+static method main() → dynamic {
+  self::C? c = new self::C::•();
+  self::expect("", let final self::C? #t3 = c in #t3.{core::Object::==}(null) ?{core::String?} null : #t3{self::C}.{self::C::m});
+  self::_extension#0|set#setter(c, "42");
+  self::expect("42", let final self::C? #t4 = c in #t4.{core::Object::==}(null) ?{core::String?} null : #t4{self::C}.{self::C::m});
+  self::_extension#0|[]=(c, 42, "87");
+  self::expect("4287", let final self::C? #t5 = c in #t5.{core::Object::==}(null) ?{core::String?} null : #t5{self::C}.{self::C::m});
+}
+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_setter.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/nullable_setter.dart.textual_outline.expect
new file mode 100644
index 0000000..c1aeb83
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_setter.dart.textual_outline.expect
@@ -0,0 +1,10 @@
+class C {
+  String m = "";
+  void set setter(String v) { }
+  void operator []=(int index, String value) { }
+}
+extension on ;
+C;
+? { void set setter(String v) { this?.m = v; } void operator []=(int index, String value) { this?.m = '$index$value'; } }
+main() { }
+expect(expected, actual) { }
diff --git a/pkg/front_end/testcases/nnbd/nullable_setter.dart.weak.expect b/pkg/front_end/testcases/nnbd/nullable_setter.dart.weak.expect
new file mode 100644
index 0000000..d367854
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_setter.dart.weak.expect
@@ -0,0 +1,34 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  field core::String m = "";
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  set setter(core::String v) → void {}
+  operator []=(core::int index, core::String value) → void {}
+}
+extension _extension#0 on self::C? {
+  operator []= = self::_extension#0|[]=;
+  set setter = self::_extension#0|set#setter;
+}
+static method _extension#0|set#setter(final self::C? #this, core::String v) → void {
+  let final self::C? #t1 = #this in #t1.{core::Object::==}(null) ?{core::String?} null : #t1{self::C}.{self::C::m} = v;
+}
+static method _extension#0|[]=(final self::C? #this, core::int index, core::String value) → void {
+  let final self::C? #t2 = #this in #t2.{core::Object::==}(null) ?{core::String?} null : #t2{self::C}.{self::C::m} = "${index}${value}";
+}
+static method main() → dynamic {
+  self::C? c = new self::C::•();
+  self::expect("", let final self::C? #t3 = c in #t3.{core::Object::==}(null) ?{core::String?} null : #t3{self::C}.{self::C::m});
+  self::_extension#0|set#setter(c, "42");
+  self::expect("42", let final self::C? #t4 = c in #t4.{core::Object::==}(null) ?{core::String?} null : #t4{self::C}.{self::C::m});
+  self::_extension#0|[]=(c, 42, "87");
+  self::expect("4287", let final self::C? #t5 = c in #t5.{core::Object::==}(null) ?{core::String?} null : #t5{self::C}.{self::C::m});
+}
+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_setter.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/nullable_setter.dart.weak.transformed.expect
new file mode 100644
index 0000000..d367854
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_setter.dart.weak.transformed.expect
@@ -0,0 +1,34 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  field core::String m = "";
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  set setter(core::String v) → void {}
+  operator []=(core::int index, core::String value) → void {}
+}
+extension _extension#0 on self::C? {
+  operator []= = self::_extension#0|[]=;
+  set setter = self::_extension#0|set#setter;
+}
+static method _extension#0|set#setter(final self::C? #this, core::String v) → void {
+  let final self::C? #t1 = #this in #t1.{core::Object::==}(null) ?{core::String?} null : #t1{self::C}.{self::C::m} = v;
+}
+static method _extension#0|[]=(final self::C? #this, core::int index, core::String value) → void {
+  let final self::C? #t2 = #this in #t2.{core::Object::==}(null) ?{core::String?} null : #t2{self::C}.{self::C::m} = "${index}${value}";
+}
+static method main() → dynamic {
+  self::C? c = new self::C::•();
+  self::expect("", let final self::C? #t3 = c in #t3.{core::Object::==}(null) ?{core::String?} null : #t3{self::C}.{self::C::m});
+  self::_extension#0|set#setter(c, "42");
+  self::expect("42", let final self::C? #t4 = c in #t4.{core::Object::==}(null) ?{core::String?} null : #t4{self::C}.{self::C::m});
+  self::_extension#0|[]=(c, 42, "87");
+  self::expect("4287", let final self::C? #t5 = c in #t5.{core::Object::==}(null) ?{core::String?} null : #t5{self::C}.{self::C::m});
+}
+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/numbers.dart b/pkg/front_end/testcases/nnbd/numbers.dart
new file mode 100644
index 0000000..afd51a4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers.dart
@@ -0,0 +1,485 @@
+// 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.
+
+add<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  var n_n = n + n;
+  var n_i = n + i;
+  var n_d = n + d;
+  var n_x = n + x;
+  var n_y = n + y;
+  var n_z = n + z;
+
+  var i_n = i + n;
+  var i_i = i + i;
+  var i_d = i + d;
+  var i_x = i + x;
+  var i_y = i + y;
+  var i_z = i + z;
+
+  var d_n = d + n;
+  var d_i = d + i;
+  var d_d = d + d;
+  var d_x = d + x;
+  var d_y = d + y;
+  var d_z = d + z;
+
+  var x_n = x + n;
+  var x_i = x + i;
+  var x_d = x + d;
+  var x_x = x + x;
+  var x_y = x + y;
+  var x_z = x + z;
+
+  var y_n = y + n;
+  var y_i = y + i;
+  var y_d = y + d;
+  var y_x = y + x;
+  var y_y = y + y;
+  var y_z = y + z;
+
+  var z_n = z + n;
+  var z_i = z + i;
+  var z_d = z + d;
+  var z_x = z + x;
+  var z_y = z + y;
+  var z_z = z + z;
+}
+
+sub<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  var n_n = n - n;
+  var n_i = n - i;
+  var n_d = n - d;
+  var n_x = n - x;
+  var n_y = n - y;
+  var n_z = n - z;
+
+  var i_n = i - n;
+  var i_i = i - i;
+  var i_d = i - d;
+  var i_x = i - x;
+  var i_y = i - y;
+  var i_z = i - z;
+
+  var d_n = d - n;
+  var d_i = d - i;
+  var d_d = d - d;
+  var d_x = d - x;
+  var d_y = d - y;
+  var d_z = d - z;
+
+  var x_n = x - n;
+  var x_i = x - i;
+  var x_d = x - d;
+  var x_x = x - x;
+  var x_y = x - y;
+  var x_z = x - z;
+
+  var y_n = y - n;
+  var y_i = y - i;
+  var y_d = y - d;
+  var y_x = y - x;
+  var y_y = y - y;
+  var y_z = y - z;
+
+  var z_n = z - n;
+  var z_i = z - i;
+  var z_d = z - d;
+  var z_x = z - x;
+  var z_y = z - y;
+  var z_z = z - z;
+}
+
+mul<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  var n_n = n * n;
+  var n_i = n * i;
+  var n_d = n * d;
+  var n_x = n * x;
+  var n_y = n * y;
+  var n_z = n * z;
+
+  var i_n = i * n;
+  var i_i = i * i;
+  var i_d = i * d;
+  var i_x = i * x;
+  var i_y = i * y;
+  var i_z = i * z;
+
+  var d_n = d * n;
+  var d_i = d * i;
+  var d_d = d * d;
+  var d_x = d * x;
+  var d_y = d * y;
+  var d_z = d * z;
+
+  var x_n = x * n;
+  var x_i = x * i;
+  var x_d = x * d;
+  var x_x = x * x;
+  var x_y = x * y;
+  var x_z = x * z;
+
+  var y_n = y * n;
+  var y_i = y * i;
+  var y_d = y * d;
+  var y_x = y * x;
+  var y_y = y * y;
+  var y_z = y * z;
+
+  var z_n = z * n;
+  var z_i = z * i;
+  var z_d = z * d;
+  var z_x = z * x;
+  var z_y = z * y;
+  var z_z = z * z;
+}
+
+mod<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  var n_n = n % n;
+  var n_i = n % i;
+  var n_d = n % d;
+  var n_x = n % x;
+  var n_y = n % y;
+  var n_z = n % z;
+
+  var i_n = i % n;
+  var i_i = i % i;
+  var i_d = i % d;
+  var i_x = i % x;
+  var i_y = i % y;
+  var i_z = i % z;
+
+  var d_n = d % n;
+  var d_i = d % i;
+  var d_d = d % d;
+  var d_x = d % x;
+  var d_y = d % y;
+  var d_z = d % z;
+
+  var x_n = x % n;
+  var x_i = x % i;
+  var x_d = x % d;
+  var x_x = x % x;
+  var x_y = x % y;
+  var x_z = x % z;
+
+  var y_n = y % n;
+  var y_i = y % i;
+  var y_d = y % d;
+  var y_x = y % x;
+  var y_y = y % y;
+  var y_z = y % z;
+
+  var z_n = z % n;
+  var z_i = z % i;
+  var z_d = z % d;
+  var z_x = z % x;
+  var z_y = z % y;
+  var z_z = z % z;
+}
+
+remainder<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  var n_n = n.remainder(n);
+  var n_i = n.remainder(i);
+  var n_d = n.remainder(d);
+  var n_x = n.remainder(x);
+  var n_y = n.remainder(y);
+  var n_z = n.remainder(z);
+
+  var i_n = i.remainder(n);
+  var i_i = i.remainder(i);
+  var i_d = i.remainder(d);
+  var i_x = i.remainder(x);
+  var i_y = i.remainder(y);
+  var i_z = i.remainder(z);
+
+  var d_n = d.remainder(n);
+  var d_i = d.remainder(i);
+  var d_d = d.remainder(d);
+  var d_x = d.remainder(x);
+  var d_y = d.remainder(y);
+  var d_z = d.remainder(z);
+
+  var x_n = x.remainder(n);
+  var x_i = x.remainder(i);
+  var x_d = x.remainder(d);
+  var x_x = x.remainder(x);
+  var x_y = x.remainder(y);
+  var x_z = x.remainder(z);
+
+  var y_n = y.remainder(n);
+  var y_i = y.remainder(i);
+  var y_d = y.remainder(d);
+  var y_x = y.remainder(x);
+  var y_y = y.remainder(y);
+  var y_z = y.remainder(z);
+
+  var z_n = z.remainder(n);
+  var z_i = z.remainder(i);
+  var z_d = z.remainder(d);
+  var z_x = z.remainder(x);
+  var z_y = z.remainder(y);
+  var z_z = z.remainder(z);
+}
+
+clamp<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  var n_n_n = n.clamp(n, n);
+  var n_i_n = n.clamp(i, n);
+  var n_d_n = n.clamp(d, n);
+  var n_x_n = n.clamp(x, n);
+  var n_y_n = n.clamp(y, n);
+  var n_z_n = n.clamp(z, n);
+
+  var n_n_i = n.clamp(n, i);
+  var n_i_i = n.clamp(i, i);
+  var n_d_i = n.clamp(d, i);
+  var n_x_i = n.clamp(x, i);
+  var n_y_i = n.clamp(y, i);
+  var n_z_i = n.clamp(z, i);
+
+  var n_n_d = n.clamp(n, d);
+  var n_i_d = n.clamp(i, d);
+  var n_d_d = n.clamp(d, d);
+  var n_x_d = n.clamp(x, d);
+  var n_y_d = n.clamp(y, d);
+  var n_z_d = n.clamp(z, d);
+
+  var n_n_x = n.clamp(n, x);
+  var n_i_x = n.clamp(i, x);
+  var n_d_x = n.clamp(d, x);
+  var n_x_x = n.clamp(x, x);
+  var n_y_x = n.clamp(y, x);
+  var n_z_x = n.clamp(z, x);
+
+  var n_n_y = n.clamp(n, y);
+  var n_i_y = n.clamp(i, y);
+  var n_d_y = n.clamp(d, y);
+  var n_x_y = n.clamp(x, y);
+  var n_y_y = n.clamp(y, y);
+  var n_z_y = n.clamp(z, y);
+
+  var n_n_z = n.clamp(n, z);
+  var n_i_z = n.clamp(i, z);
+  var n_d_z = n.clamp(d, z);
+  var n_x_z = n.clamp(x, z);
+  var n_y_z = n.clamp(y, z);
+  var n_z_z = n.clamp(z, z);
+
+  var i_n_n = i.clamp(n, n);
+  var i_i_n = i.clamp(i, n);
+  var i_d_n = i.clamp(d, n);
+  var i_x_n = i.clamp(x, n);
+  var i_y_n = i.clamp(y, n);
+  var i_z_n = i.clamp(z, n);
+
+  var i_n_i = i.clamp(n, i);
+  var i_i_i = i.clamp(i, i);
+  var i_d_i = i.clamp(d, i);
+  var i_x_i = i.clamp(x, i);
+  var i_y_i = i.clamp(y, i);
+  var i_z_i = i.clamp(z, i);
+
+  var i_n_d = i.clamp(n, d);
+  var i_i_d = i.clamp(i, d);
+  var i_d_d = i.clamp(d, d);
+  var i_x_d = i.clamp(x, d);
+  var i_y_d = i.clamp(y, d);
+  var i_z_d = i.clamp(z, d);
+
+  var i_n_x = i.clamp(n, x);
+  var i_i_x = i.clamp(i, x);
+  var i_d_x = i.clamp(d, x);
+  var i_x_x = i.clamp(x, x);
+  var i_y_x = i.clamp(y, x);
+  var i_z_x = i.clamp(z, x);
+
+  var i_n_y = i.clamp(n, y);
+  var i_i_y = i.clamp(i, y);
+  var i_d_y = i.clamp(d, y);
+  var i_x_y = i.clamp(x, y);
+  var i_y_y = i.clamp(y, y);
+  var i_z_y = i.clamp(z, y);
+
+  var i_n_z = i.clamp(n, z);
+  var i_i_z = i.clamp(i, z);
+  var i_d_z = i.clamp(d, z);
+  var i_x_z = i.clamp(x, z);
+  var i_y_z = i.clamp(y, z);
+  var i_z_z = i.clamp(z, z);
+
+  var d_n_n = d.clamp(n, n);
+  var d_i_n = d.clamp(i, n);
+  var d_d_n = d.clamp(d, n);
+  var d_x_n = d.clamp(x, n);
+  var d_y_n = d.clamp(y, n);
+  var d_z_n = d.clamp(z, n);
+
+  var d_n_i = d.clamp(n, i);
+  var d_i_i = d.clamp(i, i);
+  var d_d_i = d.clamp(d, i);
+  var d_x_i = d.clamp(x, i);
+  var d_y_i = d.clamp(y, i);
+  var d_z_i = d.clamp(z, i);
+
+  var d_n_d = d.clamp(n, d);
+  var d_i_d = d.clamp(i, d);
+  var d_d_d = d.clamp(d, d);
+  var d_x_d = d.clamp(x, d);
+  var d_y_d = d.clamp(y, d);
+  var d_z_d = d.clamp(z, d);
+
+  var d_n_x = d.clamp(n, x);
+  var d_i_x = d.clamp(i, x);
+  var d_d_x = d.clamp(d, x);
+  var d_x_x = d.clamp(x, x);
+  var d_y_x = d.clamp(y, x);
+  var d_z_x = d.clamp(z, x);
+
+  var d_n_y = d.clamp(n, y);
+  var d_i_y = d.clamp(i, y);
+  var d_d_y = d.clamp(d, y);
+  var d_x_y = d.clamp(x, y);
+  var d_y_y = d.clamp(y, y);
+  var d_z_y = d.clamp(z, y);
+
+  var d_n_z = d.clamp(n, z);
+  var d_i_z = d.clamp(i, z);
+  var d_d_z = d.clamp(d, z);
+  var d_x_z = d.clamp(x, z);
+  var d_y_z = d.clamp(y, z);
+  var d_z_z = d.clamp(z, z);
+
+  var x_n_n = x.clamp(n, n);
+  var x_i_n = x.clamp(i, n);
+  var x_d_n = x.clamp(d, n);
+  var x_x_n = x.clamp(x, n);
+  var x_y_n = x.clamp(y, n);
+  var x_z_n = x.clamp(z, n);
+
+  var x_n_i = x.clamp(n, i);
+  var x_i_i = x.clamp(i, i);
+  var x_d_i = x.clamp(d, i);
+  var x_x_i = x.clamp(x, i);
+  var x_y_i = x.clamp(y, i);
+  var x_z_i = x.clamp(z, i);
+
+  var x_n_d = x.clamp(n, d);
+  var x_i_d = x.clamp(i, d);
+  var x_d_d = x.clamp(d, d);
+  var x_x_d = x.clamp(x, d);
+  var x_y_d = x.clamp(y, d);
+  var x_z_d = x.clamp(z, d);
+
+  var x_n_x = x.clamp(n, x);
+  var x_i_x = x.clamp(i, x);
+  var x_d_x = x.clamp(d, x);
+  var x_x_x = x.clamp(x, x);
+  var x_y_x = x.clamp(y, x);
+  var x_z_x = x.clamp(z, x);
+
+  var x_n_y = x.clamp(n, y);
+  var x_i_y = x.clamp(i, y);
+  var x_d_y = x.clamp(d, y);
+  var x_x_y = x.clamp(x, y);
+  var x_y_y = x.clamp(y, y);
+  var x_z_y = x.clamp(z, y);
+
+  var x_n_z = x.clamp(n, z);
+  var x_i_z = x.clamp(i, z);
+  var x_d_z = x.clamp(d, z);
+  var x_x_z = x.clamp(x, z);
+  var x_y_z = x.clamp(y, z);
+  var x_z_z = x.clamp(z, z);
+
+  var y_n_n = y.clamp(n, n);
+  var y_i_n = y.clamp(i, n);
+  var y_d_n = y.clamp(d, n);
+  var y_x_n = y.clamp(x, n);
+  var y_y_n = y.clamp(y, n);
+  var y_z_n = y.clamp(z, n);
+
+  var y_n_i = y.clamp(n, i);
+  var y_i_i = y.clamp(i, i);
+  var y_d_i = y.clamp(d, i);
+  var y_x_i = y.clamp(x, i);
+  var y_y_i = y.clamp(y, i);
+  var y_z_i = y.clamp(z, i);
+
+  var y_n_d = y.clamp(n, d);
+  var y_i_d = y.clamp(i, d);
+  var y_d_d = y.clamp(d, d);
+  var y_x_d = y.clamp(x, d);
+  var y_y_d = y.clamp(y, d);
+  var y_z_d = y.clamp(z, d);
+
+  var y_n_x = y.clamp(n, x);
+  var y_i_x = y.clamp(i, x);
+  var y_d_x = y.clamp(d, x);
+  var y_x_x = y.clamp(x, x);
+  var y_y_x = y.clamp(y, x);
+  var y_z_x = y.clamp(z, x);
+
+  var y_n_y = y.clamp(n, y);
+  var y_i_y = y.clamp(i, y);
+  var y_d_y = y.clamp(d, y);
+  var y_x_y = y.clamp(x, y);
+  var y_y_y = y.clamp(y, y);
+  var y_z_y = y.clamp(z, y);
+
+  var y_n_z = y.clamp(n, z);
+  var y_i_z = y.clamp(i, z);
+  var y_d_z = y.clamp(d, z);
+  var y_x_z = y.clamp(x, z);
+  var y_y_z = y.clamp(y, z);
+  var y_z_z = y.clamp(z, z);
+
+  var z_n_n = z.clamp(n, n);
+  var z_i_n = z.clamp(i, n);
+  var z_d_n = z.clamp(d, n);
+  var z_x_n = z.clamp(x, n);
+  var z_y_n = z.clamp(y, n);
+  var z_z_n = z.clamp(z, n);
+
+  var z_n_i = z.clamp(n, i);
+  var z_i_i = z.clamp(i, i);
+  var z_d_i = z.clamp(d, i);
+  var z_x_i = z.clamp(x, i);
+  var z_y_i = z.clamp(y, i);
+  var z_z_i = z.clamp(z, i);
+
+  var z_n_d = z.clamp(n, d);
+  var z_i_d = z.clamp(i, d);
+  var z_d_d = z.clamp(d, d);
+  var z_x_d = z.clamp(x, d);
+  var z_y_d = z.clamp(y, d);
+  var z_z_d = z.clamp(z, d);
+
+  var z_n_x = z.clamp(n, x);
+  var z_i_x = z.clamp(i, x);
+  var z_d_x = z.clamp(d, x);
+  var z_x_x = z.clamp(x, x);
+  var z_y_x = z.clamp(y, x);
+  var z_z_x = z.clamp(z, x);
+
+  var z_n_y = z.clamp(n, y);
+  var z_i_y = z.clamp(i, y);
+  var z_d_y = z.clamp(d, y);
+  var z_x_y = z.clamp(x, y);
+  var z_y_y = z.clamp(y, y);
+  var z_z_y = z.clamp(z, y);
+
+  var z_n_z = z.clamp(n, z);
+  var z_i_z = z.clamp(i, z);
+  var z_d_z = z.clamp(d, z);
+  var z_x_z = z.clamp(x, z);
+  var z_y_z = z.clamp(y, z);
+  var z_z_z = z.clamp(z, z);
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/numbers.dart.outline.expect b/pkg/front_end/testcases/nnbd/numbers.dart.outline.expect
new file mode 100644
index 0000000..e9834e0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers.dart.outline.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic
+  ;
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic
+  ;
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic
+  ;
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic
+  ;
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic
+  ;
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/numbers.dart.strong.expect b/pkg/front_end/testcases/nnbd/numbers.dart.strong.expect
new file mode 100644
index 0000000..c539802
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers.dart.strong.expect
@@ -0,0 +1,413 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic {
+  core::num n_n = n.{core::num::+}(n);
+  core::num n_i = n.{core::num::+}(i);
+  core::double n_d = n.{core::num::+}(d);
+  core::num n_x = n.{core::num::+}(x);
+  core::num n_y = n.{core::num::+}(y);
+  core::double n_z = n.{core::num::+}(z);
+  core::num i_n = i.{core::num::+}(n);
+  core::int i_i = i.{core::num::+}(i);
+  core::double i_d = i.{core::num::+}(d);
+  core::num i_x = i.{core::num::+}(x);
+  core::int i_y = i.{core::num::+}(y);
+  core::double i_z = i.{core::num::+}(z);
+  core::double d_n = d.{core::double::+}(n);
+  core::double d_i = d.{core::double::+}(i);
+  core::double d_d = d.{core::double::+}(d);
+  core::double d_x = d.{core::double::+}(x);
+  core::double d_y = d.{core::double::+}(y);
+  core::double d_z = d.{core::double::+}(z);
+  core::num x_n = x.{core::num::+}(n);
+  core::num x_i = x.{core::num::+}(i);
+  core::double x_d = x.{core::num::+}(d);
+  core::num x_x = x.{core::num::+}(x);
+  core::num x_y = x.{core::num::+}(y);
+  core::double x_z = x.{core::num::+}(z);
+  core::num y_n = y.{core::num::+}(n);
+  core::int y_i = y.{core::num::+}(i);
+  core::double y_d = y.{core::num::+}(d);
+  core::num y_x = y.{core::num::+}(x);
+  core::int y_y = y.{core::num::+}(y);
+  core::double y_z = y.{core::num::+}(z);
+  core::double z_n = z.{core::double::+}(n);
+  core::double z_i = z.{core::double::+}(i);
+  core::double z_d = z.{core::double::+}(d);
+  core::double z_x = z.{core::double::+}(x);
+  core::double z_y = z.{core::double::+}(y);
+  core::double z_z = z.{core::double::+}(z);
+}
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic {
+  core::num n_n = n.{core::num::-}(n);
+  core::num n_i = n.{core::num::-}(i);
+  core::double n_d = n.{core::num::-}(d);
+  core::num n_x = n.{core::num::-}(x);
+  core::num n_y = n.{core::num::-}(y);
+  core::double n_z = n.{core::num::-}(z);
+  core::num i_n = i.{core::num::-}(n);
+  core::int i_i = i.{core::num::-}(i);
+  core::double i_d = i.{core::num::-}(d);
+  core::num i_x = i.{core::num::-}(x);
+  core::int i_y = i.{core::num::-}(y);
+  core::double i_z = i.{core::num::-}(z);
+  core::double d_n = d.{core::double::-}(n);
+  core::double d_i = d.{core::double::-}(i);
+  core::double d_d = d.{core::double::-}(d);
+  core::double d_x = d.{core::double::-}(x);
+  core::double d_y = d.{core::double::-}(y);
+  core::double d_z = d.{core::double::-}(z);
+  core::num x_n = x.{core::num::-}(n);
+  core::num x_i = x.{core::num::-}(i);
+  core::double x_d = x.{core::num::-}(d);
+  core::num x_x = x.{core::num::-}(x);
+  core::num x_y = x.{core::num::-}(y);
+  core::double x_z = x.{core::num::-}(z);
+  core::num y_n = y.{core::num::-}(n);
+  core::int y_i = y.{core::num::-}(i);
+  core::double y_d = y.{core::num::-}(d);
+  core::num y_x = y.{core::num::-}(x);
+  core::int y_y = y.{core::num::-}(y);
+  core::double y_z = y.{core::num::-}(z);
+  core::double z_n = z.{core::double::-}(n);
+  core::double z_i = z.{core::double::-}(i);
+  core::double z_d = z.{core::double::-}(d);
+  core::double z_x = z.{core::double::-}(x);
+  core::double z_y = z.{core::double::-}(y);
+  core::double z_z = z.{core::double::-}(z);
+}
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic {
+  core::num n_n = n.{core::num::*}(n);
+  core::num n_i = n.{core::num::*}(i);
+  core::double n_d = n.{core::num::*}(d);
+  core::num n_x = n.{core::num::*}(x);
+  core::num n_y = n.{core::num::*}(y);
+  core::double n_z = n.{core::num::*}(z);
+  core::num i_n = i.{core::num::*}(n);
+  core::int i_i = i.{core::num::*}(i);
+  core::double i_d = i.{core::num::*}(d);
+  core::num i_x = i.{core::num::*}(x);
+  core::int i_y = i.{core::num::*}(y);
+  core::double i_z = i.{core::num::*}(z);
+  core::double d_n = d.{core::double::*}(n);
+  core::double d_i = d.{core::double::*}(i);
+  core::double d_d = d.{core::double::*}(d);
+  core::double d_x = d.{core::double::*}(x);
+  core::double d_y = d.{core::double::*}(y);
+  core::double d_z = d.{core::double::*}(z);
+  core::num x_n = x.{core::num::*}(n);
+  core::num x_i = x.{core::num::*}(i);
+  core::double x_d = x.{core::num::*}(d);
+  core::num x_x = x.{core::num::*}(x);
+  core::num x_y = x.{core::num::*}(y);
+  core::double x_z = x.{core::num::*}(z);
+  core::num y_n = y.{core::num::*}(n);
+  core::int y_i = y.{core::num::*}(i);
+  core::double y_d = y.{core::num::*}(d);
+  core::num y_x = y.{core::num::*}(x);
+  core::int y_y = y.{core::num::*}(y);
+  core::double y_z = y.{core::num::*}(z);
+  core::double z_n = z.{core::double::*}(n);
+  core::double z_i = z.{core::double::*}(i);
+  core::double z_d = z.{core::double::*}(d);
+  core::double z_x = z.{core::double::*}(x);
+  core::double z_y = z.{core::double::*}(y);
+  core::double z_z = z.{core::double::*}(z);
+}
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic {
+  core::num n_n = n.{core::num::%}(n);
+  core::num n_i = n.{core::num::%}(i);
+  core::double n_d = n.{core::num::%}(d);
+  core::num n_x = n.{core::num::%}(x);
+  core::num n_y = n.{core::num::%}(y);
+  core::double n_z = n.{core::num::%}(z);
+  core::num i_n = i.{core::num::%}(n);
+  core::int i_i = i.{core::num::%}(i);
+  core::double i_d = i.{core::num::%}(d);
+  core::num i_x = i.{core::num::%}(x);
+  core::int i_y = i.{core::num::%}(y);
+  core::double i_z = i.{core::num::%}(z);
+  core::double d_n = d.{core::double::%}(n);
+  core::double d_i = d.{core::double::%}(i);
+  core::double d_d = d.{core::double::%}(d);
+  core::double d_x = d.{core::double::%}(x);
+  core::double d_y = d.{core::double::%}(y);
+  core::double d_z = d.{core::double::%}(z);
+  core::num x_n = x.{core::num::%}(n);
+  core::num x_i = x.{core::num::%}(i);
+  core::double x_d = x.{core::num::%}(d);
+  core::num x_x = x.{core::num::%}(x);
+  core::num x_y = x.{core::num::%}(y);
+  core::double x_z = x.{core::num::%}(z);
+  core::num y_n = y.{core::num::%}(n);
+  core::int y_i = y.{core::num::%}(i);
+  core::double y_d = y.{core::num::%}(d);
+  core::num y_x = y.{core::num::%}(x);
+  core::int y_y = y.{core::num::%}(y);
+  core::double y_z = y.{core::num::%}(z);
+  core::double z_n = z.{core::double::%}(n);
+  core::double z_i = z.{core::double::%}(i);
+  core::double z_d = z.{core::double::%}(d);
+  core::double z_x = z.{core::double::%}(x);
+  core::double z_y = z.{core::double::%}(y);
+  core::double z_z = z.{core::double::%}(z);
+}
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic {
+  core::num n_n = n.{core::num::remainder}(n);
+  core::num n_i = n.{core::num::remainder}(i);
+  core::double n_d = n.{core::num::remainder}(d);
+  core::num n_x = n.{core::num::remainder}(x);
+  core::num n_y = n.{core::num::remainder}(y);
+  core::double n_z = n.{core::num::remainder}(z);
+  core::num i_n = i.{core::num::remainder}(n);
+  core::int i_i = i.{core::num::remainder}(i);
+  core::double i_d = i.{core::num::remainder}(d);
+  core::num i_x = i.{core::num::remainder}(x);
+  core::int i_y = i.{core::num::remainder}(y);
+  core::double i_z = i.{core::num::remainder}(z);
+  core::double d_n = d.{core::double::remainder}(n);
+  core::double d_i = d.{core::double::remainder}(i);
+  core::double d_d = d.{core::double::remainder}(d);
+  core::double d_x = d.{core::double::remainder}(x);
+  core::double d_y = d.{core::double::remainder}(y);
+  core::double d_z = d.{core::double::remainder}(z);
+  core::num x_n = x.{core::num::remainder}(n);
+  core::num x_i = x.{core::num::remainder}(i);
+  core::double x_d = x.{core::num::remainder}(d);
+  core::num x_x = x.{core::num::remainder}(x);
+  core::num x_y = x.{core::num::remainder}(y);
+  core::double x_z = x.{core::num::remainder}(z);
+  core::num y_n = y.{core::num::remainder}(n);
+  core::int y_i = y.{core::num::remainder}(i);
+  core::double y_d = y.{core::num::remainder}(d);
+  core::num y_x = y.{core::num::remainder}(x);
+  core::int y_y = y.{core::num::remainder}(y);
+  core::double y_z = y.{core::num::remainder}(z);
+  core::double z_n = z.{core::double::remainder}(n);
+  core::double z_i = z.{core::double::remainder}(i);
+  core::double z_d = z.{core::double::remainder}(d);
+  core::double z_x = z.{core::double::remainder}(x);
+  core::double z_y = z.{core::double::remainder}(y);
+  core::double z_z = z.{core::double::remainder}(z);
+}
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic {
+  core::num n_n_n = n.{core::num::clamp}(n, n);
+  core::num n_i_n = n.{core::num::clamp}(i, n);
+  core::num n_d_n = n.{core::num::clamp}(d, n);
+  core::num n_x_n = n.{core::num::clamp}(x, n);
+  core::num n_y_n = n.{core::num::clamp}(y, n);
+  core::num n_z_n = n.{core::num::clamp}(z, n);
+  core::num n_n_i = n.{core::num::clamp}(n, i);
+  core::num n_i_i = n.{core::num::clamp}(i, i);
+  core::num n_d_i = n.{core::num::clamp}(d, i);
+  core::num n_x_i = n.{core::num::clamp}(x, i);
+  core::num n_y_i = n.{core::num::clamp}(y, i);
+  core::num n_z_i = n.{core::num::clamp}(z, i);
+  core::num n_n_d = n.{core::num::clamp}(n, d);
+  core::num n_i_d = n.{core::num::clamp}(i, d);
+  core::num n_d_d = n.{core::num::clamp}(d, d);
+  core::num n_x_d = n.{core::num::clamp}(x, d);
+  core::num n_y_d = n.{core::num::clamp}(y, d);
+  core::num n_z_d = n.{core::num::clamp}(z, d);
+  core::num n_n_x = n.{core::num::clamp}(n, x);
+  core::num n_i_x = n.{core::num::clamp}(i, x);
+  core::num n_d_x = n.{core::num::clamp}(d, x);
+  core::num n_x_x = n.{core::num::clamp}(x, x);
+  core::num n_y_x = n.{core::num::clamp}(y, x);
+  core::num n_z_x = n.{core::num::clamp}(z, x);
+  core::num n_n_y = n.{core::num::clamp}(n, y);
+  core::num n_i_y = n.{core::num::clamp}(i, y);
+  core::num n_d_y = n.{core::num::clamp}(d, y);
+  core::num n_x_y = n.{core::num::clamp}(x, y);
+  core::num n_y_y = n.{core::num::clamp}(y, y);
+  core::num n_z_y = n.{core::num::clamp}(z, y);
+  core::num n_n_z = n.{core::num::clamp}(n, z);
+  core::num n_i_z = n.{core::num::clamp}(i, z);
+  core::num n_d_z = n.{core::num::clamp}(d, z);
+  core::num n_x_z = n.{core::num::clamp}(x, z);
+  core::num n_y_z = n.{core::num::clamp}(y, z);
+  core::num n_z_z = n.{core::num::clamp}(z, z);
+  core::num i_n_n = i.{core::num::clamp}(n, n);
+  core::num i_i_n = i.{core::num::clamp}(i, n);
+  core::num i_d_n = i.{core::num::clamp}(d, n);
+  core::num i_x_n = i.{core::num::clamp}(x, n);
+  core::num i_y_n = i.{core::num::clamp}(y, n);
+  core::num i_z_n = i.{core::num::clamp}(z, n);
+  core::num i_n_i = i.{core::num::clamp}(n, i);
+  core::int i_i_i = i.{core::num::clamp}(i, i);
+  core::num i_d_i = i.{core::num::clamp}(d, i);
+  core::num i_x_i = i.{core::num::clamp}(x, i);
+  core::int i_y_i = i.{core::num::clamp}(y, i);
+  core::num i_z_i = i.{core::num::clamp}(z, i);
+  core::num i_n_d = i.{core::num::clamp}(n, d);
+  core::num i_i_d = i.{core::num::clamp}(i, d);
+  core::num i_d_d = i.{core::num::clamp}(d, d);
+  core::num i_x_d = i.{core::num::clamp}(x, d);
+  core::num i_y_d = i.{core::num::clamp}(y, d);
+  core::num i_z_d = i.{core::num::clamp}(z, d);
+  core::num i_n_x = i.{core::num::clamp}(n, x);
+  core::num i_i_x = i.{core::num::clamp}(i, x);
+  core::num i_d_x = i.{core::num::clamp}(d, x);
+  core::num i_x_x = i.{core::num::clamp}(x, x);
+  core::num i_y_x = i.{core::num::clamp}(y, x);
+  core::num i_z_x = i.{core::num::clamp}(z, x);
+  core::num i_n_y = i.{core::num::clamp}(n, y);
+  core::int i_i_y = i.{core::num::clamp}(i, y);
+  core::num i_d_y = i.{core::num::clamp}(d, y);
+  core::num i_x_y = i.{core::num::clamp}(x, y);
+  core::int i_y_y = i.{core::num::clamp}(y, y);
+  core::num i_z_y = i.{core::num::clamp}(z, y);
+  core::num i_n_z = i.{core::num::clamp}(n, z);
+  core::num i_i_z = i.{core::num::clamp}(i, z);
+  core::num i_d_z = i.{core::num::clamp}(d, z);
+  core::num i_x_z = i.{core::num::clamp}(x, z);
+  core::num i_y_z = i.{core::num::clamp}(y, z);
+  core::num i_z_z = i.{core::num::clamp}(z, z);
+  core::num d_n_n = d.{core::num::clamp}(n, n);
+  core::num d_i_n = d.{core::num::clamp}(i, n);
+  core::num d_d_n = d.{core::num::clamp}(d, n);
+  core::num d_x_n = d.{core::num::clamp}(x, n);
+  core::num d_y_n = d.{core::num::clamp}(y, n);
+  core::num d_z_n = d.{core::num::clamp}(z, n);
+  core::num d_n_i = d.{core::num::clamp}(n, i);
+  core::num d_i_i = d.{core::num::clamp}(i, i);
+  core::num d_d_i = d.{core::num::clamp}(d, i);
+  core::num d_x_i = d.{core::num::clamp}(x, i);
+  core::num d_y_i = d.{core::num::clamp}(y, i);
+  core::num d_z_i = d.{core::num::clamp}(z, i);
+  core::num d_n_d = d.{core::num::clamp}(n, d);
+  core::num d_i_d = d.{core::num::clamp}(i, d);
+  core::double d_d_d = d.{core::num::clamp}(d, d);
+  core::num d_x_d = d.{core::num::clamp}(x, d);
+  core::num d_y_d = d.{core::num::clamp}(y, d);
+  core::double d_z_d = d.{core::num::clamp}(z, d);
+  core::num d_n_x = d.{core::num::clamp}(n, x);
+  core::num d_i_x = d.{core::num::clamp}(i, x);
+  core::num d_d_x = d.{core::num::clamp}(d, x);
+  core::num d_x_x = d.{core::num::clamp}(x, x);
+  core::num d_y_x = d.{core::num::clamp}(y, x);
+  core::num d_z_x = d.{core::num::clamp}(z, x);
+  core::num d_n_y = d.{core::num::clamp}(n, y);
+  core::num d_i_y = d.{core::num::clamp}(i, y);
+  core::num d_d_y = d.{core::num::clamp}(d, y);
+  core::num d_x_y = d.{core::num::clamp}(x, y);
+  core::num d_y_y = d.{core::num::clamp}(y, y);
+  core::num d_z_y = d.{core::num::clamp}(z, y);
+  core::num d_n_z = d.{core::num::clamp}(n, z);
+  core::num d_i_z = d.{core::num::clamp}(i, z);
+  core::double d_d_z = d.{core::num::clamp}(d, z);
+  core::num d_x_z = d.{core::num::clamp}(x, z);
+  core::num d_y_z = d.{core::num::clamp}(y, z);
+  core::double d_z_z = d.{core::num::clamp}(z, z);
+  core::num x_n_n = x.{core::num::clamp}(n, n);
+  core::num x_i_n = x.{core::num::clamp}(i, n);
+  core::num x_d_n = x.{core::num::clamp}(d, n);
+  core::num x_x_n = x.{core::num::clamp}(x, n);
+  core::num x_y_n = x.{core::num::clamp}(y, n);
+  core::num x_z_n = x.{core::num::clamp}(z, n);
+  core::num x_n_i = x.{core::num::clamp}(n, i);
+  core::num x_i_i = x.{core::num::clamp}(i, i);
+  core::num x_d_i = x.{core::num::clamp}(d, i);
+  core::num x_x_i = x.{core::num::clamp}(x, i);
+  core::num x_y_i = x.{core::num::clamp}(y, i);
+  core::num x_z_i = x.{core::num::clamp}(z, i);
+  core::num x_n_d = x.{core::num::clamp}(n, d);
+  core::num x_i_d = x.{core::num::clamp}(i, d);
+  core::num x_d_d = x.{core::num::clamp}(d, d);
+  core::num x_x_d = x.{core::num::clamp}(x, d);
+  core::num x_y_d = x.{core::num::clamp}(y, d);
+  core::num x_z_d = x.{core::num::clamp}(z, d);
+  core::num x_n_x = x.{core::num::clamp}(n, x);
+  core::num x_i_x = x.{core::num::clamp}(i, x);
+  core::num x_d_x = x.{core::num::clamp}(d, x);
+  core::num x_x_x = x.{core::num::clamp}(x, x);
+  core::num x_y_x = x.{core::num::clamp}(y, x);
+  core::num x_z_x = x.{core::num::clamp}(z, x);
+  core::num x_n_y = x.{core::num::clamp}(n, y);
+  core::num x_i_y = x.{core::num::clamp}(i, y);
+  core::num x_d_y = x.{core::num::clamp}(d, y);
+  core::num x_x_y = x.{core::num::clamp}(x, y);
+  core::num x_y_y = x.{core::num::clamp}(y, y);
+  core::num x_z_y = x.{core::num::clamp}(z, y);
+  core::num x_n_z = x.{core::num::clamp}(n, z);
+  core::num x_i_z = x.{core::num::clamp}(i, z);
+  core::num x_d_z = x.{core::num::clamp}(d, z);
+  core::num x_x_z = x.{core::num::clamp}(x, z);
+  core::num x_y_z = x.{core::num::clamp}(y, z);
+  core::num x_z_z = x.{core::num::clamp}(z, z);
+  core::num y_n_n = y.{core::num::clamp}(n, n);
+  core::num y_i_n = y.{core::num::clamp}(i, n);
+  core::num y_d_n = y.{core::num::clamp}(d, n);
+  core::num y_x_n = y.{core::num::clamp}(x, n);
+  core::num y_y_n = y.{core::num::clamp}(y, n);
+  core::num y_z_n = y.{core::num::clamp}(z, n);
+  core::num y_n_i = y.{core::num::clamp}(n, i);
+  core::int y_i_i = y.{core::num::clamp}(i, i);
+  core::num y_d_i = y.{core::num::clamp}(d, i);
+  core::num y_x_i = y.{core::num::clamp}(x, i);
+  core::int y_y_i = y.{core::num::clamp}(y, i);
+  core::num y_z_i = y.{core::num::clamp}(z, i);
+  core::num y_n_d = y.{core::num::clamp}(n, d);
+  core::num y_i_d = y.{core::num::clamp}(i, d);
+  core::num y_d_d = y.{core::num::clamp}(d, d);
+  core::num y_x_d = y.{core::num::clamp}(x, d);
+  core::num y_y_d = y.{core::num::clamp}(y, d);
+  core::num y_z_d = y.{core::num::clamp}(z, d);
+  core::num y_n_x = y.{core::num::clamp}(n, x);
+  core::num y_i_x = y.{core::num::clamp}(i, x);
+  core::num y_d_x = y.{core::num::clamp}(d, x);
+  core::num y_x_x = y.{core::num::clamp}(x, x);
+  core::num y_y_x = y.{core::num::clamp}(y, x);
+  core::num y_z_x = y.{core::num::clamp}(z, x);
+  core::num y_n_y = y.{core::num::clamp}(n, y);
+  core::int y_i_y = y.{core::num::clamp}(i, y);
+  core::num y_d_y = y.{core::num::clamp}(d, y);
+  core::num y_x_y = y.{core::num::clamp}(x, y);
+  core::int y_y_y = y.{core::num::clamp}(y, y);
+  core::num y_z_y = y.{core::num::clamp}(z, y);
+  core::num y_n_z = y.{core::num::clamp}(n, z);
+  core::num y_i_z = y.{core::num::clamp}(i, z);
+  core::num y_d_z = y.{core::num::clamp}(d, z);
+  core::num y_x_z = y.{core::num::clamp}(x, z);
+  core::num y_y_z = y.{core::num::clamp}(y, z);
+  core::num y_z_z = y.{core::num::clamp}(z, z);
+  core::num z_n_n = z.{core::num::clamp}(n, n);
+  core::num z_i_n = z.{core::num::clamp}(i, n);
+  core::num z_d_n = z.{core::num::clamp}(d, n);
+  core::num z_x_n = z.{core::num::clamp}(x, n);
+  core::num z_y_n = z.{core::num::clamp}(y, n);
+  core::num z_z_n = z.{core::num::clamp}(z, n);
+  core::num z_n_i = z.{core::num::clamp}(n, i);
+  core::num z_i_i = z.{core::num::clamp}(i, i);
+  core::num z_d_i = z.{core::num::clamp}(d, i);
+  core::num z_x_i = z.{core::num::clamp}(x, i);
+  core::num z_y_i = z.{core::num::clamp}(y, i);
+  core::num z_z_i = z.{core::num::clamp}(z, i);
+  core::num z_n_d = z.{core::num::clamp}(n, d);
+  core::num z_i_d = z.{core::num::clamp}(i, d);
+  core::double z_d_d = z.{core::num::clamp}(d, d);
+  core::num z_x_d = z.{core::num::clamp}(x, d);
+  core::num z_y_d = z.{core::num::clamp}(y, d);
+  core::double z_z_d = z.{core::num::clamp}(z, d);
+  core::num z_n_x = z.{core::num::clamp}(n, x);
+  core::num z_i_x = z.{core::num::clamp}(i, x);
+  core::num z_d_x = z.{core::num::clamp}(d, x);
+  core::num z_x_x = z.{core::num::clamp}(x, x);
+  core::num z_y_x = z.{core::num::clamp}(y, x);
+  core::num z_z_x = z.{core::num::clamp}(z, x);
+  core::num z_n_y = z.{core::num::clamp}(n, y);
+  core::num z_i_y = z.{core::num::clamp}(i, y);
+  core::num z_d_y = z.{core::num::clamp}(d, y);
+  core::num z_x_y = z.{core::num::clamp}(x, y);
+  core::num z_y_y = z.{core::num::clamp}(y, y);
+  core::num z_z_y = z.{core::num::clamp}(z, y);
+  core::num z_n_z = z.{core::num::clamp}(n, z);
+  core::num z_i_z = z.{core::num::clamp}(i, z);
+  core::double z_d_z = z.{core::num::clamp}(d, z);
+  core::num z_x_z = z.{core::num::clamp}(x, z);
+  core::num z_y_z = z.{core::num::clamp}(y, z);
+  core::double z_z_z = z.{core::num::clamp}(z, z);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/numbers.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/numbers.dart.strong.transformed.expect
new file mode 100644
index 0000000..c539802
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers.dart.strong.transformed.expect
@@ -0,0 +1,413 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic {
+  core::num n_n = n.{core::num::+}(n);
+  core::num n_i = n.{core::num::+}(i);
+  core::double n_d = n.{core::num::+}(d);
+  core::num n_x = n.{core::num::+}(x);
+  core::num n_y = n.{core::num::+}(y);
+  core::double n_z = n.{core::num::+}(z);
+  core::num i_n = i.{core::num::+}(n);
+  core::int i_i = i.{core::num::+}(i);
+  core::double i_d = i.{core::num::+}(d);
+  core::num i_x = i.{core::num::+}(x);
+  core::int i_y = i.{core::num::+}(y);
+  core::double i_z = i.{core::num::+}(z);
+  core::double d_n = d.{core::double::+}(n);
+  core::double d_i = d.{core::double::+}(i);
+  core::double d_d = d.{core::double::+}(d);
+  core::double d_x = d.{core::double::+}(x);
+  core::double d_y = d.{core::double::+}(y);
+  core::double d_z = d.{core::double::+}(z);
+  core::num x_n = x.{core::num::+}(n);
+  core::num x_i = x.{core::num::+}(i);
+  core::double x_d = x.{core::num::+}(d);
+  core::num x_x = x.{core::num::+}(x);
+  core::num x_y = x.{core::num::+}(y);
+  core::double x_z = x.{core::num::+}(z);
+  core::num y_n = y.{core::num::+}(n);
+  core::int y_i = y.{core::num::+}(i);
+  core::double y_d = y.{core::num::+}(d);
+  core::num y_x = y.{core::num::+}(x);
+  core::int y_y = y.{core::num::+}(y);
+  core::double y_z = y.{core::num::+}(z);
+  core::double z_n = z.{core::double::+}(n);
+  core::double z_i = z.{core::double::+}(i);
+  core::double z_d = z.{core::double::+}(d);
+  core::double z_x = z.{core::double::+}(x);
+  core::double z_y = z.{core::double::+}(y);
+  core::double z_z = z.{core::double::+}(z);
+}
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic {
+  core::num n_n = n.{core::num::-}(n);
+  core::num n_i = n.{core::num::-}(i);
+  core::double n_d = n.{core::num::-}(d);
+  core::num n_x = n.{core::num::-}(x);
+  core::num n_y = n.{core::num::-}(y);
+  core::double n_z = n.{core::num::-}(z);
+  core::num i_n = i.{core::num::-}(n);
+  core::int i_i = i.{core::num::-}(i);
+  core::double i_d = i.{core::num::-}(d);
+  core::num i_x = i.{core::num::-}(x);
+  core::int i_y = i.{core::num::-}(y);
+  core::double i_z = i.{core::num::-}(z);
+  core::double d_n = d.{core::double::-}(n);
+  core::double d_i = d.{core::double::-}(i);
+  core::double d_d = d.{core::double::-}(d);
+  core::double d_x = d.{core::double::-}(x);
+  core::double d_y = d.{core::double::-}(y);
+  core::double d_z = d.{core::double::-}(z);
+  core::num x_n = x.{core::num::-}(n);
+  core::num x_i = x.{core::num::-}(i);
+  core::double x_d = x.{core::num::-}(d);
+  core::num x_x = x.{core::num::-}(x);
+  core::num x_y = x.{core::num::-}(y);
+  core::double x_z = x.{core::num::-}(z);
+  core::num y_n = y.{core::num::-}(n);
+  core::int y_i = y.{core::num::-}(i);
+  core::double y_d = y.{core::num::-}(d);
+  core::num y_x = y.{core::num::-}(x);
+  core::int y_y = y.{core::num::-}(y);
+  core::double y_z = y.{core::num::-}(z);
+  core::double z_n = z.{core::double::-}(n);
+  core::double z_i = z.{core::double::-}(i);
+  core::double z_d = z.{core::double::-}(d);
+  core::double z_x = z.{core::double::-}(x);
+  core::double z_y = z.{core::double::-}(y);
+  core::double z_z = z.{core::double::-}(z);
+}
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic {
+  core::num n_n = n.{core::num::*}(n);
+  core::num n_i = n.{core::num::*}(i);
+  core::double n_d = n.{core::num::*}(d);
+  core::num n_x = n.{core::num::*}(x);
+  core::num n_y = n.{core::num::*}(y);
+  core::double n_z = n.{core::num::*}(z);
+  core::num i_n = i.{core::num::*}(n);
+  core::int i_i = i.{core::num::*}(i);
+  core::double i_d = i.{core::num::*}(d);
+  core::num i_x = i.{core::num::*}(x);
+  core::int i_y = i.{core::num::*}(y);
+  core::double i_z = i.{core::num::*}(z);
+  core::double d_n = d.{core::double::*}(n);
+  core::double d_i = d.{core::double::*}(i);
+  core::double d_d = d.{core::double::*}(d);
+  core::double d_x = d.{core::double::*}(x);
+  core::double d_y = d.{core::double::*}(y);
+  core::double d_z = d.{core::double::*}(z);
+  core::num x_n = x.{core::num::*}(n);
+  core::num x_i = x.{core::num::*}(i);
+  core::double x_d = x.{core::num::*}(d);
+  core::num x_x = x.{core::num::*}(x);
+  core::num x_y = x.{core::num::*}(y);
+  core::double x_z = x.{core::num::*}(z);
+  core::num y_n = y.{core::num::*}(n);
+  core::int y_i = y.{core::num::*}(i);
+  core::double y_d = y.{core::num::*}(d);
+  core::num y_x = y.{core::num::*}(x);
+  core::int y_y = y.{core::num::*}(y);
+  core::double y_z = y.{core::num::*}(z);
+  core::double z_n = z.{core::double::*}(n);
+  core::double z_i = z.{core::double::*}(i);
+  core::double z_d = z.{core::double::*}(d);
+  core::double z_x = z.{core::double::*}(x);
+  core::double z_y = z.{core::double::*}(y);
+  core::double z_z = z.{core::double::*}(z);
+}
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic {
+  core::num n_n = n.{core::num::%}(n);
+  core::num n_i = n.{core::num::%}(i);
+  core::double n_d = n.{core::num::%}(d);
+  core::num n_x = n.{core::num::%}(x);
+  core::num n_y = n.{core::num::%}(y);
+  core::double n_z = n.{core::num::%}(z);
+  core::num i_n = i.{core::num::%}(n);
+  core::int i_i = i.{core::num::%}(i);
+  core::double i_d = i.{core::num::%}(d);
+  core::num i_x = i.{core::num::%}(x);
+  core::int i_y = i.{core::num::%}(y);
+  core::double i_z = i.{core::num::%}(z);
+  core::double d_n = d.{core::double::%}(n);
+  core::double d_i = d.{core::double::%}(i);
+  core::double d_d = d.{core::double::%}(d);
+  core::double d_x = d.{core::double::%}(x);
+  core::double d_y = d.{core::double::%}(y);
+  core::double d_z = d.{core::double::%}(z);
+  core::num x_n = x.{core::num::%}(n);
+  core::num x_i = x.{core::num::%}(i);
+  core::double x_d = x.{core::num::%}(d);
+  core::num x_x = x.{core::num::%}(x);
+  core::num x_y = x.{core::num::%}(y);
+  core::double x_z = x.{core::num::%}(z);
+  core::num y_n = y.{core::num::%}(n);
+  core::int y_i = y.{core::num::%}(i);
+  core::double y_d = y.{core::num::%}(d);
+  core::num y_x = y.{core::num::%}(x);
+  core::int y_y = y.{core::num::%}(y);
+  core::double y_z = y.{core::num::%}(z);
+  core::double z_n = z.{core::double::%}(n);
+  core::double z_i = z.{core::double::%}(i);
+  core::double z_d = z.{core::double::%}(d);
+  core::double z_x = z.{core::double::%}(x);
+  core::double z_y = z.{core::double::%}(y);
+  core::double z_z = z.{core::double::%}(z);
+}
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic {
+  core::num n_n = n.{core::num::remainder}(n);
+  core::num n_i = n.{core::num::remainder}(i);
+  core::double n_d = n.{core::num::remainder}(d);
+  core::num n_x = n.{core::num::remainder}(x);
+  core::num n_y = n.{core::num::remainder}(y);
+  core::double n_z = n.{core::num::remainder}(z);
+  core::num i_n = i.{core::num::remainder}(n);
+  core::int i_i = i.{core::num::remainder}(i);
+  core::double i_d = i.{core::num::remainder}(d);
+  core::num i_x = i.{core::num::remainder}(x);
+  core::int i_y = i.{core::num::remainder}(y);
+  core::double i_z = i.{core::num::remainder}(z);
+  core::double d_n = d.{core::double::remainder}(n);
+  core::double d_i = d.{core::double::remainder}(i);
+  core::double d_d = d.{core::double::remainder}(d);
+  core::double d_x = d.{core::double::remainder}(x);
+  core::double d_y = d.{core::double::remainder}(y);
+  core::double d_z = d.{core::double::remainder}(z);
+  core::num x_n = x.{core::num::remainder}(n);
+  core::num x_i = x.{core::num::remainder}(i);
+  core::double x_d = x.{core::num::remainder}(d);
+  core::num x_x = x.{core::num::remainder}(x);
+  core::num x_y = x.{core::num::remainder}(y);
+  core::double x_z = x.{core::num::remainder}(z);
+  core::num y_n = y.{core::num::remainder}(n);
+  core::int y_i = y.{core::num::remainder}(i);
+  core::double y_d = y.{core::num::remainder}(d);
+  core::num y_x = y.{core::num::remainder}(x);
+  core::int y_y = y.{core::num::remainder}(y);
+  core::double y_z = y.{core::num::remainder}(z);
+  core::double z_n = z.{core::double::remainder}(n);
+  core::double z_i = z.{core::double::remainder}(i);
+  core::double z_d = z.{core::double::remainder}(d);
+  core::double z_x = z.{core::double::remainder}(x);
+  core::double z_y = z.{core::double::remainder}(y);
+  core::double z_z = z.{core::double::remainder}(z);
+}
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic {
+  core::num n_n_n = n.{core::num::clamp}(n, n);
+  core::num n_i_n = n.{core::num::clamp}(i, n);
+  core::num n_d_n = n.{core::num::clamp}(d, n);
+  core::num n_x_n = n.{core::num::clamp}(x, n);
+  core::num n_y_n = n.{core::num::clamp}(y, n);
+  core::num n_z_n = n.{core::num::clamp}(z, n);
+  core::num n_n_i = n.{core::num::clamp}(n, i);
+  core::num n_i_i = n.{core::num::clamp}(i, i);
+  core::num n_d_i = n.{core::num::clamp}(d, i);
+  core::num n_x_i = n.{core::num::clamp}(x, i);
+  core::num n_y_i = n.{core::num::clamp}(y, i);
+  core::num n_z_i = n.{core::num::clamp}(z, i);
+  core::num n_n_d = n.{core::num::clamp}(n, d);
+  core::num n_i_d = n.{core::num::clamp}(i, d);
+  core::num n_d_d = n.{core::num::clamp}(d, d);
+  core::num n_x_d = n.{core::num::clamp}(x, d);
+  core::num n_y_d = n.{core::num::clamp}(y, d);
+  core::num n_z_d = n.{core::num::clamp}(z, d);
+  core::num n_n_x = n.{core::num::clamp}(n, x);
+  core::num n_i_x = n.{core::num::clamp}(i, x);
+  core::num n_d_x = n.{core::num::clamp}(d, x);
+  core::num n_x_x = n.{core::num::clamp}(x, x);
+  core::num n_y_x = n.{core::num::clamp}(y, x);
+  core::num n_z_x = n.{core::num::clamp}(z, x);
+  core::num n_n_y = n.{core::num::clamp}(n, y);
+  core::num n_i_y = n.{core::num::clamp}(i, y);
+  core::num n_d_y = n.{core::num::clamp}(d, y);
+  core::num n_x_y = n.{core::num::clamp}(x, y);
+  core::num n_y_y = n.{core::num::clamp}(y, y);
+  core::num n_z_y = n.{core::num::clamp}(z, y);
+  core::num n_n_z = n.{core::num::clamp}(n, z);
+  core::num n_i_z = n.{core::num::clamp}(i, z);
+  core::num n_d_z = n.{core::num::clamp}(d, z);
+  core::num n_x_z = n.{core::num::clamp}(x, z);
+  core::num n_y_z = n.{core::num::clamp}(y, z);
+  core::num n_z_z = n.{core::num::clamp}(z, z);
+  core::num i_n_n = i.{core::num::clamp}(n, n);
+  core::num i_i_n = i.{core::num::clamp}(i, n);
+  core::num i_d_n = i.{core::num::clamp}(d, n);
+  core::num i_x_n = i.{core::num::clamp}(x, n);
+  core::num i_y_n = i.{core::num::clamp}(y, n);
+  core::num i_z_n = i.{core::num::clamp}(z, n);
+  core::num i_n_i = i.{core::num::clamp}(n, i);
+  core::int i_i_i = i.{core::num::clamp}(i, i);
+  core::num i_d_i = i.{core::num::clamp}(d, i);
+  core::num i_x_i = i.{core::num::clamp}(x, i);
+  core::int i_y_i = i.{core::num::clamp}(y, i);
+  core::num i_z_i = i.{core::num::clamp}(z, i);
+  core::num i_n_d = i.{core::num::clamp}(n, d);
+  core::num i_i_d = i.{core::num::clamp}(i, d);
+  core::num i_d_d = i.{core::num::clamp}(d, d);
+  core::num i_x_d = i.{core::num::clamp}(x, d);
+  core::num i_y_d = i.{core::num::clamp}(y, d);
+  core::num i_z_d = i.{core::num::clamp}(z, d);
+  core::num i_n_x = i.{core::num::clamp}(n, x);
+  core::num i_i_x = i.{core::num::clamp}(i, x);
+  core::num i_d_x = i.{core::num::clamp}(d, x);
+  core::num i_x_x = i.{core::num::clamp}(x, x);
+  core::num i_y_x = i.{core::num::clamp}(y, x);
+  core::num i_z_x = i.{core::num::clamp}(z, x);
+  core::num i_n_y = i.{core::num::clamp}(n, y);
+  core::int i_i_y = i.{core::num::clamp}(i, y);
+  core::num i_d_y = i.{core::num::clamp}(d, y);
+  core::num i_x_y = i.{core::num::clamp}(x, y);
+  core::int i_y_y = i.{core::num::clamp}(y, y);
+  core::num i_z_y = i.{core::num::clamp}(z, y);
+  core::num i_n_z = i.{core::num::clamp}(n, z);
+  core::num i_i_z = i.{core::num::clamp}(i, z);
+  core::num i_d_z = i.{core::num::clamp}(d, z);
+  core::num i_x_z = i.{core::num::clamp}(x, z);
+  core::num i_y_z = i.{core::num::clamp}(y, z);
+  core::num i_z_z = i.{core::num::clamp}(z, z);
+  core::num d_n_n = d.{core::num::clamp}(n, n);
+  core::num d_i_n = d.{core::num::clamp}(i, n);
+  core::num d_d_n = d.{core::num::clamp}(d, n);
+  core::num d_x_n = d.{core::num::clamp}(x, n);
+  core::num d_y_n = d.{core::num::clamp}(y, n);
+  core::num d_z_n = d.{core::num::clamp}(z, n);
+  core::num d_n_i = d.{core::num::clamp}(n, i);
+  core::num d_i_i = d.{core::num::clamp}(i, i);
+  core::num d_d_i = d.{core::num::clamp}(d, i);
+  core::num d_x_i = d.{core::num::clamp}(x, i);
+  core::num d_y_i = d.{core::num::clamp}(y, i);
+  core::num d_z_i = d.{core::num::clamp}(z, i);
+  core::num d_n_d = d.{core::num::clamp}(n, d);
+  core::num d_i_d = d.{core::num::clamp}(i, d);
+  core::double d_d_d = d.{core::num::clamp}(d, d);
+  core::num d_x_d = d.{core::num::clamp}(x, d);
+  core::num d_y_d = d.{core::num::clamp}(y, d);
+  core::double d_z_d = d.{core::num::clamp}(z, d);
+  core::num d_n_x = d.{core::num::clamp}(n, x);
+  core::num d_i_x = d.{core::num::clamp}(i, x);
+  core::num d_d_x = d.{core::num::clamp}(d, x);
+  core::num d_x_x = d.{core::num::clamp}(x, x);
+  core::num d_y_x = d.{core::num::clamp}(y, x);
+  core::num d_z_x = d.{core::num::clamp}(z, x);
+  core::num d_n_y = d.{core::num::clamp}(n, y);
+  core::num d_i_y = d.{core::num::clamp}(i, y);
+  core::num d_d_y = d.{core::num::clamp}(d, y);
+  core::num d_x_y = d.{core::num::clamp}(x, y);
+  core::num d_y_y = d.{core::num::clamp}(y, y);
+  core::num d_z_y = d.{core::num::clamp}(z, y);
+  core::num d_n_z = d.{core::num::clamp}(n, z);
+  core::num d_i_z = d.{core::num::clamp}(i, z);
+  core::double d_d_z = d.{core::num::clamp}(d, z);
+  core::num d_x_z = d.{core::num::clamp}(x, z);
+  core::num d_y_z = d.{core::num::clamp}(y, z);
+  core::double d_z_z = d.{core::num::clamp}(z, z);
+  core::num x_n_n = x.{core::num::clamp}(n, n);
+  core::num x_i_n = x.{core::num::clamp}(i, n);
+  core::num x_d_n = x.{core::num::clamp}(d, n);
+  core::num x_x_n = x.{core::num::clamp}(x, n);
+  core::num x_y_n = x.{core::num::clamp}(y, n);
+  core::num x_z_n = x.{core::num::clamp}(z, n);
+  core::num x_n_i = x.{core::num::clamp}(n, i);
+  core::num x_i_i = x.{core::num::clamp}(i, i);
+  core::num x_d_i = x.{core::num::clamp}(d, i);
+  core::num x_x_i = x.{core::num::clamp}(x, i);
+  core::num x_y_i = x.{core::num::clamp}(y, i);
+  core::num x_z_i = x.{core::num::clamp}(z, i);
+  core::num x_n_d = x.{core::num::clamp}(n, d);
+  core::num x_i_d = x.{core::num::clamp}(i, d);
+  core::num x_d_d = x.{core::num::clamp}(d, d);
+  core::num x_x_d = x.{core::num::clamp}(x, d);
+  core::num x_y_d = x.{core::num::clamp}(y, d);
+  core::num x_z_d = x.{core::num::clamp}(z, d);
+  core::num x_n_x = x.{core::num::clamp}(n, x);
+  core::num x_i_x = x.{core::num::clamp}(i, x);
+  core::num x_d_x = x.{core::num::clamp}(d, x);
+  core::num x_x_x = x.{core::num::clamp}(x, x);
+  core::num x_y_x = x.{core::num::clamp}(y, x);
+  core::num x_z_x = x.{core::num::clamp}(z, x);
+  core::num x_n_y = x.{core::num::clamp}(n, y);
+  core::num x_i_y = x.{core::num::clamp}(i, y);
+  core::num x_d_y = x.{core::num::clamp}(d, y);
+  core::num x_x_y = x.{core::num::clamp}(x, y);
+  core::num x_y_y = x.{core::num::clamp}(y, y);
+  core::num x_z_y = x.{core::num::clamp}(z, y);
+  core::num x_n_z = x.{core::num::clamp}(n, z);
+  core::num x_i_z = x.{core::num::clamp}(i, z);
+  core::num x_d_z = x.{core::num::clamp}(d, z);
+  core::num x_x_z = x.{core::num::clamp}(x, z);
+  core::num x_y_z = x.{core::num::clamp}(y, z);
+  core::num x_z_z = x.{core::num::clamp}(z, z);
+  core::num y_n_n = y.{core::num::clamp}(n, n);
+  core::num y_i_n = y.{core::num::clamp}(i, n);
+  core::num y_d_n = y.{core::num::clamp}(d, n);
+  core::num y_x_n = y.{core::num::clamp}(x, n);
+  core::num y_y_n = y.{core::num::clamp}(y, n);
+  core::num y_z_n = y.{core::num::clamp}(z, n);
+  core::num y_n_i = y.{core::num::clamp}(n, i);
+  core::int y_i_i = y.{core::num::clamp}(i, i);
+  core::num y_d_i = y.{core::num::clamp}(d, i);
+  core::num y_x_i = y.{core::num::clamp}(x, i);
+  core::int y_y_i = y.{core::num::clamp}(y, i);
+  core::num y_z_i = y.{core::num::clamp}(z, i);
+  core::num y_n_d = y.{core::num::clamp}(n, d);
+  core::num y_i_d = y.{core::num::clamp}(i, d);
+  core::num y_d_d = y.{core::num::clamp}(d, d);
+  core::num y_x_d = y.{core::num::clamp}(x, d);
+  core::num y_y_d = y.{core::num::clamp}(y, d);
+  core::num y_z_d = y.{core::num::clamp}(z, d);
+  core::num y_n_x = y.{core::num::clamp}(n, x);
+  core::num y_i_x = y.{core::num::clamp}(i, x);
+  core::num y_d_x = y.{core::num::clamp}(d, x);
+  core::num y_x_x = y.{core::num::clamp}(x, x);
+  core::num y_y_x = y.{core::num::clamp}(y, x);
+  core::num y_z_x = y.{core::num::clamp}(z, x);
+  core::num y_n_y = y.{core::num::clamp}(n, y);
+  core::int y_i_y = y.{core::num::clamp}(i, y);
+  core::num y_d_y = y.{core::num::clamp}(d, y);
+  core::num y_x_y = y.{core::num::clamp}(x, y);
+  core::int y_y_y = y.{core::num::clamp}(y, y);
+  core::num y_z_y = y.{core::num::clamp}(z, y);
+  core::num y_n_z = y.{core::num::clamp}(n, z);
+  core::num y_i_z = y.{core::num::clamp}(i, z);
+  core::num y_d_z = y.{core::num::clamp}(d, z);
+  core::num y_x_z = y.{core::num::clamp}(x, z);
+  core::num y_y_z = y.{core::num::clamp}(y, z);
+  core::num y_z_z = y.{core::num::clamp}(z, z);
+  core::num z_n_n = z.{core::num::clamp}(n, n);
+  core::num z_i_n = z.{core::num::clamp}(i, n);
+  core::num z_d_n = z.{core::num::clamp}(d, n);
+  core::num z_x_n = z.{core::num::clamp}(x, n);
+  core::num z_y_n = z.{core::num::clamp}(y, n);
+  core::num z_z_n = z.{core::num::clamp}(z, n);
+  core::num z_n_i = z.{core::num::clamp}(n, i);
+  core::num z_i_i = z.{core::num::clamp}(i, i);
+  core::num z_d_i = z.{core::num::clamp}(d, i);
+  core::num z_x_i = z.{core::num::clamp}(x, i);
+  core::num z_y_i = z.{core::num::clamp}(y, i);
+  core::num z_z_i = z.{core::num::clamp}(z, i);
+  core::num z_n_d = z.{core::num::clamp}(n, d);
+  core::num z_i_d = z.{core::num::clamp}(i, d);
+  core::double z_d_d = z.{core::num::clamp}(d, d);
+  core::num z_x_d = z.{core::num::clamp}(x, d);
+  core::num z_y_d = z.{core::num::clamp}(y, d);
+  core::double z_z_d = z.{core::num::clamp}(z, d);
+  core::num z_n_x = z.{core::num::clamp}(n, x);
+  core::num z_i_x = z.{core::num::clamp}(i, x);
+  core::num z_d_x = z.{core::num::clamp}(d, x);
+  core::num z_x_x = z.{core::num::clamp}(x, x);
+  core::num z_y_x = z.{core::num::clamp}(y, x);
+  core::num z_z_x = z.{core::num::clamp}(z, x);
+  core::num z_n_y = z.{core::num::clamp}(n, y);
+  core::num z_i_y = z.{core::num::clamp}(i, y);
+  core::num z_d_y = z.{core::num::clamp}(d, y);
+  core::num z_x_y = z.{core::num::clamp}(x, y);
+  core::num z_y_y = z.{core::num::clamp}(y, y);
+  core::num z_z_y = z.{core::num::clamp}(z, y);
+  core::num z_n_z = z.{core::num::clamp}(n, z);
+  core::num z_i_z = z.{core::num::clamp}(i, z);
+  core::double z_d_z = z.{core::num::clamp}(d, z);
+  core::num z_x_z = z.{core::num::clamp}(x, z);
+  core::num z_y_z = z.{core::num::clamp}(y, z);
+  core::double z_z_z = z.{core::num::clamp}(z, z);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/numbers.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/numbers.dart.textual_outline.expect
new file mode 100644
index 0000000..f82bc4c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers.dart.textual_outline.expect
@@ -0,0 +1,13 @@
+add<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+sub<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+mul<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+mod<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+remainder<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+clamp<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/numbers.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/numbers.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..5a136a0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers.dart.textual_outline_modelled.expect
@@ -0,0 +1,13 @@
+add<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+clamp<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+main() {}
+mod<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+mul<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+remainder<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+sub<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
diff --git a/pkg/front_end/testcases/nnbd/numbers.dart.weak.expect b/pkg/front_end/testcases/nnbd/numbers.dart.weak.expect
new file mode 100644
index 0000000..c539802
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers.dart.weak.expect
@@ -0,0 +1,413 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic {
+  core::num n_n = n.{core::num::+}(n);
+  core::num n_i = n.{core::num::+}(i);
+  core::double n_d = n.{core::num::+}(d);
+  core::num n_x = n.{core::num::+}(x);
+  core::num n_y = n.{core::num::+}(y);
+  core::double n_z = n.{core::num::+}(z);
+  core::num i_n = i.{core::num::+}(n);
+  core::int i_i = i.{core::num::+}(i);
+  core::double i_d = i.{core::num::+}(d);
+  core::num i_x = i.{core::num::+}(x);
+  core::int i_y = i.{core::num::+}(y);
+  core::double i_z = i.{core::num::+}(z);
+  core::double d_n = d.{core::double::+}(n);
+  core::double d_i = d.{core::double::+}(i);
+  core::double d_d = d.{core::double::+}(d);
+  core::double d_x = d.{core::double::+}(x);
+  core::double d_y = d.{core::double::+}(y);
+  core::double d_z = d.{core::double::+}(z);
+  core::num x_n = x.{core::num::+}(n);
+  core::num x_i = x.{core::num::+}(i);
+  core::double x_d = x.{core::num::+}(d);
+  core::num x_x = x.{core::num::+}(x);
+  core::num x_y = x.{core::num::+}(y);
+  core::double x_z = x.{core::num::+}(z);
+  core::num y_n = y.{core::num::+}(n);
+  core::int y_i = y.{core::num::+}(i);
+  core::double y_d = y.{core::num::+}(d);
+  core::num y_x = y.{core::num::+}(x);
+  core::int y_y = y.{core::num::+}(y);
+  core::double y_z = y.{core::num::+}(z);
+  core::double z_n = z.{core::double::+}(n);
+  core::double z_i = z.{core::double::+}(i);
+  core::double z_d = z.{core::double::+}(d);
+  core::double z_x = z.{core::double::+}(x);
+  core::double z_y = z.{core::double::+}(y);
+  core::double z_z = z.{core::double::+}(z);
+}
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic {
+  core::num n_n = n.{core::num::-}(n);
+  core::num n_i = n.{core::num::-}(i);
+  core::double n_d = n.{core::num::-}(d);
+  core::num n_x = n.{core::num::-}(x);
+  core::num n_y = n.{core::num::-}(y);
+  core::double n_z = n.{core::num::-}(z);
+  core::num i_n = i.{core::num::-}(n);
+  core::int i_i = i.{core::num::-}(i);
+  core::double i_d = i.{core::num::-}(d);
+  core::num i_x = i.{core::num::-}(x);
+  core::int i_y = i.{core::num::-}(y);
+  core::double i_z = i.{core::num::-}(z);
+  core::double d_n = d.{core::double::-}(n);
+  core::double d_i = d.{core::double::-}(i);
+  core::double d_d = d.{core::double::-}(d);
+  core::double d_x = d.{core::double::-}(x);
+  core::double d_y = d.{core::double::-}(y);
+  core::double d_z = d.{core::double::-}(z);
+  core::num x_n = x.{core::num::-}(n);
+  core::num x_i = x.{core::num::-}(i);
+  core::double x_d = x.{core::num::-}(d);
+  core::num x_x = x.{core::num::-}(x);
+  core::num x_y = x.{core::num::-}(y);
+  core::double x_z = x.{core::num::-}(z);
+  core::num y_n = y.{core::num::-}(n);
+  core::int y_i = y.{core::num::-}(i);
+  core::double y_d = y.{core::num::-}(d);
+  core::num y_x = y.{core::num::-}(x);
+  core::int y_y = y.{core::num::-}(y);
+  core::double y_z = y.{core::num::-}(z);
+  core::double z_n = z.{core::double::-}(n);
+  core::double z_i = z.{core::double::-}(i);
+  core::double z_d = z.{core::double::-}(d);
+  core::double z_x = z.{core::double::-}(x);
+  core::double z_y = z.{core::double::-}(y);
+  core::double z_z = z.{core::double::-}(z);
+}
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic {
+  core::num n_n = n.{core::num::*}(n);
+  core::num n_i = n.{core::num::*}(i);
+  core::double n_d = n.{core::num::*}(d);
+  core::num n_x = n.{core::num::*}(x);
+  core::num n_y = n.{core::num::*}(y);
+  core::double n_z = n.{core::num::*}(z);
+  core::num i_n = i.{core::num::*}(n);
+  core::int i_i = i.{core::num::*}(i);
+  core::double i_d = i.{core::num::*}(d);
+  core::num i_x = i.{core::num::*}(x);
+  core::int i_y = i.{core::num::*}(y);
+  core::double i_z = i.{core::num::*}(z);
+  core::double d_n = d.{core::double::*}(n);
+  core::double d_i = d.{core::double::*}(i);
+  core::double d_d = d.{core::double::*}(d);
+  core::double d_x = d.{core::double::*}(x);
+  core::double d_y = d.{core::double::*}(y);
+  core::double d_z = d.{core::double::*}(z);
+  core::num x_n = x.{core::num::*}(n);
+  core::num x_i = x.{core::num::*}(i);
+  core::double x_d = x.{core::num::*}(d);
+  core::num x_x = x.{core::num::*}(x);
+  core::num x_y = x.{core::num::*}(y);
+  core::double x_z = x.{core::num::*}(z);
+  core::num y_n = y.{core::num::*}(n);
+  core::int y_i = y.{core::num::*}(i);
+  core::double y_d = y.{core::num::*}(d);
+  core::num y_x = y.{core::num::*}(x);
+  core::int y_y = y.{core::num::*}(y);
+  core::double y_z = y.{core::num::*}(z);
+  core::double z_n = z.{core::double::*}(n);
+  core::double z_i = z.{core::double::*}(i);
+  core::double z_d = z.{core::double::*}(d);
+  core::double z_x = z.{core::double::*}(x);
+  core::double z_y = z.{core::double::*}(y);
+  core::double z_z = z.{core::double::*}(z);
+}
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic {
+  core::num n_n = n.{core::num::%}(n);
+  core::num n_i = n.{core::num::%}(i);
+  core::double n_d = n.{core::num::%}(d);
+  core::num n_x = n.{core::num::%}(x);
+  core::num n_y = n.{core::num::%}(y);
+  core::double n_z = n.{core::num::%}(z);
+  core::num i_n = i.{core::num::%}(n);
+  core::int i_i = i.{core::num::%}(i);
+  core::double i_d = i.{core::num::%}(d);
+  core::num i_x = i.{core::num::%}(x);
+  core::int i_y = i.{core::num::%}(y);
+  core::double i_z = i.{core::num::%}(z);
+  core::double d_n = d.{core::double::%}(n);
+  core::double d_i = d.{core::double::%}(i);
+  core::double d_d = d.{core::double::%}(d);
+  core::double d_x = d.{core::double::%}(x);
+  core::double d_y = d.{core::double::%}(y);
+  core::double d_z = d.{core::double::%}(z);
+  core::num x_n = x.{core::num::%}(n);
+  core::num x_i = x.{core::num::%}(i);
+  core::double x_d = x.{core::num::%}(d);
+  core::num x_x = x.{core::num::%}(x);
+  core::num x_y = x.{core::num::%}(y);
+  core::double x_z = x.{core::num::%}(z);
+  core::num y_n = y.{core::num::%}(n);
+  core::int y_i = y.{core::num::%}(i);
+  core::double y_d = y.{core::num::%}(d);
+  core::num y_x = y.{core::num::%}(x);
+  core::int y_y = y.{core::num::%}(y);
+  core::double y_z = y.{core::num::%}(z);
+  core::double z_n = z.{core::double::%}(n);
+  core::double z_i = z.{core::double::%}(i);
+  core::double z_d = z.{core::double::%}(d);
+  core::double z_x = z.{core::double::%}(x);
+  core::double z_y = z.{core::double::%}(y);
+  core::double z_z = z.{core::double::%}(z);
+}
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic {
+  core::num n_n = n.{core::num::remainder}(n);
+  core::num n_i = n.{core::num::remainder}(i);
+  core::double n_d = n.{core::num::remainder}(d);
+  core::num n_x = n.{core::num::remainder}(x);
+  core::num n_y = n.{core::num::remainder}(y);
+  core::double n_z = n.{core::num::remainder}(z);
+  core::num i_n = i.{core::num::remainder}(n);
+  core::int i_i = i.{core::num::remainder}(i);
+  core::double i_d = i.{core::num::remainder}(d);
+  core::num i_x = i.{core::num::remainder}(x);
+  core::int i_y = i.{core::num::remainder}(y);
+  core::double i_z = i.{core::num::remainder}(z);
+  core::double d_n = d.{core::double::remainder}(n);
+  core::double d_i = d.{core::double::remainder}(i);
+  core::double d_d = d.{core::double::remainder}(d);
+  core::double d_x = d.{core::double::remainder}(x);
+  core::double d_y = d.{core::double::remainder}(y);
+  core::double d_z = d.{core::double::remainder}(z);
+  core::num x_n = x.{core::num::remainder}(n);
+  core::num x_i = x.{core::num::remainder}(i);
+  core::double x_d = x.{core::num::remainder}(d);
+  core::num x_x = x.{core::num::remainder}(x);
+  core::num x_y = x.{core::num::remainder}(y);
+  core::double x_z = x.{core::num::remainder}(z);
+  core::num y_n = y.{core::num::remainder}(n);
+  core::int y_i = y.{core::num::remainder}(i);
+  core::double y_d = y.{core::num::remainder}(d);
+  core::num y_x = y.{core::num::remainder}(x);
+  core::int y_y = y.{core::num::remainder}(y);
+  core::double y_z = y.{core::num::remainder}(z);
+  core::double z_n = z.{core::double::remainder}(n);
+  core::double z_i = z.{core::double::remainder}(i);
+  core::double z_d = z.{core::double::remainder}(d);
+  core::double z_x = z.{core::double::remainder}(x);
+  core::double z_y = z.{core::double::remainder}(y);
+  core::double z_z = z.{core::double::remainder}(z);
+}
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic {
+  core::num n_n_n = n.{core::num::clamp}(n, n);
+  core::num n_i_n = n.{core::num::clamp}(i, n);
+  core::num n_d_n = n.{core::num::clamp}(d, n);
+  core::num n_x_n = n.{core::num::clamp}(x, n);
+  core::num n_y_n = n.{core::num::clamp}(y, n);
+  core::num n_z_n = n.{core::num::clamp}(z, n);
+  core::num n_n_i = n.{core::num::clamp}(n, i);
+  core::num n_i_i = n.{core::num::clamp}(i, i);
+  core::num n_d_i = n.{core::num::clamp}(d, i);
+  core::num n_x_i = n.{core::num::clamp}(x, i);
+  core::num n_y_i = n.{core::num::clamp}(y, i);
+  core::num n_z_i = n.{core::num::clamp}(z, i);
+  core::num n_n_d = n.{core::num::clamp}(n, d);
+  core::num n_i_d = n.{core::num::clamp}(i, d);
+  core::num n_d_d = n.{core::num::clamp}(d, d);
+  core::num n_x_d = n.{core::num::clamp}(x, d);
+  core::num n_y_d = n.{core::num::clamp}(y, d);
+  core::num n_z_d = n.{core::num::clamp}(z, d);
+  core::num n_n_x = n.{core::num::clamp}(n, x);
+  core::num n_i_x = n.{core::num::clamp}(i, x);
+  core::num n_d_x = n.{core::num::clamp}(d, x);
+  core::num n_x_x = n.{core::num::clamp}(x, x);
+  core::num n_y_x = n.{core::num::clamp}(y, x);
+  core::num n_z_x = n.{core::num::clamp}(z, x);
+  core::num n_n_y = n.{core::num::clamp}(n, y);
+  core::num n_i_y = n.{core::num::clamp}(i, y);
+  core::num n_d_y = n.{core::num::clamp}(d, y);
+  core::num n_x_y = n.{core::num::clamp}(x, y);
+  core::num n_y_y = n.{core::num::clamp}(y, y);
+  core::num n_z_y = n.{core::num::clamp}(z, y);
+  core::num n_n_z = n.{core::num::clamp}(n, z);
+  core::num n_i_z = n.{core::num::clamp}(i, z);
+  core::num n_d_z = n.{core::num::clamp}(d, z);
+  core::num n_x_z = n.{core::num::clamp}(x, z);
+  core::num n_y_z = n.{core::num::clamp}(y, z);
+  core::num n_z_z = n.{core::num::clamp}(z, z);
+  core::num i_n_n = i.{core::num::clamp}(n, n);
+  core::num i_i_n = i.{core::num::clamp}(i, n);
+  core::num i_d_n = i.{core::num::clamp}(d, n);
+  core::num i_x_n = i.{core::num::clamp}(x, n);
+  core::num i_y_n = i.{core::num::clamp}(y, n);
+  core::num i_z_n = i.{core::num::clamp}(z, n);
+  core::num i_n_i = i.{core::num::clamp}(n, i);
+  core::int i_i_i = i.{core::num::clamp}(i, i);
+  core::num i_d_i = i.{core::num::clamp}(d, i);
+  core::num i_x_i = i.{core::num::clamp}(x, i);
+  core::int i_y_i = i.{core::num::clamp}(y, i);
+  core::num i_z_i = i.{core::num::clamp}(z, i);
+  core::num i_n_d = i.{core::num::clamp}(n, d);
+  core::num i_i_d = i.{core::num::clamp}(i, d);
+  core::num i_d_d = i.{core::num::clamp}(d, d);
+  core::num i_x_d = i.{core::num::clamp}(x, d);
+  core::num i_y_d = i.{core::num::clamp}(y, d);
+  core::num i_z_d = i.{core::num::clamp}(z, d);
+  core::num i_n_x = i.{core::num::clamp}(n, x);
+  core::num i_i_x = i.{core::num::clamp}(i, x);
+  core::num i_d_x = i.{core::num::clamp}(d, x);
+  core::num i_x_x = i.{core::num::clamp}(x, x);
+  core::num i_y_x = i.{core::num::clamp}(y, x);
+  core::num i_z_x = i.{core::num::clamp}(z, x);
+  core::num i_n_y = i.{core::num::clamp}(n, y);
+  core::int i_i_y = i.{core::num::clamp}(i, y);
+  core::num i_d_y = i.{core::num::clamp}(d, y);
+  core::num i_x_y = i.{core::num::clamp}(x, y);
+  core::int i_y_y = i.{core::num::clamp}(y, y);
+  core::num i_z_y = i.{core::num::clamp}(z, y);
+  core::num i_n_z = i.{core::num::clamp}(n, z);
+  core::num i_i_z = i.{core::num::clamp}(i, z);
+  core::num i_d_z = i.{core::num::clamp}(d, z);
+  core::num i_x_z = i.{core::num::clamp}(x, z);
+  core::num i_y_z = i.{core::num::clamp}(y, z);
+  core::num i_z_z = i.{core::num::clamp}(z, z);
+  core::num d_n_n = d.{core::num::clamp}(n, n);
+  core::num d_i_n = d.{core::num::clamp}(i, n);
+  core::num d_d_n = d.{core::num::clamp}(d, n);
+  core::num d_x_n = d.{core::num::clamp}(x, n);
+  core::num d_y_n = d.{core::num::clamp}(y, n);
+  core::num d_z_n = d.{core::num::clamp}(z, n);
+  core::num d_n_i = d.{core::num::clamp}(n, i);
+  core::num d_i_i = d.{core::num::clamp}(i, i);
+  core::num d_d_i = d.{core::num::clamp}(d, i);
+  core::num d_x_i = d.{core::num::clamp}(x, i);
+  core::num d_y_i = d.{core::num::clamp}(y, i);
+  core::num d_z_i = d.{core::num::clamp}(z, i);
+  core::num d_n_d = d.{core::num::clamp}(n, d);
+  core::num d_i_d = d.{core::num::clamp}(i, d);
+  core::double d_d_d = d.{core::num::clamp}(d, d);
+  core::num d_x_d = d.{core::num::clamp}(x, d);
+  core::num d_y_d = d.{core::num::clamp}(y, d);
+  core::double d_z_d = d.{core::num::clamp}(z, d);
+  core::num d_n_x = d.{core::num::clamp}(n, x);
+  core::num d_i_x = d.{core::num::clamp}(i, x);
+  core::num d_d_x = d.{core::num::clamp}(d, x);
+  core::num d_x_x = d.{core::num::clamp}(x, x);
+  core::num d_y_x = d.{core::num::clamp}(y, x);
+  core::num d_z_x = d.{core::num::clamp}(z, x);
+  core::num d_n_y = d.{core::num::clamp}(n, y);
+  core::num d_i_y = d.{core::num::clamp}(i, y);
+  core::num d_d_y = d.{core::num::clamp}(d, y);
+  core::num d_x_y = d.{core::num::clamp}(x, y);
+  core::num d_y_y = d.{core::num::clamp}(y, y);
+  core::num d_z_y = d.{core::num::clamp}(z, y);
+  core::num d_n_z = d.{core::num::clamp}(n, z);
+  core::num d_i_z = d.{core::num::clamp}(i, z);
+  core::double d_d_z = d.{core::num::clamp}(d, z);
+  core::num d_x_z = d.{core::num::clamp}(x, z);
+  core::num d_y_z = d.{core::num::clamp}(y, z);
+  core::double d_z_z = d.{core::num::clamp}(z, z);
+  core::num x_n_n = x.{core::num::clamp}(n, n);
+  core::num x_i_n = x.{core::num::clamp}(i, n);
+  core::num x_d_n = x.{core::num::clamp}(d, n);
+  core::num x_x_n = x.{core::num::clamp}(x, n);
+  core::num x_y_n = x.{core::num::clamp}(y, n);
+  core::num x_z_n = x.{core::num::clamp}(z, n);
+  core::num x_n_i = x.{core::num::clamp}(n, i);
+  core::num x_i_i = x.{core::num::clamp}(i, i);
+  core::num x_d_i = x.{core::num::clamp}(d, i);
+  core::num x_x_i = x.{core::num::clamp}(x, i);
+  core::num x_y_i = x.{core::num::clamp}(y, i);
+  core::num x_z_i = x.{core::num::clamp}(z, i);
+  core::num x_n_d = x.{core::num::clamp}(n, d);
+  core::num x_i_d = x.{core::num::clamp}(i, d);
+  core::num x_d_d = x.{core::num::clamp}(d, d);
+  core::num x_x_d = x.{core::num::clamp}(x, d);
+  core::num x_y_d = x.{core::num::clamp}(y, d);
+  core::num x_z_d = x.{core::num::clamp}(z, d);
+  core::num x_n_x = x.{core::num::clamp}(n, x);
+  core::num x_i_x = x.{core::num::clamp}(i, x);
+  core::num x_d_x = x.{core::num::clamp}(d, x);
+  core::num x_x_x = x.{core::num::clamp}(x, x);
+  core::num x_y_x = x.{core::num::clamp}(y, x);
+  core::num x_z_x = x.{core::num::clamp}(z, x);
+  core::num x_n_y = x.{core::num::clamp}(n, y);
+  core::num x_i_y = x.{core::num::clamp}(i, y);
+  core::num x_d_y = x.{core::num::clamp}(d, y);
+  core::num x_x_y = x.{core::num::clamp}(x, y);
+  core::num x_y_y = x.{core::num::clamp}(y, y);
+  core::num x_z_y = x.{core::num::clamp}(z, y);
+  core::num x_n_z = x.{core::num::clamp}(n, z);
+  core::num x_i_z = x.{core::num::clamp}(i, z);
+  core::num x_d_z = x.{core::num::clamp}(d, z);
+  core::num x_x_z = x.{core::num::clamp}(x, z);
+  core::num x_y_z = x.{core::num::clamp}(y, z);
+  core::num x_z_z = x.{core::num::clamp}(z, z);
+  core::num y_n_n = y.{core::num::clamp}(n, n);
+  core::num y_i_n = y.{core::num::clamp}(i, n);
+  core::num y_d_n = y.{core::num::clamp}(d, n);
+  core::num y_x_n = y.{core::num::clamp}(x, n);
+  core::num y_y_n = y.{core::num::clamp}(y, n);
+  core::num y_z_n = y.{core::num::clamp}(z, n);
+  core::num y_n_i = y.{core::num::clamp}(n, i);
+  core::int y_i_i = y.{core::num::clamp}(i, i);
+  core::num y_d_i = y.{core::num::clamp}(d, i);
+  core::num y_x_i = y.{core::num::clamp}(x, i);
+  core::int y_y_i = y.{core::num::clamp}(y, i);
+  core::num y_z_i = y.{core::num::clamp}(z, i);
+  core::num y_n_d = y.{core::num::clamp}(n, d);
+  core::num y_i_d = y.{core::num::clamp}(i, d);
+  core::num y_d_d = y.{core::num::clamp}(d, d);
+  core::num y_x_d = y.{core::num::clamp}(x, d);
+  core::num y_y_d = y.{core::num::clamp}(y, d);
+  core::num y_z_d = y.{core::num::clamp}(z, d);
+  core::num y_n_x = y.{core::num::clamp}(n, x);
+  core::num y_i_x = y.{core::num::clamp}(i, x);
+  core::num y_d_x = y.{core::num::clamp}(d, x);
+  core::num y_x_x = y.{core::num::clamp}(x, x);
+  core::num y_y_x = y.{core::num::clamp}(y, x);
+  core::num y_z_x = y.{core::num::clamp}(z, x);
+  core::num y_n_y = y.{core::num::clamp}(n, y);
+  core::int y_i_y = y.{core::num::clamp}(i, y);
+  core::num y_d_y = y.{core::num::clamp}(d, y);
+  core::num y_x_y = y.{core::num::clamp}(x, y);
+  core::int y_y_y = y.{core::num::clamp}(y, y);
+  core::num y_z_y = y.{core::num::clamp}(z, y);
+  core::num y_n_z = y.{core::num::clamp}(n, z);
+  core::num y_i_z = y.{core::num::clamp}(i, z);
+  core::num y_d_z = y.{core::num::clamp}(d, z);
+  core::num y_x_z = y.{core::num::clamp}(x, z);
+  core::num y_y_z = y.{core::num::clamp}(y, z);
+  core::num y_z_z = y.{core::num::clamp}(z, z);
+  core::num z_n_n = z.{core::num::clamp}(n, n);
+  core::num z_i_n = z.{core::num::clamp}(i, n);
+  core::num z_d_n = z.{core::num::clamp}(d, n);
+  core::num z_x_n = z.{core::num::clamp}(x, n);
+  core::num z_y_n = z.{core::num::clamp}(y, n);
+  core::num z_z_n = z.{core::num::clamp}(z, n);
+  core::num z_n_i = z.{core::num::clamp}(n, i);
+  core::num z_i_i = z.{core::num::clamp}(i, i);
+  core::num z_d_i = z.{core::num::clamp}(d, i);
+  core::num z_x_i = z.{core::num::clamp}(x, i);
+  core::num z_y_i = z.{core::num::clamp}(y, i);
+  core::num z_z_i = z.{core::num::clamp}(z, i);
+  core::num z_n_d = z.{core::num::clamp}(n, d);
+  core::num z_i_d = z.{core::num::clamp}(i, d);
+  core::double z_d_d = z.{core::num::clamp}(d, d);
+  core::num z_x_d = z.{core::num::clamp}(x, d);
+  core::num z_y_d = z.{core::num::clamp}(y, d);
+  core::double z_z_d = z.{core::num::clamp}(z, d);
+  core::num z_n_x = z.{core::num::clamp}(n, x);
+  core::num z_i_x = z.{core::num::clamp}(i, x);
+  core::num z_d_x = z.{core::num::clamp}(d, x);
+  core::num z_x_x = z.{core::num::clamp}(x, x);
+  core::num z_y_x = z.{core::num::clamp}(y, x);
+  core::num z_z_x = z.{core::num::clamp}(z, x);
+  core::num z_n_y = z.{core::num::clamp}(n, y);
+  core::num z_i_y = z.{core::num::clamp}(i, y);
+  core::num z_d_y = z.{core::num::clamp}(d, y);
+  core::num z_x_y = z.{core::num::clamp}(x, y);
+  core::num z_y_y = z.{core::num::clamp}(y, y);
+  core::num z_z_y = z.{core::num::clamp}(z, y);
+  core::num z_n_z = z.{core::num::clamp}(n, z);
+  core::num z_i_z = z.{core::num::clamp}(i, z);
+  core::double z_d_z = z.{core::num::clamp}(d, z);
+  core::num z_x_z = z.{core::num::clamp}(x, z);
+  core::num z_y_z = z.{core::num::clamp}(y, z);
+  core::double z_z_z = z.{core::num::clamp}(z, z);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/numbers.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/numbers.dart.weak.transformed.expect
new file mode 100644
index 0000000..c539802
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers.dart.weak.transformed.expect
@@ -0,0 +1,413 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic {
+  core::num n_n = n.{core::num::+}(n);
+  core::num n_i = n.{core::num::+}(i);
+  core::double n_d = n.{core::num::+}(d);
+  core::num n_x = n.{core::num::+}(x);
+  core::num n_y = n.{core::num::+}(y);
+  core::double n_z = n.{core::num::+}(z);
+  core::num i_n = i.{core::num::+}(n);
+  core::int i_i = i.{core::num::+}(i);
+  core::double i_d = i.{core::num::+}(d);
+  core::num i_x = i.{core::num::+}(x);
+  core::int i_y = i.{core::num::+}(y);
+  core::double i_z = i.{core::num::+}(z);
+  core::double d_n = d.{core::double::+}(n);
+  core::double d_i = d.{core::double::+}(i);
+  core::double d_d = d.{core::double::+}(d);
+  core::double d_x = d.{core::double::+}(x);
+  core::double d_y = d.{core::double::+}(y);
+  core::double d_z = d.{core::double::+}(z);
+  core::num x_n = x.{core::num::+}(n);
+  core::num x_i = x.{core::num::+}(i);
+  core::double x_d = x.{core::num::+}(d);
+  core::num x_x = x.{core::num::+}(x);
+  core::num x_y = x.{core::num::+}(y);
+  core::double x_z = x.{core::num::+}(z);
+  core::num y_n = y.{core::num::+}(n);
+  core::int y_i = y.{core::num::+}(i);
+  core::double y_d = y.{core::num::+}(d);
+  core::num y_x = y.{core::num::+}(x);
+  core::int y_y = y.{core::num::+}(y);
+  core::double y_z = y.{core::num::+}(z);
+  core::double z_n = z.{core::double::+}(n);
+  core::double z_i = z.{core::double::+}(i);
+  core::double z_d = z.{core::double::+}(d);
+  core::double z_x = z.{core::double::+}(x);
+  core::double z_y = z.{core::double::+}(y);
+  core::double z_z = z.{core::double::+}(z);
+}
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic {
+  core::num n_n = n.{core::num::-}(n);
+  core::num n_i = n.{core::num::-}(i);
+  core::double n_d = n.{core::num::-}(d);
+  core::num n_x = n.{core::num::-}(x);
+  core::num n_y = n.{core::num::-}(y);
+  core::double n_z = n.{core::num::-}(z);
+  core::num i_n = i.{core::num::-}(n);
+  core::int i_i = i.{core::num::-}(i);
+  core::double i_d = i.{core::num::-}(d);
+  core::num i_x = i.{core::num::-}(x);
+  core::int i_y = i.{core::num::-}(y);
+  core::double i_z = i.{core::num::-}(z);
+  core::double d_n = d.{core::double::-}(n);
+  core::double d_i = d.{core::double::-}(i);
+  core::double d_d = d.{core::double::-}(d);
+  core::double d_x = d.{core::double::-}(x);
+  core::double d_y = d.{core::double::-}(y);
+  core::double d_z = d.{core::double::-}(z);
+  core::num x_n = x.{core::num::-}(n);
+  core::num x_i = x.{core::num::-}(i);
+  core::double x_d = x.{core::num::-}(d);
+  core::num x_x = x.{core::num::-}(x);
+  core::num x_y = x.{core::num::-}(y);
+  core::double x_z = x.{core::num::-}(z);
+  core::num y_n = y.{core::num::-}(n);
+  core::int y_i = y.{core::num::-}(i);
+  core::double y_d = y.{core::num::-}(d);
+  core::num y_x = y.{core::num::-}(x);
+  core::int y_y = y.{core::num::-}(y);
+  core::double y_z = y.{core::num::-}(z);
+  core::double z_n = z.{core::double::-}(n);
+  core::double z_i = z.{core::double::-}(i);
+  core::double z_d = z.{core::double::-}(d);
+  core::double z_x = z.{core::double::-}(x);
+  core::double z_y = z.{core::double::-}(y);
+  core::double z_z = z.{core::double::-}(z);
+}
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic {
+  core::num n_n = n.{core::num::*}(n);
+  core::num n_i = n.{core::num::*}(i);
+  core::double n_d = n.{core::num::*}(d);
+  core::num n_x = n.{core::num::*}(x);
+  core::num n_y = n.{core::num::*}(y);
+  core::double n_z = n.{core::num::*}(z);
+  core::num i_n = i.{core::num::*}(n);
+  core::int i_i = i.{core::num::*}(i);
+  core::double i_d = i.{core::num::*}(d);
+  core::num i_x = i.{core::num::*}(x);
+  core::int i_y = i.{core::num::*}(y);
+  core::double i_z = i.{core::num::*}(z);
+  core::double d_n = d.{core::double::*}(n);
+  core::double d_i = d.{core::double::*}(i);
+  core::double d_d = d.{core::double::*}(d);
+  core::double d_x = d.{core::double::*}(x);
+  core::double d_y = d.{core::double::*}(y);
+  core::double d_z = d.{core::double::*}(z);
+  core::num x_n = x.{core::num::*}(n);
+  core::num x_i = x.{core::num::*}(i);
+  core::double x_d = x.{core::num::*}(d);
+  core::num x_x = x.{core::num::*}(x);
+  core::num x_y = x.{core::num::*}(y);
+  core::double x_z = x.{core::num::*}(z);
+  core::num y_n = y.{core::num::*}(n);
+  core::int y_i = y.{core::num::*}(i);
+  core::double y_d = y.{core::num::*}(d);
+  core::num y_x = y.{core::num::*}(x);
+  core::int y_y = y.{core::num::*}(y);
+  core::double y_z = y.{core::num::*}(z);
+  core::double z_n = z.{core::double::*}(n);
+  core::double z_i = z.{core::double::*}(i);
+  core::double z_d = z.{core::double::*}(d);
+  core::double z_x = z.{core::double::*}(x);
+  core::double z_y = z.{core::double::*}(y);
+  core::double z_z = z.{core::double::*}(z);
+}
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic {
+  core::num n_n = n.{core::num::%}(n);
+  core::num n_i = n.{core::num::%}(i);
+  core::double n_d = n.{core::num::%}(d);
+  core::num n_x = n.{core::num::%}(x);
+  core::num n_y = n.{core::num::%}(y);
+  core::double n_z = n.{core::num::%}(z);
+  core::num i_n = i.{core::num::%}(n);
+  core::int i_i = i.{core::num::%}(i);
+  core::double i_d = i.{core::num::%}(d);
+  core::num i_x = i.{core::num::%}(x);
+  core::int i_y = i.{core::num::%}(y);
+  core::double i_z = i.{core::num::%}(z);
+  core::double d_n = d.{core::double::%}(n);
+  core::double d_i = d.{core::double::%}(i);
+  core::double d_d = d.{core::double::%}(d);
+  core::double d_x = d.{core::double::%}(x);
+  core::double d_y = d.{core::double::%}(y);
+  core::double d_z = d.{core::double::%}(z);
+  core::num x_n = x.{core::num::%}(n);
+  core::num x_i = x.{core::num::%}(i);
+  core::double x_d = x.{core::num::%}(d);
+  core::num x_x = x.{core::num::%}(x);
+  core::num x_y = x.{core::num::%}(y);
+  core::double x_z = x.{core::num::%}(z);
+  core::num y_n = y.{core::num::%}(n);
+  core::int y_i = y.{core::num::%}(i);
+  core::double y_d = y.{core::num::%}(d);
+  core::num y_x = y.{core::num::%}(x);
+  core::int y_y = y.{core::num::%}(y);
+  core::double y_z = y.{core::num::%}(z);
+  core::double z_n = z.{core::double::%}(n);
+  core::double z_i = z.{core::double::%}(i);
+  core::double z_d = z.{core::double::%}(d);
+  core::double z_x = z.{core::double::%}(x);
+  core::double z_y = z.{core::double::%}(y);
+  core::double z_z = z.{core::double::%}(z);
+}
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic {
+  core::num n_n = n.{core::num::remainder}(n);
+  core::num n_i = n.{core::num::remainder}(i);
+  core::double n_d = n.{core::num::remainder}(d);
+  core::num n_x = n.{core::num::remainder}(x);
+  core::num n_y = n.{core::num::remainder}(y);
+  core::double n_z = n.{core::num::remainder}(z);
+  core::num i_n = i.{core::num::remainder}(n);
+  core::int i_i = i.{core::num::remainder}(i);
+  core::double i_d = i.{core::num::remainder}(d);
+  core::num i_x = i.{core::num::remainder}(x);
+  core::int i_y = i.{core::num::remainder}(y);
+  core::double i_z = i.{core::num::remainder}(z);
+  core::double d_n = d.{core::double::remainder}(n);
+  core::double d_i = d.{core::double::remainder}(i);
+  core::double d_d = d.{core::double::remainder}(d);
+  core::double d_x = d.{core::double::remainder}(x);
+  core::double d_y = d.{core::double::remainder}(y);
+  core::double d_z = d.{core::double::remainder}(z);
+  core::num x_n = x.{core::num::remainder}(n);
+  core::num x_i = x.{core::num::remainder}(i);
+  core::double x_d = x.{core::num::remainder}(d);
+  core::num x_x = x.{core::num::remainder}(x);
+  core::num x_y = x.{core::num::remainder}(y);
+  core::double x_z = x.{core::num::remainder}(z);
+  core::num y_n = y.{core::num::remainder}(n);
+  core::int y_i = y.{core::num::remainder}(i);
+  core::double y_d = y.{core::num::remainder}(d);
+  core::num y_x = y.{core::num::remainder}(x);
+  core::int y_y = y.{core::num::remainder}(y);
+  core::double y_z = y.{core::num::remainder}(z);
+  core::double z_n = z.{core::double::remainder}(n);
+  core::double z_i = z.{core::double::remainder}(i);
+  core::double z_d = z.{core::double::remainder}(d);
+  core::double z_x = z.{core::double::remainder}(x);
+  core::double z_y = z.{core::double::remainder}(y);
+  core::double z_z = z.{core::double::remainder}(z);
+}
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic {
+  core::num n_n_n = n.{core::num::clamp}(n, n);
+  core::num n_i_n = n.{core::num::clamp}(i, n);
+  core::num n_d_n = n.{core::num::clamp}(d, n);
+  core::num n_x_n = n.{core::num::clamp}(x, n);
+  core::num n_y_n = n.{core::num::clamp}(y, n);
+  core::num n_z_n = n.{core::num::clamp}(z, n);
+  core::num n_n_i = n.{core::num::clamp}(n, i);
+  core::num n_i_i = n.{core::num::clamp}(i, i);
+  core::num n_d_i = n.{core::num::clamp}(d, i);
+  core::num n_x_i = n.{core::num::clamp}(x, i);
+  core::num n_y_i = n.{core::num::clamp}(y, i);
+  core::num n_z_i = n.{core::num::clamp}(z, i);
+  core::num n_n_d = n.{core::num::clamp}(n, d);
+  core::num n_i_d = n.{core::num::clamp}(i, d);
+  core::num n_d_d = n.{core::num::clamp}(d, d);
+  core::num n_x_d = n.{core::num::clamp}(x, d);
+  core::num n_y_d = n.{core::num::clamp}(y, d);
+  core::num n_z_d = n.{core::num::clamp}(z, d);
+  core::num n_n_x = n.{core::num::clamp}(n, x);
+  core::num n_i_x = n.{core::num::clamp}(i, x);
+  core::num n_d_x = n.{core::num::clamp}(d, x);
+  core::num n_x_x = n.{core::num::clamp}(x, x);
+  core::num n_y_x = n.{core::num::clamp}(y, x);
+  core::num n_z_x = n.{core::num::clamp}(z, x);
+  core::num n_n_y = n.{core::num::clamp}(n, y);
+  core::num n_i_y = n.{core::num::clamp}(i, y);
+  core::num n_d_y = n.{core::num::clamp}(d, y);
+  core::num n_x_y = n.{core::num::clamp}(x, y);
+  core::num n_y_y = n.{core::num::clamp}(y, y);
+  core::num n_z_y = n.{core::num::clamp}(z, y);
+  core::num n_n_z = n.{core::num::clamp}(n, z);
+  core::num n_i_z = n.{core::num::clamp}(i, z);
+  core::num n_d_z = n.{core::num::clamp}(d, z);
+  core::num n_x_z = n.{core::num::clamp}(x, z);
+  core::num n_y_z = n.{core::num::clamp}(y, z);
+  core::num n_z_z = n.{core::num::clamp}(z, z);
+  core::num i_n_n = i.{core::num::clamp}(n, n);
+  core::num i_i_n = i.{core::num::clamp}(i, n);
+  core::num i_d_n = i.{core::num::clamp}(d, n);
+  core::num i_x_n = i.{core::num::clamp}(x, n);
+  core::num i_y_n = i.{core::num::clamp}(y, n);
+  core::num i_z_n = i.{core::num::clamp}(z, n);
+  core::num i_n_i = i.{core::num::clamp}(n, i);
+  core::int i_i_i = i.{core::num::clamp}(i, i);
+  core::num i_d_i = i.{core::num::clamp}(d, i);
+  core::num i_x_i = i.{core::num::clamp}(x, i);
+  core::int i_y_i = i.{core::num::clamp}(y, i);
+  core::num i_z_i = i.{core::num::clamp}(z, i);
+  core::num i_n_d = i.{core::num::clamp}(n, d);
+  core::num i_i_d = i.{core::num::clamp}(i, d);
+  core::num i_d_d = i.{core::num::clamp}(d, d);
+  core::num i_x_d = i.{core::num::clamp}(x, d);
+  core::num i_y_d = i.{core::num::clamp}(y, d);
+  core::num i_z_d = i.{core::num::clamp}(z, d);
+  core::num i_n_x = i.{core::num::clamp}(n, x);
+  core::num i_i_x = i.{core::num::clamp}(i, x);
+  core::num i_d_x = i.{core::num::clamp}(d, x);
+  core::num i_x_x = i.{core::num::clamp}(x, x);
+  core::num i_y_x = i.{core::num::clamp}(y, x);
+  core::num i_z_x = i.{core::num::clamp}(z, x);
+  core::num i_n_y = i.{core::num::clamp}(n, y);
+  core::int i_i_y = i.{core::num::clamp}(i, y);
+  core::num i_d_y = i.{core::num::clamp}(d, y);
+  core::num i_x_y = i.{core::num::clamp}(x, y);
+  core::int i_y_y = i.{core::num::clamp}(y, y);
+  core::num i_z_y = i.{core::num::clamp}(z, y);
+  core::num i_n_z = i.{core::num::clamp}(n, z);
+  core::num i_i_z = i.{core::num::clamp}(i, z);
+  core::num i_d_z = i.{core::num::clamp}(d, z);
+  core::num i_x_z = i.{core::num::clamp}(x, z);
+  core::num i_y_z = i.{core::num::clamp}(y, z);
+  core::num i_z_z = i.{core::num::clamp}(z, z);
+  core::num d_n_n = d.{core::num::clamp}(n, n);
+  core::num d_i_n = d.{core::num::clamp}(i, n);
+  core::num d_d_n = d.{core::num::clamp}(d, n);
+  core::num d_x_n = d.{core::num::clamp}(x, n);
+  core::num d_y_n = d.{core::num::clamp}(y, n);
+  core::num d_z_n = d.{core::num::clamp}(z, n);
+  core::num d_n_i = d.{core::num::clamp}(n, i);
+  core::num d_i_i = d.{core::num::clamp}(i, i);
+  core::num d_d_i = d.{core::num::clamp}(d, i);
+  core::num d_x_i = d.{core::num::clamp}(x, i);
+  core::num d_y_i = d.{core::num::clamp}(y, i);
+  core::num d_z_i = d.{core::num::clamp}(z, i);
+  core::num d_n_d = d.{core::num::clamp}(n, d);
+  core::num d_i_d = d.{core::num::clamp}(i, d);
+  core::double d_d_d = d.{core::num::clamp}(d, d);
+  core::num d_x_d = d.{core::num::clamp}(x, d);
+  core::num d_y_d = d.{core::num::clamp}(y, d);
+  core::double d_z_d = d.{core::num::clamp}(z, d);
+  core::num d_n_x = d.{core::num::clamp}(n, x);
+  core::num d_i_x = d.{core::num::clamp}(i, x);
+  core::num d_d_x = d.{core::num::clamp}(d, x);
+  core::num d_x_x = d.{core::num::clamp}(x, x);
+  core::num d_y_x = d.{core::num::clamp}(y, x);
+  core::num d_z_x = d.{core::num::clamp}(z, x);
+  core::num d_n_y = d.{core::num::clamp}(n, y);
+  core::num d_i_y = d.{core::num::clamp}(i, y);
+  core::num d_d_y = d.{core::num::clamp}(d, y);
+  core::num d_x_y = d.{core::num::clamp}(x, y);
+  core::num d_y_y = d.{core::num::clamp}(y, y);
+  core::num d_z_y = d.{core::num::clamp}(z, y);
+  core::num d_n_z = d.{core::num::clamp}(n, z);
+  core::num d_i_z = d.{core::num::clamp}(i, z);
+  core::double d_d_z = d.{core::num::clamp}(d, z);
+  core::num d_x_z = d.{core::num::clamp}(x, z);
+  core::num d_y_z = d.{core::num::clamp}(y, z);
+  core::double d_z_z = d.{core::num::clamp}(z, z);
+  core::num x_n_n = x.{core::num::clamp}(n, n);
+  core::num x_i_n = x.{core::num::clamp}(i, n);
+  core::num x_d_n = x.{core::num::clamp}(d, n);
+  core::num x_x_n = x.{core::num::clamp}(x, n);
+  core::num x_y_n = x.{core::num::clamp}(y, n);
+  core::num x_z_n = x.{core::num::clamp}(z, n);
+  core::num x_n_i = x.{core::num::clamp}(n, i);
+  core::num x_i_i = x.{core::num::clamp}(i, i);
+  core::num x_d_i = x.{core::num::clamp}(d, i);
+  core::num x_x_i = x.{core::num::clamp}(x, i);
+  core::num x_y_i = x.{core::num::clamp}(y, i);
+  core::num x_z_i = x.{core::num::clamp}(z, i);
+  core::num x_n_d = x.{core::num::clamp}(n, d);
+  core::num x_i_d = x.{core::num::clamp}(i, d);
+  core::num x_d_d = x.{core::num::clamp}(d, d);
+  core::num x_x_d = x.{core::num::clamp}(x, d);
+  core::num x_y_d = x.{core::num::clamp}(y, d);
+  core::num x_z_d = x.{core::num::clamp}(z, d);
+  core::num x_n_x = x.{core::num::clamp}(n, x);
+  core::num x_i_x = x.{core::num::clamp}(i, x);
+  core::num x_d_x = x.{core::num::clamp}(d, x);
+  core::num x_x_x = x.{core::num::clamp}(x, x);
+  core::num x_y_x = x.{core::num::clamp}(y, x);
+  core::num x_z_x = x.{core::num::clamp}(z, x);
+  core::num x_n_y = x.{core::num::clamp}(n, y);
+  core::num x_i_y = x.{core::num::clamp}(i, y);
+  core::num x_d_y = x.{core::num::clamp}(d, y);
+  core::num x_x_y = x.{core::num::clamp}(x, y);
+  core::num x_y_y = x.{core::num::clamp}(y, y);
+  core::num x_z_y = x.{core::num::clamp}(z, y);
+  core::num x_n_z = x.{core::num::clamp}(n, z);
+  core::num x_i_z = x.{core::num::clamp}(i, z);
+  core::num x_d_z = x.{core::num::clamp}(d, z);
+  core::num x_x_z = x.{core::num::clamp}(x, z);
+  core::num x_y_z = x.{core::num::clamp}(y, z);
+  core::num x_z_z = x.{core::num::clamp}(z, z);
+  core::num y_n_n = y.{core::num::clamp}(n, n);
+  core::num y_i_n = y.{core::num::clamp}(i, n);
+  core::num y_d_n = y.{core::num::clamp}(d, n);
+  core::num y_x_n = y.{core::num::clamp}(x, n);
+  core::num y_y_n = y.{core::num::clamp}(y, n);
+  core::num y_z_n = y.{core::num::clamp}(z, n);
+  core::num y_n_i = y.{core::num::clamp}(n, i);
+  core::int y_i_i = y.{core::num::clamp}(i, i);
+  core::num y_d_i = y.{core::num::clamp}(d, i);
+  core::num y_x_i = y.{core::num::clamp}(x, i);
+  core::int y_y_i = y.{core::num::clamp}(y, i);
+  core::num y_z_i = y.{core::num::clamp}(z, i);
+  core::num y_n_d = y.{core::num::clamp}(n, d);
+  core::num y_i_d = y.{core::num::clamp}(i, d);
+  core::num y_d_d = y.{core::num::clamp}(d, d);
+  core::num y_x_d = y.{core::num::clamp}(x, d);
+  core::num y_y_d = y.{core::num::clamp}(y, d);
+  core::num y_z_d = y.{core::num::clamp}(z, d);
+  core::num y_n_x = y.{core::num::clamp}(n, x);
+  core::num y_i_x = y.{core::num::clamp}(i, x);
+  core::num y_d_x = y.{core::num::clamp}(d, x);
+  core::num y_x_x = y.{core::num::clamp}(x, x);
+  core::num y_y_x = y.{core::num::clamp}(y, x);
+  core::num y_z_x = y.{core::num::clamp}(z, x);
+  core::num y_n_y = y.{core::num::clamp}(n, y);
+  core::int y_i_y = y.{core::num::clamp}(i, y);
+  core::num y_d_y = y.{core::num::clamp}(d, y);
+  core::num y_x_y = y.{core::num::clamp}(x, y);
+  core::int y_y_y = y.{core::num::clamp}(y, y);
+  core::num y_z_y = y.{core::num::clamp}(z, y);
+  core::num y_n_z = y.{core::num::clamp}(n, z);
+  core::num y_i_z = y.{core::num::clamp}(i, z);
+  core::num y_d_z = y.{core::num::clamp}(d, z);
+  core::num y_x_z = y.{core::num::clamp}(x, z);
+  core::num y_y_z = y.{core::num::clamp}(y, z);
+  core::num y_z_z = y.{core::num::clamp}(z, z);
+  core::num z_n_n = z.{core::num::clamp}(n, n);
+  core::num z_i_n = z.{core::num::clamp}(i, n);
+  core::num z_d_n = z.{core::num::clamp}(d, n);
+  core::num z_x_n = z.{core::num::clamp}(x, n);
+  core::num z_y_n = z.{core::num::clamp}(y, n);
+  core::num z_z_n = z.{core::num::clamp}(z, n);
+  core::num z_n_i = z.{core::num::clamp}(n, i);
+  core::num z_i_i = z.{core::num::clamp}(i, i);
+  core::num z_d_i = z.{core::num::clamp}(d, i);
+  core::num z_x_i = z.{core::num::clamp}(x, i);
+  core::num z_y_i = z.{core::num::clamp}(y, i);
+  core::num z_z_i = z.{core::num::clamp}(z, i);
+  core::num z_n_d = z.{core::num::clamp}(n, d);
+  core::num z_i_d = z.{core::num::clamp}(i, d);
+  core::double z_d_d = z.{core::num::clamp}(d, d);
+  core::num z_x_d = z.{core::num::clamp}(x, d);
+  core::num z_y_d = z.{core::num::clamp}(y, d);
+  core::double z_z_d = z.{core::num::clamp}(z, d);
+  core::num z_n_x = z.{core::num::clamp}(n, x);
+  core::num z_i_x = z.{core::num::clamp}(i, x);
+  core::num z_d_x = z.{core::num::clamp}(d, x);
+  core::num z_x_x = z.{core::num::clamp}(x, x);
+  core::num z_y_x = z.{core::num::clamp}(y, x);
+  core::num z_z_x = z.{core::num::clamp}(z, x);
+  core::num z_n_y = z.{core::num::clamp}(n, y);
+  core::num z_i_y = z.{core::num::clamp}(i, y);
+  core::num z_d_y = z.{core::num::clamp}(d, y);
+  core::num z_x_y = z.{core::num::clamp}(x, y);
+  core::num z_y_y = z.{core::num::clamp}(y, y);
+  core::num z_z_y = z.{core::num::clamp}(z, y);
+  core::num z_n_z = z.{core::num::clamp}(n, z);
+  core::num z_i_z = z.{core::num::clamp}(i, z);
+  core::double z_d_z = z.{core::num::clamp}(d, z);
+  core::num z_x_z = z.{core::num::clamp}(x, z);
+  core::num z_y_z = z.{core::num::clamp}(y, z);
+  core::double z_z_z = z.{core::num::clamp}(z, z);
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/numbers_inferred.dart b/pkg/front_end/testcases/nnbd/numbers_inferred.dart
new file mode 100644
index 0000000..f2a9f12
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers_inferred.dart
@@ -0,0 +1,277 @@
+// 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.
+
+T f<T>() => throw 'Unsupported';
+
+add<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  num n_n = n + f();
+  int n_i = n + f();
+  double n_d = n + f();
+  X n_x = n + f();
+  Y n_y = n + f();
+  Z n_z = n + f();
+
+  num i_n = i + f();
+  int i_i = i + f();
+  double i_d = i + f();
+  X i_x = i + f();
+  Y i_y = i + f();
+  Z i_z = i + f();
+
+  num d_n = d + f();
+  int d_i = d + f();
+  double d_d = d + f();
+  X d_x = d + f();
+  Y d_y = d + f();
+  Z d_z = d + f();
+
+  num x_n = x + f();
+  int x_i = x + f();
+  double x_d = x + f();
+  X x_x = x + f();
+  Y x_y = x + f();
+  Z x_z = x + f();
+
+  num y_n = y + f();
+  int y_i = y + f();
+  double y_d = y + f();
+  X y_x = y + f();
+  Y y_y = y + f();
+  Z y_z = y + f();
+
+  num z_n = z + f();
+  int z_i = z + f();
+  double z_d = z + f();
+  X z_x = z + f();
+  Y z_y = z + f();
+  Z z_z = z + f();
+}
+
+sub<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  num n_n = n - f();
+  int n_i = n - f();
+  double n_d = n - f();
+  X n_x = n - f();
+  Y n_y = n - f();
+  Z n_z = n - f();
+
+  num i_n = i - f();
+  int i_i = i - f();
+  double i_d = i - f();
+  X i_x = i - f();
+  Y i_y = i - f();
+  Z i_z = i - f();
+
+  num d_n = d - f();
+  int d_i = d - f();
+  double d_d = d - f();
+  X d_x = d - f();
+  Y d_y = d - f();
+  Z d_z = d - f();
+
+  num x_n = x - f();
+  int x_i = x - f();
+  double x_d = x - f();
+  X x_x = x - f();
+  Y x_y = x - f();
+  Z x_z = x - f();
+
+  num y_n = y - f();
+  int y_i = y - f();
+  double y_d = y - f();
+  X y_x = y - f();
+  Y y_y = y - f();
+  Z y_z = y - f();
+
+  num z_n = z - f();
+  int z_i = z - f();
+  double z_d = z - f();
+  X z_x = z - f();
+  Y z_y = z - f();
+  Z z_z = z - f();
+}
+
+mul<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  num n_n = n * f();
+  int n_i = n * f();
+  double n_d = n * f();
+  X n_x = n * f();
+  Y n_y = n * f();
+  Z n_z = n * f();
+
+  num i_n = i * f();
+  int i_i = i * f();
+  double i_d = i * f();
+  X i_x = i * f();
+  Y i_y = i * f();
+  Z i_z = i * f();
+
+  num d_n = d * f();
+  int d_i = d * f();
+  double d_d = d * f();
+  X d_x = d * f();
+  Y d_y = d * f();
+  Z d_z = d * f();
+
+  num x_n = x * f();
+  int x_i = x * f();
+  double x_d = x * f();
+  X x_x = x * f();
+  Y x_y = x * f();
+  Z x_z = x * f();
+
+  num y_n = y * f();
+  int y_i = y * f();
+  double y_d = y * f();
+  X y_x = y * f();
+  Y y_y = y * f();
+  Z y_z = y * f();
+
+  num z_n = z * f();
+  int z_i = z * f();
+  double z_d = z * f();
+  X z_x = z * f();
+  Y z_y = z * f();
+  Z z_z = z * f();
+}
+
+mod<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  num n_n = n % f();
+  int n_i = n % f();
+  double n_d = n % f();
+  X n_x = n % f();
+  Y n_y = n % f();
+  Z n_z = n % f();
+
+  num i_n = i % f();
+  int i_i = i % f();
+  double i_d = i % f();
+  X i_x = i % f();
+  Y i_y = i % f();
+  Z i_z = i % f();
+
+  num d_n = d % f();
+  int d_i = d % f();
+  double d_d = d % f();
+  X d_x = d % f();
+  Y d_y = d % f();
+  Z d_z = d % f();
+
+  num x_n = x % f();
+  int x_i = x % f();
+  double x_d = x % f();
+  X x_x = x % f();
+  Y x_y = x % f();
+  Z x_z = x % f();
+
+  num y_n = y % f();
+  int y_i = y % f();
+  double y_d = y % f();
+  X y_x = y % f();
+  Y y_y = y % f();
+  Z y_z = y % f();
+
+  num z_n = z % f();
+  int z_i = z % f();
+  double z_d = z % f();
+  X z_x = z % f();
+  Y z_y = z % f();
+  Z z_z = z % f();
+}
+
+remainder<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  var n_n = n.remainder(f());
+  int n_i = n.remainder(f());
+  double n_d = n.remainder(f());
+  X n_x = n.remainder(f());
+  Y n_y = n.remainder(f());
+  Z n_z = n.remainder(f());
+
+  num i_n = i.remainder(f());
+  int i_i = i.remainder(f());
+  double i_d = i.remainder(f());
+  X i_x = i.remainder(f());
+  Y i_y = i.remainder(f());
+  Z i_z = i.remainder(f());
+
+  var d_n = d.remainder(f());
+  int d_i = d.remainder(f());
+  double d_d = d.remainder(f());
+  X d_x = d.remainder(f());
+  Y d_y = d.remainder(f());
+  Z d_z = d.remainder(f());
+
+  var x_n = x.remainder(f());
+  int x_i = x.remainder(f());
+  double x_d = x.remainder(f());
+  X x_x = x.remainder(f());
+  Y x_y = x.remainder(f());
+  Z x_z = x.remainder(f());
+
+  var y_n = y.remainder(f());
+  int y_i = y.remainder(f());
+  double y_d = y.remainder(f());
+  X y_x = y.remainder(f());
+  Y y_y = y.remainder(f());
+  Z y_z = y.remainder(f());
+
+  var z_n = z.remainder(f());
+  int z_i = z.remainder(f());
+  double z_d = z.remainder(f());
+  X z_x = z.remainder(f());
+  Y z_y = z.remainder(f());
+  Z z_z = z.remainder(f());
+}
+
+clamp<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {
+  var n_n = n.clamp(f(), f());
+  int n_i = n.clamp(f(), f());
+  double n_d = n.clamp(f(), f());
+  X n_x = n.clamp(f(), f());
+  Y n_y = n.clamp(f(), f());
+  Z n_z = n.clamp(f(), f());
+
+  num i_n = i.clamp(f(), f());
+  int i_i = i.clamp(f(), f());
+  double i_d = i.clamp(f(), f());
+  X i_x = i.clamp(f(), f());
+  Y i_y = i.clamp(f(), f());
+  Z i_z = i.clamp(f(), f());
+
+  var d_n = d.clamp(f(), f());
+  int d_i = d.clamp(f(), f());
+  double d_d = d.clamp(f(), f());
+  X d_x = d.clamp(f(), f());
+  Y d_y = d.clamp(f(), f());
+  Z d_z = d.clamp(f(), f());
+
+  var x_n = x.clamp(f(), f());
+  int x_i = x.clamp(f(), f());
+  double x_d = x.clamp(f(), f());
+  X x_x = x.clamp(f(), f());
+  Y x_y = x.clamp(f(), f());
+  Z x_z = x.clamp(f(), f());
+
+  var y_n = y.clamp(f(), f());
+  int y_i = y.clamp(f(), f());
+  double y_d = y.clamp(f(), f());
+  X y_x = y.clamp(f(), f());
+  Y y_y = y.clamp(f(), f());
+  Z y_z = y.clamp(f(), f());
+
+  var z_n = z.clamp(f(), f());
+  int z_i = z.clamp(f(), f());
+  double z_d = z.clamp(f(), f());
+  X z_x = z.clamp(f(), f());
+  Y z_y = z.clamp(f(), f());
+  Z z_z = z.clamp(f(), f());
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/numbers_inferred.dart.outline.expect b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.outline.expect
new file mode 100644
index 0000000..8160ab1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.outline.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method f<T extends core::Object? = dynamic>() → self::f::T%
+  ;
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic
+  ;
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic
+  ;
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic
+  ;
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic
+  ;
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic
+  ;
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/numbers_inferred.dart.strong.expect b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.strong.expect
new file mode 100644
index 0000000..ca5e0f2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.strong.expect
@@ -0,0 +1,1054 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:10:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:12:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:13:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:14:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:19:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:20:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:21:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:24:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:26:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:27:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:28:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:31:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:33:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:34:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:35:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:40:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:41:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:42:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:45:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:47:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:48:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:49:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:55:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:57:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:58:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:59:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:64:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:65:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:66:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:69:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:71:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:72:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:73:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:76:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:78:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:79:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:80:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:85:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:86:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:87:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:90:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:92:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:93:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:94:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:100:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:102:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:103:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:104:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:109:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:110:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:111:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:114:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:116:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:117:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:118:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:121:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:123:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:124:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:125:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:130:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:131:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:132:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:135:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:137:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:138:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:139:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:145:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:147:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:148:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:149:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:154:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:155:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:156:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:159:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:161:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:162:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:163:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:166:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:168:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:169:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:170:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:175:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:176:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:177:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:180:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:182:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:183:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:184:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:190:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:192:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:193:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:194:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:199:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:200:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:201:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:204:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:206:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:207:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:208:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:211:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:213:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:214:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:215:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:220:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:221:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:222:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:225:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:227:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:228:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:229:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:235:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:236:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double n_d = n.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:237:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:238:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:239:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:243:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double i_d = i.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:244:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:245:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:246:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:249:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int d_i = d.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:251:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X d_x = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:252:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:253:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:256:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:257:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double x_d = x.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:258:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:259:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:260:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:264:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double y_d = y.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:265:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:266:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:267:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:270:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int z_i = z.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:272:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X z_x = z.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:273:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:274:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z.clamp(f(), f());
+//             ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method f<T extends core::Object? = dynamic>() → self::f::T%
+  return throw "Unsupported";
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic {
+  core::num n_n = n.{core::num::+}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:10:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n + f();
+              ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::+}(self::f<core::double>());
+  self::add::X n_x = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:12:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y n_y = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:13:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z n_z = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:14:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::+}(self::f<core::num>());
+  core::int i_i = i.{core::num::+}(self::f<core::int>());
+  core::double i_d = i.{core::num::+}(self::f<core::double>());
+  self::add::X i_x = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:19:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y i_y = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:20:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z i_z = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:21:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::+}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:24:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d + f();
+              ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::+}(self::f<core::num>());
+  self::add::X d_x = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:26:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y d_y = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:27:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z d_z = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:28:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::+}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:31:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x + f();
+              ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::+}(self::f<core::double>());
+  self::add::X x_x = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:33:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y x_y = let final<BottomType> #t14 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:34:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z x_z = let final<BottomType> #t15 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:35:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::+}(self::f<core::num>());
+  core::int y_i = y.{core::num::+}(self::f<core::int>());
+  core::double y_d = y.{core::num::+}(self::f<core::double>());
+  self::add::X y_x = let final<BottomType> #t16 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:40:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y y_y = let final<BottomType> #t17 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:41:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z y_z = let final<BottomType> #t18 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:42:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::+}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t19 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:45:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z + f();
+              ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::+}(self::f<core::num>());
+  self::add::X z_x = let final<BottomType> #t20 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:47:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y z_y = let final<BottomType> #t21 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:48:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z z_z = let final<BottomType> #t22 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:49:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic {
+  core::num n_n = n.{core::num::-}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t23 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:55:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n - f();
+              ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::-}(self::f<core::double>());
+  self::sub::X n_x = let final<BottomType> #t24 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:57:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y n_y = let final<BottomType> #t25 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:58:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z n_z = let final<BottomType> #t26 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:59:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::-}(self::f<core::num>());
+  core::int i_i = i.{core::num::-}(self::f<core::int>());
+  core::double i_d = i.{core::num::-}(self::f<core::double>());
+  self::sub::X i_x = let final<BottomType> #t27 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:64:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y i_y = let final<BottomType> #t28 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:65:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z i_z = let final<BottomType> #t29 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:66:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::-}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t30 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:69:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d - f();
+              ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::-}(self::f<core::num>());
+  self::sub::X d_x = let final<BottomType> #t31 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:71:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y d_y = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:72:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z d_z = let final<BottomType> #t33 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:73:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::-}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:76:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x - f();
+              ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::-}(self::f<core::double>());
+  self::sub::X x_x = let final<BottomType> #t35 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:78:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y x_y = let final<BottomType> #t36 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:79:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z x_z = let final<BottomType> #t37 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:80:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::-}(self::f<core::num>());
+  core::int y_i = y.{core::num::-}(self::f<core::int>());
+  core::double y_d = y.{core::num::-}(self::f<core::double>());
+  self::sub::X y_x = let final<BottomType> #t38 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:85:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y y_y = let final<BottomType> #t39 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:86:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z y_z = let final<BottomType> #t40 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:87:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::-}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:90:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z - f();
+              ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::-}(self::f<core::num>());
+  self::sub::X z_x = let final<BottomType> #t42 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:92:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y z_y = let final<BottomType> #t43 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:93:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z z_z = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:94:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic {
+  core::num n_n = n.{core::num::*}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t45 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:100:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n * f();
+              ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::*}(self::f<core::double>());
+  self::mul::X n_x = let final<BottomType> #t46 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:102:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y n_y = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:103:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z n_z = let final<BottomType> #t48 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:104:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::*}(self::f<core::num>());
+  core::int i_i = i.{core::num::*}(self::f<core::int>());
+  core::double i_d = i.{core::num::*}(self::f<core::double>());
+  self::mul::X i_x = let final<BottomType> #t49 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:109:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y i_y = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:110:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z i_z = let final<BottomType> #t51 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:111:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::*}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t52 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:114:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d * f();
+              ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::*}(self::f<core::num>());
+  self::mul::X d_x = let final<BottomType> #t53 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:116:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y d_y = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:117:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z d_z = let final<BottomType> #t55 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:118:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::*}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t56 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:121:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x * f();
+              ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::*}(self::f<core::double>());
+  self::mul::X x_x = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:123:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y x_y = let final<BottomType> #t58 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:124:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z x_z = let final<BottomType> #t59 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:125:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::*}(self::f<core::num>());
+  core::int y_i = y.{core::num::*}(self::f<core::int>());
+  core::double y_d = y.{core::num::*}(self::f<core::double>());
+  self::mul::X y_x = let final<BottomType> #t60 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:130:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y y_y = let final<BottomType> #t61 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:131:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z y_z = let final<BottomType> #t62 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:132:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::*}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t63 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:135:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z * f();
+              ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::*}(self::f<core::num>());
+  self::mul::X z_x = let final<BottomType> #t64 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:137:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y z_y = let final<BottomType> #t65 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:138:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z z_z = let final<BottomType> #t66 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:139:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic {
+  core::num n_n = n.{core::num::%}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t67 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:145:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n % f();
+              ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::%}(self::f<core::double>());
+  self::mod::X n_x = let final<BottomType> #t68 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:147:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y n_y = let final<BottomType> #t69 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:148:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z n_z = let final<BottomType> #t70 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:149:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::%}(self::f<core::num>());
+  core::int i_i = i.{core::num::%}(self::f<core::int>());
+  core::double i_d = i.{core::num::%}(self::f<core::double>());
+  self::mod::X i_x = let final<BottomType> #t71 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:154:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y i_y = let final<BottomType> #t72 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:155:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z i_z = let final<BottomType> #t73 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:156:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::%}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t74 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:159:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d % f();
+              ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::%}(self::f<core::num>());
+  self::mod::X d_x = let final<BottomType> #t75 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:161:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y d_y = let final<BottomType> #t76 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:162:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z d_z = let final<BottomType> #t77 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:163:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::%}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t78 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:166:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x % f();
+              ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::%}(self::f<core::double>());
+  self::mod::X x_x = let final<BottomType> #t79 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:168:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y x_y = let final<BottomType> #t80 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:169:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z x_z = let final<BottomType> #t81 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:170:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::%}(self::f<core::num>());
+  core::int y_i = y.{core::num::%}(self::f<core::int>());
+  core::double y_d = y.{core::num::%}(self::f<core::double>());
+  self::mod::X y_x = let final<BottomType> #t82 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:175:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y y_y = let final<BottomType> #t83 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:176:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z y_z = let final<BottomType> #t84 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:177:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::%}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t85 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:180:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z % f();
+              ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::%}(self::f<core::num>());
+  self::mod::X z_x = let final<BottomType> #t86 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:182:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y z_y = let final<BottomType> #t87 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:183:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z z_z = let final<BottomType> #t88 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:184:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic {
+  core::num n_n = n.{core::num::remainder}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t89 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:190:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n.remainder(f());
+              ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X n_x = let final<BottomType> #t90 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:192:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y n_y = let final<BottomType> #t91 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:193:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z n_z = let final<BottomType> #t92 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:194:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::remainder}(self::f<core::num>());
+  core::int i_i = i.{core::num::remainder}(self::f<core::int>());
+  core::double i_d = i.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X i_x = let final<BottomType> #t93 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:199:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y i_y = let final<BottomType> #t94 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:200:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z i_z = let final<BottomType> #t95 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:201:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::double d_n = d.{core::double::remainder}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t96 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:204:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d.remainder(f());
+              ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::remainder}(self::f<core::num>());
+  self::remainder::X d_x = let final<BottomType> #t97 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:206:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y d_y = let final<BottomType> #t98 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:207:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z d_z = let final<BottomType> #t99 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:208:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::remainder}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t100 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:211:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x.remainder(f());
+              ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X x_x = let final<BottomType> #t101 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:213:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y x_y = let final<BottomType> #t102 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:214:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z x_z = let final<BottomType> #t103 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:215:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::remainder}(self::f<core::num>());
+  core::int y_i = y.{core::num::remainder}(self::f<core::int>());
+  core::double y_d = y.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X y_x = let final<BottomType> #t104 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:220:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y y_y = let final<BottomType> #t105 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:221:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z y_z = let final<BottomType> #t106 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:222:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::double z_n = z.{core::double::remainder}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t107 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:225:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z.remainder(f());
+              ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::remainder}(self::f<core::num>());
+  self::remainder::X z_x = let final<BottomType> #t108 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:227:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y z_y = let final<BottomType> #t109 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:228:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z z_z = let final<BottomType> #t110 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:229:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic {
+  core::num n_n = n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int n_i = let final<BottomType> #t111 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:235:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n.clamp(f(), f());
+              ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = let final<BottomType> #t112 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:236:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double n_d = n.clamp(f(), f());
+                 ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X n_x = let final<BottomType> #t113 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:237:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y n_y = let final<BottomType> #t114 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:238:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z n_z = let final<BottomType> #t115 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:239:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int i_i = i.{core::num::clamp}(self::f<core::int>(), self::f<core::int>());
+  core::double i_d = let final<BottomType> #t116 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:243:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double i_d = i.clamp(f(), f());
+                 ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X i_x = let final<BottomType> #t117 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:244:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y i_y = let final<BottomType> #t118 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:245:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z i_z = let final<BottomType> #t119 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:246:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int d_i = let final<BottomType> #t120 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:249:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int d_i = d.clamp(f(), f());
+              ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::num::clamp}(self::f<core::double>(), self::f<core::double>());
+  self::clamp::X d_x = let final<BottomType> #t121 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:251:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X d_x = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y d_y = let final<BottomType> #t122 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:252:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y d_y = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z d_z = let final<BottomType> #t123 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:253:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z d_z = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int x_i = let final<BottomType> #t124 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:256:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x.clamp(f(), f());
+              ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = let final<BottomType> #t125 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:257:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double x_d = x.clamp(f(), f());
+                 ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X x_x = let final<BottomType> #t126 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:258:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y x_y = let final<BottomType> #t127 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:259:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z x_z = let final<BottomType> #t128 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:260:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int y_i = y.{core::num::clamp}(self::f<core::int>(), self::f<core::int>());
+  core::double y_d = let final<BottomType> #t129 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:264:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double y_d = y.clamp(f(), f());
+                 ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X y_x = let final<BottomType> #t130 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:265:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y y_y = let final<BottomType> #t131 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:266:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z y_z = let final<BottomType> #t132 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:267:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int z_i = let final<BottomType> #t133 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:270:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int z_i = z.clamp(f(), f());
+              ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::num::clamp}(self::f<core::double>(), self::f<core::double>());
+  self::clamp::X z_x = let final<BottomType> #t134 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:272:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X z_x = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y z_y = let final<BottomType> #t135 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:273:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y z_y = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z z_z = let final<BottomType> #t136 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:274:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z z_z = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/numbers_inferred.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.strong.transformed.expect
new file mode 100644
index 0000000..ca5e0f2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.strong.transformed.expect
@@ -0,0 +1,1054 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:10:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:12:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:13:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:14:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:19:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:20:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:21:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:24:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:26:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:27:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:28:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:31:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:33:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:34:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:35:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:40:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:41:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:42:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:45:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:47:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:48:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:49:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:55:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:57:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:58:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:59:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:64:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:65:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:66:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:69:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:71:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:72:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:73:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:76:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:78:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:79:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:80:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:85:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:86:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:87:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:90:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:92:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:93:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:94:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:100:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:102:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:103:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:104:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:109:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:110:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:111:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:114:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:116:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:117:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:118:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:121:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:123:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:124:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:125:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:130:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:131:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:132:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:135:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:137:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:138:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:139:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:145:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:147:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:148:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:149:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:154:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:155:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:156:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:159:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:161:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:162:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:163:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:166:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:168:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:169:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:170:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:175:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:176:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:177:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:180:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:182:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:183:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:184:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:190:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:192:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:193:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:194:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:199:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:200:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:201:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:204:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:206:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:207:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:208:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:211:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:213:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:214:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:215:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:220:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:221:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:222:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:225:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:227:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:228:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:229:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:235:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:236:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double n_d = n.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:237:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:238:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:239:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:243:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double i_d = i.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:244:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:245:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:246:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:249:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int d_i = d.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:251:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X d_x = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:252:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:253:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:256:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:257:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double x_d = x.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:258:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:259:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:260:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:264:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double y_d = y.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:265:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:266:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:267:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:270:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int z_i = z.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:272:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X z_x = z.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:273:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:274:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z.clamp(f(), f());
+//             ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method f<T extends core::Object? = dynamic>() → self::f::T%
+  return throw "Unsupported";
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic {
+  core::num n_n = n.{core::num::+}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:10:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n + f();
+              ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::+}(self::f<core::double>());
+  self::add::X n_x = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:12:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y n_y = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:13:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z n_z = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:14:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::+}(self::f<core::num>());
+  core::int i_i = i.{core::num::+}(self::f<core::int>());
+  core::double i_d = i.{core::num::+}(self::f<core::double>());
+  self::add::X i_x = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:19:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y i_y = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:20:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z i_z = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:21:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::+}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:24:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d + f();
+              ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::+}(self::f<core::num>());
+  self::add::X d_x = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:26:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y d_y = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:27:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z d_z = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:28:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::+}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:31:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x + f();
+              ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::+}(self::f<core::double>());
+  self::add::X x_x = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:33:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y x_y = let final<BottomType> #t14 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:34:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z x_z = let final<BottomType> #t15 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:35:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::+}(self::f<core::num>());
+  core::int y_i = y.{core::num::+}(self::f<core::int>());
+  core::double y_d = y.{core::num::+}(self::f<core::double>());
+  self::add::X y_x = let final<BottomType> #t16 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:40:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y y_y = let final<BottomType> #t17 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:41:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z y_z = let final<BottomType> #t18 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:42:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::+}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t19 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:45:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z + f();
+              ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::+}(self::f<core::num>());
+  self::add::X z_x = let final<BottomType> #t20 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:47:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y z_y = let final<BottomType> #t21 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:48:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z z_z = let final<BottomType> #t22 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:49:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic {
+  core::num n_n = n.{core::num::-}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t23 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:55:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n - f();
+              ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::-}(self::f<core::double>());
+  self::sub::X n_x = let final<BottomType> #t24 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:57:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y n_y = let final<BottomType> #t25 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:58:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z n_z = let final<BottomType> #t26 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:59:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::-}(self::f<core::num>());
+  core::int i_i = i.{core::num::-}(self::f<core::int>());
+  core::double i_d = i.{core::num::-}(self::f<core::double>());
+  self::sub::X i_x = let final<BottomType> #t27 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:64:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y i_y = let final<BottomType> #t28 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:65:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z i_z = let final<BottomType> #t29 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:66:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::-}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t30 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:69:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d - f();
+              ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::-}(self::f<core::num>());
+  self::sub::X d_x = let final<BottomType> #t31 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:71:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y d_y = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:72:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z d_z = let final<BottomType> #t33 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:73:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::-}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:76:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x - f();
+              ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::-}(self::f<core::double>());
+  self::sub::X x_x = let final<BottomType> #t35 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:78:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y x_y = let final<BottomType> #t36 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:79:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z x_z = let final<BottomType> #t37 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:80:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::-}(self::f<core::num>());
+  core::int y_i = y.{core::num::-}(self::f<core::int>());
+  core::double y_d = y.{core::num::-}(self::f<core::double>());
+  self::sub::X y_x = let final<BottomType> #t38 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:85:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y y_y = let final<BottomType> #t39 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:86:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z y_z = let final<BottomType> #t40 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:87:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::-}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:90:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z - f();
+              ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::-}(self::f<core::num>());
+  self::sub::X z_x = let final<BottomType> #t42 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:92:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y z_y = let final<BottomType> #t43 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:93:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z z_z = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:94:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic {
+  core::num n_n = n.{core::num::*}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t45 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:100:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n * f();
+              ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::*}(self::f<core::double>());
+  self::mul::X n_x = let final<BottomType> #t46 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:102:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y n_y = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:103:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z n_z = let final<BottomType> #t48 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:104:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::*}(self::f<core::num>());
+  core::int i_i = i.{core::num::*}(self::f<core::int>());
+  core::double i_d = i.{core::num::*}(self::f<core::double>());
+  self::mul::X i_x = let final<BottomType> #t49 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:109:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y i_y = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:110:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z i_z = let final<BottomType> #t51 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:111:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::*}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t52 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:114:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d * f();
+              ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::*}(self::f<core::num>());
+  self::mul::X d_x = let final<BottomType> #t53 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:116:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y d_y = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:117:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z d_z = let final<BottomType> #t55 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:118:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::*}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t56 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:121:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x * f();
+              ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::*}(self::f<core::double>());
+  self::mul::X x_x = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:123:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y x_y = let final<BottomType> #t58 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:124:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z x_z = let final<BottomType> #t59 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:125:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::*}(self::f<core::num>());
+  core::int y_i = y.{core::num::*}(self::f<core::int>());
+  core::double y_d = y.{core::num::*}(self::f<core::double>());
+  self::mul::X y_x = let final<BottomType> #t60 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:130:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y y_y = let final<BottomType> #t61 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:131:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z y_z = let final<BottomType> #t62 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:132:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::*}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t63 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:135:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z * f();
+              ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::*}(self::f<core::num>());
+  self::mul::X z_x = let final<BottomType> #t64 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:137:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y z_y = let final<BottomType> #t65 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:138:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z z_z = let final<BottomType> #t66 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:139:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic {
+  core::num n_n = n.{core::num::%}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t67 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:145:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n % f();
+              ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::%}(self::f<core::double>());
+  self::mod::X n_x = let final<BottomType> #t68 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:147:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y n_y = let final<BottomType> #t69 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:148:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z n_z = let final<BottomType> #t70 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:149:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::%}(self::f<core::num>());
+  core::int i_i = i.{core::num::%}(self::f<core::int>());
+  core::double i_d = i.{core::num::%}(self::f<core::double>());
+  self::mod::X i_x = let final<BottomType> #t71 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:154:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y i_y = let final<BottomType> #t72 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:155:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z i_z = let final<BottomType> #t73 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:156:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::%}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t74 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:159:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d % f();
+              ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::%}(self::f<core::num>());
+  self::mod::X d_x = let final<BottomType> #t75 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:161:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y d_y = let final<BottomType> #t76 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:162:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z d_z = let final<BottomType> #t77 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:163:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::%}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t78 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:166:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x % f();
+              ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::%}(self::f<core::double>());
+  self::mod::X x_x = let final<BottomType> #t79 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:168:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y x_y = let final<BottomType> #t80 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:169:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z x_z = let final<BottomType> #t81 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:170:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::%}(self::f<core::num>());
+  core::int y_i = y.{core::num::%}(self::f<core::int>());
+  core::double y_d = y.{core::num::%}(self::f<core::double>());
+  self::mod::X y_x = let final<BottomType> #t82 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:175:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y y_y = let final<BottomType> #t83 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:176:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z y_z = let final<BottomType> #t84 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:177:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::%}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t85 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:180:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z % f();
+              ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::%}(self::f<core::num>());
+  self::mod::X z_x = let final<BottomType> #t86 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:182:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y z_y = let final<BottomType> #t87 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:183:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z z_z = let final<BottomType> #t88 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:184:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic {
+  core::num n_n = n.{core::num::remainder}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t89 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:190:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n.remainder(f());
+              ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X n_x = let final<BottomType> #t90 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:192:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y n_y = let final<BottomType> #t91 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:193:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z n_z = let final<BottomType> #t92 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:194:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::remainder}(self::f<core::num>());
+  core::int i_i = i.{core::num::remainder}(self::f<core::int>());
+  core::double i_d = i.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X i_x = let final<BottomType> #t93 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:199:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y i_y = let final<BottomType> #t94 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:200:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z i_z = let final<BottomType> #t95 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:201:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::double d_n = d.{core::double::remainder}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t96 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:204:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d.remainder(f());
+              ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::remainder}(self::f<core::num>());
+  self::remainder::X d_x = let final<BottomType> #t97 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:206:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y d_y = let final<BottomType> #t98 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:207:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z d_z = let final<BottomType> #t99 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:208:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::remainder}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t100 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:211:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x.remainder(f());
+              ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X x_x = let final<BottomType> #t101 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:213:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y x_y = let final<BottomType> #t102 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:214:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z x_z = let final<BottomType> #t103 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:215:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::remainder}(self::f<core::num>());
+  core::int y_i = y.{core::num::remainder}(self::f<core::int>());
+  core::double y_d = y.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X y_x = let final<BottomType> #t104 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:220:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y y_y = let final<BottomType> #t105 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:221:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z y_z = let final<BottomType> #t106 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:222:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::double z_n = z.{core::double::remainder}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t107 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:225:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z.remainder(f());
+              ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::remainder}(self::f<core::num>());
+  self::remainder::X z_x = let final<BottomType> #t108 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:227:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y z_y = let final<BottomType> #t109 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:228:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z z_z = let final<BottomType> #t110 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:229:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic {
+  core::num n_n = n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int n_i = let final<BottomType> #t111 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:235:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n.clamp(f(), f());
+              ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = let final<BottomType> #t112 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:236:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double n_d = n.clamp(f(), f());
+                 ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X n_x = let final<BottomType> #t113 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:237:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y n_y = let final<BottomType> #t114 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:238:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z n_z = let final<BottomType> #t115 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:239:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int i_i = i.{core::num::clamp}(self::f<core::int>(), self::f<core::int>());
+  core::double i_d = let final<BottomType> #t116 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:243:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double i_d = i.clamp(f(), f());
+                 ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X i_x = let final<BottomType> #t117 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:244:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y i_y = let final<BottomType> #t118 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:245:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z i_z = let final<BottomType> #t119 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:246:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int d_i = let final<BottomType> #t120 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:249:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int d_i = d.clamp(f(), f());
+              ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::num::clamp}(self::f<core::double>(), self::f<core::double>());
+  self::clamp::X d_x = let final<BottomType> #t121 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:251:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X d_x = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y d_y = let final<BottomType> #t122 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:252:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y d_y = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z d_z = let final<BottomType> #t123 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:253:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z d_z = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int x_i = let final<BottomType> #t124 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:256:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x.clamp(f(), f());
+              ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = let final<BottomType> #t125 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:257:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double x_d = x.clamp(f(), f());
+                 ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X x_x = let final<BottomType> #t126 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:258:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y x_y = let final<BottomType> #t127 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:259:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z x_z = let final<BottomType> #t128 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:260:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int y_i = y.{core::num::clamp}(self::f<core::int>(), self::f<core::int>());
+  core::double y_d = let final<BottomType> #t129 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:264:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double y_d = y.clamp(f(), f());
+                 ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X y_x = let final<BottomType> #t130 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:265:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y y_y = let final<BottomType> #t131 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:266:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z y_z = let final<BottomType> #t132 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:267:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int z_i = let final<BottomType> #t133 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:270:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int z_i = z.clamp(f(), f());
+              ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::num::clamp}(self::f<core::double>(), self::f<core::double>());
+  self::clamp::X z_x = let final<BottomType> #t134 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:272:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X z_x = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y z_y = let final<BottomType> #t135 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:273:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y z_y = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z z_z = let final<BottomType> #t136 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:274:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z z_z = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/numbers_inferred.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.textual_outline.expect
new file mode 100644
index 0000000..5828a2d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.textual_outline.expect
@@ -0,0 +1,14 @@
+T f<T>() => throw 'Unsupported';
+add<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+sub<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+mul<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+mod<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+remainder<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+clamp<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/numbers_inferred.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..425ac61
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.textual_outline_modelled.expect
@@ -0,0 +1,14 @@
+T f<T>() => throw 'Unsupported';
+add<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+clamp<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+main() {}
+mod<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+mul<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+remainder<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
+sub<X extends num, Y extends int, Z extends double>(
+    num n, int i, double d, X x, Y y, Z z) {}
diff --git a/pkg/front_end/testcases/nnbd/numbers_inferred.dart.weak.expect b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.weak.expect
new file mode 100644
index 0000000..ca5e0f2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.weak.expect
@@ -0,0 +1,1054 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:10:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:12:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:13:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:14:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:19:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:20:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:21:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:24:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:26:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:27:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:28:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:31:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:33:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:34:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:35:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:40:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:41:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:42:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:45:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:47:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:48:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:49:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:55:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:57:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:58:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:59:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:64:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:65:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:66:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:69:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:71:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:72:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:73:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:76:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:78:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:79:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:80:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:85:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:86:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:87:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:90:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:92:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:93:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:94:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:100:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:102:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:103:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:104:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:109:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:110:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:111:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:114:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:116:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:117:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:118:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:121:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:123:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:124:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:125:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:130:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:131:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:132:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:135:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:137:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:138:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:139:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:145:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:147:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:148:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:149:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:154:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:155:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:156:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:159:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:161:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:162:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:163:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:166:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:168:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:169:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:170:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:175:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:176:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:177:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:180:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:182:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:183:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:184:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:190:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:192:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:193:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:194:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:199:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:200:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:201:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:204:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:206:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:207:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:208:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:211:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:213:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:214:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:215:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:220:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:221:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:222:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:225:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:227:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:228:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:229:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:235:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:236:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double n_d = n.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:237:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:238:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:239:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:243:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double i_d = i.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:244:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:245:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:246:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:249:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int d_i = d.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:251:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X d_x = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:252:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:253:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:256:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:257:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double x_d = x.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:258:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:259:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:260:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:264:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double y_d = y.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:265:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:266:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:267:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:270:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int z_i = z.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:272:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X z_x = z.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:273:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:274:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z.clamp(f(), f());
+//             ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method f<T extends core::Object? = dynamic>() → self::f::T%
+  return throw "Unsupported";
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic {
+  core::num n_n = n.{core::num::+}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:10:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n + f();
+              ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::+}(self::f<core::double>());
+  self::add::X n_x = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:12:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y n_y = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:13:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z n_z = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:14:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::+}(self::f<core::num>());
+  core::int i_i = i.{core::num::+}(self::f<core::int>());
+  core::double i_d = i.{core::num::+}(self::f<core::double>());
+  self::add::X i_x = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:19:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y i_y = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:20:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z i_z = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:21:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::+}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:24:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d + f();
+              ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::+}(self::f<core::num>());
+  self::add::X d_x = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:26:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y d_y = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:27:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z d_z = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:28:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::+}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:31:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x + f();
+              ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::+}(self::f<core::double>());
+  self::add::X x_x = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:33:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y x_y = let final<BottomType> #t14 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:34:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z x_z = let final<BottomType> #t15 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:35:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::+}(self::f<core::num>());
+  core::int y_i = y.{core::num::+}(self::f<core::int>());
+  core::double y_d = y.{core::num::+}(self::f<core::double>());
+  self::add::X y_x = let final<BottomType> #t16 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:40:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y y_y = let final<BottomType> #t17 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:41:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z y_z = let final<BottomType> #t18 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:42:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::+}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t19 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:45:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z + f();
+              ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::+}(self::f<core::num>());
+  self::add::X z_x = let final<BottomType> #t20 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:47:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y z_y = let final<BottomType> #t21 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:48:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z z_z = let final<BottomType> #t22 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:49:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic {
+  core::num n_n = n.{core::num::-}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t23 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:55:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n - f();
+              ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::-}(self::f<core::double>());
+  self::sub::X n_x = let final<BottomType> #t24 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:57:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y n_y = let final<BottomType> #t25 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:58:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z n_z = let final<BottomType> #t26 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:59:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::-}(self::f<core::num>());
+  core::int i_i = i.{core::num::-}(self::f<core::int>());
+  core::double i_d = i.{core::num::-}(self::f<core::double>());
+  self::sub::X i_x = let final<BottomType> #t27 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:64:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y i_y = let final<BottomType> #t28 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:65:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z i_z = let final<BottomType> #t29 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:66:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::-}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t30 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:69:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d - f();
+              ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::-}(self::f<core::num>());
+  self::sub::X d_x = let final<BottomType> #t31 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:71:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y d_y = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:72:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z d_z = let final<BottomType> #t33 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:73:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::-}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:76:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x - f();
+              ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::-}(self::f<core::double>());
+  self::sub::X x_x = let final<BottomType> #t35 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:78:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y x_y = let final<BottomType> #t36 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:79:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z x_z = let final<BottomType> #t37 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:80:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::-}(self::f<core::num>());
+  core::int y_i = y.{core::num::-}(self::f<core::int>());
+  core::double y_d = y.{core::num::-}(self::f<core::double>());
+  self::sub::X y_x = let final<BottomType> #t38 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:85:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y y_y = let final<BottomType> #t39 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:86:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z y_z = let final<BottomType> #t40 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:87:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::-}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:90:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z - f();
+              ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::-}(self::f<core::num>());
+  self::sub::X z_x = let final<BottomType> #t42 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:92:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y z_y = let final<BottomType> #t43 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:93:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z z_z = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:94:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic {
+  core::num n_n = n.{core::num::*}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t45 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:100:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n * f();
+              ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::*}(self::f<core::double>());
+  self::mul::X n_x = let final<BottomType> #t46 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:102:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y n_y = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:103:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z n_z = let final<BottomType> #t48 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:104:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::*}(self::f<core::num>());
+  core::int i_i = i.{core::num::*}(self::f<core::int>());
+  core::double i_d = i.{core::num::*}(self::f<core::double>());
+  self::mul::X i_x = let final<BottomType> #t49 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:109:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y i_y = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:110:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z i_z = let final<BottomType> #t51 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:111:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::*}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t52 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:114:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d * f();
+              ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::*}(self::f<core::num>());
+  self::mul::X d_x = let final<BottomType> #t53 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:116:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y d_y = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:117:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z d_z = let final<BottomType> #t55 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:118:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::*}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t56 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:121:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x * f();
+              ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::*}(self::f<core::double>());
+  self::mul::X x_x = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:123:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y x_y = let final<BottomType> #t58 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:124:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z x_z = let final<BottomType> #t59 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:125:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::*}(self::f<core::num>());
+  core::int y_i = y.{core::num::*}(self::f<core::int>());
+  core::double y_d = y.{core::num::*}(self::f<core::double>());
+  self::mul::X y_x = let final<BottomType> #t60 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:130:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y y_y = let final<BottomType> #t61 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:131:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z y_z = let final<BottomType> #t62 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:132:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::*}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t63 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:135:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z * f();
+              ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::*}(self::f<core::num>());
+  self::mul::X z_x = let final<BottomType> #t64 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:137:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y z_y = let final<BottomType> #t65 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:138:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z z_z = let final<BottomType> #t66 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:139:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic {
+  core::num n_n = n.{core::num::%}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t67 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:145:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n % f();
+              ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::%}(self::f<core::double>());
+  self::mod::X n_x = let final<BottomType> #t68 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:147:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y n_y = let final<BottomType> #t69 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:148:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z n_z = let final<BottomType> #t70 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:149:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::%}(self::f<core::num>());
+  core::int i_i = i.{core::num::%}(self::f<core::int>());
+  core::double i_d = i.{core::num::%}(self::f<core::double>());
+  self::mod::X i_x = let final<BottomType> #t71 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:154:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y i_y = let final<BottomType> #t72 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:155:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z i_z = let final<BottomType> #t73 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:156:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::%}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t74 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:159:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d % f();
+              ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::%}(self::f<core::num>());
+  self::mod::X d_x = let final<BottomType> #t75 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:161:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y d_y = let final<BottomType> #t76 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:162:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z d_z = let final<BottomType> #t77 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:163:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::%}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t78 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:166:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x % f();
+              ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::%}(self::f<core::double>());
+  self::mod::X x_x = let final<BottomType> #t79 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:168:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y x_y = let final<BottomType> #t80 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:169:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z x_z = let final<BottomType> #t81 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:170:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::%}(self::f<core::num>());
+  core::int y_i = y.{core::num::%}(self::f<core::int>());
+  core::double y_d = y.{core::num::%}(self::f<core::double>());
+  self::mod::X y_x = let final<BottomType> #t82 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:175:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y y_y = let final<BottomType> #t83 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:176:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z y_z = let final<BottomType> #t84 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:177:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::%}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t85 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:180:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z % f();
+              ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::%}(self::f<core::num>());
+  self::mod::X z_x = let final<BottomType> #t86 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:182:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y z_y = let final<BottomType> #t87 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:183:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z z_z = let final<BottomType> #t88 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:184:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic {
+  core::num n_n = n.{core::num::remainder}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t89 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:190:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n.remainder(f());
+              ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X n_x = let final<BottomType> #t90 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:192:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y n_y = let final<BottomType> #t91 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:193:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z n_z = let final<BottomType> #t92 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:194:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::remainder}(self::f<core::num>());
+  core::int i_i = i.{core::num::remainder}(self::f<core::int>());
+  core::double i_d = i.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X i_x = let final<BottomType> #t93 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:199:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y i_y = let final<BottomType> #t94 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:200:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z i_z = let final<BottomType> #t95 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:201:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::double d_n = d.{core::double::remainder}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t96 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:204:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d.remainder(f());
+              ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::remainder}(self::f<core::num>());
+  self::remainder::X d_x = let final<BottomType> #t97 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:206:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y d_y = let final<BottomType> #t98 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:207:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z d_z = let final<BottomType> #t99 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:208:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::remainder}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t100 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:211:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x.remainder(f());
+              ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X x_x = let final<BottomType> #t101 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:213:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y x_y = let final<BottomType> #t102 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:214:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z x_z = let final<BottomType> #t103 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:215:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::remainder}(self::f<core::num>());
+  core::int y_i = y.{core::num::remainder}(self::f<core::int>());
+  core::double y_d = y.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X y_x = let final<BottomType> #t104 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:220:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y y_y = let final<BottomType> #t105 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:221:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z y_z = let final<BottomType> #t106 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:222:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::double z_n = z.{core::double::remainder}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t107 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:225:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z.remainder(f());
+              ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::remainder}(self::f<core::num>());
+  self::remainder::X z_x = let final<BottomType> #t108 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:227:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y z_y = let final<BottomType> #t109 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:228:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z z_z = let final<BottomType> #t110 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:229:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic {
+  core::num n_n = n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int n_i = let final<BottomType> #t111 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:235:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n.clamp(f(), f());
+              ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = let final<BottomType> #t112 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:236:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double n_d = n.clamp(f(), f());
+                 ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X n_x = let final<BottomType> #t113 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:237:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y n_y = let final<BottomType> #t114 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:238:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z n_z = let final<BottomType> #t115 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:239:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int i_i = i.{core::num::clamp}(self::f<core::int>(), self::f<core::int>());
+  core::double i_d = let final<BottomType> #t116 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:243:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double i_d = i.clamp(f(), f());
+                 ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X i_x = let final<BottomType> #t117 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:244:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y i_y = let final<BottomType> #t118 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:245:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z i_z = let final<BottomType> #t119 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:246:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int d_i = let final<BottomType> #t120 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:249:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int d_i = d.clamp(f(), f());
+              ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::num::clamp}(self::f<core::double>(), self::f<core::double>());
+  self::clamp::X d_x = let final<BottomType> #t121 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:251:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X d_x = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y d_y = let final<BottomType> #t122 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:252:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y d_y = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z d_z = let final<BottomType> #t123 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:253:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z d_z = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int x_i = let final<BottomType> #t124 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:256:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x.clamp(f(), f());
+              ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = let final<BottomType> #t125 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:257:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double x_d = x.clamp(f(), f());
+                 ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X x_x = let final<BottomType> #t126 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:258:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y x_y = let final<BottomType> #t127 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:259:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z x_z = let final<BottomType> #t128 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:260:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int y_i = y.{core::num::clamp}(self::f<core::int>(), self::f<core::int>());
+  core::double y_d = let final<BottomType> #t129 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:264:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double y_d = y.clamp(f(), f());
+                 ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X y_x = let final<BottomType> #t130 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:265:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y y_y = let final<BottomType> #t131 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:266:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z y_z = let final<BottomType> #t132 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:267:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int z_i = let final<BottomType> #t133 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:270:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int z_i = z.clamp(f(), f());
+              ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::num::clamp}(self::f<core::double>(), self::f<core::double>());
+  self::clamp::X z_x = let final<BottomType> #t134 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:272:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X z_x = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y z_y = let final<BottomType> #t135 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:273:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y z_y = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z z_z = let final<BottomType> #t136 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:274:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z z_z = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/numbers_inferred.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.weak.transformed.expect
new file mode 100644
index 0000000..ca5e0f2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/numbers_inferred.dart.weak.transformed.expect
@@ -0,0 +1,1054 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:10:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:12:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:13:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:14:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:19:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:20:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:21:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:24:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:26:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:27:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:28:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:31:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:33:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:34:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:35:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:40:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:41:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:42:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:45:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z + f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:47:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:48:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:49:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z + f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:55:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:57:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:58:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:59:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:64:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:65:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:66:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:69:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:71:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:72:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:73:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:76:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:78:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:79:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:80:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:85:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:86:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:87:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:90:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z - f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:92:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:93:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:94:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z - f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:100:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:102:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:103:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:104:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:109:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:110:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:111:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:114:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:116:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:117:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:118:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:121:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:123:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:124:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:125:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:130:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:131:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:132:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:135:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z * f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:137:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:138:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:139:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z * f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:145:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:147:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:148:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:149:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:154:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:155:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:156:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:159:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:161:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:162:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:163:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:166:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:168:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:169:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:170:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:175:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:176:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:177:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:180:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z % f();
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:182:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:183:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:184:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z % f();
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:190:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:192:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:193:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:194:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:199:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:200:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:201:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:204:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int d_i = d.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:206:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X d_x = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:207:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:208:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:211:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:213:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:214:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:215:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:220:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:221:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:222:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:225:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+//   int z_i = z.remainder(f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:227:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+//   X z_x = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:228:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:229:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z.remainder(f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:235:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int n_i = n.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:236:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double n_d = n.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:237:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X n_x = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:238:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y n_y = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:239:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z n_z = n.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:243:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double i_d = i.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:244:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X i_x = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:245:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y i_y = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:246:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z i_z = i.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:249:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int d_i = d.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:251:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X d_x = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:252:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y d_y = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:253:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z d_z = d.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:256:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int x_i = x.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:257:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double x_d = x.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:258:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X x_x = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:259:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y x_y = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:260:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z x_z = x.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:264:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+//   double y_d = y.clamp(f(), f());
+//                  ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:265:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X y_x = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:266:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y y_y = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:267:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z y_z = y.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:270:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+//   int z_i = z.clamp(f(), f());
+//               ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:272:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+//   X z_x = z.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:273:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+//   Y z_y = z.clamp(f(), f());
+//             ^
+//
+// pkg/front_end/testcases/nnbd/numbers_inferred.dart:274:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+//   Z z_z = z.clamp(f(), f());
+//             ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method f<T extends core::Object? = dynamic>() → self::f::T%
+  return throw "Unsupported";
+static method add<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::add::X x, self::add::Y y, self::add::Z z) → dynamic {
+  core::num n_n = n.{core::num::+}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:10:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n + f();
+              ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::+}(self::f<core::double>());
+  self::add::X n_x = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:12:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y n_y = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:13:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z n_z = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:14:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n + f();
+            ^" in n.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::+}(self::f<core::num>());
+  core::int i_i = i.{core::num::+}(self::f<core::int>());
+  core::double i_d = i.{core::num::+}(self::f<core::double>());
+  self::add::X i_x = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:19:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y i_y = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:20:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z i_z = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:21:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i + f();
+            ^" in i.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::+}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:24:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d + f();
+              ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::+}(self::f<core::num>());
+  self::add::X d_x = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:26:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y d_y = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:27:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z d_z = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:28:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d + f();
+            ^" in d.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::+}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:31:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x + f();
+              ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::+}(self::f<core::double>());
+  self::add::X x_x = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:33:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y x_y = let final<BottomType> #t14 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:34:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z x_z = let final<BottomType> #t15 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:35:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x + f();
+            ^" in x.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::+}(self::f<core::num>());
+  core::int y_i = y.{core::num::+}(self::f<core::int>());
+  core::double y_d = y.{core::num::+}(self::f<core::double>());
+  self::add::X y_x = let final<BottomType> #t16 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:40:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y y_y = let final<BottomType> #t17 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:41:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z y_z = let final<BottomType> #t18 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:42:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y + f();
+            ^" in y.{core::num::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::+}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t19 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:45:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z + f();
+              ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::+}(self::f<core::num>());
+  self::add::X z_x = let final<BottomType> #t20 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:47:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Y z_y = let final<BottomType> #t21 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:48:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::add::Z z_z = let final<BottomType> #t22 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:49:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z + f();
+            ^" in z.{core::double::+}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method sub<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::sub::X x, self::sub::Y y, self::sub::Z z) → dynamic {
+  core::num n_n = n.{core::num::-}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t23 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:55:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n - f();
+              ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::-}(self::f<core::double>());
+  self::sub::X n_x = let final<BottomType> #t24 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:57:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y n_y = let final<BottomType> #t25 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:58:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z n_z = let final<BottomType> #t26 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:59:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n - f();
+            ^" in n.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::-}(self::f<core::num>());
+  core::int i_i = i.{core::num::-}(self::f<core::int>());
+  core::double i_d = i.{core::num::-}(self::f<core::double>());
+  self::sub::X i_x = let final<BottomType> #t27 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:64:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y i_y = let final<BottomType> #t28 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:65:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z i_z = let final<BottomType> #t29 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:66:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i - f();
+            ^" in i.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::-}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t30 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:69:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d - f();
+              ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::-}(self::f<core::num>());
+  self::sub::X d_x = let final<BottomType> #t31 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:71:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y d_y = let final<BottomType> #t32 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:72:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z d_z = let final<BottomType> #t33 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:73:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d - f();
+            ^" in d.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::-}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t34 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:76:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x - f();
+              ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::-}(self::f<core::double>());
+  self::sub::X x_x = let final<BottomType> #t35 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:78:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y x_y = let final<BottomType> #t36 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:79:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z x_z = let final<BottomType> #t37 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:80:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x - f();
+            ^" in x.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::-}(self::f<core::num>());
+  core::int y_i = y.{core::num::-}(self::f<core::int>());
+  core::double y_d = y.{core::num::-}(self::f<core::double>());
+  self::sub::X y_x = let final<BottomType> #t38 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:85:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y y_y = let final<BottomType> #t39 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:86:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z y_z = let final<BottomType> #t40 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:87:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y - f();
+            ^" in y.{core::num::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::-}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t41 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:90:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z - f();
+              ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::-}(self::f<core::num>());
+  self::sub::X z_x = let final<BottomType> #t42 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:92:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Y z_y = let final<BottomType> #t43 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:93:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::sub::Z z_z = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:94:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z - f();
+            ^" in z.{core::double::-}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method mul<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mul::X x, self::mul::Y y, self::mul::Z z) → dynamic {
+  core::num n_n = n.{core::num::*}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t45 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:100:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n * f();
+              ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::*}(self::f<core::double>());
+  self::mul::X n_x = let final<BottomType> #t46 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:102:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y n_y = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:103:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z n_z = let final<BottomType> #t48 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:104:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n * f();
+            ^" in n.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::*}(self::f<core::num>());
+  core::int i_i = i.{core::num::*}(self::f<core::int>());
+  core::double i_d = i.{core::num::*}(self::f<core::double>());
+  self::mul::X i_x = let final<BottomType> #t49 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:109:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y i_y = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:110:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z i_z = let final<BottomType> #t51 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:111:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i * f();
+            ^" in i.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::*}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t52 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:114:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d * f();
+              ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::*}(self::f<core::num>());
+  self::mul::X d_x = let final<BottomType> #t53 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:116:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y d_y = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:117:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z d_z = let final<BottomType> #t55 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:118:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d * f();
+            ^" in d.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::*}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t56 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:121:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x * f();
+              ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::*}(self::f<core::double>());
+  self::mul::X x_x = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:123:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y x_y = let final<BottomType> #t58 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:124:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z x_z = let final<BottomType> #t59 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:125:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x * f();
+            ^" in x.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::*}(self::f<core::num>());
+  core::int y_i = y.{core::num::*}(self::f<core::int>());
+  core::double y_d = y.{core::num::*}(self::f<core::double>());
+  self::mul::X y_x = let final<BottomType> #t60 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:130:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y y_y = let final<BottomType> #t61 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:131:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z y_z = let final<BottomType> #t62 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:132:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y * f();
+            ^" in y.{core::num::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::*}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t63 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:135:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z * f();
+              ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::*}(self::f<core::num>());
+  self::mul::X z_x = let final<BottomType> #t64 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:137:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Y z_y = let final<BottomType> #t65 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:138:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mul::Z z_z = let final<BottomType> #t66 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:139:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z * f();
+            ^" in z.{core::double::*}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method mod<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::mod::X x, self::mod::Y y, self::mod::Z z) → dynamic {
+  core::num n_n = n.{core::num::%}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t67 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:145:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n % f();
+              ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::%}(self::f<core::double>());
+  self::mod::X n_x = let final<BottomType> #t68 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:147:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y n_y = let final<BottomType> #t69 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:148:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z n_z = let final<BottomType> #t70 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:149:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n % f();
+            ^" in n.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::%}(self::f<core::num>());
+  core::int i_i = i.{core::num::%}(self::f<core::int>());
+  core::double i_d = i.{core::num::%}(self::f<core::double>());
+  self::mod::X i_x = let final<BottomType> #t71 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:154:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y i_y = let final<BottomType> #t72 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:155:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z i_z = let final<BottomType> #t73 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:156:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i % f();
+            ^" in i.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::double::%}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t74 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:159:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d % f();
+              ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::%}(self::f<core::num>());
+  self::mod::X d_x = let final<BottomType> #t75 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:161:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y d_y = let final<BottomType> #t76 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:162:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z d_z = let final<BottomType> #t77 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:163:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d % f();
+            ^" in d.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::%}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t78 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:166:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x % f();
+              ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::%}(self::f<core::double>());
+  self::mod::X x_x = let final<BottomType> #t79 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:168:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y x_y = let final<BottomType> #t80 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:169:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z x_z = let final<BottomType> #t81 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:170:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x % f();
+            ^" in x.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::%}(self::f<core::num>());
+  core::int y_i = y.{core::num::%}(self::f<core::int>());
+  core::double y_d = y.{core::num::%}(self::f<core::double>());
+  self::mod::X y_x = let final<BottomType> #t82 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:175:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y y_y = let final<BottomType> #t83 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:176:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z y_z = let final<BottomType> #t84 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:177:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y % f();
+            ^" in y.{core::num::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::double::%}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t85 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:180:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z % f();
+              ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::%}(self::f<core::num>());
+  self::mod::X z_x = let final<BottomType> #t86 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:182:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Y z_y = let final<BottomType> #t87 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:183:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::mod::Z z_z = let final<BottomType> #t88 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:184:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z % f();
+            ^" in z.{core::double::%}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method remainder<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::remainder::X x, self::remainder::Y y, self::remainder::Z z) → dynamic {
+  core::num n_n = n.{core::num::remainder}(self::f<core::num>());
+  core::int n_i = let final<BottomType> #t89 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:190:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n.remainder(f());
+              ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = n.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X n_x = let final<BottomType> #t90 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:192:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y n_y = let final<BottomType> #t91 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:193:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z n_z = let final<BottomType> #t92 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:194:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n.remainder(f());
+            ^" in n.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::remainder}(self::f<core::num>());
+  core::int i_i = i.{core::num::remainder}(self::f<core::int>());
+  core::double i_d = i.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X i_x = let final<BottomType> #t93 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:199:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y i_y = let final<BottomType> #t94 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:200:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z i_z = let final<BottomType> #t95 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:201:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i.remainder(f());
+            ^" in i.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::double d_n = d.{core::double::remainder}(self::f<core::num>());
+  core::int d_i = let final<BottomType> #t96 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:204:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int d_i = d.remainder(f());
+              ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::double::remainder}(self::f<core::num>());
+  self::remainder::X d_x = let final<BottomType> #t97 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:206:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X d_x = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y d_y = let final<BottomType> #t98 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:207:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y d_y = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z d_z = let final<BottomType> #t99 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:208:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z d_z = d.remainder(f());
+            ^" in d.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::remainder}(self::f<core::num>());
+  core::int x_i = let final<BottomType> #t100 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:211:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x.remainder(f());
+              ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = x.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X x_x = let final<BottomType> #t101 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:213:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y x_y = let final<BottomType> #t102 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:214:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z x_z = let final<BottomType> #t103 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:215:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x.remainder(f());
+            ^" in x.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::remainder}(self::f<core::num>());
+  core::int y_i = y.{core::num::remainder}(self::f<core::int>());
+  core::double y_d = y.{core::num::remainder}(self::f<core::double>());
+  self::remainder::X y_x = let final<BottomType> #t104 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:220:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y y_y = let final<BottomType> #t105 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:221:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z y_z = let final<BottomType> #t106 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:222:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y.remainder(f());
+            ^" in y.{core::num::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::double z_n = z.{core::double::remainder}(self::f<core::num>());
+  core::int z_i = let final<BottomType> #t107 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:225:15: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  int z_i = z.remainder(f());
+              ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::double::remainder}(self::f<core::num>());
+  self::remainder::X z_x = let final<BottomType> #t108 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:227:13: Error: A value of type 'double' can't be assigned to a variable of type 'X'.
+  X z_x = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Y z_y = let final<BottomType> #t109 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:228:13: Error: A value of type 'double' can't be assigned to a variable of type 'Y'.
+  Y z_y = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::remainder::Z z_z = let final<BottomType> #t110 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:229:13: Error: A value of type 'double' can't be assigned to a variable of type 'Z'.
+  Z z_z = z.remainder(f());
+            ^" in z.{core::double::remainder}(self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method clamp<X extends core::num = core::num, Y extends core::int = core::int, Z extends core::double = core::double>(core::num n, core::int i, core::double d, self::clamp::X x, self::clamp::Y y, self::clamp::Z z) → dynamic {
+  core::num n_n = n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int n_i = let final<BottomType> #t111 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:235:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int n_i = n.clamp(f(), f());
+              ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double n_d = let final<BottomType> #t112 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:236:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double n_d = n.clamp(f(), f());
+                 ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X n_x = let final<BottomType> #t113 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:237:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X n_x = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y n_y = let final<BottomType> #t114 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:238:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y n_y = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z n_z = let final<BottomType> #t115 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:239:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z n_z = n.clamp(f(), f());
+            ^" in n.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num i_n = i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int i_i = i.{core::num::clamp}(self::f<core::int>(), self::f<core::int>());
+  core::double i_d = let final<BottomType> #t116 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:243:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double i_d = i.clamp(f(), f());
+                 ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X i_x = let final<BottomType> #t117 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:244:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X i_x = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y i_y = let final<BottomType> #t118 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:245:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y i_y = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z i_z = let final<BottomType> #t119 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:246:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z i_z = i.clamp(f(), f());
+            ^" in i.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num d_n = d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int d_i = let final<BottomType> #t120 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:249:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int d_i = d.clamp(f(), f());
+              ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double d_d = d.{core::num::clamp}(self::f<core::double>(), self::f<core::double>());
+  self::clamp::X d_x = let final<BottomType> #t121 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:251:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X d_x = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y d_y = let final<BottomType> #t122 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:252:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y d_y = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z d_z = let final<BottomType> #t123 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:253:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z d_z = d.clamp(f(), f());
+            ^" in d.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num x_n = x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int x_i = let final<BottomType> #t124 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:256:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int x_i = x.clamp(f(), f());
+              ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double x_d = let final<BottomType> #t125 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:257:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double x_d = x.clamp(f(), f());
+                 ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X x_x = let final<BottomType> #t126 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:258:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X x_x = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y x_y = let final<BottomType> #t127 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:259:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y x_y = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z x_z = let final<BottomType> #t128 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:260:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z x_z = x.clamp(f(), f());
+            ^" in x.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num y_n = y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int y_i = y.{core::num::clamp}(self::f<core::int>(), self::f<core::int>());
+  core::double y_d = let final<BottomType> #t129 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:264:18: Error: A value of type 'num' can't be assigned to a variable of type 'double'.
+  double y_d = y.clamp(f(), f());
+                 ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::double;
+  self::clamp::X y_x = let final<BottomType> #t130 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:265:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X y_x = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y y_y = let final<BottomType> #t131 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:266:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y y_y = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z y_z = let final<BottomType> #t132 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:267:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z y_z = y.clamp(f(), f());
+            ^" in y.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  core::num z_n = z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>());
+  core::int z_i = let final<BottomType> #t133 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:270:15: Error: A value of type 'num' can't be assigned to a variable of type 'int'.
+  int z_i = z.clamp(f(), f());
+              ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} core::int;
+  core::double z_d = z.{core::num::clamp}(self::f<core::double>(), self::f<core::double>());
+  self::clamp::X z_x = let final<BottomType> #t134 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:272:13: Error: A value of type 'num' can't be assigned to a variable of type 'X'.
+  X z_x = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Y z_y = let final<BottomType> #t135 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:273:13: Error: A value of type 'num' can't be assigned to a variable of type 'Y'.
+  Y z_y = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+  self::clamp::Z z_z = let final<BottomType> #t136 = invalid-expression "pkg/front_end/testcases/nnbd/numbers_inferred.dart:274:13: Error: A value of type 'num' can't be assigned to a variable of type 'Z'.
+  Z z_z = z.clamp(f(), f());
+            ^" in z.{core::num::clamp}(self::f<core::num>(), self::f<core::num>()) as{TypeError,ForNonNullableByDefault} <BottomType>;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/platform_definite_assignment/main.dart.outline.expect b/pkg/front_end/testcases/nnbd/platform_definite_assignment/main.dart.outline.expect
index f734994..1d570f5 100644
--- a/pkg/front_end/testcases/nnbd/platform_definite_assignment/main.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/platform_definite_assignment/main.dart.outline.expect
@@ -35,6 +35,6 @@
 static method method(core::int a) → core::int
   ;
 @_in::patch
-external static abstract method patchedMethod(core::int a) → void;
+external static method patchedMethod(core::int a) → void;
 static method /* from org-dartlang-testcase:///patch_lib.dart */ _injectedMethod(core::int i) → core::int
   ;
diff --git a/pkg/front_end/testcases/nnbd/platform_optional_parameters/main.dart.outline.expect b/pkg/front_end/testcases/nnbd/platform_optional_parameters/main.dart.outline.expect
index 25d8360..85646dd 100644
--- a/pkg/front_end/testcases/nnbd/platform_optional_parameters/main.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/platform_optional_parameters/main.dart.outline.expect
@@ -58,6 +58,6 @@
 static method method([core::int i]) → void
   ;
 @_in::patch
-external static abstract method patchedMethod([core::int i]) → void;
+external static method patchedMethod([core::int i]) → void;
 static method /* from org-dartlang-testcase:///patch_lib.dart */ _injectedMethod([core::int i]) → void
   ;
diff --git a/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.outline.expect b/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.outline.expect
index 7ba4b0f..df25b02 100644
--- a/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.outline.expect
@@ -29,7 +29,7 @@
   get extensionFunctionTypeGetter = self::Extension|get#extensionFunctionTypeGetter;
   set extensionProperty = self::Extension|set#extensionProperty;
 }
-static field core::int? topLevelBinary;
+static field core::num topLevelBinary;
 static field core::int topLevelUnary;
 static field dynamic topLevelIndexGet;
 static field core::int topLevelIndexSet;
diff --git a/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.strong.expect b/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.strong.expect
index 7c80c76..c4c45a5 100644
--- a/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.strong.expect
@@ -443,7 +443,7 @@
   get extensionFunctionTypeGetter = self::Extension|get#extensionFunctionTypeGetter;
   set extensionProperty = self::Extension|set#extensionProperty;
 }
-static field core::int? topLevelBinary = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:37:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+static field core::num topLevelBinary = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:37:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 var topLevelBinary = nullableInt + 0;
                                  ^" in self::nullableInt.{core::num::+}(0);
 static field core::int topLevelUnary = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:38:21: Error: Operator 'unary-' cannot be called on 'int?' because it is potentially null.
@@ -650,7 +650,7 @@
 static get nullableClass() → self::Class?
   return new self::Class::•();
 static method test() → dynamic {
-  core::int? localBinary = let final<BottomType> #t62 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:76:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  core::num localBinary = let final<BottomType> #t62 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:76:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   var localBinary = nullableInt + 0;
                                 ^" in self::nullableInt.{core::num::+}(0);
   core::int localUnary = let final<BottomType> #t63 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:77:20: Error: Operator 'unary-' cannot be called on 'int?' because it is potentially null.
diff --git a/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.weak.expect b/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.weak.expect
index 7c80c76..c4c45a5 100644
--- a/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_nullable_access.dart.weak.expect
@@ -443,7 +443,7 @@
   get extensionFunctionTypeGetter = self::Extension|get#extensionFunctionTypeGetter;
   set extensionProperty = self::Extension|set#extensionProperty;
 }
-static field core::int? topLevelBinary = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:37:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+static field core::num topLevelBinary = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:37:34: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
 var topLevelBinary = nullableInt + 0;
                                  ^" in self::nullableInt.{core::num::+}(0);
 static field core::int topLevelUnary = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:38:21: Error: Operator 'unary-' cannot be called on 'int?' because it is potentially null.
@@ -650,7 +650,7 @@
 static get nullableClass() → self::Class?
   return new self::Class::•();
 static method test() → dynamic {
-  core::int? localBinary = let final<BottomType> #t62 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:76:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  core::num localBinary = let final<BottomType> #t62 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:76:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   var localBinary = nullableInt + 0;
                                 ^" in self::nullableInt.{core::num::+}(0);
   core::int localUnary = let final<BottomType> #t63 = invalid-expression "pkg/front_end/testcases/nnbd/potentially_nullable_access.dart:77:20: Error: Operator 'unary-' cannot be called on 'int?' because it is potentially null.
diff --git a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.textual_outline.expect
new file mode 100644
index 0000000..f56a0d9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+class A<T> {
+  T? _current;
+  T get current => _current as T;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..268c668
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/redundant_type_casts.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+class A<T> {
+  T get current => _current as T;
+  T? _current;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/return_null.dart b/pkg/front_end/testcases/nnbd/return_null.dart
index a044f19..93ea4d6 100644
--- a/pkg/front_end/testcases/nnbd/return_null.dart
+++ b/pkg/front_end/testcases/nnbd/return_null.dart
@@ -114,7 +114,7 @@
   }
 
   bool b = false;
-  var local1 = () /* error */ {
+  var local1 = () /* ok */ {
     if (b) return 0;
   }();
   var local2 = () /* ok */ {
diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect b/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect
index b9743eb..022f00c 100644
--- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect
@@ -6,11 +6,11 @@
 // String returnImplicit() /*error*/ {
 //        ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //   return null; // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //     return null; // error
 //            ^
 //
@@ -31,11 +31,11 @@
 //   String returnImplicit() /* error */ {
 //   ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //     return null; // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //       return null; // error
 //              ^
 //
@@ -52,10 +52,6 @@
 //   Enum caseReturn2(Enum e) /* error */ {
 //   ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:117:16: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
-//   var local1 = () /* error */ {
-//                ^
-//
 import self as self;
 import "dart:core" as core;
 import "dart:async" as asy;
@@ -82,14 +78,14 @@
 }
 static method returnExplicit() → core::String {
   core::print("foo");
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
   return null; // error
          ^" in null as{TypeError,ForNonNullableByDefault} core::String;
 }
 static method returnMixed(core::bool b) → core::String {
   if(b) {
     core::print("foo");
-    return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+    return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
     return null; // error
            ^" in null as{TypeError,ForNonNullableByDefault} core::String;
   }
@@ -151,14 +147,14 @@
   }
   function returnExplicit() → core::String {
     core::print("foo");
-    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
     return null; // error
            ^" in null as{TypeError,ForNonNullableByDefault} core::String;
   }
   function returnMixed(core::bool b) → core::String {
     if(b) {
       core::print("foo");
-      return let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+      return let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
       return null; // error
              ^" in null as{TypeError,ForNonNullableByDefault} core::String;
     }
@@ -212,12 +208,9 @@
   ^" in null;
   }
   core::bool b = false;
-  core::int local1 = (() → core::int {
+  core::int? local1 = (() → core::int? {
     if(b)
       return 0;
-    return let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:117:16: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
-  var local1 = () /* error */ {
-               ^" in null;
   }).call();
   core::int? local2 = (() → core::int? {
     if(b)
diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect
index e9cbf0c..6f1bd4c 100644
--- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect
@@ -6,11 +6,11 @@
 // String returnImplicit() /*error*/ {
 //        ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //   return null; // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //     return null; // error
 //            ^
 //
@@ -31,11 +31,11 @@
 //   String returnImplicit() /* error */ {
 //   ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //     return null; // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //       return null; // error
 //              ^
 //
@@ -52,10 +52,6 @@
 //   Enum caseReturn2(Enum e) /* error */ {
 //   ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:117:16: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
-//   var local1 = () /* error */ {
-//                ^
-//
 import self as self;
 import "dart:core" as core;
 import "dart:async" as asy;
@@ -82,14 +78,14 @@
 }
 static method returnExplicit() → core::String {
   core::print("foo");
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
   return null; // error
          ^" in let core::Null? #t3 = null in #t3.==(null) ?{core::String} #t3 as{TypeError,ForNonNullableByDefault} core::String : #t3{core::String};
 }
 static method returnMixed(core::bool b) → core::String {
   if(b) {
     core::print("foo");
-    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
     return null; // error
            ^" in let core::Null? #t5 = null in #t5.==(null) ?{core::String} #t5 as{TypeError,ForNonNullableByDefault} core::String : #t5{core::String};
   }
@@ -351,14 +347,14 @@
   }
   function returnExplicit() → core::String {
     core::print("foo");
-    return let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+    return let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
     return null; // error
            ^" in let core::Null? #t11 = null in #t11.==(null) ?{core::String} #t11 as{TypeError,ForNonNullableByDefault} core::String : #t11{core::String};
   }
   function returnMixed(core::bool b) → core::String {
     if(b) {
       core::print("foo");
-      return let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+      return let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
       return null; // error
              ^" in let core::Null? #t13 = null in #t13.==(null) ?{core::String} #t13 as{TypeError,ForNonNullableByDefault} core::String : #t13{core::String};
     }
@@ -612,12 +608,9 @@
   ^" in null;
   }
   core::bool b = false;
-  core::int local1 = (() → core::int {
+  core::int? local1 = (() → core::int? {
     if(b)
       return 0;
-    return let final<BottomType> #t17 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:117:16: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
-  var local1 = () /* error */ {
-               ^" in null;
   }).call();
   core::int? local2 = (() → core::int? {
     if(b)
diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.weak.expect b/pkg/front_end/testcases/nnbd/return_null.dart.weak.expect
index c0505b5..4c9329b 100644
--- a/pkg/front_end/testcases/nnbd/return_null.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/return_null.dart.weak.expect
@@ -6,11 +6,11 @@
 // String returnImplicit() /*error*/ {
 //        ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //   return null; // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //     return null; // error
 //            ^
 //
@@ -31,11 +31,11 @@
 //   String returnImplicit() /* error */ {
 //   ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //     return null; // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //       return null; // error
 //              ^
 //
@@ -52,10 +52,6 @@
 //   Enum caseReturn2(Enum e) /* error */ {
 //   ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:117:16: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
-//   var local1 = () /* error */ {
-//                ^
-//
 import self as self;
 import "dart:core" as core;
 import "dart:async" as asy;
@@ -82,14 +78,14 @@
 }
 static method returnExplicit() → core::String {
   core::print("foo");
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
   return null; // error
          ^" in null as{TypeError,ForNonNullableByDefault} core::String;
 }
 static method returnMixed(core::bool b) → core::String {
   if(b) {
     core::print("foo");
-    return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+    return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
     return null; // error
            ^" in null as{TypeError,ForNonNullableByDefault} core::String;
   }
@@ -151,14 +147,14 @@
   }
   function returnExplicit() → core::String {
     core::print("foo");
-    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
     return null; // error
            ^" in null as{TypeError,ForNonNullableByDefault} core::String;
   }
   function returnMixed(core::bool b) → core::String {
     if(b) {
       core::print("foo");
-      return let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+      return let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
       return null; // error
              ^" in null as{TypeError,ForNonNullableByDefault} core::String;
     }
@@ -212,12 +208,9 @@
   ^" in null;
   }
   core::bool b = false;
-  core::int local1 = (() → core::int {
+  core::int? local1 = (() → core::int? {
     if(b)
       return 0;
-    return let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:117:16: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
-  var local1 = () /* error */ {
-               ^" in null;
   }).call();
   core::int? local2 = (() → core::int? {
     if(b)
diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/return_null.dart.weak.transformed.expect
index 755ad61..b3b3e5b 100644
--- a/pkg/front_end/testcases/nnbd/return_null.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/return_null.dart.weak.transformed.expect
@@ -6,11 +6,11 @@
 // String returnImplicit() /*error*/ {
 //        ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //   return null; // error
 //          ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //     return null; // error
 //            ^
 //
@@ -31,11 +31,11 @@
 //   String returnImplicit() /* error */ {
 //   ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //     return null; // error
 //            ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
 //       return null; // error
 //              ^
 //
@@ -52,10 +52,6 @@
 //   Enum caseReturn2(Enum e) /* error */ {
 //   ^
 //
-// pkg/front_end/testcases/nnbd/return_null.dart:117:16: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
-//   var local1 = () /* error */ {
-//                ^
-//
 import self as self;
 import "dart:core" as core;
 import "dart:async" as asy;
@@ -82,14 +78,14 @@
 }
 static method returnExplicit() → core::String {
   core::print("foo");
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:13:10: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
   return null; // error
          ^" in null;
 }
 static method returnMixed(core::bool b) → core::String {
   if(b) {
     core::print("foo");
-    return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+    return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:19:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
     return null; // error
            ^" in null;
   }
@@ -351,14 +347,14 @@
   }
   function returnExplicit() → core::String {
     core::print("foo");
-    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+    return let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:69:12: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
     return null; // error
            ^" in null;
   }
   function returnMixed(core::bool b) → core::String {
     if(b) {
       core::print("foo");
-      return let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be assigned to a variable of type 'String'.
+      return let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:75:14: Error: A value of type 'Null' can't be returned from a function with return type 'String'.
       return null; // error
              ^" in null;
     }
@@ -612,12 +608,9 @@
   ^" in null;
   }
   core::bool b = false;
-  core::int local1 = (() → core::int {
+  core::int? local1 = (() → core::int? {
     if(b)
       return 0;
-    return let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/return_null.dart:117:16: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
-  var local1 = () /* error */ {
-               ^" in null;
   }).call();
   core::int? local2 = (() → core::int? {
     if(b)
diff --git a/pkg/front_end/testcases/nnbd/shorting_stop.dart.strong.expect b/pkg/front_end/testcases/nnbd/shorting_stop.dart.strong.expect
index fffeeb8..609cde0 100644
--- a/pkg/front_end/testcases/nnbd/shorting_stop.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/shorting_stop.dart.strong.expect
@@ -54,7 +54,7 @@
 }
 static method test(self::Class? c) → dynamic {
   let final self::Class? #t1 = c in #t1.{core::Object::==}(null) ?{core::int?} null : #t1{self::Class}.{self::Class::next}.{self::Class::field};
-  self::throwsInStrong(() → core::int? => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:18:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  self::throwsInStrong(() → core::num => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:18:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   throwsInStrong(() => c?.field + 2); // error
                                 ^" in (let final self::Class? #t3 = c in #t3.{core::Object::==}(null) ?{core::int?} null : #t3{self::Class}.{self::Class::field}).{core::num::+}(2));
   let final self::Class? #t4 = c in #t4.{core::Object::==}(null) ?{core::int?} null : let final core::int #t5 = #t4.{self::Class::field}.{core::num::+}(1) in let final void #t6 = #t4.{self::Class::field} = #t5 in #t5;
@@ -68,7 +68,7 @@
   throwsInStrong(() => -c?.field); // error
                        ^" in (let final self::Class? #t11 = c in #t11.{core::Object::==}(null) ?{core::int?} null : #t11{self::Class}.{self::Class::field}).{core::int::unary-}());
   let final self::Class? #t12 = c in #t12.{core::Object::==}(null) ?{core::bool?} null : #t12{self::Class}.{self::Class::next}.{self::Class::[]}(0).{core::int::isEven};
-  self::throwsInStrong(() → core::int? => let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:25:35: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  self::throwsInStrong(() → core::num => let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:25:35: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   throwsInStrong(() => c?.next[0] + 2); // error
                                   ^" in (let final self::Class? #t14 = c in #t14.{core::Object::==}(null) ?{core::int?} null : #t14{self::Class}.{self::Class::next}.{self::Class::[]}(0)).{core::num::+}(2));
   let final self::Class? #t15 = c in #t15.{core::Object::==}(null) ?{core::int?} null : let final self::Class #t16 = #t15{self::Class}.{self::Class::next} in let final core::int #t17 = 0 in let final core::int #t18 = #t16.{self::Class::[]}(#t17).{core::num::+}(1) in let final void #t19 = #t16.{self::Class::[]=}(#t17, #t18) in #t18;
diff --git a/pkg/front_end/testcases/nnbd/shorting_stop.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/shorting_stop.dart.strong.transformed.expect
index fffeeb8..609cde0 100644
--- a/pkg/front_end/testcases/nnbd/shorting_stop.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/shorting_stop.dart.strong.transformed.expect
@@ -54,7 +54,7 @@
 }
 static method test(self::Class? c) → dynamic {
   let final self::Class? #t1 = c in #t1.{core::Object::==}(null) ?{core::int?} null : #t1{self::Class}.{self::Class::next}.{self::Class::field};
-  self::throwsInStrong(() → core::int? => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:18:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  self::throwsInStrong(() → core::num => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:18:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   throwsInStrong(() => c?.field + 2); // error
                                 ^" in (let final self::Class? #t3 = c in #t3.{core::Object::==}(null) ?{core::int?} null : #t3{self::Class}.{self::Class::field}).{core::num::+}(2));
   let final self::Class? #t4 = c in #t4.{core::Object::==}(null) ?{core::int?} null : let final core::int #t5 = #t4.{self::Class::field}.{core::num::+}(1) in let final void #t6 = #t4.{self::Class::field} = #t5 in #t5;
@@ -68,7 +68,7 @@
   throwsInStrong(() => -c?.field); // error
                        ^" in (let final self::Class? #t11 = c in #t11.{core::Object::==}(null) ?{core::int?} null : #t11{self::Class}.{self::Class::field}).{core::int::unary-}());
   let final self::Class? #t12 = c in #t12.{core::Object::==}(null) ?{core::bool?} null : #t12{self::Class}.{self::Class::next}.{self::Class::[]}(0).{core::int::isEven};
-  self::throwsInStrong(() → core::int? => let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:25:35: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  self::throwsInStrong(() → core::num => let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:25:35: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   throwsInStrong(() => c?.next[0] + 2); // error
                                   ^" in (let final self::Class? #t14 = c in #t14.{core::Object::==}(null) ?{core::int?} null : #t14{self::Class}.{self::Class::next}.{self::Class::[]}(0)).{core::num::+}(2));
   let final self::Class? #t15 = c in #t15.{core::Object::==}(null) ?{core::int?} null : let final self::Class #t16 = #t15{self::Class}.{self::Class::next} in let final core::int #t17 = 0 in let final core::int #t18 = #t16.{self::Class::[]}(#t17).{core::num::+}(1) in let final void #t19 = #t16.{self::Class::[]=}(#t17, #t18) in #t18;
diff --git a/pkg/front_end/testcases/nnbd/shorting_stop.dart.weak.expect b/pkg/front_end/testcases/nnbd/shorting_stop.dart.weak.expect
index fffeeb8..609cde0 100644
--- a/pkg/front_end/testcases/nnbd/shorting_stop.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/shorting_stop.dart.weak.expect
@@ -54,7 +54,7 @@
 }
 static method test(self::Class? c) → dynamic {
   let final self::Class? #t1 = c in #t1.{core::Object::==}(null) ?{core::int?} null : #t1{self::Class}.{self::Class::next}.{self::Class::field};
-  self::throwsInStrong(() → core::int? => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:18:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  self::throwsInStrong(() → core::num => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:18:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   throwsInStrong(() => c?.field + 2); // error
                                 ^" in (let final self::Class? #t3 = c in #t3.{core::Object::==}(null) ?{core::int?} null : #t3{self::Class}.{self::Class::field}).{core::num::+}(2));
   let final self::Class? #t4 = c in #t4.{core::Object::==}(null) ?{core::int?} null : let final core::int #t5 = #t4.{self::Class::field}.{core::num::+}(1) in let final void #t6 = #t4.{self::Class::field} = #t5 in #t5;
@@ -68,7 +68,7 @@
   throwsInStrong(() => -c?.field); // error
                        ^" in (let final self::Class? #t11 = c in #t11.{core::Object::==}(null) ?{core::int?} null : #t11{self::Class}.{self::Class::field}).{core::int::unary-}());
   let final self::Class? #t12 = c in #t12.{core::Object::==}(null) ?{core::bool?} null : #t12{self::Class}.{self::Class::next}.{self::Class::[]}(0).{core::int::isEven};
-  self::throwsInStrong(() → core::int? => let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:25:35: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  self::throwsInStrong(() → core::num => let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:25:35: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   throwsInStrong(() => c?.next[0] + 2); // error
                                   ^" in (let final self::Class? #t14 = c in #t14.{core::Object::==}(null) ?{core::int?} null : #t14{self::Class}.{self::Class::next}.{self::Class::[]}(0)).{core::num::+}(2));
   let final self::Class? #t15 = c in #t15.{core::Object::==}(null) ?{core::int?} null : let final self::Class #t16 = #t15{self::Class}.{self::Class::next} in let final core::int #t17 = 0 in let final core::int #t18 = #t16.{self::Class::[]}(#t17).{core::num::+}(1) in let final void #t19 = #t16.{self::Class::[]=}(#t17, #t18) in #t18;
diff --git a/pkg/front_end/testcases/nnbd/shorting_stop.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/shorting_stop.dart.weak.transformed.expect
index fffeeb8..609cde0 100644
--- a/pkg/front_end/testcases/nnbd/shorting_stop.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/shorting_stop.dart.weak.transformed.expect
@@ -54,7 +54,7 @@
 }
 static method test(self::Class? c) → dynamic {
   let final self::Class? #t1 = c in #t1.{core::Object::==}(null) ?{core::int?} null : #t1{self::Class}.{self::Class::next}.{self::Class::field};
-  self::throwsInStrong(() → core::int? => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:18:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  self::throwsInStrong(() → core::num => let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:18:33: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   throwsInStrong(() => c?.field + 2); // error
                                 ^" in (let final self::Class? #t3 = c in #t3.{core::Object::==}(null) ?{core::int?} null : #t3{self::Class}.{self::Class::field}).{core::num::+}(2));
   let final self::Class? #t4 = c in #t4.{core::Object::==}(null) ?{core::int?} null : let final core::int #t5 = #t4.{self::Class::field}.{core::num::+}(1) in let final void #t6 = #t4.{self::Class::field} = #t5 in #t5;
@@ -68,7 +68,7 @@
   throwsInStrong(() => -c?.field); // error
                        ^" in (let final self::Class? #t11 = c in #t11.{core::Object::==}(null) ?{core::int?} null : #t11{self::Class}.{self::Class::field}).{core::int::unary-}());
   let final self::Class? #t12 = c in #t12.{core::Object::==}(null) ?{core::bool?} null : #t12{self::Class}.{self::Class::next}.{self::Class::[]}(0).{core::int::isEven};
-  self::throwsInStrong(() → core::int? => let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:25:35: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
+  self::throwsInStrong(() → core::num => let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/shorting_stop.dart:25:35: Error: Operator '+' cannot be called on 'int?' because it is potentially null.
   throwsInStrong(() => c?.next[0] + 2); // error
                                   ^" in (let final self::Class? #t14 = c in #t14.{core::Object::==}(null) ?{core::int?} null : #t14{self::Class}.{self::Class::next}.{self::Class::[]}(0)).{core::num::+}(2));
   let final self::Class? #t15 = c in #t15.{core::Object::==}(null) ?{core::int?} null : let final self::Class #t16 = #t15{self::Class}.{self::Class::next} in let final core::int #t17 = 0 in let final core::int #t18 = #t16.{self::Class::[]}(#t17).{core::num::+}(1) in let final void #t19 = #t16.{self::Class::[]=}(#t17, #t18) in #t18;
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/.dart_tool/package_config.json b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/.dart_tool/package_config.json
new file mode 100644
index 0000000..c312198
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/.dart_tool/package_config.json
@@ -0,0 +1,15 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "opt_out_package",
+      "rootUri": "../opt_out_package/lib/",
+      "languageVersion": "2.7"
+    },
+    {
+      "name": "opt_in_package",
+      "rootUri": "../opt_in_package/lib/"
+    }
+
+  ]
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/link.options b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/link.options
new file mode 100644
index 0000000..5d06f3f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/link.options
@@ -0,0 +1,5 @@
+package:opt_in_package/opt_in_lib.dart
+package:opt_in_package/opt_out_lib.dart
+package:opt_out_package/regular_lib1.dart
+package:opt_out_package/regular_lib2.dart
+--nnbd-weak
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_in_package/lib/opt_in_lib.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_in_package/lib/opt_in_lib.dart
new file mode 100644
index 0000000..a08c72e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_in_package/lib/opt_in_lib.dart
@@ -0,0 +1,3 @@
+// 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.
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_in_package/lib/opt_out_lib.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_in_package/lib/opt_out_lib.dart
new file mode 100644
index 0000000..3ceddc3
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_in_package/lib/opt_out_lib.dart
@@ -0,0 +1,5 @@
+// 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.7
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib1.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib1.dart
new file mode 100644
index 0000000..a08c72e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib1.dart
@@ -0,0 +1,3 @@
+// 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.
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib2.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib2.dart
new file mode 100644
index 0000000..a08c72e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib2.dart
@@ -0,0 +1,3 @@
+// 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.
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart
new file mode 100644
index 0000000..f3ef4f5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart
@@ -0,0 +1,10 @@
+// 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:opt_in_package/opt_in_lib.dart';
+import 'package:opt_in_package/opt_out_lib.dart';
+import 'package:opt_out_package/regular_lib1.dart';
+import 'package:opt_out_package/regular_lib2.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.outline.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.outline.expect
new file mode 100644
index 0000000..0c8bca3
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.outline.expect
@@ -0,0 +1,22 @@
+//
+// Problems in component:
+//
+// Error: Cannot run with sound null safety as one or more dependencies do not
+// support null safety:
+//
+//  - package:opt_in_package/opt_out_lib.dart
+//  - package:opt_out_package
+//
+// Run 'pub outdated --mode=null-safety' to determine if versions of your
+// dependencies supporting null safety are available.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.expect
new file mode 100644
index 0000000..ce5b6e5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.expect
@@ -0,0 +1,21 @@
+//
+// Problems in component:
+//
+// Error: Cannot run with sound null safety as one or more dependencies do not
+// support null safety:
+//
+//  - package:opt_in_package/opt_out_lib.dart
+//  - package:opt_out_package
+//
+// Run 'pub outdated --mode=null-safety' to determine if versions of your
+// dependencies supporting null safety are available.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.transformed.expect
new file mode 100644
index 0000000..ce5b6e5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.strong.transformed.expect
@@ -0,0 +1,21 @@
+//
+// Problems in component:
+//
+// Error: Cannot run with sound null safety as one or more dependencies do not
+// support null safety:
+//
+//  - package:opt_in_package/opt_out_lib.dart
+//  - package:opt_out_package
+//
+// Run 'pub outdated --mode=null-safety' to determine if versions of your
+// dependencies supporting null safety are available.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.textual_outline.expect
new file mode 100644
index 0000000..3127540
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+import 'package:opt_in_package/opt_in_lib.dart';
+import 'package:opt_in_package/opt_out_lib.dart';
+import 'package:opt_out_package/regular_lib1.dart';
+import 'package:opt_out_package/regular_lib2.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..3127540
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+import 'package:opt_in_package/opt_in_lib.dart';
+import 'package:opt_in_package/opt_out_lib.dart';
+import 'package:opt_out_package/regular_lib1.dart';
+import 'package:opt_out_package/regular_lib2.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.weak.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.weak.expect
new file mode 100644
index 0000000..ba7e12e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.weak.expect
@@ -0,0 +1,9 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.weak.transformed.expect
new file mode 100644
index 0000000..ba7e12e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/strong.dart.weak.transformed.expect
@@ -0,0 +1,9 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/.dart_tool/package_config.json b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/.dart_tool/package_config.json
new file mode 100644
index 0000000..c312198
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/.dart_tool/package_config.json
@@ -0,0 +1,15 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "opt_out_package",
+      "rootUri": "../opt_out_package/lib/",
+      "languageVersion": "2.7"
+    },
+    {
+      "name": "opt_in_package",
+      "rootUri": "../opt_in_package/lib/"
+    }
+
+  ]
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_in_lib.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_in_lib.dart
new file mode 100644
index 0000000..a08c72e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_in_lib.dart
@@ -0,0 +1,3 @@
+// 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.
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart
new file mode 100644
index 0000000..3ceddc3
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart
@@ -0,0 +1,5 @@
+// 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.7
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart
new file mode 100644
index 0000000..a08c72e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart
@@ -0,0 +1,3 @@
+// 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.
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart
new file mode 100644
index 0000000..a08c72e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart
@@ -0,0 +1,3 @@
+// 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.
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart
new file mode 100644
index 0000000..f3ef4f5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart
@@ -0,0 +1,10 @@
+// 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:opt_in_package/opt_in_lib.dart';
+import 'package:opt_in_package/opt_out_lib.dart';
+import 'package:opt_out_package/regular_lib1.dart';
+import 'package:opt_out_package/regular_lib2.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.outline.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.outline.expect
new file mode 100644
index 0000000..6d4bfe9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.outline.expect
@@ -0,0 +1,28 @@
+//
+// Problems outside component:
+//
+// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
+// // @dart=2.7
+// ^^^^^^^^^^^^
+//
+//
+// Problems in component:
+//
+// Error: Cannot run with sound null safety as one or more dependencies do not
+// support null safety:
+//
+//  - package:opt_out_package
+//
+// Run 'pub outdated --mode=null-safety' to determine if versions of your
+// dependencies supporting null safety are available.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.expect
new file mode 100644
index 0000000..45dd453
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.expect
@@ -0,0 +1,27 @@
+//
+// Problems outside component:
+//
+// pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_in_package/lib/opt_out_lib.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety.
+// // @dart=2.7
+// ^^^^^^^^^^^^
+//
+//
+// Problems in component:
+//
+// Error: Cannot run with sound null safety as one or more dependencies do not
+// support null safety:
+//
+//  - package:opt_out_package
+//
+// Run 'pub outdated --mode=null-safety' to determine if versions of your
+// dependencies supporting null safety are available.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.transformed.expect
new file mode 100644
index 0000000..0134870
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.strong.transformed.expect
@@ -0,0 +1,20 @@
+//
+// Problems in component:
+//
+// Error: Cannot run with sound null safety as one or more dependencies do not
+// support null safety:
+//
+//  - package:opt_out_package
+//
+// Run 'pub outdated --mode=null-safety' to determine if versions of your
+// dependencies supporting null safety are available.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.textual_outline.expect
new file mode 100644
index 0000000..3127540
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+import 'package:opt_in_package/opt_in_lib.dart';
+import 'package:opt_in_package/opt_out_lib.dart';
+import 'package:opt_out_package/regular_lib1.dart';
+import 'package:opt_out_package/regular_lib2.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..3127540
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+import 'package:opt_in_package/opt_in_lib.dart';
+import 'package:opt_in_package/opt_out_lib.dart';
+import 'package:opt_out_package/regular_lib1.dart';
+import 'package:opt_out_package/regular_lib2.dart';
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.weak.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.weak.expect
new file mode 100644
index 0000000..ba7e12e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.weak.expect
@@ -0,0 +1,9 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.weak.transformed.expect
new file mode 100644
index 0000000..ba7e12e
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/strong.dart.weak.transformed.expect
@@ -0,0 +1,9 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "package:opt_in_package/opt_in_lib.dart";
+import "package:opt_in_package/opt_out_lib.dart";
+import "package:opt_out_package/regular_lib1.dart";
+import "package:opt_out_package/regular_lib2.dart";
+
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/type_constraint_solving_closures_in_upper_and_lower_bounds.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/type_constraint_solving_closures_in_upper_and_lower_bounds.dart.textual_outline.expect
new file mode 100644
index 0000000..fa80f6b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/type_constraint_solving_closures_in_upper_and_lower_bounds.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+class C<X> {
+  C(void Function(X) x);
+}
+
+T check<T>(C<List<T>> f) {}
+void test() {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/type_constraint_solving_closures_in_upper_and_lower_bounds.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/type_constraint_solving_closures_in_upper_and_lower_bounds.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bf84124
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/type_constraint_solving_closures_in_upper_and_lower_bounds.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+T check<T>(C<List<T>> f) {}
+
+class C<X> {
+  C(void Function(X) x);
+}
+
+main() {}
+void test() {}
diff --git a/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart
new file mode 100644
index 0000000..5765ffd
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.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.
+
+class Foo<T> {
+  dynamic bar;
+  dynamic baz;
+
+  dynamic qux() {
+    final T? v = bar;
+    if (v is num) {
+      baz['value'] = v.isFinite ? v : v.toString();
+    }
+  }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.outline.expect b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.outline.expect
new file mode 100644
index 0000000..c9c1d63
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.outline.expect
@@ -0,0 +1,14 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo<T extends core::Object? = dynamic> extends core::Object {
+  field dynamic bar;
+  field dynamic baz;
+  synthetic constructor •() → self::Foo<self::Foo::T%>
+    ;
+  method qux() → dynamic
+    ;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.strong.expect b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.strong.expect
new file mode 100644
index 0000000..78aceb3
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.strong.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo<T extends core::Object? = dynamic> extends core::Object {
+  field dynamic bar = null;
+  field dynamic baz = null;
+  synthetic constructor •() → self::Foo<self::Foo::T%>
+    : super core::Object::•()
+    ;
+  method qux() → dynamic {
+    final self::Foo::T? v = this.{self::Foo::bar} as{TypeError,ForDynamic,ForNonNullableByDefault} self::Foo::T?;
+    if(v is{ForNonNullableByDefault} core::num) {
+      this.{self::Foo::baz}.[]=("value", v{self::Foo::T? & core::num /* '?' & '!' = '!' */}.{core::num::isFinite} ?{core::Object?} v{self::Foo::T? & core::num /* '?' & '!' = '!' */} : v{self::Foo::T? & core::num /* '?' & '!' = '!' */}.{core::num::toString}());
+    }
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.strong.transformed.expect
new file mode 100644
index 0000000..78aceb3
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.strong.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo<T extends core::Object? = dynamic> extends core::Object {
+  field dynamic bar = null;
+  field dynamic baz = null;
+  synthetic constructor •() → self::Foo<self::Foo::T%>
+    : super core::Object::•()
+    ;
+  method qux() → dynamic {
+    final self::Foo::T? v = this.{self::Foo::bar} as{TypeError,ForDynamic,ForNonNullableByDefault} self::Foo::T?;
+    if(v is{ForNonNullableByDefault} core::num) {
+      this.{self::Foo::baz}.[]=("value", v{self::Foo::T? & core::num /* '?' & '!' = '!' */}.{core::num::isFinite} ?{core::Object?} v{self::Foo::T? & core::num /* '?' & '!' = '!' */} : v{self::Foo::T? & core::num /* '?' & '!' = '!' */}.{core::num::toString}());
+    }
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.weak.expect b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.weak.expect
new file mode 100644
index 0000000..78aceb3
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.weak.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo<T extends core::Object? = dynamic> extends core::Object {
+  field dynamic bar = null;
+  field dynamic baz = null;
+  synthetic constructor •() → self::Foo<self::Foo::T%>
+    : super core::Object::•()
+    ;
+  method qux() → dynamic {
+    final self::Foo::T? v = this.{self::Foo::bar} as{TypeError,ForDynamic,ForNonNullableByDefault} self::Foo::T?;
+    if(v is{ForNonNullableByDefault} core::num) {
+      this.{self::Foo::baz}.[]=("value", v{self::Foo::T? & core::num /* '?' & '!' = '!' */}.{core::num::isFinite} ?{core::Object?} v{self::Foo::T? & core::num /* '?' & '!' = '!' */} : v{self::Foo::T? & core::num /* '?' & '!' = '!' */}.{core::num::toString}());
+    }
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.weak.transformed.expect
new file mode 100644
index 0000000..78aceb3
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/upper_bound_on_promoted_type.dart.weak.transformed.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo<T extends core::Object? = dynamic> extends core::Object {
+  field dynamic bar = null;
+  field dynamic baz = null;
+  synthetic constructor •() → self::Foo<self::Foo::T%>
+    : super core::Object::•()
+    ;
+  method qux() → dynamic {
+    final self::Foo::T? v = this.{self::Foo::bar} as{TypeError,ForDynamic,ForNonNullableByDefault} self::Foo::T?;
+    if(v is{ForNonNullableByDefault} core::num) {
+      this.{self::Foo::baz}.[]=("value", v{self::Foo::T? & core::num /* '?' & '!' = '!' */}.{core::num::isFinite} ?{core::Object?} v{self::Foo::T? & core::num /* '?' & '!' = '!' */} : v{self::Foo::T? & core::num /* '?' & '!' = '!' */}.{core::num::toString}());
+    }
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart
new file mode 100644
index 0000000..b54e437
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart
@@ -0,0 +1,10 @@
+// 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.
+
+const String valueClass = "valueClass";
+
+@valueClass
+class EmptyClass {}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.outline.expect b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.outline.expect
new file mode 100644
index 0000000..e608a1a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.outline.expect
@@ -0,0 +1,12 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@self::valueClass
+class EmptyClass extends core::Object {
+  synthetic constructor •() → self::EmptyClass
+    ;
+}
+static const field core::String valueClass = "valueClass";
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.strong.expect b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.strong.expect
new file mode 100644
index 0000000..6b2cbce
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.strong.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class EmptyClass extends core::Object {
+  synthetic constructor •() → self::EmptyClass
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.strong.transformed.expect
new file mode 100644
index 0000000..6b2cbce
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.strong.transformed.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class EmptyClass extends core::Object {
+  synthetic constructor •() → self::EmptyClass
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.weak.expect b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.weak.expect
new file mode 100644
index 0000000..6b2cbce
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.weak.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class EmptyClass extends core::Object {
+  synthetic constructor •() → self::EmptyClass
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.weak.transformed.expect
new file mode 100644
index 0000000..6b2cbce
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/empty_test.dart.weak.transformed.expect
@@ -0,0 +1,16 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class EmptyClass extends core::Object {
+  synthetic constructor •() → self::EmptyClass
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart
new file mode 100644
index 0000000..6c9da9d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.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.
+
+const String valueClass = "valueClass";
+
+@valueClass
+class Animal {
+  int? numLegs;
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.outline.expect b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.outline.expect
new file mode 100644
index 0000000..4353f25
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.outline.expect
@@ -0,0 +1,13 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@self::valueClass
+class Animal extends core::Object {
+  field core::int? numLegs;
+  synthetic constructor •() → self::Animal
+    ;
+}
+static const field core::String valueClass = "valueClass";
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.strong.expect b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.strong.expect
new file mode 100644
index 0000000..2107377
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  field core::int? numLegs = null;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.strong.transformed.expect
new file mode 100644
index 0000000..2107377
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  field core::int? numLegs = null;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.weak.expect b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.weak.expect
new file mode 100644
index 0000000..2107377
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  field core::int? numLegs = null;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.weak.transformed.expect
new file mode 100644
index 0000000..2107377
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_final_field_error_test.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  field core::int? numLegs = null;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart
new file mode 100644
index 0000000..efe2cdd
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_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.
+
+const String valueClass = "valueClass";
+
+@valueClass
+class Animal {
+  final int numLegs = 4;
+}
+
+class Cat extends Animal {}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.outline.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.outline.expect
new file mode 100644
index 0000000..0dc7afd
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.outline.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@self::valueClass
+class Animal extends core::Object {
+  final field core::int numLegs;
+  synthetic constructor •() → self::Animal
+    ;
+}
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    ;
+}
+static const field core::String valueClass = "valueClass";
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.strong.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.strong.expect
new file mode 100644
index 0000000..dda377d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.strong.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.strong.transformed.expect
new file mode 100644
index 0000000..dda377d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.strong.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.weak.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.weak.expect
new file mode 100644
index 0000000..dda377d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.weak.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.weak.transformed.expect
new file mode 100644
index 0000000..dda377d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_extends_value_error_test.dart.weak.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart
new file mode 100644
index 0000000..3800fa1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_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.
+
+const String valueClass = "valueClass";
+
+@valueClass
+class Animal {
+  final int numLegs = 4;
+}
+
+class Cat implements Animal {
+  int numLegs = 4;
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.outline.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.outline.expect
new file mode 100644
index 0000000..6303c33
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.outline.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@self::valueClass
+class Animal extends core::Object {
+  final field core::int numLegs;
+  synthetic constructor •() → self::Animal
+    ;
+}
+class Cat extends core::Object implements self::Animal {
+  field core::int numLegs;
+  synthetic constructor •() → self::Cat
+    ;
+}
+static const field core::String valueClass = "valueClass";
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.strong.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.strong.expect
new file mode 100644
index 0000000..756c16c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.strong.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+class Cat extends core::Object implements self::Animal {
+  field core::int numLegs = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.strong.transformed.expect
new file mode 100644
index 0000000..756c16c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.strong.transformed.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+class Cat extends core::Object implements self::Animal {
+  field core::int numLegs = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.weak.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.weak.expect
new file mode 100644
index 0000000..756c16c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.weak.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+class Cat extends core::Object implements self::Animal {
+  field core::int numLegs = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.weak.transformed.expect
new file mode 100644
index 0000000..756c16c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/non_value_implements_value_error_test.dart.weak.transformed.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+class Cat extends core::Object implements self::Animal {
+  field core::int numLegs = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart
new file mode 100644
index 0000000..522d957
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/simple_test.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.
+
+const String valueClass = "valueClass";
+
+@valueClass
+class Animal {
+  final int numLegs = 4;
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.outline.expect b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.outline.expect
new file mode 100644
index 0000000..e16fd84
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.outline.expect
@@ -0,0 +1,13 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@self::valueClass
+class Animal extends core::Object {
+  final field core::int numLegs;
+  synthetic constructor •() → self::Animal
+    ;
+}
+static const field core::String valueClass = "valueClass";
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.strong.expect b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.strong.expect
new file mode 100644
index 0000000..264a8f9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.strong.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.strong.transformed.expect
new file mode 100644
index 0000000..264a8f9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.weak.expect b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.weak.expect
new file mode 100644
index 0000000..264a8f9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.weak.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.weak.transformed.expect
new file mode 100644
index 0000000..264a8f9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/simple_test.dart.weak.transformed.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart
new file mode 100644
index 0000000..d57a05b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/super_type_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.
+
+const String valueClass = "valueClass";
+
+@valueClass
+class Animal {
+  final int numLegs = 4;
+}
+
+@valueClass
+class Cat implements Animal {
+  final int numLegs = 4;
+  final int numWhiskers = 4;
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.outline.expect b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.outline.expect
new file mode 100644
index 0000000..72f354d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.outline.expect
@@ -0,0 +1,20 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@self::valueClass
+class Animal extends core::Object {
+  final field core::int numLegs;
+  synthetic constructor •() → self::Animal
+    ;
+}
+@self::valueClass
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs;
+  final field core::int numWhiskers;
+  synthetic constructor •() → self::Cat
+    ;
+}
+static const field core::String valueClass = "valueClass";
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.strong.expect b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.strong.expect
new file mode 100644
index 0000000..c9c2a66
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.strong.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs = 4;
+  final field core::int numWhiskers = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.strong.transformed.expect
new file mode 100644
index 0000000..c9c2a66
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.strong.transformed.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs = 4;
+  final field core::int numWhiskers = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.weak.expect b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.weak.expect
new file mode 100644
index 0000000..c9c2a66
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.weak.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs = 4;
+  final field core::int numWhiskers = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.weak.transformed.expect
new file mode 100644
index 0000000..c9c2a66
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/super_type_test.dart.weak.transformed.expect
@@ -0,0 +1,25 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+@#C1
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs = 4;
+  final field core::int numWhiskers = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/test.options b/pkg/front_end/testcases/nnbd/value_classes/test.options
new file mode 100644
index 0000000..81953a10
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/test.options
@@ -0,0 +1 @@
+--enable-experiment=non-nullable,value-class
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart
new file mode 100644
index 0000000..79b694c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_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.
+
+const String valueClass = "valueClass";
+
+class Animal {
+  int numLegs = 4;
+}
+
+@valueClass
+class Cat extends Animal {}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.outline.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.outline.expect
new file mode 100644
index 0000000..7d29b32
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.outline.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  field core::int numLegs;
+  synthetic constructor •() → self::Animal
+    ;
+}
+@self::valueClass
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    ;
+}
+static const field core::String valueClass = "valueClass";
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.strong.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.strong.expect
new file mode 100644
index 0000000..7e7b833
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.strong.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.strong.transformed.expect
new file mode 100644
index 0000000..7e7b833
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.strong.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.weak.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.weak.expect
new file mode 100644
index 0000000..7e7b833
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.weak.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.weak.transformed.expect
new file mode 100644
index 0000000..7e7b833
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_error_test.dart.weak.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart
new file mode 100644
index 0000000..2cc85fc
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_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.
+
+const String valueClass = "valueClass";
+
+class Animal {
+  final int numLegs = 4;
+}
+
+@valueClass
+class Cat extends Animal {}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.outline.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.outline.expect
new file mode 100644
index 0000000..c0cd3b6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.outline.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs;
+  synthetic constructor •() → self::Animal
+    ;
+}
+@self::valueClass
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    ;
+}
+static const field core::String valueClass = "valueClass";
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.strong.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.strong.expect
new file mode 100644
index 0000000..7e25746
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.strong.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.strong.transformed.expect
new file mode 100644
index 0000000..7e25746
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.strong.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.weak.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.weak.expect
new file mode 100644
index 0000000..7e25746
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.weak.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.weak.transformed.expect
new file mode 100644
index 0000000..7e25746
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_extends_non_value_test.dart.weak.transformed.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends self::Animal {
+  synthetic constructor •() → self::Cat
+    : super self::Animal::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart
new file mode 100644
index 0000000..2d67798
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_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.
+
+const String valueClass = "valueClass";
+
+class Animal {
+  final int numLegs = 4;
+}
+
+@valueClass
+class Cat implements Animal {
+  final int numLegs = 4;
+}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.outline.expect b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.outline.expect
new file mode 100644
index 0000000..e4fba11
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.outline.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs;
+  synthetic constructor •() → self::Animal
+    ;
+}
+@self::valueClass
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs;
+  synthetic constructor •() → self::Cat
+    ;
+}
+static const field core::String valueClass = "valueClass";
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.strong.expect b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.strong.expect
new file mode 100644
index 0000000..ba205d4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.strong.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.strong.transformed.expect
new file mode 100644
index 0000000..ba205d4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.strong.transformed.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.weak.expect b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.weak.expect
new file mode 100644
index 0000000..ba205d4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.weak.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.weak.transformed.expect
new file mode 100644
index 0000000..ba205d4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/value_classes/value_implements_non_value_test.dart.weak.transformed.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Animal extends core::Object {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Animal
+    : super core::Object::•()
+    ;
+}
+@#C1
+class Cat extends core::Object implements self::Animal {
+  final field core::int numLegs = 4;
+  synthetic constructor •() → self::Cat
+    : super core::Object::•()
+    ;
+}
+static const field core::String valueClass = #C1;
+static method main() → dynamic {}
+
+constants  {
+  #C1 = "valueClass"
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart
new file mode 100644
index 0000000..3e5c10c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart
@@ -0,0 +1,8 @@
+import 'flutter_issue_63029_lib1.dart';
+import 'flutter_issue_63029_lib2.dart';
+
+class E extends A {}
+
+class F extends B<E> with D<E> {}
+
+main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.textual_outline.expect
new file mode 100644
index 0000000..2c99d44
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+import 'flutter_issue_63029_lib1.dart';
+import 'flutter_issue_63029_lib2.dart';
+
+class E extends A {}
+
+class F extends B<E> with D<E> {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..2c99d44
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+import 'flutter_issue_63029_lib1.dart';
+import 'flutter_issue_63029_lib2.dart';
+
+class E extends A {}
+
+class F extends B<E> with D<E> {}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.weak.expect
new file mode 100644
index 0000000..e8fe043
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.weak.expect
@@ -0,0 +1,87 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart:6:7: Error: 'B<E>' doesn't implement 'B<E>' so it can't be used with 'D<E>'.
+//  - 'B' is from 'pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029_lib1.dart'.
+//  - 'E' is from 'pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart'.
+//  - 'D' is from 'pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029_lib2.dart'.
+// class F extends B<E> with D<E> {}
+//       ^
+//
+import self as self;
+import "flutter_issue_63029_lib1.dart" as flu;
+import "flutter_issue_63029_lib2.dart" as flu2;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///flutter_issue_63029_lib1.dart";
+import "org-dartlang-testcase:///flutter_issue_63029_lib2.dart";
+
+class E extends flu::A {
+  synthetic constructor •() → self::E
+    : super flu::A::•()
+    ;
+}
+abstract class _F&B&D = flu::B<self::E> with flu2::D<self::E> /*isAnonymousMixin*/  {
+  synthetic constructor •() → self::_F&B&D
+    : super flu::B::•()
+    ;
+  abstract forwarding-stub operator ==(dynamic other) → core::bool*;
+}
+class F extends self::_F&B&D {
+  synthetic constructor •() → self::F
+    : super self::_F&B&D::•()
+    ;
+  abstract forwarding-stub operator ==(dynamic other) → core::bool*;
+}
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as flu;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → flu::A
+    : super core::Object::•()
+    ;
+}
+abstract class B<T extends flu::A = flu::A> extends core::Object {
+  synthetic constructor •() → flu::B<flu::B::T>
+    : super core::Object::•()
+    ;
+}
+
+library;
+import self as flu2;
+import "dart:core" as core;
+import "flutter_issue_63029_lib1.dart" as flu;
+
+import "org-dartlang-testcase:///flutter_issue_63029_lib1.dart";
+
+class C extends core::Object {
+  synthetic constructor •() → flu2::C*
+    : 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 class D<T extends flu::A* = flu::A*> extends flu::B<flu2::D::T*> implements flu2::C /*isMixinDeclaration*/  {
+  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/flutter_issue_63029/flutter_issue_63029.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.weak.transformed.expect
new file mode 100644
index 0000000..f39dd6f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart.weak.transformed.expect
@@ -0,0 +1,96 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart:6:7: Error: 'B<E>' doesn't implement 'B<E>' so it can't be used with 'D<E>'.
+//  - 'B' is from 'pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029_lib1.dart'.
+//  - 'E' is from 'pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029.dart'.
+//  - 'D' is from 'pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029_lib2.dart'.
+// class F extends B<E> with D<E> {}
+//       ^
+//
+import self as self;
+import "flutter_issue_63029_lib1.dart" as flu;
+import "flutter_issue_63029_lib2.dart" as flu2;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///flutter_issue_63029_lib1.dart";
+import "org-dartlang-testcase:///flutter_issue_63029_lib2.dart";
+
+class E extends flu::A {
+  synthetic constructor •() → self::E
+    : super flu::A::•()
+    ;
+}
+abstract class _F&B&D extends flu::B<self::E> implements flu2::D<self::E> /*isAnonymousMixin,isEliminatedMixin*/  {
+  synthetic constructor •() → self::_F&B&D
+    : super flu::B::•()
+    ;
+  abstract member-signature operator /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ ==(dynamic other) → core::bool*;
+  abstract member-signature get /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ _identityHashCode() → core::int*;
+  abstract member-signature method /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature get /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ hashCode() → core::int*;
+  abstract member-signature method /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ toString() → core::String*;
+  abstract member-signature method /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get /*isNullableByDefault, from org-dartlang-testcase:///flutter_issue_63029_lib2.dart */ runtimeType() → core::Type*;
+}
+class F extends self::_F&B&D {
+  synthetic constructor •() → self::F
+    : super self::_F&B&D::•()
+    ;
+  abstract forwarding-stub operator ==(dynamic other) → core::bool*;
+}
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as flu;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → flu::A
+    : super core::Object::•()
+    ;
+}
+abstract class B<T extends flu::A = flu::A> extends core::Object {
+  synthetic constructor •() → flu::B<flu::B::T>
+    : super core::Object::•()
+    ;
+}
+
+library;
+import self as flu2;
+import "dart:core" as core;
+import "flutter_issue_63029_lib1.dart" as flu;
+
+import "org-dartlang-testcase:///flutter_issue_63029_lib1.dart";
+
+class C extends core::Object {
+  synthetic constructor •() → flu2::C*
+    : 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 class D<T extends flu::A* = flu::A*> extends flu::B<flu2::D::T*> implements flu2::C /*isMixinDeclaration*/  {
+  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/flutter_issue_63029/flutter_issue_63029_lib1.dart b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029_lib1.dart
new file mode 100644
index 0000000..90bdb8f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029_lib1.dart
@@ -0,0 +1,3 @@
+abstract class A {}
+
+abstract class B<T extends A> {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029_lib2.dart b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029_lib2.dart
new file mode 100644
index 0000000..7205587
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/flutter_issue_63029/flutter_issue_63029_lib2.dart
@@ -0,0 +1,7 @@
+// @dart = 2.8
+
+import 'flutter_issue_63029_lib1.dart';
+
+class C {}
+
+mixin D<T extends A> on B<T> implements C {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42181.dart b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart
new file mode 100644
index 0000000..ad9b510
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42181.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 'issue42181_lib.dart';
+
+int? f1(int x) => x;
+
+void test() {
+  F f = null; // Static error
+  f = f1; // No error
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.textual_outline.expect
new file mode 100644
index 0000000..f3fb35c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.textual_outline.expect
@@ -0,0 +1,5 @@
+import 'issue42181_lib.dart';
+
+int? f1(int x) => x;
+void test() {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..9ad4cf9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@
+import 'issue42181_lib.dart';
+
+int? f1(int x) => x;
+main() {}
+void test() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.expect
new file mode 100644
index 0000000..6cfbab4
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd_mixed/issue42181.dart:10:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int Function(int)'.
+//   F f = null; // Static error
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue42181_lib.dart";
+
+static method f1(core::int x) → core::int?
+  return x;
+static method test() → void {
+  (core::int*) → core::int* f = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd_mixed/issue42181.dart:10:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int Function(int)'.
+  F f = null; // Static error
+        ^" in null as{TypeError,ForNonNullableByDefault} (core::int*) → core::int*;
+  f = #C1;
+}
+static method main() → dynamic {}
+
+library;
+import self as self2;
+import "dart:core" as core;
+
+typedef F = (core::int*) →* core::int*;
+
+constants  {
+  #C1 = tearoff self::f1
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.transformed.expect
new file mode 100644
index 0000000..87f79f9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.transformed.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd_mixed/issue42181.dart:10:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int Function(int)'.
+//   F f = null; // Static error
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue42181_lib.dart";
+
+static method f1(core::int x) → core::int?
+  return x;
+static method test() → void {
+  (core::int*) → core::int* f = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd_mixed/issue42181.dart:10:9: Error: A value of type 'Null' can't be assigned to a variable of type 'int Function(int)'.
+  F f = null; // Static error
+        ^" in null;
+  f = #C1;
+}
+static method main() → dynamic {}
+
+library;
+import self as self2;
+import "dart:core" as core;
+
+typedef F = (core::int*) →* core::int*;
+
+constants  {
+  #C1 = tearoff self::f1
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42181_lib.dart b/pkg/front_end/testcases/nnbd_mixed/issue42181_lib.dart
new file mode 100644
index 0000000..16bc752
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42181_lib.dart
@@ -0,0 +1,7 @@
+// 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.8
+
+typedef F = int Function(int);
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart b/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart
index c2736fd..0984f7c 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart
@@ -2,6 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// @dart = 2.9
+// @dart = 2.10
 
 typedef Future<Null> AsyncCallback();
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_binding_lib.dart b/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_binding_lib.dart
index a1fb380..9666c88 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_binding_lib.dart
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_binding_lib.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// @dart = 2.9
+// @dart = 2.10
 
 import 'foundation_basic_types_lib.dart';
 
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart
new file mode 100644
index 0000000..0d300c0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660.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.
+
+// @dart=2.8
+import 'issue42660_lib.dart';
+
+void main() {
+  f().m();
+  (f)().m();
+  p.m();
+  var c = new Class();
+  c.f().m();
+  (c.f)().m();
+  c.p.m();
+  c[0].m();
+  (-c).m();
+  (c + 4).m();
+  c..p.m()..f().m()..[0].m();
+  new Class()..p.m()..f().m()..[0].m();
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.textual_outline.expect
new file mode 100644
index 0000000..a163495
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.textual_outline.expect
@@ -0,0 +1,4 @@
+// @dart = 2.8
+import 'issue42660_lib.dart';
+
+void main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..a163495
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.textual_outline_modelled.expect
@@ -0,0 +1,4 @@
+// @dart = 2.8
+import 'issue42660_lib.dart';
+
+void main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect
new file mode 100644
index 0000000..88ec031
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect
@@ -0,0 +1,65 @@
+library;
+import self as self;
+import "issue42660_lib.dart" as iss;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue42660_lib.dart";
+
+static method main() → void {
+  iss::E|m(iss::f());
+  iss::E|m((#C1).call());
+  iss::E|m(iss::p);
+  iss::Class<dynamic>* c = new iss::Class::•<dynamic>();
+  iss::E|m(c.{iss::Class::f}());
+  iss::E|m(c.{iss::Class::f}.call());
+  iss::E|m(c.{iss::Class::p});
+  iss::E|m(c.{iss::Class::[]}(0));
+  iss::E|m(c.{iss::Class::unary-}());
+  iss::E|m(c.{iss::Class::+}(4));
+  let final iss::Class<dynamic>* #t1 = c in block {
+    iss::E|m(#t1.{iss::Class::p});
+    iss::E|m(#t1.{iss::Class::f}());
+    iss::E|m(#t1.{iss::Class::[]}(0));
+  } =>#t1;
+  let final iss::Class<dynamic>* #t2 = new iss::Class::•<dynamic>() in block {
+    iss::E|m(#t2.{iss::Class::p});
+    iss::E|m(#t2.{iss::Class::f}());
+    iss::E|m(#t2.{iss::Class::[]}(0));
+  } =>#t2;
+}
+
+library /*isNonNullableByDefault*/;
+import self as iss;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → iss::Class<iss::Class::T%>
+    : super core::Object::•()
+    ;
+  method f() → core::int?
+    return 4;
+  get p() → core::int?
+    return 4;
+  operator [](core::int index) → core::int?
+    return 4;
+  operator unary-() → core::int?
+    return 4;
+  operator +(core::Object? other) → core::int?
+    return 4;
+}
+extension E on core::int {
+  method m = iss::E|m;
+  tearoff m = iss::E|get#m;
+}
+static method E|m(final core::int #this) → core::String
+  return "m";
+static method E|get#m(final core::int #this) → () → core::String
+  return () → core::String => iss::E|m(#this);
+static method f() → core::int?
+  return 4;
+static get p() → core::int?
+  return 4;
+
+constants  {
+  #C1 = tearoff iss::f
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.transformed.expect
new file mode 100644
index 0000000..88ec031
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.transformed.expect
@@ -0,0 +1,65 @@
+library;
+import self as self;
+import "issue42660_lib.dart" as iss;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue42660_lib.dart";
+
+static method main() → void {
+  iss::E|m(iss::f());
+  iss::E|m((#C1).call());
+  iss::E|m(iss::p);
+  iss::Class<dynamic>* c = new iss::Class::•<dynamic>();
+  iss::E|m(c.{iss::Class::f}());
+  iss::E|m(c.{iss::Class::f}.call());
+  iss::E|m(c.{iss::Class::p});
+  iss::E|m(c.{iss::Class::[]}(0));
+  iss::E|m(c.{iss::Class::unary-}());
+  iss::E|m(c.{iss::Class::+}(4));
+  let final iss::Class<dynamic>* #t1 = c in block {
+    iss::E|m(#t1.{iss::Class::p});
+    iss::E|m(#t1.{iss::Class::f}());
+    iss::E|m(#t1.{iss::Class::[]}(0));
+  } =>#t1;
+  let final iss::Class<dynamic>* #t2 = new iss::Class::•<dynamic>() in block {
+    iss::E|m(#t2.{iss::Class::p});
+    iss::E|m(#t2.{iss::Class::f}());
+    iss::E|m(#t2.{iss::Class::[]}(0));
+  } =>#t2;
+}
+
+library /*isNonNullableByDefault*/;
+import self as iss;
+import "dart:core" as core;
+
+class Class<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → iss::Class<iss::Class::T%>
+    : super core::Object::•()
+    ;
+  method f() → core::int?
+    return 4;
+  get p() → core::int?
+    return 4;
+  operator [](core::int index) → core::int?
+    return 4;
+  operator unary-() → core::int?
+    return 4;
+  operator +(core::Object? other) → core::int?
+    return 4;
+}
+extension E on core::int {
+  method m = iss::E|m;
+  tearoff m = iss::E|get#m;
+}
+static method E|m(final core::int #this) → core::String
+  return "m";
+static method E|get#m(final core::int #this) → () → core::String
+  return () → core::String => iss::E|m(#this);
+static method f() → core::int?
+  return 4;
+static get p() → core::int?
+  return 4;
+
+constants  {
+  #C1 = tearoff iss::f
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42660_lib.dart b/pkg/front_end/testcases/nnbd_mixed/issue42660_lib.dart
new file mode 100644
index 0000000..7207237
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660_lib.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.
+
+// @dart=2.10
+
+extension E on int {
+  String m() => 'm';
+}
+
+int? f() => 4;
+
+int? get p => 4;
+
+class Class<T> {
+  int? f() => 4;
+  int? get p => 4;
+
+  int? operator [](int index) => 4;
+
+  int? operator -() => 4;
+
+  int? operator +(Object? other) => 4;
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42792.dart b/pkg/front_end/testcases/nnbd_mixed/issue42792.dart
new file mode 100644
index 0000000..b6b0559
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42792.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.
+
+import 'issue42792_lib.dart';
+
+mixin M<T> on A<T> {}
+
+class B extends A<int> with M {}
+
+void main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.textual_outline.expect
new file mode 100644
index 0000000..af0bbd2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+import 'issue42792_lib.dart';
+
+mixin M<T> on A<T> {}
+
+class B extends A<int> with M {}
+
+void main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..7b313f7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+import 'issue42792_lib.dart';
+
+class B extends A<int> with M {}
+
+mixin M<T> on A<T> {}
+void main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.weak.expect
new file mode 100644
index 0000000..3a81ec3
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.weak.expect
@@ -0,0 +1,40 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "issue42792_lib.dart" as iss;
+
+import "org-dartlang-testcase:///issue42792_lib.dart";
+
+abstract class M<T extends core::Object? = dynamic> extends iss::A<self::M::T%> /*isMixinDeclaration*/  {
+}
+abstract class _B&A&M = iss::A<core::int> with self::M<core::int> /*isAnonymousMixin*/  {
+  synthetic constructor •() → self::_B&A&M
+    : super iss::A::•()
+    ;
+}
+class B extends self::_B&A&M {
+  synthetic constructor •() → self::B
+    : super self::_B&A&M::•()
+    ;
+}
+static method main() → void {}
+
+library;
+import self as iss;
+import "dart:core" as core;
+
+abstract class A<T extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → iss::A<iss::A::T*>*
+    : 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/issue42792.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.weak.transformed.expect
new file mode 100644
index 0000000..6750224
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42792.dart.weak.transformed.expect
@@ -0,0 +1,40 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "issue42792_lib.dart" as iss;
+
+import "org-dartlang-testcase:///issue42792_lib.dart";
+
+abstract class M<T extends core::Object? = dynamic> extends iss::A<self::M::T%> /*isMixinDeclaration*/  {
+}
+abstract class _B&A&M extends iss::A<core::int> implements self::M<core::int> /*isAnonymousMixin,isEliminatedMixin*/  {
+  synthetic constructor •() → self::_B&A&M
+    : super iss::A::•()
+    ;
+}
+class B extends self::_B&A&M {
+  synthetic constructor •() → self::B
+    : super self::_B&A&M::•()
+    ;
+}
+static method main() → void {}
+
+library;
+import self as iss;
+import "dart:core" as core;
+
+abstract class A<T extends core::Object* = dynamic> extends core::Object {
+  synthetic constructor •() → iss::A<iss::A::T*>*
+    : 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/issue42792_lib.dart b/pkg/front_end/testcases/nnbd_mixed/issue42792_lib.dart
new file mode 100644
index 0000000..7a4b268
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42792_lib.dart
@@ -0,0 +1,7 @@
+// 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.8
+
+abstract class A<T> {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42836.dart b/pkg/front_end/testcases/nnbd_mixed/issue42836.dart
new file mode 100644
index 0000000..e23b8c0
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42836.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.
+
+// @dart=2.7
+
+import 'issue42836_lib.dart';
+
+class Legacy extends Generic<int> {
+  int legacyMethod() => 3;
+}
+
+var legacyInstance = Legacy();
+
+test(bool b) {
+  var a1 = b ? legacyInstance : legacyInstance;
+  var a2 = b ? legacyInstance : nonNullableInstance;
+  var a3 = b ? legacyInstance : nullableInstance;
+  var b1 = b ? nonNullableInstance : legacyInstance;
+  var b2 = b ? nonNullableInstance : nonNullableInstance;
+  var b3 = b ? nonNullableInstance : nullableInstance;
+  var c1 = b ? nullableInstance : legacyInstance;
+  var c2 = b ? nullableInstance : nonNullableInstance;
+  var c3 = b ? nullableInstance : nullableInstance;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.textual_outline.expect
new file mode 100644
index 0000000..9bf1641
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.textual_outline.expect
@@ -0,0 +1,10 @@
+// @dart = 2.7
+import 'issue42836_lib.dart';
+
+class Legacy extends Generic<int> {
+  int legacyMethod() => 3;
+}
+
+var legacyInstance = Legacy();
+test(bool b) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..cd4b436
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.textual_outline_modelled.expect
@@ -0,0 +1,10 @@
+// @dart = 2.7
+import 'issue42836_lib.dart';
+
+class Legacy extends Generic<int> {
+  int legacyMethod() => 3;
+}
+
+main() {}
+test(bool b) {}
+var legacyInstance = Legacy();
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.weak.expect
new file mode 100644
index 0000000..2ff8a4f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.weak.expect
@@ -0,0 +1,73 @@
+library;
+import self as self;
+import "issue42836_lib.dart" as iss;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue42836_lib.dart";
+
+class Legacy extends iss::Generic<core::int*> {
+  synthetic constructor •() → self::Legacy*
+    : super iss::Generic::•()
+    ;
+  method legacyMethod() → core::int*
+    return 3;
+  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*;
+}
+static field self::Legacy* legacyInstance = new self::Legacy::•();
+static method test(core::bool* b) → dynamic {
+  self::Legacy* a1 = b ?{self::Legacy*} self::legacyInstance : self::legacyInstance;
+  iss::Generic<core::int*>* a2 = b ?{iss::Generic<core::int*>*} self::legacyInstance : iss::nonNullableInstance;
+  iss::Generic<core::int*>* a3 = b ?{iss::Generic<core::int*>*} self::legacyInstance : iss::nullableInstance;
+  iss::Generic<core::int*>* b1 = b ?{iss::Generic<core::int*>*} iss::nonNullableInstance : self::legacyInstance;
+  iss::NonNullable* b2 = b ?{iss::NonNullable*} iss::nonNullableInstance : iss::nonNullableInstance;
+  iss::Generic<core::int*>* b3 = b ?{iss::Generic<core::int*>*} iss::nonNullableInstance : iss::nullableInstance;
+  iss::Generic<core::int*>* c1 = b ?{iss::Generic<core::int*>*} iss::nullableInstance : self::legacyInstance;
+  iss::Generic<core::int*>* c2 = b ?{iss::Generic<core::int*>*} iss::nullableInstance : iss::nonNullableInstance;
+  iss::Nullable* c3 = b ?{iss::Nullable*} iss::nullableInstance : iss::nullableInstance;
+}
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as iss;
+import "dart:core" as core;
+import "issue42836.dart" as self;
+
+import "org-dartlang-testcase:///issue42836.dart";
+
+class Generic<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → iss::Generic<iss::Generic::T%>
+    : super core::Object::•()
+    ;
+}
+class NonNullable extends iss::Generic<core::int> {
+  synthetic constructor •() → iss::NonNullable
+    : super iss::Generic::•()
+    ;
+}
+class Nullable extends iss::Generic<core::int?> {
+  synthetic constructor •() → iss::Nullable
+    : super iss::Generic::•()
+    ;
+}
+static field iss::NonNullable nonNullableInstance = new iss::NonNullable::•();
+static field iss::Nullable nullableInstance = new iss::Nullable::•();
+static method test(core::bool b) → dynamic {
+  self::Legacy a1 = b ?{self::Legacy*} self::legacyInstance : self::legacyInstance;
+  core::Object a2 = b ?{core::Object*} self::legacyInstance : iss::nonNullableInstance;
+  core::Object a3 = b ?{core::Object*} self::legacyInstance : iss::nullableInstance;
+  core::Object b1 = b ?{core::Object*} iss::nonNullableInstance : self::legacyInstance;
+  iss::NonNullable b2 = b ?{iss::NonNullable} iss::nonNullableInstance : iss::nonNullableInstance;
+  core::Object b3 = b ?{core::Object} iss::nonNullableInstance : iss::nullableInstance;
+  core::Object c1 = b ?{core::Object*} iss::nullableInstance : self::legacyInstance;
+  core::Object c2 = b ?{core::Object} iss::nullableInstance : iss::nonNullableInstance;
+  iss::Nullable c3 = b ?{iss::Nullable} iss::nullableInstance : iss::nullableInstance;
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.weak.transformed.expect
new file mode 100644
index 0000000..2ff8a4f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42836.dart.weak.transformed.expect
@@ -0,0 +1,73 @@
+library;
+import self as self;
+import "issue42836_lib.dart" as iss;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///issue42836_lib.dart";
+
+class Legacy extends iss::Generic<core::int*> {
+  synthetic constructor •() → self::Legacy*
+    : super iss::Generic::•()
+    ;
+  method legacyMethod() → core::int*
+    return 3;
+  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*;
+}
+static field self::Legacy* legacyInstance = new self::Legacy::•();
+static method test(core::bool* b) → dynamic {
+  self::Legacy* a1 = b ?{self::Legacy*} self::legacyInstance : self::legacyInstance;
+  iss::Generic<core::int*>* a2 = b ?{iss::Generic<core::int*>*} self::legacyInstance : iss::nonNullableInstance;
+  iss::Generic<core::int*>* a3 = b ?{iss::Generic<core::int*>*} self::legacyInstance : iss::nullableInstance;
+  iss::Generic<core::int*>* b1 = b ?{iss::Generic<core::int*>*} iss::nonNullableInstance : self::legacyInstance;
+  iss::NonNullable* b2 = b ?{iss::NonNullable*} iss::nonNullableInstance : iss::nonNullableInstance;
+  iss::Generic<core::int*>* b3 = b ?{iss::Generic<core::int*>*} iss::nonNullableInstance : iss::nullableInstance;
+  iss::Generic<core::int*>* c1 = b ?{iss::Generic<core::int*>*} iss::nullableInstance : self::legacyInstance;
+  iss::Generic<core::int*>* c2 = b ?{iss::Generic<core::int*>*} iss::nullableInstance : iss::nonNullableInstance;
+  iss::Nullable* c3 = b ?{iss::Nullable*} iss::nullableInstance : iss::nullableInstance;
+}
+static method main() → dynamic {}
+
+library /*isNonNullableByDefault*/;
+import self as iss;
+import "dart:core" as core;
+import "issue42836.dart" as self;
+
+import "org-dartlang-testcase:///issue42836.dart";
+
+class Generic<T extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → iss::Generic<iss::Generic::T%>
+    : super core::Object::•()
+    ;
+}
+class NonNullable extends iss::Generic<core::int> {
+  synthetic constructor •() → iss::NonNullable
+    : super iss::Generic::•()
+    ;
+}
+class Nullable extends iss::Generic<core::int?> {
+  synthetic constructor •() → iss::Nullable
+    : super iss::Generic::•()
+    ;
+}
+static field iss::NonNullable nonNullableInstance = new iss::NonNullable::•();
+static field iss::Nullable nullableInstance = new iss::Nullable::•();
+static method test(core::bool b) → dynamic {
+  self::Legacy a1 = b ?{self::Legacy*} self::legacyInstance : self::legacyInstance;
+  core::Object a2 = b ?{core::Object*} self::legacyInstance : iss::nonNullableInstance;
+  core::Object a3 = b ?{core::Object*} self::legacyInstance : iss::nullableInstance;
+  core::Object b1 = b ?{core::Object*} iss::nonNullableInstance : self::legacyInstance;
+  iss::NonNullable b2 = b ?{iss::NonNullable} iss::nonNullableInstance : iss::nonNullableInstance;
+  core::Object b3 = b ?{core::Object} iss::nonNullableInstance : iss::nullableInstance;
+  core::Object c1 = b ?{core::Object*} iss::nullableInstance : self::legacyInstance;
+  core::Object c2 = b ?{core::Object} iss::nullableInstance : iss::nonNullableInstance;
+  iss::Nullable c3 = b ?{iss::Nullable} iss::nullableInstance : iss::nullableInstance;
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42836_lib.dart b/pkg/front_end/testcases/nnbd_mixed/issue42836_lib.dart
new file mode 100644
index 0000000..74f567c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42836_lib.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.
+
+import 'issue42836.dart';
+
+class Generic<T> {}
+
+class NonNullable extends Generic<int> {}
+
+class Nullable extends Generic<int?> {}
+
+var nonNullableInstance = NonNullable();
+var nullableInstance = Nullable();
+
+test(bool b) {
+  var a1 = b ? legacyInstance : legacyInstance;
+  var a2 = b ? legacyInstance : nonNullableInstance;
+  var a3 = b ? legacyInstance : nullableInstance;
+  var b1 = b ? nonNullableInstance : legacyInstance;
+  var b2 = b ? nonNullableInstance : nonNullableInstance;
+  var b3 = b ? nonNullableInstance : nullableInstance;
+  var c1 = b ? nullableInstance : legacyInstance;
+  var c2 = b ? nullableInstance : nonNullableInstance;
+  var c3 = b ? nullableInstance : nullableInstance;
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/never_opt_out.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/never_opt_out.dart.weak.expect
index ad7f2b8..620ed33 100644
--- a/pkg/front_end/testcases/nnbd_mixed/never_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/never_opt_out.dart.weak.expect
@@ -60,11 +60,11 @@
   abstract member-signature get runtimeType() → core::Type*;
 }
 static field Never* optOutNever;
-static field core::Null? inferredOptOutNever = nev::optInNever;
+static field dynamic inferredOptOutNever = nev::optInNever;
 static method main() → dynamic {
   Never* localNever = null;
   core::Null? localNull = null;
-  Never* inferredLocalNever = nev::optInNever;
+  dynamic inferredLocalNever = nev::optInNever;
   localNever = localNever;
   self::optOutNever = localNever;
   nev::optInNever = localNever;
@@ -73,13 +73,13 @@
   inferredLocalNever = localNever;
   localNever = self::optOutNever;
   self::optOutNever = self::optOutNever;
-  nev::optInNever = self::optOutNever;
+  nev::optInNever = self::optOutNever as{TypeError} Never;
   localNull = self::optOutNever;
   self::inferredOptOutNever = self::optOutNever;
   inferredLocalNever = self::optOutNever;
   localNever = nev::optInNever;
   self::optOutNever = nev::optInNever;
-  nev::optInNever = nev::optInNever;
+  nev::optInNever = nev::optInNever as{TypeError} Never;
   localNull = nev::optInNever;
   self::inferredOptOutNever = nev::optInNever;
   inferredLocalNever = nev::optInNever;
@@ -89,24 +89,24 @@
   localNull = localNull;
   self::inferredOptOutNever = localNull;
   inferredLocalNever = localNull;
-  localNever = self::inferredOptOutNever;
-  self::optOutNever = self::inferredOptOutNever;
-  nev::optInNever = self::inferredOptOutNever as{TypeError} Never;
-  localNull = self::inferredOptOutNever;
+  localNever = self::inferredOptOutNever as{TypeError,ForDynamic} Never*;
+  self::optOutNever = self::inferredOptOutNever as{TypeError,ForDynamic} Never*;
+  nev::optInNever = self::inferredOptOutNever as{TypeError,ForDynamic} Never;
+  localNull = self::inferredOptOutNever as{TypeError,ForDynamic} core::Null?;
   self::inferredOptOutNever = self::inferredOptOutNever;
   inferredLocalNever = self::inferredOptOutNever;
-  localNever = inferredLocalNever;
-  self::optOutNever = inferredLocalNever;
-  nev::optInNever = inferredLocalNever;
-  localNull = inferredLocalNever;
+  localNever = inferredLocalNever as{TypeError,ForDynamic} Never*;
+  self::optOutNever = inferredLocalNever as{TypeError,ForDynamic} Never*;
+  nev::optInNever = inferredLocalNever as{TypeError,ForDynamic} Never;
+  localNull = inferredLocalNever as{TypeError,ForDynamic} core::Null?;
   self::inferredOptOutNever = inferredLocalNever;
   inferredLocalNever = inferredLocalNever;
-  self::throws(() → Never* => self::optOutNever = nev::throwing());
-  self::throws(() → Never* => localNever = nev::throwing());
-  self::throws(() → Never* => self::optOutNever = nev::throwing());
-  self::throws(() → Never* => nev::optInNever = nev::throwing());
-  self::throws(() → Never* => self::inferredOptOutNever = nev::throwing());
-  self::throws(() → Never* => inferredLocalNever = nev::throwing());
+  self::throws(() → core::Null? => self::optOutNever = nev::throwing());
+  self::throws(() → core::Null? => localNever = nev::throwing());
+  self::throws(() → core::Null? => self::optOutNever = nev::throwing());
+  self::throws(() → core::Null? => nev::optInNever = nev::throwing() as{TypeError} Never);
+  self::throws(() → core::Null? => self::inferredOptOutNever = nev::throwing());
+  self::throws(() → core::Null? => inferredLocalNever = nev::throwing());
 }
 static method throws(() →* void f) → dynamic {
   try {
@@ -122,7 +122,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd_mixed/never_opt_out_lib.dart:19:28: Error: A value of type 'Type' can't be assigned to a variable of type 'Null'.
+// pkg/front_end/testcases/nnbd_mixed/never_opt_out_lib.dart:19:28: Error: A value of type 'Type' can't be returned from a function with return type 'Null'.
 //  - 'Type' is from 'dart:core'.
 //   Null get nullProperty => Null;
 //                            ^
@@ -147,7 +147,7 @@
   method nullMethod(core::Null? value) → core::Null?
     return value;
   get nullProperty() → core::Null?
-    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd_mixed/never_opt_out_lib.dart:19:28: Error: A value of type 'Type' can't be assigned to a variable of type 'Null'.
+    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd_mixed/never_opt_out_lib.dart:19:28: Error: A value of type 'Type' can't be returned from a function with return type 'Null'.
  - 'Type' is from 'dart:core'.
   Null get nullProperty => Null;
                            ^" in core::Null? as{TypeError,ForNonNullableByDefault} core::Null?;
diff --git a/pkg/front_end/testcases/outline.status b/pkg/front_end/testcases/outline.status
index cfe04cd..3c00bd1 100644
--- a/pkg/front_end/testcases/outline.status
+++ b/pkg/front_end/testcases/outline.status
@@ -17,6 +17,7 @@
 general/covariant_field: TypeCheckError
 general/infer_field_from_multiple: TypeCheckError
 general/invalid_operator: TypeCheckError
+general/invalid_operator_override: TypeCheckError
 general/issue41210a: TypeCheckError
 general/issue41210b/issue41210: TypeCheckError
 general/mixin_application_override: TypeCheckError
@@ -42,6 +43,7 @@
 inference/mixin_inference_unification_2: TypeCheckError
 late_lowering/covariant_late_field: TypeCheckError
 nnbd/covariant_late_field: TypeCheckError
+nnbd/issue42603: TypeCheckError
 rasta/native_is_illegal: Pass # Issue 29763
 runtime_checks_new/mixin_forwarding_stub_field: TypeCheckError
 runtime_checks_new/mixin_forwarding_stub_setter: TypeCheckError
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index bf4a5ea..a38ef25a 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -65,6 +65,7 @@
 general/incomplete_field_formal_parameter: RuntimeError
 general/infer_field_from_multiple: TypeCheckError
 general/invalid_operator: TypeCheckError
+general/invalid_operator_override: TypeCheckError
 general/invocations: RuntimeError
 general/issue37776: RuntimeError
 general/issue38938: RuntimeError # no main and compile time errors.
@@ -171,10 +172,13 @@
 late_lowering/covariant_late_field: TypeCheckError
 nnbd/covariant_late_field: TypeCheckError
 nnbd/issue41180: RuntimeError # Strong mode runtime checking fails due to mixed strong mode.
+nnbd/issue42546: TypeCheckError
+nnbd/issue42603: TypeCheckError
 nnbd/nullable_object_access: TypeCheckError
 nnbd/nullable_receiver: TypeCheckError
 nnbd/potentially_nullable_access: TypeCheckError
 nnbd/strong_lib_not_ok_from_dill/strong: RuntimeError
+nnbd/strong_package_not_ok_from_dill/strong: RuntimeError
 rasta/abstract_constructor: RuntimeError
 rasta/bad_constructor_redirection: RuntimeError
 rasta/bad_continue: RuntimeError
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index 5b10647..bac74e7 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -65,6 +65,7 @@
 general/incomplete_field_formal_parameter: RuntimeError
 general/infer_field_from_multiple: TypeCheckError
 general/invalid_operator: TypeCheckError
+general/invalid_operator_override: TypeCheckError
 general/invocations: RuntimeError
 general/issue37776: RuntimeError
 general/issue38938: RuntimeError
@@ -169,10 +170,13 @@
 late_lowering/covariant_late_field: TypeCheckError
 nnbd/covariant_late_field: TypeCheckError
 nnbd/issue41180: RuntimeError
+nnbd/issue42546: TypeCheckError
+nnbd/issue42603: TypeCheckError
 nnbd/nullable_object_access: TypeCheckError
 nnbd/nullable_receiver: TypeCheckError
 nnbd/potentially_nullable_access: TypeCheckError
 nnbd/strong_lib_not_ok_from_dill/strong: RuntimeError
+nnbd/strong_package_not_ok_from_dill/strong: RuntimeError
 rasta/abstract_constructor: RuntimeError
 rasta/bad_constructor_redirection: RuntimeError
 rasta/bad_continue: RuntimeError
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index 332439cd..65846ca 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -60,6 +60,8 @@
 general_nnbd_opt_out/void_methods: RuntimeError
 late_lowering/covariant_late_field: TypeCheckError
 nnbd/covariant_late_field: TypeCheckError
+nnbd/issue42546: TypeCheckError
+nnbd/issue42603: TypeCheckError
 nnbd/nullable_object_access: TypeCheckError
 nnbd/nullable_receiver: TypeCheckError
 nnbd/potentially_nullable_access: TypeCheckError
diff --git a/pkg/front_end/tool/_fasta/command_line.dart b/pkg/front_end/tool/_fasta/command_line.dart
index 7433302..ca1e771 100644
--- a/pkg/front_end/tool/_fasta/command_line.dart
+++ b/pkg/front_end/tool/_fasta/command_line.dart
@@ -197,6 +197,7 @@
   Flags.verbose: const BoolValue(false),
   Flags.verify: const BoolValue(false),
   Flags.linkDependencies: const UriListValue(),
+  Flags.noDeps: const BoolValue(false),
   "-D": const DefineValue(),
   "-h": const AliasValue(Flags.help),
   "--out": const AliasValue(Flags.output),
@@ -256,6 +257,8 @@
 
   final bool noDefines = options[Flags.noDefines];
 
+  final bool noDeps = options[Flags.noDeps];
+
   final bool verify = options[Flags.verify];
 
   final bool dumpIr = options[Flags.dumpIr];
@@ -341,7 +344,8 @@
     ..experimentalFlags = experimentalFlags
     ..environmentDefines = noDefines ? null : parsedArguments.defines
     ..nnbdMode = nnbdMode
-    ..additionalDills = linkDependencies;
+    ..additionalDills = linkDependencies
+    ..emitDeps = !noDeps;
 
   if (programName == "compile_platform") {
     if (arguments.length != 5) {
@@ -498,7 +502,6 @@
     // treat this as a crash which is signalled by exiting with 255.
     exit(255);
   }
-  return failingValue;
 }
 
 abstract class ValueSpecification {
diff --git a/pkg/front_end/tool/_fasta/entry_points.dart b/pkg/front_end/tool/_fasta/entry_points.dart
index 0b082f9..1a4399f2 100644
--- a/pkg/front_end/tool/_fasta/entry_points.dart
+++ b/pkg/front_end/tool/_fasta/entry_points.dart
@@ -434,17 +434,19 @@
 
   c.options.ticker.logMs("Wrote component to ${fullOutput.toFilePath()}");
 
-  List<Uri> deps = result.deps.toList();
-  for (Uri dependency in await computeHostDependencies(hostPlatform)) {
-    // Add the dependencies of the compiler's own sources.
-    if (dependency != outlineOutput) {
-      // We're computing the dependencies for [outlineOutput], so we shouldn't
-      // include it in the deps file.
-      deps.add(dependency);
+  if (c.options.emitDeps) {
+    List<Uri> deps = result.deps.toList();
+    for (Uri dependency in await computeHostDependencies(hostPlatform)) {
+      // Add the dependencies of the compiler's own sources.
+      if (dependency != outlineOutput) {
+        // We're computing the dependencies for [outlineOutput], so we shouldn't
+        // include it in the deps file.
+        deps.add(dependency);
+      }
     }
+    await writeDepsFile(fullOutput,
+        new File(new File.fromUri(fullOutput).path + ".d").uri, deps);
   }
-  await writeDepsFile(
-      fullOutput, new File(new File.fromUri(fullOutput).path + ".d").uri, deps);
 }
 
 Future<List<Uri>> computeHostDependencies(Uri hostPlatform) async {
diff --git a/pkg/frontend_server/lib/frontend_server.dart b/pkg/frontend_server/lib/frontend_server.dart
index d9e4fbf..35f5631 100644
--- a/pkg/frontend_server/lib/frontend_server.dart
+++ b/pkg/frontend_server/lib/frontend_server.dart
@@ -154,10 +154,8 @@
       help: 'Include only bytecode into the output file', defaultsTo: true)
   ..addFlag('enable-asserts',
       help: 'Whether asserts will be enabled.', defaultsTo: false)
-  ..addFlag('null-safety',
-      help:
-          'Respect the nullability of types at runtime in casts and instance checks.',
-      defaultsTo: null)
+  ..addFlag('sound-null-safety',
+      help: 'Respect the nullability of types at runtime.', defaultsTo: null)
   ..addMultiOption('enable-experiment',
       help: 'Comma separated list of experimental features, eg set-literals.',
       hide: true)
@@ -172,7 +170,7 @@
   ..addOption('libraries-spec',
       help: 'A path or uri to the libraries specification JSON file')
   ..addFlag('debugger-module-names',
-      help: 'Use debugger-friendly modules names', defaultsTo: false)
+      help: 'Use debugger-friendly modules names', defaultsTo: true)
   ..addFlag('experimental-emit-debug-metadata',
       help: 'Emit module and library metadata for the debugger',
       defaultsTo: false)
@@ -407,6 +405,7 @@
     final String platformKernelDill =
         options['platform'] ?? 'platform_strong.dill';
     final String packagesOption = _options['packages'];
+    final bool nullSafety = _options['sound-null-safety'];
     final CompilerOptions compilerOptions = CompilerOptions()
       ..sdkRoot = sdkRoot
       ..fileSystem = _fileSystem
@@ -418,8 +417,7 @@
       ..experimentalFlags = parseExperimentalFlags(
           parseExperimentalArguments(options['enable-experiment']),
           onError: (msg) => errors.add(msg))
-      ..nnbdMode =
-          (options['null-safety'] == true) ? NnbdMode.Strong : NnbdMode.Weak
+      ..nnbdMode = (nullSafety == true) ? NnbdMode.Strong : NnbdMode.Weak
       ..onDiagnostic = _onDiagnostic;
 
     if (options.wasParsed('libraries-spec')) {
@@ -469,7 +467,7 @@
       }
     }
 
-    if (options['null-safety'] == null &&
+    if (nullSafety == null &&
         compilerOptions.experimentalFlags[ExperimentalFlag.nonNullable]) {
       await autoDetectNullSafetyMode(_mainSource, compilerOptions);
     }
diff --git a/pkg/frontend_server/test/frontend_server_flutter_suite.dart b/pkg/frontend_server/test/frontend_server_flutter_suite.dart
index a5619f6..e3e078a 100644
--- a/pkg/frontend_server/test/frontend_server_flutter_suite.dart
+++ b/pkg/frontend_server/test/frontend_server_flutter_suite.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE.md file.
 
-import 'dart:async' show Timer;
+import 'dart:async' show StreamSubscription, Timer;
 import 'dart:convert' show jsonEncode;
 import 'dart:io' show File, exitCode;
 import 'dart:isolate' show Isolate, ReceivePort, SendPort;
@@ -190,6 +190,7 @@
 
   // Start the test suite in a new isolate.
   ReceivePort exitPort = new ReceivePort();
+  ReceivePort errorPort = new ReceivePort();
   SuiteConfiguration configuration = new SuiteConfiguration(
     resultsPort.sendPort,
     logsPort.sendPort,
@@ -205,7 +206,12 @@
     print("Running suite");
     Isolate isolate = await Isolate.spawn<SuiteConfiguration>(
         runSuite, configuration,
-        onExit: exitPort.sendPort);
+        onExit: exitPort.sendPort, onError: errorPort.sendPort);
+    bool gotError = false;
+    StreamSubscription errorSubscription = errorPort.listen((message) {
+      gotError = true;
+      logs.add("$message");
+    });
     bool timedOut = false;
     Timer timer = Timer(timeoutDuration, () {
       timedOut = true;
@@ -214,16 +220,17 @@
       isolate.kill(priority: Isolate.immediate);
     });
     await exitPort.first;
+    errorSubscription.cancel();
     timer.cancel();
-    if (!timedOut) {
+    if (!timedOut && !gotError) {
       int seconds = stopwatch.elapsedMilliseconds ~/ 1000;
       print("Suite finished (took ${seconds} seconds)");
     }
-    return timedOut;
+    return timedOut || gotError;
   });
 
   // Wait for isolate to terminate and clean up.
-  bool timeout = await future;
+  bool timeoutOrCrash = await future;
   resultsPort.close();
   logsPort.close();
 
@@ -235,5 +242,5 @@
   print("Log files written to ${resultJsonUri.toFilePath()} and"
       " ${logsJsonUri.toFilePath()}");
 
-  exitCode = timeout ? 1 : 0;
+  exitCode = timeoutOrCrash ? 1 : 0;
 }
diff --git a/pkg/frontend_server/test/frontend_server_test.dart b/pkg/frontend_server/test/frontend_server_test.dart
index a042a1e..d4b17b7 100644
--- a/pkg/frontend_server/test/frontend_server_test.dart
+++ b/pkg/frontend_server/test/frontend_server_test.dart
@@ -1490,7 +1490,6 @@
         '--output-dill=${dillFile.path}',
         '--target=dartdevc',
         '--packages=${tempDir.path}/.packages',
-        '--debugger-module-names'
       ];
 
       final StreamController<List<int>> streamController =
@@ -1557,7 +1556,6 @@
         '--output-dill=${dillFile.path}',
         '--target=dartdevc',
         '--packages=${tempDir.path}/.packages',
-        '--debugger-module-names',
         '--experimental-emit-debug-metadata'
       ];
 
@@ -1621,7 +1619,6 @@
         '--output-dill=${dillFile.path}',
         '--target=dartdevc',
         '--packages=${tempDir.path}/.packages',
-        '--debugger-module-names'
       ];
 
       final StreamController<List<int>> streamController =
@@ -1729,7 +1726,6 @@
         '--output-dill=${dillFile.path}',
         '--target=dartdevc',
         '--packages=${tempDir.path}/.packages',
-        '--debugger-module-names'
       ];
 
       final StreamController<List<int>> streamController =
diff --git a/pkg/frontend_server/test/src/expression_compiler_test.dart b/pkg/frontend_server/test/src/expression_compiler_test.dart
index 52b309c..2dabd91 100644
--- a/pkg/frontend_server/test/src/expression_compiler_test.dart
+++ b/pkg/frontend_server/test/src/expression_compiler_test.dart
@@ -252,7 +252,7 @@
   }
 }
 
-int main() {
+void main() {
   SetupCompilerOptions options = SetupCompilerOptions();
 
   group('Expression compiler tests in extension method:', () {
@@ -1129,9 +1129,10 @@
         var k = Key('t');
         MyClass c = MyClass(0);
         int p = 1;
+        const t = 1;
 
         /* evaluation placeholder */
-        print('\$c, \$k');
+        print('\$c, \$k, \$t');
       }
       ''';
 
@@ -1158,19 +1159,33 @@
           ''');
     });
 
-    test('evaluate const expression', () async {
+    test('evaluate new const expression', () async {
       await driver.check(
           scope: <String, String>{'p': '1'},
           expression: 'const MyClass(1)',
           expectedResult: '''
           (function(p) {
-            return dart.const(new foo.MyClass.new(1));
+            return C0 || CT.C0;
           }(
           1
           ))
           ''');
     });
 
+    test('evaluate optimized const expression', () async {
+      await driver.check(
+          scope: <String, String>{},
+          expression: 't',
+          expectedResult: '''
+          (function() {
+            return 1;
+          }(
+          ))
+          ''');
+    },
+        skip:
+            'Cannot compile constants optimized away by the frontend'); // https://github.com/dart-lang/sdk/issues/41999
+
     test('evaluate factory constructor call', () async {
       await driver.check(
           scope: <String, String>{'p': '1'},
@@ -1182,9 +1197,7 @@
           1
           ))
           ''');
-    },
-        skip:
-            'Incorrect kernel for factory constructor call'); // https://github.com/dart-lang/sdk/issues/41976
+    });
 
     test('evaluate const factory constructor call', () async {
       await driver.check(
@@ -1192,15 +1205,11 @@
           expression: "const Key('t')",
           expectedResult: '''
           (function(p) {
-            return dart.const(new foo.ValueKey.new("t"));
+            return C0 || CT.C0;
           }(
           1
           ))
           ''');
-    },
-        skip:
-            'Incorrect kernel for factory constructor call'); // https://github.com/dart-lang/sdk/issues/41976
+    });
   });
-
-  return 0;
 }
diff --git a/pkg/js/CHANGELOG.md b/pkg/js/CHANGELOG.md
index 05ef42f..a996ef1 100644
--- a/pkg/js/CHANGELOG.md
+++ b/pkg/js/CHANGELOG.md
@@ -1,4 +1,4 @@
-## 0.6.3-dev
+## 0.6.3-nullsafety
 
 * Opt in to null safety.
 
diff --git a/pkg/js/pubspec.yaml b/pkg/js/pubspec.yaml
index 24616bf..67165c3 100644
--- a/pkg/js/pubspec.yaml
+++ b/pkg/js/pubspec.yaml
@@ -1,10 +1,10 @@
 name: js
-version: 0.6.3-dev
+version: 0.6.3-nullsafety
 description: Annotations to create static Dart interfaces for JavaScript APIs.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/js
 
 environment:
-  sdk: '>=2.9.0-1 <3.0.0'
+  sdk: '>=2.10.0-0 <2.10.0'
 
 dev_dependencies:
   pedantic: ^1.9.0
diff --git a/pkg/kernel/bin/transform.dart b/pkg/kernel/bin/transform.dart
index bec347f..2b5aa60 100755
--- a/pkg/kernel/bin/transform.dart
+++ b/pkg/kernel/bin/transform.dart
@@ -18,6 +18,7 @@
 
 import 'package:kernel/transformations/continuation.dart' as cont;
 import 'package:kernel/transformations/empty.dart' as empty;
+import 'package:kernel/transformations/value_class.dart' as valueClass;
 import 'package:kernel/transformations/mixin_full_resolution.dart' as mix;
 import 'package:kernel/type_environment.dart';
 import 'package:kernel/vm/constants_native_effects.dart';
@@ -101,7 +102,14 @@
     case 'constants':
       final VmConstantsBackend backend = new VmConstantsBackend(coreTypes);
       component = constants.transformComponent(component, backend, defines,
-          const constants.SimpleErrorReporter(), constants.EvaluationMode.weak);
+          const constants.SimpleErrorReporter(), constants.EvaluationMode.weak,
+          desugarSets: false,
+          evaluateAnnotations: true,
+          enableTripleShift: false,
+          errorOnUnevaluatedConstant: false);
+      break;
+    case 'value-class':
+      component = valueClass.transformComponent(component);
       break;
     case 'empty':
       component = empty.transformComponent(component);
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index 72e2057..0ecae65 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -143,7 +143,7 @@
 
 type ComponentFile {
   UInt32 magic = 0x90ABCDEF;
-  UInt32 formatVersion = 43;
+  UInt32 formatVersion = 44;
   Byte[10] shortSdkHash;
   List<String> problemsAsJson; // Described in problems.md.
   Library[] libraries;
@@ -320,7 +320,7 @@
   FileOffset fileOffset; // Offset of the name of the class.
   FileOffset fileEndOffset;
   Byte flags (levelBit0, levelBit1, isAbstract, isEnum, isAnonymousMixin,
-              isEliminatedMixin, isMixinDeclaration, 
+              isEliminatedMixin, isMixinDeclaration,
               hasConstConstructor); // Where level is index into ClassLevel
   StringReference name;
   List<Expression> annotations;
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 89a0398..e1bf6e0 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -1471,7 +1471,7 @@
       {this.name,
       List<TypeParameter> typeParameters,
       this.onType,
-      List<Reference> members,
+      List<ExtensionMemberDescriptor> members,
       this.fileUri,
       Reference reference})
       : this.typeParameters = typeParameters ?? <TypeParameter>[],
@@ -3021,6 +3021,9 @@
     if (type == context.typeEnvironment.nullType) {
       return context.typeEnvironment.coreTypes
           .bottomInterfaceType(superclass, context.nullable);
+    } else if (type is NeverType) {
+      return context.typeEnvironment.coreTypes
+          .bottomInterfaceType(superclass, type.nullability);
     }
     if (type is InterfaceType) {
       List<DartType> upcastTypeArguments = context.typeEnvironment
@@ -3480,8 +3483,8 @@
       v.visitDirectMethodInvocation(this, arg);
 
   DartType getStaticType(StaticTypeContext context) {
-    if (context.typeEnvironment.isOverloadedArithmeticOperator(target)) {
-      return context.typeEnvironment.getTypeOfOverloadedArithmetic(
+    if (context.typeEnvironment.isSpecialCasedBinaryOperator(target)) {
+      return context.typeEnvironment.getTypeOfSpecialCasedBinaryOperator(
           receiver.getStaticType(context),
           arguments.positional[0].getStaticType(context));
     }
@@ -3883,8 +3886,8 @@
     if (interfaceTarget != null) {
       if (interfaceTarget is Procedure &&
           context.typeEnvironment
-              .isOverloadedArithmeticOperator(interfaceTarget)) {
-        return context.typeEnvironment.getTypeOfOverloadedArithmetic(
+              .isSpecialCasedBinaryOperator(interfaceTarget)) {
+        return context.typeEnvironment.getTypeOfSpecialCasedBinaryOperator(
             receiver.getStaticType(context),
             arguments.positional[0].getStaticType(context));
       }
@@ -8245,12 +8248,13 @@
   /// null, it is an equivalent of setting the overall nullability.
   @override
   TypeParameterType withDeclaredNullability(Nullability declaredNullability) {
+    if (declaredNullability == this.declaredNullability) {
+      return this;
+    }
     // TODO(dmitryas): Consider removing the assert.
     assert(promotedBound == null,
         "Can't change the nullability attribute of an intersection type.");
-    return declaredNullability == this.declaredNullability
-        ? this
-        : new TypeParameterType(parameter, declaredNullability, promotedBound);
+    return new TypeParameterType(parameter, declaredNullability, promotedBound);
   }
 
   /// Gets the nullability of a type-parameter type based on the bound.
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index 79cea32..f23d4ca 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 = 43;
+  static const int BinaryFormatVersion = 44;
 }
 
 abstract class ConstantTag {
diff --git a/pkg/kernel/lib/class_hierarchy.dart b/pkg/kernel/lib/class_hierarchy.dart
index 19a824a..e461ce3 100644
--- a/pkg/kernel/lib/class_hierarchy.dart
+++ b/pkg/kernel/lib/class_hierarchy.dart
@@ -48,6 +48,24 @@
   /// If multiple members with that name are inherited and not overridden, the
   /// member from the first declared supertype is returned.
   Member getInterfaceMember(Class class_, Name name, {bool setter: false});
+
+  /// Returns the least upper bound of two interface types, as defined by Dart
+  /// 1.0.
+  ///
+  /// Given two interfaces I and J, let S_I be the set of superinterfaces of I,
+  /// let S_J be the set of superinterfaces of J, and let
+  /// S = (I union S_I) intersect (J union S_J).  Furthermore, we define
+  /// S_n = {T | T in S and depth(T) = n} for any finite n where depth(T) is
+  /// the number of steps in the longest inheritance path from T to Object.  Let
+  /// q be the largest number such that S_q has cardinality one.  The least
+  /// upper bound of I and J is the sole element of S_q.
+  ///
+  /// This is called the "legacy" least upper bound to distinguish it from the
+  /// Dart 2 least upper bound, which has special behaviors in the case where
+  /// one type is a subtype of the other, or where both types are based on the
+  /// same class.
+  InterfaceType getLegacyLeastUpperBound(
+      InterfaceType type1, InterfaceType type2, Library clientLibrary);
 }
 
 /// Interface for answering various subclassing queries.
@@ -81,24 +99,6 @@
   // interfaces).
   List<Supertype> genericSupertypesOf(Class class_);
 
-  /// Returns the least upper bound of two interface types, as defined by Dart
-  /// 1.0.
-  ///
-  /// Given two interfaces I and J, let S_I be the set of superinterfaces of I,
-  /// let S_J be the set of superinterfaces of J, and let
-  /// S = (I union S_I) intersect (J union S_J).  Furthermore, we define
-  /// S_n = {T | T in S and depth(T) = n} for any finite n where depth(T) is
-  /// the number of steps in the longest inheritance path from T to Object.  Let
-  /// q be the largest number such that S_q has cardinality one.  The least
-  /// upper bound of I and J is the sole element of S_q.
-  ///
-  /// This is called the "legacy" least upper bound to distinguish it from the
-  /// Dart 2 least upper bound, which has special behaviors in the case where
-  /// one type is a subtype of the other, or where both types are based on the
-  /// same class.
-  InterfaceType getLegacyLeastUpperBound(InterfaceType type1,
-      InterfaceType type2, Library clientLibrary, CoreTypes coreTypes);
-
   /// Returns the instantiation of [superclass] that is implemented by [class_],
   /// or `null` if [class_] does not implement [superclass] at all.
   Supertype getClassAsInstanceOf(Class class_, Class superclass);
@@ -571,8 +571,8 @@
   }
 
   @override
-  InterfaceType getLegacyLeastUpperBound(InterfaceType type1,
-      InterfaceType type2, Library clientLibrary, CoreTypes coreTypes) {
+  InterfaceType getLegacyLeastUpperBound(
+      InterfaceType type1, InterfaceType type2, Library clientLibrary) {
     // The algorithm is: first we compute a list of superclasses for both types,
     // ordered from greatest to least depth, and ordered by topological sort
     // index within each depth.  Due to the sort order, we can find the
@@ -669,6 +669,10 @@
             ? type2
             : Substitution.fromInterfaceType(type2).substituteType(
                 info2.genericSuperType[next.classNode].asInterfaceType);
+        if (!clientLibrary.isNonNullableByDefault) {
+          superType1 = legacyErasure(coreTypes, superType1);
+          superType2 = legacyErasure(coreTypes, superType2);
+        }
         if (superType1 == superType2) {
           candidate = superType1.withDeclaredNullability(
               uniteNullabilities(type1.nullability, type2.nullability));
@@ -715,6 +719,19 @@
   @override
   List<DartType> getTypeArgumentsAsInstanceOf(
       InterfaceType type, Class superclass) {
+    if (type.classNode == superclass) {
+      // TODO(johnniwinther): This is necessary because [getClassAsInstanceOf]
+      // returns a [Supertype] whose type arguments are type parameter types
+      // whose nullability is set to the default nullability of the
+      // enclosing library. If for instance [type] is `A<int!>` but `A` is
+      // declared in an opt-out library, the substitution below will combine
+      // nullabilities of the type arguments in [type] with the type parameters
+      // and thus give the result `A<int*>`. See issue #42792.
+      // For now we bypass the substitution but long term we need to ensure
+      // that [getClassAsInstanceOf] doesn't cause similar problems in other
+      // situations.
+      return type.typeArguments;
+    }
     Supertype castedType = getClassAsInstanceOf(type.classNode, superclass);
     if (castedType == null) return null;
     if (superclass.typeParameters.isEmpty) return const <DartType>[];
diff --git a/pkg/kernel/lib/core_types.dart b/pkg/kernel/lib/core_types.dart
index 7c82be8..cc60986 100644
--- a/pkg/kernel/lib/core_types.dart
+++ b/pkg/kernel/lib/core_types.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 library kernel.core_types;
 
+import 'package:kernel/type_algebra.dart';
+
 import 'ast.dart';
 import 'library_index.dart';
 
@@ -1254,13 +1256,10 @@
     // TOP(T*) is true iff TOP(T) or OBJECT(T).
     if (type.declaredNullability == Nullability.nullable ||
         type.declaredNullability == Nullability.legacy) {
-      DartType nonNullableType =
-          type.withDeclaredNullability(Nullability.nonNullable);
-      assert(
-          !identical(type, nonNullableType),
-          "Setting the declared nullability of type '${type}' "
-          "to non-nullable was supposed to change the type, but it remained the same.");
-      return isTop(nonNullableType) || isObject(nonNullableType);
+      DartType nonNullableType = unwrapNullabilityConstructor(type, this);
+      if (!identical(type, nonNullableType)) {
+        return isTop(nonNullableType) || isObject(nonNullableType);
+      }
     }
 
     // TOP(FutureOr<T>) is TOP(T).
diff --git a/pkg/kernel/lib/default_language_version.dart b/pkg/kernel/lib/default_language_version.dart
index cd5308e..6b7b18c 100644
--- a/pkg/kernel/lib/default_language_version.dart
+++ b/pkg/kernel/lib/default_language_version.dart
@@ -9,4 +9,4 @@
 
 import "ast.dart";
 
-Version defaultLanguageVersion = const Version(2, 9);
+Version defaultLanguageVersion = const Version(2, 10);
diff --git a/pkg/kernel/lib/src/standard_bounds.dart b/pkg/kernel/lib/src/standard_bounds.dart
new file mode 100644
index 0000000..e57f264
--- /dev/null
+++ b/pkg/kernel/lib/src/standard_bounds.dart
@@ -0,0 +1,1594 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// 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.
+
+import 'dart:math' as math;
+
+import '../ast.dart'
+    show
+        BottomType,
+        Class,
+        DartType,
+        DynamicType,
+        FunctionType,
+        FutureOrType,
+        InterfaceType,
+        InvalidType,
+        Library,
+        NamedType,
+        NeverType,
+        Nullability,
+        TypeParameter,
+        TypeParameterType,
+        Variance,
+        VoidType;
+import '../class_hierarchy.dart';
+import '../core_types.dart';
+import '../type_algebra.dart';
+import '../type_environment.dart';
+import 'legacy_erasure.dart';
+
+mixin StandardBounds {
+  ClassHierarchyBase get hierarchy;
+
+  bool isSubtypeOf(DartType subtype, DartType supertype, SubtypeCheckMode mode);
+
+  bool areMutualSubtypes(DartType s, DartType t, SubtypeCheckMode mode);
+
+  CoreTypes get coreTypes => hierarchy.coreTypes;
+
+  /// Checks the value of the MORETOP predicate for [s] and [t].
+  ///
+  /// For the definition of MORETOP see the following:
+  /// https://github.com/dart-lang/language/blob/master/resources/type-system/upper-lower-bounds.md#helper-predicates
+  bool moretop(DartType s, DartType t) {
+    assert(coreTypes.isTop(s) || coreTypes.isObject(s));
+    assert(coreTypes.isTop(t) || coreTypes.isObject(t));
+
+    // MORETOP(void, T) = true.
+    if (s is VoidType) return true;
+
+    // MORETOP(S, void) = false.
+    if (t is VoidType) return false;
+
+    // MORETOP(dynamic, T) = true.
+    if (s is DynamicType) return true;
+
+    // MORETOP(S, dynamic) = false.
+    if (t is DynamicType) return false;
+
+    // MORETOP(Object, T) = true.
+    if (s is InterfaceType &&
+        s.classNode == coreTypes.objectClass &&
+        s.declaredNullability == Nullability.nonNullable) {
+      return true;
+    }
+
+    // MORETOP(S, Object) = false.
+    if (t is InterfaceType &&
+        t.classNode == coreTypes.objectClass &&
+        t.declaredNullability == Nullability.nonNullable) {
+      return false;
+    }
+
+    // MORETOP(S*, T*) = MORETOP(S, T).
+    if (s.declaredNullability == Nullability.legacy &&
+        t.declaredNullability == Nullability.legacy) {
+      DartType nonNullableS =
+          s.withDeclaredNullability(Nullability.nonNullable);
+      assert(!identical(s, nonNullableS));
+      DartType nonNullableT =
+          t.withDeclaredNullability(Nullability.nonNullable);
+      assert(!identical(t, nonNullableT));
+      return moretop(nonNullableS, nonNullableT);
+    }
+
+    // MORETOP(S, T*) = true.
+    if (s.declaredNullability == Nullability.nonNullable &&
+        t.declaredNullability == Nullability.legacy) {
+      return true;
+    }
+
+    // MORETOP(S*, T) = false.
+    if (s.declaredNullability == Nullability.legacy &&
+        t.declaredNullability == Nullability.nonNullable) {
+      return false;
+    }
+
+    // MORETOP(S?, T?) == MORETOP(S, T).
+    if (s.declaredNullability == Nullability.nullable &&
+        t.declaredNullability == Nullability.nullable) {
+      DartType nonNullableS =
+          s.withDeclaredNullability(Nullability.nonNullable);
+      assert(!identical(s, nonNullableS));
+      DartType nonNullableT =
+          t.withDeclaredNullability(Nullability.nonNullable);
+      assert(!identical(t, nonNullableT));
+      return moretop(nonNullableS, nonNullableT);
+    }
+
+    // MORETOP(S, T?) = true.
+    if (s.declaredNullability == Nullability.nonNullable &&
+        t.declaredNullability == Nullability.nullable) {
+      return true;
+    }
+
+    // MORETOP(S?, T) = false.
+    if (s.declaredNullability == Nullability.nullable &&
+        t.declaredNullability == Nullability.nonNullable) {
+      return false;
+    }
+
+    // TODO(dmitryas): Update the following after the spec is updated.
+    if (s.declaredNullability == Nullability.nullable &&
+        t.declaredNullability == Nullability.legacy) {
+      return true;
+    }
+    if (s.declaredNullability == Nullability.legacy &&
+        t.declaredNullability == Nullability.nullable) {
+      return false;
+    }
+
+    // MORETOP(FutureOr<S>, FutureOr<T>) = MORETOP(S, T).
+    if (s is FutureOrType &&
+        s.declaredNullability == Nullability.nonNullable &&
+        t is FutureOrType &&
+        t.declaredNullability == Nullability.nonNullable) {
+      return moretop(s.typeArgument, t.typeArgument);
+    }
+
+    throw new UnsupportedError("moretop($s, $t)");
+  }
+
+  /// Checks the value of the MOREBOTTOM predicate for [s] and [t].
+  ///
+  /// For the definition of MOREBOTTOM see the following:
+  /// https://github.com/dart-lang/language/blob/master/resources/type-system/upper-lower-bounds.md#helper-predicates
+  bool morebottom(DartType s, DartType t) {
+    assert(coreTypes.isBottom(s) || coreTypes.isNull(s));
+    assert(coreTypes.isBottom(t) || coreTypes.isNull(t));
+
+    // MOREBOTTOM(Never, T) = true.
+    if (s is NeverType && s.declaredNullability == Nullability.nonNullable) {
+      return true;
+    }
+
+    // MOREBOTTOM(S, Never) = false.
+    if (t is NeverType && t.declaredNullability == Nullability.nonNullable) {
+      return false;
+    }
+
+    // MOREBOTTOM(Null, T) = true.
+    if (s == coreTypes.nullType) {
+      return true;
+    }
+
+    // MOREBOTTOM(S, Null) = false.
+    if (t == coreTypes.nullType) {
+      return false;
+    }
+
+    // MOREBOTTOM(S?, T?) = MOREBOTTOM(S, T).
+    if (t.declaredNullability == Nullability.nullable &&
+        s.declaredNullability == Nullability.nullable) {
+      DartType nonNullableS =
+          s.withDeclaredNullability(Nullability.nonNullable);
+      assert(s != nonNullableS);
+      DartType nonNullableT =
+          t.withDeclaredNullability(Nullability.nonNullable);
+      assert(t != nonNullableT);
+      return morebottom(nonNullableS, nonNullableT);
+    }
+
+    // MOREBOTTOM(S, T?) = true.
+    if (s.declaredNullability == Nullability.nonNullable &&
+        t.declaredNullability == Nullability.nullable) {
+      return true;
+    }
+
+    // MOREBOTTOM(S?, T) = false.
+    if (s.declaredNullability == Nullability.nullable &&
+        t.declaredNullability == Nullability.nonNullable) {
+      return false;
+    }
+
+    // MOREBOTTOM(S*, T*) = MOREBOTTOM(S, T)
+    if (s.declaredNullability == Nullability.legacy &&
+        t.declaredNullability == Nullability.legacy) {
+      DartType nonNullableS =
+          s.withDeclaredNullability(Nullability.nonNullable);
+      assert(s != nonNullableS);
+      DartType nonNullableT =
+          t.withDeclaredNullability(Nullability.nonNullable);
+      assert(t != nonNullableT);
+      return morebottom(nonNullableS, nonNullableT);
+    }
+
+    // MOREBOTTOM(S, T*) = true.
+    if (s.declaredNullability == Nullability.nonNullable &&
+        t.declaredNullability == Nullability.legacy) {
+      return true;
+    }
+
+    // MOREBOTTOM(S*, T) = false.
+    if (s.declaredNullability == Nullability.legacy &&
+        t.declaredNullability == Nullability.nonNullable) {
+      return false;
+    }
+
+    // TODO(dmitryas): Update the following after the spec is updated.
+    if (s.declaredNullability == Nullability.nullable &&
+        t.declaredNullability == Nullability.legacy) {
+      return true;
+    }
+    if (s.declaredNullability == Nullability.legacy &&
+        t.declaredNullability == Nullability.nullable) {
+      return false;
+    }
+
+    // MOREBOTTOM(X&S, Y&T) = MOREBOTTOM(S, T).
+    if (s is TypeParameterType &&
+        s.promotedBound != null &&
+        t is TypeParameterType &&
+        t.promotedBound != null) {
+      return morebottom(s.promotedBound, t.promotedBound);
+    }
+
+    // MOREBOTTOM(X&S, T) = true.
+    if (s is TypeParameterType && s.promotedBound != null) {
+      return true;
+    }
+
+    // MOREBOTTOM(S, X&T) = false.
+    if (t is TypeParameterType && t.promotedBound != null) {
+      return false;
+    }
+
+    // MOREBOTTOM(X extends S, Y extends T) = MOREBOTTOM(S, T).
+    if (s is TypeParameterType && t is TypeParameterType) {
+      assert(s.promotedBound == null);
+      assert(t.promotedBound == null);
+      return morebottom(s.parameter.bound, t.parameter.bound);
+    }
+
+    throw new UnsupportedError("morebottom($s, $t)");
+  }
+
+  /// Computes the standard lower bound of [type1] and [type2].
+  ///
+  /// Standard lower bound is a lower bound function that imposes an
+  /// ordering on the top types `void`, `dynamic`, and `object`.  This function
+  /// additionally handles the unknown type that appears during type inference.
+  DartType getStandardLowerBound(
+      DartType type1, DartType type2, Library clientLibrary) {
+    if (type1 is InvalidType || type2 is InvalidType) {
+      return const InvalidType();
+    }
+    if (clientLibrary.isNonNullableByDefault) {
+      return _getNullabilityAwareStandardLowerBound(
+          type1, type2, clientLibrary);
+    }
+    return _getNullabilityObliviousStandardLowerBound(
+        legacyErasure(coreTypes, type1),
+        legacyErasure(coreTypes, type2),
+        clientLibrary);
+  }
+
+  DartType _getNullabilityAwareStandardLowerBound(
+      DartType type1, DartType type2, Library clientLibrary) {
+    // DOWN(T, T) = T.
+    if (identical(type1, type2)) return type1;
+
+    return getNullabilityAwareStandardLowerBoundInternal(
+        type1, type2, clientLibrary);
+  }
+
+  DartType getNullabilityAwareStandardLowerBoundInternal(
+      DartType type1, DartType type2, Library clientLibrary) {
+    // DOWN(T1, T2) where TOP(T1) and TOP(T2) =
+    //   T1 if MORETOP(T2, T1)
+    //   T2 otherwise
+    // DOWN(T1, T2) = T2 if TOP(T1)
+    // DOWN(T1, T2) = T1 if TOP(T2)
+    if (coreTypes.isTop(type1)) {
+      if (coreTypes.isTop(type2)) return moretop(type2, type1) ? type1 : type2;
+      return type2;
+    } else if (coreTypes.isTop(type2)) {
+      return type1;
+    }
+
+    // DOWN(T1, T2) where BOTTOM(T1) and BOTTOM(T2) =
+    //   T1 if MOREBOTTOM(T1, T2)
+    //   T2 otherwise
+    // DOWN(T1, T2) = T2 if BOTTOM(T2)
+    // DOWN(T1, T2) = T1 if BOTTOM(T1)
+    if (coreTypes.isBottom(type1)) {
+      if (coreTypes.isBottom(type2)) {
+        return morebottom(type1, type2) ? type1 : type2;
+      }
+      return type1;
+    } else if (coreTypes.isBottom(type2)) {
+      return type2;
+    }
+
+    // DOWN(T1, T2) where NULL(T1) and NULL(T2) =
+    //   T1 if MOREBOTTOM(T1, T2)
+    //   T2 otherwise
+    // DOWN(Null, T2) =
+    //   Null if Null <: T2
+    //   Never otherwise
+    // DOWN(T1, Null) =
+    //  Null if Null <: T1
+    //  Never otherwise
+    if (coreTypes.isNull(type1)) {
+      if (coreTypes.isNull(type2)) {
+        return morebottom(type1, type2) ? type1 : type2;
+      }
+      Nullability type2Nullability = type2.declaredNullability;
+      if (type2Nullability == Nullability.legacy ||
+          type2Nullability == Nullability.nullable) {
+        return type1;
+      }
+      return const NeverType(Nullability.nonNullable);
+    } else if (coreTypes.isNull(type2)) {
+      Nullability type1Nullability = type1.declaredNullability;
+      if (type1Nullability == Nullability.legacy ||
+          type1Nullability == Nullability.nullable) {
+        return type2;
+      }
+      return const NeverType(Nullability.nonNullable);
+    }
+
+    // DOWN(T1, T2) where OBJECT(T1) and OBJECT(T2) =
+    //   T1 if MORETOP(T2, T1)
+    //   T2 otherwise
+    // DOWN(T1, T2) where OBJECT(T1) =
+    //   T2 if T2 is non-nullable
+    //   NonNull(T2) if NonNull(T2) is non-nullable
+    //   Never otherwise
+    // DOWN(T1, T2) where OBJECT(T2) =
+    //   T1 if T1 is non-nullable
+    //   NonNull(T1) if NonNull(T1) is non-nullable
+    //   Never otherwise
+    if (coreTypes.isObject(type1)) {
+      if (coreTypes.isObject(type2)) {
+        return moretop(type2, type1) ? type1 : type2;
+      }
+      if (type2.declaredNullability == Nullability.nonNullable) {
+        return type2;
+      }
+      type2 = type2.withDeclaredNullability(Nullability.nonNullable);
+      if (type2.declaredNullability == Nullability.nonNullable) {
+        return type2;
+      }
+      return const NeverType(Nullability.nonNullable);
+    } else if (coreTypes.isObject(type2)) {
+      if (type1.declaredNullability == Nullability.nonNullable) {
+        return type1;
+      }
+      type1 = type1.withDeclaredNullability(Nullability.nonNullable);
+      if (type1.declaredNullability == Nullability.nonNullable) {
+        return type1;
+      }
+      return const NeverType(Nullability.nonNullable);
+    }
+
+    // The effect of the following rules is accounted for in the code below via
+    // the invocations of intersectNullabilities.
+    // DOWN(T1*, T2*) = S* where S is DOWN(T1, T2)
+    // DOWN(T1*, T2?) = S* where S is DOWN(T1, T2)
+    // DOWN(T1?, T2*) = S* where S is DOWN(T1, T2)
+    // DOWN(T1*, T2) = S where S is DOWN(T1, T2)
+    // DOWN(T1, T2*) = S where S is DOWN(T1, T2)
+    // DOWN(T1?, T2?) = S? where S is DOWN(T1, T2)
+    // DOWN(T1?, T2) = S where S is DOWN(T1, T2)
+    // DOWN(T1, T2?) = S where S is DOWN(T1, T2)
+
+    if (type1 is FunctionType && type2 is FunctionType) {
+      return _getNullabilityAwareFunctionStandardLowerBound(
+          type1, type2, clientLibrary);
+    }
+
+    // DOWN(T1, T2) = T1 if T1 <: T2.
+    // DOWN(T1, T2) = T2 if T2 <: T1.
+
+    // We use the non-nullable variants of the two types to determine T1 <: T2
+    // without using the nullability of the outermost type. The result uses
+    // [intersectNullabilities] to compute the resulting type if the subtype
+    // relation is established.
+    DartType nonNullableType1 =
+        type1.withDeclaredNullability(Nullability.nonNullable);
+    DartType nonNullableType2 =
+        type2.withDeclaredNullability(Nullability.nonNullable);
+    if (isSubtypeOf(nonNullableType1, nonNullableType2,
+        SubtypeCheckMode.withNullabilities)) {
+      return type1.withDeclaredNullability(intersectNullabilities(
+          type1.declaredNullability, type2.declaredNullability));
+    }
+    if (isSubtypeOf(nonNullableType2, nonNullableType1,
+        SubtypeCheckMode.withNullabilities)) {
+      return type2.withDeclaredNullability(intersectNullabilities(
+          type1.declaredNullability, type2.declaredNullability));
+    }
+
+    // See https://github.com/dart-lang/sdk/issues/37439#issuecomment-519654959.
+    if (type1 is FutureOrType) {
+      if (type2 is FutureOrType) {
+        // GLB(FutureOr<A>, FutureOr<B>) == FutureOr<GLB(A, B)>
+        DartType argument = getStandardLowerBound(
+            type1.typeArgument, type2.typeArgument, clientLibrary);
+        return new FutureOrType(argument, argument.declaredNullability);
+      }
+      if (type2 is InterfaceType && type2.classNode == coreTypes.futureClass) {
+        // GLB(FutureOr<A>, Future<B>) == Future<GLB(A, B)>
+        return new InterfaceType(
+            coreTypes.futureClass,
+            intersectNullabilities(
+                type1.declaredNullability, type2.declaredNullability),
+            <DartType>[
+              getStandardLowerBound(
+                  type1.typeArgument, type2.typeArguments[0], clientLibrary)
+            ]);
+      }
+      // GLB(FutureOr<A>, B) == GLB(A, B)
+      return getStandardLowerBound(type1.typeArgument, type2, clientLibrary);
+    }
+    // The if-statement below handles the following rule:
+    //     GLB(A, FutureOr<B>) ==  GLB(FutureOr<B>, A)
+    // It's broken down into sub-cases instead of making a recursive call to
+    // avoid making the checks that were already made above.  Note that at this
+    // point it's not possible for type1 to be a FutureOr.
+    if (type2 is FutureOrType) {
+      if (type1 is InterfaceType && type1.classNode == coreTypes.futureClass) {
+        // GLB(Future<A>, FutureOr<B>) == Future<GLB(B, A)>
+        return new InterfaceType(
+            coreTypes.futureClass,
+            intersectNullabilities(
+                type1.declaredNullability, type2.declaredNullability),
+            <DartType>[
+              getStandardLowerBound(
+                  type2.typeArgument, type1.typeArguments[0], clientLibrary)
+            ]);
+      }
+      // GLB(A, FutureOr<B>) == GLB(B, A)
+      return getStandardLowerBound(type2.typeArgument, type1, clientLibrary);
+    }
+
+    // DOWN(T1, T2) = Never otherwise.
+    return new NeverType(intersectNullabilities(
+        type1.declaredNullability, type2.declaredNullability));
+  }
+
+  DartType _getNullabilityObliviousStandardLowerBound(
+      DartType type1, DartType type2, Library clientLibrary) {
+    // Do legacy erasure on the argument, so that the result types that are
+    // computed from arguments are legacy.
+    type1 = type1 == coreTypes.nullType
+        ? type1
+        : type1.withDeclaredNullability(Nullability.legacy);
+    type2 = type2 == coreTypes.nullType
+        ? type2
+        : type2.withDeclaredNullability(Nullability.legacy);
+
+    // For all types T, SLB(T,T) = T.  Note that we don't test for equality
+    // because we don't want to make the algorithm quadratic.  This is ok
+    // because the check is not needed for correctness; it's just a speed
+    // optimization.
+    if (identical(type1, type2)) {
+      return type1;
+    }
+
+    return getNullabilityObliviousStandardLowerBoundInternal(
+        type1, type2, clientLibrary);
+  }
+
+  DartType getNullabilityObliviousStandardLowerBoundInternal(
+      type1, type2, clientLibrary) {
+    // SLB(void, T) = SLB(T, void) = T.
+    if (type1 is VoidType) {
+      return type2;
+    }
+    if (type2 is VoidType) {
+      return type1;
+    }
+
+    // SLB(dynamic, T) = SLB(T, dynamic) = T if T is not void.
+    if (type1 is DynamicType) {
+      return type2;
+    }
+    if (type2 is DynamicType) {
+      return type1;
+    }
+
+    // SLB(Object, T) = SLB(T, Object) = T if T is not void or dynamic.
+    if (type1 == coreTypes.objectLegacyRawType) {
+      return type2;
+    }
+    if (type2 == coreTypes.objectLegacyRawType) {
+      return type1;
+    }
+
+    // SLB(bottom, T) = SLB(T, bottom) = bottom.
+    if (type1 is BottomType) return type1;
+    if (type2 is BottomType) return type2;
+    if (type1 == coreTypes.nullType) return type1;
+    if (type2 == coreTypes.nullType) return type2;
+
+    // Function types have structural lower bounds.
+    if (type1 is FunctionType && type2 is FunctionType) {
+      return _getNullabilityObliviousFunctionStandardLowerBound(
+          type1, type2, clientLibrary);
+    }
+
+    // Otherwise, the lower bounds  of two types is one of them it if it is a
+    // subtype of the other.
+    if (isSubtypeOf(type1, type2, SubtypeCheckMode.ignoringNullabilities)) {
+      return type1;
+    }
+
+    if (isSubtypeOf(type2, type1, SubtypeCheckMode.ignoringNullabilities)) {
+      return type2;
+    }
+
+    // See https://github.com/dart-lang/sdk/issues/37439#issuecomment-519654959.
+    if (type1 is FutureOrType) {
+      if (type2 is FutureOrType) {
+        // GLB(FutureOr<A>, FutureOr<B>) == FutureOr<GLB(A, B)>
+        DartType argument = getStandardLowerBound(
+            type1.typeArgument, type2.typeArgument, clientLibrary);
+        return new FutureOrType(argument, argument.declaredNullability);
+      }
+      if (type2 is InterfaceType && type2.classNode == coreTypes.futureClass) {
+        // GLB(FutureOr<A>, Future<B>) == Future<GLB(A, B)>
+        return new InterfaceType(
+            coreTypes.futureClass,
+            intersectNullabilities(
+                type1.declaredNullability, type2.declaredNullability),
+            <DartType>[
+              getStandardLowerBound(
+                  type1.typeArgument, type2.typeArguments[0], clientLibrary)
+            ]);
+      }
+      // GLB(FutureOr<A>, B) == GLB(A, B)
+      return getStandardLowerBound(type1.typeArgument, type2, clientLibrary);
+    }
+    // The if-statement below handles the following rule:
+    //     GLB(A, FutureOr<B>) ==  GLB(FutureOr<B>, A)
+    // It's broken down into sub-cases instead of making a recursive call to
+    // avoid making the checks that were already made above.  Note that at this
+    // point it's not possible for type1 to be a FutureOr.
+    if (type2 is FutureOrType) {
+      if (type1 is FutureOrType) {
+        // GLB(Future<A>, FutureOr<B>) == Future<GLB(B, A)>
+        return new InterfaceType(
+            coreTypes.futureClass,
+            intersectNullabilities(
+                type1.declaredNullability, type2.declaredNullability),
+            <DartType>[
+              getStandardLowerBound(
+                  type2.typeArgument, type1.typeArgument, clientLibrary)
+            ]);
+      }
+      // GLB(A, FutureOr<B>) == GLB(B, A)
+      return getStandardLowerBound(type2.typeArgument, type1, clientLibrary);
+    }
+
+    // No subtype relation, so the lower bound is bottom.
+    return const BottomType();
+  }
+
+  /// Computes the standard upper bound of two types.
+  ///
+  /// Standard upper bound is an upper bound function that imposes an ordering
+  /// on the top types 'void', 'dynamic', and `object`.  This function
+  /// additionally handles the unknown type that appears during type inference.
+  DartType getStandardUpperBound(
+      DartType type1, DartType type2, Library clientLibrary) {
+    if (type1 is InvalidType || type2 is InvalidType) {
+      return const InvalidType();
+    }
+    if (clientLibrary.isNonNullableByDefault) {
+      return _getNullabilityAwareStandardUpperBound(
+          type1, type2, clientLibrary);
+    }
+    return _getNullabilityObliviousStandardUpperBound(
+        legacyErasure(coreTypes, type1),
+        legacyErasure(coreTypes, type2),
+        clientLibrary);
+  }
+
+  DartType _getNullabilityAwareStandardUpperBound(
+      DartType type1, DartType type2, Library clientLibrary) {
+    // UP(T, T) = T
+    if (identical(type1, type2)) return type1;
+
+    return getNullabilityAwareStandardUpperBoundInternal(
+        type1, type2, clientLibrary);
+  }
+
+  DartType getNullabilityAwareStandardUpperBoundInternal(
+      DartType type1, DartType type2, Library clientLibrary) {
+    // UP(T1, T2) where TOP(T1) and TOP(T2) =
+    //   T1 if MORETOP(T1, T2)
+    //   T2 otherwise
+    // UP(T1, T2) = T1 if TOP(T1)
+    // UP(T1, T2) = T2 if TOP(T2)
+    if (coreTypes.isTop(type1)) {
+      if (coreTypes.isTop(type2)) return moretop(type1, type2) ? type1 : type2;
+      return type1;
+    } else if (coreTypes.isTop(type2)) {
+      return type2;
+    }
+
+    // UP(T1, T2) where BOTTOM(T1) and BOTTOM(T2) =
+    //   T2 if MOREBOTTOM(T1, T2)
+    //   T1 otherwise
+    // UP(T1, T2) = T2 if BOTTOM(T1)
+    // UP(T1, T2) = T1 if BOTTOM(T2)
+    if (coreTypes.isBottom(type1)) {
+      if (coreTypes.isBottom(type2)) {
+        return morebottom(type1, type2) ? type2 : type1;
+      }
+      return type2;
+    } else if (coreTypes.isBottom(type2)) {
+      return type1;
+    }
+
+    // UP(T1, T2) where NULL(T1) and NULL(T2) =
+    //   T2 if MOREBOTTOM(T1, T2)
+    //   T1 otherwise
+    // UP(T1, T2) where NULL(T1) =
+    //   T2 if T2 is nullable
+    //   T2? otherwise
+    // UP(T1, T2) where NULL(T2) =
+    //   T1 if T1 is nullable
+    //   T1? otherwise
+    if (coreTypes.isNull(type1)) {
+      if (coreTypes.isNull(type2)) {
+        return morebottom(type1, type2) ? type2 : type1;
+      }
+      return type2.withDeclaredNullability(Nullability.nullable);
+    } else if (coreTypes.isNull(type2)) {
+      return type1.withDeclaredNullability(Nullability.nullable);
+    }
+
+    // UP(T1, T2) where OBJECT(T1) and OBJECT(T2) =
+    //   T1 if MORETOP(T1, T2)
+    //   T2 otherwise
+    // UP(T1, T2) where OBJECT(T1) =
+    //   T1 if T2 is non-nullable
+    //   T1? otherwise
+    // UP(T1, T2) where OBJECT(T2) =
+    //   T2 if T1 is non-nullable
+    //   T2? otherwise
+    if (coreTypes.isObject(type1)) {
+      if (coreTypes.isObject(type2)) {
+        return moretop(type1, type2) ? type1 : type2;
+      }
+      if (type2.declaredNullability == Nullability.nonNullable) {
+        return type1;
+      }
+      return type1.withDeclaredNullability(Nullability.nullable);
+    } else if (coreTypes.isObject(type2)) {
+      if (type1.declaredNullability == Nullability.nonNullable) {
+        return type2;
+      }
+      return type2.withDeclaredNullability(Nullability.nullable);
+    }
+
+    // The effect of the following rules is accounted for in the code below via
+    // the invocations of uniteNullabilities.
+    // UP(T1*, T2*) = S* where S is UP(T1, T2)
+    // UP(T1*, T2?) = S? where S is UP(T1, T2)
+    // UP(T1?, T2*) = S? where S is UP(T1, T2)
+    // UP(T1*, T2) = S* where S is UP(T1, T2)
+    // UP(T1, T2*) = S* where S is UP(T1, T2)
+    // UP(T1?, T2?) = S? where S is UP(T1, T2)
+    // UP(T1?, T2) = S? where S is UP(T1, T2)
+    // UP(T1, T2?) = S? where S is UP(T1, T2)
+
+    if (type1 is TypeParameterType) {
+      return _getNullabilityAwareTypeParameterStandardUpperBound(
+          type1, type2, clientLibrary);
+    }
+
+    if (type2 is TypeParameterType) {
+      return _getNullabilityAwareTypeParameterStandardUpperBound(
+          type2, type1, clientLibrary);
+    }
+
+    if (type1 is FunctionType) {
+      if (type2 is FunctionType) {
+        return _getNullabilityAwareFunctionStandardUpperBound(
+            type1, type2, clientLibrary);
+      }
+
+      if (type2 is InterfaceType &&
+          type2.classNode == coreTypes.functionClass) {
+        // UP(T Function<...>(...), Function) = Function
+        return coreTypes.functionRawType(uniteNullabilities(
+            type1.declaredNullability, type2.declaredNullability));
+      }
+
+      // UP(T Function<...>(...), T2) = Object
+      return coreTypes.objectRawType(uniteNullabilities(
+          type1.declaredNullability, type2.declaredNullability));
+    } else if (type2 is FunctionType) {
+      if (type1 is InterfaceType &&
+          type1.classNode == coreTypes.functionClass) {
+        // UP(Function, T Function<...>(...)) = Function
+        return coreTypes.functionRawType(uniteNullabilities(
+            type1.declaredNullability, type2.declaredNullability));
+      }
+
+      // UP(T1, T Function<...>(...)) = Object
+      return coreTypes.objectRawType(uniteNullabilities(
+          type1.declaredNullability, type2.declaredNullability));
+    }
+
+    if (type1 is FutureOrType || type2 is FutureOrType) {
+      if (isSubtypeOf(type1, type2, SubtypeCheckMode.withNullabilities)) {
+        return type2;
+      }
+      if (isSubtypeOf(type2, type1, SubtypeCheckMode.withNullabilities)) {
+        return type1;
+      }
+      if (type1 is FutureOrType && type2 is FutureOrType) {
+        return new FutureOrType(
+            getStandardUpperBound(
+                type1.typeArgument, type2.typeArgument, clientLibrary),
+            uniteNullabilities(
+                type1.declaredNullability, type2.declaredNullability));
+      }
+    }
+
+    // UP(T1, T2) = T2 if T1 <: T2
+    //   Note that both types must be class types at this point.
+    assert(type1 is InterfaceType,
+        "Expected type1 to be an interface type, got '${type1.runtimeType}'.");
+    assert(type2 is InterfaceType,
+        "Expected type2 to be an interface type, got '${type2.runtimeType}'.");
+
+    // We use the non-nullable variants of the two interfaces types to determine
+    // T1 <: T2 without using the nullability of the outermost type. The result
+    // uses [uniteNullabilities] to compute the resulting type if the subtype
+    // relation is established.
+    InterfaceType nonNonNullableType1 =
+        type1.withDeclaredNullability(Nullability.nonNullable);
+    InterfaceType nonNonNullableType2 =
+        type2.withDeclaredNullability(Nullability.nonNullable);
+
+    if (isSubtypeOf(nonNonNullableType1, nonNonNullableType2,
+        SubtypeCheckMode.withNullabilities)) {
+      return type2.withDeclaredNullability(
+          uniteNullabilities(type1.nullability, type2.nullability));
+    }
+
+    // UP(T1, T2) = T1 if T2 <: T1
+    //   Note that both types must be class types at this point.
+    if (isSubtypeOf(nonNonNullableType2, nonNonNullableType1,
+        SubtypeCheckMode.withNullabilities)) {
+      return type1.withDeclaredNullability(uniteNullabilities(
+          type1.declaredNullability, type2.declaredNullability));
+    }
+
+    // UP(C<T0, ..., Tn>, C<S0, ..., Sn>) = C<R0,..., Rn> where Ri is UP(Ti, Si)
+    if (type1 is InterfaceType && type2 is InterfaceType) {
+      Class klass = type1.classNode;
+      if (type2.classNode == klass) {
+        int n = klass.typeParameters.length;
+        List<DartType> leftArguments = type1.typeArguments;
+        List<DartType> rightArguments = type2.typeArguments;
+        List<DartType> typeArguments = new List<DartType>(n);
+        for (int i = 0; i < n; ++i) {
+          int variance = klass.typeParameters[i].variance;
+          if (variance == Variance.contravariant) {
+            typeArguments[i] = _getNullabilityAwareStandardLowerBound(
+                leftArguments[i], rightArguments[i], clientLibrary);
+          } else if (variance == Variance.invariant) {
+            if (!areMutualSubtypes(leftArguments[i], rightArguments[i],
+                SubtypeCheckMode.withNullabilities)) {
+              return hierarchy.getLegacyLeastUpperBound(
+                  type1, type2, clientLibrary);
+            }
+          } else {
+            typeArguments[i] = _getNullabilityAwareStandardUpperBound(
+                leftArguments[i], rightArguments[i], clientLibrary);
+          }
+        }
+        return new InterfaceType(
+            klass,
+            uniteNullabilities(
+                type1.declaredNullability, type2.declaredNullability),
+            typeArguments);
+      }
+    }
+
+    // UP(C0<T0, ..., Tn>, C1<S0, ..., Sk>)
+    //   = least upper bound of two interfaces as in Dart 1.
+    return hierarchy.getLegacyLeastUpperBound(type1, type2, clientLibrary);
+  }
+
+  /// Computes the nullability-aware lower bound of two function types.
+  ///
+  /// The algorithm is defined as follows:
+  /// DOWN(
+  ///   <X0 extends B00, ..., Xm extends B0m>(P00, ..., P0k) -> T0,
+  ///   <X0 extends B10, ..., Xm extends B1m>(P10, ..., P1l) -> T1)
+  /// =
+  ///   <X0 extends B20, ..., Xm extends B2m>(P20, ..., P2q) -> R0
+  /// if:
+  ///   each B0i and B1i are equal types (syntactically),
+  ///   q is max(k, l),
+  ///   R0 is DOWN(T0, T1),
+  ///   B2i is B0i,
+  ///   P2i is UP(P0i, P1i) for i <= than min(k, l),
+  ///   P2i is P0i for k < i <= q,
+  ///   P2i is P1i for l < i <= q, and
+  ///   P2i is optional if P0i or P1i is optional.
+  ///
+  /// DOWN(
+  ///   <X0 extends B00, ..., Xm extends B0m>(P00, ..., P0k, Named0) -> T0,
+  ///   <X0 extends B10, ..., Xm extends B1m>(P10, ..., P1k, Named1) -> T1)
+  /// =
+  ///   <X0 extends B20, ..., Xm extends B2m>(P20, ..., P2k, Named2) -> R0
+  /// if:
+  ///   each B0i and B1i are equal types (syntactically),
+  ///   R0 is DOWN(T0, T1),
+  ///   B2i is B0i,
+  ///   P2i is UP(P0i, P1i),
+  ///   Named2 contains R2i xi for each xi in both Named0 and Named1,
+  ///     where R0i xi is in Named0,
+  ///     where R1i xi is in Named1,
+  ///     and R2i is UP(R0i, R1i),
+  ///     and R2i xi is required if xi is required in both Named0 and Named1,
+  ///   Named2 contains R0i xi for each xi in Named0 and not Named1,
+  ///     where xi is optional in Named2,
+  ///   Named2 contains R1i xi for each xi in Named1 and not Named0, and
+  ///     where xi is optional in Named2.
+  /// DOWN(T Function<...>(...), S Function<...>(...)) = Never otherwise.
+  DartType _getNullabilityAwareFunctionStandardLowerBound(
+      FunctionType f, FunctionType g, Library clientLibrary) {
+    bool haveNamed =
+        f.namedParameters.isNotEmpty || g.namedParameters.isNotEmpty;
+    bool haveOptionalPositional =
+        f.requiredParameterCount < f.positionalParameters.length ||
+            g.requiredParameterCount < g.positionalParameters.length;
+
+    // The fallback result for whenever the following rule applies:
+    //     DOWN(T Function<...>(...), S Function<...>(...)) = Never otherwise.
+    final DartType fallbackResult = new NeverType(
+        intersectNullabilities(f.declaredNullability, g.declaredNullability));
+
+    if (haveNamed && haveOptionalPositional) return fallbackResult;
+    if (haveNamed &&
+        f.positionalParameters.length != g.positionalParameters.length) {
+      return fallbackResult;
+    }
+
+    int m = f.typeParameters.length;
+    bool boundsMatch = false;
+    Substitution substitution = Substitution.empty;
+    if (g.typeParameters.length == m) {
+      boundsMatch = true;
+      if (m != 0) {
+        Map<TypeParameter, DartType> substitutionMap =
+            <TypeParameter, DartType>{};
+        for (int i = 0; i < m; ++i) {
+          substitutionMap[g.typeParameters[i]] =
+              new TypeParameterType.forAlphaRenaming(
+                  g.typeParameters[i], f.typeParameters[i]);
+        }
+        substitution = Substitution.fromMap(substitutionMap);
+        for (int i = 0; i < m && boundsMatch; ++i) {
+          // TODO(dmitryas): Figure out if a procedure for syntactic equality
+          // should be used instead.
+          if (!areMutualSubtypes(
+              f.typeParameters[i].bound,
+              substitution.substituteType(g.typeParameters[i].bound),
+              SubtypeCheckMode.withNullabilities)) {
+            boundsMatch = false;
+          }
+        }
+      }
+    }
+    if (!boundsMatch) return fallbackResult;
+    int maxPos =
+        math.max(f.positionalParameters.length, g.positionalParameters.length);
+    int minPos =
+        math.min(f.positionalParameters.length, g.positionalParameters.length);
+
+    List<TypeParameter> typeParameters = f.typeParameters;
+
+    List<DartType> positionalParameters =
+        new List<DartType>.filled(maxPos, null);
+    for (int i = 0; i < minPos; ++i) {
+      positionalParameters[i] = _getNullabilityAwareStandardUpperBound(
+          f.positionalParameters[i],
+          substitution.substituteType(g.positionalParameters[i]),
+          clientLibrary);
+    }
+    for (int i = minPos; i < f.positionalParameters.length; ++i) {
+      positionalParameters[i] = f.positionalParameters[i];
+    }
+    for (int i = minPos; i < g.positionalParameters.length; ++i) {
+      positionalParameters[i] =
+          substitution.substituteType(g.positionalParameters[i]);
+    }
+
+    List<NamedType> namedParameters = <NamedType>[];
+    {
+      // Assuming that the named parameters of both types are sorted
+      // lexicographically.
+      int i = 0;
+      int j = 0;
+      while (i < f.namedParameters.length && j < g.namedParameters.length) {
+        NamedType named1 = f.namedParameters[i];
+        NamedType named2 = g.namedParameters[j];
+        int order = named1.name.compareTo(named2.name);
+        NamedType named;
+        if (order < 0) {
+          named = new NamedType(named1.name, named1.type, isRequired: false);
+          ++i;
+        } else if (order > 0) {
+          named = !named2.isRequired
+              ? named2
+              : new NamedType(
+                  named2.name, substitution.substituteType(named2.type),
+                  isRequired: false);
+          ++j;
+        } else {
+          named = new NamedType(
+              named1.name,
+              _getNullabilityAwareStandardUpperBound(named1.type,
+                  substitution.substituteType(named2.type), clientLibrary),
+              isRequired: named1.isRequired && named2.isRequired);
+          ++i;
+          ++j;
+        }
+        namedParameters.add(named);
+      }
+      while (i < f.namedParameters.length) {
+        NamedType named1 = f.namedParameters[i];
+        namedParameters.add(!named1.isRequired
+            ? named1
+            : new NamedType(named1.name, named1.type, isRequired: false));
+        ++i;
+      }
+      while (j < g.namedParameters.length) {
+        NamedType named2 = g.namedParameters[j];
+        namedParameters.add(new NamedType(
+            named2.name, substitution.substituteType(named2.type),
+            isRequired: false));
+        ++j;
+      }
+    }
+
+    DartType returnType = _getNullabilityAwareStandardLowerBound(
+        f.returnType, substitution.substituteType(g.returnType), clientLibrary);
+
+    return new FunctionType(positionalParameters, returnType,
+        intersectNullabilities(f.declaredNullability, g.declaredNullability),
+        namedParameters: namedParameters,
+        typeParameters: typeParameters,
+        requiredParameterCount: minPos);
+  }
+
+  /// Computes the nullability-aware lower bound of two function types.
+  ///
+  /// UP(
+  ///   <X0 extends B00, ... Xm extends B0m>(P00, ... P0k) -> T0,
+  ///   <X0 extends B10, ... Xm extends B1m>(P10, ... P1l) -> T1)
+  /// =
+  ///   <X0 extends B20, ..., Xm extends B2m>(P20, ..., P2q) -> R0
+  /// if:
+  ///   each B0i and B1i are equal types (syntactically)
+  ///   Both have the same number of required positional parameters
+  ///   q is min(k, l)
+  ///   R0 is UP(T0, T1)
+  ///   B2i is B0i
+  ///   P2i is DOWN(P0i, P1i)
+  /// UP(
+  ///   <X0 extends B00, ... Xm extends B0m>(P00, ... P0k, Named0) -> T0,
+  ///   <X0 extends B10, ... Xm extends B1m>(P10, ... P1k, Named1) -> T1)
+  /// =
+  ///   <X0 extends B20, ..., Xm extends B2m>(P20, ..., P2k, Named2) -> R0
+  /// if:
+  ///   each B0i and B1i are equal types (syntactically)
+  ///   All positional parameters are required
+  ///   R0 is UP(T0, T1)
+  ///   B2i is B0i
+  ///   P2i is DOWN(P0i, P1i)
+  ///   Named0 contains R0i xi
+  ///       if R1i xi is a required named parameter in Named1
+  ///   Named1 contains R1i xi
+  ///       if R0i xi is a required named parameter in Named0
+  ///   Named2 contains exactly R2i xi
+  ///       for each xi in both Named0 and Named1
+  ///     where R0i xi is in Named0
+  ///     where R1i xi is in Named1
+  ///     and R2i is DOWN(R0i, R1i)
+  ///     and R2i xi is required
+  ///         if xi is required in either Named0 or Named1
+  /// UP(T Function<...>(...), S Function<...>(...)) = Function otherwise
+  DartType _getNullabilityAwareFunctionStandardUpperBound(
+      FunctionType f, FunctionType g, Library clientLibrary) {
+    bool haveNamed =
+        f.namedParameters.isNotEmpty || g.namedParameters.isNotEmpty;
+    bool haveOptionalPositional =
+        f.requiredParameterCount < f.positionalParameters.length ||
+            g.requiredParameterCount < g.positionalParameters.length;
+
+    // The return value for whenever the following applies:
+    //     UP(T Function<...>(...), S Function<...>(...)) = Function otherwise
+    final DartType fallbackResult = coreTypes.functionRawType(
+        uniteNullabilities(f.declaredNullability, g.declaredNullability));
+
+    if (haveNamed && haveOptionalPositional) return fallbackResult;
+    if (!haveNamed && f.requiredParameterCount != g.requiredParameterCount) {
+      return fallbackResult;
+    }
+    // Here we perform a quick check on the function types to figure out if we
+    // can compute a non-trivial upper bound for them.  The check isn't merged
+    // with the computation of the non-trivial upper bound itself to avoid
+    // performing unnecessary computations.
+    if (haveNamed) {
+      if (f.positionalParameters.length != g.positionalParameters.length) {
+        return fallbackResult;
+      }
+      // Assuming that the named parameters are sorted lexicographically in
+      // both type1 and type2.
+      int i = 0;
+      int j = 0;
+      while (i < f.namedParameters.length && j < g.namedParameters.length) {
+        NamedType named1 = f.namedParameters[i];
+        NamedType named2 = g.namedParameters[j];
+        int order = named1.name.compareTo(named2.name);
+        if (order < 0) {
+          if (named1.isRequired) return fallbackResult;
+          ++i;
+        } else if (order > 0) {
+          if (named2.isRequired) return fallbackResult;
+          ++j;
+        } else {
+          ++i;
+          ++j;
+        }
+      }
+      while (i < f.namedParameters.length) {
+        if (f.namedParameters[i].isRequired) return fallbackResult;
+        ++i;
+      }
+      while (j < g.namedParameters.length) {
+        if (g.namedParameters[j].isRequired) return fallbackResult;
+        ++j;
+      }
+    }
+
+    int m = f.typeParameters.length;
+    bool boundsMatch = false;
+    Substitution substitution = Substitution.empty;
+    if (g.typeParameters.length == m) {
+      boundsMatch = true;
+      if (m != 0) {
+        Map<TypeParameter, DartType> substitutionMap =
+            <TypeParameter, DartType>{};
+        for (int i = 0; i < m; ++i) {
+          substitutionMap[g.typeParameters[i]] =
+              new TypeParameterType.forAlphaRenaming(
+                  g.typeParameters[i], f.typeParameters[i]);
+        }
+        substitution = Substitution.fromMap(substitutionMap);
+        for (int i = 0; i < m && boundsMatch; ++i) {
+          // TODO(dmitryas): Figure out if a procedure for syntactic
+          // equality should be used instead.
+          if (!areMutualSubtypes(
+              f.typeParameters[i].bound,
+              substitution.substituteType(g.typeParameters[i].bound),
+              SubtypeCheckMode.withNullabilities)) {
+            boundsMatch = false;
+          }
+        }
+      }
+    }
+    if (!boundsMatch) return fallbackResult;
+    int minPos =
+        math.min(f.positionalParameters.length, g.positionalParameters.length);
+
+    List<TypeParameter> typeParameters = f.typeParameters;
+
+    List<DartType> positionalParameters =
+        new List<DartType>.filled(minPos, null);
+    for (int i = 0; i < minPos; ++i) {
+      positionalParameters[i] = _getNullabilityAwareStandardLowerBound(
+          f.positionalParameters[i],
+          substitution.substituteType(g.positionalParameters[i]),
+          clientLibrary);
+    }
+
+    List<NamedType> namedParameters = <NamedType>[];
+    {
+      // Assuming that the named parameters of both types are sorted
+      // lexicographically.
+      int i = 0;
+      int j = 0;
+      while (i < f.namedParameters.length && j < g.namedParameters.length) {
+        NamedType named1 = f.namedParameters[i];
+        NamedType named2 = g.namedParameters[j];
+        int order = named1.name.compareTo(named2.name);
+        if (order < 0) {
+          ++i;
+        } else if (order > 0) {
+          ++j;
+        } else {
+          namedParameters.add(new NamedType(
+              named1.name,
+              _getNullabilityAwareStandardLowerBound(named1.type,
+                  substitution.substituteType(named2.type), clientLibrary),
+              isRequired: named1.isRequired || named2.isRequired));
+          ++i;
+          ++j;
+        }
+      }
+    }
+
+    DartType returnType = _getNullabilityAwareStandardUpperBound(
+        f.returnType, substitution.substituteType(g.returnType), clientLibrary);
+
+    return new FunctionType(positionalParameters, returnType,
+        uniteNullabilities(f.declaredNullability, g.declaredNullability),
+        namedParameters: namedParameters,
+        typeParameters: typeParameters,
+        requiredParameterCount: f.requiredParameterCount);
+  }
+
+  DartType _getNullabilityAwareTypeParameterStandardUpperBound(
+      TypeParameterType type1, DartType type2, Library clientLibrary) {
+    if (type1.promotedBound == null) {
+      // UP(X1 extends B1, T2) =
+      //   T2 if X1 <: T2
+      //   otherwise X1 if T2 <: X1
+      //   otherwise UP(B1[Object/X1], T2)
+      if (isSubtypeOf(type1, type2, SubtypeCheckMode.withNullabilities)) {
+        return type2.withDeclaredNullability(uniteNullabilities(
+            type1.declaredNullability, type2.declaredNullability));
+      }
+      if (isSubtypeOf(type2, type1, SubtypeCheckMode.withNullabilities)) {
+        return type1.withDeclaredNullability(uniteNullabilities(
+            type1.declaredNullability, type2.declaredNullability));
+      }
+      Map<TypeParameter, DartType> substitution = <TypeParameter, DartType>{
+        type1.parameter: coreTypes.objectNonNullableRawType
+      };
+      return _getNullabilityAwareStandardUpperBound(
+              substitute(type1.parameter.bound, substitution),
+              type2,
+              clientLibrary)
+          .withDeclaredNullability(uniteNullabilities(
+              type1.declaredNullability, type2.declaredNullability));
+    } else {
+      // UP(X1 & B1, T2) =
+      //   T2 if X1 <: T2
+      //   otherwise X1 if T2 <: X1
+      //   otherwise UP(B1[Object/X1], T2)
+      DartType demoted =
+          new TypeParameterType(type1.parameter, type1.declaredNullability);
+      if (isSubtypeOf(demoted, type2, SubtypeCheckMode.withNullabilities)) {
+        return type2.withDeclaredNullability(uniteNullabilities(
+            type1.declaredNullability, type2.declaredNullability));
+      }
+      if (isSubtypeOf(type2, demoted, SubtypeCheckMode.withNullabilities)) {
+        return demoted.withDeclaredNullability(uniteNullabilities(
+            type1.declaredNullability, type2.declaredNullability));
+      }
+      Map<TypeParameter, DartType> substitution = <TypeParameter, DartType>{
+        type1.parameter: coreTypes.objectNonNullableRawType
+      };
+      return _getNullabilityAwareStandardUpperBound(
+              substitute(type1.promotedBound, substitution),
+              type2,
+              clientLibrary)
+          .withDeclaredNullability(uniteNullabilities(
+              type1.declaredNullability, type2.declaredNullability));
+    }
+  }
+
+  DartType _getNullabilityObliviousStandardUpperBound(
+      DartType type1, DartType type2, Library clientLibrary) {
+    /*assert(type1 == legacyErasure(coreTypes, type1),
+        "Non-legacy type $type1 in inference.");
+    assert(type2 == legacyErasure(coreTypes, type2),
+        "Non-legacy type $type2 in inference.");*/
+    // For all types T, SUB(T,T) = T.  Note that we don't test for equality
+    // because we don't want to make the algorithm quadratic.  This is ok
+    // because the check is not needed for correctness; it's just a speed
+    // optimization.
+    if (identical(type1, type2)) {
+      return type1;
+    }
+
+    return getNullabilityObliviousStandardUpperBoundInternal(
+        type1, type2, clientLibrary);
+  }
+
+  DartType getNullabilityObliviousStandardUpperBoundInternal(
+      DartType type1, DartType type2, Library clientLibrary) {
+    // SUB(void, T) = SUB(T, void) = void.
+    if (type1 is VoidType) {
+      return type1;
+    }
+    if (type2 is VoidType) {
+      return type2;
+    }
+
+    // SUB(dynamic, T) = SUB(T, dynamic) = dynamic if T is not void.
+    if (type1 is DynamicType) {
+      return type1;
+    }
+    if (type2 is DynamicType) {
+      return type2;
+    }
+
+    // SUB(Object, T) = SUB(T, Object) = Object if T is not void or dynamic.
+    if (type1 == coreTypes.objectLegacyRawType) {
+      return type1;
+    }
+    if (type2 == coreTypes.objectLegacyRawType) {
+      return type2;
+    }
+
+    // SUB(bottom, T) = SUB(T, bottom) = T.
+    if (type1 is BottomType) return type2;
+    if (type2 is BottomType) return type1;
+    if (type1 == coreTypes.nullType) return type2;
+    if (type2 == coreTypes.nullType) return type1;
+
+    if (type1 is TypeParameterType || type2 is TypeParameterType) {
+      return _getNullabilityObliviousTypeParameterStandardUpperBound(
+          type1, type2, clientLibrary);
+    }
+
+    // The standard upper bound of a function type and an interface type T is
+    // the standard upper bound of Function and T.
+    if (type1 is FunctionType &&
+        (type2 is InterfaceType || type2 is FutureOrType)) {
+      type1 = coreTypes.functionLegacyRawType;
+    }
+    if (type2 is FunctionType &&
+        (type1 is InterfaceType || type2 is FutureOrType)) {
+      type2 = coreTypes.functionLegacyRawType;
+    }
+
+    // At this point type1 and type2 should both either be interface types or
+    // function types.
+    if (type1 is InterfaceType && type2 is InterfaceType) {
+      return _getInterfaceStandardUpperBound(type1, type2, clientLibrary);
+    }
+
+    if (type1 is FunctionType && type2 is FunctionType) {
+      return _getNullabilityObliviousFunctionStandardUpperBound(
+          type1, type2, clientLibrary);
+    }
+
+    if (type1 is FutureOrType || type2 is FutureOrType) {
+      if (isSubtypeOf(type1, type2, SubtypeCheckMode.ignoringNullabilities)) {
+        return type2;
+      }
+      if (isSubtypeOf(type2, type1, SubtypeCheckMode.ignoringNullabilities)) {
+        return type1;
+      }
+      if (type1 is FutureOrType && type2 is FutureOrType) {
+        return new FutureOrType(
+            getStandardUpperBound(
+                type1.typeArgument, type2.typeArgument, clientLibrary),
+            uniteNullabilities(
+                type1.declaredNullability, type2.declaredNullability));
+      }
+    }
+
+    if (type1 is InvalidType || type2 is InvalidType) {
+      return const InvalidType();
+    }
+
+    // Should never happen. As a defensive measure, return the dynamic type.
+    assert(false, "type1 = $type1; type2 = $type2");
+    return const DynamicType();
+  }
+
+  /// Compute the standard lower bound of function types [f] and [g].
+  ///
+  /// The spec rules for SLB on function types, informally, are pretty simple:
+  ///
+  /// - If a parameter is required in both, it stays required.
+  ///
+  /// - If a positional parameter is optional or missing in one, it becomes
+  ///   optional.  (This is because we're trying to build a function type which
+  ///   is a subtype of both [f] and [g], meaning it accepts all possible inputs
+  ///   that [f] and [g] accept.)
+  ///
+  /// - Named parameters are unioned together.
+  ///
+  /// - For any parameter that exists in both functions, use the SUB of them as
+  ///   the resulting parameter type.
+  ///
+  /// - Use the SLB of their return types.
+  DartType _getNullabilityObliviousFunctionStandardLowerBound(
+      FunctionType f, FunctionType g, Library clientLibrary) {
+    // TODO(rnystrom,paulberry): Right now, this assumes f and g do not have any
+    // type parameters. Revisit that in the presence of generic methods.
+
+    // Calculate the SUB of each corresponding pair of parameters.
+    int totalPositional =
+        math.max(f.positionalParameters.length, g.positionalParameters.length);
+    List<DartType> positionalParameters = new List<DartType>(totalPositional);
+    for (int i = 0; i < totalPositional; i++) {
+      if (i < f.positionalParameters.length) {
+        DartType fType = f.positionalParameters[i];
+        if (i < g.positionalParameters.length) {
+          DartType gType = g.positionalParameters[i];
+          positionalParameters[i] =
+              getStandardUpperBound(fType, gType, clientLibrary);
+        } else {
+          positionalParameters[i] = fType;
+        }
+      } else {
+        positionalParameters[i] = g.positionalParameters[i];
+      }
+    }
+
+    // Parameters that are required in both functions are required in the
+    // result.  Parameters that are optional or missing in either end up
+    // optional.
+    int requiredParameterCount =
+        math.min(f.requiredParameterCount, g.requiredParameterCount);
+    bool hasPositional = requiredParameterCount < totalPositional;
+
+    // Union the named parameters together.
+    List<NamedType> namedParameters = [];
+    {
+      int i = 0;
+      int j = 0;
+      while (true) {
+        if (i < f.namedParameters.length) {
+          if (j < g.namedParameters.length) {
+            String fName = f.namedParameters[i].name;
+            String gName = g.namedParameters[j].name;
+            int order = fName.compareTo(gName);
+            if (order < 0) {
+              namedParameters.add(f.namedParameters[i++]);
+            } else if (order > 0) {
+              namedParameters.add(g.namedParameters[j++]);
+            } else {
+              namedParameters.add(new NamedType(
+                  fName,
+                  getStandardUpperBound(f.namedParameters[i++].type,
+                      g.namedParameters[j++].type, clientLibrary)));
+            }
+          } else {
+            namedParameters.addAll(f.namedParameters.skip(i));
+            break;
+          }
+        } else {
+          namedParameters.addAll(g.namedParameters.skip(j));
+          break;
+        }
+      }
+    }
+    bool hasNamed = namedParameters.isNotEmpty;
+
+    // Edge case. Dart does not support functions with both optional positional
+    // and named parameters. If we would synthesize that, give up.
+    if (hasPositional && hasNamed) return const BottomType();
+
+    // Calculate the SLB of the return type.
+    DartType returnType =
+        getStandardLowerBound(f.returnType, g.returnType, clientLibrary);
+    return new FunctionType(positionalParameters, returnType,
+        intersectNullabilities(f.declaredNullability, g.declaredNullability),
+        namedParameters: namedParameters,
+        requiredParameterCount: requiredParameterCount);
+  }
+
+  /// Compute the standard upper bound of function types [f] and [g].
+  ///
+  /// The rules for SUB on function types, informally, are pretty simple:
+  ///
+  /// - If the functions don't have the same number of required parameters,
+  ///   always return `Function`.
+  ///
+  /// - Discard any optional named or positional parameters the two types do not
+  ///   have in common.
+  ///
+  /// - Compute the SLB of each corresponding pair of parameter types, and the
+  ///   SUB of the return types.  Return a function type with those types.
+  DartType _getNullabilityObliviousFunctionStandardUpperBound(
+      FunctionType f, FunctionType g, Library clientLibrary) {
+    // TODO(rnystrom): Right now, this assumes f and g do not have any type
+    // parameters. Revisit that in the presence of generic methods.
+
+    // If F and G differ in their number of required parameters, then the
+    // standard upper bound of F and G is Function.
+    // TODO(paulberry): We could do better here, e.g.:
+    //   SUB(([int]) -> void, (int) -> void) = (int) -> void
+    if (f.requiredParameterCount != g.requiredParameterCount) {
+      return new InterfaceType(
+          coreTypes.functionClass,
+          uniteNullabilities(f.declaredNullability, g.declaredNullability),
+          const <DynamicType>[]);
+    }
+    int requiredParameterCount = f.requiredParameterCount;
+
+    // Calculate the SLB of each corresponding pair of parameters.
+    // Ignore any extra optional positional parameters if one has more than the
+    // other.
+    int totalPositional =
+        math.min(f.positionalParameters.length, g.positionalParameters.length);
+    List<DartType> positionalParameters = new List<DartType>(totalPositional);
+    for (int i = 0; i < totalPositional; i++) {
+      positionalParameters[i] = getStandardLowerBound(
+          f.positionalParameters[i], g.positionalParameters[i], clientLibrary);
+    }
+
+    // Intersect the named parameters.
+    List<NamedType> namedParameters = [];
+    {
+      int i = 0;
+      int j = 0;
+      while (true) {
+        if (i < f.namedParameters.length) {
+          if (j < g.namedParameters.length) {
+            String fName = f.namedParameters[i].name;
+            String gName = g.namedParameters[j].name;
+            int order = fName.compareTo(gName);
+            if (order < 0) {
+              i++;
+            } else if (order > 0) {
+              j++;
+            } else {
+              namedParameters.add(new NamedType(
+                  fName,
+                  getStandardLowerBound(f.namedParameters[i++].type,
+                      g.namedParameters[j++].type, clientLibrary)));
+            }
+          } else {
+            break;
+          }
+        } else {
+          break;
+        }
+      }
+    }
+
+    // Calculate the SUB of the return type.
+    DartType returnType =
+        getStandardUpperBound(f.returnType, g.returnType, clientLibrary);
+    return new FunctionType(positionalParameters, returnType,
+        uniteNullabilities(f.declaredNullability, g.declaredNullability),
+        namedParameters: namedParameters,
+        requiredParameterCount: requiredParameterCount);
+  }
+
+  DartType _getInterfaceStandardUpperBound(
+      InterfaceType type1, InterfaceType type2, Library clientLibrary) {
+    // This currently does not implement a very complete standard upper bound
+    // algorithm, but handles a couple of the very common cases that are
+    // causing pain in real code.  The current algorithm is:
+    // 1. If either of the types is a supertype of the other, return it.
+    //    This is in fact the best result in this case.
+    // 2. If the two types have the same class element and is implicitly or
+    //    explicitly covariant, then take the pointwise standard upper bound of
+    //    the type arguments. This is again the best result, except that the
+    //    recursive calls may not return the true standard upper bounds.  The
+    //    result is guaranteed to be a well-formed type under the assumption
+    //    that the input types were well-formed (and assuming that the
+    //    recursive calls return well-formed types).
+    //    If the variance of the type parameter is contravariant, we take the
+    //    standard lower bound of the type arguments. If the variance of the
+    //    type parameter is invariant, we verify if the type arguments satisfy
+    //    subtyping in both directions, then choose a bound.
+    // 3. Otherwise return the spec-defined standard upper bound.  This will
+    //    be an upper bound, might (or might not) be least, and might
+    //    (or might not) be a well-formed type.
+    if (isSubtypeOf(type1, type2, SubtypeCheckMode.withNullabilities)) {
+      return type2;
+    }
+    if (isSubtypeOf(type2, type1, SubtypeCheckMode.withNullabilities)) {
+      return type1;
+    }
+    if (identical(type1.classNode, type2.classNode)) {
+      List<DartType> tArgs1 = type1.typeArguments;
+      List<DartType> tArgs2 = type2.typeArguments;
+      List<TypeParameter> tParams = type1.classNode.typeParameters;
+
+      assert(tArgs1.length == tArgs2.length);
+      assert(tArgs1.length == tParams.length);
+      List<DartType> tArgs = new List(tArgs1.length);
+      for (int i = 0; i < tArgs1.length; i++) {
+        if (tParams[i].variance == Variance.contravariant) {
+          tArgs[i] = getStandardLowerBound(tArgs1[i], tArgs2[i], clientLibrary);
+        } else if (tParams[i].variance == Variance.invariant) {
+          if (!areMutualSubtypes(
+              tArgs1[i], tArgs2[i], SubtypeCheckMode.withNullabilities)) {
+            // No bound will be valid, find bound at the interface level.
+            return hierarchy.getLegacyLeastUpperBound(
+                type1, type2, clientLibrary);
+          }
+          // TODO (kallentu) : Fix asymmetric bounds behavior for invariant type
+          //  parameters.
+          tArgs[i] = tArgs1[i];
+        } else {
+          tArgs[i] = getStandardUpperBound(tArgs1[i], tArgs2[i], clientLibrary);
+        }
+      }
+      return new InterfaceType(
+          type1.classNode,
+          uniteNullabilities(
+              type1.declaredNullability, type2.declaredNullability),
+          tArgs);
+    }
+    return hierarchy.getLegacyLeastUpperBound(type1, type2, clientLibrary);
+  }
+
+  DartType _getNullabilityObliviousTypeParameterStandardUpperBound(
+      DartType type1, DartType type2, Library clientLibrary) {
+    // This currently just implements a simple standard upper bound to
+    // handle some common cases.  It also avoids some termination issues
+    // with the naive spec algorithm.  The standard upper bound of two types
+    // (at least one of which is a type parameter) is computed here as:
+    // 1. If either type is a supertype of the other, return it.
+    // 2. If the first type is a type parameter, replace it with its bound,
+    //    with recursive occurrences of itself replaced with Object.
+    //    The second part of this should ensure termination.  Informally,
+    //    each type variable instantiation in one of the arguments to the
+    //    standard upper bound algorithm now strictly reduces the number
+    //    of bound variables in scope in that argument position.
+    // 3. If the second type is a type parameter, do the symmetric operation
+    //    to #2.
+    //
+    // It's not immediately obvious why this is symmetric in the case that both
+    // of them are type parameters.  For #1, symmetry holds since subtype
+    // is antisymmetric.  For #2, it's clearly not symmetric if upper bounds of
+    // bottom are allowed.  Ignoring this (for various reasons, not least
+    // of which that there's no way to write it), there's an informal
+    // argument (that might even be right) that you will always either
+    // end up expanding both of them or else returning the same result no matter
+    // which order you expand them in.  A key observation is that
+    // identical(expand(type1), type2) => subtype(type1, type2)
+    // and hence the contra-positive.
+    //
+    // TODO(leafp): Think this through and figure out what's the right
+    // definition.  Be careful about termination.
+    //
+    // I suspect in general a reasonable algorithm is to expand the innermost
+    // type variable first.  Alternatively, you could probably choose to treat
+    // it as just an instance of the interface type upper bound problem, with
+    // the "inheritance" chain extended by the bounds placed on the variables.
+    if (isSubtypeOf(type1, type2, SubtypeCheckMode.ignoringNullabilities)) {
+      return type2;
+    }
+    if (isSubtypeOf(type2, type1, SubtypeCheckMode.ignoringNullabilities)) {
+      return type1;
+    }
+    if (type1 is TypeParameterType) {
+      // TODO(paulberry): Analyzer collapses simple bounds in one step, i.e. for
+      // C<T extends U, U extends List>, T gets resolved directly to List.  Do
+      // we need to replicate that behavior?
+      return getStandardUpperBound(
+          Substitution.fromMap({type1.parameter: coreTypes.objectLegacyRawType})
+              .substituteType(type1.parameter.bound),
+          type2,
+          clientLibrary);
+    } else if (type2 is TypeParameterType) {
+      return getStandardUpperBound(
+          type1,
+          Substitution.fromMap({type2.parameter: coreTypes.objectLegacyRawType})
+              .substituteType(type2.parameter.bound),
+          clientLibrary);
+    } else {
+      // We should only be called when at least one of the types is a
+      // TypeParameterType
+      assert(false);
+      return const DynamicType();
+    }
+  }
+}
diff --git a/pkg/kernel/lib/src/tool/command_line_util.dart b/pkg/kernel/lib/src/tool/command_line_util.dart
index 937093e..d6f3f61 100644
--- a/pkg/kernel/lib/src/tool/command_line_util.dart
+++ b/pkg/kernel/lib/src/tool/command_line_util.dart
@@ -40,6 +40,5 @@
       print(e);
       exit(1);
     }
-    return null;
   }
 }
diff --git a/pkg/kernel/lib/src/types.dart b/pkg/kernel/lib/src/types.dart
index a50dde0..88e6940 100644
--- a/pkg/kernel/lib/src/types.dart
+++ b/pkg/kernel/lib/src/types.dart
@@ -31,11 +31,28 @@
 
 import '../type_environment.dart' show IsSubtypeOf, SubtypeCheckMode;
 
-class Types {
+import '../src/standard_bounds.dart';
+
+class Types with StandardBounds {
+  @override
   final ClassHierarchyBase hierarchy;
 
   Types(this.hierarchy);
 
+  @override
+  CoreTypes get coreTypes => hierarchy.coreTypes;
+
+  bool areMutualSubtypes(DartType s, DartType t, SubtypeCheckMode mode) {
+    IsSubtypeOf result = performNullabilityAwareMutualSubtypesCheck(s, t);
+    switch (mode) {
+      case SubtypeCheckMode.ignoringNullabilities:
+        return result.isSubtypeWhenIgnoringNullabilities();
+      case SubtypeCheckMode.withNullabilities:
+        return result.isSubtypeWhenUsingNullabilities();
+    }
+    return throw new StateError("Unhandled subtype check mode '$mode'.");
+  }
+
   bool _isSubtypeFromMode(IsSubtypeOf isSubtypeOf, SubtypeCheckMode mode) {
     switch (mode) {
       case SubtypeCheckMode.withNullabilities:
@@ -48,6 +65,7 @@
   }
 
   /// Returns true if [s] is a subtype of [t].
+  @override
   bool isSubtypeOf(DartType s, DartType t, SubtypeCheckMode mode) {
     IsSubtypeOf result = performNullabilityAwareSubtypeCheck(s, t);
     return _isSubtypeFromMode(result, mode);
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index 5ef2712..1253b7d 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -96,7 +96,7 @@
   /// is the initializer of a [Field] or [VariableDeclaration] node.
   /// If this method returns `true`, the variable will be inlined at all
   /// points of reference and the variable itself removed (unless overridden
-  /// by the `keepFields` or `keepVariables` flag to the constant transformer).
+  /// by the `keepFields` or `keepLocals` properties).
   /// This method must be deterministic, i.e. it must always return the same
   /// value for the same constant value and place in the AST.
   bool shouldInlineConstant(ConstantExpression initializer) => true;
@@ -109,6 +109,18 @@
   /// This defaults to `false` since it requires additional work for a backend
   /// to support unevaluated constants.
   bool get supportsUnevaluatedConstants => false;
+
+  /// If `true` constant [Field] declarations are not removed from the AST even
+  /// when use-sites are inlined.
+  ///
+  /// All use-sites will be rewritten based on [shouldInlineConstant].
+  bool get keepFields => true;
+
+  /// If `true` constant [VariableDeclaration]s are not removed from the AST
+  /// even when use-sites are inlined.
+  ///
+  /// All use-sites will be rewritten based on [shouldInlineConstant].
+  bool get keepLocals => false;
 }
 
 /// A target provides backend-specific options for generating kernel IR.
diff --git a/pkg/kernel/lib/text/serializer_combinators.dart b/pkg/kernel/lib/text/serializer_combinators.dart
index 30eb6a3..39435d7 100644
--- a/pkg/kernel/lib/text/serializer_combinators.dart
+++ b/pkg/kernel/lib/text/serializer_combinators.dart
@@ -17,25 +17,30 @@
 
   final Map<String, T> binders = <String, T>{};
 
-  final Set<String> usedNames;
+  final Map<T, String> distinctNames = new Map<T, String>.identity();
 
-  DeserializationEnvironment(this.parent)
-      : usedNames = parent?.usedNames?.toSet() ?? new Set<String>();
+  DeserializationEnvironment(this.parent);
 
   T lookup(String name) => locals[name] ?? parent?.lookup(name);
 
-  T addBinder(String name, T node) {
-    if (usedNames.contains(name)) {
-      throw StateError("Name '${name}' is already declared in this scope.");
+  T addBinder(T node, String distinctName) {
+    if (lookupDistinctName(node) != null) {
+      throw StateError(
+          "Name '${distinctName}' is already declared in this scope.");
     }
-    usedNames.add(name);
-    return binders[name] = node;
+    distinctNames[node] = distinctName;
+    return binders[distinctName] = node;
   }
 
-  void close() {
+  // TODO(dmitryas): Consider combining with [addBinder] into a single method.
+  void extend() {
     locals.addAll(binders);
     binders.clear();
   }
+
+  String lookupDistinctName(T object) {
+    return distinctNames[object] ?? parent?.lookupDistinctName(object);
+  }
 }
 
 class SerializationEnvironment<T extends Node> {
@@ -47,33 +52,55 @@
 
   int nameCount;
 
+  Map<T, String> distinctNames = new Map<T, String>.identity();
+
   SerializationEnvironment(this.parent) : nameCount = parent?.nameCount ?? 0;
 
   String lookup(T node) => locals[node] ?? parent?.lookup(node);
 
-  String addBinder(T node, String name) {
+  String addBinder(T node, {String nameClue}) {
     final String separator = "^";
     final int codeOfZero = "0".codeUnitAt(0);
     final int codeOfNine = "9".codeUnitAt(0);
 
-    int prefixLength = name.length - 1;
-    bool isOnlyDigits = true;
-    while (prefixLength >= 0 && name[prefixLength] != separator) {
-      int code = name.codeUnitAt(prefixLength);
-      isOnlyDigits = isOnlyDigits && (codeOfZero <= code && code <= codeOfNine);
-      --prefixLength;
+    String prefix;
+    if (nameClue != null) {
+      int prefixLength = nameClue.length - 1;
+      bool isOnlyDigits = true;
+      while (prefixLength >= 0 && nameClue[prefixLength] != separator) {
+        int code = nameClue.codeUnitAt(prefixLength);
+        isOnlyDigits =
+            isOnlyDigits && (codeOfZero <= code && code <= codeOfNine);
+        --prefixLength;
+      }
+      if (prefixLength < 0 || !isOnlyDigits) {
+        prefixLength = nameClue.length;
+      }
+      prefix = nameClue.substring(0, prefixLength);
+    } else {
+      prefix = "ID";
     }
-    if (prefixLength < 0 || !isOnlyDigits) {
-      prefixLength = name.length;
-    }
-    String prefix = name.substring(0, prefixLength);
-    return binders[node] = "$prefix$separator${nameCount++}";
+    String distinctName = "$prefix$separator${nameCount++}";
+    // The following checks for an internal error, not an error caused by the user.
+    // So, an assert is used instead of an exception.
+    assert(
+        lookupDistinctName(node) == null,
+        "Can't assign distinct name '${distinctName}' "
+        "to an object of kind '${node.runtimeType}': "
+        "it's already known by name '${lookupDistinctName(node)}'.");
+    distinctNames[node] = distinctName;
+    return binders[node] = distinctName;
   }
 
-  void close() {
+  // TODO(dmitryas): Consider combining with [addBinder] into a single method.
+  void extend() {
     locals.addAll(binders);
     binders.clear();
   }
+
+  String lookupDistinctName(T object) {
+    return distinctNames[object] ?? parent?.lookupDistinctName(object);
+  }
 }
 
 class DeserializationState {
@@ -203,7 +230,7 @@
 // They require a function mapping serializables to a tag string.  This is
 // implemented by Tagger visitors.
 // A tagged union of serializer/deserializers.
-class Case<T extends Node> extends TextSerializer<T> {
+class Case<T> extends TextSerializer<T> {
   final Tagger<T> tagger;
   final List<String> _tags;
   final List<TextSerializer<T>> _serializers;
@@ -312,7 +339,7 @@
   void writeTo(
       StringBuffer buffer, Tuple2<T1, T2> object, SerializationState state) {
     first.writeTo(buffer, object.first, state);
-    buffer.write(' ');
+    if (!second.isEmpty) buffer.write(' ');
     second.writeTo(buffer, object.second, state);
   }
 }
@@ -340,9 +367,9 @@
   void writeTo(StringBuffer buffer, Tuple3<T1, T2, T3> object,
       SerializationState state) {
     first.writeTo(buffer, object.first, state);
-    buffer.write(' ');
+    if (!second.isEmpty) buffer.write(' ');
     second.writeTo(buffer, object.second, state);
-    buffer.write(' ');
+    if (!third.isEmpty) buffer.write(' ');
     third.writeTo(buffer, object.third, state);
   }
 }
@@ -376,11 +403,11 @@
   void writeTo(StringBuffer buffer, Tuple4<T1, T2, T3, T4> object,
       SerializationState state) {
     first.writeTo(buffer, object.first, state);
-    buffer.write(' ');
+    if (!second.isEmpty) buffer.write(' ');
     second.writeTo(buffer, object.second, state);
-    buffer.write(' ');
+    if (!third.isEmpty) buffer.write(' ');
     third.writeTo(buffer, object.third, state);
-    buffer.write(' ');
+    if (!fourth.isEmpty) buffer.write(' ');
     fourth.writeTo(buffer, object.fourth, state);
   }
 }
@@ -394,6 +421,158 @@
   const Tuple4(this.first, this.second, this.third, this.fourth);
 }
 
+class Tuple5Serializer<T1, T2, T3, T4, T5>
+    extends TextSerializer<Tuple5<T1, T2, T3, T4, T5>> {
+  final TextSerializer<T1> first;
+  final TextSerializer<T2> second;
+  final TextSerializer<T3> third;
+  final TextSerializer<T4> fourth;
+  final TextSerializer<T5> fifth;
+
+  const Tuple5Serializer(
+      this.first, this.second, this.third, this.fourth, this.fifth);
+
+  Tuple5<T1, T2, T3, T4, T5> readFrom(
+      Iterator<Object> stream, DeserializationState state) {
+    return new Tuple5(
+        first.readFrom(stream, state),
+        second.readFrom(stream, state),
+        third.readFrom(stream, state),
+        fourth.readFrom(stream, state),
+        fifth.readFrom(stream, state));
+  }
+
+  void writeTo(StringBuffer buffer, Tuple5<T1, T2, T3, T4, T5> object,
+      SerializationState state) {
+    first.writeTo(buffer, object.first, state);
+    if (!second.isEmpty) buffer.write(' ');
+    second.writeTo(buffer, object.second, state);
+    if (!third.isEmpty) buffer.write(' ');
+    third.writeTo(buffer, object.third, state);
+    if (!fourth.isEmpty) buffer.write(' ');
+    fourth.writeTo(buffer, object.fourth, state);
+    if (!fifth.isEmpty) buffer.write(' ');
+    fifth.writeTo(buffer, object.fifth, state);
+  }
+}
+
+class Tuple5<T1, T2, T3, T4, T5> {
+  final T1 first;
+  final T2 second;
+  final T3 third;
+  final T4 fourth;
+  final T5 fifth;
+
+  const Tuple5(this.first, this.second, this.third, this.fourth, this.fifth);
+}
+
+class Tuple6Serializer<T1, T2, T3, T4, T5, T6>
+    extends TextSerializer<Tuple6<T1, T2, T3, T4, T5, T6>> {
+  final TextSerializer<T1> first;
+  final TextSerializer<T2> second;
+  final TextSerializer<T3> third;
+  final TextSerializer<T4> fourth;
+  final TextSerializer<T5> fifth;
+  final TextSerializer<T6> sixth;
+
+  const Tuple6Serializer(
+      this.first, this.second, this.third, this.fourth, this.fifth, this.sixth);
+
+  Tuple6<T1, T2, T3, T4, T5, T6> readFrom(
+      Iterator<Object> stream, DeserializationState state) {
+    return new Tuple6(
+        first.readFrom(stream, state),
+        second.readFrom(stream, state),
+        third.readFrom(stream, state),
+        fourth.readFrom(stream, state),
+        fifth.readFrom(stream, state),
+        sixth.readFrom(stream, state));
+  }
+
+  void writeTo(StringBuffer buffer, Tuple6<T1, T2, T3, T4, T5, T6> object,
+      SerializationState state) {
+    first.writeTo(buffer, object.first, state);
+    if (!second.isEmpty) buffer.write(' ');
+    second.writeTo(buffer, object.second, state);
+    if (!third.isEmpty) buffer.write(' ');
+    third.writeTo(buffer, object.third, state);
+    if (!fourth.isEmpty) buffer.write(' ');
+    fourth.writeTo(buffer, object.fourth, state);
+    if (!fifth.isEmpty) buffer.write(' ');
+    fifth.writeTo(buffer, object.fifth, state);
+    if (!sixth.isEmpty) buffer.write(' ');
+    sixth.writeTo(buffer, object.sixth, state);
+  }
+}
+
+class Tuple6<T1, T2, T3, T4, T5, T6> {
+  final T1 first;
+  final T2 second;
+  final T3 third;
+  final T4 fourth;
+  final T5 fifth;
+  final T6 sixth;
+
+  const Tuple6(
+      this.first, this.second, this.third, this.fourth, this.fifth, this.sixth);
+}
+
+class Tuple7Serializer<T1, T2, T3, T4, T5, T6, T7>
+    extends TextSerializer<Tuple7<T1, T2, T3, T4, T5, T6, T7>> {
+  final TextSerializer<T1> first;
+  final TextSerializer<T2> second;
+  final TextSerializer<T3> third;
+  final TextSerializer<T4> fourth;
+  final TextSerializer<T5> fifth;
+  final TextSerializer<T6> sixth;
+  final TextSerializer<T7> seventh;
+
+  const Tuple7Serializer(this.first, this.second, this.third, this.fourth,
+      this.fifth, this.sixth, this.seventh);
+
+  Tuple7<T1, T2, T3, T4, T5, T6, T7> readFrom(
+      Iterator<Object> stream, DeserializationState state) {
+    return new Tuple7(
+        first.readFrom(stream, state),
+        second.readFrom(stream, state),
+        third.readFrom(stream, state),
+        fourth.readFrom(stream, state),
+        fifth.readFrom(stream, state),
+        sixth.readFrom(stream, state),
+        seventh.readFrom(stream, state));
+  }
+
+  void writeTo(StringBuffer buffer, Tuple7<T1, T2, T3, T4, T5, T6, T7> object,
+      SerializationState state) {
+    first.writeTo(buffer, object.first, state);
+    if (!second.isEmpty) buffer.write(' ');
+    second.writeTo(buffer, object.second, state);
+    if (!third.isEmpty) buffer.write(' ');
+    third.writeTo(buffer, object.third, state);
+    if (!fourth.isEmpty) buffer.write(' ');
+    fourth.writeTo(buffer, object.fourth, state);
+    if (!fifth.isEmpty) buffer.write(' ');
+    fifth.writeTo(buffer, object.fifth, state);
+    if (!sixth.isEmpty) buffer.write(' ');
+    sixth.writeTo(buffer, object.sixth, state);
+    if (!seventh.isEmpty) buffer.write(' ');
+    seventh.writeTo(buffer, object.seventh, state);
+  }
+}
+
+class Tuple7<T1, T2, T3, T4, T5, T6, T7> {
+  final T1 first;
+  final T2 second;
+  final T3 third;
+  final T4 fourth;
+  final T5 fifth;
+  final T6 sixth;
+  final T7 seventh;
+
+  const Tuple7(this.first, this.second, this.third, this.fourth, this.fifth,
+      this.sixth, this.seventh);
+}
+
 // A serializer/deserializer for lists.
 class ListSerializer<T> extends TextSerializer<List<T>> {
   final TextSerializer<T> elements;
@@ -451,25 +630,28 @@
 /// Serializes an object and uses it as a binder for the name that is retrieved
 /// from the object using [nameGetter] and (temporarily) modified using
 /// [nameSetter].  The binder is added to the enclosing environment.
-class Binder<T extends Node> extends TextSerializer<T> {
-  final TextSerializer<T> contents;
-  final String Function(T) nameGetter;
-  final void Function(T, String) nameSetter;
+class Binder<T extends Node> extends TextSerializer<Tuple2<String, T>> {
+  final Tuple2Serializer<String, T> namedContents;
 
-  const Binder(this.contents, this.nameGetter, this.nameSetter);
+  Binder(TextSerializer<T> contents)
+      : namedContents = new Tuple2Serializer(const DartString(), contents);
 
-  T readFrom(Iterator<Object> stream, DeserializationState state) {
-    T object = contents.readFrom(stream, state);
-    state.environment.addBinder(nameGetter(object), object);
-    return object;
+  Tuple2<String, T> readFrom(
+      Iterator<Object> stream, DeserializationState state) {
+    Tuple2<String, T> namedObject = namedContents.readFrom(stream, state);
+    String name = namedObject.first;
+    T object = namedObject.second;
+    state.environment.addBinder(object, name);
+    return new Tuple2(name, object);
   }
 
-  void writeTo(StringBuffer buffer, T object, SerializationState state) {
-    String oldName = nameGetter(object);
-    String newName = state.environment.addBinder(object, oldName);
-    nameSetter(object, newName);
-    contents.writeTo(buffer, object, state);
-    nameSetter(object, oldName);
+  void writeTo(StringBuffer buffer, Tuple2<String, T> namedObject,
+      SerializationState state) {
+    String nameClue = namedObject.first;
+    T object = namedObject.second;
+    String distinctName =
+        state.environment.addBinder(object, nameClue: nameClue);
+    namedContents.writeTo(buffer, new Tuple2(distinctName, object), state);
   }
 }
 
@@ -488,7 +670,7 @@
     var bindingState = new DeserializationState(
         new DeserializationEnvironment(state.environment), state.nameRoot);
     P first = pattern.readFrom(stream, bindingState);
-    bindingState.environment.close();
+    bindingState.environment.extend();
     T second = term.readFrom(stream, bindingState);
     return new Tuple2(first, second);
   }
@@ -498,7 +680,7 @@
     var bindingState =
         new SerializationState(new SerializationEnvironment(state.environment));
     pattern.writeTo(buffer, tuple.first, bindingState);
-    bindingState.environment.close();
+    bindingState.environment.extend();
     buffer.write(' ');
     term.writeTo(buffer, tuple.second, bindingState);
   }
@@ -520,7 +702,7 @@
     var closedState = new DeserializationState(
         new DeserializationEnvironment(state.environment)
           ..binders.addAll(state.environment.binders)
-          ..close(),
+          ..extend(),
         state.nameRoot);
     T second = pattern2.readFrom(stream, closedState);
     state.environment.binders.addAll(closedState.environment.binders);
@@ -533,7 +715,7 @@
     var closedState =
         new SerializationState(new SerializationEnvironment(state.environment)
           ..binders.addAll(state.environment.binders)
-          ..close());
+          ..extend());
     buffer.write(' ');
     pattern2.writeTo(buffer, tuple.second, closedState);
     state.environment.binders.addAll(closedState.environment.binders);
diff --git a/pkg/kernel/lib/text/text_serialization_verifier.dart b/pkg/kernel/lib/text/text_serialization_verifier.dart
index 456b204..0b983c2 100644
--- a/pkg/kernel/lib/text/text_serialization_verifier.dart
+++ b/pkg/kernel/lib/text/text_serialization_verifier.dart
@@ -29,9 +29,9 @@
   RoundTripStatus(this.node, {TreeNode context})
       : context = node is TreeNode && node.location != null ? node : context;
 
-  Uri get uri => context.location.file;
+  Uri get uri => context?.location?.file;
 
-  int get offset => context.fileOffset;
+  int get offset => context?.fileOffset;
 
   bool get isSuccess;
 
@@ -194,213 +194,7 @@
   }
 }
 
-class VerificationState {
-  final VerificationState parent;
-
-  final Node node;
-
-  bool allChildrenAreSupported = true;
-  final List<Node> roundTripReadyNodes = [];
-
-  final Set<VariableDeclaration> variableDeclarations =
-      new Set<VariableDeclaration>.identity();
-  final Set<TypeParameter> typeParameters = new Set<TypeParameter>.identity();
-
-  final Set<VariableDeclaration> usedVariables =
-      new Set<VariableDeclaration>.identity();
-  final Set<TypeParameter> usedTypeParameters =
-      new Set<TypeParameter>.identity();
-
-  VerificationState(this.parent, this.node);
-
-  bool get isRoot => parent == null;
-
-  bool get isFullySupported => isSupported(node) && allChildrenAreSupported;
-
-  bool get hasSufficientScope {
-    return usedVariables.every((v) => variableDeclarations.contains(v)) &&
-        usedTypeParameters.every((p) => typeParameters.contains(p));
-  }
-
-  bool get isRoundTripReady => isFullySupported && hasSufficientScope;
-
-  bool isVariableDeclared(VariableDeclaration node) {
-    return variableDeclarations.contains(node) ||
-        !isRoot && parent.isVariableDeclared(node);
-  }
-
-  bool isTypeParameterDeclared(TypeParameter node) {
-    return typeParameters.contains(node) ||
-        !isRoot && parent.isTypeParameterDeclared(node);
-  }
-
-  void handleChild(VerificationState childState) {
-    allChildrenAreSupported =
-        allChildrenAreSupported && childState.isFullySupported;
-  }
-
-  void handleDeclarations() {
-    Node node = this.node;
-    if (node is VariableDeclaration) {
-      parent.variableDeclarations.add(node);
-    }
-    if (node is TypeParameter) {
-      parent.typeParameters.add(node);
-    }
-    if (node is VariableGet) {
-      usedVariables.add(node.variable);
-    }
-    if (node is VariableSet) {
-      usedVariables.add(node.variable);
-    }
-    if (node is TypeParameterType) {
-      usedTypeParameters.add(node.parameter);
-    }
-  }
-
-  /// Computes round-trip ready nodes or propagates them further in the stack.
-  ///
-  /// The returned nodes are the roots of maximal-by-inclusion subtrees that are
-  /// ready for the round-trip textual serialization.
-  List<Node> takeRoundTripReadyNodes() {
-    if (isRoot) {
-      // If the node is the root of the AST and is round-trip ready, return just
-      // the root because it's maximal-by-inclusion.
-      // Otherwise, return the nodes collected so far.
-      List<Node> result =
-          isRoundTripReady ? <Node>[node] : roundTripReadyNodes.toList();
-      roundTripReadyNodes.clear();
-      return result;
-    }
-
-    // The algorithm in this branch is based on the following observations:
-    //   - The isFullySupported property is monotonous.  That is, when traveling
-    //     from a leaf to the root, the property may only change its value from
-    //     true to false.
-    //   - The isRoundTripReady property is not monotonous because the sub-tree
-    //     that is ready for the round trip shouldn't contain free variables or
-    //     free type parameters.
-    //   - The isRoundTripReady property implies the isFullySupported property.
-
-    if (!isFullySupported) {
-      // We're out of the isFullySupported sub-tree, run the round trip on the
-      // nodes that are ready for it so far -- they are maximal-by-inclusion by
-      // construction.
-      List<Node> result = roundTripReadyNodes.toList();
-      roundTripReadyNodes.clear();
-      return result;
-    } else {
-      // We're still in the isFullySupported sub-tree.  It's to early to decide
-      // if the collected sub-trees or the node itself are maximal-by-inclusion.
-      // The decision should be made in one of the parent nodes.  So, we just
-      // propagate the information to the parent, returning an empty list for
-      // the current node.
-      if (isRoundTripReady) {
-        // The current tree is ready for the round trip.  Its sub-trees, which
-        // are also round-trip ready, are not maximal-by-inclusion.  So only the
-        // node itself is passed to the parent.
-        parent.roundTripReadyNodes.add(node);
-      } else {
-        // The node is not round-trip ready.  The round-trip ready sub-trees
-        // collected so far remain the candidates for being
-        // maximal-by-inclusion.
-        parent.roundTripReadyNodes.addAll(roundTripReadyNodes);
-      }
-      return const <Node>[];
-    }
-  }
-
-  /// Passes the necessary information to the parent when popped from the stack.
-  void mergeToParent() {
-    // Pass the free occurrences of variables and type parameters to the parent.
-    if (parent != null) {
-      parent.usedVariables
-          .addAll(usedVariables.difference(variableDeclarations));
-      parent.usedTypeParameters
-          .addAll(usedTypeParameters.difference(typeParameters));
-      parent.handleChild(this);
-    }
-  }
-
-  static bool isExpressionSupported(Expression node) =>
-      !isExpressionNotSupported(node);
-
-  static bool isExpressionNotSupported(Expression node) =>
-      node is SetConcatenation ||
-      node is MapConcatenation ||
-      node is InstanceCreation ||
-      node is FileUriExpression ||
-      node is BlockExpression ||
-      node is ListConcatenation ||
-      node is NullCheck ||
-      node is BasicLiteral ||
-      node is InvocationExpression ||
-      node is Instantiation ||
-      node is ConstantExpression ||
-      node is CheckLibraryIsLoaded ||
-      node is LoadLibrary;
-
-  static bool isStatementSupported(Statement node) =>
-      !isStatementNotSupported(node);
-
-  static bool isStatementNotSupported(Statement node) =>
-      node is BreakStatement ||
-      node is VariableDeclaration &&
-          (node.parent is! Block || node.name == null) ||
-      node is SwitchStatement ||
-      node is TryFinally ||
-      node is LabeledStatement ||
-      node is TryCatch ||
-      node is FunctionDeclaration ||
-      node is ContinueSwitchStatement;
-
-  static bool isSupported(Node node) => !isNotSupported(node);
-
-  static bool isNotSupported(Node node) =>
-      node is Expression && isExpressionNotSupported(node) ||
-      node is Statement && isStatementNotSupported(node) ||
-      node is FunctionNode && node.body == null ||
-      node is Procedure &&
-          (!node.isStatic || node.kind != ProcedureKind.Method) ||
-      node is AssertInitializer ||
-      node is BoolConstant ||
-      node is Catch ||
-      node is Class ||
-      node is Combinator ||
-      node is Component ||
-      node is Constructor ||
-      node is DoubleConstant ||
-      node is Extension ||
-      node is Field ||
-      node is FieldInitializer ||
-      node is InstanceConstant ||
-      node is IntConstant ||
-      node is InvalidInitializer ||
-      node is Library ||
-      node is LibraryDependency ||
-      node is LibraryPart ||
-      node is ListConstant ||
-      node is LocalInitializer ||
-      node is MapConstant ||
-      node is Name && node.isPrivate ||
-      node is NullConstant ||
-      node is PartialInstantiationConstant ||
-      node is PrimitiveConstant ||
-      node is RedirectingFactoryConstructor ||
-      node is RedirectingInitializer ||
-      node is SetConstant ||
-      node is StringConstant ||
-      node is SuperInitializer ||
-      node is Supertype ||
-      node is SwitchCase ||
-      node is SymbolConstant ||
-      node is TearOffConstant ||
-      node is TypeLiteralConstant ||
-      node is Typedef ||
-      node is UnevaluatedConstant;
-}
-
-class TextSerializationVerifier extends RecursiveVisitor<void> {
+class TextSerializationVerifier {
   static const bool showStackTrace = bool.fromEnvironment(
       "text_serialization.showStackTrace",
       defaultValue: false);
@@ -410,8 +204,6 @@
 
   final CanonicalName root;
 
-  VerificationState _stateStackTop;
-
   TextSerializationVerifier({CanonicalName root})
       : root = root ?? new CanonicalName.root() {
     initializeSerializers();
@@ -422,58 +214,11 @@
 
   List<RoundTripStatus> get failures => _failures.toList()..sort();
 
-  VerificationState get currentState => _stateStackTop;
-
-  TreeNode get lastSeenTreeNodeWithLocation {
-    VerificationState state = _stateStackTop;
-    while (state != null) {
-      Node node = state.node;
-      if (node is TreeNode && node.location != null) {
-        return node;
-      }
-      state = state.parent;
-    }
-    return null;
+  void verify(Library node) {
+    makeRoundTrip<Library>(node, librarySerializer);
   }
 
-  void pushStateFor(Node node) {
-    _stateStackTop = new VerificationState(_stateStackTop, node);
-  }
-
-  void dropState() {
-    if (_stateStackTop == null) {
-      throw new StateError("Attempting to remove a state from an empty stack.");
-    }
-    _stateStackTop = _stateStackTop.parent;
-  }
-
-  void verify(Node node) => node.accept(this);
-
-  void defaultNode(Node node) {
-    enterNode(node);
-    node.visitChildren(this);
-    exitNode(node);
-  }
-
-  void enterNode(node) {
-    pushStateFor(node);
-    currentState.handleDeclarations();
-  }
-
-  void exitNode(node) {
-    if (!identical(node, currentState.node)) {
-      throw new StateError("Trying to remove node '${node}' from the stack, "
-          "while another node '${currentState.node}' is on the top of it.");
-    }
-    List<Node> roundTripReadyNodes = currentState.takeRoundTripReadyNodes();
-    for (Node node in roundTripReadyNodes) {
-      makeRoundTripDispatch(node);
-    }
-    currentState.mergeToParent();
-    dropState();
-  }
-
-  T readNode<T extends Node>(
+  T readNode<T extends TreeNode>(
       T node, String input, TextSerializer<T> serializer) {
     TextIterator stream = new TextIterator(input, 0);
     stream.moveNext();
@@ -484,24 +229,24 @@
     } catch (exception, stackTrace) {
       String message =
           showStackTrace ? "${exception}\n${stackTrace}" : "${exception}";
-      _status.add(new RoundTripDeserializationFailure(node, message,
-          context: lastSeenTreeNodeWithLocation));
+      _status.add(
+          new RoundTripDeserializationFailure(node, message, context: node));
       return null;
     }
     if (stream.moveNext()) {
       _status.add(new RoundTripDeserializationFailure(
           node, "unexpected trailing text",
-          context: lastSeenTreeNodeWithLocation));
+          context: node));
     }
     if (result == null) {
       _status.add(new RoundTripDeserializationFailure(
           node, "Deserialization of the following returned null: '${input}'",
-          context: lastSeenTreeNodeWithLocation));
+          context: node));
     }
     return result;
   }
 
-  String writeNode<T extends Node>(T node, TextSerializer<T> serializer) {
+  String writeNode<T extends TreeNode>(T node, TextSerializer<T> serializer) {
     StringBuffer buffer = new StringBuffer();
     try {
       serializer.writeTo(buffer, node,
@@ -510,38 +255,12 @@
       String message =
           showStackTrace ? "${exception}\n${stackTrace}" : "${exception}";
       _status.add(new RoundTripInitialSerializationFailure(node, message,
-          context: lastSeenTreeNodeWithLocation));
+          context: node));
     }
     return buffer.toString();
   }
 
-  void makeRoundTripDispatch(Node node) {
-    if (node is DartType) {
-      makeRoundTrip<DartType>(node, dartTypeSerializer);
-    } else if (node is Expression) {
-      makeRoundTrip<Expression>(node, expressionSerializer);
-    } else if (node is Statement) {
-      makeRoundTrip<Statement>(node, statementSerializer);
-    } else if (node is Arguments) {
-      makeRoundTrip<Arguments>(node, argumentsSerializer);
-    } else if (node is FunctionNode) {
-      makeRoundTrip<FunctionNode>(node, functionNodeSerializer);
-    } else if (node is Procedure) {
-      makeRoundTrip<Procedure>(node, procedureSerializer);
-    } else if (node is TypeParameter) {
-      makeRoundTrip<TypeParameter>(node, typeParameterSerializer);
-    } else if (node is NamedType) {
-      makeRoundTrip<NamedType>(node, namedTypeSerializer);
-    } else if (node is Name) {
-      makeRoundTrip<Name>(node, nameSerializer);
-    } else {
-      throw new StateError(
-          "Don't know how to make a round trip for a supported node "
-          "'${node.runtimeType}'");
-    }
-  }
-
-  void makeRoundTrip<T extends Node>(T node, TextSerializer<T> serializer) {
+  void makeRoundTrip<T extends TreeNode>(T node, TextSerializer<T> serializer) {
     int failureCount = _failures.length;
     String initial = writeNode(node, serializer);
     if (_failures.length != failureCount) {
@@ -567,10 +286,9 @@
     if (initial != serialized) {
       _status.add(new RoundTripSecondSerializationFailure(
           node, initial, serialized,
-          context: lastSeenTreeNodeWithLocation));
+          context: node));
     } else {
-      _status.add(new RoundTripSuccess(node, initial,
-          context: lastSeenTreeNodeWithLocation));
+      _status.add(new RoundTripSuccess(node, initial, context: node));
     }
   }
 
diff --git a/pkg/kernel/lib/text/text_serializer.dart b/pkg/kernel/lib/text/text_serializer.dart
index 829959c..59d13a0 100644
--- a/pkg/kernel/lib/text/text_serializer.dart
+++ b/pkg/kernel/lib/text/text_serializer.dart
@@ -10,8 +10,8 @@
 
 import '../visitor.dart' show ExpressionVisitor;
 
-abstract class Tagger<T extends Node> {
-  String tag(T node);
+abstract class Tagger<T> {
+  String tag(T object);
 }
 
 class NameTagger implements Tagger<Name> {
@@ -20,25 +20,13 @@
   String tag(Name name) => name.isPrivate ? "private" : "public";
 }
 
-const TextSerializer<Name> publicName =
-    const Wrapped(unwrapPublicName, wrapPublicName, const DartString());
+TextSerializer<Name> publicName =
+    Wrapped((w) => w.name, (u) => Name(u), const DartString());
 
-String unwrapPublicName(Name name) => name.name;
-
-Name wrapPublicName(String name) => new Name(name);
-
-const TextSerializer<Name> privateName = const Wrapped(unwrapPrivateName,
-    wrapPrivateName, Tuple2Serializer(const DartString(), const DartString()));
-
-Tuple2<String, String> unwrapPrivateName(Name name) {
-  return new Tuple2(name.library.importUri.toString(), name.name);
-}
-
-Name wrapPrivateName(Tuple2<String, String> tuple) {
-  // We need a map from import URI to libraries.  More generally, we will need
-  // a way to map any 'named' node to the node's reference.
-  throw UnimplementedError('Deserialization of private names.');
-}
+TextSerializer<Name> privateName = Wrapped(
+    (w) => Tuple2(w.name, w.library.canonicalName),
+    (u) => Name.byReference(u.first, u.second.getReference()),
+    Tuple2Serializer(DartString(), CanonicalNameSerializer()));
 
 TextSerializer<Name> nameSerializer = new Case(
     const NameTagger(), {"public": publicName, "private": privateName});
@@ -112,6 +100,17 @@
   }
 
   String visitFunctionExpression(FunctionExpression _) => "fun";
+  String visitListConcatenation(ListConcatenation _) => "lists";
+  String visitSetConcatenation(SetConcatenation _) => "sets";
+  String visitMapConcatenation(MapConcatenation _) => "maps";
+  String visitBlockExpression(BlockExpression _) => "let-block";
+  String visitInstantiation(Instantiation _) => "apply";
+  String visitNullCheck(NullCheck _) => "not-null";
+  String visitFileUriExpression(FileUriExpression _) => "with-uri";
+  String visitCheckLibraryIsLoaded(CheckLibraryIsLoaded _) => "is-loaded";
+  String visitLoadLibrary(LoadLibrary _) => "load";
+  String visitConstantExpression(ConstantExpression _) => "const";
+  String visitInstanceCreation(InstanceCreation _) => "object";
 }
 
 const TextSerializer<InvalidExpression> invalidExpressionSerializer =
@@ -397,12 +396,6 @@
   return new Let(tuple.first, tuple.second);
 }
 
-String getVariableDeclarationName(VariableDeclaration node) => node.name;
-
-void setVariableDeclarationName(VariableDeclaration node, String name) {
-  node.name = name;
-}
-
 TextSerializer<PropertyGet> propertyGetSerializer = new Wrapped(
     unwrapPropertyGet,
     wrapPropertyGet,
@@ -695,6 +688,71 @@
   return new FunctionExpression(node);
 }
 
+TextSerializer<ListConcatenation> listConcatenationSerializer = Wrapped(
+    (lc) => Tuple2(lc.typeArgument, lc.lists),
+    (t) => ListConcatenation(t.second, typeArgument: t.first),
+    Tuple2Serializer(dartTypeSerializer, ListSerializer(expressionSerializer)));
+
+TextSerializer<SetConcatenation> setConcatenationSerializer = Wrapped(
+    (sc) => Tuple2(sc.typeArgument, sc.sets),
+    (t) => SetConcatenation(t.second, typeArgument: t.first),
+    Tuple2Serializer(dartTypeSerializer, ListSerializer(expressionSerializer)));
+
+TextSerializer<MapConcatenation> mapConcatenationSerializer = Wrapped(
+    (mc) => Tuple3(mc.keyType, mc.valueType, mc.maps),
+    (t) => MapConcatenation(t.third, keyType: t.first, valueType: t.second),
+    Tuple3Serializer(dartTypeSerializer, dartTypeSerializer,
+        ListSerializer(expressionSerializer)));
+
+TextSerializer<BlockExpression> blockExpressionSerializer = Wrapped(
+    (w) => Tuple2(w.body.statements, w.value),
+    (u) => BlockExpression(Block(u.first), u.second),
+    const BlockSerializer());
+
+TextSerializer<Instantiation> instantiationSerializer = Wrapped(
+    (i) => Tuple2(i.expression, i.typeArguments),
+    (t) => Instantiation(t.first, t.second),
+    Tuple2Serializer(expressionSerializer, ListSerializer(dartTypeSerializer)));
+
+TextSerializer<NullCheck> nullCheckSerializer =
+    Wrapped((nc) => nc.operand, (op) => NullCheck(op), expressionSerializer);
+
+TextSerializer<FileUriExpression> fileUriExpressionSerializer = Wrapped(
+    (fue) => Tuple2(fue.expression, fue.fileUri),
+    (t) => FileUriExpression(t.first, t.second),
+    Tuple2Serializer(expressionSerializer, const UriSerializer()));
+
+TextSerializer<CheckLibraryIsLoaded> checkLibraryIsLoadedSerializer = Wrapped(
+    (clil) => clil.import,
+    (i) => CheckLibraryIsLoaded(i),
+    libraryDependencySerializer);
+
+TextSerializer<LoadLibrary> loadLibrarySerializer = Wrapped(
+    (ll) => ll.import, (i) => LoadLibrary(i), libraryDependencySerializer);
+
+TextSerializer<ConstantExpression> constantExpressionSerializer = Wrapped(
+    (ce) => Tuple2(ce.constant, ce.type),
+    (t) => ConstantExpression(t.first, t.second),
+    Tuple2Serializer(constantSerializer, dartTypeSerializer));
+
+TextSerializer<InstanceCreation> instanceCreationSerializer = Wrapped(
+    (ic) => Tuple6(
+        ic.classReference.canonicalName,
+        ic.typeArguments,
+        ic.fieldValues.keys.map((r) => r.canonicalName).toList(),
+        ic.fieldValues.values.toList(),
+        ic.asserts,
+        ic.unusedArguments),
+    (t) => InstanceCreation(t.first.getReference(), t.second,
+        Map.fromIterables(t.third, t.fourth), t.fifth, t.sixth),
+    Tuple6Serializer(
+        CanonicalNameSerializer(),
+        ListSerializer(dartTypeSerializer),
+        ListSerializer(CanonicalNameSerializer()),
+        ListSerializer(expressionSerializer),
+        ListSerializer(assertStatementSerializer),
+        ListSerializer(expressionSerializer)));
+
 Case<Expression> expressionSerializer =
     new Case.uninitialized(const ExpressionTagger());
 
@@ -729,105 +787,54 @@
   return new Arguments(tuple.second, types: tuple.first, named: tuple.third);
 }
 
-class VariableDeclarationTagger implements Tagger<VariableDeclaration> {
-  const VariableDeclarationTagger();
+const Map<int, String> variableDeclarationFlagToName = const {
+  VariableDeclaration.FlagFinal: "final",
+  VariableDeclaration.FlagConst: "const",
+  VariableDeclaration.FlagFieldFormal: "field-formal",
+  VariableDeclaration.FlagCovariant: "covariant",
+  VariableDeclaration.FlagInScope: "in-scope",
+  VariableDeclaration.FlagGenericCovariantImpl: "generic-covariant-impl",
+  VariableDeclaration.FlagLate: "late",
+  VariableDeclaration.FlagRequired: "required",
+};
 
-  String tag(VariableDeclaration decl) {
-    if (decl.isCovariant) throw UnimplementedError("Covariant declaration.");
-    if (decl.isFieldFormal) throw UnimplementedError("Initializing formal.");
-    if (decl.isConst) {
-      // It's not clear what invariants we assume about const/final.  For now
-      // throw if we have both.
-      if (decl.isFinal) throw UnimplementedError("const and final");
-      return "const";
-    }
-    if (decl.isFinal) {
-      return "final";
-    }
-    return "var";
+class VariableDeclarationFlagTagger implements Tagger<int> {
+  String tag(int flag) {
+    return variableDeclarationFlagToName[flag] ??
+        (throw StateError("Unknown VariableDeclaration flag value: ${flag}."));
   }
 }
 
-TextSerializer<VariableDeclaration> varDeclarationSerializer = new Wrapped(
-    unwrapVariableDeclaration,
-    wrapVarDeclaration,
-    Tuple4Serializer(
-        const DartString(),
-        dartTypeSerializer,
-        new Optional(expressionSerializer),
-        new ListSerializer(expressionSerializer)));
+TextSerializer<int> variableDeclarationFlagsSerializer = Wrapped(
+    (w) => List.generate(30, (i) => w & (1 << i)).where((f) => f != 0).toList(),
+    (u) => u.fold(0, (fs, f) => fs |= f),
+    ListSerializer(Case(
+        VariableDeclarationFlagTagger(),
+        Map.fromIterable(variableDeclarationFlagToName.entries,
+            key: (e) => e.value,
+            value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())))));
 
-Tuple4<String, DartType, Expression, List<Expression>>
-    unwrapVariableDeclaration(VariableDeclaration declaration) {
-  return new Tuple4(declaration.name ?? "", declaration.type,
-      declaration.initializer, declaration.annotations);
-}
+TextSerializer<VariableDeclaration> variableDeclarationSerializer = Wrapped(
+    (v) => Tuple2(v.name, v),
+    (t) => t.second..name = t.first,
+    Binder<VariableDeclaration>(
+      new Wrapped(
+          (w) => Tuple4(w.flags, w.type, w.initializer, w.annotations),
+          (u) => u.fourth.fold(
+              VariableDeclaration(null,
+                  flags: u.first, type: u.second, initializer: u.third),
+              (v, a) => v..addAnnotation(a)),
+          Tuple4Serializer(
+              variableDeclarationFlagsSerializer,
+              dartTypeSerializer,
+              new Optional(expressionSerializer),
+              new ListSerializer(expressionSerializer))),
+    ));
 
-VariableDeclaration wrapVarDeclaration(
-    Tuple4<String, DartType, Expression, List<Expression>> tuple) {
-  var result = new VariableDeclaration(tuple.first.isEmpty ? null : tuple.first,
-      initializer: tuple.third, type: tuple.second);
-  for (int i = 0; i < tuple.fourth.length; ++i) {
-    result.addAnnotation(tuple.fourth[i]);
-  }
-  return result;
-}
-
-TextSerializer<VariableDeclaration> finalDeclarationSerializer = new Wrapped(
-    unwrapVariableDeclaration,
-    wrapFinalDeclaration,
-    Tuple4Serializer(
-        const DartString(),
-        dartTypeSerializer,
-        new Optional(expressionSerializer),
-        new ListSerializer(expressionSerializer)));
-
-VariableDeclaration wrapFinalDeclaration(
-    Tuple4<String, DartType, Expression, List<Expression>> tuple) {
-  var result = new VariableDeclaration(tuple.first.isEmpty ? null : tuple.first,
-      initializer: tuple.third, type: tuple.second, isFinal: true);
-  for (int i = 0; i < tuple.fourth.length; ++i) {
-    result.addAnnotation(tuple.fourth[i]);
-  }
-  return result;
-}
-
-TextSerializer<VariableDeclaration> constDeclarationSerializer = new Wrapped(
-    unwrapVariableDeclaration,
-    wrapConstDeclaration,
-    Tuple4Serializer(
-        const DartString(),
-        dartTypeSerializer,
-        new Optional(expressionSerializer),
-        new ListSerializer(expressionSerializer)));
-
-VariableDeclaration wrapConstDeclaration(
-    Tuple4<String, DartType, Expression, List<Expression>> tuple) {
-  var result = new VariableDeclaration(tuple.first.isEmpty ? null : tuple.first,
-      initializer: tuple.third, type: tuple.second, isConst: true);
-  for (int i = 0; i < tuple.fourth.length; ++i) {
-    result.addAnnotation(tuple.fourth[i]);
-  }
-  return result;
-}
-
-TextSerializer<VariableDeclaration> variableDeclarationSerializer = new Binder(
-    new Case(const VariableDeclarationTagger(), {
-      "var": varDeclarationSerializer,
-      "final": finalDeclarationSerializer,
-      "const": constDeclarationSerializer,
-    }),
-    getVariableDeclarationName,
-    setVariableDeclarationName);
-
-TextSerializer<TypeParameter> typeParameterSerializer = new Binder(
-    const Wrapped(unwrapTypeParameter, wrapTypeParameter, const DartString()),
-    getTypeParameterName,
-    setTypeParameterName);
-
-String unwrapTypeParameter(TypeParameter node) => node.name;
-
-TypeParameter wrapTypeParameter(String name) => new TypeParameter(name);
+TextSerializer<TypeParameter> typeParameterSerializer = Wrapped(
+    (p) => Tuple2(p.name, p),
+    (t) => t.second..name = t.first,
+    Binder(Wrapped((_) => null, (_) => TypeParameter(), const Nothing())));
 
 TextSerializer<List<TypeParameter>> typeParametersSerializer = new Zip(
     new Rebind(
@@ -840,12 +847,6 @@
     zipTypeParameterDefaultType,
     unzipTypeParameterDefaultType);
 
-String getTypeParameterName(TypeParameter node) => node.name;
-
-void setTypeParameterName(TypeParameter node, String name) {
-  node.name = name;
-}
-
 TypeParameter zipTypeParameterBound(TypeParameter node, DartType bound) {
   return node..bound = bound;
 }
@@ -1050,6 +1051,14 @@
 
   String visitAssertStatement(AssertStatement node) => "assert";
   String visitAssertBlock(AssertBlock node) => "assert-block";
+  String visitLabeledStatement(LabeledStatement node) => "label";
+  String visitBreakStatement(BreakStatement node) => "break";
+  String visitTryFinally(TryFinally node) => "try-finally";
+  String visitTryCatch(TryCatch node) => "try-catch";
+  String visitSwitchStatement(SwitchStatement node) => "switch";
+  String visitContinueSwitchStatement(ContinueSwitchStatement node) =>
+      "continue";
+  String visitFunctionDeclaration(FunctionDeclaration node) => "local-fun";
 }
 
 TextSerializer<ExpressionStatement> expressionStatementSerializer = new Wrapped(
@@ -1090,33 +1099,18 @@
   return new YieldStatement(expression);
 }
 
-TextSerializer<AssertStatement> assertStatementSerializer = new Wrapped(
-    unwrapAssertStatement,
-    wrapAssertStatement,
-    new Tuple2Serializer(expressionSerializer, expressionSerializer));
+TextSerializer<AssertStatement> assertStatementSerializer = Wrapped(
+    (a) => Tuple2(a.condition, a.message),
+    (t) => AssertStatement(t.first, message: t.second),
+    Tuple2Serializer(expressionSerializer, Optional(expressionSerializer)));
 
-Tuple2<Expression, Expression> unwrapAssertStatement(AssertStatement node) {
-  return new Tuple2<Expression, Expression>(node.condition, node.message);
-}
+TextSerializer<Block> blockSerializer = new Wrapped(
+    (w) => Tuple2(w.statements, null),
+    (u) => Block(u.first),
+    const BlockSerializer());
 
-AssertStatement wrapAssertStatement(Tuple2<Expression, Expression> tuple) {
-  return new AssertStatement(tuple.first, message: tuple.second);
-}
-
-TextSerializer<Block> blockSerializer =
-    new Wrapped(unwrapBlock, wrapBlock, const BlockSerializer());
-
-List<Statement> unwrapBlock(Block node) => node.statements;
-
-Block wrapBlock(List<Statement> statements) => new Block(statements);
-
-TextSerializer<AssertBlock> assertBlockSerializer =
-    new Wrapped(unwrapAssertBlock, wrapAssertBlock, const BlockSerializer());
-
-List<Statement> unwrapAssertBlock(AssertBlock node) => node.statements;
-
-AssertBlock wrapAssertBlock(List<Statement> statements) =>
-    new AssertBlock(statements);
+TextSerializer<AssertBlock> assertBlockSerializer = new Wrapped(
+    (w) => Tuple2(w.statements, null), (u) => u.first, const BlockSerializer());
 
 /// Serializer for [Block]s.
 ///
@@ -1131,41 +1125,46 @@
 /// unnecessary nested blocks.  Instead, [BlockSerializer] is implemented
 /// without direct invocations of either [ListSerializer] or [Bind], but with a
 /// certain internal correspondence to how they work.
-class BlockSerializer extends TextSerializer<List<Statement>> {
+class BlockSerializer
+    extends TextSerializer<Tuple2<List<Statement>, Expression>> {
   const BlockSerializer();
 
-  List<Statement> readFrom(
+  Tuple2<List<Statement>, Expression> readFrom(
       Iterator<Object> stream, DeserializationState state) {
     if (stream.current is! Iterator) {
       throw StateError("Expected a list, found an atom: '${stream.current}'.");
     }
     Iterator<Object> list = stream.current;
     list.moveNext();
-    List<Statement> result = [];
+    List<Statement> statements = [];
     DeserializationState currentState = state;
     while (list.current != null) {
       currentState = new DeserializationState(
           new DeserializationEnvironment(currentState.environment),
           currentState.nameRoot);
-      result.add(statementSerializer.readFrom(list, currentState));
-      currentState.environment.close();
+      statements.add(statementSerializer.readFrom(list, currentState));
+      currentState.environment.extend();
     }
     stream.moveNext();
-    return result;
+    Expression expression =
+        new Optional(expressionSerializer).readFrom(stream, currentState);
+    return new Tuple2(statements, expression);
   }
 
-  void writeTo(StringBuffer buffer, List<Statement> statements,
+  void writeTo(StringBuffer buffer, Tuple2<List<Statement>, Expression> tuple,
       SerializationState state) {
     buffer.write('(');
     SerializationState currentState = state;
-    for (int i = 0; i < statements.length; ++i) {
+    for (int i = 0; i < tuple.first.length; ++i) {
       if (i != 0) buffer.write(' ');
       currentState = new SerializationState(
           new SerializationEnvironment(currentState.environment));
-      statementSerializer.writeTo(buffer, statements[i], currentState);
-      currentState.environment.close();
+      statementSerializer.writeTo(buffer, tuple.first[i], currentState);
+      currentState.environment.extend();
     }
-    buffer.write(')');
+    buffer.write(') ');
+    new Optional(expressionSerializer)
+        .writeTo(buffer, tuple.second, currentState);
   }
 }
 
@@ -1232,28 +1231,14 @@
 }
 
 TextSerializer<ForStatement> forStatementSerializer = new Wrapped(
-    unwrapForStatement,
-    wrapForStatement,
+    (w) => Tuple2(w.variables, Tuple3(w.condition, w.updates, w.body)),
+    (u) =>
+        ForStatement(u.first, u.second.first, u.second.second, u.second.third),
     new Bind(
         ListSerializer(variableDeclarationSerializer),
-        new Tuple3Serializer(expressionSerializer,
+        new Tuple3Serializer(Optional(expressionSerializer),
             new ListSerializer(expressionSerializer), statementSerializer)));
 
-Tuple2<List<VariableDeclaration>,
-        Tuple3<Expression, List<Expression>, Statement>>
-    unwrapForStatement(ForStatement node) {
-  return new Tuple2(
-      node.variables, new Tuple3(node.condition, node.updates, node.body));
-}
-
-ForStatement wrapForStatement(
-    Tuple2<List<VariableDeclaration>,
-            Tuple3<Expression, List<Expression>, Statement>>
-        tuple) {
-  return new ForStatement(
-      tuple.first, tuple.second.first, tuple.second.second, tuple.second.third);
-}
-
 TextSerializer<ForInStatement> forInStatementSerializer = new Wrapped(
     unwrapForInStatement,
     wrapForInStatement,
@@ -1284,229 +1269,401 @@
       isAsync: true);
 }
 
+TextSerializer<LabeledStatement> labeledStatementSerializer =
+    Wrapped<Tuple2<LabeledStatement, Statement>, LabeledStatement>(
+        (ls) => Tuple2(ls, ls.body),
+        (t) => t.first..body = t.second,
+        Bind(
+            Wrapped(
+                (ls) => Tuple2("L", ls),
+                (t) => t.second,
+                Binder(Wrapped(
+                    (_) => null, (_) => LabeledStatement(null), Nothing()))),
+            statementSerializer));
+
+TextSerializer<BreakStatement> breakSerializer = new Wrapped(
+    unwrapBreakStatement,
+    wrapBreakStatement,
+    const ScopedUse<LabeledStatement>());
+
+LabeledStatement unwrapBreakStatement(BreakStatement node) {
+  return node.target;
+}
+
+BreakStatement wrapBreakStatement(LabeledStatement node) {
+  return new BreakStatement(node);
+}
+
+TextSerializer<TryFinally> tryFinallySerializer = Wrapped(
+    (w) => Tuple2(w.body, w.finalizer),
+    (u) => TryFinally(u.first, u.second),
+    Tuple2Serializer(statementSerializer, statementSerializer));
+
+TextSerializer<TryCatch> tryCatchSerializer = Wrapped(
+    (w) => Tuple2(w.body, w.catches),
+    (u) => TryCatch(u.first, u.second),
+    Tuple2Serializer(statementSerializer, ListSerializer(catchSerializer)));
+
+TextSerializer<Catch> catchSerializer = Wrapped(
+    (w) => Tuple2(w.guard, Tuple2(Tuple2(w.exception, w.stackTrace), w.body)),
+    (u) => Catch(u.second.first.first, u.second.second,
+        stackTrace: u.second.first.second, guard: u.first),
+    Tuple2Serializer(
+        dartTypeSerializer,
+        Bind(
+            Tuple2Serializer(Optional(variableDeclarationSerializer),
+                Optional(variableDeclarationSerializer)),
+            statementSerializer)));
+
+TextSerializer<SwitchStatement> switchStatementSerializer = Wrapped(
+    (w) => Tuple2(w.expression, w.cases),
+    (u) => SwitchStatement(u.first, u.second),
+    Tuple2Serializer(
+        expressionSerializer,
+        Zip(
+            Bind(ListSerializer<SwitchCase>(switchCaseSerializer),
+                ListSerializer(statementSerializer)),
+            (SwitchCase c, Statement b) => c..body = b,
+            (SwitchCase z) => Tuple2(z, z.body))));
+
+class SwitchCaseTagger implements Tagger<SwitchCase> {
+  String tag(SwitchCase node) {
+    return node.isDefault ? "default" : "case";
+  }
+}
+
+TextSerializer<SwitchCase> switchCaseCaseSerializer = Wrapped(
+    (w) => Tuple2("L", w),
+    (u) => u.second,
+    Binder(Wrapped(
+        (w) => w.expressions,
+        (u) => SwitchCase(u, List.filled(u.length, 0), null),
+        ListSerializer(expressionSerializer))));
+
+TextSerializer<SwitchCase> switchCaseDefaultSerializer = Wrapped(
+    (w) => Tuple2("L", w),
+    (u) => u.second,
+    Binder(
+        Wrapped((w) => null, (u) => SwitchCase.defaultCase(null), Nothing())));
+
+TextSerializer<SwitchCase> switchCaseSerializer = Case(SwitchCaseTagger(), {
+  "case": switchCaseCaseSerializer,
+  "default": switchCaseDefaultSerializer,
+});
+
+TextSerializer<ContinueSwitchStatement> continueSwitchStatementSerializer =
+    Wrapped((w) => w.target, (u) => ContinueSwitchStatement(u), ScopedUse());
+
+TextSerializer<FunctionDeclaration> functionDeclarationSerializer = Wrapped(
+    (w) => Tuple2(w.variable, w.function),
+    (u) => FunctionDeclaration(u.first, u.second),
+    Rebind(variableDeclarationSerializer, functionNodeSerializer));
+
 Case<Statement> statementSerializer =
     new Case.uninitialized(const StatementTagger());
 
-class FunctionNodeTagger implements Tagger<FunctionNode> {
-  const FunctionNodeTagger();
+const Map<AsyncMarker, String> asyncMarkerToName = {
+  AsyncMarker.Async: "async",
+  AsyncMarker.Sync: "sync",
+  AsyncMarker.AsyncStar: "async-star",
+  AsyncMarker.SyncStar: "sync-star",
+  AsyncMarker.SyncYielding: "sync-yielding",
+};
 
-  String tag(FunctionNode node) {
-    switch (node.asyncMarker) {
-      case AsyncMarker.Async:
-        return "async";
-      case AsyncMarker.Sync:
-        return "sync";
-      case AsyncMarker.AsyncStar:
-        return "async-star";
-      case AsyncMarker.SyncStar:
-        return "sync-star";
-      case AsyncMarker.SyncYielding:
-        return "sync-yielding";
-    }
-    throw new UnsupportedError("${node.asyncMarker}");
+class AsyncMarkerTagger implements Tagger<AsyncMarker> {
+  const AsyncMarkerTagger();
+
+  String tag(AsyncMarker node) {
+    return asyncMarkerToName[node] ?? (throw new UnsupportedError("${node}"));
   }
 }
 
-TextSerializer<FunctionNode> syncFunctionNodeSerializer = new Wrapped(
-    unwrapFunctionNode,
-    wrapSyncFunctionNode,
-    new Bind(
-        new Rebind(
-            typeParametersSerializer,
-            new Tuple3Serializer(
-                new ListSerializer(variableDeclarationSerializer),
-                new ListSerializer(variableDeclarationSerializer),
-                new ListSerializer(variableDeclarationSerializer))),
-        new Tuple2Serializer(dartTypeSerializer, statementSerializer)));
+TextSerializer<AsyncMarker> asyncMarkerSerializer = Case(
+    AsyncMarkerTagger(),
+    Map.fromIterable(asyncMarkerToName.entries,
+        key: (e) => e.value,
+        value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())));
 
-Tuple2<
-    Tuple2<
-        List<TypeParameter>,
-        Tuple3<List<VariableDeclaration>, List<VariableDeclaration>,
-            List<VariableDeclaration>>>,
-    Tuple2<DartType, Statement>> unwrapFunctionNode(FunctionNode node) {
-  return new Tuple2(
-      new Tuple2(
-          node.typeParameters,
-          new Tuple3(
-              node.positionalParameters.sublist(0, node.requiredParameterCount),
-              node.positionalParameters.sublist(node.requiredParameterCount),
-              node.namedParameters)),
-      new Tuple2(node.returnType, node.body));
+TextSerializer<Tuple2<FunctionNode, List<Initializer>>>
+    functionNodeWithInitializersSerializer = Wrapped(
+        (w) => Tuple2(
+            w.first.asyncMarker,
+            Tuple2(
+                Tuple2(
+                    w.first.typeParameters,
+                    Tuple3(
+                        w.first.positionalParameters
+                            .sublist(0, w.first.requiredParameterCount),
+                        w.first.positionalParameters
+                            .sublist(w.first.requiredParameterCount),
+                        w.first.namedParameters)),
+                Tuple3(w.first.returnType, w.second, w.first.body))),
+        (u) => Tuple2(
+            FunctionNode(u.second.second.third,
+                typeParameters: u.second.first.first,
+                positionalParameters:
+                    u.second.first.second.first + u.second.first.second.second,
+                namedParameters: u.second.first.second.third,
+                requiredParameterCount: u.second.first.second.first.length,
+                returnType: u.second.second.first,
+                asyncMarker: u.first),
+            u.second.second.second),
+        Tuple2Serializer(
+            asyncMarkerSerializer,
+            Bind(
+                Rebind(
+                    typeParametersSerializer,
+                    Tuple3Serializer(
+                        ListSerializer(variableDeclarationSerializer),
+                        ListSerializer(variableDeclarationSerializer),
+                        ListSerializer(variableDeclarationSerializer))),
+                Tuple3Serializer(
+                    dartTypeSerializer,
+                    Optional(ListSerializer(initializerSerializer)),
+                    Optional(statementSerializer)))));
+
+TextSerializer<FunctionNode> functionNodeSerializer = Wrapped(
+    (w) => Tuple2(w, null),
+    (u) => u.first,
+    functionNodeWithInitializersSerializer);
+
+const Map<int, String> procedureFlagToName = const {
+  Procedure.FlagStatic: "static",
+  Procedure.FlagAbstract: "abstract",
+  Procedure.FlagExternal: "external",
+  Procedure.FlagConst: "const",
+  Procedure.FlagForwardingStub: "forwarding-stub",
+  Procedure.FlagForwardingSemiStub: "forwarding-semi-stub",
+  Procedure.FlagRedirectingFactoryConstructor:
+      "redirecting-factory-constructor",
+  Procedure.FlagNoSuchMethodForwarder: "no-such-method-forwarder",
+  Procedure.FlagExtensionMember: "extension-member",
+  Procedure.FlagMemberSignature: "member-signature",
+  Procedure.FlagNonNullableByDefault: "non-nullable-by-default",
+};
+
+class ProcedureFlagTagger implements Tagger<int> {
+  const ProcedureFlagTagger();
+
+  String tag(int flag) {
+    return procedureFlagToName[flag] ??
+        (throw StateError("Unknown Procedure flag value: ${flag}."));
+  }
 }
 
-FunctionNode wrapSyncFunctionNode(
-    Tuple2<
-            Tuple2<
-                List<TypeParameter>,
-                Tuple3<List<VariableDeclaration>, List<VariableDeclaration>,
-                    List<VariableDeclaration>>>,
-            Tuple2<DartType, Statement>>
-        tuple) {
-  return new FunctionNode(tuple.second.second,
-      typeParameters: tuple.first.first,
-      positionalParameters:
-          tuple.first.second.first + tuple.first.second.second,
-      namedParameters: tuple.first.second.third,
-      requiredParameterCount: tuple.first.second.first.length,
-      returnType: tuple.second.first,
-      asyncMarker: AsyncMarker.Sync);
+TextSerializer<int> procedureFlagsSerializer = Wrapped(
+    (w) => List.generate(30, (i) => w & (1 << i)).where((f) => f != 0).toList(),
+    (u) => u.fold(0, (fs, f) => fs |= f),
+    ListSerializer(Case(
+        ProcedureFlagTagger(),
+        Map.fromIterable(procedureFlagToName.entries,
+            key: (e) => e.value,
+            value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())))));
+
+const Map<int, String> fieldFlagToName = const {
+  Field.FlagFinal: "final",
+  Field.FlagConst: "const",
+  Field.FlagStatic: "static",
+  Field.FlagHasImplicitGetter: "has-implicit-getter",
+  Field.FlagHasImplicitSetter: "has-implicit-setter",
+  Field.FlagCovariant: "covariant",
+  Field.FlagGenericCovariantImpl: "generic-covariant-impl",
+  Field.FlagLate: "late",
+  Field.FlagExtensionMember: "extension-member",
+  Field.FlagNonNullableByDefault: "non-nullable-by-default",
+  Field.FlagInternalImplementation: "internal-implementation",
+};
+
+class FieldFlagTagger implements Tagger<int> {
+  const FieldFlagTagger();
+
+  String tag(int flag) {
+    return fieldFlagToName[flag] ??
+        (throw StateError("Unknown Field flag value: ${flag}."));
+  }
 }
 
-TextSerializer<FunctionNode> asyncFunctionNodeSerializer = new Wrapped(
-    unwrapFunctionNode,
-    wrapAsyncFunctionNode,
-    new Bind(
-        new Rebind(
-            typeParametersSerializer,
-            new Tuple3Serializer(
-                new ListSerializer(variableDeclarationSerializer),
-                new ListSerializer(variableDeclarationSerializer),
-                new ListSerializer(variableDeclarationSerializer))),
-        new Tuple2Serializer(dartTypeSerializer, statementSerializer)));
+TextSerializer<int> fieldFlagsSerializer = Wrapped(
+    (w) => List.generate(30, (i) => w & (1 << i)).where((f) => f != 0).toList(),
+    (u) => u.fold(0, (fs, f) => fs |= f),
+    ListSerializer(Case(
+        FieldFlagTagger(),
+        Map.fromIterable(fieldFlagToName.entries,
+            key: (e) => e.value,
+            value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())))));
 
-FunctionNode wrapAsyncFunctionNode(
-    Tuple2<
-            Tuple2<
-                List<TypeParameter>,
-                Tuple3<List<VariableDeclaration>, List<VariableDeclaration>,
-                    List<VariableDeclaration>>>,
-            Tuple2<DartType, Statement>>
-        tuple) {
-  return new FunctionNode(tuple.second.second,
-      typeParameters: tuple.first.first,
-      positionalParameters:
-          tuple.first.second.first + tuple.first.second.second,
-      namedParameters: tuple.first.second.third,
-      requiredParameterCount: tuple.first.second.first.length,
-      returnType: tuple.second.first,
-      asyncMarker: AsyncMarker.Async);
+const Map<int, String> constructorFlagToName = const {
+  Constructor.FlagConst: "const",
+  Constructor.FlagExternal: "external",
+  Constructor.FlagSynthetic: "synthetic",
+  Constructor.FlagNonNullableByDefault: "non-nullable-by-default",
+};
+
+class ConstructorFlagTagger implements Tagger<int> {
+  const ConstructorFlagTagger();
+
+  String tag(int flag) {
+    return constructorFlagToName[flag] ??
+        (throw StateError("Unknown Constructor flag value: ${flag}."));
+  }
 }
 
-TextSerializer<FunctionNode> syncStarFunctionNodeSerializer = new Wrapped(
-    unwrapFunctionNode,
-    wrapSyncStarFunctionNode,
-    new Bind(
-        new Rebind(
-            typeParametersSerializer,
-            new Tuple3Serializer(
-                new ListSerializer(variableDeclarationSerializer),
-                new ListSerializer(variableDeclarationSerializer),
-                new ListSerializer(variableDeclarationSerializer))),
-        new Tuple2Serializer(dartTypeSerializer, statementSerializer)));
+TextSerializer<int> constructorFlagsSerializer = Wrapped(
+    (w) => List.generate(30, (i) => w & (1 << i)).where((f) => f != 0).toList(),
+    (u) => u.fold(0, (fs, f) => fs |= f),
+    ListSerializer(Case(
+        ConstructorFlagTagger(),
+        Map.fromIterable(constructorFlagToName.entries,
+            key: (e) => e.value,
+            value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())))));
 
-FunctionNode wrapSyncStarFunctionNode(
-    Tuple2<
-            Tuple2<
-                List<TypeParameter>,
-                Tuple3<List<VariableDeclaration>, List<VariableDeclaration>,
-                    List<VariableDeclaration>>>,
-            Tuple2<DartType, Statement>>
-        tuple) {
-  return new FunctionNode(tuple.second.second,
-      typeParameters: tuple.first.first,
-      positionalParameters:
-          tuple.first.second.first + tuple.first.second.second,
-      namedParameters: tuple.first.second.third,
-      requiredParameterCount: tuple.first.second.first.length,
-      returnType: tuple.second.first,
-      asyncMarker: AsyncMarker.SyncStar);
+const Map<int, String> redirectingFactoryConstructorFlagToName = const {
+  RedirectingFactoryConstructor.FlagConst: "const",
+  RedirectingFactoryConstructor.FlagExternal: "external",
+  RedirectingFactoryConstructor.FlagNonNullableByDefault:
+      "non-nullable-by-default",
+};
+
+class RedirectingFactoryConstructorFlagTagger implements Tagger<int> {
+  const RedirectingFactoryConstructorFlagTagger();
+
+  String tag(int flag) {
+    return redirectingFactoryConstructorFlagToName[flag] ??
+        (throw StateError(
+            "Unknown RedirectingFactoryConstructor flag value: ${flag}."));
+  }
 }
 
-TextSerializer<FunctionNode> asyncStarFunctionNodeSerializer = new Wrapped(
-    unwrapFunctionNode,
-    wrapAsyncStarFunctionNode,
-    new Bind(
-        new Rebind(
-            typeParametersSerializer,
-            new Tuple3Serializer(
-                new ListSerializer(variableDeclarationSerializer),
-                new ListSerializer(variableDeclarationSerializer),
-                new ListSerializer(variableDeclarationSerializer))),
-        new Tuple2Serializer(dartTypeSerializer, statementSerializer)));
+TextSerializer<int> redirectingFactoryConstructorFlagsSerializer = Wrapped(
+    (w) => List.generate(30, (i) => w & (1 << i)).where((f) => f != 0).toList(),
+    (u) => u.fold(0, (fs, f) => fs |= f),
+    ListSerializer(Case(
+        RedirectingFactoryConstructorFlagTagger(),
+        Map.fromIterable(redirectingFactoryConstructorFlagToName.entries,
+            key: (e) => e.value,
+            value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())))));
 
-FunctionNode wrapAsyncStarFunctionNode(
-    Tuple2<
-            Tuple2<
-                List<TypeParameter>,
-                Tuple3<List<VariableDeclaration>, List<VariableDeclaration>,
-                    List<VariableDeclaration>>>,
-            Tuple2<DartType, Statement>>
-        tuple) {
-  return new FunctionNode(tuple.second.second,
-      typeParameters: tuple.first.first,
-      positionalParameters:
-          tuple.first.second.first + tuple.first.second.second,
-      namedParameters: tuple.first.second.third,
-      requiredParameterCount: tuple.first.second.first.length,
-      returnType: tuple.second.first,
-      asyncMarker: AsyncMarker.AsyncStar);
+class MemberTagger implements Tagger<Member> {
+  const MemberTagger();
+
+  String tag(Member node) {
+    if (node is Field) {
+      return "field";
+    } else if (node is Constructor) {
+      return "constructor";
+    } else if (node is RedirectingFactoryConstructor) {
+      return "redirecting-factory-constructor";
+    } else if (node is Procedure) {
+      switch (node.kind) {
+        case ProcedureKind.Method:
+          return "method";
+        case ProcedureKind.Getter:
+          return "getter";
+        case ProcedureKind.Setter:
+          return "setter";
+        case ProcedureKind.Operator:
+          return "operator";
+        case ProcedureKind.Factory:
+          return "factory";
+        default:
+          throw new UnsupportedError("MemberTagger.tag(${node.kind})");
+      }
+    } else {
+      throw UnimplementedError("MemberTagger.tag(${node.runtimeType})");
+    }
+  }
 }
 
-TextSerializer<FunctionNode> syncYieldingStarFunctionNodeSerializer =
-    new Wrapped(
-        unwrapFunctionNode,
-        wrapSyncYieldingFunctionNode,
-        new Bind(
-            new Rebind(
+TextSerializer<Field> fieldSerializer = Wrapped(
+    (w) => Tuple4(w.name, w.flags, w.type, w.initializer),
+    (u) =>
+        Field(u.first, type: u.third, initializer: u.fourth)..flags = u.second,
+    Tuple4Serializer(nameSerializer, fieldFlagsSerializer, dartTypeSerializer,
+        Optional(expressionSerializer)));
+
+TextSerializer<Procedure> methodSerializer = Wrapped(
+    (w) => Tuple3(w.name, w.flags, w.function),
+    (u) => Procedure(u.first, ProcedureKind.Method, u.third)..flags = u.second,
+    Tuple3Serializer(
+        nameSerializer, procedureFlagsSerializer, functionNodeSerializer));
+
+TextSerializer<Procedure> getterSerializer = Wrapped(
+    (w) => Tuple3(w.name, w.flags, w.function),
+    (u) => Procedure(u.first, ProcedureKind.Getter, u.third)..flags = u.second,
+    Tuple3Serializer(
+        nameSerializer, procedureFlagsSerializer, functionNodeSerializer));
+
+TextSerializer<Procedure> setterSerializer = Wrapped(
+    (w) => Tuple3(w.name, w.flags, w.function),
+    (u) => Procedure(u.first, ProcedureKind.Setter, u.third)..flags = u.second,
+    Tuple3Serializer(
+        nameSerializer, procedureFlagsSerializer, functionNodeSerializer));
+
+TextSerializer<Procedure> operatorSerializer = Wrapped(
+    (w) => Tuple3(w.name, w.flags, w.function),
+    (u) =>
+        Procedure(u.first, ProcedureKind.Operator, u.third)..flags = u.second,
+    Tuple3Serializer(
+        nameSerializer, procedureFlagsSerializer, functionNodeSerializer));
+
+TextSerializer<Procedure> factorySerializer = Wrapped(
+    (w) => Tuple3(w.name, w.flags, w.function),
+    (u) => Procedure(u.first, ProcedureKind.Factory, u.third)..flags = u.second,
+    Tuple3Serializer(
+        nameSerializer, procedureFlagsSerializer, functionNodeSerializer));
+
+TextSerializer<Constructor> constructorSerializer = Wrapped(
+    (w) => Tuple3(w.name, w.flags, Tuple2(w.function, w.initializers)),
+    (u) =>
+        Constructor(u.third.first, name: u.first, initializers: u.third.second)
+          ..flags = u.second,
+    Tuple3Serializer(nameSerializer, constructorFlagsSerializer,
+        functionNodeWithInitializersSerializer));
+
+TextSerializer<RedirectingFactoryConstructor>
+    redirectingFactoryConstructorSerializer = Wrapped(
+        (w) => Tuple4(
+            w.name,
+            w.flags,
+            w.targetReference.canonicalName,
+            Tuple2(
+                w.typeParameters,
+                Tuple4(
+                    w.positionalParameters
+                        .take(w.requiredParameterCount)
+                        .toList(),
+                    w.positionalParameters
+                        .skip(w.requiredParameterCount)
+                        .toList(),
+                    w.namedParameters,
+                    w.typeArguments))),
+        (u) => RedirectingFactoryConstructor(u.third,
+            name: u.first,
+            typeParameters: u.fourth.first,
+            positionalParameters:
+                u.fourth.second.first + u.fourth.second.second,
+            requiredParameterCount: u.fourth.second.first.length,
+            namedParameters: u.fourth.second.third,
+            typeArguments: u.fourth.second.fourth)
+          ..flags = u.second,
+        Tuple4Serializer(
+            nameSerializer,
+            redirectingFactoryConstructorFlagsSerializer,
+            CanonicalNameSerializer(),
+            Bind(
                 typeParametersSerializer,
-                new Tuple3Serializer(
-                    new ListSerializer(variableDeclarationSerializer),
-                    new ListSerializer(variableDeclarationSerializer),
-                    new ListSerializer(variableDeclarationSerializer))),
-            new Tuple2Serializer(dartTypeSerializer, statementSerializer)));
+                Tuple4Serializer(
+                    ListSerializer(variableDeclarationSerializer),
+                    ListSerializer(variableDeclarationSerializer),
+                    ListSerializer(variableDeclarationSerializer),
+                    ListSerializer(dartTypeSerializer)))));
 
-FunctionNode wrapSyncYieldingFunctionNode(
-    Tuple2<
-            Tuple2<
-                List<TypeParameter>,
-                Tuple3<List<VariableDeclaration>, List<VariableDeclaration>,
-                    List<VariableDeclaration>>>,
-            Tuple2<DartType, Statement>>
-        tuple) {
-  return new FunctionNode(tuple.second.second,
-      typeParameters: tuple.first.first,
-      positionalParameters:
-          tuple.first.second.first + tuple.first.second.second,
-      namedParameters: tuple.first.second.third,
-      requiredParameterCount: tuple.first.second.first.length,
-      returnType: tuple.second.first,
-      asyncMarker: AsyncMarker.SyncYielding);
-}
+Case<Member> memberSerializer = new Case.uninitialized(const MemberTagger());
 
-Case<FunctionNode> functionNodeSerializer =
-    new Case.uninitialized(const FunctionNodeTagger());
-
-class ProcedureTagger implements Tagger<Procedure> {
-  const ProcedureTagger();
-
-  String tag(Procedure node) {
-    String prefix = node.isStatic ? "static-" : "";
-    switch (node.kind) {
-      case ProcedureKind.Method:
-        return "${prefix}method";
-      default:
-        throw new UnsupportedError("${node.kind}");
-    }
-  }
-}
-
-TextSerializer<Procedure> staticMethodSerializer = new Wrapped(
-    unwrapStaticMethod,
-    wrapStaticMethod,
-    new Tuple2Serializer(nameSerializer, functionNodeSerializer));
-
-Tuple2<Name, FunctionNode> unwrapStaticMethod(Procedure procedure) {
-  return new Tuple2(procedure.name, procedure.function);
-}
-
-Procedure wrapStaticMethod(Tuple2<Name, FunctionNode> tuple) {
-  return new Procedure(tuple.first, ProcedureKind.Method, tuple.second,
-      isStatic: true);
-}
-
-Case<Procedure> procedureSerializer =
-    new Case.uninitialized(const ProcedureTagger());
+TextSerializer<LibraryPart> libraryPartSerializer = Wrapped(
+    (w) => Tuple2(w.partUri, w.annotations),
+    (u) => LibraryPart(u.second, u.first),
+    Tuple2Serializer(DartString(), ListSerializer(expressionSerializer)));
 
 class LibraryTagger implements Tagger<Library> {
   const LibraryTagger();
@@ -1516,22 +1673,390 @@
   }
 }
 
-TextSerializer<Library> libraryContentsSerializer = new Wrapped(
-  unwrapLibraryNode,
-  wrapLibraryNode,
-  new Tuple2Serializer(
-      const UriSerializer(), new ListSerializer(procedureSerializer)),
+const Map<int, String> libraryFlagToName = const {
+  Library.SyntheticFlag: "synthetic",
+  Library.NonNullableByDefaultFlag: "nnbd",
+  Library.NonNullableByDefaultModeBit1Weak: "nnbd-weak",
+  Library.NonNullableByDefaultModeBit2Strong: "nnbd-strong",
+};
+
+class LibraryFlagTagger implements Tagger<int> {
+  const LibraryFlagTagger();
+
+  String tag(int flag) {
+    return libraryFlagToName[flag] ??
+        (throw StateError("Unknown Library flag value: ${flag}."));
+  }
+}
+
+TextSerializer<int> libraryFlagsSerializer = Wrapped(
+    (w) => List.generate(30, (i) => w & (1 << i)).where((f) => f != 0).toList(),
+    (u) => u.fold(0, (fs, f) => fs |= f),
+    ListSerializer(Case(
+        LibraryFlagTagger(),
+        Map.fromIterable(libraryFlagToName.entries,
+            key: (e) => e.value,
+            value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())))));
+
+TextSerializer<Library> librarySerializer = new Wrapped(
+  (w) => Tuple7(w.importUri, w.flags, w.parts, [...w.fields, ...w.procedures],
+      w.classes, w.typedefs, w.extensions),
+  (u) => Library(u.first,
+      parts: u.third,
+      fields: u.fourth.where((m) => m is Field).cast<Field>().toList(),
+      procedures:
+          u.fourth.where((m) => m is Procedure).cast<Procedure>().toList(),
+      classes: u.fifth,
+      typedefs: u.sixth,
+      extensions: u.seventh)
+    ..flags = u.second,
+  Tuple7Serializer(
+      UriSerializer(),
+      libraryFlagsSerializer,
+      ListSerializer(libraryPartSerializer),
+      ListSerializer(memberSerializer),
+      ListSerializer(classSerializer),
+      ListSerializer(typedefSerializer),
+      ListSerializer(extensionSerializer)),
 );
 
-Tuple2<Uri, List<Procedure>> unwrapLibraryNode(Library library) {
-  return new Tuple2(library.importUri, library.procedures);
+TextSerializer<Component> componentSerializer = Wrapped(
+    (w) => w.libraries,
+    (u) => Component(nameRoot: CanonicalName.root(), libraries: u),
+    ListSerializer(librarySerializer));
+
+class ShowHideTagger implements Tagger<Combinator> {
+  String tag(Combinator node) => node.isShow ? "show" : "hide";
 }
 
-Library wrapLibraryNode(Tuple2<Uri, List<Procedure>> tuple) {
-  return new Library(tuple.first, procedures: tuple.second);
+TextSerializer<Combinator> showSerializer = Wrapped(
+    (c) => c.names, (ns) => Combinator(true, ns), ListSerializer(DartString()));
+
+TextSerializer<Combinator> hideSerializer = Wrapped((c) => c.names,
+    (ns) => Combinator(false, ns), ListSerializer(DartString()));
+
+Case<Combinator> showHideSerializer = new Case(ShowHideTagger(), {
+  "show": showSerializer,
+  "hide": hideSerializer,
+});
+
+TextSerializer<LibraryDependency> libraryDependencySerializer = Wrapped(
+    (ld) => Tuple5(ld.importedLibraryReference.canonicalName, ld.name,
+        ld.combinators, ld.flags, ld.annotations),
+    (t) => LibraryDependency.byReference(
+        t.fourth, t.fifth, t.first.getReference(), t.second, t.third),
+    Tuple5Serializer(
+        CanonicalNameSerializer(),
+        Optional(DartString()),
+        ListSerializer(showHideSerializer),
+        DartInt(),
+        ListSerializer(expressionSerializer)));
+
+class ConstantTagger extends ConstantVisitor<String>
+    implements Tagger<Constant> {
+  const ConstantTagger();
+
+  String tag(Constant node) => node.accept(this);
+
+  String visitBoolConstant(BoolConstant node) => "const-bool";
+  String visitDoubleConstant(DoubleConstant node) => "const-double";
+  String visitInstanceConstant(InstanceConstant node) => "const-object";
+  String visitIntConstant(IntConstant node) => "const-int";
+  String visitListConstant(ListConstant node) => "const-list";
+  String visitMapConstant(MapConstant node) => "const-map";
+  String visitNullConstant(NullConstant node) => "const-null";
+  String visitPartialInstantiationConstant(PartialInstantiationConstant node) =>
+      "const-apply";
+  String visitSetConstant(SetConstant node) => "const-set";
+  String visitStringConstant(StringConstant node) => "const-string";
+  String visitSymbolConstant(SymbolConstant node) => "const-symbol";
+  String visitTearOffConstant(TearOffConstant node) => "const-tearoff";
+  String visitTypeLiteralConstant(TypeLiteralConstant node) => "const-type";
+  String visitUnevaluatedConstant(UnevaluatedConstant node) => "const-expr";
 }
 
-Case<Library> librarySerializer = new Case.uninitialized(const LibraryTagger());
+TextSerializer<BoolConstant> boolConstantSerializer =
+    Wrapped((w) => w.value, (u) => BoolConstant(u), DartBool());
+
+TextSerializer<DoubleConstant> doubleConstantSerializer =
+    Wrapped((w) => w.value, (u) => DoubleConstant(u), DartDouble());
+
+TextSerializer<IntConstant> intConstantSerializer =
+    Wrapped((w) => w.value, (u) => IntConstant(u), DartInt());
+
+TextSerializer<ListConstant> listConstantSerializer = Wrapped(
+    (w) => Tuple2(w.typeArgument, w.entries),
+    (u) => ListConstant(u.first, u.second),
+    Tuple2Serializer(dartTypeSerializer, ListSerializer(constantSerializer)));
+
+TextSerializer<MapConstant> mapConstantSerializer = Wrapped(
+    (w) => Tuple3(w.keyType, w.valueType, w.entries),
+    (u) => MapConstant(u.first, u.second, u.third),
+    Tuple3Serializer(
+        dartTypeSerializer,
+        dartTypeSerializer,
+        Zip(
+            Tuple2Serializer(ListSerializer(constantSerializer),
+                ListSerializer(constantSerializer)),
+            (k, v) => ConstantMapEntry(k, v),
+            (z) => Tuple2(z.key, z.value))));
+
+TextSerializer<NullConstant> nullConstantSerializer =
+    Wrapped((w) => null, (u) => NullConstant(), Nothing());
+
+TextSerializer<PartialInstantiationConstant>
+    partialInstantiationConstantSerializer = Wrapped(
+        (w) => Tuple2(w.tearOffConstant, w.types),
+        (u) => PartialInstantiationConstant(u.first, u.second),
+        Tuple2Serializer(
+            tearOffConstantSerializer, ListSerializer(dartTypeSerializer)));
+
+TextSerializer<SetConstant> setConstantSerializer = Wrapped(
+    (w) => Tuple2(w.typeArgument, w.entries),
+    (u) => SetConstant(u.first, u.second),
+    Tuple2Serializer(dartTypeSerializer, ListSerializer(constantSerializer)));
+
+TextSerializer<StringConstant> stringConstantSerializer =
+    Wrapped((w) => w.value, (u) => StringConstant(u), DartString());
+
+TextSerializer<SymbolConstant> symbolConstantSerializer = Wrapped(
+    (w) => Tuple2(w.name, w.libraryReference?.canonicalName),
+    (u) => SymbolConstant(u.first, u.second?.getReference()),
+    Tuple2Serializer(DartString(), Optional(CanonicalNameSerializer())));
+
+TextSerializer<TearOffConstant> tearOffConstantSerializer = Wrapped(
+    (w) => w.procedureReference.canonicalName,
+    (u) => TearOffConstant.byReference(u.getReference()),
+    CanonicalNameSerializer());
+
+TextSerializer<TypeLiteralConstant> typeLiteralConstantSerializer =
+    Wrapped((w) => w.type, (u) => TypeLiteralConstant(u), dartTypeSerializer);
+
+TextSerializer<UnevaluatedConstant> unevaluatedConstantSerializer = Wrapped(
+    (w) => w.expression, (u) => UnevaluatedConstant(u), expressionSerializer);
+
+TextSerializer<InstanceConstant> instanceConstantSerializer =
+    Wrapped<
+            Tuple4<CanonicalName, List<DartType>, List<CanonicalName>,
+                List<Constant>>,
+            InstanceConstant>(
+        (w) => Tuple4(
+            w.classReference.canonicalName,
+            w.typeArguments,
+            w.fieldValues.keys.map((r) => r.canonicalName).toList(),
+            w.fieldValues.values.toList()),
+        (u) => InstanceConstant(u.first.getReference(), u.second,
+            Map.fromIterables(u.third.map((c) => c.getReference()), u.fourth)),
+        Tuple4Serializer(
+            CanonicalNameSerializer(),
+            ListSerializer(dartTypeSerializer),
+            ListSerializer(CanonicalNameSerializer()),
+            ListSerializer(constantSerializer)));
+
+Case<Constant> constantSerializer = Case.uninitialized(ConstantTagger());
+
+class InitializerTagger implements Tagger<Initializer> {
+  const InitializerTagger();
+
+  String tag(Initializer node) {
+    if (node is AssertInitializer) {
+      return "assert";
+    } else if (node is FieldInitializer) {
+      return "field";
+    } else if (node is InvalidInitializer) {
+      return "invalid";
+    } else if (node is LocalInitializer) {
+      return "local";
+    } else if (node is RedirectingInitializer) {
+      return "redirecting";
+    } else if (node is SuperInitializer) {
+      return "super";
+    } else {
+      throw UnimplementedError("InitializerTagger.tag(${node.runtimeType}).");
+    }
+  }
+}
+
+TextSerializer<AssertInitializer> assertInitializerSerializer = Wrapped(
+    (w) => w.statement, (u) => AssertInitializer(u), statementSerializer);
+
+TextSerializer<FieldInitializer> fieldInitializerSerializer = Wrapped(
+    (w) => Tuple2(w.fieldReference.canonicalName, w.value),
+    (u) => FieldInitializer.byReference(u.first.getReference(), u.second),
+    Tuple2Serializer(CanonicalNameSerializer(), expressionSerializer));
+
+TextSerializer<InvalidInitializer> invalidInitializerSerializer =
+    Wrapped((_) => null, (_) => InvalidInitializer(), Nothing());
+
+TextSerializer<LocalInitializer> localInitializerSerializer = Wrapped(
+    (w) => w.variable,
+    (u) => LocalInitializer(u),
+    variableDeclarationSerializer);
+
+TextSerializer<RedirectingInitializer> redirectingInitializerSerializer =
+    Wrapped(
+        (w) => Tuple2(w.targetReference.canonicalName, w.arguments),
+        (u) => RedirectingInitializer.byReference(
+            u.first.getReference(), u.second),
+        Tuple2Serializer(CanonicalNameSerializer(), argumentsSerializer));
+
+TextSerializer<SuperInitializer> superInitializerSerializer = Wrapped(
+    (w) => Tuple2(w.targetReference.canonicalName, w.arguments),
+    (u) => SuperInitializer.byReference(u.first.getReference(), u.second),
+    Tuple2Serializer(CanonicalNameSerializer(), argumentsSerializer));
+
+Case<Initializer> initializerSerializer =
+    Case.uninitialized(InitializerTagger());
+
+TextSerializer<Supertype> supertypeSerializer = Wrapped(
+    (w) => Tuple2(w.className.canonicalName, w.typeArguments),
+    (u) => Supertype.byReference(u.first.getReference(), u.second),
+    Tuple2Serializer(
+        CanonicalNameSerializer(), ListSerializer(dartTypeSerializer)));
+
+const Map<int, String> classFlagToName = const {
+  Class.FlagAbstract: "abstract",
+  Class.FlagEnum: "enum",
+  Class.FlagAnonymousMixin: "anonymous-mixin",
+  Class.FlagEliminatedMixin: "eliminated-mixin",
+  Class.FlagMixinDeclaration: "mixin-declaration",
+  Class.FlagHasConstConstructor: "has-const-constructor",
+};
+
+class ClassFlagTagger implements Tagger<int> {
+  const ClassFlagTagger();
+
+  String tag(int flag) {
+    return classFlagToName[flag] ??
+        (throw StateError("Unknown Class flag value: ${flag}."));
+  }
+}
+
+TextSerializer<int> classFlagsSerializer = Wrapped(
+    (w) => List.generate(30, (i) => w & (1 << i)).where((f) => f != 0).toList(),
+    (u) => u.fold(0, (fs, f) => fs |= f),
+    ListSerializer(Case(
+        ClassFlagTagger(),
+        Map.fromIterable(classFlagToName.entries,
+            key: (e) => e.value,
+            value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())))));
+
+TextSerializer<Class> classSerializer = Wrapped(
+    (w) => Tuple3(
+        w.name,
+        w.flags,
+        Tuple2(
+            w.typeParameters,
+            Tuple4(w.supertype, w.mixedInType, w.implementedTypes,
+                <Member>[...w.fields, ...w.constructors, ...w.procedures]))),
+    (u) => Class(
+        name: u.first,
+        typeParameters: u.third.first,
+        supertype: u.third.second.first,
+        mixedInType: u.third.second.second,
+        implementedTypes: u.third.second.third,
+        fields: u.third.second.fourth
+            .where((m) => m is Field)
+            .cast<Field>()
+            .toList(),
+        constructors: u.third.second.fourth
+            .where((m) => m is Constructor)
+            .cast<Constructor>()
+            .toList(),
+        procedures: u.third.second.fourth
+            .where((m) => m is Procedure)
+            .cast<Procedure>()
+            .toList())
+      ..flags = u.second,
+    Tuple3Serializer(
+        DartString(),
+        classFlagsSerializer,
+        Bind(
+            typeParametersSerializer,
+            Tuple4Serializer(
+                Optional(supertypeSerializer),
+                Optional(supertypeSerializer),
+                ListSerializer(supertypeSerializer),
+                ListSerializer(memberSerializer)))));
+
+TextSerializer<Typedef> typedefSerializer = Wrapped(
+    (w) => Tuple2(w.name, Tuple2(w.typeParameters, w.type)),
+    (u) => Typedef(u.first, u.second.second, typeParameters: u.second.first),
+    Tuple2Serializer(
+        DartString(), Bind(typeParametersSerializer, dartTypeSerializer)));
+
+const Map<int, String> extensionMemberDescriptorFlagToName = const {
+  ExtensionMemberDescriptor.FlagStatic: "static",
+};
+
+class ExtensionMemberDescriptorFlagTagger implements Tagger<int> {
+  const ExtensionMemberDescriptorFlagTagger();
+
+  String tag(int flag) {
+    return extensionMemberDescriptorFlagToName[flag] ??
+        (throw StateError(
+            "Unknown ExtensionMemberDescriptor flag value: ${flag}."));
+  }
+}
+
+TextSerializer<int> extensionMemberDescriptorFlagsSerializer = Wrapped(
+    (w) => List.generate(30, (i) => w & (1 << i)).where((f) => f != 0).toList(),
+    (u) => u.fold(0, (fs, f) => fs |= f),
+    ListSerializer(Case(
+        ExtensionMemberDescriptorFlagTagger(),
+        Map.fromIterable(extensionMemberDescriptorFlagToName.entries,
+            key: (e) => e.value,
+            value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())))));
+
+const Map<ExtensionMemberKind, String> extensionMemberKindToName = const {
+  ExtensionMemberKind.Field: "field",
+  ExtensionMemberKind.Method: "method",
+  ExtensionMemberKind.Getter: "getter",
+  ExtensionMemberKind.Setter: "setter",
+  ExtensionMemberKind.Operator: "operator",
+  ExtensionMemberKind.TearOff: "tearOff",
+};
+
+class ExtensionMemberKindTagger implements Tagger<ExtensionMemberKind> {
+  const ExtensionMemberKindTagger();
+
+  String tag(ExtensionMemberKind kind) {
+    return extensionMemberKindToName[kind] ??
+        (throw StateError("Unknown ExtensionMemberKind flag value: ${kind}."));
+  }
+}
+
+TextSerializer<ExtensionMemberKind> extensionMemberKindSerializer = Case(
+    ExtensionMemberKindTagger(),
+    Map.fromIterable(extensionMemberKindToName.entries,
+        key: (e) => e.value,
+        value: (e) => Wrapped((_) => null, (_) => e.key, Nothing())));
+
+TextSerializer<ExtensionMemberDescriptor> extensionMemberDescriptorSerializer =
+    Wrapped(
+        (w) => Tuple4(w.name, w.kind, w.flags, w.member.canonicalName),
+        (u) => ExtensionMemberDescriptor()
+          ..name = u.first
+          ..kind = u.second
+          ..flags = u.third
+          ..member = u.fourth.getReference(),
+        Tuple4Serializer(
+            nameSerializer,
+            extensionMemberKindSerializer,
+            extensionMemberDescriptorFlagsSerializer,
+            CanonicalNameSerializer()));
+
+TextSerializer<Extension> extensionSerializer = Wrapped(
+    (w) => Tuple3(w.name, Tuple2(w.typeParameters, w.onType), w.members),
+    (u) => Extension(
+        name: u.first,
+        typeParameters: u.second.first,
+        onType: u.second.second,
+        members: u.third),
+    Tuple3Serializer(
+        DartString(),
+        Bind(typeParametersSerializer, dartTypeSerializer),
+        ListSerializer(extensionMemberDescriptorSerializer)));
 
 void initializeSerializers() {
   expressionSerializer.registerTags({
@@ -1579,6 +2104,17 @@
     "invoke-constructor": constructorInvocationSerializer,
     "invoke-const-constructor": constConstructorInvocationSerializer,
     "fun": functionExpressionSerializer,
+    "lists": listConcatenationSerializer,
+    "sets": setConcatenationSerializer,
+    "maps": mapConcatenationSerializer,
+    "let-block": blockExpressionSerializer,
+    "apply": instantiationSerializer,
+    "not-null": nullCheckSerializer,
+    "with-uri": fileUriExpressionSerializer,
+    "is-loaded": checkLibraryIsLoadedSerializer,
+    "load": loadLibrarySerializer,
+    "const": constantExpressionSerializer,
+    "object": instanceCreationSerializer,
   });
   dartTypeSerializer.registerTags({
     "invalid": invalidTypeSerializer,
@@ -1609,17 +2145,46 @@
     "await-for-in": awaitForInStatementSerializer,
     "assert": assertStatementSerializer,
     "assert-block": assertBlockSerializer,
+    "label": labeledStatementSerializer,
+    "break": breakSerializer,
+    "try-finally": tryFinallySerializer,
+    "try-catch": tryCatchSerializer,
+    "switch": switchStatementSerializer,
+    "continue": continueSwitchStatementSerializer,
+    "local-fun": functionDeclarationSerializer,
   });
-  functionNodeSerializer.registerTags({
-    "sync": syncFunctionNodeSerializer,
-    "async": asyncFunctionNodeSerializer,
-    "sync-star": syncStarFunctionNodeSerializer,
-    "async-star": asyncStarFunctionNodeSerializer,
-    "sync-yielding": syncYieldingStarFunctionNodeSerializer,
+  memberSerializer.registerTags({
+    "field": fieldSerializer,
+    "method": methodSerializer,
+    "getter": getterSerializer,
+    "setter": setterSerializer,
+    "operator": operatorSerializer,
+    "factory": factorySerializer,
+    "constructor": constructorSerializer,
+    "redirecting-factory-constructor": redirectingFactoryConstructorSerializer,
   });
-  procedureSerializer.registerTags({"static-method": staticMethodSerializer});
-  librarySerializer.registerTags({
-    "legacy": libraryContentsSerializer,
-    "null-safe": libraryContentsSerializer,
+  constantSerializer.registerTags({
+    "const-bool": boolConstantSerializer,
+    "const-double": doubleConstantSerializer,
+    "const-int": intConstantSerializer,
+    "const-list": listConstantSerializer,
+    "const-map": mapConstantSerializer,
+    "const-null": nullConstantSerializer,
+    "const-apply": partialInstantiationConstantSerializer,
+    "const-set": setConstantSerializer,
+    "const-string": stringConstantSerializer,
+    "const-symbol": symbolConstantSerializer,
+    "const-tearoff": tearOffConstantSerializer,
+    "const-type": typeLiteralConstantSerializer,
+    "const-expr": unevaluatedConstantSerializer,
+    "const-object": instanceConstantSerializer,
+  });
+  initializerSerializer.registerTags({
+    "assert": assertInitializerSerializer,
+    "field": fieldInitializerSerializer,
+    "invalid": invalidInitializerSerializer,
+    "local": localInitializerSerializer,
+    "redirecting": redirectingInitializerSerializer,
+    "super": superInitializerSerializer,
   });
 }
diff --git a/pkg/kernel/lib/transformations/mixin_full_resolution.dart b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
index 15e0289..314803a 100644
--- a/pkg/kernel/lib/transformations/mixin_full_resolution.dart
+++ b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
@@ -325,7 +325,7 @@
         hierarchy.getDispatchTarget(lookupClass, new Name("noSuchMethod"));
     String methodNameUsed = (isGetter)
         ? "get:$methodName"
-        : (isSetter) ? "set:$methodName" : methodName;
+        : (isSetter) ? "set:$methodName=" : methodName;
     if (noSuchMethod != null &&
         noSuchMethod.function.positionalParameters.length == 1 &&
         noSuchMethod.function.namedParameters.isEmpty) {
diff --git a/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart b/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
index a9e3e13..ec8c8c8 100644
--- a/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
+++ b/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
@@ -11,7 +11,7 @@
 
 // Parameter name used to track were widget constructor calls were made from.
 //
-// The parameter name contains a randomly generate hex string to avoid collision
+// The parameter name contains a randomly generated hex string to avoid collision
 // with user generated parameters.
 const String _creationLocationParameterName =
     r'$creationLocationd_0dea112b090073317d4';
@@ -368,8 +368,8 @@
       _hasCreationLocationClass.enclosingLibrary,
     );
     final Field locationField = new Field(fieldName,
-        type: new InterfaceType(
-            _locationClass, clazz.enclosingLibrary.nonNullable),
+        type:
+            new InterfaceType(_locationClass, clazz.enclosingLibrary.nullable),
         isFinal: true,
         reference: clazz.reference.canonicalName
             ?.getChildFromFieldWithName(fieldName)
@@ -389,8 +389,8 @@
       ));
       final VariableDeclaration variable = new VariableDeclaration(
         _creationLocationParameterName,
-        type: new InterfaceType(
-            _locationClass, clazz.enclosingLibrary.nonNullable),
+        type:
+            new InterfaceType(_locationClass, clazz.enclosingLibrary.nullable),
       );
       if (!_maybeAddNamedParameter(constructor.function, variable)) {
         return;
@@ -418,7 +418,11 @@
       if (!hasRedirectingInitializer) {
         constructor.initializers.add(new FieldInitializer(
           locationField,
-          new VariableGet(variable),
+          clazz.enclosingLibrary.isNonNullableByDefault
+              // The parameter is nullable so that it can be optional but the
+              // field is non-nullable so we check it here.
+              ? new NullCheck(new VariableGet(variable))
+              : new VariableGet(variable),
         ));
         // TODO(jacobr): add an assert verifying the locationField is not
         // null. Currently, we cannot safely add this assert because we do not
@@ -535,8 +539,7 @@
           procedure.function,
           new VariableDeclaration(_creationLocationParameterName,
               type: new InterfaceType(
-                  _locationClass, clazz.enclosingLibrary.nonNullable),
-              isRequired: clazz.enclosingLibrary.isNonNullableByDefault),
+                  _locationClass, clazz.enclosingLibrary.nullable)),
         );
       }
     }
@@ -559,8 +562,7 @@
       final VariableDeclaration variable = new VariableDeclaration(
           _creationLocationParameterName,
           type: new InterfaceType(
-              _locationClass, clazz.enclosingLibrary.nonNullable),
-          isRequired: clazz.enclosingLibrary.isNonNullableByDefault);
+              _locationClass, clazz.enclosingLibrary.nullable));
       if (_hasNamedParameter(
           constructor.function, _creationLocationParameterName)) {
         // Constructor was already rewritten. TODO(jacobr): is this case actually hit?
diff --git a/pkg/kernel/lib/transformations/value_class.dart b/pkg/kernel/lib/transformations/value_class.dart
new file mode 100644
index 0000000..cc0577e
--- /dev/null
+++ b/pkg/kernel/lib/transformations/value_class.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.
+
+library kernel.transformations.value_class;
+
+import '../ast.dart';
+import '../kernel.dart';
+import '../visitor.dart';
+
+Component transformComponent(Component component) {
+  new ValueClassTransformer().visitComponent(component);
+  return component;
+}
+
+class ValueClassTransformer extends Transformer {}
diff --git a/pkg/kernel/lib/type_algebra.dart b/pkg/kernel/lib/type_algebra.dart
index 662ebfd..4661aeb 100644
--- a/pkg/kernel/lib/type_algebra.dart
+++ b/pkg/kernel/lib/type_algebra.dart
@@ -4,6 +4,7 @@
 library kernel.type_algebra;
 
 import 'ast.dart';
+import 'core_types.dart';
 
 /// Returns a type where all occurrences of the given type parameters have been
 /// replaced with the corresponding types.
@@ -1021,3 +1022,77 @@
   @override
   bool visitVoidType(VoidType node) => true;
 }
+
+/// Removes the application of ? or * from the type.
+///
+/// Some types are nullable even without the application of the nullable type
+/// constructor at the top level, for example, Null or FutureOr<int?>.
+// TODO(dmitryas): Remove [coreTypes] parameter when NullType is landed.
+DartType unwrapNullabilityConstructor(DartType type, CoreTypes coreTypes) {
+  return type.accept1(const _NullabilityConstructorUnwrapper(), coreTypes);
+}
+
+/// Implementation of [unwrapNullabilityConstructor] as a visitor.
+///
+/// Implementing the function as a visitor makes the necessity of supporting a new implementation of [DartType] visible at compile time.
+// TODO(dmitryas): Remove CoreTypes as the second argument when NullType is landed.
+class _NullabilityConstructorUnwrapper
+    implements DartTypeVisitor1<DartType, CoreTypes> {
+  const _NullabilityConstructorUnwrapper();
+
+  @override
+  DartType defaultDartType(DartType node, CoreTypes coreTypes) {
+    throw new UnsupportedError(
+        "Unsupported operation: _NullabilityConstructorUnwrapper(${node.runtimeType})");
+  }
+
+  @override
+  DartType visitBottomType(BottomType node, CoreTypes coreTypes) => node;
+
+  @override
+  DartType visitDynamicType(DynamicType node, CoreTypes coreTypes) => node;
+
+  @override
+  DartType visitFunctionType(FunctionType node, CoreTypes coreTypes) {
+    return node.withDeclaredNullability(Nullability.nonNullable);
+  }
+
+  @override
+  DartType visitFutureOrType(FutureOrType node, CoreTypes coreTypes) {
+    return node.withDeclaredNullability(Nullability.nonNullable);
+  }
+
+  @override
+  DartType visitInterfaceType(InterfaceType node, CoreTypes coreTypes) {
+    return node == coreTypes.nullType
+        ? node
+        : node.withDeclaredNullability(Nullability.nonNullable);
+  }
+
+  @override
+  DartType visitInvalidType(InvalidType node, CoreTypes coreTypes) => node;
+
+  @override
+  DartType visitNeverType(NeverType node, CoreTypes coreTypes) {
+    return node.withDeclaredNullability(Nullability.nonNullable);
+  }
+
+  @override
+  DartType visitTypeParameterType(TypeParameterType node, CoreTypes coreTypes) {
+    if (node.promotedBound != null) {
+      // Intersection types don't have their own nullabilities.
+      return node;
+    } else {
+      return node.withDeclaredNullability(
+          TypeParameterType.computeNullabilityFromBound(node.parameter));
+    }
+  }
+
+  @override
+  DartType visitTypedefType(TypedefType node, CoreTypes coreTypes) {
+    return node.withDeclaredNullability(Nullability.nonNullable);
+  }
+
+  @override
+  DartType visitVoidType(VoidType node, CoreTypes coreTypes) => node;
+}
diff --git a/pkg/kernel/lib/type_checker.dart b/pkg/kernel/lib/type_checker.dart
index d5a0a2e..5db606b 100644
--- a/pkg/kernel/lib/type_checker.dart
+++ b/pkg/kernel/lib/type_checker.dart
@@ -249,7 +249,7 @@
     while (type is TypeParameterType) {
       type = (type as TypeParameterType).bound;
     }
-    if (type is BottomType) {
+    if (type is BottomType || type is NeverType || type == coreTypes.nullType) {
       // The bottom type is a subtype of all types, so it should be allowed.
       return Substitution.bottomForClass(superclass);
     }
@@ -632,11 +632,12 @@
       checkUnresolvedInvocation(receiver, node);
       return handleDynamicCall(receiver, node.arguments);
     } else if (target is Procedure &&
-        environment.isOverloadedArithmeticOperator(target)) {
+        environment.isSpecialCasedBinaryOperator(target)) {
       assert(node.arguments.positional.length == 1);
       var receiver = visitExpression(node.receiver);
       var argument = visitExpression(node.arguments.positional[0]);
-      return environment.getTypeOfOverloadedArithmetic(receiver, argument);
+      return environment.getTypeOfSpecialCasedBinaryOperator(
+          receiver, argument);
     } else {
       return handleCall(node.arguments, target.getterType,
           receiver: getReceiverType(node, node.receiver, node.interfaceTarget));
diff --git a/pkg/kernel/lib/type_environment.dart b/pkg/kernel/lib/type_environment.dart
index 14bb59d..04d02a6 100644
--- a/pkg/kernel/lib/type_environment.dart
+++ b/pkg/kernel/lib/type_environment.dart
@@ -165,49 +165,146 @@
     }
   }
 
-  /// True if [member] is a binary operator that returns an `int` if both
-  /// operands are `int`, and otherwise returns `double`.
-  ///
-  /// This is a case of type-based overloading, which in Dart is only supported
-  /// by giving special treatment to certain arithmetic operators.
-  bool isOverloadedArithmeticOperator(Procedure member) {
-    Class class_ = member.enclosingClass;
-    if (class_ == coreTypes.intClass || class_ == coreTypes.numClass) {
-      String name = member.name.name;
-      return name == '+' ||
-          name == '-' ||
-          name == '*' ||
-          name == 'remainder' ||
-          name == '%';
+  /// True if [member] is a binary operator whose return type is defined by
+  /// the both operand types.
+  bool isSpecialCasedBinaryOperator(Procedure member,
+      {bool isNonNullableByDefault: false}) {
+    if (isNonNullableByDefault) {
+      Class class_ = member.enclosingClass;
+      // TODO(johnniwinther): Do we need to recognize backend implementation
+      //  methods?
+      if (class_ == coreTypes.intClass ||
+          class_ == coreTypes.numClass ||
+          class_ == coreTypes.doubleClass) {
+        String name = member.name.name;
+        return name == '+' ||
+            name == '-' ||
+            name == '*' ||
+            name == 'remainder' ||
+            name == '%';
+      }
+    } else {
+      Class class_ = member.enclosingClass;
+      if (class_ == coreTypes.intClass || class_ == coreTypes.numClass) {
+        String name = member.name.name;
+        return name == '+' ||
+            name == '-' ||
+            name == '*' ||
+            name == 'remainder' ||
+            name == '%';
+      }
     }
     return false;
   }
 
-  /// Returns the static return type of an overloaded arithmetic operator
-  /// (see [isOverloadedArithmeticOperator]) given the static type of the
-  /// operands.
-  ///
-  /// If both types are `int`, the returned type is `int`.
-  /// If either type is `double`, the returned type is `double`.
-  /// If both types refer to the same type variable (typically with `num` as
-  /// the upper bound), then that type variable is returned.
-  /// Otherwise `num` is returned.
-  DartType getTypeOfOverloadedArithmetic(DartType type1, DartType type2) {
-    type1 = _resolveTypeParameterType(type1);
-    type2 = _resolveTypeParameterType(type2);
-
-    if (type1 == type2) return type1;
-
-    if (type1 is InterfaceType && type2 is InterfaceType) {
-      if (type1.classNode == type2.classNode) {
-        return type1;
-      }
-      if (type1.classNode == coreTypes.doubleClass ||
-          type2.classNode == coreTypes.doubleClass) {
-        return coreTypes.doubleRawType(type1.nullability);
+  /// True if [member] is a ternary operator whose return type is defined by
+  /// the least upper bound of the operand types.
+  bool isSpecialCasedTernaryOperator(Procedure member,
+      {bool isNonNullableByDefault: false}) {
+    if (isNonNullableByDefault) {
+      Class class_ = member.enclosingClass;
+      if (class_ == coreTypes.intClass || class_ == coreTypes.numClass) {
+        String name = member.name.name;
+        return name == 'clamp';
       }
     }
+    return false;
+  }
 
+  /// Returns the static return type of a special cased binary operator
+  /// (see [isSpecialCasedBinaryOperator]) given the static type of the
+  /// operands.
+  DartType getTypeOfSpecialCasedBinaryOperator(DartType type1, DartType type2,
+      {bool isNonNullableByDefault: false}) {
+    if (isNonNullableByDefault) {
+      // Let e be an expression of one of the forms e1 + e2, e1 - e2, e1 * e2,
+      // e1 % e2 or e1.remainder(e2), where the static type of e1 is a non-Never
+      // type T and T <: num, and where the static type of e2 is S and S is
+      // assignable to num. Then:
+      if (type1 is! NeverType &&
+              isSubtypeOf(type1, coreTypes.numNonNullableRawType,
+                  SubtypeCheckMode.withNullabilities) &&
+              type2 is DynamicType ||
+          isSubtypeOf(type2, coreTypes.numNonNullableRawType,
+              SubtypeCheckMode.withNullabilities)) {
+        if (isSubtypeOf(type1, coreTypes.doubleNonNullableRawType,
+            SubtypeCheckMode.withNullabilities)) {
+          // If T <: double then the static type of e is double. This includes S
+          // being dynamic or Never.
+          return coreTypes.doubleNonNullableRawType;
+        } else if (type2 is! NeverType &&
+            isSubtypeOf(type2, coreTypes.doubleNonNullableRawType,
+                SubtypeCheckMode.withNullabilities)) {
+          // If S <: double and not S <:Never, then the static type of e is
+          // double.
+          return coreTypes.doubleNonNullableRawType;
+        } else if (isSubtypeOf(type1, coreTypes.intNonNullableRawType,
+                SubtypeCheckMode.withNullabilities) &&
+            type2 is! NeverType &&
+            isSubtypeOf(type2, coreTypes.intNonNullableRawType,
+                SubtypeCheckMode.withNullabilities)) {
+          // If T <: int , S <: int and not S <: Never, then the static type of
+          // e is int.
+          return coreTypes.intNonNullableRawType;
+        } else if (type2 is! NeverType &&
+            isSubtypeOf(type2, type1, SubtypeCheckMode.withNullabilities)) {
+          // Otherwise the static type of e is num.
+          return coreTypes.numNonNullableRawType;
+        }
+      }
+      // Otherwise the static type of e is num.
+      return coreTypes.numNonNullableRawType;
+    } else {
+      type1 = _resolveTypeParameterType(type1);
+      type2 = _resolveTypeParameterType(type2);
+
+      if (type1 == type2) return type1;
+
+      if (type1 is InterfaceType && type2 is InterfaceType) {
+        if (type1.classNode == type2.classNode) {
+          return type1;
+        }
+        if (type1.classNode == coreTypes.doubleClass ||
+            type2.classNode == coreTypes.doubleClass) {
+          return coreTypes.doubleRawType(type1.nullability);
+        }
+      }
+
+      return coreTypes.numRawType(type1.nullability);
+    }
+  }
+
+  DartType getTypeOfSpecialCasedTernaryOperator(
+      DartType type1, DartType type2, DartType type3, Library clientLibrary) {
+    if (clientLibrary.isNonNullableByDefault) {
+      // Let e be a normal invocation of the form e1.clamp(e2, e3), where the
+      // static types of e1, e2 and e3 are T1, T2 and T3 respectively, and where
+      // T1, T2, and T3 are all non-Never subtypes of num. Then:
+      if (type1 is! NeverType && type2 is! NeverType && type3 is! NeverType
+          /* We skip the check that all types are subtypes of num because, if
+          not, we'll compute the static type to be num, anyway.*/
+          ) {
+        if (isSubtypeOf(type1, coreTypes.intNonNullableRawType,
+                SubtypeCheckMode.withNullabilities) &&
+            isSubtypeOf(type2, coreTypes.intNonNullableRawType,
+                SubtypeCheckMode.withNullabilities) &&
+            isSubtypeOf(type3, coreTypes.intNonNullableRawType,
+                SubtypeCheckMode.withNullabilities)) {
+          // If T1, T2 and T3 are all subtypes of int, the static type of e is int.
+          return coreTypes.intNonNullableRawType;
+        } else if (isSubtypeOf(type1, coreTypes.doubleNonNullableRawType,
+                SubtypeCheckMode.withNullabilities) &&
+            isSubtypeOf(type2, coreTypes.doubleNonNullableRawType,
+                SubtypeCheckMode.withNullabilities) &&
+            isSubtypeOf(type3, coreTypes.doubleNonNullableRawType,
+                SubtypeCheckMode.withNullabilities)) {
+          // If T1, T2 and T3 are all subtypes of double, the static type of e is double.
+          return coreTypes.doubleNonNullableRawType;
+        }
+      }
+      // Otherwise the static type of e is num.
+      return coreTypes.numNonNullableRawType;
+    }
     return coreTypes.numRawType(type1.nullability);
   }
 
diff --git a/pkg/kernel/lib/verifier.dart b/pkg/kernel/lib/verifier.dart
index 4a5614a..c9238d3 100644
--- a/pkg/kernel/lib/verifier.dart
+++ b/pkg/kernel/lib/verifier.dart
@@ -293,6 +293,9 @@
     currentMember = node;
     var oldParent = enterParent(node);
     classTypeParametersAreInScope = !node.isStatic;
+    if (node.isAbstract && node.isExternal) {
+      problem(node, "Procedure cannot be both abstract and external.");
+    }
     node.function.accept(this);
     classTypeParametersAreInScope = false;
     visitList(node.annotations, this);
diff --git a/pkg/kernel/problems.md b/pkg/kernel/problems.md
index 82731a9..f064a3f 100644
--- a/pkg/kernel/problems.md
+++ b/pkg/kernel/problems.md
@@ -17,7 +17,7 @@
 `severity`: An integer representing severity. This should match the index in
 `package:_fe_analyzer_shared/src/messages/severity.dart`.
 
-`uri: A uri that this problems relates to.
+`uri`: A uri that this problems relates to.
 
 These values are subject to change, but this file will be updated along with any
 such changes. On the code-side these are defined in
diff --git a/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart b/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart
index fd6a3e1..bc84c87 100644
--- a/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart
+++ b/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart
@@ -66,7 +66,7 @@
           return new ExpressionStatement(new Let(x, new VariableGet(x)));
         }(),
         expectation: ''
-            '(expr (let (var "x^0" (dynamic) (int 42) ())'
+            '(expr (let "x^0" () (dynamic) (int 42) ()'
             ' (get-var "x^0" _)))',
         serializer: statementSerializer),
     new TestCase<Statement>(
@@ -80,8 +80,8 @@
               new Let(innerLetVar, new VariableGet(outterLetVar))));
         }(),
         expectation: ''
-            '(expr (let (var "x^0" (dynamic) (int 42) ())'
-            ' (let (var "x^1" (bottom) (null) ())'
+            '(expr (let "x^0" () (dynamic) (int 42) ()'
+            ' (let "x^1" () (bottom) (null) ()'
             ' (get-var "x^0" _))))',
         serializer: statementSerializer),
     new TestCase<Statement>(
@@ -95,8 +95,8 @@
               new Let(innerLetVar, new VariableGet(innerLetVar))));
         }(),
         expectation: ''
-            '(expr (let (var "x^0" (dynamic) (int 42) ())'
-            ' (let (var "x^1" (bottom) (null) ())'
+            '(expr (let "x^0" () (dynamic) (int 42) ()'
+            ' (let "x^1" () (bottom) (null) ()'
             ' (get-var "x^1" _))))',
         serializer: statementSerializer),
     () {
@@ -108,13 +108,13 @@
           expectation: '(expr (set-var "x^0" (int 42)))',
           makeSerializationState: () => new SerializationState(
                 new SerializationEnvironment(null)
-                  ..addBinder(x, 'x^0')
-                  ..close(),
+                  ..addBinder(x, nameClue: x.name)
+                  ..extend(),
               ),
           makeDeserializationState: () => new DeserializationState(
               new DeserializationEnvironment(null)
-                ..addBinder('x^0', x)
-                ..close(),
+                ..addBinder(x, "x^0")
+                ..extend(),
               new CanonicalName.root()),
           serializer: statementSerializer);
     }(),
@@ -227,12 +227,12 @@
               ' "package:foo/bar.dart::A::@fields::field"))',
           makeSerializationState: () =>
               new SerializationState(new SerializationEnvironment(null)
-                ..addBinder(x, 'x^0')
-                ..close()),
+                ..addBinder(x, nameClue: 'x')
+                ..extend()),
           makeDeserializationState: () => new DeserializationState(
               new DeserializationEnvironment(null)
-                ..addBinder('x^0', x)
-                ..close(),
+                ..addBinder(x, "x^0")
+                ..extend(),
               component.root),
           serializer: statementSerializer);
     }(),
@@ -256,12 +256,12 @@
               ' "package:foo/bar.dart::A::@fields::field" (int 42)))',
           makeSerializationState: () =>
               new SerializationState(new SerializationEnvironment(null)
-                ..addBinder(x, 'x^0')
-                ..close()),
+                ..addBinder(x, nameClue: 'x')
+                ..extend()),
           makeDeserializationState: () => new DeserializationState(
               new DeserializationEnvironment(null)
-                ..addBinder('x^0', x)
-                ..close(),
+                ..addBinder(x, "x^0")
+                ..extend(),
               component.root),
           serializer: statementSerializer);
     }(),
@@ -288,12 +288,12 @@
               ' () () ()))',
           makeSerializationState: () =>
               new SerializationState(new SerializationEnvironment(null)
-                ..addBinder(x, 'x^0')
-                ..close()),
+                ..addBinder(x, nameClue: 'x')
+                ..extend()),
           makeDeserializationState: () => new DeserializationState(
               new DeserializationEnvironment(null)
-                ..addBinder('x^0', x)
-                ..close(),
+                ..addBinder(x, "x^0")
+                ..extend(),
               component.root),
           serializer: statementSerializer);
     }(),
@@ -389,9 +389,9 @@
               returnType: new TypeParameterType(t, Nullability.legacy),
               asyncMarker: AsyncMarker.Sync))),
           expectation: ''
-              '(expr (fun (sync ("T^0") ((dynamic)) ((dynamic)) ((var '
-              '"t1^1" (par "T^0" _) _ ())) ((var "t2^2" (par "T^0" _) '
-              '_ ())) () (par "T^0" _) (ret (get-var "t1^1" _)))))',
+              '(expr (fun (sync) ("T^0") ((dynamic)) ((dynamic)) ("t1^1" '
+              '() (par "T^0" _) _ ()) ("t2^2" () (par "T^0" _) '
+              '_ ()) () (par "T^0" _) _ (ret (get-var "t1^1" _))))',
           makeSerializationState: () =>
               new SerializationState(new SerializationEnvironment(null)),
           makeDeserializationState: () => new DeserializationState(
@@ -410,18 +410,18 @@
           procedures: [foo]);
       Component component = Component(libraries: [library]);
       component.computeCanonicalNames();
-      return new TestCase<Procedure>(
+      return new TestCase<Member>(
           name: 'foo(x) => x;',
           node: foo,
           expectation: ''
-              '(static-method (public "foo")'
-              ' (sync () () () ((var "x^0" (dynamic) _ ())) () ()'
-              ' (dynamic) (ret (get-var "x^0" _))))',
+              '(method (public "foo") ((static))'
+              ' (sync) () () () ("x^0" () (dynamic) _ ()) () ()'
+              ' (dynamic) _ (ret (get-var "x^0" _)))',
           makeSerializationState: () =>
               new SerializationState(new SerializationEnvironment(null)),
           makeDeserializationState: () => new DeserializationState(
               new DeserializationEnvironment(null), null),
-          serializer: procedureSerializer);
+          serializer: memberSerializer);
     }(),
     () {
       VariableDeclaration x1 = VariableDeclaration('x', type: DynamicType());
@@ -448,16 +448,23 @@
           name: 'foo(x) => x; bar(x) => foo(x);',
           node: library,
           expectation: ''
-              '(legacy "package:foo/bar.dart"'
+              '"package:foo/bar.dart" () ()'
               ''
-              ' ((static-method (public "foo")'
-              ' (sync () () () ((var "x^0" (dynamic) _ ())) () () (dynamic)'
-              ' (ret (get-var "x^0" _))))'
+              ' ((method (public "foo") ((static))'
+              ' (sync) () () () ("x^0" () (dynamic) _ ()) () () (dynamic)'
+              ' _ (ret (get-var "x^0" _)))'
               ''
-              ' (static-method (public "bar")'
-              ' (sync () () () ((var "x^0" (dynamic) _ ())) () () (dynamic)'
-              ' (ret (invoke-static "package:foo/bar.dart::@methods::foo"'
-              ' () ((get-var "x^0" _)) ()))))))',
+              ' (method (public "bar") ((static))'
+              ' (sync) () () () ("x^0" () (dynamic) _ ()) () () (dynamic)'
+              ' _ (ret'
+              ' (invoke-static "package:foo/bar.dart::@methods::foo"'
+              ' () ((get-var "x^0" _)) ()))))'
+              ''
+              ' ()'
+              ''
+              ' ()'
+              ''
+              ' ()',
           makeSerializationState: () =>
               new SerializationState(new SerializationEnvironment(null)),
           makeDeserializationState: () => new DeserializationState(
@@ -480,11 +487,17 @@
           name: 'class A{} A foo() => null;',
           node: library,
           expectation: ''
-              '(legacy "package:foo/bar.dart"'
-              ' ((static-method (public "foo")'
-              ' (sync () () () () () ()'
-              ' (interface "package:foo/bar.dart::A" ())'
-              ' (ret (null))))))',
+              '"package:foo/bar.dart" () ()'
+              ''
+              ' ((method (public "foo") ((static))'
+              ' (sync) () () () () () () (interface "package:foo/bar.dart::A" ())'
+              ' _ (ret (null))))'
+              ''
+              ' ("A" () () () () _ _ () ())'
+              ''
+              ' ()'
+              ''
+              ' ()',
           makeSerializationState: () =>
               new SerializationState(new SerializationEnvironment(null)),
           makeDeserializationState: () => new DeserializationState(
@@ -495,7 +508,7 @@
       return new TestCase<Statement>(
           name: 'dynamic x;',
           node: VariableDeclaration('x', type: const DynamicType()),
-          expectation: '(local (var "x^0" (dynamic) _ ()))',
+          expectation: '(local "x^0" () (dynamic) _ ())',
           makeSerializationState: () =>
               new SerializationState(new SerializationEnvironment(null)),
           makeDeserializationState: () => new DeserializationState(
diff --git a/pkg/kernel/test/text_serializer_test.dart b/pkg/kernel/test/text_serializer_test.dart
index fadf1e2..f4b3631 100644
--- a/pkg/kernel/test/text_serializer_test.dart
+++ b/pkg/kernel/test/text_serializer_test.dart
@@ -10,7 +10,13 @@
 
 void main() {
   initializeSerializers();
-  test();
+  TestRunner testRunner = new TestRunner();
+  testRunner.run();
+  if (testRunner.failures.isNotEmpty) {
+    print('Round trip failures:');
+    testRunner.failures.forEach(print);
+    throw StateError('Round trip failures');
+  }
 }
 
 // Wrappers for testing.
@@ -32,75 +38,73 @@
   return buffer.toString();
 }
 
-void test() {
-  List<String> failures = [];
-  List<String> tests = [
-    '(get-prop (int 0) (public "hashCode"))',
-    '(get-super (public "hashCode"))',
-    '(invoke-method (int 0) (public "foo") () ((int 1) (int 2)) ())',
-    '(invoke-method (int 0) (public "foo") ((dynamic) (void)) '
-        '((int 1) (int 2)) ("others" (list (dynamic) ((int 3) (int 4)))))',
-    '(let (var "x^0" (dynamic) (int 0) ()) (null))',
-    '(let (var "x^0" (dynamic) _ ()) (null))',
-    '(let (const "x^0" (dynamic) (int 0) ()) (null))',
-    '(let (const "x^0" (dynamic) _ ()) (null))',
-    '(let (final "x^0" (dynamic) (int 0) ()) (null))',
-    '(let (final "x^0" (dynamic) _ ()) (null))',
-    r'''(string "Hello, 'string'!")''',
-    r'''(string "Hello, \"string\"!")''',
-    r'''(string "Yeah nah yeah, here is\nthis really long string haiku\n'''
-        r'''blowing in the wind\n")''',
-    '(int 42)',
-    '(int 0)',
-    '(int -1001)',
-    '(double 3.14159)',
-    '(bool true)',
-    '(bool false)',
-    '(null)',
-    r'''(invalid "You can't touch this")''',
-    '(not (bool true))',
-    '(&& (bool true) (bool false))',
-    '(|| (&& (bool true) (not (bool true))) (bool true))',
-    '(concat ((string "The opposite of ") (int 3) '
-        '(string " is ") (int 7)))',
-    '(symbol "unquote-splicing")',
-    '(this)',
-    '(rethrow)',
-    '(throw (string "error"))',
-    '(await (null))',
-    '(cond (bool true) (dynamic) (int 0) (int 1))',
-    '(is (bool true) (invalid))',
-    '(as (bool true) (void))',
-    '(type (bottom))',
-    '(list (dynamic) ((null) (null) (null)))',
-    '(const-list (dynamic) ((int 0) (int 1) (int 2)))',
-    '(set (dynamic) ((bool true) (bool false) (int 0)))',
-    '(const-set (dynamic) ((int 0) (int 1) (int 2)))',
-    '(map (dynamic) (void) ((int 0) (null) (int 1) (null) (int 2) (null)))',
-    '(const-map (dynamic) (void) ((int 0) (null) (int 1) (null) '
-        '(int 2) (null)))',
-    '(type (-> () () () ((dynamic)) () () (dynamic)))',
-    '(type (-> () () () () ((dynamic)) () (dynamic)))',
-    '(type (-> () () () ((dynamic) (dynamic)) () () (dynamic)))',
-    '(type (-> () () () () () () (dynamic)))',
-    '(type (-> () () () ((-> () () () ((dynamic)) () () (dynamic))) () () '
-        '(dynamic)))',
-    '(type (-> ("T^0") ((dynamic)) ((dynamic)) () () () (dynamic)))',
-    '(type (-> ("T^0") ((dynamic)) ((dynamic)) ((par "T^0" _)) () () '
-        '(par "T^0" _)))',
-    '(type (-> ("T^0" "S^1") ((par "S^1" _) (par "T^0" _)) ((dynamic) '
-        '(dynamic)) () () () (dynamic)))',
-  ];
-  for (var test in tests) {
-    var literal = readExpression(test);
-    var output = writeExpression(literal);
-    if (output != test) {
-      failures.add('* input "${test}" gave output "${output}"');
-    }
+class TestRunner {
+  final List<String> failures = [];
+
+  void run() {
+    test('(get-prop (int 0) (public "hashCode"))');
+    test('(get-super (public "hashCode"))');
+    test('(invoke-method (int 0) (public "foo") () ((int 1) (int 2)) ())');
+    test('(invoke-method (int 0) (public "foo") ((dynamic) (void)) '
+        '((int 1) (int 2)) ("others" (list (dynamic) ((int 3) (int 4)))))');
+    test('(let "x^0" () (dynamic) (int 0) () (null))');
+    test('(let "x^0" () (dynamic) _ () (null))');
+    test('(let "x^0" ((const)) (dynamic) (int 0) () (null))');
+    test('(let "x^0" ((const)) (dynamic) _ () (null))');
+    test('(let "x^0" ((final)) (dynamic) (int 0) () (null))');
+    test('(let "x^0" ((final)) (dynamic) _ () (null))');
+    test(r'''(string "Hello, 'string'!")''');
+    test(r'''(string "Hello, \"string\"!")''');
+    test(r'''(string "Yeah nah yeah, here is\nthis really long string haiku\n'''
+        r'''blowing in the wind\n")''');
+    test('(int 42)');
+    test('(int 0)');
+    test('(int -1001)');
+    test('(double 3.14159)');
+    test('(bool true)');
+    test('(bool false)');
+    test('(null)');
+    test(r'''(invalid "You can't touch this")''');
+    test('(not (bool true))');
+    test('(&& (bool true) (bool false))');
+    test('(|| (&& (bool true) (not (bool true))) (bool true))');
+    test('(concat ((string "The opposite of ") (int 3) '
+        '(string " is ") (int 7)))');
+    test('(symbol "unquote-splicing")');
+    test('(this)');
+    test('(rethrow)');
+    test('(throw (string "error"))');
+    test('(await (null))');
+    test('(cond (bool true) (dynamic) (int 0) (int 1))');
+    test('(is (bool true) (invalid))');
+    test('(as (bool true) (void))');
+    test('(type (bottom))');
+    test('(list (dynamic) ((null) (null) (null)))');
+    test('(const-list (dynamic) ((int 0) (int 1) (int 2)))');
+    test('(set (dynamic) ((bool true) (bool false) (int 0)))');
+    test('(const-set (dynamic) ((int 0) (int 1) (int 2)))');
+    test(
+        '(map (dynamic) (void) ((int 0) (null) (int 1) (null) (int 2) (null)))');
+    test('(const-map (dynamic) (void) ((int 0) (null) (int 1) (null) '
+        '(int 2) (null)))');
+    test('(type (-> () () () ((dynamic)) () () (dynamic)))');
+    test('(type (-> () () () () ((dynamic)) () (dynamic)))');
+    test('(type (-> () () () ((dynamic) (dynamic)) () () (dynamic)))');
+    test('(type (-> () () () () () () (dynamic)))');
+    test('(type (-> () () () ((-> () () () ((dynamic)) () () (dynamic))) () () '
+        '(dynamic)))');
+    test('(type (-> ("T^0") ((dynamic)) ((dynamic)) () () () (dynamic)))');
+    test('(type (-> ("T^0") ((dynamic)) ((dynamic)) ((par "T^0" _)) () () '
+        '(par "T^0" _)))');
+    test('(type (-> ("T^0" "S^1") ((par "S^1" _) (par "T^0" _)) ((dynamic) '
+        '(dynamic)) () () () (dynamic)))');
   }
-  if (failures.isNotEmpty) {
-    print('Round trip failures:');
-    failures.forEach(print);
-    throw StateError('Round trip failures');
+
+  void test(String input) {
+    var kernelAst = readExpression(input);
+    var output = writeExpression(kernelAst);
+    if (output != input) {
+      failures.add('* input "${input}" gave output "${output}"');
+    }
   }
 }
diff --git a/pkg/language_versioning_2.7_test/pubspec.yaml b/pkg/language_versioning_2.7_test/pubspec.yaml
new file mode 100644
index 0000000..3245f03
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/pubspec.yaml
@@ -0,0 +1,14 @@
+name: language_versioning_2.7_test
+version: 1.0.0
+
+description: >
+  Tests of language versioning.
+  Stored as a package in order to have its own package configuration
+  and default language version
+
+# This package is not intended for consumption on pub.dev. DO NOT publish.
+publish_to: none
+
+environment:
+  sdk: '>=2.7.0 <3.0.0'
+
diff --git a/pkg/language_versioning_2.7_test/test/lib_ex2.7_test.dart b/pkg/language_versioning_2.7_test/test/lib_ex2.7_test.dart
new file mode 100644
index 0000000..e0756e3
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/lib_ex2.7_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.
+
+// Explicit version.
+// @dart=2.7
+
+part "src/part_of_ex2.7_v_ex2.7.dart";
+
+// Specification requires the part file to have
+// the same explicit langauge version marker
+// as the including library,
+// not just the same languge version.
+part "src/part_of_ex2.7_v_im2.7.dart";
+//   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE
+// [cfe] The language version override has to be the same in the library and its part(s).
+
+part "src/part_of_ex2.7_v_ex2.8.dart";
+//   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE
+// [cfe] The language version override has to be the same in the library and its part(s).
+
+main() {
+  print(x27x27);
+}
diff --git a/pkg/language_versioning_2.7_test/test/lib_ex2.8_test.dart b/pkg/language_versioning_2.7_test/test/lib_ex2.8_test.dart
new file mode 100644
index 0000000..52c191d
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/lib_ex2.8_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.
+
+// Explicit version.
+// @dart=2.8
+
+part "src/part_of_ex2.8_v_ex2.8.dart";
+
+part "src/part_of_ex2.8_v_ex2.7.dart";
+//   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE
+// [cfe] The language version override has to be the same in the library and its part(s).
+
+part "src/part_of_ex2.8_v_im2.7.dart";
+//   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE
+// [cfe] The language version override has to be the same in the library and its part(s).
+
+void main() {
+  print(x28x28);
+}
diff --git a/pkg/language_versioning_2.7_test/test/lib_im2.7_test.dart b/pkg/language_versioning_2.7_test/test/lib_im2.7_test.dart
new file mode 100644
index 0000000..44d541e
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/lib_im2.7_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.
+
+// Implicit language version 2.7 from configuration.
+
+part "src/part_of_im2.7_v_im2.7.dart";
+
+// Specification requires the part fsrc/ile to have
+// the same explicit langauge version marker
+// as the including library,
+// not just the same languge version.
+part "src/part_of_im2.7_v_ex2.7.dart";
+//   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE
+// [cfe] The language version override has to be the same in the library and its part(s).
+
+part "src/part_of_im2.7_v_ex2.8.dart";
+//   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE
+// [cfe] The language version override has to be the same in the library and its part(s).
+
+void main() {
+  print(i27i27);
+}
diff --git a/pkg/language_versioning_2.7_test/test/src/part_of_ex2.7_v_ex2.7.dart b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.7_v_ex2.7.dart
new file mode 100644
index 0000000..e47db7c
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.7_v_ex2.7.dart
@@ -0,0 +1,9 @@
+// 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.7
+
+part of "../lib_ex2.7_test.dart";
+
+var x27x27 = 0;
diff --git a/pkg/language_versioning_2.7_test/test/src/part_of_ex2.7_v_ex2.8.dart b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.7_v_ex2.8.dart
new file mode 100644
index 0000000..070f6fb
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.7_v_ex2.8.dart
@@ -0,0 +1,9 @@
+// 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.8
+
+part of "../lib_ex2.7_test.dart";
+
+var v27x28 = 0;
diff --git a/pkg/language_versioning_2.7_test/test/src/part_of_ex2.7_v_im2.7.dart b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.7_v_im2.7.dart
new file mode 100644
index 0000000..a18cfd9
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.7_v_im2.7.dart
@@ -0,0 +1,9 @@
+// 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.
+
+// Implicit language version 2.7 from configuration.
+
+part of "../lib_ex2.7_test.dart";
+
+var x27i27 = 0;
diff --git a/pkg/language_versioning_2.7_test/test/src/part_of_ex2.8_v_ex2.7.dart b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.8_v_ex2.7.dart
new file mode 100644
index 0000000..faab98c
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.8_v_ex2.7.dart
@@ -0,0 +1,9 @@
+// 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.7
+
+part of "../lib_ex2.8_test.dart";
+
+var x28x27 = 0;
diff --git a/pkg/language_versioning_2.7_test/test/src/part_of_ex2.8_v_ex2.8.dart b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.8_v_ex2.8.dart
new file mode 100644
index 0000000..6957d94
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.8_v_ex2.8.dart
@@ -0,0 +1,9 @@
+// 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.8
+
+part of "../lib_ex2.8_test.dart";
+
+var x28x28 = 0;
diff --git a/pkg/language_versioning_2.7_test/test/src/part_of_ex2.8_v_im2.7.dart b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.8_v_im2.7.dart
new file mode 100644
index 0000000..d96ba59
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/src/part_of_ex2.8_v_im2.7.dart
@@ -0,0 +1,9 @@
+// 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.
+
+// Implicit language version 2.7 from configuration.
+
+part of "../lib_ex2.8_test.dart";
+
+var x28i27 = 0;
diff --git a/pkg/language_versioning_2.7_test/test/src/part_of_im2.7_v_ex2.7.dart b/pkg/language_versioning_2.7_test/test/src/part_of_im2.7_v_ex2.7.dart
new file mode 100644
index 0000000..a4d2212
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/src/part_of_im2.7_v_ex2.7.dart
@@ -0,0 +1,9 @@
+// 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.7
+
+part of "../lib_im2.7_test.dart";
+
+var i27x27 = 0;
diff --git a/pkg/language_versioning_2.7_test/test/src/part_of_im2.7_v_ex2.8.dart b/pkg/language_versioning_2.7_test/test/src/part_of_im2.7_v_ex2.8.dart
new file mode 100644
index 0000000..bedd006
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/src/part_of_im2.7_v_ex2.8.dart
@@ -0,0 +1,9 @@
+// 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.8
+
+part of "../lib_im2.7_test.dart";
+
+var i27x28 = 0;
diff --git a/pkg/language_versioning_2.7_test/test/src/part_of_im2.7_v_im2.7.dart b/pkg/language_versioning_2.7_test/test/src/part_of_im2.7_v_im2.7.dart
new file mode 100644
index 0000000..aed5ff3
--- /dev/null
+++ b/pkg/language_versioning_2.7_test/test/src/part_of_im2.7_v_im2.7.dart
@@ -0,0 +1,9 @@
+// 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.
+
+// Implicit language version 2.7 from configuration.
+
+part of "../lib_im2.7_test.dart";
+
+var i27i27 = 0;
diff --git a/pkg/meta/CHANGELOG.md b/pkg/meta/CHANGELOG.md
index 3c6b8de..f79fbff 100644
--- a/pkg/meta/CHANGELOG.md
+++ b/pkg/meta/CHANGELOG.md
@@ -1,6 +1,32 @@
-## 1.2.0-nnbd
+## 1.3.0-nullsafety.2
+
+* Update for the 2.10 dev sdk.
+
+## 1.3.0-nullsafety.1
+
+* Allow the <=2.9.10 stable sdk.
+
+## 1.3.0-nullsafety
 
 * Opt into null safety.
+
+## 1.2.2
+
+* Removed `unawaited` because the attempt to move it from `package:pedantic`
+  caused too many issues. If you see errors about `unawaited` being declared in
+  two places, please update the version constraints for `meta` to `1.2.2` or
+  later.
+
+## 1.2.1
+
+* Fixed a bug by adding an import of dart:async so that the code really is
+  compatible with the lower bound of the SDK constraints.
+
+## 1.2.0
+
+* Introduce `unawaited` to mark invocations that return a `Future` where it's
+  intentional that the future is not being awaited. (Moved from
+  `package:pedantic`.)
 * Introduce `@doNotStore` to annotate methods, getters and functions to
   indicate that values obtained by invoking them should not be stored in a
   field or top-level variable.
diff --git a/pkg/meta/lib/meta.dart b/pkg/meta/lib/meta.dart
index 7f93368..b123407 100644
--- a/pkg/meta/lib/meta.dart
+++ b/pkg/meta/lib/meta.dart
@@ -1,8 +1,9 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// Constants for use in metadata annotations.
+/// Annotations that developers can use to express the intentions that otherwise
+/// can't be deduced by statically analyzing the source code.
 ///
 /// See also `@deprecated` and `@override` in the `dart:core` library.
 ///
@@ -12,7 +13,7 @@
 /// function's name differently.
 ///
 /// For information on installing and importing this library, see the [meta
-/// package on pub.dev](https://pub.dev/packages/meta).  For examples of using
+/// package on pub.dev](https://pub.dev/packages/meta). For examples of using
 /// annotations, see
 /// [Metadata](https://dart.dev/guides/language/language-tour#metadata) in the
 /// language tour.
diff --git a/pkg/meta/lib/meta_meta.dart b/pkg/meta/lib/meta_meta.dart
new file mode 100644
index 0000000..5090b05
--- /dev/null
+++ b/pkg/meta/lib/meta_meta.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.
+
+/// Annotations that describe the intended use of other annotations.
+library meta_meta;
+
+/// An annotation used on classes that are intended to be used as annotations
+/// to indicate the kinds of declarations and directives for which the
+/// annotation is appropriate.
+///
+/// The kinds are represented by the constants defined in [TargetKind].
+///
+/// Tools, such as the analyzer, can provide feedback if
+///
+/// * the annotation is associated with anything other than a class, where the
+///   class must be usable as an annotation (that is, contain at least one
+///   `const` constructor).
+/// * the annotated annotation is associated with anything other than the kinds
+///   of declarations listed as valid targets.
+@Target({TargetKind.classType})
+class Target {
+  /// The kinds of declarations with which the annotated annotation can be
+  /// associated.
+  final Set<TargetKind> kinds;
+
+  const Target(this.kinds);
+}
+
+/// An enumeration of the kinds of targets to which an annotation can be
+/// applied.
+enum TargetKind {
+  /// Indicates that an annotation is valid on any class declaration.
+  classType,
+
+  /// Indicates that an annotation is valid on any enum declaration.
+  enumType,
+
+  /// Indicates that an annotation is valid on any extension declaration.
+  extension,
+
+  /// Indicates that an annotation is valid on any field declaration, both
+  /// instance and static fields, whether it's in a class, mixin or extension.
+  field,
+
+  /// Indicates that an annotation is valid on any top-level function
+  /// declaration.
+  function,
+
+  /// Indicates that an annotation is valid on the first directive in a library,
+  /// whether that's a `library`, `import`, `export` or `part` directive. This
+  /// doesn't include the `part of` directive in a part file.
+  library,
+
+  /// Indicates that an annotation is valid on any getter declaration, both
+  /// instance or static getters, whether it's in a class, mixin, extension, or
+  /// at the top-level of a library.
+  getter,
+
+  /// Indicates that an annotation is valid on any method declaration, both
+  /// instance and static methods, whether it's in a class, mixin or extension.
+  method,
+
+  /// Indicates that an annotation is valid on any mixin declaration.
+  mixinType,
+
+  /// Indicates that an annotation is valid on any formal parameter declaration,
+  /// whether it's in a function, method, constructor, or closure.
+  parameter,
+
+  /// Indicates that an annotation is valid on any setter declaration, both
+  /// instance or static setters, whether it's in a class, mixin, extension, or
+  /// at the top-level of a library.
+  setter,
+
+  /// Indicates that an annotation is valid on any declaration that introduces a
+  /// type. This includes classes, enums, mixins and typedefs, but does not
+  /// include extensions because extensions don't introduce a type.
+  type,
+
+  /// Indicates that an annotation is valid on any typedef declaration.
+  typedefType,
+}
diff --git a/pkg/meta/pubspec.yaml b/pkg/meta/pubspec.yaml
index 0a745e0..dfad765 100644
--- a/pkg/meta/pubspec.yaml
+++ b/pkg/meta/pubspec.yaml
@@ -1,12 +1,11 @@
 name: meta
-version: 1.2.0-nnbd
-author: Dart Team <misc@dartlang.org>
+version: 1.3.0-nullsafety.2
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/meta
 description: >
- This library contains the definitions of annotations that provide additional
- semantic information about the program being annotated. These annotations are
- intended to be used by tools to provide a better user experience.
+ This library contains the declarations of annotations that developers can use
+ to express the intentions that otherwise can't be deduced by statically
+ analyzing the source code. These annotations are intended to be used by tools
+ to provide a better user experience.
 environment:
-  # This must remain a tight constraint (only allow dev versions) until nnbd is
-  # stable.
-  sdk: '>=2.9.0-18.0 <2.9.0'
+  # This must remain a tight constraint until nnbd is stable
+  sdk: '>=2.10.0-0 <2.10.0'
diff --git a/pkg/modular_test/test/loader/default_package_dependency_error/expectation.txt b/pkg/modular_test/test/loader/default_package_dependency_error/expectation.txt
index 05c6043..e00a4e2 100644
--- a/pkg/modular_test/test/loader/default_package_dependency_error/expectation.txt
+++ b/pkg/modular_test/test/loader/default_package_dependency_error/expectation.txt
@@ -23,6 +23,7 @@
   dependencies: sdk
   lib/dart2js.dart
   lib/meta.dart
+  lib/meta_meta.dart
 
 sdk
   is package? no
diff --git a/pkg/modular_test/test/loader/valid_packages/expectation.txt b/pkg/modular_test/test/loader/valid_packages/expectation.txt
index 680cfc5..e3bfaeb 100644
--- a/pkg/modular_test/test/loader/valid_packages/expectation.txt
+++ b/pkg/modular_test/test/loader/valid_packages/expectation.txt
@@ -32,6 +32,7 @@
   dependencies: sdk
   lib/dart2js.dart
   lib/meta.dart
+  lib/meta_meta.dart
 
 sdk
   is package? no
diff --git a/pkg/nnbd_migration/lib/migration_cli.dart b/pkg/nnbd_migration/lib/migration_cli.dart
index 6ad3aa9..7e91a82 100644
--- a/pkg/nnbd_migration/lib/migration_cli.dart
+++ b/pkg/nnbd_migration/lib/migration_cli.dart
@@ -44,7 +44,6 @@
 
 /// Data structure recording command-line options for the migration tool that
 /// have been passed in by the client.
-@visibleForTesting
 class CommandLineOptions {
   static const applyChangesFlag = 'apply-changes';
   static const helpFlag = 'help';
@@ -498,6 +497,10 @@
 
   ResourceProvider get resourceProvider => cli.resourceProvider;
 
+  /// Called after changes have been applied on disk.  Maybe overridden by a
+  /// derived class.
+  void applyHook() {}
+
   /// Blocks until an interrupt signal (control-C) is received.  Tests may
   /// override this method to simulate control-C.
   @visibleForTesting
@@ -699,6 +702,7 @@
         }
       }
     }
+    applyHook();
   }
 
   void _checkDependencies() {
@@ -1022,7 +1026,7 @@
     });
     var state = await _task.finish();
     if (_migrationCli.options.webPreview) {
-      await _task.startPreviewServer(state);
+      await _task.startPreviewServer(state, _migrationCli.applyHook);
     }
     _progressBar.complete();
 
diff --git a/pkg/nnbd_migration/lib/src/decorated_type_operations.dart b/pkg/nnbd_migration/lib/src/decorated_type_operations.dart
index 05ad82a..1ff9b47 100644
--- a/pkg/nnbd_migration/lib/src/decorated_type_operations.dart
+++ b/pkg/nnbd_migration/lib/src/decorated_type_operations.dart
@@ -57,6 +57,11 @@
   }
 
   @override
+  bool isNever(DecoratedType type) {
+    return false;
+  }
+
+  @override
   bool isSameType(DecoratedType type1, DecoratedType type2) {
     return type1 == type2;
   }
diff --git a/pkg/nnbd_migration/lib/src/edge_builder.dart b/pkg/nnbd_migration/lib/src/edge_builder.dart
index d60252d..8011686 100644
--- a/pkg/nnbd_migration/lib/src/edge_builder.dart
+++ b/pkg/nnbd_migration/lib/src/edge_builder.dart
@@ -9,12 +9,13 @@
 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/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart' show TypeSystemImpl;
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/error/best_practices_verifier.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:meta/meta.dart';
 import 'package:nnbd_migration/fix_reason_target.dart';
 import 'package:nnbd_migration/instrumentation.dart';
@@ -2994,11 +2995,26 @@
   /// upcast T to that type if possible, skipping the flatten when not
   /// necessary.
   DecoratedType _wrapFuture(DecoratedType type, AstNode node) {
-    if (type.type.isDartCoreNull || type.type.isBottom) {
+    var dartType = type.type;
+    if (dartType.isDartCoreNull || dartType.isBottom) {
       return _futureOf(type, node);
     }
 
-    if (_typeSystem.isSubtypeOf(type.type, typeProvider.futureDynamicType)) {
+    if (dartType is InterfaceType &&
+        dartType.element == typeProvider.futureOrElement) {
+      var typeArguments = type.typeArguments;
+      if (typeArguments.length == 1) {
+        // Wrapping FutureOr<T?1>?2 should produce Future<T?3>, where either 1
+        // or 2 being nullable causes 3 to become nullable.
+        var typeArgument = typeArguments[0];
+        return _futureOf(
+            typeArgument
+                .withNode(NullabilityNode.forLUB(typeArgument.node, type.node)),
+            node);
+      }
+    }
+
+    if (_typeSystem.isSubtypeOf(dartType, typeProvider.futureDynamicType)) {
       return _decoratedClassHierarchy.asInstanceOf(
           type, typeProvider.futureDynamicType.element);
     }
diff --git a/pkg/nnbd_migration/lib/src/fix_builder.dart b/pkg/nnbd_migration/lib/src/fix_builder.dart
index c53d9a5..52f6983 100644
--- a/pkg/nnbd_migration/lib/src/fix_builder.dart
+++ b/pkg/nnbd_migration/lib/src/fix_builder.dart
@@ -19,12 +19,12 @@
 import 'package:analyzer/src/dart/element/member.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/best_practices_verifier.dart';
 import 'package:analyzer/src/generated/element_type_provider.dart';
 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';
@@ -1035,8 +1035,7 @@
     var decoratedType = _fixBuilder._variables
         .decoratedTypeAnnotation(_fixBuilder.source, node);
     if (!typeIsNonNullableByContext(node)) {
-      var type = decoratedType.type;
-      if (!type.isDynamic && !type.isVoid && !type.isDartCoreNull) {
+      if (!_typeIsNaturallyNullable(decoratedType.type)) {
         _makeTypeNameNullable(node, decoratedType);
       }
     }
@@ -1073,12 +1072,28 @@
   }
 
   void _makeTypeNameNullable(TypeAnnotation node, DecoratedType decoratedType) {
+    bool makeNullable = decoratedType.node.isNullable;
+    if (decoratedType.type.isDartAsyncFutureOr) {
+      var typeArguments = decoratedType.typeArguments;
+      if (typeArguments.length == 1) {
+        var typeArgument = typeArguments[0];
+        if ((_typeIsNaturallyNullable(typeArgument.type) ||
+            typeArgument.node.isNullable)) {
+          // FutureOr<T?>? is equivalent to FutureOr<T?>, so there is no need to
+          // make this type nullable.
+          makeNullable = false;
+        }
+      }
+    }
     (_fixBuilder._getChange(node) as NodeChangeForTypeAnnotation)
         .recordNullability(
-            decoratedType, decoratedType.node.isNullable,
+            decoratedType, makeNullable,
             nullabilityHint:
                 _fixBuilder._variables.getNullabilityHint(source, node));
   }
+
+  bool _typeIsNaturallyNullable(DartType type) =>
+      type.isDynamic || type.isVoid || type.isDartCoreNull;
 }
 
 /// Specialization of [_AssignmentLikeExpressionHandler] for
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 9e385ee..f8dfd83 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
@@ -183,9 +183,11 @@
     _server = null;
   }
 
-  Future<void> startPreviewServer(MigrationState state) async {
+  Future<void> startPreviewServer(
+      MigrationState state, void Function() applyHook) async {
     if (_server == null) {
-      _server = HttpPreviewServer(state, rerun, bindAddress, preferredPort);
+      _server = HttpPreviewServer(
+          state, rerun, applyHook, bindAddress, preferredPort);
       _server.serveHttp();
       _allServers.add(_server);
       var serverHostname = await _server.boundHostname;
diff --git a/pkg/nnbd_migration/lib/src/nullability_migration_impl.dart b/pkg/nnbd_migration/lib/src/nullability_migration_impl.dart
index 85b7e2c..38a48e2 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/dart/element/type_system.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 18eefbb..9c335ff 100644
--- a/pkg/nnbd_migration/lib/src/preview/http_preview_server.dart
+++ b/pkg/nnbd_migration/lib/src/preview/http_preview_server.dart
@@ -35,6 +35,10 @@
   // A function which allows the migration to be rerun, taking changed paths.
   final Future<MigrationState> Function() rerunFunction;
 
+  /// Callback function that should be invoked after successfully applying
+  /// migration.
+  final void Function() applyHook;
+
   /// The internet address the server should bind to.  Should be suitable for
   /// passing to HttpServer.bind, i.e. either a [String] or an
   /// [InternetAddress].
@@ -45,13 +49,13 @@
   final int preferredPort;
 
   /// Initialize a newly created HTTP server.
-  HttpPreviewServer(this.migrationState, this.rerunFunction, this.bindAddress,
-      this.preferredPort)
+  HttpPreviewServer(this.migrationState, this.rerunFunction, this.applyHook,
+      this.bindAddress, this.preferredPort)
       : assert(bindAddress is String || bindAddress is InternetAddress);
 
   Future<String> get authToken async {
     await _serverFuture;
-    previewSite ??= PreviewSite(migrationState, rerunFunction);
+    previewSite ??= PreviewSite(migrationState, rerunFunction, applyHook);
     return previewSite.serviceAuthToken;
   }
 
@@ -93,13 +97,13 @@
 
   /// Handle a GET request received by the HTTP server.
   Future<void> _handleGetRequest(HttpRequest request) async {
-    previewSite ??= PreviewSite(migrationState, rerunFunction);
+    previewSite ??= PreviewSite(migrationState, rerunFunction, applyHook);
     await previewSite.handleGetRequest(request);
   }
 
   /// Handle a POST request received by the HTTP server.
   Future<void> _handlePostRequest(HttpRequest request) async {
-    previewSite ??= PreviewSite(migrationState, rerunFunction);
+    previewSite ??= PreviewSite(migrationState, rerunFunction, applyHook);
     await previewSite.handlePostRequest(request);
   }
 
diff --git a/pkg/nnbd_migration/lib/src/preview/preview_site.dart b/pkg/nnbd_migration/lib/src/preview/preview_site.dart
index 9e02a7b..f77ee13 100644
--- a/pkg/nnbd_migration/lib/src/preview/preview_site.dart
+++ b/pkg/nnbd_migration/lib/src/preview/preview_site.dart
@@ -81,11 +81,15 @@
   // A function provided by DartFix to rerun the migration.
   final Future<MigrationState> Function() rerunFunction;
 
+  /// Callback function that should be invoked after successfully applying
+  /// migration.
+  final void Function() applyHook;
+
   final String serviceAuthToken = _makeAuthToken();
 
   /// Initialize a newly created site to serve a preview of the results of an
   /// NNBD migration.
-  PreviewSite(this.migrationState, this.rerunFunction)
+  PreviewSite(this.migrationState, this.rerunFunction, this.applyHook)
       : super('NNBD Migration Preview') {
     reset();
   }
@@ -266,6 +270,7 @@
       code = SourceEdit.applySequence(code, fileEdit.edits);
       file.writeAsStringSync(code);
     }
+    applyHook();
   }
 
   /// Perform the edit indicated by the [uri].
diff --git a/pkg/nnbd_migration/lib/src/variables.dart b/pkg/nnbd_migration/lib/src/variables.dart
index 9744968..c054c01 100644
--- a/pkg/nnbd_migration/lib/src/variables.dart
+++ b/pkg/nnbd_migration/lib/src/variables.dart
@@ -286,13 +286,16 @@
   DartType toFinalType(DecoratedType decoratedType) {
     var type = decoratedType.type;
     if (type.isVoid || type.isDynamic) return type;
-    if (type.isBottom || type.isDartCoreNull) {
+    if (type is NeverType) {
       if (decoratedType.node.isNullable) {
         return (_typeProvider.nullType as TypeImpl)
             .withNullability(NullabilitySuffix.none);
       } else {
         return NeverTypeImpl.instance;
       }
+    } else if (type.isDartCoreNull) {
+      return (_typeProvider.nullType as TypeImpl)
+          .withNullability(NullabilitySuffix.none);
     }
     var nullabilitySuffix = decoratedType.node.isNullable
         ? NullabilitySuffix.question
diff --git a/pkg/nnbd_migration/pubspec.yaml b/pkg/nnbd_migration/pubspec.yaml
index ec7cff3..dc1ee94 100644
--- a/pkg/nnbd_migration/pubspec.yaml
+++ b/pkg/nnbd_migration/pubspec.yaml
@@ -6,11 +6,11 @@
   sdk: '>=2.6.0 <3.0.0'
 dependencies:
   _fe_analyzer_shared: ^4.0.0
-  analyzer: ^0.39.11-dev
+  analyzer: ^0.39.12
   analyzer_plugin: ^0.2.4
   args: ^1.4.4
   charcode: ^1.1.2
-  cli_util: ^0.1.4
+  cli_util: ^0.2.0
   collection: ^1.14.11
   crypto: ^2.0.6
   meta: ^1.1.6
diff --git a/pkg/nnbd_migration/test/abstract_single_unit.dart b/pkg/nnbd_migration/test/abstract_single_unit.dart
index 6c62f9e..cfb022a 100644
--- a/pkg/nnbd_migration/test/abstract_single_unit.dart
+++ b/pkg/nnbd_migration/test/abstract_single_unit.dart
@@ -52,6 +52,7 @@
             error.errorCode != HintCode.UNUSED_CATCH_CLAUSE &&
             error.errorCode != HintCode.UNUSED_CATCH_STACK &&
             error.errorCode != HintCode.UNUSED_ELEMENT &&
+            error.errorCode != HintCode.UNUSED_ELEMENT_PARAMETER &&
             error.errorCode != HintCode.UNUSED_FIELD &&
             error.errorCode != HintCode.UNUSED_IMPORT &&
             error.errorCode != HintCode.UNUSED_LOCAL_VARIABLE;
diff --git a/pkg/nnbd_migration/test/api_test.dart b/pkg/nnbd_migration/test/api_test.dart
index f197947..6b71795 100644
--- a/pkg/nnbd_migration/test/api_test.dart
+++ b/pkg/nnbd_migration/test/api_test.dart
@@ -325,6 +325,28 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  Future<void> test_avoid_redundant_future_or() async {
+    // FutureOr<int?> and FutureOr<int?>? are equivalent types; we never insert
+    // the redundant second `?`.
+    var content = '''
+import 'dart:async';
+abstract class C {
+  FutureOr<int/*?*/> f();
+  FutureOr<int>/*?*/ g();
+  FutureOr<int> h(bool b) => b ? f() : g();
+}
+''';
+    var expected = '''
+import 'dart:async';
+abstract class C {
+  FutureOr<int?> f();
+  FutureOr<int>? g();
+  FutureOr<int?> h(bool b) => b ? f() : g();
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   Future<void>
       test_back_propagation_stops_at_implicitly_typed_variables() async {
     var content = '''
@@ -576,6 +598,30 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  Future<void> test_class_type_param_bound_references_class() async {
+    var content = '''
+class Node<T extends Node<T>> {
+  final List<T> nodes = <T>[];
+}
+class C extends Node<C> {}
+main() {
+  var x = C();
+  x.nodes.add(x);
+}
+''';
+    var expected = '''
+class Node<T extends Node<T>> {
+  final List<T> nodes = <T>[];
+}
+class C extends Node<C> {}
+main() {
+  var x = C();
+  x.nodes.add(x);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   Future<void> test_class_with_default_constructor() async {
     var content = '''
 void main() => f(Foo());
@@ -2994,7 +3040,7 @@
     FutureOr<int> foi1,
     FutureOr<int?> foi2,
     FutureOr<int>? foi3,
-    FutureOr<int?>? foi4
+    FutureOr<int?> foi4
 ) {
   int i1 = foi1 as int;
   int? i2 = foi2 as int?;
@@ -5537,6 +5583,20 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  Future<void> test_return_future_or_null_from_async_method() async {
+    var content = '''
+import 'dart:async';
+Future<Null> f() async => g();
+FutureOr<Null> g() => null;
+''';
+    var expected = '''
+import 'dart:async';
+Future<Null> f() async => g();
+FutureOr<Null> g() => null;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   Future<void> test_setter_overrides_implicit_setter() async {
     var content = '''
 class A {
diff --git a/pkg/nnbd_migration/test/decorated_type_test.dart b/pkg/nnbd_migration/test/decorated_type_test.dart
index 853bf6d..4a18071f 100644
--- a/pkg/nnbd_migration/test/decorated_type_test.dart
+++ b/pkg/nnbd_migration/test/decorated_type_test.dart
@@ -540,8 +540,10 @@
   }
 
   void test_toFinalType_null_non_nullable() {
+    // We never change explicit `Null` types to `Never`, even if we can't find
+    // any reason they need to be nullable.
     var type = _variables.toFinalType(DecoratedType(null_.type, never));
-    assertDartType(type, 'Never');
+    assertDartType(type, 'Null');
   }
 
   void test_toFinalType_null_nullable() {
diff --git a/pkg/nnbd_migration/test/edge_builder_test.dart b/pkg/nnbd_migration/test/edge_builder_test.dart
index bf2f75b..adc7f8d 100644
--- a/pkg/nnbd_migration/test/edge_builder_test.dart
+++ b/pkg/nnbd_migration/test/edge_builder_test.dart
@@ -7,13 +7,14 @@
 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';
 import 'package:analyzer/src/dart/element/element.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' show TypeSystemImpl;
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:nnbd_migration/fix_reason_target.dart';
 import 'package:nnbd_migration/instrumentation.dart';
 import 'package:nnbd_migration/src/decorated_class_hierarchy.dart';
@@ -6811,6 +6812,29 @@
     // No assertions; just checking that it doesn't crash.
   }
 
+  Future<void> test_return_from_async_futureOr_to_future() async {
+    await analyze('''
+import 'dart:async';
+Future<Object> f(FutureOr<int> x) async => x;
+''');
+    var lubNodeMatcher = anyNode;
+    assertEdge(lubNodeMatcher, decoratedTypeAnnotation('Object').node,
+        hard: false, checkable: false);
+    var lubNode = lubNodeMatcher.matchingNode as NullabilityNodeForLUB;
+    expect(lubNode.left, same(decoratedTypeAnnotation('int> x').node));
+    expect(lubNode.right, same(decoratedTypeAnnotation('FutureOr<int>').node));
+  }
+
+  Future<void> test_return_from_async_list_to_future() async {
+    await analyze('''
+import 'dart:async';
+Future<Object> f(List<int> x) async => x;
+''');
+    assertEdge(decoratedTypeAnnotation('List<int>').node,
+        decoratedTypeAnnotation('Object').node,
+        hard: false, checkable: false);
+  }
+
   Future<void> test_return_from_async_null() async {
     await analyze('''
 Future<int> f() async {
diff --git a/pkg/nnbd_migration/test/fix_builder_test.dart b/pkg/nnbd_migration/test/fix_builder_test.dart
index 9ce7d5f..930cd9a 100644
--- a/pkg/nnbd_migration/test/fix_builder_test.dart
+++ b/pkg/nnbd_migration/test/fix_builder_test.dart
@@ -3055,6 +3055,98 @@
     visitTypeAnnotation(findNode.typeAnnotation('dynamic'), 'dynamic');
   }
 
+  Future<void> test_typeName_futureOr_dynamic_nullable() async {
+    await analyze('''
+import 'dart:async';
+void _f() {
+  FutureOr<dynamic> x = null;
+}
+''');
+    // The type of `x` should be `FutureOr<dynamic>?`, but this is equivalent to
+    // `FutureOr<dynamic>`, so we don't add a `?`.  Note: expected type is
+    // still `FutureOr<dynamic>?`; we don't go to extra effort to remove the
+    // redundant `?` from the internal type representation, just from the source
+    // code we generate.
+    visitTypeAnnotation(
+        findNode.typeAnnotation('FutureOr<dynamic> x'), 'FutureOr<dynamic>?',
+        changes: {});
+  }
+
+  Future<void> test_typeName_futureOr_inner() async {
+    await analyze('''
+import 'dart:async';
+void _f(FutureOr<int/*?*/> x) {
+  FutureOr<int> y = x;
+}
+''');
+    visitTypeAnnotation(
+        findNode.typeAnnotation('FutureOr<int> y'), 'FutureOr<int?>',
+        changes: {findNode.typeAnnotation('int> y'): isMakeNullable});
+  }
+
+  Future<void> test_typeName_futureOr_null_nullable() async {
+    await analyze('''
+import 'dart:async';
+void _f() {
+  FutureOr<Null> x = null;
+}
+''');
+    // The type of `x` should be `FutureOr<Null>?`, but this is equivalent to
+    // `FutureOr<Null>`, so we don't add a `?`.  Note: expected type is
+    // still `FutureOr<Null>?`; we don't go to extra effort to remove the
+    // redundant `?` from the internal type representation, just from the source
+    // code we generate.
+    visitTypeAnnotation(
+        findNode.typeAnnotation('FutureOr<Null> x'), 'FutureOr<Null>?',
+        changes: {});
+  }
+
+  Future<void> test_typeName_futureOr_outer() async {
+    await analyze('''
+import 'dart:async';
+void _f(FutureOr<int>/*?*/ x) {
+  FutureOr<int> y = x;
+}
+''');
+    var typeAnnotation = findNode.typeAnnotation('FutureOr<int> y');
+    visitTypeAnnotation(typeAnnotation, 'FutureOr<int>?',
+        changes: {typeAnnotation: isMakeNullable});
+  }
+
+  Future<void> test_typeName_futureOr_redundant() async {
+    await analyze('''
+import 'dart:async';
+void _f(bool b, FutureOr<int>/*?*/ x, FutureOr<int/*?*/> y) {
+  FutureOr<int> z = b ? x : y;
+}
+''');
+    // The type of `z` should be `FutureOr<int?>?`, but this is equivalent to
+    // `FutureOr<int?>`, so we only add the first `?`.  Note: expected type is
+    // still `FutureOr<int?>?`; we don't go to extra effort to remove the
+    // redundant `?` from the internal type representation, just from the source
+    // code we generate.
+    visitTypeAnnotation(
+        findNode.typeAnnotation('FutureOr<int> z'), 'FutureOr<int?>?',
+        changes: {findNode.typeAnnotation('int> z'): isMakeNullable});
+  }
+
+  Future<void> test_typeName_futureOr_void_nullable() async {
+    await analyze('''
+import 'dart:async';
+void _f() {
+  FutureOr<void> x = null;
+}
+''');
+    // The type of `x` should be `FutureOr<void>?`, but this is equivalent to
+    // `FutureOr<void>`, so we don't add a `?`.  Note: expected type is
+    // still `FutureOr<void>?`; we don't go to extra effort to remove the
+    // redundant `?` from the internal type representation, just from the source
+    // code we generate.
+    visitTypeAnnotation(
+        findNode.typeAnnotation('FutureOr<void> x'), 'FutureOr<void>?',
+        changes: {});
+  }
+
   Future<void> test_typeName_generic_nonNullable() async {
     await analyze('''
 void _f() {
@@ -3085,6 +3177,19 @@
         changes: {findNode.typeAnnotation('int'): isMakeNullable});
   }
 
+  Future<void> test_typeName_generic_nullable_arg_and_outer() async {
+    await analyze('''
+void _f(bool b) {
+  List<int> i = b ? [null] : null;
+}
+''');
+    var listInt = findNode.typeAnnotation('List<int>');
+    visitTypeAnnotation(listInt, 'List<int?>?', changes: {
+      findNode.typeAnnotation('int'): isMakeNullable,
+      listInt: isMakeNullable
+    });
+  }
+
   Future<void> test_typeName_simple_nonNullable() async {
     await analyze('''
 void _f() {
diff --git a/pkg/nnbd_migration/test/migration_cli_test.dart b/pkg/nnbd_migration/test/migration_cli_test.dart
index cdacccf..cc7894d 100644
--- a/pkg/nnbd_migration/test/migration_cli_test.dart
+++ b/pkg/nnbd_migration/test/migration_cli_test.dart
@@ -27,6 +27,7 @@
 import 'package:nnbd_migration/src/front_end/web/file_details.dart';
 import 'package:nnbd_migration/src/front_end/web/navigation_tree.dart';
 import 'package:nnbd_migration/src/messages.dart' as messages;
+import 'package:nnbd_migration/src/preview/preview_site.dart';
 import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -81,6 +82,10 @@
 class _MigrationCli extends MigrationCli {
   final _MigrationCliTestBase _test;
 
+  /// If non-null, callback function that will be invoked by the `applyHook`
+  /// override.
+  void Function() _onApplyHook;
+
   _MigrationCli(this._test)
       : super(
             binaryName: 'nnbd_migration',
@@ -108,6 +113,12 @@
   _MigrationCli get cli => super.cli as _MigrationCli;
 
   @override
+  void applyHook() {
+    super.applyHook();
+    cli._onApplyHook?.call();
+  }
+
+  @override
   Future<void> blockUntilSignalInterrupt() async {
     if (_runWhilePreviewServerActive == null) {
       fail('Preview server not expected to have been started');
@@ -554,10 +565,19 @@
   test_lifecycle_apply_changes() async {
     var projectContents = simpleProject();
     var projectDir = await createProjectDir(projectContents);
-    var cliRunner = _createCli().decodeCommandLineArgs(
+    var cli = _createCli();
+    var cliRunner = cli.decodeCommandLineArgs(
         _parseArgs(['--no-web-preview', '--apply-changes', projectDir]));
+    bool applyHookCalled = false;
+    cli._onApplyHook = () {
+      expect(applyHookCalled, false);
+      applyHookCalled = true;
+      // Changes should have been made
+      assertProjectContents(projectDir, simpleProject(migrated: true));
+    };
     await cliRunner.run();
     assertNormalExit(cliRunner);
+    expect(applyHookCalled, true);
     // Check that a summary was printed
     expect(logger.stdoutBuffer.toString(), contains('Applying changes'));
     // And that it refers to test.dart and pubspec.yaml
@@ -565,8 +585,6 @@
     expect(logger.stdoutBuffer.toString(), contains('pubspec.yaml'));
     // And that it does not tell the user they can rerun with `--apply-changes`
     expect(logger.stdoutBuffer.toString(), isNot(contains('--apply-changes')));
-    // Changes should have been made
-    assertProjectContents(projectDir, simpleProject(migrated: true));
   }
 
   test_lifecycle_contextdiscovery_handles_multiple() async {
@@ -815,6 +833,33 @@
     });
   }
 
+  test_lifecycle_preview_apply_changes() async {
+    var projectContents = simpleProject();
+    var projectDir = await createProjectDir(projectContents);
+    var cli = _createCli();
+    bool applyHookCalled = false;
+    cli._onApplyHook = () {
+      expect(applyHookCalled, false);
+      applyHookCalled = true;
+      // Changes should have been made
+      assertProjectContents(projectDir, simpleProject(migrated: true));
+    };
+    await runWithPreviewServer(cli, [projectDir], (url) async {
+      expect(
+          logger.stdoutBuffer.toString(), contains('No analysis issues found'));
+      await assertPreviewServerResponsive(url);
+      var uri = Uri.parse(url);
+      var authToken = uri.queryParameters['authToken'];
+      var response = await http.post(
+          uri.replace(
+              path: PreviewSite.applyMigrationPath,
+              queryParameters: {'authToken': authToken}),
+          headers: {'Content-Type': 'application/json; charset=UTF-8'});
+      assertHttpSuccess(response);
+      expect(applyHookCalled, true);
+    });
+  }
+
   test_lifecycle_preview_extra_forward_slash() async {
     var projectDir = await createProjectDir(simpleProject());
     var cli = _createCli();
@@ -1805,6 +1850,16 @@
   }
 
   @override
+  void write(String message) {
+    stdoutBuffer.write(message);
+  }
+
+  @override
+  void writeCharCode(int charCode) {
+    stdoutBuffer.writeCharCode(charCode);
+  }
+
+  @override
   void trace(String message) {
     throw UnimplementedError('TODO(paulberry)');
   }
diff --git a/pkg/nnbd_migration/test/migration_visitor_test_base.dart b/pkg/nnbd_migration/test/migration_visitor_test_base.dart
index ea65844..3397d54 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/dart/element/type_system.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';
 import 'package:nnbd_migration/instrumentation.dart';
diff --git a/pkg/nnbd_migration/test/preview/preview_site_test.dart b/pkg/nnbd_migration/test/preview/preview_site_test.dart
index 607fb30..f32b003 100644
--- a/pkg/nnbd_migration/test/preview/preview_site_test.dart
+++ b/pkg/nnbd_migration/test/preview/preview_site_test.dart
@@ -44,7 +44,7 @@
     state.migrationInfo = migrationInfo;
     site = PreviewSite(state, () async {
       return state;
-    });
+    }, () {});
   }
 
   void test_apply_regress41391() async {
@@ -198,7 +198,7 @@
     state.migrationInfo = migrationInfo;
     site = PreviewSite(state, () async {
       return state;
-    });
+    }, () {});
   }
 
   void test_applyHintAction() async {
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 18fe5c2..52583d6 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -62,6 +62,7 @@
 compiler/test/sourcemaps/stacktrace_test: Slow, Pass
 dartdev/test/commands/analyze_test: Slow, Pass
 dartdev/test/commands/help_test: Slow, Pass
+dartdev/test/smoke/*: Slow, Pass
 dev_compiler/test/modular/*: Slow, Pass
 dev_compiler/test/options/*: Skip # test needs fixes
 dev_compiler/test/sourcemap/*: SkipByDesign # Skip sourcemap tests
diff --git a/pkg/status_file/.packages b/pkg/status_file/.packages
deleted file mode 100644
index 4d68a9e..0000000
--- a/pkg/status_file/.packages
+++ /dev/null
@@ -1,5 +0,0 @@
-# Generated by pub on 2017-07-24 16:32:37.651832.
-expect:../expect/lib/
-path:../../third_party/pkg/path/lib/
-args:../../third_party/pkg/args/lib/
-status_file:lib/
diff --git a/pkg/test_runner/lib/bot_results.dart b/pkg/test_runner/lib/bot_results.dart
new file mode 100644
index 0000000..88b2eb1
--- /dev/null
+++ b/pkg/test_runner/lib/bot_results.dart
@@ -0,0 +1,188 @@
+// 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.
+
+/// Parses results.json and flaky.json.
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+import 'dart:math' as math;
+
+import 'package:pool/pool.dart';
+
+/// The path to the gsutil script.
+String gsutilPy;
+
+// TODO(karlklose):  Update this class with all fields that
+// are used in pkg/test_runner and the tools/bots scripts and include
+// validation (in particular for fields from extend_results.dart, that are
+// optional but expected in some contexts and should always be all or nothing).
+class Result {
+  final String configuration;
+  final String expectation;
+  final bool matches;
+  final String name;
+  final String outcome;
+  final bool changed;
+  final String commitHash;
+  // TODO(karlklose): this field is unnecessary with extended results and
+  // should be removed.
+  final bool flaked;
+  final bool isFlaky;
+  final String previousOutcome;
+
+  Result(
+      this.configuration,
+      this.name,
+      this.outcome,
+      this.expectation,
+      this.matches,
+      this.changed,
+      this.commitHash,
+      this.isFlaky,
+      this.previousOutcome,
+      [this.flaked = false]);
+
+  Result.fromMap(Map<String, dynamic> map, [Map<String, dynamic> flakinessData])
+      : configuration = map["configuration"] as String,
+        name = map["name"] as String,
+        outcome = map["result"] as String,
+        expectation = map["expected"] as String,
+        matches = map["matches"] as bool,
+        changed = map["changed"] as bool,
+        commitHash = map["commit_hash"] as String,
+        isFlaky = map["flaky"] as bool,
+        previousOutcome = map["previous_result"] as String,
+        flaked = flakinessData != null &&
+            (flakinessData["outcomes"] as List).contains(map["result"]);
+
+  String get key => "$configuration:$name";
+}
+
+/// Cloud storage location containing results.
+const testResultsStoragePath = "gs://dart-test-results/builders";
+
+/// Limit the number of concurrent subprocesses by half the number of cores.
+final gsutilPool = Pool(math.max(1, Platform.numberOfProcessors ~/ 2));
+
+/// Runs gsutil with the provided [arguments] and returns the standard output.
+///
+/// Returns null if the requested URL didn't exist.
+Future<String> runGsutil(List<String> arguments) async {
+  return gsutilPool.withResource(() async {
+    var processResult = await Process.run(
+        "python", [gsutilPy]..addAll(arguments),
+        runInShell: Platform.isWindows);
+    var stderr = processResult.stderr as String;
+    if (processResult.exitCode != 0) {
+      if (processResult.exitCode == 1 && stderr.contains("No URLs matched") ||
+          stderr.contains("One or more URLs matched no objects")) {
+        return null;
+      }
+      var error = "Failed to run: python $gsutilPy $arguments\n"
+          "exitCode: ${processResult.exitCode}\n"
+          "stdout:\n${processResult.stdout}\n"
+          "stderr:\n${processResult.stderr}";
+      if (processResult.exitCode == 1 &&
+          stderr.contains("401 Anonymous caller")) {
+        error =
+            "\n\nYou need to authenticate by running:\npython $gsutilPy config\n";
+      }
+      throw Exception(error);
+    }
+    return processResult.stdout as String;
+  });
+}
+
+/// Returns the contents of the provided cloud storage [path], or null if it
+/// didn't exist.
+Future<String> catGsutil(String path) => runGsutil(["cat", path]);
+
+/// Returns the files and directories in the provided cloud storage [directory],
+/// or null if it didn't exist.
+Future<Iterable<String>> lsGsutil(String directory) async {
+  var contents = await runGsutil(["ls", directory]);
+  if (contents == null) {
+    return null;
+  }
+  return LineSplitter.split(contents).map((String path) {
+    var elements = path.split("/");
+    if (elements[elements.length - 1].isEmpty) {
+      return elements[elements.length - 2];
+    } else {
+      return elements[elements.length - 1];
+    }
+  });
+}
+
+/// Copies a file to or from cloud storage.
+Future cpGsutil(String source, String destination) =>
+    runGsutil(["cp", source, destination]);
+
+/// Copies a directory recursively to or from cloud strorage.
+Future cpRecursiveGsutil(String source, String destination) =>
+    runGsutil(["-m", "cp", "-r", "-Z", source, destination]);
+
+/// Lists the bots in cloud storage.
+Future<Iterable<String>> listBots() => lsGsutil("$testResultsStoragePath");
+
+/// Returns the cloud storage path for the [bot].
+String botCloudPath(String bot) => "$testResultsStoragePath/$bot";
+
+/// Returns the cloud storage path to the [build] on the [bot].
+String buildCloudPath(String bot, String build) =>
+    "${botCloudPath(bot)}/$build";
+
+/// Returns the cloud storage path to the [file] inside the [bot]'s directory.
+String fileCloudPath(String bot, String file) => "${botCloudPath(bot)}/$file";
+
+/// Reads the contents of the [file] inside the [bot]'s cloud storage.
+Future<String> readFile(String bot, String file) =>
+    catGsutil(fileCloudPath(bot, file));
+
+/// Returns the cloud storage path to the [file] inside the [build] on the
+/// [bot].
+String buildFileCloudPath(String bot, String build, String file) =>
+    "${buildCloudPath(bot, build)}/$file";
+
+/// Reads the contents of the [file] inside the [build] in the [bot]'s cloud
+/// storage.
+Future<String> readBuildFile(String bot, String build, String file) =>
+    catGsutil(buildFileCloudPath(bot, build, file));
+
+List<Map<String, dynamic>> parseResults(String contents) {
+  return LineSplitter.split(contents)
+      .map(jsonDecode)
+      .toList()
+      .cast<Map<String, dynamic>>();
+}
+
+Future<List<Map<String, dynamic>>> loadResults(String path) async {
+  var results = <Map<String, dynamic>>[];
+  var lines = File(path)
+      .openRead()
+      .cast<List<int>>()
+      .transform(utf8.decoder)
+      .transform(const LineSplitter());
+  await for (var line in lines) {
+    results.add(jsonDecode(line) as Map<String, dynamic>);
+  }
+  return results;
+}
+
+Map<String, Map<String, dynamic>> createResultsMap(
+    List<Map<String, dynamic>> results) {
+  var result = <String, Map<String, dynamic>>{};
+  for (var map in results) {
+    var key = "${map["configuration"]}:${map["name"]}";
+    result.putIfAbsent(key, () => map);
+  }
+  return result;
+}
+
+Map<String, Map<String, dynamic>> parseResultsMap(String contents) =>
+    createResultsMap(parseResults(contents));
+
+Future<Map<String, Map<String, dynamic>>> loadResultsMap(String path) async =>
+    createResultsMap(await loadResults(path));
diff --git a/pkg/test_runner/lib/src/browser.dart b/pkg/test_runner/lib/src/browser.dart
index 9c8a16a..67238df 100644
--- a/pkg/test_runner/lib/src/browser.dart
+++ b/pkg/test_runner/lib/src/browser.dart
@@ -145,16 +145,17 @@
 /// or extension, like "math_test". [testNameAlias] is the alias of the
 /// test variable used for import/export (usually relative to its module root).
 /// [testJSDir] is the relative path to the build directory where the
-/// dartdevc-generated JS file is stored.
+/// dartdevc-generated JS file is stored. [nonNullAsserts] enables non-null
+/// assertions for non-nullable method parameters when running with weak null
+/// safety.
 String dartdevcHtml(String testName, String testNameAlias, String testJSDir,
-    Compiler compiler, NnbdMode mode) {
+    Compiler compiler, NnbdMode mode, bool nonNullAsserts) {
   var testId = pathToJSIdentifier(testName);
   var testIdAlias = pathToJSIdentifier(testNameAlias);
-  var isKernel = compiler == Compiler.dartdevk;
   var isNnbd = mode != NnbdMode.legacy;
   var isNnbdStrong = mode == NnbdMode.strong;
-  var sdkPath = isKernel ? 'kernel/amd/dart_sdk' : 'js/amd/dart_sdk';
-  var pkgDir = isKernel ? 'pkg_kernel' : 'pkg';
+  var sdkPath = isNnbdStrong ? 'sound/amd/dart_sdk' : 'kernel/amd/dart_sdk';
+  var pkgDir = isNnbdStrong ? 'pkg_sound' : 'pkg_kernel';
   var packagePaths = testPackages
       .map((p) => '    "$p": "/root_build/gen/utils/dartdevc/$pkgDir/$p",')
       .join("\n");
@@ -232,8 +233,8 @@
   };
 
   if ($isNnbd) {
-    sdk.dart.nullSafety($isNnbdStrong);
     sdk.dart.weakNullSafetyWarnings(!$isNnbdStrong);
+    sdk.dart.nonNullAsserts($nonNullAsserts);
   }
 
   dartMainRunner(function testMainWrapper() {
diff --git a/pkg/test_runner/lib/src/command.dart b/pkg/test_runner/lib/src/command.dart
index 7ea9107..ec9eda3 100644
--- a/pkg/test_runner/lib/src/command.dart
+++ b/pkg/test_runner/lib/src/command.dart
@@ -340,24 +340,21 @@
 }
 
 class VMKernelCompilationCommand extends CompilationCommand {
-  final List<String> batchArgs;
-
   VMKernelCompilationCommand(
       String outputFile,
       List<Uri> bootstrapDependencies,
       String executable,
       List<String> arguments,
       Map<String, String> environmentOverrides,
-      this.batchArgs,
       {bool alwaysCompile,
       int index = 0})
-      : super('vm_compile_to_kernel $batchArgs', outputFile,
-            bootstrapDependencies, executable, arguments, environmentOverrides,
+      : super('vm_compile_to_kernel', outputFile, bootstrapDependencies,
+            executable, arguments, environmentOverrides,
             alwaysCompile: alwaysCompile, index: index);
 
   VMKernelCompilationCommand indexedCopy(int index) =>
       VMKernelCompilationCommand(outputFile, _bootstrapDependencies, executable,
-          arguments, environmentOverrides, batchArgs,
+          arguments, environmentOverrides,
           alwaysCompile: _alwaysCompile, index: index);
 
   VMKernelCompilationCommandOutput createOutput(
@@ -372,11 +369,6 @@
           this, exitCode, timedOut, stdout, stderr, time, compilationSkipped);
 
   int get maxNumRetries => 1;
-
-  @override
-  List<String> get batchArguments {
-    return batchArgs;
-  }
 }
 
 /// This is just a Pair(String, Map) class with hashCode and operator ==
diff --git a/pkg/test_runner/lib/src/compiler_configuration.dart b/pkg/test_runner/lib/src/compiler_configuration.dart
index 03ff446..e841c9d 100644
--- a/pkg/test_runner/lib/src/compiler_configuration.dart
+++ b/pkg/test_runner/lib/src/compiler_configuration.dart
@@ -510,6 +510,11 @@
   Command _createCommand(String inputFile, String outputFile,
       List<String> sharedOptions, Map<String, String> environment) {
     var args = <String>[];
+    // Remove option for generating non-null assertions for non-nullable
+    // method parameters in weak mode. DDC treats this as a runtime flag for
+    // the bootstrapping code, instead of a compiler option.
+    var options = sharedOptions.toList();
+    options.remove('--null-assertions');
     if (!_useSdk) {
       // If we're testing a built SDK, DDC will find its own summary.
       //
@@ -524,7 +529,7 @@
           .toNativePath();
       args.addAll(["--dart-sdk-summary", sdkSummary]);
     }
-    args.addAll(sharedOptions);
+    args.addAll(options);
     args.addAll(_configuration.sharedOptions);
 
     args.addAll([
@@ -699,10 +704,19 @@
     var args = [
       if (_configuration.useElf) ...[
         "--snapshot-kind=app-aot-elf",
-        "--elf=$tempDir/out.aotsnapshot"
+        "--elf=$tempDir/out.aotsnapshot",
       ] else ...[
         "--snapshot-kind=app-aot-assembly",
-        "--assembly=$tempDir/out.S"
+        "--assembly=$tempDir/out.S",
+      ],
+      // Only splitting with a ELF to avoid having to setup compilation of
+      // multiple assembly files in the test harness. Only splitting tests of
+      // deferred imports because splitting currently requires disable bare
+      // instructions mode, and we want to continue testing bare instructions
+      // mode.
+      if (_configuration.useElf && arguments.last.contains("deferred")) ...[
+        "--loading-unit-manifest=$tempDir/ignored.json",
+        "--use-bare-instructions=false",
       ],
       if (_isAndroid && _isArm) '--no-sim-use-hardfp',
       if (_configuration.isMinified) '--obfuscate',
@@ -1066,15 +1080,8 @@
     var pkgVmDir = Platform.script.resolve('../../../pkg/vm').toFilePath();
     var genKernel = '$pkgVmDir/tool/gen_kernel$shellScriptExtension';
 
-    var useAbiVersion = arguments.firstWhere(
-        (arg) => arg.startsWith('--use-abi-version='),
-        orElse: () => null);
-
     var kernelBinariesFolder = '${_configuration.buildDirectory}';
-    if (useAbiVersion != null) {
-      var version = useAbiVersion.split('=')[1];
-      kernelBinariesFolder += '/dart-sdk/lib/_internal/abiversions/$version';
-    } else if (_useSdk) {
+    if (_useSdk) {
       kernelBinariesFolder += '/dart-sdk/lib/_internal';
     }
 
@@ -1105,10 +1112,8 @@
       ..._configuration.genKernelOptions,
     ];
 
-    var batchArgs = [if (useAbiVersion != null) useAbiVersion];
-
     return VMKernelCompilationCommand(dillFile, bootstrapDependencies(),
-        genKernel, args, environmentOverrides, batchArgs,
+        genKernel, args, environmentOverrides,
         alwaysCompile: true);
   }
 }
@@ -1179,8 +1184,12 @@
   @override
   List<String> computeCompilerArguments(
       TestFile testFile, List<String> vmOptions, List<String> args) {
+    // Remove shared option for generating non-null assertions for non-nullable
+    // method parameters in weak mode. It's currently unused by the front end.
+    var options = testFile.sharedOptions.toList();
+    options.remove('--null-assertions');
     var arguments = [
-      ...testFile.sharedOptions,
+      ...options,
       ..._configuration.sharedOptions,
       ..._experimentsArgument(_configuration, testFile),
       if (_configuration.configuration.nnbdMode == NnbdMode.strong) ...[
diff --git a/pkg/test_runner/lib/src/configuration.dart b/pkg/test_runner/lib/src/configuration.dart
index dfc966e..c5d61b0 100644
--- a/pkg/test_runner/lib/src/configuration.dart
+++ b/pkg/test_runner/lib/src/configuration.dart
@@ -459,6 +459,7 @@
         mode.name.substring(0, 1).toUpperCase() + mode.name.substring(1);
 
     if (system == System.android) result += "Android";
+    if (system == System.fuchsia) result += "Fuchsia";
 
     if (sanitizer != Sanitizer.none) {
       result += sanitizer.name.toUpperCase();
diff --git a/pkg/test_runner/lib/src/expectation_set.dart b/pkg/test_runner/lib/src/expectation_set.dart
index f896cd0..94ca4ef 100644
--- a/pkg/test_runner/lib/src/expectation_set.dart
+++ b/pkg/test_runner/lib/src/expectation_set.dart
@@ -49,8 +49,6 @@
     } on SyntaxError catch (error) {
       stderr.writeln(error.toString());
       exit(1);
-
-      throw "unreachable";
     }
   }
 
diff --git a/pkg/test_runner/lib/src/fuchsia.dart b/pkg/test_runner/lib/src/fuchsia.dart
new file mode 100644
index 0000000..182fe4b
--- /dev/null
+++ b/pkg/test_runner/lib/src/fuchsia.dart
@@ -0,0 +1,221 @@
+// 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 'repository.dart';
+import 'utils.dart';
+
+class FuchsiaEmulator {
+  static final Uri toolsDir =
+      Repository.uri.resolve('third_party/fuchsia/sdk/linux/bin/');
+  static final String femuTool = toolsDir.resolve('femu.sh').toFilePath();
+  static final String fserveTool = toolsDir.resolve('fserve.sh').toFilePath();
+  static final String fpubTool = toolsDir.resolve('fpublish.sh').toFilePath();
+  static final String fsshTool = toolsDir.resolve('fssh.sh').toFilePath();
+  static final RegExp emulatorReadyPattern =
+      RegExp(r'Using unique host name (.+)\.local\.');
+  static final RegExp emulatorPidPattern =
+      RegExp(r'([0-9]+) .* qemu-system-x86');
+  static final String serverReadyPattern = '[pm serve] serving';
+
+  static FuchsiaEmulator _inst;
+
+  Process _emu;
+  Process _server;
+  String _deviceName;
+
+  static Future<void> publishPackage(String buildDir, String mode) async {
+    if (_inst == null) {
+      _inst = FuchsiaEmulator();
+      await _inst._start();
+    }
+    await _inst._publishPackage(buildDir, mode);
+  }
+
+  static void stop() {
+    _inst?._stop();
+  }
+
+  static List<String> getTestArgs(String mode, List<String> arguments) {
+    return _inst._getSshArgs(
+        mode,
+        arguments.map((arg) =>
+            arg.replaceAll(Repository.uri.toFilePath(), '/pkg/data/')));
+  }
+
+  Future<void> _start() async {
+    // Start the emulator.
+    DebugLogger.info('Starting Fuchsia emulator');
+    _emu = await Process.start(
+        'xvfb-run', [femuTool, '--image', 'qemu-x64', '-N', '--headless']);
+
+    // Wait until the emulator is ready and has a valid device name.
+    var deviceNameFuture = Completer<String>();
+    var emuStdout = StringBuffer();
+    var emuStderr = StringBuffer();
+    _emu.stdout.transform(utf8.decoder).transform(const LineSplitter()).listen(
+        (String line) {
+      if (!deviceNameFuture.isCompleted) {
+        emuStdout.write(line);
+        emuStdout.write('\n');
+        var match = emulatorReadyPattern.firstMatch(line);
+        if (match != null) {
+          deviceNameFuture.complete(match.group(1));
+        }
+      }
+    }, onDone: () {
+      if (!deviceNameFuture.isCompleted) {
+        deviceNameFuture.completeError(
+            'Fuchsia emulator terminated unexpectedly.\n\n' +
+                _formatOutputs(emuStdout.toString(), emuStderr.toString()));
+      }
+      _stop();
+    });
+    _emu.stderr
+        .transform(utf8.decoder)
+        .transform(const LineSplitter())
+        .listen((String line) {
+      if (!deviceNameFuture.isCompleted) {
+        emuStderr.write(line);
+        emuStderr.write('\n');
+      }
+    });
+    _deviceName = await deviceNameFuture.future;
+    DebugLogger.info('Fuchsia emulator ready: $_deviceName');
+
+    // Start the server.
+    DebugLogger.info('Starting Fuchsia package server');
+    _server = await Process.start(fserveTool, [
+      '--bucket',
+      'fuchsia-sdk',
+      '--image',
+      'qemu-x64',
+      '--device-name',
+      _deviceName
+    ]);
+
+    // Wait until the server is ready to serve packages.
+    var serverReadyFuture = Completer<String>();
+    var serverStdout = StringBuffer();
+    var serverStderr = StringBuffer();
+    _server.stdout
+        .transform(utf8.decoder)
+        .transform(const LineSplitter())
+        .listen((String line) {
+      if (!serverReadyFuture.isCompleted) {
+        serverStdout.write(line);
+        serverStdout.write('\n');
+        if (line.contains(serverReadyPattern)) {
+          serverReadyFuture.complete();
+        }
+      }
+    }, onDone: () {
+      if (!serverReadyFuture.isCompleted) {
+        serverReadyFuture.completeError(
+            'Fuchsia package server terminated unexpectedly.\n\n' +
+                _formatOutputs(
+                    serverStdout.toString(), serverStderr.toString()));
+      }
+      _stop();
+    });
+    _server.stderr
+        .transform(utf8.decoder)
+        .transform(const LineSplitter())
+        .listen((String line) {
+      if (!serverReadyFuture.isCompleted) {
+        serverStderr.write(line);
+        serverStderr.write('\n');
+      }
+    });
+    await serverReadyFuture.future;
+    DebugLogger.info('Fuchsia package server ready');
+  }
+
+  List<String> _getSshArgs(String mode, Iterable<String> args) {
+    var sshArgs = [
+      '--device-name',
+      _deviceName,
+      'run',
+      'fuchsia-pkg://fuchsia.com/dart_test_$mode#meta/dart.cmx'
+    ];
+    return sshArgs..addAll(args);
+  }
+
+  Future<void> _publishPackage(String buildDir, String mode) async {
+    var packageFile = '$buildDir/gen/dart_test_$mode/dart_test_$mode.far';
+    DebugLogger.info('Publishing package: $packageFile');
+    var result = await Process.run(fpubTool, [packageFile]);
+    if (result.exitCode != 0) {
+      _stop();
+      throw _formatFailedResult('Publishing package', result);
+    }
+
+    // Verify that the publication was successful by running hello_test.dart.
+    // This also forces the emulator to download the published package from the
+    // server, rather than waiting until the first tests are run. It can take a
+    // minute or two to transfer, and we don't want to eat into the timeout
+    // timer of the first tests.
+    DebugLogger.info('Verifying publication');
+    result = await Process.run(fsshTool,
+        _getSshArgs(mode, ['/pkg/data/pkg/testing/test/hello_test.dart']));
+    if (result.exitCode != 0 || result.stdout != 'Hello, World!\n') {
+      _stop();
+      throw _formatFailedResult('Verifying publication', result);
+    }
+    DebugLogger.info('Publication successful');
+  }
+
+  void _stop() {
+    if (_emu != null) {
+      DebugLogger.info('Stopping Fuchsia emulator');
+      _emu.kill(ProcessSignal.sigint);
+      _emu = null;
+
+      // Killing femu.sh seems to leave the underlying emulator running. So
+      // manually find the process and terminate it by PID.
+      var result = Process.runSync('ps', []);
+      var emuPid = int.tryParse(
+          emulatorPidPattern.firstMatch(result.stdout as String)?.group(1) ??
+              "");
+      if (result.exitCode != 0 || emuPid == null) {
+        DebugLogger.info(
+            _formatFailedResult('Searching for emulator process', result));
+      } else {
+        Process.killPid(emuPid);
+        DebugLogger.info('Fuchsia emulator stopped');
+      }
+    }
+
+    if (_server != null) {
+      DebugLogger.info('Stopping Fuchsia package server');
+      _server.kill();
+      _server = null;
+
+      // fserve.sh starts a package manager process in the background. We need
+      // to manually kill this process, using fserve.sh again.
+      var result = Process.runSync(fserveTool, ['--kill']);
+      if (result.exitCode != 0) {
+        DebugLogger.info(
+            _formatFailedResult('Killing package manager', result));
+      } else {
+        DebugLogger.info('Fuchsia package server stopped');
+      }
+    }
+  }
+
+  String _formatOutputs(String stdout, String stderr) {
+    var output = "";
+    if (stdout.isNotEmpty) output += "=== STDOUT ===\n$stdout\n";
+    if (stderr.isNotEmpty) output += "=== STDERR ===\n$stderr\n";
+    return output;
+  }
+
+  String _formatFailedResult(String name, ProcessResult result) {
+    return '$name failed with exit code: ${result.exitCode}\n\n' +
+        _formatOutputs(result.stdout as String, result.stderr as String);
+  }
+}
diff --git a/pkg/test_runner/lib/src/process_queue.dart b/pkg/test_runner/lib/src/process_queue.dart
index 878a3fc..7be0d74 100644
--- a/pkg/test_runner/lib/src/process_queue.dart
+++ b/pkg/test_runner/lib/src/process_queue.dart
@@ -1186,7 +1186,6 @@
       // it will always fail. So rather than re-trying a 1000+ times, we
       // exit.
       io.exit(1);
-      return true;
     });
   }
 
diff --git a/pkg/test_runner/lib/src/runtime_configuration.dart b/pkg/test_runner/lib/src/runtime_configuration.dart
index 477c73c..ad3f498 100644
--- a/pkg/test_runner/lib/src/runtime_configuration.dart
+++ b/pkg/test_runner/lib/src/runtime_configuration.dart
@@ -7,6 +7,7 @@
 import 'command.dart';
 import 'compiler_configuration.dart';
 import 'configuration.dart';
+import 'fuchsia.dart';
 import 'repository.dart';
 import 'utils.dart';
 
@@ -42,6 +43,8 @@
       case Runtime.vm:
         if (configuration.system == System.android) {
           return DartkAdbRuntimeConfiguration();
+        } else if (configuration.system == System.fuchsia) {
+          return DartkFuchsiaEmulatorRuntimeConfiguration();
         }
         return StandaloneDartRuntimeConfiguration();
 
@@ -379,6 +382,34 @@
   }
 }
 
+class DartkFuchsiaEmulatorRuntimeConfiguration
+    extends DartVmRuntimeConfiguration {
+  List<Command> computeRuntimeCommands(
+      CommandArtifact artifact,
+      List<String> arguments,
+      Map<String, String> environmentOverrides,
+      List<String> extraLibs,
+      bool isCrashExpected) {
+    var script = artifact.filename;
+    var type = artifact.mimeType;
+    if (script != null &&
+        type != 'application/dart' &&
+        type != 'application/dart-snapshot' &&
+        type != 'application/kernel-ir' &&
+        type != 'application/kernel-ir-fully-linked') {
+      throw "Dart VM cannot run files of type '$type'.";
+    }
+    var runtimeArgs =
+        FuchsiaEmulator.getTestArgs(_configuration.mode.name, arguments);
+    if (isCrashExpected) {
+      runtimeArgs.insert(0, '--suppress-core-dump');
+    }
+    return [
+      VMCommand(FuchsiaEmulator.fsshTool, runtimeArgs, environmentOverrides)
+    ];
+  }
+}
+
 class SelfCheckRuntimeConfiguration extends DartVmRuntimeConfiguration {
   final List<String> selfCheckers = <String>[];
 
diff --git a/pkg/test_runner/lib/src/static_error.dart b/pkg/test_runner/lib/src/static_error.dart
index 38bfe0b..08104d7 100644
--- a/pkg/test_runner/lib/src/static_error.dart
+++ b/pkg/test_runner/lib/src/static_error.dart
@@ -55,6 +55,44 @@
 class StaticError implements Comparable<StaticError> {
   static const _unspecified = "unspecified";
 
+  /// The error codes for all of the analyzer errors that are non-fatal
+  /// warnings.
+  ///
+  /// We can't rely on the type ("STATIC_WARNING", etc.) because for historical
+  /// reasons the "warning" types contain a large number of actual compile
+  /// errors.
+  // TODO(rnystrom): This list was generated on 2020/07/24 based on the list
+  // of error codes in sdk/pkg/analyzer/lib/error/error.dart. Is there a more
+  // systematic way to handle this?
+  static const _analyzerWarningCodes = {
+    "STATIC_WARNING.ANALYSIS_OPTION_DEPRECATED",
+    "STATIC_WARNING.INCLUDE_FILE_NOT_FOUND",
+    "STATIC_WARNING.INCLUDED_FILE_WARNING",
+    "STATIC_WARNING.INVALID_OPTION",
+    "STATIC_WARNING.INVALID_SECTION_FORMAT",
+    "STATIC_WARNING.SPEC_MODE_REMOVED",
+    "STATIC_WARNING.UNRECOGNIZED_ERROR_CODE",
+    "STATIC_WARNING.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE",
+    "STATIC_WARNING.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES",
+    "STATIC_WARNING.UNSUPPORTED_OPTION_WITHOUT_VALUES",
+    "STATIC_WARNING.UNSUPPORTED_VALUE",
+    "STATIC_WARNING.CAMERA_PERMISSIONS_INCOMPATIBLE",
+    "STATIC_WARNING.NO_TOUCHSCREEN_FEATURE",
+    "STATIC_WARNING.NON_RESIZABLE_ACTIVITY",
+    "STATIC_WARNING.PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE",
+    "STATIC_WARNING.SETTING_ORIENTATION_ON_ACTIVITY",
+    "STATIC_WARNING.UNSUPPORTED_CHROME_OS_FEATURE",
+    "STATIC_WARNING.UNSUPPORTED_CHROME_OS_HARDWARE",
+    "STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION",
+    "STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR",
+    "STATIC_WARNING.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED",
+    "STATIC_WARNING.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL",
+    "STATIC_WARNING.MISSING_ENUM_CONSTANT_IN_SWITCH",
+    "STATIC_WARNING.UNNECESSARY_NON_NULL_ASSERTION",
+    "STATIC_WARNING.TOP_LEVEL_INSTANCE_GETTER",
+    "STATIC_WARNING.TOP_LEVEL_INSTANCE_METHOD",
+  };
+
   /// Parses the set of static error expectations defined in the Dart source
   /// file [source].
   static List<StaticError> parseExpectations(String source) =>
@@ -296,6 +334,25 @@
     return result;
   }
 
+  /// Whether this error is only considered a warning on all front ends that
+  /// report it.
+  bool get isWarning {
+    var analyzer = _errors[ErrorSource.analyzer];
+    if (analyzer != null && !_analyzerWarningCodes.contains(analyzer)) {
+      return false;
+    }
+
+    // TODO(42787): Once CFE starts reporting warnings, encode that in the
+    // message somehow and then look for it here.
+    if (hasError(ErrorSource.cfe)) return false;
+
+    // TODO(rnystrom): If the web compilers report warnings, encode that in the
+    // message somehow and then look for it here.
+    if (hasError(ErrorSource.web)) return false;
+
+    return true;
+  }
+
   String toString() {
     var result = "Error at $location";
 
@@ -546,21 +603,6 @@
       errors[source] = message;
     }
 
-    // Make sure the messages are in front end order.
-    var sources = errors.keys.toList();
-    for (var before = 0; before < ErrorSource.all.length - 1; before++) {
-      var beforeSource = ErrorSource.all[before];
-      for (var after = before + 1; after < ErrorSource.all.length; after++) {
-        var afterSource = ErrorSource.all[after];
-        if (errors.containsKey(beforeSource) &&
-            errors.containsKey(afterSource) &&
-            sources.indexOf(beforeSource) > sources.indexOf(afterSource)) {
-          _fail("The ${beforeSource.name} expectation must come before the "
-              "${afterSource.name} expectation.");
-        }
-      }
-    }
-
     if (errors.isEmpty) {
       _fail("An error expectation must specify at least one error message.");
     }
diff --git a/pkg/test_runner/lib/src/test_configurations.dart b/pkg/test_runner/lib/src/test_configurations.dart
index 9e0d5a1..93de210 100644
--- a/pkg/test_runner/lib/src/test_configurations.dart
+++ b/pkg/test_runner/lib/src/test_configurations.dart
@@ -10,6 +10,7 @@
 import 'browser_controller.dart';
 import 'co19_test_config.dart';
 import 'configuration.dart';
+import 'fuchsia.dart';
 import 'path.dart';
 import 'process_queue.dart';
 import 'terminal.dart';
@@ -152,6 +153,11 @@
         }
       }
     }
+
+    if (configuration.system == System.fuchsia) {
+      await FuchsiaEmulator.publishPackage(
+          configuration.buildDirectory, configuration.mode.name);
+    }
   }
 
   // If we only need to print out status files for test suites
@@ -170,6 +176,7 @@
     for (var configuration in configurations) {
       configuration.stopServers();
     }
+    FuchsiaEmulator.stop();
 
     DebugLogger.close();
     if (!firstConf.keepGeneratedFiles) {
diff --git a/pkg/test_runner/lib/src/test_file.dart b/pkg/test_runner/lib/src/test_file.dart
index 6fe642f..c5a0fd8 100644
--- a/pkg/test_runner/lib/src/test_file.dart
+++ b/pkg/test_runner/lib/src/test_file.dart
@@ -64,14 +64,24 @@
   /// generated from a multitest. Otherwise, returns an empty string.
   String get multitestKey;
 
-  /// If the text contains static error expectations, it's a "static error
+  /// If the test contains static error expectations, it's a "static error
   /// test".
   ///
   /// These tests exist to validate that a front end reports the right static
-  /// errors. They are skipped on configurations that don't intend to test
-  /// static error reporting.
+  /// errors. Unless the expected errors are all warnings, a static error test
+  /// is skipped on configurations that are not purely front end.
   bool get isStaticErrorTest => expectedErrors.isNotEmpty;
 
+  /// If the tests has no static error expectations, or all of the expectations
+  /// are warnings, then the test tests runtime semantics.
+  ///
+  /// Note that this is *not* the negation of [isStaticErrorTest]. A test that
+  /// contains only warning expectations is both a static "error" test and a
+  /// runtime test. The test runner will validate that the front ends produce
+  /// the expected warnings *and* that a runtime also correctly executes the
+  /// test.
+  bool get isRuntimeTest => expectedErrors.every((error) => error.isWarning);
+
   /// A hash code used to spread tests across shards.
   int get shardHash {
     // The VM C++ unit tests have a special fake TestFile with no suite
diff --git a/pkg/test_runner/lib/src/test_suite.dart b/pkg/test_runner/lib/src/test_suite.dart
index b06096b..d05d3c1 100644
--- a/pkg/test_runner/lib/src/test_suite.dart
+++ b/pkg/test_runner/lib/src/test_suite.dart
@@ -55,14 +55,16 @@
   TestSuite(this.configuration, this.suiteName, this.statusFilePaths) {
     _environmentOverrides = {
       'DART_CONFIGURATION': configuration.configurationDirectory,
+      if (Platform.isWindows) 'DART_SUPPRESS_WER': '1',
+      if (Platform.isWindows && configuration.copyCoreDumps)
+        'DART_CRASHPAD_HANDLER':
+            Uri.base.resolve(buildDir + '/crashpad_handler.exe').toFilePath(),
+      if (configuration.chromePath != null)
+        'CHROME_PATH': Uri.base.resolve(configuration.chromePath).toFilePath(),
+      if (configuration.firefoxPath != null)
+        'FIREFOX_PATH':
+            Uri.base.resolve(configuration.firefoxPath).toFilePath(),
     };
-    if (Platform.isWindows) {
-      _environmentOverrides['DART_SUPPRESS_WER'] = '1';
-      if (configuration.copyCoreDumps) {
-        _environmentOverrides['DART_CRASHPAD_HANDLER'] =
-            Path(buildDir + '/crashpad_handler.exe').absolute.toNativePath();
-      }
-    }
   }
 
   Map<String, String> get environmentOverrides => _environmentOverrides;
@@ -555,16 +557,14 @@
   /// options.
   void _testCasesFromTestFile(
       TestFile testFile, ExpectationSet expectations, TestCaseEvent onTest) {
-    // Static error tests are skipped on every implementation except analyzer
-    // and Fasta.
-    // TODO(rnystrom): Should other configurations that use CFE support static
-    // error tests?
     // TODO(rnystrom): Skipping this here is a little unusual because most
     // skips are handled in _addTestCase(). However, if the configuration
     // is running on a browser, calling _addTestCase() will try to create
     // a set of commands which ultimately causes an exception in
     // DummyRuntimeConfiguration. This avoids that.
-    if (testFile.isStaticErrorTest &&
+    // If the test only has static expectations, skip it on any configurations
+    // that are not purely front ends.
+    if (!testFile.isRuntimeTest &&
         configuration.compiler != Compiler.dart2analyzer &&
         configuration.compiler != Compiler.fasta) {
       return;
@@ -577,7 +577,7 @@
 
     var expectationSet = expectations.expectations(testFile.name);
     if (configuration.compilerConfiguration.hasCompiler &&
-        (testFile.hasCompileError || testFile.isStaticErrorTest)) {
+        (testFile.hasCompileError || !testFile.isRuntimeTest)) {
       // If a compile-time error is expected, and we're testing a
       // compiler, we never need to attempt to run the program (in a
       // browser or otherwise).
@@ -747,7 +747,6 @@
     // Unreachable.
     print("Cannot create URL for path $file. Not in build or dart directory.");
     exit(1);
-    return null;
   }
 
   String _uriForBrowserTest(String pathComponent) {
@@ -808,8 +807,10 @@
             "${nameFromModuleRoot.directoryPath}/$nameNoExt";
         var jsDir =
             Path(compilationTempDir).relativeTo(Repository.dir).toString();
+        var nullAssertions =
+            testFile.sharedOptions.contains('--null-assertions');
         content = dartdevcHtml(nameNoExt, nameFromModuleRootNoExt, jsDir,
-            configuration.compiler, configuration.nnbdMode);
+            configuration.compiler, configuration.nnbdMode, nullAssertions);
       }
     }
 
diff --git a/pkg/test_runner/lib/src/update_errors.dart b/pkg/test_runner/lib/src/update_errors.dart
index c7f2887..a961ea9a 100644
--- a/pkg/test_runner/lib/src/update_errors.dart
+++ b/pkg/test_runner/lib/src/update_errors.dart
@@ -12,12 +12,11 @@
 /// Removes existing static error marker comments in [source] and adds markers
 /// for the given [errors].
 ///
-/// If [removeAnalyzer] is `false`, then existing analyzer errors in [source]
-/// are preserved. Likewise for [removeCfe] and CFE errors.
+/// If [remove] is not `null`, then only removes existing errors for the given
+/// sources.
 String updateErrorExpectations(String source, List<StaticError> errors,
-    {bool removeAnalyzer, bool removeCfe}) {
-  removeAnalyzer ??= true;
-  removeCfe ??= true;
+    {Set<ErrorSource> remove}) {
+  remove ??= {};
 
   var existingErrors = StaticError.parseExpectations(source);
   var lines = source.split("\n");
@@ -38,13 +37,9 @@
     }
 
     // Re-add errors for the portions we intend to preserve.
-    var keepAnalyzer = !removeAnalyzer && error.hasError(ErrorSource.analyzer);
-    var keepCfe = !removeCfe && error.hasError(ErrorSource.cfe);
-
     var keptErrors = {
-      if (keepAnalyzer)
-        ErrorSource.analyzer: error.errorFor(ErrorSource.analyzer),
-      if (keepCfe) ErrorSource.cfe: error.errorFor(ErrorSource.cfe),
+      for (var source in ErrorSource.all.toSet().difference(remove))
+        if (error.hasError(source)) source: error.errorFor(source)
     };
 
     if (keptErrors.isNotEmpty) {
diff --git a/pkg/test_runner/lib/test_runner.dart b/pkg/test_runner/lib/test_runner.dart
new file mode 100644
index 0000000..065b840
--- /dev/null
+++ b/pkg/test_runner/lib/test_runner.dart
@@ -0,0 +1,609 @@
+// 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.
+
+// Run tests like on the given builder and/or named configuration.
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:args/args.dart';
+import 'package:smith/smith.dart';
+
+import 'bot_results.dart';
+
+const int deflakingCount = 5;
+
+/// Quotes a string in shell single quote mode. This function produces a single
+/// shell argument that evaluates to the exact string provided, handling any
+/// special characters in the input string. Shell single quote mode works uses
+/// the single quote character as the delimiter and uses the characters
+/// in-between verbatim without any special processing. To insert the single
+/// quote character itself, escape single quote mode, insert an escaped single
+/// quote, and then return to single quote mode.
+///
+/// Examples:
+///   foo becomes 'foo'
+///   foo bar becomes 'foo bar'
+///   foo\ bar becomes 'foo\ bar'
+///   foo's bar becomes 'foo '\''s bar'
+///   foo "b"ar becomes 'foo "b"'
+///   foo
+///   bar becomes 'foo
+///   bar'
+String shellSingleQuote(String string) {
+  return "'${string.replaceAll("'", "'\\''")}'";
+}
+
+/// Like [shellSingleQuote], but if the string only contains safe ASCII
+/// characters, don't quote it. Note that it's not always safe to omit the
+/// quotes even if the string only has safe characters, as doing so might match
+/// a shell keyword or a shell builtin in the first argument in a command. It
+/// should be safe to use this for the second argument onwards in a command.
+String simpleShellSingleQuote(String string) {
+  return RegExp(r"^[a-zA-Z0-9%+,./:_-]*$").hasMatch(string)
+      ? string
+      : shellSingleQuote(string);
+}
+
+/// Runs a process and exits likewise if the process exits non-zero.
+Future<ProcessResult> runProcess(String executable, List<String> arguments,
+    {bool runInShell = false}) async {
+  var processResult =
+      await Process.run(executable, arguments, runInShell: runInShell);
+  if (processResult.exitCode != 0) {
+    var command =
+        [executable, ...arguments].map(simpleShellSingleQuote).join(" ");
+    throw Exception("Command exited ${processResult.exitCode}: $command\n"
+        "${processResult.stdout}\n${processResult.stderr}");
+  }
+  return processResult;
+}
+
+/// Runs a process and exits likewise if the process exits non-zero, but let the
+/// child process inherit out stdio handles.
+Future<ProcessResult> runProcessInheritStdio(
+    String executable, List<String> arguments,
+    {bool runInShell = false}) async {
+  var process = await Process.start(executable, arguments,
+      mode: ProcessStartMode.inheritStdio, runInShell: runInShell);
+  var exitCode = await process.exitCode;
+  var processResult = ProcessResult(process.pid, exitCode, "", "");
+  if (processResult.exitCode != 0) {
+    var command =
+        [executable, ...arguments].map(simpleShellSingleQuote).join(" ");
+    throw Exception("Command exited ${processResult.exitCode}: $command");
+  }
+  return processResult;
+}
+
+/// Finds the branch of a builder given the list of branches.
+String branchOfBuilder(String builder, List<String> branches) {
+  return branches.where((branch) => branch != "master").firstWhere(
+      (branch) => builder.endsWith("-$branch"),
+      orElse: () => "master");
+}
+
+/// Finds the named configuration to test according to the test matrix
+/// information and the command line options.
+Map<String, Set<Builder>> resolveNamedConfigurations(
+    TestMatrix testMatrix,
+    String requestedBranch,
+    List<String> requestedNamedConfigurations,
+    String requestedBuilder) {
+  assert(requestedBranch != null);
+  var testedConfigurations = <String, Set<Builder>>{};
+  var foundBuilder = false;
+  for (var builder in testMatrix.builders) {
+    if (requestedBuilder != null && builder.name != requestedBuilder) {
+      continue;
+    }
+    var branch = branchOfBuilder(builder.name, testMatrix.branches);
+    if (branch != requestedBranch) {
+      if (requestedBuilder == null) {
+        continue;
+      }
+      stderr.writeln("error: Builder $requestedBuilder is on branch $branch "
+          "rather than $requestedBranch");
+      stderr.writeln("error: To compare with that branch, use: -B $branch");
+      return null;
+    }
+    foundBuilder = true;
+    for (var step in builder.steps.where((step) => step.isTestStep)) {
+      var testedConfiguration = step.testedConfiguration;
+      if (testedConfiguration == null) {
+        // This test step does not use a configuration; for example,
+        // because it is a simple script that does not produce results.
+        continue;
+      }
+      var namedConfiguration = testedConfiguration.name;
+      if (requestedNamedConfigurations.isEmpty ||
+          requestedNamedConfigurations.contains(namedConfiguration)) {
+        testedConfigurations
+            .putIfAbsent(namedConfiguration, () => {})
+            .add(builder);
+      }
+    }
+  }
+  if (requestedBuilder != null && !foundBuilder) {
+    stderr.writeln("error: Builder $requestedBuilder doesn't exist");
+    return null;
+  }
+  if (requestedBuilder != null &&
+      requestedNamedConfigurations.isEmpty &&
+      testedConfigurations.isEmpty) {
+    stderr.writeln("error: Builder $requestedBuilder isn't testing any named "
+        "configurations");
+    return null;
+  }
+  if (requestedNamedConfigurations.isNotEmpty) {
+    var hasUntestedConfiguration = false;
+    for (var requestedConfiguration in requestedNamedConfigurations) {
+      if (!testedConfigurations.containsKey(requestedConfiguration)) {
+        var builder = requestedBuilder != null
+            ? "builder $requestedBuilder"
+            : "any builder";
+        stderr.writeln("error: The named configuration "
+            "$requestedConfiguration isn't tested on $builder");
+        hasUntestedConfiguration = true;
+      }
+    }
+    if (hasUntestedConfiguration) {
+      return null;
+    }
+  }
+
+  return testedConfigurations;
+}
+
+/// Locates the merge base between head and the [branch] on the given [remote].
+Future<String> findMergeBase(String remote, String branch) async {
+  var arguments = ["merge-base", "$remote/$branch", "HEAD"];
+  var result =
+      await Process.run("git", arguments, runInShell: Platform.isWindows);
+
+  var stdout = result.stdout as String;
+  var stderr = result.stderr as String;
+
+  if (result.exitCode != 0) {
+    throw Exception("Failed to run: git ${arguments.join(' ')}\n"
+        "stdout:\n$stdout\n"
+        "stderr:\n$stderr\n");
+  }
+  return LineSplitter.split(stdout).first;
+}
+
+/// Exception thrown when looking up the build for a commit failed.
+class CommitNotBuiltException implements Exception {
+  final String reason;
+
+  CommitNotBuiltException(this.reason);
+
+  String toString() => reason;
+}
+
+/// The result after searching for a build of a commit.
+class BuildSearchResult {
+  final int build;
+  final String commit;
+
+  BuildSearchResult(this.build, this.commit);
+}
+
+/// Locates the build number of the [commit] on the [builder], or throws an
+/// exception if the builder hasn't built the commit.
+Future<BuildSearchResult> searchForBuild(String builder, String commit) async {
+  var requestUrl = Uri.parse(
+      "https://cr-buildbucket.appspot.com/_ah/api/buildbucket/v1/search"
+      "?bucket=luci.dart.ci.sandbox"
+      "&tag=builder%3A$builder"
+      "&tag=buildset%3Acommit%2Fgit%2F$commit"
+      "&fields=builds(status%2Ctags%2Curl)");
+  var client = HttpClient();
+  var request = await client.getUrl(requestUrl);
+  var response = await request.close();
+  var object = await response
+      .cast<List<int>>()
+      .transform(const Utf8Decoder())
+      .transform(const JsonDecoder())
+      .first as Map<String, dynamic>;
+  client.close();
+  var builds = object["builds"] as List<dynamic>;
+  if (builds == null || builds.isEmpty) {
+    throw CommitNotBuiltException(
+        "Builder $builder hasn't built commit $commit");
+  }
+  var build = builds.last;
+  var tags = (build["tags"] as List).cast<String>();
+  var buildAddressTag =
+      tags.firstWhere((tag) => tag.startsWith("build_address:"));
+  var buildAddress = buildAddressTag.substring("build_address:".length);
+  if (build["status"] != "COMPLETED") {
+    throw CommitNotBuiltException("Build $buildAddress isn't completed yet");
+  }
+  return BuildSearchResult(int.parse(buildAddress.split("/").last), commit);
+}
+
+Future<BuildSearchResult> searchForApproximateBuild(
+    String builder, String commit) async {
+  try {
+    return await searchForBuild(builder, commit);
+  } on CommitNotBuiltException catch (e) {
+    print("Warning: $e, searching for an inexact previous build...");
+    var limit = 25;
+    var arguments = [
+      "rev-list",
+      "$commit~$limit..$commit~1",
+      "--first-parent",
+      "--topo-order"
+    ];
+    var processResult = await Process.run("git", arguments, runInShell: true);
+    if (processResult.exitCode != 0) {
+      throw Exception("Failed to list potential commits: git $arguments\n"
+          "exitCode: ${processResult.exitCode}\n"
+          "stdout: ${processResult.stdout}\n"
+          "stdout: ${processResult.stderr}\n");
+    }
+    for (var fallbackCommit
+        in LineSplitter.split(processResult.stdout as String)) {
+      try {
+        return await searchForBuild(builder, fallbackCommit);
+      } catch (e) {
+        print(
+            "Warning: Searching for inexact baseline build: $e, continuing...");
+      }
+    }
+    throw CommitNotBuiltException(
+        "Failed to locate approximate baseline results for "
+        "$commit in past $limit commits");
+  }
+}
+
+void overrideConfiguration(Map<String, Map<String, dynamic>> results,
+    String configuration, String newConfiguration) {
+  results.forEach((String key, Map<String, dynamic> result) {
+    if (result["configuration"] == configuration) {
+      result["configuration"] = newConfiguration;
+    }
+  });
+}
+
+void printUsage(ArgParser parser, {String error, bool printOptions = false}) {
+  if (error != null) {
+    print("$error\n");
+    exitCode = 1;
+  }
+  print("""
+Usage: test.dart -b [BUILDER] -n [CONFIGURATION] [OPTION]... [--]
+                 [TEST.PY OPTION]... [SELECTOR]...
+
+Run tests and compare with the results on the given builder. Either the -n or
+the -b option, or both, must be used. Any options following -- and non-option
+arguments will be forwarded to test.py invocations. The specified named
+configuration's results will be downloaded from the specified builder. If only a
+named configuration is specified, the results are downloaded from the
+appropriate builders. If only a builder is specified, the default named
+configuration is used if the builder only has a single named configuration.
+Otherwise the available named configurations are listed.
+
+See the documentation at https://goto.google.com/dart-status-file-free-workflow
+""");
+  if (printOptions) {
+    print(parser.usage);
+  } else {
+    print("Run test.dart --help to see all options.");
+  }
+}
+
+Future<void> runTests(List<String> args) async {
+  var parser = ArgParser();
+  parser.addOption("builder",
+      abbr: "b", help: "Run tests like on the given builder");
+  parser.addOption("branch",
+      abbr: "B",
+      help: "Select the builders building this branch",
+      defaultsTo: "master");
+  parser.addOption("commit", abbr: "C", help: "Compare with this commit");
+  parser.addFlag("deflake",
+      help: "Re-run failing newly tests $deflakingCount times.");
+  parser.addFlag("report-flakes",
+      help: "Report test failures for tests known to be flaky.\n"
+          "This ignores all flakiness data from CI but flakes\n"
+          "detected by --deflake will remain hidden");
+  parser.addFlag("list-configurations",
+      help: "Output list of configurations.", negatable: false);
+  parser.addMultiOption("named-configuration",
+      abbr: "n",
+      help: "The named test configuration(s) that supplies the\nvalues for all "
+          "test options, specifying how tests\nshould be run.");
+  parser.addOption("local-configuration",
+      abbr: "N",
+      help: "Use a different named configuration for local\ntesting than the "
+          "named configuration the baseline\nresults were downloaded for. The "
+          "results may be\ninexact if the baseline configuration is "
+          "different.");
+  parser.addOption("remote",
+      abbr: "R",
+      help: "Compare with this remote and git branch",
+      defaultsTo: "origin");
+  parser.addFlag("help", help: "Show the program usage.", negatable: false);
+
+  ArgResults options;
+  try {
+    options = parser.parse(args);
+  } on FormatException catch (exception) {
+    printUsage(parser, error: exception.message);
+    return;
+  }
+
+  if (options["help"] as bool) {
+    printUsage(parser, printOptions: true);
+    return;
+  }
+
+  if (options["list-configurations"] as bool) {
+    var process = await Process.start(
+        "python", ["tools/test.py", "--list-configurations"],
+        mode: ProcessStartMode.inheritStdio, runInShell: Platform.isWindows);
+    exitCode = await process.exitCode;
+    return;
+  }
+
+  var requestedBuilder = options["builder"] as String;
+  var requestedNamedConfigurations =
+      (options["named-configuration"] as List).cast<String>();
+  var localConfiguration = options["local-configuration"] as String;
+
+  if (requestedBuilder == null && requestedNamedConfigurations.isEmpty) {
+    printUsage(parser,
+        error: "Please specify either a configuration (-n) or "
+            "a builder (-b)");
+    return;
+  }
+
+  if (localConfiguration != null && requestedNamedConfigurations.length > 1) {
+    printUsage(parser,
+        error: "Local configuration (-N) can only be used with a"
+            " single named configuration (-n)");
+    return;
+  }
+
+  // Locate gsutil.py.
+  gsutilPy =
+      Platform.script.resolve("../third_party/gsutil/gsutil.py").toFilePath();
+
+  // Load the test matrix.
+  var testMatrixPath = Platform.script.resolve("bots/test_matrix.json");
+  var testMatrix = TestMatrix.fromPath(testMatrixPath.toFilePath());
+  // Determine what named configuration to run and which builders to download
+  // existing results from.
+  var testedConfigurations = resolveNamedConfigurations(
+      testMatrix,
+      options["branch"] as String,
+      requestedNamedConfigurations,
+      requestedBuilder);
+  if (testedConfigurations == null) {
+    // No valid configuration could be found. The error has already been
+    // reported by [resolveConfigurations].
+    exitCode = 1;
+    return;
+  }
+  var namedConfigurations = testedConfigurations.keys.toSet().toList();
+  var builders =
+      testedConfigurations.values.expand((builders) => builders).toSet();
+
+  // Print information about the resolved builders to compare with.
+  for (var namedConfiguration in namedConfigurations) {
+    var testedBuilders = testedConfigurations[namedConfiguration];
+    var onWhichBuilders = testedBuilders.length == 1
+        ? "builder ${testedBuilders.single.name}"
+        : "builders${testedBuilders.map((b) => "\n  ${b.name}").join()}";
+    if (localConfiguration != null) {
+      print("Testing named configuration $localConfiguration "
+          "compared with configuration $namedConfiguration "
+          "on $onWhichBuilders");
+    } else {
+      print("Testing named configuration $namedConfiguration "
+          "compared with $onWhichBuilders");
+    }
+  }
+
+  // Use given commit or find out where the current HEAD branched.
+  var commit = options["commit"] as String ??
+      await findMergeBase(
+          options["remote"] as String, options["branch"] as String);
+  print("Base commit is $commit");
+
+  // Store the downloaded results and our test results in a temporary directory.
+  var outDirectory = await Directory.systemTemp.createTemp("test.dart.");
+  try {
+    var tasks = <Future>[];
+    var needsConfigurationOverride = localConfiguration != null &&
+        localConfiguration != namedConfigurations.single;
+    var needsMerge = builders.length > 1;
+    var inexactBuilds = <String, String>{};
+    var previousFileName = "previous.json";
+    var flakyFileName = "flaky.json";
+    var downloadNumber = 0;
+
+    // Download the previous results and flakiness info from cloud storage.
+    for (var builder in builders) {
+      var builderName = builder.name;
+      if (needsMerge) {
+        previousFileName = "previous-$downloadNumber.json";
+        flakyFileName = "flaky-$downloadNumber.json";
+        downloadNumber++;
+      }
+
+      // Use the buildbucket API to search for builds of the right commit.
+      print("Finding build on builder $builderName to compare with...");
+      var buildSearchResult =
+          await searchForApproximateBuild(builderName, commit);
+      if (buildSearchResult.commit != commit) {
+        print("Warning: Using commit ${buildSearchResult.commit} "
+            "as baseline instead of $commit for $builderName");
+        inexactBuilds[builderName] = buildSearchResult.commit;
+      }
+
+      var buildNumber = buildSearchResult.build.toString();
+      print("Downloading results from builder $builderName "
+          "build $buildNumber...");
+      tasks.add(cpGsutil(
+          buildFileCloudPath(builderName, buildNumber, "results.json"),
+          "${outDirectory.path}/$previousFileName"));
+      if (!(options["report-flakes"] as bool)) {
+        tasks.add(cpGsutil(
+            buildFileCloudPath(builderName, buildNumber, "flaky.json"),
+            "${outDirectory.path}/$flakyFileName"));
+      }
+    }
+
+    // Run the tests.
+    var configurationsToRun = localConfiguration != null
+        ? <String>[localConfiguration]
+        : namedConfigurations;
+    print("".padLeft(80, "="));
+    print("Running tests");
+    print("".padLeft(80, "="));
+    await runProcessInheritStdio(
+        "python",
+        [
+          "tools/test.py",
+          "--named-configuration=${configurationsToRun.join(",")}",
+          "--output-directory=${outDirectory.path}",
+          "--clean-exit",
+          "--silent-failures",
+          "--write-results",
+          "--write-logs",
+          ...options.rest,
+        ],
+        runInShell: Platform.isWindows);
+    // Wait for the downloads and the test run to complete.
+    await Future.wait(tasks);
+    // Merge the results and flaky data downloaded from the builders.
+    var mergedResults = <String, Map<String, dynamic>>{};
+    var mergedFlaky = <String, Map<String, dynamic>>{};
+    if (needsMerge || needsConfigurationOverride) {
+      for (var i = 0; i < downloadNumber; ++i) {
+        previousFileName = needsMerge ? "previous-$i.json" : "previous.json";
+        var results =
+            await loadResultsMap("${outDirectory.path}/$previousFileName");
+        if (needsConfigurationOverride) {
+          overrideConfiguration(
+              results, namedConfigurations.single, localConfiguration);
+        }
+        mergedResults.addAll(results);
+        if (!(options["report-flakes"] as bool)) {
+          flakyFileName = needsMerge ? "flaky-$i.json" : "flaky.json";
+          var flakyTests =
+              await loadResultsMap("${outDirectory.path}/$flakyFileName");
+          if (needsConfigurationOverride) {
+            overrideConfiguration(
+                flakyTests, namedConfigurations.single, localConfiguration);
+          }
+          mergedFlaky.addAll(flakyTests);
+        }
+      }
+    }
+    // Write out the merged results for the builders.
+    if (needsMerge || needsConfigurationOverride) {
+      await File("${outDirectory.path}/previous.json").writeAsString(
+          mergedResults.values.map((data) => jsonEncode(data) + "\n").join(""));
+    }
+    // Ensure that there is a flaky.json even if it wasn't downloaded.
+    if (needsMerge ||
+        needsConfigurationOverride ||
+        options["report-flakes"] as bool) {
+      await File("${outDirectory.path}/flaky.json").writeAsString(
+          mergedFlaky.values.map((data) => jsonEncode(data) + "\n").join(""));
+    }
+    // Deflake results of the tests if required.
+    if (options["deflake"] as bool) {
+      await deflake(outDirectory, configurationsToRun, options.rest);
+    }
+    // Write out the final comparison.
+    print("".padLeft(80, "="));
+    print("Test Results");
+    print("".padLeft(80, "="));
+    var compareOutput = await runProcess(Platform.resolvedExecutable, [
+      "tools/bots/compare_results.dart",
+      "--human",
+      "--verbose",
+      "--changed",
+      "--failing",
+      "--passing",
+      "--flakiness-data=${outDirectory.path}/flaky.json",
+      "--logs=${outDirectory.path}/logs.json",
+      "${outDirectory.path}/previous.json",
+      "${outDirectory.path}/results.json",
+    ]);
+    if (compareOutput.stdout == "") {
+      print("There were no test failures.");
+    } else {
+      stdout.write(compareOutput.stdout);
+    }
+    if (inexactBuilds.isNotEmpty) {
+      print("");
+      var builders = inexactBuilds.keys.toList()..sort();
+      for (var builder in builders) {
+        var inexactCommit = inexactBuilds[builder];
+        print("Warning: Results may be inexact because commit $inexactCommit "
+            "was used as the baseline for $builder instead of $commit");
+      }
+    }
+  } finally {
+    await outDirectory.delete(recursive: true);
+  }
+}
+
+Future<void> deflake(Directory outDirectory, List<String> configurations,
+    List<String> testPyArgs) async {
+  // Find the list of tests to deflake.
+  var deflakeListOutput = await runProcess(Platform.resolvedExecutable, [
+    "tools/bots/compare_results.dart",
+    "--changed",
+    "--failing",
+    "--passing",
+    "--flakiness-data=${outDirectory.path}/flaky.json",
+    "${outDirectory.path}/previous.json",
+    "${outDirectory.path}/results.json",
+  ]);
+  var deflakeListPath = "${outDirectory.path}/deflake.list";
+  var deflakeListFile = File(deflakeListPath);
+  await deflakeListFile.writeAsString(deflakeListOutput.stdout as String);
+
+  // Deflake the changed tests.
+  var deflakingResultsPaths = <String>[];
+  for (var i = 1; deflakeListOutput.stdout != "" && i <= deflakingCount; i++) {
+    print("".padLeft(80, "="));
+    print("Running deflaking iteration $i");
+    print("".padLeft(80, "="));
+    var deflakeDirectory = Directory("${outDirectory.path}/$i");
+    await deflakeDirectory.create();
+    var deflakeArguments = [
+      "--named-configuration=${configurations.join(",")}",
+      "--output-directory=${deflakeDirectory.path}",
+      "--clean-exit",
+      "--silent-failures",
+      "--write-results",
+      "--test-list=$deflakeListPath",
+      ...testPyArgs,
+    ];
+
+    await runProcessInheritStdio(
+        "python", ["tools/test.py", ...deflakeArguments],
+        runInShell: Platform.isWindows);
+    deflakingResultsPaths.add("${deflakeDirectory.path}/results.json");
+  }
+
+  // Update the flakiness information based on what we've learned.
+  print("Updating flakiness information...");
+  await runProcess(Platform.resolvedExecutable, [
+    "tools/bots/update_flakiness.dart",
+    "--input=${outDirectory.path}/flaky.json",
+    "--output=${outDirectory.path}/flaky.json",
+    "${outDirectory.path}/results.json",
+    ...deflakingResultsPaths,
+  ]);
+}
diff --git a/pkg/test_runner/test/static_error_test.dart b/pkg/test_runner/test/static_error_test.dart
index 711e69b..a3e9897 100644
--- a/pkg/test_runner/test/static_error_test.dart
+++ b/pkg/test_runner/test/static_error_test.dart
@@ -11,6 +11,7 @@
 void main() {
   testHasError();
   testErrorFor();
+  testIsWarning();
   testIsSpecifiedFor();
   testCompareTo();
   testDescribeDifferences();
@@ -78,6 +79,42 @@
   Expect.equals("Web.", all.errorFor(ErrorSource.web));
 }
 
+void testIsWarning() {
+  // Analyzer only.
+  Expect.isTrue(
+      makeError(analyzerError: "STATIC_WARNING.INVALID_OPTION").isWarning);
+  Expect.isFalse(
+      makeError(analyzerError: "SYNTACTIC_ERROR.MISSING_FUNCTION_BODY")
+          .isWarning);
+  Expect.isFalse(makeError(
+          analyzerError: "COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS")
+      .isWarning);
+
+  // CFE only.
+  Expect.isFalse(makeError(cfeError: "Any error message.").isWarning);
+
+  // Web only.
+  Expect.isFalse(makeError(webError: "Any error message.").isWarning);
+
+  // Multiple front ends.
+  Expect.isFalse(makeError(
+          analyzerError: "STATIC_WARNING.INVALID_OPTION",
+          cfeError: "Any error message.")
+      .isWarning);
+  Expect.isFalse(
+      makeError(cfeError: "Any error message.", webError: "Any error message.")
+          .isWarning);
+  Expect.isFalse(makeError(
+          analyzerError: "STATIC_WARNING.INVALID_OPTION",
+          webError: "Any error message.")
+      .isWarning);
+  Expect.isFalse(makeError(
+          analyzerError: "STATIC_WARNING.INVALID_OPTION",
+          cfeError: "Any error message.",
+          webError: "Any error message.")
+      .isWarning);
+}
+
 void testIsSpecifiedFor() {
   var specifiedAll = makeError(
       line: 1,
diff --git a/pkg/test_runner/test/test_file_test.dart b/pkg/test_runner/test/test_file_test.dart
index 03c1227..251f60d 100644
--- a/pkg/test_runner/test/test_file_test.dart
+++ b/pkg/test_runner/test/test_file_test.dart
@@ -28,6 +28,7 @@
   testParseMultitest();
   testParseErrorFlags();
   testParseErrorExpectations();
+  testIsRuntimeTest();
   testName();
   testMultitest();
   testShardHash();
@@ -460,6 +461,47 @@
     makeError(line: 12, column: 34, length: 56, cfeError: "Message."),
   ]);
 
+  // Allow front ends in any order.
+  expectParseErrorExpectations("""
+int i = "s";
+/\/      ^^^
+/\/ [cfe] Error message.
+/\/ [analyzer] ErrorCode.BAD_THING
+""", [
+    makeError(
+        line: 1,
+        column: 9,
+        length: 3,
+        analyzerError: "ErrorCode.BAD_THING",
+        cfeError: "Error message."),
+  ]);
+  expectParseErrorExpectations("""
+int i = "s";
+/\/      ^^^
+/\/ [web] Web message.
+/\/ [analyzer] ErrorCode.BAD_THING
+""", [
+    makeError(
+        line: 1,
+        column: 9,
+        length: 3,
+        analyzerError: "ErrorCode.BAD_THING",
+        webError: "Web message."),
+  ]);
+  expectParseErrorExpectations("""
+int i = "s";
+/\/      ^^^
+/\/ [web] Web message.
+/\/ [cfe] Error message.
+""", [
+    makeError(
+        line: 1,
+        column: 9,
+        length: 3,
+        cfeError: "Error message.",
+        webError: "Web message."),
+  ]);
+
   // Must have at least one error message.
   expectFormatError("""
 int i = "s";
@@ -489,26 +531,6 @@
 /\/ [wat] Error message.
 """);
 
-  // Front ends must be ordered.
-  expectFormatError("""
-int i = "s";
-/\/      ^^^
-/\/ [cfe] Error message.
-/\/ [analyzer] ErrorCode.BAD_THING
-""");
-  expectFormatError("""
-int i = "s";
-/\/      ^^^
-/\/ [web] Error message.
-/\/ [analyzer] ErrorCode.BAD_THING
-""");
-  expectFormatError("""
-int i = "s";
-/\/      ^^^
-/\/ [web] Error message.
-/\/ [cfe] Error message
-""");
-
   // Analyzer error must look like an error code.
   expectFormatError("""
 int i = "s";
@@ -569,6 +591,53 @@
 """);
 }
 
+void testIsRuntimeTest() {
+  // No static errors at all.
+  var file = parseTestFile("");
+  Expect.isTrue(file.isRuntimeTest);
+
+  // Only warnings.
+  file = parseTestFile("""
+  int i = "s";
+  /\/ ^^^
+  /\/ [analyzer] STATIC_WARNING.INVALID_OPTION
+  /\/ ^^^
+  /\/ [analyzer] STATIC_WARNING.INVALID_OPTION
+  """);
+  Expect.isTrue(file.isRuntimeTest);
+
+  // Errors.
+  file = parseTestFile("""
+  int i = "s";
+  /\/ ^^^
+  /\/ [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS
+  """);
+  Expect.isFalse(file.isRuntimeTest);
+
+  file = parseTestFile("""
+  int i = "s";
+  /\/ ^^^
+  /\/ [cfe] Error message.
+  """);
+  Expect.isFalse(file.isRuntimeTest);
+
+  file = parseTestFile("""
+  int i = "s";
+  /\/ ^^^
+  /\/ [web] Error message.
+  """);
+  Expect.isFalse(file.isRuntimeTest);
+
+  // Mixed errors and warnings.
+  file = parseTestFile("""
+  int i = "s";
+  /\/ ^^^
+  /\/ [analyzer] STATIC_WARNING.INVALID_OPTION
+  /\/ [cfe] Error message.
+  """);
+  Expect.isFalse(file.isRuntimeTest);
+}
+
 void testName() {
   // Immediately inside suite.
   var file = TestFile.parse(Path("suite").absolute,
diff --git a/pkg/test_runner/test/update_errors_test.dart b/pkg/test_runner/test/update_errors_test.dart
index cf51646..6c433625 100644
--- a/pkg/test_runner/test/update_errors_test.dart
+++ b/pkg/test_runner/test/update_errors_test.dart
@@ -1,6 +1,7 @@
 // Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+import 'dart:math' as math;
 
 import 'package:expect/expect.dart';
 
@@ -15,8 +16,8 @@
 // here as significant, so we obfuscate them using seemingly-pointless string
 // escapes here like `\/`.
 
-Future<void> main() async {
-  // Inserts analyzer, CFE, and both errors.
+void main() {
+  // Inserts single-front end errors.
   expectUpdate("""
 int i = "bad";
 
@@ -26,12 +27,7 @@
 """, errors: [
     makeError(line: 1, column: 9, length: 5, analyzerError: "some.error"),
     makeError(line: 3, column: 15, length: 7, cfeError: "Bad."),
-    makeError(
-        line: 5,
-        column: 13,
-        length: 5,
-        analyzerError: "an.error",
-        cfeError: "Wrong.\nLine.\nAnother."),
+    makeError(line: 5, column: 13, length: 5, webError: "Web.\nError."),
   ], expected: """
 int i = "bad";
 /\/      ^^^^^
@@ -43,15 +39,72 @@
 
 int third = "boo";
 /\/          ^^^^^
-/\/ [analyzer] an.error
-/\/ [cfe] Wrong.
-/\/ Line.
-/\/ Another.
+/\/ [web] Web.
+/\/ Error.
+""");
+
+  // Inserts errors for multiple front ends.
+  expectUpdate("""
+int i = "bad";
+
+int another = "wrong";
+
+int third = "boo";
+
+int last = "oops";
+""", errors: [
+    makeError(
+        line: 1,
+        column: 9,
+        length: 5,
+        analyzerError: "some.error",
+        cfeError: "Bad."),
+    makeError(
+        line: 3,
+        column: 15,
+        length: 7,
+        cfeError: "Another bad.",
+        webError: "Web.\nError."),
+    makeError(
+        line: 5,
+        column: 13,
+        length: 5,
+        analyzerError: "third.error",
+        webError: "Web error."),
+    makeError(
+        line: 7,
+        column: 12,
+        length: 6,
+        analyzerError: "last.error",
+        cfeError: "Final.\nError.",
+        webError: "Web error."),
+  ], expected: """
+int i = "bad";
+/\/      ^^^^^
+/\/ [analyzer] some.error
+/\/ [cfe] Bad.
+
+int another = "wrong";
+/\/            ^^^^^^^
+/\/ [cfe] Another bad.
+/\/ [web] Web.
+/\/ Error.
+
+int third = "boo";
+/\/          ^^^^^
+/\/ [analyzer] third.error
+/\/ [web] Web error.
+
+int last = "oops";
+/\/         ^^^^^^
+/\/ [analyzer] last.error
+/\/ [cfe] Final.
+/\/ Error.
+/\/ [web] Web error.
 """);
 
   // Removes only analyzer errors.
-  expectUpdate(
-      """
+  expectUpdate("""
 int i = "bad";
 /\/      ^^^^^
 /\/ [analyzer] some.error
@@ -64,9 +117,7 @@
 /\/          ^^^^^
 /\/ [analyzer] an.error
 /\/ [cfe] Wrong.
-""",
-      removeCfe: false,
-      expected: """
+""", remove: {ErrorSource.analyzer}, expected: """
 int i = "bad";
 
 int another = "wrong";
@@ -79,8 +130,7 @@
 """);
 
   // Removes only CFE errors.
-  expectUpdate(
-      """
+  expectUpdate("""
 int i = "bad";
 /\/      ^^^^^
 /\/ [analyzer] some.error
@@ -93,9 +143,7 @@
 /\/          ^^^^^
 /\/ [analyzer] an.error
 /\/ [cfe] Wrong.
-""",
-      removeAnalyzer: false,
-      expected: """
+""", remove: {ErrorSource.cfe}, expected: """
 int i = "bad";
 /\/      ^^^^^
 /\/ [analyzer] some.error
@@ -107,6 +155,60 @@
 /\/ [analyzer] an.error
 """);
 
+  // Removes only web errors.
+  expectUpdate("""
+int i = "bad";
+/\/      ^^^^^
+/\/ [analyzer] some.error
+
+int another = "wrong";
+/\/            ^^^^^^^
+/\/ [web] Bad.
+
+int third = "boo";
+/\/          ^^^^^
+/\/ [cfe] Error.
+/\/ [web] Wrong.
+""", remove: {ErrorSource.web}, expected: """
+int i = "bad";
+/\/      ^^^^^
+/\/ [analyzer] some.error
+
+int another = "wrong";
+
+int third = "boo";
+/\/          ^^^^^
+/\/ [cfe] Error.
+""");
+
+  // Removes multiple error sources.
+  expectUpdate("""
+int i = "bad";
+/\/      ^^^^^
+/\/ [analyzer] some.error
+/\/ [cfe] CFE error.
+
+int another = "wrong";
+/\/            ^^^^^^^
+/\/ [web] Bad.
+
+int third = "boo";
+/\/          ^^^^^
+/\/ [analyzer] another.error
+/\/ [cfe] Error.
+/\/ [web] Wrong.
+""", remove: {ErrorSource.analyzer, ErrorSource.web}, expected: """
+int i = "bad";
+/\/      ^^^^^
+/\/ [cfe] CFE error.
+
+int another = "wrong";
+
+int third = "boo";
+/\/          ^^^^^
+/\/ [cfe] Error.
+""");
+
   // Preserves previous error's indentation if possible.
   expectUpdate("""
 int i = "bad";
@@ -287,7 +389,7 @@
 /\/ [cfe] Wrong 1.
 """);
 
-  // Don't crash with RangeError.
+  // Doesn't crash with RangeError.
   expectUpdate("""
 x
 // [error line 1, column 1, length 0]
@@ -303,8 +405,7 @@
 
 void regression() {
   // https://github.com/dart-lang/sdk/issues/37990.
-  expectUpdate(
-      """
+  expectUpdate("""
 int get xx => 3;
 int get yy => 3;
 
@@ -325,20 +426,16 @@
 
   }
 }
-""",
-      removeAnalyzer: false,
-      errors: [
-        makeError(
-            line: 6,
-            column: 5,
-            length: 14,
-            cfeError: "Setter not found: 'xx'."),
-        makeError(
-            line: 16,
-            column: 7,
-            cfeError: "The method 'call' isn't defined for the class 'int'.")
-      ],
-      expected: """
+""", remove: {
+    ErrorSource.cfe
+  }, errors: [
+    makeError(
+        line: 6, column: 5, length: 14, cfeError: "Setter not found: 'xx'."),
+    makeError(
+        line: 16,
+        column: 7,
+        cfeError: "The method 'call' isn't defined for the class 'int'.")
+  ], expected: """
 int get xx => 3;
 int get yy => 3;
 
@@ -362,18 +459,62 @@
 }
 
 void expectUpdate(String original,
-    {List<StaticError> errors,
-    bool removeAnalyzer = true,
-    bool removeCfe = true,
-    String expected}) {
+    {List<StaticError> errors, Set<ErrorSource> remove, String expected}) {
   errors ??= const [];
+  remove ??= ErrorSource.all.toSet();
 
-  var actual = updateErrorExpectations(original, errors,
-      removeAnalyzer: removeAnalyzer, removeCfe: removeCfe);
+  var actual = updateErrorExpectations(original, errors, remove: remove);
   if (actual != expected) {
     // Not using Expect.equals() because the diffs it shows aren't helpful for
     // strings this large.
-    Expect.fail("Output did not match expectation. Expected:\n$expected"
-        "\n\nWas:\n$actual");
+    var actualLines = actual.split("\n");
+    var expectedLines = expected.split("\n");
+
+    // Figure out which leading lines do match so we can ignore those and
+    // highlight the offending ones.
+    var matchingActual = <int>{};
+    var matchingExpected = <int>{};
+    for (var i = 0;
+        i < math.min(actualLines.length, expectedLines.length);
+        i++) {
+      if (actualLines[i] != expectedLines[i]) break;
+      matchingActual.add(i);
+      matchingExpected.add(i);
+    }
+
+    // Find which trailing lines are the same so we can hide those too.
+    for (var i = 0;
+        i < math.min(actualLines.length, expectedLines.length);
+        i++) {
+      // Count backwards from the ends of each list.
+      var actualIndex = actualLines.length - i - 1;
+      var expectedIndex = expectedLines.length - i - 1;
+      if (actualLines[actualIndex] != expectedLines[expectedIndex]) break;
+      matchingActual.add(actualIndex);
+      matchingExpected.add(expectedIndex);
+    }
+
+    var buffer = StringBuffer();
+    void writeLine(int index, String line, Set<int> matchingLines) {
+      // Only show the line if it was different from the expectation.
+      if (matchingLines.contains(index)) {
+        buffer.writeln("    : $line");
+      } else {
+        buffer.writeln("${(index + 1).toString().padLeft(4)}: $line");
+      }
+    }
+
+    buffer.writeln("Output did not match expectation. Expected:");
+    for (var i = 0; i < expectedLines.length; i++) {
+      writeLine(i, expectedLines[i], matchingExpected);
+    }
+
+    buffer.writeln();
+    buffer.writeln("Was:");
+    for (var i = 0; i < actualLines.length; i++) {
+      writeLine(i, actualLines[i], matchingActual);
+    }
+
+    Expect.fail(buffer.toString());
   }
 }
diff --git a/pkg/test_runner/test/utils.dart b/pkg/test_runner/test/utils.dart
index e8a87be..8c1e83a 100644
--- a/pkg/test_runner/test/utils.dart
+++ b/pkg/test_runner/test/utils.dart
@@ -26,8 +26,8 @@
     _MockTestSuite(configuration, testFiles);
 
 StaticError makeError(
-    {int line,
-    int column,
+    {int line = 1,
+    int column = 2,
     int length,
     String analyzerError,
     String cfeError,
diff --git a/pkg/test_runner/tool/update_static_error_tests.dart b/pkg/test_runner/tool/update_static_error_tests.dart
index a8017d7..263fc75 100644
--- a/pkg/test_runner/tool/update_static_error_tests.dart
+++ b/pkg/test_runner/tool/update_static_error_tests.dart
@@ -19,6 +19,8 @@
     "Usage: dart update_static_error_tests.dart [flags...] <path glob>";
 
 Future<void> main(List<String> args) async {
+  var sources = ErrorSource.all.map((e) => e.marker).toList();
+
   var parser = ArgParser();
 
   parser.addFlag("help", abbr: "h");
@@ -28,41 +30,32 @@
       help: "Print result but do not overwrite any files.",
       negatable: false);
 
-  parser.addSeparator("Strip expectations out of the tests:");
-  parser.addFlag("remove",
+  parser.addSeparator("What operations to perform:");
+  parser.addFlag("remove-all",
       abbr: "r",
       help: "Remove all existing error expectations.",
       negatable: false);
-  parser.addFlag("remove-analyzer",
-      help: "Remove existing analyzer error expectations.", negatable: false);
-  parser.addFlag("remove-cfe",
-      help: "Remove existing CFE error expectations.", negatable: false);
-
-  parser.addSeparator(
-      "Insert expectations in the tests based on current front end output:");
-  parser.addFlag("insert",
+  parser.addMultiOption("remove",
+      help: "Remove error expectations for given front ends.",
+      allowed: sources);
+  parser.addFlag("insert-all",
       abbr: "i",
-      help: "Insert analyzer and CFE error expectations.",
+      help: "Insert error expectations for all front ends.",
       negatable: false);
-  parser.addFlag("insert-analyzer",
-      help: "Insert analyzer error expectations.", negatable: false);
-  parser.addFlag("insert-cfe",
-      help: "Insert CFE error expectations.", negatable: false);
-
-  parser.addSeparator("Update combines remove and insert:");
-  parser.addFlag("update",
+  parser.addMultiOption("insert",
+      help: "Insert error expectations from given front ends.",
+      allowed: sources);
+  parser.addFlag("update-all",
       abbr: "u",
-      help: "Replace analyzer and CFE error expectations.",
+      help: "Replace error expectations for all front ends.",
       negatable: false);
-  parser.addFlag("update-analyzer",
-      help: "Replace analyzer error expectations.", negatable: false);
-  parser.addFlag("update-cfe",
-      help: "Replace CFE error expectations.", negatable: false);
+  parser.addMultiOption("update",
+      help: "Update error expectations for given front ends.",
+      allowed: sources);
 
   parser.addSeparator("Other flags:");
-  parser.addFlag("nnbd",
-      help: "Analyze with the 'non-nullable' experiment enabled.",
-      negatable: false);
+  parser.addFlag("null-safety",
+      help: "Enable the 'non-nullable' experiment.", negatable: false);
 
   var results = parser.parse(args);
 
@@ -76,29 +69,38 @@
   }
 
   var dryRun = results["dry-run"] as bool;
-  var removeAnalyzer = results["remove-analyzer"] as bool ||
-      results["remove"] as bool ||
-      results["update-analyzer"] as bool ||
-      results["update"] as bool;
+  var nullSafety = results["null-safety"] as bool;
 
-  var removeCfe = results["remove-cfe"] as bool ||
-      results["remove"] as bool ||
-      results["update-cfe"] as bool ||
-      results["update"] as bool;
+  var removeSources = <ErrorSource>{};
+  var insertSources = <ErrorSource>{};
 
-  var insertAnalyzer = results["insert-analyzer"] as bool ||
-      results["insert"] as bool ||
-      results["update-analyzer"] as bool ||
-      results["update"] as bool;
+  for (var source in results["remove"] as List<String>) {
+    removeSources.add(ErrorSource.find(source));
+  }
 
-  var insertCfe = results["insert-cfe"] as bool ||
-      results["insert"] as bool ||
-      results["update-cfe"] as bool ||
-      results["update"] as bool;
+  for (var source in results["insert"] as List<String>) {
+    insertSources.add(ErrorSource.find(source));
+  }
 
-  var nnbd = results["nnbd"] as bool;
+  for (var source in results["update"] as List<String>) {
+    removeSources.add(ErrorSource.find(source));
+    insertSources.add(ErrorSource.find(source));
+  }
 
-  if (!removeAnalyzer && !removeCfe && !insertAnalyzer && !insertCfe) {
+  if (results["remove-all"] as bool) {
+    removeSources.addAll(ErrorSource.all);
+  }
+
+  if (results["insert-all"] as bool) {
+    insertSources.addAll(ErrorSource.all);
+  }
+
+  if (results["update-all"] as bool) {
+    removeSources.addAll(ErrorSource.all);
+    insertSources.addAll(ErrorSource.all);
+  }
+
+  if (removeSources.isEmpty && insertSources.isEmpty) {
     _usageError(
         parser, "Must provide at least one flag for an operation to perform.");
   }
@@ -109,11 +111,13 @@
   }
 
   var result = results.rest.single;
+
   // Allow tests to be specified without the extension for compatibility with
   // the regular test runner syntax.
   if (!result.endsWith(".dart")) {
     result += ".dart";
   }
+
   // Allow tests to be specified either relative to the "tests" directory
   // or relative to the current directory.
   var root = result.startsWith("tests") ? "." : "tests";
@@ -124,17 +128,15 @@
     if (entry is File) {
       await _processFile(entry,
           dryRun: dryRun,
-          removeAnalyzer: removeAnalyzer,
-          removeCfe: removeCfe,
-          insertAnalyzer: insertAnalyzer,
-          insertCfe: insertCfe,
-          nnbd: nnbd);
+          remove: removeSources,
+          insert: insertSources,
+          nullSafety: nullSafety);
     }
   }
 }
 
 void _usageError(ArgParser parser, String message) {
-  stderr.writeln("Usage error: $message");
+  stderr.writeln(message);
   stderr.writeln();
   stderr.writeln(_usage);
   stderr.writeln(parser.usage);
@@ -143,17 +145,15 @@
 
 Future<void> _processFile(File file,
     {bool dryRun,
-    bool removeAnalyzer,
-    bool removeCfe,
-    bool insertAnalyzer,
-    bool insertCfe,
-    bool nnbd}) async {
+    Set<ErrorSource> remove,
+    Set<ErrorSource> insert,
+    bool nullSafety}) async {
   stdout.write("${file.path}...");
   var source = file.readAsStringSync();
   var testFile = TestFile.parse(Path("."), file.absolute.path, source);
 
   var experiments = [
-    if (nnbd) "non-nullable",
+    if (nullSafety) "non-nullable",
     if (testFile.experiments.isNotEmpty) ...testFile.experiments
   ];
 
@@ -163,7 +163,7 @@
   ];
 
   var errors = <StaticError>[];
-  if (insertAnalyzer) {
+  if (insert.contains(ErrorSource.analyzer)) {
     stdout.write("\r${file.path} (Running analyzer...)");
     var fileErrors = await runAnalyzer(file.absolute.path, options);
     if (fileErrors == null) {
@@ -173,7 +173,7 @@
     }
   }
 
-  if (insertCfe) {
+  if (insert.contains(ErrorSource.cfe)) {
     // Clear the previous line.
     stdout.write("\r${file.path}                      ");
     stdout.write("\r${file.path} (Running CFE...)");
@@ -185,10 +185,13 @@
     }
   }
 
+  if (insert.contains(ErrorSource.web)) {
+    // TODO(rnystrom): Run DDC and collect web errors.
+  }
+
   errors = StaticError.simplify(errors);
 
-  var result = updateErrorExpectations(source, errors,
-      removeAnalyzer: removeAnalyzer, removeCfe: removeCfe);
+  var result = updateErrorExpectations(source, errors, remove: remove);
 
   stdout.writeln("\r${file.path} (Updated with ${errors.length} errors)");
 
diff --git a/pkg/testing/lib/src/analyze.dart b/pkg/testing/lib/src/analyze.dart
index fd4d17f..0faf99f 100644
--- a/pkg/testing/lib/src/analyze.dart
+++ b/pkg/testing/lib/src/analyze.dart
@@ -218,7 +218,7 @@
   List<String> arguments = <String>[
     "--packages=${toFilePath(packages)}",
     "--format=machine",
-    "--dart-sdk=${Uri.base.resolve('sdk/').toFilePath()}",
+    "--dart-sdk=${_findSdkPath()}",
   ];
   if (analysisOptions != null) {
     arguments.add("--options=${toFilePath(analysisOptions)}");
@@ -274,6 +274,18 @@
   }
 }
 
+String _findSdkPath() {
+  var executableUri = Uri.file(Platform.executable);
+  if (File.fromUri(executableUri.resolve('../version')).existsSync()) {
+    return executableUri.resolve('..').toFilePath();
+  } else if (File.fromUri(executableUri.resolve('dart-sdk/version'))
+      .existsSync()) {
+    return executableUri.resolve('dart-sdk').toFilePath();
+  } else {
+    throw StateError('Cannot find dart-sdk for $executableUri');
+  }
+}
+
 Future<String> git(String command, Iterable<String> arguments,
     {String workingDirectory}) async {
   ProcessResult result = await Process.run(
diff --git a/pkg/vm/bin/dump_bytecode_ngrams.dart b/pkg/vm/bin/dump_bytecode_ngrams.dart
index dead72c..50ec2a4 100644
--- a/pkg/vm/bin/dump_bytecode_ngrams.dart
+++ b/pkg/vm/bin/dump_bytecode_ngrams.dart
@@ -36,11 +36,11 @@
 
 const int _badUsageExitCode = 1;
 
-int main(List<String> arguments) {
+void main(List<String> arguments) {
   final ArgResults options = _argParser.parse(arguments);
   if ((options.rest.length != 1) || (options['output'] == null)) {
     print(_usage);
-    return _badUsageExitCode;
+    io.exit(_badUsageExitCode);
   }
 
   final basicBlocks = options['basic-blocks'];
@@ -54,12 +54,11 @@
   if (!(new io.File(input).existsSync())) {
     print("The file '$input' does not exist");
     print(_usage);
-    return _badUsageExitCode;
+    io.exit(_badUsageExitCode);
   }
 
   NGramReader nGramReader = new NGramReader(input);
   nGramReader.readAllNGrams(windowSize,
       basicBlocks: basicBlocks, mergePushes: mergePushes);
   nGramReader.writeNGramStats(output, sort: sort, minCount: threshold);
-  return 0;
 }
diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart
index 021c858..f0bda92 100644
--- a/pkg/vm/bin/kernel_service.dart
+++ b/pkg/vm/bin/kernel_service.dart
@@ -84,10 +84,10 @@
 // Null Safety command line options
 //
 // Note: The values of these constants must match the
-// values of flag null_safety in ../../../../runtime/vm/flag_list.h.
-// 0 - No null_safety option specified on the command line.
-// 1 - '--no-null-safety' specified on the command line.
-// 2 - '--null-safety' option specified on the command line.
+// values of flag sound_null_safety in ../../../../runtime/vm/flag_list.h.
+// 0 - No --[no-]sound-null-safety option specified on the command line.
+// 1 - '--no-sound-null-safety' specified on the command line.
+// 2 - '--sound-null-safety' option specified on the command line.
 const int kNullSafetyOptionUnspecified = 0;
 const int kNullSafetyOptionWeak = 1;
 const int kNullSafetyOptionStrong = 2;
@@ -363,7 +363,8 @@
         suppressWarnings: suppressWarnings,
         enableAsserts: enableAsserts,
         experimentalFlags: experimentalFlags,
-        bytecode: bytecode);
+        bytecode: bytecode,
+        packageConfig: packageConfig);
     result.generator = new IncrementalCompiler.forExpressionCompilationOnly(
         component,
         result.options,
@@ -538,19 +539,20 @@
 Future _processExpressionCompilationRequest(request) async {
   final SendPort port = request[1];
   final int isolateId = request[2];
-  final String expression = request[3];
-  final List<String> definitions = request[4].cast<String>();
-  final List<String> typeDefinitions = request[5].cast<String>();
-  final String libraryUri = request[6];
-  final String klass = request[7]; // might be null
-  final bool isStatic = request[8];
-  final List dillData = request[9];
-  final int hotReloadCount = request[10];
-  final bool suppressWarnings = request[11];
-  final bool enableAsserts = request[12];
+  final dynamic dart_platform_kernel = request[3];
+  final String expression = request[4];
+  final List<String> definitions = request[5].cast<String>();
+  final List<String> typeDefinitions = request[6].cast<String>();
+  final String libraryUri = request[7];
+  final String klass = request[8]; // might be null
+  final bool isStatic = request[9];
+  final List dillData = request[10];
+  final int blobLoadCount = request[11];
+  final bool suppressWarnings = request[12];
+  final bool enableAsserts = request[13];
   final List<String> experimentalFlags =
-      request[13] != null ? request[13].cast<String>() : null;
-  final bool bytecode = request[14];
+      request[14] != null ? request[14].cast<String>() : null;
+  final bool bytecode = request[15];
 
   IncrementalCompilerWrapper compiler = isolateCompilers[isolateId];
 
@@ -558,7 +560,7 @@
       isolateLoadNotifies[isolateId];
   if (isolateLoadDillData != null) {
     // Check if we can reuse the compiler.
-    if (isolateLoadDillData.hotReloadCount != hotReloadCount ||
+    if (isolateLoadDillData.blobLoadCount != blobLoadCount ||
         isolateLoadDillData.prevDillCount != dillData.length) {
       compiler = isolateCompilers[isolateId] = null;
     }
@@ -571,25 +573,55 @@
       }
       isolateLoadNotifies[isolateId] =
           new _ExpressionCompilationFromDillSettings(
-              hotReloadCount, dillData.length);
-
-      Uri platformUri =
-          computePlatformBinariesLocation().resolve('vm_platform_strong.dill');
-
-      List<List<int>> data = [];
-      data.add(new File.fromUri(platformUri).readAsBytesSync());
-      for (int i = 0; i < dillData.length; i++) {
-        data.add(dillData[i]);
-      }
+              blobLoadCount, dillData.length);
 
       // Create Component initialized from the bytes.
       Component component = new Component();
-      for (List<int> bytes in data) {
+
+      // First try to just load all "dillData". This *might* include the
+      // platform (and we might have the (same) platform both here and in
+      // dart_platform_kernel).
+      for (List<int> bytes in dillData) {
         // TODO(jensj): There might be an issue if main has changed.
         new BinaryBuilderWithMetadata(bytes, alwaysCreateNewNamedNodes: true)
             .readComponent(component);
       }
 
+      // Check if the loaded component has the platform.
+      // If it does not, try to load from dart_platform_kernel or from file.
+      bool foundDartCore = false;
+      for (Library library in component.libraries) {
+        if (library.importUri.scheme == "dart" &&
+            library.importUri.path == "core" &&
+            !library.isSynthetic) {
+          foundDartCore = true;
+          break;
+        }
+      }
+      if (!foundDartCore) {
+        List<int> platformKernel = null;
+        if (dart_platform_kernel is List<int>) {
+          platformKernel = dart_platform_kernel;
+        } else {
+          final Uri platformUri = computePlatformBinariesLocation()
+              .resolve('vm_platform_strong.dill');
+          final File platformFile = new File.fromUri(platformUri);
+          if (platformFile.existsSync()) {
+            platformKernel = platformFile.readAsBytesSync();
+          } else {
+            port.send(new CompilationResult.errors(
+                    ["No platform found to initialize incremental compiler."],
+                    null)
+                .toResponse());
+            return;
+          }
+        }
+
+        new BinaryBuilderWithMetadata(platformKernel,
+                alwaysCreateNewNamedNodes: true)
+            .readComponent(component);
+      }
+
       FileSystem fileSystem =
           _buildFileSystem([dotPackagesFile, <int>[]], null, null, null);
 
@@ -597,17 +629,26 @@
       // destroyed when corresponding isolate is shut down. To achieve that
       // kernel isolate needs to receive a message indicating that particular
       // isolate was shut down. Message should be handled here in this script.
-      compiler = new IncrementalCompilerWrapper.forExpressionCompilationOnly(
-          component, isolateId, fileSystem, null,
-          suppressWarnings: suppressWarnings,
-          enableAsserts: enableAsserts,
-          experimentalFlags: experimentalFlags,
-          bytecode: bytecode,
-          packageConfig: dotPackagesFile);
-      isolateCompilers[isolateId] = compiler;
-      await compiler.compile(
-          component.mainMethod?.enclosingLibrary?.importUri ??
-              component.libraries.last.importUri);
+      try {
+        compiler = new IncrementalCompilerWrapper.forExpressionCompilationOnly(
+            component, isolateId, fileSystem, null,
+            suppressWarnings: suppressWarnings,
+            enableAsserts: enableAsserts,
+            experimentalFlags: experimentalFlags,
+            bytecode: bytecode,
+            packageConfig: dotPackagesFile);
+        isolateCompilers[isolateId] = compiler;
+        await compiler.compile(
+            component.mainMethod?.enclosingLibrary?.importUri ??
+                component.libraries.last.importUri);
+      } catch (e) {
+        port.send(new CompilationResult.errors([
+          "Error when trying to create a compiler for expression compilation: "
+              "'$e'."
+        ], null)
+            .toResponse());
+        return;
+      }
     }
   }
 
@@ -1179,9 +1220,9 @@
 }
 
 class _ExpressionCompilationFromDillSettings {
-  int hotReloadCount;
+  int blobLoadCount;
   int prevDillCount;
 
   _ExpressionCompilationFromDillSettings(
-      this.hotReloadCount, this.prevDillCount);
+      this.blobLoadCount, this.prevDillCount);
 }
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index 6a2d435..88cff2c 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -1488,7 +1488,9 @@
     for (int i = 0; i < typeArgs.length; ++i) {
       final typeArg = typeArgs[i];
       if (!(typeArg is TypeParameterType &&
-          typeArg.parameter == functionTypeParameters[i])) {
+          typeArg.parameter == functionTypeParameters[i] &&
+          (typeArg.nullability == Nullability.nonNullable ||
+              typeArg.nullability == Nullability.undetermined))) {
         return false;
       }
     }
@@ -4385,7 +4387,12 @@
       tryBlock.types.add(cp.addType(catchClause.guard));
 
       Label skipCatch;
-      if (catchClause.guard == const DynamicType()) {
+      final guardType = catchClause.guard;
+      // Exception objects are guaranteed to be non-nullable, so
+      // non-nullable Object is also a catch-all type.
+      if (guardType is DynamicType ||
+          (guardType is InterfaceType &&
+              guardType.classNode == coreTypes.objectClass)) {
         hasCatchAll = true;
       } else {
         asm.emitPush(exception);
diff --git a/pkg/vm/lib/bytecode/object_table.dart b/pkg/vm/lib/bytecode/object_table.dart
index 338bb5f..734c26e 100644
--- a/pkg/vm/lib/bytecode/object_table.dart
+++ b/pkg/vm/lib/bytecode/object_table.dart
@@ -335,6 +335,20 @@
 String objectKindToString(ObjectKind kind) =>
     kind.toString().substring('ObjectKind.k'.length);
 
+String nullabilityToString(Nullability nullability) {
+  switch (nullability) {
+    case Nullability.legacy:
+      return '*';
+    case Nullability.nullable:
+      return '?';
+    case Nullability.undetermined:
+      return '%';
+    case Nullability.nonNullable:
+      return '';
+  }
+  throw "Unknown Nullability: $nullability";
+}
+
 /// Represents object (library, class, member, closure, type or name) in the
 /// object table.
 abstract class ObjectHandle extends BytecodeObject {
@@ -763,8 +777,7 @@
       other is _NeverTypeHandle && this.nullability == other.nullability;
 
   @override
-  // TODO(regis): Print nullability.
-  String toString() => 'Never';
+  String toString() => 'Never${nullabilityToString(nullability)}';
 }
 
 class _SimpleTypeHandle extends _TypeHandle {
@@ -803,8 +816,7 @@
       this.nullability == other.nullability;
 
   @override
-  // TODO(regis): Print nullability.
-  String toString() => '$class_';
+  String toString() => '$class_${nullabilityToString(nullability)}';
 }
 
 class _TypeParameterHandle extends _TypeHandle {
@@ -857,8 +869,8 @@
       this.nullability == other.nullability;
 
   @override
-  // TODO(regis): Print nullability.
-  String toString() => '$parent::TypeParam/$indexInParent';
+  String toString() =>
+      '$parent::TypeParam/$indexInParent${nullabilityToString(nullability)}';
 }
 
 class _GenericTypeHandle extends _TypeHandle {
@@ -903,8 +915,7 @@
       this.nullability == other.nullability;
 
   @override
-  // TODO(regis): Print nullability.
-  String toString() => '$class_ $typeArgs';
+  String toString() => '$class_ $typeArgs${nullabilityToString(nullability)}';
 }
 
 class _RecursiveGenericTypeHandle extends _TypeHandle {
@@ -956,8 +967,8 @@
       this.nullability == other.nullability;
 
   @override
-  // TODO(regis): Print nullability.
-  String toString() => '(recursive #$id) $class_ $typeArgs';
+  String toString() =>
+      '(recursive #$id) $class_ $typeArgs${nullabilityToString(nullability)}';
 }
 
 class _RecursiveTypeRefHandle extends _TypeHandle {
@@ -1009,7 +1020,6 @@
       this.type == other.type;
 
   @override
-  // TODO(regis): Print nullability.
   String toString() => '$type ${name.name}';
 }
 
@@ -1139,6 +1149,7 @@
     hash = _combineHashes(hash, listHashCode(positionalParams));
     hash = _combineHashes(hash, listHashCode(namedParams));
     hash = _combineHashes(hash, returnType.hashCode);
+    hash = _combineHashes(hash, nullability.index);
     return hash;
   }
 
@@ -1149,10 +1160,10 @@
       this.numRequiredParams == other.numRequiredParams &&
       listEquals(this.positionalParams, other.positionalParams) &&
       listEquals(this.namedParams, other.namedParams) &&
-      this.returnType == other.returnType;
+      this.returnType == other.returnType &&
+      this.nullability == other.nullability;
 
   @override
-  // TODO(regis): Print nullability.
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('FunctionType');
@@ -1173,7 +1184,7 @@
       }
       sb.write('{ ${namedParams.join(', ')} }');
     }
-    sb.write(') -> ');
+    sb.write(')${nullabilityToString(nullability)} -> ');
     sb.write(returnType);
     return sb.toString();
   }
diff --git a/pkg/vm/lib/kernel_front_end.dart b/pkg/vm/lib/kernel_front_end.dart
index 06cc08b..254c56e 100644
--- a/pkg/vm/lib/kernel_front_end.dart
+++ b/pkg/vm/lib/kernel_front_end.dart
@@ -6,7 +6,7 @@
 library vm.kernel_front_end;
 
 import 'dart:async';
-import 'dart:io' show File, IOSink, IOException;
+import 'dart:io' show File, IOSink;
 
 import 'package:args/args.dart' show ArgParser, ArgResults;
 
@@ -28,7 +28,6 @@
         ExperimentalFlag,
         FileSystem,
         FileSystemEntity,
-        FileSystemException,
         NnbdMode,
         ProcessedOptions,
         Severity,
@@ -46,6 +45,7 @@
 import 'package:kernel/core_types.dart' show CoreTypes;
 import 'package:kernel/kernel.dart' show loadComponentFromBinary;
 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget;
+import 'package:package_config/package_config.dart' show loadPackageConfigUri;
 
 import 'bytecode/bytecode_serialization.dart' show BytecodeSizeStatistics;
 import 'bytecode/gen_bytecode.dart'
@@ -118,10 +118,8 @@
       help: 'The values for the environment constants (e.g. -Dkey=value).');
   args.addFlag('enable-asserts',
       help: 'Whether asserts will be enabled.', defaultsTo: false);
-  args.addFlag('null-safety',
-      help:
-          'Respect the nullability of types at runtime in casts and instance checks.',
-      defaultsTo: null);
+  args.addFlag('sound-null-safety',
+      help: 'Respect the nullability of types at runtime.', defaultsTo: null);
   args.addFlag('split-output-by-packages',
       help:
           'Split resulting kernel file into multiple files (one per package).',
@@ -189,7 +187,7 @@
   final bool genBytecode = options['gen-bytecode'];
   final bool dropAST = options['drop-ast'];
   final bool enableAsserts = options['enable-asserts'];
-  final bool nullSafety = options['null-safety'];
+  final bool nullSafety = options['sound-null-safety'];
   final bool useProtobufTreeShaker = options['protobuf-tree-shaker'];
   final bool useProtobufTreeShakerV2 = options['protobuf-tree-shaker-v2'];
   final bool splitOutputByPackages = options['split-output-by-packages'];
@@ -664,48 +662,22 @@
 }
 
 /// Convert URI to a package URI if it is inside one of the packages.
+/// TODO(alexmarkov) Remove this conversion after Fuchsia build rules are fixed.
 Future<Uri> convertToPackageUri(
     FileSystem fileSystem, Uri uri, Uri packagesUri) async {
   if (uri.scheme == 'package') {
     return uri;
   }
   // Convert virtual URI to a real file URI.
-  String uriString = (await asFileUri(fileSystem, uri)).toString();
-  List<String> packages;
+  final Uri fileUri = await asFileUri(fileSystem, uri);
   try {
-    packages =
-        await new File((await asFileUri(fileSystem, packagesUri)).toFilePath())
-            .readAsLines();
-  } on IOException {
+    final packageConfig =
+        await loadPackageConfigUri(await asFileUri(fileSystem, packagesUri));
+    return packageConfig.toPackageUri(fileUri) ?? uri;
+  } catch (_) {
     // Can't read packages file - silently give up.
     return uri;
   }
-  // file:///a/b/x/y/main.dart -> package:x.y/main.dart
-  for (var line in packages) {
-    if (line.isEmpty || line.startsWith("#")) {
-      continue;
-    }
-
-    final colon = line.indexOf(':');
-    if (colon == -1) {
-      continue;
-    }
-    final packageName = line.substring(0, colon);
-    String packagePath;
-    try {
-      packagePath = (await asFileUri(
-              fileSystem, packagesUri.resolve(line.substring(colon + 1))))
-          .toString();
-    } on FileSystemException {
-      // Can't resolve package path.
-      continue;
-    }
-    if (uriString.startsWith(packagePath)) {
-      return Uri.parse(
-          'package:$packageName/${uriString.substring(packagePath.length)}');
-    }
-  }
-  return uri;
 }
 
 /// Write a separate kernel binary for each package. The name of the
diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart
index 8bcbb48..82af071 100644
--- a/pkg/vm/lib/target/vm.dart
+++ b/pkg/vm/lib/target/vm.dart
@@ -233,7 +233,7 @@
     bool isGetter = false, isSetter = false, isMethod = false;
     if (name.startsWith("set:")) {
       isSetter = true;
-      name = name.substring(4) + "=";
+      name = name.substring(4);
     } else if (name.startsWith("get:")) {
       isGetter = true;
       name = name.substring(4);
diff --git a/pkg/vm/lib/transformations/list_factory_specializer.dart b/pkg/vm/lib/transformations/list_factory_specializer.dart
index a759199..37417ca 100644
--- a/pkg/vm/lib/transformations/list_factory_specializer.dart
+++ b/pkg/vm/lib/transformations/list_factory_specializer.dart
@@ -16,33 +16,47 @@
 /// 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)
+/// new List.generate(n, y) => new _GrowableList.generate(n, y)
+/// new List.generate(n, y, growable: false) => new _List.generate(n, y)
 ///
 class ListFactorySpecializer {
   final Procedure _defaultListFactory;
   final Procedure _listFilledFactory;
+  final Procedure _listGenerateFactory;
   final Procedure _growableListFactory;
   final Procedure _growableListFilledFactory;
+  final Procedure _growableListGenerateFactory;
   final Procedure _fixedListFactory;
   final Procedure _fixedListFilledFactory;
+  final Procedure _fixedListGenerateFactory;
 
   ListFactorySpecializer(CoreTypes coreTypes)
       : _defaultListFactory =
             coreTypes.index.getMember('dart:core', 'List', ''),
         _listFilledFactory =
             coreTypes.index.getMember('dart:core', 'List', 'filled'),
+        _listGenerateFactory =
+            coreTypes.index.getMember('dart:core', 'List', 'generate'),
         _growableListFactory =
             coreTypes.index.getMember('dart:core', '_GrowableList', ''),
         _growableListFilledFactory =
             coreTypes.index.getMember('dart:core', '_GrowableList', 'filled'),
+        _growableListGenerateFactory =
+            coreTypes.index.getMember('dart:core', '_GrowableList', 'generate'),
         _fixedListFactory = coreTypes.index.getMember('dart:core', '_List', ''),
         _fixedListFilledFactory =
-            coreTypes.index.getMember('dart:core', '_List', 'filled') {
+            coreTypes.index.getMember('dart:core', '_List', 'filled'),
+        _fixedListGenerateFactory =
+            coreTypes.index.getMember('dart:core', '_List', 'generate') {
     assert(_defaultListFactory.isFactory);
     assert(_listFilledFactory.isFactory);
+    assert(_listGenerateFactory.isFactory);
     assert(_growableListFactory.isFactory);
     assert(_growableListFilledFactory.isFactory);
+    assert(_growableListGenerateFactory.isFactory);
     assert(_fixedListFactory.isFactory);
     assert(_fixedListFilledFactory.isFactory);
+    assert(_fixedListGenerateFactory.isFactory);
   }
 
   TreeNode transformStaticInvocation(StaticInvocation node) {
@@ -64,25 +78,10 @@
       final fill = args.positional[1];
       final fillingWithNull = fill is NullLiteral ||
           (fill is ConstantExpression && fill.constant is NullConstant);
-      bool growable;
-      if (args.named.isEmpty) {
-        growable = false;
-      } else {
-        final namedArg = args.named.single;
-        assert(namedArg.name == 'growable');
-        final value = namedArg.value;
-        if (value is BoolLiteral) {
-          growable = value.value;
-        } else if (value is ConstantExpression) {
-          final constant = value.constant;
-          if (constant is BoolConstant) {
-            growable = constant.value;
-          } else {
-            return node;
-          }
-        } else {
-          return node;
-        }
+      final bool growable =
+          _getConstantOptionalArgument(args, 'growable', false);
+      if (growable == null) {
+        return node;
       }
       if (growable) {
         if (fillingWithNull) {
@@ -105,8 +104,49 @@
             ..fileOffset = node.fileOffset;
         }
       }
+    } else if (target == _listGenerateFactory) {
+      final args = node.arguments;
+      assert(args.positional.length == 2);
+      final length = args.positional[0];
+      final generator = args.positional[1];
+      final bool growable =
+          _getConstantOptionalArgument(args, 'growable', true);
+      if (growable == null) {
+        return node;
+      }
+      if (growable) {
+        return StaticInvocation(_growableListGenerateFactory,
+            Arguments([length, generator], types: args.types))
+          ..fileOffset = node.fileOffset;
+      } else {
+        return StaticInvocation(_fixedListGenerateFactory,
+            Arguments([length, generator], types: args.types))
+          ..fileOffset = node.fileOffset;
+      }
     }
 
     return node;
   }
+
+  /// Returns constant value of the only optional argument in [args],
+  /// or null if it is not a constant. Returns [defaultValue] if optional
+  /// argument is not passed. Argument is asserted to have the given [name].
+  bool /*?*/ _getConstantOptionalArgument(
+      Arguments args, String name, bool defaultValue) {
+    if (args.named.isEmpty) {
+      return defaultValue;
+    }
+    final namedArg = args.named.single;
+    assert(namedArg.name == name);
+    final value = namedArg.value;
+    if (value is BoolLiteral) {
+      return value.value;
+    } else if (value is ConstantExpression) {
+      final constant = value.constant;
+      if (constant is BoolConstant) {
+        return constant.value;
+      }
+    }
+    return null;
+  }
 }
diff --git a/pkg/vm/lib/transformations/mixin_deduplication.dart b/pkg/vm/lib/transformations/mixin_deduplication.dart
index 61d0a9d..42e74cd 100644
--- a/pkg/vm/lib/transformations/mixin_deduplication.dart
+++ b/pkg/vm/lib/transformations/mixin_deduplication.dart
@@ -56,11 +56,14 @@
           otherClass.typeParameters.isNotEmpty) {
         return false;
       }
-      // Deduplicate mixin applications with matching supertype, mixed-in type
-      // and implemented interfaces.
+      // Deduplicate mixin applications with matching supertype, mixed-in type,
+      // implemented interfaces and NNBD mode (CFE may add extra signature
+      // members depending on the NNBD mode).
       return thisClass.supertype == otherClass.supertype &&
           thisClass.mixedInType == otherClass.mixedInType &&
-          listEquals(thisClass.implementedTypes, otherClass.implementedTypes);
+          listEquals(thisClass.implementedTypes, otherClass.implementedTypes) &&
+          thisClass.enclosingLibrary.isNonNullableByDefault ==
+              otherClass.enclosingLibrary.isNonNullableByDefault;
     }
     return false;
   }
diff --git a/pkg/vm/lib/transformations/type_flow/summary_collector.dart b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
index 43c9e3e..d76503d 100644
--- a/pkg/vm/lib/transformations/type_flow/summary_collector.dart
+++ b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
@@ -762,6 +762,13 @@
         }
       }
 
+      if (member.name.name == '==') {
+        // In addition to what is returned from the function body,
+        // operator == performs implicit comparison with null
+        // and returns bool.
+        _returnValue.values.add(_boolType);
+      }
+
       _summary.result = _returnValue;
     }
 
diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart
index 0509644..14ddeb8 100644
--- a/pkg/vm/lib/transformations/type_flow/transformer.dart
+++ b/pkg/vm/lib/transformations/type_flow/transformer.dart
@@ -309,6 +309,13 @@
     if (_typeFlowAnalysis.isMemberUsed(member)) {
       if (member is Field) {
         _setInferredType(member, _typeFlowAnalysis.fieldType(member));
+
+        final unboxingInfoMetadata =
+            _unboxingInfo.getUnboxingInfoOfMember(member);
+        if (unboxingInfoMetadata != null &&
+            !unboxingInfoMetadata.isFullyBoxed) {
+          _unboxingInfoMetadata.mapping[member] = unboxingInfoMetadata;
+        }
       } else {
         Args<Type> argTypes = _typeFlowAnalysis.argumentTypes(member);
         final uncheckedParameters =
@@ -532,32 +539,42 @@
 
 void _updateUnboxingInfoOfMember(Member member,
     TypeFlowAnalysis typeFlowAnalysis, UnboxingInfoManager unboxingInfo) {
-  if (typeFlowAnalysis.isMemberUsed(member) && (member is! Field)) {
-    final Args<Type> argTypes = typeFlowAnalysis.argumentTypes(member);
-    assertx(argTypes != null);
+  if (typeFlowAnalysis.isMemberUsed(member)) {
+    if (member is Procedure || member is Constructor) {
+      final Args<Type> argTypes = typeFlowAnalysis.argumentTypes(member);
+      assertx(argTypes != null);
 
-    final int firstParamIndex =
-        numTypeParams(member) + (hasReceiverArg(member) ? 1 : 0);
+      final int firstParamIndex =
+          numTypeParams(member) + (hasReceiverArg(member) ? 1 : 0);
 
-    final positionalParams = member.function.positionalParameters;
-    assertx(
-        argTypes.positionalCount == firstParamIndex + positionalParams.length);
+      final positionalParams = member.function.positionalParameters;
+      assertx(argTypes.positionalCount ==
+          firstParamIndex + positionalParams.length);
 
-    for (int i = 0; i < positionalParams.length; i++) {
-      final inferredType = argTypes.values[firstParamIndex + i];
-      unboxingInfo.applyToArg(member, i, inferredType);
+      for (int i = 0; i < positionalParams.length; i++) {
+        final inferredType = argTypes.values[firstParamIndex + i];
+        unboxingInfo.applyToArg(member, i, inferredType);
+      }
+
+      final names = argTypes.names;
+      for (int i = 0; i < names.length; i++) {
+        final inferredType =
+            argTypes.values[firstParamIndex + positionalParams.length + i];
+        unboxingInfo.applyToArg(
+            member, positionalParams.length + i, inferredType);
+      }
+
+      final Type resultType = typeFlowAnalysis.getSummary(member).resultType;
+      unboxingInfo.applyToReturn(member, resultType);
+    } else if (member is Field) {
+      final fieldValue = typeFlowAnalysis.getFieldValue(member).value;
+      if (member.hasSetter) {
+        unboxingInfo.applyToArg(member, 0, fieldValue);
+      }
+      unboxingInfo.applyToReturn(member, fieldValue);
+    } else {
+      assertx(false);
     }
-
-    final names = argTypes.names;
-    for (int i = 0; i < names.length; i++) {
-      final inferredType =
-          argTypes.values[firstParamIndex + positionalParams.length + i];
-      unboxingInfo.applyToArg(
-          member, positionalParams.length + i, inferredType);
-    }
-
-    final Type resultType = typeFlowAnalysis.getSummary(member).resultType;
-    unboxingInfo.applyToReturn(member, resultType);
   }
 }
 
@@ -1407,7 +1424,8 @@
     TypeCheck check = shaker.typeFlowAnalysis.explicitCast(node);
     if (check != null && check.canAlwaysSkip) {
       return StaticInvocation(
-          unsafeCast, Arguments([node.operand], types: [node.type]));
+          unsafeCast, Arguments([node.operand], types: [node.type]))
+        ..fileOffset = node.fileOffset;
     }
     return node;
   }
@@ -1420,7 +1438,8 @@
       return StaticInvocation(
           unsafeCast,
           Arguments([node.operand],
-              types: [node.getStaticType(staticTypeContext)]));
+              types: [node.getStaticType(staticTypeContext)]))
+        ..fileOffset = node.fileOffset;
     }
     return node;
   }
@@ -1679,6 +1698,8 @@
     final namedParameters = <VariableDeclaration>[];
     for (final param in func.namedParameters) {
       if (alwaysPassedOptionals.contains(param.name)) {
+        // Make sure to clear the isRequired flag in case it was set.
+        param.isRequired = false;
         namedPositionals.add(param..initializer = null);
       } else {
         namedParameters.add(param);
diff --git a/pkg/vm/lib/transformations/type_flow/unboxing_info.dart b/pkg/vm/lib/transformations/type_flow/unboxing_info.dart
index caefba4..33e1899 100644
--- a/pkg/vm/lib/transformations/type_flow/unboxing_info.dart
+++ b/pkg/vm/lib/transformations/type_flow/unboxing_info.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 'dart:async';
-
 import 'package:kernel/ast.dart';
 import 'package:kernel/core_types.dart';
 import 'package:kernel/external_name.dart' show getExternalName;
@@ -133,10 +131,12 @@
     for (final superType in cls.supers) {
       final superClass = superType.classNode;
       bool linked = false;
-      superClass.procedures.forEach((Procedure procedure) {
-        if (member.name == procedure.name) {
-          _linkMembers(member, procedure);
-          linked = true;
+      superClass.members.forEach((Member superMember) {
+        if (member.isInstanceMember) {
+          if (member.name == superMember.name) {
+            _linkMembers(member, superMember);
+            linked = true;
+          }
         }
       });
       if (!linked) {
@@ -158,17 +158,10 @@
   }
 
   Member _validMemberOrNull(Member member) {
-    if (member == null || (member is! Procedure && member is! Constructor)) {
+    if (member == null ||
+        (member is! Procedure && member is! Constructor && member is! Field)) {
       return null;
     }
-
-    // TODO(dartbug.com/33549): Support setters with unboxed arguments
-    // For this, fields should also be considered in the partition
-    // and be annotated with the UnboxingInfoMetadata.
-    if (member is Procedure && (member.isSetter || member.isGetter)) {
-      return null;
-    }
-
     return member;
   }
 
@@ -187,7 +180,9 @@
     final int memberId = _allUnboxingInfo.length;
     assertx(memberId == _partitionIds.length);
     assertx(_partitionIds.length == _partitionRank.length);
-    final int argsLen = member.function.requiredParameterCount;
+    final int argsLen = member is Field
+        ? (member.hasSetter ? 1 : 0)
+        : member.function.requiredParameterCount;
     _memberIds[member] = memberId;
     _allUnboxingInfo.add(UnboxingInfoMetadata(argsLen));
     _partitionIds.add(memberId);
@@ -202,9 +197,7 @@
     // have boxed parameters and return values.
     return (_isNative(member) ||
         _nativeCodeOracle.isMemberReferencedFromNativeCode(member) ||
-        _isEnclosingClassSubtypeOfNum(member) ||
-        (!_isConstructorOrStatic(member) &&
-            !_needsDynamicInvocationForwarder(member)));
+        _isEnclosingClassSubtypeOfNum(member));
   }
 
   bool _isNative(Member member) {
@@ -221,30 +214,6 @@
             .isSubtypeOf(_typeHierarchy, _coreTypes.numClass));
   }
 
-  bool _needsDynamicInvocationForwarder(Procedure procedure) {
-    for (var param in procedure.function.positionalParameters) {
-      if (!_isTopTypeForAssignability(param.type) &&
-          !param.isCovariant &&
-          !param.isGenericCovariantImpl) {
-        return true;
-      }
-    }
-
-    for (var param in procedure.function.namedParameters) {
-      if (!_isTopTypeForAssignability(param.type) &&
-          !param.isCovariant &&
-          !param.isGenericCovariantImpl) {
-        return true;
-      }
-    }
-
-    return false;
-  }
-
-  bool _isTopTypeForAssignability(DartType type) {
-    return (_coreTypes.isTop(type) || (type == Object) || (type == FutureOr));
-  }
-
   int _getMemberId(Member member) {
     return _memberIds[member];
   }
diff --git a/pkg/vm/lib/transformations/type_flow/utils.dart b/pkg/vm/lib/transformations/type_flow/utils.dart
index b7cebd7..93c10ac 100644
--- a/pkg/vm/lib/transformations/type_flow/utils.dart
+++ b/pkg/vm/lib/transformations/type_flow/utils.dart
@@ -109,7 +109,7 @@
 // Type arguments to procedures is only supported for factory constructors of
 // generic classes at the moment.
 //
-// TODO(sjindel/tfa): Extend suport to normal generic functions.
+// TODO(sjindel/tfa): Extend support to normal generic functions.
 int numTypeParams(Member member) => member is Procedure && member.isFactory
     ? member.function.typeParameters.length
     : 0;
diff --git a/pkg/vm/test/incremental_compiler_test.dart b/pkg/vm/test/incremental_compiler_test.dart
index f65ffa6..59416a2 100644
--- a/pkg/vm/test/incremental_compiler_test.dart
+++ b/pkg/vm/test/incremental_compiler_test.dart
@@ -453,6 +453,7 @@
         "--pause-isolates-on-exit",
         "--enable-vm-service:0",
         "--disable-service-auth-codes",
+        "--disable-dart-dev",
         list.path
       ]);
 
@@ -579,6 +580,7 @@
         "--pause-isolates-on-exit",
         "--enable-vm-service:0",
         "--disable-service-auth-codes",
+        "--disable-dart-dev",
         list.path
       ]);
 
@@ -658,6 +660,7 @@
         '--enable-vm-service=0', // Note: use 0 to avoid port collisions.
         '--pause_isolates_on_start',
         '--disable-service-auth-codes',
+        '--disable-dart-dev',
         outputFile.path
       ];
       final vm = await Process.start(Platform.resolvedExecutable, vmArgs);
@@ -917,6 +920,7 @@
         "--pause-isolates-on-start",
         "--enable-vm-service:0",
         "--disable-service-auth-codes",
+        "--disable-dart-dev",
         scriptOrDill.path
       ]);
 
diff --git a/pkg/vm/test/kernel_front_end_test.dart b/pkg/vm/test/kernel_front_end_test.dart
index 56dfc69..2bc2815 100644
--- a/pkg/vm/test/kernel_front_end_test.dart
+++ b/pkg/vm/test/kernel_front_end_test.dart
@@ -18,6 +18,7 @@
 const String mainScript = 'pkg/vm/bin/gen_kernel.dart';
 const String mainScriptPackageUri = 'package:vm/kernel_front_end.dart';
 const String packagesFile = '.packages';
+const String packageConfigFile = '.dart_tool/package_config.json';
 
 void testCompile(List<String> args) async {
   final compilerExitCode =
@@ -132,4 +133,32 @@
       '$sdkDir/$mainScript',
     ]);
   }, timeout: Timeout.none);
+
+  test('compile-package-config', () async {
+    await testCompile([
+      '--platform',
+      platformPath(),
+      '--packages',
+      '$sdkDir/$packageConfigFile',
+      '--output',
+      outputDill(),
+      '$sdkDir/$mainScript',
+    ]);
+  }, timeout: Timeout.none);
+
+  test('compile-multi-root-package-config', () async {
+    await testCompile([
+      '--platform',
+      platformPath(),
+      '--filesystem-scheme',
+      'test-filesystem-scheme',
+      '--filesystem-root',
+      sdkDir,
+      '--packages',
+      'test-filesystem-scheme:///$packageConfigFile',
+      '--output',
+      outputDill(),
+      'test-filesystem-scheme:///$mainScript',
+    ]);
+  }, timeout: Timeout.none);
 }
diff --git a/pkg/vm/testcases/bytecode/asserts.dart.expect b/pkg/vm/testcases/bytecode/asserts.dart.expect
index 5da6d08..39a0d1e 100644
--- a/pkg/vm/testcases/bytecode/asserts.dart.expect
+++ b/pkg/vm/testcases/bytecode/asserts.dart.expect
@@ -11,7 +11,7 @@
 
 
 Function 'test1', static, reflectable, debuggable
-    parameters [dart:core::bool 'condition'] (required: 1)
+    parameters [dart:core::bool* 'condition'] (required: 1)
     return-type void
 
 Bytecode {
@@ -37,7 +37,7 @@
 
 
 Function 'test2', static, reflectable, debuggable
-    parameters [FunctionType () -> dart:core::bool 'condition', FunctionType () -> dart:core::String 'message'] (required: 2)
+    parameters [FunctionType ()* -> dart:core::bool* 'condition', FunctionType ()* -> dart:core::String* 'message'] (required: 2)
     return-type void
 
 Bytecode {
diff --git a/pkg/vm/testcases/bytecode/async.dart.expect b/pkg/vm/testcases/bytecode/async.dart.expect
index b758e31..7c448ee 100644
--- a/pkg/vm/testcases/bytecode/async.dart.expect
+++ b/pkg/vm/testcases/bytecode/async.dart.expect
@@ -9,7 +9,7 @@
 
 Class '', script = '#lib'
 
-Field 'asyncInFieldInitializer', type = FunctionType (dart:async::Future < dart:core::int >) -> dart:async::Future < dart:core::Null >, getter = 'get:asyncInFieldInitializer', reflectable, static, has-initializer
+Field 'asyncInFieldInitializer', type = FunctionType (dart:async::Future < dart:core::int* >*)* -> dart:async::Future < dart:core::Null? >*, getter = 'get:asyncInFieldInitializer', reflectable, static, has-initializer
     initializer
 Bytecode {
   Entry                3
@@ -34,11 +34,11 @@
   [0] = ClosureFunction 0
   [1] = InstanceField dart:core::_Closure::_context (field)
   [2] = Reserved
-  [3] = Type dart:async::Future < dart:core::int >
+  [3] = Type dart:async::Future < dart:core::int* >*
   [4] = ObjectRef 'x'
   [5] = SubtypeTestCache
   [6] = Class dart:async::_AsyncAwaitCompleter
-  [7] = ObjectRef < dart:core::Null >
+  [7] = ObjectRef < dart:core::Null? >
   [8] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [9] = Reserved
   [10] = ClosureFunction 1
@@ -67,7 +67,7 @@
   [33] = Reserved
   [34] = EndClosureFunctionScope
 }
-Closure #lib::asyncInFieldInitializer (field)::'<anonymous closure>' async (dart:async::Future < dart:core::int > x) -> dart:async::Future < dart:core::Null >
+Closure #lib::asyncInFieldInitializer (field)::'<anonymous closure>' async (dart:async::Future < dart:core::int* >* x) -> dart:async::Future < dart:core::Null? >*
 ClosureCode {
   EntryFixed           2, 4
   Push                 FP[-6]
@@ -233,7 +233,7 @@
 
 Function 'foo', static, reflectable, async
     parameters [] (required: 0)
-    return-type dart:async::Future < dart:core::int >
+    return-type dart:async::Future < dart:core::int* >*
 
 Bytecode {
   Entry                7
@@ -293,7 +293,7 @@
 }
 ConstantPool {
   [0] = Class dart:async::_AsyncAwaitCompleter
-  [1] = ObjectRef < dart:core::int >
+  [1] = ObjectRef < dart:core::int* >
   [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
   [4] = ClosureFunction 0
@@ -380,8 +380,8 @@
 
 
 Function 'simpleAsyncAwait', static, reflectable, async
-    parameters [dart:async::Future < dart:core::int > 'a', dart:async::Future < dart:core::int > 'b'] (required: 2)
-    return-type dart:async::Future < dart:core::int >
+    parameters [dart:async::Future < dart:core::int* >* 'a', dart:async::Future < dart:core::int* >* 'b'] (required: 2)
+    return-type dart:async::Future < dart:core::int* >*
 
 Bytecode {
   Entry                4
@@ -449,7 +449,7 @@
 }
 ConstantPool {
   [0] = Class dart:async::_AsyncAwaitCompleter
-  [1] = ObjectRef < dart:core::int >
+  [1] = ObjectRef < dart:core::int* >
   [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
   [4] = ClosureFunction 0
@@ -605,8 +605,8 @@
 
 
 Function 'loops', static, reflectable, async
-    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
-    return-type dart:async::Future < dart:core::int >
+    parameters [dart:core::List < dart:core::int* >* 'list'] (required: 1)
+    return-type dart:async::Future < dart:core::int* >*
 
 Bytecode {
   Entry                4
@@ -671,7 +671,7 @@
 }
 ConstantPool {
   [0] = Class dart:async::_AsyncAwaitCompleter
-  [1] = ObjectRef < dart:core::int >
+  [1] = ObjectRef < dart:core::int* >
   [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
   [4] = ClosureFunction 0
@@ -951,8 +951,8 @@
 
 
 Function 'tryCatchRethrow', static, reflectable, async
-    parameters [dart:async::Future < dart:core::int > 'a', dart:async::Future < dart:core::int > 'b', dart:async::Future < dart:core::int > 'c'] (required: 3)
-    return-type dart:async::Future < dart:core::int >
+    parameters [dart:async::Future < dart:core::int* >* 'a', dart:async::Future < dart:core::int* >* 'b', dart:async::Future < dart:core::int* >* 'c'] (required: 3)
+    return-type dart:async::Future < dart:core::int* >*
 
 Bytecode {
   Entry                4
@@ -1023,7 +1023,7 @@
 }
 ConstantPool {
   [0] = Class dart:async::_AsyncAwaitCompleter
-  [1] = ObjectRef < dart:core::int >
+  [1] = ObjectRef < dart:core::int* >
   [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
   [4] = ClosureFunction 0
@@ -1033,7 +1033,7 @@
   [8] = DirectCall 'dart:async::_awaitHelper', ArgDesc num-args 4, num-type-args 0, names []
   [9] = Reserved
   [10] = Type dynamic
-  [11] = Type dart:core::Error
+  [11] = Type dart:core::Error*
   [12] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
   [13] = Reserved
   [14] = ObjectRef 'fin'
@@ -1480,7 +1480,7 @@
 
 
 Function 'closure', static, reflectable, debuggable
-    parameters [dart:async::Future < dart:core::int > 'a'] (required: 1)
+    parameters [dart:async::Future < dart:core::int* >* 'a'] (required: 1)
     return-type dynamic
 
 Bytecode {
@@ -1517,7 +1517,7 @@
   [1] = InstanceField dart:core::_Closure::_context (field)
   [2] = Reserved
   [3] = Class dart:async::_AsyncAwaitCompleter
-  [4] = ObjectRef < dart:core::int >
+  [4] = ObjectRef < dart:core::int* >
   [5] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
   [7] = ClosureFunction 1
@@ -1549,7 +1549,7 @@
   [33] = Reserved
   [34] = EndClosureFunctionScope
 }
-Closure #lib::closure::'nested' async () -> dart:async::Future < dart:core::int >
+Closure #lib::closure::'nested' async () -> dart:async::Future < dart:core::int* >*
 ClosureCode {
   EntryFixed           1, 4
   Push                 FP[-5]
@@ -1776,8 +1776,8 @@
 
 
 Function 'testAssert', static, reflectable, async
-    parameters [dart:async::Future < dart:core::int > 'a'] (required: 1)
-    return-type dart:async::Future < dart:core::int >
+    parameters [dart:async::Future < dart:core::int* >* 'a'] (required: 1)
+    return-type dart:async::Future < dart:core::int* >*
 
 Bytecode {
   Entry                4
@@ -1842,7 +1842,7 @@
 }
 ConstantPool {
   [0] = Class dart:async::_AsyncAwaitCompleter
-  [1] = ObjectRef < dart:core::int >
+  [1] = ObjectRef < dart:core::int* >
   [2] = DirectCall 'dart:async::_AsyncAwaitCompleter:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
   [4] = ClosureFunction 0
diff --git a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
index 6551407..ba143ef 100644
--- a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
+++ b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
@@ -9,23 +9,23 @@
 
 Class '', script = '#lib'
 
-Field '_stdinFD', type = dart:core::int, reflectable, static, has-initializer
+Field '_stdinFD', type = dart:core::int*, reflectable, static, has-initializer
     value = const 0
 
-Field '_stdoutFD', type = dart:core::int, reflectable, static, has-initializer
+Field '_stdoutFD', type = dart:core::int*, reflectable, static, has-initializer
     value = const 1
 
-Field '_stderrFD', type = dart:core::int, reflectable, static, has-initializer
+Field '_stderrFD', type = dart:core::int*, reflectable, static, has-initializer
     value = const 2
 
-Field '_rawScript', type = dart:core::String, reflectable, static
+Field '_rawScript', type = dart:core::String*, reflectable, static
     value = null
 
-Field '_stdin', type = #lib::Stdin, reflectable, static
+Field '_stdin', type = #lib::Stdin*, reflectable, static
     value = null
 
 Function '_printString', static, reflectable, debuggable, native 'Builtin_PrintString'
-    parameters [dart:core::String 's'] (required: 1)
+    parameters [dart:core::String* 's'] (required: 1)
     return-type void
 
 Bytecode {
@@ -78,7 +78,7 @@
 
 
 Function '_setScheduleImmediateClosure', static, reflectable, debuggable
-    parameters [FunctionType (FunctionType () -> void) -> void 'closure'] (required: 1)
+    parameters [FunctionType (FunctionType ()* -> void)* -> void 'closure'] (required: 1)
     return-type void
 
 Bytecode {
@@ -95,7 +95,7 @@
 
 
 Function '_setStdioFDs', static, reflectable, debuggable
-    parameters [dart:core::int 'stdin', dart:core::int 'stdout', dart:core::int 'stderr'] (required: 3)
+    parameters [dart:core::int* 'stdin', dart:core::int* 'stdout', dart:core::int* 'stderr'] (required: 3)
     return-type void
 
 Bytecode {
@@ -119,7 +119,7 @@
 
 Function '_scriptUri', static, reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Uri
+    return-type dart:core::Uri*
 
 Bytecode {
   Entry                2
@@ -191,7 +191,7 @@
 
 Function 'get:stdin', getter, static, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::Stdin
+    return-type #lib::Stdin*
 
 Bytecode {
   Entry                2
@@ -236,14 +236,14 @@
 }
 
 Class '_ScheduleImmediate', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
-Field '_closure', type = FunctionType (FunctionType () -> void) -> void, reflectable, static, has-initializer
+Field '_closure', type = FunctionType (FunctionType ()* -> void)* -> void, reflectable, static, has-initializer
     value = null
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::_ScheduleImmediate
+    return-type #lib::_ScheduleImmediate*
 
 Bytecode {
   Entry                0
@@ -262,53 +262,53 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class '_NamespaceImpl', script = '#lib'
-    extends dart:core::Object
-    implements [#lib::_Namespace]
+    extends dart:core::Object*
+    implements [#lib::_Namespace*]
 
-Field '_cachedNamespace', type = #lib::_NamespaceImpl, reflectable, static, has-initializer
+Field '_cachedNamespace', type = #lib::_NamespaceImpl*, reflectable, static, has-initializer
     value = null
 
 Function '_', constructor, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::_NamespaceImpl
+    return-type #lib::_NamespaceImpl*
 
 Bytecode {
   Entry                0
@@ -326,8 +326,8 @@
 
 
 Function '_create', static, reflectable, debuggable, native 'Namespace_Create'
-    parameters [#lib::_NamespaceImpl 'namespace', dynamic 'n'] (required: 2)
-    return-type #lib::_NamespaceImpl
+    parameters [#lib::_NamespaceImpl* 'namespace', dynamic 'n'] (required: 2)
+    return-type #lib::_NamespaceImpl*
 
 Bytecode {
   Entry                0
@@ -343,8 +343,8 @@
 
 
 Function '_getPointer', static, reflectable, debuggable, native 'Namespace_GetPointer'
-    parameters [#lib::_NamespaceImpl 'namespace'] (required: 1)
-    return-type dart:core::int
+    parameters [#lib::_NamespaceImpl* 'namespace'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                0
@@ -360,7 +360,7 @@
 
 Function '_getDefault', static, reflectable, debuggable, native 'Namespace_GetDefault'
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Bytecode {
   Entry                0
@@ -403,7 +403,7 @@
 
 Function 'get:_namespace', getter, static, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::_NamespaceImpl
+    return-type #lib::_NamespaceImpl*
 
 Bytecode {
   Entry                2
@@ -436,7 +436,7 @@
 
 Function 'get:_namespacePointer', getter, static, reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Bytecode {
   Entry                0
@@ -455,50 +455,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class '_Namespace', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::_Namespace
+    return-type #lib::_Namespace*
 
 Bytecode {
   Entry                0
@@ -536,7 +536,7 @@
 
 Function 'get:_namespace', getter, static, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::_Namespace
+    return-type #lib::_Namespace*
 
 Bytecode {
   Entry                0
@@ -552,7 +552,7 @@
 
 Function 'get:_namespacePointer', getter, static, reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Bytecode {
   Entry                0
@@ -568,45 +568,45 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'VMLibraryHooks', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 Field 'timerFactory', type = dynamic, reflectable, static, has-initializer
     value = null
@@ -643,7 +643,7 @@
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::VMLibraryHooks
+    return-type #lib::VMLibraryHooks*
 
 Bytecode {
   Entry                0
@@ -708,50 +708,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'Stdin', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::Stdin
+    return-type #lib::Stdin*
 
 Bytecode {
   Entry                0
@@ -770,50 +770,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class '_StdIOUtils', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::_StdIOUtils
+    return-type #lib::_StdIOUtils*
 
 Bytecode {
   Entry                0
@@ -831,8 +831,8 @@
 
 
 Function '_getStdioInputStream', static, reflectable, debuggable
-    parameters [dart:core::int 'fd'] (required: 1)
-    return-type #lib::Stdin
+    parameters [dart:core::int* 'fd'] (required: 1)
+    return-type #lib::Stdin*
 
 Bytecode {
   Entry                0
@@ -846,43 +846,43 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 
 }
 ]library #lib from "#lib" as #lib {
diff --git a/pkg/vm/testcases/bytecode/closures.dart.expect b/pkg/vm/testcases/bytecode/closures.dart.expect
index 97d6e4e..711bace 100644
--- a/pkg/vm/testcases/bytecode/closures.dart.expect
+++ b/pkg/vm/testcases/bytecode/closures.dart.expect
@@ -12,7 +12,7 @@
 
 Function 'simpleClosure', static, reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Bytecode {
   Entry                4
@@ -51,7 +51,7 @@
   [0] = ClosureFunction 0
   [1] = InstanceField dart:core::_Closure::_context (field)
   [2] = Reserved
-  [3] = Type dart:core::int
+  [3] = Type dart:core::int*
   [4] = ObjectRef 'y'
   [5] = SubtypeTestCache
   [6] = EndClosureFunctionScope
@@ -63,7 +63,7 @@
   [12] = Reserved
   [13] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
 }
-Closure #lib::simpleClosure::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
+Closure #lib::simpleClosure::'<anonymous closure>' (dart:core::int* y) -> dart:core::Null?
 ClosureCode {
   EntryFixed           2, 3
   Push                 FP[-6]
@@ -92,7 +92,7 @@
 
 
 Function 'callWithArgs', static, reflectable, debuggable
-    type-params <dart:core::Object T1, dart:core::Object T2, dart:core::Object T3, dart:core::Object T4, dart:core::Object T5, dart:core::Object T6, dart:core::Object T7, dart:core::Object T8>
+    type-params <dart:core::Object* T1, dart:core::Object* T2, dart:core::Object* T3, dart:core::Object* T4, dart:core::Object* T5, dart:core::Object* T6, dart:core::Object* T7, dart:core::Object* T8>
     parameters [] (required: 0)
     return-type void
 
@@ -161,15 +161,15 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::Type >
-  [1] = Type #lib::callWithArgs::TypeParam/0
-  [2] = Type #lib::callWithArgs::TypeParam/1
-  [3] = Type #lib::callWithArgs::TypeParam/2
-  [4] = Type #lib::callWithArgs::TypeParam/3
-  [5] = Type #lib::callWithArgs::TypeParam/4
-  [6] = Type #lib::callWithArgs::TypeParam/5
-  [7] = Type #lib::callWithArgs::TypeParam/6
-  [8] = Type #lib::callWithArgs::TypeParam/7
+  [0] = ObjectRef < dart:core::Type* >
+  [1] = Type #lib::callWithArgs::TypeParam/0*
+  [2] = Type #lib::callWithArgs::TypeParam/1*
+  [3] = Type #lib::callWithArgs::TypeParam/2*
+  [4] = Type #lib::callWithArgs::TypeParam/3*
+  [5] = Type #lib::callWithArgs::TypeParam/4*
+  [6] = Type #lib::callWithArgs::TypeParam/5*
+  [7] = Type #lib::callWithArgs::TypeParam/6*
+  [8] = Type #lib::callWithArgs::TypeParam/7*
   [9] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [10] = Reserved
   [11] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
@@ -218,21 +218,21 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < #lib::C3, #lib::C4 >
+  [0] = ObjectRef < #lib::C3*, #lib::C4* >
   [1] = Class #lib::A
-  [2] = ObjectRef < #lib::C1, #lib::C2 >
+  [2] = ObjectRef < #lib::C1*, #lib::C2* >
   [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [4] = Reserved
   [5] = InterfaceCall '#lib::A::foo', ArgDesc num-args 1, num-type-args 2, names []
   [6] = Reserved
-  [7] = ObjectRef < dart:core::List < #lib::C3 >, dart:core::List < #lib::C4 > >
-  [8] = ObjectRef < dart:core::List < #lib::C1 >, dart:core::List < #lib::C2 > >
+  [7] = ObjectRef < dart:core::List < #lib::C3* >*, dart:core::List < #lib::C4* >* >
+  [8] = ObjectRef < dart:core::List < #lib::C1* >*, dart:core::List < #lib::C2* >* >
 }
 
 
 Function 'testPartialInstantiation', static, reflectable, debuggable
     parameters [] (required: 0)
-    return-type FunctionType (dart:core::int) -> dynamic
+    return-type FunctionType (dart:core::int*)* -> dynamic
 
 Bytecode {
   Entry                7
@@ -297,7 +297,7 @@
   [7] = Reserved
   [8] = DirectCall 'dart:_internal::_prependTypeArguments', ArgDesc num-args 4, num-type-args 0, names []
   [9] = Reserved
-  [10] = Type #lib::testPartialInstantiation::Closure/0::TypeParam/0
+  [10] = Type #lib::testPartialInstantiation::Closure/0::TypeParam/0*
   [11] = ObjectRef 't'
   [12] = SubtypeTestCache
   [13] = EndClosureFunctionScope
@@ -305,12 +305,12 @@
   [15] = Reserved
   [16] = InstanceField dart:core::_Closure::_function (field)
   [17] = Reserved
-  [18] = ObjectRef < dart:core::int >
+  [18] = ObjectRef < dart:core::int* >
   [19] = DirectCall 'dart:_internal::_boundsCheckForPartialInstantiation', ArgDesc num-args 2, num-type-args 0, names []
   [20] = Reserved
   [21] = Class dart:core::_Closure
 }
-Closure #lib::testPartialInstantiation::'foo' <dart:core::Object T> (#lib::testPartialInstantiation::Closure/0::TypeParam/0 t) -> void
+Closure #lib::testPartialInstantiation::'foo' <dart:core::Object* T> (#lib::testPartialInstantiation::Closure/0::TypeParam/0* t) -> void
 ClosureCode {
   EntryFixed           2, 3
   Push                 FP[-6]
@@ -362,12 +362,12 @@
 }
 
 Class 'C1', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C1
+    return-type #lib::C1*
 
 Bytecode {
   Entry                0
@@ -386,50 +386,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'C2', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C2
+    return-type #lib::C2*
 
 Bytecode {
   Entry                0
@@ -448,50 +448,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'C3', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C3
+    return-type #lib::C3*
 
 Bytecode {
   Entry                0
@@ -510,50 +510,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'C4', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C4
+    return-type #lib::C4*
 
 Bytecode {
   Entry                0
@@ -572,50 +572,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'C5', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C5
+    return-type #lib::C5*
 
 Bytecode {
   Entry                0
@@ -634,50 +634,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'C6', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C6
+    return-type #lib::C6*
 
 Bytecode {
   Entry                0
@@ -696,50 +696,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'C7', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C7
+    return-type #lib::C7*
 
 Bytecode {
   Entry                0
@@ -758,50 +758,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'C8', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C8
+    return-type #lib::C8*
 
 Bytecode {
   Entry                0
@@ -820,51 +820,51 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'A', script = '#lib'
-    type-params <dart:core::Object T1, dart:core::Object T2> (args: 2)
-    extends dart:core::Object
+    type-params <dart:core::Object* T1, dart:core::Object* T2> (args: 2)
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::A < #lib::A::TypeParam/0, #lib::A::TypeParam/1 >
+    return-type #lib::A < #lib::A::TypeParam/0*, #lib::A::TypeParam/1* >*
 
 Bytecode {
   Entry                0
@@ -882,7 +882,7 @@
 
 
 Function 'foo', reflectable, debuggable
-    type-params <dart:core::Object T3, dart:core::Object T4>
+    type-params <dart:core::Object* T3, dart:core::Object* T4>
     parameters [] (required: 0)
     return-type void
 
@@ -942,21 +942,21 @@
   [9] = Reserved
   [10] = ClosureFunction 1
   [11] = ClosureFunction 2
-  [12] = ObjectRef < dart:core::Type >
-  [13] = Type #lib::A::TypeParam/0
+  [12] = ObjectRef < dart:core::Type* >
+  [13] = Type #lib::A::TypeParam/0*
   [14] = TypeArgumentsField #lib::A
-  [15] = Type #lib::A::TypeParam/1
-  [16] = Type #lib::A::foo::TypeParam/0
-  [17] = Type #lib::A::foo::TypeParam/1
-  [18] = Type #lib::A::foo::Closure/0::TypeParam/0
-  [19] = Type #lib::A::foo::Closure/0::TypeParam/1
-  [20] = Type #lib::A::foo::Closure/1::TypeParam/0
-  [21] = Type #lib::A::foo::Closure/1::TypeParam/1
+  [15] = Type #lib::A::TypeParam/1*
+  [16] = Type #lib::A::foo::TypeParam/0*
+  [17] = Type #lib::A::foo::TypeParam/1*
+  [18] = Type #lib::A::foo::Closure/0::TypeParam/0*
+  [19] = Type #lib::A::foo::Closure/0::TypeParam/1*
+  [20] = Type #lib::A::foo::Closure/1::TypeParam/0*
+  [21] = Type #lib::A::foo::Closure/1::TypeParam/1*
   [22] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [23] = Reserved
   [24] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [25] = Reserved
-  [26] = ObjectRef < #lib::A::TypeParam/0, #lib::A::TypeParam/1, #lib::A::foo::TypeParam/0, #lib::A::foo::TypeParam/1, #lib::A::foo::Closure/0::TypeParam/0, #lib::A::foo::Closure/0::TypeParam/1, #lib::A::foo::Closure/1::TypeParam/0, #lib::A::foo::Closure/1::TypeParam/1 >
+  [26] = ObjectRef < #lib::A::TypeParam/0*, #lib::A::TypeParam/1*, #lib::A::foo::TypeParam/0*, #lib::A::foo::TypeParam/1*, #lib::A::foo::Closure/0::TypeParam/0*, #lib::A::foo::Closure/0::TypeParam/1*, #lib::A::foo::Closure/1::TypeParam/0*, #lib::A::foo::Closure/1::TypeParam/1* >
   [27] = DirectCall '#lib::callWithArgs', ArgDesc num-args 0, num-type-args 8, names []
   [28] = Reserved
   [29] = EndClosureFunctionScope
@@ -966,14 +966,14 @@
   [33] = Reserved
   [34] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
   [35] = EndClosureFunctionScope
-  [36] = ObjectRef < #lib::C7, #lib::C8 >
+  [36] = ObjectRef < #lib::C7*, #lib::C8* >
   [37] = ObjectRef ArgDesc num-args 1, num-type-args 2, names []
-  [38] = ObjectRef < dart:core::List < #lib::C7 >, dart:core::List < #lib::C8 > >
+  [38] = ObjectRef < dart:core::List < #lib::C7* >*, dart:core::List < #lib::C8* >* >
   [39] = EndClosureFunctionScope
-  [40] = ObjectRef < #lib::C5, #lib::C6 >
-  [41] = ObjectRef < dart:core::List < #lib::C5 >, dart:core::List < #lib::C6 > >
+  [40] = ObjectRef < #lib::C5*, #lib::C6* >
+  [41] = ObjectRef < dart:core::List < #lib::C5* >*, dart:core::List < #lib::C6* >* >
 }
-Closure #lib::A::foo::'nested1' <dart:core::Object T5, dart:core::Object T6> () -> void
+Closure #lib::A::foo::'nested1' <dart:core::Object* T5, dart:core::Object* T6> () -> void
 ClosureCode {
   EntryFixed           1, 5
   Push                 FP[-5]
@@ -1033,7 +1033,7 @@
   ReturnTOS
 }
 
-Closure #lib::A::foo::Closure/0::'nested2' <dart:core::Object T7, dart:core::Object T8> () -> void
+Closure #lib::A::foo::Closure/0::'nested2' <dart:core::Object* T7, dart:core::Object* T8> () -> void
 ClosureCode {
   EntryFixed           1, 5
   Push                 FP[-5]
@@ -1083,7 +1083,7 @@
   ReturnTOS
 }
 
-Closure #lib::A::foo::Closure/1::'<anonymous closure>' () -> dart:core::Null
+Closure #lib::A::foo::Closure/1::'<anonymous closure>' () -> dart:core::Null?
 ClosureCode {
   EntryFixed           1, 4
   Push                 FP[-5]
@@ -1169,52 +1169,52 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'B', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
-Field 'foo', type = dart:core::int, getter = 'get:foo', setter = 'set:foo', reflectable, has-initializer
+Field 'foo', type = dart:core::int*, getter = 'get:foo', setter = 'set:foo', reflectable, has-initializer
     value = null
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::B
+    return-type #lib::B*
 
 Bytecode {
   Entry                0
@@ -1320,7 +1320,7 @@
   [0] = ClosureFunction 0
   [1] = InstanceField dart:core::_Closure::_context (field)
   [2] = Reserved
-  [3] = Type dart:core::int
+  [3] = Type dart:core::int*
   [4] = ObjectRef 'y'
   [5] = SubtypeTestCache
   [6] = ClosureFunction 1
@@ -1343,7 +1343,7 @@
   [23] = Reserved
   [24] = EndClosureFunctionScope
 }
-Closure #lib::B::topLevel::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
+Closure #lib::B::topLevel::'<anonymous closure>' (dart:core::int* y) -> dart:core::Null?
 ClosureCode {
   EntryFixed           2, 4
   Push                 FP[-6]
@@ -1443,7 +1443,7 @@
   ReturnTOS
 }
 
-Closure #lib::B::topLevel::'<anonymous closure>' () -> dart:core::Null
+Closure #lib::B::topLevel::'<anonymous closure>' () -> dart:core::Null?
 ClosureCode {
   EntryFixed           1, 3
   Push                 FP[-5]
@@ -1464,50 +1464,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'C', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C
+    return-type #lib::C*
 
 Bytecode {
   Entry                0
@@ -1618,7 +1618,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::Function >
+  [0] = ObjectRef < dart:core::Function* >
   [1] = ObjectRef const <dynamic> []
   [2] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
@@ -1632,16 +1632,16 @@
   [11] = Reserved
   [12] = InstanceField dart:core::_Closure::_function (field)
   [13] = Reserved
-  [14] = InstantiatedInterfaceCall 'dart:core::List::add', ArgDesc num-args 2, num-type-args 0, names [], receiver dart:core::List < dart:core::Function >
+  [14] = InstantiatedInterfaceCall 'dart:core::List::add', ArgDesc num-args 2, num-type-args 0, names [], receiver dart:core::List < dart:core::Function* >*
   [15] = Reserved
   [16] = Reserved
   [17] = ClosureFunction 1
-  [18] = Type dart:core::int
+  [18] = Type dart:core::int*
   [19] = ObjectRef 'ii'
   [20] = SubtypeTestCache
   [21] = EndClosureFunctionScope
 }
-Closure #lib::C::testForLoop::'<anonymous closure>' () -> dart:core::int
+Closure #lib::C::testForLoop::'<anonymous closure>' () -> dart:core::int*
 ClosureCode {
   EntryFixed           1, 2
   Push                 FP[-5]
@@ -1658,7 +1658,7 @@
   ReturnTOS
 }
 
-Closure #lib::C::testForLoop::'<anonymous closure>' (dart:core::int ii) -> dart:core::Null
+Closure #lib::C::testForLoop::'<anonymous closure>' (dart:core::int* ii) -> dart:core::Null?
 ClosureCode {
   EntryFixed           2, 3
   Push                 FP[-6]
@@ -1688,7 +1688,7 @@
 
 
 Function 'testForInLoop', reflectable, debuggable
-    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    parameters [dart:core::List < dart:core::int* >* 'list'] (required: 1)
     return-type void
 
 Bytecode {
@@ -1762,7 +1762,7 @@
   [17] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [18] = Reserved
 }
-Closure #lib::C::testForInLoop::'<anonymous closure>' () -> dart:core::Null
+Closure #lib::C::testForInLoop::'<anonymous closure>' () -> dart:core::Null?
 ClosureCode {
   EntryFixed           1, 3
   Push                 FP[-5]
@@ -1783,51 +1783,51 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'D', script = '#lib'
-    type-params <dart:core::Object T> (args: 1)
-    extends dart:core::Object
+    type-params <dart:core::Object* T> (args: 1)
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::D < #lib::D::TypeParam/0 >
+    return-type #lib::D < #lib::D::TypeParam/0* >*
 
 Bytecode {
   Entry                0
@@ -1845,7 +1845,7 @@
 
 
 Function 'foo', reflectable, debuggable
-    parameters [#lib::D::TypeParam/0 't'] (required: 1)
+    parameters [#lib::D::TypeParam/0* 't'] (required: 1)
     return-type dynamic
 
 Bytecode {
@@ -1885,7 +1885,7 @@
 }
 Parameter flags: [2]
 ConstantPool {
-  [0] = Type #lib::D::TypeParam/0
+  [0] = Type #lib::D::TypeParam/0*
   [1] = TypeArgumentsField #lib::D
   [2] = ObjectRef 't'
   [3] = SubtypeTestCache
@@ -1900,7 +1900,7 @@
   [12] = InstanceField dart:core::_Closure::_function (field)
   [13] = Reserved
 }
-Closure #lib::D::foo::'<anonymous closure>' () -> #lib::D::TypeParam/0
+Closure #lib::D::foo::'<anonymous closure>' () -> #lib::D::TypeParam/0*
 ClosureCode {
   EntryFixed           1, 2
   Push                 FP[-5]
@@ -1959,7 +1959,7 @@
   [12] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
   [13] = EndClosureFunctionScope
 }
-Closure #lib::D::bar::'<anonymous closure>' () -> dart:core::Null
+Closure #lib::D::bar::'<anonymous closure>' () -> dart:core::Null?
 ClosureCode {
   EntryFixed           1, 4
   Push                 FP[-5]
@@ -1993,7 +1993,7 @@
   ReturnTOS
 }
 
-Closure #lib::D::bar::Closure/0::'inner' () -> dart:core::Null
+Closure #lib::D::bar::Closure/0::'inner' () -> dart:core::Null?
 ClosureCode {
   EntryFixed           1, 2
   Push                 FP[-5]
@@ -2008,52 +2008,52 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'E', script = '#lib', abstract
-    extends dart:core::Object
+    extends dart:core::Object*
 
-Field 'foo1', type = FunctionType (dart:core::int, dart:core::int) -> dart:core::int, getter = 'get:foo1', setter = 'set:foo1', reflectable, has-initializer
+Field 'foo1', type = FunctionType (dart:core::int*, dart:core::int*)* -> dart:core::int*, getter = 'get:foo1', setter = 'set:foo1', reflectable, has-initializer
     value = null
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::E
+    return-type #lib::E*
 
 Bytecode {
   Entry                0
@@ -2073,23 +2073,23 @@
 
 Function 'get:foo2', getter, abstract, reflectable, debuggable
     parameters [] (required: 0)
-    return-type FunctionType <dart:core::Object T> (null::TypeParam/0, null::TypeParam/0) -> dart:core::int
+    return-type FunctionType <dart:core::Object* T> (null::TypeParam/0*, null::TypeParam/0*)* -> dart:core::int*
 
 Function 'evalArg1', abstract, reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'evalArg2', abstract, reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'getE', abstract, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::E
+    return-type #lib::E*
 
 Function 'testCallThroughGetter1', reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Bytecode {
   Entry                3
@@ -2122,7 +2122,7 @@
 
 Function 'testCallThroughGetter2', reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Bytecode {
   Entry                3
@@ -2148,7 +2148,7 @@
   [1] = Reserved
   [2] = InterfaceCall '#lib::E::evalArg2', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
-  [4] = ObjectRef < dart:core::int >
+  [4] = ObjectRef < dart:core::int* >
   [5] = InterfaceCall '#lib::E::get:foo2', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
   [7] = ObjectRef ArgDesc num-args 3, num-type-args 1, names []
@@ -2157,7 +2157,7 @@
 
 Function 'testCallThroughGetter3', reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Bytecode {
   Entry                4
@@ -2188,7 +2188,7 @@
   [3] = Reserved
   [4] = InterfaceCall '#lib::E::evalArg2', ArgDesc num-args 1, num-type-args 0, names []
   [5] = Reserved
-  [6] = ObjectRef < dart:core::int >
+  [6] = ObjectRef < dart:core::int* >
   [7] = InterfaceCall '#lib::E::get:foo2', ArgDesc num-args 1, num-type-args 0, names []
   [8] = Reserved
   [9] = ObjectRef ArgDesc num-args 3, num-type-args 1, names []
@@ -2197,43 +2197,43 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 
 }
 ]library #lib from "#lib" as #lib {
diff --git a/pkg/vm/testcases/bytecode/field_initializers.dart.expect b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
index 7e0795c..9ee6e00 100644
--- a/pkg/vm/testcases/bytecode/field_initializers.dart.expect
+++ b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
@@ -24,26 +24,26 @@
 }
 
 Class 'A', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
-Field 'foo1', type = dart:core::int, getter = 'get:foo1', setter = 'set:foo1', reflectable
+Field 'foo1', type = dart:core::int*, getter = 'get:foo1', setter = 'set:foo1', reflectable
     value = null
 
-Field 'foo2', type = dart:core::int, getter = 'get:foo2', setter = 'set:foo2', reflectable, has-initializer
+Field 'foo2', type = dart:core::int*, getter = 'get:foo2', setter = 'set:foo2', reflectable, has-initializer
     value = null
 
-Field 'foo3', type = dart:core::int, getter = 'get:foo3', setter = 'set:foo3', reflectable, has-initializer
+Field 'foo3', type = dart:core::int*, getter = 'get:foo3', setter = 'set:foo3', reflectable, has-initializer
     value = const 42
 
-Field 'foo4', type = dart:core::int, getter = 'get:foo4', setter = 'set:foo4', reflectable
+Field 'foo4', type = dart:core::int*, getter = 'get:foo4', setter = 'set:foo4', reflectable
     value = null
 
-Field 'foo5', type = dart:core::int, getter = 'get:foo5', setter = 'set:foo5', reflectable, has-initializer
+Field 'foo5', type = dart:core::int*, getter = 'get:foo5', setter = 'set:foo5', reflectable, has-initializer
     value = const 43
 
 Function '', constructor, reflectable, debuggable
-    parameters [dart:core::int 'foo4'] (required: 1)
-    return-type #lib::A
+    parameters [dart:core::int* 'foo4'] (required: 1)
+    return-type #lib::A*
 
 Bytecode {
   Entry                0
@@ -79,8 +79,8 @@
 
 
 Function 'constr2', constructor, reflectable, debuggable
-    parameters [dart:core::int 'x', dart:core::int 'y'] (required: 2)
-    return-type #lib::A
+    parameters [dart:core::int* 'x', dart:core::int* 'y'] (required: 2)
+    return-type #lib::A*
 
 Bytecode {
   Entry                0
@@ -119,7 +119,7 @@
 
 Function 'redirecting1', constructor, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::A
+    return-type #lib::A*
 
 Bytecode {
   Entry                0
@@ -138,8 +138,8 @@
 
 
 Function 'redirecting2', constructor, reflectable, debuggable
-    parameters [dart:core::int 'a', dart:core::int 'b', dart:core::int 'c'] (required: 3)
-    return-type #lib::A
+    parameters [dart:core::int* 'a', dart:core::int* 'b', dart:core::int* 'c'] (required: 3)
+    return-type #lib::A*
 
 Bytecode {
   Entry                0
@@ -162,58 +162,58 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'B', script = '#lib'
-    extends #lib::A
+    extends #lib::A*
 
-Field 'foo6', type = dart:core::int, getter = 'get:foo6', setter = 'set:foo6', reflectable, has-initializer
+Field 'foo6', type = dart:core::int*, getter = 'get:foo6', setter = 'set:foo6', reflectable, has-initializer
     value = const 46
 
-Field 'foo7', type = dart:core::int, reflectable, static, has-initializer
+Field 'foo7', type = dart:core::int*, reflectable, static, has-initializer
     value = const 47
 
-Field 'foo8', type = dart:core::int, reflectable, static, const, final, has-initializer
+Field 'foo8', type = dart:core::int*, reflectable, static, const, final, has-initializer
     value = const 48
 
 Function '', constructor, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::B
+    return-type #lib::B*
 
 Bytecode {
   Entry                0
@@ -237,8 +237,8 @@
 
 
 Function 'c2', constructor, reflectable, debuggable
-    parameters [dart:core::int 'i', dart:core::int 'j'] (required: 2)
-    return-type #lib::B
+    parameters [dart:core::int* 'i', dart:core::int* 'j'] (required: 2)
+    return-type #lib::B*
 
 Bytecode {
   Entry                0
diff --git a/pkg/vm/testcases/bytecode/instance_creation.dart.expect b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
index 26b018c..54bd3ff 100644
--- a/pkg/vm/testcases/bytecode/instance_creation.dart.expect
+++ b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
@@ -62,19 +62,19 @@
 }
 ConstantPool {
   [0] = Class #lib::A
-  [1] = ObjectRef < dart:core::int, dart:core::String >
+  [1] = ObjectRef < dart:core::int*, dart:core::String* >
   [2] = ObjectRef 'hi'
   [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [4] = Reserved
   [5] = Class #lib::B
-  [6] = ObjectRef < dart:core::List < dart:core::int >, dart:core::String, dart:core::int >
+  [6] = ObjectRef < dart:core::List < dart:core::int* >*, dart:core::String*, dart:core::int* >
   [7] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [8] = Reserved
 }
 
 
 Function 'foo3', static, reflectable, debuggable
-    type-params <dart:core::Object T>
+    type-params <dart:core::Object* T>
     parameters [] (required: 0)
     return-type void
 
@@ -97,7 +97,7 @@
 }
 ConstantPool {
   [0] = Class #lib::B
-  [1] = ObjectRef < dart:core::List < dart:core::List < #lib::foo3::TypeParam/0 > >, dart:core::String, dart:core::List < #lib::foo3::TypeParam/0 > >
+  [1] = ObjectRef < dart:core::List < dart:core::List < #lib::foo3::TypeParam/0* >* >*, dart:core::String*, dart:core::List < #lib::foo3::TypeParam/0* >* >
   [2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
@@ -117,7 +117,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::int, dart:core::List < dart:core::String > >
+  [0] = ObjectRef < dart:core::int*, dart:core::List < dart:core::String* >* >
   [1] = DirectCall '#lib::G::test_factory (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
@@ -161,14 +161,14 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::String >
+  [0] = ObjectRef < dart:core::String* >
   [1] = DirectCall 'dart:core::_GrowableList:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [2] = Reserved
 }
 
 
 Function 'foo7', static, reflectable, debuggable
-    parameters [dart:core::int 'n'] (required: 1)
+    parameters [dart:core::int* 'n'] (required: 1)
     return-type dynamic
 
 Bytecode {
@@ -180,7 +180,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::int >
+  [0] = ObjectRef < dart:core::int* >
   [1] = DirectCall 'dart:core::_List:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [2] = Reserved
 }
@@ -208,24 +208,24 @@
   [1] = Reserved
   [2] = DirectCall '#lib::foo2', ArgDesc num-args 0, num-type-args 0, names []
   [3] = Reserved
-  [4] = ObjectRef < dart:core::String >
+  [4] = ObjectRef < dart:core::String* >
   [5] = DirectCall '#lib::foo3', ArgDesc num-args 0, num-type-args 1, names []
   [6] = Reserved
 }
 
 Class 'Base', script = '#lib'
-    type-params <dart:core::Object T1, dart:core::Object T2> (args: 2)
-    extends dart:core::Object
+    type-params <dart:core::Object* T1, dart:core::Object* T2> (args: 2)
+    extends dart:core::Object*
 
-Field 't1', type = #lib::Base::TypeParam/0, getter = 'get:t1', setter = 'set:t1', reflectable, has-initializer
+Field 't1', type = #lib::Base::TypeParam/0*, getter = 'get:t1', setter = 'set:t1', reflectable, has-initializer
     value = null
 
-Field 't2', type = #lib::Base::TypeParam/1, getter = 'get:t2', setter = 'set:t2', reflectable, has-initializer
+Field 't2', type = #lib::Base::TypeParam/1*, getter = 'get:t2', setter = 'set:t2', reflectable, has-initializer
     value = null
 
 Function '', constructor, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::Base < #lib::Base::TypeParam/0, #lib::Base::TypeParam/1 >
+    return-type #lib::Base < #lib::Base::TypeParam/0*, #lib::Base::TypeParam/1* >*
 
 Bytecode {
   Entry                1
@@ -270,10 +270,10 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
   [2] = ObjectRef 'Base: '
-  [3] = Type #lib::Base::TypeParam/0
+  [3] = Type #lib::Base::TypeParam/0*
   [4] = TypeArgumentsField #lib::Base
   [5] = ObjectRef ', '
-  [6] = Type #lib::Base::TypeParam/1
+  [6] = Type #lib::Base::TypeParam/1*
   [7] = DirectCall 'dart:core::_StringBase::_interpolate', ArgDesc num-args 1, num-type-args 0, names []
   [8] = Reserved
   [9] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
@@ -283,50 +283,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'A', script = '#lib'
-    extends #lib::Base < dart:core::int, dart:core::String >
+    extends #lib::Base < dart:core::int*, dart:core::String* >*
 
 
 Function '', constructor, reflectable, debuggable
-    parameters [dart:core::String 's'] (required: 1)
-    return-type #lib::A < dart:core::int, dart:core::String >
+    parameters [dart:core::String* 's'] (required: 1)
+    return-type #lib::A < dart:core::int*, dart:core::String* >*
 
 Bytecode {
   Entry                0
@@ -343,13 +343,13 @@
 }
 
 Class 'B', script = '#lib'
-    type-params <dart:core::Object T> (args: 3)
-    extends #lib::Base < dart:core::List < #lib::B::TypeParam/0 >, dart:core::String >
+    type-params <dart:core::Object* T> (args: 3)
+    extends #lib::Base < dart:core::List < #lib::B::TypeParam/0* >*, dart:core::String* >*
 
 
 Function '', constructor, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::B < dart:core::List < #lib::B::TypeParam/0 >, dart:core::String, #lib::B::TypeParam/0 >
+    return-type #lib::B < dart:core::List < #lib::B::TypeParam/0* >*, dart:core::String*, #lib::B::TypeParam/0* >*
 
 Bytecode {
   Entry                1
@@ -382,7 +382,7 @@
   [0] = DirectCall '#lib::Base:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
   [2] = ObjectRef 'B: '
-  [3] = Type #lib::B::TypeParam/0
+  [3] = Type #lib::B::TypeParam/0*
   [4] = TypeArgumentsField #lib::B
   [5] = DirectCall 'dart:core::_StringBase::_interpolate', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
@@ -391,12 +391,12 @@
 }
 
 Class 'C', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable, debuggable
-    parameters [dart:core::String 's'] (required: 1)
-    return-type #lib::C
+    parameters [dart:core::String* 's'] (required: 1)
+    return-type #lib::C*
 
 Bytecode {
   Entry                1
@@ -435,51 +435,51 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'E', script = '#lib'
-    type-params <dart:core::Object K, dart:core::Object V> (args: 2)
-    extends dart:core::Object
+    type-params <dart:core::Object* K, dart:core::Object* V> (args: 2)
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::E < #lib::E::TypeParam/0, #lib::E::TypeParam/1 >
+    return-type #lib::E < #lib::E::TypeParam/0*, #lib::E::TypeParam/1* >*
 
 Bytecode {
   Entry                0
@@ -517,51 +517,51 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'F', script = '#lib'
-    type-params <dart:core::Object K, dart:core::Object V> (args: 4)
-    extends #lib::E < dart:core::String, dart:core::List < #lib::F::TypeParam/1 > >
+    type-params <dart:core::Object* K, dart:core::Object* V> (args: 4)
+    extends #lib::E < dart:core::String*, dart:core::List < #lib::F::TypeParam/1* >* >*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::F < dart:core::String, dart:core::List < #lib::F::TypeParam/1 >, #lib::F::TypeParam/0, #lib::F::TypeParam/1 >
+    return-type #lib::F < dart:core::String*, dart:core::List < #lib::F::TypeParam/1* >*, #lib::F::TypeParam/0*, #lib::F::TypeParam/1* >*
 
 Bytecode {
   Entry                0
@@ -597,13 +597,13 @@
 }
 
 Class 'G', script = '#lib'
-    type-params <dart:core::Object K, dart:core::Object V> (args: 2)
-    extends dart:core::Object
+    type-params <dart:core::Object* K, dart:core::Object* V> (args: 2)
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::G < #lib::G::TypeParam/0, #lib::G::TypeParam/1 >
+    return-type #lib::G < #lib::G::TypeParam/0*, #lib::G::TypeParam/1* >*
 
 Bytecode {
   Entry                0
@@ -621,9 +621,9 @@
 
 
 Function 'test_factory', factory, static, reflectable, debuggable
-    type-params <dart:core::Object K, dart:core::Object V>
+    type-params <dart:core::Object* K, dart:core::Object* V>
     parameters [] (required: 0)
-    return-type #lib::G < #lib::G::test_factory (constructor)::TypeParam/0, #lib::G::test_factory (constructor)::TypeParam/1 >
+    return-type #lib::G < #lib::G::test_factory (constructor)::TypeParam/0*, #lib::G::test_factory (constructor)::TypeParam/1* >*
 
 Bytecode {
   Entry                1
@@ -641,7 +641,7 @@
 }
 ConstantPool {
   [0] = Class #lib::H
-  [1] = ObjectRef < #lib::G::test_factory (constructor)::TypeParam/0, #lib::G::test_factory (constructor)::TypeParam/1, dart:core::String, #lib::G::test_factory (constructor)::TypeParam/0, #lib::G::test_factory (constructor)::TypeParam/1 >
+  [1] = ObjectRef < #lib::G::test_factory (constructor)::TypeParam/0*, #lib::G::test_factory (constructor)::TypeParam/1*, dart:core::String*, #lib::G::test_factory (constructor)::TypeParam/0*, #lib::G::test_factory (constructor)::TypeParam/1* >
   [2] = DirectCall '#lib::H:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
@@ -649,51 +649,51 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'H', script = '#lib'
-    type-params <dart:core::Object P1, dart:core::Object P2, dart:core::Object P3> (args: 5)
-    extends #lib::G < #lib::H::TypeParam/1, #lib::H::TypeParam/2 >
+    type-params <dart:core::Object* P1, dart:core::Object* P2, dart:core::Object* P3> (args: 5)
+    extends #lib::G < #lib::H::TypeParam/1*, #lib::H::TypeParam/2* >*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::H < #lib::H::TypeParam/1, #lib::H::TypeParam/2, #lib::H::TypeParam/0, #lib::H::TypeParam/1, #lib::H::TypeParam/2 >
+    return-type #lib::H < #lib::H::TypeParam/1*, #lib::H::TypeParam/2*, #lib::H::TypeParam/0*, #lib::H::TypeParam/1*, #lib::H::TypeParam/2* >*
 
 Bytecode {
   Entry                0
@@ -710,12 +710,12 @@
 }
 
 Class 'I', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable, debuggable
     parameters [dynamic 'param'] (required: 1)
-    return-type #lib::I
+    return-type #lib::I*
 
 Bytecode {
   Entry                0
@@ -734,7 +734,7 @@
 
 Function 'test_factory2', factory, static, has-optional-named-params, reflectable, debuggable
     parameters [dynamic 'param'] (required: 0)
-    return-type #lib::I
+    return-type #lib::I*
 
 Bytecode {
   EntryOptional        1, 0, 1
@@ -761,50 +761,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'J', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', factory, static, reflectable, debuggable, native 'agent_J'
     parameters [] (required: 0)
-    return-type #lib::J
+    return-type #lib::J*
 
 Bytecode {
   Entry                0
@@ -820,52 +820,52 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'K', script = '#lib', abstract
-    type-params <dart:core::Object A, dart:core::Object B> (args: 2)
-    extends dart:core::Object
+    type-params <dart:core::Object* A, dart:core::Object* B> (args: 2)
+    extends dart:core::Object*
 
 
 Function '', factory, static, reflectable, debuggable
-    type-params <dart:core::Object A, dart:core::Object B>
+    type-params <dart:core::Object* A, dart:core::Object* B>
     parameters [] (required: 0)
-    return-type #lib::K < #lib::K:: (constructor)::TypeParam/0, #lib::K:: (constructor)::TypeParam/1 >
+    return-type #lib::K < #lib::K:: (constructor)::TypeParam/0*, #lib::K:: (constructor)::TypeParam/1* >*
 
 Bytecode {
   Entry                1
@@ -888,52 +888,52 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'TestTypeArgReuse', script = '#lib'
-    type-params <dart:core::Object P, dart:core::Object Q> (args: 2)
-    extends #lib::Base < #lib::TestTypeArgReuse::TypeParam/0, #lib::TestTypeArgReuse::TypeParam/1 >
-    implements [#lib::K < #lib::TestTypeArgReuse::TypeParam/0, #lib::TestTypeArgReuse::TypeParam/1 >]
+    type-params <dart:core::Object* P, dart:core::Object* Q> (args: 2)
+    extends #lib::Base < #lib::TestTypeArgReuse::TypeParam/0*, #lib::TestTypeArgReuse::TypeParam/1* >*
+    implements [#lib::K < #lib::TestTypeArgReuse::TypeParam/0*, #lib::TestTypeArgReuse::TypeParam/1* >*]
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::TestTypeArgReuse < #lib::TestTypeArgReuse::TypeParam/0, #lib::TestTypeArgReuse::TypeParam/1 >
+    return-type #lib::TestTypeArgReuse < #lib::TestTypeArgReuse::TypeParam/0*, #lib::TestTypeArgReuse::TypeParam/1* >*
 
 Bytecode {
   Entry                0
diff --git a/pkg/vm/testcases/bytecode/literals.dart.expect b/pkg/vm/testcases/bytecode/literals.dart.expect
index be92e6d..62c9981 100644
--- a/pkg/vm/testcases/bytecode/literals.dart.expect
+++ b/pkg/vm/testcases/bytecode/literals.dart.expect
@@ -9,7 +9,7 @@
 
 Class '', script = '#lib'
 
-Field 'c1', type = #lib::A, getter = 'get:c1', reflectable, static, const, final, has-initializer
+Field 'c1', type = #lib::A*, getter = 'get:c1', reflectable, static, const, final, has-initializer
     initializer
 Bytecode {
   Entry                0
@@ -18,17 +18,17 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
+  [0] = ObjectRef const #lib::A* {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
 }
 
 
-Field 'c2', type = dart:core::String, reflectable, static, const, final, has-initializer
+Field 'c2', type = dart:core::String*, reflectable, static, const, final, has-initializer
     value = 'hello!'
 
-Field 'c3', type = dart:core::int, reflectable, static, const, final, has-initializer
+Field 'c3', type = dart:core::int*, reflectable, static, const, final, has-initializer
     value = const 6
 
-Field 'c4', type = #lib::C, getter = 'get:c4', reflectable, static, const, final, has-initializer
+Field 'c4', type = #lib::C*, getter = 'get:c4', reflectable, static, const, final, has-initializer
     initializer
 Bytecode {
   Entry                0
@@ -37,11 +37,11 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const #lib::C {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
+  [0] = ObjectRef const #lib::C* {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
 }
 
 
-Field 'c5', type = #lib::D, getter = 'get:c5', reflectable, static, const, final, has-initializer
+Field 'c5', type = #lib::D*, getter = 'get:c5', reflectable, static, const, final, has-initializer
     initializer
 Bytecode {
   Entry                0
@@ -50,11 +50,11 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::B {#lib::B::i (field): const 4}, #lib::D::y (field): null}
+  [0] = ObjectRef const #lib::D* {#lib::D::x (field): const #lib::B* {#lib::B::i (field): const 4}, #lib::D::y (field): null}
 }
 
 
-Field 'fieldWithDoubleLiteralInitializer', type = dart:core::double, reflectable, static, has-initializer
+Field 'fieldWithDoubleLiteralInitializer', type = dart:core::double*, reflectable, static, has-initializer
     value = const 1.0
 
 Function 'test_constants1', static, reflectable, debuggable
@@ -83,12 +83,12 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
+  [0] = ObjectRef const #lib::A* {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
   [1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
   [3] = ObjectRef 'hello!'
-  [4] = ObjectRef const #lib::C {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
-  [5] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::B {#lib::B::i (field): const 4}, #lib::D::y (field): null}
+  [4] = ObjectRef const #lib::C* {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
+  [5] = ObjectRef const #lib::D* {#lib::D::x (field): const #lib::B* {#lib::B::i (field): const 4}, #lib::D::y (field): null}
 }
 
 
@@ -124,15 +124,15 @@
   [0] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
   [2] = ObjectRef 'foo'
-  [3] = ObjectRef const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
-  [4] = ObjectRef const <dart:core::Object> [const 42, 'foo', dart:core::int]
-  [5] = ObjectRef const dart:core::_ImmutableMap < dart:core::String, #lib::A > {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['E2', const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, 'E4', const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]}
-  [6] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::C {#lib::C::j (field): const 9, #lib::B::i (field): const 30}, #lib::D::y (field): const dart:core::_ImmutableMap < dart:core::String, dart:core::Object > {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['foo', const 42, 'bar', const #lib::B {#lib::B::i (field): const 6}]}}
+  [3] = ObjectRef const #lib::A* {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
+  [4] = ObjectRef const <dart:core::Object*> [const 42, 'foo', dart:core::int*]
+  [5] = ObjectRef const dart:core::_ImmutableMap < dart:core::String*, #lib::A* >* {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['E2', const #lib::A* {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, 'E4', const #lib::A* {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]}
+  [6] = ObjectRef const #lib::D* {#lib::D::x (field): const #lib::C* {#lib::C::j (field): const 9, #lib::B::i (field): const 30}, #lib::D::y (field): const dart:core::_ImmutableMap < dart:core::String*, dart:core::Object* >* {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['foo', const 42, 'bar', const #lib::B* {#lib::B::i (field): const 6}]}}
 }
 
 
 Function 'test_list_literal', static, reflectable, debuggable
-    parameters [dart:core::int 'a'] (required: 1)
+    parameters [dart:core::int* 'a'] (required: 1)
     return-type void
 
 Bytecode {
@@ -185,12 +185,12 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::int >
+  [0] = ObjectRef < dart:core::int* >
   [1] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [2] = Reserved
   [3] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [4] = Reserved
-  [5] = ObjectRef < dart:core::String >
+  [5] = ObjectRef < dart:core::String* >
   [6] = ObjectRef 'a'
   [7] = InterfaceCall 'dart:core::int::toString', ArgDesc num-args 1, num-type-args 0, names []
   [8] = Reserved
@@ -199,8 +199,8 @@
 
 
 Function 'test_map_literal', static, reflectable, debuggable
-    type-params <dart:core::Object T>
-    parameters [dart:core::int 'a', dart:core::int 'b', #lib::test_map_literal::TypeParam/0 'c'] (required: 3)
+    type-params <dart:core::Object* T>
+    parameters [dart:core::int* 'a', dart:core::int* 'b', #lib::test_map_literal::TypeParam/0* 'c'] (required: 3)
     return-type void
 
 Bytecode {
@@ -285,19 +285,19 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::int, dart:core::int >
+  [0] = ObjectRef < dart:core::int*, dart:core::int* >
   [1] = ObjectRef < dynamic >
   [2] = DirectCall 'dart:core::Map::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
   [4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [5] = Reserved
-  [6] = ObjectRef < dart:core::String, dart:core::int >
+  [6] = ObjectRef < dart:core::String*, dart:core::int* >
   [7] = ObjectRef 'foo'
   [8] = InterfaceCall 'dart:core::int::toString', ArgDesc num-args 1, num-type-args 0, names []
   [9] = Reserved
-  [10] = ObjectRef < dart:core::String, #lib::test_map_literal::TypeParam/0 >
+  [10] = ObjectRef < dart:core::String*, #lib::test_map_literal::TypeParam/0* >
   [11] = ObjectRef const <dynamic> []
-  [12] = ObjectRef < #lib::test_map_literal::TypeParam/0, dart:core::int >
+  [12] = ObjectRef < #lib::test_map_literal::TypeParam/0*, dart:core::int* >
 }
 
 
@@ -326,7 +326,7 @@
 
 
 Function 'test_type_literal', static, reflectable, debuggable
-    type-params <dart:core::Object T>
+    type-params <dart:core::Object* T>
     parameters [] (required: 0)
     return-type void
 
@@ -346,10 +346,10 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = Type dart:core::String
+  [0] = Type dart:core::String*
   [1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
-  [3] = Type #lib::test_type_literal::TypeParam/0
+  [3] = Type #lib::test_type_literal::TypeParam/0*
 }
 
 
@@ -364,7 +364,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const #lib::F < dart:core::Map < dart:core::int, dart:core::String >, dart:core::int, dart:core::String > {}
+  [0] = ObjectRef const #lib::F < dart:core::Map < dart:core::int*, dart:core::String* >*, dart:core::int*, dart:core::String* >* {}
 }
 
 
@@ -379,7 +379,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = Type FunctionType <dart:core::Object X> (null::TypeParam/0) -> null::TypeParam/0
+  [0] = Type FunctionType <dart:core::Object* X> (null::TypeParam/0*)* -> null::TypeParam/0*
 }
 
 
@@ -412,15 +412,15 @@
 }
 
 Class 'A', script = '#lib', enum
-    extends dart:core::Object
+    extends dart:core::Object*
 
-Field 'index', type = dart:core::int, getter = 'get:index', reflectable, final
+Field 'index', type = dart:core::int*, getter = 'get:index', reflectable, final
     value = null
 
-Field '_name', type = dart:core::String, getter = 'get:_name', reflectable, final
+Field '_name', type = dart:core::String*, getter = 'get:_name', reflectable, final
     value = null
 
-Field 'values', type = dart:core::List < #lib::A >, getter = 'get:values', reflectable, static, const, final, has-initializer
+Field 'values', type = dart:core::List < #lib::A* >*, getter = 'get:values', reflectable, static, const, final, has-initializer
     initializer
 Bytecode {
   Entry                0
@@ -429,11 +429,11 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const <#lib::A> [const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}, const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}, const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]
+  [0] = ObjectRef const <#lib::A*> [const #lib::A* {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}, const #lib::A* {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, const #lib::A* {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}, const #lib::A* {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]
 }
 
 
-Field 'elem1', type = #lib::A, getter = 'get:elem1', reflectable, static, const, final, has-initializer
+Field 'elem1', type = #lib::A*, getter = 'get:elem1', reflectable, static, const, final, has-initializer
     initializer
 Bytecode {
   Entry                0
@@ -442,11 +442,11 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}
+  [0] = ObjectRef const #lib::A* {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}
 }
 
 
-Field 'elem2', type = #lib::A, getter = 'get:elem2', reflectable, static, const, final, has-initializer
+Field 'elem2', type = #lib::A*, getter = 'get:elem2', reflectable, static, const, final, has-initializer
     initializer
 Bytecode {
   Entry                0
@@ -455,11 +455,11 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
+  [0] = ObjectRef const #lib::A* {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
 }
 
 
-Field 'elem3', type = #lib::A, getter = 'get:elem3', reflectable, static, const, final, has-initializer
+Field 'elem3', type = #lib::A*, getter = 'get:elem3', reflectable, static, const, final, has-initializer
     initializer
 Bytecode {
   Entry                0
@@ -468,11 +468,11 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
+  [0] = ObjectRef const #lib::A* {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
 }
 
 
-Field 'elem4', type = #lib::A, getter = 'get:elem4', reflectable, static, const, final, has-initializer
+Field 'elem4', type = #lib::A*, getter = 'get:elem4', reflectable, static, const, final, has-initializer
     initializer
 Bytecode {
   Entry                0
@@ -481,13 +481,13 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}
+  [0] = ObjectRef const #lib::A* {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}
 }
 
 
 Function '', constructor, const, reflectable, debuggable
-    parameters [dart:core::int 'index', dart:core::String '_name'] (required: 2)
-    return-type #lib::A
+    parameters [dart:core::int* 'index', dart:core::String* '_name'] (required: 2)
+    return-type #lib::A*
 
 Bytecode {
   Entry                0
@@ -516,7 +516,7 @@
 
 Function 'toString', reflectable, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Bytecode {
   Entry                0
@@ -533,48 +533,48 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'B', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
-Field 'i', type = dart:core::int, getter = 'get:i', reflectable, final
+Field 'i', type = dart:core::int*, getter = 'get:i', reflectable, final
     value = null
 
 Function '', constructor, const, reflectable, debuggable
-    parameters [dart:core::int 'i'] (required: 1)
-    return-type #lib::B
+    parameters [dart:core::int* 'i'] (required: 1)
+    return-type #lib::B*
 
 Bytecode {
   Entry                0
@@ -598,52 +598,52 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'C', script = '#lib'
-    extends #lib::B
+    extends #lib::B*
 
-Field 'j', type = dart:core::int, getter = 'get:j', reflectable, final
+Field 'j', type = dart:core::int*, getter = 'get:j', reflectable, final
     value = null
 
 Function '', constructor, const, reflectable, debuggable
-    parameters [dart:core::int 'a', dart:core::int 'b', dart:core::int 'c'] (required: 3)
-    return-type #lib::C
+    parameters [dart:core::int* 'a', dart:core::int* 'b', dart:core::int* 'c'] (required: 3)
+    return-type #lib::C*
 
 Bytecode {
   Entry                0
@@ -670,7 +670,7 @@
 }
 
 Class 'D', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 Field 'x', type = dynamic, getter = 'get:x', reflectable, final
     value = null
@@ -680,7 +680,7 @@
 
 Function '', constructor, const, has-optional-positional-params, reflectable, debuggable
     parameters [dynamic 'x', dynamic 'y'] (required: 1)
-    return-type #lib::D
+    return-type #lib::D*
 
 Bytecode {
   EntryOptional        2, 1, 0
@@ -712,51 +712,51 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'E', script = '#lib'
-    type-params <dart:core::Object T> (args: 1)
-    extends dart:core::Object
+    type-params <dart:core::Object* T> (args: 1)
+    extends dart:core::Object*
 
 
 Function '', constructor, const, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::E < #lib::E::TypeParam/0 >
+    return-type #lib::E < #lib::E::TypeParam/0* >*
 
 Bytecode {
   Entry                0
@@ -775,51 +775,51 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'F', script = '#lib'
-    type-params <dart:core::Object P, dart:core::Object Q> (args: 3)
-    extends #lib::E < dart:core::Map < #lib::F::TypeParam/0, #lib::F::TypeParam/1 > >
+    type-params <dart:core::Object* P, dart:core::Object* Q> (args: 3)
+    extends #lib::E < dart:core::Map < #lib::F::TypeParam/0*, #lib::F::TypeParam/1* >* >*
 
 
 Function '', constructor, const, reflectable, debuggable
     parameters [] (required: 0)
-    return-type #lib::F < dart:core::Map < #lib::F::TypeParam/0, #lib::F::TypeParam/1 >, #lib::F::TypeParam/0, #lib::F::TypeParam/1 >
+    return-type #lib::F < dart:core::Map < #lib::F::TypeParam/0*, #lib::F::TypeParam/1* >*, #lib::F::TypeParam/0*, #lib::F::TypeParam/1* >*
 
 Bytecode {
   Entry                0
diff --git a/pkg/vm/testcases/bytecode/loops.dart.expect b/pkg/vm/testcases/bytecode/loops.dart.expect
index 4b4932f..11d1d08 100644
--- a/pkg/vm/testcases/bytecode/loops.dart.expect
+++ b/pkg/vm/testcases/bytecode/loops.dart.expect
@@ -11,8 +11,8 @@
 
 
 Function 'test_for', static, reflectable, debuggable
-    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::List < dart:core::int* >* 'list'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                2
@@ -56,8 +56,8 @@
 
 
 Function 'test_for_break', static, reflectable, debuggable
-    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::List < dart:core::int* >* 'list'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                2
@@ -107,8 +107,8 @@
 
 
 Function 'test_for_continue', static, reflectable, debuggable
-    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::List < dart:core::int* >* 'list'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                2
@@ -160,8 +160,8 @@
 
 
 Function 'test_while', static, reflectable, debuggable
-    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::List < dart:core::int* >* 'list'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                4
@@ -207,8 +207,8 @@
 
 
 Function 'test_do_while', static, reflectable, debuggable
-    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::List < dart:core::int* >* 'list'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                2
@@ -249,8 +249,8 @@
 
 
 Function 'test_for_in', static, reflectable, debuggable
-    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::List < dart:core::int* >* 'list'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                3
@@ -289,8 +289,8 @@
 
 
 Function 'test_for_in_with_outer_var', static, reflectable, debuggable
-    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::List < dart:core::int* >* 'list'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                4
diff --git a/pkg/vm/testcases/bytecode/optional_params.dart.expect b/pkg/vm/testcases/bytecode/optional_params.dart.expect
index 09d42e2..5e959bc 100644
--- a/pkg/vm/testcases/bytecode/optional_params.dart.expect
+++ b/pkg/vm/testcases/bytecode/optional_params.dart.expect
@@ -177,7 +177,7 @@
   [0] = ObjectRef 'a'
   [1] = ObjectRef const 42
   [2] = ObjectRef 'b'
-  [3] = ObjectRef const <dart:core::String> ['default_b']
+  [3] = ObjectRef const <dart:core::String*> ['default_b']
   [4] = ObjectRef 'c'
   [5] = ObjectRef 'default_c'
   [6] = ObjectRef 'y = '
@@ -193,8 +193,8 @@
 
 
 Function 'foo3', static, has-optional-named-params, reflectable, debuggable
-    type-params <dart:core::Object P, dart:core::Object Q>
-    parameters [dynamic 'z', dynamic 'y', dart:core::bool 'a', dart:core::Map < #lib::foo3::TypeParam/0, #lib::foo3::TypeParam/1 > 'b'] (required: 2)
+    type-params <dart:core::Object* P, dart:core::Object* Q>
+    parameters [dynamic 'z', dynamic 'y', dart:core::bool* 'a', dart:core::Map < #lib::foo3::TypeParam/0*, #lib::foo3::TypeParam/1* >* 'b'] (required: 2)
     return-type void
 
 Bytecode {
@@ -225,7 +225,7 @@
   [1] = ObjectRef const false
   [2] = ObjectRef 'b'
   [3] = ObjectRef null
-  [4] = Type #lib::foo3::TypeParam/0
+  [4] = Type #lib::foo3::TypeParam/0*
   [5] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
 }
diff --git a/pkg/vm/testcases/bytecode/super_calls.dart.expect b/pkg/vm/testcases/bytecode/super_calls.dart.expect
index 0d2d233..18ea65f 100644
--- a/pkg/vm/testcases/bytecode/super_calls.dart.expect
+++ b/pkg/vm/testcases/bytecode/super_calls.dart.expect
@@ -24,12 +24,12 @@
 }
 
 Class 'Base1', script = '#lib'
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::Base1
+    return-type #lib::Base1*
 
 Bytecode {
   Entry                0
@@ -47,8 +47,8 @@
 
 
 Function 'foo', reflectable, debuggable
-    type-params <dart:core::Object T>
-    parameters [#lib::Base1::foo::TypeParam/0 'a1', dart:core::int 'a2'] (required: 2)
+    type-params <dart:core::Object* T>
+    parameters [#lib::Base1::foo::TypeParam/0* 'a1', dart:core::int* 'a2'] (required: 2)
     return-type void
 
 Bytecode {
@@ -77,7 +77,7 @@
 
 
 Function 'set:bazz', setter, reflectable, debuggable
-    parameters [dart:core::int 'x'] (required: 1)
+    parameters [dart:core::int* 'x'] (required: 1)
     return-type void
 
 Bytecode {
@@ -92,50 +92,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'A', script = '#lib'
-    extends #lib::Base1
+    extends #lib::Base1*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::A
+    return-type #lib::A*
 
 Bytecode {
   Entry                0
@@ -153,7 +153,7 @@
 
 
 Function 'testSuperCall', reflectable, debuggable
-    parameters [dart:core::int 'x'] (required: 1)
+    parameters [dart:core::int* 'x'] (required: 1)
     return-type dynamic
 
 Bytecode {
@@ -167,7 +167,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::String >
+  [0] = ObjectRef < dart:core::String* >
   [1] = ObjectRef 'a1'
   [2] = DirectCall '#lib::Base1::foo', ArgDesc num-args 3, num-type-args 1, names []
   [3] = Reserved
@@ -223,7 +223,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::int >
+  [0] = ObjectRef < dart:core::int* >
   [1] = DirectCall '#lib::Base1::get:bar', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
   [3] = ObjectRef 'param'
@@ -252,12 +252,12 @@
 }
 
 Class 'Base2', script = '#lib', abstract
-    extends dart:core::Object
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::Base2
+    return-type #lib::Base2*
 
 Bytecode {
   Entry                0
@@ -275,8 +275,8 @@
 
 
 Function 'foo', abstract, reflectable, debuggable
-    type-params <dart:core::Object T>
-    parameters [dart:core::String 'a1', #lib::Base2::foo::TypeParam/0 'a2', dart:core::int 'a3'] (required: 3)
+    type-params <dart:core::Object* T>
+    parameters [dart:core::String* 'a1', #lib::Base2::foo::TypeParam/0* 'a2', dart:core::int* 'a3'] (required: 3)
     return-type void
 
 Function 'get:bar', getter, abstract, reflectable, debuggable
@@ -284,55 +284,55 @@
     return-type dynamic
 
 Function 'set:bazz', setter, abstract, reflectable, debuggable
-    parameters [dart:core::int 'x'] (required: 1)
+    parameters [dart:core::int* 'x'] (required: 1)
     return-type void
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'B', script = '#lib', abstract
-    extends #lib::Base2
+    extends #lib::Base2*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::B
+    return-type #lib::B*
 
 Bytecode {
   Entry                0
@@ -350,7 +350,7 @@
 
 
 Function 'testSuperCall', reflectable, debuggable
-    parameters [dart:core::int 'x'] (required: 1)
+    parameters [dart:core::int* 'x'] (required: 1)
     return-type dynamic
 
 Bytecode {
@@ -392,7 +392,7 @@
   [0] = ObjectRef ArgDesc num-args 4, num-type-args 1, names []
   [1] = ObjectRef 'foo'
   [2] = ObjectRef < dynamic >
-  [3] = ObjectRef < dart:core::double >
+  [3] = ObjectRef < dart:core::double* >
   [4] = ObjectRef 'a1'
   [5] = ObjectRef const 3.14
   [6] = DirectCall 'dart:core::_InvocationMirror::_allocateInvocationMirror', ArgDesc num-args 4, num-type-args 0, names []
@@ -497,7 +497,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = ObjectRef < dart:core::int >
+  [0] = ObjectRef < dart:core::int* >
   [1] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
   [2] = ObjectRef 'bar'
   [3] = ObjectRef < dynamic >
diff --git a/pkg/vm/testcases/bytecode/switch.dart.expect b/pkg/vm/testcases/bytecode/switch.dart.expect
index 9ce3651..555f7a8 100644
--- a/pkg/vm/testcases/bytecode/switch.dart.expect
+++ b/pkg/vm/testcases/bytecode/switch.dart.expect
@@ -11,8 +11,8 @@
 
 
 Function 'foo1', static, reflectable, debuggable
-    parameters [dart:core::int 'x'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::int* 'x'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                2
@@ -57,8 +57,8 @@
 
 
 Function 'foo2', static, reflectable, debuggable
-    parameters [dart:core::int 'x'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::int* 'x'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                2
@@ -114,8 +114,8 @@
 
 
 Function 'foo3', static, reflectable, debuggable
-    parameters [dart:core::int 'x'] (required: 1)
-    return-type dart:core::int
+    parameters [dart:core::int* 'x'] (required: 1)
+    return-type dart:core::int*
 
 Bytecode {
   Entry                2
diff --git a/pkg/vm/testcases/bytecode/try_blocks.dart.expect b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
index 20f7426..ecb97c5 100644
--- a/pkg/vm/testcases/bytecode/try_blocks.dart.expect
+++ b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
@@ -184,15 +184,15 @@
   [0] = ObjectRef 'danger!'
   [1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
-  [3] = Type dart:core::TypeError
+  [3] = Type dart:core::TypeError*
   [4] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
   [5] = Reserved
   [6] = ObjectRef 'caught type error'
-  [7] = Type dart:core::AssertionError
+  [7] = Type dart:core::AssertionError*
   [8] = ObjectRef 'caught assertion error '
   [9] = DirectCall 'dart:core::_StringBase::_interpolate', ArgDesc num-args 1, num-type-args 0, names []
   [10] = Reserved
-  [11] = Type dart:core::Error
+  [11] = Type dart:core::Error*
   [12] = ObjectRef 'caught error '
   [13] = ObjectRef ' '
   [14] = Type dynamic
@@ -328,7 +328,7 @@
   [18] = Reserved
   [19] = ClosureFunction 1
   [20] = ObjectRef 'danger bar'
-  [21] = Type dart:core::Error
+  [21] = Type dart:core::Error*
   [22] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
   [23] = Reserved
   [24] = ObjectRef 'error '
@@ -436,7 +436,7 @@
 
 
 Function 'testRethrow', static, reflectable, debuggable
-    parameters [dart:core::bool 'cond'] (required: 1)
+    parameters [dart:core::bool* 'cond'] (required: 1)
     return-type dynamic
 
 Bytecode {
@@ -582,7 +582,7 @@
 
 
 Function 'testTryFinally2', static, reflectable, debuggable
-    parameters [dart:core::int 'x'] (required: 1)
+    parameters [dart:core::int* 'x'] (required: 1)
     return-type dynamic
 
 Bytecode {
@@ -828,7 +828,7 @@
   [15] = DynamicCall 'call', ArgDesc num-args 1, num-type-args 0, names []
   [16] = Reserved
 }
-Closure #lib::testTryFinally3::'<anonymous closure>' () -> dart:core::int
+Closure #lib::testTryFinally3::'<anonymous closure>' () -> dart:core::int*
 ClosureCode {
   EntryFixed           1, 6
   Push                 FP[-5]
diff --git a/pkg/vm/testcases/bytecode/type_ops.dart.expect b/pkg/vm/testcases/bytecode/type_ops.dart.expect
index 0036353..ed3f0ce 100644
--- a/pkg/vm/testcases/bytecode/type_ops.dart.expect
+++ b/pkg/vm/testcases/bytecode/type_ops.dart.expect
@@ -9,7 +9,7 @@
 
 Class '', script = '#lib'
 
-Field 'globalVar', type = dart:core::List < dart:core::Iterable null >, reflectable, static
+Field 'globalVar', type = dart:core::List < dart:core::Iterable null* >*, reflectable, static
     value = null
 
 Function 'foo1', static, reflectable, debuggable
@@ -46,17 +46,17 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = Type #lib::B < dart:core::String >
+  [0] = Type #lib::B < dart:core::String* >*
   [1] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
   [2] = Reserved
   [3] = ObjectRef '11'
   [4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [5] = Reserved
-  [6] = Type #lib::C < dart:core::String, dart:core::int, dart:core::Object, dynamic >
+  [6] = Type #lib::C < dart:core::String*, dart:core::int*, dart:core::Object*, dynamic >*
   [7] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
   [8] = Reserved
   [9] = ObjectRef '12'
-  [10] = Type #lib::A < dart:core::int >
+  [10] = Type #lib::A < dart:core::int* >*
   [11] = ObjectRef ' in type cast'
   [12] = SubtypeTestCache
 }
@@ -80,7 +80,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = Type dart:core::List < dart:core::Iterable null >
+  [0] = Type dart:core::List < dart:core::Iterable null* >*
   [1] = ObjectRef ''
   [2] = SubtypeTestCache
   [3] = StaticField #lib::globalVar (field)
@@ -101,13 +101,13 @@
 }
 
 Class 'A', script = '#lib'
-    type-params <dart:core::Object T> (args: 1)
-    extends dart:core::Object
+    type-params <dart:core::Object* T> (args: 1)
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::A < #lib::A::TypeParam/0 >
+    return-type #lib::A < #lib::A::TypeParam/0* >*
 
 Bytecode {
   Entry                0
@@ -126,50 +126,50 @@
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'B', script = '#lib'
-    extends #lib::A < dart:core::String >
+    extends #lib::A < dart:core::String* >*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::B < dart:core::String >
+    return-type #lib::B < dart:core::String* >*
 
 Bytecode {
   Entry                0
@@ -186,13 +186,13 @@
 }
 
 Class 'C', script = '#lib'
-    type-params <dart:core::Object T1, dart:core::Object T2, dart:core::Object T3> (args: 4)
-    extends #lib::B < dart:core::String >
+    type-params <dart:core::Object* T1, dart:core::Object* T2, dart:core::Object* T3> (args: 4)
+    extends #lib::B < dart:core::String* >*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::C < dart:core::String, #lib::C::TypeParam/0, #lib::C::TypeParam/1, #lib::C::TypeParam/2 >
+    return-type #lib::C < dart:core::String*, #lib::C::TypeParam/0*, #lib::C::TypeParam/1*, #lib::C::TypeParam/2* >*
 
 Bytecode {
   Entry                0
@@ -209,15 +209,15 @@
 }
 
 Class 'D', script = '#lib'
-    type-params <dart:core::Object P, dart:core::Object Q> (args: 5)
-    extends #lib::C < dart:core::String, dart:core::int, #lib::D::TypeParam/1, #lib::D::TypeParam/0 >
+    type-params <dart:core::Object* P, dart:core::Object* Q> (args: 5)
+    extends #lib::C < dart:core::String*, dart:core::int*, #lib::D::TypeParam/1*, #lib::D::TypeParam/0* >*
 
-Field 'foo', type = dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >, getter = 'get:foo', setter = 'set:foo', reflectable
+Field 'foo', type = dart:core::Map < #lib::D::TypeParam/0*, #lib::D::TypeParam/1* >*, getter = 'get:foo', setter = 'set:foo', reflectable
     value = null
 
 Function '', constructor, reflectable, debuggable
     parameters [dynamic 'tt'] (required: 1)
-    return-type #lib::D < dart:core::String, dart:core::int, #lib::D::TypeParam/1, #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
+    return-type #lib::D < dart:core::String*, dart:core::int*, #lib::D::TypeParam/1*, #lib::D::TypeParam/0*, #lib::D::TypeParam/1* >*
 
 Bytecode {
   Entry                0
@@ -238,7 +238,7 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = Type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
+  [0] = Type dart:core::Map < #lib::D::TypeParam/0*, #lib::D::TypeParam/1* >*
   [1] = TypeArgumentsField #lib::D
   [2] = ObjectRef ''
   [3] = SubtypeTestCache
@@ -293,15 +293,15 @@
 }
 ConstantPool {
   [0] = TypeArgumentsField #lib::D
-  [1] = Type #lib::A < #lib::D::TypeParam/0 >
+  [1] = Type #lib::A < #lib::D::TypeParam/0* >*
   [2] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
   [3] = Reserved
   [4] = ObjectRef '21'
   [5] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
-  [7] = Type #lib::C < dart:core::String, dynamic, #lib::D::TypeParam/1, dart:core::List < #lib::D::TypeParam/0 > >
+  [7] = Type #lib::C < dart:core::String*, dynamic, #lib::D::TypeParam/1*, dart:core::List < #lib::D::TypeParam/0* >* >*
   [8] = ObjectRef '22'
-  [9] = Type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
+  [9] = Type dart:core::Map < #lib::D::TypeParam/0*, #lib::D::TypeParam/1* >*
   [10] = ObjectRef ''
   [11] = SubtypeTestCache
   [12] = InterfaceCall '#lib::D::set:foo', ArgDesc num-args 2, num-type-args 0, names []
@@ -310,7 +310,7 @@
 
 
 Function 'foo3', reflectable, debuggable
-    type-params <dart:core::Object T1, dart:core::Object T2>
+    type-params <dart:core::Object* T1, dart:core::Object* T2>
     parameters [dynamic 'z'] (required: 1)
     return-type dynamic
 
@@ -350,16 +350,16 @@
   ReturnTOS
 }
 ConstantPool {
-  [0] = Type #lib::A < #lib::D::foo3::TypeParam/0 >
+  [0] = Type #lib::A < #lib::D::foo3::TypeParam/0* >*
   [1] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
   [2] = Reserved
   [3] = ObjectRef '31'
   [4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [5] = Reserved
   [6] = TypeArgumentsField #lib::D
-  [7] = Type #lib::C < dart:core::String, dart:core::Map < #lib::D::foo3::TypeParam/0, #lib::D::TypeParam/0 >, dart:core::List < #lib::D::foo3::TypeParam/1 >, #lib::D::TypeParam/1 >
+  [7] = Type #lib::C < dart:core::String*, dart:core::Map < #lib::D::foo3::TypeParam/0*, #lib::D::TypeParam/0* >*, dart:core::List < #lib::D::foo3::TypeParam/1* >*, #lib::D::TypeParam/1* >*
   [8] = ObjectRef '32'
-  [9] = Type dart:core::Map < #lib::D::foo3::TypeParam/1, #lib::D::TypeParam/1 >
+  [9] = Type dart:core::Map < #lib::D::foo3::TypeParam/1*, #lib::D::TypeParam/1* >*
   [10] = ObjectRef ' in type cast'
   [11] = SubtypeTestCache
   [12] = InterfaceCall 'dart:core::Map::get:values', ArgDesc num-args 1, num-type-args 0, names []
@@ -369,7 +369,7 @@
 
 Function 'foo4', reflectable, debuggable
     parameters [dynamic 'w'] (required: 1)
-    return-type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
+    return-type dart:core::Map < #lib::D::TypeParam/0*, #lib::D::TypeParam/1* >*
 
 Bytecode {
   Entry                2
@@ -406,8 +406,8 @@
 }
 ConstantPool {
   [0] = TypeArgumentsField #lib::D
-  [1] = ObjectRef < dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 > >
-  [2] = Type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
+  [1] = ObjectRef < dart:core::Map < #lib::D::TypeParam/0*, #lib::D::TypeParam/1* >* >
+  [2] = Type dart:core::Map < #lib::D::TypeParam/0*, #lib::D::TypeParam/1* >*
   [3] = ObjectRef ''
   [4] = SubtypeTestCache
   [5] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
@@ -416,14 +416,14 @@
 }
 
 Class 'E', script = '#lib'
-    type-params <dart:core::String P> (args: 1)
-    extends dart:core::Object
+    type-params <dart:core::String* P> (args: 1)
+    extends dart:core::Object*
 
 
 Function '', factory, static, reflectable, debuggable
-    type-params <dart:core::String P>
+    type-params <dart:core::String* P>
     parameters [] (required: 0)
-    return-type #lib::E < #lib::E:: (constructor)::TypeParam/0 >
+    return-type #lib::E < #lib::E:: (constructor)::TypeParam/0* >*
 
 Bytecode {
   Entry                0
@@ -436,8 +436,8 @@
 
 
 Function 'foo6', reflectable, debuggable
-    type-params <#lib::E::TypeParam/0 T, dart:core::List < #lib::E::foo6::TypeParam/0 > U>
-    parameters [dart:core::Map < #lib::E::foo6::TypeParam/0, #lib::E::foo6::TypeParam/1 > 'map'] (required: 1)
+    type-params <#lib::E::TypeParam/0* T, dart:core::List < #lib::E::foo6::TypeParam/0* >* U>
+    parameters [dart:core::Map < #lib::E::foo6::TypeParam/0*, #lib::E::foo6::TypeParam/1* >* 'map'] (required: 1)
     return-type void
 
 Bytecode {
@@ -466,60 +466,60 @@
 Default function type arguments: CP#1
 ConstantPool {
   [0] = TypeArgumentsField #lib::E
-  [1] = ObjectRef < #lib::E::TypeParam/0, dart:core::List < #lib::E::TypeParam/0 > >
-  [2] = Type #lib::E::foo6::TypeParam/0
-  [3] = Type #lib::E::TypeParam/0
+  [1] = ObjectRef < #lib::E::TypeParam/0*, dart:core::List < #lib::E::TypeParam/0* >* >
+  [2] = Type #lib::E::foo6::TypeParam/0*
+  [3] = Type #lib::E::TypeParam/0*
   [4] = ObjectRef 'T'
 }
 
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'F', script = '#lib', abstract
-    type-params <dart:core::Object T> (args: 1)
-    extends dart:core::Object
+    type-params <dart:core::Object* T> (args: 1)
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::F < #lib::F::TypeParam/0 >
+    return-type #lib::F < #lib::F::TypeParam/0* >*
 
 Bytecode {
   Entry                0
@@ -537,62 +537,62 @@
 
 
 Function 'foo7', abstract, reflectable, debuggable
-    type-params <#lib::F::TypeParam/0 Q>
-    parameters [#lib::F::foo7::TypeParam/0 'a', dart:core::num 'b', #lib::F::TypeParam/0 'c'] (required: 3)
+    type-params <#lib::F::TypeParam/0* Q>
+    parameters [#lib::F::foo7::TypeParam/0* 'a', dart:core::num* 'b', #lib::F::TypeParam/0* 'c'] (required: 3)
     return-type void
 
 Function 'foo8', abstract, reflectable, debuggable
-    type-params <#lib::F::TypeParam/0 Q>
-    parameters [#lib::F::foo8::TypeParam/0 'a', dart:core::num 'b', #lib::F::TypeParam/0 'c'] (required: 3)
+    type-params <#lib::F::TypeParam/0* Q>
+    parameters [#lib::F::foo8::TypeParam/0* 'a', dart:core::num* 'b', #lib::F::TypeParam/0* 'c'] (required: 3)
     return-type void
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'G', script = '#lib'
-    type-params <dart:core::Object T> (args: 1)
-    extends dart:core::Object
+    type-params <dart:core::Object* T> (args: 1)
+    extends dart:core::Object*
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::G < #lib::G::TypeParam/0 >
+    return-type #lib::G < #lib::G::TypeParam/0* >*
 
 Bytecode {
   Entry                0
@@ -610,8 +610,8 @@
 
 
 Function 'foo7', reflectable, debuggable
-    type-params <#lib::G::TypeParam/0 Q>
-    parameters [#lib::G::foo7::TypeParam/0 'a', dart:core::int 'b', #lib::G::TypeParam/0 'c'] (required: 3)
+    type-params <#lib::G::TypeParam/0* Q>
+    parameters [#lib::G::foo7::TypeParam/0* 'a', dart:core::int* 'b', #lib::G::TypeParam/0* 'c'] (required: 3)
     return-type void
 
 Bytecode {
@@ -647,63 +647,63 @@
 Default function type arguments: CP#6
 ConstantPool {
   [0] = TypeArgumentsField #lib::G
-  [1] = Type #lib::G::foo7::TypeParam/0
-  [2] = Type #lib::G::TypeParam/0
+  [1] = Type #lib::G::foo7::TypeParam/0*
+  [2] = Type #lib::G::TypeParam/0*
   [3] = ObjectRef 'Q'
   [4] = ObjectRef 'c'
   [5] = SubtypeTestCache
-  [6] = ObjectRef < #lib::G::TypeParam/0 >
+  [6] = ObjectRef < #lib::G::TypeParam/0* >
 }
 
 
 Function 'get:_identityHashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function '_instanceOf', abstract, debuggable
     parameters [dynamic 'instantiatorTypeArguments', dynamic 'functionTypeArguments', dynamic 'type'] (required: 3)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOf', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfTrue', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '_simpleInstanceOfFalse', abstract, debuggable
     parameters [dynamic 'type'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function '==', abstract, debuggable
     parameters [dynamic 'other'] (required: 1)
-    return-type dart:core::bool
+    return-type dart:core::bool*
 
 Function 'get:hashCode', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::int
+    return-type dart:core::int*
 
 Function 'toString', abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::String
+    return-type dart:core::String*
 
 Function 'noSuchMethod', abstract, debuggable
-    parameters [dart:core::Invocation 'invocation'] (required: 1)
+    parameters [dart:core::Invocation* 'invocation'] (required: 1)
     return-type dynamic
 
 Function 'get:runtimeType', getter, abstract, debuggable
     parameters [] (required: 0)
-    return-type dart:core::Type
+    return-type dart:core::Type*
 Class 'H', script = '#lib'
-    type-params <dart:core::Object T> (args: 1)
-    extends #lib::G < #lib::H::TypeParam/0 >
-    implements [#lib::F < #lib::H::TypeParam/0 >]
+    type-params <dart:core::Object* T> (args: 1)
+    extends #lib::G < #lib::H::TypeParam/0* >*
+    implements [#lib::F < #lib::H::TypeParam/0* >*]
 
 
 Function '', constructor, reflectable
     parameters [] (required: 0)
-    return-type #lib::H < #lib::H::TypeParam/0 >
+    return-type #lib::H < #lib::H::TypeParam/0* >*
 
 Bytecode {
   Entry                0
@@ -721,8 +721,8 @@
 
 
 Function 'foo8', reflectable, debuggable
-    type-params <#lib::H::TypeParam/0 Q>
-    parameters [#lib::H::foo8::TypeParam/0 'a', dart:core::int 'b', #lib::H::TypeParam/0 'c'] (required: 3)
+    type-params <#lib::H::TypeParam/0* Q>
+    parameters [#lib::H::foo8::TypeParam/0* 'a', dart:core::int* 'b', #lib::H::TypeParam/0* 'c'] (required: 3)
     return-type void
 
 Bytecode {
@@ -765,21 +765,21 @@
 Default function type arguments: CP#9
 ConstantPool {
   [0] = TypeArgumentsField #lib::H
-  [1] = Type #lib::H::foo8::TypeParam/0
-  [2] = Type #lib::H::TypeParam/0
+  [1] = Type #lib::H::foo8::TypeParam/0*
+  [2] = Type #lib::H::TypeParam/0*
   [3] = ObjectRef 'Q'
   [4] = ObjectRef 'c'
   [5] = SubtypeTestCache
-  [6] = Type dart:core::int
+  [6] = Type dart:core::int*
   [7] = ObjectRef 'b'
   [8] = SubtypeTestCache
-  [9] = ObjectRef < #lib::H::TypeParam/0 >
+  [9] = ObjectRef < #lib::H::TypeParam/0* >
 }
 
 
 Function 'foo7', reflectable, debuggable, forwarding-stub
-    type-params <#lib::H::TypeParam/0 Q>
-    parameters [#lib::H::foo7::TypeParam/0 'a', dart:core::num 'b', #lib::H::TypeParam/0 'c'] (required: 3)
+    type-params <#lib::H::TypeParam/0* Q>
+    parameters [#lib::H::foo7::TypeParam/0* 'a', dart:core::num* 'b', #lib::H::TypeParam/0* 'c'] (required: 3)
     return-type void
 
 Bytecode {
@@ -815,31 +815,34 @@
   PushConstant         CP#7
   AssertAssignable     1, CP#8
   Drop1
+  PushNull
   Push                 r0
+  InstantiateTypeArgumentsTOS 0, CP#9
   Push                 FP[-8]
   Push                 FP[-7]
   Push                 FP[-6]
   Push                 FP[-5]
-  UncheckedDirectCall  CP#9, 5
+  UncheckedDirectCall  CP#10, 5
   ReturnTOS
 }
 Parameter flags: [0, 1, 2]
-Forwarding stub target: CP#11
-Default function type arguments: CP#12
+Forwarding stub target: CP#12
+Default function type arguments: CP#13
 ConstantPool {
   [0] = TypeArgumentsField #lib::H
-  [1] = Type #lib::H::foo7::TypeParam/0
-  [2] = Type #lib::H::TypeParam/0
+  [1] = Type #lib::H::foo7::TypeParam/0*
+  [2] = Type #lib::H::TypeParam/0*
   [3] = ObjectRef 'Q'
   [4] = ObjectRef 'c'
   [5] = SubtypeTestCache
-  [6] = Type dart:core::int
+  [6] = Type dart:core::int*
   [7] = ObjectRef 'b'
   [8] = SubtypeTestCache
-  [9] = DirectCall '#lib::G::foo7', ArgDesc num-args 4, num-type-args 1, names []
-  [10] = Reserved
-  [11] = ObjectRef #lib::G::foo7
-  [12] = ObjectRef < #lib::H::TypeParam/0 >
+  [9] = ObjectRef < #lib::H::foo7::TypeParam/0* >
+  [10] = DirectCall '#lib::G::foo7', ArgDesc num-args 4, num-type-args 1, names []
+  [11] = Reserved
+  [12] = ObjectRef #lib::G::foo7
+  [13] = ObjectRef < #lib::H::TypeParam/0* >
 }
 
 
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect
index 186ea40..d9f0804 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect
@@ -30,7 +30,7 @@
   }
 }
 static method main(core::List<core::String*>* args) → dynamic {
-  core::Stopwatch* timer = let final core::Stopwatch #t1 = new core::Stopwatch::•() in block {
+  core::Stopwatch* timer = let final core::Stopwatch* #t1 = new core::Stopwatch::•() in block {
     [@vm.direct-call.metadata=dart.core::Stopwatch.start] [@vm.inferred-type.metadata=!? (skip check)] #t1.{core::Stopwatch::start}();
   } =>#t1;
   for (core::int* i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation.<] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1)) {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect
index 5fa2ddf..0a75831 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect
@@ -6,8 +6,8 @@
 import "dart:typed_data";
 
 class _Vector extends core::Object {
-[@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  final field core::int* _offset;
-[@vm.inferred-type.metadata=dart.core::_Smi (value: 10)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6,getterSelectorId:7]  final field core::int* _length;
+[@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5] [@vm.unboxing-info.metadata=()->i]  final field core::int* _offset;
+[@vm.inferred-type.metadata=dart.core::_Smi (value: 10)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6,getterSelectorId:7] [@vm.unboxing-info.metadata=()->i]  final field core::int* _length;
 [@vm.inferred-type.metadata=dart.typed_data::_Float64List] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:8,getterSelectorId:9]  final field core::List<core::double*>* _elements;
 [@vm.unboxing-info.metadata=(i)->b]  constructor •([@vm.inferred-type.metadata=dart.core::_Smi (value: 10)] core::int* size) → self::_Vector*
     : self::_Vector::_offset = 0, self::_Vector::_length = size, self::_Vector::_elements = [@vm.inferred-type.metadata=dart.typed_data::_Float64List] typ::Float64List::•(size), super core::Object::•()
@@ -27,7 +27,7 @@
 [@vm.inferred-type.metadata=#lib::_Vector?]static field self::_Vector* v = new self::_Vector::•(10);
 [@vm.inferred-type.metadata=dart.core::_Double?]static field core::double* x = 0.0;
 static method main(core::List<core::String*>* args) → dynamic {
-  core::Stopwatch* timer = let final core::Stopwatch #t3 = new core::Stopwatch::•() in block {
+  core::Stopwatch* timer = let final core::Stopwatch* #t3 = new core::Stopwatch::•() in block {
     [@vm.direct-call.metadata=dart.core::Stopwatch.start] [@vm.inferred-type.metadata=!? (skip check)] #t3.{core::Stopwatch::start}();
   } =>#t3;
   for (core::int* i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation.<] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100000000); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1)) {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_basic.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_basic.dart.expect
index 933de35..25ef2d6 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_basic.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_basic.dart.expect
@@ -57,7 +57,7 @@
   synthetic constructor •() → self::C2<self::C2::T*>*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12]  method id3([@vm.inferred-type.metadata=dart.core::_Double (skip check) (value: 3.0)] generic-covariant-impl core::Comparable<self::C2::T*>* x) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12] [@vm.unboxing-info.metadata=(d)->d]  method id3([@vm.inferred-type.metadata=dart.core::_Double (skip check) (value: 3.0)] generic-covariant-impl core::Comparable<self::C2::T*>* x) → dynamic
     return x;
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  method id4([@vm.inferred-type.metadata=#lib::K<#lib::J*> (skip check)] generic-covariant-impl self::K<self::I<self::C2::T*>*>* x) → dynamic
     return x;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/const_prop.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/const_prop.dart.expect
index 870e2ea..e53f25a 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/const_prop.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/const_prop.dart.expect
@@ -12,7 +12,7 @@
     return "bar";
 }
 class B extends core::Object /*isEnum*/  {
-[@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6,getterSelectorId:7]  final field core::int* index;
+[@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6,getterSelectorId:7] [@vm.unboxing-info.metadata=()->i]  final field core::int* index;
 [@vm.inferred-type.metadata=dart.core::_OneByteString (value: B.b2)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:8,getterSelectorId:9]  final field core::String* _name;
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  method toString() → core::String*
     return [@vm.inferred-type.metadata=dart.core::_OneByteString (value: B.b2)] this.{=self::B::_name};
@@ -26,7 +26,7 @@
 static method test2({[@vm.inferred-type.metadata=dart.core::_Smi (value: 43)] core::int* arg = #C2}) → void {
   core::print(arg);
 }
-static get getD() → dynamic
+[@vm.unboxing-info.metadata=()->d]static get getD() → dynamic
   return 100.0;
 [@vm.unboxing-info.metadata=(d)->b]static method testDouble([@vm.inferred-type.metadata=dart.core::_Double (value: 3.14)] core::double* arg) → void {
   core::print(arg);
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
index b8df814..edc8a9b 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
@@ -6,20 +6,20 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  abstract method foo() → core::int*;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i]  abstract method foo() → core::int*;
 }
 class B extends self::A {
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo() → core::int*
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i]  method foo() → core::int*
     return 1;
 }
 class C extends core::Object implements self::A {
   synthetic constructor •() → self::C*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo() → core::int*
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i]  method foo() → core::int*
     return 2;
 }
 class D extends self::C {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/future.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/future.dart.expect
index 56fcd59..432f7fc 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/future.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/future.dart.expect
@@ -9,7 +9,7 @@
   synthetic constructor •() → self::C<self::C::T*>*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method test2c([@vm.inferred-type.metadata=dart.core::_Smi (skip check) (value: 3)] generic-covariant-impl FutureOr<self::C::T*>* x) → void {}
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=(i)->b]  method test2c([@vm.inferred-type.metadata=dart.core::_Smi (skip check) (value: 3)] generic-covariant-impl FutureOr<self::C::T*>* x) → void {}
 [@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method test3c([@vm.inferred-type.metadata=dart.async::_Future<dart.core::int*> (skip check)] generic-covariant-impl asy::Future<self::C::T*>* x) → void {}
 [@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method test4c([@vm.inferred-type.metadata=dart.async::_Future<dart.core::int*> (skip check)] generic-covariant-impl FutureOr<self::C::T*>* x) → void {}
 [@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method test2r([@vm.inferred-type.metadata=#lib::C<dart.core::int*> (skip check)] generic-covariant-impl self::C<FutureOr<self::C::T*>*>* x) → void {}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/lists.dart b/pkg/vm/testcases/transformations/type_flow/transformer/lists.dart
new file mode 100644
index 0000000..62e1f09
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/lists.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.
+
+nonConstant() => int.parse('1') == 1;
+
+class A {
+  final literal1 = <int>[];
+  final literal2 = [1, 2, 3];
+  final constLiteral1 = const <int>[];
+  final constLiteral2 = const [1, 2];
+  final defaultConstructor1 = List<int>();
+  final defaultConstructor2 = List<int>(3);
+  final filledFactory1 = List<int>.filled(2, 0);
+  final filledFactory2 = List<int>.filled(2, 0, growable: true);
+  final filledFactory3 = List<int>.filled(2, 0, growable: false);
+  final filledFactory4 = List<int>.filled(2, 0, growable: nonConstant());
+  final filledFactory5 = List<int>.filled(2, null);
+  final filledFactory6 = List<int>.filled(2, null, growable: true);
+  final filledFactory7 = List<int>.filled(2, null, growable: false);
+  final filledFactory8 = List<int>.filled(2, null, growable: nonConstant());
+  final generateFactory1 = List<int>.generate(2, (i) => i);
+  final generateFactory2 = List<int>.generate(2, (i) => i, growable: true);
+  final generateFactory3 = List<int>.generate(2, (i) => i, growable: false);
+  final generateFactory4 =
+      List<int>.generate(2, (i) => i, growable: nonConstant());
+  final generateFactory5 = List<List<int>>.generate(2, (_) => <int>[]);
+}
+
+main() {
+  A x = A();
+  // Make sure fields are not tree-shaken.
+  print(x.literal1);
+  print(x.literal2);
+  print(x.constLiteral1);
+  print(x.constLiteral2);
+  print(x.defaultConstructor1);
+  print(x.defaultConstructor2);
+  print(x.filledFactory1);
+  print(x.filledFactory2);
+  print(x.filledFactory3);
+  print(x.filledFactory4);
+  print(x.filledFactory5);
+  print(x.filledFactory6);
+  print(x.filledFactory7);
+  print(x.filledFactory8);
+  print(x.generateFactory1);
+  print(x.generateFactory2);
+  print(x.generateFactory3);
+  print(x.generateFactory4);
+  print(x.generateFactory5);
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/lists.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/lists.dart.expect
new file mode 100644
index 0000000..af082a0
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/lists.dart.expect
@@ -0,0 +1,53 @@
+library #lib;
+import self as self;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+class A extends core::Object {
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  final field core::List<core::int*>* literal1 = <core::int*>[];
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  final field core::List<core::int*>* literal2 = <core::int*>[1, 2, 3];
+[@vm.inferred-type.metadata=dart.core::_ImmutableList (value: const <dart.core::int*>[])] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  final field core::List<core::int*>* constLiteral1 = #C1;
+[@vm.inferred-type.metadata=dart.core::_ImmutableList (value: const <dart.core::int*>[1, 2])] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  final field core::List<core::int*>* constLiteral2 = #C4;
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  final field core::List<core::int*>* defaultConstructor1 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] core::_GrowableList::•<core::int*>(0);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12]  final field core::List<core::int*>* defaultConstructor2 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] core::_List::•<core::int*>(3);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  final field core::List<core::int*>* filledFactory1 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] core::_List::filled<core::int*>(2, 0);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:15,getterSelectorId:16]  final field core::List<core::int*>* filledFactory2 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] core::_GrowableList::filled<core::int*>(2, 0);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:17,getterSelectorId:18]  final field core::List<core::int*>* filledFactory3 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] core::_List::filled<core::int*>(2, 0);
+[@vm.inferred-type.metadata=!] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:19,getterSelectorId:20]  final field core::List<core::int*>* filledFactory4 = let core::int* #t1 = 2 in let core::int* #t2 = 0 in let core::bool #t3 = _in::unsafeCast<core::bool>([@vm.inferred-type.metadata=dart.core::bool] self::nonConstant()) in [@vm.inferred-type.metadata=!] core::List::filled<core::int*>(#t1, #t2, #t3);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:21,getterSelectorId:22]  final field core::List<core::int*>* filledFactory5 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] core::_List::•<core::int*>(2);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:23,getterSelectorId:24]  final field core::List<core::int*>* filledFactory6 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] core::_GrowableList::•<core::int*>(2);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:25,getterSelectorId:26]  final field core::List<core::int*>* filledFactory7 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] core::_List::•<core::int*>(2);
+[@vm.inferred-type.metadata=!] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:27,getterSelectorId:28]  final field core::List<core::int*>* filledFactory8 = let core::int* #t4 = 2 in let core::Null? #t5 = null in let core::bool #t6 = _in::unsafeCast<core::bool>([@vm.inferred-type.metadata=dart.core::bool] self::nonConstant()) in [@vm.inferred-type.metadata=!] core::List::filled<core::int*>(#t4, #t5, #t6);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:29,getterSelectorId:30]  final field core::List<core::int*>* generateFactory1 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] core::_GrowableList::generate<core::int*>(2, (core::int* i) → core::int* => i);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:31,getterSelectorId:32]  final field core::List<core::int*>* generateFactory2 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] core::_GrowableList::generate<core::int*>(2, (core::int* i) → core::int* => i);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:33,getterSelectorId:34]  final field core::List<core::int*>* generateFactory3 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] core::_List::generate<core::int*>(2, (core::int* i) → core::int* => i);
+[@vm.inferred-type.metadata=!] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:35,getterSelectorId:36]  final field core::List<core::int*>* generateFactory4 = let core::int* #t7 = 2 in let (core::int*) →* core::int* #t8 = (core::int* i) → core::int* => i in let core::bool #t9 = _in::unsafeCast<core::bool>([@vm.inferred-type.metadata=dart.core::bool] self::nonConstant()) in [@vm.inferred-type.metadata=!] core::List::generate<core::int*>(#t7, #t8, #t9);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::List<dart.core::int*>*>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:37,getterSelectorId:38]  final field core::List<core::List<core::int*>*>* generateFactory5 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::List<dart.core::int*>*>] core::_GrowableList::generate<core::List<core::int*>*>(2, (core::int* _) → core::List<core::int*>* => <core::int*>[]);
+  synthetic constructor •() → self::A*
+    : super core::Object::•()
+    ;
+}
+static method nonConstant() → dynamic
+  return [@vm.direct-call.metadata=dart.core::_IntegerImplementation.==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.inferred-type.metadata=int] core::int::parse("1").{core::num::==}(1);
+static method main() → dynamic {
+  self::A* x = new self::A::•();
+  core::print([@vm.direct-call.metadata=#lib::A.literal1] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] x.{self::A::literal1});
+  core::print([@vm.direct-call.metadata=#lib::A.literal2] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] x.{self::A::literal2});
+  core::print([@vm.direct-call.metadata=#lib::A.constLiteral1] [@vm.inferred-type.metadata=dart.core::_ImmutableList (value: const <dart.core::int*>[])] x.{self::A::constLiteral1});
+  core::print([@vm.direct-call.metadata=#lib::A.constLiteral2] [@vm.inferred-type.metadata=dart.core::_ImmutableList (value: const <dart.core::int*>[1, 2])] x.{self::A::constLiteral2});
+  core::print([@vm.direct-call.metadata=#lib::A.defaultConstructor1] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] x.{self::A::defaultConstructor1});
+  core::print([@vm.direct-call.metadata=#lib::A.defaultConstructor2] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] x.{self::A::defaultConstructor2});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory1] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] x.{self::A::filledFactory1});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory2] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] x.{self::A::filledFactory2});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory3] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] x.{self::A::filledFactory3});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory4] [@vm.inferred-type.metadata=!] x.{self::A::filledFactory4});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory5] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] x.{self::A::filledFactory5});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory6] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] x.{self::A::filledFactory6});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory7] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] x.{self::A::filledFactory7});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory8] [@vm.inferred-type.metadata=!] x.{self::A::filledFactory8});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory1] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] x.{self::A::generateFactory1});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory2] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int*>] x.{self::A::generateFactory2});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory3] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int*>] x.{self::A::generateFactory3});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory4] [@vm.inferred-type.metadata=!] x.{self::A::generateFactory4});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory5] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::List<dart.core::int*>*>] x.{self::A::generateFactory5});
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/lists_nnbd.dart b/pkg/vm/testcases/transformations/type_flow/transformer/lists_nnbd.dart
new file mode 100644
index 0000000..76fafab
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/lists_nnbd.dart
@@ -0,0 +1,50 @@
+// 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 requires non-nullable experiment.
+// @dart = 2.10
+
+nonConstant() => int.parse('1') == 1;
+
+class A {
+  final literal1 = <int>[];
+  final literal2 = [1, 2, 3];
+  final constLiteral1 = const <int>[];
+  final constLiteral2 = const [1, 2];
+  final filledFactory1 = List<int>.filled(2, 0);
+  final filledFactory2 = List<int>.filled(2, 0, growable: true);
+  final filledFactory3 = List<int>.filled(2, 0, growable: false);
+  final filledFactory4 = List<int>.filled(2, 0, growable: nonConstant());
+  final filledFactory5 = List<int?>.filled(2, null);
+  final filledFactory6 = List<int?>.filled(2, null, growable: true);
+  final filledFactory7 = List<int?>.filled(2, null, growable: false);
+  final filledFactory8 = List<int?>.filled(2, null, growable: nonConstant());
+  final generateFactory1 = List<int>.generate(2, (i) => i);
+  final generateFactory2 = List<int>.generate(2, (i) => i, growable: true);
+  final generateFactory3 = List<int>.generate(2, (i) => i, growable: false);
+  final generateFactory4 =
+      List<int>.generate(2, (i) => i, growable: nonConstant());
+  final generateFactory5 = List<List<int>>.generate(2, (_) => <int>[]);
+}
+
+main() {
+  A x = A();
+  print(x.literal1);
+  print(x.literal2);
+  print(x.constLiteral1);
+  print(x.constLiteral2);
+  print(x.filledFactory1);
+  print(x.filledFactory2);
+  print(x.filledFactory3);
+  print(x.filledFactory4);
+  print(x.filledFactory5);
+  print(x.filledFactory6);
+  print(x.filledFactory7);
+  print(x.filledFactory8);
+  print(x.generateFactory1);
+  print(x.generateFactory2);
+  print(x.generateFactory3);
+  print(x.generateFactory4);
+  print(x.generateFactory5);
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/lists_nnbd.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/lists_nnbd.dart.expect
new file mode 100644
index 0000000..bbe4d4f
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/lists_nnbd.dart.expect
@@ -0,0 +1,49 @@
+library #lib /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+class A extends core::Object {
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  final field core::List<core::int> literal1 = <core::int>[];
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  final field core::List<core::int> literal2 = <core::int>[1, 2, 3];
+[@vm.inferred-type.metadata=dart.core::_ImmutableList (value: const <dart.core::int*>[])] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  final field core::List<core::int> constLiteral1 = #C1;
+[@vm.inferred-type.metadata=dart.core::_ImmutableList (value: const <dart.core::int*>[1, 2])] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  final field core::List<core::int> constLiteral2 = #C4;
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  final field core::List<core::int> filledFactory1 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int>] core::_List::filled<core::int>(2, 0);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12]  final field core::List<core::int> filledFactory2 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] core::_GrowableList::filled<core::int>(2, 0);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  final field core::List<core::int> filledFactory3 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int>] core::_List::filled<core::int>(2, 0);
+[@vm.inferred-type.metadata=!] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:15,getterSelectorId:16]  final field core::List<core::int> filledFactory4 = let core::int #t1 = 2 in let core::int #t2 = 0 in let core::bool #t3 = _in::unsafeCast<core::bool>([@vm.inferred-type.metadata=dart.core::bool] self::nonConstant()) in [@vm.inferred-type.metadata=!] core::List::filled<core::int>(#t1, #t2, #t3);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int?>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:17,getterSelectorId:18]  final field core::List<core::int?> filledFactory5 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int?>] core::_List::•<core::int?>(2);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int?>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:19,getterSelectorId:20]  final field core::List<core::int?> filledFactory6 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int?>] core::_GrowableList::•<core::int?>(2);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int?>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:21,getterSelectorId:22]  final field core::List<core::int?> filledFactory7 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int?>] core::_List::•<core::int?>(2);
+[@vm.inferred-type.metadata=!] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:23,getterSelectorId:24]  final field core::List<core::int?> filledFactory8 = let core::int #t4 = 2 in let core::Null? #t5 = null in let core::bool #t6 = _in::unsafeCast<core::bool>([@vm.inferred-type.metadata=dart.core::bool] self::nonConstant()) in [@vm.inferred-type.metadata=!] core::List::filled<core::int?>(#t4, #t5, #t6);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:25,getterSelectorId:26]  final field core::List<core::int> generateFactory1 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] core::_GrowableList::generate<core::int>(2, (core::int i) → core::int => i);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:27,getterSelectorId:28]  final field core::List<core::int> generateFactory2 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] core::_GrowableList::generate<core::int>(2, (core::int i) → core::int => i);
+[@vm.inferred-type.metadata=dart.core::_List<dart.core::int>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:29,getterSelectorId:30]  final field core::List<core::int> generateFactory3 = [@vm.inferred-type.metadata=dart.core::_List<dart.core::int>] core::_List::generate<core::int>(2, (core::int i) → core::int => i);
+[@vm.inferred-type.metadata=!] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:31,getterSelectorId:32]  final field core::List<core::int> generateFactory4 = let core::int #t7 = 2 in let (core::int) → core::int #t8 = (core::int i) → core::int => i in let core::bool #t9 = _in::unsafeCast<core::bool>([@vm.inferred-type.metadata=dart.core::bool] self::nonConstant()) in [@vm.inferred-type.metadata=!] core::List::generate<core::int>(#t7, #t8, #t9);
+[@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::List<dart.core::int>>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:33,getterSelectorId:34]  final field core::List<core::List<core::int>> generateFactory5 = [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::List<dart.core::int>>] core::_GrowableList::generate<core::List<core::int>>(2, (core::int _) → core::List<core::int> => <core::int>[]);
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+static method nonConstant() → dynamic
+  return [@vm.direct-call.metadata=dart.core::_IntegerImplementation.==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.inferred-type.metadata=int] core::int::parse("1").{core::num::==}(1);
+static method main() → dynamic {
+  self::A x = new self::A::•();
+  core::print([@vm.direct-call.metadata=#lib::A.literal1] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] x.{self::A::literal1});
+  core::print([@vm.direct-call.metadata=#lib::A.literal2] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] x.{self::A::literal2});
+  core::print([@vm.direct-call.metadata=#lib::A.constLiteral1] [@vm.inferred-type.metadata=dart.core::_ImmutableList (value: const <dart.core::int*>[])] x.{self::A::constLiteral1});
+  core::print([@vm.direct-call.metadata=#lib::A.constLiteral2] [@vm.inferred-type.metadata=dart.core::_ImmutableList (value: const <dart.core::int*>[1, 2])] x.{self::A::constLiteral2});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory1] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int>] x.{self::A::filledFactory1});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory2] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] x.{self::A::filledFactory2});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory3] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int>] x.{self::A::filledFactory3});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory4] [@vm.inferred-type.metadata=!] x.{self::A::filledFactory4});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory5] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int?>] x.{self::A::filledFactory5});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory6] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int?>] x.{self::A::filledFactory6});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory7] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int?>] x.{self::A::filledFactory7});
+  core::print([@vm.direct-call.metadata=#lib::A.filledFactory8] [@vm.inferred-type.metadata=!] x.{self::A::filledFactory8});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory1] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] x.{self::A::generateFactory1});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory2] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::int>] x.{self::A::generateFactory2});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory3] [@vm.inferred-type.metadata=dart.core::_List<dart.core::int>] x.{self::A::generateFactory3});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory4] [@vm.inferred-type.metadata=!] x.{self::A::generateFactory4});
+  core::print([@vm.direct-call.metadata=#lib::A.generateFactory5] [@vm.inferred-type.metadata=dart.core::_GrowableList<dart.core::List<dart.core::int>>] x.{self::A::generateFactory5});
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/named_params_shaking_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/named_params_shaking_test.dart.expect
index 8db9738..1eb445c 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/named_params_shaking_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/named_params_shaking_test.dart.expect
@@ -15,7 +15,7 @@
   }
 }
 class TestNamedOrderSub extends self::TestNamedOrderBase {
-[@vm.inferred-type.metadata=int] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  field core::int* x;
+[@vm.inferred-type.metadata=int] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=(i)->i]  field core::int* x;
   constructor •() → self::TestNamedOrderSub*
     : self::TestNamedOrderSub::x = [@vm.inferred-type.metadata=int] self::dec(), dynamic #t5 = [@vm.inferred-type.metadata=int] self::inc(), dynamic #t6 = [@vm.inferred-type.metadata=int] self::inc(), dynamic #t7 = [@vm.inferred-type.metadata=int] self::inc(), dynamic #t8 = [@vm.inferred-type.metadata=int] self::dec(), super self::TestNamedOrderBase::•(#t5, #t8, #t7, #t6) {
     exp::Expect::equals([@vm.direct-call.metadata=#lib::TestNamedOrderSub.x] [@vm.inferred-type.metadata=int] this.{self::TestNamedOrderSub::x}, 0);
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 5e5e550..c1f1292e 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
@@ -39,7 +39,7 @@
     ;
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  abstract method foo() → dynamic;
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:3]  abstract get bar() → dynamic;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  abstract method bazz(dynamic a1, dynamic a2, dynamic a3, [dynamic a4 = #C1, dynamic a5 = #C1]) → dynamic;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5] [@vm.unboxing-info.metadata=(i,i,i)->b]  abstract method bazz(dynamic a1, dynamic a2, dynamic a3, [dynamic a4 = #C1, dynamic a5 = #C1]) → dynamic;
 }
 class B extends self::A {
   synthetic constructor •() → self::B*
@@ -52,7 +52,7 @@
     return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B.noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 1, #C3, #C4, [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))));
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  no-such-method-forwarder method foo() → dynamic
     return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B.noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, #C4, [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))));
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi (value: 2)] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi (value: 3)] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi (value: 4)] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic a5 = #C1]) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5] [@vm.unboxing-info.metadata=(i,i,i)->b]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi (value: 2)] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi (value: 3)] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi (value: 4)] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic a5 = #C1]) → dynamic
     return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B.noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))));
 }
 abstract class C extends core::Object {
@@ -71,7 +71,7 @@
     return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C.noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 1, #C3, #C4, [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))));
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  no-such-method-forwarder method foo() → dynamic
     return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C.noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, #C4, [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))));
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi (value: 2)] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi (value: 3)] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi (value: 4)] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic a5 = #C1]) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5] [@vm.unboxing-info.metadata=(i,i,i)->b]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi (value: 2)] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi (value: 3)] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi (value: 4)] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic a5 = #C1]) → dynamic
     return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C.noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol*, dynamic>] core::Map::unmodifiable<core::Symbol*, dynamic>(#C5))));
 }
 class E extends core::Object implements self::A {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/null_check_elimination_nnbd.dart b/pkg/vm/testcases/transformations/type_flow/transformer/null_check_elimination_nnbd.dart
index 1d5fb04..b529e22 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/null_check_elimination_nnbd.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/null_check_elimination_nnbd.dart
@@ -5,7 +5,7 @@
 // Tests elimination of null checks.
 // This test requires non-nullable experiment.
 
-// @dart = 2.9
+// @dart = 2.10
 
 class A {
   String? nonNullable;
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 84595a6..3333ebe 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
@@ -65,10 +65,10 @@
 [@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,methodOrSetterSelectorId:7,getterSelectorId:8]  @#C16
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8] [@vm.unboxing-info.metadata=()->i]  @#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:7,getterSelectorId:8]  @#C16
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8] [@vm.unboxing-info.metadata=(i)->b]  @#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,methodOrSetterSelectorId:13,getterSelectorId:14]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14] [@vm.unboxing-info.metadata=()->i]  @#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:13,getterSelectorId:14]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14] [@vm.unboxing-info.metadata=(i)->b]  @#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 7727512..6c5087b 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
@@ -62,7 +62,7 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:6]  @#C15
   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]  @#C17
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:7] [@vm.unboxing-info.metadata=()->i]  @#C17
   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,getterSelectorId:9]  @#C19
@@ -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:12]  @#C13
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:12] [@vm.unboxing-info.metadata=()->i]  @#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 2acd6e9..d3b4dbc 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
@@ -72,7 +72,7 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:5]  @#C17
   get mapDrop() → core::Map<core::String*, self::ZopDrop*>*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getMap] [@vm.inferred-type.metadata=! (skip check)] this.{pro::GeneratedMessage::$_getMap}<core::String*, self::ZopDrop*>(3);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6]  @#C19
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6] [@vm.unboxing-info.metadata=(i)->b]  @#C19
   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);
   }
@@ -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:9]  @#C13
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9] [@vm.unboxing-info.metadata=(i)->b]  @#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:10]  @#C25
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:10] [@vm.unboxing-info.metadata=(i)->b]  @#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:11]  @#C13
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11] [@vm.unboxing-info.metadata=(i)->b]  @#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 768a154..803d43d 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
@@ -69,10 +69,10 @@
 [@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,methodOrSetterSelectorId:7,getterSelectorId:8]  @#C16
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8] [@vm.unboxing-info.metadata=()->i]  @#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:7,getterSelectorId:8]  @#C16
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8] [@vm.unboxing-info.metadata=(i)->b]  @#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,methodOrSetterSelectorId:13,getterSelectorId:14]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14] [@vm.unboxing-info.metadata=()->i]  @#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:13,getterSelectorId:14]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14] [@vm.unboxing-info.metadata=(i)->b]  @#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_41452_nnbd_strong.dart b/pkg/vm/testcases/transformations/type_flow/transformer/regress_41452_nnbd_strong.dart
index b60f24c5..bc79497 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/regress_41452_nnbd_strong.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/regress_41452_nnbd_strong.dart
@@ -6,7 +6,7 @@
 // Tests handling of null initializer of covariant field.
 // This test requires non-nullable experiment and NNBD strong mode.
 
-// @dart = 2.9
+// @dart = 2.10
 
 class _SplayTreeNode<Node extends _SplayTreeNode<Node>> {
   Node? left;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/regress_42413.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/regress_42413.dart.expect
index 0cd08e2..b9f25d4 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/regress_42413.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/regress_42413.dart.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1]  get x() → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] [@vm.unboxing-info.metadata=()->i]  get x() → dynamic
     return 0;
 }
 class A extends core::Object {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect
index 873936d..3b1f57e 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect
@@ -11,7 +11,7 @@
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-[@vm.procedure-attributes.metadata=hasThisUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo() → core::int*
+[@vm.procedure-attributes.metadata=hasThisUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i]  method foo() → core::int*
     return [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=! (skip check)] 1.{core::num::+}([@vm.direct-call.metadata=#lib::B.foo] [@vm.inferred-type.metadata=!? (receiver not int)] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo() as{TypeError,ForDynamic} core::num) as{TypeError} core::int*;
 }
 class TearOffDynamicMethod extends core::Object {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect
index acbb8df..dde5bb5 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect
@@ -7,15 +7,15 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  abstract method foo() → core::int*;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i]  abstract method foo() → core::int*;
 }
 class B extends self::A {
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-[@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:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i]  method foo() → core::int*
     return _in::unsafeCast<core::int*>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] 1.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B.bar] [@vm.inferred-type.metadata=dart.core::_Smi (value: 3) (receiver not int)] [@vm.inferred-type.metadata=#lib::B] self::knownResult().bar())));
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method bar() → core::int*
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4] [@vm.unboxing-info.metadata=()->i]  method bar() → core::int*
     return 3;
 }
 class TearOffInterfaceMethod extends core::Object {
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 e630a88..6090bf0 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
@@ -7,20 +7,20 @@
   synthetic constructor •() → self::A*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  abstract method foo() → core::int*;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i]  abstract method foo() → core::int*;
 }
 class B extends self::A {
   synthetic constructor •() → self::B*
     : super self::A::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo() → core::int*
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i]  method foo() → core::int*
     return _in::unsafeCast<core::int*>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] 1.{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())));
 }
 abstract class Base extends core::Object {
   synthetic constructor •() → self::Base*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method foo() → core::int*
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,methodOrSetterSelectorId:3,getterSelectorId:4] [@vm.unboxing-info.metadata=()->i]  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:5,getterSelectorId:6]  method doCall(dynamic x) → core::int*
     return [@vm.call-site-attributes.metadata=receiverType:dynamic] x.call() as{TypeError,ForDynamic} core::int*;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination.dart.expect
index 333cde8..bfde4ce 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination.dart.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::B<self::B::T*>*
     : super self::A::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method testT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=(i)->i]  method testT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T*>(x);
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method testT2negative([@vm.inferred-type.metadata=#lib::A<dart.core::String*>] dynamic x) → dynamic
     return x as self::B::T*;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd.dart b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd.dart
index 710cf8f..5f0e8e8 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd.dart
@@ -5,7 +5,7 @@
 // Tests elimination of type casts.
 // This test requires non-nullable experiment.
 
-// @dart = 2.9
+// @dart = 2.10
 
 class A<T> {}
 
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd.dart.expect
index dc2fe51..74ab653 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd.dart.expect
@@ -12,13 +12,13 @@
   synthetic constructor •() → self::B<self::B::T%>
     : super self::A::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method testT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=(i)->i]  method testT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T%>(x);
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method testT2([@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T%>(x);
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method testT3([@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T%>(x);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method testNullableT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8] [@vm.unboxing-info.metadata=(i)->i]  method testNullableT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T?>(x);
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  method testNullableT2([@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T?>(x);
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd_strong.dart b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd_strong.dart
index 588f620..c828095 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd_strong.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd_strong.dart
@@ -5,7 +5,7 @@
 // Tests elimination of type casts.
 // This test requires non-nullable experiment and NNBD strong mode.
 
-// @dart = 2.9
+// @dart = 2.10
 
 class A<T> {}
 
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd_strong.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd_strong.dart.expect
index a7d832c..b944e65 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd_strong.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/type_cast_elimination_nnbd_strong.dart.expect
@@ -12,13 +12,13 @@
   synthetic constructor •() → self::B<self::B::T%>
     : super self::A::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method testT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=(i)->i]  method testT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T%>(x);
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method testT2negative([@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic x) → dynamic
     return x as{ForNonNullableByDefault} self::B::T%;
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method testT3([@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T%>(x);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method testNullableT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8] [@vm.unboxing-info.metadata=(i)->i]  method testNullableT1([@vm.inferred-type.metadata=dart.core::_Smi (value: 42)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T?>(x);
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  method testNullableT2([@vm.inferred-type.metadata=dart.core::Null? (value: null)] dynamic x) → dynamic
     return _in::unsafeCast<self::B::T?>(x);
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_getters.dart b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_getters.dart
new file mode 100644
index 0000000..4de6f85
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_getters.dart
@@ -0,0 +1,90 @@
+// 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.
+
+final bool kTrue = int.parse('1') == 1 ? true : false;
+final bool kFalse = int.parse('1') == 2 ? true : false;
+int get mint => 0xaabbccddaabbccdd;
+int get smiOrMint => kTrue ? 1 : mint;
+
+abstract class BI1 {
+  int get value;
+}
+
+class BI1A implements BI1 {
+  final int value;
+  BI1A(this.value);
+}
+
+class BI1B implements BI1 {
+  int get value => null;
+}
+
+abstract class BI2 {
+  int get value;
+}
+
+class BI2A implements BI2 {
+  final int value;
+  BI2A(this.value);
+}
+
+class BI2B implements BI2 {
+  int get value => smiOrMint;
+}
+
+abstract class BI3 {
+  int get value;
+  set value(int value);
+}
+
+class BI3A implements BI3 {
+  int value;
+  BI3A(this.value);
+}
+
+class BI3B implements BI3 {
+  int get value => smiOrMint;
+  set value(int v) {}
+}
+
+abstract class UBI {
+  int value;
+}
+
+class UBIA implements UBI {
+  int value;
+  UBIA(this.value);
+}
+
+class UBIB implements UBI {
+  int get value => smiOrMint;
+  set value(int v) {}
+}
+
+main() {
+  // Getter return value needs to be boxed due to BI1B.value returning `null`.
+  final bi1a = BI1A(smiOrMint);
+  final bi1b = BI1B(); // getter returns null
+  use((kTrue ? bi1a : bi1b).value);
+
+  // Getter return value needs to be boxed due to BI2A.value returning `null`.
+  final bi2a = BI2A(null);
+  final bi2b = BI2B(); // getter returns smiOrMint
+  use((kTrue ? bi2a : bi2b).value);
+
+  // Getter return value needs to be boxed due to setter being called with
+  // `null` value.
+  final bi3a = BI3A(smiOrMint);
+  final bi3b = BI3B(); // getter returns smiOrMint
+  (kTrue ? bi3a : bi3b).value = null;
+  use((kTrue ? bi3a : bi3b).value);
+
+  // Getter return value can be unboxed, both UBIA.value / UBIB.value return
+  // non-nullable int.
+  final ubia = UBIA(smiOrMint);
+  final ubib = UBIB(); // getter returns smiOrMint
+  use((kTrue ? ubia : ubib).value);
+}
+
+void use(dynamic object) {}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_getters.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_getters.dart.expect
new file mode 100644
index 0000000..c8dbff7d
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_getters.dart.expect
@@ -0,0 +1,91 @@
+library #lib;
+import self as self;
+import "dart:core" as core;
+
+abstract class BI1 extends core::Object {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1]  abstract get value() → core::int*;
+}
+class BI1A extends core::Object implements self::BI1 {
+[@vm.inferred-type.metadata=int] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:2,getterSelectorId:1]  final field core::int* value;
+[@vm.unboxing-info.metadata=(i)->b]  constructor •([@vm.inferred-type.metadata=int] core::int* value) → self::BI1A*
+    : self::BI1A::value = value, super core::Object::•()
+    ;
+}
+class BI1B extends core::Object implements self::BI1 {
+  synthetic constructor •() → self::BI1B*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1]  get value() → core::int*
+    return null;
+}
+abstract class BI2 extends core::Object {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:3]  abstract get value() → core::int*;
+}
+class BI2A extends core::Object implements self::BI2 {
+[@vm.inferred-type.metadata=dart.core::Null? (value: null)] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:3]  final field core::int* value;
+  constructor •([@vm.inferred-type.metadata=dart.core::Null? (value: null)] core::int* value) → self::BI2A*
+    : self::BI2A::value = value, super core::Object::•()
+    ;
+}
+class BI2B extends core::Object implements self::BI2 {
+  synthetic constructor •() → self::BI2B*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:3]  get value() → core::int*
+    return [@vm.inferred-type.metadata=int] self::smiOrMint;
+}
+abstract class BI3 extends core::Object {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  abstract get value() → core::int*;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  abstract set value(core::int* value) → void;
+}
+class BI3A extends core::Object implements self::BI3 {
+[@vm.inferred-type.metadata=int?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  field core::int* value;
+[@vm.unboxing-info.metadata=(i)->b]  constructor •([@vm.inferred-type.metadata=int] core::int* value) → self::BI3A*
+    : self::BI3A::value = value, super core::Object::•()
+    ;
+}
+class BI3B extends core::Object implements self::BI3 {
+  synthetic constructor •() → self::BI3B*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  get value() → core::int*
+    return [@vm.inferred-type.metadata=int] self::smiOrMint;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  set value([@vm.inferred-type.metadata=dart.core::Null? (value: null)] core::int* v) → void {}
+}
+abstract class UBI extends core::Object {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:7] [@vm.unboxing-info.metadata=()->i]  abstract get value() → core::int*;
+}
+class UBIA extends core::Object implements self::UBI {
+[@vm.inferred-type.metadata=int] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:8,getterSelectorId:7] [@vm.unboxing-info.metadata=()->i]  field core::int* value;
+[@vm.unboxing-info.metadata=(i)->b]  constructor •([@vm.inferred-type.metadata=int] core::int* value) → self::UBIA*
+    : self::UBIA::value = value, super core::Object::•()
+    ;
+}
+class UBIB extends core::Object implements self::UBI {
+  synthetic constructor •() → self::UBIB*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:7] [@vm.unboxing-info.metadata=()->i]  get value() → core::int*
+    return [@vm.inferred-type.metadata=int] self::smiOrMint;
+}
+[@vm.inferred-type.metadata=dart.core::bool?]static final field core::bool* kTrue = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.inferred-type.metadata=int] core::int::parse("1").{core::num::==}(1) ?{core::bool*} true : false;
+[@vm.unboxing-info.metadata=()->i]static get mint() → core::int*
+  return -6144092014192636707;
+[@vm.unboxing-info.metadata=()->i]static get smiOrMint() → core::int*
+  return [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::int*} 1 : [@vm.inferred-type.metadata=int] self::mint;
+static method main() → dynamic {
+  final self::BI1A* bi1a = new self::BI1A::•([@vm.inferred-type.metadata=int] self::smiOrMint);
+  final self::BI1B* bi1b = new self::BI1B::•();
+  self::use([@vm.inferred-type.metadata=int?]([@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{self::BI1*} bi1a : bi1b).{self::BI1::value});
+  final self::BI2A* bi2a = new self::BI2A::•(null);
+  final self::BI2B* bi2b = new self::BI2B::•();
+  self::use([@vm.inferred-type.metadata=int?]([@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{self::BI2*} bi2a : bi2b).{self::BI2::value});
+  final self::BI3A* bi3a = new self::BI3A::•([@vm.inferred-type.metadata=int] self::smiOrMint);
+  final self::BI3B* bi3b = new self::BI3B::•();
+  ([@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{self::BI3*} bi3a : bi3b).{self::BI3::value} = null;
+  self::use([@vm.inferred-type.metadata=int?]([@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{self::BI3*} bi3a : bi3b).{self::BI3::value});
+  final self::UBIA* ubia = new self::UBIA::•([@vm.inferred-type.metadata=int] self::smiOrMint);
+  final self::UBIB* ubib = new self::UBIB::•();
+  self::use([@vm.inferred-type.metadata=int]([@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{self::UBI*} ubia : ubib).{self::UBI::value});
+}
+static method use([@vm.inferred-type.metadata=int?] dynamic object) → void {}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_fields.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_fields.dart.expect
index 438e696..bce3568 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_fields.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_fields.dart.expect
@@ -8,9 +8,9 @@
     ;
 }
 class A extends core::Object {
-[@vm.inferred-type.metadata=dart.core::_Smi] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  field dynamic unboxedSmi;
-[@vm.inferred-type.metadata=int] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  field dynamic unboxedInt;
-[@vm.inferred-type.metadata=dart.core::_Double] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  field dynamic unboxedDouble;
+[@vm.inferred-type.metadata=dart.core::_Smi] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=(i)->i]  field dynamic unboxedSmi;
+[@vm.inferred-type.metadata=int] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4] [@vm.unboxing-info.metadata=(i)->i]  field dynamic unboxedInt;
+[@vm.inferred-type.metadata=dart.core::_Double] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6] [@vm.unboxing-info.metadata=(d)->d]  field dynamic unboxedDouble;
 [@vm.inferred-type.metadata=int?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  field dynamic boxedNullableInt;
 [@vm.inferred-type.metadata=dart.core::_Double?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  field dynamic boxedNullableDouble;
 [@vm.inferred-type.metadata=!] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12]  field dynamic boxedNonNullableIntOrDouble;
@@ -23,9 +23,9 @@
 }
 [@vm.inferred-type.metadata=dart.core::bool?]static final field core::bool* kTrue = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.inferred-type.metadata=int] core::int::parse("1").{core::num::==}(1) ?{core::bool*} true : false;
 [@vm.inferred-type.metadata=dart.core::bool?]static final field core::bool* kFalse = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.inferred-type.metadata=int] core::int::parse("1").{core::num::==}(2) ?{core::bool*} true : false;
-static get mint() → core::int*
+[@vm.unboxing-info.metadata=()->i]static get mint() → core::int*
   return -6144092014192636707;
-static get smiOrMint() → core::int*
+[@vm.unboxing-info.metadata=()->i]static get smiOrMint() → core::int*
   return [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::int*} 1 : [@vm.inferred-type.metadata=int] self::mint;
 static method main() → dynamic {
   final self::A* a = new self::A::•([@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::int*} 1 : 2, [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::int*} [@vm.inferred-type.metadata=int] self::smiOrMint : 2, [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::double*} 1.1 : 2.2, [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::int*} [@vm.inferred-type.metadata=int] self::smiOrMint : null, [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::double*} 1.1 : null, [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::num*} [@vm.inferred-type.metadata=int] self::smiOrMint : 1.1, [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::num*} [@vm.inferred-type.metadata=dart.core::bool?] self::kFalse ?{core::num*} [@vm.inferred-type.metadata=int] self::smiOrMint : 1.1 : null, [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{self::X*} new self::X::•() : null, new self::X::•());
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_method.dart.expect
index 87a7918..e019e26 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_method.dart.expect
@@ -91,7 +91,7 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:19,getterSelectorId:20]  method returnBoxedX([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::X* ignored) → dynamic
     return new self::X::•();
 }
-static get mint() → core::int*
+[@vm.unboxing-info.metadata=()->i]static get mint() → core::int*
   return -6144092014192636707;
 static method main() → dynamic {
   final core::List<core::Object*>* values = <core::Object*>[new self::Impl1::•(), new self::BaseImpl2::•(), new self::SubImpl3::•()];
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_method_tearoff.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_method_tearoff.dart.expect
index a28e015..bed2172 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_method_tearoff.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_instance_method_tearoff.dart.expect
@@ -91,7 +91,7 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,methodOrSetterSelectorId:19,getterSelectorId:20]  method returnBoxedX(self::X* ignored) → dynamic
     return new self::X::•();
 }
-static get mint() → core::int*
+[@vm.unboxing-info.metadata=()->i]static get mint() → core::int*
   return -6144092014192636707;
 static method main() → dynamic {
   final core::List<core::Object*>* values = <core::Object*>[new self::Impl1::•(), new self::BaseImpl2::•(), new self::SubImpl3::•()];
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method.dart.expect
index 7994267..8074925 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method.dart.expect
@@ -9,9 +9,9 @@
 }
 [@vm.inferred-type.metadata=dart.core::bool?]static final field core::bool* kTrue = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.inferred-type.metadata=int] core::int::parse("1").{core::num::==}(1) ?{core::bool*} true : false;
 [@vm.inferred-type.metadata=dart.core::bool?]static final field core::bool* kFalse = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.inferred-type.metadata=int] core::int::parse("1").{core::num::==}(2) ?{core::bool*} true : false;
-static get mint() → core::int*
+[@vm.unboxing-info.metadata=()->i]static get mint() → core::int*
   return -6144092014192636707;
-static get smiOrMint() → core::int*
+[@vm.unboxing-info.metadata=()->i]static get smiOrMint() → core::int*
   return [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::int*} 1 : [@vm.inferred-type.metadata=int] self::mint;
 [@vm.unboxing-info.metadata=(i,i,d,b,b,b,b,b,b)->b]static method takePositional([@vm.inferred-type.metadata=dart.core::_Smi] core::int* unboxedSmi, [@vm.inferred-type.metadata=int] dynamic unboxedInt, [@vm.inferred-type.metadata=dart.core::_Double] dynamic unboxedDouble, [@vm.inferred-type.metadata=int?] dynamic boxedNullableInt, [@vm.inferred-type.metadata=dart.core::_Double?] dynamic boxedNullableDouble, [@vm.inferred-type.metadata=!] dynamic boxedIntOrDouble, dynamic boxedNullableIntOrDouble, [@vm.inferred-type.metadata=#lib::X?] dynamic boxedNullableX, [@vm.inferred-type.metadata=#lib::X] dynamic boxedX) → void {}
 static method takeOptional([@vm.inferred-type.metadata=dart.core::_Smi] core::int* unboxedSmi, [@vm.inferred-type.metadata=int] dynamic unboxedInt, [@vm.inferred-type.metadata=dart.core::_Double] dynamic unboxedDouble, [@vm.inferred-type.metadata=int?] dynamic boxedNullableInt, [@vm.inferred-type.metadata=dart.core::_Double?] dynamic boxedNullableDouble, [@vm.inferred-type.metadata=!] dynamic boxedIntOrDouble, dynamic boxedNullableIntOrDouble, [@vm.inferred-type.metadata=#lib::X?] dynamic boxedNullableX, [@vm.inferred-type.metadata=#lib::X] dynamic boxedX) → void {}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method_tearoff.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method_tearoff.dart.expect
index 97e7e41..62e1f32 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method_tearoff.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method_tearoff.dart.expect
@@ -9,9 +9,9 @@
 }
 [@vm.inferred-type.metadata=dart.core::bool?]static final field core::bool* kTrue = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.inferred-type.metadata=int] core::int::parse("1").{core::num::==}(1) ?{core::bool*} true : false;
 [@vm.inferred-type.metadata=dart.core::bool?]static final field core::bool* kFalse = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.inferred-type.metadata=int] core::int::parse("1").{core::num::==}(2) ?{core::bool*} true : false;
-static get mint() → core::int*
+[@vm.unboxing-info.metadata=()->i]static get mint() → core::int*
   return -6144092014192636707;
-static get smiOrMint() → core::int*
+[@vm.unboxing-info.metadata=()->i]static get smiOrMint() → core::int*
   return [@vm.inferred-type.metadata=dart.core::bool?] self::kTrue ?{core::int*} 1 : [@vm.inferred-type.metadata=int] self::mint;
 static method takePositional(core::int* unboxedSmi, dynamic unboxedInt, dynamic unboxedDouble, dynamic boxedNullableInt, dynamic boxedNullableDouble, dynamic boxedIntOrDouble, dynamic boxedNullableIntOrDouble, dynamic boxedNullableX, dynamic boxedX) → void {}
 static method takeOptional([@vm.inferred-type.metadata=dart.core::_Smi] core::int* unboxedSmi, [@vm.inferred-type.metadata=int] dynamic unboxedInt, [@vm.inferred-type.metadata=dart.core::_Double] dynamic unboxedDouble, [@vm.inferred-type.metadata=int?] dynamic boxedNullableInt, [@vm.inferred-type.metadata=dart.core::_Double?] dynamic boxedNullableDouble, [@vm.inferred-type.metadata=!] dynamic boxedIntOrDouble, dynamic boxedNullableIntOrDouble, [@vm.inferred-type.metadata=#lib::X?] dynamic boxedNullableX, [@vm.inferred-type.metadata=#lib::X] dynamic boxedX) → void {}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field2.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field2.dart.expect
index 2035697..850e0b6 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field2.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field2.dart.expect
@@ -26,17 +26,17 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3]  set bar(generic-covariant-impl core::int* value) → void;
 }
 abstract class E extends core::Object {
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:4]  abstract get bar() → core::int*;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:4] [@vm.unboxing-info.metadata=()->i]  abstract get bar() → core::int*;
 }
 class F extends core::Object implements self::E {
   synthetic constructor •() → self::F*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:4]  get bar() → core::int*
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:4] [@vm.unboxing-info.metadata=()->i]  get bar() → core::int*
     return 42;
 }
 class G extends core::Object /*hasConstConstructor*/  {
-[@vm.inferred-type.metadata=dart.core::_Smi] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  final field core::int* bazz;
+[@vm.inferred-type.metadata=dart.core::_Smi] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6] [@vm.unboxing-info.metadata=()->i]  final field core::int* bazz;
 }
 abstract class H extends core::Object {
   synthetic constructor •() → self::H*
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field3_nnbd.dart b/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field3_nnbd.dart
index bcc6ec4..ea59290 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field3_nnbd.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field3_nnbd.dart
@@ -5,7 +5,7 @@
 // Test for tree shaking of write-only late fields.
 // This test requires non-nullable experiment.
 
-// @dart = 2.9
+// @dart = 2.10
 
 foo() {}
 
diff --git a/pkg/vm/tool/gen_kernel b/pkg/vm/tool/gen_kernel
index 8174ed5..d0494c7 100755
--- a/pkg/vm/tool/gen_kernel
+++ b/pkg/vm/tool/gen_kernel
@@ -8,25 +8,6 @@
 
 set -e
 
-ABI_VERSION=""
-HAS_PLATFORM=""
-ARGV=()
-
-for arg in "$@"; do
-  case $arg in
-    --use-abi-version=*)
-    ABI_VERSION="$(echo "$arg" | sed "s|--use-abi-version=||")"
-    ;;
-    --platform*)
-    HAS_PLATFORM="TRUE"
-    ARGV+=("$arg")
-    ;;
-    *)
-    ARGV+=("$arg")
-    ;;
-  esac
-done
-
 function follow_links() {
   file="$1"
   while [ -h "$file" ]; do
@@ -54,18 +35,4 @@
   OUT_DIR="$SDK_DIR/out"
 fi
 
-export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
-BIN_DIR="$OUT_DIR/$DART_CONFIGURATION"
-
-if [ $ABI_VERSION ]; then
-  ABI_DIR="$BIN_DIR/dart-sdk/lib/_internal/abiversions/$ABI_VERSION"
-  PLATFORM=()
-  if [ -z $HAS_PLATFORM ]; then
-    PLATFORM+=("--platform" "$ABI_DIR/vm_platform_strong.dill")
-  fi
-  exec "$BIN_DIR/dart" $DART_VM_FLAGS --enable-interpreter \
-    "$ABI_DIR/gen_kernel_bytecode.dill" "${PLATFORM[@]}" "${ARGV[@]}"
-else
-  exec "$DART" $DART_VM_FLAGS \
-    "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" "${ARGV[@]}"
-fi
+exec "$DART" $DART_VM_FLAGS "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" $@
diff --git a/pkg/vm/tool/precompiler2 b/pkg/vm/tool/precompiler2
index dd5b9be..b1199c1 100755
--- a/pkg/vm/tool/precompiler2
+++ b/pkg/vm/tool/precompiler2
@@ -26,8 +26,8 @@
     PACKAGES="$arg"
     ;;
     --enable-asserts | \
-    --null-safety | \
-    --no-null-safety | \
+    --sound-null-safety | \
+    --no-sound-null-safety | \
     --enable-experiment=*)
     GEN_KERNEL_OPTIONS+=("$arg")
     OPTIONS+=("$arg")
diff --git a/pkg/vm_service/CHANGELOG.md b/pkg/vm_service/CHANGELOG.md
index e971a37..90ee11a 100644
--- a/pkg/vm_service/CHANGELOG.md
+++ b/pkg/vm_service/CHANGELOG.md
@@ -1,5 +1,10 @@
 # Changelog
 
+## 4.2.0
+- Update to version `3.37.0` of the spec.
+- Added `getProcessMemoryUsage` RPC and `ProcessMemoryUsage` and `ProcessMemoryItem` objects.
+- Added `getWebSocketTarget` RPC and `WebSocketTarget` object.
+
 ## 4.1.0
 - Update to version `3.35.0` of the spec.
 - Expose more `@required` parameters on the named constructors of VM service objects.
diff --git a/pkg/vm_service/example/vm_service_assert.dart b/pkg/vm_service/example/vm_service_assert.dart
index 33a518d..8e64c27 100644
--- a/pkg/vm_service/example/vm_service_assert.dart
+++ b/pkg/vm_service/example/vm_service_assert.dart
@@ -940,6 +940,30 @@
   return list;
 }
 
+vms.ProcessMemoryUsage assertProcessMemoryUsage(vms.ProcessMemoryUsage obj) {
+  assertNotNull(obj);
+  assertString(obj.type);
+  assertProcessMemoryItem(obj.root);
+  return obj;
+}
+
+vms.ProcessMemoryItem assertProcessMemoryItem(vms.ProcessMemoryItem obj) {
+  assertNotNull(obj);
+  assertString(obj.name);
+  assertString(obj.description);
+  assertInt(obj.size);
+  assertListOfProcessMemoryItem(obj.children);
+  return obj;
+}
+
+List<vms.ProcessMemoryItem> assertListOfProcessMemoryItem(
+    List<vms.ProcessMemoryItem> list) {
+  for (vms.ProcessMemoryItem elem in list) {
+    assertProcessMemoryItem(elem);
+  }
+  return list;
+}
+
 vms.ReloadReport assertReloadReport(vms.ReloadReport obj) {
   assertNotNull(obj);
   assertString(obj.type);
@@ -1171,3 +1195,10 @@
   assertListOfIsolateGroupRef(obj.isolateGroups);
   return obj;
 }
+
+vms.WebSocketTarget assertWebSocketTarget(vms.WebSocketTarget obj) {
+  assertNotNull(obj);
+  assertString(obj.type);
+  assertString(obj.uri);
+  return obj;
+}
diff --git a/pkg/vm_service/java/.gitignore b/pkg/vm_service/java/.gitignore
index 3e3793d..4370934 100644
--- a/pkg/vm_service/java/.gitignore
+++ b/pkg/vm_service/java/.gitignore
@@ -26,6 +26,7 @@
 src/org/dartlang/vm/service/consumer/InvokeConsumer.java
 src/org/dartlang/vm/service/consumer/KillConsumer.java
 src/org/dartlang/vm/service/consumer/PauseConsumer.java
+src/org/dartlang/vm/service/consumer/ProcessMemoryUsageConsumer.java
 src/org/dartlang/vm/service/consumer/ProtocolListConsumer.java
 src/org/dartlang/vm/service/consumer/ReloadSourcesConsumer.java
 src/org/dartlang/vm/service/consumer/RemoveBreakpointConsumer.java
@@ -41,6 +42,7 @@
 src/org/dartlang/vm/service/consumer/TimestampConsumer.java
 src/org/dartlang/vm/service/consumer/VMConsumer.java
 src/org/dartlang/vm/service/consumer/VersionConsumer.java
+src/org/dartlang/vm/service/consumer/WebSocketTargetConsumer.java
 src/org/dartlang/vm/service/element/AllocationProfile.java
 src/org/dartlang/vm/service/element/BoundField.java
 src/org/dartlang/vm/service/element/BoundVariable.java
@@ -95,6 +97,8 @@
 src/org/dartlang/vm/service/element/NullRef.java
 src/org/dartlang/vm/service/element/Obj.java
 src/org/dartlang/vm/service/element/ObjRef.java
+src/org/dartlang/vm/service/element/ProcessMemoryItem.java
+src/org/dartlang/vm/service/element/ProcessMemoryUsage.java
 src/org/dartlang/vm/service/element/ProfileFunction.java
 src/org/dartlang/vm/service/element/Protocol.java
 src/org/dartlang/vm/service/element/ProtocolList.java
@@ -125,3 +129,4 @@
 src/org/dartlang/vm/service/element/VM.java
 src/org/dartlang/vm/service/element/VMRef.java
 src/org/dartlang/vm/service/element/Version.java
+src/org/dartlang/vm/service/element/WebSocketTarget.java
diff --git a/pkg/vm_service/java/version.properties b/pkg/vm_service/java/version.properties
index 469b122..8e5109e 100644
--- a/pkg/vm_service/java/version.properties
+++ b/pkg/vm_service/java/version.properties
@@ -1 +1 @@
-version=3.35
+version=3.37
diff --git a/pkg/vm_service/lib/src/vm_service.dart b/pkg/vm_service/lib/src/vm_service.dart
index c3bc86a..c317c46 100644
--- a/pkg/vm_service/lib/src/vm_service.dart
+++ b/pkg/vm_service/lib/src/vm_service.dart
@@ -28,7 +28,7 @@
         HeapSnapshotObjectNoData,
         HeapSnapshotObjectNullData;
 
-const String vmServiceVersion = '3.35.0';
+const String vmServiceVersion = '3.37.0';
 
 /// @optional
 const String optional = 'optional';
@@ -160,6 +160,8 @@
   'ProfileFunction': ProfileFunction.parse,
   'ProtocolList': ProtocolList.parse,
   'Protocol': Protocol.parse,
+  'ProcessMemoryUsage': ProcessMemoryUsage.parse,
+  'ProcessMemoryItem': ProcessMemoryItem.parse,
   'ReloadReport': ReloadReport.parse,
   'RetainingObject': RetainingObject.parse,
   'RetainingPath': RetainingPath.parse,
@@ -184,6 +186,7 @@
   'Version': Version.parse,
   '@VM': VMRef.parse,
   'VM': VM.parse,
+  'WebSocketTarget': WebSocketTarget.parse,
 };
 
 Map<String, List<String>> _methodReturnTypes = {
@@ -209,6 +212,7 @@
   'getScripts': const ['ScriptList'],
   'getObject': const ['Obj'],
   'getRetainingPath': const ['RetainingPath'],
+  'getProcessMemoryUsage': const ['ProcessMemoryUsage'],
   'getStack': const ['Stack'],
   'getSupportedProtocols': const ['ProtocolList'],
   'getSourceReport': const ['SourceReport'],
@@ -217,6 +221,7 @@
   'getVMTimeline': const ['Timeline'],
   'getVMTimelineFlags': const ['TimelineFlags'],
   'getVMTimelineMicros': const ['Timestamp'],
+  'getWebSocketTarget': const ['WebSocketTarget'],
   'pause': const ['Success'],
   'kill': const ['Success'],
   'registerService': const ['Success'],
@@ -722,6 +727,13 @@
   Future<RetainingPath> getRetainingPath(
       String isolateId, String targetId, int limit);
 
+  /// Returns a description of major uses of memory known to the VM.
+  ///
+  /// Adding or removing buckets is considered a backwards-compatible change for
+  /// the purposes of versioning. A client must gracefully handle the removal or
+  /// addition of any bucket.
+  Future<ProcessMemoryUsage> getProcessMemoryUsage();
+
   /// The `getStack` RPC is used to retrieve the current execution stack and
   /// message queue for an isolate. The isolate does not need to be paused.
   ///
@@ -842,6 +854,13 @@
   /// See [Timestamp] and [getVMTimeline].
   Future<Timestamp> getVMTimelineMicros();
 
+  /// The `getWebSocketTarget` RPC returns the web socket URI that should be
+  /// used by VM service clients with WebSocket implementations that do not
+  /// follow redirects (e.g., `dart:html`'s [WebSocket]).
+  ///
+  /// See [WebSocketTarget].
+  Future<WebSocketTarget> getWebSocketTarget();
+
   /// The `pause` RPC is used to interrupt a running isolate. The RPC enqueues
   /// the interrupt request and potentially returns before the isolate is
   /// paused.
@@ -1359,6 +1378,9 @@
             params['limit'],
           );
           break;
+        case 'getProcessMemoryUsage':
+          response = await _serviceImplementation.getProcessMemoryUsage();
+          break;
         case 'getStack':
           response = await _serviceImplementation.getStack(
             params['isolateId'],
@@ -1395,6 +1417,9 @@
         case 'getVMTimelineMicros':
           response = await _serviceImplementation.getVMTimelineMicros();
           break;
+        case 'getWebSocketTarget':
+          response = await _serviceImplementation.getWebSocketTarget();
+          break;
         case 'pause':
           response = await _serviceImplementation.pause(
             params['isolateId'],
@@ -1823,6 +1848,10 @@
           {'isolateId': isolateId, 'targetId': targetId, 'limit': limit});
 
   @override
+  Future<ProcessMemoryUsage> getProcessMemoryUsage() =>
+      _call('getProcessMemoryUsage');
+
+  @override
   Future<Stack> getStack(String isolateId) =>
       _call('getStack', {'isolateId': isolateId});
 
@@ -1870,6 +1899,9 @@
   Future<Timestamp> getVMTimelineMicros() => _call('getVMTimelineMicros');
 
   @override
+  Future<WebSocketTarget> getWebSocketTarget() => _call('getWebSocketTarget');
+
+  @override
   Future<Success> pause(String isolateId) =>
       _call('pause', {'isolateId': isolateId});
 
@@ -5430,10 +5462,11 @@
 
   /// The amount of non-Dart memory that is retained by Dart objects. For
   /// example, memory associated with Dart objects through APIs such as
-  /// Dart_NewWeakPersistentHandle and Dart_NewExternalTypedData.  This usage is
-  /// only as accurate as the values supplied to these APIs from the VM embedder
-  /// or native extensions. This external memory applies GC pressure, but is
-  /// separate from heapUsage and heapCapacity.
+  /// Dart_NewFinalizableHandle, Dart_NewWeakPersistentHandle and
+  /// Dart_NewExternalTypedData.  This usage is only as accurate as the values
+  /// supplied to these APIs from the VM embedder or native extensions. This
+  /// external memory applies GC pressure, but is separate from heapUsage and
+  /// heapCapacity.
   int externalUsage;
 
   /// The total capacity of the heap in bytes. This is the amount of memory used
@@ -5884,6 +5917,84 @@
       'protocolName: ${protocolName}, major: ${major}, minor: ${minor}]';
 }
 
+/// Set [getProcessMemoryUsage].
+class ProcessMemoryUsage extends Response {
+  static ProcessMemoryUsage parse(Map<String, dynamic> json) =>
+      json == null ? null : ProcessMemoryUsage._fromJson(json);
+
+  ProcessMemoryItem root;
+
+  ProcessMemoryUsage({
+    @required this.root,
+  });
+
+  ProcessMemoryUsage._fromJson(Map<String, dynamic> json)
+      : super._fromJson(json) {
+    root = createServiceObject(json['root'], const ['ProcessMemoryItem']);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    var json = <String, dynamic>{};
+    json['type'] = 'ProcessMemoryUsage';
+    json.addAll({
+      'root': root.toJson(),
+    });
+    return json;
+  }
+
+  String toString() => '[ProcessMemoryUsage type: ${type}, root: ${root}]';
+}
+
+class ProcessMemoryItem {
+  static ProcessMemoryItem parse(Map<String, dynamic> json) =>
+      json == null ? null : ProcessMemoryItem._fromJson(json);
+
+  /// A short name for this bucket of memory.
+  String name;
+
+  /// A longer description for this item.
+  String description;
+
+  /// The amount of memory in bytes. This is a retained size, not a shallow
+  /// size. That is, it includes the size of children.
+  int size;
+
+  /// Subdivisons of this bucket of memory.
+  List<ProcessMemoryItem> children;
+
+  ProcessMemoryItem({
+    @required this.name,
+    @required this.description,
+    @required this.size,
+    @required this.children,
+  });
+
+  ProcessMemoryItem._fromJson(Map<String, dynamic> json) {
+    name = json['name'];
+    description = json['description'];
+    size = json['size'];
+    children = List<ProcessMemoryItem>.from(
+        createServiceObject(json['children'], const ['ProcessMemoryItem']) ??
+            []);
+  }
+
+  Map<String, dynamic> toJson() {
+    var json = <String, dynamic>{};
+    json.addAll({
+      'name': name,
+      'description': description,
+      'size': size,
+      'children': children.map((f) => f.toJson()).toList(),
+    });
+    return json;
+  }
+
+  String toString() => '[ProcessMemoryItem ' //
+      'name: ${name}, description: ${description}, size: ${size}, ' //
+      'children: ${children}]';
+}
+
 class ReloadReport extends Response {
   static ReloadReport parse(Map<String, dynamic> json) =>
       json == null ? null : ReloadReport._fromJson(json);
@@ -7002,3 +7113,32 @@
 
   String toString() => '[VM]';
 }
+
+/// See [getWebSocketTarget]
+class WebSocketTarget extends Response {
+  static WebSocketTarget parse(Map<String, dynamic> json) =>
+      json == null ? null : WebSocketTarget._fromJson(json);
+
+  /// The web socket URI that should be used to connect to the service.
+  String uri;
+
+  WebSocketTarget({
+    @required this.uri,
+  });
+
+  WebSocketTarget._fromJson(Map<String, dynamic> json) : super._fromJson(json) {
+    uri = json['uri'];
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    var json = <String, dynamic>{};
+    json['type'] = 'WebSocketTarget';
+    json.addAll({
+      'uri': uri,
+    });
+    return json;
+  }
+
+  String toString() => '[WebSocketTarget type: ${type}, uri: ${uri}]';
+}
diff --git a/pkg/vm_service/pubspec.yaml b/pkg/vm_service/pubspec.yaml
index 568f09c..6c4cda5 100644
--- a/pkg/vm_service/pubspec.yaml
+++ b/pkg/vm_service/pubspec.yaml
@@ -2,7 +2,7 @@
 description: >-
   A library to communicate with a service implementing the Dart VM
   service protocol.
-version: 4.1.0
+version: 4.2.0
 
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/vm_service
 
diff --git a/pkg/vm_service/tool/dart/generate_dart.dart b/pkg/vm_service/tool/dart/generate_dart.dart
index ba1b0fe..02ae7e1 100644
--- a/pkg/vm_service/tool/dart/generate_dart.dart
+++ b/pkg/vm_service/tool/dart/generate_dart.dart
@@ -1012,6 +1012,7 @@
             'LibraryDependency',
             'Message',
             'ProfileFunction',
+            'ProcessMemoryItem',
             'Protocol',
             'RetainingObject',
             'SourceReportRange',
diff --git a/pkg/vm_snapshot_analysis/CHANGELOG.md b/pkg/vm_snapshot_analysis/CHANGELOG.md
index 4c1fc39..36d229f 100644
--- a/pkg/vm_snapshot_analysis/CHANGELOG.md
+++ b/pkg/vm_snapshot_analysis/CHANGELOG.md
@@ -1,5 +1,25 @@
 # Changelog
 
+## 0.5.3
+- Add `compareProgramInfo` that takes in two program info objects and outputs
+a `Map` object containing the diff data.
+
+## 0.5.2
+- Add support for package paths that look like `package:foo.bar.baz/src/foobar.dart`
+- Move `commands` back to lib.
+
+## 0.5.0+1
+- Fix broken package by moving non-executable file out of bin/ directory.
+
+## 0.5.0
+- Remove `dart:io` dependency from package `lib`, and move `commands` to `bin`.
+- Replace `loadProgramInfo` util method with `loadProgramInfoFromJson`, which
+expects an `Object` parameter instead of a `File` parameter.
+- `buildComparisonTreemap` now expects two `Object` parameters for `oldJson` and
+`newJson` instead of two `File` parameters.
+- `compare` command now prints difference breakdown by node type when this
+information is available.
+
 ## 0.4.0
 
 - Add `buildComparisonTreemap` for constructing treemap representing the diff
diff --git a/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart b/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart
index af86713..42cd027 100644
--- a/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart
+++ b/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart
@@ -5,17 +5,14 @@
 /// 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();
+CallGraph loadTrace(Object inputJson) => _TraceReader(inputJson).readTrace();
 
 /// [CallGraphNode] represents a node of the call-graph. It can either be:
 ///
@@ -439,10 +436,11 @@
             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);
+            // Handle method tear-off: [tear-off-extractor] get:foo can be hit
+            // by dyn:get:foo and get:foo.
+            final targetName = name.substring(extractorPrefix.length);
+            callNodesBySelector[targetName]?.connectTo(funNode);
+            callNodesBySelector['$dynPrefix$targetName']?.connectTo(funNode);
           }
         }
       }
diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/compare.dart b/pkg/vm_snapshot_analysis/lib/src/commands/compare.dart
index 52f8b43..4a9442e 100644
--- a/pkg/vm_snapshot_analysis/lib/src/commands/compare.dart
+++ b/pkg/vm_snapshot_analysis/lib/src/commands/compare.dart
@@ -16,6 +16,8 @@
 import 'package:vm_snapshot_analysis/utils.dart';
 import 'package:vm_snapshot_analysis/v8_profile.dart';
 
+import 'utils.dart';
+
 class CompareCommand extends Command<void> {
   @override
   final String name = 'compare';
@@ -107,9 +109,11 @@
       {int maxWidth = 0,
       bool collapseAnonymousClosures = false,
       HistogramType granularity = HistogramType.bySymbol}) async {
-    final oldSizes = await loadProgramInfo(oldJson,
+    final oldJsonRaw = await loadJsonFromFile(oldJson);
+    final newJsonRaw = await loadJsonFromFile(newJson);
+    final oldSizes = loadProgramInfoFromJson(oldJsonRaw,
         collapseAnonymousClosures: collapseAnonymousClosures);
-    final newSizes = await loadProgramInfo(newJson,
+    final newSizes = loadProgramInfoFromJson(newJsonRaw,
         collapseAnonymousClosures: collapseAnonymousClosures);
 
     if ((oldSizes.snapshotInfo == null) != (newSizes.snapshotInfo == null)) {
@@ -144,10 +148,33 @@
     print('Comparing ${oldJson.path} (old) to ${newJson.path} (new)');
     print('Old   : ${totalOld} bytes.');
     print('New   : ${totalNew} bytes.');
-    print('Change: ${totalDiff > 0 ? '+' : ''}${totalDiff} bytes.');
+    print('Change: ${totalDiff > 0 ? '+' : ''}${totalDiff}'
+        ' (${formatPercent(totalDiff, totalOld, withSign: true)}) bytes.');
 
     if (oldSizes.snapshotInfo != null) {
       print(bucketLegend);
+      print('\nBreakdown by object type:');
+      final oldTypeHistogram =
+          computeHistogram(oldSizes, HistogramType.byNodeType);
+      final newTypeHistogram =
+          computeHistogram(newSizes, HistogramType.byNodeType);
+
+      final diffTypeHistogram = Histogram.fromIterable(
+          Set<String>()
+            ..addAll(oldTypeHistogram.buckets.keys)
+            ..addAll(newTypeHistogram.buckets.keys),
+          sizeOf: (bucket) =>
+              (newTypeHistogram.buckets[bucket] ?? 0) -
+              (oldTypeHistogram.buckets[bucket] ?? 0),
+          bucketFor: (bucket) => bucket,
+          bucketInfo: oldTypeHistogram.bucketInfo);
+
+      printHistogram(oldSizes, diffTypeHistogram,
+          prefix: diffTypeHistogram.bySize
+              .where((bucket) => diffTypeHistogram.buckets[bucket] != 0),
+          maxWidth: maxWidth);
+
+      print(bucketLegend);
     }
   }
 }
diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart b/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart
index 2688628..33c1418 100644
--- a/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart
+++ b/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart
@@ -17,6 +17,8 @@
 import 'package:vm_snapshot_analysis/program_info.dart';
 import 'package:vm_snapshot_analysis/utils.dart';
 
+import 'utils.dart';
+
 class ExplainCommand extends Command<void> {
   @override
   final name = 'explain';
@@ -55,16 +57,18 @@
     if (!sizesJson.existsSync()) {
       usageException('Size profile ${sizesJson.path} does not exist!');
     }
+    final sizesJsonRaw = await loadJsonFromFile(sizesJson);
 
     final traceJson = File(argResults.rest[1]);
     if (!traceJson.existsSync()) {
       usageException('Size profile ${traceJson.path} does not exist!');
     }
+    final traceJsonRaw = await loadJsonFromFile(traceJson);
 
-    final callGraph = await loadTrace(traceJson);
+    final callGraph = loadTrace(traceJsonRaw);
     callGraph.computeDominators();
 
-    final programInfo = await loadProgramInfo(sizesJson);
+    final programInfo = loadProgramInfoFromJson(sizesJsonRaw);
 
     final histogram = Histogram.fromIterable<CallGraphNode>(
         callGraph.dynamicCalls, sizeOf: (dynamicCall) {
diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart b/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart
index e7e012b..c45cfd0 100644
--- a/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart
+++ b/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart
@@ -20,6 +20,8 @@
 import 'package:vm_snapshot_analysis/utils.dart';
 import 'package:vm_snapshot_analysis/v8_profile.dart';
 
+import 'utils.dart';
+
 class SummaryCommand extends Command<void> {
   @override
   final name = 'summary';
@@ -154,7 +156,8 @@
     File traceJson,
     int depsCollapseDepth = 3,
     int topToReport = 30}) async {
-  final info = await loadProgramInfo(input);
+  final inputJson = await loadJsonFromFile(input);
+  final info = loadProgramInfoFromJson(inputJson);
 
   // Compute histogram.
   var histogram = computeHistogram(info, granularity, filter: filter);
@@ -165,7 +168,8 @@
   if (traceJson != null &&
       (granularity == HistogramType.byLibrary ||
           granularity == HistogramType.byPackage)) {
-    var callGraph = await loadTrace(traceJson);
+    final traceJsonRaw = await loadJsonFromFile(traceJson);
+    var callGraph = loadTrace(traceJsonRaw);
 
     // Convert call graph into the approximate dependency graph, dropping any
     // dynamic and dispatch table based dependencies from the graph and only
diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/treemap.dart b/pkg/vm_snapshot_analysis/lib/src/commands/treemap.dart
index 66e9a06..059d353 100644
--- a/pkg/vm_snapshot_analysis/lib/src/commands/treemap.dart
+++ b/pkg/vm_snapshot_analysis/lib/src/commands/treemap.dart
@@ -17,9 +17,9 @@
 
 import 'package:path/path.dart' as p;
 import 'package:args/command_runner.dart';
-
 import 'package:vm_snapshot_analysis/treemap.dart';
-import 'package:vm_snapshot_analysis/utils.dart';
+
+import 'utils.dart';
 
 class TreemapCommand extends Command<void> {
   @override
@@ -89,7 +89,7 @@
     {TreemapFormat format = TreemapFormat.objectType}) async {
   // Load symbols data produced by the AOT compiler and convert it to
   // a tree.
-  final inputJson = await loadJson(input);
+  final inputJson = await loadJsonFromFile(input);
   final tree = treemapFromJson(inputJson, format: format);
 
   // Create output directory and copy all auxiliary files from binary_size tool.
diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/utils.dart b/pkg/vm_snapshot_analysis/lib/src/commands/utils.dart
new file mode 100644
index 0000000..f6a5bbe
--- /dev/null
+++ b/pkg/vm_snapshot_analysis/lib/src/commands/utils.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:convert';
+import 'dart:io';
+
+Future<Object> loadJsonFromFile(File input) async {
+  return await input
+      .openRead()
+      .transform(utf8.decoder)
+      .transform(json.decoder)
+      .first;
+}
diff --git a/pkg/vm_snapshot_analysis/lib/treemap.dart b/pkg/vm_snapshot_analysis/lib/treemap.dart
index 479876a..36ce891 100644
--- a/pkg/vm_snapshot_analysis/lib/treemap.dart
+++ b/pkg/vm_snapshot_analysis/lib/treemap.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/utils.dart';
 import 'package:vm_snapshot_analysis/v8_profile.dart' as v8_profile;
 
 /// Specifies the granularity at which snapshot nodes are represented when
@@ -131,8 +132,15 @@
       return;
     }
 
-    path = path != '' ? '$path/${node.name}' : node.name;
-    _addSymbol(root, path, '<self>', node.size);
+    // Don't add package node names to the path because nested library nodes
+    // already contain package name.
+    if (node.type == NodeType.packageNode) {
+      _addSymbol(root, node.name, '<self>', node.size);
+    } else {
+      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);
     }
@@ -188,7 +196,7 @@
 /// given [v8_profile.Node].
 final Map<TreemapFormat, String Function(v8_profile.Node)> _nameFormatters = {
   TreemapFormat.dataAndCode: (n) => _isExecutableCode(n) ? '<code>' : '<data>',
-  TreemapFormat.objectType: (n) => n.type,
+  TreemapFormat.objectType: (n) => '<${n.type}>',
 };
 
 /// Returns a /-separated path to the given symbol within the treemap.
@@ -227,7 +235,8 @@
   var node = root;
   var depth = 0;
   if (path != '') {
-    for (var part in path.split('/')) {
+    final parts = partsForPath(path);
+    for (var part in parts) {
       node = _addChild(node, kindPath, part);
       depth++;
     }
diff --git a/pkg/vm_snapshot_analysis/lib/utils.dart b/pkg/vm_snapshot_analysis/lib/utils.dart
index 33e1d84..abf3eb3 100644
--- a/pkg/vm_snapshot_analysis/lib/utils.dart
+++ b/pkg/vm_snapshot_analysis/lib/utils.dart
@@ -3,9 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 library vm_snapshot_analysis.utils;
 
-import 'dart:io';
-import 'dart:convert';
-
 import 'package:vm_snapshot_analysis/ascii_table.dart';
 import 'package:vm_snapshot_analysis/program_info.dart';
 import 'package:vm_snapshot_analysis/instruction_sizes.dart'
@@ -13,17 +10,8 @@
 import 'package:vm_snapshot_analysis/treemap.dart';
 import 'package:vm_snapshot_analysis/v8_profile.dart' as v8_profile;
 
-Future<Object> loadJson(File input) async {
-  return await input
-      .openRead()
-      .transform(utf8.decoder)
-      .transform(json.decoder)
-      .first;
-}
-
-Future<ProgramInfo> loadProgramInfo(File input,
-    {bool collapseAnonymousClosures = false}) async {
-  final json = await loadJson(input);
+ProgramInfo loadProgramInfoFromJson(Object json,
+    {bool collapseAnonymousClosures = false}) {
   if (v8_profile.Snapshot.isV8HeapSnapshot(json)) {
     return v8_profile.toProgramInfo(v8_profile.Snapshot.fromJson(json),
         collapseAnonymousClosures: collapseAnonymousClosures);
@@ -34,19 +22,30 @@
 }
 
 /// Compare two size profiles and return result of the comparison as a treemap.
-Future<Map<String, dynamic>> buildComparisonTreemap(File oldJson, File newJson,
+Map<String, dynamic> buildComparisonTreemap(Object oldJson, Object newJson,
     {TreemapFormat format = TreemapFormat.collapsed,
-    bool collapseAnonymousClosures = false}) async {
-  final oldSizes = await loadProgramInfo(oldJson,
+    bool collapseAnonymousClosures = false}) {
+  final oldSizes = loadProgramInfoFromJson(oldJson,
       collapseAnonymousClosures: collapseAnonymousClosures);
-  final newSizes = await loadProgramInfo(newJson,
+  final newSizes = loadProgramInfoFromJson(newJson,
       collapseAnonymousClosures: collapseAnonymousClosures);
 
+  return compareProgramInfo(oldSizes, newSizes, format: format);
+}
+
+Map<String, dynamic> compareProgramInfo(
+    ProgramInfo oldSizes, ProgramInfo newSizes,
+    {TreemapFormat format = TreemapFormat.collapsed}) {
   final diff = computeDiff(oldSizes, newSizes);
-
   return treemapFromInfo(diff, format: format);
 }
 
+String formatPercent(int value, int total, {bool withSign = false}) {
+  final p = value / total * 100.0;
+  final sign = (withSign && value > 0) ? '+' : '';
+  return '${sign}${p.toStringAsFixed(2)}%';
+}
+
 void printHistogram(ProgramInfo info, Histogram histogram,
     {Iterable<String> prefix = const [],
     Iterable<String> suffix = const [],
@@ -61,10 +60,14 @@
     if (wasFiltered) Text.right('Of total'),
   ], maxWidth: maxWidth);
 
-  String formatPercent(int value, int total) {
-    final p = value / total * 100.0;
-    return p.toStringAsFixed(2) + "%";
-  }
+  final visibleRows = [prefix, suffix].expand((l) => l).toList();
+  final visibleSize =
+      visibleRows.fold(0, (sum, key) => sum + histogram.buckets[key]);
+  final numRestRows = histogram.length - (suffix.length + prefix.length);
+  final hiddenRows = Set<String>.from(histogram.bySize)
+      .difference(Set<String>.from(visibleRows));
+  final interestingHiddenRows =
+      hiddenRows.any((k) => histogram.buckets[k] != 0);
 
   if (prefix.isNotEmpty) {
     for (var key in prefix) {
@@ -76,15 +79,10 @@
         if (wasFiltered) formatPercent(size, totalSize),
       ]);
     }
-    table.addSeparator(
-        prefix.length < histogram.length ? Separator.Wave : Separator.Line);
+    table.addSeparator(interestingHiddenRows ? Separator.Wave : Separator.Line);
   }
 
-  final visibleSize = [prefix, suffix]
-      .expand((l) => l)
-      .fold(0, (sum, key) => sum + histogram.buckets[key]);
-  final numRestRows = histogram.length - (suffix.length + prefix.length);
-  if (numRestRows > 0) {
+  if (interestingHiddenRows) {
     final totalRestBytes = histogram.totalSize - visibleSize;
     table.addTextSeparator(
         '$numRestRows more rows accounting for ${totalRestBytes}'
@@ -115,3 +113,12 @@
   }
   print('Total: ${totalSize} bytes');
 }
+
+List<String> partsForPath(String path) {
+  final parts = path.split('/');
+  if (parts.first.startsWith('package:')) {
+    // Convert dot separated package name into a path from which this package originated.
+    parts.replaceRange(0, 1, parts.first.split('.'));
+  }
+  return parts;
+}
diff --git a/pkg/vm_snapshot_analysis/pubspec.yaml b/pkg/vm_snapshot_analysis/pubspec.yaml
index 4e0bf95..fce4b3d 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 analysing AOT snapshot size.
-version: 0.4.0
+version: 0.5.3
 
 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 f2a7741..c5be237 100644
--- a/pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
+++ b/pkg/vm_snapshot_analysis/test/instruction_sizes_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 'dart:convert';
 import 'dart:io';
 
 import 'package:test/test.dart';
@@ -9,6 +10,7 @@
 import 'package:vm_snapshot_analysis/instruction_sizes.dart'
     as instruction_sizes;
 import 'package:vm_snapshot_analysis/program_info.dart';
+import 'package:vm_snapshot_analysis/treemap.dart';
 import 'package:vm_snapshot_analysis/utils.dart';
 
 import 'utils.dart';
@@ -182,8 +184,8 @@
   group('instruction-sizes', () {
     test('basic-parsing', () async {
       await withSymbolSizes('basic-parsing', testSource, (sizesJson) async {
-        final symbols =
-            instruction_sizes.fromJson(await loadJson(File(sizesJson)));
+        final json = await loadJson(File(sizesJson));
+        final symbols = instruction_sizes.fromJson(json);
         expect(symbols, isNotNull,
             reason: 'Sizes file was successfully parsed');
         expect(symbols.length, greaterThan(0),
@@ -256,7 +258,8 @@
     test('program-info-from-sizes', () async {
       await withSymbolSizes('program-info-from-sizes', testSource,
           (sizesJson) async {
-        final info = await loadProgramInfo(File(sizesJson));
+        final json = await loadJson(File(sizesJson));
+        final info = loadProgramInfoFromJson(json);
         expect(info.root.children, contains('dart:core'));
         expect(info.root.children, contains('dart:typed_data'));
         expect(info.root.children, contains('package:input'));
@@ -303,7 +306,8 @@
 
     test('histograms', () async {
       await withSymbolSizes('histograms', testSource, (sizesJson) async {
-        final info = await loadProgramInfo(File(sizesJson));
+        final json = await loadJson(File(sizesJson));
+        final info = loadProgramInfoFromJson(json);
         final bySymbol = computeHistogram(info, HistogramType.bySymbol);
         expect(
             bySymbol.buckets,
@@ -356,8 +360,10 @@
       await withSymbolSizes('diff-1', testSource, (sizesJson) async {
         await withSymbolSizes('diff-2', testSourceModified,
             (modifiedSizesJson) async {
-          final info = await loadProgramInfo(File(sizesJson));
-          final modifiedInfo = await loadProgramInfo(File(modifiedSizesJson));
+          final infoJson = await loadJson(File(sizesJson));
+          final info = loadProgramInfoFromJson(infoJson);
+          final modifiedJson = await loadJson(File(modifiedSizesJson));
+          final modifiedInfo = loadProgramInfoFromJson(modifiedJson);
           final diff = computeDiff(info, modifiedInfo);
 
           expect(
@@ -403,9 +409,11 @@
       await withSymbolSizes('diff-collapsed-1', testSource, (sizesJson) async {
         await withSymbolSizes('diff-collapsed-2', testSourceModified2,
             (modifiedSizesJson) async {
-          final info = await loadProgramInfo(File(sizesJson),
-              collapseAnonymousClosures: true);
-          final modifiedInfo = await loadProgramInfo(File(modifiedSizesJson),
+          final json = await loadJson(File(sizesJson));
+          final info =
+              loadProgramInfoFromJson(json, collapseAnonymousClosures: true);
+          final modifiedJson = await loadJson(File(modifiedSizesJson));
+          final modifiedInfo = loadProgramInfoFromJson(modifiedJson,
               collapseAnonymousClosures: true);
           final diff = computeDiff(info, modifiedInfo);
 
@@ -442,7 +450,8 @@
     test('program-info-from-profile', () async {
       await withV8Profile('program-info-from-profile', testSource,
           (profileJson) async {
-        final info = await loadProgramInfo(File(profileJson));
+        final infoJson = await loadJson(File(profileJson));
+        final info = loadProgramInfoFromJson(infoJson);
         expect(info.root.children, contains('dart:core'));
         expect(info.root.children, contains('dart:typed_data'));
         expect(info.root.children, contains('package:input'));
@@ -500,7 +509,8 @@
 
     test('histograms', () async {
       await withV8Profile('histograms', testSource, (sizesJson) async {
-        final info = await loadProgramInfo(File(sizesJson));
+        final infoJson = await loadJson(File(sizesJson));
+        final info = loadProgramInfoFromJson(infoJson);
         final bySymbol = computeHistogram(info, HistogramType.bySymbol);
         expect(
             bySymbol.buckets,
@@ -553,8 +563,10 @@
       await withV8Profile('diff-1', testSource, (profileJson) async {
         await withV8Profile('diff-2', testSourceModified,
             (modifiedProfileJson) async {
-          final info = await loadProgramInfo(File(profileJson));
-          final modifiedInfo = await loadProgramInfo(File(modifiedProfileJson));
+          final infoJson = await loadJson(File(profileJson));
+          final info = loadProgramInfoFromJson(infoJson);
+          final modifiedJson = await loadJson(File(modifiedProfileJson));
+          final modifiedInfo = loadProgramInfoFromJson(modifiedJson);
           final diff = computeDiff(info, modifiedInfo);
 
           expect(
@@ -597,9 +609,11 @@
       await withV8Profile('diff-collapsed-1', testSource, (profileJson) async {
         await withV8Profile('diff-collapsed-2', testSourceModified2,
             (modifiedProfileJson) async {
-          final info = await loadProgramInfo(File(profileJson),
+          final infoJson = await loadJson(File(profileJson));
+          final info = loadProgramInfoFromJson(infoJson,
               collapseAnonymousClosures: true);
-          final modifiedInfo = await loadProgramInfo(File(modifiedProfileJson),
+          final modifiedJson = await loadJson(File(modifiedProfileJson));
+          final modifiedInfo = loadProgramInfoFromJson(modifiedJson,
               collapseAnonymousClosures: true);
           final diff = computeDiff(info, modifiedInfo);
 
@@ -629,6 +643,40 @@
         });
       });
     });
+
+    test('treemap', () async {
+      await withV8Profile('treemap', testSource, (profileJson) async {
+        final infoJson = await loadJson(File(profileJson));
+        final info = await loadProgramInfoFromJson(infoJson,
+            collapseAnonymousClosures: true);
+        final treemap = treemapFromInfo(info);
+
+        List<Map<String, dynamic>> childrenOf(Map<String, dynamic> node) =>
+            (node['children'] as List).cast();
+
+        String nameOf(Map<String, dynamic> node) => node['n'];
+
+        Map<String, dynamic> findChild(Map<String, dynamic> node, String name) {
+          return childrenOf(node)
+              .firstWhere((child) => nameOf(child) == name, orElse: () => null);
+        }
+
+        Set<String> childrenNames(Map<String, dynamic> node) {
+          return childrenOf(node).map(nameOf).toSet();
+        }
+
+        // Verify that we don't include package names twice into paths
+        // while building the treemap.
+        if (Platform.isWindows) {
+          // Note: in Windows we don't consider main.dart part of package:input
+          // for some reason.
+          expect(findChild(treemap, 'package:input/input.dart'), isNotNull);
+        } else {
+          expect(childrenNames(findChild(treemap, 'package:input')),
+              equals({'<self>', 'main.dart', 'input.dart'}));
+        }
+      });
+    });
   });
 }
 
diff --git a/pkg/vm_snapshot_analysis/test/precompiler_trace_test.dart b/pkg/vm_snapshot_analysis/test/precompiler_trace_test.dart
index f12fdc5..ef294fe 100644
--- a/pkg/vm_snapshot_analysis/test/precompiler_trace_test.dart
+++ b/pkg/vm_snapshot_analysis/test/precompiler_trace_test.dart
@@ -70,7 +70,8 @@
     test('basic-parsing', () async {
       await withFlag('basic-parsing', testSource, '--trace_precompiler_to',
           (json) async {
-        final callGraph = await loadTrace(File(json));
+        final jsonRaw = await loadJson(File(json));
+        final callGraph = loadTrace(jsonRaw);
         callGraph.computeDominators();
 
         final main = callGraph.program
@@ -88,8 +89,8 @@
         expect(retainedClasses, containsAll(['A', 'B', 'K']));
         expect(retainedFunctions, containsAll(['print', 'tearOff']));
 
-        final getTearOffCall =
-            callGraph.dynamicCalls.firstWhere((n) => n.data == 'get:tornOff');
+        final getTearOffCall = callGraph.dynamicCalls
+            .firstWhere((n) => n.data == 'dyn:get:tornOff');
         expect(
             getTearOffCall.dominated.map((n) => n.data.qualifiedName),
             equals([
diff --git a/pkg/vm_snapshot_analysis/test/utils.dart b/pkg/vm_snapshot_analysis/test/utils.dart
index 375a904..2531279 100644
--- a/pkg/vm_snapshot_analysis/test/utils.dart
+++ b/pkg/vm_snapshot_analysis/test/utils.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 'dart:convert';
 import 'dart:io';
 
 import 'package:path/path.dart' as path;
@@ -73,3 +74,11 @@
     tempDir.deleteSync(recursive: true);
   }
 }
+
+Future<Object> loadJson(File input) async {
+  return await input
+      .openRead()
+      .transform(utf8.decoder)
+      .transform(json.decoder)
+      .first;
+}
diff --git a/pkg/vm_snapshot_analysis/test/utils_test.dart b/pkg/vm_snapshot_analysis/test/utils_test.dart
new file mode 100644
index 0000000..338b0b4
--- /dev/null
+++ b/pkg/vm_snapshot_analysis/test/utils_test.dart
@@ -0,0 +1,73 @@
+// 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:test/test.dart';
+
+import 'package:vm_snapshot_analysis/utils.dart';
+
+void main() async {
+  group('utils', () {
+    test('partsForPath', () async {
+      expect(partsForPath('@shared'), equals(['@shared']));
+      expect(
+        partsForPath('dart:async/_Future'),
+        equals(['dart:async', '_Future']),
+      );
+      expect(
+        partsForPath('dart:typed_data/_Int32x4/&'),
+        equals(['dart:typed_data', '_Int32x4', '&']),
+      );
+      expect(
+        partsForPath('package:foo/bar/baz/bop.dart'),
+        equals(['package:foo', 'bar', 'baz', 'bop.dart']),
+      );
+      expect(
+        partsForPath('package:foo.bar.baz/src/foobar/foobaz'),
+        equals(['package:foo', 'bar', 'baz', 'src', 'foobar', 'foobaz']),
+      );
+      expect(
+        partsForPath('package:foo.bar.baz/src/foobar/foobaz.dart/::/_method'),
+        equals([
+          'package:foo',
+          'bar',
+          'baz',
+          'src',
+          'foobar',
+          'foobaz.dart',
+          '::',
+          '_method',
+        ]),
+      );
+
+      expect(
+        partsForPath('package:foo.bar.baz.proto/model.pb.dart'),
+        equals([
+          'package:foo',
+          'bar',
+          'baz',
+          'proto',
+          'model.pb.dart',
+        ]),
+      );
+      expect(
+        partsForPath(
+            'package:a.b.c.d.e.f/src/page/controller.dart/PageController/new PageController./<anonymous closure @2770>'),
+        equals([
+          'package:a',
+          'b',
+          'c',
+          'd',
+          'e',
+          'f',
+          'src',
+          'page',
+          'controller.dart',
+          'PageController',
+          'new PageController.',
+          '<anonymous closure @2770>',
+        ]),
+      );
+    });
+  });
+}
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
index 6da22fb..20efa72 100644
--- a/runtime/BUILD.gn
+++ b/runtime/BUILD.gn
@@ -228,6 +228,8 @@
   if (is_fuchsia) {
     if (using_fuchsia_gn_sdk) {
       extra_deps += [
+        "//build/fuchsia/config/clang:c++-runtime-deps",
+        "$fuchsia_sdk_root/build/config:runtime_library_group",
         "$fuchsia_sdk_root/pkg/fdio",
         "$fuchsia_sdk_root/pkg/trace-engine",
       ]
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index 7431b64..1b44cd3 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -160,7 +160,7 @@
                  "..:dart_config",
                  "..:dart_precompiler_config",
                ] + extra_configs
-    deps = [ ":generate_abi_version_cc_file" ] + extra_deps
+    deps = extra_deps
 
     defines = [ "EXCLUDE_CFE_AND_KERNEL_PLATFORM" ]
 
@@ -178,7 +178,6 @@
       "snapshot_utils.h",
 
       # Very limited native resolver provided.
-      "$target_gen_dir/abi_version.cc",
       "builtin_gen_snapshot.cc",
       "dfe.cc",
       "dfe.h",
@@ -199,7 +198,7 @@
     }
 
     if (is_mac) {
-      libs = [
+      frameworks = [
         "CoreFoundation.framework",
         "CoreServices.framework",
       ]
@@ -445,13 +444,13 @@
     defines = []
     deps = [ "//third_party/zlib" ] + extra_deps
     if (is_mac || is_ios) {
-      libs = [
+      frameworks = [
         "CoreFoundation.framework",
         "Security.framework",
       ]
 
       if (is_mac) {
-        libs += [ "CoreServices.framework" ]
+        frameworks += [ "CoreServices.framework" ]
       }
     }
 
@@ -551,7 +550,7 @@
   ]
   args = [
     "--enable-experiment=non-nullable",
-    "--null-safety",
+    "--sound-null-safety",
     "--deterministic",
     "--snapshot_kind=" + dart_core_snapshot_kind,
     "--vm_snapshot_data=" + rebase_path(vm_snapshot_data, root_build_dir),
@@ -728,25 +727,6 @@
             get_target_outputs(":platform_strong_dill_linkable")
 }
 
-action("generate_abi_version_cc_file") {
-  inputs = [
-    "../../tools/utils.py",
-    "../../tools/VERSION",
-    "abi_version_in.cc",
-  ]
-  output = "$target_gen_dir/abi_version.cc"
-  outputs = [ output ]
-
-  script = "../../tools/make_version.py"
-  args = [
-    "--quiet",
-    "--output",
-    rebase_path(output, root_build_dir),
-    "--input",
-    rebase_path("abi_version_in.cc", root_build_dir),
-  ]
-}
-
 template("dart_executable") {
   use_product_mode = dart_runtime_mode == "release"
   if (defined(invoker.use_product_mode)) {
@@ -803,7 +783,6 @@
 
     deps = [
       ":crashpad",
-      ":generate_abi_version_cc_file",
       "//third_party/boringssl",
       "//third_party/zlib",
     ]
@@ -840,7 +819,6 @@
                 "snapshot_utils.h",
                 "vmservice_impl.cc",
                 "vmservice_impl.h",
-                "$target_gen_dir/abi_version.cc",
               ] + extra_sources
 
     if (is_win) {
@@ -878,6 +856,8 @@
   }
   extra_sources = [
     "builtin.cc",
+    "dartdev_isolate.cc",
+    "dartdev_isolate.h",
     "dfe.cc",
     "dfe.h",
     "gzip.cc",
@@ -1004,7 +984,6 @@
     ":dart_kernel_platform_cc",
     ":dart_snapshot_cc",
     ":gen_kernel_bytecode_dill",
-    ":generate_abi_version_cc_file",
     ":standalone_dart_io",
     "..:libdart_precompiler",
     "//third_party/zlib",
@@ -1041,7 +1020,6 @@
   heap_tests = rebase_path(heap_sources_tests, ".", "../vm/heap")
 
   sources = [
-              "$target_gen_dir/abi_version.cc",
               "builtin.cc",
               "dfe.cc",
               "dfe.h",
@@ -1056,7 +1034,8 @@
               "snapshot_utils.h",
               "vmservice_impl.cc",
               "vmservice_impl.h",
-            ] + builtin_impl_tests + vm_tests + compiler_tests + heap_tests
+            ] + builtin_impl_tests + vm_tests + compiler_tests + heap_tests +
+            io_impl_tests
 
   if (!is_win) {
     # Adds all symbols to the dynamic symbol table, not just used ones.
diff --git a/runtime/bin/abi_version.h b/runtime/bin/abi_version.h
deleted file mode 100644
index acd0cdf..0000000
--- a/runtime/bin/abi_version.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#ifndef RUNTIME_BIN_ABI_VERSION_H_
-#define RUNTIME_BIN_ABI_VERSION_H_
-
-namespace dart {
-
-class AbiVersion {
- public:
-  static int GetCurrent();
-  static int GetOldestSupported();
-};
-
-}  // namespace dart
-
-#endif  // RUNTIME_BIN_ABI_VERSION_H_
diff --git a/runtime/bin/abi_version_in.cc b/runtime/bin/abi_version_in.cc
deleted file mode 100644
index ad737b2..0000000
--- a/runtime/bin/abi_version_in.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "bin/abi_version.h"
-
-namespace dart {
-
-int AbiVersion::GetCurrent() {
-  return {{ABI_VERSION}};
-}
-
-int AbiVersion::GetOldestSupported() {
-  return {{OLDEST_SUPPORTED_ABI_VERSION}};
-}
-
-}  // namespace dart
diff --git a/runtime/bin/builtin_impl_sources.gni b/runtime/bin/builtin_impl_sources.gni
index fe0251f..b8ea4eb 100644
--- a/runtime/bin/builtin_impl_sources.gni
+++ b/runtime/bin/builtin_impl_sources.gni
@@ -7,7 +7,6 @@
 # io_impl_sources.gypi.
 
 builtin_impl_sources = [
-  "abi_version.h",
   "crypto.cc",
   "crypto.h",
   "crypto_android.cc",
@@ -15,8 +14,6 @@
   "crypto_linux.cc",
   "crypto_macos.cc",
   "crypto_win.cc",
-  "dartdev_utils.cc",
-  "dartdev_utils.h",
   "dartutils.cc",
   "dartutils.h",
   "directory.cc",
diff --git a/runtime/bin/dartdev_isolate.cc b/runtime/bin/dartdev_isolate.cc
new file mode 100644
index 0000000..1f91437
--- /dev/null
+++ b/runtime/bin/dartdev_isolate.cc
@@ -0,0 +1,268 @@
+// 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 "bin/dartdev_isolate.h"
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
+#include <functional>
+#include <memory>
+
+#include "bin/directory.h"
+#include "bin/error_exit.h"
+#include "bin/exe_utils.h"
+#include "bin/file.h"
+#include "bin/lockers.h"
+#include "bin/platform.h"
+#include "bin/process.h"
+#include "include/dart_embedder_api.h"
+#include "platform/utils.h"
+
+#define CHECK_RESULT(result)                                                   \
+  if (Dart_IsError(result)) {                                                  \
+    ProcessError(Dart_GetError(result), kErrorExitCode);                       \
+    if (send_port_id != ILLEGAL_PORT) {                                        \
+      Dart_CloseNativePort(send_port_id);                                      \
+    }                                                                          \
+    Dart_ExitScope();                                                          \
+    Dart_ExitIsolate();                                                        \
+    return;                                                                    \
+  }
+
+namespace dart {
+namespace bin {
+
+DartDevIsolate::DartDevRunner DartDevIsolate::runner_ =
+    DartDevIsolate::DartDevRunner();
+bool DartDevIsolate::should_run_dart_dev_ = false;
+Monitor* DartDevIsolate::DartDevRunner::monitor_ = new Monitor();
+DartDevIsolate::DartDev_Result DartDevIsolate::DartDevRunner::result_ =
+    DartDevIsolate::DartDev_Result_Unknown;
+char** DartDevIsolate::DartDevRunner::script_ = nullptr;
+std::unique_ptr<char*[], void (*)(char*[])>
+    DartDevIsolate::DartDevRunner::argv_ =
+        std::unique_ptr<char*[], void (*)(char**)>(nullptr, [](char**) {});
+intptr_t DartDevIsolate::DartDevRunner::argc_ = 0;
+
+bool DartDevIsolate::ShouldParseCommand(const char* script_uri) {
+  // If script_uri is not a file path or of a known URI scheme, we can assume
+  // that this is a DartDev command.
+  return (!File::ExistsUri(nullptr, script_uri) &&
+          (strncmp(script_uri, "http://", 7) != 0) &&
+          (strncmp(script_uri, "https://", 8) != 0) &&
+          (strncmp(script_uri, "file://", 7) != 0) &&
+          (strncmp(script_uri, "package:", 8) != 0) &&
+          (strncmp(script_uri, "google3://", 10) != 0));
+}
+
+Utils::CStringUniquePtr DartDevIsolate::TryResolveDartDevSnapshotPath() {
+  // |dir_prefix| includes the last path seperator.
+  auto dir_prefix = EXEUtils::GetDirectoryPrefixFromExeName();
+
+  // First assume we're in dart-sdk/bin.
+  char* snapshot_path =
+      Utils::SCreate("%ssnapshots/dartdev.dart.snapshot", dir_prefix.get());
+  if (File::Exists(nullptr, snapshot_path)) {
+    return Utils::CreateCStringUniquePtr(snapshot_path);
+  }
+  free(snapshot_path);
+
+  // If we're not in dart-sdk/bin, we might be in one of the $SDK/out/*
+  // directories. Try to use a snapshot rom a previously built SDK.
+  snapshot_path = Utils::SCreate("%sdartdev.dart.snapshot", dir_prefix.get());
+  if (File::Exists(nullptr, snapshot_path)) {
+    return Utils::CreateCStringUniquePtr(snapshot_path);
+  }
+  free(snapshot_path);
+
+  Syslog::PrintErr("Could not find DartDev snapshot.\n");
+  return Utils::CreateCStringUniquePtr(nullptr);
+}
+
+void DartDevIsolate::DartDevRunner::Run(
+    Dart_IsolateGroupCreateCallback create_isolate,
+    const char* packages_file,
+    char** script,
+    CommandLineOptions* dart_options) {
+  create_isolate_ = create_isolate;
+  dart_options_ = dart_options;
+  packages_file_ = packages_file;
+  script_ = script;
+
+  MonitorLocker locker(monitor_);
+  int result = Thread::Start("DartDev Runner", RunCallback,
+                             reinterpret_cast<uword>(this));
+  if (result != 0) {
+    FATAL1("Failed to start DartDev thread: %d", result);
+  }
+  monitor_->WaitMicros(Monitor::kNoTimeout);
+
+  if (result_ == DartDevIsolate::DartDev_Result_Run) {
+    // Clear the DartDev dart_options and replace them with the processed
+    // options provided by DartDev.
+    dart_options_->Reset();
+    dart_options_->AddArguments(const_cast<const char**>(argv_.get()), argc_);
+  }
+}
+
+static Dart_CObject* GetArrayItem(Dart_CObject* message, intptr_t index) {
+  return message->value.as_array.values[index];
+}
+
+void DartDevIsolate::DartDevRunner::DartDevResultCallback(
+    Dart_Port dest_port_id,
+    Dart_CObject* message) {
+  ASSERT(message->type == Dart_CObject_kArray);
+  int32_t type = GetArrayItem(message, 0)->value.as_int32;
+  switch (type) {
+    case DartDevIsolate::DartDev_Result_Run: {
+      result_ = DartDevIsolate::DartDev_Result_Run;
+      ASSERT(GetArrayItem(message, 1)->type == Dart_CObject_kString);
+      if (*script_ != nullptr) {
+        free(*script_);
+      }
+      *script_ = Utils::StrDup(GetArrayItem(message, 1)->value.as_string);
+      ASSERT(GetArrayItem(message, 2)->type == Dart_CObject_kArray);
+      Dart_CObject* args = GetArrayItem(message, 2);
+      argc_ = args->value.as_array.length;
+      Dart_CObject** dart_args = args->value.as_array.values;
+
+      auto deleter = [](char** args) {
+        for (intptr_t i = 0; i < argc_; ++i) {
+          free(args[i]);
+        }
+        delete[] args;
+      };
+      argv_ =
+          std::unique_ptr<char*[], void (*)(char**)>(new char*[argc_], deleter);
+      for (intptr_t i = 0; i < argc_; ++i) {
+        argv_[i] = Utils::StrDup(dart_args[i]->value.as_string);
+      }
+      break;
+    }
+    case DartDevIsolate::DartDev_Result_Exit: {
+      ASSERT(GetArrayItem(message, 1)->type == Dart_CObject_kInt32);
+      int32_t dartdev_exit_code = GetArrayItem(message, 1)->value.as_int32;
+
+      // If we're given a non-zero exit code, DartDev is signaling for us to
+      // shutdown.
+      if (dartdev_exit_code != 0) {
+        Process::SetGlobalExitCode(dartdev_exit_code);
+      }
+
+      // If DartDev hasn't signaled for us to do anything else, we can assume
+      // there's nothing else for the VM to run and that we can exit.
+      if (result_ == DartDevIsolate::DartDev_Result_Unknown) {
+        result_ = DartDevIsolate::DartDev_Result_Exit;
+      }
+
+      // DartDev is done processing the command. Unblock the main thread and
+      // continue the launch procedure.
+      DartDevRunner::monitor_->Notify();
+      break;
+    }
+    default:
+      UNREACHABLE();
+  }
+}
+
+void DartDevIsolate::DartDevRunner::RunCallback(uword args) {
+  MonitorLocker locker_(DartDevRunner::monitor_);
+  DartDevRunner* runner = reinterpret_cast<DartDevRunner*>(args);
+
+  // TODO(bkonyi): bring up DartDev from kernel instead of a app-jit snapshot.
+  // See https://github.com/dart-lang/sdk/issues/42804
+  auto dartdev_path = DartDevIsolate::TryResolveDartDevSnapshotPath();
+  if (dartdev_path == nullptr) {
+    ProcessError("Failed to find DartDev snapshot.", kErrorExitCode);
+    return;
+  }
+
+  // Hardcode flags to match those used to generate the DartDev snapshot.
+  Dart_IsolateFlags flags;
+  Dart_IsolateFlagsInitialize(&flags);
+  flags.enable_asserts = false;
+  flags.null_safety = false;
+  flags.use_field_guards = true;
+  flags.use_osr = true;
+
+  char* error;
+  Dart_Isolate dartdev_isolate = runner->create_isolate_(
+      dartdev_path.get(), "dartdev", nullptr, runner->packages_file_, &flags,
+      NULL /* callback_data */, const_cast<char**>(&error));
+
+  if (dartdev_isolate == nullptr) {
+    ProcessError(error, kErrorExitCode);
+    return;
+  }
+
+  Dart_EnterIsolate(dartdev_isolate);
+  Dart_EnterScope();
+
+  // Retrieve the DartDev entrypoint.
+  Dart_Port send_port_id = ILLEGAL_PORT;
+  Dart_Handle root_lib = Dart_RootLibrary();
+  Dart_Handle main_closure =
+      Dart_GetField(root_lib, Dart_NewStringFromCString("main"));
+  CHECK_RESULT(main_closure);
+
+  if (!Dart_IsClosure(main_closure)) {
+    ProcessError("Unable to find 'main' in root library 'dartdev'",
+                 kErrorExitCode);
+    Dart_ExitScope();
+    Dart_ExitIsolate();
+    return;
+  }
+
+  // Create a SendPort that DartDev can use to communicate its results over.
+  send_port_id = Dart_NewNativePort("dartdev", DartDevResultCallback, false);
+  ASSERT(send_port_id != ILLEGAL_PORT);
+  Dart_Handle send_port = Dart_NewSendPort(send_port_id);
+  CHECK_RESULT(send_port);
+
+  const intptr_t kNumIsolateArgs = 7;
+  Dart_Handle isolate_args[kNumIsolateArgs];
+  isolate_args[0] = Dart_Null();   // parentPort
+  isolate_args[1] = main_closure;  // entryPoint
+  isolate_args[2] = runner->dart_options_->CreateRuntimeOptions();  // args
+  isolate_args[3] = send_port;                                      // message
+  isolate_args[4] = Dart_True();  // isSpawnUri
+  isolate_args[5] = Dart_Null();  // controlPort
+  isolate_args[6] = Dart_Null();  // capabilities
+
+  Dart_Handle isolate_lib =
+      Dart_LookupLibrary(Dart_NewStringFromCString("dart:isolate"));
+  Dart_Handle result =
+      Dart_Invoke(isolate_lib, Dart_NewStringFromCString("_startIsolate"),
+                  kNumIsolateArgs, isolate_args);
+  CHECK_RESULT(result);
+  CHECK_RESULT(Dart_RunLoop());
+
+  Dart_CloseNativePort(send_port_id);
+
+  Dart_ExitScope();
+  Dart_ShutdownIsolate();
+}
+
+void DartDevIsolate::DartDevRunner::ProcessError(const char* msg,
+                                                 int32_t exit_code) {
+  Syslog::PrintErr("%s\n", msg);
+  Process::SetGlobalExitCode(exit_code);
+  result_ = DartDevIsolate::DartDev_Result_Exit;
+  DartDevRunner::monitor_->Notify();
+}
+
+DartDevIsolate::DartDev_Result DartDevIsolate::RunDartDev(
+    Dart_IsolateGroupCreateCallback create_isolate,
+    const char* packages_file,
+    char** script,
+    CommandLineOptions* dart_options) {
+  runner_.Run(create_isolate, packages_file, script, dart_options);
+  return runner_.result();
+}
+
+#endif  // if !defined(DART_PRECOMPILED_RUNTIME)
+
+}  // namespace bin
+}  // namespace dart
diff --git a/runtime/bin/dartdev_isolate.h b/runtime/bin/dartdev_isolate.h
new file mode 100644
index 0000000..ef6c780
--- /dev/null
+++ b/runtime/bin/dartdev_isolate.h
@@ -0,0 +1,100 @@
+// 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_BIN_DARTDEV_ISOLATE_H_
+#define RUNTIME_BIN_DARTDEV_ISOLATE_H_
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
+#include <memory>
+
+#include "bin/thread.h"
+#include "include/dart_api.h"
+#include "include/dart_native_api.h"
+#include "platform/globals.h"
+#include "platform/utils.h"
+
+namespace dart {
+namespace bin {
+
+class CommandLineOptions;
+
+class DartDevIsolate {
+ public:
+  // Note: keep in sync with pkg/dartdev/lib/vm_interop_handler.dart
+  typedef enum {
+    DartDev_Result_Unknown = -1,
+    DartDev_Result_Run = 1,
+    DartDev_Result_Exit = 2,
+  } DartDev_Result;
+
+  // Returns true if there does not exist a file at |script_uri| or the URI is
+  // not an HTTP resource.
+  static bool ShouldParseCommand(const char* script_uri);
+
+  static void set_should_run_dart_dev(bool enable) {
+    should_run_dart_dev_ = enable;
+  }
+
+  static bool should_run_dart_dev() { return should_run_dart_dev_; }
+
+  // Starts a DartDev instance in a new isolate and runs it to completion.
+  //
+  // Returns true if the VM should run the result in `script`, in which case
+  // `script` and `dart_options` will have been repopulated with the correct
+  // values.
+  static DartDev_Result RunDartDev(
+      Dart_IsolateGroupCreateCallback create_isolate,
+      const char* packages_file,
+      char** script,
+      CommandLineOptions* dart_options);
+
+ protected:
+  class DartDevRunner {
+   public:
+    DartDevRunner() {}
+
+    void Run(Dart_IsolateGroupCreateCallback create_isolate,
+             const char* packages_file,
+             char** script,
+             CommandLineOptions* dart_options);
+
+    DartDev_Result result() const { return result_; }
+
+   private:
+    static void DartDevResultCallback(Dart_Port dest_port_id,
+                                      Dart_CObject* message);
+    static void RunCallback(uword arg);
+    static void ProcessError(const char* msg, int32_t exit_code);
+
+    static DartDev_Result result_;
+    static char** script_;
+    static std::unique_ptr<char*[], void (*)(char**)> argv_;
+    static intptr_t argc_;
+
+    Dart_IsolateGroupCreateCallback create_isolate_;
+    CommandLineOptions* dart_options_;
+    const char* packages_file_;
+    static Monitor* monitor_;
+
+    DISALLOW_ALLOCATION();
+  };
+
+ private:
+  // Attempts to find the DartDev snapshot. If the snapshot cannot be found,
+  // the VM will shutdown.
+  static Utils::CStringUniquePtr TryResolveDartDevSnapshotPath();
+
+  static DartDevRunner runner_;
+  static bool should_run_dart_dev_;
+
+  DISALLOW_ALLOCATION();
+  DISALLOW_IMPLICIT_CONSTRUCTORS(DartDevIsolate);
+};
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+#endif  // RUNTIME_BIN_DARTDEV_ISOLATE_H_
diff --git a/runtime/bin/dartdev_utils.cc b/runtime/bin/dartdev_utils.cc
deleted file mode 100644
index 3f14bc4..0000000
--- a/runtime/bin/dartdev_utils.cc
+++ /dev/null
@@ -1,53 +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.
-
-#include "bin/dartdev_utils.h"
-
-#include <memory>
-
-#include "bin/directory.h"
-#include "bin/exe_utils.h"
-#include "bin/file.h"
-#include "platform/utils.h"
-
-namespace dart {
-namespace bin {
-
-bool DartDevUtils::ShouldParseCommand(const char* script_uri) {
-  // If script_uri is not a file path or of a known URI scheme, we can assume
-  // that this is a DartDev command.
-  return (!File::ExistsUri(nullptr, script_uri) &&
-          (strncmp(script_uri, "http://", 7) != 0) &&
-          (strncmp(script_uri, "https://", 8) != 0) &&
-          (strncmp(script_uri, "file://", 7) != 0) &&
-          (strncmp(script_uri, "package:", 8) != 0) &&
-          (strncmp(script_uri, "google3://", 10) != 0));
-}
-
-bool DartDevUtils::TryResolveDartDevSnapshotPath(char** script_name) {
-  // |dir_prefix| includes the last path seperator.
-  auto dir_prefix = EXEUtils::GetDirectoryPrefixFromExeName();
-
-  // First assume we're in dart-sdk/bin.
-  char* snapshot_path =
-      Utils::SCreate("%ssnapshots/dartdev.dart.snapshot", dir_prefix.get());
-  if (File::Exists(nullptr, snapshot_path)) {
-    *script_name = snapshot_path;
-    return true;
-  }
-  free(snapshot_path);
-
-  // If we're not in dart-sdk/bin, we might be in one of the $SDK/out/*
-  // directories. Try to use a snapshot from a previously built SDK.
-  snapshot_path = Utils::SCreate("%sdartdev.dart.snapshot", dir_prefix.get());
-  if (File::Exists(nullptr, snapshot_path)) {
-    *script_name = snapshot_path;
-    return true;
-  }
-  free(snapshot_path);
-  return false;
-}
-
-}  // namespace bin
-}  // namespace dart
diff --git a/runtime/bin/dartdev_utils.h b/runtime/bin/dartdev_utils.h
deleted file mode 100644
index e388d1e..0000000
--- a/runtime/bin/dartdev_utils.h
+++ /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.
-
-#ifndef RUNTIME_BIN_DARTDEV_UTILS_H_
-#define RUNTIME_BIN_DARTDEV_UTILS_H_
-
-#include "platform/globals.h"
-
-namespace dart {
-namespace bin {
-
-class DartDevUtils {
- public:
-  // Returns true if there does not exist a file at |script_uri| or the URI is
-  // not an HTTP resource.
-  static bool ShouldParseCommand(const char* script_uri);
-
-  // Returns true if we were successfully able to find the DartDev snapshot.
-  // Returns false if we were unable to find the snapshot, in which case the
-  // VM should exit.
-  static bool TryResolveDartDevSnapshotPath(char** script_name);
-
- private:
-  DISALLOW_ALLOCATION();
-  DISALLOW_IMPLICIT_CONSTRUCTORS(DartDevUtils);
-};
-
-}  // namespace bin
-}  // namespace dart
-
-#endif  // RUNTIME_BIN_DARTDEV_UTILS_H_
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 972a07b..a47775c 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -12,11 +12,9 @@
 #include "bin/namespace.h"
 #include "bin/platform.h"
 #include "bin/utils.h"
-
 #include "include/dart_api.h"
 #include "include/dart_native_api.h"
 #include "include/dart_tools_api.h"
-
 #include "platform/assert.h"
 #include "platform/globals.h"
 #include "platform/memory_sanitizer.h"
@@ -68,6 +66,29 @@
 #endif  // defined(HOST_OS_WINDOWS)
 }
 
+Dart_Handle CommandLineOptions::CreateRuntimeOptions() {
+  Dart_Handle string_type = DartUtils::GetDartType("dart:core", "String");
+  if (Dart_IsError(string_type)) {
+    return string_type;
+  }
+  Dart_Handle dart_arguments =
+      Dart_NewListOfTypeFilled(string_type, Dart_EmptyString(), count_);
+  if (Dart_IsError(dart_arguments)) {
+    return dart_arguments;
+  }
+  for (int i = 0; i < count_; i++) {
+    Dart_Handle argument_value = DartUtils::NewString(GetArgument(i));
+    if (Dart_IsError(argument_value)) {
+      return argument_value;
+    }
+    Dart_Handle result = Dart_ListSetAt(dart_arguments, i, argument_value);
+    if (Dart_IsError(result)) {
+      return result;
+    }
+  }
+  return dart_arguments;
+}
+
 int64_t DartUtils::GetIntegerValue(Dart_Handle value_obj) {
   int64_t value = 0;
   Dart_Handle result = Dart_IntegerToInt64(value_obj, &value);
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index 23122ad..65ed5ae 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -55,6 +55,8 @@
     arguments_ = NULL;
   }
 
+  void Reset() { count_ = 0; }
+
   int count() const { return count_; }
   int max_count() const { return max_count_; }
   const char** arguments() const { return arguments_; }
@@ -80,6 +82,8 @@
     }
   }
 
+  Dart_Handle CreateRuntimeOptions();
+
   void operator delete(void* pointer) { abort(); }
 
  private:
diff --git a/runtime/bin/dfe.cc b/runtime/bin/dfe.cc
index 58718b7..755ef82 100644
--- a/runtime/bin/dfe.cc
+++ b/runtime/bin/dfe.cc
@@ -4,13 +4,11 @@
 
 #include "bin/dfe.h"
 
-#include "bin/abi_version.h"
 #include "bin/dartutils.h"
 #include "bin/directory.h"
 #include "bin/error_exit.h"
 #include "bin/exe_utils.h"
 #include "bin/file.h"
-#include "bin/main_options.h"
 #include "bin/platform.h"
 #include "bin/utils.h"
 #include "include/dart_tools_api.h"
@@ -33,6 +31,28 @@
 namespace dart {
 namespace bin {
 
+// The run_vm_tests binary has the DART_PRECOMPILER set in order to allow unit
+// tests to exercise JIT and AOT pipeline.
+//
+// Only on X64 do we have kernel-service.dart.snapshot available otherwise we
+// need to fall back to the built-in one (if we have it).
+#if defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM) ||                                \
+    (defined(DART_PRECOMPILER) && defined(TARGET_ARCH_X64))
+const uint8_t* kernel_service_dill = nullptr;
+const intptr_t kernel_service_dill_size = 0;
+#else
+const uint8_t* kernel_service_dill = kKernelServiceDill;
+const intptr_t kernel_service_dill_size = kKernelServiceDillSize;
+#endif
+
+#if defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM)
+const uint8_t* platform_strong_dill = nullptr;
+const intptr_t platform_strong_dill_size = 0;
+#else
+const uint8_t* platform_strong_dill = kPlatformStrongDill;
+const intptr_t platform_strong_dill_size = kPlatformStrongDillSize;
+#endif
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
 DFE dfe;
 #endif
@@ -46,31 +66,6 @@
       frontend_filename_(nullptr),
       application_kernel_buffer_(nullptr),
       application_kernel_buffer_size_(0) {
-  // The run_vm_tests binary has the DART_PRECOMPILER set in order to allow unit
-  // tests to exercise JIT and AOT pipeline.
-  //
-  // Only on X64 do we have kernel-service.dart.snapshot available otherwise we
-  // need to fall back to the built-in one (if we have it).
-#if defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM) ||                                \
-    (defined(DART_PRECOMPILER) && defined(TARGET_ARCH_X64))
-  kernel_service_dill_ = nullptr;
-  kernel_service_dill_size_ = 0;
-#else
-  kernel_service_dill_ = kKernelServiceDill;
-  kernel_service_dill_size_ = kKernelServiceDillSize;
-#endif
-
-#if defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM)
-  platform_strong_dill_for_compilation_ = nullptr;
-  platform_strong_dill_for_compilation_size_ = 0;
-  platform_strong_dill_for_execution_ = nullptr;
-  platform_strong_dill_for_execution_size_ = 0;
-#else
-  platform_strong_dill_for_compilation_ = kPlatformStrongDill;
-  platform_strong_dill_for_compilation_size_ = kPlatformStrongDillSize;
-  platform_strong_dill_for_execution_ = kPlatformStrongDill;
-  platform_strong_dill_for_execution_size_ = kPlatformStrongDillSize;
-#endif
 }
 
 DFE::~DFE() {
@@ -85,72 +80,28 @@
 }
 
 void DFE::Init() {
-  Init(Options::kAbiVersionUnset);
-}
-
-void DFE::Init(int target_abi_version) {
-  if (platform_strong_dill_for_compilation_ == nullptr) {
+  if (platform_strong_dill == nullptr) {
     return;
   }
 
-  if (!InitKernelServiceAndPlatformDills(target_abi_version)) {
-    return;
-  }
-
-  Dart_SetDartLibrarySourcesKernel(platform_strong_dill_for_compilation_,
-                                   platform_strong_dill_for_compilation_size_);
+  InitKernelServiceAndPlatformDills();
+  Dart_SetDartLibrarySourcesKernel(platform_strong_dill,
+                                   platform_strong_dill_size);
 }
 
-bool DFE::InitKernelServiceAndPlatformDills(int target_abi_version) {
-  const char kAbiVersionsDir[] = "dart-sdk/lib/_internal/abiversions";
-  const char kKernelServiceDillFile[] = "kernel_service.dill";
-  const char kPlatformStrongDillFile[] = "vm_platform_strong.dill";
-
+void DFE::InitKernelServiceAndPlatformDills() {
   if (frontend_filename_ != nullptr) {
-    return true;
+    return;
   }
 
   // |dir_prefix| includes the last path seperator.
   auto dir_prefix = EXEUtils::GetDirectoryPrefixFromExeName();
 
-  if (target_abi_version != Options::kAbiVersionUnset) {
-    kernel_service_dill_ = nullptr;
-    kernel_service_dill_size_ = 0;
-    platform_strong_dill_for_compilation_ = nullptr;
-    platform_strong_dill_for_compilation_size_ = 0;
-
-    // Look in the old abi version directory.
-    char* script_uri =
-        Utils::SCreate("%s%s/%d/%s", dir_prefix.get(), kAbiVersionsDir,
-                       target_abi_version, kPlatformStrongDillFile);
-    if (!TryReadKernelFile(
-            script_uri,
-            const_cast<uint8_t**>(&platform_strong_dill_for_compilation_),
-            &platform_strong_dill_for_compilation_size_)) {
-      Syslog::PrintErr("Can't find old ABI dill file: %s\n", script_uri);
-      free(script_uri);
-      return false;
-    }
-    free(script_uri);
-    script_uri = Utils::SCreate("%s%s/%d/%s", dir_prefix.get(), kAbiVersionsDir,
-                                target_abi_version, kKernelServiceDillFile);
-    if (!TryReadKernelFile(script_uri,
-                           const_cast<uint8_t**>(&kernel_service_dill_),
-                           &kernel_service_dill_size_)) {
-      Syslog::PrintErr("Can't find old ABI dill file: %s\n", script_uri);
-      free(script_uri);
-      return false;
-    } else {
-      frontend_filename_ = script_uri;
-      return true;
-    }
-  }
-
   // Look for the frontend snapshot next to the executable.
   frontend_filename_ =
       Utils::SCreate("%s%s", dir_prefix.get(), kKernelServiceSnapshot);
   if (File::Exists(nullptr, frontend_filename_)) {
-    return true;
+    return;
   }
   free(frontend_filename_);
   frontend_filename_ = nullptr;
@@ -161,31 +112,30 @@
       Utils::SCreate("%s%s%s%s", dir_prefix.get(), kSnapshotsDirectory,
                      File::PathSeparator(), kKernelServiceSnapshot);
   if (File::Exists(nullptr, frontend_filename_)) {
-    return true;
+    return;
   }
   free(frontend_filename_);
   frontend_filename_ = nullptr;
-  return true;
 }
 
 bool DFE::KernelServiceDillAvailable() const {
-  return kernel_service_dill_ != nullptr;
+  return kernel_service_dill != nullptr;
 }
 
 void DFE::LoadKernelService(const uint8_t** kernel_service_buffer,
                             intptr_t* kernel_service_buffer_size) {
-  *kernel_service_buffer = kernel_service_dill_;
-  *kernel_service_buffer_size = kernel_service_dill_size_;
+  *kernel_service_buffer = kernel_service_dill;
+  *kernel_service_buffer_size = kernel_service_dill_size;
 }
 
 void DFE::LoadPlatform(const uint8_t** kernel_buffer,
                        intptr_t* kernel_buffer_size) {
-  *kernel_buffer = platform_strong_dill_for_execution_;
-  *kernel_buffer_size = platform_strong_dill_for_execution_size_;
+  *kernel_buffer = platform_strong_dill;
+  *kernel_buffer_size = platform_strong_dill_size;
 }
 
 bool DFE::CanUseDartFrontend() const {
-  return (platform_strong_dill_for_compilation_ != nullptr) &&
+  return (platform_strong_dill != nullptr) &&
          (KernelServiceDillAvailable() || (frontend_filename() != nullptr));
 }
 
@@ -238,9 +188,9 @@
   PathSanitizer path_sanitizer(script_uri);
   const char* sanitized_uri = path_sanitizer.sanitized_uri();
 
-  return Dart_CompileToKernel(
-      sanitized_uri, platform_strong_dill_for_compilation_,
-      platform_strong_dill_for_compilation_size_, incremental, package_config);
+  return Dart_CompileToKernel(sanitized_uri, platform_strong_dill,
+                              platform_strong_dill_size, incremental,
+                              package_config);
 }
 
 void DFE::CompileAndReadScript(const char* script_uri,
diff --git a/runtime/bin/dfe.h b/runtime/bin/dfe.h
index c75b6ea..eb475bf 100644
--- a/runtime/bin/dfe.h
+++ b/runtime/bin/dfe.h
@@ -24,7 +24,6 @@
   // Call Init before Dart_Initialize to prevent races between the
   // different isolates.
   void Init();
-  void Init(int target_abi_version);
 
   char* frontend_filename() const { return frontend_filename_; }
 
@@ -108,18 +107,12 @@
   bool use_dfe_;
   bool use_incremental_compiler_;
   char* frontend_filename_;
-  const uint8_t* kernel_service_dill_;
-  intptr_t kernel_service_dill_size_;
-  const uint8_t* platform_strong_dill_for_compilation_;
-  intptr_t platform_strong_dill_for_compilation_size_;
-  const uint8_t* platform_strong_dill_for_execution_;
-  intptr_t platform_strong_dill_for_execution_size_;
 
   // Kernel binary specified on the cmd line.
   uint8_t* application_kernel_buffer_;
   intptr_t application_kernel_buffer_size_;
 
-  bool InitKernelServiceAndPlatformDills(int target_abi_version);
+  void InitKernelServiceAndPlatformDills();
 
   DISALLOW_COPY_AND_ASSIGN(DFE);
 };
diff --git a/runtime/bin/directory.cc b/runtime/bin/directory.cc
index 4a5629e..9920d0f 100644
--- a/runtime/bin/directory.cc
+++ b/runtime/bin/directory.cc
@@ -232,9 +232,7 @@
   }
 }
 
-static void ReleaseListing(void* isolate_callback_data,
-                           Dart_WeakPersistentHandle handle,
-                           void* peer) {
+static void ReleaseListing(void* isolate_callback_data, void* peer) {
   AsyncDirectoryListing* listing =
       reinterpret_cast<AsyncDirectoryListing*>(peer);
   listing->Release();
@@ -247,8 +245,8 @@
       DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 1));
   AsyncDirectoryListing* listing =
       reinterpret_cast<AsyncDirectoryListing*>(listing_pointer);
-  Dart_NewWeakPersistentHandle(dart_this, reinterpret_cast<void*>(listing),
-                               sizeof(*listing), ReleaseListing);
+  Dart_NewFinalizableHandle(dart_this, reinterpret_cast<void*>(listing),
+                            sizeof(*listing), ReleaseListing);
   Dart_Handle result = Dart_SetNativeInstanceField(
       dart_this, kAsyncDirectoryListerFieldIndex, listing_pointer);
   ThrowIfError(result);
diff --git a/runtime/bin/elf_loader.cc b/runtime/bin/elf_loader.cc
index b3981bd..c67f391 100644
--- a/runtime/bin/elf_loader.cc
+++ b/runtime/bin/elf_loader.cc
@@ -527,10 +527,6 @@
     }
   }
 
-  CHECK_ERROR(vm_data == nullptr || *vm_data != nullptr,
-              "Could not find VM snapshot data.");
-  CHECK_ERROR(vm_instrs == nullptr || *vm_instrs != nullptr,
-              "Could not find VM snapshot instructions.");
   CHECK_ERROR(isolate_data == nullptr || *isolate_data != nullptr,
               "Could not find isolate snapshot data.");
   CHECK_ERROR(isolate_instrs == nullptr || *isolate_instrs != nullptr,
diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc
index 8394deb..f15bc3b 100644
--- a/runtime/bin/eventhandler_fuchsia.cc
+++ b/runtime/bin/eventhandler_fuchsia.cc
@@ -399,7 +399,7 @@
   } else if ((old_mask == 0) && (new_mask != 0)) {
     AddToPort(port_handle_, di);
   } else if ((old_mask != 0) && (new_mask != 0)) {
-    ASSERT(!di->IsListeningSocket());
+    ASSERT((old_mask == new_mask) || !di->IsListeningSocket());
     RemoveFromPort(port_handle_, di);
     AddToPort(port_handle_, di);
   }
diff --git a/runtime/bin/ffi_test/ffi_test_functions.cc b/runtime/bin/ffi_test/ffi_test_functions.cc
index 435c240..1d7082e 100644
--- a/runtime/bin/ffi_test/ffi_test_functions.cc
+++ b/runtime/bin/ffi_test/ffi_test_functions.cc
@@ -38,6 +38,16 @@
 // Note: If this interface is changed please also update
 // sdk/runtime/tools/dartfuzz/ffiapi.dart
 
+int32_t globalVar;
+
+DART_EXPORT void SetGlobalVar(int32_t v) {
+  globalVar = v;
+}
+
+DART_EXPORT int32_t GetGlobalVar() {
+  return globalVar;
+}
+
 // Sums two ints and adds 42.
 // Simple function to test trampolines.
 // Also used for testing argument exception on passing null instead of a Dart
diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
index 886970e..cbeb39a 100644
--- a/runtime/bin/file.cc
+++ b/runtime/bin/file.cc
@@ -68,9 +68,7 @@
   Dart_SetIntegerReturnValue(args, file_pointer);
 }
 
-static void ReleaseFile(void* isolate_callback_data,
-                        Dart_WeakPersistentHandle handle,
-                        void* peer) {
+static void ReleaseFile(void* isolate_callback_data, void* peer) {
   File* file = reinterpret_cast<File*>(peer);
   file->Release();
 }
@@ -79,9 +77,9 @@
   Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
   intptr_t file_pointer = DartUtils::GetNativeIntptrArgument(args, 1);
   File* file = reinterpret_cast<File*>(file_pointer);
-  Dart_WeakPersistentHandle handle = Dart_NewWeakPersistentHandle(
+  Dart_FinalizableHandle handle = Dart_NewFinalizableHandle(
       dart_this, reinterpret_cast<void*>(file), sizeof(*file), ReleaseFile);
-  file->SetWeakHandle(handle);
+  file->SetFinalizableHandle(handle);
   SetFile(dart_this, file_pointer);
 }
 
@@ -148,7 +146,7 @@
     return;
   }
   file->Close();
-  file->DeleteWeakHandle(Dart_CurrentIsolate());
+  file->DeleteFinalizableHandle(Dart_CurrentIsolate(), dart_this);
   file->Release();
 
   ThrowIfError(
@@ -1307,6 +1305,10 @@
     case Dart_TypedData_kUint64:
     case Dart_TypedData_kFloat64:
       return 8;
+    case Dart_TypedData_kInt32x4:
+    case Dart_TypedData_kFloat32x4:
+    case Dart_TypedData_kFloat64x2:
+      return 16;
     default:
       break;
   }
diff --git a/runtime/bin/file.h b/runtime/bin/file.h
index 9e68346..98d3748 100644
--- a/runtime/bin/file.h
+++ b/runtime/bin/file.h
@@ -184,21 +184,23 @@
   // Calls the platform-specific functions to close the file.
   void Close();
 
-  // Returns the weak persistent handle for the File's Dart wrapper.
-  Dart_WeakPersistentHandle WeakHandle() const { return weak_handle_; }
-
-  // Set the weak persistent handle for the File's Dart wrapper.
-  void SetWeakHandle(Dart_WeakPersistentHandle handle) {
-    ASSERT(weak_handle_ == NULL);
-    weak_handle_ = handle;
+  // Returns the finalizable handle for the File's Dart wrapper.
+  Dart_FinalizableHandle FinalizableHandle() const {
+    return finalizable_handle_;
   }
 
-  // Deletes the weak persistent handle for the File's Dart wrapper. Call
+  // Set the finalizable handle for the File's Dart wrapper.
+  void SetFinalizableHandle(Dart_FinalizableHandle handle) {
+    ASSERT(finalizable_handle_ == NULL);
+    finalizable_handle_ = handle;
+  }
+
+  // Deletes the finalizable handle for the File's Dart wrapper. Call
   // when the file is explicitly closed and the finalizer is no longer
   // needed.
-  void DeleteWeakHandle(Dart_Isolate isolate) {
-    Dart_DeleteWeakPersistentHandle(weak_handle_);
-    weak_handle_ = NULL;
+  void DeleteFinalizableHandle(Dart_Isolate isolate, Dart_Handle strong_ref) {
+    Dart_DeleteFinalizableHandle(finalizable_handle_, strong_ref);
+    finalizable_handle_ = NULL;
   }
 
   // Open the file with the given path. The file is always opened for
@@ -319,7 +321,7 @@
 
  private:
   explicit File(FileHandle* handle)
-      : ReferenceCounted(), handle_(handle), weak_handle_(NULL) {}
+      : ReferenceCounted(), handle_(handle), finalizable_handle_(NULL) {}
 
   ~File();
 
@@ -330,10 +332,10 @@
   // FileHandle is an OS specific class which stores data about the file.
   FileHandle* handle_;  // OS specific handle for the file.
 
-  // We retain the weak handle because we can do cleanup eagerly when Dart code
-  // calls closeSync(). In that case, we delete the weak handle so that the
-  // finalizer doesn't run.
-  Dart_WeakPersistentHandle weak_handle_;
+  // We retain the finalizable handle because we can do cleanup eagerly when
+  // Dart code calls closeSync(). In that case, we delete the finalizable
+  // handle so that the finalizer doesn't run.
+  Dart_FinalizableHandle finalizable_handle_;
 
   friend class ReferenceCounted<File>;
   DISALLOW_COPY_AND_ASSIGN(File);
diff --git a/runtime/bin/file_fuchsia.cc b/runtime/bin/file_fuchsia.cc
index d1918b0..e2e87d8 100644
--- a/runtime/bin/file_fuchsia.cc
+++ b/runtime/bin/file_fuchsia.cc
@@ -9,6 +9,7 @@
 
 #include <errno.h>           // NOLINT
 #include <fcntl.h>           // NOLINT
+#include <lib/fdio/fdio.h>   // NOLINT
 #include <lib/fdio/namespace.h>  // NOLINT
 #include <libgen.h>          // NOLINT
 #include <sys/mman.h>        // NOLINT
@@ -51,8 +52,10 @@
 void File::Close() {
   ASSERT(handle_->fd() >= 0);
   if (handle_->fd() == STDOUT_FILENO) {
-    // If stdout, redirect fd to /dev/null.
-    int null_fd = NO_RETRY_EXPECTED(open("/dev/null", O_WRONLY));
+    // If stdout, redirect fd to Fuchsia's equivalent of /dev/null.
+    auto* null_fdio = fdio_null_create();
+    ASSERT(null_fdio != nullptr);
+    int null_fd = NO_RETRY_EXPECTED(fdio_bind_to_fd(null_fdio, -1, 0));
     ASSERT(null_fd >= 0);
     VOID_NO_RETRY_EXPECTED(dup2(null_fd, handle_->fd()));
     VOID_NO_RETRY_EXPECTED(close(null_fd));
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index 58a9542..848036a 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -18,6 +18,7 @@
 #include <sys/utime.h>  // NOLINT
 
 #include "bin/builtin.h"
+#include "bin/crypto.h"
 #include "bin/directory.h"
 #include "bin/namespace.h"
 #include "bin/utils.h"
@@ -517,6 +518,100 @@
   return (move_status != 0);
 }
 
+static wchar_t* CopyToDartScopeString(wchar_t* string) {
+  wchar_t* wide_path = reinterpret_cast<wchar_t*>(
+      Dart_ScopeAllocate(MAX_PATH * sizeof(wchar_t) + 1));
+  wcscpy(wide_path, string);
+  return wide_path;
+}
+
+static wchar_t* CopyIntoTempFile(const char* src, const char* dest) {
+  // This function will copy the file to a temp file in the destination
+  // directory and return the path of temp file.
+  // Creating temp file name has the same logic as Directory::CreateTemp(),
+  // which tries with the rng and falls back to a uuid if it failed.
+  const char* last_back_slash = strrchr(dest, '\\');
+  // It is possible the path uses forwardslash as path separator.
+  const char* last_forward_slash = strrchr(dest, '/');
+  const char* last_path_separator = NULL;
+  if (last_back_slash == NULL && last_forward_slash == NULL) {
+    return NULL;
+  } else if (last_forward_slash != NULL && last_forward_slash != NULL) {
+    // If both types occur in the path, use the one closer to the end.
+    if (last_back_slash - dest > last_forward_slash - dest) {
+      last_path_separator = last_back_slash;
+    } else {
+      last_path_separator = last_forward_slash;
+    }
+  } else {
+    last_path_separator =
+        (last_forward_slash == NULL) ? last_back_slash : last_forward_slash;
+  }
+  int length_of_parent_dir = last_path_separator - dest + 1;
+  if (length_of_parent_dir + 8 > MAX_PATH) {
+    return NULL;
+  }
+  uint32_t suffix_bytes = 0;
+  const int kSuffixSize = sizeof(suffix_bytes);
+  if (Crypto::GetRandomBytes(kSuffixSize,
+                             reinterpret_cast<uint8_t*>(&suffix_bytes))) {
+    PathBuffer buffer;
+    char* dir = reinterpret_cast<char*>(
+        Dart_ScopeAllocate(1 + sizeof(char) * length_of_parent_dir));
+    memmove(dir, dest, length_of_parent_dir);
+    dir[length_of_parent_dir] = '\0';
+    if (!buffer.Add(dir)) {
+      return NULL;
+    }
+
+    char suffix[8 + 1];
+    Utils::SNPrint(suffix, sizeof(suffix), "%x", suffix_bytes);
+    Utf8ToWideScope source_path(src);
+    if (!buffer.Add(suffix)) {
+      return NULL;
+    }
+    if (CopyFileExW(source_path.wide(), buffer.AsStringW(), NULL, NULL, NULL,
+                    0) != 0) {
+      return CopyToDartScopeString(buffer.AsStringW());
+    }
+    // If CopyFileExW() fails to copy to a temp file with random hex, fall
+    // back to copy to a uuid temp file.
+  }
+  // UUID has a total of 36 characters in the form of
+  // xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx.
+  if (length_of_parent_dir + 36 > MAX_PATH) {
+    return NULL;
+  }
+  UUID uuid;
+  RPC_STATUS status = UuidCreateSequential(&uuid);
+  if ((status != RPC_S_OK) && (status != RPC_S_UUID_LOCAL_ONLY)) {
+    return NULL;
+  }
+  RPC_WSTR uuid_string;
+  status = UuidToStringW(&uuid, &uuid_string);
+  if (status != RPC_S_OK) {
+    return NULL;
+  }
+  PathBuffer buffer;
+  char* dir = reinterpret_cast<char*>(
+      Dart_ScopeAllocate(1 + sizeof(char) * length_of_parent_dir));
+  memmove(dir, dest, length_of_parent_dir);
+  dir[length_of_parent_dir] = '\0';
+  Utf8ToWideScope dest_path(dir);
+  if (!buffer.AddW(dest_path.wide()) ||
+      !buffer.AddW(reinterpret_cast<wchar_t*>(uuid_string))) {
+    return NULL;
+  }
+
+  RpcStringFreeW(&uuid_string);
+  Utf8ToWideScope source_path(src);
+  if (CopyFileExW(source_path.wide(), buffer.AsStringW(), NULL, NULL, NULL,
+                  0) != 0) {
+    return CopyToDartScopeString(buffer.AsStringW());
+  }
+  return NULL;
+}
+
 bool File::Copy(Namespace* namespc,
                 const char* old_path,
                 const char* new_path) {
@@ -525,11 +620,29 @@
     SetLastError(ERROR_FILE_NOT_FOUND);
     return false;
   }
-  Utf8ToWideScope system_old_path(old_path);
-  Utf8ToWideScope system_new_path(new_path);
-  bool success = CopyFileExW(system_old_path.wide(), system_new_path.wide(),
-                             NULL, NULL, NULL, 0) != 0;
-  return success;
+
+  wchar_t* temp_file = CopyIntoTempFile(old_path, new_path);
+  if (temp_file == NULL) {
+    // If temp file creation fails, fall back on doing a direct copy.
+    Utf8ToWideScope system_old_path(old_path);
+    Utf8ToWideScope system_new_path(new_path);
+    return CopyFileExW(system_old_path.wide(), system_new_path.wide(), NULL,
+                       NULL, NULL, 0) != 0;
+  }
+  Utf8ToWideScope system_new_dest(new_path);
+
+  // Remove the existing file. Otherwise, renaming will fail.
+  if (Exists(namespc, new_path)) {
+    DeleteFileW(system_new_dest.wide());
+  }
+
+  if (!MoveFileW(temp_file, system_new_dest.wide())) {
+    DWORD error = GetLastError();
+    DeleteFileW(temp_file);
+    SetLastError(error);
+    return false;
+  }
+  return true;
 }
 
 int64_t File::LengthFromPath(Namespace* namespc, const char* name) {
@@ -683,13 +796,18 @@
   return _wutime64(system_name.wide(), &times) == 0;
 }
 
+// Keep this function synchronized with the behavior
+// of `FileSystemEntity.isAbsolute` in file_system_entity.dart.
 bool File::IsAbsolutePath(const char* pathname) {
-  // Should we consider network paths?
-  if (pathname == NULL) {
-    return false;
-  }
-  return ((strlen(pathname) > 2) && (pathname[1] == ':') &&
-          ((pathname[2] == '\\') || (pathname[2] == '/')));
+  if (pathname == NULL) return false;
+  char first = pathname[0];
+  if (pathname == 0) return false;
+  char second = pathname[1];
+  if (first == '\\' && second == '\\') return true;
+  if (second != ':') return false;
+  first |= 0x20;
+  char third = pathname[2];
+  return (first >= 'a') && (first <= 'z') && (third == '\\' || third == '/');
 }
 
 const char* File::GetCanonicalPath(Namespace* namespc,
diff --git a/runtime/bin/filter.cc b/runtime/bin/filter.cc
index c7eb4db..53f6967 100644
--- a/runtime/bin/filter.cc
+++ b/runtime/bin/filter.cc
@@ -256,9 +256,7 @@
   }
 }
 
-static void DeleteFilter(void* isolate_data,
-                         Dart_WeakPersistentHandle handle,
-                         void* filter_pointer) {
+static void DeleteFilter(void* isolate_data, void* filter_pointer) {
   Filter* filter = reinterpret_cast<Filter*>(filter_pointer);
   delete filter;
 }
@@ -272,8 +270,8 @@
   if (Dart_IsError(err)) {
     return err;
   }
-  Dart_NewWeakPersistentHandle(filter, reinterpret_cast<void*>(filter_pointer),
-                               size, DeleteFilter);
+  Dart_NewFinalizableHandle(filter, reinterpret_cast<void*>(filter_pointer),
+                            size, DeleteFilter);
   return err;
 }
 
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index f49defc..f2d33c5 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -24,7 +24,6 @@
 #include "bin/thread.h"
 #include "bin/utils.h"
 #include "bin/vmservice_impl.h"
-#include "platform/syslog.h"
 
 #include "include/dart_api.h"
 #include "include/dart_tools_api.h"
@@ -32,6 +31,8 @@
 #include "platform/globals.h"
 #include "platform/growable_array.h"
 #include "platform/hashmap.h"
+#include "platform/syslog.h"
+#include "platform/text_buffer.h"
 
 namespace dart {
 namespace bin {
@@ -114,6 +115,7 @@
   V(blobs_container_filename, blobs_container_filename)                        \
   V(assembly, assembly_filename)                                               \
   V(elf, elf_filename)                                                         \
+  V(loading_unit_manifest, loading_unit_manifest_filename)                     \
   V(load_compilation_trace, load_compilation_trace_filename)                   \
   V(load_type_feedback, load_type_feedback_filename)                           \
   V(save_debugging_info, debugging_info_filename)                              \
@@ -286,7 +288,7 @@
     case kAppAOTElf: {
       if (elf_filename == NULL) {
         Syslog::PrintErr(
-            "Building an AOT snapshot as assembly requires specifying "
+            "Building an AOT snapshot as ELF requires specifying "
             "an output file for --elf.\n\n");
         return -1;
       }
@@ -335,13 +337,21 @@
   return 0;
 }
 
+PRINTF_ATTRIBUTE(1, 2) static void PrintErrAndExit(const char* format, ...) {
+  va_list args;
+  va_start(args, format);
+  Syslog::VPrintErr(format, args);
+  va_end(args);
+
+  Dart_ExitScope();
+  Dart_ShutdownIsolate();
+  exit(kErrorExitCode);
+}
+
 static File* OpenFile(const char* filename) {
   File* file = File::Open(NULL, filename, File::kWriteTruncate);
   if (file == NULL) {
-    Syslog::PrintErr("Error: Unable to write file: %s\n\n", filename);
-    Dart_ExitScope();
-    Dart_ShutdownIsolate();
-    exit(kErrorExitCode);
+    PrintErrAndExit("Error: Unable to write file: %s\n\n", filename);
   }
   return file;
 }
@@ -352,29 +362,20 @@
   File* file = OpenFile(filename);
   RefCntReleaseScope<File> rs(file);
   if (!file->WriteFully(buffer, size)) {
-    Syslog::PrintErr("Error: Unable to write file: %s\n\n", filename);
-    Dart_ExitScope();
-    Dart_ShutdownIsolate();
-    exit(kErrorExitCode);
+    PrintErrAndExit("Error: Unable to write file: %s\n\n", filename);
   }
 }
 
 static void ReadFile(const char* filename, uint8_t** buffer, intptr_t* size) {
   File* file = File::Open(NULL, filename, File::kRead);
   if (file == NULL) {
-    Syslog::PrintErr("Unable to open file %s\n", filename);
-    Dart_ExitScope();
-    Dart_ShutdownIsolate();
-    exit(kErrorExitCode);
+    PrintErrAndExit("Error: Unable to read file: %s\n", filename);
   }
   RefCntReleaseScope<File> rs(file);
   *size = file->Length();
   *buffer = reinterpret_cast<uint8_t*>(malloc(*size));
   if (!file->ReadFully(*buffer, *size)) {
-    Syslog::PrintErr("Unable to read file %s\n", filename);
-    Dart_ExitScope();
-    Dart_ShutdownIsolate();
-    exit(kErrorExitCode);
+    PrintErrAndExit("Error: Unable to read file: %s\n", filename);
   }
 }
 
@@ -579,13 +580,94 @@
                                    intptr_t size) {
   File* file = reinterpret_cast<File*>(callback_data);
   if ((file != nullptr) && !file->WriteFully(buffer, size)) {
-    Syslog::PrintErr("Error: Unable to write snapshot file\n\n");
-    Dart_ExitScope();
-    Dart_ShutdownIsolate();
-    exit(kErrorExitCode);
+    PrintErrAndExit("Error: Unable to write snapshot file\n\n");
   }
 }
 
+static void StreamingCloseCallback(void* callback_data) {
+  File* file = reinterpret_cast<File*>(callback_data);
+  file->Release();
+}
+
+static File* OpenLoadingUnitManifest() {
+  File* manifest_file = OpenFile(loading_unit_manifest_filename);
+  if (!manifest_file->Print("{ \"loadingUnits\": [\n")) {
+    PrintErrAndExit("Error: Unable to write file: %s\n\n",
+                    loading_unit_manifest_filename);
+  }
+  return manifest_file;
+}
+
+static void WriteLoadingUnitManifest(File* manifest_file,
+                                     intptr_t id,
+                                     const char* path) {
+  TextBuffer line(128);
+  if (id != 1) {
+    line.Printf(",");
+  }
+  line.Printf("{ \"id\": %" Pd ", \"path\": \"", id);
+  line.AddEscapedString(path);
+  line.Printf("\" }");
+  if (!manifest_file->Print("%s\n", line.buffer())) {
+    PrintErrAndExit("Error: Unable to write file: %s\n\n",
+                    loading_unit_manifest_filename);
+  }
+}
+
+static void CloseLoadingUnitManifest(File* manifest_file) {
+  if (!manifest_file->Print("] }\n")) {
+    PrintErrAndExit("Error: Unable to write file: %s\n\n",
+                    loading_unit_manifest_filename);
+  }
+  manifest_file->Release();
+}
+
+static void NextLoadingUnit(void* callback_data,
+                            intptr_t loading_unit_id,
+                            void** write_callback_data,
+                            void** write_debug_callback_data,
+                            const char* main_filename,
+                            const char* suffix) {
+  char* filename = loading_unit_id == 1
+                       ? strdup(main_filename)
+                       : Utils::SCreate("%s-%" Pd ".part.%s", main_filename,
+                                        loading_unit_id, suffix);
+  File* file = OpenFile(filename);
+  *write_callback_data = file;
+
+  if (debugging_info_filename != nullptr) {
+    char* debug_filename =
+        loading_unit_id == 1
+            ? strdup(debugging_info_filename)
+            : Utils::SCreate("%s-%" Pd ".part.so", debugging_info_filename,
+                             loading_unit_id);
+    File* debug_file = OpenFile(debug_filename);
+    *write_debug_callback_data = debug_file;
+    free(debug_filename);
+  }
+
+  WriteLoadingUnitManifest(reinterpret_cast<File*>(callback_data),
+                           loading_unit_id, filename);
+
+  free(filename);
+}
+
+static void NextAsmCallback(void* callback_data,
+                            intptr_t loading_unit_id,
+                            void** write_callback_data,
+                            void** write_debug_callback_data) {
+  NextLoadingUnit(callback_data, loading_unit_id, write_callback_data,
+                  write_debug_callback_data, assembly_filename, "S");
+}
+
+static void NextElfCallback(void* callback_data,
+                            intptr_t loading_unit_id,
+                            void** write_callback_data,
+                            void** write_debug_callback_data) {
+  NextLoadingUnit(callback_data, loading_unit_id, write_callback_data,
+                  write_debug_callback_data, elf_filename, "so");
+}
+
 static void CreateAndWritePrecompiledSnapshot() {
   ASSERT(IsSnapshottingForPrecompilation());
   Dart_Handle result;
@@ -596,20 +678,30 @@
 
   // Create a precompiled snapshot.
   if (snapshot_kind == kAppAOTAssembly) {
-    File* file = OpenFile(assembly_filename);
-    RefCntReleaseScope<File> rs(file);
-    File* debug_file = nullptr;
-    if (debugging_info_filename != nullptr) {
-      debug_file = OpenFile(debugging_info_filename);
-    } else if (strip) {
+    if (strip && (debugging_info_filename == nullptr)) {
       Syslog::PrintErr(
           "Warning: Generating assembly code without DWARF debugging"
           " information.\n");
     }
-    result = Dart_CreateAppAOTSnapshotAsAssembly(StreamingWriteCallback, file,
-                                                 strip, debug_file);
-    if (debug_file != nullptr) debug_file->Release();
-    CHECK_RESULT(result);
+    if (loading_unit_manifest_filename == nullptr) {
+      File* file = OpenFile(assembly_filename);
+      RefCntReleaseScope<File> rs(file);
+      File* debug_file = nullptr;
+      if (debugging_info_filename != nullptr) {
+        debug_file = OpenFile(debugging_info_filename);
+      }
+      result = Dart_CreateAppAOTSnapshotAsAssembly(StreamingWriteCallback, file,
+                                                   strip, debug_file);
+      if (debug_file != nullptr) debug_file->Release();
+      CHECK_RESULT(result);
+    } else {
+      File* manifest_file = OpenLoadingUnitManifest();
+      result = Dart_CreateAppAOTSnapshotAsAssemblies(
+          NextAsmCallback, manifest_file, strip, StreamingWriteCallback,
+          StreamingCloseCallback);
+      CHECK_RESULT(result);
+      CloseLoadingUnitManifest(manifest_file);
+    }
     if (obfuscate && !strip) {
       Syslog::PrintErr(
           "Warning: The generated assembly code contains unobfuscated DWARF "
@@ -617,20 +709,30 @@
           "         To avoid this, use --strip to remove it.\n");
     }
   } else if (snapshot_kind == kAppAOTElf) {
-    File* file = OpenFile(elf_filename);
-    RefCntReleaseScope<File> rs(file);
-    File* debug_file = nullptr;
-    if (debugging_info_filename != nullptr) {
-      debug_file = OpenFile(debugging_info_filename);
-    } else if (strip) {
+    if (strip && (debugging_info_filename == nullptr)) {
       Syslog::PrintErr(
           "Warning: Generating ELF library without DWARF debugging"
           " information.\n");
     }
-    result = Dart_CreateAppAOTSnapshotAsElf(StreamingWriteCallback, file, strip,
-                                            debug_file);
-    if (debug_file != nullptr) debug_file->Release();
-    CHECK_RESULT(result);
+    if (loading_unit_manifest_filename == nullptr) {
+      File* file = OpenFile(elf_filename);
+      RefCntReleaseScope<File> rs(file);
+      File* debug_file = nullptr;
+      if (debugging_info_filename != nullptr) {
+        debug_file = OpenFile(debugging_info_filename);
+      }
+      result = Dart_CreateAppAOTSnapshotAsElf(StreamingWriteCallback, file,
+                                              strip, debug_file);
+      if (debug_file != nullptr) debug_file->Release();
+      CHECK_RESULT(result);
+    } else {
+      File* manifest_file = OpenLoadingUnitManifest();
+      result = Dart_CreateAppAOTSnapshotAsElfs(NextElfCallback, manifest_file,
+                                               strip, StreamingWriteCallback,
+                                               StreamingCloseCallback);
+      CHECK_RESULT(result);
+      CloseLoadingUnitManifest(manifest_file);
+    }
     if (obfuscate && !strip) {
       Syslog::PrintErr(
           "Warning: The generated ELF library contains unobfuscated DWARF "
diff --git a/runtime/bin/io_impl_sources.gni b/runtime/bin/io_impl_sources.gni
index 84a93ad..846c775 100644
--- a/runtime/bin/io_impl_sources.gni
+++ b/runtime/bin/io_impl_sources.gni
@@ -49,6 +49,7 @@
   "platform_fuchsia.cc",
   "platform_linux.cc",
   "platform_macos.cc",
+  "platform_macos.h",
   "platform_win.cc",
   "process.cc",
   "process.h",
@@ -107,3 +108,5 @@
   "typed_data_utils.cc",
   "typed_data_utils.h",
 ]
+
+io_impl_tests = [ "platform_macos_test.cc" ]
diff --git a/runtime/bin/io_natives.cc b/runtime/bin/io_natives.cc
index 6ee986d..6c36240 100644
--- a/runtime/bin/io_natives.cc
+++ b/runtime/bin/io_natives.cc
@@ -82,6 +82,7 @@
   V(Filter_Process, 4)                                                         \
   V(Filter_Processed, 3)                                                       \
   V(InternetAddress_Parse, 1)                                                  \
+  V(InternetAddress_ParseScopedLinkLocalAddress, 1)                            \
   V(InternetAddress_RawAddrToString, 1)                                        \
   V(IOService_NewServicePort, 0)                                               \
   V(Namespace_Create, 2)                                                       \
diff --git a/runtime/bin/isolate_data.cc b/runtime/bin/isolate_data.cc
index 1d62d32..75bf2f4 100644
--- a/runtime/bin/isolate_data.cc
+++ b/runtime/bin/isolate_data.cc
@@ -25,13 +25,16 @@
 }
 
 IsolateGroupData::~IsolateGroupData() {
+  for (intptr_t i = 0; i < loading_units_.length(); i++) {
+    delete loading_units_[i];
+  }
   free(script_url);
-  script_url = NULL;
+  script_url = nullptr;
   free(packages_file_);
-  packages_file_ = NULL;
+  packages_file_ = nullptr;
   free(resolved_packages_config_);
-  resolved_packages_config_ = NULL;
-  kernel_buffer_ = NULL;
+  resolved_packages_config_ = nullptr;
+  kernel_buffer_ = nullptr;
   kernel_buffer_size_ = 0;
 }
 
diff --git a/runtime/bin/isolate_data.h b/runtime/bin/isolate_data.h
index 6daf547..bba25d7 100644
--- a/runtime/bin/isolate_data.h
+++ b/runtime/bin/isolate_data.h
@@ -11,6 +11,7 @@
 #include "include/dart_api.h"
 #include "platform/assert.h"
 #include "platform/globals.h"
+#include "platform/growable_array.h"
 #include "platform/utils.h"
 
 namespace dart {
@@ -96,10 +97,15 @@
     return app_snapshot_ != nullptr || isolate_run_app_snapshot_;
   }
 
+  void AddLoadingUnit(AppSnapshot* loading_unit) {
+    loading_units_.Add(loading_unit);
+  }
+
  private:
   friend class IsolateData;  // For packages_file_
 
   std::unique_ptr<AppSnapshot> app_snapshot_;
+  MallocGrowableArray<AppSnapshot*> loading_units_;
   char* resolved_packages_config_;
   std::shared_ptr<uint8_t> kernel_buffer_;
   intptr_t kernel_buffer_size_;
diff --git a/runtime/bin/loader.cc b/runtime/bin/loader.cc
index 02002b3..9f62982 100644
--- a/runtime/bin/loader.cc
+++ b/runtime/bin/loader.cc
@@ -12,6 +12,7 @@
 #include "bin/file.h"
 #include "bin/gzip.h"
 #include "bin/lockers.h"
+#include "bin/snapshot_utils.h"
 #include "bin/utils.h"
 #include "include/dart_tools_api.h"
 #include "platform/growable_array.h"
@@ -137,18 +138,11 @@
   return Dart_True();
 }
 
-#if defined(DART_PRECOMPILED_RUNTIME)
-Dart_Handle Loader::LibraryTagHandler(Dart_LibraryTag tag,
-                                      Dart_Handle library,
-                                      Dart_Handle url) {
-  return Dart_Null();
-}
-#else
-static void MallocFinalizer(void* isolate_callback_data,
-                            Dart_WeakPersistentHandle handle,
-                            void* peer) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+static void MallocFinalizer(void* isolate_callback_data, void* peer) {
   free(peer);
 }
+#endif
 
 Dart_Handle Loader::LibraryTagHandler(Dart_LibraryTag tag,
                                       Dart_Handle library,
@@ -175,6 +169,7 @@
     }
     return Dart_DefaultCanonicalizeUrl(library_url, url);
   }
+#if !defined(DART_PRECOMPILED_RUNTIME)
   if (tag == Dart_kKernelTag) {
     uint8_t* kernel_buffer = NULL;
     intptr_t kernel_buffer_size = 0;
@@ -184,8 +179,8 @@
     }
     result = Dart_NewExternalTypedData(Dart_TypedData_kUint8, kernel_buffer,
                                        kernel_buffer_size);
-    Dart_NewWeakPersistentHandle(result, kernel_buffer, kernel_buffer_size,
-                                 MallocFinalizer);
+    Dart_NewFinalizableHandle(result, kernel_buffer, kernel_buffer_size,
+                              MallocFinalizer);
     return result;
   }
   if (tag == Dart_kImportExtensionTag) {
@@ -217,8 +212,48 @@
     }
   }
   return DartUtils::NewError("Invalid tag : %d '%s'", tag, url_string);
-}
+#else   // !defined(DART_PRECOMPILED_RUNTIME)
+  return DartUtils::NewError("Unimplemented tag : %d '%s'", tag, url_string);
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
+}
+
+Dart_Handle Loader::DeferredLoadHandler(intptr_t loading_unit_id) {
+  // A synchronous implementation. An asynchronous implementation would be
+  // better, but the standalone embedder only implements AOT for testing.
+
+  auto isolate_group_data =
+      reinterpret_cast<IsolateGroupData*>(Dart_CurrentIsolateGroupData());
+  char* unit_url = Utils::SCreate(
+      "%s-%" Pd ".part.so", isolate_group_data->script_url, loading_unit_id);
+
+  AppSnapshot* loading_unit_snapshot = Snapshot::TryReadAppSnapshot(unit_url);
+  Dart_Handle result;
+  if (loading_unit_snapshot != nullptr) {
+    isolate_group_data->AddLoadingUnit(loading_unit_snapshot);
+    const uint8_t* isolate_snapshot_data = nullptr;
+    const uint8_t* isolate_snapshot_instructions = nullptr;
+    const uint8_t* ignore_vm_snapshot_data;
+    const uint8_t* ignore_vm_snapshot_instructions;
+    loading_unit_snapshot->SetBuffers(
+        &ignore_vm_snapshot_data, &ignore_vm_snapshot_instructions,
+        &isolate_snapshot_data, &isolate_snapshot_instructions);
+    result = Dart_DeferredLoadComplete(loading_unit_id, isolate_snapshot_data,
+                                       isolate_snapshot_instructions);
+    if (Dart_IsApiError(result)) {
+      result =
+          Dart_DeferredLoadCompleteError(loading_unit_id, Dart_GetError(result),
+                                         /*transient*/ false);
+    }
+  } else {
+    char* error_message = Utils::SCreate("Failed to load %s", unit_url);
+    result = Dart_DeferredLoadCompleteError(loading_unit_id, error_message,
+                                            /*transient*/ false);
+    free(error_message);
+  }
+
+  free(unit_url);
+  return result;
+}
 
 void Loader::InitOnce() {
 }
diff --git a/runtime/bin/loader.h b/runtime/bin/loader.h
index f4715e9..a9f436d 100644
--- a/runtime/bin/loader.h
+++ b/runtime/bin/loader.h
@@ -26,6 +26,7 @@
   static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag,
                                        Dart_Handle library,
                                        Dart_Handle url);
+  static Dart_Handle DeferredLoadHandler(intptr_t loading_unit_id);
 
   static void InitOnce();
 
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 25e7c2b..69d82b0 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -5,16 +5,13 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <memory>
 
-#include "include/bin/dart_io_api.h"
-#include "include/dart_api.h"
-#include "include/dart_embedder_api.h"
-#include "include/dart_tools_api.h"
+#include <memory>
 
 #include "bin/builtin.h"
 #include "bin/console.h"
 #include "bin/crashpad.h"
+#include "bin/dartdev_isolate.h"
 #include "bin/dartutils.h"
 #include "bin/dfe.h"
 #include "bin/error_exit.h"
@@ -31,6 +28,10 @@
 #include "bin/thread.h"
 #include "bin/utils.h"
 #include "bin/vmservice_impl.h"
+#include "include/bin/dart_io_api.h"
+#include "include/dart_api.h"
+#include "include/dart_embedder_api.h"
+#include "include/dart_tools_api.h"
 #include "platform/globals.h"
 #include "platform/growable_array.h"
 #include "platform/hashmap.h"
@@ -74,30 +75,6 @@
 
 static void ReadFile(const char* filename, uint8_t** buffer, intptr_t* size);
 
-static Dart_Handle CreateRuntimeOptions(CommandLineOptions* options) {
-  int options_count = options->count();
-  Dart_Handle string_type = DartUtils::GetDartType("dart:core", "String");
-  if (Dart_IsError(string_type)) {
-    return string_type;
-  }
-  Dart_Handle dart_arguments =
-      Dart_NewListOfTypeFilled(string_type, Dart_EmptyString(), options_count);
-  if (Dart_IsError(dart_arguments)) {
-    return dart_arguments;
-  }
-  for (int i = 0; i < options_count; i++) {
-    Dart_Handle argument_value = DartUtils::NewString(options->GetArgument(i));
-    if (Dart_IsError(argument_value)) {
-      return argument_value;
-    }
-    Dart_Handle result = Dart_ListSetAt(dart_arguments, i, argument_value);
-    if (Dart_IsError(result)) {
-      return result;
-    }
-  }
-  return dart_arguments;
-}
-
 #define SAVE_ERROR_AND_EXIT(result)                                            \
   *error = Utils::StrDup(Dart_GetError(result));                               \
   if (Dart_IsCompilationError(result)) {                                       \
@@ -244,10 +221,8 @@
   if (Dart_IsError(result)) goto failed;
 
   if (isolate_run_app_snapshot) {
-    if (Dart_IsVMFlagSet("support_service") || !Dart_IsPrecompiledRuntime()) {
-      result = Loader::InitForSnapshot(script_uri, isolate_data);
-      if (Dart_IsError(result)) goto failed;
-    }
+    result = Loader::InitForSnapshot(script_uri, isolate_data);
+    if (Dart_IsError(result)) goto failed;
   } else {
     result = DartUtils::ResolveScript(Dart_NewStringFromCString(script_uri));
     if (Dart_IsError(result)) return result != nullptr;
@@ -297,6 +272,8 @@
   // isolates in the group.
   Dart_Handle result = Dart_SetLibraryTagHandler(Loader::LibraryTagHandler);
   CHECK_RESULT(result);
+  result = Dart_SetDeferredLoadHandler(Loader::DeferredLoadHandler);
+  CHECK_RESULT(result);
 
   auto isolate_data = reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate));
 
@@ -354,10 +331,8 @@
   }
 
   if (isolate_run_app_snapshot) {
-    if (Dart_IsVMFlagSet("support_service") || !Dart_IsPrecompiledRuntime()) {
-      Dart_Handle result = Loader::InitForSnapshot(script_uri, isolate_data);
-      CHECK_RESULT(result);
-    }
+    Dart_Handle result = Loader::InitForSnapshot(script_uri, isolate_data);
+    CHECK_RESULT(result);
 #if !defined(DART_PRECOMPILED_RUNTIME)
     if (is_main_isolate) {
       // Find the canonical uri of the app snapshot. We'll use this to decide if
@@ -403,6 +378,15 @@
     CHECK_RESULT(result);
   }
 
+  // Disable pausing the DartDev isolate on start and exit.
+  const char* isolate_name = nullptr;
+  result = Dart_StringToCString(Dart_DebugName(), &isolate_name);
+  CHECK_RESULT(result);
+  if (strstr(isolate_name, "dartdev") != nullptr) {
+    Dart_SetShouldPauseOnStart(false);
+    Dart_SetShouldPauseOnExit(false);
+  }
+
   // Make the isolate runnable so that it is ready to handle messages.
   Dart_ExitScope();
   Dart_ExitIsolate();
@@ -555,6 +539,8 @@
 
   Dart_Handle result = Dart_SetLibraryTagHandler(Loader::LibraryTagHandler);
   CHECK_RESULT(result);
+  result = Dart_SetDeferredLoadHandler(Loader::DeferredLoadHandler);
+  CHECK_RESULT(result);
 
   // Load embedder specific bits and return.
   if (!VmService::Setup(
@@ -937,8 +923,8 @@
     // initial startup message.
     const intptr_t kNumIsolateArgs = 2;
     Dart_Handle isolate_args[kNumIsolateArgs];
-    isolate_args[0] = main_closure;                        // entryPoint
-    isolate_args[1] = CreateRuntimeOptions(dart_options);  // args
+    isolate_args[0] = main_closure;                          // entryPoint
+    isolate_args[1] = dart_options->CreateRuntimeOptions();  // args
 
     Dart_Handle isolate_lib =
         Dart_LookupLibrary(Dart_NewStringFromCString("dart:isolate"));
@@ -986,6 +972,18 @@
 
 #undef CHECK_RESULT
 
+static bool CheckForInvalidPath(const char* path) {
+  // TODO(zichangguo): "\\?\" is a prefix for paths on Windows.
+  // Arguments passed are parsed as an URI. "\\?\" causes problems as a part
+  // of URIs. This is a temporary workaround to prevent VM from crashing.
+  // Issue: https://github.com/dart-lang/sdk/issues/42779
+  if (strncmp(path, "\\\\?\\", 4) == 0) {
+    Syslog::PrintErr("\\\\?\\ prefix is not supported");
+    return false;
+  }
+  return true;
+}
+
 // Observatory assets are not included in a product build.
 #if !defined(PRODUCT)
 extern unsigned int observatory_assets_archive_len;
@@ -1007,7 +1005,7 @@
 #endif  // !defined(PRODUCT)
 
 void main(int argc, char** argv) {
-  char* script_name;
+  char* script_name = nullptr;
   const int EXTRA_VM_ARGUMENTS = 10;
   CommandLineOptions vm_options(argc + EXTRA_VM_ARGUMENTS);
   CommandLineOptions dart_options(argc + EXTRA_VM_ARGUMENTS);
@@ -1097,9 +1095,6 @@
     }
   }
 
-  // At this point, script_name now points to either a script or a snapshot
-  // determined by DartDevUtils above.
-
   DartUtils::SetEnvironment(Options::environment());
 
   if (Options::suppress_core_dump()) {
@@ -1110,19 +1105,31 @@
 
   Loader::InitOnce();
 
-  if (app_snapshot == nullptr) {
-    // For testing purposes we add a flag to debug-mode to use the
-    // in-memory ELF loader.
-    const bool force_load_elf_from_memory =
-        false DEBUG_ONLY(|| Options::force_load_elf_from_memory());
-    app_snapshot =
-        Snapshot::TryReadAppSnapshot(script_name, force_load_elf_from_memory);
-  }
-  if (app_snapshot != nullptr) {
-    vm_run_app_snapshot = true;
-    app_snapshot->SetBuffers(&vm_snapshot_data, &vm_snapshot_instructions,
-                             &app_isolate_snapshot_data,
-                             &app_isolate_snapshot_instructions);
+  auto try_load_snapshots_lambda = [&](void) -> void {
+    if (app_snapshot == nullptr) {
+      // For testing purposes we add a flag to debug-mode to use the
+      // in-memory ELF loader.
+      const bool force_load_elf_from_memory =
+          false DEBUG_ONLY(|| Options::force_load_elf_from_memory());
+      app_snapshot =
+          Snapshot::TryReadAppSnapshot(script_name, force_load_elf_from_memory);
+    }
+    if (app_snapshot != nullptr) {
+      vm_run_app_snapshot = true;
+      app_snapshot->SetBuffers(&vm_snapshot_data, &vm_snapshot_instructions,
+                               &app_isolate_snapshot_data,
+                               &app_isolate_snapshot_instructions);
+    }
+  };
+
+  // At this point, script_name now points to a script if DartDev is disabled
+  // or a valid file path was provided as the first non-flag argument.
+  // Otherwise, script_name can be NULL if DartDev should be run.
+  if (script_name != nullptr) {
+    if (!CheckForInvalidPath(script_name)) {
+      Platform::Exit(0);
+    }
+    try_load_snapshots_lambda();
   }
 
   if (Options::gen_snapshot_kind() == kAppJIT) {
@@ -1155,16 +1162,18 @@
 // Note: must read platform only *after* VM flags are parsed because
 // they might affect how the platform is loaded.
 #if !defined(DART_PRECOMPILED_RUNTIME)
-  dfe.Init(Options::target_abi_version());
-  uint8_t* application_kernel_buffer = NULL;
-  intptr_t application_kernel_buffer_size = 0;
-  dfe.ReadScript(script_name, &application_kernel_buffer,
-                 &application_kernel_buffer_size);
-  if (application_kernel_buffer != NULL) {
-    // Since we loaded the script anyway, save it.
-    dfe.set_application_kernel_buffer(application_kernel_buffer,
-                                      application_kernel_buffer_size);
-    Options::dfe()->set_use_dfe();
+  if (script_name != nullptr) {
+    dfe.Init();
+    uint8_t* application_kernel_buffer = NULL;
+    intptr_t application_kernel_buffer_size = 0;
+    dfe.ReadScript(script_name, &application_kernel_buffer,
+                   &application_kernel_buffer_size);
+    if (application_kernel_buffer != NULL) {
+      // Since we loaded the script anyway, save it.
+      dfe.set_application_kernel_buffer(application_kernel_buffer,
+                                        application_kernel_buffer_size);
+      Options::dfe()->set_use_dfe();
+    }
   }
 #endif
 
@@ -1204,10 +1213,36 @@
                                  &ServiceStreamCancelCallback);
   Dart_SetFileModifiedCallback(&FileModifiedCallback);
   Dart_SetEmbedderInformationCallback(&EmbedderInformationCallback);
+  bool ran_dart_dev = false;
+  bool should_run_user_program = true;
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  if (DartDevIsolate::should_run_dart_dev() && !Options::disable_dart_dev() &&
+      Options::gen_snapshot_kind() == SnapshotKind::kNone) {
+    DartDevIsolate::DartDev_Result dartdev_result = DartDevIsolate::RunDartDev(
+        CreateIsolateGroupAndSetup, Options::packages_file(), &script_name,
+        &dart_options);
+    ASSERT(dartdev_result != DartDevIsolate::DartDev_Result_Unknown);
+    ran_dart_dev = true;
+    should_run_user_program =
+        (dartdev_result == DartDevIsolate::DartDev_Result_Run);
+    if (should_run_user_program) {
+      try_load_snapshots_lambda();
+    }
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
-  // Run the main isolate until we aren't told to restart.
-  while (RunMainIsolate(script_name, &dart_options)) {
-    Syslog::PrintErr("Restarting VM\n");
+  if (should_run_user_program) {
+    if (!Dart_IsPrecompiledRuntime() && Snapshot::IsAOTSnapshot(script_name)) {
+      Syslog::PrintErr(
+          "%s is an AOT snapshot and should be run with 'dartaotruntime'\n",
+          script_name);
+      Platform::Exit(kErrorExitCode);
+    } else {
+      // Run the main isolate until we aren't told to restart.
+      while (RunMainIsolate(script_name, &dart_options)) {
+        Syslog::PrintErr("Restarting VM\n");
+      }
+    }
   }
 
   // Terminate process exit-code handler.
@@ -1223,6 +1258,9 @@
 
   delete app_snapshot;
   free(app_script_uri);
+  if (ran_dart_dev && script_name != nullptr) {
+    free(script_name);
+  }
 
   // Free copied argument strings if converted.
   if (argv_converted) {
diff --git a/runtime/bin/main_options.cc b/runtime/bin/main_options.cc
index a250af8..8fa4f79 100644
--- a/runtime/bin/main_options.cc
+++ b/runtime/bin/main_options.cc
@@ -8,8 +8,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "bin/abi_version.h"
-#include "bin/dartdev_utils.h"
+#include "bin/dartdev_isolate.h"
 #include "bin/error_exit.h"
 #include "bin/options.h"
 #include "bin/platform.h"
@@ -35,14 +34,10 @@
     NULL,
 };
 
-static const char* kEnableExperiment1 = "--enable-experiment";
-static const char* kEnableExperiment2 = "--enable_experiment";
-
 SnapshotKind Options::gen_snapshot_kind_ = kNone;
 bool Options::enable_vm_service_ = false;
 MallocGrowableArray<const char*> Options::enabled_experiments_ =
     MallocGrowableArray<const char*>(4);
-bool Options::disable_dart_dev_ = true;
 
 #define OPTION_FIELD(variable) Options::variable##_
 
@@ -191,17 +186,6 @@
 "      --warn-on-pause-with-no-debugger\n"
 "  This set is subject to change.\n"
 "  Please see these options for further documentation.\n"
-"--write-service-info=<file_uri>\n"
-"  Outputs information necessary to connect to the VM service to the\n"
-"  specified file in JSON format. Useful for clients which are unable to\n"
-"  listen to stdout for the Observatory listening message.\n"
-"--snapshot-kind=<snapshot_kind>\n"
-"--snapshot=<file_name>\n"
-"  These snapshot options are used to generate a snapshot of the loaded\n"
-"  Dart script:\n"
-"    <snapshot-kind> controls the kind of snapshot, it could be\n"
-"                    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"
 "\n"
@@ -355,31 +339,37 @@
   return true;
 }
 
-int Options::target_abi_version_ = Options::kAbiVersionUnset;
-bool Options::ProcessAbiVersionOption(const char* arg,
-                                      CommandLineOptions* vm_options) {
-  const char* value = OptionProcessor::ProcessOption(arg, "--use_abi_version=");
-  if (value == NULL) {
-    return false;
+// Explicitly handle VM flags that can be parsed by DartDev's run command.
+bool Options::ProcessVMDebuggingOptions(const char* arg,
+                                        CommandLineOptions* vm_options) {
+#define IS_DEBUG_OPTION(name, arg)                                             \
+  if (strncmp(name, arg, strlen(name)) == 0) {                                 \
+    vm_options->AddArgument(arg);                                              \
+    return true;                                                               \
   }
-  int ver = 0;
-  for (int i = 0; value[i] != '\0'; ++i) {
-    if (value[i] >= '0' && value[i] <= '9') {
-      ver = (ver * 10) + value[i] - '0';
-    } else {
-      Syslog::PrintErr("--use_abi_version must be an int\n");
-      return false;
-    }
-  }
-  if (ver < AbiVersion::GetOldestSupported() ||
-      ver > AbiVersion::GetCurrent()) {
-    Syslog::PrintErr("--use_abi_version must be between %d and %d inclusive\n",
-                     AbiVersion::GetOldestSupported(),
-                     AbiVersion::GetCurrent());
-    return false;
-  }
-  target_abi_version_ = ver;
-  return true;
+
+// This is an exhaustive set of VM flags that are accepted by 'dart run'. Flags
+// defined in main_options.h do not need to be handled here as they already
+// have handlers generated.
+//
+// NOTE: When updating this list of VM flags, be sure to make the corresponding
+// changes in pkg/dartdev/lib/src/commands/run.dart.
+#define HANDLE_DARTDEV_VM_DEBUG_OPTIONS(V, arg)                                \
+  V("--enable-asserts", arg)                                                   \
+  V("--pause-isolates-on-exit", arg)                                           \
+  V("--no-pause-isolates-on-exit", arg)                                        \
+  V("--pause-isolates-on-start", arg)                                          \
+  V("--no-pause-isolates-on-start", arg)                                       \
+  V("--pause-isolates-on-unhandled-exception", arg)                            \
+  V("--no-pause-isolates-on-unhandled-exception", arg)                         \
+  V("--warn-on-pause-with-no-debugger", arg)                                   \
+  V("--no-warn-on-pause-with-no-debugger", arg)
+  HANDLE_DARTDEV_VM_DEBUG_OPTIONS(IS_DEBUG_OPTION, arg);
+
+#undef IS_DEBUG_OPTION
+#undef HANDLE_DARTDEV_VM_DEBUG_OPTIONS
+
+  return false;
 }
 
 bool Options::ProcessEnableExperimentOption(const char* arg,
@@ -393,49 +383,17 @@
     return false;
   }
   vm_options->AddArgument(arg);
-  Utils::CStringUniquePtr tmp = Utils::CreateCStringUniquePtr(
-      Utils::StrDup(value));
+  Utils::CStringUniquePtr tmp =
+      Utils::CreateCStringUniquePtr(Utils::StrDup(value));
   char* save_ptr;  // Needed for strtok_r.
   char* token = strtok_r(const_cast<char*>(tmp.get()), ",", &save_ptr);
   while (token != NULL) {
-    enabled_experiments_.Add(token);
+    enabled_experiments_.Add(Utils::StrDup(token));
     token = strtok_r(NULL, ",", &save_ptr);
   }
   return true;
 }
 
-bool Options::ProcessEnableDartDevOption(const char* arg,
-                                         CommandLineOptions* vm_options) {
-  const char* value = OptionProcessor::ProcessOption(arg, "--enable-dart-dev");
-  if (value == nullptr) {
-    value = OptionProcessor::ProcessOption(arg, "--enable_dart_dev");
-  }
-  if (value == nullptr) {
-    // Ensure --disable-dart-dev doesn't result in an unknown flag error.
-    value = OptionProcessor::ProcessOption(arg, "--disable-dart-dev");
-    if (value != nullptr) {
-      return true;
-    }
-    value = OptionProcessor::ProcessOption(arg, "--disable_dart_dev");
-    if (value != nullptr) {
-      return true;
-    }
-    return false;
-  }
-  disable_dart_dev_ = false;
-  return true;
-}
-
-static void ResolveDartDevSnapshotPath(const char* script,
-                                       char** snapshot_path) {
-  if (!DartDevUtils::TryResolveDartDevSnapshotPath(snapshot_path)) {
-    Syslog::PrintErr(
-        "Could not find DartDev snapshot and '%s' is not a valid script.\n",
-        script);
-    Platform::Exit(kErrorExitCode);
-  }
-}
-
 int Options::ParseArguments(int argc,
                             char** argv,
                             bool vm_run_app_snapshot,
@@ -510,17 +468,11 @@
     }
   }
 
-  if (!Options::disable_dart_dev()) {
-    // Don't start the VM service for the DartDev process. Without doing a
-    // second pass over the argument list to explicitly check for
-    // --disable-dart-dev, this is the earliest we can assume we know whether
-    // or not we're running with DartDev enabled.
-    vm_service_server_port_ = INVALID_VM_SERVICE_SERVER_PORT;
-    vm_service_server_ip_ = DEFAULT_VM_SERVICE_SERVER_IP;
-  }
-
 #if !defined(DART_PRECOMPILED_RUNTIME)
   Options::dfe()->set_use_dfe();
+#else
+  // DartDev is not supported in AOT.
+  Options::disable_dart_dev_ = true;
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
   if (Options::deterministic()) {
     // Both an embedder and VM flag.
@@ -537,24 +489,31 @@
   // The arguments to the VM are at positions 1 through i-1 in argv.
   Platform::SetExecutableArguments(i, argv);
 
-  bool implicitly_use_dart_dev = false;
   bool run_script = false;
   int script_or_cmd_index = -1;
+
   // Get the script name.
   if (i < argc) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
     // If the script name is a valid file or a URL, we'll run the script
     // directly. Otherwise, this might be a DartDev command and we need to try
     // to find the DartDev snapshot so we can forward the command and its
     // arguments.
-    bool is_potential_file_path = !DartDevUtils::ShouldParseCommand(argv[i]);
+    bool is_potential_file_path = !DartDevIsolate::ShouldParseCommand(argv[i]);
+    bool implicitly_use_dart_dev = false;
+#else
+    bool is_potential_file_path = true;
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
     script_or_cmd_index = i;
     if (Options::disable_dart_dev() ||
         (is_potential_file_path && !enable_vm_service_)) {
       *script_name = Utils::StrDup(argv[i]);
       run_script = true;
       i++;
-    } else {
-      ResolveDartDevSnapshotPath(argv[i], script_name);
+    }
+#if !defined(DART_PRECOMPILED_RUNTIME)
+    else {  // NOLINT
+      DartDevIsolate::set_should_run_dart_dev(true);
     }
     // Handle the special case where the user is running a Dart program without
     // using a DartDev command and wants to use the VM service. Here we'll run
@@ -564,10 +523,13 @@
       implicitly_use_dart_dev = true;
       dart_options->AddArgument("run");
     }
-  } else if (!Options::disable_dart_dev() &&
-             ((Options::help_option() && !Options::verbose_option()) ||
-              (argc == 1)) &&
-             DartDevUtils::TryResolveDartDevSnapshotPath(script_name)) {
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+  }
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  else if (!Options::disable_dart_dev() &&  // NOLINT
+           ((Options::help_option() && !Options::verbose_option()) ||
+            (argc == 1))) {
+    DartDevIsolate::set_should_run_dart_dev(true);
     // Let DartDev handle the default help message.
     dart_options->AddArgument("help");
     return 0;
@@ -575,7 +537,7 @@
              (enable_dartdev_analytics || disable_dartdev_analytics)) {
     // The analytics flags are a special case as we don't have a target script
     // or DartDev command but we still want to launch DartDev.
-    ResolveDartDevSnapshotPath(argv[i], script_name);
+    DartDevIsolate::set_should_run_dart_dev(true);
 
     if (enable_dartdev_analytics) {
       dart_options->AddArgument("--enable-analytics");
@@ -584,90 +546,68 @@
       dart_options->AddArgument("--disable-analytics");
     }
     return 0;
-  } else {
-    return -1;
   }
 
+#endif    // !defined(DART_PRECOMPILED_RUNTIME)
+  else {  // NOLINT
+    return -1;
+  }
   const char** vm_argv = temp_vm_options.arguments();
   int vm_argc = temp_vm_options.count();
 
-  if (Options::disable_dart_dev() || run_script) {
-    // Only populate the VM options if we're not running with DartDev.
-    vm_options->AddArguments(vm_argv, vm_argc);
-  } else if (implicitly_use_dart_dev) {
-    // If we're using DartDev implicitly (e.g., dart --observe foo.dart), we
-    // want to forward all the VM arguments to the spawned process to ensure
-    // the program behaves as the user expects even though we're running
-    // through DartDev without their knowledge.
-    dart_options->AddArguments(const_cast<const char**>(argv + 1),
-                               script_or_cmd_index - 1);
-  } else if (i > 1) {
-    // If we're running with DartDev, we're going to ignore the VM options for
-    // this VM instance and print a warning.
+  vm_options->AddArguments(vm_argv, vm_argc);
 
-    int num_experiment_flags = 0;
-    if (!enabled_experiments_.is_empty()) {
-      for (intptr_t j = 1; j < script_or_cmd_index; ++j) {
-        if ((strstr(argv[j], kEnableExperiment1) != nullptr) ||
-            (strstr(argv[j], kEnableExperiment2) != nullptr)) {
-          ++num_experiment_flags;
-        }
-      }
-    }
-    // +2 since --enable-dart-dev needs to be passed to enable DartDev.
-    if (num_experiment_flags + 2 != script_or_cmd_index) {
-      Syslog::PrintErr(
-          "Warning: The following flags were passed as VM options and are "
-          "being "
-          "ignored:\n\n");
-      for (int j = 1; j < script_or_cmd_index; ++j) {
-        if ((strstr(argv[j], kEnableExperiment1) == nullptr) &&
-            (strstr(argv[j], kEnableExperiment2) == nullptr)) {
-          Syslog::PrintErr("  %s\n", argv[j]);
-        }
-      }
-      Syslog::PrintErr(
-          "\nThese flags should be passed after the dart command (e.g., 'dart "
-          "run --enable-asserts foo.dart' instead of 'dart --enable-asserts "
-          "run "
-          "foo.dart').\n\n");
-    }
-  }
-
-  if (!enabled_experiments_.is_empty() &&
-      !(Options::disable_dart_dev() || run_script)) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  if (!enabled_experiments_.is_empty()) {
     intptr_t num_experiments = enabled_experiments_.length();
-    int option_size = strlen(kEnableExperiment1) + 1;
-    for (intptr_t i = 0; i < num_experiments; ++i) {
-      const char* flag = enabled_experiments_.At(i);
-      option_size += strlen(flag);
-      if (i + 1 != num_experiments) {
-        // Account for comma if there's more experiments to add.
-        ++option_size;
+    if (!(Options::disable_dart_dev() || run_script)) {
+      const char* kEnableExperiment = "--enable-experiment=";
+      int option_size = strlen(kEnableExperiment);
+      for (intptr_t i = 0; i < num_experiments; ++i) {
+        const char* flag = enabled_experiments_.At(i);
+        option_size += strlen(flag);
+        if (i + 1 != num_experiments) {
+          // Account for comma if there's more experiments to add.
+          ++option_size;
+        }
+      }
+      // Make room for null terminator
+      ++option_size;
+
+      char* enabled_experiments_arg = new char[option_size];
+      int offset = snprintf(enabled_experiments_arg, option_size, "%s",
+                            kEnableExperiment);
+      for (intptr_t i = 0; i < num_experiments; ++i) {
+        const char* flag = enabled_experiments_.At(i);
+        const char* kFormat = (i + 1 != num_experiments) ? "%s," : "%s";
+        offset += snprintf(enabled_experiments_arg + offset,
+                           option_size - offset, kFormat, flag);
+        free(const_cast<char*>(flag));
+        ASSERT(offset < option_size);
+      }
+      DartDevIsolate::set_should_run_dart_dev(true);
+      dart_options->AddArgument(enabled_experiments_arg);
+    } else {
+      for (intptr_t i = 0; i < num_experiments; ++i) {
+        free(const_cast<char*>(enabled_experiments_.At(i)));
       }
     }
-    // Make room for null terminator
-    ++option_size;
-
-    char* enabled_experiments_arg = new char[option_size];
-    int offset = snprintf(enabled_experiments_arg, option_size,
-                          "%s=", kEnableExperiment1);
-    for (intptr_t i = 0; i < num_experiments; ++i) {
-      const char* flag = enabled_experiments_.At(i);
-      const char* kFormat = (i + 1 != num_experiments) ? "%s," : "%s";
-      offset += snprintf(enabled_experiments_arg + offset, option_size - offset,
-                         kFormat, flag);
-      ASSERT(offset < option_size);
-    }
-    dart_options->AddArgument(enabled_experiments_arg);
   }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
   // Parse out options to be passed to dart main.
   while (i < argc) {
+    if (!run_script) {
+      OptionProcessor::TryProcess(argv[i], vm_options);
+    }
     dart_options->AddArgument(argv[i]);
     i++;
   }
 
+  if (!Options::disable_dart_dev() && enable_vm_service_) {
+    dart_options->AddArgument("--launch-dds");
+  }
+
   // Verify consistency of arguments.
 
   // snapshot_depfile is an alias for depfile. Passing them both is an error.
diff --git a/runtime/bin/main_options.h b/runtime/bin/main_options.h
index 54b44b6..76c50be 100644
--- a/runtime/bin/main_options.h
+++ b/runtime/bin/main_options.h
@@ -46,7 +46,8 @@
   V(disable_exit, exit_disabled)                                               \
   V(preview_dart_2, nop_option)                                                \
   V(suppress_core_dump, suppress_core_dump)                                    \
-  V(enable_service_port_fallback, enable_service_port_fallback)
+  V(enable_service_port_fallback, enable_service_port_fallback)                \
+  V(disable_dart_dev, disable_dart_dev)
 
 // Boolean flags that have a short form.
 #define SHORT_BOOL_OPTIONS_LIST(V)                                             \
@@ -68,9 +69,8 @@
   V(ProcessEnvironmentOption)                                                  \
   V(ProcessEnableVmServiceOption)                                              \
   V(ProcessObserveOption)                                                      \
-  V(ProcessAbiVersionOption)                                                   \
   V(ProcessEnableExperimentOption)                                             \
-  V(ProcessEnableDartDevOption)
+  V(ProcessVMDebuggingOptions)
 
 // This enum must match the strings in kSnapshotKindNames in main_options.cc.
 enum SnapshotKind {
@@ -126,11 +126,6 @@
   static const char* vm_service_server_ip() { return vm_service_server_ip_; }
   static int vm_service_server_port() { return vm_service_server_port_; }
 
-  static constexpr int kAbiVersionUnset = -1;
-  static int target_abi_version() { return target_abi_version_; }
-
-  static bool disable_dart_dev() { return disable_dart_dev_; }
-
 #if !defined(DART_PRECOMPILED_RUNTIME)
   static DFE* dfe() { return dfe_; }
   static void set_dfe(DFE* dfe) { dfe_ = dfe; }
@@ -179,9 +174,7 @@
                                     int default_port,
                                     const char* default_ip);
 
-  static int target_abi_version_;
   static MallocGrowableArray<const char*> enabled_experiments_;
-  static bool disable_dart_dev_;
 
 #define OPTION_FRIEND(flag, variable) friend class OptionProcessor_##flag;
   STRING_OPTIONS_LIST(OPTION_FRIEND)
diff --git a/runtime/bin/namespace.cc b/runtime/bin/namespace.cc
index c322c52..fd5a091 100644
--- a/runtime/bin/namespace.cc
+++ b/runtime/bin/namespace.cc
@@ -16,9 +16,7 @@
 
 static const int kNamespaceNativeFieldIndex = 0;
 
-static void ReleaseNamespace(void* isolate_callback_data,
-                             Dart_WeakPersistentHandle handle,
-                             void* peer) {
+static void ReleaseNamespace(void* isolate_callback_data, void* peer) {
   Namespace* namespc = reinterpret_cast<Namespace*>(peer);
   ASSERT(namespc != NULL);
   namespc->Release();
@@ -84,8 +82,8 @@
 
   // Set up a finalizer for the Dart object so that we can do any necessary
   // platform-specific cleanup for the namespc.
-  Dart_NewWeakPersistentHandle(namespc_obj, reinterpret_cast<void*>(namespc),
-                               sizeof(*namespc), ReleaseNamespace);
+  Dart_NewFinalizableHandle(namespc_obj, reinterpret_cast<void*>(namespc),
+                            sizeof(*namespc), ReleaseNamespace);
   Dart_SetReturnValue(args, namespc_obj);
 }
 
diff --git a/runtime/bin/namespace_android.cc b/runtime/bin/namespace_android.cc
index 62a69f8..f5a2a9f 100644
--- a/runtime/bin/namespace_android.cc
+++ b/runtime/bin/namespace_android.cc
@@ -61,7 +61,7 @@
     // Normalize it.
     char result[PATH_MAX];
     const intptr_t result_len =
-        File::CleanUnixPath(tbuf.buf(), result, PATH_MAX);
+        File::CleanUnixPath(tbuf.buffer(), result, PATH_MAX);
     if (result_len < 0) {
       errno = ENAMETOOLONG;
       return false;
diff --git a/runtime/bin/namespace_fuchsia.cc b/runtime/bin/namespace_fuchsia.cc
index 6e93bcb..c8cfbcb 100644
--- a/runtime/bin/namespace_fuchsia.cc
+++ b/runtime/bin/namespace_fuchsia.cc
@@ -81,7 +81,7 @@
   // Normalize it.
   char result[PATH_MAX];
   const intptr_t result_len =
-      File::CleanUnixPath(tbuf.buf(), result, PATH_MAX);
+      File::CleanUnixPath(tbuf.buffer(), result, PATH_MAX);
   if (result_len < 0) {
     errno = ENAMETOOLONG;
     return false;
diff --git a/runtime/bin/namespace_linux.cc b/runtime/bin/namespace_linux.cc
index 6cb3e07..416ea3d 100644
--- a/runtime/bin/namespace_linux.cc
+++ b/runtime/bin/namespace_linux.cc
@@ -61,7 +61,7 @@
     // Normalize it.
     char result[PATH_MAX];
     const intptr_t result_len =
-        File::CleanUnixPath(tbuf.buf(), result, PATH_MAX);
+        File::CleanUnixPath(tbuf.buffer(), result, PATH_MAX);
     if (result_len < 0) {
       errno = ENAMETOOLONG;
       return false;
diff --git a/runtime/bin/platform.h b/runtime/bin/platform.h
index f7ac32c..0a7db28 100644
--- a/runtime/bin/platform.h
+++ b/runtime/bin/platform.h
@@ -9,6 +9,10 @@
 #include "platform/globals.h"
 #include "platform/utils.h"
 
+#if defined(HOST_OS_MACOS)
+#include "bin/platform_macos.h"
+#endif  // defined(HOST_OS_MACOS)
+
 namespace dart {
 namespace bin {
 
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc
index bacb7a75..f7c4c8c 100644
--- a/runtime/bin/platform_macos.cc
+++ b/runtime/bin/platform_macos.cc
@@ -6,6 +6,7 @@
 #if defined(HOST_OS_MACOS)
 
 #include "bin/platform.h"
+#include "bin/platform_macos.h"
 
 #include <CoreFoundation/CoreFoundation.h>
 
@@ -14,13 +15,12 @@
 #endif                    // !HOST_OS_IOS
 #include <errno.h>        // NOLINT
 #include <mach-o/dyld.h>
-#include <signal.h>       // NOLINT
-#include <string.h>       // NOLINT
+#include <signal.h>        // NOLINT
 #include <sys/resource.h>  // NOLINT
-#include <sys/sysctl.h>   // NOLINT
-#include <sys/types.h>    // NOLINT
-#include <sys/utsname.h>  // NOLINT
-#include <unistd.h>       // NOLINT
+#include <sys/sysctl.h>    // NOLINT
+#include <sys/types.h>     // NOLINT
+#include <sys/utsname.h>   // NOLINT
+#include <unistd.h>        // NOLINT
 
 #include "bin/console.h"
 #include "bin/file.h"
@@ -114,7 +114,70 @@
 #endif
 }
 
+char* ExtractsOSVersionFromString(char* str) {
+  char* pos = strstr(str, "<key>ProductVersion</key>");
+  if (pos == NULL) {
+    return NULL;
+  }
+  pos = strstr(pos, "<string>");
+  if (pos == NULL) {
+    return NULL;
+  }
+  // Shift the index by the length of "<string>".
+  pos += 8;
+  char* end_pos = strstr(pos, "</string>");
+  if (end_pos == NULL) {
+    return NULL;
+  }
+
+  int length = end_pos - pos;
+  char* result =
+      reinterpret_cast<char*>(Dart_ScopeAllocate(length * sizeof(char)) + 1);
+  strncpy(result, pos, length);
+  result[length] = '\0';
+  return result;
+}
+
+static char* GetOSVersionFromPlist() {
+  const char* path = "/System/Library/CoreServices/SystemVersion.plist";
+  File* file = File::Open(NULL, path, File::kRead);
+  if (file == NULL) {
+    return NULL;
+  }
+  int length = file->Length();
+  if (length < 0) {
+    return NULL;
+  }
+  char* buffer =
+      reinterpret_cast<char*>(Dart_ScopeAllocate(length * sizeof(char) + 1));
+  int bytes = file->ReadFully(buffer, length);
+  buffer[length * sizeof(char)] = '\0';
+  file->Close();
+  file->Release();
+  if (bytes < 0) {
+    return NULL;
+  }
+  return ExtractsOSVersionFromString(buffer);
+}
+
 const char* Platform::OperatingSystemVersion() {
+  char str[64];
+  size_t size = sizeof(str);
+  // This is only available to some versions later than 10.13.*. If it failed,
+  // try to read from "SystemVersion.plist".
+  int res = sysctlbyname("kern.osproductversion", str, &size, NULL, 0);
+  if (res == 0) {
+    int len = snprintf(NULL, 0, "%s", str);
+    char* result_string = DartUtils::ScopedCString(len + 1);
+    strncpy(result_string, str, len);
+    result_string[len] = '\0';
+    return result_string;
+  }
+  char* result_string = GetOSVersionFromPlist();
+  if (result_string != NULL) {
+    return result_string;
+  }
+
   struct utsname info;
   int ret = uname(&info);
   if (ret != 0) {
diff --git a/runtime/bin/platform_macos.h b/runtime/bin/platform_macos.h
new file mode 100644
index 0000000..26a1afe
--- /dev/null
+++ b/runtime/bin/platform_macos.h
@@ -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.
+
+#ifndef RUNTIME_BIN_PLATFORM_MACOS_H_
+#define RUNTIME_BIN_PLATFORM_MACOS_H_
+
+#if !defined(RUNTIME_BIN_PLATFORM_H_)
+#error Do not include platform_macos.h directly;
+#error use platform.h instead.
+#endif
+
+namespace dart {
+namespace bin {
+
+// This function extracts OSVersion from SystemVersion.plist.
+// The format of input should be:
+//   <key>ProductVersion</key>
+//   <string>10.15.4</string>
+// Returns the string representation of OSVersion. For example, "10.15.4" will
+// be returned in the previous example.
+char* ExtractsOSVersionFromString(char* str);
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // RUNTIME_BIN_PLATFORM_MACOS_H_
diff --git a/runtime/bin/platform_macos_test.cc b/runtime/bin/platform_macos_test.cc
new file mode 100644
index 0000000..052d541
--- /dev/null
+++ b/runtime/bin/platform_macos_test.cc
@@ -0,0 +1,53 @@
+// 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.
+
+#if defined(HOST_OS_MACOS)
+#include "bin/platform.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+TEST_CASE(Platform_ExtractsOSVersionFromString) {
+  char str[] =
+      "some overheads\n<key>ProductVersion</key>\nsome bytes<string>Fake "
+      "version</string>";
+  char* result = bin::ExtractsOSVersionFromString(str);
+  EXPECT(result != NULL);
+  EXPECT_STREQ("Fake version", result);
+
+  EXPECT(bin::ExtractsOSVersionFromString("<key>ProductVersion</key>") == NULL);
+
+  // Incomplete file
+  EXPECT(bin::ExtractsOSVersionFromString(
+             "<key>ProductVersion</key><string>Fake version</string") != NULL);
+
+  // A copy of actual SystemVersion.plist on mac.
+  str =
+      "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+      "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" "
+      "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
+      "<plist version=\"1.0\">\n"
+      "<dict>\n"
+      "        <key>ProductBuildVersion</key>\n"
+      "        <string>19E287</string>\n"
+      "        <key>ProductCopyright</key>\n"
+      "        <string>1983-2020 Apple Inc.</string>\n"
+      "        <key>ProductName</key>\n"
+      "        <string>Mac OS X</string>\n"
+      "        <key>ProductUserVisibleVersion</key>\n"
+      "        <string>10.15.4</string>\n"
+      "        <key>ProductVersion</key>\n"
+      "        <string>10.15.4</string>\n"
+      "        <key>iOSSupportVersion</key>\n"
+      "        <string>13.4</string>\n"
+      "</dict>\n"
+      "</plist>"
+
+      result = bin::ExtractsOSVersionFromString(str);
+  EXPECT(result != NULL);
+  EXPECT_STREQ("10.15.4", result);
+}
+
+}  // namespace dart
+#endif  // defined(HOST_OS_MACOS)
diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc
index 10082b98..b296299 100644
--- a/runtime/bin/process_android.cc
+++ b/runtime/bin/process_android.cc
@@ -231,6 +231,8 @@
             process_count_--;
           }
         }
+      } else if (pid < 0) {
+        FATAL1("Wait for process exit failed: %d", errno);
       }
     }
   }
diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
index fac361f..dc8d500 100644
--- a/runtime/bin/process_linux.cc
+++ b/runtime/bin/process_linux.cc
@@ -231,6 +231,8 @@
             process_count_--;
           }
         }
+      } else if (pid < 0) {
+        FATAL1("Wait for process exit failed: %d", errno);
       }
     }
   }
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index 3583a284..624ea8a 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -227,6 +227,8 @@
             process_count_--;
           }
         }
+      } else if (pid < 0) {
+        FATAL1("Wait for process exit failed: %d", errno);
       }
     }
   }
diff --git a/runtime/bin/secure_socket_filter.cc b/runtime/bin/secure_socket_filter.cc
index cff4c4d..207971f 100644
--- a/runtime/bin/secure_socket_filter.cc
+++ b/runtime/bin/secure_socket_filter.cc
@@ -62,9 +62,7 @@
   return filter;
 }
 
-static void DeleteFilter(void* isolate_data,
-                         Dart_WeakPersistentHandle handle,
-                         void* context_pointer) {
+static void DeleteFilter(void* isolate_data, void* context_pointer) {
   SSLFilter* filter = reinterpret_cast<SSLFilter*>(context_pointer);
   filter->Release();
 }
@@ -78,8 +76,8 @@
       dart_this, SSLFilter::kSSLFilterNativeFieldIndex,
       reinterpret_cast<intptr_t>(filter));
   RETURN_IF_ERROR(err);
-  Dart_NewWeakPersistentHandle(dart_this, reinterpret_cast<void*>(filter),
-                               SSLFilter::kApproximateSize, DeleteFilter);
+  Dart_NewFinalizableHandle(dart_this, reinterpret_cast<void*>(filter),
+                            SSLFilter::kApproximateSize, DeleteFilter);
   return Dart_Null();
 }
 
@@ -247,7 +245,8 @@
     SecureSocketUtils::FetchErrorString(filter->ssl_, &error_string);
     CObjectArray* result = new CObjectArray(CObject::NewArray(2));
     result->SetAt(0, new CObjectInt32(CObject::NewInt32(error_code)));
-    result->SetAt(1, new CObjectString(CObject::NewString(error_string.buf())));
+    result->SetAt(1,
+                  new CObjectString(CObject::NewString(error_string.buffer())));
     return result;
   }
 }
@@ -652,21 +651,35 @@
 int SSLFilter::ProcessReadPlaintextBuffer(int start, int end) {
   int length = end - start;
   int bytes_processed = 0;
+  if (SSL_LOG_DATA) {
+    Syslog::Print("Entering ProcessReadPlaintextBuffer with %d bytes\n",
+                  length);
+  }
   if (length > 0) {
     bytes_processed = SSL_read(
         ssl_, reinterpret_cast<char*>((buffers_[kReadPlaintext] + start)),
         length);
     if (bytes_processed < 0) {
       int error = SSL_get_error(ssl_, bytes_processed);
-      USE(error);
+      if (SSL_LOG_DATA) {
+        Syslog::Print("SSL_read returned error %d\n", error);
+      }
       bytes_processed = 0;
     }
   }
+  if (SSL_LOG_DATA) {
+    Syslog::Print("Leaving ProcessReadPlaintextBuffer read %d bytes\n",
+                  bytes_processed);
+  }
   return bytes_processed;
 }
 
 int SSLFilter::ProcessWritePlaintextBuffer(int start, int end) {
   int length = end - start;
+  if (SSL_LOG_DATA) {
+    Syslog::Print("Entering ProcessWritePlaintextBuffer with %d bytes\n",
+                  length);
+  }
   int bytes_processed =
       SSL_write(ssl_, buffers_[kWritePlaintext] + start, length);
   if (bytes_processed < 0) {
@@ -675,15 +688,20 @@
     }
     return 0;
   }
+  if (SSL_LOG_DATA) {
+    Syslog::Print("Leaving ProcessWritePlaintextBuffer wrote %d bytes\n",
+                  bytes_processed);
+  }
   return bytes_processed;
 }
 
 /* Read encrypted data from the circular buffer to the filter */
 int SSLFilter::ProcessReadEncryptedBuffer(int start, int end) {
   int length = end - start;
-  if (SSL_LOG_DATA)
+  if (SSL_LOG_DATA) {
     Syslog::Print("Entering ProcessReadEncryptedBuffer with %d bytes\n",
                   length);
+  }
   int bytes_processed = 0;
   if (length > 0) {
     bytes_processed =
@@ -691,33 +709,41 @@
     if (bytes_processed <= 0) {
       bool retry = BIO_should_retry(socket_side_) != 0;
       if (!retry) {
-        if (SSL_LOG_DATA)
+        if (SSL_LOG_DATA) {
           Syslog::Print("BIO_write failed in ReadEncryptedBuffer\n");
+        }
       }
       bytes_processed = 0;
     }
   }
-  if (SSL_LOG_DATA)
-    Syslog::Print("Leaving ProcessReadEncryptedBuffer wrote %d bytes\n",
+  if (SSL_LOG_DATA) {
+    Syslog::Print("Leaving ProcessReadEncryptedBuffer read %d bytes\n",
                   bytes_processed);
+  }
   return bytes_processed;
 }
 
 int SSLFilter::ProcessWriteEncryptedBuffer(int start, int end) {
   int length = end - start;
   int bytes_processed = 0;
+  if (SSL_LOG_DATA) {
+    Syslog::Print("Entering ProcessWriteEncryptedBuffer with %d bytes\n",
+                  length);
+  }
   if (length > 0) {
     bytes_processed =
         BIO_read(socket_side_, buffers_[kWriteEncrypted] + start, length);
     if (bytes_processed < 0) {
-      if (SSL_LOG_DATA)
+      if (SSL_LOG_DATA) {
         Syslog::Print("WriteEncrypted BIO_read returned error %d\n",
                       bytes_processed);
+      }
       return 0;
     } else {
-      if (SSL_LOG_DATA)
+      if (SSL_LOG_DATA) {
         Syslog::Print("WriteEncrypted  BIO_read wrote %d bytes\n",
                       bytes_processed);
+      }
     }
   }
   return bytes_processed;
diff --git a/runtime/bin/secure_socket_utils.cc b/runtime/bin/secure_socket_utils.cc
index 259b06e..e3cdbf4 100644
--- a/runtime/bin/secure_socket_utils.cc
+++ b/runtime/bin/secure_socket_utils.cc
@@ -54,7 +54,7 @@
   {
     TextBuffer error_string(SSL_ERROR_MESSAGE_BUFFER_SIZE);
     SecureSocketUtils::FetchErrorString(ssl, &error_string);
-    OSError os_error_struct(status, error_string.buf(), OSError::kBoringSSL);
+    OSError os_error_struct(status, error_string.buffer(), OSError::kBoringSSL);
     Dart_Handle os_error = DartUtils::NewDartOSError(&os_error_struct);
     exception =
         DartUtils::NewDartIOException(exception_type, message, os_error);
diff --git a/runtime/bin/security_context.cc b/runtime/bin/security_context.cc
index 5d649df..3b98b30 100644
--- a/runtime/bin/security_context.cc
+++ b/runtime/bin/security_context.cc
@@ -93,9 +93,7 @@
   return context;
 }
 
-static void DeleteSecurityContext(void* isolate_data,
-                                  Dart_WeakPersistentHandle handle,
-                                  void* context_pointer) {
+static void DeleteSecurityContext(void* isolate_data, void* context_pointer) {
   SSLCertContext* context = static_cast<SSLCertContext*>(context_pointer);
   context->Release();
 }
@@ -109,15 +107,13 @@
       dart_this, SSLCertContext::kSecurityContextNativeFieldIndex,
       reinterpret_cast<intptr_t>(context));
   RETURN_IF_ERROR(err);
-  Dart_NewWeakPersistentHandle(dart_this, context,
-                               SSLCertContext::kApproximateSize,
-                               DeleteSecurityContext);
+  Dart_NewFinalizableHandle(dart_this, context,
+                            SSLCertContext::kApproximateSize,
+                            DeleteSecurityContext);
   return Dart_Null();
 }
 
-static void ReleaseCertificate(void* isolate_data,
-                               Dart_WeakPersistentHandle handle,
-                               void* context_pointer) {
+static void ReleaseCertificate(void* isolate_data, void* context_pointer) {
   X509* cert = reinterpret_cast<X509*>(context_pointer);
   X509_free(cert);
 }
@@ -158,9 +154,9 @@
   const intptr_t approximate_size_of_certificate =
       sizeof(*certificate) + EstimateX509Size(certificate);
   ASSERT(approximate_size_of_certificate > 0);
-  Dart_NewWeakPersistentHandle(result, reinterpret_cast<void*>(certificate),
-                               approximate_size_of_certificate,
-                               ReleaseCertificate);
+  Dart_NewFinalizableHandle(result, reinterpret_cast<void*>(certificate),
+                            approximate_size_of_certificate,
+                            ReleaseCertificate);
   return result;
 }
 
diff --git a/runtime/bin/snapshot_utils.cc b/runtime/bin/snapshot_utils.cc
index 4390d24..ed6b491a 100644
--- a/runtime/bin/snapshot_utils.cc
+++ b/runtime/bin/snapshot_utils.cc
@@ -304,15 +304,9 @@
 
   const uint8_t* vm_data_buffer = reinterpret_cast<const uint8_t*>(
       Extensions::ResolveSymbol(library, kVmSnapshotDataCSymbol));
-  if (vm_data_buffer == NULL) {
-    FATAL1("Failed to resolve symbol '%s'\n", kVmSnapshotDataCSymbol);
-  }
 
   const uint8_t* vm_instructions_buffer = reinterpret_cast<const uint8_t*>(
       Extensions::ResolveSymbol(library, kVmSnapshotInstructionsCSymbol));
-  if (vm_instructions_buffer == NULL) {
-    FATAL1("Failed to resolve symbol '%s'\n", kVmSnapshotInstructionsCSymbol);
-  }
 
   const uint8_t* isolate_data_buffer = reinterpret_cast<const uint8_t*>(
       Extensions::ResolveSymbol(library, kIsolateSnapshotDataCSymbol));
@@ -543,5 +537,24 @@
   }
 }
 
+bool Snapshot::IsAOTSnapshot(const char* snapshot_filename) {
+  // Header is simply "ELF" prefixed with the DEL character.
+  const char elf_header[] = {0x7F, 0x45, 0x4C, 0x46, 0x0};
+  const int64_t elf_header_len = strlen(elf_header);
+  File* file = File::Open(NULL, snapshot_filename, File::kRead);
+  if (file == nullptr) {
+    return false;
+  }
+  if (file->Length() < elf_header_len) {
+    file->Release();
+    return false;
+  }
+  auto buf = std::unique_ptr<char[]>(new char[elf_header_len]);
+  bool success = file->ReadFully(buf.get(), elf_header_len);
+  file->Release();
+  ASSERT(success);
+  return (strncmp(elf_header, buf.get(), elf_header_len) == 0);
+}
+
 }  // namespace bin
 }  // namespace dart
diff --git a/runtime/bin/snapshot_utils.h b/runtime/bin/snapshot_utils.h
index 1b8c666..57d8929 100644
--- a/runtime/bin/snapshot_utils.h
+++ b/runtime/bin/snapshot_utils.h
@@ -34,6 +34,10 @@
   static void GenerateAppJIT(const char* snapshot_filename);
   static void GenerateAppAOTAsAssembly(const char* snapshot_filename);
 
+  // Returns true if snapshot_filename points to an AOT snapshot (aka,
+  // an ELF binary). May report false negatives.
+  static bool IsAOTSnapshot(const char* snapshot_filename);
+
   static AppSnapshot* TryReadAppendedAppSnapshotElf(const char* container_path);
   static AppSnapshot* TryReadAppSnapshot(
       const char* script_uri,
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index ac3814f..6881e59 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -455,7 +455,7 @@
 void FUNCTION_NAME(Socket_CreateUnixDomainConnect)(Dart_NativeArguments args) {
 #if defined(HOST_OS_WINDOWS) || defined(HOST_OS_FUCHSIA)
   OSError os_error(
-      -1, "Unix domain sockets are only available on linux, android and macos.",
+      -1, "Unix domain sockets are not available on this operating system.",
       OSError::kUnknown);
   Dart_SetReturnValue(args, DartUtils::NewDartOSError(&os_error));
 #else
@@ -855,7 +855,7 @@
     Dart_NativeArguments args) {
 #if defined(HOST_OS_WINDOWS)
   OSError os_error(
-      -1, "Unix domain sockets are only available on linux, android and macos.",
+      -1, "Unix domain sockets are not available on this operating system.",
       OSError::kUnknown);
   Dart_SetReturnValue(args, DartUtils::NewDartOSError(&os_error));
 #else
@@ -1104,7 +1104,8 @@
           DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 3)));
       break;
     default:
-      Dart_PropagateError(Dart_NewApiError("Value outside expected range"));
+      Dart_PropagateError(
+          Dart_NewApiError("option to setOption() is outside expected range"));
       break;
   }
   if (!result) {
@@ -1202,7 +1203,8 @@
       Dart_SetIntegerReturnValue(args, IPPROTO_UDP);
       break;
     default:
-      Dart_PropagateError(Dart_NewApiError("Value outside of expected range"));
+      Dart_PropagateError(Dart_NewApiError(
+          "option to getOptionValue() is outside expected range"));
       break;
   }
 }
@@ -1253,9 +1255,7 @@
   Dart_SetBooleanReturnValue(args, available);
 }
 
-static void NormalSocketFinalizer(void* isolate_data,
-                                  Dart_WeakPersistentHandle handle,
-                                  void* data) {
+static void NormalSocketFinalizer(void* isolate_data, void* data) {
   Socket* socket = reinterpret_cast<Socket*>(data);
   if (socket->fd() >= 0) {
     const int64_t flags = 1 << kCloseCommand;
@@ -1266,9 +1266,7 @@
   socket->Release();
 }
 
-static void ListeningSocketFinalizer(void* isolate_data,
-                                     Dart_WeakPersistentHandle handle,
-                                     void* data) {
+static void ListeningSocketFinalizer(void* isolate_data, void* data) {
   Socket* socket = reinterpret_cast<Socket*>(data);
   if (socket->fd() >= 0) {
     const int64_t flags = (1 << kListeningSocket) | (1 << kCloseCommand);
@@ -1279,9 +1277,7 @@
   socket->Release();
 }
 
-static void StdioSocketFinalizer(void* isolate_data,
-                                 Dart_WeakPersistentHandle handle,
-                                 void* data) {
+static void StdioSocketFinalizer(void* isolate_data, void* data) {
   Socket* socket = reinterpret_cast<Socket*>(data);
   if (socket->fd() >= 0) {
     socket->CloseFd();
@@ -1289,9 +1285,7 @@
   socket->Release();
 }
 
-static void SignalSocketFinalizer(void* isolate_data,
-                                  Dart_WeakPersistentHandle handle,
-                                  void* data) {
+static void SignalSocketFinalizer(void* isolate_data, void* data) {
   Socket* socket = reinterpret_cast<Socket*>(data);
   if (socket->fd() >= 0) {
     Process::ClearSignalHandlerByFd(socket->fd(), socket->isolate_port());
@@ -1312,7 +1306,7 @@
   if (Dart_IsError(err)) {
     Dart_PropagateError(err);
   }
-  Dart_WeakPersistentHandleFinalizer callback;
+  Dart_HandleFinalizer callback;
   switch (finalizer) {
     case kFinalizerNormal:
       callback = NormalSocketFinalizer;
@@ -1332,8 +1326,8 @@
       break;
   }
   if (callback != NULL) {
-    Dart_NewWeakPersistentHandle(handle, reinterpret_cast<void*>(socket),
-                                 sizeof(Socket), callback);
+    Dart_NewFinalizableHandle(handle, reinterpret_cast<void*>(socket),
+                              sizeof(Socket), callback);
   }
 }
 
diff --git a/runtime/bin/socket_base.cc b/runtime/bin/socket_base.cc
index 9fdd8ba..4e61ce4 100644
--- a/runtime/bin/socket_base.cc
+++ b/runtime/bin/socket_base.cc
@@ -243,6 +243,31 @@
   }
 }
 
+void FUNCTION_NAME(InternetAddress_ParseScopedLinkLocalAddress)(
+    Dart_NativeArguments args) {
+  const char* address =
+      DartUtils::GetStringValue(Dart_GetNativeArgument(args, 0));
+  // This must be an IPv6 address.
+  intptr_t type = 1;
+  ASSERT(address != NULL);
+  OSError* os_error = NULL;
+  AddressList<SocketAddress>* addresses =
+      SocketBase::LookupAddress(address, type, &os_error);
+  if (addresses != NULL) {
+    Dart_Handle list = Dart_NewList(addresses->count());
+    for (intptr_t i = 0; i < addresses->count(); i++) {
+      SocketAddress* addr = addresses->GetAt(i);
+      Dart_ListSetAt(
+          list, i, Dart_NewInteger(SocketAddress::GetAddrScope(addr->addr())));
+    }
+    delete addresses;
+    Dart_SetReturnValue(args, list);
+  } else {
+    Dart_SetReturnValue(args, DartUtils::NewDartOSError(os_error));
+    delete os_error;
+  }
+}
+
 void FUNCTION_NAME(InternetAddress_RawAddrToString)(Dart_NativeArguments args) {
   RawAddr addr;
   SocketAddress::GetSockAddr(Dart_GetNativeArgument(args, 0), &addr);
diff --git a/runtime/bin/sync_socket.cc b/runtime/bin/sync_socket.cc
index 99cf792..c8e7714 100644
--- a/runtime/bin/sync_socket.cc
+++ b/runtime/bin/sync_socket.cc
@@ -313,9 +313,7 @@
   delete addr;
 }
 
-static void SynchronousSocketFinalizer(void* isolate_data,
-                                       Dart_WeakPersistentHandle handle,
-                                       void* data) {
+static void SynchronousSocketFinalizer(void* isolate_data, void* data) {
   SynchronousSocket* socket = reinterpret_cast<SynchronousSocket*>(data);
   if (socket->fd() >= 0) {
     SynchronousSocket::Close(socket->fd());
@@ -334,9 +332,9 @@
     return error;
   }
 
-  Dart_NewWeakPersistentHandle(handle, reinterpret_cast<void*>(socket),
-                               sizeof(SynchronousSocket),
-                               SynchronousSocketFinalizer);
+  Dart_NewFinalizableHandle(handle, reinterpret_cast<void*>(socket),
+                            sizeof(SynchronousSocket),
+                            SynchronousSocketFinalizer);
   return error;
 }
 
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index db78c76..bbd3d2ca 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -239,17 +239,26 @@
  * The type Dart_PersistentHandle is a Dart_Handle and it is used to
  * document that a persistent handle is expected as a parameter to a call
  * or the return value from a call is a persistent handle.
+ *
+ * FinalizableHandles are persistent handles which are auto deleted when
+ * the object is garbage collected. It is never safe to use these handles
+ * unless you know the object is still reachable.
+ *
+ * WeakPersistentHandles are persistent handles which are auto deleted
+ * when the object is garbage collected.
  */
 typedef struct _Dart_Handle* Dart_Handle;
 typedef Dart_Handle Dart_PersistentHandle;
 typedef struct _Dart_WeakPersistentHandle* Dart_WeakPersistentHandle;
-// These three structs are versioned by DART_API_DL_MAJOR_VERSION, bump the
+typedef struct _Dart_FinalizableHandle* Dart_FinalizableHandle;
+// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the
 // version when changing this struct.
 
 typedef void (*Dart_WeakPersistentHandleFinalizer)(
     void* isolate_callback_data,
     Dart_WeakPersistentHandle handle,
     void* peer);
+typedef void (*Dart_HandleFinalizer)(void* isolate_callback_data, void* peer);
 
 /**
  * Is this an error handle?
@@ -444,6 +453,8 @@
 
 /**
  * Deallocates a persistent handle.
+ *
+ * Requires there to be a current isolate group.
  */
 DART_EXPORT void Dart_DeletePersistentHandle(Dart_PersistentHandle object);
 
@@ -457,16 +468,17 @@
  * calling Dart_DeleteWeakPersistentHandle.
  *
  * If the object becomes unreachable the callback is invoked with the weak
- * persistent handle and the peer as arguments. The callback can be executed
- * on any thread, will not have a current isolate, and can only call
- * Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. The callback
- * must not call Dart_DeleteWeakPersistentHandle for the handle being finalized,
- * as it is automatically deleted by the VM after the callback returns.
- * This gives the embedder the ability to cleanup data associated with the
- * object and clear out any cached references to the handle. All references to
- * this handle after the callback will be invalid. It is illegal to call into
- * the VM from the callback. If the handle is deleted before the object becomes
- * unreachable, the callback is never invoked.
+ * persistent handle and the peer as arguments. The callback can be executed on
+ * any thread, will have an isolate group, but will not have a current isolate.
+ * The callback can only call Dart_DeletePersistentHandle or
+ * Dart_DeleteWeakPersistentHandle. The callback must not call
+ * Dart_DeleteWeakPersistentHandle for the handle being finalized, as it is
+ * automatically deleted by the VM after the callback returns. This gives the
+ * embedder the ability to cleanup data associated with the object and clear
+ * out any cached references to the handle. All references to this handle after
+ * the callback will be invalid. It is illegal to call into the VM with any
+ * other Dart_* functions from the callback. If the handle is deleted before
+ * the object becomes unreachable, the callback is never invoked.
  *
  * Requires there to be a current isolate.
  *
@@ -488,12 +500,86 @@
                              intptr_t external_allocation_size,
                              Dart_WeakPersistentHandleFinalizer callback);
 
+/**
+ * Deletes the given weak persistent [object] handle.
+ *
+ * Requires there to be a current isolate group.
+ */
 DART_EXPORT void Dart_DeleteWeakPersistentHandle(
     Dart_WeakPersistentHandle object);
 
+/**
+ * Updates the external memory size for the given weak persistent handle.
+ *
+ * May trigger garbage collection.
+ */
 DART_EXPORT void Dart_UpdateExternalSize(Dart_WeakPersistentHandle object,
                                          intptr_t external_allocation_size);
 
+/**
+ * Allocates a finalizable handle for an object.
+ *
+ * This handle has the lifetime of the current isolate group unless the object
+ * pointed to by the handle is garbage collected, in this case the VM
+ * automatically deletes the handle after invoking the callback associated
+ * with the handle. The handle can also be explicitly deallocated by
+ * calling Dart_DeleteFinalizableHandle.
+ *
+ * If the object becomes unreachable the callback is invoked with the
+ * the peer as argument. The callback can be executed on any thread, will have
+ * an isolate group, but will not have a current isolate. The callback can only
+ * call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle.
+ * This gives the embedder the ability to cleanup data associated with the
+ * object and clear out any cached references to the handle. All references to
+ * this handle after the callback will be invalid. It is illegal to call into
+ * the VM with any other Dart_* functions from the callback. If the handle is
+ * deleted before the object becomes unreachable, the callback is never
+ * invoked.
+ *
+ * Requires there to be a current isolate.
+ *
+ * \param object An object.
+ * \param peer A pointer to a native object or NULL.  This value is
+ *   provided to callback when it is invoked.
+ * \param external_allocation_size The number of externally allocated
+ *   bytes for peer. Used to inform the garbage collector.
+ * \param callback A function pointer that will be invoked sometime
+ *   after the object is garbage collected, unless the handle has been deleted.
+ *   A valid callback needs to be specified it cannot be NULL.
+ *
+ * \return The finalizable handle or NULL. NULL is returned in case of bad
+ *   parameters.
+ */
+DART_EXPORT Dart_FinalizableHandle
+Dart_NewFinalizableHandle(Dart_Handle object,
+                          void* peer,
+                          intptr_t external_allocation_size,
+                          Dart_HandleFinalizer callback);
+
+/**
+ * Deletes the given finalizable [object] handle.
+ *
+ * The caller has to provide the actual Dart object the handle was created from
+ * to prove the object (and therefore the finalizable handle) is still alive.
+ *
+ * Requires there to be a current isolate.
+ */
+DART_EXPORT void Dart_DeleteFinalizableHandle(Dart_FinalizableHandle object,
+                                              Dart_Handle strong_ref_to_object);
+
+/**
+ * Updates the external memory size for the given finalizable handle.
+ *
+ * The caller has to provide the actual Dart object the handle was created from
+ * to prove the object (and therefore the finalizable handle) is still alive.
+ *
+ * May trigger garbage collection.
+ */
+DART_EXPORT void Dart_UpdateFinalizableExternalSize(
+    Dart_FinalizableHandle object,
+    Dart_Handle strong_ref_to_object,
+    intptr_t external_allocation_size);
+
 /*
  * ==========================
  * Initialization and Globals
@@ -2272,7 +2358,9 @@
   Dart_TypedData_kUint64,
   Dart_TypedData_kFloat32,
   Dart_TypedData_kFloat64,
+  Dart_TypedData_kInt32x4,
   Dart_TypedData_kFloat32x4,
+  Dart_TypedData_kFloat64x2,
   Dart_TypedData_kInvalid
 } Dart_TypedData_Type;
 
@@ -3029,6 +3117,59 @@
 Dart_SetLibraryTagHandler(Dart_LibraryTagHandler handler);
 
 /**
+ * Handles deferred loading requests. When this handler is invoked, it should
+ * eventually load the deferred loading unit with the given id and call
+ * Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is
+ * recommended that the loading occur asynchronously, but it is permitted to
+ * call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the
+ * handler returns.
+ *
+ * If an error is returned, it will be propogated through
+ * `prefix.loadLibrary()`. This is useful for synchronous
+ * implementations, which must propogate any unwind errors from
+ * Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler
+ * should return a non-error such as `Dart_Null()`.
+ */
+typedef Dart_Handle (*Dart_DeferredLoadHandler)(intptr_t loading_unit_id);
+
+/**
+ * Sets the deferred load handler for the current isolate. This handler is
+ * used to handle loading deferred imports in an AppJIT or AppAOT program.
+ */
+DART_EXPORT Dart_Handle
+Dart_SetDeferredLoadHandler(Dart_DeferredLoadHandler handler);
+
+/**
+ * Notifies the VM that a deferred load completed successfully. This function
+ * will eventually cause the corresponding `prefix.loadLibrary()` futures to
+ * complete.
+ *
+ * Requires the current isolate to be the same current isolate during the
+ * invocation of the Dart_DeferredLoadHandler.
+ */
+DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle
+Dart_DeferredLoadComplete(intptr_t loading_unit_id,
+                          const uint8_t* snapshot_data,
+                          const uint8_t* snapshot_instructions);
+
+/**
+ * Notifies the VM that a deferred load failed. This function
+ * will eventually cause the corresponding `prefix.loadLibrary()` futures to
+ * complete with an error.
+ *
+ * If `transient` is true, future invocations of `prefix.loadLibrary()` will
+ * trigger new load requests. If false, futures invocation will complete with
+ * the same error.
+ *
+ * Requires the current isolate to be the same current isolate during the
+ * invocation of the Dart_DeferredLoadHandler.
+ */
+DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle
+Dart_DeferredLoadCompleteError(intptr_t loading_unit_id,
+                               const char* error_message,
+                               bool transient);
+
+/**
  * Canonicalizes a url with respect to some library.
  *
  * The url is resolved with respect to the library's url and some url
@@ -3522,9 +3663,15 @@
  */
 DART_EXPORT Dart_Handle Dart_Precompile();
 
+typedef void (*Dart_CreateLoadingUnitCallback)(
+    void* callback_data,
+    intptr_t loading_unit_id,
+    void** write_callback_data,
+    void** write_debug_callback_data);
 typedef void (*Dart_StreamingWriteCallback)(void* callback_data,
                                             const uint8_t* buffer,
                                             intptr_t size);
+typedef void (*Dart_StreamingCloseCallback)(void* callback_data);
 
 // On Darwin systems, 'dlsym' adds an '_' to the beginning of the symbol name.
 // Use the '...CSymbol' definitions for resolving through 'dlsym'. The actual
@@ -3580,6 +3727,13 @@
                                     void* callback_data,
                                     bool stripped,
                                     void* debug_callback_data);
+DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle
+Dart_CreateAppAOTSnapshotAsAssemblies(
+    Dart_CreateLoadingUnitCallback next_callback,
+    void* next_callback_data,
+    bool stripped,
+    Dart_StreamingWriteCallback write_callback,
+    Dart_StreamingCloseCallback close_callback);
 
 /**
  *  Creates a precompiled snapshot.
@@ -3613,6 +3767,12 @@
                                void* callback_data,
                                bool stripped,
                                void* debug_callback_data);
+DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle
+Dart_CreateAppAOTSnapshotAsElfs(Dart_CreateLoadingUnitCallback next_callback,
+                                void* next_callback_data,
+                                bool stripped,
+                                Dart_StreamingWriteCallback write_callback,
+                                Dart_StreamingCloseCallback close_callback);
 
 /**
  *  Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes
diff --git a/runtime/include/dart_api_dl.h b/runtime/include/dart_api_dl.h
index ba8424d..19fd0f3 100644
--- a/runtime/include/dart_api_dl.h
+++ b/runtime/include/dart_api_dl.h
@@ -108,6 +108,25 @@
 DART_EXTERN_C void (*Dart_DeleteWeakPersistentHandle_DL)(
     Dart_WeakPersistentHandle object);
 
+DART_EXTERN_C void (*Dart_UpdateExternalSize_DL)(
+    Dart_WeakPersistentHandle object,
+    intptr_t external_allocation_size);
+
+DART_EXTERN_C Dart_FinalizableHandle (*Dart_NewFinalizableHandle_DL)(
+    Dart_Handle object,
+    void* peer,
+    intptr_t external_allocation_size,
+    Dart_HandleFinalizer callback);
+
+DART_EXTERN_C void (*Dart_DeleteFinalizableHandle_DL)(
+    Dart_FinalizableHandle object,
+    Dart_Handle strong_ref_to_object);
+
+DART_EXTERN_C void (*Dart_UpdateFinalizableExternalSize_DL)(
+    Dart_FinalizableHandle object,
+    Dart_Handle strong_ref_to_object,
+    intptr_t external_allocation_size);
+
 DART_EXTERN_C bool (*Dart_Post_DL)(Dart_Port_DL port_id, Dart_Handle object);
 
 DART_EXTERN_C Dart_Handle (*Dart_NewSendPort_DL)(Dart_Port_DL port_id);
@@ -123,4 +142,4 @@
 //
 // End of verbatim copy.
 
-#endif /* RUNTIME_INCLUDE_DART_API_DL_H_ */ /* NOLINT */
\ No newline at end of file
+#endif /* RUNTIME_INCLUDE_DART_API_DL_H_ */ /* NOLINT */
diff --git a/runtime/include/dart_version.h b/runtime/include/dart_version.h
index 777620b..d2d904d 100644
--- a/runtime/include/dart_version.h
+++ b/runtime/include/dart_version.h
@@ -11,6 +11,6 @@
 // On backwards compatible changes the minor version is increased.
 // The versioning covers the symbols exposed in dart_api_dl.h
 #define DART_API_DL_MAJOR_VERSION 1
-#define DART_API_DL_MINOR_VERSION 0
+#define DART_API_DL_MINOR_VERSION 1
 
 #endif /* RUNTIME_INCLUDE_DART_VERSION_H_ */ /* NOLINT */
diff --git a/runtime/include/internal/dart_api_dl_impl.h b/runtime/include/internal/dart_api_dl_impl.h
index f77063d..a306e2d 100644
--- a/runtime/include/internal/dart_api_dl_impl.h
+++ b/runtime/include/internal/dart_api_dl_impl.h
@@ -41,6 +41,10 @@
   F(Dart_NewWeakPersistentHandle)                                              \
   F(Dart_HandleFromWeakPersistent)                                             \
   F(Dart_DeleteWeakPersistentHandle)                                           \
+  F(Dart_UpdateExternalSize)                                                   \
+  F(Dart_NewFinalizableHandle)                                                 \
+  F(Dart_DeleteFinalizableHandle)                                              \
+  F(Dart_UpdateFinalizableExternalSize)                                        \
   /* Dart_Port */                                                              \
   F(Dart_Post)                                                                 \
   F(Dart_NewSendPort)                                                          \
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index fe943ae..b33315f 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -502,16 +502,6 @@
   GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(10));
   GET_NATIVE_ARGUMENT(String, debugName, arguments->NativeArgAt(11));
 
-  if (Dart::vm_snapshot_kind() == Snapshot::kFullAOT) {
-    const Array& args = Array::Handle(Array::New(1));
-    args.SetAt(
-        0,
-        String::Handle(String::New(
-            "Isolate.spawnUri is not supported when using AOT compilation")));
-    Exceptions::ThrowByType(Exceptions::kUnsupported, args);
-    UNREACHABLE();
-  }
-
   bool fatal_errors = fatalErrors.IsNull() ? true : fatalErrors.value();
   Dart_Port on_exit_port = onExit.IsNull() ? ILLEGAL_PORT : onExit.Id();
   Dart_Port on_error_port = onError.IsNull() ? ILLEGAL_PORT : onError.Id();
@@ -615,7 +605,6 @@
 }
 
 static void ExternalTypedDataFinalizer(void* isolate_callback_data,
-                                       Dart_WeakPersistentHandle handle,
                                        void* peer) {
   free(peer);
 }
@@ -725,7 +714,8 @@
                              thread->heap()->SpaceForExternal(length)));
   FinalizablePersistentHandle::New(thread->isolate(), typed_data,
                                    /* peer= */ data,
-                                   &ExternalTypedDataFinalizer, length);
+                                   &ExternalTypedDataFinalizer, length,
+                                   /*auto_delete=*/true);
   return typed_data.raw();
 }
 
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index c5a0f55..532f2f6 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -1419,7 +1419,8 @@
   GET_NON_NULL_NATIVE_ARGUMENT(Array, explicit_args, arguments->NativeArgAt(3));
   GET_NON_NULL_NATIVE_ARGUMENT(Array, arg_names, arguments->NativeArgAt(4));
 
-  const Error& error = Error::Handle(zone, klass.EnsureIsFinalized(thread));
+  const Error& error =
+      Error::Handle(zone, klass.EnsureIsAllocateFinalized(thread));
   if (!error.IsNull()) {
     Exceptions::PropagateError(error);
     UNREACHABLE();
@@ -1520,6 +1521,12 @@
                       InvocationMirror::kMethod);
     UNREACHABLE();
   }
+#if defined(DEBUG)
+  // Make sure the receiver is the null value, so that DoArgumentTypesMatch does
+  // not attempt to retrieve the instantiator type arguments from the receiver.
+  explicit_argument = args.At(args_descriptor.FirstArgIndex());
+  ASSERT(explicit_argument.IsNull());
+#endif
   const Object& type_error =
       Object::Handle(redirected_constructor.DoArgumentTypesMatch(
           args, args_descriptor, type_arguments));
diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
index 04afec9..7dd5823 100644
--- a/runtime/lib/object.cc
+++ b/runtime/lib/object.cc
@@ -10,6 +10,8 @@
 #include "vm/heap/heap.h"
 #include "vm/native_entry.h"
 #include "vm/object.h"
+#include "vm/object_store.h"
+#include "vm/resolver.h"
 #include "vm/stack_frame.h"
 #include "vm/symbols.h"
 
@@ -209,6 +211,36 @@
   return Instance::null();
 }
 
+DEFINE_NATIVE_ENTRY(LibraryPrefix_loadingUnit, 0, 1) {
+  const LibraryPrefix& prefix =
+      LibraryPrefix::CheckedHandle(zone, arguments->NativeArgAt(0));
+  const Library& target = Library::Handle(zone, prefix.GetLibrary(0));
+  const LoadingUnit& unit = LoadingUnit::Handle(zone, target.loading_unit());
+  return Smi::New(unit.IsNull() ? LoadingUnit::kIllegalId : unit.id());
+}
+
+DEFINE_NATIVE_ENTRY(LibraryPrefix_issueLoad, 0, 1) {
+  const Smi& id = Smi::CheckedHandle(zone, arguments->NativeArgAt(0));
+  Array& units = Array::Handle(zone, isolate->object_store()->loading_units());
+  if (units.IsNull()) {
+    // Not actually split.
+    const Library& lib = Library::Handle(zone, Library::CoreLibrary());
+    const String& sel = String::Handle(zone, String::New("_completeLoads"));
+    const Function& func =
+        Function::Handle(zone, lib.LookupFunctionAllowPrivate(sel));
+    ASSERT(!func.IsNull());
+    const Array& args = Array::Handle(zone, Array::New(3));
+    args.SetAt(0, id);
+    args.SetAt(1, String::Handle(zone));
+    args.SetAt(2, Bool::Get(false));
+    return DartEntry::InvokeFunction(func, args);
+  }
+  ASSERT(id.Value() != LoadingUnit::kIllegalId);
+  LoadingUnit& unit = LoadingUnit::Handle(zone);
+  unit ^= units.At(id.Value());
+  return unit.IssueLoad();
+}
+
 DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0, 0) {
 #if defined(ARCH_IS_64_BIT)
   return Bool::True().raw();
@@ -479,14 +511,11 @@
     function = Closure::Cast(receiver).function();
   } else {
     Class& cls = Class::Handle(receiver.clazz());
-    if (level != InvocationMirror::kSuper) {
-      function = cls.LookupDynamicFunction(method_name);
-    }
-    while (function.IsNull()) {
+    if (level == InvocationMirror::kSuper) {
       cls = cls.SuperClass();
-      if (cls.IsNull()) break;
-      function = cls.LookupDynamicFunction(method_name);
     }
+    function = Resolver::ResolveDynamicAnyArgs(zone, cls, method_name,
+                                               /*allow_add=*/false);
   }
   if (!function.IsNull()) {
     return function.UserVisibleSignature();
diff --git a/runtime/observatory/lib/app.dart b/runtime/observatory/lib/app.dart
index f096ad8..ee1640b 100644
--- a/runtime/observatory/lib/app.dart
+++ b/runtime/observatory/lib/app.dart
@@ -28,4 +28,3 @@
 part 'src/app/page.dart';
 part 'src/app/settings.dart';
 part 'src/app/view_model.dart';
-part 'src/app/analytics.dart';
diff --git a/runtime/observatory/lib/object_graph.dart b/runtime/observatory/lib/object_graph.dart
index 6e44872..0e891ce 100644
--- a/runtime/observatory/lib/object_graph.dart
+++ b/runtime/observatory/lib/object_graph.dart
@@ -218,7 +218,7 @@
   int get internalSize;
 
   /// The sum of all external allocations associated with this object.
-  /// See Dart_NewWeakPersistentHandle.
+  /// See Dart_NewFinalizableHandle and Dart_NewWeakPersistentHandle.
   int get externalSize;
 
   /// The [shallowSize] of this object, plus the retainedSize of all its
diff --git a/runtime/observatory/lib/service_common.dart b/runtime/observatory/lib/service_common.dart
index f074891..2ff8175 100644
--- a/runtime/observatory/lib/service_common.dart
+++ b/runtime/observatory/lib/service_common.dart
@@ -65,8 +65,8 @@
 
 /// Minimal common interface for 'WebSocket' in [dart:io] and [dart:html].
 abstract class CommonWebSocket {
-  void connect(String address, void onOpen(), void onMessage(dynamic data),
-      void onError(), void onClose());
+  Future<void> connect(WebSocketVMTarget target, void onOpen(),
+      void onMessage(dynamic data), void onError(), void onClose());
   bool get isOpen;
   void send(dynamic data);
   void close();
@@ -135,8 +135,8 @@
     if (!_hasInitiatedConnect) {
       _hasInitiatedConnect = true;
       try {
-        _webSocket.connect(
-            target.networkAddress, _onOpen, _onMessage, _onError, _onClose);
+        await _webSocket.connect(
+            target, _onOpen, _onMessage, _onError, _onClose);
       } catch (_, stack) {
         _webSocket = null;
         var exception = new NetworkRpcException('WebSocket closed');
diff --git a/runtime/observatory/lib/service_html.dart b/runtime/observatory/lib/service_html.dart
index ddc42f5..2bf441f 100644
--- a/runtime/observatory/lib/service_html.dart
+++ b/runtime/observatory/lib/service_html.dart
@@ -5,6 +5,7 @@
 library service_html;
 
 import 'dart:async';
+import 'dart:convert';
 import 'dart:html';
 import 'dart:typed_data';
 
@@ -16,9 +17,29 @@
 class _HtmlWebSocket implements CommonWebSocket {
   WebSocket _webSocket;
 
-  void connect(String address, void onOpen(), void onMessage(dynamic data),
-      void onError(), void onClose()) {
-    _webSocket = new WebSocket(address);
+  Future<void> connect(WebSocketVMTarget target, void onOpen(),
+      void onMessage(dynamic data), void onError(), void onClose()) async {
+    // The VM service will attempt to redirect our websocket connection request
+    // to DDS, but the dart:html WebSocket doesn't follow redirects. Instead of
+    // relying on a redirect, we'll request the websocket URI from the service.
+    Uri getWebSocketUriRequest = Uri.parse(target.networkAddress);
+    getWebSocketUriRequest =
+        getWebSocketUriRequest.replace(scheme: 'http', pathSegments: [
+      ...getWebSocketUriRequest.pathSegments.where((e) => e != 'ws'),
+      'getWebSocketTarget',
+    ]);
+    final response = json.decode(await HttpRequest.getString(
+      getWebSocketUriRequest.toString(),
+    ));
+    if (!response.containsKey('result') ||
+        !response['result'].containsKey('uri')) {
+      onError();
+      return;
+    }
+    _webSocket = new WebSocket(
+      response['result']['uri'],
+    );
+    target.networkAddress = _webSocket.url;
     _webSocket.onClose.listen((CloseEvent) => onClose());
     _webSocket.onError.listen((Event) => onError());
     _webSocket.onOpen.listen((Event) => onOpen());
diff --git a/runtime/observatory/lib/service_io.dart b/runtime/observatory/lib/service_io.dart
index 2ecbbf1..bf21fea 100644
--- a/runtime/observatory/lib/service_io.dart
+++ b/runtime/observatory/lib/service_io.dart
@@ -17,18 +17,18 @@
 class _IOWebSocket implements CommonWebSocket {
   WebSocket _webSocket;
 
-  void connect(String address, void onOpen(), void onMessage(dynamic data),
-      void onError(), void onClose()) {
-    WebSocket.connect(address).then((WebSocket socket) {
-      _webSocket = socket;
+  Future<void> connect(WebSocketVMTarget target, void onOpen(),
+      void onMessage(dynamic data), void onError(), void onClose()) async {
+    try {
+      _webSocket = await WebSocket.connect(target.networkAddress);
       _webSocket.listen(onMessage,
           onError: (dynamic) => onError(),
           onDone: onClose,
           cancelOnError: true);
       onOpen();
-    }).catchError((e, st) {
+    } catch (_) {
       onError();
-    });
+    }
   }
 
   bool get isOpen =>
diff --git a/runtime/observatory/lib/src/app/analytics.dart b/runtime/observatory/lib/src/app/analytics.dart
deleted file mode 100644
index a34c2da..0000000
--- a/runtime/observatory/lib/src/app/analytics.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of app;
-
-// TODO(eernst): Use 'bool.fromEnvironment' below when possible;
-// for now we use a dual `defaultValue` rewrite.
-const _obsVer = (String.fromEnvironment('OBS_VER', defaultValue: '1') ==
-        String.fromEnvironment('OBS_VER', defaultValue: '2'))
-    ? String.fromEnvironment('OBS_VER')
-    : null;
-
-class Analytics {
-  static final _UA = 'UA-26406144-17';
-  static final _name = 'Observatory';
-  static final _version = _obsVer;
-  static final _googleAnalytics = new AnalyticsHtml(_UA, _name, _version);
-
-  static initialize() {
-    // We only send screen views. This is allowed without user permission.
-    // Note, before flipping this to be true we need a UI to allow users to
-    // control this.
-    _googleAnalytics.analyticsOpt = AnalyticsOpt.optOut;
-  }
-
-  /// Called whenever an Observatory page is viewed.
-  static Future reportPageView(Uri uri) {
-    // Only report analytics when running in JavaScript.
-    if (Utils.runningInJavaScript()) {
-      // The screen name is the uri's path. e.g. inspect, profile.
-      final screenName = uri.path;
-      return _googleAnalytics.sendScreenView(screenName);
-    } else {
-      return new Future.value(null);
-    }
-  }
-}
diff --git a/runtime/observatory/lib/src/app/application.dart b/runtime/observatory/lib/src/app/application.dart
index d0fb87c..768c3b4 100644
--- a/runtime/observatory/lib/src/app/application.dart
+++ b/runtime/observatory/lib/src/app/application.dart
@@ -131,7 +131,6 @@
     assert(app == null);
     app = this;
     _registerPages();
-    Analytics.initialize();
     // Visit the current page.
     locationManager._visit();
   }
diff --git a/runtime/observatory/lib/src/app/page.dart b/runtime/observatory/lib/src/app/page.dart
index e034bf9..a366acf 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -73,7 +73,6 @@
   void visit(Uri uri, Map internalArguments) {
     this.internalArguments.clear();
     this.internalArguments.addAll(internalArguments);
-    Analytics.reportPageView(uri);
     _visit(uri);
   }
 
diff --git a/runtime/observatory/lib/src/elements/allocation_profile.dart b/runtime/observatory/lib/src/elements/allocation_profile.dart
index 79139c3..ae66a6a8 100644
--- a/runtime/observatory/lib/src/elements/allocation_profile.dart
+++ b/runtime/observatory/lib/src/elements/allocation_profile.dart
@@ -222,9 +222,9 @@
               ..classes = ['compact']
               ..text = _isCompacted ? 'expand ▼' : 'compact ▲'
               ..onClick.listen((_) {
-                    _isCompacted = !_isCompacted;
-                          _r.dirty();
-               }),
+                _isCompacted = !_isCompacted;
+                _r.dirty();
+              }),
             new HRElement()
           ],
         new DivElement()
@@ -365,35 +365,26 @@
                 _SortingField.newInternalSize, _SortingDirection.descending),
             _createHeaderButton(const ['bytes'], 'External',
                 _SortingField.newExternalSize, _SortingDirection.descending),
-            _createHeaderButton(const ['bytes'], 'Size',
-                _SortingField.newSize, _SortingDirection.descending),
-            _createHeaderButton(
-                const ['instances'], 'Instances',
-                _SortingField.newInstances,
+            _createHeaderButton(const ['bytes'], 'Size', _SortingField.newSize,
                 _SortingDirection.descending),
-
+            _createHeaderButton(const ['instances'], 'Instances',
+                _SortingField.newInstances, _SortingDirection.descending),
             _createHeaderButton(const ['bytes'], 'Internal',
                 _SortingField.oldInternalSize, _SortingDirection.descending),
             _createHeaderButton(const ['bytes'], 'External',
                 _SortingField.oldExternalSize, _SortingDirection.descending),
-            _createHeaderButton(const ['bytes'], 'Size',
-                _SortingField.oldSize, _SortingDirection.descending),
-            _createHeaderButton(
-                const ['instances'], 'Instances',
-                _SortingField.oldInstances,
+            _createHeaderButton(const ['bytes'], 'Size', _SortingField.oldSize,
                 _SortingDirection.descending),
-
+            _createHeaderButton(const ['instances'], 'Instances',
+                _SortingField.oldInstances, _SortingDirection.descending),
             _createHeaderButton(const ['bytes'], 'Internal',
                 _SortingField.internalSize, _SortingDirection.descending),
             _createHeaderButton(const ['bytes'], 'External',
                 _SortingField.externalSize, _SortingDirection.descending),
-            _createHeaderButton(const ['bytes'], 'Size',
-                _SortingField.size, _SortingDirection.descending),
-            _createHeaderButton(
-                const ['instances'], 'Instances',
-                _SortingField.instances,
+            _createHeaderButton(const ['bytes'], 'Size', _SortingField.size,
                 _SortingDirection.descending),
-
+            _createHeaderButton(const ['instances'], 'Instances',
+                _SortingField.instances, _SortingDirection.descending),
             _createHeaderButton(const ['name'], 'Class',
                 _SortingField.className, _SortingDirection.ascending)
           ],
@@ -564,28 +555,19 @@
     ].join(',');
   }
 
-  static int _getNewInstances(M.ClassHeapStats s) =>
-      s.newSpace.instances;
-  static int _getNewInternalSize(M.ClassHeapStats s) =>
-      s.newSpace.internalSize;
-  static int _getNewExternalSize(M.ClassHeapStats s) =>
-      s.newSpace.externalSize;
-  static int _getNewSize(M.ClassHeapStats s) =>
-      s.newSpace.size;
-  static int _getOldInstances(M.ClassHeapStats s) =>
-      s.oldSpace.instances;
-  static int _getOldInternalSize(M.ClassHeapStats s) =>
-      s.oldSpace.internalSize;
-  static int _getOldExternalSize(M.ClassHeapStats s) =>
-      s.oldSpace.externalSize;
-  static int _getOldSize(M.ClassHeapStats s) =>
-      s.oldSpace.size;
+  static int _getNewInstances(M.ClassHeapStats s) => s.newSpace.instances;
+  static int _getNewInternalSize(M.ClassHeapStats s) => s.newSpace.internalSize;
+  static int _getNewExternalSize(M.ClassHeapStats s) => s.newSpace.externalSize;
+  static int _getNewSize(M.ClassHeapStats s) => s.newSpace.size;
+  static int _getOldInstances(M.ClassHeapStats s) => s.oldSpace.instances;
+  static int _getOldInternalSize(M.ClassHeapStats s) => s.oldSpace.internalSize;
+  static int _getOldExternalSize(M.ClassHeapStats s) => s.oldSpace.externalSize;
+  static int _getOldSize(M.ClassHeapStats s) => s.oldSpace.size;
   static int _getInstances(M.ClassHeapStats s) =>
       s.newSpace.instances + s.oldSpace.instances;
   static int _getInternalSize(M.ClassHeapStats s) =>
       s.newSpace.internalSize + s.oldSpace.internalSize;
   static int _getExternalSize(M.ClassHeapStats s) =>
       s.newSpace.externalSize + s.oldSpace.externalSize;
-  static int _getSize(M.ClassHeapStats s) =>
-      s.newSpace.size + s.oldSpace.size;
+  static int _getSize(M.ClassHeapStats s) => s.newSpace.size + s.oldSpace.size;
 }
diff --git a/runtime/observatory/lib/src/elements/class_allocation_profile.dart b/runtime/observatory/lib/src/elements/class_allocation_profile.dart
index 1f0013c..46cc688 100644
--- a/runtime/observatory/lib/src/elements/class_allocation_profile.dart
+++ b/runtime/observatory/lib/src/elements/class_allocation_profile.dart
@@ -49,7 +49,8 @@
     return e;
   }
 
-  ClassAllocationProfileElement.created() : super.created('class-allocation-profile');
+  ClassAllocationProfileElement.created()
+      : super.created('class-allocation-profile');
 
   @override
   void attached() {
diff --git a/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart b/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart
index 8f24d9c..7044f5c 100644
--- a/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart
+++ b/runtime/observatory/lib/src/elements/cpu_profile/virtual_tree.dart
@@ -65,7 +65,8 @@
     return e;
   }
 
-  CpuProfileVirtualTreeElement.created() : super.created('cpu-profile-virtual-tree');
+  CpuProfileVirtualTreeElement.created()
+      : super.created('cpu-profile-virtual-tree');
 
   @override
   attached() {
diff --git a/runtime/observatory/lib/src/elements/helpers/custom_element.dart b/runtime/observatory/lib/src/elements/helpers/custom_element.dart
index 90b0c71..2af0d6c 100644
--- a/runtime/observatory/lib/src/elements/helpers/custom_element.dart
+++ b/runtime/observatory/lib/src/elements/helpers/custom_element.dart
@@ -46,7 +46,8 @@
   }
 
   final HtmlElement element;
-  CustomElement.created(String elementClass) : element = document.createElement("shadow") {
+  CustomElement.created(String elementClass)
+      : element = document.createElement("shadow") {
     reverseElements[element] = this;
     element.classes = [elementClass];
 
diff --git a/runtime/observatory/lib/src/elements/isolate/shared_summary.dart b/runtime/observatory/lib/src/elements/isolate/shared_summary.dart
index f7abef6..7823a1d 100644
--- a/runtime/observatory/lib/src/elements/isolate/shared_summary.dart
+++ b/runtime/observatory/lib/src/elements/isolate/shared_summary.dart
@@ -33,7 +33,8 @@
     return e;
   }
 
-  IsolateSharedSummaryElement.created() : super.created('isolate-shared-summary');
+  IsolateSharedSummaryElement.created()
+      : super.created('isolate-shared-summary');
 
   @override
   void attached() {
diff --git a/runtime/observatory/lib/src/elements/megamorphiccache_view.dart b/runtime/observatory/lib/src/elements/megamorphiccache_view.dart
index 6dc78b5..fb1f262 100644
--- a/runtime/observatory/lib/src/elements/megamorphiccache_view.dart
+++ b/runtime/observatory/lib/src/elements/megamorphiccache_view.dart
@@ -85,7 +85,8 @@
     return e;
   }
 
-  MegamorphicCacheViewElement.created() : super.created('megamorphiccache-view');
+  MegamorphicCacheViewElement.created()
+      : super.created('megamorphiccache-view');
 
   @override
   attached() {
diff --git a/runtime/observatory/lib/src/elements/observatory_application.dart b/runtime/observatory/lib/src/elements/observatory_application.dart
index bb58e9e..1ba16ef 100644
--- a/runtime/observatory/lib/src/elements/observatory_application.dart
+++ b/runtime/observatory/lib/src/elements/observatory_application.dart
@@ -13,7 +13,8 @@
 class ObservatoryApplicationElement extends CustomElement {
   ObservatoryApplication app;
 
-  ObservatoryApplicationElement.created() : super.created('observatory-application');
+  ObservatoryApplicationElement.created()
+      : super.created('observatory-application');
 
   @override
   void attached() {
diff --git a/runtime/observatory/lib/src/elements/persistent_handles.dart b/runtime/observatory/lib/src/elements/persistent_handles.dart
index 468d700..72eef36 100644
--- a/runtime/observatory/lib/src/elements/persistent_handles.dart
+++ b/runtime/observatory/lib/src/elements/persistent_handles.dart
@@ -71,7 +71,8 @@
     return e;
   }
 
-  PersistentHandlesPageElement.created() : super.created('persistent-handles-page');
+  PersistentHandlesPageElement.created()
+      : super.created('persistent-handles-page');
 
   @override
   attached() {
diff --git a/runtime/observatory/lib/src/elements/singletargetcache_ref.dart b/runtime/observatory/lib/src/elements/singletargetcache_ref.dart
index 1355521..0e0a674 100644
--- a/runtime/observatory/lib/src/elements/singletargetcache_ref.dart
+++ b/runtime/observatory/lib/src/elements/singletargetcache_ref.dart
@@ -34,7 +34,8 @@
     return e;
   }
 
-  SingleTargetCacheRefElement.created() : super.created('singletargetcache-ref');
+  SingleTargetCacheRefElement.created()
+      : super.created('singletargetcache-ref');
 
   @override
   void attached() {
diff --git a/runtime/observatory/lib/src/elements/singletargetcache_view.dart b/runtime/observatory/lib/src/elements/singletargetcache_view.dart
index ae96da9..f25a184 100644
--- a/runtime/observatory/lib/src/elements/singletargetcache_view.dart
+++ b/runtime/observatory/lib/src/elements/singletargetcache_view.dart
@@ -83,7 +83,10 @@
     return e;
   }
 
-  SingleTargetCacheViewElement.created() : super.created('singletargetcache-view',);
+  SingleTargetCacheViewElement.created()
+      : super.created(
+          'singletargetcache-view',
+        );
 
   @override
   attached() {
diff --git a/runtime/observatory/lib/src/elements/stack_trace_tree_config.dart b/runtime/observatory/lib/src/elements/stack_trace_tree_config.dart
index c478bf8..ff23373 100644
--- a/runtime/observatory/lib/src/elements/stack_trace_tree_config.dart
+++ b/runtime/observatory/lib/src/elements/stack_trace_tree_config.dart
@@ -86,7 +86,8 @@
     return e;
   }
 
-  StackTraceTreeConfigElement.created() : super.created('stack-trace-tree-config');
+  StackTraceTreeConfigElement.created()
+      : super.created('stack-trace-tree-config');
 
   @override
   void attached() {
diff --git a/runtime/observatory/lib/src/elements/strongly_reachable_instances.dart b/runtime/observatory/lib/src/elements/strongly_reachable_instances.dart
index 33a556e..340686a 100644
--- a/runtime/observatory/lib/src/elements/strongly_reachable_instances.dart
+++ b/runtime/observatory/lib/src/elements/strongly_reachable_instances.dart
@@ -49,7 +49,8 @@
     return e;
   }
 
-  StronglyReachableInstancesElement.created() : super.created('strongly-reachable-instances');
+  StronglyReachableInstancesElement.created()
+      : super.created('strongly-reachable-instances');
 
   @override
   void attached() {
diff --git a/runtime/observatory/lib/src/elements/subtypetestcache_view.dart b/runtime/observatory/lib/src/elements/subtypetestcache_view.dart
index 9f0d68e..740298f 100644
--- a/runtime/observatory/lib/src/elements/subtypetestcache_view.dart
+++ b/runtime/observatory/lib/src/elements/subtypetestcache_view.dart
@@ -82,7 +82,8 @@
     return e;
   }
 
-  SubtypeTestCacheViewElement.created() : super.created('subtypetestcache-view');
+  SubtypeTestCacheViewElement.created()
+      : super.created('subtypetestcache-view');
 
   @override
   attached() {
diff --git a/runtime/observatory/lib/src/elements/vm_view.dart b/runtime/observatory/lib/src/elements/vm_view.dart
index 9807fb2..d183dc3 100644
--- a/runtime/observatory/lib/src/elements/vm_view.dart
+++ b/runtime/observatory/lib/src/elements/vm_view.dart
@@ -112,12 +112,109 @@
             .element,
         new NavNotifyElement(_notifications, queue: _r.queue).element
       ]),
+      describeProcess(),
       describeVM(),
       describeIsolateGroups(),
       new ViewFooterElement(queue: _r.queue).element
     ];
   }
 
+  Element describeProcess() {
+    return new DivElement()
+      ..classes = ['content-centered-big']
+      ..children = <HtmlElement>[
+        new HeadingElement.h1()..text = 'Process',
+        new DivElement()
+          ..classes = ['memberList']
+          ..children = <Element>[
+            new DivElement()
+              ..classes = ['memberItem']
+              ..children = <Element>[
+                new DivElement()
+                  ..classes = ['memberName']
+                  ..text = 'pid',
+                new DivElement()
+                  ..classes = ['memberValue']
+                  ..text = '${_vm.pid}'
+              ],
+            new DivElement()
+              ..classes = ['memberItem']
+              ..children = <Element>[
+                new DivElement()
+                  ..classes = ['memberName']
+                  ..text = 'current memory'
+                  ..title =
+                      'current value of the resident set size of the process running this VM',
+                new DivElement()
+                  ..classes = ['memberValue']
+                  ..text = _vm.currentRSS != null
+                      ? Utils.formatSize(_vm.currentRSS)
+                      : "unavailable"
+              ],
+            new DivElement()
+              ..classes = ['memberItem']
+              ..children = <Element>[
+                new DivElement()
+                  ..classes = ['memberName']
+                  ..text = 'peak memory'
+                  ..title =
+                      'highest value of the resident set size of the process running this VM',
+                new DivElement()
+                  ..classes = ['memberValue']
+                  ..text = _vm.maxRSS != null
+                      ? Utils.formatSize(_vm.maxRSS)
+                      : "unavailable"
+              ],
+            new DivElement()
+              ..classes = ['memberItem']
+              ..children = <Element>[
+                new DivElement()
+                  ..classes = ['memberName']
+                  ..text = 'malloc memory',
+                new DivElement()
+                  ..classes = ['memberValue']
+                  ..text = _vm.heapAllocatedMemoryUsage != null
+                      ? Utils.formatSize(_vm.heapAllocatedMemoryUsage)
+                      : 'unavailable'
+                  ..title = _vm.heapAllocatedMemoryUsage != null
+                      ? '${_vm.heapAllocatedMemoryUsage} bytes'
+                      : null
+              ],
+            new DivElement()
+              ..classes = ['memberItem']
+              ..children = <Element>[
+                new DivElement()
+                  ..classes = ['memberName']
+                  ..text = 'malloc allocation count',
+                new DivElement()
+                  ..classes = ['memberValue']
+                  ..text = _vm.heapAllocationCount != null
+                      ? '${_vm.heapAllocationCount}'
+                      : 'unavailable'
+              ],
+            new DivElement()
+              ..classes = ['memberItem']
+              ..children = <Element>[
+                new DivElement()
+                  ..classes = ['memberName']
+                  ..children = <Element>[
+                    new SpanElement()..text = 'view ',
+                    new AnchorElement(href: Uris.nativeMemory())
+                      ..text = 'malloc profile'
+                  ],
+                new DivElement()
+                  ..classes = ['memberName']
+                  ..children = <Element>[
+                    new SpanElement()..text = 'view ',
+                    new AnchorElement(href: Uris.processSnapshot())
+                      ..text = 'process memory'
+                  ]
+              ]
+          ],
+        new BRElement(),
+      ];
+  }
+
   Element describeVM() {
     final uptime = new DateTime.now().difference(_vm.startTime);
     return new DivElement()
@@ -162,6 +259,19 @@
               ..children = <Element>[
                 new DivElement()
                   ..classes = ['memberName']
+                  ..text = 'current memory'
+                  ..title = 'current amount of memory consumed by the Dart VM',
+                new DivElement()
+                  ..classes = ['memberValue']
+                  ..text = _vm.currentMemory != null
+                      ? Utils.formatSize(_vm.currentMemory)
+                      : "unavailable"
+              ],
+            new DivElement()
+              ..classes = ['memberItem']
+              ..children = <Element>[
+                new DivElement()
+                  ..classes = ['memberName']
                   ..text = 'started at',
                 new DivElement()
                   ..classes = ['memberValue']
@@ -187,71 +297,6 @@
                   ..classes = ['memberValue']
                   ..text = '${new DateTime.now()}'
               ],
-            new DivElement()
-              ..classes = ['memberItem']
-              ..children = <Element>[
-                new DivElement()
-                  ..classes = ['memberName']
-                  ..text = 'pid',
-                new DivElement()
-                  ..classes = ['memberValue']
-                  ..text = '${_vm.pid}'
-              ],
-            new DivElement()
-              ..classes = ['memberItem']
-              ..children = <Element>[
-                new DivElement()
-                  ..classes = ['memberName']
-                  ..text = 'peak process memory'
-                  ..title =
-                      'highest value of the resident set size of the process running this VM',
-                new DivElement()
-                  ..classes = ['memberValue']
-                  ..text = _vm.maxRSS != null
-                      ? Utils.formatSize(_vm.maxRSS)
-                      : "unavailable"
-              ],
-            new DivElement()
-              ..classes = ['memberItem']
-              ..children = <Element>[
-                new DivElement()
-                  ..classes = ['memberName']
-                  ..text = 'current process memory'
-                  ..title =
-                      'current value of the resident set size of the process running this VM',
-                new DivElement()
-                  ..classes = ['memberValue']
-                  ..text = _vm.currentRSS != null
-                      ? Utils.formatSize(_vm.currentRSS)
-                      : "unavailable"
-              ],
-            new DivElement()
-              ..classes = ['memberItem']
-              ..children = <Element>[
-                new DivElement()
-                  ..classes = ['memberName']
-                  ..text = 'malloc memory',
-                new DivElement()
-                  ..classes = ['memberValue']
-                  ..text = _vm.heapAllocatedMemoryUsage != null
-                      ? Utils.formatSize(_vm.heapAllocatedMemoryUsage)
-                      : 'unavailable'
-                  ..title = _vm.heapAllocatedMemoryUsage != null
-                      ? '${_vm.heapAllocatedMemoryUsage} bytes'
-                      : null
-              ],
-            new DivElement()
-              ..classes = ['memberItem']
-              ..children = <Element>[
-                new DivElement()
-                  ..classes = ['memberName']
-                  ..text = 'malloc allocation count',
-                new DivElement()
-                  ..classes = ['memberValue']
-                  ..text = _vm.heapAllocationCount != null
-                      ? '${_vm.heapAllocationCount}'
-                      : 'unavailable'
-              ],
             new BRElement(),
             new DivElement()
               ..classes = ['memberItem']
@@ -269,24 +314,6 @@
                     new AnchorElement(href: Uris.timeline())..text = 'timeline'
                   ]
               ],
-            new DivElement()
-              ..classes = ['memberItem']
-              ..children = <Element>[
-                new DivElement()
-                  ..classes = ['memberName']
-                  ..children = <Element>[
-                    new SpanElement()..text = 'view ',
-                    new AnchorElement(href: Uris.nativeMemory())
-                      ..text = 'malloc profile'
-                  ],
-                new DivElement()
-                  ..classes = ['memberName']
-                  ..children = <Element>[
-                    new SpanElement()..text = 'view ',
-                    new AnchorElement(href: Uris.processSnapshot())
-                      ..text = 'process memory'
-                  ]
-              ]
           ],
         new BRElement(),
       ];
diff --git a/runtime/observatory/lib/src/models/objects/vm.dart b/runtime/observatory/lib/src/models/objects/vm.dart
index fe25c84..ae8210c 100644
--- a/runtime/observatory/lib/src/models/objects/vm.dart
+++ b/runtime/observatory/lib/src/models/objects/vm.dart
@@ -40,6 +40,7 @@
   /// The current number of allocations on the native heap within the VM.
   int get heapAllocationCount;
 
+  int get currentMemory;
   int get maxRSS;
   int get currentRSS;
 
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 5badd86..9c9c76b 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -684,6 +684,7 @@
   int pid = 0;
   int heapAllocatedMemoryUsage = 0;
   int heapAllocationCount = 0;
+  int currentMemory;
   int maxRSS;
   int currentRSS;
   bool profileVM = false;
@@ -1032,6 +1033,7 @@
     heapAllocatedMemoryUsage = map['_heapAllocatedMemoryUsage'];
     heapAllocationCount = map['_heapAllocationCount'];
     embedder = map['_embedder'];
+    currentMemory = map['_currentMemory'];
     maxRSS = map['_maxRSS'];
     currentRSS = map['_currentRSS'];
     profileVM = map['_profilerMode'] == 'VM';
diff --git a/runtime/observatory/observatory_sources.gni b/runtime/observatory/observatory_sources.gni
index 24e17ed..e78a449 100644
--- a/runtime/observatory/observatory_sources.gni
+++ b/runtime/observatory/observatory_sources.gni
@@ -21,7 +21,6 @@
   "lib/service_html.dart",
   "lib/service_io.dart",
   "lib/src/allocation_profile/allocation_profile.dart",
-  "lib/src/app/analytics.dart",
   "lib/src/app/application.dart",
   "lib/src/app/location_manager.dart",
   "lib/src/app/notification.dart",
diff --git a/runtime/observatory/tests/service/bad_web_socket_address_test.dart b/runtime/observatory/tests/service/bad_web_socket_address_test.dart
index 8f83fd8..b0a3bbb 100644
--- a/runtime/observatory/tests/service/bad_web_socket_address_test.dart
+++ b/runtime/observatory/tests/service/bad_web_socket_address_test.dart
@@ -15,7 +15,7 @@
   } catch (e) {
     error = e;
   }
-  expect(error, new isInstanceOf<NetworkRpcException>());
+  expect(error, isA<NetworkRpcException>());
 }
 
 main() async {
diff --git a/runtime/observatory/tests/service/dev_fs_http_put_test.dart b/runtime/observatory/tests/service/dev_fs_http_put_test.dart
index 107778d..a9bed79 100644
--- a/runtime/observatory/tests/service/dev_fs_http_put_test.dart
+++ b/runtime/observatory/tests/service/dev_fs_http_put_test.dart
@@ -31,7 +31,7 @@
     result = await vm.invokeRpcNoUpgrade('_createDevFS', {'fsName': fsId});
     expect(result['type'], equals('FileSystem'));
     expect(result['name'], equals(fsId));
-    expect(result['uri'], new isInstanceOf<String>());
+    expect(result['uri'], isA<String>());
 
     // Write the file by issuing an HTTP PUT.
     HttpClient client = new HttpClient();
diff --git a/runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart b/runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart
index 7801775..a2c758c 100644
--- a/runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart
+++ b/runtime/observatory/tests/service/dev_fs_http_put_weird_char_test.dart
@@ -32,7 +32,7 @@
     result = await vm.invokeRpcNoUpgrade('_createDevFS', {'fsName': fsId});
     expect(result['type'], equals('FileSystem'));
     expect(result['name'], equals(fsId));
-    expect(result['uri'], new isInstanceOf<String>());
+    expect(result['uri'], isA<String>());
 
     // Write the file by issuing an HTTP PUT.
     HttpClient client = new HttpClient();
diff --git a/runtime/observatory/tests/service/dev_fs_test.dart b/runtime/observatory/tests/service/dev_fs_test.dart
index 920a152..cf4ca71 100644
--- a/runtime/observatory/tests/service/dev_fs_test.dart
+++ b/runtime/observatory/tests/service/dev_fs_test.dart
@@ -17,7 +17,7 @@
     result = await vm.invokeRpcNoUpgrade('_createDevFS', params);
     expect(result['type'], equals('FileSystem'));
     expect(result['name'], equals('alpha'));
-    expect(result['uri'], new isInstanceOf<String>());
+    expect(result['uri'], isA<String>());
 
     result = await vm.invokeRpcNoUpgrade('_listDevFS', {});
     expect(result['type'], equals('FileSystemList'));
@@ -62,7 +62,7 @@
     result = await vm.invokeRpcNoUpgrade('_createDevFS', {'fsName': fsId});
     expect(result['type'], equals('FileSystem'));
     expect(result['name'], equals(fsId));
-    expect(result['uri'], new isInstanceOf<String>());
+    expect(result['uri'], isA<String>());
 
     bool caughtException = false;
     try {
diff --git a/runtime/observatory/tests/service/dev_fs_uri_test.dart b/runtime/observatory/tests/service/dev_fs_uri_test.dart
index 42e5150..13b4af4 100644
--- a/runtime/observatory/tests/service/dev_fs_uri_test.dart
+++ b/runtime/observatory/tests/service/dev_fs_uri_test.dart
@@ -37,7 +37,7 @@
     result = await vm.invokeRpcNoUpgrade('_createDevFS', {'fsName': fsId});
     expect(result['type'], equals('FileSystem'));
     expect(result['name'], equals(fsId));
-    expect(result['uri'], new isInstanceOf<String>());
+    expect(result['uri'], isA<String>());
 
     // Write the file by issuing an HTTP PUT.
     HttpClient client = new HttpClient();
diff --git a/runtime/observatory/tests/service/dev_fs_weird_char_test.dart b/runtime/observatory/tests/service/dev_fs_weird_char_test.dart
index f2fddce..e8277a6 100644
--- a/runtime/observatory/tests/service/dev_fs_weird_char_test.dart
+++ b/runtime/observatory/tests/service/dev_fs_weird_char_test.dart
@@ -19,7 +19,7 @@
     result = await vm.invokeRpcNoUpgrade('_createDevFS', {'fsName': fsId});
     expect(result['type'], equals('FileSystem'));
     expect(result['name'], equals(fsId));
-    expect(result['uri'], new isInstanceOf<String>());
+    expect(result['uri'], isA<String>());
 
     // Write the file.
     result = await vm.invokeRpcNoUpgrade('_writeDevFSFile',
diff --git a/runtime/observatory/tests/service/developer_extension_test.dart b/runtime/observatory/tests/service/developer_extension_test.dart
index 30ca38d..c5226de 100644
--- a/runtime/observatory/tests/service/developer_extension_test.dart
+++ b/runtime/observatory/tests/service/developer_extension_test.dart
@@ -73,7 +73,7 @@
   resumeIsolateAndAwaitEvent(Isolate.kExtensionStream, (ServiceEvent event) {
     expect(event.kind, equals(ServiceEvent.kExtension));
     expect(event.extensionKind, equals('ALPHA'));
-    expect(event.extensionData, new isInstanceOf<Map>());
+    expect(event.extensionData, isA<Map>());
     expect(event.extensionData['cat'], equals('dog'));
   }),
   hasStoppedAtBreakpoint,
diff --git a/runtime/observatory/tests/service/evaluate_in_frame_with_scope_test.dart b/runtime/observatory/tests/service/evaluate_in_frame_with_scope_test.dart
index fecc245..8eb463a 100644
--- a/runtime/observatory/tests/service/evaluate_in_frame_with_scope_test.dart
+++ b/runtime/observatory/tests/service/evaluate_in_frame_with_scope_test.dart
@@ -44,24 +44,22 @@
     var thing2 = thing2Field.staticValue;
     print(thing2);
 
-    final isInstanceOf<Instance> isInstanceOfInstance =
-        new isInstanceOf<Instance>();
     ServiceObject result = await isolate.evalFrame(0, "x + y + a + b",
         scope: <String, ServiceObject>{"a": thing1, "b": thing2});
-    expect(result, isInstanceOfInstance);
+    expect(result, isA<Instance>());
     print(result);
     expect((result as Instance).valueAsString, equals('2033'));
 
     result = await isolate.evalFrame(0, "local + a + b",
         scope: <String, ServiceObject>{"a": thing1, "b": thing2});
-    expect(result, isInstanceOfInstance);
+    expect(result, isA<Instance>());
     print(result);
     expect((result as Instance).valueAsString, equals('2033'));
 
     // Note the eval's scope is shadowing the locals' scope.
     result = await isolate.evalFrame(0, "x + y",
         scope: <String, ServiceObject>{"x": thing1, "y": thing2});
-    expect(result, isInstanceOfInstance);
+    expect(result, isA<Instance>());
     print(result);
     expect((result as Instance).valueAsString, equals('7'));
 
diff --git a/runtime/observatory/tests/service/get_allocation_profile_public_rpc_test.dart b/runtime/observatory/tests/service/get_allocation_profile_public_rpc_test.dart
index d1c81e0..137d44a 100644
--- a/runtime/observatory/tests/service/get_allocation_profile_public_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_allocation_profile_public_rpc_test.dart
@@ -44,7 +44,7 @@
     result = await isolate.invokeRpcNoUpgrade('getAllocationProfile', params);
     expect(result['type'], equals('AllocationProfile'));
     var firstReset = result['dateLastAccumulatorReset'];
-    expect(firstReset, new isInstanceOf<String>());
+    expect(firstReset, isA<String>());
     expect(result.containsKey('dateLastServiceGC'), isFalse);
     expect(result.containsKey('_heaps'), isFalse);
     expect(result['members'].length, isPositive);
@@ -74,7 +74,7 @@
     expect(result['type'], equals('AllocationProfile'));
     expect(result['dateLastAccumulatorReset'], equals(secondReset));
     var firstGC = result['dateLastServiceGC'];
-    expect(firstGC, new isInstanceOf<String>());
+    expect(firstGC, isA<String>());
     expect(result.containsKey('_heaps'), isFalse);
     expect(result['members'].length, isPositive);
 
diff --git a/runtime/observatory/tests/service/get_allocation_profile_rpc_test.dart b/runtime/observatory/tests/service/get_allocation_profile_rpc_test.dart
index 05ab7c8..6021980 100644
--- a/runtime/observatory/tests/service/get_allocation_profile_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_allocation_profile_rpc_test.dart
@@ -44,7 +44,7 @@
     result = await isolate.invokeRpcNoUpgrade('_getAllocationProfile', params);
     expect(result['type'], equals('AllocationProfile'));
     var firstReset = result['dateLastAccumulatorReset'];
-    expect(firstReset, new isInstanceOf<String>());
+    expect(firstReset, isA<String>());
     expect(result.containsKey('dateLastServiceGC'), isFalse);
     expect(result['_heaps'].length, isPositive);
     expect(result['_heaps']['new']['type'], equals('HeapSpace'));
@@ -74,7 +74,7 @@
     expect(result['type'], equals('AllocationProfile'));
     expect(result['dateLastAccumulatorReset'], equals(secondReset));
     var firstGC = result['dateLastServiceGC'];
-    expect(firstGC, new isInstanceOf<String>());
+    expect(firstGC, isA<String>());
     expect(result['_heaps'].length, isPositive);
     expect(result['_heaps']['new']['type'], equals('HeapSpace'));
     expect(result['_heaps']['old']['type'], equals('HeapSpace'));
diff --git a/runtime/observatory/tests/service/get_cpu_profile_timeline_rpc_test.dart b/runtime/observatory/tests/service/get_cpu_profile_timeline_rpc_test.dart
index db43578..2bbf22f 100644
--- a/runtime/observatory/tests/service/get_cpu_profile_timeline_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_cpu_profile_timeline_rpc_test.dart
@@ -22,8 +22,8 @@
 
 Future checkTimeline(VM vm) async {
   var result = await TimelineRepositoryBase().getCpuProfileTimeline(vm);
-  var isString = new isInstanceOf<String>();
-  var isInt = new isInstanceOf<int>();
+  var isString = isA<String>();
+  var isInt = isA<int>();
   Map frames = result['stackFrames'];
   expect(frames.length, greaterThan(10), reason: "Should have many samples");
   for (Map frame in frames.values) {
diff --git a/runtime/observatory/tests/service/get_cpu_samples_rpc_test.dart b/runtime/observatory/tests/service/get_cpu_samples_rpc_test.dart
index 93a7353..8d7bbb9 100644
--- a/runtime/observatory/tests/service/get_cpu_samples_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_cpu_samples_rpc_test.dart
@@ -24,9 +24,9 @@
       await isolate.invokeRpcNoUpgrade('getCpuSamples', {'_code': true});
   expect(result['type'], equals('CpuSamples'));
 
-  final isString = isInstanceOf<String>();
-  final isInt = isInstanceOf<int>();
-  final isList = isInstanceOf<List>();
+  final isString = isA<String>();
+  final isInt = isA<int>();
+  final isList = isA<List>();
   final functions = result['functions'];
   expect(functions.length, greaterThan(10),
       reason: "Should have many functions");
diff --git a/runtime/observatory/tests/service/get_heap_map_rpc_test.dart b/runtime/observatory/tests/service/get_heap_map_rpc_test.dart
index c85a561..26949bc 100644
--- a/runtime/observatory/tests/service/get_heap_map_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_heap_map_rpc_test.dart
@@ -17,7 +17,7 @@
     expect(result['pageSizeBytes'], isPositive);
     expect(result['classList'], isNotNull);
     expect(result['pages'].length, isPositive);
-    expect(result['pages'][0]['objectStart'], new isInstanceOf<String>());
+    expect(result['pages'][0]['objectStart'], isA<String>());
     expect(result['pages'][0]['objects'].length, isPositive);
     expect(result['pages'][0]['objects'][0], isPositive);
   },
@@ -30,7 +30,7 @@
     expect(result['pageSizeBytes'], isPositive);
     expect(result['classList'], isNotNull);
     expect(result['pages'].length, isPositive);
-    expect(result['pages'][0]['objectStart'], new isInstanceOf<String>());
+    expect(result['pages'][0]['objectStart'], isA<String>());
     expect(result['pages'][0]['objects'].length, isPositive);
     expect(result['pages'][0]['objects'][0], isPositive);
   },
@@ -43,7 +43,7 @@
     expect(result['pageSizeBytes'], isPositive);
     expect(result['classList'], isNotNull);
     expect(result['pages'].length, isPositive);
-    expect(result['pages'][0]['objectStart'], new isInstanceOf<String>());
+    expect(result['pages'][0]['objectStart'], isA<String>());
     expect(result['pages'][0]['objects'].length, isPositive);
     expect(result['pages'][0]['objects'][0], isPositive);
   },
@@ -56,7 +56,7 @@
     expect(result['pageSizeBytes'], isPositive);
     expect(result['classList'], isNotNull);
     expect(result['pages'].length, isPositive);
-    expect(result['pages'][0]['objectStart'], new isInstanceOf<String>());
+    expect(result['pages'][0]['objectStart'], isA<String>());
     expect(result['pages'][0]['objects'].length, isPositive);
     expect(result['pages'][0]['objects'][0], isPositive);
   },
diff --git a/runtime/observatory/tests/service/get_isolate_rpc_test.dart b/runtime/observatory/tests/service/get_isolate_rpc_test.dart
index 2346282..293b0d3 100644
--- a/runtime/observatory/tests/service/get_isolate_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_isolate_rpc_test.dart
@@ -15,7 +15,7 @@
     var result = await vm.invokeRpcNoUpgrade('getIsolate', params);
     expect(result['type'], equals('Isolate'));
     expect(result['id'], startsWith('isolates/'));
-    expect(result['number'], new isInstanceOf<String>());
+    expect(result['number'], isA<String>());
     expect(result['_originNumber'], equals(result['number']));
     expect(result['startTime'], isPositive);
     expect(result['livePorts'], isPositive);
diff --git a/runtime/observatory/tests/service/get_object_rpc_test.dart b/runtime/observatory/tests/service/get_object_rpc_test.dart
index faf5eca..e9e508b 100644
--- a/runtime/observatory/tests/service/get_object_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_object_rpc_test.dart
@@ -726,9 +726,9 @@
     expect(result['library']['type'], equals('@Library'));
     expect(result['source'], startsWith('// Copyright (c)'));
     expect(result['tokenPosTable'].length, isPositive);
-    expect(result['tokenPosTable'][0], new isInstanceOf<List>());
+    expect(result['tokenPosTable'][0], isA<List>());
     expect(result['tokenPosTable'][0].length, isPositive);
-    expect(result['tokenPosTable'][0][0], new isInstanceOf<int>());
+    expect(result['tokenPosTable'][0][0], isA<int>());
   },
 
   // invalid script.
@@ -974,17 +974,15 @@
     expect(result['name'], endsWith('_DummyClass.dummyFunction'));
     expect(result['_vmName'], endsWith('dummyFunction'));
     expect(result['kind'], equals('Dart'));
-    expect(result['_optimized'], new isInstanceOf<bool>());
+    expect(result['_optimized'], isA<bool>());
     expect(result['function']['type'], equals('@Function'));
-    expect(result['_startAddress'], new isInstanceOf<String>());
-    expect(result['_endAddress'], new isInstanceOf<String>());
+    expect(result['_startAddress'], isA<String>());
+    expect(result['_endAddress'], isA<String>());
     expect(result['_objectPool'], isNotNull);
     expect(result['_disassembly'], isNotNull);
     expect(result['_descriptors'], isNotNull);
-    expect(
-        result['_inlinedFunctions'], anyOf([isNull, new isInstanceOf<List>()]));
-    expect(
-        result['_inlinedIntervals'], anyOf([isNull, new isInstanceOf<List>()]));
+    expect(result['_inlinedFunctions'], anyOf([isNull, isA<List>()]));
+    expect(result['_inlinedIntervals'], anyOf([isNull, isA<List>()]));
   },
 
   // invalid code.
diff --git a/runtime/observatory/tests/service/get_process_memory_usage_rpc_test.dart b/runtime/observatory/tests/service/get_process_memory_usage_rpc_test.dart
index 0d97607..6dcfe36 100644
--- a/runtime/observatory/tests/service/get_process_memory_usage_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_process_memory_usage_rpc_test.dart
@@ -12,9 +12,9 @@
     var result = await vm.invokeRpcNoUpgrade("getProcessMemoryUsage", {});
     expect(result['type'], equals('ProcessMemoryUsage'));
     checkProcessMemoryItem(item) {
-      expect(item['name'], isInstanceOf<String>());
-      expect(item['description'], isInstanceOf<String>());
-      expect(item['size'], isInstanceOf<int>());
+      expect(item['name'], isA<String>());
+      expect(item['description'], isA<String>());
+      expect(item['size'], isA<int>());
       expect(item['size'], greaterThanOrEqualTo(0));
       for (var child in item['children']) {
         checkProcessMemoryItem(child);
diff --git a/runtime/observatory/tests/service/get_version_rpc_test.dart b/runtime/observatory/tests/service/get_version_rpc_test.dart
index 13fa1af..ff51911 100644
--- a/runtime/observatory/tests/service/get_version_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_version_rpc_test.dart
@@ -12,7 +12,7 @@
     var result = await vm.invokeRpcNoUpgrade('getVersion', {});
     expect(result['type'], equals('Version'));
     expect(result['major'], equals(3));
-    expect(result['minor'], equals(36));
+    expect(result['minor'], equals(37));
     expect(result['_privateMajor'], equals(0));
     expect(result['_privateMinor'], equals(0));
   },
diff --git a/runtime/observatory/tests/service/get_vm_rpc_test.dart b/runtime/observatory/tests/service/get_vm_rpc_test.dart
index 97f973a..0291ff3 100644
--- a/runtime/observatory/tests/service/get_vm_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_vm_rpc_test.dart
@@ -16,11 +16,11 @@
     expect(result['type'], equals('VM'));
     expect(result['name'], equals('Walter'));
     expect(result['architectureBits'], isPositive);
-    expect(result['targetCPU'], new isInstanceOf<String>());
-    expect(result['hostCPU'], new isInstanceOf<String>());
+    expect(result['targetCPU'], isA<String>());
+    expect(result['hostCPU'], isA<String>());
     expect(result['operatingSystem'], Platform.operatingSystem);
-    expect(result['version'], new isInstanceOf<String>());
-    expect(result['pid'], new isInstanceOf<int>());
+    expect(result['version'], isA<String>());
+    expect(result['pid'], isA<int>());
     expect(result['startTime'], isPositive);
     expect(result['isolates'].length, isPositive);
     expect(result['isolates'][0]['type'], equals('@Isolate'));
diff --git a/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart b/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart
index b149a7e..71a8b61a 100644
--- a/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart
@@ -109,10 +109,10 @@
       continue;
     }
     Map arguments = event['args'];
-    expect(arguments, new isInstanceOf<Map>());
-    expect(arguments['isolateGroupId'], new isInstanceOf<String>());
+    expect(arguments, isA<Map>());
+    expect(arguments['isolateGroupId'], isA<String>());
     if (event['cat'] != 'GC') {
-      expect(arguments['isolateId'], new isInstanceOf<String>());
+      expect(arguments['isolateId'], isA<String>());
     }
   }
 }
@@ -121,7 +121,7 @@
   (VM vm) async {
     Map result = await vm.invokeRpcNoUpgrade('getVMTimeline', {});
     expect(result['type'], equals('Timeline'));
-    expect(result['traceEvents'], new isInstanceOf<List>());
+    expect(result['traceEvents'], isA<List>());
     final int numEvents = result['traceEvents'].length;
     List dartEvents = filterForDartEvents(result['traceEvents']);
     expect(dartEvents.length, greaterThanOrEqualTo(11));
diff --git a/runtime/observatory/tests/service/get_zone_memory_info_rpc_test.dart b/runtime/observatory/tests/service/get_zone_memory_info_rpc_test.dart
index 428c42e..3de0b1d 100644
--- a/runtime/observatory/tests/service/get_zone_memory_info_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_zone_memory_info_rpc_test.dart
@@ -9,12 +9,11 @@
 
 var tests = <VMTest>[
   (VM vm) async {
-    isInstanceOf<int> isInt = new isInstanceOf<int>();
     // Just iterate over all the isolates to confirm they have
     // the correct fields needed to examine zone memory usage.
     for (Isolate isolate in new List.from(vm.isolates)) {
       await isolate.reload();
-      expect(isolate.zoneHighWatermark, isInt);
+      expect(isolate.zoneHighWatermark, isA<int>());
       expect(isolate.threads, isNotNull);
       List<Thread> threads = isolate.threads;
 
@@ -22,8 +21,8 @@
         expect(thread.type, equals('_Thread'));
         expect(thread.id, isNotNull);
         expect(thread.kind, isNotNull);
-        expect(thread.zoneHighWatermark, isInt);
-        expect(thread.zoneCapacity, isInt);
+        expect(thread.zoneHighWatermark, isA<int>());
+        expect(thread.zoneCapacity, isA<int>());
       }
     }
   },
diff --git a/runtime/observatory/tests/service/logging_test.dart b/runtime/observatory/tests/service/logging_test.dart
index 4acf8b0..84fa6b1 100644
--- a/runtime/observatory/tests/service/logging_test.dart
+++ b/runtime/observatory/tests/service/logging_test.dart
@@ -37,7 +37,7 @@
     expect(event.logRecord['sequenceNumber'], equals(0));
     expect(event.logRecord['message'].valueAsString, equals('Hey Buddy!'));
     expect(event.logRecord['level'], equals(Level.FINE));
-    expect(event.logRecord['time'], new isInstanceOf<DateTime>());
+    expect(event.logRecord['time'], isA<DateTime>());
   }),
   hasStoppedAtBreakpoint,
   resumeIsolateAndAwaitEvent(Isolate.kLoggingStream, (ServiceEvent event) {
@@ -45,7 +45,7 @@
     expect(event.logRecord['sequenceNumber'], equals(1));
     expect(event.logRecord['level'], equals(Level.INFO));
     expect(event.logRecord['message'].valueAsString, equals('YES'));
-    expect(event.logRecord['time'], new isInstanceOf<DateTime>());
+    expect(event.logRecord['time'], isA<DateTime>());
   }),
 ];
 
diff --git a/runtime/observatory/tests/service/network_profiling_test.dart b/runtime/observatory/tests/service/network_profiling_test.dart
index 4da5995..352d1b2 100644
--- a/runtime/observatory/tests/service/network_profiling_test.dart
+++ b/runtime/observatory/tests/service/network_profiling_test.dart
@@ -59,7 +59,7 @@
 Future<void> checkFinishEvent(ServiceEvent event) {
   expect(event.kind, equals(ServiceEvent.kExtension));
   expect(event.extensionKind, equals('socketTest'));
-  expect(event.extensionData, isInstanceOf<Map>());
+  expect(event.extensionData, isA<Map>());
   expect(event.extensionData['socket'], equals('test'));
 }
 
diff --git a/runtime/observatory/tests/service/step_through_mixin_from_sdk_test.dart b/runtime/observatory/tests/service/step_through_mixin_from_sdk_test.dart
index 0b804ee..fc075a0 100644
--- a/runtime/observatory/tests/service/step_through_mixin_from_sdk_test.dart
+++ b/runtime/observatory/tests/service/step_through_mixin_from_sdk_test.dart
@@ -35,19 +35,19 @@
 List<String> expected = [
   "$file:${LINE + 0}:17", // on "Foo" (in "new Foo()")
   "$file:${LINE + 1}:11", // on "="
-  "list.dart:105:25", // on parameter to "contains"
-  "list.dart:106:23", // on "length" in "this.length"
-  "list.dart:107:16", // on "=" in "i = 0"
-  "list.dart:107:23", // on "<" in "i < length"
-  "list.dart:108:15", // on "[" in "this[i]"
+  "list.dart:124:25", // on parameter to "contains"
+  "list.dart:125:23", // on "length" in "this.length"
+  "list.dart:126:16", // on "=" in "i = 0"
+  "list.dart:126:23", // on "<" in "i < length"
+  "list.dart:127:15", // on "[" in "this[i]"
   "$file:${LINE + 13}:23", // on parameter in "operator []"
   "$file:${LINE + 14}:5", // on "return"
-  "list.dart:108:19", // on "=="
-  "list.dart:109:26", // on "length" in "this.length"
-  "list.dart:109:18", // on "!="
-  "list.dart:107:34", // on "++" in "i++"
-  "list.dart:107:23", // on "<" in "i < length"
-  "list.dart:113:5", // on "return"
+  "list.dart:127:19", // on "=="
+  "list.dart:128:26", // on "length" in "this.length"
+  "list.dart:128:18", // on "!="
+  "list.dart:126:34", // on "++" in "i++"
+  "list.dart:126:23", // on "<" in "i < length"
+  "list.dart:132:5", // on "return"
   "$file:${LINE + 4}:5", // on "print"
   "$file:${LINE + 6}:1" // on ending '}'
 ];
diff --git a/runtime/observatory/tests/service/vm_test.dart b/runtime/observatory/tests/service/vm_test.dart
index 862e54f..f4417c4 100644
--- a/runtime/observatory/tests/service/vm_test.dart
+++ b/runtime/observatory/tests/service/vm_test.dart
@@ -12,10 +12,13 @@
     expect(vm.targetCPU, isNotNull);
     expect(vm.architectureBits == 32 || vm.architectureBits == 64, isTrue);
     expect(vm.embedder, equals("Dart VM"));
+    expect(vm.currentMemory, isNotNull);
+    expect(vm.currentMemory, greaterThan(0));
     expect(vm.currentRSS, isNotNull);
     expect(vm.currentRSS, greaterThan(0));
     expect(vm.maxRSS, isNotNull);
     expect(vm.maxRSS, greaterThan(0));
+    expect(vm.maxRSS, greaterThanOrEqualTo(vm.currentRSS));
   },
 ];
 
diff --git a/runtime/observatory/tests/service/vm_timeline_flags_test.dart b/runtime/observatory/tests/service/vm_timeline_flags_test.dart
index 72608f6..9553054 100644
--- a/runtime/observatory/tests/service/vm_timeline_flags_test.dart
+++ b/runtime/observatory/tests/service/vm_timeline_flags_test.dart
@@ -43,7 +43,7 @@
     // Get the timeline.
     Map result = await isolate.vm.invokeRpcNoUpgrade('getVMTimeline', {});
     expect(result['type'], equals('Timeline'));
-    expect(result['traceEvents'], new isInstanceOf<List>());
+    expect(result['traceEvents'], isA<List>());
     // Confirm that it as no non-meta data events.
     expect(filterEvents(result['traceEvents'], isNotMetaData).length, 0);
   },
@@ -77,7 +77,7 @@
     // Get the timeline.
     Map result = await isolate.vm.invokeRpcNoUpgrade('getVMTimeline', {});
     expect(result['type'], equals('Timeline'));
-    expect(result['traceEvents'], new isInstanceOf<List>());
+    expect(result['traceEvents'], isA<List>());
     print(result['traceEvents']);
     // Confirm that Dart events are added.
     expect(filterEvents(result['traceEvents'], isDart).length, greaterThan(0));
@@ -101,7 +101,7 @@
     // Grab the timeline and remember the number of Dart events.
     Map result = await isolate.vm.invokeRpcNoUpgrade('getVMTimeline', {});
     expect(result['type'], equals('Timeline'));
-    expect(result['traceEvents'], new isInstanceOf<List>());
+    expect(result['traceEvents'], isA<List>());
     dartEventCount = filterEvents(result['traceEvents'], isDart).length;
 
     await completer.future;
@@ -119,7 +119,7 @@
     // Grab the timeline and verify that we haven't added any new Dart events.
     Map result = await isolate.vm.invokeRpcNoUpgrade('getVMTimeline', {});
     expect(result['type'], equals('Timeline'));
-    expect(result['traceEvents'], new isInstanceOf<List>());
+    expect(result['traceEvents'], isA<List>());
     expect(filterEvents(result['traceEvents'], isDart).length, dartEventCount);
     // Confirm that zero non-Dart events are added.
     expect(filterEvents(result['traceEvents'], isNotDartAndMetaData).length,
diff --git a/runtime/observatory/web/main.dart b/runtime/observatory/web/main.dart
index dec58d7..b09362d 100644
--- a/runtime/observatory/web/main.dart
+++ b/runtime/observatory/web/main.dart
@@ -7,7 +7,6 @@
 import 'package:observatory/elements.dart';
 import 'package:stack_trace/stack_trace.dart';
 
-
 main() async {
   Chain.capture(() async {
     Logger.root.level = Level.INFO;
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 0ec560e..91d062b 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -15,6 +15,14 @@
 #define FALL_THROUGH ((void)0)
 #endif
 
+#if defined(GOOGLE3)
+// google3 builds use NDEBUG to indicate non-debug builds which is different
+// from the way the Dart project expects it: DEBUG indicating a debug build.
+#if !defined(NDEBUG) && !defined(DEBUG)
+#define DEBUG
+#endif  // !NDEBUG && !DEBUG
+#endif  // GOOGLE3
+
 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to
 // enable platform independent printf format specifiers.
 #ifndef __STDC_FORMAT_MACROS
@@ -471,8 +479,10 @@
 typedef intptr_t word;
 typedef uintptr_t uword;
 
-// Size of a class id.
-typedef uint16_t classid_t;
+// Size of a class id assigned to concrete, abstract and top-level classes.
+//
+// We use a signed integer type here to make it comparable with intptr_t.
+typedef int32_t classid_t;
 
 // Byte sizes.
 const int kWordSize = sizeof(word);
diff --git a/runtime/platform/text_buffer.cc b/runtime/platform/text_buffer.cc
index ed2c640..5d08892 100644
--- a/runtime/platform/text_buffer.cc
+++ b/runtime/platform/text_buffer.cc
@@ -11,73 +11,52 @@
 
 namespace dart {
 
-TextBuffer::TextBuffer(intptr_t buf_size) {
-  ASSERT(buf_size > 0);
-  buf_ = reinterpret_cast<char*>(malloc(buf_size));
-  if (buf_ == NULL) {
-    OUT_OF_MEMORY();
-  }
-  buf_size_ = buf_size;
-  Clear();
-}
-
-TextBuffer::~TextBuffer() {
-  free(buf_);
-  buf_ = NULL;
-}
-
-void TextBuffer::Clear() {
-  msg_len_ = 0;
-  buf_[0] = '\0';
-}
-
-char* TextBuffer::Steal() {
-  char* r = buf_;
-  buf_ = NULL;
-  buf_size_ = 0;
-  msg_len_ = 0;
-  return r;
-}
-
-void TextBuffer::AddChar(char ch) {
-  EnsureCapacity(sizeof(ch));
-  buf_[msg_len_] = ch;
-  msg_len_++;
-  buf_[msg_len_] = '\0';
-}
-
-void TextBuffer::AddRaw(const uint8_t* buffer, intptr_t buffer_length) {
-  EnsureCapacity(buffer_length);
-  memmove(&buf_[msg_len_], buffer, buffer_length);
-  msg_len_ += buffer_length;
-  buf_[msg_len_] = '\0';
-}
-
-intptr_t TextBuffer::Printf(const char* format, ...) {
+intptr_t BaseTextBuffer::Printf(const char* format, ...) {
   va_list args;
   va_start(args, format);
-  intptr_t remaining = buf_size_ - msg_len_;
+  intptr_t remaining = capacity_ - length_;
   ASSERT(remaining >= 0);
-  intptr_t len = Utils::VSNPrint(buf_ + msg_len_, remaining, format, args);
+  intptr_t len = Utils::VSNPrint(buffer_ + length_, remaining, format, args);
   va_end(args);
   if (len >= remaining) {
-    EnsureCapacity(len);
-    remaining = buf_size_ - msg_len_;
+    if (!EnsureCapacity(len)) {
+      length_ = capacity_ - 1;
+      buffer_[length_] = '\0';
+      return remaining - 1;
+    }
+    remaining = capacity_ - length_;
     ASSERT(remaining > len);
     va_list args2;
     va_start(args2, format);
-    intptr_t len2 = Utils::VSNPrint(buf_ + msg_len_, remaining, format, args2);
+    intptr_t len2 =
+        Utils::VSNPrint(buffer_ + length_, remaining, format, args2);
     va_end(args2);
     ASSERT(len == len2);
   }
-  msg_len_ += len;
-  buf_[msg_len_] = '\0';
+  length_ += len;
+  buffer_[length_] = '\0';
   return len;
 }
 
+void BaseTextBuffer::AddChar(char ch) {
+  if (!EnsureCapacity(sizeof(ch))) return;
+  buffer_[length_] = ch;
+  length_++;
+  buffer_[length_] = '\0';
+}
+
+void BaseTextBuffer::AddRaw(const uint8_t* buffer, intptr_t buffer_length) {
+  if (!EnsureCapacity(buffer_length)) {
+    buffer_length = capacity_ - length_ - 1;  // Copy what fits.
+  }
+  memmove(&buffer_[length_], buffer, buffer_length);
+  length_ += buffer_length;
+  buffer_[length_] = '\0';
+}
+
 // Write a UTF-32 code unit so it can be read by a JSON parser in a string
 // literal. Use official encoding from JSON specification. http://json.org/
-void TextBuffer::EscapeAndAddCodeUnit(uint32_t codeunit) {
+void BaseTextBuffer::EscapeAndAddCodeUnit(uint32_t codeunit) {
   switch (codeunit) {
     case '"':
       AddRaw(reinterpret_cast<uint8_t const*>("\\\""), 2);
@@ -117,49 +96,56 @@
 
 // Write an incomplete UTF-16 code unit so it can be read by a JSON parser in a
 // string literal.
-void TextBuffer::EscapeAndAddUTF16CodeUnit(uint16_t codeunit) {
+void BaseTextBuffer::EscapeAndAddUTF16CodeUnit(uint16_t codeunit) {
   Printf("\\u%04X", codeunit);
 }
 
-void TextBuffer::AddString(const char* s) {
+void BaseTextBuffer::AddString(const char* s) {
   Printf("%s", s);
 }
 
-void TextBuffer::AddEscapedString(const char* s) {
+void BaseTextBuffer::AddEscapedString(const char* s) {
   intptr_t len = strlen(s);
   for (int i = 0; i < len; i++) {
     EscapeAndAddCodeUnit(s[i]);
   }
 }
 
-void TextBuffer::EnsureCapacity(intptr_t len) {
-  intptr_t remaining = buf_size_ - msg_len_;
+TextBuffer::TextBuffer(intptr_t buf_size) {
+  ASSERT(buf_size > 0);
+  buffer_ = reinterpret_cast<char*>(malloc(buf_size));
+  if (buffer_ == nullptr) {
+    OUT_OF_MEMORY();
+  }
+  capacity_ = buf_size;
+  Clear();
+}
+
+TextBuffer::~TextBuffer() {
+  free(buffer_);
+  buffer_ = nullptr;
+}
+
+char* TextBuffer::Steal() {
+  char* r = buffer_;
+  buffer_ = nullptr;
+  capacity_ = 0;
+  length_ = 0;
+  return r;
+}
+
+bool TextBuffer::EnsureCapacity(intptr_t len) {
+  intptr_t remaining = capacity_ - length_;
   if (remaining <= len) {
-    intptr_t new_size = buf_size_ + Utils::Maximum(buf_size_, len + 1);
-    char* new_buf = reinterpret_cast<char*>(realloc(buf_, new_size));
-    if (new_buf == NULL) {
+    intptr_t new_size = capacity_ + Utils::Maximum(capacity_, len + 1);
+    char* new_buf = reinterpret_cast<char*>(realloc(buffer_, new_size));
+    if (new_buf == nullptr) {
       OUT_OF_MEMORY();
     }
-    buf_ = new_buf;
-    buf_size_ = new_size;
+    buffer_ = new_buf;
+    capacity_ = new_size;
   }
-}
-
-void BufferFormatter::Print(const char* format, ...) {
-  va_list args;
-  va_start(args, format);
-  VPrint(format, args);
-  va_end(args);
-}
-
-void BufferFormatter::VPrint(const char* format, va_list args) {
-  intptr_t available = size_ - position_;
-  if (available <= 0) return;
-  intptr_t written =
-      Utils::VSNPrint(buffer_ + position_, available, format, args);
-  if (written >= 0) {
-    position_ += (available <= written) ? available : written;
-  }
+  return true;
 }
 
 }  // namespace dart
diff --git a/runtime/platform/text_buffer.h b/runtime/platform/text_buffer.h
index 23deeed..c44d955 100644
--- a/runtime/platform/text_buffer.h
+++ b/runtime/platform/text_buffer.h
@@ -10,12 +10,14 @@
 
 namespace dart {
 
-// TextBuffer maintains a dynamic character buffer with a printf-style way to
-// append text.
-class TextBuffer : ValueObject {
+// BaseTextBuffer maintains a dynamic character buffer with a printf-style way
+// to append text. Internal buffer management is handled by subclasses.
+class BaseTextBuffer : public ValueObject {
  public:
-  explicit TextBuffer(intptr_t buf_size);
-  ~TextBuffer();
+  BaseTextBuffer() : buffer_(nullptr), capacity_(0), length_(0) {}
+  BaseTextBuffer(char* buffer, intptr_t capacity)
+      : buffer_(buffer), capacity_(capacity), length_(0) {}
+  virtual ~BaseTextBuffer() {}
 
   intptr_t Printf(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
   void AddChar(char ch);
@@ -25,39 +27,67 @@
   void AddEscapedString(const char* s);
   void AddRaw(const uint8_t* buffer, intptr_t buffer_length);
 
-  void Clear();
+  // Returns a pointer to the current internal buffer. Whether the pointer is
+  // still valid after the BaseTextBuffer dies depends on the subclass.
+  char* buffer() const { return buffer_; }
+  intptr_t length() const { return length_; }
 
-  char* buf() { return buf_; }
-  intptr_t length() { return msg_len_; }
+  // Clears the stored contents. Unless specified otherwise by the subclass,
+  // should be assumed to invalidate the contents of previous calls to buffer().
+  virtual void Clear() = 0;
+
+ protected:
+  virtual bool EnsureCapacity(intptr_t len) = 0;
+
+  char* buffer_;
+  intptr_t capacity_;
+  intptr_t length_;
+
+  DISALLOW_COPY_AND_ASSIGN(BaseTextBuffer);
+};
+
+// TextBuffer uses manual memory management for the character buffer. Unless
+// Steal() is used, the internal buffer is deallocated when the object dies.
+class TextBuffer : public BaseTextBuffer {
+ public:
+  explicit TextBuffer(intptr_t buf_size);
+  ~TextBuffer();
+
+  // Resets the contents of the internal buffer.
+  void Clear() { set_length(0); }
+
   void set_length(intptr_t len) {
     ASSERT(len >= 0);
-    ASSERT(len <= msg_len_);
-    msg_len_ = len;
+    ASSERT(len <= length_);
+    length_ = len;
+    buffer_[len] = '\0';
   }
 
-  // Steal ownership of the buffer pointer.
+  // Take ownership of the buffer contents. Future uses of the TextBuffer object
+  // will not affect the contents of the returned buffer.
   // NOTE: TextBuffer is empty afterwards.
   char* Steal();
 
  private:
-  void EnsureCapacity(intptr_t len);
-  char* buf_;
-  intptr_t buf_size_;
-  intptr_t msg_len_;
+  bool EnsureCapacity(intptr_t len);
+
+  DISALLOW_COPY_AND_ASSIGN(TextBuffer);
 };
 
-class BufferFormatter : public ValueObject {
+class BufferFormatter : public BaseTextBuffer {
  public:
-  BufferFormatter(char* buffer, intptr_t size)
-      : position_(0), buffer_(buffer), size_(size) {}
+  BufferFormatter(char* buffer, intptr_t size) : BaseTextBuffer(buffer, size) {
+    buffer_[length_] = '\0';
+  }
 
-  void VPrint(const char* format, va_list args);
-  void Print(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
+  void Clear() {
+    length_ = 0;
+    buffer_[length_] = '\0';
+  }
 
  private:
-  intptr_t position_;
-  char* buffer_;
-  const intptr_t size_;
+  // We can't extend, so only return true if there's room.
+  bool EnsureCapacity(intptr_t len) { return length_ + len <= capacity_ - 1; }
 
   DISALLOW_COPY_AND_ASSIGN(BufferFormatter);
 };
diff --git a/runtime/tests/vm/dart/appjit_spawnuri_test.dart b/runtime/tests/vm/dart/appjit_spawnuri_test.dart
deleted file mode 100644
index 88ea2fc..0000000
--- a/runtime/tests/vm/dart/appjit_spawnuri_test.dart
+++ /dev/null
@@ -1,23 +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.
-
-// Verify that using spawnUri to spawn an isolate from app-jit snapshot works.
-
-import 'dart:io';
-import 'dart:isolate';
-
-import 'snapshot_test_helper.dart';
-
-Future<void> main() =>
-    runAppJitTest(Platform.script.resolve('appjit_spawnuri_test_body.dart'),
-        runSnapshot: (snapshotPath) async {
-      final exitPort = ReceivePort();
-      final messagePort = ReceivePort();
-      await Isolate.spawnUri(Uri.file(snapshotPath), [], messagePort.sendPort,
-          onExit: exitPort.sendPort);
-      final result = await Future.wait([messagePort.first, exitPort.first]);
-      print('DONE (${result[0]})');
-      return Result('Isolate.spawnUri(${Uri.file(snapshotPath)})',
-          ProcessResult(0, 0, result[0], ''));
-    });
diff --git a/runtime/tests/vm/dart/appjit_spawnuri_test_body.dart b/runtime/tests/vm/dart/appjit_spawnuri_test_body.dart
deleted file mode 100644
index ce193aa..0000000
--- a/runtime/tests/vm/dart/appjit_spawnuri_test_body.dart
+++ /dev/null
@@ -1,27 +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.
-
-// Verify that using spawnUri to spawn an isolate from app-jit snapshot works.
-
-import 'dart:isolate';
-
-import 'package:expect/expect.dart';
-
-int computation(int n) =>
-    List.generate(n, (i) => i == 0 ? 1 : 0).fold(0, (a, b) => a + b);
-
-Future<void> main(List<String> args, [dynamic sendPort]) async {
-  final isTraining = args.contains('--train');
-
-  var result = 0;
-  for (var i = 0; i < 1000; i++) {
-    result += computation(i);
-  }
-  Expect.equals(999, result);
-  if (isTraining) {
-    print('OK(Trained)');
-  } else {
-    (sendPort as SendPort).send('OK(Run)');
-  }
-}
diff --git a/runtime/tests/vm/dart/b162922506_test.dart b/runtime/tests/vm/dart/b162922506_test.dart
new file mode 100644
index 0000000..bb7d8b7
--- /dev/null
+++ b/runtime/tests/vm/dart/b162922506_test.dart
@@ -0,0 +1,79 @@
+// 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 b/162922506: verify that compiler does not use signed
+// 16-bit integers to store class ids for slots.
+
+import 'dart:io';
+
+import 'package:expect/expect.dart';
+import 'package:path/path.dart' as p;
+
+void main() async {
+  Directory tmp = await Directory.systemTemp.createTemp("b162922506");
+  File testBody = File(p.join(tmp.path, 'test.dart'));
+  try {
+    generateTestBody(testBody);
+    final result = await Process.run(Platform.executable, [
+      ...Platform.executableArguments,
+      '--deterministic',
+      '--optimization-counter-threshold=10',
+      '--no-use-osr',
+      testBody.path
+    ]);
+    if (result.exitCode != 0) {
+      print('''
+Subprocess output:
+${result.stdout}
+${result.stderr}
+''');
+    }
+    Expect.equals(0, result.exitCode);
+    Expect.equals("OK", (result.stdout as String).trim());
+  } finally {
+    await tmp.delete(recursive: true);
+  }
+}
+
+void generateTestBody(File testBody) {
+  final sb = StringBuffer();
+
+  sb.write("""
+import 'package:expect/expect.dart';
+""");
+  final n = 0x8010;
+  for (var i = 0; i < n; i++) {
+    sb.write("""
+class C$i {
+  final f;
+  C$i(this.f);
+
+""");
+    if (i == (n - 1)) {
+      sb.write("""
+  test({bool rareCase: false}) {
+    final v = this.f;
+    if (rareCase) {
+      return v.f;
+    }
+    return null;
+  }
+""");
+    }
+    sb.write("""
+
+}
+""");
+  }
+  sb.write("""
+void main() {
+  final obj = C${n - 1}(C${n - 2}(C${n - 3}(null)));
+  for (var i = 0; i < 100; i++) obj.test();
+  Expect.isTrue(obj.test(rareCase: true) is C${n - 3});
+  print("OK");
+}
+  """);
+
+  testBody.writeAsStringSync(sb.toString());
+}
diff --git a/runtime/tests/vm/dart/bytecode_and_ast_mix_test_body.dart b/runtime/tests/vm/dart/bytecode_and_ast_mix_test_body.dart
index dac3c07..703a2cc 100644
--- a/runtime/tests/vm/dart/bytecode_and_ast_mix_test_body.dart
+++ b/runtime/tests/vm/dart/bytecode_and_ast_mix_test_body.dart
@@ -16,7 +16,7 @@
 
 main() {
   ClassMirror classB = reflectClass(B);
-  MethodMirror foo = classB.declarations[#foo];
+  MethodMirror foo = classB.declarations[#foo] as MethodMirror;
   final annotation = foo.metadata[0].reflectee;
   Expect.isTrue(annotation.toString().contains('_Override'));
   print('OK');
diff --git a/runtime/tests/vm/dart/causal_stacks/utils.dart b/runtime/tests/vm/dart/causal_stacks/utils.dart
index c1bd59f..0ffe25e 100644
--- a/runtime/tests/vm/dart/causal_stacks/utils.dart
+++ b/runtime/tests/vm/dart/causal_stacks/utils.dart
@@ -149,6 +149,27 @@
   return completer.future;
 }
 
+// ----
+// Scenario: Future.timeout:
+// ----
+
+Future awaitTimeout() async {
+  await (throwAsync().timeout(Duration(seconds: 1)));
+}
+
+// ----
+// Scenario: Future.wait:
+// ----
+
+Future awaitWait() async {
+  await Future.wait([
+    throwAsync(),
+    () async {
+      await Future.value();
+    }()
+  ]);
+}
+
 // Helpers:
 
 // We want lines that either start with a frame index or an async gap marker.
@@ -587,6 +608,7 @@
             r'^#7      _RawReceivePortImpl._handleMessage \(.+\)$',
           ],
       debugInfoFilename);
+
   final customErrorZoneExpected = const <String>[
     r'#0      throwSync \(.*/utils.dart:16(:3)?\)$',
     r'#1      allYield3 \(.*/utils.dart:39(:3)?\)$',
@@ -638,6 +660,90 @@
             r'#14     _RawReceivePortImpl._handleMessage ',
           ],
       debugInfoFilename);
+
+  final awaitTimeoutExpected = const <String>[
+    r'^#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^^<asynchronous suspension>$',
+    r'^#1      awaitTimeout ',
+  ];
+  await doTestAwait(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#2      doTestAwait ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+  await doTestAwaitThen(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#2      doTestAwaitThen ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#2      doTestAwaitCatchError ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+
+  final awaitWaitExpected = const <String>[
+    r'^#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^^<asynchronous suspension>$',
+    r'^#1      awaitWait ',
+  ];
+  await doTestAwait(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#2      doTestAwait ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+  await doTestAwaitThen(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#2      doTestAwaitThen ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#2      doTestAwaitCatchError ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
 }
 
 // For: --no-causal-async-stacks --no-lazy-async-stacks
@@ -957,6 +1063,44 @@
       customErrorZone, customErrorZoneExpected, debugInfoFilename);
   await doTestAwaitCatchError(
       customErrorZone, customErrorZoneExpected, debugInfoFilename);
+
+  final awaitTimeoutExpected = const <String>[
+    r'#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^#1      _RootZone.runUnary ',
+    r'^#2      _FutureListener.handleValue ',
+    r'^#3      Future._propagateToListeners.handleValueCallback ',
+    r'^#4      Future._propagateToListeners ',
+    r'^#5      Future.(_addListener|_prependListeners).<anonymous closure> ',
+    r'^#6      _microtaskLoop ',
+    r'^#7      _startMicrotaskLoop ',
+    r'^#8      _runPendingImmediateCallback ',
+    r'^#9      _RawReceivePortImpl._handleMessage ',
+  ];
+  await doTestAwait(
+      awaitTimeout, awaitTimeoutExpected + const <String>[], debugInfoFilename);
+  await doTestAwaitThen(
+      awaitTimeout, awaitTimeoutExpected + const <String>[], debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitTimeout, awaitTimeoutExpected + const <String>[], debugInfoFilename);
+
+  final awaitWaitExpected = const <String>[
+    r'#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^#1      _RootZone.runUnary ',
+    r'^#2      _FutureListener.handleValue ',
+    r'^#3      Future._propagateToListeners.handleValueCallback ',
+    r'^#4      Future._propagateToListeners ',
+    r'^#5      Future.(_addListener|_prependListeners).<anonymous closure> ',
+    r'^#6      _microtaskLoop ',
+    r'^#7      _startMicrotaskLoop ',
+    r'^#8      _runPendingImmediateCallback ',
+    r'^#9      _RawReceivePortImpl._handleMessage ',
+  ];
+  await doTestAwait(
+      awaitWait, awaitWaitExpected + const <String>[], debugInfoFilename);
+  await doTestAwaitThen(
+      awaitWait, awaitWaitExpected + const <String>[], debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitWait, awaitWaitExpected + const <String>[], debugInfoFilename);
 }
 
 // For: --lazy-async-stacks
@@ -1218,4 +1362,66 @@
       customErrorZone, customErrorZoneExpected, debugInfoFilename);
   await doTestAwaitCatchError(
       customErrorZone, customErrorZoneExpected, debugInfoFilename);
+
+  final awaitTimeoutExpected = const <String>[
+    r'^#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^<asynchronous suspension>$',
+    r'^#1      Future.timeout.<anonymous closure> \(dart:async/future_impl.dart\)$',
+    r'^<asynchronous suspension>$',
+    r'^#2      awaitTimeout ',
+    r'^<asynchronous suspension>$',
+  ];
+  await doTestAwait(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#3      doTestAwait ',
+            r'^<asynchronous suspension>$',
+            r'^#4      doTestsLazy ',
+            r'^<asynchronous suspension>$',
+            r'^#5      main ',
+            r'^<asynchronous suspension>$',
+          ],
+      debugInfoFilename);
+  await doTestAwaitThen(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#3      doTestAwaitThen.<anonymous closure> ',
+            r'^<asynchronous suspension>$',
+          ],
+      debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitTimeout, awaitTimeoutExpected + const <String>[], debugInfoFilename);
+
+  final awaitWaitExpected = const <String>[
+    r'^#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^<asynchronous suspension>$',
+    r'^#1      Future.wait.<anonymous closure> \(dart:async/future.dart\)$',
+    r'^<asynchronous suspension>$',
+    r'^#2      awaitWait ',
+    r'^<asynchronous suspension>$',
+  ];
+  await doTestAwait(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#3      doTestAwait ',
+            r'^<asynchronous suspension>$',
+            r'^#4      doTestsLazy ',
+            r'^<asynchronous suspension>$',
+            r'^#5      main ',
+            r'^<asynchronous suspension>$',
+          ],
+      debugInfoFilename);
+  await doTestAwaitThen(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#3      doTestAwaitThen.<anonymous closure> ',
+            r'^<asynchronous suspension>$',
+          ],
+      debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitWait, awaitWaitExpected + const <String>[], debugInfoFilename);
 }
diff --git a/runtime/tests/vm/dart/incompatible_loading_unit_1.dart b/runtime/tests/vm/dart/incompatible_loading_unit_1.dart
new file mode 100644
index 0000000..35b3947
--- /dev/null
+++ b/runtime/tests/vm/dart/incompatible_loading_unit_1.dart
@@ -0,0 +1,10 @@
+// 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 "incompatible_loading_unit_1_deferred.dart" deferred as lib;
+
+main() async {
+  await lib.loadLibrary();
+  lib.foo();
+}
diff --git a/runtime/tests/vm/dart/incompatible_loading_unit_1_deferred.dart b/runtime/tests/vm/dart/incompatible_loading_unit_1_deferred.dart
new file mode 100644
index 0000000..c0b9a03
--- /dev/null
+++ b/runtime/tests/vm/dart/incompatible_loading_unit_1_deferred.dart
@@ -0,0 +1,7 @@
+// 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.
+
+void foo() {
+  print("One!");
+}
diff --git a/runtime/tests/vm/dart/incompatible_loading_unit_2.dart b/runtime/tests/vm/dart/incompatible_loading_unit_2.dart
new file mode 100644
index 0000000..7a352f6c
--- /dev/null
+++ b/runtime/tests/vm/dart/incompatible_loading_unit_2.dart
@@ -0,0 +1,10 @@
+// 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 "incompatible_loading_unit_2_deferred.dart" deferred as lib;
+
+main() async {
+  await lib.loadLibrary();
+  lib.foo();
+}
diff --git a/runtime/tests/vm/dart/incompatible_loading_unit_2_deferred.dart b/runtime/tests/vm/dart/incompatible_loading_unit_2_deferred.dart
new file mode 100644
index 0000000..2dc3b7a
--- /dev/null
+++ b/runtime/tests/vm/dart/incompatible_loading_unit_2_deferred.dart
@@ -0,0 +1,7 @@
+// 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.
+
+void foo() {
+  print("Two!");
+}
diff --git a/runtime/tests/vm/dart/incompatible_loading_unit_test.dart b/runtime/tests/vm/dart/incompatible_loading_unit_test.dart
new file mode 100644
index 0000000..8231f00
--- /dev/null
+++ b/runtime/tests/vm/dart/incompatible_loading_unit_test.dart
@@ -0,0 +1,97 @@
+// 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:convert";
+import "dart:io";
+
+import "package:expect/expect.dart";
+import "package:path/path.dart" as path;
+
+import "use_flag_test_helper.dart";
+
+main(List<String> args) async {
+  if (!isAOTRuntime) {
+    return; // Running in JIT: AOT binaries not available.
+  }
+
+  if (Platform.isAndroid) {
+    return; // SDK tree not available on the test device.
+  }
+
+  // These are the tools we need to be available to run on a given platform:
+  if (!File(platformDill).existsSync()) {
+    throw "Cannot run test as $platformDill does not exist";
+  }
+  if (!await testExecutable(genSnapshot)) {
+    throw "Cannot run test as $genSnapshot not available";
+  }
+
+  await withTempDir("incompatible-loading-unit-test", (String tempDir) async {
+    final source1 = path.join(
+        sdkDir, "runtime/tests/vm/dart_2/incompatible_loading_unit_1.dart");
+    final source2 = path.join(
+        sdkDir, "runtime/tests/vm/dart_2/incompatible_loading_unit_2.dart");
+    final dill1 = path.join(tempDir, "incompatible_loading_unit_1.dart.dill");
+    final dill2 = path.join(tempDir, "incompatible_loading_unit_2.dart.dill");
+    final snapshot1 = path.join(tempDir, "incompatible_loading_unit_1.so");
+    final snapshot2 = path.join(tempDir, "incompatible_loading_unit_2.so");
+    final manifest1 = path.join(tempDir, "incompatible_loading_unit_1.txt");
+    final manifest2 = path.join(tempDir, "incompatible_loading_unit_2.txt");
+    final deferredSnapshot1 = snapshot1 + "-2.part.so";
+    final deferredSnapshot2 = snapshot2 + "-2.part.so";
+
+    // Compile source to kernel.
+    await run(genKernel, <String>[
+      "--aot",
+      "--platform=$platformDill",
+      "-o",
+      dill1,
+      source1,
+    ]);
+    await run(genKernel, <String>[
+      "--aot",
+      "--platform=$platformDill",
+      "-o",
+      dill2,
+      source2,
+    ]);
+
+    // Compile kernel to ELF.
+    await run(genSnapshot, <String>[
+      "--snapshot-kind=app-aot-elf",
+      "--use-bare-instructions=false",
+      "--elf=$snapshot1",
+      "--loading-unit-manifest=$manifest1",
+      dill1,
+    ]);
+    var manifest = jsonDecode(await new File(manifest1).readAsString());
+    Expect.equals(2, manifest["loadingUnits"].length);
+    Expect.isTrue(await new File(deferredSnapshot1).exists());
+
+    await run(genSnapshot, <String>[
+      "--snapshot-kind=app-aot-elf",
+      "--use-bare-instructions=false",
+      "--elf=$snapshot2",
+      "--loading-unit-manifest=$manifest2",
+      dill2,
+    ]);
+    manifest = jsonDecode(await new File(manifest1).readAsString());
+    Expect.equals(2, manifest["loadingUnits"].length);
+    Expect.isTrue(await new File(deferredSnapshot2).exists());
+
+    // Works when used normally.
+    var lines = await runOutput(aotRuntime, <String>[snapshot1]);
+    Expect.listEquals(["One!"], lines);
+
+    lines = await runOutput(aotRuntime, <String>[snapshot2]);
+    Expect.listEquals(["Two!"], lines);
+
+    // Fails gracefully when mixing snapshot parts.
+    await new File(deferredSnapshot2).rename(deferredSnapshot1);
+    lines = await runError(aotRuntime, <String>[snapshot1]);
+    Expect.equals(
+        "DeferredLoadException: 'Deferred loading unit is from a different program than the main loading unit'",
+        lines[1]);
+  });
+}
diff --git a/runtime/tests/vm/dart/isolates/thread_pool_test.dart b/runtime/tests/vm/dart/isolates/thread_pool_test.dart
index ff8a7e6..7a301bc0 100644
--- a/runtime/tests/vm/dart/isolates/thread_pool_test.dart
+++ b/runtime/tests/vm/dart/isolates/thread_pool_test.dart
@@ -11,7 +11,7 @@
 import 'package:expect/expect.dart';
 
 import 'test_utils.dart';
-import '../../../../../tests/ffi_2/dylib_utils.dart';
+import '../../../../../tests/ffi/dylib_utils.dart';
 
 // This should be larger than max-new-space-size/tlab-size.
 const int threadCount = 200;
diff --git a/runtime/tests/vm/dart/null_safety_autodetection_in_kernel_compiler_test.dart b/runtime/tests/vm/dart/null_safety_autodetection_in_kernel_compiler_test.dart
index 348b154..4244601 100644
--- a/runtime/tests/vm/dart/null_safety_autodetection_in_kernel_compiler_test.dart
+++ b/runtime/tests/vm/dart/null_safety_autodetection_in_kernel_compiler_test.dart
@@ -26,7 +26,9 @@
     ''');
 
     final testDillPath = path.join(temp, 'test.dill');
-    await runGenKernel('BUILD DILL FILE', [
+    await runGenKernelWithoutStandardOptions('BUILD DILL FILE', [
+      "--platform",
+      platformDill,
       '--enable-experiment=non-nullable',
       '--output=$testDillPath',
       testScriptPath,
diff --git a/runtime/tests/vm/dart/regress_42656_opt_in_lib.dart b/runtime/tests/vm/dart/regress_42656_opt_in_lib.dart
new file mode 100644
index 0000000..44effe7
--- /dev/null
+++ b/runtime/tests/vm/dart/regress_42656_opt_in_lib.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.
+
+// Opted-in library for regress_42656_test.dart.
+
+import 'regress_42656_opt_out_lib.dart' show MixinB;
+
+mixin MixinA {
+  int x = 42;
+
+  @override
+  String toString() => 'MixinA';
+}
+
+abstract class C1 with MixinA {}
+
+class C2 extends C1 {}
+
+abstract class D1 with MixinB {}
+
+class D2 extends D1 {}
diff --git a/runtime/tests/vm/dart/regress_42656_opt_out_lib.dart b/runtime/tests/vm/dart/regress_42656_opt_out_lib.dart
new file mode 100644
index 0000000..59beba9
--- /dev/null
+++ b/runtime/tests/vm/dart/regress_42656_opt_out_lib.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.
+
+// Opted-out library for regress_42656_test.dart.
+// @dart = 2.8
+
+import 'regress_42656_opt_in_lib.dart' show MixinA;
+
+class MixinB {
+  int y = 3;
+
+  @override
+  String toString() => 'MixinB';
+}
+
+abstract class E1 with MixinA {}
+
+class E2 extends E1 {}
+
+abstract class F1 with MixinB {}
+
+class F2 extends F1 {}
diff --git a/runtime/tests/vm/dart/regress_42656_test.dart b/runtime/tests/vm/dart/regress_42656_test.dart
new file mode 100644
index 0000000..d41d4ed
--- /dev/null
+++ b/runtime/tests/vm/dart/regress_42656_test.dart
@@ -0,0 +1,28 @@
+// 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.
+
+// Verifies that mixin deduplication correctly handles identical anonymous
+// mixins from opt-in and opt-out libraries.
+// Regression test for https://github.com/dart-lang/sdk/issues/42656.
+
+// Requirements=nnbd-weak
+
+import 'package:expect/expect.dart';
+import 'regress_42656_opt_in_lib.dart';
+import 'regress_42656_opt_out_lib.dart';
+
+void main() {
+  Expect.equals('MixinA', C2().toString());
+  Expect.equals('MixinB', D2().toString());
+  Expect.equals('MixinA', E2().toString());
+  Expect.equals('MixinB', F2().toString());
+  Expect.isFalse(C2() == C2());
+  Expect.isFalse(D2() == D2());
+  Expect.isFalse(E2() == E2());
+  Expect.isFalse(F2() == F2());
+  Expect.equals(42, C2().x);
+  Expect.equals(3, D2().y);
+  Expect.equals(42, E2().x);
+  Expect.equals(3, F2().y);
+}
diff --git a/runtime/tests/vm/dart/run_appended_aot_snapshot_test.dart b/runtime/tests/vm/dart/run_appended_aot_snapshot_test.dart
index 78471fb..48b1b01 100644
--- a/runtime/tests/vm/dart/run_appended_aot_snapshot_test.dart
+++ b/runtime/tests/vm/dart/run_appended_aot_snapshot_test.dart
@@ -29,8 +29,8 @@
     final extraGenKernelOptions = Platform.executableArguments
         .where((arg) =>
             arg.startsWith('--enable-experiment=') ||
-            arg == '--null-safety' ||
-            arg == '--no-null-safety')
+            arg == '--sound-null-safety' ||
+            arg == '--no-sound-null-safety')
         .toList();
 
     {
diff --git a/runtime/tests/vm/dart/scavenger_abort_test.dart b/runtime/tests/vm/dart/scavenger_abort_test.dart
new file mode 100644
index 0000000..ee3b38d
--- /dev/null
+++ b/runtime/tests/vm/dart/scavenger_abort_test.dart
@@ -0,0 +1,158 @@
+// 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:expect/expect.dart";
+
+// The sizes of these classes are co-prime multiples of the allocation unit to
+// increase the likelihood that scavenging fails from fragmentation.
+
+// header + 13 fields = 7 allocation units
+class A {
+  dynamic field1;
+  dynamic field2;
+  dynamic field3;
+  dynamic field4;
+  dynamic field5;
+  dynamic field6;
+  dynamic field7;
+  dynamic field8;
+  dynamic field9;
+  dynamic field10;
+  dynamic field11;
+  dynamic field12;
+  dynamic field13;
+}
+
+// header + 17 fields = 9 allocation units
+class B {
+  dynamic field1;
+  dynamic field2;
+  dynamic field3;
+  dynamic field4;
+  dynamic field5;
+  dynamic field6;
+  dynamic field7;
+  dynamic field8;
+  dynamic field9;
+  dynamic field10;
+  dynamic field11;
+  dynamic field12;
+  dynamic field13;
+  dynamic field14;
+  dynamic field15;
+  dynamic field16;
+  dynamic field17;
+}
+
+// header + 19 fields = 10 allocation units
+class C {
+  dynamic field1;
+  dynamic field2;
+  dynamic field3;
+  dynamic field4;
+  dynamic field5;
+  dynamic field6;
+  dynamic field7;
+  dynamic field8;
+  dynamic field9;
+  dynamic field10;
+  dynamic field11;
+  dynamic field12;
+  dynamic field13;
+  dynamic field14;
+  dynamic field15;
+  dynamic field16;
+  dynamic field17;
+  dynamic field18;
+  dynamic field19;
+}
+
+makeA(n) {
+  var a = new A();
+  if (n > 0) {
+    a.field1 = makeB(n - 1);
+    a.field2 = makeC(n - 1);
+    a.field3 = makeB(n - 1);
+    a.field4 = makeC(n - 1);
+  }
+  return a;
+}
+
+makeB(n) {
+  var b = new B();
+  if (n > 0) {
+    b.field1 = makeC(n - 1);
+    b.field2 = makeA(n - 1);
+    b.field3 = makeC(n - 1);
+    b.field4 = makeA(n - 1);
+  }
+  return b;
+}
+
+makeC(n) {
+  var c = new C();
+  if (n > 0) {
+    c.field1 = makeA(n - 1);
+    c.field2 = makeB(n - 1);
+    c.field3 = makeA(n - 1);
+    c.field4 = makeB(n - 1);
+  }
+  return c;
+}
+
+readFields(x) {
+  print(x.field1);
+  print(x.field2);
+  print(x.field3);
+  print(x.field4);
+}
+
+main(List<String> argsIn) async {
+  if (argsIn.contains("--testee")) {
+    // Trigger OOM.
+    // Must read the fields to prevent the writes from being optimized away. If
+    // the writes are optimized away, most of the tree is collectible right away
+    // and we timeout instead of triggering OOM.
+    readFields(makeA(50));
+    readFields(makeB(50));
+    readFields(makeC(50));
+    return;
+  }
+
+  var exec = Platform.executable;
+  var args = Platform.executableArguments +
+      [
+        "--old_gen_heap_size=15" /*MB*/,
+        "--verbose_gc",
+        "--verify_after_gc",
+        "--verify_store_buffer",
+        Platform.script.toFilePath(),
+        "--testee"
+      ];
+  print("+ $exec ${args.join(' ')}");
+
+  var result = await Process.run(exec, args);
+  print("Command stdout:");
+  print(result.stdout);
+  print("Command stderr:");
+  print(result.stderr);
+
+  Expect.equals(255, result.exitCode,
+      "Should see runtime exception error code, not SEGV");
+
+  Expect.isTrue(
+      result.stderr.contains("Unhandled exception:\nOut of Memory") ||
+          result.stderr.contains("Unhandled exception:\r\nOut of Memory"),
+      "Should see the Dart OutOfMemoryError");
+
+  // --verbose_gc not available in product mode
+  if (!new bool.fromEnvironment("dart.vm.product")) {
+    Expect.isTrue(result.stderr.contains("Aborting scavenge"),
+        "Should abort scavenge at least once");
+  }
+
+  Expect.isFalse(result.stderr.contains("error: Out of memory"),
+      "Should not see the C++ OUT_OF_MEMORY()");
+}
diff --git a/runtime/tests/vm/dart/sdk_hash_test.dart b/runtime/tests/vm/dart/sdk_hash_test.dart
index 855e007..8e31050 100644
--- a/runtime/tests/vm/dart/sdk_hash_test.dart
+++ b/runtime/tests/vm/dart/sdk_hash_test.dart
@@ -14,7 +14,6 @@
 
 // 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') {
@@ -53,7 +52,6 @@
       // 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));
       Expect.notEquals('0000000000', ascii.decode(bytes.sublist(8, 10)));
       // Flip the first byte in the hash:
       bytes[8] = ~bytes[8];
diff --git a/runtime/tests/vm/dart/snapshot_test_helper.dart b/runtime/tests/vm/dart/snapshot_test_helper.dart
index 974050e..00d1afe 100644
--- a/runtime/tests/vm/dart/snapshot_test_helper.dart
+++ b/runtime/tests/vm/dart/snapshot_test_helper.dart
@@ -63,12 +63,21 @@
 }
 
 Future<Result> runGenKernel(String prefix, List<String> arguments) {
-  final augmentedArguments = <String>[]
-    ..add(genKernel)
-    ..add("--platform")
-    ..add(platformDill)
-    ..addAll(arguments);
-  return runBinary(prefix, checkedInDartVM, augmentedArguments);
+  final augmentedArguments = <String>[
+    "--platform",
+    platformDill,
+    ...Platform.executableArguments.where((arg) =>
+        arg.startsWith('--enable-experiment=') ||
+        arg == '--sound-null-safety' ||
+        arg == '--no-sound-null-safety'),
+    ...arguments,
+  ];
+  return runGenKernelWithoutStandardOptions(prefix, augmentedArguments);
+}
+
+Future<Result> runGenKernelWithoutStandardOptions(
+    String prefix, List<String> arguments) {
+  return runBinary(prefix, checkedInDartVM, [genKernel, ...arguments]);
 }
 
 Future<Result> runGenSnapshot(String prefix, List<String> arguments) {
diff --git a/runtime/tests/vm/dart/spawnuri_snapshot_test.dart b/runtime/tests/vm/dart/spawnuri_snapshot_test.dart
new file mode 100644
index 0000000..f0ed02f
--- /dev/null
+++ b/runtime/tests/vm/dart/spawnuri_snapshot_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.
+
+// Check spawnUri accepts any program format that `dart` accepts. Currently this
+// is source, kernel, AppJIT (blob container) and AppAOT (ELF).
+
+import "dart:isolate";
+import "dart:io";
+
+import "package:expect/expect.dart";
+
+int fib(int n) {
+  if (n <= 1) return 1;
+  return fib(n - 1) + fib(n - 2);
+}
+
+main(List<String> args, [dynamic sendPort]) {
+  if (sendPort == null) {
+    print("Parent start");
+    var port = new RawReceivePort();
+    port.handler = (result) {
+      Expect.equals(14930352, result);
+      port.close();
+      print("Parent end");
+    };
+    print("Spawn ${Platform.script}");
+    Isolate.spawnUri(Platform.script, <String>[], port.sendPort);
+  } else {
+    print("Child start");
+    sendPort.send(fib(35));
+    print("Child end");
+  }
+}
diff --git a/runtime/tests/vm/dart/splay_test.dart b/runtime/tests/vm/dart/splay_test.dart
index f0498a9..47b4ccc 100644
--- a/runtime/tests/vm/dart/splay_test.dart
+++ b/runtime/tests/vm/dart/splay_test.dart
@@ -28,6 +28,7 @@
 // VMOptions=--verify_before_gc --verify_after_gc
 // VMOptions=--verify_store_buffer
 // VMOptions=--stress_write_barrier_elimination
+// VMOptions=--old_gen_heap_size=100
 
 import "dart:math";
 import 'package:benchmark_harness/benchmark_harness.dart';
diff --git a/runtime/tests/vm/dart/split_aot_kernel_generation_test.dart b/runtime/tests/vm/dart/split_aot_kernel_generation_test.dart
index 19865cd..1f8d33b 100644
--- a/runtime/tests/vm/dart/split_aot_kernel_generation_test.dart
+++ b/runtime/tests/vm/dart/split_aot_kernel_generation_test.dart
@@ -17,15 +17,7 @@
     final outputDillPath = path.join(temp, 'output.dill');
     final snapshotPath = path.join(temp, 'aot.snapshot');
 
-    final extraGenKernelOptions = Platform.executableArguments
-        .where((arg) =>
-            arg.startsWith('--enable-experiment=') ||
-            arg == '--null-safety' ||
-            arg == '--no-null-safety')
-        .toList();
-
     await runGenKernel('BUILD INTERMEDIATE DILL FILE', [
-      ...extraGenKernelOptions,
       '--no-aot',
       '--link-platform',
       '--output=$intermediateDillPath',
@@ -33,7 +25,6 @@
     ]);
 
     await runGenKernel('BUILD FINAL DILL FILE', [
-      ...extraGenKernelOptions,
       '--aot',
       '--from-dill=$intermediateDillPath',
       '--link-platform',
diff --git a/runtime/tests/vm/dart/type_casts_with_null_safety_autodetection_test.dart b/runtime/tests/vm/dart/type_casts_with_null_safety_autodetection_test.dart
index 701f409..4b38663 100644
--- a/runtime/tests/vm/dart/type_casts_with_null_safety_autodetection_test.dart
+++ b/runtime/tests/vm/dart/type_casts_with_null_safety_autodetection_test.dart
@@ -20,7 +20,7 @@
   File.fromUri(Platform.script.resolve(script)).copySync(scriptInTemp);
 
   // Do not add Platform.executableArguments into arguments to avoid passing
-  // --null-safety / --no-null-safety arguments.
+  // --sound-null-safety / --no-sound-null-safety arguments.
   final result = await runBinary("RUN $script", Platform.executable, [
     '--enable-experiment=non-nullable',
     '--deterministic',
diff --git a/runtime/tests/vm/dart/typed_data_vfp_regress_42745_test.dart b/runtime/tests/vm/dart/typed_data_vfp_regress_42745_test.dart
new file mode 100644
index 0000000..294f0ea
--- /dev/null
+++ b/runtime/tests/vm/dart/typed_data_vfp_regress_42745_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.
+// VMOptions=--no-use-vfp
+
+import 'dart:typed_data';
+
+import 'package:expect/expect.dart';
+
+final Float32List l = int.parse('1') == 1
+    ? Float32List(2)
+    : Float32List.view(Uint32List(2).buffer);
+
+main() {
+  l[int.parse('1') == 1 ? 0 : 1] = 1.2;
+  Expect.approxEquals(l[0], 1.2);
+}
diff --git a/runtime/tests/vm/dart/unboxed_implicit_accessors_test.dart b/runtime/tests/vm/dart/unboxed_implicit_accessors_test.dart
new file mode 100644
index 0000000..467c0ea
--- /dev/null
+++ b/runtime/tests/vm/dart/unboxed_implicit_accessors_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.
+
+final l = <I>[A(), B(42, 4.2)];
+final l2 = <I2>[A2(), B2(42, 4.2)];
+
+main() {
+  if (l[0].intValue != 23) throw 'a';
+  if (l[0].doubleValue != 2.3) throw 'b';
+  if (l[1].intValue != 42) throw 'c';
+  if (l[1].doubleValue != 4.2) throw 'd';
+
+  if (l2[0].intValue != null) throw 'a';
+  if (l2[0].doubleValue != null) throw 'b';
+  if (l2[1].intValue != 42) throw 'c';
+  if (l2[1].doubleValue != 4.2) throw 'd';
+
+  if (int.parse('1') == 1) {
+    l2[0].intValue = 24;
+    l2[0].doubleValue = 2.4;
+    l2[1].intValue = 24;
+    l2[1].doubleValue = 2.4;
+  } else {
+    (l2[0] as A2).intValue = null;
+    (l2[0] as A2).doubleValue = null;
+  }
+}
+
+abstract class I {
+  int? get intValue;
+  double? get doubleValue;
+}
+
+class A implements I {
+  int get intValue => 23;
+  double get doubleValue => 2.3;
+}
+
+class B implements I {
+  // Field as well as getter/setter will be unboxed.
+  final int? intValue;
+  // Field as well as getter/setter will be unboxed.
+  final double? doubleValue;
+  B(this.intValue, this.doubleValue);
+}
+
+abstract class I2 {
+  void set intValue(int? v) {}
+  void set doubleValue(double? v) {}
+
+  int? get intValue;
+  double? get doubleValue;
+}
+
+class A2 implements I2 {
+  void set intValue(int? v) {}
+  void set doubleValue(double? v) {}
+
+  int? get intValue => null;
+  double? get doubleValue => null;
+}
+
+class B2 implements I2 {
+  // Field itself will get unboxed, but getter/setter will be boxed.
+  int? intValue;
+  // Field itself will get unboxed, but getter/setter will be boxed.
+  double? doubleValue;
+
+  B2(this.intValue, this.doubleValue);
+}
diff --git a/runtime/tests/vm/dart/unboxed_many_fields_test.dart b/runtime/tests/vm/dart/unboxed_many_fields_test.dart
index 84b4f1d..79fd30f 100644
--- a/runtime/tests/vm/dart/unboxed_many_fields_test.dart
+++ b/runtime/tests/vm/dart/unboxed_many_fields_test.dart
@@ -6,17 +6,12 @@
 
 import 'package:expect/expect.dart';
 
+import 'unboxed_parameter_helper.dart';
+
 // The VM class finalizer ensures that we only unbox fields which can be
 // represented in the unboxed field bitmap in the target architecture (even when
 // cross-compiling from 64-bit to 32-bit), see `Class::CalculateFieldOffsets()`.
 
-// Make an integer that would look like an object pointer (irrespective of
-// we compile to 32-bit or 64-bit and whether we use little or big endian
-// encoding of the integer).
-int get integerFieldValue =>
-    int.parse('1') == 1 ? constIntegerFieldValue : 0x8000900180009001;
-const int constIntegerFieldValue = 0x8000000180000001;
-
 int i = 0;
 final Object objectFieldValue = Foo('i${i++}');
 
diff --git a/runtime/tests/vm/dart/unboxed_parameter_helper.dart b/runtime/tests/vm/dart/unboxed_parameter_helper.dart
index b0ee815..91ad154 100644
--- a/runtime/tests/vm/dart/unboxed_parameter_helper.dart
+++ b/runtime/tests/vm/dart/unboxed_parameter_helper.dart
@@ -11,3 +11,10 @@
   final double v = bd.getFloat64(0, Endian.host);
   return v;
 }
+
+// Make an integer that would look like an object pointer (irrespective of
+// we compile to 32-bit or 64-bit and whether we use little or big endian
+// encoding of the integer).
+int get integerFieldValue =>
+    int.parse('1') == 1 ? constIntegerFieldValue : 0x8000900180009001;
+const int constIntegerFieldValue = 0x8000000180000001;
diff --git a/runtime/tests/vm/dart/unboxed_retval_test.dart b/runtime/tests/vm/dart/unboxed_retval_test.dart
new file mode 100644
index 0000000..6132480
--- /dev/null
+++ b/runtime/tests/vm/dart/unboxed_retval_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:expect/expect.dart';
+
+import 'unboxed_parameter_helper.dart';
+
+abstract class I {
+  int get value;
+  int getValue();
+}
+
+class Foo implements I {
+  int value;
+  Foo(this.value);
+  int getValue() => value;
+}
+
+class Bar implements I {
+  int get value => integerFieldValue;
+  int getValue() => value;
+}
+
+final objects = <dynamic>[Foo(integerFieldValue), Bar()];
+final tearoffs = <dynamic>[Foo(integerFieldValue).getValue, Bar().getValue];
+
+main() {
+  // Dynamic accesses to getter, method and tear-off
+  Expect.equals(objects[0].value, integerFieldValue);
+  Expect.equals(objects[0].getValue(), integerFieldValue);
+  Expect.equals(objects[1].value, integerFieldValue);
+  Expect.equals(objects[1].getValue(), integerFieldValue);
+  Expect.equals(tearoffs[0](), integerFieldValue);
+  Expect.equals(tearoffs[1](), integerFieldValue);
+
+  // Interface-based accesses to getter, method and tear-off
+  final Foo foo = objects[0] as Foo;
+  final int Function() fooGetValue = foo.getValue;
+  Expect.equals(foo.value, integerFieldValue);
+  Expect.equals(foo.getValue(), integerFieldValue);
+  Expect.equals(fooGetValue(), integerFieldValue);
+
+  final Bar bar = objects[1] as Bar;
+  final int Function() barGetValue = bar.getValue;
+  Expect.equals(bar.value, integerFieldValue);
+  Expect.equals(bar.getValue(), integerFieldValue);
+  Expect.equals(barGetValue(), integerFieldValue);
+}
diff --git a/runtime/tests/vm/dart/use_flag_test_helper.dart b/runtime/tests/vm/dart/use_flag_test_helper.dart
index e9f9737..d6854ac 100644
--- a/runtime/tests/vm/dart/use_flag_test_helper.dart
+++ b/runtime/tests/vm/dart/use_flag_test_helper.dart
@@ -146,7 +146,7 @@
   }
 }
 
-Future<Iterable<String>> runOutput(String executable, List<String> args) async {
+Future<List<String>> runOutput(String executable, List<String> args) async {
   final result = await runHelper(executable, args);
 
   if (result.exitCode != 0) {
@@ -160,7 +160,7 @@
       .toList();
 }
 
-Future<Iterable<String>> runError(String executable, List<String> args) async {
+Future<List<String>> runError(String executable, List<String> args) async {
   final result = await runHelper(executable, args);
 
   if (result.exitCode == 0) {
diff --git a/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart b/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart
index 7ef3be5..11abcb0 100644
--- a/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart
+++ b/runtime/tests/vm/dart/v8_snapshot_profile_writer_test.dart
@@ -245,8 +245,8 @@
       platformDill,
       ...Platform.executableArguments.where((arg) =>
           arg.startsWith('--enable-experiment=') ||
-          arg == '--null-safety' ||
-          arg == '--no-null-safety'),
+          arg == '--sound-null-safety' ||
+          arg == '--no-sound-null-safety'),
       '-o',
       dillPath,
       _thisTestPath
diff --git a/runtime/tests/vm/dart_2/appjit_spawnuri_test.dart b/runtime/tests/vm/dart_2/appjit_spawnuri_test.dart
deleted file mode 100644
index 88ea2fc..0000000
--- a/runtime/tests/vm/dart_2/appjit_spawnuri_test.dart
+++ /dev/null
@@ -1,23 +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.
-
-// Verify that using spawnUri to spawn an isolate from app-jit snapshot works.
-
-import 'dart:io';
-import 'dart:isolate';
-
-import 'snapshot_test_helper.dart';
-
-Future<void> main() =>
-    runAppJitTest(Platform.script.resolve('appjit_spawnuri_test_body.dart'),
-        runSnapshot: (snapshotPath) async {
-      final exitPort = ReceivePort();
-      final messagePort = ReceivePort();
-      await Isolate.spawnUri(Uri.file(snapshotPath), [], messagePort.sendPort,
-          onExit: exitPort.sendPort);
-      final result = await Future.wait([messagePort.first, exitPort.first]);
-      print('DONE (${result[0]})');
-      return Result('Isolate.spawnUri(${Uri.file(snapshotPath)})',
-          ProcessResult(0, 0, result[0], ''));
-    });
diff --git a/runtime/tests/vm/dart_2/appjit_spawnuri_test_body.dart b/runtime/tests/vm/dart_2/appjit_spawnuri_test_body.dart
deleted file mode 100644
index ce193aa..0000000
--- a/runtime/tests/vm/dart_2/appjit_spawnuri_test_body.dart
+++ /dev/null
@@ -1,27 +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.
-
-// Verify that using spawnUri to spawn an isolate from app-jit snapshot works.
-
-import 'dart:isolate';
-
-import 'package:expect/expect.dart';
-
-int computation(int n) =>
-    List.generate(n, (i) => i == 0 ? 1 : 0).fold(0, (a, b) => a + b);
-
-Future<void> main(List<String> args, [dynamic sendPort]) async {
-  final isTraining = args.contains('--train');
-
-  var result = 0;
-  for (var i = 0; i < 1000; i++) {
-    result += computation(i);
-  }
-  Expect.equals(999, result);
-  if (isTraining) {
-    print('OK(Trained)');
-  } else {
-    (sendPort as SendPort).send('OK(Run)');
-  }
-}
diff --git a/runtime/tests/vm/dart_2/b162922506_test.dart b/runtime/tests/vm/dart_2/b162922506_test.dart
new file mode 100644
index 0000000..bb7d8b7
--- /dev/null
+++ b/runtime/tests/vm/dart_2/b162922506_test.dart
@@ -0,0 +1,79 @@
+// 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 b/162922506: verify that compiler does not use signed
+// 16-bit integers to store class ids for slots.
+
+import 'dart:io';
+
+import 'package:expect/expect.dart';
+import 'package:path/path.dart' as p;
+
+void main() async {
+  Directory tmp = await Directory.systemTemp.createTemp("b162922506");
+  File testBody = File(p.join(tmp.path, 'test.dart'));
+  try {
+    generateTestBody(testBody);
+    final result = await Process.run(Platform.executable, [
+      ...Platform.executableArguments,
+      '--deterministic',
+      '--optimization-counter-threshold=10',
+      '--no-use-osr',
+      testBody.path
+    ]);
+    if (result.exitCode != 0) {
+      print('''
+Subprocess output:
+${result.stdout}
+${result.stderr}
+''');
+    }
+    Expect.equals(0, result.exitCode);
+    Expect.equals("OK", (result.stdout as String).trim());
+  } finally {
+    await tmp.delete(recursive: true);
+  }
+}
+
+void generateTestBody(File testBody) {
+  final sb = StringBuffer();
+
+  sb.write("""
+import 'package:expect/expect.dart';
+""");
+  final n = 0x8010;
+  for (var i = 0; i < n; i++) {
+    sb.write("""
+class C$i {
+  final f;
+  C$i(this.f);
+
+""");
+    if (i == (n - 1)) {
+      sb.write("""
+  test({bool rareCase: false}) {
+    final v = this.f;
+    if (rareCase) {
+      return v.f;
+    }
+    return null;
+  }
+""");
+    }
+    sb.write("""
+
+}
+""");
+  }
+  sb.write("""
+void main() {
+  final obj = C${n - 1}(C${n - 2}(C${n - 3}(null)));
+  for (var i = 0; i < 100; i++) obj.test();
+  Expect.isTrue(obj.test(rareCase: true) is C${n - 3});
+  print("OK");
+}
+  """);
+
+  testBody.writeAsStringSync(sb.toString());
+}
diff --git a/runtime/tests/vm/dart_2/causal_stacks/utils.dart b/runtime/tests/vm/dart_2/causal_stacks/utils.dart
index a7df656..6354b59 100644
--- a/runtime/tests/vm/dart_2/causal_stacks/utils.dart
+++ b/runtime/tests/vm/dart_2/causal_stacks/utils.dart
@@ -149,6 +149,27 @@
   return completer.future;
 }
 
+// ----
+// Scenario: Future.timeout:
+// ----
+
+Future awaitTimeout() async {
+  await (throwAsync().timeout(Duration(seconds: 1)));
+}
+
+// ----
+// Scenario: Future.wait:
+// ----
+
+Future awaitWait() async {
+  await Future.wait([
+    throwAsync(),
+    () async {
+      await Future.value();
+    }()
+  ]);
+}
+
 // Helpers:
 
 // We want lines that either start with a frame index or an async gap marker.
@@ -587,6 +608,7 @@
             r'^#7      _RawReceivePortImpl._handleMessage \(.+\)$',
           ],
       debugInfoFilename);
+
   final customErrorZoneExpected = const <String>[
     r'#0      throwSync \(.*/utils.dart:16(:3)?\)$',
     r'#1      allYield3 \(.*/utils.dart:39(:3)?\)$',
@@ -638,6 +660,90 @@
             r'#14     _RawReceivePortImpl._handleMessage ',
           ],
       debugInfoFilename);
+
+  final awaitTimeoutExpected = const <String>[
+    r'^#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^^<asynchronous suspension>$',
+    r'^#1      awaitTimeout ',
+  ];
+  await doTestAwait(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#2      doTestAwait ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+  await doTestAwaitThen(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#2      doTestAwaitThen ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#2      doTestAwaitCatchError ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+
+  final awaitWaitExpected = const <String>[
+    r'^#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^^<asynchronous suspension>$',
+    r'^#1      awaitWait ',
+  ];
+  await doTestAwait(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#2      doTestAwait ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+  await doTestAwaitThen(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#2      doTestAwaitThen ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#2      doTestAwaitCatchError ',
+            r'^#3      doTestsCausal ',
+            r'^<asynchronous suspension>$',
+            r'^#4      main \(.+\)$',
+            r'^#5      _startIsolate.<anonymous closure> ',
+            r'^#6      _RawReceivePortImpl._handleMessage ',
+          ],
+      debugInfoFilename);
 }
 
 // For: --no-causal-async-stacks --no-lazy-async-stacks
@@ -957,6 +1063,44 @@
       customErrorZone, customErrorZoneExpected, debugInfoFilename);
   await doTestAwaitCatchError(
       customErrorZone, customErrorZoneExpected, debugInfoFilename);
+
+  final awaitTimeoutExpected = const <String>[
+    r'#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^#1      _RootZone.runUnary ',
+    r'^#2      _FutureListener.handleValue ',
+    r'^#3      Future._propagateToListeners.handleValueCallback ',
+    r'^#4      Future._propagateToListeners ',
+    r'^#5      Future.(_addListener|_prependListeners).<anonymous closure> ',
+    r'^#6      _microtaskLoop ',
+    r'^#7      _startMicrotaskLoop ',
+    r'^#8      _runPendingImmediateCallback ',
+    r'^#9      _RawReceivePortImpl._handleMessage ',
+  ];
+  await doTestAwait(
+      awaitTimeout, awaitTimeoutExpected + const <String>[], debugInfoFilename);
+  await doTestAwaitThen(
+      awaitTimeout, awaitTimeoutExpected + const <String>[], debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitTimeout, awaitTimeoutExpected + const <String>[], debugInfoFilename);
+
+  final awaitWaitExpected = const <String>[
+    r'#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^#1      _RootZone.runUnary ',
+    r'^#2      _FutureListener.handleValue ',
+    r'^#3      Future._propagateToListeners.handleValueCallback ',
+    r'^#4      Future._propagateToListeners ',
+    r'^#5      Future.(_addListener|_prependListeners).<anonymous closure> ',
+    r'^#6      _microtaskLoop ',
+    r'^#7      _startMicrotaskLoop ',
+    r'^#8      _runPendingImmediateCallback ',
+    r'^#9      _RawReceivePortImpl._handleMessage ',
+  ];
+  await doTestAwait(
+      awaitWait, awaitWaitExpected + const <String>[], debugInfoFilename);
+  await doTestAwaitThen(
+      awaitWait, awaitWaitExpected + const <String>[], debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitWait, awaitWaitExpected + const <String>[], debugInfoFilename);
 }
 
 // For: --lazy-async-stacks
@@ -1218,4 +1362,66 @@
       customErrorZone, customErrorZoneExpected, debugInfoFilename);
   await doTestAwaitCatchError(
       customErrorZone, customErrorZoneExpected, debugInfoFilename);
+
+  final awaitTimeoutExpected = const <String>[
+    r'^#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^<asynchronous suspension>$',
+    r'^#1      Future.timeout.<anonymous closure> \(dart:async/future_impl.dart\)$',
+    r'^<asynchronous suspension>$',
+    r'^#2      awaitTimeout ',
+    r'^<asynchronous suspension>$',
+  ];
+  await doTestAwait(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#3      doTestAwait ',
+            r'^<asynchronous suspension>$',
+            r'^#4      doTestsLazy ',
+            r'^<asynchronous suspension>$',
+            r'^#5      main ',
+            r'^<asynchronous suspension>$',
+          ],
+      debugInfoFilename);
+  await doTestAwaitThen(
+      awaitTimeout,
+      awaitTimeoutExpected +
+          const <String>[
+            r'^#3      doTestAwaitThen.<anonymous closure> ',
+            r'^<asynchronous suspension>$',
+          ],
+      debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitTimeout, awaitTimeoutExpected + const <String>[], debugInfoFilename);
+
+  final awaitWaitExpected = const <String>[
+    r'^#0      throwAsync \(.*/utils.dart:21(:3)?\)$',
+    r'^<asynchronous suspension>$',
+    r'^#1      Future.wait.<anonymous closure> \(dart:async/future.dart\)$',
+    r'^<asynchronous suspension>$',
+    r'^#2      awaitWait ',
+    r'^<asynchronous suspension>$',
+  ];
+  await doTestAwait(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#3      doTestAwait ',
+            r'^<asynchronous suspension>$',
+            r'^#4      doTestsLazy ',
+            r'^<asynchronous suspension>$',
+            r'^#5      main ',
+            r'^<asynchronous suspension>$',
+          ],
+      debugInfoFilename);
+  await doTestAwaitThen(
+      awaitWait,
+      awaitWaitExpected +
+          const <String>[
+            r'^#3      doTestAwaitThen.<anonymous closure> ',
+            r'^<asynchronous suspension>$',
+          ],
+      debugInfoFilename);
+  await doTestAwaitCatchError(
+      awaitWait, awaitWaitExpected + const <String>[], debugInfoFilename);
 }
diff --git a/runtime/tests/vm/dart_2/incompatible_loading_unit_1.dart b/runtime/tests/vm/dart_2/incompatible_loading_unit_1.dart
new file mode 100644
index 0000000..35b3947
--- /dev/null
+++ b/runtime/tests/vm/dart_2/incompatible_loading_unit_1.dart
@@ -0,0 +1,10 @@
+// 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 "incompatible_loading_unit_1_deferred.dart" deferred as lib;
+
+main() async {
+  await lib.loadLibrary();
+  lib.foo();
+}
diff --git a/runtime/tests/vm/dart_2/incompatible_loading_unit_1_deferred.dart b/runtime/tests/vm/dart_2/incompatible_loading_unit_1_deferred.dart
new file mode 100644
index 0000000..c0b9a03
--- /dev/null
+++ b/runtime/tests/vm/dart_2/incompatible_loading_unit_1_deferred.dart
@@ -0,0 +1,7 @@
+// 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.
+
+void foo() {
+  print("One!");
+}
diff --git a/runtime/tests/vm/dart_2/incompatible_loading_unit_2.dart b/runtime/tests/vm/dart_2/incompatible_loading_unit_2.dart
new file mode 100644
index 0000000..7a352f6c
--- /dev/null
+++ b/runtime/tests/vm/dart_2/incompatible_loading_unit_2.dart
@@ -0,0 +1,10 @@
+// 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 "incompatible_loading_unit_2_deferred.dart" deferred as lib;
+
+main() async {
+  await lib.loadLibrary();
+  lib.foo();
+}
diff --git a/runtime/tests/vm/dart_2/incompatible_loading_unit_2_deferred.dart b/runtime/tests/vm/dart_2/incompatible_loading_unit_2_deferred.dart
new file mode 100644
index 0000000..2dc3b7a
--- /dev/null
+++ b/runtime/tests/vm/dart_2/incompatible_loading_unit_2_deferred.dart
@@ -0,0 +1,7 @@
+// 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.
+
+void foo() {
+  print("Two!");
+}
diff --git a/runtime/tests/vm/dart_2/incompatible_loading_unit_test.dart b/runtime/tests/vm/dart_2/incompatible_loading_unit_test.dart
new file mode 100644
index 0000000..8231f00
--- /dev/null
+++ b/runtime/tests/vm/dart_2/incompatible_loading_unit_test.dart
@@ -0,0 +1,97 @@
+// 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:convert";
+import "dart:io";
+
+import "package:expect/expect.dart";
+import "package:path/path.dart" as path;
+
+import "use_flag_test_helper.dart";
+
+main(List<String> args) async {
+  if (!isAOTRuntime) {
+    return; // Running in JIT: AOT binaries not available.
+  }
+
+  if (Platform.isAndroid) {
+    return; // SDK tree not available on the test device.
+  }
+
+  // These are the tools we need to be available to run on a given platform:
+  if (!File(platformDill).existsSync()) {
+    throw "Cannot run test as $platformDill does not exist";
+  }
+  if (!await testExecutable(genSnapshot)) {
+    throw "Cannot run test as $genSnapshot not available";
+  }
+
+  await withTempDir("incompatible-loading-unit-test", (String tempDir) async {
+    final source1 = path.join(
+        sdkDir, "runtime/tests/vm/dart_2/incompatible_loading_unit_1.dart");
+    final source2 = path.join(
+        sdkDir, "runtime/tests/vm/dart_2/incompatible_loading_unit_2.dart");
+    final dill1 = path.join(tempDir, "incompatible_loading_unit_1.dart.dill");
+    final dill2 = path.join(tempDir, "incompatible_loading_unit_2.dart.dill");
+    final snapshot1 = path.join(tempDir, "incompatible_loading_unit_1.so");
+    final snapshot2 = path.join(tempDir, "incompatible_loading_unit_2.so");
+    final manifest1 = path.join(tempDir, "incompatible_loading_unit_1.txt");
+    final manifest2 = path.join(tempDir, "incompatible_loading_unit_2.txt");
+    final deferredSnapshot1 = snapshot1 + "-2.part.so";
+    final deferredSnapshot2 = snapshot2 + "-2.part.so";
+
+    // Compile source to kernel.
+    await run(genKernel, <String>[
+      "--aot",
+      "--platform=$platformDill",
+      "-o",
+      dill1,
+      source1,
+    ]);
+    await run(genKernel, <String>[
+      "--aot",
+      "--platform=$platformDill",
+      "-o",
+      dill2,
+      source2,
+    ]);
+
+    // Compile kernel to ELF.
+    await run(genSnapshot, <String>[
+      "--snapshot-kind=app-aot-elf",
+      "--use-bare-instructions=false",
+      "--elf=$snapshot1",
+      "--loading-unit-manifest=$manifest1",
+      dill1,
+    ]);
+    var manifest = jsonDecode(await new File(manifest1).readAsString());
+    Expect.equals(2, manifest["loadingUnits"].length);
+    Expect.isTrue(await new File(deferredSnapshot1).exists());
+
+    await run(genSnapshot, <String>[
+      "--snapshot-kind=app-aot-elf",
+      "--use-bare-instructions=false",
+      "--elf=$snapshot2",
+      "--loading-unit-manifest=$manifest2",
+      dill2,
+    ]);
+    manifest = jsonDecode(await new File(manifest1).readAsString());
+    Expect.equals(2, manifest["loadingUnits"].length);
+    Expect.isTrue(await new File(deferredSnapshot2).exists());
+
+    // Works when used normally.
+    var lines = await runOutput(aotRuntime, <String>[snapshot1]);
+    Expect.listEquals(["One!"], lines);
+
+    lines = await runOutput(aotRuntime, <String>[snapshot2]);
+    Expect.listEquals(["Two!"], lines);
+
+    // Fails gracefully when mixing snapshot parts.
+    await new File(deferredSnapshot2).rename(deferredSnapshot1);
+    lines = await runError(aotRuntime, <String>[snapshot1]);
+    Expect.equals(
+        "DeferredLoadException: 'Deferred loading unit is from a different program than the main loading unit'",
+        lines[1]);
+  });
+}
diff --git a/runtime/tests/vm/dart_2/null_safety_autodetection_in_kernel_compiler_test.dart b/runtime/tests/vm/dart_2/null_safety_autodetection_in_kernel_compiler_test.dart
index 348b154..4244601 100644
--- a/runtime/tests/vm/dart_2/null_safety_autodetection_in_kernel_compiler_test.dart
+++ b/runtime/tests/vm/dart_2/null_safety_autodetection_in_kernel_compiler_test.dart
@@ -26,7 +26,9 @@
     ''');
 
     final testDillPath = path.join(temp, 'test.dill');
-    await runGenKernel('BUILD DILL FILE', [
+    await runGenKernelWithoutStandardOptions('BUILD DILL FILE', [
+      "--platform",
+      platformDill,
       '--enable-experiment=non-nullable',
       '--output=$testDillPath',
       testScriptPath,
diff --git a/runtime/tests/vm/dart_2/scavenger_abort_test.dart b/runtime/tests/vm/dart_2/scavenger_abort_test.dart
new file mode 100644
index 0000000..ee3b38d
--- /dev/null
+++ b/runtime/tests/vm/dart_2/scavenger_abort_test.dart
@@ -0,0 +1,158 @@
+// 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:expect/expect.dart";
+
+// The sizes of these classes are co-prime multiples of the allocation unit to
+// increase the likelihood that scavenging fails from fragmentation.
+
+// header + 13 fields = 7 allocation units
+class A {
+  dynamic field1;
+  dynamic field2;
+  dynamic field3;
+  dynamic field4;
+  dynamic field5;
+  dynamic field6;
+  dynamic field7;
+  dynamic field8;
+  dynamic field9;
+  dynamic field10;
+  dynamic field11;
+  dynamic field12;
+  dynamic field13;
+}
+
+// header + 17 fields = 9 allocation units
+class B {
+  dynamic field1;
+  dynamic field2;
+  dynamic field3;
+  dynamic field4;
+  dynamic field5;
+  dynamic field6;
+  dynamic field7;
+  dynamic field8;
+  dynamic field9;
+  dynamic field10;
+  dynamic field11;
+  dynamic field12;
+  dynamic field13;
+  dynamic field14;
+  dynamic field15;
+  dynamic field16;
+  dynamic field17;
+}
+
+// header + 19 fields = 10 allocation units
+class C {
+  dynamic field1;
+  dynamic field2;
+  dynamic field3;
+  dynamic field4;
+  dynamic field5;
+  dynamic field6;
+  dynamic field7;
+  dynamic field8;
+  dynamic field9;
+  dynamic field10;
+  dynamic field11;
+  dynamic field12;
+  dynamic field13;
+  dynamic field14;
+  dynamic field15;
+  dynamic field16;
+  dynamic field17;
+  dynamic field18;
+  dynamic field19;
+}
+
+makeA(n) {
+  var a = new A();
+  if (n > 0) {
+    a.field1 = makeB(n - 1);
+    a.field2 = makeC(n - 1);
+    a.field3 = makeB(n - 1);
+    a.field4 = makeC(n - 1);
+  }
+  return a;
+}
+
+makeB(n) {
+  var b = new B();
+  if (n > 0) {
+    b.field1 = makeC(n - 1);
+    b.field2 = makeA(n - 1);
+    b.field3 = makeC(n - 1);
+    b.field4 = makeA(n - 1);
+  }
+  return b;
+}
+
+makeC(n) {
+  var c = new C();
+  if (n > 0) {
+    c.field1 = makeA(n - 1);
+    c.field2 = makeB(n - 1);
+    c.field3 = makeA(n - 1);
+    c.field4 = makeB(n - 1);
+  }
+  return c;
+}
+
+readFields(x) {
+  print(x.field1);
+  print(x.field2);
+  print(x.field3);
+  print(x.field4);
+}
+
+main(List<String> argsIn) async {
+  if (argsIn.contains("--testee")) {
+    // Trigger OOM.
+    // Must read the fields to prevent the writes from being optimized away. If
+    // the writes are optimized away, most of the tree is collectible right away
+    // and we timeout instead of triggering OOM.
+    readFields(makeA(50));
+    readFields(makeB(50));
+    readFields(makeC(50));
+    return;
+  }
+
+  var exec = Platform.executable;
+  var args = Platform.executableArguments +
+      [
+        "--old_gen_heap_size=15" /*MB*/,
+        "--verbose_gc",
+        "--verify_after_gc",
+        "--verify_store_buffer",
+        Platform.script.toFilePath(),
+        "--testee"
+      ];
+  print("+ $exec ${args.join(' ')}");
+
+  var result = await Process.run(exec, args);
+  print("Command stdout:");
+  print(result.stdout);
+  print("Command stderr:");
+  print(result.stderr);
+
+  Expect.equals(255, result.exitCode,
+      "Should see runtime exception error code, not SEGV");
+
+  Expect.isTrue(
+      result.stderr.contains("Unhandled exception:\nOut of Memory") ||
+          result.stderr.contains("Unhandled exception:\r\nOut of Memory"),
+      "Should see the Dart OutOfMemoryError");
+
+  // --verbose_gc not available in product mode
+  if (!new bool.fromEnvironment("dart.vm.product")) {
+    Expect.isTrue(result.stderr.contains("Aborting scavenge"),
+        "Should abort scavenge at least once");
+  }
+
+  Expect.isFalse(result.stderr.contains("error: Out of memory"),
+      "Should not see the C++ OUT_OF_MEMORY()");
+}
diff --git a/runtime/tests/vm/dart_2/sdk_hash_test.dart b/runtime/tests/vm/dart_2/sdk_hash_test.dart
index b6f166c..c73dc03 100644
--- a/runtime/tests/vm/dart_2/sdk_hash_test.dart
+++ b/runtime/tests/vm/dart_2/sdk_hash_test.dart
@@ -14,7 +14,6 @@
 
 // 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') {
@@ -53,7 +52,6 @@
       // 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));
       Expect.notEquals('0000000000', ascii.decode(bytes.sublist(8, 18)));
       // Flip the first byte in the hash:
       bytes[8] = ~bytes[8];
diff --git a/runtime/tests/vm/dart_2/snapshot_test_helper.dart b/runtime/tests/vm/dart_2/snapshot_test_helper.dart
index b2754d0..56472f1 100644
--- a/runtime/tests/vm/dart_2/snapshot_test_helper.dart
+++ b/runtime/tests/vm/dart_2/snapshot_test_helper.dart
@@ -63,12 +63,21 @@
 }
 
 Future<Result> runGenKernel(String prefix, List<String> arguments) {
-  final augmentedArguments = <String>[]
-    ..add(genKernel)
-    ..add("--platform")
-    ..add(platformDill)
-    ..addAll(arguments);
-  return runBinary(prefix, checkedInDartVM, augmentedArguments);
+  final augmentedArguments = <String>[
+    "--platform",
+    platformDill,
+    ...Platform.executableArguments.where((arg) =>
+        arg.startsWith('--enable-experiment=') ||
+        arg == '--sound-null-safety' ||
+        arg == '--no-sound-null-safety'),
+    ...arguments,
+  ];
+  return runGenKernelWithoutStandardOptions(prefix, augmentedArguments);
+}
+
+Future<Result> runGenKernelWithoutStandardOptions(
+    String prefix, List<String> arguments) {
+  return runBinary(prefix, checkedInDartVM, [genKernel, ...arguments]);
 }
 
 Future<Result> runGenSnapshot(String prefix, List<String> arguments) {
diff --git a/runtime/tests/vm/dart_2/spawnuri_snapshot_test.dart b/runtime/tests/vm/dart_2/spawnuri_snapshot_test.dart
new file mode 100644
index 0000000..f0ed02f
--- /dev/null
+++ b/runtime/tests/vm/dart_2/spawnuri_snapshot_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.
+
+// Check spawnUri accepts any program format that `dart` accepts. Currently this
+// is source, kernel, AppJIT (blob container) and AppAOT (ELF).
+
+import "dart:isolate";
+import "dart:io";
+
+import "package:expect/expect.dart";
+
+int fib(int n) {
+  if (n <= 1) return 1;
+  return fib(n - 1) + fib(n - 2);
+}
+
+main(List<String> args, [dynamic sendPort]) {
+  if (sendPort == null) {
+    print("Parent start");
+    var port = new RawReceivePort();
+    port.handler = (result) {
+      Expect.equals(14930352, result);
+      port.close();
+      print("Parent end");
+    };
+    print("Spawn ${Platform.script}");
+    Isolate.spawnUri(Platform.script, <String>[], port.sendPort);
+  } else {
+    print("Child start");
+    sendPort.send(fib(35));
+    print("Child end");
+  }
+}
diff --git a/runtime/tests/vm/dart_2/splay_test.dart b/runtime/tests/vm/dart_2/splay_test.dart
index 1fec471..824fe01 100644
--- a/runtime/tests/vm/dart_2/splay_test.dart
+++ b/runtime/tests/vm/dart_2/splay_test.dart
@@ -28,6 +28,7 @@
 // VMOptions=--verify_before_gc --verify_after_gc
 // VMOptions=--verify_store_buffer
 // VMOptions=--stress_write_barrier_elimination
+// VMOptions=--old_gen_heap_size=100
 
 import "dart:math";
 import 'package:benchmark_harness/benchmark_harness.dart';
diff --git a/runtime/tests/vm/dart_2/split_aot_kernel_generation_test.dart b/runtime/tests/vm/dart_2/split_aot_kernel_generation_test.dart
index 19865cd..1f8d33b 100644
--- a/runtime/tests/vm/dart_2/split_aot_kernel_generation_test.dart
+++ b/runtime/tests/vm/dart_2/split_aot_kernel_generation_test.dart
@@ -17,15 +17,7 @@
     final outputDillPath = path.join(temp, 'output.dill');
     final snapshotPath = path.join(temp, 'aot.snapshot');
 
-    final extraGenKernelOptions = Platform.executableArguments
-        .where((arg) =>
-            arg.startsWith('--enable-experiment=') ||
-            arg == '--null-safety' ||
-            arg == '--no-null-safety')
-        .toList();
-
     await runGenKernel('BUILD INTERMEDIATE DILL FILE', [
-      ...extraGenKernelOptions,
       '--no-aot',
       '--link-platform',
       '--output=$intermediateDillPath',
@@ -33,7 +25,6 @@
     ]);
 
     await runGenKernel('BUILD FINAL DILL FILE', [
-      ...extraGenKernelOptions,
       '--aot',
       '--from-dill=$intermediateDillPath',
       '--link-platform',
diff --git a/runtime/tests/vm/dart_2/typed_data_vfp_regress_42745_test.dart b/runtime/tests/vm/dart_2/typed_data_vfp_regress_42745_test.dart
new file mode 100644
index 0000000..294f0ea
--- /dev/null
+++ b/runtime/tests/vm/dart_2/typed_data_vfp_regress_42745_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.
+// VMOptions=--no-use-vfp
+
+import 'dart:typed_data';
+
+import 'package:expect/expect.dart';
+
+final Float32List l = int.parse('1') == 1
+    ? Float32List(2)
+    : Float32List.view(Uint32List(2).buffer);
+
+main() {
+  l[int.parse('1') == 1 ? 0 : 1] = 1.2;
+  Expect.approxEquals(l[0], 1.2);
+}
diff --git a/runtime/tests/vm/dart_2/unboxed_implicit_accessors_test.dart b/runtime/tests/vm/dart_2/unboxed_implicit_accessors_test.dart
new file mode 100644
index 0000000..08eea3a
--- /dev/null
+++ b/runtime/tests/vm/dart_2/unboxed_implicit_accessors_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.
+
+final l = <I>[A(), B(42, 4.2)];
+final l2 = <I2>[A2(), B2(42, 4.2)];
+
+main() {
+  if (l[0].intValue != 23) throw 'a';
+  if (l[0].doubleValue != 2.3) throw 'b';
+  if (l[1].intValue != 42) throw 'c';
+  if (l[1].doubleValue != 4.2) throw 'd';
+
+  if (l2[0].intValue != null) throw 'a';
+  if (l2[0].doubleValue != null) throw 'b';
+  if (l2[1].intValue != 42) throw 'c';
+  if (l2[1].doubleValue != 4.2) throw 'd';
+
+  if (int.parse('1') == 1) {
+    l2[0].intValue = 24;
+    l2[0].doubleValue = 2.4;
+    l2[1].intValue = 24;
+    l2[1].doubleValue = 2.4;
+  } else {
+    (l2[0] as A2).intValue = null;
+    (l2[0] as A2).doubleValue = null;
+  }
+}
+
+abstract class I {
+  int get intValue;
+  double get doubleValue;
+}
+
+class A implements I {
+  int get intValue => 23;
+  double get doubleValue => 2.3;
+}
+
+class B implements I {
+  // Field as well as getter/setter will be unboxed.
+  final int intValue;
+  // Field as well as getter/setter will be unboxed.
+  final double doubleValue;
+  B(this.intValue, this.doubleValue);
+}
+
+abstract class I2 {
+  void set intValue(int v) {}
+  void set doubleValue(double v) {}
+
+  int get intValue;
+  double get doubleValue;
+}
+
+class A2 implements I2 {
+  void set intValue(int v) {}
+  void set doubleValue(double v) {}
+
+  int get intValue => null;
+  double get doubleValue => null;
+}
+
+class B2 implements I2 {
+  // Field itself will get unboxed, but getter/setter will be boxed.
+  int intValue;
+  // Field itself will get unboxed, but getter/setter will be boxed.
+  double doubleValue;
+
+  B2(this.intValue, this.doubleValue);
+}
diff --git a/runtime/tests/vm/dart_2/unboxed_many_fields_test.dart b/runtime/tests/vm/dart_2/unboxed_many_fields_test.dart
index 84b4f1d..79fd30f 100644
--- a/runtime/tests/vm/dart_2/unboxed_many_fields_test.dart
+++ b/runtime/tests/vm/dart_2/unboxed_many_fields_test.dart
@@ -6,17 +6,12 @@
 
 import 'package:expect/expect.dart';
 
+import 'unboxed_parameter_helper.dart';
+
 // The VM class finalizer ensures that we only unbox fields which can be
 // represented in the unboxed field bitmap in the target architecture (even when
 // cross-compiling from 64-bit to 32-bit), see `Class::CalculateFieldOffsets()`.
 
-// Make an integer that would look like an object pointer (irrespective of
-// we compile to 32-bit or 64-bit and whether we use little or big endian
-// encoding of the integer).
-int get integerFieldValue =>
-    int.parse('1') == 1 ? constIntegerFieldValue : 0x8000900180009001;
-const int constIntegerFieldValue = 0x8000000180000001;
-
 int i = 0;
 final Object objectFieldValue = Foo('i${i++}');
 
diff --git a/runtime/tests/vm/dart_2/unboxed_parameter_helper.dart b/runtime/tests/vm/dart_2/unboxed_parameter_helper.dart
index b0ee815..91ad154 100644
--- a/runtime/tests/vm/dart_2/unboxed_parameter_helper.dart
+++ b/runtime/tests/vm/dart_2/unboxed_parameter_helper.dart
@@ -11,3 +11,10 @@
   final double v = bd.getFloat64(0, Endian.host);
   return v;
 }
+
+// Make an integer that would look like an object pointer (irrespective of
+// we compile to 32-bit or 64-bit and whether we use little or big endian
+// encoding of the integer).
+int get integerFieldValue =>
+    int.parse('1') == 1 ? constIntegerFieldValue : 0x8000900180009001;
+const int constIntegerFieldValue = 0x8000000180000001;
diff --git a/runtime/tests/vm/dart_2/unboxed_retval_test.dart b/runtime/tests/vm/dart_2/unboxed_retval_test.dart
new file mode 100644
index 0000000..6132480
--- /dev/null
+++ b/runtime/tests/vm/dart_2/unboxed_retval_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:expect/expect.dart';
+
+import 'unboxed_parameter_helper.dart';
+
+abstract class I {
+  int get value;
+  int getValue();
+}
+
+class Foo implements I {
+  int value;
+  Foo(this.value);
+  int getValue() => value;
+}
+
+class Bar implements I {
+  int get value => integerFieldValue;
+  int getValue() => value;
+}
+
+final objects = <dynamic>[Foo(integerFieldValue), Bar()];
+final tearoffs = <dynamic>[Foo(integerFieldValue).getValue, Bar().getValue];
+
+main() {
+  // Dynamic accesses to getter, method and tear-off
+  Expect.equals(objects[0].value, integerFieldValue);
+  Expect.equals(objects[0].getValue(), integerFieldValue);
+  Expect.equals(objects[1].value, integerFieldValue);
+  Expect.equals(objects[1].getValue(), integerFieldValue);
+  Expect.equals(tearoffs[0](), integerFieldValue);
+  Expect.equals(tearoffs[1](), integerFieldValue);
+
+  // Interface-based accesses to getter, method and tear-off
+  final Foo foo = objects[0] as Foo;
+  final int Function() fooGetValue = foo.getValue;
+  Expect.equals(foo.value, integerFieldValue);
+  Expect.equals(foo.getValue(), integerFieldValue);
+  Expect.equals(fooGetValue(), integerFieldValue);
+
+  final Bar bar = objects[1] as Bar;
+  final int Function() barGetValue = bar.getValue;
+  Expect.equals(bar.value, integerFieldValue);
+  Expect.equals(bar.getValue(), integerFieldValue);
+  Expect.equals(barGetValue(), integerFieldValue);
+}
diff --git a/runtime/tests/vm/dart_2/use_flag_test_helper.dart b/runtime/tests/vm/dart_2/use_flag_test_helper.dart
index fe9c511..24f0687 100644
--- a/runtime/tests/vm/dart_2/use_flag_test_helper.dart
+++ b/runtime/tests/vm/dart_2/use_flag_test_helper.dart
@@ -144,7 +144,7 @@
   }
 }
 
-Future<Iterable<String>> runOutput(String executable, List<String> args) async {
+Future<List<String>> runOutput(String executable, List<String> args) async {
   final result = await runHelper(executable, args);
 
   if (result.exitCode != 0) {
@@ -158,7 +158,7 @@
       .toList();
 }
 
-Future<Iterable<String>> runError(String executable, List<String> args) async {
+Future<List<String>> runError(String executable, List<String> args) async {
   final result = await runHelper(executable, args);
 
   if (result.exitCode == 0) {
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 0ab4172..7f379ab 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -79,6 +79,10 @@
 dart_2/redirection_type_shuffling_test/none: RuntimeError
 dart_2/snapshot_version_test: RuntimeError
 
+[ $compiler != dartk ]
+dart/b162922506_test: SkipByDesign # Only run in JIT
+dart_2/b162922506_test: SkipByDesign # Only run in JIT
+
 [ $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
@@ -88,11 +92,13 @@
 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/scavenger_abort_test: SkipSlow
 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/scavenger_abort_test: SkipSlow
 dart_2/v8_snapshot_profile_writer_test: Pass, Slow # Can be slow due to re-invoking the precompiler.
 
 [ $compiler != dartkp ]
@@ -110,11 +116,13 @@
 cc/VerifyExplicit_Crash: Crash # Negative tests of VerifiedMemory should crash iff in DEBUG mode. TODO(koda): Improve support for negative tests.
 cc/VerifyImplicit_Crash: Crash # Negative tests of VerifiedMemory should crash iff in DEBUG mode. TODO(koda): Improve support for negative tests.
 dart/appjit_cha_deopt_test: Pass, Slow # Quite slow in debug mode, uses --optimization-counter-threshold=100
+dart/b162922506_test: SkipSlow # Generates very large input file
 dart/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow in debug mode
 dart/minimal_kernel_test: SkipSlow # gen_kernel is too slow in debug mode
 dart/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow in debug mode
 dart/spawn_shutdown_test: Pass, Slow # VM Shutdown test, It can take some time for all the isolates to shutdown in a Debug build.
 dart_2/appjit_cha_deopt_test: Pass, Slow # Quite slow in debug mode, uses --optimization-counter-threshold=100
+dart_2/b162922506_test: SkipSlow # Generates very large input file
 dart_2/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow in debug mode
 dart_2/minimal_kernel_test: SkipSlow # gen_kernel is too slow in debug mode
 dart_2/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow in debug mode
@@ -127,6 +135,10 @@
 dart/redirection_type_shuffling_test: SkipByDesign # Imports dart:mirrors
 dart_2/redirection_type_shuffling_test: SkipByDesign # Imports dart:mirrors
 
+[ $system == android ]
+dart/sdk_hash_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+dart_2/sdk_hash_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+
 [ $system == fuchsia ]
 cc/CorelibIsolateStartup: Skip # OOM crash can bring down the OS.
 cc/Read: Fail # TODO(zra): Investigate, ../../dart/runtime/bin/file_test.cc: 34: error: expected: !file->WriteByte(1)
@@ -278,12 +290,14 @@
 
 [ ($arch == simarm || $arch == simarm64) && ($compiler == dartk || $compiler == dartkb) ]
 dart/appjit*: SkipSlow # DFE too slow
+dart/b162922506_test: SkipSlow # Generates large input file
 dart/data_uri_spawn_test: Skip # Please triage.
 dart/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart/minimal_kernel_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart/snapshot_version_test: RuntimeError # Please triage.
 dart_2/appjit*: SkipSlow # DFE too slow
+dart_2/b162922506_test: SkipSlow # Generates large input file
 dart_2/data_uri_spawn_test: Skip # Please triage.
 dart_2/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart_2/minimal_kernel_test: SkipSlow # gen_kernel is too slow on simulated architectures
diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn
index 1716f3d..0d1d129f 100644
--- a/runtime/vm/BUILD.gn
+++ b/runtime/vm/BUILD.gn
@@ -75,6 +75,10 @@
     if (using_fuchsia_gn_sdk) {
       extra_deps = [
         "$fuchsia_sdk_root/fidl/fuchsia.deprecatedtimezone",
+        "$fuchsia_sdk_root/pkg/async",
+        "$fuchsia_sdk_root/pkg/async-default",
+        "$fuchsia_sdk_root/pkg/async-loop",
+        "$fuchsia_sdk_root/pkg/async-loop-default",
         "$fuchsia_sdk_root/pkg/inspect",
         "$fuchsia_sdk_root/pkg/inspect_service_cpp",
         "$fuchsia_sdk_root/pkg/sys_cpp",
@@ -84,6 +88,8 @@
     } else if (using_fuchsia_sdk) {
       extra_deps = [
         "$fuchsia_sdk_root/fidl:fuchsia.deprecatedtimezone",
+        "$fuchsia_sdk_root/pkg:async-loop",
+        "$fuchsia_sdk_root/pkg:async-loop-default",
         "$fuchsia_sdk_root/pkg:inspect",
         "$fuchsia_sdk_root/pkg:inspect_service_cpp",
         "$fuchsia_sdk_root/pkg:sys_cpp",
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 633a3f2..1d00e78 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -359,7 +359,7 @@
 // Measure compile of all kernel Service(CFE) functions.
 //
 BENCHMARK(KernelServiceCompileAll) {
-  if (FLAG_null_safety == kNullSafetyOptionStrong) {
+  if (FLAG_sound_null_safety == kNullSafetyOptionStrong) {
     // TODO(bkonyi): remove this check when we build the CFE in strong mode.
     return;
   }
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index 57445f7..774a398 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -142,6 +142,10 @@
     library = Library::LookupLibrary(thread, dart_builtin);
     isolate->object_store()->set_builtin_library(library);
 
+    if (FLAG_precompiled_mode) {
+      loader.ReadLoadingUnits();
+    }
+
     return Error::null();
   }
 
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index a805629..00f2e1c 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -33,6 +33,8 @@
   V(Type_equality, 2)                                                          \
   V(LibraryPrefix_isLoaded, 1)                                                 \
   V(LibraryPrefix_setLoaded, 1)                                                \
+  V(LibraryPrefix_loadingUnit, 1)                                              \
+  V(LibraryPrefix_issueLoad, 1)                                                \
   V(Identical_comparison, 2)                                                   \
   V(Integer_bitAndFromInteger, 2)                                              \
   V(Integer_bitOrFromInteger, 2)                                               \
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 7531621..f535c91 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -59,8 +59,8 @@
   }
 }
 
-void AddSuperType(const AbstractType& type,
-                  GrowableArray<intptr_t>* finalized_super_classes) {
+static void AddSuperType(const AbstractType& type,
+                         GrowableArray<intptr_t>* finalized_super_classes) {
   ASSERT(type.HasTypeClass());
   ASSERT(!type.IsDynamicType());
   if (type.IsObjectType()) {
@@ -1151,14 +1151,6 @@
   }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
-  if (cls.is_patch()) {
-    // The fields and functions of a patch class are copied to the
-    // patched class after parsing. There is nothing to finalize.
-    ASSERT(Array::Handle(cls.functions()).Length() == 0);
-    ASSERT(Array::Handle(cls.fields()).Length() == 0);
-    cls.set_is_finalized();
-    return;
-  }
   // Ensure super class is finalized.
   const Class& super = Class::Handle(cls.SuperClass());
   if (!super.IsNull()) {
@@ -1170,33 +1162,69 @@
   // Mark as loaded and finalized.
   cls.Finalize();
   FinalizeMemberTypes(cls);
-  // Run additional checks after all types are finalized.
-  if (FLAG_use_cha_deopt) {
-    GrowableArray<intptr_t> cids;
-    CollectFinalizedSuperClasses(cls, &cids);
-    CollectImmediateSuperInterfaces(cls, &cids);
-    RemoveCHAOptimizedCode(cls, cids);
-  }
-
-  if (FLAG_use_cha_deopt) {
-    Zone* zone = thread->zone();
-    ClassTable* class_table = thread->isolate()->class_table();
-    auto& interface_class = Class::Handle(zone);
-
-    // We scan every interface this [cls] implements and invalidate all CHA code
-    // which depends on knowing the implementors of that interface.
-    GrowableArray<intptr_t> cids;
-    InterfaceFinder finder(zone, class_table, &cids);
-    finder.FindAllInterfaces(cls);
-    for (intptr_t j = 0; j < cids.length(); ++j) {
-      interface_class = class_table->At(cids[j]);
-      interface_class.DisableCHAImplementorUsers();
-    }
-  }
 
   if (cls.is_enum_class()) {
     AllocateEnumValues(cls);
   }
+
+  // The rest of finalization for non-top-level class has to be done with
+  // stopped mutators. It will be done by AllocateFinalizeClass. before new
+  // instance of a class is created in GetAllocationStubForClass.
+  if (cls.IsTopLevel()) {
+    cls.set_is_allocate_finalized();
+  }
+}
+
+ErrorPtr ClassFinalizer::AllocateFinalizeClass(const Class& cls) {
+  ASSERT(cls.is_finalized());
+  if (cls.is_allocate_finalized()) {
+    return Error::null();
+  }
+
+  Thread* thread = Thread::Current();
+  HANDLESCOPE(thread);
+
+  if (FLAG_trace_class_finalization) {
+    THR_Print("Allocate finalize %s\n", cls.ToCString());
+  }
+
+#if defined(SUPPORT_TIMELINE)
+  TimelineBeginEndScope tbes(thread, Timeline::GetCompilerStream(),
+                             "AllocateFinalizeClass");
+  if (tbes.enabled()) {
+    tbes.SetNumArguments(1);
+    tbes.CopyArgument(0, "class", cls.ToCString());
+  }
+#endif  // defined(SUPPORT_TIMELINE)
+
+  // Run additional checks after all types are finalized.
+  if (FLAG_use_cha_deopt && !cls.IsTopLevel()) {
+    {
+      GrowableArray<intptr_t> cids;
+      CollectFinalizedSuperClasses(cls, &cids);
+      CollectImmediateSuperInterfaces(cls, &cids);
+      RemoveCHAOptimizedCode(cls, cids);
+    }
+
+    Zone* zone = thread->zone();
+    ClassTable* class_table = thread->isolate()->class_table();
+    auto& interface_class = Class::Handle(zone);
+
+    // We scan every interface this [cls] implements and invalidate all CHA
+    // code which depends on knowing the implementors of that interface.
+    {
+      GrowableArray<intptr_t> cids;
+      InterfaceFinder finder(zone, class_table, &cids);
+      finder.FindAllInterfaces(cls);
+      for (intptr_t j = 0; j < cids.length(); ++j) {
+        interface_class = class_table->At(cids[j]);
+        interface_class.DisableCHAImplementorUsers();
+      }
+    }
+  }
+
+  cls.set_is_allocate_finalized();
+  return Error::null();
 }
 
 ErrorPtr ClassFinalizer::LoadClassMembers(const Class& cls) {
@@ -1426,7 +1454,7 @@
       continue;
     }
     cls = table->At(cid);
-    if (cls.is_patch() || !cls.is_declaration_loaded()) {
+    if (!cls.is_declaration_loaded()) {
       continue;
     }
     if (cls.SuperClass() == I->object_store()->object_class()) {
@@ -1490,7 +1518,12 @@
   void VisitObject(ObjectPtr obj) {
     if (obj->IsClass()) {
       ClassPtr cls = Class::RawCast(obj);
-      cls->ptr()->id_ = Map(cls->ptr()->id_);
+      const classid_t old_cid = cls->ptr()->id_;
+      if (ClassTable::IsTopLevelCid(old_cid)) {
+        // We don't remap cids of top level classes.
+        return;
+      }
+      cls->ptr()->id_ = Map(old_cid);
     } else if (obj->IsField()) {
       FieldPtr field = Field::RawCast(obj);
       field->ptr()->guarded_cid_ = Map(field->ptr()->guarded_cid_);
diff --git a/runtime/vm/class_finalizer.h b/runtime/vm/class_finalizer.h
index a087ac5..3fd0baf 100644
--- a/runtime/vm/class_finalizer.h
+++ b/runtime/vm/class_finalizer.h
@@ -62,8 +62,11 @@
   // Register class in the lists of direct subclasses and direct implementors.
   static void RegisterClassInHierarchy(Zone* zone, const Class& cls);
 
-  // Finalize the class including its fields and functions.
+  // Ensures members of the class are loaded, class layout is finalized and size
+  // registered in class table.
   static void FinalizeClass(const Class& cls);
+  // Makes class instantiatable and usable by generated code.
+  static ErrorPtr AllocateFinalizeClass(const Class& cls);
 
   // Completes loading of the class, this populates the function
   // and fields of the class.
diff --git a/runtime/vm/class_id.h b/runtime/vm/class_id.h
index b71fa12..0664cbb 100644
--- a/runtime/vm/class_id.h
+++ b/runtime/vm/class_id.h
@@ -14,6 +14,9 @@
 
 namespace dart {
 
+// Size of the class-id part of the object header. See ObjectLayout.
+typedef uint16_t ClassIdTagType;
+
 #define CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY(V)                           \
   V(Class)                                                                     \
   V(PatchClass)                                                                \
@@ -47,6 +50,7 @@
   V(ICData)                                                                    \
   V(MegamorphicCache)                                                          \
   V(SubtypeTestCache)                                                          \
+  V(LoadingUnit)                                                               \
   V(Error)                                                                     \
   V(ApiError)                                                                  \
   V(LanguageError)                                                             \
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index c458acb..582ff56 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.cc
@@ -4,6 +4,7 @@
 
 #include "vm/class_table.h"
 
+#include <limits>
 #include <memory>
 
 #include "platform/atomic.h"
@@ -81,7 +82,10 @@
 ClassTable::ClassTable(SharedClassTable* shared_class_table)
     : top_(kNumPredefinedCids),
       capacity_(0),
-      table_(NULL),
+      tlc_top_(0),
+      tlc_capacity_(0),
+      table_(nullptr),
+      tlc_table_(nullptr),
       old_class_tables_(new MallocGrowableArray<ClassPtr*>()),
       shared_class_table_(shared_class_table) {
   if (Dart::vm_isolate() == NULL) {
@@ -122,6 +126,7 @@
     delete old_class_tables_;
   }
   free(table_.load());
+  free(tlc_table_.load());
 }
 
 void ClassTable::AddOldTable(ClassPtr* old_class_table) {
@@ -149,7 +154,8 @@
 void ClassTable::Register(const Class& cls) {
   ASSERT(Thread::Current()->IsMutatorThread());
 
-  const intptr_t index = cls.id();
+  const classid_t cid = cls.id();
+  ASSERT(!IsTopLevelCid(cid));
 
   // During the transition period we would like [SharedClassTable] to operate in
   // parallel to [ClassTable].
@@ -158,12 +164,12 @@
       cls.is_abstract() ? 0 : Class::host_instance_size(cls.raw());
 
   const intptr_t expected_cid =
-      shared_class_table_->Register(index, instance_size);
+      shared_class_table_->Register(cid, instance_size);
 
-  if (index != kIllegalCid) {
-    ASSERT(index > 0 && index < kNumPredefinedCids && index < top_);
-    ASSERT(table_.load()[index] == nullptr);
-    table_.load()[index] = cls.raw();
+  if (cid != kIllegalCid) {
+    ASSERT(cid > 0 && cid < kNumPredefinedCids && cid < top_);
+    ASSERT(table_.load()[cid] == nullptr);
+    table_.load()[cid] = cls.raw();
   } else {
     if (top_ == capacity_) {
       const intptr_t new_capacity = capacity_ + kCapacityIncrement;
@@ -177,6 +183,28 @@
   ASSERT(expected_cid == cls.id());
 }
 
+void ClassTable::RegisterTopLevel(const Class& cls) {
+  if (top_ >= std::numeric_limits<classid_t>::max()) {
+    FATAL1("Fatal error in ClassTable::RegisterTopLevel: invalid index %" Pd
+           "\n",
+           top_);
+  }
+
+  ASSERT(Thread::Current()->IsMutatorThread());
+
+  const intptr_t index = cls.id();
+  ASSERT(index == kIllegalCid);
+
+  if (tlc_top_ == tlc_capacity_) {
+    const intptr_t new_capacity = tlc_capacity_ + kCapacityIncrement;
+    GrowTopLevel(new_capacity);
+  }
+  ASSERT(tlc_top_ < tlc_capacity_);
+  cls.set_id(ClassTable::CidFromTopLevelIndex(tlc_top_));
+  tlc_table_.load()[tlc_top_] = cls.raw();
+  tlc_top_++;  // Increment next index.
+}
+
 intptr_t SharedClassTable::Register(intptr_t index, intptr_t size) {
   if (!Class::is_valid_id(top_)) {
     FATAL1("Fatal error in SharedClassTable::Register: invalid index %" Pd "\n",
@@ -202,6 +230,11 @@
 }
 
 void ClassTable::AllocateIndex(intptr_t index) {
+  if (IsTopLevelCid(index)) {
+    AllocateTopLevelIndex(index);
+    return;
+  }
+
   // This is called by a snapshot reader.
   shared_class_table_->AllocateIndex(index);
   ASSERT(Class::is_valid_id(index));
@@ -220,6 +253,21 @@
   ASSERT(capacity_ == shared_class_table_->capacity_);
 }
 
+void ClassTable::AllocateTopLevelIndex(intptr_t cid) {
+  ASSERT(IsTopLevelCid(cid));
+  const intptr_t tlc_index = IndexFromTopLevelCid(cid);
+
+  if (tlc_index >= tlc_capacity_) {
+    const intptr_t new_capacity = tlc_index + kCapacityIncrement;
+    GrowTopLevel(new_capacity);
+  }
+
+  ASSERT(tlc_table_.load()[tlc_index] == nullptr);
+  if (tlc_index >= tlc_top_) {
+    tlc_top_ = tlc_index + 1;
+  }
+}
+
 void ClassTable::Grow(intptr_t new_capacity) {
   ASSERT(new_capacity > capacity_);
 
@@ -243,6 +291,29 @@
   capacity_ = new_capacity;
 }
 
+void ClassTable::GrowTopLevel(intptr_t new_capacity) {
+  ASSERT(new_capacity > tlc_capacity_);
+
+  auto old_table = tlc_table_.load();
+  auto new_table = static_cast<ClassPtr*>(
+      malloc(new_capacity * sizeof(ClassPtr)));  // NOLINT
+  intptr_t i;
+  for (i = 0; i < tlc_capacity_; i++) {
+    // Don't use memmove, which changes this from a relaxed atomic operation
+    // to a non-atomic operation.
+    new_table[i] = old_table[i];
+  }
+  for (; i < new_capacity; i++) {
+    // Don't use memset, which changes this from a relaxed atomic operation
+    // to a non-atomic operation.
+    new_table[i] = 0;
+  }
+  old_class_tables_->Add(old_table);
+
+  tlc_table_.store(new_table);
+  tlc_capacity_ = new_capacity;
+}
+
 void SharedClassTable::AllocateIndex(intptr_t index) {
   // This is called by a snapshot reader.
   ASSERT(Class::is_valid_id(index));
@@ -320,9 +391,16 @@
   capacity_ = new_capacity;
 }
 
-void ClassTable::Unregister(intptr_t index) {
-  shared_class_table_->Unregister(index);
-  table_.load()[index] = nullptr;
+void ClassTable::Unregister(intptr_t cid) {
+  ASSERT(!IsTopLevelCid(cid));
+  shared_class_table_->Unregister(cid);
+  table_.load()[cid] = nullptr;
+}
+
+void ClassTable::UnregisterTopLevel(intptr_t cid) {
+  ASSERT(IsTopLevelCid(cid));
+  const intptr_t tlc_index = IndexFromTopLevelCid(cid);
+  tlc_table_.load()[tlc_index] = nullptr;
 }
 
 void SharedClassTable::Unregister(intptr_t index) {
@@ -376,6 +454,12 @@
     ObjectPtr* to = reinterpret_cast<ObjectPtr*>(&table[top_ - 1]);
     visitor->VisitPointers(from, to);
   }
+  if (tlc_top_ != 0) {
+    auto* tlc_table = tlc_table_.load();
+    ObjectPtr* from = reinterpret_cast<ObjectPtr*>(&tlc_table[0]);
+    ObjectPtr* to = reinterpret_cast<ObjectPtr*>(&tlc_table[tlc_top_ - 1]);
+    visitor->VisitPointers(from, to);
+  }
   visitor->clear_gc_root_type();
 }
 
@@ -420,13 +504,18 @@
   }
 }
 
-void ClassTable::SetAt(intptr_t index, ClassPtr raw_cls) {
+void ClassTable::SetAt(intptr_t cid, ClassPtr raw_cls) {
+  if (IsTopLevelCid(cid)) {
+    tlc_table_.load()[IndexFromTopLevelCid(cid)] = raw_cls;
+    return;
+  }
+
   // This is called by snapshot reader and class finalizer.
-  ASSERT(index < capacity_);
+  ASSERT(cid < capacity_);
   const intptr_t size =
       raw_cls == nullptr ? 0 : Class::host_instance_size(raw_cls);
-  shared_class_table_->SetSizeAt(index, size);
-  table_.load()[index] = raw_cls;
+  shared_class_table_->SetSizeAt(cid, size);
+  table_.load()[cid] = raw_cls;
 }
 
 #ifndef PRODUCT
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index 6bb42d2..8068db1 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -123,11 +123,7 @@
     ASSERT(cid < top_);
     trace_allocation_table_.load()[cid] = trace ? 1 : 0;
   }
-  bool TraceAllocationFor(intptr_t cid) {
-    ASSERT(cid > 0);
-    ASSERT(cid < top_);
-    return trace_allocation_table_.load()[cid] != 0;
-  }
+  bool TraceAllocationFor(intptr_t cid);
 #endif  // !defined(PRODUCT)
 
   void CopyBeforeHotReload(intptr_t** copy, intptr_t* copy_num_cids) {
@@ -258,20 +254,34 @@
 
   SharedClassTable* shared_class_table() const { return shared_class_table_; }
 
-  void CopyBeforeHotReload(ClassPtr** copy, intptr_t* copy_num_cids) {
+  void CopyBeforeHotReload(ClassPtr** copy,
+                           ClassPtr** tlc_copy,
+                           intptr_t* copy_num_cids,
+                           intptr_t* copy_num_tlc_cids) {
     // The [IsolateReloadContext] will need to maintain a copy of the old class
     // table until instances have been morphed.
     const intptr_t num_cids = NumCids();
-    const intptr_t bytes = sizeof(ClassPtr) * num_cids;
-    auto class_table = static_cast<ClassPtr*>(malloc(bytes));
+    const intptr_t num_tlc_cids = NumTopLevelCids();
+    auto class_table =
+        static_cast<ClassPtr*>(malloc(sizeof(ClassPtr) * num_cids));
+    auto tlc_class_table =
+        static_cast<ClassPtr*>(malloc(sizeof(ClassPtr) * num_tlc_cids));
+
+    // Don't use memmove, which changes this from a relaxed atomic operation
+    // to a non-atomic operation.
     auto table = table_.load();
     for (intptr_t i = 0; i < num_cids; i++) {
-      // Don't use memmove, which changes this from a relaxed atomic operation
-      // to a non-atomic operation.
       class_table[i] = table[i];
     }
-    *copy_num_cids = num_cids;
+    auto tlc_table = tlc_table_.load();
+    for (intptr_t i = 0; i < num_tlc_cids; i++) {
+      tlc_class_table[i] = tlc_table[i];
+    }
+
     *copy = class_table;
+    *tlc_copy = tlc_class_table;
+    *copy_num_cids = num_cids;
+    *copy_num_tlc_cids = num_tlc_cids;
   }
 
   void ResetBeforeHotReload() {
@@ -283,64 +293,79 @@
   }
 
   void ResetAfterHotReload(ClassPtr* old_table,
+                           ClassPtr* old_tlc_table,
                            intptr_t num_old_cids,
+                           intptr_t num_old_tlc_cids,
                            bool is_rollback) {
     // The [IsolateReloadContext] is no longer source-of-truth for GC after we
     // return, so we restore size information for all classes.
     if (is_rollback) {
-      SetNumCids(num_old_cids);
+      SetNumCids(num_old_cids, num_old_tlc_cids);
+
+      // Don't use memmove, which changes this from a relaxed atomic operation
+      // to a non-atomic operation.
       auto table = table_.load();
       for (intptr_t i = 0; i < num_old_cids; i++) {
-        // Don't use memmove, which changes this from a relaxed atomic operation
-        // to a non-atomic operation.
         table[i] = old_table[i];
       }
+      auto tlc_table = tlc_table_.load();
+      for (intptr_t i = 0; i < num_old_tlc_cids; i++) {
+        tlc_table[i] = old_tlc_table[i];
+      }
     } else {
       CopySizesFromClassObjects();
     }
 
-    // Can't free this table immediately as another thread (e.g., concurrent
+    // Can't free these tables immediately as another thread (e.g., concurrent
     // marker or sweeper) may be between loading the table pointer and loading
     // the table element. The table will be freed at the next major GC or
     // isolate shutdown.
     AddOldTable(old_table);
+    AddOldTable(old_tlc_table);
   }
 
   // Thread-safe.
-  ClassPtr At(intptr_t index) const {
-    ASSERT(IsValidIndex(index));
-    return table_.load()[index];
+  ClassPtr At(intptr_t cid) const {
+    ASSERT(IsValidIndex(cid));
+    if (IsTopLevelCid(cid)) {
+      return tlc_table_.load()[IndexFromTopLevelCid(cid)];
+    }
+    return table_.load()[cid];
   }
 
   intptr_t SizeAt(intptr_t index) const {
+    if (IsTopLevelCid(index)) {
+      return 0;
+    }
     return shared_class_table_->SizeAt(index);
   }
 
   void SetAt(intptr_t index, ClassPtr raw_cls);
 
-  bool IsValidIndex(intptr_t index) const {
-    return shared_class_table_->IsValidIndex(index);
+  bool IsValidIndex(intptr_t cid) const {
+    if (IsTopLevelCid(cid)) {
+      return IndexFromTopLevelCid(cid) < tlc_top_;
+    }
+    return shared_class_table_->IsValidIndex(cid);
   }
 
-  bool HasValidClassAt(intptr_t index) const {
-    ASSERT(IsValidIndex(index));
-    return table_.load()[index] != nullptr;
+  bool HasValidClassAt(intptr_t cid) const {
+    ASSERT(IsValidIndex(cid));
+    if (IsTopLevelCid(cid)) {
+      return tlc_table_.load()[IndexFromTopLevelCid(cid)] != nullptr;
+    }
+    return table_.load()[cid] != nullptr;
   }
 
   intptr_t NumCids() const { return shared_class_table_->NumCids(); }
+  intptr_t NumTopLevelCids() const { return tlc_top_; }
   intptr_t Capacity() const { return shared_class_table_->Capacity(); }
 
-  // Used to drop recently added classes.
-  void SetNumCids(intptr_t num_cids) {
-    shared_class_table_->SetNumCids(num_cids);
-
-    ASSERT(num_cids <= top_);
-    top_ = num_cids;
-  }
-
   void Register(const Class& cls);
+  void RegisterTopLevel(const Class& cls);
   void AllocateIndex(intptr_t index);
   void Unregister(intptr_t index);
+  void UnregisterTopLevel(intptr_t index);
 
   void Remap(intptr_t* old_to_new_cids);
 
@@ -374,6 +399,17 @@
   // Deallocates table copies. Do not call during concurrent access to table.
   void FreeOldTables();
 
+  static bool IsTopLevelCid(intptr_t cid) { return cid >= kTopLevelCidOffset; }
+
+  static intptr_t IndexFromTopLevelCid(intptr_t cid) {
+    ASSERT(IsTopLevelCid(cid));
+    return cid - kTopLevelCidOffset;
+  }
+
+  static intptr_t CidFromTopLevelIndex(intptr_t index) {
+    return kTopLevelCidOffset + index;
+  }
+
  private:
   friend class GCMarker;
   friend class MarkingWeakVisitor;
@@ -387,25 +423,55 @@
   static const int kInitialCapacity = SharedClassTable::kInitialCapacity;
   static const int kCapacityIncrement = SharedClassTable::kCapacityIncrement;
 
+  static const intptr_t kTopLevelCidOffset = (1 << 16);
+
   void AddOldTable(ClassPtr* old_table);
+  void AllocateTopLevelIndex(intptr_t index);
 
   void Grow(intptr_t index);
+  void GrowTopLevel(intptr_t index);
 
   ClassPtr* table() { return table_.load(); }
   void set_table(ClassPtr* table);
 
+  // Used to drop recently added classes.
+  void SetNumCids(intptr_t num_cids, intptr_t num_tlc_cids) {
+    shared_class_table_->SetNumCids(num_cids);
+
+    ASSERT(num_cids <= top_);
+    top_ = num_cids;
+
+    ASSERT(num_tlc_cids <= tlc_top_);
+    tlc_top_ = num_tlc_cids;
+  }
+
   intptr_t top_;
   intptr_t capacity_;
 
+  intptr_t tlc_top_;
+  intptr_t tlc_capacity_;
+
   // Copy-on-write is used for table_, with old copies stored in
   // old_class_tables_.
   AcqRelAtomic<ClassPtr*> table_;
+  AcqRelAtomic<ClassPtr*> tlc_table_;
   MallocGrowableArray<ClassPtr*>* old_class_tables_;
   SharedClassTable* shared_class_table_;
 
   DISALLOW_COPY_AND_ASSIGN(ClassTable);
 };
 
+#if !defined(PRODUCT)
+DART_FORCE_INLINE bool SharedClassTable::TraceAllocationFor(intptr_t cid) {
+  ASSERT(cid > 0);
+  if (ClassTable::IsTopLevelCid(cid)) {
+    return false;
+  }
+  ASSERT(cid < top_);
+  return trace_allocation_table_.load()[cid] != 0;
+}
+#endif  // !defined(PRODUCT)
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_CLASS_TABLE_H_
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index c9e1319..637cf2e 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -155,8 +155,10 @@
     ClassPtr cls = Class::RawCast(object);
     intptr_t class_id = cls->ptr()->id_;
 
-    // Classes expected to be dropped by the precompiler should not be traced.
-    ASSERT(class_id != kIllegalCid);
+    if (class_id == kIllegalCid) {
+      // Classes expected to be dropped by the precompiler should not be traced.
+      s->UnexpectedObject(cls, "Class with illegal cid");
+    }
     if (class_id < kNumPredefinedCids) {
       // These classes are allocated by Object::Init or Object::InitOnce, so the
       // deserializer must find them in the class table instead of allocating
@@ -224,7 +226,7 @@
     s->Write<uint32_t>(cls->ptr()->state_bits_);
 
     // In AOT, the bitmap of unboxed fields should also be serialized
-    if (FLAG_precompiled_mode) {
+    if (FLAG_precompiled_mode && !ClassTable::IsTopLevelCid(class_id)) {
       s->WriteUnsigned64(
           CalculateTargetUnboxedFieldsBitmap(s, class_id).Value());
     }
@@ -391,7 +393,7 @@
       table->AllocateIndex(class_id);
       table->SetAt(class_id, cls);
 
-      if (FLAG_precompiled_mode) {
+      if (FLAG_precompiled_mode && !ClassTable::IsTopLevelCid(class_id)) {
         const UnboxedFieldBitmap unboxed_fields_map(d->ReadUnsigned64());
         shared_class_table->SetUnboxedFieldsMapAt(class_id, unboxed_fields_map);
       }
@@ -1522,6 +1524,8 @@
     CodePtr code = Code::RawCast(object);
     objects_.Add(code);
 
+    s->InCurrentLoadingUnit(code, /*record*/ true);
+
     if (!(s->kind() == Snapshot::kFullAOT && FLAG_use_bare_instructions)) {
       s->Push(code->ptr()->object_pool_);
     }
@@ -1529,10 +1533,14 @@
     s->Push(code->ptr()->exception_handlers_);
     s->Push(code->ptr()->pc_descriptors_);
     s->Push(code->ptr()->catch_entry_);
-    s->Push(code->ptr()->compressed_stackmaps_);
+    if (s->InCurrentLoadingUnit(code->ptr()->compressed_stackmaps_)) {
+      s->Push(code->ptr()->compressed_stackmaps_);
+    }
     if (!FLAG_precompiled_mode || !FLAG_dwarf_stack_traces_mode) {
       s->Push(code->ptr()->inlined_id_to_function_);
-      s->Push(code->ptr()->code_source_map_);
+      if (s->InCurrentLoadingUnit(code->ptr()->code_source_map_)) {
+        s->Push(code->ptr()->code_source_map_);
+      }
     }
     if (s->kind() == Snapshot::kFullJIT) {
       s->Push(code->ptr()->deopt_info_array_);
@@ -1626,13 +1634,21 @@
       WriteField(code, exception_handlers_);
       WriteField(code, pc_descriptors_);
       WriteField(code, catch_entry_);
-      WriteField(code, compressed_stackmaps_);
+      if (s->InCurrentLoadingUnit(code->ptr()->compressed_stackmaps_)) {
+        WriteField(code, compressed_stackmaps_);
+      } else {
+        WriteFieldValue(compressed_stackmaps_, CompressedStackMaps::null());
+      }
       if (FLAG_precompiled_mode && FLAG_dwarf_stack_traces_mode) {
         WriteFieldValue(inlined_id_to_function_, Array::null());
         WriteFieldValue(code_source_map_, CodeSourceMap::null());
       } else {
         WriteField(code, inlined_id_to_function_);
-        WriteField(code, code_source_map_);
+        if (s->InCurrentLoadingUnit(code->ptr()->code_source_map_)) {
+          WriteField(code, code_source_map_);
+        } else {
+          WriteFieldValue(code_source_map_, CodeSourceMap::null());
+        }
       }
       if (kind == Snapshot::kFullJIT) {
         WriteField(code, deopt_info_array_);
@@ -2927,6 +2943,73 @@
 };
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
+class LoadingUnitSerializationCluster : public SerializationCluster {
+ public:
+  LoadingUnitSerializationCluster() : SerializationCluster("LoadingUnit") {}
+  ~LoadingUnitSerializationCluster() {}
+
+  void Trace(Serializer* s, ObjectPtr object) {
+    LoadingUnitPtr unit = LoadingUnit::RawCast(object);
+    objects_.Add(unit);
+    s->Push(unit->ptr()->parent_);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    s->WriteCid(kLoadingUnitCid);
+    const intptr_t count = objects_.length();
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      LoadingUnitPtr unit = objects_[i];
+      s->AssignRef(unit);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      LoadingUnitPtr unit = objects_[i];
+      AutoTraceObject(unit);
+      WriteField(unit, parent_);
+      s->Write<int32_t>(unit->ptr()->id_);
+    }
+  }
+
+ private:
+  GrowableArray<LoadingUnitPtr> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class LoadingUnitDeserializationCluster : public DeserializationCluster {
+ public:
+  LoadingUnitDeserializationCluster() {}
+  ~LoadingUnitDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    start_index_ = d->next_index();
+    PageSpace* old_space = d->heap()->old_space();
+    const intptr_t count = d->ReadUnsigned();
+    for (intptr_t i = 0; i < count; i++) {
+      d->AssignRef(
+          AllocateUninitialized(old_space, LoadingUnit::InstanceSize()));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      LoadingUnitPtr unit = static_cast<LoadingUnitPtr>(d->Ref(id));
+      Deserializer::InitializeHeader(unit, kLoadingUnitCid,
+                                     LoadingUnit::InstanceSize());
+      unit->ptr()->parent_ = static_cast<LoadingUnitPtr>(d->ReadRef());
+      unit->ptr()->base_objects_ = Array::null();
+      unit->ptr()->id_ = d->Read<int32_t>();
+      unit->ptr()->loaded_ = false;
+      unit->ptr()->load_outstanding_ = false;
+    }
+  }
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
 class LanguageErrorSerializationCluster : public SerializationCluster {
  public:
   LanguageErrorSerializationCluster() : SerializationCluster("LanguageError") {}
@@ -4794,6 +4877,7 @@
       clusters_by_cid_(NULL),
       stack_(),
       num_cids_(0),
+      num_tlc_cids_(0),
       num_base_objects_(0),
       num_written_objects_(0),
       next_ref_index_(1),
@@ -4811,6 +4895,7 @@
 #endif
 {
   num_cids_ = thread->isolate()->class_table()->NumCids();
+  num_tlc_cids_ = thread->isolate()->class_table()->NumTopLevelCids();
   clusters_by_cid_ = new SerializationCluster*[num_cids_];
   for (intptr_t i = 0; i < num_cids_; i++) {
     clusters_by_cid_[i] = NULL;
@@ -5009,7 +5094,7 @@
 
   switch (cid) {
     case kClassCid:
-      return new (Z) ClassSerializationCluster(num_cids_);
+      return new (Z) ClassSerializationCluster(num_cids_ + num_tlc_cids_);
     case kTypeArgumentsCid:
       return new (Z) TypeArgumentsSerializationCluster();
     case kPatchClassCid:
@@ -5058,6 +5143,8 @@
       return new (Z) MegamorphicCacheSerializationCluster();
     case kSubtypeTestCacheCid:
       return new (Z) SubtypeTestCacheSerializationCluster();
+    case kLoadingUnitCid:
+      return new (Z) LoadingUnitSerializationCluster();
     case kLanguageErrorCid:
       return new (Z) LanguageErrorSerializationCluster();
     case kUnhandledExceptionCid:
@@ -5110,6 +5197,24 @@
 #endif  // !DART_PRECOMPILED_RUNTIME
 }
 
+bool Serializer::InCurrentLoadingUnit(ObjectPtr obj, bool record) {
+  if (loading_units_ == nullptr) return true;
+
+  intptr_t unit_id = heap_->GetLoadingUnit(obj);
+  if (unit_id == WeakTable::kNoValue) {
+    // Not found in early assignment. Conservatively choose the root.
+    // TODO(41974): Are these always type testing stubs?
+    unit_id = LoadingUnit::kRootId;
+  }
+  if (unit_id != current_loading_unit_id_) {
+    if (record) {
+      (*loading_units_)[unit_id]->AddDeferredObject(obj);
+    }
+    return false;
+  }
+  return true;
+}
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
 void Serializer::WriteInstructions(InstructionsPtr instr,
                                    uint32_t unchecked_offset,
@@ -5117,6 +5222,11 @@
                                    intptr_t index) {
   ASSERT(code != Code::null());
 
+  if (!InCurrentLoadingUnit(code)) {
+    Write<uint32_t>(0);
+    return;
+  }
+
   const intptr_t offset = image_writer_->GetTextOffsetFor(instr, code);
 #if defined(DART_PRECOMPILER)
   if (profile_writer_ != nullptr) {
@@ -5331,44 +5441,6 @@
     Trace(stack_.RemoveLast());
   }
 
-  intptr_t code_order_length = 0;
-#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
-  if ((kind_ == Snapshot::kFullAOT) && FLAG_use_bare_instructions) {
-    auto code_objects =
-        static_cast<CodeSerializationCluster*>(clusters_by_cid_[kCodeCid])
-            ->discovered_objects();
-
-    GrowableArray<ImageWriterCommand> writer_commands;
-    RelocateCodeObjects(vm_, code_objects, &writer_commands);
-    image_writer_->PrepareForSerialization(&writer_commands);
-
-    // We permute the code objects in the [CodeSerializationCluster] so they
-    // will arrive in the order in which the [Code]'s instructions will be in
-    // memory at AOT runtime.
-    GrowableArray<CodePtr> code_order;
-    RawCodeSet code_set;
-    for (auto& command : writer_commands) {
-      if (command.op == ImageWriterCommand::InsertInstructionOfCode) {
-        CodePtr code = command.insert_instruction_of_code.code;
-        ASSERT(!code_set.HasKey(code));
-        code_set.Insert(code);
-        code_order.Add(code);
-        code_order_length++;
-      }
-    }
-    for (CodePtr code : *code_objects) {
-      if (!code_set.HasKey(code)) {
-        code_set.Insert(code);
-        code_order.Add(code);
-      }
-    }
-    RELEASE_ASSERT(code_order.length() == code_objects->length());
-    for (intptr_t i = 0; i < code_objects->length(); ++i) {
-      (*code_objects)[i] = code_order[i];
-    }
-  }
-#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
-
   intptr_t num_clusters = 0;
   for (intptr_t cid = 1; cid < num_cids_; cid++) {
     SerializationCluster* cluster = clusters_by_cid_[cid];
@@ -5377,6 +5449,8 @@
     }
   }
 
+  intptr_t code_order_length = PrepareCodeOrder();
+
 #if defined(DART_PRECOMPILER)
   // Before we finalize the count of written objects, pick canonical versions
   // of WSR objects that will be serialized and then remove any non-serialized
@@ -5417,6 +5491,12 @@
   // We should have assigned a ref to every object we pushed.
   ASSERT((next_ref_index_ - 1) == num_objects);
 
+  if (loading_units_ != nullptr) {
+    LoadingUnitSerializationData* unit =
+        (*loading_units_)[current_loading_unit_id_];
+    unit->set_num_objects(num_objects);
+  }
+
 #if defined(DART_PRECOMPILER)
   // When writing snapshot profile, we want to retain some of the program
   // structure information (e.g. information about libraries, classes and
@@ -5437,6 +5517,48 @@
     }
   }
 }
+
+intptr_t Serializer::PrepareCodeOrder() {
+  intptr_t code_order_length = 0;
+#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
+  if ((kind_ == Snapshot::kFullAOT) && FLAG_use_bare_instructions) {
+    auto code_objects =
+        static_cast<CodeSerializationCluster*>(clusters_by_cid_[kCodeCid])
+            ->discovered_objects();
+
+    GrowableArray<ImageWriterCommand> writer_commands;
+    RelocateCodeObjects(vm_, code_objects, &writer_commands);
+    image_writer_->PrepareForSerialization(&writer_commands);
+
+    // We permute the code objects in the x[CodeSerializationCluster] so they
+    // will arrive in the order in which the [Code]'s instructions will be in
+    // memory at AOT runtime.
+    GrowableArray<CodePtr> code_order;
+    RawCodeSet code_set;
+    for (auto& command : writer_commands) {
+      if (command.op == ImageWriterCommand::InsertInstructionOfCode) {
+        CodePtr code = command.insert_instruction_of_code.code;
+        ASSERT(!code_set.HasKey(code));
+        code_set.Insert(code);
+        code_order.Add(code);
+        code_order_length++;
+      }
+    }
+    for (CodePtr code : *code_objects) {
+      if (!code_set.HasKey(code)) {
+        code_set.Insert(code);
+        code_order.Add(code);
+      }
+    }
+    RELEASE_ASSERT(code_order.length() == code_objects->length());
+    for (intptr_t i = 0; i < code_objects->length(); ++i) {
+      (*code_objects)[i] = code_order[i];
+    }
+  }
+#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
+  return code_order_length;
+}
+
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 #if defined(DART_PRECOMPILER) || defined(DART_PRECOMPILED_RUNTIME)
@@ -5562,7 +5684,8 @@
 void Serializer::PrintSnapshotSizes() {
 #if !defined(DART_PRECOMPILED_RUNTIME)
   if (FLAG_print_snapshot_sizes_verbose) {
-    OS::PrintErr("             Cluster   Objs     Size Fraction Cumulative\n");
+    OS::PrintErr(
+        "                  Cluster   Objs     Size Fraction Cumulative\n");
     GrowableArray<SerializationCluster*> clusters_by_size;
     for (intptr_t cid = 1; cid < num_cids_; cid++) {
       SerializationCluster* cluster = clusters_by_cid_[cid];
@@ -5606,7 +5729,7 @@
       SerializationCluster* cluster = clusters_by_size[i];
       double fraction = static_cast<double>(cluster->size()) / total_size;
       cumulative_fraction += fraction;
-      OS::PrintErr("%20s %6" Pd " %8" Pd " %lf %lf\n", cluster->name(),
+      OS::PrintErr("%25s %6" Pd " %8" Pd " %lf %lf\n", cluster->name(),
                    cluster->num_objects(), cluster->size(), fraction,
                    cumulative_fraction);
     }
@@ -5731,6 +5854,8 @@
 static const char* kObjectStoreFieldNames[] = {
 #define DECLARE_OBJECT_STORE_FIELD(Type, Name) #Name,
     OBJECT_STORE_FIELD_LIST(DECLARE_OBJECT_STORE_FIELD,
+                            DECLARE_OBJECT_STORE_FIELD,
+                            DECLARE_OBJECT_STORE_FIELD,
                             DECLARE_OBJECT_STORE_FIELD)
 #undef DECLARE_OBJECT_STORE_FIELD
 };
@@ -5747,8 +5872,8 @@
     }
   } else {
     // Base objects carried over from WriteVMSnapshot.
-    num_base_objects_ += num_base_objects;
-    next_ref_index_ += num_base_objects;
+    num_base_objects_ = num_base_objects;
+    next_ref_index_ = num_base_objects + 1;
   }
 
   // Push roots.
@@ -5819,7 +5944,56 @@
 
   PrintSnapshotSizes();
 
-  heap_->ResetObjectIdTable();
+  // TODO(rmacnak): This also carries over object ids from loading units that
+  // aren't dominators. It would be more robust to remember the written objects
+  // in each loading and re-assign objects when setting up the base objects.
+  // Then a reference to a non-dominating object would produce an error instead
+  // of corruption.
+  if (kind() != Snapshot::kFullAOT) {
+    heap_->ResetObjectIdTable();
+  }
+}
+
+void Serializer::WriteUnitSnapshot(LoadingUnitSerializationData* unit,
+                                   uint32_t program_hash) {
+  Write(program_hash);
+
+  NoSafepointScope no_safepoint;
+
+  intptr_t num_base_objects = unit->parent()->num_objects();
+  ASSERT(num_base_objects != 0);
+  num_base_objects_ = num_base_objects;
+  next_ref_index_ = num_base_objects + 1;
+
+  intptr_t num_deferred_objects = unit->deferred_objects()->length();
+  for (intptr_t i = 0; i < num_deferred_objects; i++) {
+    const Object* deferred_object = (*unit->deferred_objects())[i];
+    ASSERT(deferred_object->IsCode());
+    CodePtr code = static_cast<CodePtr>(deferred_object->raw());
+    Push(code->ptr()->compressed_stackmaps_);
+    Push(code->ptr()->code_source_map_);
+  }
+
+  Serialize();
+
+  Write(num_deferred_objects);
+  for (intptr_t i = 0; i < num_deferred_objects; i++) {
+    const Object* deferred_object = (*unit->deferred_objects())[i];
+    ASSERT(deferred_object->IsCode());
+    CodePtr code = static_cast<CodePtr>(deferred_object->raw());
+    WriteRootRef(code, "deferred-code");
+    WriteInstructions(code->ptr()->instructions_,
+                      code->ptr()->unchecked_offset_, code, -1);
+    WriteRootRef(code->ptr()->compressed_stackmaps_, "deferred-code");
+    WriteRootRef(code->ptr()->code_source_map_, "deferred-code");
+  }
+
+  FlushBytesWrittenToRoot();
+  object_currently_writing_.stream_start_ = stream_.Position();
+
+#if defined(DEBUG)
+  Write<int32_t>(kSectionMarker);
+#endif
 }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
@@ -5934,6 +6108,8 @@
       return new (Z) MegamorphicCacheDeserializationCluster();
     case kSubtypeTestCacheCid:
       return new (Z) SubtypeTestCacheDeserializationCluster();
+    case kLoadingUnitCid:
+      return new (Z) LoadingUnitDeserializationCluster();
     case kLanguageErrorCid:
       return new (Z) LanguageErrorDeserializationCluster();
     case kUnhandledExceptionCid:
@@ -6222,8 +6398,15 @@
 #endif
 
   const uint32_t offset = Read<uint32_t>();
-  InstructionsPtr instr = image_reader_->GetInstructionsAt(offset);
-  uint32_t unchecked_offset = ReadUnsigned();
+  InstructionsPtr instr;
+  uint32_t unchecked_offset;
+  if (offset == 0) {
+    instr = StubCode::NotLoaded().instructions();
+    unchecked_offset = 0;
+  } else {
+    instr = image_reader_->GetInstructionsAt(offset);
+    unchecked_offset = ReadUnsigned();
+  }
 
   code->ptr()->instructions_ = instr;
 #if defined(DART_PRECOMPILED_RUNTIME)
@@ -6456,12 +6639,86 @@
   for (intptr_t i = 0; i < num_clusters_; i++) {
     clusters_[i]->PostLoad(refs, kind_, zone_);
   }
+  const Array& units = Array::Handle(isolate->object_store()->loading_units());
+  if (!units.IsNull()) {
+    LoadingUnit& unit = LoadingUnit::Handle();
+    unit ^= units.At(LoadingUnit::kRootId);
+    unit.set_base_objects(refs);
+  }
   isolate->isolate_object_store()->PreallocateObjects();
 
   // Setup native resolver for bootstrap impl.
   Bootstrap::SetupNativeResolver();
 }
 
+ApiErrorPtr Deserializer::ReadUnitSnapshot(const LoadingUnit& unit) {
+  Array& units =
+      Array::Handle(thread()->isolate()->object_store()->loading_units());
+  uint32_t main_program_hash = Smi::Value(Smi::RawCast(units.At(0)));
+  uint32_t unit_program_hash = Read<uint32_t>();
+  if (main_program_hash != unit_program_hash) {
+    return ApiError::New(
+        String::Handle(String::New("Deferred loading unit is from a different "
+                                   "program than the main loading unit")));
+  }
+
+  Array& refs = Array::Handle();
+  Prepare();
+
+  {
+    NoSafepointScope no_safepoint;
+    HeapLocker hl(thread(), heap_->old_space());
+
+    // N.B.: Skipping index 0 because ref 0 is illegal.
+    const Array& base_objects =
+        Array::Handle(LoadingUnit::Handle(unit.parent()).base_objects());
+    for (intptr_t i = 1; i < base_objects.Length(); i++) {
+      AddBaseObject(base_objects.At(i));
+    }
+
+    Deserialize();
+
+    intptr_t num_deferred = Read<intptr_t>();
+    for (intptr_t i = 0; i < num_deferred; i++) {
+      CodePtr code = static_cast<CodePtr>(ReadRef());
+      ReadInstructions(code, -1, -1);
+      if (code->ptr()->owner_->IsFunction()) {
+        FunctionPtr func = static_cast<FunctionPtr>(code->ptr()->owner_);
+        uword entry_point = code->ptr()->entry_point_;
+        ASSERT(entry_point != 0);
+        func->ptr()->entry_point_ = entry_point;
+        uword unchecked_entry_point = code->ptr()->unchecked_entry_point_;
+        ASSERT(unchecked_entry_point != 0);
+        func->ptr()->unchecked_entry_point_ = unchecked_entry_point;
+      }
+      code->ptr()->compressed_stackmaps_ =
+          static_cast<CompressedStackMapsPtr>(ReadRef());
+      code->ptr()->code_source_map_ = static_cast<CodeSourceMapPtr>(ReadRef());
+    }
+
+#if defined(DEBUG)
+    int32_t section_marker = Read<int32_t>();
+    ASSERT(section_marker == kSectionMarker);
+#endif
+
+    refs = refs_;
+    refs_ = NULL;
+  }
+
+#if defined(DEBUG)
+  Isolate* isolate = thread()->isolate();
+  isolate->ValidateClassTable();
+  isolate->heap()->Verify();
+#endif
+
+  for (intptr_t i = 0; i < num_clusters_; i++) {
+    clusters_[i]->PostLoad(refs, kind_, zone_);
+  }
+  unit.set_base_objects(refs);
+
+  return ApiError::null();
+}
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
 FullSnapshotWriter::FullSnapshotWriter(Snapshot::Kind kind,
                                        uint8_t** vm_snapshot_data_buffer,
@@ -6536,12 +6793,16 @@
   return num_objects;
 }
 
-void FullSnapshotWriter::WriteProgramSnapshot(intptr_t num_base_objects) {
+void FullSnapshotWriter::WriteProgramSnapshot(
+    intptr_t num_base_objects,
+    GrowableArray<LoadingUnitSerializationData*>* units) {
   TIMELINE_DURATION(thread(), Isolate, "WriteProgramSnapshot");
 
   Serializer serializer(thread(), kind_, isolate_snapshot_data_buffer_, alloc_,
                         kInitialSize, isolate_image_writer_, /*vm=*/false,
                         profile_writer_);
+  serializer.set_loading_units(units);
+  serializer.set_current_loading_unit_id(LoadingUnit::kRootId);
   ObjectStore* object_store = isolate()->object_store();
   ASSERT(object_store != NULL);
 
@@ -6577,7 +6838,43 @@
   isolate_snapshot_size_ = serializer.bytes_written();
 }
 
-void FullSnapshotWriter::WriteFullSnapshot() {
+void FullSnapshotWriter::WriteUnitSnapshot(
+    GrowableArray<LoadingUnitSerializationData*>* units,
+    LoadingUnitSerializationData* unit,
+    uint32_t program_hash) {
+  TIMELINE_DURATION(thread(), Isolate, "WriteUnitSnapshot");
+
+  Serializer serializer(thread(), kind_, isolate_snapshot_data_buffer_, alloc_,
+                        kInitialSize, isolate_image_writer_, /*vm=*/false,
+                        profile_writer_);
+  serializer.set_loading_units(units);
+  serializer.set_current_loading_unit_id(unit->id());
+
+  serializer.ReserveHeader();
+  serializer.WriteVersionAndFeatures(false);
+  serializer.WriteUnitSnapshot(unit, program_hash);
+  serializer.FillHeader(serializer.kind());
+  clustered_isolate_size_ = serializer.bytes_written();
+
+  if (Snapshot::IncludesCode(kind_)) {
+    isolate_image_writer_->SetProfileWriter(profile_writer_);
+    isolate_image_writer_->Write(serializer.stream(), false);
+#if defined(DART_PRECOMPILER)
+    isolate_image_writer_->DumpStatistics();
+#endif
+
+    mapped_data_size_ += isolate_image_writer_->data_size();
+    mapped_text_size_ += isolate_image_writer_->text_size();
+    isolate_image_writer_->ResetOffsets();
+    isolate_image_writer_->ClearProfileWriter();
+  }
+
+  // The clustered part + the direct mapped data part.
+  isolate_snapshot_size_ = serializer.bytes_written();
+}
+
+void FullSnapshotWriter::WriteFullSnapshot(
+    GrowableArray<LoadingUnitSerializationData*>* data) {
   intptr_t num_base_objects;
   if (vm_snapshot_data_buffer() != NULL) {
     num_base_objects = WriteVMSnapshot();
@@ -6587,7 +6884,7 @@
   }
 
   if (isolate_snapshot_data_buffer() != NULL) {
-    WriteProgramSnapshot(num_base_objects);
+    WriteProgramSnapshot(num_base_objects, data);
   }
 
   if (FLAG_print_snapshot_sizes) {
@@ -6714,14 +7011,14 @@
 #undef SET_FLAG
 
 #if defined(DART_PRECOMPILED_RUNTIME)
-    if (FLAG_null_safety == kNullSafetyOptionUnspecified) {
+    if (FLAG_sound_null_safety == kNullSafetyOptionUnspecified) {
       if (strncmp(cursor, "null-safety", end - cursor) == 0) {
-        FLAG_null_safety = kNullSafetyOptionStrong;
+        FLAG_sound_null_safety = kNullSafetyOptionStrong;
         cursor = end;
         continue;
       }
       if (strncmp(cursor, "no-null-safety", end - cursor) == 0) {
-        FLAG_null_safety = kNullSafetyOptionWeak;
+        FLAG_sound_null_safety = kNullSafetyOptionWeak;
         cursor = end;
         continue;
       }
@@ -6846,6 +7143,49 @@
   auto object_store = thread_->isolate()->object_store();
   deserializer.ReadProgramSnapshot(object_store);
 
+  PatchGlobalObjectPool();
+  InitializeBSS();
+
+  return ApiError::null();
+}
+
+ApiErrorPtr FullSnapshotReader::ReadUnitSnapshot(const LoadingUnit& unit) {
+  SnapshotHeaderReader header_reader(kind_, buffer_, size_);
+  intptr_t offset = 0;
+  char* error =
+      header_reader.VerifyVersionAndFeatures(thread_->isolate(), &offset);
+  if (error != nullptr) {
+    return ConvertToApiError(error);
+  }
+
+  Deserializer deserializer(thread_, kind_, buffer_, size_, data_image_,
+                            instructions_image_, offset);
+  ApiErrorPtr api_error = deserializer.VerifyImageAlignment();
+  if (api_error != ApiError::null()) {
+    return api_error;
+  }
+
+  if (Snapshot::IncludesCode(kind_)) {
+    ASSERT(data_image_ != NULL);
+    thread_->isolate()->SetupImagePage(data_image_,
+                                       /* is_executable */ false);
+    ASSERT(instructions_image_ != NULL);
+    thread_->isolate()->SetupImagePage(instructions_image_,
+                                       /* is_executable */ true);
+  }
+
+  api_error = deserializer.ReadUnitSnapshot(unit);
+  if (api_error != ApiError::null()) {
+    return api_error;
+  }
+
+  PatchGlobalObjectPool();
+  InitializeBSS();
+
+  return ApiError::null();
+}
+
+void FullSnapshotReader::PatchGlobalObjectPool() {
 #if defined(DART_PRECOMPILED_RUNTIME)
   if (FLAG_use_bare_instructions) {
     // By default, every switchable call site will put (ic_data, code) into the
@@ -6859,7 +7199,8 @@
     // existing UnlinkedCall entries in the object pool to be it's entrypoint.
     auto zone = thread_->zone();
     const auto& pool = ObjectPool::Handle(
-        zone, ObjectPool::RawCast(object_store->global_object_pool()));
+        zone, ObjectPool::RawCast(
+                  thread_->isolate()->object_store()->global_object_pool()));
     auto& entry = Object::Handle(zone);
     auto& smi = Smi::Handle(zone);
     for (intptr_t i = 0; i < pool.Length(); i++) {
@@ -6881,7 +7222,11 @@
       }
     }
   }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+}
 
+void FullSnapshotReader::InitializeBSS() {
+#if defined(DART_PRECOMPILED_RUNTIME)
   // Initialize entries in the isolate portion of the BSS segment.
   ASSERT(Snapshot::IncludesCode(kind_));
   Image image(instructions_image_);
@@ -6893,8 +7238,6 @@
     BSS::Initialize(thread_, bss_start, /*vm=*/false);
   }
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
-
-  return ApiError::null();
 }
 
 }  // namespace dart
diff --git a/runtime/vm/clustered_snapshot.h b/runtime/vm/clustered_snapshot.h
index 9adda50..252be23 100644
--- a/runtime/vm/clustered_snapshot.h
+++ b/runtime/vm/clustered_snapshot.h
@@ -26,13 +26,6 @@
 
 namespace dart {
 
-// Forward declarations.
-class Serializer;
-class Deserializer;
-class ObjectStore;
-class ImageWriter;
-class ImageReader;
-
 // For full snapshots, we use a clustered snapshot format that trades longer
 // serialization time for faster deserialization time and smaller snapshots.
 // Objects are clustered by class to allow writing type information once per
@@ -50,6 +43,37 @@
 // require the graph has been fully loaded, such as rehashing, though most
 // clusters do not require fixups.
 
+// Forward declarations.
+class Serializer;
+class Deserializer;
+class ObjectStore;
+class ImageWriter;
+class ImageReader;
+
+class LoadingUnitSerializationData : public ZoneAllocated {
+ public:
+  LoadingUnitSerializationData(intptr_t id,
+                               LoadingUnitSerializationData* parent)
+      : id_(id), parent_(parent), deferred_objects_(), num_objects_(0) {}
+
+  intptr_t id() const { return id_; }
+  LoadingUnitSerializationData* parent() const { return parent_; }
+  intptr_t num_objects() const { return num_objects_; }
+  void set_num_objects(intptr_t value) { num_objects_ = value; }
+  void AddDeferredObject(ObjectPtr obj) {
+    deferred_objects_.Add(&Object::ZoneHandle(obj));
+  }
+  GrowableArray<const Object*>* deferred_objects() {
+    return &deferred_objects_;
+  }
+
+ private:
+  intptr_t id_;
+  LoadingUnitSerializationData* parent_;
+  GrowableArray<const Object*> deferred_objects_;
+  intptr_t num_objects_;
+};
+
 class SerializationCluster : public ZoneAllocated {
  public:
   explicit SerializationCluster(const char* name)
@@ -142,7 +166,8 @@
   // Reference value for objects that either are not reachable from the roots or
   // should never have a reference in the snapshot (because they are dropped,
   // for example). Should be the default value for Heap::GetObjectId.
-  static const intptr_t kUnreachableReference = 0;
+  static constexpr intptr_t kUnreachableReference = 0;
+  COMPILE_ASSERT(kUnreachableReference == WeakTable::kNoValue);
 
   static constexpr bool IsReachableReference(intptr_t ref) {
     return ref == kUnallocatedReference || IsAllocatedReference(ref);
@@ -163,6 +188,8 @@
   intptr_t WriteVMSnapshot(const Array& symbols);
   void WriteProgramSnapshot(intptr_t num_base_objects,
                             ObjectStore* object_store);
+  void WriteUnitSnapshot(LoadingUnitSerializationData* unit,
+                         uint32_t program_hash);
 
   void AddVMIsolateBaseObjects();
 
@@ -384,6 +411,7 @@
   void TraceDataOffset(uint32_t offset);
   intptr_t GetDataSize() const;
 
+  intptr_t PrepareCodeOrder();
   void WriteDispatchTable(const Array& entries);
 
   Snapshot::Kind kind() const { return kind_; }
@@ -399,6 +427,14 @@
   // Returns true if [obj] has an artificial profile node associated with it.
   bool CreateArtificalNodeIfNeeded(ObjectPtr obj);
 
+  bool InCurrentLoadingUnit(ObjectPtr obj, bool record = false);
+  void set_loading_units(GrowableArray<LoadingUnitSerializationData*>* units) {
+    loading_units_ = units;
+  }
+  void set_current_loading_unit_id(intptr_t id) {
+    current_loading_unit_id_ = id;
+  }
+
  private:
   static const char* ReadOnlyObjectType(intptr_t cid);
 
@@ -451,6 +487,7 @@
   SerializationCluster** clusters_by_cid_;
   GrowableArray<ObjectPtr> stack_;
   intptr_t num_cids_;
+  intptr_t num_tlc_cids_;
   intptr_t num_base_objects_;
   intptr_t num_written_objects_;
   intptr_t next_ref_index_;
@@ -480,6 +517,9 @@
   IntMap<intptr_t> deduped_instructions_sources_;
 #endif
 
+  intptr_t current_loading_unit_id_ = 0;
+  GrowableArray<LoadingUnitSerializationData*>* loading_units_ = nullptr;
+
   DISALLOW_IMPLICIT_CONSTRUCTORS(Serializer);
 };
 
@@ -576,6 +616,7 @@
   ApiErrorPtr VerifyImageAlignment();
 
   void ReadProgramSnapshot(ObjectStore* object_store);
+  ApiErrorPtr ReadUnitSnapshot(const LoadingUnit& unit);
   void ReadVMSnapshot();
 
   void AddVMIsolateBaseObjects();
@@ -719,7 +760,11 @@
   Heap* heap() const { return isolate()->heap(); }
 
   // Writes a full snapshot of the program(VM isolate, regular isolate group).
-  void WriteFullSnapshot();
+  void WriteFullSnapshot(
+      GrowableArray<LoadingUnitSerializationData*>* data = nullptr);
+  void WriteUnitSnapshot(GrowableArray<LoadingUnitSerializationData*>* units,
+                         LoadingUnitSerializationData* unit,
+                         uint32_t program_hash);
 
   intptr_t VmIsolateSnapshotSize() const { return vm_isolate_snapshot_size_; }
   intptr_t IsolateSnapshotSize() const { return isolate_snapshot_size_; }
@@ -729,7 +774,8 @@
   intptr_t WriteVMSnapshot();
 
   // Writes a full snapshot of regular Dart isolate group.
-  void WriteProgramSnapshot(intptr_t num_base_objects);
+  void WriteProgramSnapshot(intptr_t num_base_objects,
+                            GrowableArray<LoadingUnitSerializationData*>* data);
 
   Thread* thread_;
   Snapshot::Kind kind_;
@@ -761,9 +807,12 @@
 
   ApiErrorPtr ReadVMSnapshot();
   ApiErrorPtr ReadProgramSnapshot();
+  ApiErrorPtr ReadUnitSnapshot(const LoadingUnit& unit);
 
  private:
   ApiErrorPtr ConvertToApiError(char* message);
+  void PatchGlobalObjectPool();
+  void InitializeBSS();
 
   Snapshot::Kind kind_;
   Thread* thread_;
diff --git a/runtime/vm/code_descriptors.cc b/runtime/vm/code_descriptors.cc
index aaaa159..a462905 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -271,7 +271,7 @@
                               list_[i].is_generated);
       handlers.SetHandledTypes(i, Array::empty_array());
     } else {
-      const bool has_catch_all = ContainsDynamic(*list_[i].handler_types);
+      const bool has_catch_all = ContainsCatchAllType(*list_[i].handler_types);
       handlers.SetHandlerInfo(i, list_[i].outer_try_index, list_[i].pc_offset,
                               list_[i].needs_stacktrace, has_catch_all,
                               list_[i].is_generated);
diff --git a/runtime/vm/code_descriptors.h b/runtime/vm/code_descriptors.h
index 8b74bde..6f89c91 100644
--- a/runtime/vm/code_descriptors.h
+++ b/runtime/vm/code_descriptors.h
@@ -190,9 +190,11 @@
     list_[try_index].needs_stacktrace = true;
   }
 
-  static bool ContainsDynamic(const Array& array) {
+  static bool ContainsCatchAllType(const Array& array) {
+    auto& type = AbstractType::Handle();
     for (intptr_t i = 0; i < array.Length(); i++) {
-      if (array.At(i) == Type::DynamicType()) {
+      type ^= array.At(i);
+      if (type.IsCatchAllType()) {
         return true;
       }
     }
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.cc b/runtime/vm/compiler/aot/aot_call_specializer.cc
index 579659b..6493a81 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.cc
+++ b/runtime/vm/compiler/aot/aot_call_specializer.cc
@@ -52,11 +52,11 @@
 static void GetUniqueDynamicTarget(Isolate* isolate,
                                    const String& fname,
                                    Object* function) {
-  UniqueFunctionsSet functions_set(
+  UniqueFunctionsMap functions_map(
       isolate->object_store()->unique_dynamic_targets());
   ASSERT(fname.IsSymbol());
-  *function = functions_set.GetOrNull(fname);
-  ASSERT(functions_set.Release().raw() ==
+  *function = functions_map.GetOrNull(fname);
+  ASSERT(functions_map.Release().raw() ==
          isolate->object_store()->unique_dynamic_targets());
 }
 
diff --git a/runtime/vm/compiler/aot/dispatch_table_generator.cc b/runtime/vm/compiler/aot/dispatch_table_generator.cc
index af7a1e1..073a227 100644
--- a/runtime/vm/compiler/aot/dispatch_table_generator.cc
+++ b/runtime/vm/compiler/aot/dispatch_table_generator.cc
@@ -420,8 +420,12 @@
   const auto& info = KernelProgramInfo::Handle(Z, script.kernel_program_info());
   kernel::TableSelectorMetadata* metadata =
       kernel::TableSelectorMetadataForProgram(info, Z);
-  // This assert will fail if gen_kernel was run in non-AOT mode or without TFA.
-  RELEASE_ASSERT(metadata != nullptr);
+  // Errors out if gen_kernel was run in non-AOT mode or without TFA.
+  if (metadata == nullptr) {
+    FATAL(
+        "Missing table selector metadata!\n"
+        "Probably gen_kernel was run in non-AOT mode or without TFA.\n");
+  }
   for (intptr_t i = 0; i < metadata->selectors.length(); i++) {
     const kernel::TableSelectorInfo* info = &metadata->selectors[i];
     selector_map_.AddSelector(info->call_count, info->called_on_null,
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index e4af5d3..c604a7c 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -900,7 +900,7 @@
     return;
   }
 
-  const Class& cls = Class::Handle(Z, instance.clazz());
+  Class& cls = Class::Handle(Z, instance.clazz());
   AddInstantiatedClass(cls);
 
   if (instance.IsClosure()) {
@@ -918,6 +918,17 @@
     return;
   }
 
+  if (instance.IsLibraryPrefix()) {
+    const LibraryPrefix& prefix = LibraryPrefix::Cast(instance);
+    ASSERT(prefix.is_deferred_load());
+    const Library& target = Library::Handle(Z, prefix.GetLibrary(0));
+    cls = target.toplevel_class();
+    if (!classes_to_retain_.HasKey(&cls)) {
+      classes_to_retain_.Insert(&Class::ZoneHandle(Z, cls.raw()));
+    }
+    return;
+  }
+
   // Can't ask immediate objects if they're canonical.
   if (instance.IsSmi()) return;
 
@@ -1028,6 +1039,14 @@
     if (name.Equals(Symbols::_ClosureCall())) return true;
   }
 
+  // We have to retain functions which can be a target of a SwitchableCall
+  // at AOT runtime, since the AOT runtime needs to be able to find the
+  // function object in the class.
+  if (function.NeedsMonomorphicCheckedEntry(Z) ||
+      Function::IsDynamicInvocationForwarderName(function.name())) {
+    return true;
+  }
+
   return false;
 }
 
@@ -1299,18 +1318,24 @@
           // 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)) {
+          if (IsSent(selector2)) {
             AddFunction(function);
           }
           selector2 = Function::CreateDynamicInvocationForwarderName(selector2);
-          selector3 = Symbols::Lookup(thread(), selector2);
-          if (IsSent(selector3)) {
-            AddFunction(function);
+          if (IsSent(selector2)) {
+            selector2 =
+                Function::CreateDynamicInvocationForwarderName(selector);
+            function2 = function.GetDynamicInvocationForwarder(selector2);
+            AddFunction(function2);
           }
         } else if (function.kind() == FunctionLayout::kRegularFunction) {
           selector2 = Field::LookupGetterSymbol(selector);
-          if (IsSent(selector2)) {
+          selector3 = String::null();
+          if (!selector2.IsNull()) {
+            selector3 =
+                Function::CreateDynamicInvocationForwarderName(selector2);
+          }
+          if (IsSent(selector2) || IsSent(selector3)) {
             metadata = kernel::ProcedureAttributesOf(function, Z);
             found_metadata = true;
 
@@ -1327,21 +1352,35 @@
           }
         }
 
-        if (function.kind() == FunctionLayout::kImplicitSetter ||
-            function.kind() == FunctionLayout::kSetterFunction ||
-            function.kind() == FunctionLayout::kRegularFunction) {
+        const bool is_getter =
+            function.kind() == FunctionLayout::kImplicitGetter ||
+            function.kind() == FunctionLayout::kGetterFunction;
+        const bool is_setter =
+            function.kind() == FunctionLayout::kImplicitSetter ||
+            function.kind() == FunctionLayout::kSetterFunction;
+        const bool is_regular =
+            function.kind() == FunctionLayout::kRegularFunction;
+        if (is_getter || is_setter || is_regular) {
           selector2 = Function::CreateDynamicInvocationForwarderName(selector);
           if (IsSent(selector2)) {
-            if (function.kind() == FunctionLayout::kImplicitSetter) {
+            if (function.kind() == FunctionLayout::kImplicitGetter ||
+                function.kind() == FunctionLayout::kImplicitSetter) {
               field = function.accessor_field();
               metadata = kernel::ProcedureAttributesOf(field, Z);
             } else if (!found_metadata) {
               metadata = kernel::ProcedureAttributesOf(function, Z);
             }
 
-            if (metadata.method_or_setter_called_dynamically) {
-              function2 = function.GetDynamicInvocationForwarder(selector2);
-              AddFunction(function2);
+            if (is_getter) {
+              if (metadata.getter_called_dynamically) {
+                function2 = function.GetDynamicInvocationForwarder(selector2);
+                AddFunction(function2);
+              }
+            } else {
+              if (metadata.method_or_setter_called_dynamically) {
+                function2 = function.GetDynamicInvocationForwarder(selector2);
+                AddFunction(function2);
+              }
             }
           }
         }
@@ -1376,16 +1415,38 @@
   table->UpdateValue(fname, farray);
 }
 
+static void AddNamesToFunctionsTable(Zone* zone,
+                                     Table* table,
+                                     const String& fname,
+                                     const Function& function,
+                                     String* mangled_name,
+                                     Function* dyn_function) {
+  AddNameToFunctionsTable(zone, table, fname, function);
+
+  *dyn_function = function.raw();
+  if (kernel::NeedsDynamicInvocationForwarder(function)) {
+    *mangled_name = function.name();
+    *mangled_name =
+        Function::CreateDynamicInvocationForwarderName(*mangled_name);
+    *dyn_function = function.GetDynamicInvocationForwarder(*mangled_name,
+                                                           /*allow_add=*/true);
+  }
+  *mangled_name = Function::CreateDynamicInvocationForwarderName(fname);
+  AddNameToFunctionsTable(zone, table, *mangled_name, *dyn_function);
+}
+
 void Precompiler::CollectDynamicFunctionNames() {
   if (!FLAG_collect_dynamic_function_names) {
     return;
   }
-  Library& lib = Library::Handle(Z);
-  Class& cls = Class::Handle(Z);
-  Array& functions = Array::Handle(Z);
-  Function& function = Function::Handle(Z);
-  String& fname = String::Handle(Z);
-  Array& farray = Array::Handle(Z);
+  auto& lib = Library::Handle(Z);
+  auto& cls = Class::Handle(Z);
+  auto& functions = Array::Handle(Z);
+  auto& function = Function::Handle(Z);
+  auto& fname = String::Handle(Z);
+  auto& farray = Array::Handle(Z);
+  auto& mangled_name = String::Handle(Z);
+  auto& dyn_function = Function::Handle(Z);
 
   Table table(HashTables::New<Table>(100));
   for (intptr_t i = 0; i < libraries_.Length(); i++) {
@@ -1394,27 +1455,34 @@
     while (it.HasNext()) {
       cls = it.GetNextClass();
       functions = cls.functions();
-      for (intptr_t j = 0; j < functions.Length(); j++) {
+
+      const intptr_t length = functions.Length();
+      for (intptr_t j = 0; j < length; j++) {
         function ^= functions.At(j);
         if (function.IsDynamicFunction()) {
           fname = function.name();
           if (function.IsSetterFunction() ||
               function.IsImplicitSetterFunction()) {
-            AddNameToFunctionsTable(zone(), &table, fname, function);
+            AddNamesToFunctionsTable(zone(), &table, fname, function,
+                                     &mangled_name, &dyn_function);
           } else if (function.IsGetterFunction() ||
                      function.IsImplicitGetterFunction()) {
             // Enter both getter and non getter name.
-            AddNameToFunctionsTable(zone(), &table, fname, function);
+            AddNamesToFunctionsTable(zone(), &table, fname, function,
+                                     &mangled_name, &dyn_function);
             fname = Field::NameFromGetter(fname);
-            AddNameToFunctionsTable(zone(), &table, fname, function);
+            AddNamesToFunctionsTable(zone(), &table, fname, function,
+                                     &mangled_name, &dyn_function);
           } else if (function.IsMethodExtractor()) {
             // Skip. We already add getter names for regular methods below.
             continue;
           } else {
             // Regular function. Enter both getter and non getter name.
-            AddNameToFunctionsTable(zone(), &table, fname, function);
+            AddNamesToFunctionsTable(zone(), &table, fname, function,
+                                     &mangled_name, &dyn_function);
             fname = Field::GetterName(fname);
-            AddNameToFunctionsTable(zone(), &table, fname, function);
+            AddNamesToFunctionsTable(zone(), &table, fname, function,
+                                     &mangled_name, &dyn_function);
           }
         }
       }
@@ -1424,7 +1492,8 @@
   // Locate all entries with one function only
   Table::Iterator iter(&table);
   String& key = String::Handle(Z);
-  UniqueFunctionsSet functions_set(HashTables::New<UniqueFunctionsSet>(20));
+  String& key_demangled = String::Handle(Z);
+  UniqueFunctionsMap functions_map(HashTables::New<UniqueFunctionsMap>(20));
   while (iter.MoveNext()) {
     intptr_t curr_key = iter.Current();
     key ^= table.GetKey(curr_key);
@@ -1432,8 +1501,25 @@
     ASSERT(!farray.IsNull());
     if (farray.Length() == 1) {
       function ^= farray.At(0);
-      cls = function.Owner();
-      functions_set.Insert(function);
+
+      // It looks like there is exactly one target for the given name. Though we
+      // have to be careful: e.g. A name like `dyn:get:foo` might have a target
+      // `foo()`. Though the actual target would be a lazily created method
+      // extractor `get:foo` for the `foo` function.
+      //
+      // We'd like to prevent eager creation of functions which we normally
+      // create lazily.
+      // => We disable unique target optimization if the target belongs to the
+      //    lazily created functions.
+      key_demangled = key.raw();
+      if (Function::IsDynamicInvocationForwarderName(key)) {
+        key_demangled = Function::DemangleDynamicInvocationForwarderName(key);
+      }
+      if (function.name() != key.raw() &&
+          function.name() != key_demangled.raw()) {
+        continue;
+      }
+      functions_map.UpdateOrInsert(key, function);
     }
   }
 
@@ -1442,18 +1528,18 @@
   get_runtime_type_is_unique_ = !farray.IsNull() && (farray.Length() == 1);
 
   if (FLAG_print_unique_targets) {
-    UniqueFunctionsSet::Iterator unique_iter(&functions_set);
+    UniqueFunctionsMap::Iterator unique_iter(&functions_map);
     while (unique_iter.MoveNext()) {
       intptr_t curr_key = unique_iter.Current();
-      function ^= functions_set.GetKey(curr_key);
+      function ^= functions_map.GetPayload(curr_key, 0);
       THR_Print("* %s\n", function.ToQualifiedCString());
     }
     THR_Print("%" Pd " of %" Pd " dynamic selectors are unique\n",
-              functions_set.NumOccupied(), table.NumOccupied());
+              functions_map.NumOccupied(), table.NumOccupied());
   }
 
   isolate()->object_store()->set_unique_dynamic_targets(
-      functions_set.Release());
+      functions_map.Release());
   table.Release();
 }
 
@@ -1461,6 +1547,7 @@
   Library& lib = Library::Handle(Z);
   Class& cls = Class::Handle(Z);
   Array& functions = Array::Handle(Z);
+  String& name = String::Handle(Z);
   Function& function = Function::Handle(Z);
   Function& function2 = Function::Handle(Z);
   GrowableObjectArray& closures = GrowableObjectArray::Handle(Z);
@@ -1487,6 +1574,19 @@
           AddTypesOf(function);
         }
       }
+
+      {
+        functions = cls.invocation_dispatcher_cache();
+        InvocationDispatcherTable dispatchers(functions);
+        for (auto dispatcher : dispatchers) {
+          name = dispatcher.Get<Class::kInvocationDispatcherName>();
+          if (name.IsNull()) break;  // Reached last entry.
+          function = dispatcher.Get<Class::kInvocationDispatcherFunction>();
+          if (possibly_retained_functions_.ContainsKey(function)) {
+            AddTypesOf(function);
+          }
+        }
+      }
     }
   }
 
@@ -1601,6 +1701,26 @@
   GrowableObjectArray& retained_functions = GrowableObjectArray::Handle(Z);
   GrowableObjectArray& closures = GrowableObjectArray::Handle(Z);
 
+  auto drop_function = [&](const Function& function) {
+    if (function.HasCode()) {
+      code = function.CurrentCode();
+      function.ClearCode();
+      // Wrap the owner of the code object in case the code object will be
+      // serialized but the function object will not.
+      owner = code.owner();
+      owner = WeakSerializationReference::Wrap(Z, owner);
+      code.set_owner(owner);
+    }
+    dropped_function_count_++;
+    if (FLAG_trace_precompiler) {
+      THR_Print("Dropping function %s\n",
+                function.ToLibNamePrefixedQualifiedCString());
+    }
+  };
+
+  auto& dispatchers_array = Array::Handle(Z);
+  auto& name = String::Handle(Z);
+  auto& desc = Array::Handle(Z);
   for (intptr_t i = 0; i < libraries_.Length(); i++) {
     lib ^= libraries_.At(i);
     ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate);
@@ -1610,26 +1730,12 @@
       retained_functions = GrowableObjectArray::New();
       for (intptr_t j = 0; j < functions.Length(); j++) {
         function ^= functions.At(j);
-        bool retain = functions_to_retain_.ContainsKey(function);
         function.DropUncompiledImplicitClosureFunction();
         function.ClearBytecode();
-        if (retain) {
+        if (functions_to_retain_.ContainsKey(function)) {
           retained_functions.Add(function);
         } else {
-          if (function.HasCode()) {
-            code = function.CurrentCode();
-            function.ClearCode();
-            // Wrap the owner of the code object in case the code object will be
-            // serialized but the function object will not.
-            owner = code.owner();
-            owner = WeakSerializationReference::Wrap(Z, owner);
-            code.set_owner(owner);
-          }
-          dropped_function_count_++;
-          if (FLAG_trace_precompiler) {
-            THR_Print("Dropping function %s\n",
-                      function.ToLibNamePrefixedQualifiedCString());
-          }
+          drop_function(function);
         }
       }
 
@@ -1639,6 +1745,35 @@
       } else {
         cls.SetFunctions(Object::empty_array());
       }
+
+      retained_functions = GrowableObjectArray::New();
+      {
+        dispatchers_array = cls.invocation_dispatcher_cache();
+        InvocationDispatcherTable dispatchers(dispatchers_array);
+        for (auto dispatcher : dispatchers) {
+          name = dispatcher.Get<Class::kInvocationDispatcherName>();
+          if (name.IsNull()) break;  // Reached last entry.
+          desc = dispatcher.Get<Class::kInvocationDispatcherArgsDesc>();
+          function = dispatcher.Get<Class::kInvocationDispatcherFunction>();
+          if (functions_to_retain_.ContainsKey(function)) {
+            retained_functions.Add(name);
+            retained_functions.Add(desc);
+            retained_functions.Add(function);
+          } else {
+            drop_function(function);
+          }
+        }
+      }
+      if (retained_functions.Length() > 0) {
+        // Last entry must be null.
+        retained_functions.Add(Object::null_object());
+        retained_functions.Add(Object::null_object());
+        retained_functions.Add(Object::null_object());
+        functions = Array::MakeFixedLength(retained_functions);
+      } else {
+        functions = Object::empty_array().raw();
+      }
+      cls.set_invocation_dispatcher_cache(functions);
     }
   }
 
@@ -1646,25 +1781,11 @@
   retained_functions = GrowableObjectArray::New();
   for (intptr_t j = 0; j < closures.Length(); j++) {
     function ^= closures.At(j);
-    bool retain = functions_to_retain_.ContainsKey(function);
     function.ClearBytecode();
-    if (retain) {
+    if (functions_to_retain_.ContainsKey(function)) {
       retained_functions.Add(function);
     } else {
-      if (function.HasCode()) {
-        code = function.CurrentCode();
-        function.ClearCode();
-        // Wrap the owner of the code object in case the code object will be
-        // serialized but the function object will not.
-        owner = code.owner();
-        owner = WeakSerializationReference::Wrap(Z, owner);
-        code.set_owner(owner);
-      }
-      dropped_function_count_++;
-      if (FLAG_trace_precompiler) {
-        THR_Print("Dropping function %s\n",
-                  function.ToLibNamePrefixedQualifiedCString());
-      }
+      drop_function(function);
     }
   }
   isolate()->object_store()->set_closure_functions(retained_functions);
@@ -2198,7 +2319,7 @@
     } else {
       toplevel_class = lib.toplevel_class();
 
-      I->class_table()->Unregister(toplevel_class.id());
+      I->class_table()->UnregisterTopLevel(toplevel_class.id());
       toplevel_class.set_id(kIllegalCid);  // We check this when serializing.
 
       dropped_library_count_++;
@@ -2404,8 +2525,6 @@
 }
 
 // Return false if bailed out.
-// If optimized_result_code is not NULL then it is caller's responsibility
-// to install code.
 bool PrecompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) {
   ASSERT(CompilerState::Current().is_aot());
   if (optimized() && !parsed_function()->function().IsOptimizable()) {
diff --git a/runtime/vm/compiler/aot/precompiler.h b/runtime/vm/compiler/aot/precompiler.h
index 5fdbc37..5f84a82 100644
--- a/runtime/vm/compiler/aot/precompiler.h
+++ b/runtime/vm/compiler/aot/precompiler.h
@@ -381,26 +381,12 @@
   static bool ReportStats() { return false; }
 
   static bool IsMatch(const Object& a, const Object& b) {
-    Zone* zone = Thread::Current()->zone();
-    String& a_s = String::Handle(zone);
-    String& b_s = String::Handle(zone);
-    a_s = a.IsFunction() ? Function::Cast(a).name() : String::Cast(a).raw();
-    b_s = b.IsFunction() ? Function::Cast(b).name() : String::Cast(b).raw();
-    ASSERT(a_s.IsSymbol() && b_s.IsSymbol());
-    return a_s.raw() == b_s.raw();
+    return String::Cast(a).raw() == String::Cast(b).raw();
   }
-  static uword Hash(const Object& obj) {
-    if (obj.IsFunction()) {
-      return String::Handle(Function::Cast(obj).name()).Hash();
-    } else {
-      ASSERT(String::Cast(obj).IsSymbol());
-      return String::Cast(obj).Hash();
-    }
-  }
-  static ObjectPtr NewKey(const Function& function) { return function.raw(); }
+  static uword Hash(const Object& obj) { return String::Cast(obj).Hash(); }
 };
 
-typedef UnorderedHashSet<FunctionsTraits> UniqueFunctionsSet;
+typedef UnorderedHashMap<FunctionsTraits> UniqueFunctionsMap;
 
 #if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
 // ObfuscationMap maps Strings to Strings.
diff --git a/runtime/vm/compiler/assembler/assembler_arm.cc b/runtime/vm/compiler/assembler/assembler_arm.cc
index 1973790..f1997a9 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm.cc
@@ -1978,7 +1978,6 @@
 void Assembler::ExtractClassIdFromTags(Register result, Register tags) {
   ASSERT(target::ObjectLayout::kClassIdTagPos == 16);
   ASSERT(target::ObjectLayout::kClassIdTagSize == 16);
-  ASSERT(sizeof(classid_t) == sizeof(uint16_t));
   Lsr(result, tags, Operand(target::ObjectLayout::kClassIdTagPos), AL);
 }
 
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index 24d45a2..2118d49 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -1132,7 +1132,6 @@
 void Assembler::ExtractClassIdFromTags(Register result, Register tags) {
   ASSERT(target::ObjectLayout::kClassIdTagPos == 16);
   ASSERT(target::ObjectLayout::kClassIdTagSize == 16);
-  ASSERT(sizeof(classid_t) == sizeof(uint16_t));
   LsrImmediate(result, tags, target::ObjectLayout::kClassIdTagPos, kWord);
 }
 
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index 99b4608..b84015a 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -2133,7 +2133,6 @@
 void Assembler::ExtractClassIdFromTags(Register result, Register tags) {
   ASSERT(target::ObjectLayout::kClassIdTagPos == 16);
   ASSERT(target::ObjectLayout::kClassIdTagSize == 16);
-  ASSERT(sizeof(classid_t) == sizeof(uint16_t));
   movl(result, tags);
   shrl(result, Immediate(target::ObjectLayout::kClassIdTagPos));
 }
@@ -2152,7 +2151,6 @@
 void Assembler::LoadClassId(Register result, Register object) {
   ASSERT(target::ObjectLayout::kClassIdTagPos == 16);
   ASSERT(target::ObjectLayout::kClassIdTagSize == 16);
-  ASSERT(sizeof(classid_t) == sizeof(uint16_t));
   const intptr_t class_id_offset =
       target::Object::tags_offset() +
       target::ObjectLayout::kClassIdTagPos / kBitsPerByte;
@@ -2183,7 +2181,6 @@
   ASSERT(kSmiTagShift == 1);
   ASSERT(target::ObjectLayout::kClassIdTagPos == 16);
   ASSERT(target::ObjectLayout::kClassIdTagSize == 16);
-  ASSERT(sizeof(classid_t) == sizeof(uint16_t));
   const intptr_t class_id_offset =
       target::Object::tags_offset() +
       target::ObjectLayout::kClassIdTagPos / kBitsPerByte;
diff --git a/runtime/vm/compiler/assembler/disassembler.cc b/runtime/vm/compiler/assembler/disassembler.cc
index 522e505..2d1515f 100644
--- a/runtime/vm/compiler/assembler/disassembler.cc
+++ b/runtime/vm/compiler/assembler/disassembler.cc
@@ -191,14 +191,14 @@
       for (intptr_t i = 1; i < inlined_functions.length(); i++) {
         const char* name = inlined_functions[i]->ToQualifiedCString();
         if (first) {
-          f.Print("        ;; Inlined [%s", name);
+          f.Printf("        ;; Inlined [%s", name);
           first = false;
         } else {
-          f.Print(" -> %s", name);
+          f.Printf(" -> %s", name);
         }
       }
       if (!first) {
-        f.Print("]\n");
+        f.AddString("]\n");
         formatter->Print("%s", str);
       }
     }
diff --git a/runtime/vm/compiler/assembler/disassembler_arm64.cc b/runtime/vm/compiler/assembler/disassembler_arm64.cc
index 57c6b66..e0992ae 100644
--- a/runtime/vm/compiler/assembler/disassembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/disassembler_arm64.cc
@@ -711,6 +711,8 @@
     // Integer src/dst.
     if (instr->Bits(22, 2) == 0) {
       Format(instr, "str'sz 'rt, 'memop");
+    } else if (instr->Bits(23, 1) == 1) {
+      Format(instr, "ldrs'sz 'rt, 'memop");
     } else {
       Format(instr, "ldr'sz 'rt, 'memop");
     }
diff --git a/runtime/vm/compiler/assembler/disassembler_x86.cc b/runtime/vm/compiler/assembler/disassembler_x86.cc
index 3cc6713..16ce521 100644
--- a/runtime/vm/compiler/assembler/disassembler_x86.cc
+++ b/runtime/vm/compiler/assembler/disassembler_x86.cc
@@ -726,7 +726,7 @@
     Print(",%d", imm8);
     num_bytes++;
   } else {
-    ASSERT(op = 0xD2);
+    ASSERT(op == 0xD2);
     Print(",cl");
   }
   return num_bytes;
diff --git a/runtime/vm/compiler/backend/block_builder.h b/runtime/vm/compiler/backend/block_builder.h
index 02ea193..99d3764 100644
--- a/runtime/vm/compiler/backend/block_builder.h
+++ b/runtime/vm/compiler/backend/block_builder.h
@@ -102,7 +102,7 @@
       // adjust reaching type. This is done manually because there is no type
       // propagation when building intrinsics.
       unboxed_value->AsUnbox()->value()->SetReachingType(
-          new CompileType(CompileType::FromCid(CidForRepresentation(rep))));
+          TypeForRepresentation(rep));
     }
     return unboxed_value;
   }
@@ -139,21 +139,22 @@
   }
 
  private:
-  static intptr_t CidForRepresentation(Representation rep) {
+  static CompileType* TypeForRepresentation(Representation rep) {
     switch (rep) {
       case kUnboxedDouble:
-        return kDoubleCid;
+        return new CompileType(CompileType::FromCid(kDoubleCid));
       case kUnboxedFloat32x4:
-        return kFloat32x4Cid;
+        return new CompileType(CompileType::FromCid(kFloat32x4Cid));
       case kUnboxedInt32x4:
-        return kInt32x4Cid;
+        return new CompileType(CompileType::FromCid(kInt32x4Cid));
       case kUnboxedFloat64x2:
-        return kFloat64x2Cid;
+        return new CompileType(CompileType::FromCid(kFloat64x2Cid));
       case kUnboxedUint32:
-        return kDynamicCid;  // smi or mint.
+      case kUnboxedInt64:
+        return new CompileType(CompileType::Int());
       default:
         UNREACHABLE();
-        return kIllegalCid;
+        return nullptr;
     }
   }
 
diff --git a/runtime/vm/compiler/backend/compile_type.h b/runtime/vm/compiler/backend/compile_type.h
index 32c9949..3a7d6aa 100644
--- a/runtime/vm/compiler/backend/compile_type.h
+++ b/runtime/vm/compiler/backend/compile_type.h
@@ -16,7 +16,7 @@
 namespace dart {
 
 class AbstractType;
-class BufferFormatter;
+class BaseTextBuffer;
 class Definition;
 class FlowGraphSerializer;
 class SExpression;
@@ -247,7 +247,7 @@
 
   bool Specialize(GrowableArray<intptr_t>* class_ids);
 
-  void PrintTo(BufferFormatter* f) const;
+  void PrintTo(BaseTextBuffer* f) const;
   SExpression* ToSExpression(FlowGraphSerializer* s) const;
   void AddExtraInfoToSExpression(SExpList* sexp, FlowGraphSerializer* s) const;
 
diff --git a/runtime/vm/compiler/backend/constant_propagator.cc b/runtime/vm/compiler/backend/constant_propagator.cc
index d412104..4fc79f6 100644
--- a/runtime/vm/compiler/backend/constant_propagator.cc
+++ b/runtime/vm/compiler/backend/constant_propagator.cc
@@ -1024,6 +1024,9 @@
   AbstractType& result = AbstractType::Handle(
       Z, instr->type().InstantiateFrom(
              instantiator_type_args, function_type_args, kAllFree, Heap::kOld));
+  if (result.IsTypeRef()) {
+    result = TypeRef::Cast(result).type();
+  }
   ASSERT(result.IsInstantiated());
   result = result.Canonicalize();
   SetValue(instr, result);
diff --git a/runtime/vm/compiler/backend/flow_graph.cc b/runtime/vm/compiler/backend/flow_graph.cc
index c285c51..5890545 100644
--- a/runtime/vm/compiler/backend/flow_graph.cc
+++ b/runtime/vm/compiler/backend/flow_graph.cc
@@ -1295,6 +1295,14 @@
     // Trim extra inputs of ClosureCall and LoadField instructions from
     // the environment. Inputs of those instructions are not pushed onto
     // the stack at the point where deoptimization can occur.
+    // Note that in case of LoadField there can be two possible situations,
+    // the code here handles LoadField to LoadField lazy deoptimization in
+    // which we are transitioning from position after the call to initialization
+    // stub in optimized code to a similar position after the call to
+    // initialization stub in unoptimized code. There is another variant
+    // (LoadField deoptimizing into a position after a getter call) which is
+    // handled in a different way (see
+    // CallSpecializer::InlineImplicitInstanceGetter).
     deopt_env =
         deopt_env->DeepCopy(zone(), deopt_env->Length() - instr->InputCount() +
                                         instr->ArgumentCount());
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index 3b4ac917..7d81c2b 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -1279,58 +1279,24 @@
   set_intrinsic_slow_path_label(&exit);
 
   if (FLAG_intrinsify) {
-    // Intrinsification skips arguments checks, therefore disable if in checked
-    // mode or strong mode.
-    //
-    // Though for implicit getters, which have only the receiver as parameter,
-    // there are no checks necessary in any case and we can therefore intrinsify
-    // them even in checked mode and strong mode.
-    switch (parsed_function().function().kind()) {
-      case FunctionLayout::kImplicitGetter: {
-        Field& field = Field::Handle(function().accessor_field());
-        ASSERT(!field.IsNull());
-#if defined(DEBUG)
-        // HACK: Clone the field to ignore assertion in Field::guarded_cid().
-        // The assertion is intended to ensure that the background compiler sees
-        // consistent cids, but that's not important in this case because
-        // IsPotentialUnboxedField can go from true to false, but not false to
-        // true, and we only do this optimisation if it is false.
-        field = field.CloneFromOriginal();
-#endif
-
-        // Only intrinsify getter if the field cannot contain a mutable double.
-        // Reading from a mutable double box requires allocating a fresh double.
-        if (field.is_instance() && !field.needs_load_guard() &&
-            !field.is_late() && !IsPotentialUnboxedField(field)) {
-          SpecialStatsBegin(CombinedCodeStatistics::kTagIntrinsics);
-          GenerateGetterIntrinsic(compiler::target::Field::OffsetOf(field));
-          SpecialStatsEnd(CombinedCodeStatistics::kTagIntrinsics);
-          return true;
-        }
-        return false;
-      }
-      case FunctionLayout::kImplicitSetter:
-        break;
+    const auto& function = parsed_function().function();
+    if (function.IsMethodExtractor()) {
 #if !defined(TARGET_ARCH_IA32)
-      case FunctionLayout::kMethodExtractor: {
-        auto& extracted_method = Function::ZoneHandle(
-            parsed_function().function().extracted_method_closure());
-        auto& klass = Class::Handle(extracted_method.Owner());
-        const intptr_t type_arguments_field_offset =
-            compiler::target::Class::HasTypeArgumentsField(klass)
-                ? (compiler::target::Class::TypeArgumentsFieldOffset(klass) -
-                   kHeapObjectTag)
-                : 0;
+      auto& extracted_method =
+          Function::ZoneHandle(function.extracted_method_closure());
+      auto& klass = Class::Handle(extracted_method.Owner());
+      const intptr_t type_arguments_field_offset =
+          compiler::target::Class::HasTypeArgumentsField(klass)
+              ? (compiler::target::Class::TypeArgumentsFieldOffset(klass) -
+                 kHeapObjectTag)
+              : 0;
 
-        SpecialStatsBegin(CombinedCodeStatistics::kTagIntrinsics);
-        GenerateMethodExtractorIntrinsic(extracted_method,
-                                         type_arguments_field_offset);
-        SpecialStatsEnd(CombinedCodeStatistics::kTagIntrinsics);
-        return true;
-      }
+      SpecialStatsBegin(CombinedCodeStatistics::kTagIntrinsics);
+      GenerateMethodExtractorIntrinsic(extracted_method,
+                                       type_arguments_field_offset);
+      SpecialStatsEnd(CombinedCodeStatistics::kTagIntrinsics);
+      return true;
 #endif  // !defined(TARGET_ARCH_IA32)
-      default:
-        break;
     }
   }
 
@@ -2359,6 +2325,18 @@
 #else
   TypeUsageInfo* type_usage_info = thread()->type_usage_info();
 
+  // Special case: non-nullable Object.
+  // Top types should be handled by the caller and cannot reach here.
+  ASSERT(!dst_type.IsTopTypeForSubtyping());
+  if (dst_type.IsObjectType()) {
+    ASSERT(dst_type.IsNonNullable() && isolate()->null_safety());
+    __ CompareObject(TypeTestABI::kInstanceReg, Object::null_object());
+    __ BranchIf(NOT_EQUAL, done);
+    // Fall back to type testing stub.
+    __ LoadObject(TypeTestABI::kDstTypeReg, dst_type);
+    return;
+  }
+
   // If the int type is assignable to [dst_type] we special case it on the
   // caller side!
   const Type& int_type = Type::Handle(zone(), Type::IntType());
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h
index 2706648..9efcd30 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.h
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.h
@@ -957,6 +957,7 @@
   friend class CheckStackOverflowSlowPath;  // For pending_deoptimization_env_.
   friend class CheckedSmiSlowPath;          // Same.
   friend class CheckedSmiComparisonSlowPath;  // Same.
+  friend class GraphInstrinsicCodeGenScope;   // For optimizing_.
 
   // Architecture specific implementation of simple native moves.
   void EmitNativeMoveArchitecture(const compiler::ffi::NativeLocation& dst,
@@ -1083,7 +1084,7 @@
   void GenerateMethodExtractorIntrinsic(const Function& extracted_method,
                                         intptr_t type_arguments_field_offset);
 
-  void GenerateGetterIntrinsic(intptr_t offset);
+  void GenerateGetterIntrinsic(const Function& accessor, const Field& field);
 
   // Perform a greedy local register allocation.  Consider all registers free.
   void AllocateRegistersLocally(Instruction* instr);
@@ -1206,7 +1207,7 @@
   // The table selectors of all dispatch table calls in the current function.
   GrowableArray<const compiler::TableSelector*> dispatch_table_call_targets_;
   GrowableArray<IndirectGotoInstr*> indirect_gotos_;
-  const bool is_optimizing_;
+  bool is_optimizing_;
   SpeculativeInliningPolicy* speculative_policy_;
   // Set to true if optimized code has IC calls.
   bool may_reoptimize_;
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index 13b6e62..65cba11 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -875,16 +875,6 @@
       compiler::target::Code::entry_point_offset(Code::EntryKind::kUnchecked)));
 }
 
-void FlowGraphCompiler::GenerateGetterIntrinsic(intptr_t offset) {
-  // LR: return address.
-  // SP: receiver.
-  // Sequence node has one return node, its input is load field node.
-  __ Comment("Intrinsic Getter");
-  __ ldr(R0, compiler::Address(SP, 0 * compiler::target::kWordSize));
-  __ LoadFieldFromOffset(kWord, R0, R0, offset);
-  __ Ret();
-}
-
 void FlowGraphCompiler::EmitFrameEntry() {
   const Function& function = parsed_function().function();
   if (CanOptimizeFunction() && function.IsOptimizable() &&
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index 7bbe356..131308c 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -840,16 +840,6 @@
   __ br(R0);
 }
 
-void FlowGraphCompiler::GenerateGetterIntrinsic(intptr_t offset) {
-  // LR: return address.
-  // SP: receiver.
-  // Sequence node has one return node, its input is load field node.
-  __ Comment("Intrinsic Getter");
-  __ LoadFromOffset(R0, SP, 0 * kWordSize);
-  __ LoadFieldFromOffset(R0, R0, offset);
-  __ ret();
-}
-
 void FlowGraphCompiler::EmitFrameEntry() {
   const Function& function = parsed_function().function();
   if (CanOptimizeFunction() && function.IsOptimizable() &&
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
index f5fd0a2..6b96aff 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
@@ -755,16 +755,6 @@
   }
 }
 
-void FlowGraphCompiler::GenerateGetterIntrinsic(intptr_t offset) {
-  // TOS: return address.
-  // +1 : receiver.
-  // Sequence node has one return node, its input is load field node.
-  __ Comment("Intrinsic Getter");
-  __ movl(EAX, compiler::Address(ESP, 1 * kWordSize));
-  __ movl(EAX, compiler::FieldAddress(EAX, offset));
-  __ ret();
-}
-
 // NOTE: If the entry code shape changes, ReturnAddressLocator in profiler.cc
 // needs to be updated to match.
 void FlowGraphCompiler::EmitFrameEntry() {
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index 756778ee..cf229f3 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -847,16 +847,6 @@
       CODE_REG, Code::entry_point_offset(Code::EntryKind::kUnchecked)));
 }
 
-void FlowGraphCompiler::GenerateGetterIntrinsic(intptr_t offset) {
-  // TOS: return address.
-  // +1 : receiver.
-  // Sequence node has one return node, its input is load field node.
-  __ Comment("Intrinsic Getter");
-  __ movq(RAX, compiler::Address(RSP, 1 * kWordSize));
-  __ movq(RAX, compiler::FieldAddress(RAX, offset));
-  __ ret();
-}
-
 // NOTE: If the entry code shape changes, ReturnAddressLocator in profiler.cc
 // needs to be updated to match.
 void FlowGraphCompiler::EmitFrameEntry() {
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 8e46a8c..6a7523f 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -202,7 +202,6 @@
     if (cid == kNullCid && !exclude_null) continue;
     cls = table->At(cid);
     if (!include_abstract && cls.is_abstract()) continue;
-    if (cls.is_patch()) continue;
     if (cls.IsTopLevel()) continue;
 
     // We are either interested in [CidRange]es of subclasses or subtypes.
@@ -310,7 +309,7 @@
         for (; j < current_cid; ++j) {
           if (table->HasValidClassAt(j)) {
             klass = table->At(j);
-            if (!klass.is_patch() && !klass.IsTopLevel()) {
+            if (!klass.IsTopLevel()) {
               // If we care about abstract classes also, we cannot skip over any
               // arbitrary abstract class, only those which are subtypes.
               if (include_abstract) {
@@ -3171,18 +3170,19 @@
       return this;
     }
 
-#if defined(TARGET_ARCH_IS_32_BIT)
-    // Do not erase extending conversions from 32-bit untagged to 64-bit values
-    // because untagged does not specify whether it is signed or not.
-    if ((box_defn->from() == kUntagged) && to() == kUnboxedInt64) {
-      return this;
-    }
-#endif
-
+    // It's safe to discard any other conversions from and then back to the same
+    // integer type.
     if (box_defn->from() == to()) {
       return box_defn->value()->definition();
     }
 
+    // Do not merge conversions where the first starts from Untagged or the
+    // second ends at Untagged, since we expect to see either UnboxedIntPtr
+    // or UnboxedFfiIntPtr as the other type in an Untagged conversion.
+    if ((box_defn->from() == kUntagged) || (to() == kUntagged)) {
+      return this;
+    }
+
     IntConverterInstr* converter = new IntConverterInstr(
         box_defn->from(), representation(), box_defn->value()->CopyWithType(),
         (to() == kUnboxedInt32) ? GetDeoptId() : DeoptId::kNone);
@@ -5535,7 +5535,7 @@
   return LoadFieldInstr::IsFixedLengthArrayCid(cid);
 }
 
-Definition* CheckArrayBoundInstr::Canonicalize(FlowGraph* flow_graph) {
+Definition* CheckBoundBase::Canonicalize(FlowGraph* flow_graph) {
   return IsRedundant() ? index()->definition() : this;
 }
 
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index f26a6ee..8b3cc81 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -35,12 +35,12 @@
 
 namespace dart {
 
+class BaseTextBuffer;
 class BinaryFeedback;
 class BitVector;
 class BlockEntryInstr;
 class BlockEntryWithInitialDefs;
 class BoxIntegerInstr;
-class BufferFormatter;
 class CallTargets;
 class CatchBlockEntryInstr;
 class CheckBoundBase;
@@ -145,7 +145,7 @@
   void RefineReachingType(CompileType* type);
 
 #if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
-  void PrintTo(BufferFormatter* f) const;
+  void PrintTo(BaseTextBuffer* f) const;
 #endif  // !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
 
   SExpression* ToSExpression(FlowGraphSerializer* s) const;
@@ -550,14 +550,14 @@
   DECLARE_COMPARISON_METHODS
 
 #if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
-#define PRINT_TO_SUPPORT virtual void PrintTo(BufferFormatter* f) const;
+#define PRINT_TO_SUPPORT virtual void PrintTo(BaseTextBuffer* f) const;
 #else
 #define PRINT_TO_SUPPORT
 #endif  // !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
 
 #if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
 #define PRINT_OPERANDS_TO_SUPPORT                                              \
-  virtual void PrintOperandsTo(BufferFormatter* f) const;
+  virtual void PrintOperandsTo(BaseTextBuffer* f) const;
 #else
 #define PRINT_OPERANDS_TO_SUPPORT
 #endif  // !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
@@ -911,8 +911,8 @@
   // Printing support.
   const char* ToCString() const;
 #if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
-  virtual void PrintTo(BufferFormatter* f) const;
-  virtual void PrintOperandsTo(BufferFormatter* f) const;
+  virtual void PrintTo(BaseTextBuffer* f) const;
+  virtual void PrintOperandsTo(BaseTextBuffer* f) const;
 #endif
   virtual SExpression* ToSExpression(FlowGraphSerializer* s) const;
   virtual void AddOperandsToSExpression(SExpList* sexp,
@@ -1614,7 +1614,7 @@
   }
 
  protected:
-  void PrintInitialDefinitionsTo(BufferFormatter* f) const;
+  void PrintInitialDefinitionsTo(BaseTextBuffer* f) const;
 
  private:
   GrowableArray<Definition*> initial_definitions_;
@@ -5864,7 +5864,7 @@
 
   virtual bool HasUnknownSideEffects() const { return false; }
 
-  void PrintOperandsTo(BufferFormatter* f) const;
+  void PrintOperandsTo(BaseTextBuffer* f) const;
 
   virtual Instruction* Canonicalize(FlowGraph* flow_graph);
 
@@ -7568,6 +7568,8 @@
 
   virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); }
 
+  virtual void InferRange(RangeAnalysis* analysis, Range* range);
+
   PRINT_OPERANDS_TO_SUPPORT
   ADD_OPERANDS_TO_S_EXPRESSION_SUPPORT
 
@@ -7660,7 +7662,6 @@
     return kUnboxedInt32;
   }
 
-  virtual void InferRange(RangeAnalysis* analysis, Range* range);
   virtual CompileType ComputeType() const;
 
   DECLARE_INSTRUCTION(BinaryInt32Op)
@@ -7748,7 +7749,6 @@
            (speculative_mode_ == other->AsBinaryInt64Op()->speculative_mode_);
   }
 
-  virtual void InferRange(RangeAnalysis* analysis, Range* range);
   virtual CompileType ComputeType() const;
 
   DECLARE_INSTRUCTION(BinaryInt64Op)
@@ -8640,6 +8640,8 @@
   Value* length() const { return inputs_[kLengthPos]; }
   Value* index() const { return inputs_[kIndexPos]; }
 
+  virtual Definition* Canonicalize(FlowGraph* flow_graph);
+
   virtual CheckBoundBase* AsCheckBoundBase() { return this; }
   virtual const CheckBoundBase* AsCheckBoundBase() const { return this; }
   virtual Value* RedefinedValue() const;
@@ -8676,8 +8678,6 @@
 
   void mark_generalized() { generalized_ = true; }
 
-  virtual Definition* Canonicalize(FlowGraph* flow_graph);
-
   // Returns the length offset for array and string types.
   static intptr_t LengthOffsetFor(intptr_t class_id);
 
@@ -9330,7 +9330,7 @@
                        Definition* dead,
                        Definition* result) const;
 
-  void PrintTo(BufferFormatter* f) const;
+  void PrintTo(BaseTextBuffer* f) const;
   SExpression* ToSExpression(FlowGraphSerializer* s) const;
   const char* ToCString() const;
 
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index ea7c9e8..2607860 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -2386,7 +2386,9 @@
 }
 
 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
 
   const intptr_t value_cid = value()->Type()->ToCid();
   const intptr_t field_cid = field().guarded_cid();
@@ -2861,7 +2863,9 @@
 }
 
 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
 
   compiler::Label skip_store;
 
@@ -3266,7 +3270,9 @@
 }
 
 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
 
   const Register instance_reg = locs()->in(0).reg();
   if (IsUnboxedLoad() && compiler->is_optimizing()) {
@@ -4954,24 +4960,35 @@
   // Shared slow path is used in BoxInt64Instr::EmitNativeCode in
   // FLAG_use_bare_instructions mode and only after VM isolate stubs where
   // replaced with isolate-specific stubs.
+  auto object_store = Isolate::Current()->object_store();
+  const bool stubs_in_vm_isolate =
+      object_store->allocate_mint_with_fpu_regs_stub()
+          ->ptr()
+          ->InVMIsolateHeap() ||
+      object_store->allocate_mint_without_fpu_regs_stub()
+          ->ptr()
+          ->InVMIsolateHeap();
+  const bool shared_slow_path_call = SlowPathSharingSupported(opt) &&
+                                     FLAG_use_bare_instructions &&
+                                     !stubs_in_vm_isolate;
   LocationSummary* summary = new (zone) LocationSummary(
       zone, kNumInputs, kNumTemps,
       ValueFitsSmi()
           ? LocationSummary::kNoCall
-          : ((SlowPathSharingSupported(opt) && FLAG_use_bare_instructions &&
-              !Isolate::Current()
-                   ->object_store()
-                   ->allocate_mint_with_fpu_regs_stub()
-                   ->ptr()
-                   ->InVMIsolateHeap())
-                 ? LocationSummary::kCallOnSharedSlowPath
-                 : LocationSummary::kCallOnSlowPath));
+          : ((shared_slow_path_call ? LocationSummary::kCallOnSharedSlowPath
+                                    : LocationSummary::kCallOnSlowPath)));
   summary->set_in(0, Location::Pair(Location::RequiresRegister(),
                                     Location::RequiresRegister()));
-  if (!ValueFitsSmi()) {
-    summary->set_temp(0, Location::RegisterLocation(R1));
+  if (ValueFitsSmi()) {
+    summary->set_out(0, Location::RequiresRegister());
+  } else if (shared_slow_path_call) {
+    summary->set_out(0,
+                     Location::RegisterLocation(AllocateMintABI::kResultReg));
+    summary->set_temp(0, Location::RegisterLocation(AllocateMintABI::kTempReg));
+  } else {
+    summary->set_out(0, Location::RequiresRegister());
+    summary->set_temp(0, Location::RequiresRegister());
   }
-  summary->set_out(0, Location::RegisterLocation(R0));
   return summary;
 }
 
@@ -5007,7 +5024,8 @@
         live_fpu_regs ? object_store->allocate_mint_with_fpu_regs_stub()
                       : object_store->allocate_mint_without_fpu_regs_stub());
 
-    ASSERT(!locs()->live_registers()->ContainsRegister(R0));
+    ASSERT(!locs()->live_registers()->ContainsRegister(
+        AllocateMintABI::kResultReg));
     auto extended_env = compiler->SlowPathEnvironmentFor(this, 0);
     compiler->GenerateStubCall(token_pos(), stub, PcDescriptorsLayout::kOther,
                                locs(), DeoptId::kNone, extended_env);
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index 54e2e07..3102576 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -2071,7 +2071,10 @@
 }
 
 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
+
   const intptr_t value_cid = value()->Type()->ToCid();
   const intptr_t field_cid = field().guarded_cid();
   const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid;
@@ -2399,7 +2402,10 @@
 }
 
 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
+
   compiler::Label skip_store;
 
   const Register instance_reg = locs()->in(0).reg();
@@ -2785,7 +2791,10 @@
 }
 
 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
+
   const Register instance_reg = locs()->in(0).reg();
   if (IsUnboxedLoad() && compiler->is_optimizing()) {
     ASSERT(!calls_initializer());
@@ -4159,16 +4168,14 @@
   // Shared slow path is used in BoxInt64Instr::EmitNativeCode in
   // FLAG_use_bare_instructions mode and only after VM isolate stubs where
   // replaced with isolate-specific stubs.
-  const bool stubs_in_vm_isolate = (Isolate::Current()
-                                        ->object_store()
-                                        ->allocate_mint_with_fpu_regs_stub()
-                                        ->ptr()
-                                        ->InVMIsolateHeap() ||
-                                    Isolate::Current()
-                                        ->object_store()
-                                        ->allocate_mint_without_fpu_regs_stub()
-                                        ->ptr()
-                                        ->InVMIsolateHeap());
+  auto object_store = Isolate::Current()->object_store();
+  const bool stubs_in_vm_isolate =
+      object_store->allocate_mint_with_fpu_regs_stub()
+          ->ptr()
+          ->InVMIsolateHeap() ||
+      object_store->allocate_mint_without_fpu_regs_stub()
+          ->ptr()
+          ->InVMIsolateHeap();
   const bool shared_slow_path_call = SlowPathSharingSupported(opt) &&
                                      FLAG_use_bare_instructions &&
                                      !stubs_in_vm_isolate;
@@ -4178,13 +4185,13 @@
           ? LocationSummary::kNoCall
           : shared_slow_path_call ? LocationSummary::kCallOnSharedSlowPath
                                   : LocationSummary::kCallOnSlowPath);
-
   summary->set_in(0, Location::RequiresRegister());
   if (ValueFitsSmi()) {
     summary->set_out(0, Location::RequiresRegister());
   } else if (shared_slow_path_call) {
-    summary->set_out(0, Location::RegisterLocation(R0));
-    summary->set_temp(0, Location::RegisterLocation(R1));
+    summary->set_out(0,
+                     Location::RegisterLocation(AllocateMintABI::kResultReg));
+    summary->set_temp(0, Location::RegisterLocation(AllocateMintABI::kTempReg));
   } else {
     summary->set_out(0, Location::RequiresRegister());
     summary->set_temp(0, Location::RequiresRegister());
@@ -4207,28 +4214,25 @@
   __ b(&done, NO_OVERFLOW);
 
   Register temp = locs()->temp(0).reg();
-
   if (compiler->intrinsic_mode()) {
     __ TryAllocate(compiler->mint_class(),
                    compiler->intrinsic_slow_path_label(), out, temp);
-  } else {
-    if (locs()->call_on_shared_slow_path()) {
-      auto object_store = compiler->isolate()->object_store();
-      const bool live_fpu_regs =
-          locs()->live_registers()->FpuRegisterCount() > 0;
-      const auto& stub = Code::ZoneHandle(
-          compiler->zone(),
-          live_fpu_regs ? object_store->allocate_mint_with_fpu_regs_stub()
-                        : object_store->allocate_mint_without_fpu_regs_stub());
+  } else if (locs()->call_on_shared_slow_path()) {
+    auto object_store = compiler->isolate()->object_store();
+    const bool live_fpu_regs = locs()->live_registers()->FpuRegisterCount() > 0;
+    const auto& stub = Code::ZoneHandle(
+        compiler->zone(),
+        live_fpu_regs ? object_store->allocate_mint_with_fpu_regs_stub()
+                      : object_store->allocate_mint_without_fpu_regs_stub());
 
-      ASSERT(!locs()->live_registers()->ContainsRegister(R0));
-      auto extended_env = compiler->SlowPathEnvironmentFor(this, 0);
-      compiler->GenerateStubCall(token_pos(), stub, PcDescriptorsLayout::kOther,
-                                 locs(), DeoptId::kNone, extended_env);
-    } else {
-      BoxAllocationSlowPath::Allocate(compiler, this, compiler->mint_class(),
-                                      out, temp);
-    }
+    ASSERT(!locs()->live_registers()->ContainsRegister(
+        AllocateMintABI::kResultReg));
+    auto extended_env = compiler->SlowPathEnvironmentFor(this, 0);
+    compiler->GenerateStubCall(token_pos(), stub, PcDescriptorsLayout::kOther,
+                               locs(), DeoptId::kNone, extended_env);
+  } else {
+    BoxAllocationSlowPath::Allocate(compiler, this, compiler->mint_class(), out,
+                                    temp);
   }
 
   __ StoreToOffset(in, out, Mint::value_offset() - kHeapObjectTag);
diff --git a/runtime/vm/compiler/backend/il_deserializer.cc b/runtime/vm/compiler/backend/il_deserializer.cc
index 47ac11a..ca7bd32 100644
--- a/runtime/vm/compiler/backend/il_deserializer.cc
+++ b/runtime/vm/compiler/backend/il_deserializer.cc
@@ -102,7 +102,7 @@
   if (results.serialized != nullptr) {
     TextBuffer buf(1000);
     results.serialized->SerializeTo(zone, &buf, "");
-    js.PrintProperty("serialized", buf.buf());
+    js.PrintProperty("serialized", buf.buffer());
   }
 
   if (results.error_message != nullptr) {
@@ -112,7 +112,7 @@
     ASSERT(results.error_sexp != nullptr);
     TextBuffer buf(1000);
     results.error_sexp->SerializeTo(zone, &buf, "");
-    js.PrintProperty("expression", buf.buf());
+    js.PrintProperty("expression", buf.buffer());
 
     auto const sexp_position =
         GetSExpressionPosition(zone, results.serialized, results.error_sexp);
@@ -121,7 +121,7 @@
   }
 
   js.CloseObject();
-  THR_Print("Results of round trip serialization: %s\n", js.buffer()->buf());
+  THR_Print("Results of round trip serialization: %s\n", js.buffer()->buffer());
 }
 
 void FlowGraphDeserializer::RoundTripSerialization(CompilerPassState* state) {
@@ -159,7 +159,7 @@
     if (FLAG_trace_round_trip_serialization && results.serialized != nullptr) {
       TextBuffer buf(1000);
       results.serialized->SerializeTo(zone, &buf, "");
-      THR_Print("Serialized flow graph:\n%s\n", buf.buf());
+      THR_Print("Serialized flow graph:\n%s\n", buf.buffer());
     }
 
     // For the deserializer, use the thread from the compiler pass and zone
@@ -2138,9 +2138,8 @@
       return false;
     }
     if (is_forwarder) {
-      // Go back four characters to start at the 'dyn:' we stripped earlier.
-      tmp_string_ = String::FromUTF8(
-          reinterpret_cast<const uint8_t*>(func_start - 4), name_len + 4);
+      tmp_string_ = name_function_.name();
+      tmp_string_ = Function::CreateDynamicInvocationForwarderName(tmp_string_);
       name_function_ =
           name_function_.GetDynamicInvocationForwarder(tmp_string_);
     }
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index 6173afa..5eb8db8 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -1008,27 +1008,19 @@
   __ popl(temp);
   __ movl(compiler::Address(FPREG, kSavedCallerPcSlotFromFp * kWordSize), temp);
 
-  if (CanExecuteGeneratedCodeInSafepoint()) {
-    __ movl(temp,
-            compiler::Immediate(compiler::target::Thread::exit_through_ffi()));
-    __ TransitionGeneratedToNative(branch, FPREG, temp,
-                                   /*enter_safepoint=*/true);
-    __ call(branch);
-    __ TransitionNativeToGenerated(temp, /*leave_safepoint=*/true);
-  } else {
-    // We cannot trust that this code will be executable within a safepoint.
-    // Therefore we delegate the responsibility of entering/exiting the
-    // safepoint to a stub which in the VM isolate's heap, which will never lose
-    // execute permission.
-    __ movl(temp,
-            compiler::Address(
-                THR, compiler::target::Thread::
-                         call_native_through_safepoint_entry_point_offset()));
+  ASSERT(!CanExecuteGeneratedCodeInSafepoint());
+  // We cannot trust that this code will be executable within a safepoint.
+  // Therefore we delegate the responsibility of entering/exiting the
+  // safepoint to a stub which in the VM isolate's heap, which will never lose
+  // execute permission.
+  __ movl(temp,
+          compiler::Address(
+              THR, compiler::target::Thread::
+                       call_native_through_safepoint_entry_point_offset()));
 
-    // Calls EAX within a safepoint and clobbers EBX.
-    ASSERT(temp == EBX && branch == EAX);
-    __ call(temp);
-  }
+  // Calls EAX within a safepoint and clobbers EBX.
+  ASSERT(temp == EBX && branch == EAX);
+  __ call(temp);
 
   // The x86 calling convention requires floating point values to be returned on
   // the "floating-point stack" (aka. register ST0). We don't use the
@@ -1882,7 +1874,10 @@
 }
 
 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
+
   const intptr_t value_cid = value()->Type()->ToCid();
   const intptr_t field_cid = field().guarded_cid();
   const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid;
@@ -2213,7 +2208,10 @@
 }
 
 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
+
   compiler::Label skip_store;
 
   const Register instance_reg = locs()->in(0).reg();
@@ -2560,7 +2558,9 @@
 }
 
 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
 
   Register instance_reg = locs()->in(0).reg();
   if (IsUnboxedLoad() && compiler->is_optimizing()) {
diff --git a/runtime/vm/compiler/backend/il_printer.cc b/runtime/vm/compiler/backend/il_printer.cc
index a1289a9..b326057 100644
--- a/runtime/vm/compiler/backend/il_printer.cc
+++ b/runtime/vm/compiler/backend/il_printer.cc
@@ -103,11 +103,11 @@
       String::Handle(dst_type.Name()).ToCString(), dst_name.ToCString());
 }
 
-static void PrintTargetsHelper(BufferFormatter* f,
+static void PrintTargetsHelper(BaseTextBuffer* f,
                                const CallTargets& targets,
                                intptr_t num_checks_to_print) {
-  f->Print(" Targets[");
-  f->Print("%" Pd ": ", targets.length());
+  f->AddString(" Targets[");
+  f->Printf("%" Pd ": ", targets.length());
   Function& target = Function::Handle();
   if ((num_checks_to_print == FlowGraphPrinter::kPrintAll) ||
       (num_checks_to_print > targets.length())) {
@@ -119,36 +119,36 @@
     const intptr_t count = target_info->count;
     target = target_info->target->raw();
     if (i > 0) {
-      f->Print(" | ");
+      f->AddString(" | ");
     }
     if (range.IsSingleCid()) {
       const Class& cls =
           Class::Handle(Isolate::Current()->class_table()->At(range.cid_start));
-      f->Print("%s", String::Handle(cls.Name()).ToCString());
-      f->Print(" cid %" Pd " cnt:%" Pd " trgt:'%s'", range.cid_start, count,
-               target.ToQualifiedCString());
+      f->Printf("%s", String::Handle(cls.Name()).ToCString());
+      f->Printf(" cid %" Pd " cnt:%" Pd " trgt:'%s'", range.cid_start, count,
+                target.ToQualifiedCString());
     } else {
       const Class& cls = Class::Handle(target.Owner());
-      f->Print("cid %" Pd "-%" Pd " %s", range.cid_start, range.cid_end,
-               String::Handle(cls.Name()).ToCString());
-      f->Print(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString());
+      f->Printf("cid %" Pd "-%" Pd " %s", range.cid_start, range.cid_end,
+                String::Handle(cls.Name()).ToCString());
+      f->Printf(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString());
     }
 
     if (target_info->exactness.IsTracking()) {
-      f->Print(" %s", target_info->exactness.ToCString());
+      f->Printf(" %s", target_info->exactness.ToCString());
     }
   }
   if (num_checks_to_print < targets.length()) {
-    f->Print("...");
+    f->AddString("...");
   }
-  f->Print("]");
+  f->AddString("]");
 }
 
-static void PrintCidsHelper(BufferFormatter* f,
+static void PrintCidsHelper(BaseTextBuffer* f,
                             const Cids& targets,
                             intptr_t num_checks_to_print) {
-  f->Print(" Cids[");
-  f->Print("%" Pd ": ", targets.length());
+  f->AddString(" Cids[");
+  f->Printf("%" Pd ": ", targets.length());
   if ((num_checks_to_print == FlowGraphPrinter::kPrintAll) ||
       (num_checks_to_print > targets.length())) {
     num_checks_to_print = targets.length();
@@ -156,32 +156,33 @@
   for (intptr_t i = 0; i < num_checks_to_print; i++) {
     const CidRange& range = targets[i];
     if (i > 0) {
-      f->Print(" | ");
+      f->AddString(" | ");
     }
     const Class& cls =
         Class::Handle(Isolate::Current()->class_table()->At(range.cid_start));
-    f->Print("%s etc. ", String::Handle(cls.Name()).ToCString());
+    f->Printf("%s etc. ", String::Handle(cls.Name()).ToCString());
     if (range.IsSingleCid()) {
-      f->Print(" cid %" Pd, range.cid_start);
+      f->Printf(" cid %" Pd, range.cid_start);
     } else {
-      f->Print(" cid %" Pd "-%" Pd, range.cid_start, range.cid_end);
+      f->Printf(" cid %" Pd "-%" Pd, range.cid_start, range.cid_end);
     }
   }
   if (num_checks_to_print < targets.length()) {
-    f->Print("...");
+    f->AddString("...");
   }
-  f->Print("]");
+  f->AddString("]");
 }
 
-static void PrintICDataHelper(BufferFormatter* f,
+static void PrintICDataHelper(BaseTextBuffer* f,
                               const ICData& ic_data,
                               intptr_t num_checks_to_print) {
-  f->Print(" IC[");
+  f->AddString(" IC[");
   if (ic_data.is_tracking_exactness()) {
-    f->Print("(%s) ",
-             AbstractType::Handle(ic_data.receivers_static_type()).ToCString());
+    f->Printf(
+        "(%s) ",
+        AbstractType::Handle(ic_data.receivers_static_type()).ToCString());
   }
-  f->Print("%" Pd ": ", ic_data.NumberOfChecks());
+  f->Printf("%" Pd ": ", ic_data.NumberOfChecks());
   Function& target = Function::Handle();
   if ((num_checks_to_print == FlowGraphPrinter::kPrintAll) ||
       (num_checks_to_print > ic_data.NumberOfChecks())) {
@@ -192,40 +193,40 @@
     ic_data.GetCheckAt(i, &class_ids, &target);
     const intptr_t count = ic_data.GetCountAt(i);
     if (i > 0) {
-      f->Print(" | ");
+      f->AddString(" | ");
     }
     for (intptr_t k = 0; k < class_ids.length(); k++) {
       if (k > 0) {
-        f->Print(", ");
+        f->AddString(", ");
       }
       const Class& cls =
           Class::Handle(Isolate::Current()->class_table()->At(class_ids[k]));
-      f->Print("%s", String::Handle(cls.Name()).ToCString());
+      f->Printf("%s", String::Handle(cls.Name()).ToCString());
     }
-    f->Print(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString());
+    f->Printf(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString());
     if (ic_data.is_tracking_exactness()) {
-      f->Print(" %s", ic_data.GetExactnessAt(i).ToCString());
+      f->Printf(" %s", ic_data.GetExactnessAt(i).ToCString());
     }
   }
   if (num_checks_to_print < ic_data.NumberOfChecks()) {
-    f->Print("...");
+    f->AddString("...");
   }
-  f->Print("]");
+  f->AddString("]");
 }
 
-static void PrintICDataSortedHelper(BufferFormatter* f,
+static void PrintICDataSortedHelper(BaseTextBuffer* f,
                                     const ICData& ic_data_orig) {
   const ICData& ic_data =
       ICData::Handle(ic_data_orig.AsUnaryClassChecksSortedByCount());
-  f->Print(" IC[n:%" Pd "; ", ic_data.NumberOfChecks());
+  f->Printf(" IC[n:%" Pd "; ", ic_data.NumberOfChecks());
   for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) {
     const intptr_t count = ic_data.GetCountAt(i);
     const intptr_t cid = ic_data.GetReceiverClassIdAt(i);
     const Class& cls =
         Class::Handle(Isolate::Current()->class_table()->At(cid));
-    f->Print("%s : %" Pd ", ", String::Handle(cls.Name()).ToCString(), count);
+    f->Printf("%s : %" Pd ", ", String::Handle(cls.Name()).ToCString(), count);
   }
-  f->Print("]");
+  f->AddString("]");
 }
 
 void FlowGraphPrinter::PrintICData(const ICData& ic_data,
@@ -247,16 +248,16 @@
   // TODO(erikcorry): Print args descriptor.
 }
 
-static void PrintUse(BufferFormatter* f, const Definition& definition) {
+static void PrintUse(BaseTextBuffer* f, const Definition& definition) {
   if (definition.HasSSATemp()) {
     if (definition.HasPairRepresentation()) {
-      f->Print("(v%" Pd ", v%" Pd ")", definition.ssa_temp_index(),
-               definition.ssa_temp_index() + 1);
+      f->Printf("(v%" Pd ", v%" Pd ")", definition.ssa_temp_index(),
+                definition.ssa_temp_index() + 1);
     } else {
-      f->Print("v%" Pd "", definition.ssa_temp_index());
+      f->Printf("v%" Pd "", definition.ssa_temp_index());
     }
   } else if (definition.HasTemp()) {
-    f->Print("t%" Pd "", definition.temp_index());
+    f->Printf("t%" Pd "", definition.temp_index());
   }
 }
 
@@ -267,114 +268,114 @@
   return Thread::Current()->zone()->MakeCopyOfString(buffer);
 }
 
-void Instruction::PrintTo(BufferFormatter* f) const {
+void Instruction::PrintTo(BaseTextBuffer* f) const {
   if (GetDeoptId() != DeoptId::kNone) {
-    f->Print("%s:%" Pd "(", DebugName(), GetDeoptId());
+    f->Printf("%s:%" Pd "(", DebugName(), GetDeoptId());
   } else {
-    f->Print("%s(", DebugName());
+    f->Printf("%s(", DebugName());
   }
   PrintOperandsTo(f);
-  f->Print(")");
+  f->AddString(")");
 }
 
-void Instruction::PrintOperandsTo(BufferFormatter* f) const {
+void Instruction::PrintOperandsTo(BaseTextBuffer* f) const {
   for (int i = 0; i < InputCount(); ++i) {
-    if (i > 0) f->Print(", ");
+    if (i > 0) f->AddString(", ");
     if (InputAt(i) != NULL) InputAt(i)->PrintTo(f);
   }
 }
 
-void Definition::PrintTo(BufferFormatter* f) const {
+void Definition::PrintTo(BaseTextBuffer* f) const {
   PrintUse(f, *this);
-  if (HasSSATemp() || HasTemp()) f->Print(" <- ");
+  if (HasSSATemp() || HasTemp()) f->AddString(" <- ");
   if (GetDeoptId() != DeoptId::kNone) {
-    f->Print("%s:%" Pd "(", DebugName(), GetDeoptId());
+    f->Printf("%s:%" Pd "(", DebugName(), GetDeoptId());
   } else {
-    f->Print("%s(", DebugName());
+    f->Printf("%s(", DebugName());
   }
   PrintOperandsTo(f);
-  f->Print(")");
+  f->AddString(")");
   if (range_ != NULL) {
-    f->Print(" ");
+    f->AddString(" ");
     range_->PrintTo(f);
   }
 
   if (type_ != NULL) {
-    f->Print(" ");
+    f->AddString(" ");
     type_->PrintTo(f);
   }
 }
 
-void CheckNullInstr::PrintOperandsTo(BufferFormatter* f) const {
+void CheckNullInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   Definition::PrintOperandsTo(f);
   switch (exception_type()) {
     case kNoSuchMethod:
-      f->Print(", NoSuchMethodError");
+      f->AddString(", NoSuchMethodError");
       break;
     case kArgumentError:
-      f->Print(", ArgumentError");
+      f->AddString(", ArgumentError");
       break;
     case kCastError:
-      f->Print(", CastError");
+      f->AddString(", CastError");
       break;
   }
 }
 
-void Definition::PrintOperandsTo(BufferFormatter* f) const {
+void Definition::PrintOperandsTo(BaseTextBuffer* f) const {
   for (int i = 0; i < InputCount(); ++i) {
-    if (i > 0) f->Print(", ");
+    if (i > 0) f->AddString(", ");
     if (InputAt(i) != NULL) {
       InputAt(i)->PrintTo(f);
     }
   }
 }
 
-void RedefinitionInstr::PrintOperandsTo(BufferFormatter* f) const {
+void RedefinitionInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   Definition::PrintOperandsTo(f);
   if (constrained_type_ != nullptr) {
-    f->Print(" ^ %s", constrained_type_->ToCString());
+    f->Printf(" ^ %s", constrained_type_->ToCString());
   }
 }
 
-void ReachabilityFenceInstr::PrintOperandsTo(BufferFormatter* f) const {
+void ReachabilityFenceInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   value()->PrintTo(f);
 }
 
-void Value::PrintTo(BufferFormatter* f) const {
+void Value::PrintTo(BaseTextBuffer* f) const {
   PrintUse(f, *definition());
 
   if ((reaching_type_ != NULL) && (reaching_type_ != definition()->type_)) {
-    f->Print(" ");
+    f->AddString(" ");
     reaching_type_->PrintTo(f);
   }
 }
 
-void ConstantInstr::PrintOperandsTo(BufferFormatter* f) const {
+void ConstantInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   const char* cstr = value().ToCString();
   const char* new_line = strchr(cstr, '\n');
   if (new_line == NULL) {
-    f->Print("#%s", cstr);
+    f->Printf("#%s", cstr);
   } else {
     const intptr_t pos = new_line - cstr;
     char* buffer = Thread::Current()->zone()->Alloc<char>(pos + 1);
     strncpy(buffer, cstr, pos);
     buffer[pos] = '\0';
-    f->Print("#%s\\n...", buffer);
+    f->Printf("#%s\\n...", buffer);
   }
 }
 
-void ConstraintInstr::PrintOperandsTo(BufferFormatter* f) const {
+void ConstraintInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   value()->PrintTo(f);
-  f->Print(" ^ ");
+  f->AddString(" ^ ");
   constraint()->PrintTo(f);
 }
 
-void Range::PrintTo(BufferFormatter* f) const {
-  f->Print("[");
+void Range::PrintTo(BaseTextBuffer* f) const {
+  f->AddString("[");
   min_.PrintTo(f);
-  f->Print(", ");
+  f->AddString(", ");
   max_.PrintTo(f);
-  f->Print("]");
+  f->AddString("]");
 }
 
 const char* Range::ToCString(const Range* range) {
@@ -386,24 +387,24 @@
   return Thread::Current()->zone()->MakeCopyOfString(buffer);
 }
 
-void RangeBoundary::PrintTo(BufferFormatter* f) const {
+void RangeBoundary::PrintTo(BaseTextBuffer* f) const {
   switch (kind_) {
     case kSymbol:
-      f->Print("v%" Pd "",
-               reinterpret_cast<Definition*>(value_)->ssa_temp_index());
-      if (offset_ != 0) f->Print("%+" Pd64 "", offset_);
+      f->Printf("v%" Pd "",
+                reinterpret_cast<Definition*>(value_)->ssa_temp_index());
+      if (offset_ != 0) f->Printf("%+" Pd64 "", offset_);
       break;
     case kNegativeInfinity:
-      f->Print("-inf");
+      f->AddString("-inf");
       break;
     case kPositiveInfinity:
-      f->Print("+inf");
+      f->AddString("+inf");
       break;
     case kConstant:
-      f->Print("%" Pd64 "", value_);
+      f->Printf("%" Pd64 "", value_);
       break;
     case kUnknown:
-      f->Print("_|_");
+      f->AddString("_|_");
       break;
   }
 }
@@ -415,61 +416,61 @@
   return Thread::Current()->zone()->MakeCopyOfString(buffer);
 }
 
-void MakeTempInstr::PrintOperandsTo(BufferFormatter* f) const {}
+void MakeTempInstr::PrintOperandsTo(BaseTextBuffer* f) const {}
 
-void DropTempsInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%" Pd "", num_temps());
+void DropTempsInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%" Pd "", num_temps());
   if (value() != NULL) {
-    f->Print(", ");
+    f->AddString(", ");
     value()->PrintTo(f);
   }
 }
 
-void AssertAssignableInstr::PrintOperandsTo(BufferFormatter* f) const {
+void AssertAssignableInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   value()->PrintTo(f);
-  f->Print(", ");
+  f->AddString(", ");
   dst_type()->PrintTo(f);
-  f->Print(", '%s',", dst_name().ToCString());
-  f->Print(" instantiator_type_args(");
+  f->Printf(", '%s',", dst_name().ToCString());
+  f->AddString(" instantiator_type_args(");
   instantiator_type_arguments()->PrintTo(f);
-  f->Print("), function_type_args(");
+  f->AddString("), function_type_args(");
   function_type_arguments()->PrintTo(f);
-  f->Print(")");
+  f->AddString(")");
 }
 
-void AssertSubtypeInstr::PrintOperandsTo(BufferFormatter* f) const {
+void AssertSubtypeInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   sub_type()->PrintTo(f);
-  f->Print(", ");
+  f->AddString(", ");
   super_type()->PrintTo(f);
-  f->Print(", '%s', ", dst_name().ToCString());
-  f->Print(" instantiator_type_args(");
+  f->Printf(", '%s', ", dst_name().ToCString());
+  f->AddString(" instantiator_type_args(");
   instantiator_type_arguments()->PrintTo(f);
-  f->Print("), function_type_args(");
+  f->AddString("), function_type_args(");
   function_type_arguments()->PrintTo(f);
-  f->Print(")");
+  f->AddString(")");
 }
 
-void AssertBooleanInstr::PrintOperandsTo(BufferFormatter* f) const {
+void AssertBooleanInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   value()->PrintTo(f);
 }
 
-void ClosureCallInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print(" function=");
+void ClosureCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->AddString(" function=");
   InputAt(InputCount() - 1)->PrintTo(f);
-  f->Print("<%" Pd ">", type_args_len());
+  f->Printf("<%" Pd ">", type_args_len());
   for (intptr_t i = 0; i < ArgumentCount(); ++i) {
-    f->Print(", ");
+    f->AddString(", ");
     ArgumentValueAt(i)->PrintTo(f);
   }
   if (entry_kind() == Code::EntryKind::kUnchecked) {
-    f->Print(" using unchecked entrypoint");
+    f->AddString(" using unchecked entrypoint");
   }
 }
 
-void InstanceCallInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print(" %s<%" Pd ">", function_name().ToCString(), type_args_len());
+void InstanceCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf(" %s<%" Pd ">", function_name().ToCString(), type_args_len());
   for (intptr_t i = 0; i < ArgumentCount(); ++i) {
-    f->Print(", ");
+    f->AddString(", ");
     ArgumentValueAt(i)->PrintTo(f);
   }
   if (HasICData()) {
@@ -480,287 +481,287 @@
     }
   }
   if (result_type() != nullptr) {
-    f->Print(", result_type = %s", result_type()->ToCString());
+    f->Printf(", result_type = %s", result_type()->ToCString());
   }
   if (entry_kind() == Code::EntryKind::kUnchecked) {
-    f->Print(" using unchecked entrypoint");
+    f->AddString(" using unchecked entrypoint");
   }
 }
 
-void PolymorphicInstanceCallInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print(" %s<%" Pd ">", function_name().ToCString(), type_args_len());
+void PolymorphicInstanceCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf(" %s<%" Pd ">", function_name().ToCString(), type_args_len());
   for (intptr_t i = 0; i < ArgumentCount(); ++i) {
-    f->Print(", ");
+    f->AddString(", ");
     ArgumentValueAt(i)->PrintTo(f);
   }
   PrintTargetsHelper(f, targets_, FlowGraphPrinter::kPrintAll);
   if (complete()) {
-    f->Print(" COMPLETE");
+    f->AddString(" COMPLETE");
   }
   if (entry_kind() == Code::EntryKind::kUnchecked) {
-    f->Print(" using unchecked entrypoint");
+    f->AddString(" using unchecked entrypoint");
   }
 }
 
-void DispatchTableCallInstr::PrintOperandsTo(BufferFormatter* f) const {
+void DispatchTableCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   const String& name =
       String::Handle(interface_target().QualifiedUserVisibleName());
-  f->Print(" cid=");
+  f->AddString(" cid=");
   class_id()->PrintTo(f);
-  f->Print(" %s<%" Pd ">", name.ToCString(), type_args_len());
+  f->Printf(" %s<%" Pd ">", name.ToCString(), type_args_len());
   for (intptr_t i = 0; i < ArgumentCount(); ++i) {
-    f->Print(", ");
+    f->AddString(", ");
     ArgumentValueAt(i)->PrintTo(f);
   }
 }
 
-void StrictCompareInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s, ", Token::Str(kind()));
+void StrictCompareInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s, ", Token::Str(kind()));
   left()->PrintTo(f);
-  f->Print(", ");
+  f->AddString(", ");
   right()->PrintTo(f);
   if (needs_number_check()) {
-    f->Print(", with number check");
+    f->Printf(", with number check");
   }
 }
 
-void TestCidsInstr::PrintOperandsTo(BufferFormatter* f) const {
+void TestCidsInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   left()->PrintTo(f);
-  f->Print(" %s [", Token::Str(kind()));
+  f->Printf(" %s [", Token::Str(kind()));
   intptr_t length = cid_results().length();
   for (intptr_t i = 0; i < length; i += 2) {
-    f->Print("0x%" Px ":%s ", cid_results()[i],
-             cid_results()[i + 1] == 0 ? "false" : "true");
+    f->Printf("0x%" Px ":%s ", cid_results()[i],
+              cid_results()[i + 1] == 0 ? "false" : "true");
   }
-  f->Print("] ");
+  f->AddString("] ");
   if (CanDeoptimize()) {
     ASSERT(deopt_id() != DeoptId::kNone);
-    f->Print("else deoptimize ");
+    f->AddString("else deoptimize ");
   } else {
     ASSERT(deopt_id() == DeoptId::kNone);
-    f->Print("else %s ", cid_results()[length - 1] != 0 ? "false" : "true");
+    f->Printf("else %s ", cid_results()[length - 1] != 0 ? "false" : "true");
   }
 }
 
-void EqualityCompareInstr::PrintOperandsTo(BufferFormatter* f) const {
+void EqualityCompareInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   left()->PrintTo(f);
-  f->Print(" %s ", Token::Str(kind()));
+  f->Printf(" %s ", Token::Str(kind()));
   right()->PrintTo(f);
 }
 
-void StaticCallInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print(" %s<%" Pd "> ", String::Handle(function().name()).ToCString(),
-           type_args_len());
+void StaticCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf(" %s<%" Pd "> ", String::Handle(function().name()).ToCString(),
+            type_args_len());
   for (intptr_t i = 0; i < ArgumentCount(); ++i) {
-    if (i > 0) f->Print(", ");
+    if (i > 0) f->AddString(", ");
     ArgumentValueAt(i)->PrintTo(f);
   }
   if (entry_kind() == Code::EntryKind::kUnchecked) {
-    f->Print(", using unchecked entrypoint");
+    f->AddString(", using unchecked entrypoint");
   }
   if (function().recognized_kind() != MethodRecognizer::kUnknown) {
-    f->Print(", recognized_kind = %s",
-             MethodRecognizer::KindToCString(function().recognized_kind()));
+    f->Printf(", recognized_kind = %s",
+              MethodRecognizer::KindToCString(function().recognized_kind()));
   }
   if (result_type() != nullptr) {
-    f->Print(", result_type = %s", result_type()->ToCString());
+    f->Printf(", result_type = %s", result_type()->ToCString());
   }
 }
 
-void LoadLocalInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s @%d", local().name().ToCString(), local().index().value());
+void LoadLocalInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s @%d", local().name().ToCString(), local().index().value());
 }
 
-void StoreLocalInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s @%d, ", local().name().ToCString(), local().index().value());
+void StoreLocalInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s @%d, ", local().name().ToCString(), local().index().value());
   value()->PrintTo(f);
 }
 
-void NativeCallInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s", native_name().ToCString());
+void NativeCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s", native_name().ToCString());
 }
 
-void GuardFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s %s, ", String::Handle(field().name()).ToCString(),
-           field().GuardedPropertiesAsCString());
+void GuardFieldInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s %s, ", String::Handle(field().name()).ToCString(),
+            field().GuardedPropertiesAsCString());
   value()->PrintTo(f);
 }
 
-void StoreInstanceFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
+void StoreInstanceFieldInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   instance()->PrintTo(f);
-  f->Print(" . %s = ", slot().Name());
+  f->Printf(" . %s = ", slot().Name());
   value()->PrintTo(f);
 
   // Here, we just print the value of the enum field. We would prefer to get
   // the final decision on whether a store barrier will be emitted by calling
   // ShouldEmitStoreBarrier(), but that can change parts of the flow graph.
   if (emit_store_barrier_ == kNoStoreBarrier) {
-    f->Print(", NoStoreBarrier");
+    f->AddString(", NoStoreBarrier");
   }
 }
 
-void IfThenElseInstr::PrintOperandsTo(BufferFormatter* f) const {
+void IfThenElseInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   comparison()->PrintOperandsTo(f);
-  f->Print(" ? %" Pd " : %" Pd, if_true_, if_false_);
+  f->Printf(" ? %" Pd " : %" Pd, if_true_, if_false_);
 }
 
-void LoadStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s", String::Handle(field().name()).ToCString());
+void LoadStaticFieldInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s", String::Handle(field().name()).ToCString());
   if (calls_initializer()) {
-    f->Print(", CallsInitializer");
+    f->AddString(", CallsInitializer");
   }
 }
 
-void StoreStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s, ", String::Handle(field().name()).ToCString());
+void StoreStaticFieldInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s, ", String::Handle(field().name()).ToCString());
   value()->PrintTo(f);
 }
 
-void InstanceOfInstr::PrintOperandsTo(BufferFormatter* f) const {
+void InstanceOfInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   value()->PrintTo(f);
-  f->Print(" IS %s,", String::Handle(type().Name()).ToCString());
-  f->Print(" instantiator_type_args(");
+  f->Printf(" IS %s,", String::Handle(type().Name()).ToCString());
+  f->AddString(" instantiator_type_args(");
   instantiator_type_arguments()->PrintTo(f);
-  f->Print("), function_type_args(");
+  f->AddString("), function_type_args(");
   function_type_arguments()->PrintTo(f);
-  f->Print(")");
+  f->AddString(")");
 }
 
-void RelationalOpInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s, ", Token::Str(kind()));
+void RelationalOpInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s, ", Token::Str(kind()));
   left()->PrintTo(f);
-  f->Print(", ");
+  f->AddString(", ");
   right()->PrintTo(f);
 }
 
-void AllocateObjectInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s", String::Handle(cls().ScrubbedName()).ToCString());
+void AllocateObjectInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s", String::Handle(cls().ScrubbedName()).ToCString());
   for (intptr_t i = 0; i < InputCount(); ++i) {
-    f->Print(", ");
+    f->AddString(", ");
     InputAt(i)->PrintTo(f);
   }
   if (Identity().IsNotAliased()) {
-    f->Print(" <not-aliased>");
+    f->AddString(" <not-aliased>");
   }
 }
 
-void MaterializeObjectInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s", String::Handle(cls_.ScrubbedName()).ToCString());
+void MaterializeObjectInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s", String::Handle(cls_.ScrubbedName()).ToCString());
   for (intptr_t i = 0; i < InputCount(); i++) {
-    f->Print(", ");
-    f->Print("%s: ", slots_[i]->Name());
+    f->AddString(", ");
+    f->Printf("%s: ", slots_[i]->Name());
     InputAt(i)->PrintTo(f);
   }
 }
 
-void LoadFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
+void LoadFieldInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   instance()->PrintTo(f);
-  f->Print(" . %s%s", slot().Name(), slot().is_immutable() ? " {final}" : "");
+  f->Printf(" . %s%s", slot().Name(), slot().is_immutable() ? " {final}" : "");
   if (calls_initializer()) {
-    f->Print(", CallsInitializer");
+    f->AddString(", CallsInitializer");
   }
 }
 
-void LoadUntaggedInstr::PrintOperandsTo(BufferFormatter* f) const {
+void LoadUntaggedInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   object()->PrintTo(f);
-  f->Print(", %" Pd, offset());
+  f->Printf(", %" Pd, offset());
 }
 
-void InstantiateTypeInstr::PrintOperandsTo(BufferFormatter* f) const {
+void InstantiateTypeInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   const String& type_name = String::Handle(type().Name());
-  f->Print("%s,", type_name.ToCString());
-  f->Print(" instantiator_type_args(");
+  f->Printf("%s,", type_name.ToCString());
+  f->AddString(" instantiator_type_args(");
   instantiator_type_arguments()->PrintTo(f);
-  f->Print("), function_type_args(");
+  f->AddString("), function_type_args(");
   function_type_arguments()->PrintTo(f);
-  f->Print(")");
+  f->AddString(")");
 }
 
-void InstantiateTypeArgumentsInstr::PrintOperandsTo(BufferFormatter* f) const {
+void InstantiateTypeArgumentsInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   const String& type_args = String::Handle(type_arguments().Name());
-  f->Print("%s,", type_args.ToCString());
-  f->Print(" instantiator_type_args(");
+  f->Printf("%s,", type_args.ToCString());
+  f->AddString(" instantiator_type_args(");
   instantiator_type_arguments()->PrintTo(f);
-  f->Print("), function_type_args(");
+  f->AddString("), function_type_args(");
   function_type_arguments()->PrintTo(f);
-  f->Print("), instantiator_class(%s)", instantiator_class().ToCString());
+  f->Printf("), instantiator_class(%s)", instantiator_class().ToCString());
 }
 
-void AllocateContextInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%" Pd "", num_context_variables());
+void AllocateContextInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%" Pd "", num_context_variables());
 }
 
 void AllocateUninitializedContextInstr::PrintOperandsTo(
-    BufferFormatter* f) const {
-  f->Print("%" Pd "", num_context_variables());
+    BaseTextBuffer* f) const {
+  f->Printf("%" Pd "", num_context_variables());
 
   if (Identity().IsNotAliased()) {
-    f->Print(" <not-aliased>");
+    f->AddString(" <not-aliased>");
   }
 }
 
-void MathUnaryInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("'%s', ", MathUnaryInstr::KindToCString(kind()));
+void MathUnaryInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("'%s', ", MathUnaryInstr::KindToCString(kind()));
   value()->PrintTo(f);
 }
 
-void TruncDivModInstr::PrintOperandsTo(BufferFormatter* f) const {
+void TruncDivModInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   Definition::PrintOperandsTo(f);
 }
 
-void ExtractNthOutputInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("Extract %" Pd " from ", index());
+void ExtractNthOutputInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("Extract %" Pd " from ", index());
   Definition::PrintOperandsTo(f);
 }
 
-void UnaryIntegerOpInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s, ", Token::Str(op_kind()));
+void UnaryIntegerOpInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s, ", Token::Str(op_kind()));
   value()->PrintTo(f);
 }
 
-void CheckedSmiOpInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s", Token::Str(op_kind()));
-  f->Print(", ");
+void CheckedSmiOpInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s", Token::Str(op_kind()));
+  f->AddString(", ");
   left()->PrintTo(f);
-  f->Print(", ");
+  f->AddString(", ");
   right()->PrintTo(f);
 }
 
-void CheckedSmiComparisonInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s", Token::Str(kind()));
-  f->Print(", ");
+void CheckedSmiComparisonInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s", Token::Str(kind()));
+  f->AddString(", ");
   left()->PrintTo(f);
-  f->Print(", ");
+  f->AddString(", ");
   right()->PrintTo(f);
 }
 
-void BinaryIntegerOpInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s", Token::Str(op_kind()));
+void BinaryIntegerOpInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s", Token::Str(op_kind()));
   if (is_truncating()) {
-    f->Print(" [tr]");
+    f->AddString(" [tr]");
   } else if (!can_overflow()) {
-    f->Print(" [-o]");
+    f->AddString(" [-o]");
   }
-  f->Print(", ");
+  f->AddString(", ");
   left()->PrintTo(f);
-  f->Print(", ");
+  f->AddString(", ");
   right()->PrintTo(f);
 }
 
-void BinaryDoubleOpInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s, ", Token::Str(op_kind()));
+void BinaryDoubleOpInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s, ", Token::Str(op_kind()));
   left()->PrintTo(f);
-  f->Print(", ");
+  f->AddString(", ");
   right()->PrintTo(f);
 }
 
-void DoubleTestOpInstr::PrintOperandsTo(BufferFormatter* f) const {
+void DoubleTestOpInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   switch (op_kind()) {
     case MethodRecognizer::kDouble_getIsNaN:
-      f->Print("IsNaN ");
+      f->AddString("IsNaN ");
       break;
     case MethodRecognizer::kDouble_getIsInfinite:
-      f->Print("IsInfinite ");
+      f->AddString("IsInfinite ");
       break;
     default:
       UNREACHABLE();
@@ -774,131 +775,131 @@
 #undef CASE
 };
 
-void SimdOpInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s", simd_op_kind_string[kind()]);
+void SimdOpInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s", simd_op_kind_string[kind()]);
   if (HasMask()) {
-    f->Print(", mask = %" Pd "", mask());
+    f->Printf(", mask = %" Pd "", mask());
   }
   for (intptr_t i = 0; i < InputCount(); i++) {
-    f->Print(", ");
+    f->AddString(", ");
     InputAt(i)->PrintTo(f);
   }
 }
 
-void UnaryDoubleOpInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s, ", Token::Str(op_kind()));
+void UnaryDoubleOpInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s, ", Token::Str(op_kind()));
   value()->PrintTo(f);
 }
 
-void LoadClassIdInstr::PrintOperandsTo(BufferFormatter* f) const {
+void LoadClassIdInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   if (!input_can_be_smi_) {
-    f->Print("<non-smi> ");
+    f->AddString("<non-smi> ");
   }
   object()->PrintTo(f);
 }
 
-void CheckClassIdInstr::PrintOperandsTo(BufferFormatter* f) const {
+void CheckClassIdInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   value()->PrintTo(f);
 
   const Class& cls =
       Class::Handle(Isolate::Current()->class_table()->At(cids().cid_start));
   const String& name = String::Handle(cls.ScrubbedName());
   if (cids().IsSingleCid()) {
-    f->Print(", %s", name.ToCString());
+    f->Printf(", %s", name.ToCString());
   } else {
     const Class& cls2 =
         Class::Handle(Isolate::Current()->class_table()->At(cids().cid_end));
     const String& name2 = String::Handle(cls2.ScrubbedName());
-    f->Print(", cid %" Pd "-%" Pd " %s-%s", cids().cid_start, cids().cid_end,
-             name.ToCString(), name2.ToCString());
+    f->Printf(", cid %" Pd "-%" Pd " %s-%s", cids().cid_start, cids().cid_end,
+              name.ToCString(), name2.ToCString());
   }
 }
 
-void CheckClassInstr::PrintOperandsTo(BufferFormatter* f) const {
+void CheckClassInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   value()->PrintTo(f);
   PrintCidsHelper(f, cids_, FlowGraphPrinter::kPrintAll);
   if (IsNullCheck()) {
-    f->Print(" nullcheck");
+    f->AddString(" nullcheck");
   }
 }
 
-void CheckConditionInstr::PrintOperandsTo(BufferFormatter* f) const {
+void CheckConditionInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   comparison()->PrintOperandsTo(f);
 }
 
-void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_));
+void InvokeMathCFunctionInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s, ", MethodRecognizer::KindToCString(recognized_kind_));
   Definition::PrintOperandsTo(f);
 }
 
 void BlockEntryWithInitialDefs::PrintInitialDefinitionsTo(
-    BufferFormatter* f) const {
+    BaseTextBuffer* f) const {
   const GrowableArray<Definition*>& defns = initial_definitions_;
   if (defns.length() > 0) {
-    f->Print(" {");
+    f->AddString(" {");
     for (intptr_t i = 0; i < defns.length(); ++i) {
       Definition* def = defns[i];
-      f->Print("\n      ");
+      f->AddString("\n      ");
       def->PrintTo(f);
     }
-    f->Print("\n}");
+    f->AddString("\n}");
   }
 }
 
-void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("B%" Pd "[graph]:%" Pd, block_id(), GetDeoptId());
+void GraphEntryInstr::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("B%" Pd "[graph]:%" Pd, block_id(), GetDeoptId());
   BlockEntryWithInitialDefs::PrintInitialDefinitionsTo(f);
 }
 
-void JoinEntryInstr::PrintTo(BufferFormatter* f) const {
+void JoinEntryInstr::PrintTo(BaseTextBuffer* f) const {
   if (try_index() != kInvalidTryIndex) {
-    f->Print("B%" Pd "[join try_idx %" Pd "]:%" Pd " pred(", block_id(),
-             try_index(), GetDeoptId());
+    f->Printf("B%" Pd "[join try_idx %" Pd "]:%" Pd " pred(", block_id(),
+              try_index(), GetDeoptId());
   } else {
-    f->Print("B%" Pd "[join]:%" Pd " pred(", block_id(), GetDeoptId());
+    f->Printf("B%" Pd "[join]:%" Pd " pred(", block_id(), GetDeoptId());
   }
   for (intptr_t i = 0; i < predecessors_.length(); ++i) {
-    if (i > 0) f->Print(", ");
-    f->Print("B%" Pd, predecessors_[i]->block_id());
+    if (i > 0) f->AddString(", ");
+    f->Printf("B%" Pd, predecessors_[i]->block_id());
   }
-  f->Print(")");
+  f->AddString(")");
   if (phis_ != NULL) {
-    f->Print(" {");
+    f->AddString(" {");
     for (intptr_t i = 0; i < phis_->length(); ++i) {
       if ((*phis_)[i] == NULL) continue;
-      f->Print("\n      ");
+      f->AddString("\n      ");
       (*phis_)[i]->PrintTo(f);
     }
-    f->Print("\n}");
+    f->AddString("\n}");
   }
   if (HasParallelMove()) {
-    f->Print(" ");
+    f->AddString(" ");
     parallel_move()->PrintTo(f);
   }
 }
 
-void IndirectEntryInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("B%" Pd "[join indirect", block_id());
+void IndirectEntryInstr::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("B%" Pd "[join indirect", block_id());
   if (try_index() != kInvalidTryIndex) {
-    f->Print(" try_idx %" Pd, try_index());
+    f->Printf(" try_idx %" Pd, try_index());
   }
-  f->Print("]:%" Pd " pred(", GetDeoptId());
+  f->Printf("]:%" Pd " pred(", GetDeoptId());
   for (intptr_t i = 0; i < predecessors_.length(); ++i) {
-    if (i > 0) f->Print(", ");
-    f->Print("B%" Pd, predecessors_[i]->block_id());
+    if (i > 0) f->AddString(", ");
+    f->Printf("B%" Pd, predecessors_[i]->block_id());
   }
-  f->Print(")");
+  f->AddString(")");
   if (phis_ != NULL) {
-    f->Print(" {");
+    f->AddString(" {");
     for (intptr_t i = 0; i < phis_->length(); ++i) {
       if ((*phis_)[i] == NULL) continue;
-      f->Print("\n      ");
+      f->AddString("\n      ");
       (*phis_)[i]->PrintTo(f);
     }
-    f->Print("\n}");
+    f->AddString("\n}");
   }
   if (HasParallelMove()) {
-    f->Print(" ");
+    f->AddString(" ");
     parallel_move()->PrintTo(f);
   }
 }
@@ -935,62 +936,58 @@
   return "?";
 }
 
-void PhiInstr::PrintTo(BufferFormatter* f) const {
+void PhiInstr::PrintTo(BaseTextBuffer* f) const {
   if (HasPairRepresentation()) {
-    f->Print("(v%" Pd ", v%" Pd ") <- phi(", ssa_temp_index(),
-             ssa_temp_index() + 1);
+    f->Printf("(v%" Pd ", v%" Pd ") <- phi(", ssa_temp_index(),
+              ssa_temp_index() + 1);
   } else {
-    f->Print("v%" Pd " <- phi(", ssa_temp_index());
+    f->Printf("v%" Pd " <- phi(", ssa_temp_index());
   }
   for (intptr_t i = 0; i < inputs_.length(); ++i) {
     if (inputs_[i] != NULL) inputs_[i]->PrintTo(f);
-    if (i < inputs_.length() - 1) f->Print(", ");
+    if (i < inputs_.length() - 1) f->AddString(", ");
   }
-  f->Print(")");
-  if (is_alive()) {
-    f->Print(" alive");
-  } else {
-    f->Print(" dead");
-  }
+  f->AddString(")");
+  f->AddString(is_alive() ? " alive" : " dead");
   if (range_ != NULL) {
-    f->Print(" ");
+    f->AddString(" ");
     range_->PrintTo(f);
   }
 
   if (representation() != kNoRepresentation && representation() != kTagged) {
-    f->Print(" %s", RepresentationToCString(representation()));
+    f->Printf(" %s", RepresentationToCString(representation()));
   }
 
   if (HasType()) {
-    f->Print(" %s", TypeAsCString());
+    f->Printf(" %s", TypeAsCString());
   }
 }
 
-void UnboxIntegerInstr::PrintOperandsTo(BufferFormatter* f) const {
+void UnboxIntegerInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   if (is_truncating()) {
-    f->Print("[tr], ");
+    f->AddString("[tr], ");
   }
   Definition::PrintOperandsTo(f);
 }
 
-void IntConverterInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s->%s%s, ", RepresentationToCString(from()),
-           RepresentationToCString(to()), is_truncating() ? "[tr]" : "");
+void IntConverterInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s->%s%s, ", RepresentationToCString(from()),
+            RepresentationToCString(to()), is_truncating() ? "[tr]" : "");
   Definition::PrintOperandsTo(f);
 }
 
-void BitCastInstr::PrintOperandsTo(BufferFormatter* f) const {
+void BitCastInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   Definition::PrintOperandsTo(f);
-  f->Print(" (%s -> %s)", RepresentationToCString(from()),
-           RepresentationToCString(to()));
+  f->Printf(" (%s -> %s)", RepresentationToCString(from()),
+            RepresentationToCString(to()));
 }
 
-void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%" Pd, index());
+void ParameterInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%" Pd, index());
 }
 
-void SpecialParameterInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s", KindToCString(kind()));
+void SpecialParameterInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s", KindToCString(kind()));
 }
 
 const char* SpecialParameterInstr::ToCString() const {
@@ -1000,125 +997,125 @@
   return Thread::Current()->zone()->MakeCopyOfString(buffer);
 }
 
-void CheckStackOverflowInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("stack=%" Pd ", loop=%" Pd, stack_depth(), loop_depth());
+void CheckStackOverflowInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("stack=%" Pd ", loop=%" Pd, stack_depth(), loop_depth());
 }
 
-void TargetEntryInstr::PrintTo(BufferFormatter* f) const {
+void TargetEntryInstr::PrintTo(BaseTextBuffer* f) const {
   if (try_index() != kInvalidTryIndex) {
-    f->Print("B%" Pd "[target try_idx %" Pd "]:%" Pd, block_id(), try_index(),
-             GetDeoptId());
+    f->Printf("B%" Pd "[target try_idx %" Pd "]:%" Pd, block_id(), try_index(),
+              GetDeoptId());
   } else {
-    f->Print("B%" Pd "[target]:%" Pd, block_id(), GetDeoptId());
+    f->Printf("B%" Pd "[target]:%" Pd, block_id(), GetDeoptId());
   }
   if (HasParallelMove()) {
-    f->Print(" ");
+    f->AddString(" ");
     parallel_move()->PrintTo(f);
   }
 }
 
-void OsrEntryInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("B%" Pd "[osr entry]:%" Pd " stack_depth=%" Pd, block_id(),
-           GetDeoptId(), stack_depth());
+void OsrEntryInstr::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("B%" Pd "[osr entry]:%" Pd " stack_depth=%" Pd, block_id(),
+            GetDeoptId(), stack_depth());
   if (HasParallelMove()) {
-    f->Print("\n");
+    f->AddString("\n");
     parallel_move()->PrintTo(f);
   }
   BlockEntryWithInitialDefs::PrintInitialDefinitionsTo(f);
 }
 
-void FunctionEntryInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("B%" Pd "[function entry]:%" Pd, block_id(), GetDeoptId());
+void FunctionEntryInstr::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("B%" Pd "[function entry]:%" Pd, block_id(), GetDeoptId());
   if (HasParallelMove()) {
-    f->Print("\n");
+    f->AddString("\n");
     parallel_move()->PrintTo(f);
   }
   BlockEntryWithInitialDefs::PrintInitialDefinitionsTo(f);
 }
 
-void NativeEntryInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("B%" Pd "[native function entry]:%" Pd, block_id(), GetDeoptId());
+void NativeEntryInstr::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("B%" Pd "[native function entry]:%" Pd, block_id(), GetDeoptId());
   if (HasParallelMove()) {
-    f->Print("\n");
+    f->AddString("\n");
     parallel_move()->PrintTo(f);
   }
   BlockEntryWithInitialDefs::PrintInitialDefinitionsTo(f);
 }
 
-void ReturnInstr::PrintOperandsTo(BufferFormatter* f) const {
+void ReturnInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   Instruction::PrintOperandsTo(f);
   if (yield_index() != PcDescriptorsLayout::kInvalidYieldIndex) {
-    f->Print(", yield_index = %" Pd "", yield_index());
+    f->Printf(", yield_index = %" Pd "", yield_index());
   }
 }
 
-void FfiCallInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print(" pointer=");
+void FfiCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->AddString(" pointer=");
   InputAt(TargetAddressIndex())->PrintTo(f);
   for (intptr_t i = 0, n = InputCount(); i < n - 1; ++i) {
-    f->Print(", ");
+    f->AddString(", ");
     InputAt(i)->PrintTo(f);
-    f->Print(" (@");
+    f->AddString(" (@");
     marshaller_.Location(i).PrintTo(f);
-    f->Print(")");
+    f->AddString(")");
   }
 }
 
-void EnterHandleScopeInstr::PrintOperandsTo(BufferFormatter* f) const {
+void EnterHandleScopeInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   if (kind_ == Kind::kEnterHandleScope) {
-    f->Print("<enter handle scope>");
+    f->AddString("<enter handle scope>");
   } else {
-    f->Print("<get top api scope>");
+    f->AddString("<get top api scope>");
   }
 }
 
-void NativeReturnInstr::PrintOperandsTo(BufferFormatter* f) const {
+void NativeReturnInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   value()->PrintTo(f);
-  f->Print(" (@");
+  f->AddString(" (@");
   marshaller_.Location(compiler::ffi::kResultIndex).PrintTo(f);
-  f->Print(")");
+  f->AddString(")");
 }
 
-void NativeParameterInstr::PrintOperandsTo(BufferFormatter* f) const {
+void NativeParameterInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   // Where the calling convention puts it.
   marshaller_.Location(index_).PrintTo(f);
-  f->Print(" at ");
+  f->AddString(" at ");
   // Where the arguments are when pushed on the stack.
   marshaller_.NativeLocationOfNativeParameter(index_).PrintTo(f);
 }
 
-void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("B%" Pd "[target catch try_idx %" Pd " catch_try_idx %" Pd "]",
-           block_id(), try_index(), catch_try_index());
+void CatchBlockEntryInstr::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("B%" Pd "[target catch try_idx %" Pd " catch_try_idx %" Pd "]",
+            block_id(), try_index(), catch_try_index());
   if (HasParallelMove()) {
-    f->Print("\n");
+    f->AddString("\n");
     parallel_move()->PrintTo(f);
   }
 
   BlockEntryWithInitialDefs::PrintInitialDefinitionsTo(f);
 }
 
-void LoadIndexedUnsafeInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s[", RegisterNames::RegisterName(base_reg()));
+void LoadIndexedUnsafeInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s[", RegisterNames::RegisterName(base_reg()));
   index()->PrintTo(f);
-  f->Print(" + %" Pd "]", offset());
+  f->Printf(" + %" Pd "]", offset());
 }
 
-void StoreIndexedUnsafeInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s[", RegisterNames::RegisterName(base_reg()));
+void StoreIndexedUnsafeInstr::PrintOperandsTo(BaseTextBuffer* f) const {
+  f->Printf("%s[", RegisterNames::RegisterName(base_reg()));
   index()->PrintTo(f);
-  f->Print(" + %" Pd "], ", offset());
+  f->Printf(" + %" Pd "], ", offset());
   value()->PrintTo(f);
 }
 
-void StoreIndexedInstr::PrintOperandsTo(BufferFormatter* f) const {
+void StoreIndexedInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   Instruction::PrintOperandsTo(f);
   if (!ShouldEmitStoreBarrier()) {
-    f->Print(", NoStoreBarrier");
+    f->AddString(", NoStoreBarrier");
   }
 }
 
-void TailCallInstr::PrintOperandsTo(BufferFormatter* f) const {
+void TailCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   const char* name = "<unknown code>";
   if (code_.IsStubCode()) {
     name = StubCode::NameOfStub(code_.EntryPoint());
@@ -1129,78 +1126,78 @@
                  .ToFullyQualifiedCString();
     }
   }
-  f->Print("%s(", name);
+  f->Printf("%s(", name);
   InputAt(0)->PrintTo(f);
-  f->Print(")");
+  f->AddString(")");
 }
 
-void PushArgumentInstr::PrintOperandsTo(BufferFormatter* f) const {
+void PushArgumentInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   value()->PrintTo(f);
 }
 
-void GotoInstr::PrintTo(BufferFormatter* f) const {
+void GotoInstr::PrintTo(BaseTextBuffer* f) const {
   if (HasParallelMove()) {
     parallel_move()->PrintTo(f);
-    f->Print(" ");
+    f->AddString(" ");
   }
   if (GetDeoptId() != DeoptId::kNone) {
-    f->Print("goto:%" Pd " B%" Pd "", GetDeoptId(), successor()->block_id());
+    f->Printf("goto:%" Pd " B%" Pd "", GetDeoptId(), successor()->block_id());
   } else {
-    f->Print("goto: B%" Pd "", successor()->block_id());
+    f->Printf("goto: B%" Pd "", successor()->block_id());
   }
 }
 
-void IndirectGotoInstr::PrintTo(BufferFormatter* f) const {
+void IndirectGotoInstr::PrintTo(BaseTextBuffer* f) const {
   if (GetDeoptId() != DeoptId::kNone) {
-    f->Print("igoto:%" Pd "(", GetDeoptId());
+    f->Printf("igoto:%" Pd "(", GetDeoptId());
   } else {
-    f->Print("igoto:(");
+    f->AddString("igoto:(");
   }
   InputAt(0)->PrintTo(f);
-  f->Print(")");
+  f->AddString(")");
 }
 
-void BranchInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("%s ", DebugName());
-  f->Print("if ");
+void BranchInstr::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("%s ", DebugName());
+  f->AddString("if ");
   comparison()->PrintTo(f);
 
-  f->Print(" goto (%" Pd ", %" Pd ")", true_successor()->block_id(),
-           false_successor()->block_id());
+  f->Printf(" goto (%" Pd ", %" Pd ")", true_successor()->block_id(),
+            false_successor()->block_id());
 }
 
-void ParallelMoveInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("%s ", DebugName());
+void ParallelMoveInstr::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("%s ", DebugName());
   for (intptr_t i = 0; i < moves_.length(); i++) {
-    if (i != 0) f->Print(", ");
+    if (i != 0) f->AddString(", ");
     moves_[i]->dest().PrintTo(f);
-    f->Print(" <- ");
+    f->AddString(" <- ");
     moves_[i]->src().PrintTo(f);
   }
 }
 
-void Utf8ScanInstr::PrintTo(BufferFormatter* f) const {
+void Utf8ScanInstr::PrintTo(BaseTextBuffer* f) const {
   Definition::PrintTo(f);
-  f->Print(" [%s]", scan_flags_field_.Name());
+  f->Printf(" [%s]", scan_flags_field_.Name());
 }
 
-void Environment::PrintTo(BufferFormatter* f) const {
-  f->Print(" env={ ");
+void Environment::PrintTo(BaseTextBuffer* f) const {
+  f->AddString(" env={ ");
   int arg_count = 0;
   for (intptr_t i = 0; i < values_.length(); ++i) {
-    if (i > 0) f->Print(", ");
+    if (i > 0) f->AddString(", ");
     if (values_[i]->definition()->IsPushArgument()) {
-      f->Print("a%d", arg_count++);
+      f->Printf("a%d", arg_count++);
     } else {
       values_[i]->PrintTo(f);
     }
     if ((locations_ != NULL) && !locations_[i].IsInvalid()) {
-      f->Print(" [");
+      f->AddString(" [");
       locations_[i].PrintTo(f);
-      f->Print("]");
+      f->AddString("]");
     }
   }
-  f->Print(" }");
+  f->AddString(" }");
   if (outer_ != NULL) outer_->PrintTo(f);
 }
 
diff --git a/runtime/vm/compiler/backend/il_serializer.cc b/runtime/vm/compiler/backend/il_serializer.cc
index 309224d..5e6fc92 100644
--- a/runtime/vm/compiler/backend/il_serializer.cc
+++ b/runtime/vm/compiler/backend/il_serializer.cc
@@ -10,6 +10,7 @@
 #include "vm/compiler/method_recognizer.h"
 #include "vm/object_store.h"
 #include "vm/os.h"
+#include "vm/zone_text_buffer.h"
 
 namespace dart {
 
@@ -75,14 +76,9 @@
   object_store_->set_llvm_constant_hash_table(llvm_constant_map_.Release());
 }
 
-void FlowGraphSerializer::SerializeToBuffer(const FlowGraph* flow_graph,
-                                            TextBuffer* buffer) {
-  SerializeToBuffer(Thread::Current()->zone(), flow_graph, buffer);
-}
-
 void FlowGraphSerializer::SerializeToBuffer(Zone* zone,
                                             const FlowGraph* flow_graph,
-                                            TextBuffer* buffer) {
+                                            BaseTextBuffer* buffer) {
   ASSERT(buffer != nullptr);
   auto const sexp = SerializeToSExp(zone, flow_graph);
   if (FLAG_pretty_print_serialization) {
@@ -93,10 +89,6 @@
   buffer->AddString("\n\n");
 }
 
-SExpression* FlowGraphSerializer::SerializeToSExp(const FlowGraph* flow_graph) {
-  return SerializeToSExp(Thread::Current()->zone(), flow_graph);
-}
-
 SExpression* FlowGraphSerializer::SerializeToSExp(Zone* zone,
                                                   const FlowGraph* flow_graph) {
   FlowGraphSerializer serializer(zone, flow_graph);
@@ -163,7 +155,7 @@
   return new (zone()) SExpSymbol(OS::SCreate(zone(), "B%" Pd "", block_id));
 }
 
-void FlowGraphSerializer::SerializeCanonicalName(TextBuffer* b,
+void FlowGraphSerializer::SerializeCanonicalName(BaseTextBuffer* b,
                                                  const Object& obj) {
   ASSERT(!obj.IsNull());
   if (obj.IsFunction()) {
@@ -223,9 +215,9 @@
 
 SExpression* FlowGraphSerializer::CanonicalNameToSExp(const Object& obj) {
   ASSERT(!obj.IsNull());
-  TextBuffer b(100);
+  ZoneTextBuffer b(zone_, 100);
   SerializeCanonicalName(&b, obj);
-  return new (zone()) SExpSymbol(OS::SCreate(zone(), "%s", b.buf()));
+  return new (zone()) SExpSymbol(b.buffer());
 }
 
 SExpSymbol* FlowGraphSerializer::BlockEntryKindToTag(BlockEntryKind k) {
diff --git a/runtime/vm/compiler/backend/il_serializer.h b/runtime/vm/compiler/backend/il_serializer.h
index 8a65fad3..c5d8d6f 100644
--- a/runtime/vm/compiler/backend/il_serializer.h
+++ b/runtime/vm/compiler/backend/il_serializer.h
@@ -50,12 +50,9 @@
   SExpSymbol* BlockEntryKindToTag(BlockEntryKind k);
   static bool BlockEntryKindHasInitialDefs(BlockEntryKind kind);
 
-  static void SerializeToBuffer(const FlowGraph* flow_graph,
-                                TextBuffer* buffer);
   static void SerializeToBuffer(Zone* zone,
                                 const FlowGraph* flow_graph,
-                                TextBuffer* buffer);
-  static SExpression* SerializeToSExp(const FlowGraph* flow_graph);
+                                BaseTextBuffer* buffer);
   static SExpression* SerializeToSExp(Zone* zone, const FlowGraph* flow_graph);
 
   const FlowGraph* flow_graph() const { return flow_graph_; }
@@ -69,7 +66,7 @@
   SExpression* UseToSExp(const Definition* definition);
 
   // Helper method for creating canonical names.
-  void SerializeCanonicalName(TextBuffer* b, const Object& obj);
+  void SerializeCanonicalName(BaseTextBuffer* b, const Object& obj);
 
   // Methods for serializing Dart values. If the argument
   // value is the null object, the null pointer is returned.
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index a6905d3..128012a 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -2064,7 +2064,10 @@
 }
 
 void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
+
   const intptr_t value_cid = value()->Type()->ToCid();
   const intptr_t field_cid = field().guarded_cid();
   const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid;
@@ -2421,7 +2424,10 @@
 }
 
 void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
+
   compiler::Label skip_store;
 
   const Register instance_reg = locs()->in(0).reg();
@@ -2814,7 +2820,10 @@
 }
 
 void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ASSERT(sizeof(classid_t) == kInt16Size);
+  ASSERT(compiler::target::ObjectLayout::kClassIdTagSize == 16);
+  ASSERT(sizeof(FieldLayout::guarded_cid_) == 2);
+  ASSERT(sizeof(FieldLayout::is_nullable_) == 2);
+
   Register instance_reg = locs()->in(0).reg();
   if (IsUnboxedLoad() && compiler->is_optimizing()) {
     ASSERT(!calls_initializer());
@@ -4437,15 +4446,37 @@
                                                     bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = ValueFitsSmi() ? 0 : 1;
-  LocationSummary* summary = new (zone)
-      LocationSummary(zone, kNumInputs, kNumTemps,
-                      ValueFitsSmi() ? LocationSummary::kNoCall
-                                     : LocationSummary::kCallOnSlowPath);
+  // Shared slow path is used in BoxInt64Instr::EmitNativeCode in
+  // FLAG_use_bare_instructions mode and only after VM isolate stubs where
+  // replaced with isolate-specific stubs.
+  auto object_store = Isolate::Current()->object_store();
+  const bool stubs_in_vm_isolate =
+      object_store->allocate_mint_with_fpu_regs_stub()
+          ->ptr()
+          ->InVMIsolateHeap() ||
+      object_store->allocate_mint_without_fpu_regs_stub()
+          ->ptr()
+          ->InVMIsolateHeap();
+  const bool shared_slow_path_call = SlowPathSharingSupported(opt) &&
+                                     FLAG_use_bare_instructions &&
+                                     !stubs_in_vm_isolate;
+  LocationSummary* summary = new (zone) LocationSummary(
+      zone, kNumInputs, kNumTemps,
+      ValueFitsSmi()
+          ? LocationSummary::kNoCall
+          : ((shared_slow_path_call ? LocationSummary::kCallOnSharedSlowPath
+                                    : LocationSummary::kCallOnSlowPath)));
   summary->set_in(0, Location::RequiresRegister());
-  if (!ValueFitsSmi()) {
+  if (ValueFitsSmi()) {
+    summary->set_out(0, Location::RequiresRegister());
+  } else if (shared_slow_path_call) {
+    summary->set_out(0,
+                     Location::RegisterLocation(AllocateMintABI::kResultReg));
+    summary->set_temp(0, Location::RegisterLocation(AllocateMintABI::kTempReg));
+  } else {
+    summary->set_out(0, Location::RequiresRegister());
     summary->set_temp(0, Location::RequiresRegister());
   }
-  summary->set_out(0, Location::RequiresRegister());
   return summary;
 }
 
@@ -4454,17 +4485,39 @@
   const Register value = locs()->in(0).reg();
   __ MoveRegister(out, value);
   __ SmiTag(out);
-  if (!ValueFitsSmi()) {
-    const Register temp = locs()->temp(0).reg();
-    compiler::Label done;
-    // If the value doesn't fit in a smi, the tagging changes the sign,
-    // which causes the overflow flag to be set.
-    __ j(NO_OVERFLOW, &done);
+  if (ValueFitsSmi()) {
+    return;
+  }
+  // If the value doesn't fit in a smi, the tagging changes the sign,
+  // which causes the overflow flag to be set.
+  compiler::Label done;
+  __ j(NO_OVERFLOW, &done);
+
+  const Register temp = locs()->temp(0).reg();
+  if (compiler->intrinsic_mode()) {
+    __ TryAllocate(compiler->mint_class(),
+                   compiler->intrinsic_slow_path_label(),
+                   /*near_jump=*/true, out, temp);
+  } else if (locs()->call_on_shared_slow_path()) {
+    auto object_store = compiler->isolate()->object_store();
+    const bool live_fpu_regs = locs()->live_registers()->FpuRegisterCount() > 0;
+    const auto& stub = Code::ZoneHandle(
+        compiler->zone(),
+        live_fpu_regs ? object_store->allocate_mint_with_fpu_regs_stub()
+                      : object_store->allocate_mint_without_fpu_regs_stub());
+
+    ASSERT(!locs()->live_registers()->ContainsRegister(
+        AllocateMintABI::kResultReg));
+    auto extended_env = compiler->SlowPathEnvironmentFor(this, 0);
+    compiler->GenerateStubCall(token_pos(), stub, PcDescriptorsLayout::kOther,
+                               locs(), DeoptId::kNone, extended_env);
+  } else {
     BoxAllocationSlowPath::Allocate(compiler, this, compiler->mint_class(), out,
                                     temp);
-    __ movq(compiler::FieldAddress(out, Mint::value_offset()), value);
-    __ Bind(&done);
   }
+
+  __ movq(compiler::FieldAddress(out, Mint::value_offset()), value);
+  __ Bind(&done);
 }
 
 LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(Zone* zone,
diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc
index 4b47da7..7b04675 100644
--- a/runtime/vm/compiler/backend/inliner.cc
+++ b/runtime/vm/compiler/backend/inliner.cc
@@ -194,6 +194,12 @@
         if (current->IsRedefinition()) {
           continue;
         }
+        // UnboxedConstant is often folded into the indexing
+        // instructions (similar to Constant instructions which
+        // belong to initial definitions and not counted here).
+        if (current->IsUnboxedConstant()) {
+          continue;
+        }
         ++instruction_count_;
         // Count inputs of certain instructions as if separate PushArgument
         // instructions are used for inputs. This is done in order to
diff --git a/runtime/vm/compiler/backend/inliner_test.cc b/runtime/vm/compiler/backend/inliner_test.cc
index 2db1229..081e794 100644
--- a/runtime/vm/compiler/backend/inliner_test.cc
+++ b/runtime/vm/compiler/backend/inliner_test.cc
@@ -227,12 +227,10 @@
         kMatchAndMoveJoinEntry,
         kMatchAndMoveCheckStackOverflow,
         kMatchAndMoveUnboxInt64,
-        kMatchAndMoveUnboxInt64,
         kMatchAndMoveBranchTrue,
 
         // Loop body
         kMatchAndMoveTargetEntry,
-        kWordSize == 8 ? kMatchAndMoveUnboxInt64 : kNop,
         kMatchAndMoveGenericCheckBound,
         kMatchAndMoveStoreIndexed,
         kMatchAndMoveCheckedSmiOp,
@@ -242,7 +240,6 @@
         kMatchAndMoveJoinEntry,
         kMatchAndMoveCheckStackOverflow,
         kMatchAndMoveUnboxInt64,
-        kMatchAndMoveUnboxInt64,
         kMatchAndMoveBranchFalse,
 
         // After loop
diff --git a/runtime/vm/compiler/backend/locations.cc b/runtime/vm/compiler/backend/locations.cc
index 8d7c759..2c40969 100644
--- a/runtime/vm/compiler/backend/locations.cc
+++ b/runtime/vm/compiler/backend/locations.cc
@@ -249,24 +249,24 @@
   return "?";
 }
 
-void Location::PrintTo(BufferFormatter* f) const {
+void Location::PrintTo(BaseTextBuffer* f) const {
   if (!FLAG_support_il_printer) {
     return;
   }
   if (kind() == kStackSlot) {
-    f->Print("S%+" Pd "", stack_index());
+    f->Printf("S%+" Pd "", stack_index());
   } else if (kind() == kDoubleStackSlot) {
-    f->Print("DS%+" Pd "", stack_index());
+    f->Printf("DS%+" Pd "", stack_index());
   } else if (kind() == kQuadStackSlot) {
-    f->Print("QS%+" Pd "", stack_index());
+    f->Printf("QS%+" Pd "", stack_index());
   } else if (IsPairLocation()) {
-    f->Print("(");
+    f->AddString("(");
     AsPairLocation()->At(0).PrintTo(f);
-    f->Print(", ");
+    f->AddString(", ");
     AsPairLocation()->At(1).PrintTo(f);
-    f->Print(")");
+    f->AddString(")");
   } else {
-    f->Print("%s", Name());
+    f->Printf("%s", Name());
   }
 }
 
@@ -371,34 +371,34 @@
   return loc;
 }
 
-void LocationSummary::PrintTo(BufferFormatter* f) const {
+void LocationSummary::PrintTo(BaseTextBuffer* f) const {
   if (!FLAG_support_il_printer) {
     return;
   }
   if (input_count() > 0) {
-    f->Print(" (");
+    f->AddString(" (");
     for (intptr_t i = 0; i < input_count(); i++) {
-      if (i != 0) f->Print(", ");
+      if (i != 0) f->AddString(", ");
       in(i).PrintTo(f);
     }
-    f->Print(")");
+    f->AddString(")");
   }
 
   if (temp_count() > 0) {
-    f->Print(" [");
+    f->AddString(" [");
     for (intptr_t i = 0; i < temp_count(); i++) {
-      if (i != 0) f->Print(", ");
+      if (i != 0) f->AddString(", ");
       temp(i).PrintTo(f);
     }
-    f->Print("]");
+    f->AddString("]");
   }
 
   if (!out(0).IsInvalid()) {
-    f->Print(" => ");
+    f->AddString(" => ");
     out(0).PrintTo(f);
   }
 
-  if (always_calls()) f->Print(" C");
+  if (always_calls()) f->AddString(" C");
 }
 
 #if defined(DEBUG)
diff --git a/runtime/vm/compiler/backend/locations.h b/runtime/vm/compiler/backend/locations.h
index d685250..34edf4c 100644
--- a/runtime/vm/compiler/backend/locations.h
+++ b/runtime/vm/compiler/backend/locations.h
@@ -18,7 +18,7 @@
 
 namespace dart {
 
-class BufferFormatter;
+class BaseTextBuffer;
 class ConstantInstr;
 class Definition;
 class PairLocation;
@@ -351,7 +351,7 @@
   intptr_t ToStackSlotOffset() const;
 
   const char* Name() const;
-  void PrintTo(BufferFormatter* f) const;
+  void PrintTo(BaseTextBuffer* f) const;
   void Print() const;
   const char* ToCString() const;
 
@@ -723,7 +723,7 @@
     return contains_call_ == kCallOnSharedSlowPath;
   }
 
-  void PrintTo(BufferFormatter* f) const;
+  void PrintTo(BaseTextBuffer* f) const;
 
   static LocationSummary* Make(Zone* zone,
                                intptr_t input_count,
diff --git a/runtime/vm/compiler/backend/loops.cc b/runtime/vm/compiler/backend/loops.cc
index 21a4a77..4ff2dc8 100644
--- a/runtime/vm/compiler/backend/loops.cc
+++ b/runtime/vm/compiler/backend/loops.cc
@@ -941,28 +941,32 @@
   return false;
 }
 
-const char* InductionVar::ToCString() const {
-  char buffer[1024];
-  BufferFormatter f(buffer, sizeof(buffer));
+void InductionVar::PrintTo(BaseTextBuffer* f) const {
   switch (kind_) {
     case kInvariant:
       if (mult_ != 0) {
-        f.Print("(%" Pd64 " + %" Pd64 " x %.4s)", offset_, mult_,
-                def_->ToCString());
+        f->Printf("(%" Pd64 " + %" Pd64 " x %.4s)", offset_, mult_,
+                  def_->ToCString());
       } else {
-        f.Print("%" Pd64, offset_);
+        f->Printf("%" Pd64, offset_);
       }
       break;
     case kLinear:
-      f.Print("LIN(%s + %s * i)", initial_->ToCString(), next_->ToCString());
+      f->Printf("LIN(%s + %s * i)", initial_->ToCString(), next_->ToCString());
       break;
     case kWrapAround:
-      f.Print("WRAP(%s, %s)", initial_->ToCString(), next_->ToCString());
+      f->Printf("WRAP(%s, %s)", initial_->ToCString(), next_->ToCString());
       break;
     case kPeriodic:
-      f.Print("PERIOD(%s, %s)", initial_->ToCString(), next_->ToCString());
+      f->Printf("PERIOD(%s, %s)", initial_->ToCString(), next_->ToCString());
       break;
   }
+}
+
+const char* InductionVar::ToCString() const {
+  char buffer[1024];
+  BufferFormatter f(buffer, sizeof(buffer));
+  PrintTo(&f);
   return Thread::Current()->zone()->MakeCopyOfString(buffer);
 }
 
@@ -1112,24 +1116,28 @@
   return false;
 }
 
-const char* LoopInfo::ToCString() const {
-  char buffer[1024];
-  BufferFormatter f(buffer, sizeof(buffer));
-  f.Print("%*c", static_cast<int>(2 * NestingDepth()), ' ');
-  f.Print("loop%" Pd " B%" Pd " ", id_, header_->block_id());
+void LoopInfo::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("%*c", static_cast<int>(2 * NestingDepth()), ' ');
+  f->Printf("loop%" Pd " B%" Pd " ", id_, header_->block_id());
   intptr_t num_blocks = 0;
   for (BitVector::Iterator it(blocks_); !it.Done(); it.Advance()) {
     num_blocks++;
   }
-  f.Print("#blocks=%" Pd, num_blocks);
-  if (outer_ != nullptr) f.Print(" outer=%" Pd, outer_->id_);
-  if (inner_ != nullptr) f.Print(" inner=%" Pd, inner_->id_);
-  if (next_ != nullptr) f.Print(" next=%" Pd, next_->id_);
-  f.Print(" [");
+  f->Printf("#blocks=%" Pd, num_blocks);
+  if (outer_ != nullptr) f->Printf(" outer=%" Pd, outer_->id_);
+  if (inner_ != nullptr) f->Printf(" inner=%" Pd, inner_->id_);
+  if (next_ != nullptr) f->Printf(" next=%" Pd, next_->id_);
+  f->AddString(" [");
   for (intptr_t i = 0, n = back_edges_.length(); i < n; i++) {
-    f.Print(" B%" Pd, back_edges_[i]->block_id());
+    f->Printf(" B%" Pd, back_edges_[i]->block_id());
   }
-  f.Print(" ]");
+  f->AddString(" ]");
+}
+
+const char* LoopInfo::ToCString() const {
+  char buffer[1024];
+  BufferFormatter f(buffer, sizeof(buffer));
+  PrintTo(&f);
   return Thread::Current()->zone()->MakeCopyOfString(buffer);
 }
 
diff --git a/runtime/vm/compiler/backend/loops.h b/runtime/vm/compiler/backend/loops.h
index 704508b..9a70102 100644
--- a/runtime/vm/compiler/backend/loops.h
+++ b/runtime/vm/compiler/backend/loops.h
@@ -128,6 +128,7 @@
   const GrowableArray<Bound>& bounds() { return bounds_; }
 
   // For debugging.
+  void PrintTo(BaseTextBuffer* f) const;
   const char* ToCString() const;
 
   // Returns true if x is invariant.
@@ -258,6 +259,7 @@
   LoopInfo* next() const { return next_; }
 
   // For debugging.
+  void PrintTo(BaseTextBuffer* f) const;
   const char* ToCString() const;
 
  private:
diff --git a/runtime/vm/compiler/backend/loops_test.cc b/runtime/vm/compiler/backend/loops_test.cc
index 3898334..8f1201e 100644
--- a/runtime/vm/compiler/backend/loops_test.cc
+++ b/runtime/vm/compiler/backend/loops_test.cc
@@ -24,12 +24,12 @@
 namespace dart {
 
 // Helper method to construct an induction debug string for loop hierarchy.
-void TestString(BufferFormatter* f,
+void TestString(BaseTextBuffer* f,
                 LoopInfo* loop,
                 const GrowableArray<BlockEntryInstr*>& preorder) {
   for (; loop != nullptr; loop = loop->next()) {
     intptr_t depth = loop->NestingDepth();
-    f->Print("%*c[%" Pd "\n", static_cast<int>(2 * depth), ' ', loop->id());
+    f->Printf("%*c[%" Pd "\n", static_cast<int>(2 * depth), ' ', loop->id());
     for (BitVector::Iterator block_it(loop->blocks()); !block_it.Done();
          block_it.Advance()) {
       BlockEntryInstr* block = preorder[block_it.Current()];
@@ -38,12 +38,12 @@
           InductionVar* induc = loop->LookupInduction(it.Current());
           if (induc != nullptr) {
             // Obtain the debug string for induction and bounds.
-            f->Print("%*c%s", static_cast<int>(2 * depth), ' ',
-                     induc->ToCString());
+            f->Printf("%*c%s", static_cast<int>(2 * depth), ' ',
+                      induc->ToCString());
             for (auto bound : induc->bounds()) {
-              f->Print(" %s", bound.limit_->ToCString());
+              f->Printf(" %s", bound.limit_->ToCString());
             }
-            f->Print("\n");
+            f->AddString("\n");
           }
         }
       }
@@ -51,13 +51,13 @@
         InductionVar* induc =
             loop->LookupInduction(it.Current()->AsDefinition());
         if (InductionVar::IsInduction(induc)) {
-          f->Print("%*c%s\n", static_cast<int>(2 * depth), ' ',
-                   induc->ToCString());
+          f->Printf("%*c%s\n", static_cast<int>(2 * depth), ' ',
+                    induc->ToCString());
         }
       }
     }
     TestString(f, loop->inner(), preorder);
-    f->Print("%*c]\n", static_cast<int>(2 * depth), ' ');
+    f->Printf("%*c]\n", static_cast<int>(2 * depth), ' ');
   }
 }
 
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index 4983afd..281e3c9 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -1310,22 +1310,22 @@
   }
 
 #ifndef PRODUCT
-  static void PrettyPrintIndexBoundRecursively(BufferFormatter* f,
+  static void PrettyPrintIndexBoundRecursively(BaseTextBuffer* f,
                                                Definition* index_bound) {
     BinarySmiOpInstr* binary_op = index_bound->AsBinarySmiOp();
     if (binary_op != NULL) {
-      f->Print("(");
+      f->AddString("(");
       PrettyPrintIndexBoundRecursively(f, binary_op->left()->definition());
-      f->Print(" %s ", Token::Str(binary_op->op_kind()));
+      f->Printf(" %s ", Token::Str(binary_op->op_kind()));
       PrettyPrintIndexBoundRecursively(f, binary_op->right()->definition());
-      f->Print(")");
+      f->AddString(")");
     } else if (index_bound->IsConstant()) {
-      f->Print("%" Pd "",
-               Smi::Cast(index_bound->AsConstant()->value()).Value());
+      f->Printf("%" Pd "",
+                Smi::Cast(index_bound->AsConstant()->value()).Value());
     } else {
-      f->Print("v%" Pd "", index_bound->ssa_temp_index());
+      f->Printf("v%" Pd "", index_bound->ssa_temp_index());
     }
-    f->Print(" {%s}", Range::ToCString(index_bound->range()));
+    f->Printf(" {%s}", Range::ToCString(index_bound->range()));
   }
 
   static const char* IndexBoundToCString(Definition* index_bound) {
@@ -2858,6 +2858,15 @@
   }
 }
 
+void BinaryIntegerOpInstr::InferRange(RangeAnalysis* analysis, Range* range) {
+  auto const left_size =
+      RepresentationToRangeSize(RequiredInputRepresentation(0));
+  auto const right_size =
+      RepresentationToRangeSize(RequiredInputRepresentation(1));
+  InferRangeHelper(GetInputRange(analysis, left_size, left()),
+                   GetInputRange(analysis, right_size, right()), range);
+}
+
 void BinarySmiOpInstr::InferRange(RangeAnalysis* analysis, Range* range) {
   const Range* right_smi_range = analysis->GetSmiRange(right());
   // TODO(vegorov) completely remove this once GetSmiRange is eliminated.
@@ -2869,16 +2878,6 @@
   InferRangeHelper(analysis->GetSmiRange(left()), right_smi_range, range);
 }
 
-void BinaryInt32OpInstr::InferRange(RangeAnalysis* analysis, Range* range) {
-  InferRangeHelper(analysis->GetSmiRange(left()),
-                   analysis->GetSmiRange(right()), range);
-}
-
-void BinaryInt64OpInstr::InferRange(RangeAnalysis* analysis, Range* range) {
-  InferRangeHelper(left()->definition()->range(),
-                   right()->definition()->range(), range);
-}
-
 void ShiftIntegerOpInstr::InferRange(RangeAnalysis* analysis, Range* range) {
   const Range* right_range = RequiredInputRepresentation(1) == kTagged
                                  ? analysis->GetSmiRange(right())
diff --git a/runtime/vm/compiler/backend/range_analysis.h b/runtime/vm/compiler/backend/range_analysis.h
index 0ed4936..0f8cc42 100644
--- a/runtime/vm/compiler/backend/range_analysis.h
+++ b/runtime/vm/compiler/backend/range_analysis.h
@@ -244,7 +244,7 @@
   // IsSymbol() -> upper bound computed from definition + offset.
   RangeBoundary UpperBound() const;
 
-  void PrintTo(BufferFormatter* f) const;
+  void PrintTo(BaseTextBuffer* f) const;
   const char* ToCString() const;
   SExpression* ToSExpression(FlowGraphSerializer* s);
 
@@ -345,7 +345,7 @@
                  RangeBoundary::MaxConstant(size));
   }
 
-  void PrintTo(BufferFormatter* f) const;
+  void PrintTo(BaseTextBuffer* f) const;
   static const char* ToCString(const Range* range);
   SExpression* ToSExpression(FlowGraphSerializer* s);
 
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.cc b/runtime/vm/compiler/backend/redundancy_elimination.cc
index a7a1610..1a4d8af 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination.cc
@@ -1539,6 +1539,118 @@
   }
 }
 
+void DelayAllocations::Optimize(FlowGraph* graph) {
+  // Go through all AllocateObject instructions and move them down to their
+  // dominant use when doing so is sound.
+  DirectChainedHashMap<IdentitySetKeyValueTrait<Instruction*>> moved;
+  for (BlockIterator block_it = graph->reverse_postorder_iterator();
+       !block_it.Done(); block_it.Advance()) {
+    BlockEntryInstr* block = block_it.Current();
+
+    for (ForwardInstructionIterator instr_it(block); !instr_it.Done();
+         instr_it.Advance()) {
+      Definition* def = instr_it.Current()->AsDefinition();
+      if (def != nullptr && (def->IsAllocateObject() || def->IsCreateArray()) &&
+          def->env() == nullptr && !moved.HasKey(def)) {
+        Instruction* use = DominantUse(def);
+        if (use != nullptr && !use->IsPhi() && IsOneTimeUse(use, def)) {
+          instr_it.RemoveCurrentFromGraph();
+          def->InsertBefore(use);
+          moved.Insert(def);
+        }
+      }
+    }
+  }
+}
+
+Instruction* DelayAllocations::DominantUse(Definition* def) {
+  // Find the use that dominates all other uses.
+
+  // Collect all uses.
+  DirectChainedHashMap<IdentitySetKeyValueTrait<Instruction*>> uses;
+  for (Value::Iterator it(def->input_use_list()); !it.Done(); it.Advance()) {
+    Instruction* use = it.Current()->instruction();
+    uses.Insert(use);
+  }
+  for (Value::Iterator it(def->env_use_list()); !it.Done(); it.Advance()) {
+    Instruction* use = it.Current()->instruction();
+    uses.Insert(use);
+  }
+
+  // Find the dominant use.
+  Instruction* dominant_use = nullptr;
+  auto use_it = uses.GetIterator();
+  while (auto use = use_it.Next()) {
+    // Start with the instruction before the use, then walk backwards through
+    // blocks in the dominator chain until we hit the definition or another use.
+    Instruction* instr = nullptr;
+    if (auto phi = (*use)->AsPhi()) {
+      // For phi uses, the dominant use only has to dominate the
+      // predecessor block corresponding to the phi input.
+      ASSERT(phi->InputCount() == phi->block()->PredecessorCount());
+      for (intptr_t i = 0; i < phi->InputCount(); i++) {
+        if (phi->InputAt(i)->definition() == def) {
+          instr = phi->block()->PredecessorAt(i)->last_instruction();
+          break;
+        }
+      }
+      ASSERT(instr != nullptr);
+    } else {
+      instr = (*use)->previous();
+    }
+
+    bool dominated = false;
+    while (instr != def) {
+      if (uses.HasKey(instr)) {
+        // We hit another use.
+        dominated = true;
+        break;
+      }
+      if (auto block = instr->AsBlockEntry()) {
+        instr = block->dominator()->last_instruction();
+      } else {
+        instr = instr->previous();
+      }
+    }
+    if (!dominated) {
+      if (dominant_use != nullptr) {
+        // More than one use reached the definition, which means no use
+        // dominates all other uses.
+        return nullptr;
+      }
+      dominant_use = *use;
+    }
+  }
+
+  return dominant_use;
+}
+
+bool DelayAllocations::IsOneTimeUse(Instruction* use, Definition* def) {
+  // Check that this use is always executed at most once for each execution of
+  // the definition, i.e. that there is no path from the use to itself that
+  // doesn't pass through the definition.
+  BlockEntryInstr* use_block = use->GetBlock();
+  BlockEntryInstr* def_block = def->GetBlock();
+  if (use_block == def_block) return true;
+
+  DirectChainedHashMap<IdentitySetKeyValueTrait<BlockEntryInstr*>> seen;
+  GrowableArray<BlockEntryInstr*> worklist;
+  worklist.Add(use_block);
+
+  while (!worklist.is_empty()) {
+    BlockEntryInstr* block = worklist.RemoveLast();
+    for (intptr_t i = 0; i < block->PredecessorCount(); i++) {
+      BlockEntryInstr* pred = block->PredecessorAt(i);
+      if (pred == use_block) return false;
+      if (pred == def_block) continue;
+      if (seen.HasKey(pred)) continue;
+      seen.Insert(pred);
+      worklist.Add(pred);
+    }
+  }
+  return true;
+}
+
 class LoadOptimizer : public ValueObject {
  public:
   LoadOptimizer(FlowGraph* graph, AliasedSet* aliased_set)
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.h b/runtime/vm/compiler/backend/redundancy_elimination.h
index 84fc7d2..ab09270 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.h
+++ b/runtime/vm/compiler/backend/redundancy_elimination.h
@@ -145,6 +145,16 @@
   FlowGraph* const flow_graph_;
 };
 
+// Move allocations down to their first use. Improves write barrier elimination.
+class DelayAllocations : public AllStatic {
+ public:
+  static void Optimize(FlowGraph* graph);
+
+ private:
+  static Instruction* DominantUse(Definition* def);
+  static bool IsOneTimeUse(Instruction* use, Definition* def);
+};
+
 class CheckStackOverflowElimination : public AllStatic {
  public:
   // For leaf functions with only a single [StackOverflowInstr] we remove it.
diff --git a/runtime/vm/compiler/backend/redundancy_elimination_test.cc b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
index 21d67ff..74cf38e 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination_test.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
@@ -1114,4 +1114,105 @@
   EXPECT(load_field_in_loop2->calls_initializer());
 }
 
+#if !defined(TARGET_ARCH_IA32)
+
+ISOLATE_UNIT_TEST_CASE(DelayAllocations_DelayAcrossCalls) {
+  const char* kScript = R"(
+    class A {
+      dynamic x, y;
+      A(this.x, this.y);
+    }
+
+    int count = 0;
+
+    @pragma("vm:never-inline")
+    dynamic foo(int i) => count++ < 2 ? i : '$i';
+
+    @pragma("vm:never-inline")
+    dynamic use(v) {}
+
+    void test() {
+      A a = new A(foo(1), foo(2));
+      use(a);
+    }
+  )";
+
+  const auto& root_library = Library::Handle(LoadTestScript(kScript));
+  const auto& function = Function::Handle(GetFunction(root_library, "test"));
+
+  // Get fields to kDynamicCid guard
+  Invoke(root_library, "test");
+  Invoke(root_library, "test");
+
+  TestPipeline pipeline(function, CompilerPass::kAOT);
+  FlowGraph* flow_graph = pipeline.RunPasses({});
+  auto entry = flow_graph->graph_entry()->normal_entry();
+
+  StaticCallInstr* call1;
+  StaticCallInstr* call2;
+  AllocateObjectInstr* allocate;
+  StoreInstanceFieldInstr* store1;
+  StoreInstanceFieldInstr* store2;
+
+  ILMatcher cursor(flow_graph, entry, true, ParallelMovesHandling::kSkip);
+  RELEASE_ASSERT(cursor.TryMatch({
+      kMoveGlob,
+      {kMatchAndMoveStaticCall, &call1},
+      kMoveGlob,
+      {kMatchAndMoveStaticCall, &call2},
+      kMoveGlob,
+      {kMatchAndMoveAllocateObject, &allocate},
+      {kMatchAndMoveStoreInstanceField, &store1},
+      {kMatchAndMoveStoreInstanceField, &store2},
+  }));
+
+  EXPECT(strcmp(call1->function().UserVisibleNameCString(), "foo") == 0);
+  EXPECT(strcmp(call2->function().UserVisibleNameCString(), "foo") == 0);
+  EXPECT(store1->instance()->definition() == allocate);
+  EXPECT(!store1->ShouldEmitStoreBarrier());
+  EXPECT(store2->instance()->definition() == allocate);
+  EXPECT(!store2->ShouldEmitStoreBarrier());
+}
+
+ISOLATE_UNIT_TEST_CASE(DelayAllocations_DontDelayIntoLoop) {
+  const char* kScript = R"(
+    void test() {
+      Object o = new Object();
+      for (int i = 0; i < 10; i++) {
+        use(o);
+      }
+    }
+
+    @pragma('vm:never-inline')
+    void use(Object o) {
+      print(o.hashCode);
+    }
+  )";
+
+  const auto& root_library = Library::Handle(LoadTestScript(kScript));
+  const auto& function = Function::Handle(GetFunction(root_library, "test"));
+
+  TestPipeline pipeline(function, CompilerPass::kAOT);
+  FlowGraph* flow_graph = pipeline.RunPasses({});
+  auto entry = flow_graph->graph_entry()->normal_entry();
+
+  AllocateObjectInstr* allocate;
+  StaticCallInstr* call;
+
+  ILMatcher cursor(flow_graph, entry, true, ParallelMovesHandling::kSkip);
+  RELEASE_ASSERT(cursor.TryMatch({
+      kMoveGlob,
+      {kMatchAndMoveAllocateObject, &allocate},
+      kMoveGlob,
+      kMatchAndMoveBranchTrue,
+      kMoveGlob,
+      {kMatchAndMoveStaticCall, &call},
+  }));
+
+  EXPECT(strcmp(call->function().UserVisibleNameCString(), "use") == 0);
+  EXPECT(call->Receiver()->definition() == allocate);
+}
+
+#endif  // !defined(TARGET_ARCH_IA32)
+
 }  // namespace dart
diff --git a/runtime/vm/compiler/backend/sexpression.cc b/runtime/vm/compiler/backend/sexpression.cc
index 12006b4..7307ef3 100644
--- a/runtime/vm/compiler/backend/sexpression.cc
+++ b/runtime/vm/compiler/backend/sexpression.cc
@@ -7,6 +7,7 @@
 #include <ctype.h>
 #include "platform/utils.h"
 #include "vm/double_conversion.h"
+#include "vm/zone_text_buffer.h"
 
 namespace dart {
 
@@ -18,13 +19,9 @@
 }
 
 const char* SExpression::ToCString(Zone* zone) const {
-  TextBuffer buf(1 * KB);
+  ZoneTextBuffer buf(zone, 1 * KB);
   SerializeToLine(&buf);
-  auto const buf_len = buf.length();
-  char* ret = zone->Alloc<char>(buf_len + 1);
-  strncpy(ret, buf.buf(), buf_len);
-  ret[buf_len] = '\0';
-  return ret;
+  return buf.buffer();
 }
 
 bool SExpBool::Equals(SExpression* sexp) const {
@@ -36,7 +33,7 @@
   return value() == val;
 }
 
-void SExpBool::SerializeToLine(TextBuffer* buffer) const {
+void SExpBool::SerializeToLine(BaseTextBuffer* buffer) const {
   buffer->AddString(value() ? SExpParser::kBoolTrueSymbol
                             : SExpParser::kBoolFalseSymbol);
 }
@@ -50,7 +47,7 @@
   return value() == val;
 }
 
-void SExpDouble::SerializeToLine(TextBuffer* buffer) const {
+void SExpDouble::SerializeToLine(BaseTextBuffer* buffer) const {
   // Use existing Dart serialization for Doubles.
   const intptr_t kBufSize = 128;
   char strbuf[kBufSize];
@@ -67,7 +64,7 @@
   return value() == val;
 }
 
-void SExpInteger::SerializeToLine(TextBuffer* buffer) const {
+void SExpInteger::SerializeToLine(BaseTextBuffer* buffer) const {
   buffer->Printf("%" Pd64 "", value());
 }
 
@@ -80,10 +77,12 @@
   return strcmp(value(), str) == 0;
 }
 
-void SExpString::SerializeToLine(TextBuffer* buffer) const {
-  buffer->AddChar('"');
-  buffer->AddEscapedString(value());
-  buffer->AddChar('"');
+void SExpString::SerializeToLine(BaseTextBuffer* buffer) const {
+  TextBuffer buf(80);
+  buf.AddChar('"');
+  buf.AddEscapedString(value());
+  buf.AddChar('"');
+  buffer->AddString(buf.buffer());
 }
 
 bool SExpSymbol::Equals(SExpression* sexp) const {
@@ -95,7 +94,7 @@
   return strcmp(value(), str) == 0;
 }
 
-void SExpSymbol::SerializeToLine(TextBuffer* buffer) const {
+void SExpSymbol::SerializeToLine(BaseTextBuffer* buffer) const {
   buffer->AddString(value());
 }
 
@@ -128,9 +127,9 @@
 const char* const SExpList::kExtraIndent = "  ";
 
 static intptr_t HandleLineBreaking(Zone* zone,
-                                   TextBuffer* buffer,
+                                   BaseTextBuffer* buffer,
                                    SExpression* element,
-                                   TextBuffer* line_buffer,
+                                   BaseTextBuffer* line_buffer,
                                    const char* sub_indent,
                                    intptr_t width,
                                    bool leading_space,
@@ -141,7 +140,7 @@
 
   if ((leading_length + single_line_width) < remaining) {
     if (leading_space) buffer->AddChar(' ');
-    buffer->AddString(line_buffer->buf());
+    buffer->AddString(line_buffer->buffer());
     line_buffer->Clear();
     return remaining - (leading_length + single_line_width);
   }
@@ -150,7 +149,7 @@
   const intptr_t line_used = buffer->length() - old_length + 1;
   remaining = width - line_used;
   if ((single_line_width < remaining) || element->IsAtom()) {
-    buffer->AddString(line_buffer->buf());
+    buffer->AddString(line_buffer->buffer());
     line_buffer->Clear();
     return remaining - single_line_width;
   }
@@ -161,7 +160,7 @@
 
 // Assumes that we are starting on a line after [indent] amount of space.
 void SExpList::SerializeTo(Zone* zone,
-                           TextBuffer* buffer,
+                           BaseTextBuffer* buffer,
                            const char* indent,
                            intptr_t width) const {
   TextBuffer single_line(width);
@@ -177,14 +176,14 @@
   if (!extra_info_.IsEmpty()) {
     SerializeExtraInfoToLine(&single_line);
     if (single_line.length() < remaining - 1) {
-      buffer->Printf(" %s", single_line.buf());
+      buffer->Printf(" %s", single_line.buffer());
     } else {
       const intptr_t old_length = buffer->length();
       buffer->Printf("\n%s", sub_indent);
       const intptr_t line_used = buffer->length() - old_length + 1;
       remaining = width - line_used;
       if (single_line.length() < remaining) {
-        buffer->AddString(single_line.buf());
+        buffer->AddString(single_line.buffer());
       } else {
         SerializeExtraInfoTo(zone, buffer, sub_indent, width);
       }
@@ -193,7 +192,7 @@
   buffer->AddChar(')');
 }
 
-void SExpList::SerializeToLine(TextBuffer* buffer) const {
+void SExpList::SerializeToLine(BaseTextBuffer* buffer) const {
   buffer->AddChar('(');
   for (intptr_t i = 0; i < contents_.length(); i++) {
     if (i != 0) buffer->AddChar(' ');
@@ -207,7 +206,7 @@
 }
 
 void SExpList::SerializeExtraInfoTo(Zone* zone,
-                                    TextBuffer* buffer,
+                                    BaseTextBuffer* buffer,
                                     const char* indent,
                                     int width) const {
   const char* sub_indent = OS::SCreate(zone, "%s%s", indent, kExtraIndent);
@@ -226,7 +225,7 @@
   buffer->Printf("\n%s}", indent);
 }
 
-void SExpList::SerializeExtraInfoToLine(TextBuffer* buffer) const {
+void SExpList::SerializeExtraInfoToLine(BaseTextBuffer* buffer) const {
   buffer->AddString("{");
   auto it = ExtraIterator();
   while (auto kv = it.Next()) {
diff --git a/runtime/vm/compiler/backend/sexpression.h b/runtime/vm/compiler/backend/sexpression.h
index 40b79a3..6bdc36e 100644
--- a/runtime/vm/compiler/backend/sexpression.h
+++ b/runtime/vm/compiler/backend/sexpression.h
@@ -81,10 +81,10 @@
   virtual const char* DebugName() const = 0;
   virtual bool Equals(SExpression* sexp) const = 0;
   virtual void SerializeTo(Zone* zone,
-                           TextBuffer* buffer,
+                           BaseTextBuffer* buffer,
                            const char* indent,
                            intptr_t width = 80) const = 0;
-  virtual void SerializeToLine(TextBuffer* buffer) const = 0;
+  virtual void SerializeToLine(BaseTextBuffer* buffer) const = 0;
 
  private:
   // Starting character position of the s-expression in the original
@@ -100,7 +100,7 @@
   virtual const SExpAtom* AsAtom() const { return this; }
   // No atoms have sub-elements, so they always print to a single line.
   virtual void SerializeTo(Zone* zone,
-                           TextBuffer* buffer,
+                           BaseTextBuffer* buffer,
                            const char* indent,
                            intptr_t width = 80) const {
     SerializeToLine(buffer);
@@ -124,7 +124,7 @@
     value_type value() const { return val_; }                                  \
     virtual bool Equals(SExpression* sexp) const;                              \
     bool Equals(value_type val) const;                                         \
-    virtual void SerializeToLine(TextBuffer* buffer) const;                    \
+    virtual void SerializeToLine(BaseTextBuffer* buffer) const;                \
     DEFINE_S_EXPRESSION_TYPE_CHECK(name)                                       \
    private:                                                                    \
     value_type const val_;                                                     \
@@ -168,20 +168,20 @@
   DEFINE_S_EXPRESSION_TYPE_CHECK(List)
   virtual bool Equals(SExpression* sexp) const;
   virtual void SerializeTo(Zone* zone,
-                           TextBuffer* buffer,
+                           BaseTextBuffer* buffer,
                            const char* indent,
                            intptr_t width = 80) const;
-  virtual void SerializeToLine(TextBuffer* buffer) const;
+  virtual void SerializeToLine(BaseTextBuffer* buffer) const;
 
  private:
   static const char* const kElemIndent;
   static const char* const kExtraIndent;
 
   void SerializeExtraInfoTo(Zone* zone,
-                            TextBuffer* buffer,
+                            BaseTextBuffer* buffer,
                             const char* indent,
                             int width) const;
-  void SerializeExtraInfoToLine(TextBuffer* buffer) const;
+  void SerializeExtraInfoToLine(BaseTextBuffer* buffer) const;
 
   ZoneGrowableArray<SExpression*> contents_;
   ExtraInfoHashMap extra_info_;
diff --git a/runtime/vm/compiler/backend/sexpression_test.cc b/runtime/vm/compiler/backend/sexpression_test.cc
index db0b1ed..8c0edac 100644
--- a/runtime/vm/compiler/backend/sexpression_test.cc
+++ b/runtime/vm/compiler/backend/sexpression_test.cc
@@ -191,13 +191,13 @@
 
   TextBuffer buf(100);
   sexp->SerializeTo(zone, &buf, "", 9999);
-  SExpression* round_trip = SExpression::FromCString(zone, buf.buf());
+  SExpression* round_trip = SExpression::FromCString(zone, buf.buffer());
   CheckDeserializedSExpParts(round_trip);
   EXPECT(sexp->Equals(round_trip));
 
   char* const old_serialization = buf.Steal();
   round_trip->SerializeTo(zone, &buf, "", 9999);
-  char* const new_serialization = buf.buf();
+  char* const new_serialization = buf.buffer();
   EXPECT_STREQ(old_serialization, new_serialization);
   free(old_serialization);
 }
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index f314bd3..f59bc7c 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -197,7 +197,7 @@
 
   Slot(Kind kind,
        int8_t bits,
-       int16_t cid,
+       ClassIdTagType cid,
        intptr_t offset_in_bytes,
        const void* data,
        const AbstractType* static_type)
@@ -229,7 +229,7 @@
 
   const Kind kind_;
   const int8_t flags_;  // is_immutable, is_nullable
-  const int16_t cid_;   // Concrete cid of a value or kDynamicCid.
+  const ClassIdTagType cid_;  // Concrete cid of a value or kDynamicCid.
 
   const intptr_t offset_in_bytes_;
 
diff --git a/runtime/vm/compiler/backend/type_propagator.cc b/runtime/vm/compiler/backend/type_propagator.cc
index 8d2bb7a..f3fcd25 100644
--- a/runtime/vm/compiler/backend/type_propagator.cc
+++ b/runtime/vm/compiler/backend/type_propagator.cc
@@ -877,10 +877,10 @@
   return CanPotentiallyBeSmi(*ToAbstractType(), /*recurse=*/true);
 }
 
-void CompileType::PrintTo(BufferFormatter* f) const {
+void CompileType::PrintTo(BaseTextBuffer* f) const {
   const char* type_name = "?";
   if (IsNone()) {
-    f->Print("T{}");
+    f->AddString("T{}");
     return;
   } else if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) {
     const Class& cls =
@@ -894,7 +894,7 @@
     type_name = "!null";
   }
 
-  f->Print("T{%s%s}", type_name, is_nullable_ ? "?" : "");
+  f->Printf("T{%s%s}", type_name, is_nullable_ ? "?" : "");
 }
 
 const char* CompileType::ToCString() const {
diff --git a/runtime/vm/compiler/call_specializer.cc b/runtime/vm/compiler/call_specializer.cc
index ab58fa0..2c7f4dc 100644
--- a/runtime/vm/compiler/call_specializer.cc
+++ b/runtime/vm/compiler/call_specializer.cc
@@ -774,18 +774,16 @@
       new (Z) Value(receiver), slot, call->token_pos(), calls_initializer,
       calls_initializer ? call->deopt_id() : DeoptId::kNone);
 
-  Environment* load_env = nullptr;
-  if (calls_initializer) {
-    // Drop getter argument from the environment as it is not
-    // pushed on the stack when initializer is called.
-    load_env =
-        call->env()->DeepCopy(Z, call->env()->Length() - call->ArgumentCount());
+  // Note that this is a case of LoadField -> InstanceCall lazy deopt.
+  // Which means that we don't need to remove arguments from the environment
+  // because normal getter call expects receiver pushed (unlike the case
+  // of LoadField -> LoadField deoptimization handled by
+  // FlowGraph::AttachEnvironment).
+  if (!calls_initializer) {
+    // If we don't call initializer then we don't need an environment.
+    call->RemoveEnvironment();
   }
-  call->RemoveEnvironment();
   ReplaceCall(call, load);
-  if (calls_initializer) {
-    load_env->DeepCopyTo(Z, load);
-  }
 
   if (load->slot().nullable_cid() != kDynamicCid) {
     // Reset value types if we know concrete cid.
@@ -1588,15 +1586,23 @@
     auto& type_class = Class::Handle(zone_);
 #define TRY_INLINE(iface, member_name, type, cid)                              \
   if (!member_name.IsNull()) {                                                 \
+    const bool is_float_access =                                               \
+        cid == kTypedDataFloat32ArrayCid || cid == kTypedDataFloat64ArrayCid;  \
     if (receiver_type->IsAssignableTo(member_name)) {                          \
       if (is_length_getter) {                                                  \
         type_class = member_name.type_class();                                 \
         ReplaceWithLengthGetter(call);                                         \
       } else if (is_index_get) {                                               \
+        if (is_float_access && !FlowGraphCompiler::SupportsUnboxedDoubles()) { \
+          return;                                                              \
+        }                                                                      \
         if (!index_type->IsNullableInt()) return;                              \
         type_class = member_name.type_class();                                 \
         ReplaceWithIndexGet(call, cid);                                        \
       } else {                                                                 \
+        if (is_float_access && !FlowGraphCompiler::SupportsUnboxedDoubles()) { \
+          return;                                                              \
+        }                                                                      \
         if (!index_type->IsNullableInt()) return;                              \
         if (!value_type->IsAssignableTo(type)) return;                         \
         type_class = member_name.type_class();                                 \
diff --git a/runtime/vm/compiler/compiler_pass.cc b/runtime/vm/compiler/compiler_pass.cc
index d5e6297..f253ffc 100644
--- a/runtime/vm/compiler/compiler_pass.cc
+++ b/runtime/vm/compiler/compiler_pass.cc
@@ -224,6 +224,15 @@
 #define INVOKE_PASS(Name)                                                      \
   CompilerPass::Get(CompilerPass::k##Name)->Run(pass_state);
 
+#if defined(DART_PRECOMPILER)
+#define INVOKE_PASS_AOT(Name)                                                  \
+  if (mode == kAOT) {                                                          \
+    INVOKE_PASS(Name);                                                         \
+  }
+#else
+#define INVOKE_PASS_AOT(Name)
+#endif
+
 void CompilerPass::RunGraphIntrinsicPipeline(CompilerPassState* pass_state) {
   INVOKE_PASS(AllocateRegistersForGraphIntrinsic);
 }
@@ -241,9 +250,7 @@
   // may open more opportunities for call specialization.
   // Call specialization during inlining may cause more call
   // sites to be discovered and more functions inlined.
-  if (mode == kAOT) {
-    INVOKE_PASS(ApplyClassIds);
-  }
+  INVOKE_PASS_AOT(ApplyClassIds);
   // Optimize (a << b) & c patterns, merge instructions. Must occur
   // before 'SelectRepresentations' which inserts conversion nodes.
   INVOKE_PASS(TryOptimizePatterns);
@@ -272,13 +279,10 @@
   // so it should not be lifted earlier than that pass.
   INVOKE_PASS(DCE);
   INVOKE_PASS(Canonicalize);
+  INVOKE_PASS_AOT(DelayAllocations);
   INVOKE_PASS(EliminateWriteBarriers);
   INVOKE_PASS(FinalizeGraph);
-#if defined(DART_PRECOMPILER)
-  if (mode == kAOT) {
-    INVOKE_PASS(SerializeGraph);
-  }
-#endif
+  INVOKE_PASS_AOT(SerializeGraph);
   if (FLAG_late_round_trip_serialization) {
     INVOKE_PASS(RoundTripSerialization);
   }
@@ -293,12 +297,8 @@
   if (FLAG_early_round_trip_serialization) {
     INVOKE_PASS(RoundTripSerialization);
   }
-#if defined(DART_PRECOMPILER)
-  if (mode == kAOT) {
-    INVOKE_PASS(ApplyClassIds);
-    INVOKE_PASS(TypePropagation);
-  }
-#endif
+  INVOKE_PASS_AOT(ApplyClassIds);
+  INVOKE_PASS_AOT(TypePropagation);
   INVOKE_PASS(ApplyICData);
   INVOKE_PASS(TryOptimizePatterns);
   INVOKE_PASS(SetOuterInliningId);
@@ -316,18 +316,12 @@
   INVOKE_PASS(ConstantPropagation);
   INVOKE_PASS(OptimisticallySpecializeSmiPhis);
   INVOKE_PASS(TypePropagation);
-#if defined(DART_PRECOMPILER)
-  if (mode == kAOT) {
-    // The extra call specialization pass in AOT is able to specialize more
-    // calls after ConstantPropagation, which removes unreachable code, and
-    // TypePropagation, which can infer more accurate types after removing
-    // unreachable code.
-    INVOKE_PASS(ApplyICData);
-  }
-  if (mode == kAOT) {
-    INVOKE_PASS(OptimizeTypedDataAccesses);
-  }
-#endif
+  // The extra call specialization pass in AOT is able to specialize more
+  // calls after ConstantPropagation, which removes unreachable code, and
+  // TypePropagation, which can infer more accurate types after removing
+  // unreachable code.
+  INVOKE_PASS_AOT(ApplyICData);
+  INVOKE_PASS_AOT(OptimizeTypedDataAccesses);
   INVOKE_PASS(WidenSmiToInt32);
   INVOKE_PASS(SelectRepresentations);
   INVOKE_PASS(CSE);
@@ -345,6 +339,7 @@
   // so it should not be lifted earlier than that pass.
   INVOKE_PASS(DCE);
   INVOKE_PASS(Canonicalize);
+  INVOKE_PASS_AOT(DelayAllocations);
   // Repeat branches optimization after DCE, as it could make more
   // empty blocks.
   INVOKE_PASS(OptimizeBranches);
@@ -360,13 +355,9 @@
   INVOKE_PASS(AllocationSinking_DetachMaterializations);
   INVOKE_PASS(EliminateWriteBarriers);
   INVOKE_PASS(FinalizeGraph);
-#if defined(DART_PRECOMPILER)
-  if (mode == kAOT) {
-    // If we are serializing the flow graph, do it now before we start
-    // doing register allocation.
-    INVOKE_PASS(SerializeGraph);
-  }
-#endif
+  // If we are serializing the flow graph, do it now before we start
+  // doing register allocation.
+  INVOKE_PASS_AOT(SerializeGraph);
   if (FLAG_late_round_trip_serialization) {
     INVOKE_PASS(RoundTripSerialization);
   }
@@ -498,6 +489,8 @@
 
 COMPILER_PASS(DCE, { DeadCodeElimination::EliminateDeadCode(flow_graph); });
 
+COMPILER_PASS(DelayAllocations, { DelayAllocations::Optimize(flow_graph); });
+
 COMPILER_PASS(AllocationSinking_Sink, {
   // TODO(vegorov): Support allocation sinking with try-catch.
   if (flow_graph->graph_entry()->catch_entries().is_empty()) {
@@ -569,7 +562,7 @@
     FlowGraphSerializer::SerializeToBuffer(stack_zone.GetZone(), flow_graph,
                                            &buffer);
 
-    file_write(buffer.buf(), buffer.length(), stream);
+    file_write(buffer.buffer(), buffer.length(), stream);
   }
 });
 #endif
diff --git a/runtime/vm/compiler/compiler_pass.h b/runtime/vm/compiler/compiler_pass.h
index ffda7a6..2897609 100644
--- a/runtime/vm/compiler/compiler_pass.h
+++ b/runtime/vm/compiler/compiler_pass.h
@@ -30,6 +30,7 @@
   V(ComputeSSA)                                                                \
   V(ConstantPropagation)                                                       \
   V(DCE)                                                                       \
+  V(DelayAllocations)                                                          \
   V(DSE)                                                                       \
   V(EliminateDeadPhis)                                                         \
   V(EliminateEnvironments)                                                     \
diff --git a/runtime/vm/compiler/ffi/native_location.cc b/runtime/vm/compiler/ffi/native_location.cc
index 0c7fb16..bbc762e 100644
--- a/runtime/vm/compiler/ffi/native_location.cc
+++ b/runtime/vm/compiler/ffi/native_location.cc
@@ -210,47 +210,46 @@
   return compiler::Address(loc.base_register(), loc.offset_in_bytes());
 }
 
-static void PrintRepresentations(BufferFormatter* f,
-                                 const NativeLocation& loc) {
-  f->Print(" ");
+static void PrintRepresentations(BaseTextBuffer* f, const NativeLocation& loc) {
+  f->AddString(" ");
   loc.container_type().PrintTo(f);
   if (!loc.container_type().Equals(loc.payload_type())) {
-    f->Print("[");
+    f->AddString("[");
     loc.payload_type().PrintTo(f);
-    f->Print("]");
+    f->AddString("]");
   }
 }
 
-void NativeLocation::PrintTo(BufferFormatter* f) const {
-  f->Print("I");
+void NativeLocation::PrintTo(BaseTextBuffer* f) const {
+  f->AddString("I");
   PrintRepresentations(f, *this);
 }
 
-void NativeRegistersLocation::PrintTo(BufferFormatter* f) const {
+void NativeRegistersLocation::PrintTo(BaseTextBuffer* f) const {
   if (num_regs() == 1) {
-    f->Print("%s", RegisterNames::RegisterName(regs_->At(0)));
+    f->Printf("%s", RegisterNames::RegisterName(regs_->At(0)));
   } else {
-    f->Print("(");
+    f->AddString("(");
     for (intptr_t i = 0; i < num_regs(); i++) {
-      if (i != 0) f->Print(", ");
-      f->Print("%s", RegisterNames::RegisterName(regs_->At(i)));
+      if (i != 0) f->Printf(", ");
+      f->Printf("%s", RegisterNames::RegisterName(regs_->At(i)));
     }
-    f->Print(")");
+    f->AddString(")");
   }
   PrintRepresentations(f, *this);
 }
 
-void NativeFpuRegistersLocation::PrintTo(BufferFormatter* f) const {
+void NativeFpuRegistersLocation::PrintTo(BaseTextBuffer* f) const {
   switch (fpu_reg_kind()) {
     case kQuadFpuReg:
-      f->Print("%s", RegisterNames::FpuRegisterName(fpu_reg()));
+      f->Printf("%s", RegisterNames::FpuRegisterName(fpu_reg()));
       break;
 #if defined(TARGET_ARCH_ARM)
     case kDoubleFpuReg:
-      f->Print("%s", RegisterNames::FpuDRegisterName(fpu_d_reg()));
+      f->Printf("%s", RegisterNames::FpuDRegisterName(fpu_d_reg()));
       break;
     case kSingleFpuReg:
-      f->Print("%s", RegisterNames::FpuSRegisterName(fpu_s_reg()));
+      f->Printf("%s", RegisterNames::FpuSRegisterName(fpu_s_reg()));
       break;
 #endif  // defined(TARGET_ARCH_ARM)
     default:
@@ -260,8 +259,8 @@
   PrintRepresentations(f, *this);
 }
 
-void NativeStackLocation::PrintTo(BufferFormatter* f) const {
-  f->Print("S%+" Pd, offset_in_bytes_);
+void NativeStackLocation::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("S%+" Pd, offset_in_bytes_);
   PrintRepresentations(f, *this);
 }
 
diff --git a/runtime/vm/compiler/ffi/native_location.h b/runtime/vm/compiler/ffi/native_location.h
index 7db24e6..fefee76 100644
--- a/runtime/vm/compiler/ffi/native_location.h
+++ b/runtime/vm/compiler/ffi/native_location.h
@@ -16,7 +16,7 @@
 
 namespace dart {
 
-class BufferFormatter;
+class BaseTextBuffer;
 
 namespace compiler {
 
@@ -94,7 +94,7 @@
     UNREACHABLE();
   }
 
-  virtual void PrintTo(BufferFormatter* f) const;
+  virtual void PrintTo(BaseTextBuffer* f) const;
   const char* ToCString() const;
 
   const NativeRegistersLocation& AsRegisters() const;
@@ -169,7 +169,7 @@
 
   virtual NativeRegistersLocation& Split(intptr_t index, Zone* zone) const;
 
-  virtual void PrintTo(BufferFormatter* f) const;
+  virtual void PrintTo(BaseTextBuffer* f) const;
 
   virtual bool Equals(const NativeLocation& other) const;
 
@@ -254,7 +254,7 @@
   bool IsLowestBits() const;
 #endif  // defined(TARGET_ARCH_ARM)
 
-  virtual void PrintTo(BufferFormatter* f) const;
+  virtual void PrintTo(BaseTextBuffer* f) const;
 
   virtual bool Equals(const NativeLocation& other) const;
 
@@ -303,7 +303,7 @@
 
   virtual NativeStackLocation& Split(intptr_t index, Zone* zone) const;
 
-  virtual void PrintTo(BufferFormatter* f) const;
+  virtual void PrintTo(BaseTextBuffer* f) const;
 
   virtual bool Equals(const NativeLocation& other) const;
 
diff --git a/runtime/vm/compiler/ffi/native_type.cc b/runtime/vm/compiler/ffi/native_type.cc
index 57db124..e4daa47 100644
--- a/runtime/vm/compiler/ffi/native_type.cc
+++ b/runtime/vm/compiler/ffi/native_type.cc
@@ -316,12 +316,12 @@
   }
 }
 
-void NativeType::PrintTo(BufferFormatter* f) const {
-  f->Print("I");
+void NativeType::PrintTo(BaseTextBuffer* f) const {
+  f->AddString("I");
 }
 
-void NativeFundamentalType::PrintTo(BufferFormatter* f) const {
-  f->Print("%s", FundamentalTypeToCString(representation_));
+void NativeFundamentalType::PrintTo(BaseTextBuffer* f) const {
+  f->Printf("%s", FundamentalTypeToCString(representation_));
 }
 
 const NativeType& NativeType::WidenTo4Bytes(Zone* zone) const {
diff --git a/runtime/vm/compiler/ffi/native_type.h b/runtime/vm/compiler/ffi/native_type.h
index 0eee4de..b0dc39b 100644
--- a/runtime/vm/compiler/ffi/native_type.h
+++ b/runtime/vm/compiler/ffi/native_type.h
@@ -17,7 +17,7 @@
 
 namespace dart {
 
-class BufferFormatter;
+class BaseTextBuffer;
 
 namespace compiler {
 
@@ -102,7 +102,7 @@
   // Otherwise, return original representation.
   const NativeType& WidenTo4Bytes(Zone* zone) const;
 
-  virtual void PrintTo(BufferFormatter* f) const;
+  virtual void PrintTo(BaseTextBuffer* f) const;
   const char* ToCString() const;
 
   virtual ~NativeType() {}
@@ -153,7 +153,7 @@
   virtual bool Equals(const NativeType& other) const;
   virtual NativeFundamentalType& Split(intptr_t part, Zone* zone) const;
 
-  virtual void PrintTo(BufferFormatter* f) const;
+  virtual void PrintTo(BaseTextBuffer* f) const;
 
   virtual ~NativeFundamentalType() {}
 
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.cc b/runtime/vm/compiler/frontend/bytecode_reader.cc
index ba1f36c..4d6eb95 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.cc
+++ b/runtime/vm/compiler/frontend/bytecode_reader.cc
@@ -213,6 +213,7 @@
          i < function.NumParameters(); ++i) {
       const intptr_t flags = reader_.ReadUInt();
       if ((flags & Parameter::kIsRequiredFlag) != 0) {
+        RELEASE_ASSERT(i >= function.num_fixed_parameters());
         function.SetIsRequiredAt(i);
       }
     }
@@ -610,6 +611,7 @@
     for (intptr_t i = 0; i < num_flags; ++i) {
       intptr_t flag = reader_.ReadUInt();
       if ((flag & Parameter::kIsRequiredFlag) != 0) {
+        RELEASE_ASSERT(kImplicitClosureParam + i >= num_required_params);
         func.SetIsRequiredAt(kImplicitClosureParam + i);
       }
     }
@@ -3072,6 +3074,7 @@
   if (has_parameters_flags) {
     const intptr_t num_params = reader_.ReadUInt();
     const intptr_t num_implicit_params = function.NumImplicitParameters();
+    const intptr_t num_fixed_params = function.num_fixed_parameters();
     for (intptr_t i = 0; i < num_params; ++i) {
       const intptr_t flags = reader_.ReadUInt();
 
@@ -3081,6 +3084,7 @@
       bool is_required = (flags & Parameter::kIsRequiredFlag) != 0;
 
       if (is_required) {
+        RELEASE_ASSERT(num_implicit_params + i >= num_fixed_params);
         function.SetIsRequiredAt(num_implicit_params + i);
       }
 
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index a7cbc05..ee3a6bb 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -11,6 +11,7 @@
 #include "vm/compiler/frontend/prologue_builder.h"
 #include "vm/compiler/jit/compiler.h"
 #include "vm/object_store.h"
+#include "vm/resolver.h"
 #include "vm/stack_frame.h"
 
 namespace dart {
@@ -1632,20 +1633,13 @@
     int argument_count,
     const Array& argument_names) {
   // Search the superclass chain for the selector.
-  Function& function = Function::Handle(Z);
-  Class& iterate_klass = Class::Handle(Z, klass.raw());
-  while (!iterate_klass.IsNull()) {
-    function = iterate_klass.LookupDynamicFunctionAllowPrivate(name);
-    if (!function.IsNull()) {
-      if (function.AreValidArguments(type_args_len, argument_count,
-                                     argument_names,
-                                     /* error_message = */ NULL)) {
-        return function;
-      }
-    }
-    iterate_klass = iterate_klass.SuperClass();
-  }
-  return Function::Handle();
+  ArgumentsDescriptor args_desc(
+      Array::Handle(Z, ArgumentsDescriptor::NewBoxed(
+                           type_args_len, argument_count, argument_names)));
+  Function& function =
+      Function::Handle(Z, Resolver::ResolveDynamicForReceiverClassAllowPrivate(
+                              klass, name, args_desc, /*allow_add=*/false));
+  return function;
 }
 
 bool StreamingFlowGraphBuilder::NeedsDebugStepCheck(const Function& function,
@@ -2014,14 +2008,6 @@
       type, variable->name(), AssertAssignableInstr::kParameterCheck);
 }
 
-Fragment StreamingFlowGraphBuilder::CheckTypeArgumentBound(
-    const AbstractType& parameter,
-    const AbstractType& bound,
-    const String& dst_name) {
-  return flow_graph_builder_->AssertSubtype(TokenPosition::kNoSource, parameter,
-                                            bound, dst_name);
-}
-
 Fragment StreamingFlowGraphBuilder::EnterScope(
     intptr_t kernel_offset,
     const LocalScope** scope /* = nullptr */) {
@@ -2339,16 +2325,27 @@
     instructions += CheckNull(position, receiver, getter_name);
   }
 
-  if (!direct_call.target_.IsNull()) {
+  const String* mangled_name = &getter_name;
+  const Function* direct_call_target = &direct_call.target_;
+  if (H.IsRoot(itarget_name)) {
+    mangled_name = &String::ZoneHandle(
+        Z, Function::CreateDynamicInvocationForwarderName(getter_name));
+    if (!direct_call_target->IsNull()) {
+      direct_call_target = &Function::ZoneHandle(
+          direct_call.target_.GetDynamicInvocationForwarder(*mangled_name));
+    }
+  }
+
+  if (!direct_call_target->IsNull()) {
     ASSERT(CompilerState::Current().is_aot());
     instructions +=
-        StaticCall(position, direct_call.target_, 1, Array::null_array(),
+        StaticCall(position, *direct_call_target, 1, Array::null_array(),
                    ICData::kNoRebind, &result_type);
   } else {
     const intptr_t kTypeArgsLen = 0;
     const intptr_t kNumArgsChecked = 1;
     instructions +=
-        InstanceCall(position, getter_name, Token::kGET, kTypeArgsLen, 1,
+        InstanceCall(position, *mangled_name, Token::kGET, kTypeArgsLen, 1,
                      Array::null_array(), kNumArgsChecked, *interface_target,
                      *tearoff_interface_target, &result_type);
   }
@@ -4753,19 +4750,12 @@
   for (intptr_t i = 0; i < catch_count; ++i) {
     intptr_t catch_offset = ReaderOffset();   // Catch has no tag.
     TokenPosition position = ReadPosition();  // read position.
-    Tag tag = PeekTag();                      // peek guard type.
-    AbstractType* type_guard = NULL;
-    if (tag != kDynamicType) {
-      type_guard = &T.BuildType();  // read guard.
-      handler_types.SetAt(i, *type_guard);
-    } else {
-      SkipDartType();  // read guard.
-      handler_types.SetAt(i, Object::dynamic_type());
-    }
+    const AbstractType& type_guard = T.BuildType();  // read guard.
+    handler_types.SetAt(i, type_guard);
 
     Fragment catch_handler_body = EnterScope(catch_offset);
 
-    tag = ReadTag();  // read first part of exception.
+    Tag tag = ReadTag();  // read first part of exception.
     if (tag == kSomething) {
       catch_handler_body += LoadLocal(CurrentException());
       catch_handler_body +=
@@ -4799,22 +4789,22 @@
       }
     }
 
-    if (type_guard != NULL) {
+    if (!type_guard.IsCatchAllType()) {
       catch_body += LoadLocal(CurrentException());
 
-      if (!type_guard->IsInstantiated(kCurrentClass)) {
+      if (!type_guard.IsInstantiated(kCurrentClass)) {
         catch_body += LoadInstantiatorTypeArguments();
       } else {
         catch_body += NullConstant();
       }
 
-      if (!type_guard->IsInstantiated(kFunctions)) {
+      if (!type_guard.IsInstantiated(kFunctions)) {
         catch_body += LoadFunctionTypeArguments();
       } else {
         catch_body += NullConstant();
       }
 
-      catch_body += Constant(*type_guard);
+      catch_body += Constant(type_guard);
 
       catch_body += InstanceCall(
           position, Library::PrivateCoreLibName(Symbols::_instanceOf()),
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
index c36a7c8..f3a2fee 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
@@ -263,9 +263,6 @@
   Fragment BuildImplicitClosureCreation(const Function& target);
   Fragment CheckBoolean(TokenPosition position);
   Fragment CheckArgumentType(LocalVariable* variable, const AbstractType& type);
-  Fragment CheckTypeArgumentBound(const AbstractType& parameter,
-                                  const AbstractType& bound,
-                                  const String& dst_name);
   Fragment EnterScope(intptr_t kernel_offset,
                       const LocalScope** scope = nullptr);
   Fragment ExitScope(intptr_t kernel_offset);
diff --git a/runtime/vm/compiler/frontend/kernel_fingerprints.cc b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
index b20ba94..5b16ddd 100644
--- a/runtime/vm/compiler/frontend/kernel_fingerprints.cc
+++ b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
@@ -227,9 +227,11 @@
     case kDynamicType:
     case kVoidType:
     case kBottomType:
-    case kNeverType:
       // those contain nothing.
       break;
+    case kNeverType:
+      BuildHash(static_cast<uint32_t>(ReadNullability()));
+      break;
     case kInterfaceType:
       CalculateInterfaceTypeFingerprint(false);
       break;
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index 4ecc873..2a05f82 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -2559,17 +2559,18 @@
   // type and then invokes original setter we simply generate the type check
   // and inlined field store. Scope builder takes care of setting correct
   // type check mode in this case.
-  const bool is_setter = function.IsDynamicInvocationForwarder() ||
-                         function.IsImplicitSetterFunction();
-  const bool is_method = !function.IsStaticFunction();
+  const auto& target = Function::Handle(
+      Z, function.IsDynamicInvocationForwarder() ? function.ForwardingTarget()
+                                                 : function.raw());
+  ASSERT(target.IsImplicitGetterOrSetter());
 
-  Field& field = Field::ZoneHandle(Z);
-  if (function.IsDynamicInvocationForwarder()) {
-    Function& target = Function::Handle(function.ForwardingTarget());
-    field = target.accessor_field();
-  } else {
-    field = function.accessor_field();
-  }
+  const bool is_method = !function.IsStaticFunction();
+  const bool is_setter = target.IsImplicitSetterFunction();
+  const bool is_getter = target.IsImplicitGetterFunction() ||
+                         target.IsImplicitStaticGetterFunction();
+  ASSERT(is_setter || is_getter);
+
+  const auto& field = Field::ZoneHandle(Z, target.accessor_field());
 
   graph_entry_ =
       new (Z) GraphEntryInstr(*parsed_function_, Compiler::kNoOSRDeoptId);
@@ -2579,18 +2580,20 @@
 
   Fragment body(normal_entry);
   if (is_setter) {
-    LocalVariable* setter_value =
+    auto const setter_value =
         parsed_function_->ParameterVariable(is_method ? 1 : 0);
-
-    // We only expect to generate a dynamic invocation forwarder if
-    // the value needs type check.
-    ASSERT(!function.IsDynamicInvocationForwarder() ||
-           setter_value->needs_type_check());
     if (is_method) {
       body += LoadLocal(parsed_function_->ParameterVariable(0));
     }
     body += LoadLocal(setter_value);
-    if (setter_value->needs_type_check()) {
+
+    // The dyn:* forwarder has to check the parameters that the
+    // actual target will not check.
+    // Though here we manually inline the target, so the dyn:* forwarder has to
+    // check all parameters.
+    const bool needs_type_check = function.IsDynamicInvocationForwarder() ||
+                                  setter_value->needs_type_check();
+    if (needs_type_check) {
       body += CheckAssignable(setter_value->type(), setter_value->name(),
                               AssertAssignableInstr::kParameterCheck);
     }
@@ -2612,7 +2615,7 @@
       }
     }
     body += NullConstant();
-  } else if (is_method) {
+  } else if (is_getter && is_method) {
     ASSERT(!field.needs_load_guard()
                 NOT_IN_PRODUCT(|| I->HasAttemptedReload()));
     body += LoadLocal(parsed_function_->ParameterVariable(0));
@@ -2661,15 +2664,15 @@
     const Function& function) {
   auto& name = String::Handle(Z, function.name());
   name = Function::DemangleDynamicInvocationForwarderName(name);
-  const auto& owner = Class::Handle(Z, function.Owner());
-  const auto& target =
-      Function::ZoneHandle(Z, owner.LookupDynamicFunction(name));
+  const auto& target = Function::ZoneHandle(Z, function.ForwardingTarget());
   ASSERT(!target.IsNull());
-  ASSERT(!target.IsImplicitGetterFunction());
 
-  if (target.IsImplicitSetterFunction()) {
+  if (target.IsImplicitSetterFunction() || target.IsImplicitGetterFunction()) {
     return BuildGraphOfFieldAccessor(function);
   }
+  if (target.IsMethodExtractor()) {
+    return BuildGraphOfMethodExtractor(target);
+  }
 
   graph_entry_ = new (Z) GraphEntryInstr(*parsed_function_, osr_id_);
 
@@ -3233,8 +3236,7 @@
 
 Fragment FlowGraphBuilder::BuildNullAssertions() {
   Fragment code;
-  if (I->null_safety() || !I->asserts() || !FLAG_null_assertions ||
-      !KernelIsolate::GetExperimentalFlag("non-nullable")) {
+  if (I->null_safety() || !I->asserts() || !FLAG_null_assertions) {
     return code;
   }
 
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index 93a9b49..4812287 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -1798,6 +1798,56 @@
   return;
 }
 
+LoadingUnitsMetadataHelper::LoadingUnitsMetadataHelper(
+    KernelReaderHelper* helper)
+    : MetadataHelper(helper, tag(), /* precompiler_only = */ true) {}
+
+void LoadingUnitsMetadataHelper::ReadMetadata(intptr_t node_offset) {
+  intptr_t md_offset = GetNextMetadataPayloadOffset(node_offset);
+  if (md_offset < 0) {
+    return;
+  }
+
+  AlternativeReadingScopeWithNewData alt(&helper_->reader_,
+                                         &H.metadata_payloads(), md_offset);
+
+  Thread* T = Thread::Current();
+  Zone* Z = T->zone();
+  intptr_t unit_count = helper_->ReadUInt();
+  Array& loading_units = Array::Handle(Z, Array::New(unit_count + 1));
+  LoadingUnit& unit = LoadingUnit::Handle(Z);
+  LoadingUnit& parent = LoadingUnit::Handle(Z);
+  Library& lib = Library::Handle(Z);
+
+  for (int i = 0; i < unit_count; i++) {
+    intptr_t id = helper_->ReadUInt();
+    unit = LoadingUnit::New();
+    unit.set_id(id);
+
+    intptr_t parent_id = helper_->ReadUInt();
+    parent ^= loading_units.At(parent_id);
+    ASSERT(parent.IsNull() == (parent_id == 0));
+    unit.set_parent(parent);
+
+    intptr_t library_count = helper_->ReadUInt();
+    for (intptr_t j = 0; j < library_count; j++) {
+      const String& uri =
+          translation_helper_.DartSymbolPlain(helper_->ReadStringReference());
+      lib = Library::LookupLibrary(T, uri);
+      if (lib.IsNull()) {
+        FATAL1("Missing library: %s\n", uri.ToCString());
+      }
+      lib.set_loading_unit(unit);
+    }
+
+    loading_units.SetAt(id, unit);
+  }
+
+  ObjectStore* object_store = Isolate::Current()->object_store();
+  ASSERT(object_store->loading_units() == Array::null());
+  object_store->set_loading_units(loading_units);
+}
+
 CallSiteAttributesMetadataHelper::CallSiteAttributesMetadataHelper(
     KernelReaderHelper* helper,
     TypeTranslator* type_translator)
@@ -3367,11 +3417,35 @@
   }
 }
 
+static void SetupUnboxingInfoOfReturnValue(
+    const Function& function,
+    const UnboxingInfoMetadata* metadata) {
+  switch (metadata->return_info) {
+    case UnboxingInfoMetadata::kUnboxedIntCandidate:
+      if (FlowGraphCompiler::SupportsUnboxedInt64()) {
+        function.set_unboxed_integer_return();
+      }
+      break;
+    case UnboxingInfoMetadata::kUnboxedDoubleCandidate:
+      if (FlowGraphCompiler::SupportsUnboxedDoubles()) {
+        function.set_unboxed_double_return();
+      }
+      break;
+    case UnboxingInfoMetadata::kUnboxingCandidate:
+      UNREACHABLE();
+      break;
+    case UnboxingInfoMetadata::kBoxed:
+      break;
+    default:
+      UNREACHABLE();
+      break;
+  }
+}
+
 void TypeTranslator::SetupUnboxingInfoMetadata(const Function& function,
                                                intptr_t library_kernel_offset) {
   const intptr_t kernel_offset =
       function.kernel_offset() + library_kernel_offset;
-
   const auto unboxing_info =
       unboxing_info_metadata_helper_.GetUnboxingInfoMetadata(kernel_offset);
 
@@ -3382,26 +3456,30 @@
     for (intptr_t i = 0; i < unboxing_info->unboxed_args_info.length(); i++) {
       SetupUnboxingInfoOfParameter(function, i, unboxing_info);
     }
+    SetupUnboxingInfoOfReturnValue(function, unboxing_info);
+  }
+}
 
-    switch (unboxing_info->return_info) {
-      case UnboxingInfoMetadata::kUnboxedIntCandidate:
-        if (FlowGraphCompiler::SupportsUnboxedInt64()) {
-          function.set_unboxed_integer_return();
-        }
-        break;
-      case UnboxingInfoMetadata::kUnboxedDoubleCandidate:
-        if (FlowGraphCompiler::SupportsUnboxedDoubles()) {
-          function.set_unboxed_double_return();
-        }
-        break;
-      case UnboxingInfoMetadata::kUnboxingCandidate:
-        UNREACHABLE();
-        break;
-      case UnboxingInfoMetadata::kBoxed:
-        break;
-      default:
-        UNREACHABLE();
-        break;
+void TypeTranslator::SetupUnboxingInfoMetadataForFieldAccessors(
+    const Function& field_accessor,
+    intptr_t library_kernel_offset) {
+  const intptr_t kernel_offset =
+      field_accessor.kernel_offset() + library_kernel_offset;
+  const auto unboxing_info =
+      unboxing_info_metadata_helper_.GetUnboxingInfoMetadata(kernel_offset);
+
+  // TODO(dartbug.com/32292): accept unboxed parameters and return value
+  // when FLAG_use_table_dispatch == false.
+  if (FLAG_precompiled_mode && unboxing_info != nullptr &&
+      FLAG_use_table_dispatch && FLAG_use_bare_instructions) {
+    if (field_accessor.IsImplicitSetterFunction()) {
+      for (intptr_t i = 0; i < unboxing_info->unboxed_args_info.length(); i++) {
+        SetupUnboxingInfoOfParameter(field_accessor, i, unboxing_info);
+      }
+    } else {
+      ASSERT(field_accessor.IsImplicitGetterFunction() ||
+             field_accessor.IsImplicitStaticGetterFunction());
+      SetupUnboxingInfoOfReturnValue(field_accessor, unboxing_info);
     }
   }
 }
@@ -3474,6 +3552,8 @@
     // Read ith variable declaration.
     VariableDeclarationHelper helper(helper_);
     helper.ReadUntilExcluding(VariableDeclarationHelper::kType);
+    // The required flag should only be set on named parameters.
+    ASSERT(!helper.IsRequired());
     const AbstractType& type = BuildTypeWithoutFinalization();  // read type.
     Tag tag = helper_->ReadTag();  // read (first part of) initializer.
     if (tag == kSomething) {
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index 23f3151..e2c8540a 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -1029,6 +1029,20 @@
   DISALLOW_COPY_AND_ASSIGN(ObfuscationProhibitionsMetadataHelper);
 };
 
+class LoadingUnitsMetadataHelper : public MetadataHelper {
+ public:
+  static const char* tag() { return "vm.loading-units.metadata"; }
+
+  explicit LoadingUnitsMetadataHelper(KernelReaderHelper* helper);
+
+  void ReadLoadingUnits() { ReadMetadata(0); }
+
+ private:
+  void ReadMetadata(intptr_t node_offset);
+
+  DISALLOW_COPY_AND_ASSIGN(LoadingUnitsMetadataHelper);
+};
+
 struct CallSiteAttributesMetadata {
   const AbstractType* receiver_type = nullptr;
 };
@@ -1267,6 +1281,7 @@
   friend class UnboxingInfoMetadataHelper;
   friend class VariableDeclarationHelper;
   friend class ObfuscationProhibitionsMetadataHelper;
+  friend class LoadingUnitsMetadataHelper;
   friend bool NeedsDynamicInvocationForwarder(const Function& function);
 
  private:
@@ -1454,6 +1469,9 @@
  private:
   void SetupUnboxingInfoMetadata(const Function& function,
                                  intptr_t library_kernel_offset);
+  void SetupUnboxingInfoMetadataForFieldAccessors(
+      const Function& field_accessor,
+      intptr_t library_kernel_offset);
 
   void BuildTypeInternal();
   void BuildInterfaceType(bool simple);
diff --git a/runtime/vm/compiler/frontend/prologue_builder.cc b/runtime/vm/compiler/frontend/prologue_builder.cc
index ea3375b..6bf2aff 100644
--- a/runtime/vm/compiler/frontend/prologue_builder.cc
+++ b/runtime/vm/compiler/frontend/prologue_builder.cc
@@ -40,7 +40,8 @@
 
 bool PrologueBuilder::HasEmptyPrologue(const Function& function) {
   return !function.HasOptionalParameters() && !function.IsGeneric() &&
-         !function.CanReceiveDynamicInvocation();
+         !function.CanReceiveDynamicInvocation() &&
+         !function.IsClosureFunction();
 }
 
 BlockEntryInstr* PrologueBuilder::BuildPrologue(BlockEntryInstr* entry,
@@ -81,6 +82,8 @@
   }
 
   const bool is_empty_prologue = prologue.entry == prologue.current;
+  // Double-check we create empty prologues when HasEmptyPrologue returns true.
+  ASSERT(!HasEmptyPrologue(function_) || is_empty_prologue);
 
   // Always do this to preserve deoptid numbering.
   JoinEntryInstr* normal_code = BuildJoinEntry();
diff --git a/runtime/vm/compiler/frontend/scope_builder.cc b/runtime/vm/compiler/frontend/scope_builder.cc
index e8b8a2c..fd73901 100644
--- a/runtime/vm/compiler/frontend/scope_builder.cc
+++ b/runtime/vm/compiler/frontend/scope_builder.cc
@@ -25,22 +25,12 @@
   // and non-generic-covariant parameters. The same applies to type parameters
   // bounds for type parameters of generic functions.
   //
-  // In JIT mode we dynamically generate trampolines (dynamic invocation
-  // forwarders) that perform type checks when arriving to a method from a
-  // dynamic call-site.
+  // Normally dynamic call sites will call dyn:* forwarders which perform type
+  // checks.
   //
-  // In AOT mode we don't dynamically generate such trampolines but instead rely
-  // on a static analysis to discover which methods can be invoked dynamically,
-  // and generate the necessary trampolines during precompilation.
-  if (method.name() == Symbols::Call().raw() ||
-      method.CanReceiveDynamicInvocation()) {
-    // Currently we consider all call methods to be invoked dynamically and
-    // don't mangle their names.
-    // TODO(vegorov) remove this once we also introduce special type checking
-    // entry point for closures.
-    return false;
-  }
-  return true;
+  // Though for some kinds of methods (e.g. ffi trampolines called from native
+  // code) we do have to perform type checks for all parameters.
+  return !method.CanReceiveDynamicInvocation();
 }
 
 ScopeBuilder::ScopeBuilder(ParsedFunction* parsed_function)
@@ -354,13 +344,13 @@
       break;
     }
     case FunctionLayout::kDynamicInvocationForwarder: {
+      const String& name = String::Handle(Z, function.name());
+      ASSERT(Function::IsDynamicInvocationForwarderName(name));
+
+      const auto& target = Function::ZoneHandle(Z, function.ForwardingTarget());
+      ASSERT(!target.IsNull());
+
       if (helper_.PeekTag() == kField) {
-#ifdef DEBUG
-        String& name = String::Handle(Z, function.name());
-        ASSERT(Function::IsDynamicInvocationForwarderName(name));
-        name = Function::DemangleDynamicInvocationForwarderName(name);
-        ASSERT(Field::IsSetterName(name));
-#endif
         // Create [this] variable.
         const Class& klass = Class::Handle(Z, function.Owner());
         parsed_function_->set_receiver_var(
@@ -369,29 +359,36 @@
         scope_->InsertParameterAt(0, parsed_function_->receiver_var());
 
         // Create setter value variable.
-        result_->setter_value = MakeVariable(
-            TokenPosition::kNoSource, TokenPosition::kNoSource,
-            Symbols::Value(),
-            AbstractType::ZoneHandle(Z, function.ParameterTypeAt(1)));
-        scope_->InsertParameterAt(1, result_->setter_value);
-      } else {
-        helper_.ReadUntilFunctionNode();
-        function_node_helper.ReadUntilExcluding(
-            FunctionNodeHelper::kPositionalParameters);
-
-        // Create [this] variable.
-        intptr_t pos = 0;
-        Class& klass = Class::Handle(Z, function.Owner());
-        parsed_function_->set_receiver_var(
-            MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
-                         Symbols::This(), H.GetDeclarationType(klass)));
-        scope_->InsertParameterAt(pos++, parsed_function_->receiver_var());
-
-        // Create all positional and named parameters.
-        AddPositionalAndNamedParameters(
-            pos, kTypeCheckEverythingNotCheckedInNonDynamicallyInvokedMethod,
-            attrs);
+        if (target.IsImplicitSetterFunction()) {
+          result_->setter_value = MakeVariable(
+              TokenPosition::kNoSource, TokenPosition::kNoSource,
+              Symbols::Value(),
+              AbstractType::ZoneHandle(Z, function.ParameterTypeAt(1)));
+          scope_->InsertParameterAt(1, result_->setter_value);
+        }
+        break;
       }
+
+      // We do not create dyn:* forwarders for method extractors, since those
+      // can never return unboxed values (they return a closure).
+      ASSERT(!target.IsMethodExtractor());
+
+      helper_.ReadUntilFunctionNode();
+      function_node_helper.ReadUntilExcluding(
+          FunctionNodeHelper::kPositionalParameters);
+
+      // Create [this] variable.
+      intptr_t pos = 0;
+      Class& klass = Class::Handle(Z, function.Owner());
+      parsed_function_->set_receiver_var(
+          MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
+                       Symbols::This(), H.GetDeclarationType(klass)));
+      scope_->InsertParameterAt(pos++, parsed_function_->receiver_var());
+
+      // Create all positional and named parameters.
+      AddPositionalAndNamedParameters(
+          pos, kTypeCheckEverythingNotCheckedInNonDynamicallyInvokedMethod,
+          attrs);
       break;
     }
     case FunctionLayout::kMethodExtractor: {
@@ -410,7 +407,7 @@
     }
     case FunctionLayout::kNoSuchMethodDispatcher:
     case FunctionLayout::kInvokeFieldDispatcher:
-    case FunctionLayout::kFfiTrampoline:
+    case FunctionLayout::kFfiTrampoline: {
       for (intptr_t i = 0; i < function.NumParameters(); ++i) {
         LocalVariable* variable = MakeVariable(
             TokenPosition::kNoSource, TokenPosition::kNoSource,
@@ -434,6 +431,7 @@
         --depth_.catch_;
       }
       break;
+    }
     case FunctionLayout::kSignatureFunction:
     case FunctionLayout::kIrregexpFunction:
       UNREACHABLE();
@@ -444,6 +442,7 @@
   if (parsed_function_->function().MayHaveUncheckedEntryPoint()) {
     scope_->AddVariable(parsed_function_->EnsureEntryPointsTemp());
   }
+
   parsed_function_->AllocateVariables();
 
   return result_;
@@ -540,6 +539,8 @@
   FunctionNodeHelper function_node_helper(&helper_);
   function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kTypeParameters);
 
+  const auto& function = parsed_function_->function();
+
   intptr_t list_length =
       helper_.ReadListLength();  // read type_parameters list length.
   for (intptr_t i = 0; i < list_length; ++i) {
@@ -565,10 +566,8 @@
   }
 
   if (function_node_helper.async_marker_ == FunctionNodeHelper::kSyncYielding) {
-    intptr_t offset = parsed_function_->function().num_fixed_parameters();
-    for (intptr_t i = 0;
-         i < parsed_function_->function().NumOptionalPositionalParameters();
-         i++) {
+    intptr_t offset = function.num_fixed_parameters();
+    for (intptr_t i = 0; i < function.NumOptionalPositionalParameters(); i++) {
       parsed_function_->ParameterVariable(offset + i)->set_is_forced_stack();
     }
   }
@@ -627,6 +626,21 @@
       }
     }
   }
+
+  // Mark known chained futures such as _Future::timeout()'s _future.
+  if (function.recognized_kind() == MethodRecognizer::kFutureTimeout &&
+      depth_.function_ == 1) {
+    LocalVariable* future = scope_->LookupVariable(Symbols::_future(), true);
+    ASSERT(future != nullptr);
+    future->set_is_chained_future();
+    future->set_expected_context_index(Context::kFutureTimeoutFutureIndex);
+  } else if (function.recognized_kind() == MethodRecognizer::kFutureWait &&
+             depth_.function_ == 1) {
+    LocalVariable* future = scope_->LookupVariable(Symbols::_future(), true);
+    ASSERT(future != nullptr);
+    future->set_is_chained_future();
+    future->set_expected_context_index(Context::kFutureWaitFutureIndex);
+  }
 }
 
 void ScopeBuilder::VisitInitializer() {
@@ -1306,7 +1320,8 @@
     variable->set_is_late();
     variable->set_late_init_offset(initializer_offset);
   }
-  // Lift the two special async vars out of the function body scope, into the
+
+  // Lift the special async vars out of the function body scope, into the
   // outer function declaration scope.
   // This way we can allocate them in the outermost context at fixed indices,
   // allowing support for --lazy-async-stacks implementation to find awaiters.
diff --git a/runtime/vm/compiler/graph_intrinsifier.cc b/runtime/vm/compiler/graph_intrinsifier.cc
index fc8fa3d..3f77aa2 100644
--- a/runtime/vm/compiler/graph_intrinsifier.cc
+++ b/runtime/vm/compiler/graph_intrinsifier.cc
@@ -13,6 +13,7 @@
 #include "vm/compiler/backend/linearscan.h"
 #include "vm/compiler/backend/range_analysis.h"
 #include "vm/compiler/compiler_pass.h"
+#include "vm/compiler/intrinsifier.h"
 #include "vm/compiler/jit/compiler.h"
 #include "vm/cpu.h"
 #include "vm/flag_list.h"
@@ -22,9 +23,29 @@
 DECLARE_FLAG(bool, print_flow_graph);
 DECLARE_FLAG(bool, print_flow_graph_optimized);
 
+class GraphInstrinsicCodeGenScope {
+ public:
+  explicit GraphInstrinsicCodeGenScope(FlowGraphCompiler* compiler)
+      : compiler_(compiler), old_is_optimizing_(compiler->is_optimizing()) {
+    compiler_->is_optimizing_ = true;
+  }
+  ~GraphInstrinsicCodeGenScope() {
+    compiler_->is_optimizing_ = old_is_optimizing_;
+  }
+
+ private:
+  FlowGraphCompiler* compiler_;
+  bool old_is_optimizing_;
+};
+
 namespace compiler {
 
 static void EmitCodeFor(FlowGraphCompiler* compiler, FlowGraph* graph) {
+  // For graph intrinsics we run the linearscan register allocator, which will
+  // pass opt=true for MakeLocationSummary. We therefore also have to ensure
+  // `compiler->is_optimizing()` is set to true during EmitNativeCode.
+  GraphInstrinsicCodeGenScope optimizing_scope(compiler);
+
   // The FlowGraph here is constructed by the intrinsics builder methods, and
   // is different from compiler->flow_graph(), the original method's flow graph.
   compiler->assembler()->Comment("Graph intrinsic begin");
@@ -75,6 +96,7 @@
   FlowGraph* graph =
       new FlowGraph(parsed_function, graph_entry, block_id, prologue_info);
   const Function& function = parsed_function.function();
+
   switch (function.recognized_kind()) {
 #define EMIT_CASE(class_name, function_name, enum_name, fp)                    \
   case MethodRecognizer::k##enum_name:                                         \
@@ -82,9 +104,15 @@
     break;
 
     GRAPH_INTRINSICS_LIST(EMIT_CASE);
-    default:
-      return false;
 #undef EMIT_CASE
+    default:
+      if (function.IsImplicitGetterFunction()) {
+        if (!Build_ImplicitGetter(graph)) return false;
+      } else if (function.IsImplicitSetterFunction()) {
+        if (!Build_ImplicitSetter(graph)) return false;
+      } else {
+        return false;
+      }
   }
 
   if (FLAG_support_il_printer && FLAG_print_flow_graph &&
@@ -1054,5 +1082,94 @@
                                   flow_graph);
 }
 
+bool GraphIntrinsifier::Build_ImplicitGetter(FlowGraph* flow_graph) {
+  // This code will only be invoked if our assumptions have been met (see
+  // [Intrinsifier::CanIntrinsifyFieldAccessor])
+  auto zone = flow_graph->zone();
+  const auto& function = flow_graph->function();
+  ASSERT(Intrinsifier::CanIntrinsifyFieldAccessor(function));
+
+  auto& field = Field::Handle(zone, function.accessor_field());
+  if (Field::ShouldCloneFields()) {
+    field = field.CloneFromOriginal();
+  }
+  ASSERT(field.is_instance() && !field.is_late() && !field.needs_load_guard());
+
+  const auto& slot = Slot::Get(field, &flow_graph->parsed_function());
+
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  auto normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  auto receiver = builder.AddParameter(0, /*with_frame=*/false);
+  auto field_value = builder.AddDefinition(new (zone) LoadFieldInstr(
+      new (zone) Value(receiver), slot, builder.TokenPos()));
+  builder.AddReturn(new (zone) Value(field_value));
+  return true;
+}
+
+bool GraphIntrinsifier::Build_ImplicitSetter(FlowGraph* flow_graph) {
+  // This code will only be invoked if our assumptions have been met (see
+  // [Intrinsifier::CanIntrinsifyFieldAccessor])
+  auto zone = flow_graph->zone();
+  const auto& function = flow_graph->function();
+  ASSERT(Intrinsifier::CanIntrinsifyFieldAccessor(function));
+
+  auto& field = Field::Handle(zone, function.accessor_field());
+  if (Field::ShouldCloneFields()) {
+    field = field.CloneFromOriginal();
+  }
+  ASSERT(field.is_instance() && !field.is_final());
+  ASSERT(!function.HasUnboxedParameters() ||
+         FlowGraphCompiler::IsUnboxedField(field));
+
+  const auto& slot = Slot::Get(field, &flow_graph->parsed_function());
+
+  const auto barrier_mode = FlowGraphCompiler::IsUnboxedField(field)
+                                ? kNoStoreBarrier
+                                : kEmitStoreBarrier;
+
+  flow_graph->CreateCommonConstants();
+  GraphEntryInstr* graph_entry = flow_graph->graph_entry();
+  auto normal_entry = graph_entry->normal_entry();
+  BlockBuilder builder(flow_graph, normal_entry);
+
+  auto receiver = builder.AddParameter(0, /*with_frame=*/false);
+  auto value = builder.AddParameter(1, /*with_frame=*/false);
+
+  if (!function.HasUnboxedParameters() &&
+      FlowGraphCompiler::IsUnboxedField(field)) {
+    // We do not support storing to possibly guarded fields in JIT in graph
+    // intrinsics.
+    ASSERT(FLAG_precompiled_mode);
+
+    Representation representation = kNoRepresentation;
+    switch (field.guarded_cid()) {
+      case kDoubleCid:
+        representation = kUnboxedDouble;
+        break;
+      case kFloat32x4Cid:
+        representation = kUnboxedFloat32x4;
+        break;
+      case kFloat64x2Cid:
+        representation = kUnboxedFloat64x2;
+        break;
+      default:
+        ASSERT(field.is_non_nullable_integer());
+        representation = kUnboxedInt64;
+        break;
+    }
+    value = builder.AddUnboxInstr(representation, new Value(value),
+                                  /*is_checked=*/true);
+  }
+
+  builder.AddInstruction(new (zone) StoreInstanceFieldInstr(
+      slot, new (zone) Value(receiver), new (zone) Value(value), barrier_mode,
+      builder.TokenPos()));
+
+  builder.AddReturn(new (zone) Value(flow_graph->constant_null()));
+  return true;
+}
+
 }  // namespace compiler
 }  // namespace dart
diff --git a/runtime/vm/compiler/graph_intrinsifier.h b/runtime/vm/compiler/graph_intrinsifier.h
index c122b5c..3104d2f 100644
--- a/runtime/vm/compiler/graph_intrinsifier.h
+++ b/runtime/vm/compiler/graph_intrinsifier.h
@@ -48,6 +48,9 @@
   GRAPH_INTRINSICS_LIST(DECLARE_FUNCTION)
 
 #undef DECLARE_FUNCTION
+
+  static bool Build_ImplicitGetter(FlowGraph* flow_graph);
+  static bool Build_ImplicitSetter(FlowGraph* flow_graph);
 };
 
 }  // namespace compiler
diff --git a/runtime/vm/compiler/intrinsifier.cc b/runtime/vm/compiler/intrinsifier.cc
index e14922b..7277c21 100644
--- a/runtime/vm/compiler/intrinsifier.cc
+++ b/runtime/vm/compiler/intrinsifier.cc
@@ -45,7 +45,7 @@
     }
     return false;
   }
-  if (!function.is_intrinsic()) {
+  if (!function.is_intrinsic() && !CanIntrinsifyFieldAccessor(function)) {
     if (FLAG_trace_intrinsifier) {
       THR_Print("No, not intrinsic function.\n");
     }
@@ -74,6 +74,85 @@
   return true;
 }
 
+bool Intrinsifier::CanIntrinsifyFieldAccessor(const Function& function) {
+  const bool is_getter = function.IsImplicitGetterFunction();
+  const bool is_setter = function.IsImplicitSetterFunction();
+  if (!is_getter && !is_setter) return false;
+
+  Field& field = Field::Handle(function.accessor_field());
+  ASSERT(!field.IsNull());
+
+  // The checks further down examine the field and its guard.
+  //
+  // In JIT mode we only intrinsify the field accessor if there is no active
+  // guard, meaning the state transition has reached its final `kDynamicCid`
+  // state (where it stays).
+  //
+  // If we intrinsify, the intrinsified code therefore does not depend on the
+  // field guard and we do not add it to the guarded fields via
+  // [ParsedFunction::AddToGuardedFields].
+  if (Field::ShouldCloneFields()) {
+    field = field.CloneFromOriginal();
+  }
+
+  // We only graph intrinsify implicit instance getters/setter for now.
+  if (!field.is_instance()) return false;
+
+  if (is_getter) {
+    // We don't support complex getter cases.
+    if (field.is_late() || field.needs_load_guard()) return false;
+
+    if (FlowGraphCompiler::IsPotentialUnboxedField(field)) {
+      if (function.HasUnboxedReturnValue()) {
+        // In AOT mode: Unboxed fields contain the unboxed value and can be
+        // returned in unboxed form.
+        ASSERT(FLAG_precompiled_mode);
+      } else {
+        // In JIT mode: Unboxed fields contain a mutable box which we cannot
+        // return.
+        return false;
+      }
+    } else {
+      // If the field is boxed, then the getter cannot return an unboxed value
+      // either (if it could, we would know the field itself can be unboxed).
+      RELEASE_ASSERT(!function.HasUnboxedReturnValue());
+    }
+  } else {
+    ASSERT(is_setter);
+
+    // We don't support complex setter cases.
+    if (field.is_final()) {
+      RELEASE_ASSERT(field.is_late());
+      return false;
+    }
+
+    // We only support cases where there is no need to check for argument types.
+    //
+    // Normally we have to check the parameter type.
+    ASSERT(function.NeedsArgumentTypeChecks());
+    // Dynamic call sites will go to dyn:set:* instead.
+    ASSERT(!function.CanReceiveDynamicInvocation());
+    // Covariant parameter types have to be checked, which we don't support.
+    if (field.is_covariant() || field.is_generic_covariant_impl()) return false;
+
+    // If the incoming value is unboxed we only support real unboxed fields to
+    // avoid the need for boxing (which we cannot do in the intrinsic).
+    if (function.HasUnboxedParameters()) {
+      ASSERT(FLAG_precompiled_mode);
+      if (!FlowGraphCompiler::IsUnboxedField(field)) {
+        return false;
+      }
+    }
+
+    // We don't support field guards in graph intrinsic stores.
+    if (!FLAG_precompiled_mode && field.guarded_cid() != kDynamicCid) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
 struct IntrinsicDesc {
   const char* class_name;
   const char* function_name;
diff --git a/runtime/vm/compiler/intrinsifier.h b/runtime/vm/compiler/intrinsifier.h
index f8895a4..835f73f 100644
--- a/runtime/vm/compiler/intrinsifier.h
+++ b/runtime/vm/compiler/intrinsifier.h
@@ -34,7 +34,9 @@
   static void InitializeState();
 
  private:
+  friend class GraphIntrinsifier;  // For CanIntrinsifyFieldAccessor.
   static bool CanIntrinsify(const Function& function);
+  static bool CanIntrinsifyFieldAccessor(const Function& function);
 };
 
 }  // namespace compiler
diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc
index fbb7557..1139cdc 100644
--- a/runtime/vm/compiler/jit/compiler.cc
+++ b/runtime/vm/compiler/jit/compiler.cc
@@ -502,8 +502,6 @@
 }
 
 // Return null if bailed out.
-// If optimized_result_code is not NULL then it is caller's responsibility
-// to install code.
 CodePtr CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) {
   ASSERT(!FLAG_precompiled_mode);
   const Function& function = parsed_function()->function();
@@ -659,7 +657,7 @@
         //      those writes are observed atomically.
         //
         thread()->isolate_group()->RunWithStoppedMutators(
-            install_code_fun, install_code_fun, /*use_force_growth=*/true);
+            install_code_fun, /*use_force_growth=*/true);
       }
       if (!result->IsNull()) {
         // Must be called outside of safepoint.
diff --git a/runtime/vm/compiler/jit/jit_call_specializer.cc b/runtime/vm/compiler/jit/jit_call_specializer.cc
index 688084b..6ce72c4 100644
--- a/runtime/vm/compiler/jit/jit_call_specializer.cc
+++ b/runtime/vm/compiler/jit/jit_call_specializer.cc
@@ -30,15 +30,12 @@
 #define I (isolate())
 #define Z (zone())
 
-static bool ShouldCloneFields() {
-  return Compiler::IsBackgroundCompilation() ||
-         FLAG_force_clone_compiler_objects;
-}
-
 JitCallSpecializer::JitCallSpecializer(
     FlowGraph* flow_graph,
     SpeculativeInliningPolicy* speculative_policy)
-    : CallSpecializer(flow_graph, speculative_policy, ShouldCloneFields()) {}
+    : CallSpecializer(flow_graph,
+                      speculative_policy,
+                      Field::ShouldCloneFields()) {}
 
 bool JitCallSpecializer::IsAllowedForInlining(intptr_t deopt_id) const {
   return true;
diff --git a/runtime/vm/compiler/method_recognizer.cc b/runtime/vm/compiler/method_recognizer.cc
index 98a4a34..2d4d7d6 100644
--- a/runtime/vm/compiler/method_recognizer.cc
+++ b/runtime/vm/compiler/method_recognizer.cc
@@ -4,6 +4,7 @@
 
 #include "vm/compiler/method_recognizer.h"
 
+#include "vm/log.h"
 #include "vm/object.h"
 #include "vm/reusable_handles.h"
 #include "vm/symbols.h"
@@ -198,16 +199,16 @@
   GrowableArray<Library*> libs(3);
   Libraries(&libs);
   Function& func = Function::Handle();
+  bool fingerprints_match = true;
 
   for (intptr_t i = 1; i < MethodRecognizer::kNumRecognizedMethods; i++) {
     const MethodRecognizer::Kind kind = static_cast<MethodRecognizer::Kind>(i);
     func = Library::GetFunction(libs, recognized_methods[i].class_name,
                                 recognized_methods[i].function_name);
     if (!func.IsNull()) {
-      CHECK_FINGERPRINT3(func, recognized_methods[i].class_name,
-                         recognized_methods[i].function_name,
-                         recognized_methods[i].enum_name,
-                         recognized_methods[i].fp);
+      fingerprints_match =
+          func.CheckSourceFingerprint(recognized_methods[i].fp) &&
+          fingerprints_match;
       func.set_recognized_kind(kind);
       switch (kind) {
 #define RECOGNIZE_METHOD(class_name, function_name, enum_name, fp)             \
@@ -220,19 +221,21 @@
           break;
       }
     } else if (!FLAG_precompiled_mode) {
-      FATAL2("Missing %s::%s\n", recognized_methods[i].class_name,
-             recognized_methods[i].function_name);
+      fingerprints_match = false;
+      OS::PrintErr("Missing %s::%s\n", recognized_methods[i].class_name,
+                   recognized_methods[i].function_name);
     }
   }
 
 #define SET_FUNCTION_BIT(class_name, function_name, dest, fp, setter, value)   \
   func = Library::GetFunction(libs, #class_name, #function_name);              \
   if (!func.IsNull()) {                                                        \
-    CHECK_FINGERPRINT3(func, class_name, function_name, dest, fp);             \
+    fingerprints_match =                                                       \
+        func.CheckSourceFingerprint(fp) && fingerprints_match;                 \
     func.setter(value);                                                        \
   } else if (!FLAG_precompiled_mode) {                                         \
     OS::PrintErr("Missing %s::%s\n", #class_name, #function_name);             \
-    UNREACHABLE();                                                             \
+    fingerprints_match = false;                                                \
   }
 
 #define SET_IS_POLYMORPHIC_TARGET(class_name, function_name, dest, fp)         \
@@ -244,6 +247,14 @@
 #undef SET_RECOGNIZED_KIND
 #undef SET_IS_POLYMORPHIC_TARGET
 #undef SET_FUNCTION_BIT
+
+  if (!fingerprints_match) {
+    FATAL(
+        "FP mismatch while recognizing methods. If the behavior of "
+        "these functions has changed, then changes are also needed in "
+        "the VM's compiler. Otherwise the fingerprint can simply be "
+        "updated in recognized_methods_list.h\n");
+  }
 }
 
 void MethodRecognizer::Libraries(GrowableArray<Library*>* libs) {
@@ -258,15 +269,7 @@
   libs->Add(&Library::ZoneHandle(Library::FfiLibrary()));
 }
 
-Token::Kind MethodTokenRecognizer::RecognizeTokenKind(const String& name_) {
-  Thread* thread = Thread::Current();
-  REUSABLE_STRING_HANDLESCOPE(thread);
-  String& name = thread->StringHandle();
-  name = name_.raw();
-  ASSERT(name.IsSymbol());
-  if (Function::IsDynamicInvocationForwarderName(name)) {
-    name = Function::DemangleDynamicInvocationForwarderName(name);
-  }
+static Token::Kind RecognizeTokenKindHelper(const String& name) {
   if (name.raw() == Symbols::Plus().raw()) {
     return Token::kADD;
   } else if (name.raw() == Symbols::Minus().raw()) {
@@ -313,6 +316,18 @@
   return Token::kILLEGAL;
 }
 
+Token::Kind MethodTokenRecognizer::RecognizeTokenKind(const String& name) {
+  ASSERT(name.IsSymbol());
+  if (Function::IsDynamicInvocationForwarderName(name)) {
+    Thread* thread = Thread::Current();
+    const auto& demangled_name = String::Handle(
+        thread->zone(), Function::DemangleDynamicInvocationForwarderName(name));
+    return RecognizeTokenKindHelper(demangled_name);
+  } else {
+    return RecognizeTokenKindHelper(name);
+  }
+}
+
 #define RECOGNIZE_FACTORY(symbol, class_name, constructor_name, cid, fp)       \
   {Symbols::k##symbol##Id, cid, fp, #symbol ", " #cid},  // NOLINT
 
diff --git a/runtime/vm/compiler/method_recognizer.h b/runtime/vm/compiler/method_recognizer.h
index 30b0443..949e031 100644
--- a/runtime/vm/compiler/method_recognizer.h
+++ b/runtime/vm/compiler/method_recognizer.h
@@ -65,12 +65,6 @@
   static Token::Kind RecognizeTokenKind(const String& name);
 };
 
-#define CHECK_FINGERPRINT2(f, p0, p1, fp)                                      \
-  ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1, fp))
-
-#define CHECK_FINGERPRINT3(f, p0, p1, p2, fp)                                  \
-  ASSERT(f.CheckSourceFingerprint(#p0 ", " #p1 ", " #p2, fp))
-
 // Class that recognizes factories and returns corresponding result cid.
 class FactoryRecognizer : public AllStatic {
  public:
diff --git a/runtime/vm/compiler/offsets_extractor.cc b/runtime/vm/compiler/offsets_extractor.cc
index 80a6870..a75c847 100644
--- a/runtime/vm/compiler/offsets_extractor.cc
+++ b/runtime/vm/compiler/offsets_extractor.cc
@@ -53,9 +53,6 @@
                "_element_size = "                                              \
             << Class::ArrayTraits::kElementSize << ";\n";
 
-#define PRINT_ARRAY_STRUCTFIELD_OFFSET(Class, Name, ElementOffsetName,         \
-                                       FieldOffset)
-
 #define PRINT_SIZEOF(Class, Name, What)                                        \
   std::cout << "static constexpr dart::compiler::target::word AOT_" #Class     \
                "_" #Name " = "                                                 \
@@ -81,8 +78,6 @@
                "_" #Name " = "                                                 \
             << Class::Name << ";\n";
 
-#define PRECOMP_NO_CHECK(Code)
-
 #else  // defined(DART_PRECOMPILED_RUNTIME)
 
 #define PRINT_FIELD_OFFSET(Class, Name)                                        \
@@ -98,9 +93,6 @@
                "_element_size = "                                              \
             << Class::ArrayTraits::kElementSize << ";\n";
 
-#define PRINT_ARRAY_STRUCTFIELD_OFFSET(Class, Name, ElementOffsetName,         \
-                                       FieldOffset)
-
 #define PRINT_SIZEOF(Class, Name, What)                                        \
   std::cout << "static constexpr dart::compiler::target::word " #Class         \
                "_" #Name " = "                                                 \
@@ -126,21 +118,19 @@
                "_" #Name " = "                                                 \
             << Class::Name << ";\n";
 
-#define PRECOMP_NO_CHECK(Code) Code
+    JIT_OFFSETS_LIST(PRINT_FIELD_OFFSET, PRINT_ARRAY_LAYOUT, PRINT_SIZEOF,
+                     PRINT_RANGE, PRINT_CONSTANT)
 
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
 
-    OFFSETS_LIST(PRINT_FIELD_OFFSET, PRINT_ARRAY_LAYOUT,
-                 PRINT_ARRAY_STRUCTFIELD_OFFSET, PRINT_SIZEOF, PRINT_RANGE,
-                 PRINT_CONSTANT, PRECOMP_NO_CHECK)
+    COMMON_OFFSETS_LIST(PRINT_FIELD_OFFSET, PRINT_ARRAY_LAYOUT, PRINT_SIZEOF,
+                        PRINT_RANGE, PRINT_CONSTANT)
 
 #undef PRINT_FIELD_OFFSET
 #undef PRINT_ARRAY_LAYOUT
-#undef PRINT_ARRAY_STRUCTFIELD_OFFSET
 #undef PRINT_SIZEOF
 #undef PRINT_RANGE
 #undef PRINT_CONSTANT
-#undef PRECOMP_NO_CHECK
   }
 };
 
diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h
index 849cff7..c05d57b 100644
--- a/runtime/vm/compiler/recognized_methods_list.h
+++ b/runtime/vm/compiler/recognized_methods_list.h
@@ -12,365 +12,367 @@
 // When adding a new function, add a 0 as the fingerprint and run the build in
 // debug mode to get the correct fingerprint from the mismatch error.
 #define OTHER_RECOGNIZED_LIST(V)                                               \
-  V(::, identical, ObjectIdentical, 0xc6e9467a)                                \
-  V(ClassID, getID, ClassIDgetID, 0xf0376ced)                                  \
-  V(Object, Object., ObjectConstructor, 0x8f3ae7ea)                            \
-  V(List, ., ListFactory, 0xdf9970a9)                                          \
-  V(_List, ., ObjectArrayAllocate, 0x03ddbd3a)                                 \
-  V(_List, []=, ObjectArraySetIndexed, 0x4d5e74cf)                             \
-  V(_GrowableList, []=, GrowableArraySetIndexed, 0x4d5e74cf)                   \
-  V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0xa24c2704)                    \
-  V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0xa491df3e)                  \
-  V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0xb65ae1fc)                  \
-  V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0xb4b776e5)                \
-  V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0xb460abe4)                  \
-  V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0x8c066c71)                \
-  V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0xacf2f222)                  \
-  V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0xa74b200b)                \
-  V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xa33a9f77)              \
-  V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0x87d86b60)              \
-  V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0x3e76086e)          \
-  V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0xfea5f17f)              \
-  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0xd2c4e74b)                    \
-  V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 0xec62b082)                  \
-  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0xc3566903)                  \
-  V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 0xdb50780f)                \
-  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0xbeeeea8a)                  \
-  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0xca02f10a)                \
-  V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0xcf587ccf)                  \
-  V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0xe01a1df0)                \
-  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0xb6a6294f)              \
-  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0xce7dad17)              \
-  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x4b773b59)          \
-  V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xfa2a6f88)              \
-  V(ByteData, ., ByteDataFactory, 0x0d31f187)                                  \
-  V(_ByteDataView, get:offsetInBytes, ByteDataViewOffsetInBytes, 0x0d956c6d)   \
-  V(_ByteDataView, get:_typedData, ByteDataViewTypedData, 0x28cc4efc)          \
-  V(_TypedListView, get:offsetInBytes, TypedDataViewOffsetInBytes, 0x0d956c6d) \
-  V(_TypedListView, get:_typedData, TypedDataViewTypedData, 0x28cc4efc)        \
-  V(_ByteDataView, ._, TypedData_ByteDataView_factory, 0xb839ff59)             \
-  V(_Int8ArrayView, ._, TypedData_Int8ArrayView_factory, 0x3d000a8d)           \
-  V(_Uint8ArrayView, ._, TypedData_Uint8ArrayView_factory, 0xff69de0f)         \
+  V(::, identical, ObjectIdentical, 0x8fd6ea58)                                \
+  V(ClassID, getID, ClassIDgetID, 0x0401ffad)                                  \
+  V(Object, Object., ObjectConstructor, 0x256e7170)                            \
+  V(List, ., ListFactory, 0xbec87d33)                                          \
+  V(_List, ., ObjectArrayAllocate, 0x6de199a1)                                 \
+  V(_List, []=, ObjectArraySetIndexed, 0xba15978f)                             \
+  V(_GrowableList, []=, GrowableArraySetIndexed, 0xba15978f)                   \
+  V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0xc28aff37)                    \
+  V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0xc3e7212d)                  \
+  V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0xdaa7b952)                  \
+  V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0xdc2919bc)                \
+  V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0xc57f53af)                  \
+  V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0xc5c49520)                \
+  V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0xa2c7e6a4)                  \
+  V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0xd8c29ffe)                \
+  V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xaf15f28a)              \
+  V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0xbe4987b7)              \
+  V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0x76c82c28)          \
+  V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0x29abed4e)              \
+  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0xfc13ad87)                    \
+  V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 0xc9e4212d)                  \
+  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0xd570aa0c)                  \
+  V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 0xe8acb234)                \
+  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0xd8651525)                  \
+  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0xd3f10d97)                \
+  V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0xe357b95f)                  \
+  V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0xf4d19bea)                \
+  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0xd6272645)              \
+  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0xca4af137)              \
+  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x71767f7f)          \
+  V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xf0483280)              \
+  V(ByteData, ., ByteDataFactory, 0x63fefa4b)                                  \
+  V(_ByteDataView, get:offsetInBytes, ByteDataViewOffsetInBytes, 0xe51b926b)   \
+  V(_ByteDataView, get:_typedData, ByteDataViewTypedData, 0x3c781fb9)          \
+  V(_TypedListView, get:offsetInBytes, TypedDataViewOffsetInBytes, 0xe51b926b) \
+  V(_TypedListView, get:_typedData, TypedDataViewTypedData, 0x3c781fb9)        \
+  V(_ByteDataView, ._, TypedData_ByteDataView_factory, 0xe9e9dad9)             \
+  V(_Int8ArrayView, ._, TypedData_Int8ArrayView_factory, 0x016014a7)           \
+  V(_Uint8ArrayView, ._, TypedData_Uint8ArrayView_factory, 0x8c3fc232)         \
   V(_Uint8ClampedArrayView, ._, TypedData_Uint8ClampedArrayView_factory,       \
-    0xdff11b9a)                                                                \
-  V(_Int16ArrayView, ._, TypedData_Int16ArrayView_factory, 0x1635c91e)         \
-  V(_Uint16ArrayView, ._, TypedData_Uint16ArrayView_factory, 0x287cbc66)       \
-  V(_Int32ArrayView, ._, TypedData_Int32ArrayView_factory, 0xf5270227)         \
-  V(_Uint32ArrayView, ._, TypedData_Uint32ArrayView_factory, 0xbb74a021)       \
-  V(_Int64ArrayView, ._, TypedData_Int64ArrayView_factory, 0xf348a583)         \
-  V(_Uint64ArrayView, ._, TypedData_Uint64ArrayView_factory, 0x10589491)       \
-  V(_Float32ArrayView, ._, TypedData_Float32ArrayView_factory, 0xbb4124b3)     \
-  V(_Float64ArrayView, ._, TypedData_Float64ArrayView_factory, 0x5f0b81e9)     \
-  V(_Float32x4ArrayView, ._, TypedData_Float32x4ArrayView_factory, 0xd8c71a39) \
-  V(_Int32x4ArrayView, ._, TypedData_Int32x4ArrayView_factory, 0x9bfbd6d5)     \
-  V(_Float64x2ArrayView, ._, TypedData_Float64x2ArrayView_factory, 0x1a383408) \
-  V(::, _toClampedUint8, ConvertIntToClampedUint8, 0x59765a4a)                 \
+    0x36da9706)                                                                \
+  V(_Int16ArrayView, ._, TypedData_Int16ArrayView_factory, 0x09a366f8)         \
+  V(_Uint16ArrayView, ._, TypedData_Uint16ArrayView_factory, 0x8f74c30f)       \
+  V(_Int32ArrayView, ._, TypedData_Int32ArrayView_factory, 0x8c100d16)         \
+  V(_Uint32ArrayView, ._, TypedData_Uint32ArrayView_factory, 0x4f7f073e)       \
+  V(_Int64ArrayView, ._, TypedData_Int64ArrayView_factory, 0xb85546cc)         \
+  V(_Uint64ArrayView, ._, TypedData_Uint64ArrayView_factory, 0x019c229a)       \
+  V(_Float32ArrayView, ._, TypedData_Float32ArrayView_factory, 0x2290e5a1)     \
+  V(_Float64ArrayView, ._, TypedData_Float64ArrayView_factory, 0xbe62c734)     \
+  V(_Float32x4ArrayView, ._, TypedData_Float32x4ArrayView_factory, 0x5bb7771d) \
+  V(_Int32x4ArrayView, ._, TypedData_Int32x4ArrayView_factory, 0x30b9f2a2)     \
+  V(_Float64x2ArrayView, ._, TypedData_Float64x2ArrayView_factory, 0x96490d01) \
+  V(::, _toClampedUint8, ConvertIntToClampedUint8, 0x143ed675)                 \
   V(::, copyRangeFromUint8ListToOneByteString,                                 \
-    CopyRangeFromUint8ListToOneByteString, 0x00000000)                         \
-  V(_StringBase, _interpolate, StringBaseInterpolate, 0xc0a650e4)              \
-  V(_IntegerImplementation, toDouble, IntegerToDouble, 0x22a26db3)             \
-  V(_Double, _add, DoubleAdd, 0x2f5c036a)                                      \
-  V(_Double, _sub, DoubleSub, 0x6d3cec71)                                      \
-  V(_Double, _mul, DoubleMul, 0x648e67af)                                      \
-  V(_Double, _div, DoubleDiv, 0x6d72d7d4)                                      \
-  V(::, min, MathMin, 0x935b799b)                                              \
-  V(::, max, MathMax, 0xe188dec2)                                              \
-  V(::, _doublePow, MathDoublePow, 0x5ae04e61)                                 \
-  V(::, _intPow, MathIntPow, 0x569ffd3f)                                       \
-  V(Float32x4, _Float32x4FromDoubles, Float32x4FromDoubles, 0xbe902b89)        \
-  V(Float32x4, Float32x4.zero, Float32x4Zero, 0x9b875c7f)                      \
-  V(Float32x4, _Float32x4Splat, Float32x4Splat, 0xd0cf3e6c)                    \
-  V(Float32x4, Float32x4.fromInt32x4Bits, Int32x4ToFloat32x4, 0x7339b2bd)      \
-  V(Float32x4, Float32x4.fromFloat64x2, Float64x2ToFloat32x4, 0x5de0e788)      \
-  V(_Float32x4, shuffle, Float32x4Shuffle, 0x5bc2446e)                         \
-  V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 0x61887391)                   \
-  V(_Float32x4, get:signMask, Float32x4GetSignMask, 0x2931936f)                \
-  V(_Float32x4, equal, Float32x4Equal, 0x63e87fb9)                             \
-  V(_Float32x4, greaterThan, Float32x4GreaterThan, 0x71db0fc2)                 \
-  V(_Float32x4, greaterThanOrEqual, Float32x4GreaterThanOrEqual, 0x6dfbf3fa)   \
-  V(_Float32x4, lessThan, Float32x4LessThan, 0x69a60360)                       \
-  V(_Float32x4, lessThanOrEqual, Float32x4LessThanOrEqual, 0x6604e583)         \
-  V(_Float32x4, notEqual, Float32x4NotEqual, 0x83dcc786)                       \
-  V(_Float32x4, min, Float32x4Min, 0xf70ed6d5)                                 \
-  V(_Float32x4, max, Float32x4Max, 0xd93e58a6)                                 \
-  V(_Float32x4, scale, Float32x4Scale, 0xea28b605)                             \
-  V(_Float32x4, sqrt, Float32x4Sqrt, 0xacff17f7)                               \
-  V(_Float32x4, reciprocalSqrt, Float32x4ReciprocalSqrt, 0xa5e00f7d)           \
-  V(_Float32x4, reciprocal, Float32x4Reciprocal, 0x9c5a3fb7)                   \
-  V(_Float32x4, unary-, Float32x4Negate, 0xae8af7f1)                           \
-  V(_Float32x4, abs, Float32x4Abs, 0xb34e9b8d)                                 \
-  V(_Float32x4, clamp, Float32x4Clamp, 0xbed4ce62)                             \
-  V(_Float32x4, _withX, Float32x4WithX, 0xf0211c74)                            \
-  V(_Float32x4, _withY, Float32x4WithY, 0x074539fc)                            \
-  V(_Float32x4, _withZ, Float32x4WithZ, 0xf026c2e5)                            \
-  V(_Float32x4, _withW, Float32x4WithW, 0xe364aa0f)                            \
-  V(Float64x2, _Float64x2FromDoubles, Float64x2FromDoubles, 0x1ca49394)        \
-  V(Float64x2, Float64x2.zero, Float64x2Zero, 0x5e70f315)                      \
-  V(Float64x2, _Float64x2Splat, Float64x2Splat, 0x05711520)                    \
-  V(Float64x2, Float64x2.fromFloat32x4, Float32x4ToFloat64x2, 0x956c2161)      \
-  V(_Float64x2, get:x, Float64x2GetX, 0x00b83193)                              \
-  V(_Float64x2, get:y, Float64x2GetY, 0xee498cb6)                              \
-  V(_Float64x2, unary-, Float64x2Negate, 0x71748e87)                           \
-  V(_Float64x2, abs, Float64x2Abs, 0x76383223)                                 \
-  V(_Float64x2, sqrt, Float64x2Sqrt, 0x6fe8ae8d)                               \
-  V(_Float64x2, get:signMask, Float64x2GetSignMask, 0x2931936f)                \
-  V(_Float64x2, scale, Float64x2Scale, 0xad124c9b)                             \
-  V(_Float64x2, _withX, Float64x2WithX, 0xb30ab30a)                            \
-  V(_Float64x2, _withY, Float64x2WithY, 0xca2ed092)                            \
-  V(_Float64x2, min, Float64x2Min,  0x57938495)                                \
-  V(_Float64x2, max, Float64x2Max,  0x39c30666)                                \
-  V(Int32x4, _Int32x4FromInts, Int32x4FromInts, 0xbce3fab8)                    \
-  V(Int32x4, _Int32x4FromBools, Int32x4FromBools, 0x45ef1b0f)                  \
-  V(Int32x4, Int32x4.fromFloat32x4Bits, Float32x4ToInt32x4, 0x64c906dc)        \
-  V(_Int32x4, get:flagX, Int32x4GetFlagX, 0x9f8da5bb)                          \
-  V(_Int32x4, get:flagY, Int32x4GetFlagY, 0xbafddc9b)                          \
-  V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 0xc8a777ee)                          \
-  V(_Int32x4, get:flagW, Int32x4GetFlagW, 0xd1c78a2f)                          \
-  V(_Int32x4, get:signMask, Int32x4GetSignMask, 0x2931936f)                    \
-  V(_Int32x4, shuffle, Int32x4Shuffle, 0x00cff856)                             \
-  V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 0x57a21961)                       \
-  V(_Int32x4, select, Int32x4Select, 0xafd1fc25)                               \
-  V(_Int32x4, _withFlagX, Int32x4WithFlagX, 0x7d654214)                        \
-  V(_Int32x4, _withFlagY, Int32x4WithFlagY, 0x7e67ec85)                        \
-  V(_Int32x4, _withFlagZ, Int32x4WithFlagZ, 0x9363a67c)                        \
-  V(_Int32x4, _withFlagW, Int32x4WithFlagW, 0x7035cb54)                        \
-  V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 0x09db1d9d)               \
-  V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 0xb643fb19)               \
-  V(_HashVMBase, get:_data, LinkedHashMap_getData, 0x9a54182a)                 \
-  V(_HashVMBase, set:_data, LinkedHashMap_setData, 0x8bc58326)                 \
-  V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 0xf3cf0e2e)         \
-  V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 0x75261d2a)         \
-  V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 0xfbd541dd)         \
-  V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, 0x7d2c50d9)         \
-  V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, 0xfdd43ee1)   \
-  V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, 0x7f2b4ddd)   \
-  V(::, _classRangeCheck, ClassRangeCheck, 0xca52e30a)                         \
-  V(::, _asyncStackTraceHelper, AsyncStackTraceHelper, 0xaeaed5cb)             \
-  V(::, _abi, FfiAbi, 0xf2e89620)                                              \
-  V(::, _asFunctionInternal, FfiAsFunctionInternal, 0x77414ede)                \
-  V(::, _nativeCallbackFunction, FfiNativeCallbackFunction, 0x5bd261b8)        \
-  V(::, _loadInt8, FfiLoadInt8, 0x9b1e4a8d)                                    \
-  V(::, _loadInt16, FfiLoadInt16, 0x2824dc24)                                  \
-  V(::, _loadInt32, FfiLoadInt32, 0x3f9bf49d)                                  \
-  V(::, _loadInt64, FfiLoadInt64, 0xbb4e2186)                                  \
-  V(::, _loadUint8, FfiLoadUint8, 0xc93d1241)                                  \
-  V(::, _loadUint16, FfiLoadUint16, 0x4bc4c8ae)                                \
-  V(::, _loadUint32, FfiLoadUint32, 0x5fd2e17c)                                \
-  V(::, _loadUint64, FfiLoadUint64, 0xec4e4e0a)                                \
-  V(::, _loadIntPtr, FfiLoadIntPtr, 0x1ad8e69f)                                \
-  V(::, _loadFloat, FfiLoadFloat, 0x234b92dc)                                  \
-  V(::, _loadDouble, FfiLoadDouble, 0x97c755b3)                                \
-  V(::, _loadPointer, FfiLoadPointer, 0xd9d293a5)                              \
-  V(::, _storeInt8, FfiStoreInt8, 0x9a637adf)                                  \
-  V(::, _storeInt16, FfiStoreInt16, 0x7c5ad40b)                                \
-  V(::, _storeInt32, FfiStoreInt32, 0xc729a9da)                                \
-  V(::, _storeInt64, FfiStoreInt64, 0x748af071)                                \
-  V(::, _storeUint8, FfiStoreUint8, 0xea22235e)                                \
-  V(::, _storeUint16, FfiStoreUint16, 0x0c61dd74)                              \
-  V(::, _storeUint32, FfiStoreUint32, 0x32962fcb)                              \
-  V(::, _storeUint64, FfiStoreUint64, 0xe55a10c2)                              \
-  V(::, _storeIntPtr, FfiStoreIntPtr, 0xc75ef10f)                              \
-  V(::, _storeFloat, FfiStoreFloat, 0x34a22e07)                                \
-  V(::, _storeDouble, FfiStoreDouble, 0x09226ca7)                              \
-  V(::, _storePointer, FfiStorePointer, 0x3c7143a8)                            \
-  V(::, _fromAddress, FfiFromAddress, 0x612a64d5)                              \
-  V(Pointer, get:address, FfiGetAddress, 0x29a505a1)                           \
-  V(::, reachabilityFence, ReachabilityFence, 0x0)                             \
+    CopyRangeFromUint8ListToOneByteString, 0x89d6a60a)                         \
+  V(_StringBase, _interpolate, StringBaseInterpolate, 0xbf682f1c)              \
+  V(_IntegerImplementation, toDouble, IntegerToDouble, 0x5f8db5f5)             \
+  V(_Double, _add, DoubleAdd, 0x4326962a)                                      \
+  V(_Double, _sub, DoubleSub, 0x81077f31)                                      \
+  V(_Double, _mul, DoubleMul, 0x7858fa6f)                                      \
+  V(_Double, _div, DoubleDiv, 0x813d6a94)                                      \
+  V(::, min, MathMin, 0xe6a2f504)                                              \
+  V(::, max, MathMax, 0x4cfa6f6b)                                              \
+  V(::, _doublePow, MathDoublePow, 0x973546e3)                                 \
+  V(::, _intPow, MathIntPow, 0x5449a6fb)                                       \
+  V(Float32x4, _Float32x4FromDoubles, Float32x4FromDoubles, 0x4ddbf1d0)        \
+  V(Float32x4, Float32x4.zero, Float32x4Zero, 0x730d827d)                      \
+  V(Float32x4, _Float32x4Splat, Float32x4Splat, 0x36ae87e8)                    \
+  V(Float32x4, Float32x4.fromInt32x4Bits, Int32x4ToFloat32x4, 0x8704457d)      \
+  V(Float32x4, Float32x4.fromFloat64x2, Float64x2ToFloat32x4, 0x71ab7a48)      \
+  V(_Float32x4, shuffle, Float32x4Shuffle, 0x6f8cd72e)                         \
+  V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 0xd9fe42cf)                   \
+  V(_Float32x4, get:signMask, Float32x4GetSignMask, 0x00b7b96d)                \
+  V(_Float32x4, equal, Float32x4Equal, 0x77b31279)                             \
+  V(_Float32x4, greaterThan, Float32x4GreaterThan, 0x85a5a282)                 \
+  V(_Float32x4, greaterThanOrEqual, Float32x4GreaterThanOrEqual, 0x81c686ba)   \
+  V(_Float32x4, lessThan, Float32x4LessThan, 0x7d709620)                       \
+  V(_Float32x4, lessThanOrEqual, Float32x4LessThanOrEqual, 0x79cf7843)         \
+  V(_Float32x4, notEqual, Float32x4NotEqual, 0x97a75a46)                       \
+  V(_Float32x4, min, Float32x4Min, 0x0ad96995)                                 \
+  V(_Float32x4, max, Float32x4Max, 0xed08eb66)                                 \
+  V(_Float32x4, scale, Float32x4Scale, 0xfdf348c5)                             \
+  V(_Float32x4, sqrt, Float32x4Sqrt, 0x84853df5)                               \
+  V(_Float32x4, reciprocalSqrt, Float32x4ReciprocalSqrt, 0x7d66357b)           \
+  V(_Float32x4, reciprocal, Float32x4Reciprocal, 0x73e065b5)                   \
+  V(_Float32x4, unary-, Float32x4Negate, 0x86111def)                           \
+  V(_Float32x4, abs, Float32x4Abs, 0x8ad4c18b)                                 \
+  V(_Float32x4, clamp, Float32x4Clamp, 0x374a9da0)                             \
+  V(_Float32x4, _withX, Float32x4WithX, 0xfd53a072)                            \
+  V(_Float32x4, _withY, Float32x4WithY, 0xf5f5b506)                            \
+  V(_Float32x4, _withZ, Float32x4WithZ, 0xf2122f63)                            \
+  V(_Float32x4, _withW, Float32x4WithW, 0xef6f231e)                            \
+  V(Float64x2, _Float64x2FromDoubles, Float64x2FromDoubles, 0x9688f476)        \
+  V(Float64x2, Float64x2.zero, Float64x2Zero, 0x35f71913)                      \
+  V(Float64x2, _Float64x2Splat, Float64x2Splat, 0xf2e6bce9)                    \
+  V(Float64x2, Float64x2.fromFloat32x4, Float32x4ToFloat64x2, 0xa936b421)      \
+  V(_Float64x2, get:x, Float64x2GetX, 0xd83e5791)                              \
+  V(_Float64x2, get:y, Float64x2GetY, 0xc5cfb2b4)                              \
+  V(_Float64x2, unary-, Float64x2Negate, 0x48fab485)                           \
+  V(_Float64x2, abs, Float64x2Abs, 0x4dbe5821)                                 \
+  V(_Float64x2, sqrt, Float64x2Sqrt, 0x476ed48b)                               \
+  V(_Float64x2, get:signMask, Float64x2GetSignMask, 0x00b7b96d)                \
+  V(_Float64x2, scale, Float64x2Scale, 0xc0dcdf5b)                             \
+  V(_Float64x2, _withX, Float64x2WithX, 0xc03d3708)                            \
+  V(_Float64x2, _withY, Float64x2WithY, 0xb8df4b9c)                            \
+  V(_Float64x2, min, Float64x2Min,  0x6b5e1755)                                \
+  V(_Float64x2, max, Float64x2Max,  0x4d8d9926)                                \
+  V(Int32x4, _Int32x4FromInts, Int32x4FromInts, 0xa646ec55)                    \
+  V(Int32x4, _Int32x4FromBools, Int32x4FromBools, 0x5e05beed)                  \
+  V(Int32x4, Int32x4.fromFloat32x4Bits, Float32x4ToInt32x4, 0x7893999c)        \
+  V(_Int32x4, get:flagX, Int32x4GetFlagX, 0x7713cbb9)                          \
+  V(_Int32x4, get:flagY, Int32x4GetFlagY, 0x92840299)                          \
+  V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 0xa02d9dec)                          \
+  V(_Int32x4, get:flagW, Int32x4GetFlagW, 0xa94db02d)                          \
+  V(_Int32x4, get:signMask, Int32x4GetSignMask, 0x00b7b96d)                    \
+  V(_Int32x4, shuffle, Int32x4Shuffle, 0x149a8b16)                             \
+  V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 0xd017e89f)                       \
+  V(_Int32x4, select, Int32x4Select, 0x2847cb63)                               \
+  V(_Int32x4, _withFlagX, Int32x4WithFlagX, 0xa365d5a6)                        \
+  V(_Int32x4, _withFlagY, Int32x4WithFlagY, 0x945670e9)                        \
+  V(_Int32x4, _withFlagZ, Int32x4WithFlagZ, 0x938c5d97)                        \
+  V(_Int32x4, _withFlagW, Int32x4WithFlagW, 0x9ebace9b)                        \
+  V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 0xe161439b)               \
+  V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 0x8c899997)               \
+  V(_HashVMBase, get:_data, LinkedHashMap_getData, 0xb1d039ec)                 \
+  V(_HashVMBase, set:_data, LinkedHashMap_setData, 0x7c713c68)                 \
+  V(_HashVMBase, get:_usedData, LinkedHashMap_getUsedData, 0xcb55342c)         \
+  V(_HashVMBase, set:_usedData, LinkedHashMap_setUsedData, 0x4b6bbba8)         \
+  V(_HashVMBase, get:_hashMask, LinkedHashMap_getHashMask, 0xd35b67db)         \
+  V(_HashVMBase, set:_hashMask, LinkedHashMap_setHashMask, 0x5371ef57)         \
+  V(_HashVMBase, get:_deletedKeys, LinkedHashMap_getDeletedKeys, 0xd55a64df)   \
+  V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, 0x5570ec5b)   \
+  V(::, _classRangeCheck, ClassRangeCheck, 0x44ba948a)                         \
+  V(::, _asyncStackTraceHelper, AsyncStackTraceHelper, 0x92cea920)             \
+  V(::, _abi, FfiAbi, 0x00a48dda)                                              \
+  V(::, _asFunctionInternal, FfiAsFunctionInternal, 0x4ea3f661)                \
+  V(::, _nativeCallbackFunction, FfiNativeCallbackFunction, 0xe7a60ce3)        \
+  V(::, _loadInt8, FfiLoadInt8, 0x7b779ed3)                                    \
+  V(::, _loadInt16, FfiLoadInt16, 0x58b6f02a)                                  \
+  V(::, _loadInt32, FfiLoadInt32, 0x5a94fec0)                                  \
+  V(::, _loadInt64, FfiLoadInt64, 0x4b627ea0)                                  \
+  V(::, _loadUint8, FfiLoadUint8, 0x4dc0dbce)                                  \
+  V(::, _loadUint16, FfiLoadUint16, 0x79491be7)                                \
+  V(::, _loadUint32, FfiLoadUint32, 0x62e14f52)                                \
+  V(::, _loadUint64, FfiLoadUint64, 0x7178bcc9)                                \
+  V(::, _loadIntPtr, FfiLoadIntPtr, 0x584c733b)                                \
+  V(::, _loadFloat, FfiLoadFloat, 0x7f0471da)                                  \
+  V(::, _loadDouble, FfiLoadDouble, 0x7d37b396)                                \
+  V(::, _loadPointer, FfiLoadPointer, 0x3691c04d)                              \
+  V(::, _storeInt8, FfiStoreInt8, 0x118e5bc9)                                  \
+  V(::, _storeInt16, FfiStoreInt16, 0x0a8b9fef)                                \
+  V(::, _storeInt32, FfiStoreInt32, 0x2e23d91a)                                \
+  V(::, _storeInt64, FfiStoreInt64, 0x2411ba37)                                \
+  V(::, _storeUint8, FfiStoreUint8, 0x37ab7fb3)                                \
+  V(::, _storeUint16, FfiStoreUint16, 0x153b579b)                              \
+  V(::, _storeUint32, FfiStoreUint32, 0x18159582)                              \
+  V(::, _storeUint64, FfiStoreUint64, 0x1516def6)                              \
+  V(::, _storeIntPtr, FfiStoreIntPtr, 0x3a401365)                              \
+  V(::, _storeFloat, FfiStoreFloat, 0x23292bbb)                                \
+  V(::, _storeDouble, FfiStoreDouble, 0x013dc7a1)                              \
+  V(::, _storePointer, FfiStorePointer, 0x43c38f62)                            \
+  V(::, _fromAddress, FfiFromAddress, 0xab4ae553)                              \
+  V(Pointer, get:address, FfiGetAddress, 0x012b2b9f)                           \
+  V(::, reachabilityFence, ReachabilityFence, 0xad39d0a6)                      \
   V(_Utf8Decoder, _scan, Utf8DecoderScan, 0x78f44c3c)                          \
+  V(_Future, timeout, FutureTimeout, 0x010f8ad4)                               \
+  V(Future, wait, FutureWait, 0x486414a9)                                      \
 
 // List of intrinsics:
 // (class-name, function-name, intrinsification method, fingerprint).
 #define CORE_LIB_INTRINSIC_LIST(V)                                             \
-  V(_Smi, ~, Smi_bitNegate, 0x2f002cba)                                        \
-  V(_Smi, get:bitLength, Smi_bitLength, 0x277b8ace)                            \
-  V(_Smi, _bitAndFromSmi, Smi_bitAndFromSmi, 0x90b94dd3)                       \
-  V(_BigIntImpl, _lsh, Bigint_lsh, 0x776e33c7)                                 \
-  V(_BigIntImpl, _rsh, Bigint_rsh, 0x2bf277fc)                                 \
-  V(_BigIntImpl, _absAdd, Bigint_absAdd, 0x147eb8ec)                           \
-  V(_BigIntImpl, _absSub, Bigint_absSub, 0xed4c4e74)                           \
-  V(_BigIntImpl, _mulAdd, Bigint_mulAdd, 0x634f75a0)                           \
-  V(_BigIntImpl, _sqrAdd, Bigint_sqrAdd, 0xc0a29ed4)                           \
+  V(_Smi, ~, Smi_bitNegate, 0x068652b8)                                        \
+  V(_Smi, get:bitLength, Smi_bitLength, 0xff01b0cc)                            \
+  V(_Smi, _bitAndFromSmi, Smi_bitAndFromSmi, 0xa483e093)                       \
+  V(_BigIntImpl, _lsh, Bigint_lsh, 0x772fb5fd)                                 \
+  V(_BigIntImpl, _rsh, Bigint_rsh, 0xb52a24b8)                                 \
+  V(_BigIntImpl, _absAdd, Bigint_absAdd, 0x90dc61a8)                           \
+  V(_BigIntImpl, _absSub, Bigint_absSub, 0x76887330)                           \
+  V(_BigIntImpl, _mulAdd, Bigint_mulAdd, 0xb2741296)                           \
+  V(_BigIntImpl, _sqrAdd, Bigint_sqrAdd, 0xcee0facc)                           \
   V(_BigIntImpl, _estimateQuotientDigit, Bigint_estimateQuotientDigit,         \
-    0x03b20399)                                                                \
-  V(_BigIntMontgomeryReduction, _mulMod, Montgomery_mulMod, 0x3b707797)        \
-  V(_Double, >, Double_greaterThan, 0x682a02bc)                                \
-  V(_Double, >=, Double_greaterEqualThan, 0x2961f8ee)                          \
-  V(_Double, <, Double_lessThan, 0xcbff42e5)                                   \
-  V(_Double, <=, Double_lessEqualThan, 0xd2253d90)                             \
-  V(_Double, ==, Double_equal, 0x6a306911)                                     \
-  V(_Double, +, Double_add, 0xf7d8da94)                                        \
-  V(_Double, -, Double_sub, 0xc8dda725)                                        \
-  V(_Double, *, Double_mul, 0x2dac85a2)                                        \
-  V(_Double, /, Double_div, 0x6cf1f09e)                                        \
-  V(_Double, get:hashCode, Double_hashCode, 0x22a75218)                        \
-  V(_Double, get:_identityHashCode, Double_identityHash, 0xf46be6d6)           \
-  V(_Double, get:isNaN, Double_getIsNaN, 0xb177a8f6)                           \
-  V(_Double, get:isInfinite, Double_getIsInfinite, 0xa1e96db5)                 \
-  V(_Double, get:isNegative, Double_getIsNegative, 0xb15ff274)                 \
-  V(_Double, _mulFromInteger, Double_mulFromInteger, 0xe2853768)               \
-  V(_Double, .fromInteger, DoubleFromInteger, 0x89504536)                      \
-  V(_GrowableList, ._withData, GrowableArray_Allocate, 0x5cfd6a7f)             \
-  V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, 0xb961fc8d)                   \
-  V(_RegExp, _ExecuteMatchSticky, RegExp_ExecuteMatchSticky, 0xb22daf53)       \
-  V(Object, ==, ObjectEquals, 0x91ead0d6)                                      \
-  V(Object, get:runtimeType, ObjectRuntimeType, 0x8cdba093)                    \
-  V(Object, _haveSameRuntimeType, ObjectHaveSameRuntimeType, 0xcee5d65a)       \
-  V(_StringBase, get:hashCode, String_getHashCode, 0x22a75237)                 \
-  V(_StringBase, get:_identityHashCode, String_identityHash, 0xf46be6f5)       \
-  V(_StringBase, get:isEmpty, StringBaseIsEmpty, 0xd7218394)                   \
-  V(_StringBase, _substringMatches, StringBaseSubstringMatches, 0x46fc3731)    \
-  V(_StringBase, [], StringBaseCharAt, 0xe67164fe)                             \
-  V(_OneByteString, get:hashCode, OneByteString_getHashCode, 0x22a75237)       \
+    0x14527ed9)                                                                \
+  V(_BigIntMontgomeryReduction, _mulMod, Montgomery_mulMod, 0x08df2795)        \
+  V(_Double, >, Double_greaterThan, 0xe88b6ffc)                                \
+  V(_Double, >=, Double_greaterEqualThan, 0x1fb70bae)                          \
+  V(_Double, <, Double_lessThan, 0xae875025)                                   \
+  V(_Double, <=, Double_lessEqualThan, 0xc87a5050)                             \
+  V(_Double, ==, Double_equal, 0x5299f1d2)                                     \
+  V(_Double, +, Double_add, 0x783a47d4)                                        \
+  V(_Double, -, Double_sub, 0x493f1465)                                        \
+  V(_Double, *, Double_mul, 0xae0df2e2)                                        \
+  V(_Double, /, Double_div, 0xed535dde)                                        \
+  V(_Double, get:hashCode, Double_hashCode, 0xfa2d7816)                        \
+  V(_Double, get:_identityHashCode, Double_identityHash, 0xcbf20cd4)           \
+  V(_Double, get:isNaN, Double_getIsNaN, 0x88fdcef4)                           \
+  V(_Double, get:isInfinite, Double_getIsInfinite, 0x796f93b3)                 \
+  V(_Double, get:isNegative, Double_getIsNegative, 0x88e61872)                 \
+  V(_Double, _mulFromInteger, Double_mulFromInteger, 0xc5afaa28)               \
+  V(_Double, .fromInteger, DoubleFromInteger, 0x9d1ad7f6)                      \
+  V(_GrowableList, ._withData, GrowableArray_Allocate, 0x00be5928)             \
+  V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, 0x6817556e)                   \
+  V(_RegExp, _ExecuteMatchSticky, RegExp_ExecuteMatchSticky, 0x60e30834)       \
+  V(Object, ==, ObjectEquals, 0xbc3cad49)                                      \
+  V(Object, get:runtimeType, ObjectRuntimeType, 0x6461c691)                    \
+  V(Object, _haveSameRuntimeType, ObjectHaveSameRuntimeType, 0xa66bfc58)       \
+  V(_StringBase, get:hashCode, String_getHashCode, 0xfa2d7835)                 \
+  V(_StringBase, get:_identityHashCode, String_identityHash, 0xcbf20cf3)       \
+  V(_StringBase, get:isEmpty, StringBaseIsEmpty, 0xbdfe9c92)                   \
+  V(_StringBase, _substringMatches, StringBaseSubstringMatches, 0xf5c3c873)    \
+  V(_StringBase, [], StringBaseCharAt, 0xfa3bf7be)                             \
+  V(_OneByteString, get:hashCode, OneByteString_getHashCode, 0xfa2d7835)       \
   V(_OneByteString, _substringUncheckedNative,                                 \
-    OneByteString_substringUnchecked,  0x94c41563)                             \
-  V(_OneByteString, ==, OneByteString_equality, 0xe1ea0c11)                    \
-  V(_TwoByteString, ==, TwoByteString_equality, 0xe1ea0c11)                    \
-  V(_Type, get:hashCode, Type_getHashCode, 0x22a75237)                         \
-  V(_Type, ==, Type_equality, 0x91ead098)                                      \
-  V(::, _getHash, Object_getHash, 0xb05aa13f)                                  \
-  V(::, _setHash, Object_setHash, 0xcb404dd2)                                  \
+    OneByteString_substringUnchecked,  0x0d39e4a1)                             \
+  V(_OneByteString, ==, OneByteString_equality, 0x3399ded1)                    \
+  V(_TwoByteString, ==, TwoByteString_equality, 0x3399ded1)                    \
+  V(_Type, get:hashCode, Type_getHashCode, 0xfa2d7835)                         \
+  V(_Type, ==, Type_equality, 0xbc3cad0b)                                      \
+  V(::, _getHash, Object_getHash, 0x87e0c73d)                                  \
+  V(::, _setHash, Object_setHash, 0xcb4f51d2)                                  \
 
 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V)                                     \
   V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger,           \
-    0xc7bd74ae)                                                                \
-  V(_IntegerImplementation, +, Integer_add, 0x49774600)                        \
+    0xdb88076e)                                                                \
+  V(_IntegerImplementation, +, Integer_add, 0x9b2718c0)                        \
   V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger,           \
-    0x8e0de2a2)                                                                \
-  V(_IntegerImplementation, -, Integer_sub, 0x1a853bf1)                        \
+    0xa1d87562)                                                                \
+  V(_IntegerImplementation, -, Integer_sub, 0x6c350eb1)                        \
   V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger,           \
-    0x95751a41)                                                                \
-  V(_IntegerImplementation, *, Integer_mul, 0xefe7fbce)                        \
+    0xa93fad01)                                                                \
+  V(_IntegerImplementation, *, Integer_mul, 0x4197ce8e)                        \
   V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger,     \
-    0xbc75fece)                                                                \
-  V(_IntegerImplementation, ~/, Integer_truncDivide, 0x42d9b723)               \
-  V(_IntegerImplementation, unary-, Integer_negate, 0xdb5f0d70)                \
+    0xd040918e)                                                                \
+  V(_IntegerImplementation, ~/, Integer_truncDivide, 0x79adb402)               \
+  V(_IntegerImplementation, unary-, Integer_negate, 0xf07a7709)                \
   V(_IntegerImplementation, _bitAndFromInteger, Integer_bitAndFromInteger,     \
-    0xb7e724d2)                                                                \
-  V(_IntegerImplementation, &, Integer_bitAnd, 0xd9888ca4)                     \
+    0xcbb1b792)                                                                \
+  V(_IntegerImplementation, &, Integer_bitAnd, 0x2b385f64)                     \
   V(_IntegerImplementation, _bitOrFromInteger, Integer_bitOrFromInteger,       \
-    0xa97501aa)                                                                \
-  V(_IntegerImplementation, |, Integer_bitOr, 0xc82cc85c)                      \
+    0xbd3f946a)                                                                \
+  V(_IntegerImplementation, |, Integer_bitOr, 0x19dc9b1c)                      \
   V(_IntegerImplementation, _bitXorFromInteger, Integer_bitXorFromInteger,     \
-    0x9ab4d16e)                                                                \
-  V(_IntegerImplementation, ^, Integer_bitXor, 0xc1ed9463)                     \
+    0xae7f642e)                                                                \
+  V(_IntegerImplementation, ^, Integer_bitXor, 0x139d6723)                     \
   V(_IntegerImplementation, _greaterThanFromInteger,                           \
-    Integer_greaterThanFromInt, 0x3366ff66)                                    \
-  V(_IntegerImplementation, >, Integer_greaterThan, 0xe74b678c)                \
-  V(_IntegerImplementation, ==, Integer_equal, 0xdf47652c)                     \
+    Integer_greaterThanFromInt, 0x47319226)                                    \
+  V(_IntegerImplementation, >, Integer_greaterThan, 0xc9d374cc)                \
+  V(_IntegerImplementation, ==, Integer_equal, 0xca4e7087)                     \
   V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger,           \
-    0x39d3cd05)                                                                \
-  V(_IntegerImplementation, <, Integer_lessThan, 0xcbff42e5)                   \
-  V(_IntegerImplementation, <=, Integer_lessEqualThan, 0xd2253d90)             \
-  V(_IntegerImplementation, >=, Integer_greaterEqualThan, 0x2961f8ee)          \
-  V(_IntegerImplementation, <<, Integer_shl, 0x972a7fd6)                       \
-  V(_IntegerImplementation, >>, Integer_sar, 0xfe022e7b)                       \
-  V(_Double, toInt, DoubleToInteger, 0x14433ded)                               \
+    0x4d9e5fc5)                                                                \
+  V(_IntegerImplementation, <, Integer_lessThan, 0xae875025)                   \
+  V(_IntegerImplementation, <=, Integer_lessEqualThan, 0xc87a5050)             \
+  V(_IntegerImplementation, >=, Integer_greaterEqualThan, 0x1fb70bae)          \
+  V(_IntegerImplementation, <<, Integer_shl, 0xe8da5296)                       \
+  V(_IntegerImplementation, >>, Integer_sar, 0x4fb2013b)                       \
+  V(_Double, toInt, DoubleToInteger, 0xebc963eb)                               \
 
 #define MATH_LIB_INTRINSIC_LIST(V)                                             \
-  V(::, sqrt, MathSqrt, 0x2c20a879)                                            \
-  V(_Random, _nextState, Random_nextState, 0x30682e3d)                         \
+  V(::, sqrt, MathSqrt, 0x98d7cb39)                                            \
+  V(_Random, _nextState, Random_nextState, 0x3077323d)                         \
 
 #define GRAPH_MATH_LIB_INTRINSIC_LIST(V)                                       \
-  V(::, sin, MathSin, 0x18e743c0)                                              \
-  V(::, cos, MathCos, 0x6623c0ce)                                              \
-  V(::, tan, MathTan, 0x3584ee62)                                              \
-  V(::, asin, MathAsin, 0xb023f0df)                                            \
-  V(::, acos, MathAcos, 0x165661fa)                                            \
-  V(::, atan, MathAtan, 0xc91eca17)                                            \
-  V(::, atan2, MathAtan2, 0x79b3a5e6)                                          \
+  V(::, sin, MathSin, 0x859e6680)                                              \
+  V(::, cos, MathCos, 0xd2dae38e)                                              \
+  V(::, tan, MathTan, 0xa23c1122)                                              \
+  V(::, asin, MathAsin, 0x1cdb139f)                                            \
+  V(::, acos, MathAcos, 0x830d84ba)                                            \
+  V(::, atan, MathAtan, 0x35d5ecd7)                                            \
+  V(::, atan2, MathAtan2, 0xb4e03ae8)                                          \
 
 #define TYPED_DATA_LIB_INTRINSIC_LIST(V)                                       \
-  V(Int8List, ., TypedData_Int8Array_factory, 0x6ce2f102)                      \
-  V(Uint8List, ., TypedData_Uint8Array_factory, 0x1163d489)                    \
-  V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 0x0b0e9f0f)      \
-  V(Int16List, ., TypedData_Int16Array_factory, 0x6addd02d)                    \
-  V(Uint16List, ., TypedData_Uint16Array_factory, 0x139a6464)                  \
-  V(Int32List, ., TypedData_Int32Array_factory, 0x40dad19a)                    \
-  V(Uint32List, ., TypedData_Uint32Array_factory, 0x988357c5)                  \
-  V(Int64List, ., TypedData_Int64Array_factory, 0xef0a3469)                    \
-  V(Uint64List, ., TypedData_Uint64Array_factory, 0xf49c0472)                  \
-  V(Float32List, ., TypedData_Float32Array_factory, 0x779b26f8)                \
-  V(Float64List, ., TypedData_Float64Array_factory, 0xf623554b)                \
-  V(Float32x4List, ., TypedData_Float32x4Array_factory, 0x9edf5402)            \
-  V(Int32x4List, ., TypedData_Int32x4Array_factory, 0x915e8e68)                \
-  V(Float64x2List, ., TypedData_Float64x2Array_factory, 0x0d206864)            \
+  V(Int8List, ., TypedData_Int8Array_factory, 0x80ad83c2)                      \
+  V(Uint8List, ., TypedData_Uint8Array_factory, 0x252e6749)                    \
+  V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 0x1ed931cf)      \
+  V(Int16List, ., TypedData_Int16Array_factory, 0x7ea862ed)                    \
+  V(Uint16List, ., TypedData_Uint16Array_factory, 0x2764f724)                  \
+  V(Int32List, ., TypedData_Int32Array_factory, 0x54a5645a)                    \
+  V(Uint32List, ., TypedData_Uint32Array_factory, 0xac4dea85)                  \
+  V(Int64List, ., TypedData_Int64Array_factory, 0x02d4c729)                    \
+  V(Uint64List, ., TypedData_Uint64Array_factory, 0x08669732)                  \
+  V(Float32List, ., TypedData_Float32Array_factory, 0x8b65b9b8)                \
+  V(Float64List, ., TypedData_Float64Array_factory, 0x09ede80b)                \
+  V(Float32x4List, ., TypedData_Float32x4Array_factory, 0xb2a9e6c2)            \
+  V(Int32x4List, ., TypedData_Int32x4Array_factory, 0xa5292128)                \
+  V(Float64x2List, ., TypedData_Float64x2Array_factory, 0x20eafb24)            \
 
 #define GRAPH_TYPED_DATA_INTRINSICS_LIST(V)                                    \
-  V(_Int8List, [], Int8ArrayGetIndexed, 0xdab47d5d)                            \
-  V(_Int8List, []=, Int8ArraySetIndexed, 0x09ba0f32)                           \
-  V(_Uint8List, [], Uint8ArrayGetIndexed, 0xa9468b1d)                          \
-  V(_Uint8List, []=, Uint8ArraySetIndexed, 0xa6fd9dce)                         \
-  V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 0xa9468b1d)         \
-  V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 0xa6fd9dce)        \
-  V(_Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 0xa9468b1d)            \
-  V(_Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 0x7d60b42e)           \
+  V(_Int8List, [], Int8ArrayGetIndexed, 0xd61e79bd)                            \
+  V(_Int8List, []=, Int8ArraySetIndexed, 0x6e0b2e72)                           \
+  V(_Uint8List, [], Uint8ArrayGetIndexed, 0xe1a67dfd)                          \
+  V(_Uint8List, []=, Uint8ArraySetIndexed, 0x89499a2e)                         \
+  V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 0xe1a67dfd)         \
+  V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 0x89499a2e)        \
+  V(_Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, 0xe1a67dfd)            \
+  V(_Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, 0x5facb08e)           \
   V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed,       \
-    0xa9468b1d)                                                                \
+    0xe1a67dfd)                                                                \
   V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed,      \
-    0x7d60b42e)                                                                \
-  V(_Int16List, [], Int16ArrayGetIndexed, 0x2b783e9d)                          \
-  V(_Int16List, []=, Int16ArraySetIndexed, 0x894edd67)                         \
-  V(_Uint16List, [], Uint16ArrayGetIndexed, 0x3d599bdd)                        \
-  V(_Uint16List, []=, Uint16ArraySetIndexed, 0x146065d0)                       \
-  V(_Int32List, [], Int32ArrayGetIndexed, 0x645ac57e)                          \
-  V(_Int32List, []=, Int32ArraySetIndexed, 0x58343408)                         \
-  V(_Uint32List, [], Uint32ArrayGetIndexed, 0xe6f6183e)                        \
-  V(_Uint32List, []=, Uint32ArraySetIndexed, 0x7ee99568)                       \
-  V(_Int64List, [], Int64ArrayGetIndexed, 0x57d917de)                          \
-  V(_Int64List, []=, Int64ArraySetIndexed, 0x94485c32)                         \
-  V(_Uint64List, [], Uint64ArrayGetIndexed, 0x7fb017de)                        \
-  V(_Uint64List, []=, Uint64ArraySetIndexed, 0x1c695796)                       \
-  V(_Float64List, [], Float64ArrayGetIndexed, 0x9e20a2c3)                      \
-  V(_Float64List, []=, Float64ArraySetIndexed, 0xcd01ec0c)                     \
-  V(_Float32List, [], Float32ArrayGetIndexed, 0x7c01bb83)                      \
-  V(_Float32List, []=, Float32ArraySetIndexed, 0xcb87f800)                     \
-  V(_Float32x4List, [], Float32x4ArrayGetIndexed, 0x5a2a83fc)                  \
-  V(_Float32x4List, []=, Float32x4ArraySetIndexed, 0x5ae5c9f3)                 \
-  V(_Int32x4List, [], Int32x4ArrayGetIndexed, 0x05ef16d4)                      \
-  V(_Int32x4List, []=, Int32x4ArraySetIndexed, 0x2e8437b1)                     \
-  V(_Float64x2List, [], Float64x2ArrayGetIndexed, 0xe7fbf246)                  \
-  V(_Float64x2List, []=, Float64x2ArraySetIndexed, 0xce826d19)                 \
-  V(_TypedList, get:length, TypedListLength, 0x05176aac)                       \
-  V(_TypedListView, get:length, TypedListViewLength, 0x05176aac)               \
-  V(_ByteDataView, get:length, ByteDataViewLength, 0x05176aac)                 \
-  V(_Float32x4, get:x, Float32x4ShuffleX, 0x00b83193)                          \
-  V(_Float32x4, get:y, Float32x4ShuffleY, 0xee498cb6)                          \
-  V(_Float32x4, get:z, Float32x4ShuffleZ, 0x2414f84c)                          \
-  V(_Float32x4, get:w, Float32x4ShuffleW, 0x06553cce)                          \
-  V(_Float32x4, *, Float32x4Mul, 0xf817cb64)                                   \
-  V(_Float32x4, /, Float32x4Div, 0xd36681e1)                                   \
-  V(_Float32x4, -, Float32x4Sub, 0xeff9bb27)                                   \
-  V(_Float32x4, +, Float32x4Add, 0xcac0f0b6)                                   \
-  V(_Float64x2, *, Float64x2Mul, 0x589c7905)                                   \
-  V(_Float64x2, /, Float64x2Div, 0x33eb2fa1)                                   \
-  V(_Float64x2, -, Float64x2Sub, 0x507e68c8)                                   \
-  V(_Float64x2, +, Float64x2Add, 0x2b459e57)                                   \
+    0x5facb08e)                                                                \
+  V(_Int16List, [], Int16ArrayGetIndexed, 0x1726ae5d)                          \
+  V(_Int16List, []=, Int16ArraySetIndexed, 0xde0f4d87)                         \
+  V(_Uint16List, [], Uint16ArrayGetIndexed, 0x26c2525d)                        \
+  V(_Uint16List, []=, Uint16ArraySetIndexed, 0x69ae5b30)                       \
+  V(_Int32List, [], Int32ArrayGetIndexed, 0x407e58de)                          \
+  V(_Int32List, []=, Int32ArraySetIndexed, 0x61194108)                         \
+  V(_Uint32List, [], Uint32ArrayGetIndexed, 0xf078bf3e)                        \
+  V(_Uint32List, []=, Uint32ArraySetIndexed, 0x70f53c88)                       \
+  V(_Int64List, [], Int64ArrayGetIndexed, 0x7c21b69e)                          \
+  V(_Int64List, []=, Int64ArraySetIndexed, 0xcaa7c6ca)                         \
+  V(_Uint64List, [], Uint64ArrayGetIndexed, 0x0a7aa11e)                        \
+  V(_Uint64List, []=, Uint64ArraySetIndexed, 0xd1374e92)                       \
+  V(_Float64List, [], Float64ArrayGetIndexed, 0x9e4b2403)                      \
+  V(_Float64List, []=, Float64ArraySetIndexed, 0x0a43d538)                     \
+  V(_Float32List, [], Float32ArrayGetIndexed, 0xbdf87ee3)                      \
+  V(_Float32List, []=, Float32ArraySetIndexed, 0x2e3e1a4a)                     \
+  V(_Float32x4List, [], Float32x4ArrayGetIndexed, 0xa90520bc)                  \
+  V(_Float32x4List, []=, Float32x4ArraySetIndexed, 0xb9c7400f)                 \
+  V(_Int32x4List, [], Int32x4ArrayGetIndexed, 0xfbcc0e74)                      \
+  V(_Int32x4List, []=, Int32x4ArraySetIndexed, 0x79152aaf)                     \
+  V(_Float64x2List, [], Float64x2ArrayGetIndexed, 0xd90a31e6)                  \
+  V(_Float64x2List, []=, Float64x2ArraySetIndexed, 0x4fd191fb)                 \
+  V(_TypedList, get:length, TypedListLength, 0xdc9d90aa)                       \
+  V(_TypedListView, get:length, TypedListViewLength, 0xdc9d90aa)               \
+  V(_ByteDataView, get:length, ByteDataViewLength, 0xdc9d90aa)                 \
+  V(_Float32x4, get:x, Float32x4ShuffleX, 0xd83e5791)                          \
+  V(_Float32x4, get:y, Float32x4ShuffleY, 0xc5cfb2b4)                          \
+  V(_Float32x4, get:z, Float32x4ShuffleZ, 0xfb9b1e4a)                          \
+  V(_Float32x4, get:w, Float32x4ShuffleW, 0xdddb62cc)                          \
+  V(_Float32x4, *, Float32x4Mul, 0x0be25e24)                                   \
+  V(_Float32x4, /, Float32x4Div, 0xe73114a1)                                   \
+  V(_Float32x4, -, Float32x4Sub, 0x03c44de7)                                   \
+  V(_Float32x4, +, Float32x4Add, 0xde8b8376)                                   \
+  V(_Float64x2, *, Float64x2Mul, 0x6c670bc5)                                   \
+  V(_Float64x2, /, Float64x2Div, 0x47b5c261)                                   \
+  V(_Float64x2, -, Float64x2Sub, 0x6448fb88)                                   \
+  V(_Float64x2, +, Float64x2Add, 0x3f103117)                                   \
 
 #define GRAPH_CORE_INTRINSICS_LIST(V)                                          \
-  V(_List, get:length, ObjectArrayLength, 0x05176aac)                          \
-  V(_List, [], ObjectArrayGetIndexed, 0x7e13418e)                              \
-  V(_List, _setIndexed, ObjectArraySetIndexedUnchecked, 0x91b2c203)            \
-  V(_ImmutableList, get:length, ImmutableArrayLength, 0x05176aac)              \
-  V(_ImmutableList, [], ImmutableArrayGetIndexed, 0x7e13418e)                  \
-  V(_GrowableList, get:length, GrowableArrayLength, 0x05176aac)                \
-  V(_GrowableList, get:_capacity, GrowableArrayCapacity, 0x2a661633)           \
-  V(_GrowableList, _setData, GrowableArraySetData, 0x9e2350fe)                 \
-  V(_GrowableList, _setLength, GrowableArraySetLength, 0x8d94d91d)             \
-  V(_GrowableList, [], GrowableArrayGetIndexed, 0x7e13418e)                    \
-  V(_GrowableList, _setIndexed, GrowableArraySetIndexedUnchecked, 0x91b2c203)  \
-  V(_StringBase, get:length, StringBaseLength, 0x05176aac)                     \
-  V(_OneByteString, codeUnitAt, OneByteStringCodeUnitAt, 0xb0959953)           \
-  V(_TwoByteString, codeUnitAt, TwoByteStringCodeUnitAt, 0xb0959953)           \
+  V(_List, get:length, ObjectArrayLength, 0xdc9d90aa)                          \
+  V(_List, [], ObjectArrayGetIndexed, 0xd159dece)                              \
+  V(_List, _setIndexed, ObjectArraySetIndexedUnchecked, 0xf5780f43)            \
+  V(_ImmutableList, get:length, ImmutableArrayLength, 0xdc9d90aa)              \
+  V(_ImmutableList, [], ImmutableArrayGetIndexed, 0xd159dece)                  \
+  V(_GrowableList, get:length, GrowableArrayLength, 0xdc9d90aa)                \
+  V(_GrowableList, get:_capacity, GrowableArrayCapacity, 0x01ec3c31)           \
+  V(_GrowableList, _setData, GrowableArraySetData, 0x8ecf0a40)                 \
+  V(_GrowableList, _setLength, GrowableArraySetLength, 0x63da779b)             \
+  V(_GrowableList, [], GrowableArrayGetIndexed, 0xd159dece)                    \
+  V(_GrowableList, _setIndexed, GrowableArraySetIndexedUnchecked, 0x012e9e24)  \
+  V(_StringBase, get:length, StringBaseLength, 0xdc9d90aa)                     \
+  V(_OneByteString, codeUnitAt, OneByteStringCodeUnitAt, 0xc4602c13)           \
+  V(_TwoByteString, codeUnitAt, TwoByteStringCodeUnitAt, 0xc4602c13)           \
   V(_ExternalOneByteString, codeUnitAt, ExternalOneByteStringCodeUnitAt,       \
-    0xb0959953)                                                                \
+    0xc4602c13)                                                                \
   V(_ExternalTwoByteString, codeUnitAt, ExternalTwoByteStringCodeUnitAt,       \
-    0xb0959953)                                                                \
-  V(_Double, unary-, DoubleFlipSignBit, 0x039c6e4a)                            \
-  V(_Double, truncateToDouble, DoubleTruncate, 0x2960d21d)                     \
-  V(_Double, roundToDouble, DoubleRound, 0x1cd615c4)                           \
-  V(_Double, floorToDouble, DoubleFloor, 0x1b41170c)                           \
-  V(_Double, ceilToDouble, DoubleCeil, 0x25a81a9d)                             \
-  V(_Double, _modulo, DoubleMod, 0x42a93471)
+    0xc4602c13)                                                                \
+  V(_Double, unary-, DoubleFlipSignBit, 0xdb229448)                            \
+  V(_Double, truncateToDouble, DoubleTruncate, 0x00e6f81b)                     \
+  V(_Double, roundToDouble, DoubleRound, 0xf45c3bc2)                           \
+  V(_Double, floorToDouble, DoubleFloor, 0xf2c73d0a)                           \
+  V(_Double, ceilToDouble, DoubleCeil, 0xfd2e409b)                             \
+  V(_Double, _modulo, DoubleMod, 0x5673c731)
 
 #define GRAPH_INTRINSICS_LIST(V)                                               \
   GRAPH_CORE_INTRINSICS_LIST(V)                                                \
@@ -378,20 +380,20 @@
   GRAPH_MATH_LIB_INTRINSIC_LIST(V)                                             \
 
 #define DEVELOPER_LIB_INTRINSIC_LIST(V)                                        \
-  V(_UserTag, makeCurrent, UserTag_makeCurrent, 0x472d1eb5)                    \
-  V(::, _getDefaultTag, UserTag_defaultTag, 0x5c124271)                        \
-  V(::, _getCurrentTag, Profiler_getCurrentTag, 0x5d6d8a14)                    \
-  V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, 0xcf6f3099)        \
+  V(_UserTag, makeCurrent, UserTag_makeCurrent, 0x1eb344b3)                    \
+  V(::, _getDefaultTag, UserTag_defaultTag, 0x2ef2e42c)                        \
+  V(::, _getCurrentTag, Profiler_getCurrentTag, 0x33c3ec15)                    \
+  V(::, _isDartStreamEnabled, Timeline_isDartStreamEnabled, 0x7dfcaa18)        \
 
 #define ASYNC_LIB_INTRINSIC_LIST(V)                                            \
-  V(::, _clearAsyncThreadStackTrace, ClearAsyncThreadStackTrace, 0x341efd8e)   \
-  V(::, _setAsyncThreadStackTrace, SetAsyncThreadStackTrace, 0x5f29f453)       \
+  V(::, _clearAsyncThreadStackTrace, ClearAsyncThreadStackTrace, 0x20fecac6)   \
+  V(::, _setAsyncThreadStackTrace, SetAsyncThreadStackTrace, 0x39346953)       \
 
 #define INTERNAL_LIB_INTRINSIC_LIST(V)                                         \
-  V(::, allocateOneByteString, AllocateOneByteString, 0x3e7f209a)              \
-  V(::, allocateTwoByteString, AllocateTwoByteString, 0x46445c37)              \
-  V(::, writeIntoOneByteString, WriteIntoOneByteString, 0x63d30528)            \
-  V(::, writeIntoTwoByteString, WriteIntoTwoByteString, 0x5b280bf1)            \
+  V(::, allocateOneByteString, AllocateOneByteString, 0xc86bebfa)              \
+  V(::, allocateTwoByteString, AllocateTwoByteString, 0xd0312797)              \
+  V(::, writeIntoOneByteString, WriteIntoOneByteString, 0xe0d28307)            \
+  V(::, writeIntoTwoByteString, WriteIntoTwoByteString, 0xd82789d0)            \
 
 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V)                                  \
   ASYNC_LIB_INTRINSIC_LIST(V)                                                  \
@@ -412,61 +414,64 @@
 
 // A list of core functions that internally dispatch based on received id.
 #define POLYMORPHIC_TARGET_LIST(V)                                             \
-  V(_StringBase, [], StringBaseCharAt, 0xe67164fe)                             \
-  V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0xa24c2704)                    \
-  V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0xa491df3e)                  \
-  V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0xb65ae1fc)                  \
-  V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0xb4b776e5)                \
-  V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0xb460abe4)                  \
-  V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0x8c066c71)                \
-  V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0xacf2f222)                  \
-  V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0xa74b200b)                \
-  V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xa33a9f77)              \
-  V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0x87d86b60)              \
-  V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0x3e76086e)          \
-  V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0xfea5f17f)              \
-  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0xd2c4e74b)                    \
-  V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 0xec62b082)                   \
-  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0xc3566903)                  \
-  V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 0xdb50780f)                 \
-  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0xbeeeea8a)                  \
-  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0xca02f10a)                \
-  V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0xcf587ccf)                  \
-  V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0xe01a1df0)                \
-  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0xb6a6294f)              \
-  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0xce7dad17)              \
-  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x4b773b59)          \
-  V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xfa2a6f88)              \
-  V(Object, get:runtimeType, ObjectRuntimeType, 0x8cdba093)
+  V(_StringBase, [], StringBaseCharAt, 0xfa3bf7be)                             \
+  V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 0xc28aff37)                    \
+  V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 0xc3e7212d)                  \
+  V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 0xdaa7b952)                  \
+  V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 0xdc2919bc)                \
+  V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 0xc57f53af)                  \
+  V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 0xc5c49520)                \
+  V(_TypedList, _getInt64, ByteArrayBaseGetInt64, 0xa2c7e6a4)                  \
+  V(_TypedList, _getUint64, ByteArrayBaseGetUint64, 0xd8c29ffe)                \
+  V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 0xaf15f28a)              \
+  V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 0xbe4987b7)              \
+  V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 0x76c82c28)          \
+  V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 0x29abed4e)              \
+  V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0xfc13ad87)                    \
+  V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 0xc9e4212d)                   \
+  V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0xd570aa0c)                  \
+  V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 0xe8acb234)                 \
+  V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0xd8651525)                  \
+  V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0xd3f10d97)                \
+  V(_TypedList, _setInt64, ByteArrayBaseSetInt64, 0xe357b95f)                  \
+  V(_TypedList, _setUint64, ByteArrayBaseSetUint64, 0xf4d19bea)                \
+  V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0xd6272645)              \
+  V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0xca4af137)              \
+  V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x71767f7f)          \
+  V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0xf0483280)              \
+  V(Object, get:runtimeType, ObjectRuntimeType, 0x6461c691)
 
 // List of recognized list factories:
 // (factory-name-symbol, class-name-string, constructor-name-string,
 //  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(_ListFactory, _List, ., kArrayCid, 0x6de199a1)                             \
+  V(_ListFilledFactory, _List, .filled, kArrayCid, 0x871c7eb6)                 \
+  V(_ListGenerateFactory, _List, .generate, kArrayCid, 0x045b9063)             \
   V(_GrowableListFactory, _GrowableList, ., kGrowableObjectArrayCid,           \
-    0x3eed680b)                                                                \
-  V(_Int8ArrayFactory, Int8List, ., kTypedDataInt8ArrayCid, 0x6ce2f102)        \
-  V(_Uint8ArrayFactory, Uint8List, ., kTypedDataUint8ArrayCid, 0x1163d489)     \
+    0xdc1f9e09)                                                                \
+  V(_GrowableListFilledFactory, _GrowableList, .filled,                        \
+    kGrowableObjectArrayCid, 0xbc894d36)                                       \
+  V(_GrowableListGenerateFactory, _GrowableList, .generate,                    \
+    kGrowableObjectArrayCid, 0xf6fbbee3)                                       \
+  V(_GrowableListWithData, _GrowableList, ._withData, kGrowableObjectArrayCid, \
+    0x00be5928)                                                                \
+  V(_Int8ArrayFactory, Int8List, ., kTypedDataInt8ArrayCid, 0x80ad83c2)        \
+  V(_Uint8ArrayFactory, Uint8List, ., kTypedDataUint8ArrayCid, 0x252e6749)     \
   V(_Uint8ClampedArrayFactory, Uint8ClampedList, .,                            \
-    kTypedDataUint8ClampedArrayCid, 0x0b0e9f0f)                                \
-  V(_Int16ArrayFactory, Int16List, ., kTypedDataInt16ArrayCid, 0x6addd02d)     \
-  V(_Uint16ArrayFactory, Uint16List, ., kTypedDataUint16ArrayCid, 0x139a6464)  \
-  V(_Int32ArrayFactory, Int32List, ., kTypedDataInt32ArrayCid, 0x40dad19a)     \
-  V(_Uint32ArrayFactory, Uint32List, ., kTypedDataUint32ArrayCid, 0x988357c5)  \
-  V(_Int64ArrayFactory, Int64List, ., kTypedDataInt64ArrayCid, 0xef0a3469)     \
-  V(_Uint64ArrayFactory, Uint64List, ., kTypedDataUint64ArrayCid, 0xf49c0472)  \
+    kTypedDataUint8ClampedArrayCid, 0x1ed931cf)                                \
+  V(_Int16ArrayFactory, Int16List, ., kTypedDataInt16ArrayCid, 0x7ea862ed)     \
+  V(_Uint16ArrayFactory, Uint16List, ., kTypedDataUint16ArrayCid, 0x2764f724)  \
+  V(_Int32ArrayFactory, Int32List, ., kTypedDataInt32ArrayCid, 0x54a5645a)     \
+  V(_Uint32ArrayFactory, Uint32List, ., kTypedDataUint32ArrayCid, 0xac4dea85)  \
+  V(_Int64ArrayFactory, Int64List, ., kTypedDataInt64ArrayCid, 0x02d4c729)     \
+  V(_Uint64ArrayFactory, Uint64List, ., kTypedDataUint64ArrayCid, 0x08669732)  \
   V(_Float64ArrayFactory, Float64List, ., kTypedDataFloat64ArrayCid,           \
-    0xf623554b)                                                                \
+    0x09ede80b)                                                                \
   V(_Float32ArrayFactory, Float32List, ., kTypedDataFloat32ArrayCid,           \
-    0x779b26f8)                                                                \
+    0x8b65b9b8)                                                                \
   V(_Float32x4ArrayFactory, Float32x4List, ., kTypedDataFloat32x4ArrayCid,     \
-    0x9edf5402)
+    0xb2a9e6c2)
 
 // clang-format on
 
diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc
index 8948126..8a16400 100644
--- a/runtime/vm/compiler/runtime_api.cc
+++ b/runtime/vm/compiler/runtime_api.cc
@@ -508,6 +508,10 @@
   return TranslateOffsetInWords(dart::Context::variable_offset(n));
 }
 
+#define DEFINE_CONSTANT(Class, Name) const word Class::Name = Class##_##Name;
+
+#if defined(TARGET_ARCH_IA32)
+
 #define DEFINE_FIELD(clazz, name)                                              \
   word clazz::name() { return clazz##_##name; }
 
@@ -516,50 +520,120 @@
     return clazz##_elements_start_offset + index * clazz##_element_size;       \
   }
 
-#define DEFINE_ARRAY_STRUCTFIELD(clazz, name, element_offset, field_offset)    \
-  word clazz::name(intptr_t index) {                                           \
-    return element_offset(index) + field_offset;                               \
-  }
-
-#if defined(TARGET_ARCH_IA32)
-
 #define DEFINE_SIZEOF(clazz, name, what)                                       \
   word clazz::name() { return clazz##_##name; }
 
-#else
-
-#define DEFINE_SIZEOF(clazz, name, what)                                       \
-  word clazz::name() {                                                         \
-    return FLAG_precompiled_mode ? AOT_##clazz##_##name : clazz##_##name;      \
-  }
-
-#endif  //  defined(TARGET_ARCH_IA32)
-
 #define DEFINE_RANGE(Class, Getter, Type, First, Last, Filter)                 \
   word Class::Getter(Type index) {                                             \
     return Class##_##Getter[static_cast<intptr_t>(index) -                     \
                             static_cast<intptr_t>(First)];                     \
   }
 
-#define DEFINE_CONSTANT(Class, Name) const word Class::Name = Class##_##Name;
+JIT_OFFSETS_LIST(DEFINE_FIELD,
+                 DEFINE_ARRAY,
+                 DEFINE_SIZEOF,
+                 DEFINE_RANGE,
+                 DEFINE_CONSTANT)
 
-#define PRECOMP_NO_CHECK(Code) Code
+COMMON_OFFSETS_LIST(DEFINE_FIELD,
+                    DEFINE_ARRAY,
+                    DEFINE_SIZEOF,
+                    DEFINE_RANGE,
+                    DEFINE_CONSTANT)
 
-OFFSETS_LIST(DEFINE_FIELD,
-             DEFINE_ARRAY,
-             DEFINE_ARRAY_STRUCTFIELD,
-             DEFINE_SIZEOF,
-             DEFINE_RANGE,
-             DEFINE_CONSTANT,
-             PRECOMP_NO_CHECK)
+#else
+
+#define DEFINE_JIT_FIELD(clazz, name)                                          \
+  word clazz::name() {                                                         \
+    if (FLAG_precompiled_mode) {                                               \
+      FATAL1("Use JIT-only field %s in precompiled mode", #clazz "::" #name);  \
+    }                                                                          \
+    return clazz##_##name;                                                     \
+  }
+
+#define DEFINE_JIT_ARRAY(clazz, name)                                          \
+  word clazz::name(intptr_t index) {                                           \
+    if (FLAG_precompiled_mode) {                                               \
+      FATAL1("Use of JIT-only array %s in precompiled mode",                   \
+             #clazz "::" #name);                                               \
+    }                                                                          \
+    return clazz##_elements_start_offset + index * clazz##_element_size;       \
+  }
+
+#define DEFINE_JIT_SIZEOF(clazz, name, what)                                   \
+  word clazz::name() {                                                         \
+    if (FLAG_precompiled_mode) {                                               \
+      FATAL1("Use of JIT-only sizeof %s in precompiled mode",                  \
+             #clazz "::" #name);                                               \
+    }                                                                          \
+    return clazz##_##name;                                                     \
+  }
+
+#define DEFINE_JIT_RANGE(Class, Getter, Type, First, Last, Filter)             \
+  word Class::Getter(Type index) {                                             \
+    if (FLAG_precompiled_mode) {                                               \
+      FATAL1("Use of JIT-only range %s in precompiled mode",                   \
+             #Class "::" #Getter);                                             \
+    }                                                                          \
+    return Class##_##Getter[static_cast<intptr_t>(index) -                     \
+                            static_cast<intptr_t>(First)];                     \
+  }
+
+JIT_OFFSETS_LIST(DEFINE_JIT_FIELD,
+                 DEFINE_JIT_ARRAY,
+                 DEFINE_JIT_SIZEOF,
+                 DEFINE_JIT_RANGE,
+                 DEFINE_CONSTANT)
+
+#undef DEFINE_JIT_FIELD
+#undef DEFINE_JIT_ARRAY
+#undef DEFINE_JIT_SIZEOF
+#undef DEFINE_JIT_RANGE
+
+#define DEFINE_FIELD(clazz, name)                                              \
+  word clazz::name() {                                                         \
+    return FLAG_precompiled_mode ? AOT_##clazz##_##name : clazz##_##name;      \
+  }
+
+#define DEFINE_ARRAY(clazz, name)                                              \
+  word clazz::name(intptr_t index) {                                           \
+    if (FLAG_precompiled_mode) {                                               \
+      return AOT_##clazz##_elements_start_offset +                             \
+             index * AOT_##clazz##_element_size;                               \
+    } else {                                                                   \
+      return clazz##_elements_start_offset + index * clazz##_element_size;     \
+    }                                                                          \
+  }
+
+#define DEFINE_SIZEOF(clazz, name, what)                                       \
+  word clazz::name() {                                                         \
+    return FLAG_precompiled_mode ? AOT_##clazz##_##name : clazz##_##name;      \
+  }
+
+#define DEFINE_RANGE(Class, Getter, Type, First, Last, Filter)                 \
+  word Class::Getter(Type index) {                                             \
+    if (FLAG_precompiled_mode) {                                               \
+      return AOT_##Class##_##Getter[static_cast<intptr_t>(index) -             \
+                                    static_cast<intptr_t>(First)];             \
+    } else {                                                                   \
+      return Class##_##Getter[static_cast<intptr_t>(index) -                   \
+                              static_cast<intptr_t>(First)];                   \
+    }                                                                          \
+  }
+
+COMMON_OFFSETS_LIST(DEFINE_FIELD,
+                    DEFINE_ARRAY,
+                    DEFINE_SIZEOF,
+                    DEFINE_RANGE,
+                    DEFINE_CONSTANT)
+
+#endif
 
 #undef DEFINE_FIELD
 #undef DEFINE_ARRAY
-#undef DEFINE_ARRAY_STRUCTFIELD
 #undef DEFINE_SIZEOF
 #undef DEFINE_RANGE
 #undef DEFINE_CONSTANT
-#undef PRECOMP_NO_CHECK
 
 const word StoreBufferBlock::kSize = dart::StoreBufferBlock::kSize;
 
@@ -994,6 +1068,10 @@
   return -kWordSize;
 }
 
+word LoadingUnit::NextFieldOffset() {
+  return -kWordSize;
+}
+
 word Context::NextFieldOffset() {
   return -kWordSize;
 }
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index d24e36d..1a028a0 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -1177,6 +1177,12 @@
   static word NextFieldOffset();
 };
 
+class LoadingUnit : public AllStatic {
+ public:
+  static word InstanceSize();
+  static word NextFieldOffset();
+};
+
 class Context : public AllStatic {
  public:
   static word header_size();
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 918643c..d222e0f 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -18,6 +18,10 @@
 #if !defined(PRODUCT)
 
 #if defined(TARGET_ARCH_ARM)
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    76;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 16;
 static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
     8;
 static constexpr dart::compiler::target::word ObjectPool_element_size = 4;
@@ -76,7 +80,7 @@
 static constexpr dart::compiler::target::word Class_declaration_type_offset =
     56;
 static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
-    90;
+    92;
 static constexpr dart::compiler::target::word Class_super_type_offset = 44;
 static constexpr dart::compiler::target::word
     Class_host_type_arguments_field_offset_in_words_offset = 104;
@@ -118,8 +122,6 @@
 static constexpr dart::compiler::target::word Function_code_offset = 44;
 static constexpr dart::compiler::target::word Function_entry_point_offset[] = {
     4, 8};
-static constexpr dart::compiler::target::word Function_usage_counter_offset =
-    76;
 static constexpr dart::compiler::target::word FutureOr_type_arguments_offset =
     4;
 static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
@@ -137,8 +139,6 @@
 static constexpr dart::compiler::target::word ICData_owner_offset = 20;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
 static constexpr dart::compiler::target::word
-    ICData_receivers_static_type_offset = 16;
-static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
     Isolate_cached_class_table_table_offset = 40;
@@ -198,9 +198,9 @@
 static constexpr dart::compiler::target::word
     Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    712;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
     716;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    720;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
@@ -225,7 +225,7 @@
     Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
     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_api_top_scope_offset = 752;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     96;
 static constexpr dart::compiler::target::word
@@ -238,7 +238,7 @@
     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 = 756;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 760;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -256,7 +256,7 @@
 static constexpr dart::compiler::target::word
     Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    732;
+    736;
 static constexpr dart::compiler::target::word
     Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
@@ -276,7 +276,7 @@
 static constexpr dart::compiler::target::word
     Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    720;
+    724;
 static constexpr dart::compiler::target::word
     Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
@@ -284,7 +284,7 @@
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    744;
+    748;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
@@ -323,11 +323,11 @@
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
     Thread_predefined_symbols_address_offset = 344;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 724;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 728;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 728;
+    Thread_saved_shadow_call_stack_offset = 732;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    736;
+    740;
 static constexpr dart::compiler::target::word
     Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
@@ -360,7 +360,7 @@
     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 = 740;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 744;
 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;
@@ -402,7 +402,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        680, 684, 688, 692, 696, -1, 700, -1, 704, 708, -1, -1, -1, -1, -1, -1};
+        684, 688, 692, 696, 700, -1, 704, -1, 708, 712, -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;
@@ -454,7 +454,7 @@
 static constexpr dart::compiler::target::word KernelProgramInfo_InstanceSize =
     64;
 static constexpr dart::compiler::target::word LanguageError_InstanceSize = 28;
-static constexpr dart::compiler::target::word Library_InstanceSize = 80;
+static constexpr dart::compiler::target::word Library_InstanceSize = 84;
 static constexpr dart::compiler::target::word LibraryPrefix_InstanceSize = 20;
 static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 28;
 static constexpr dart::compiler::target::word LocalVarDescriptors_InstanceSize =
@@ -488,6 +488,7 @@
 static constexpr dart::compiler::target::word StackTrace_InstanceSize = 20;
 static constexpr dart::compiler::target::word String_InstanceSize = 12;
 static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize = 8;
+static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 20;
 static constexpr dart::compiler::target::word
     TransferableTypedData_InstanceSize = 4;
 static constexpr dart::compiler::target::word TwoByteString_InstanceSize = 12;
@@ -509,6 +510,10 @@
 #endif  // defined(TARGET_ARCH_ARM)
 
 #if defined(TARGET_ARCH_X64)
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    132;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 32;
 static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
     16;
 static constexpr dart::compiler::target::word ObjectPool_element_size = 8;
@@ -569,7 +574,7 @@
 static constexpr dart::compiler::target::word Class_declaration_type_offset =
     112;
 static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
-    170;
+    172;
 static constexpr dart::compiler::target::word Class_super_type_offset = 88;
 static constexpr dart::compiler::target::word
     Class_host_type_arguments_field_offset_in_words_offset = 184;
@@ -611,8 +616,6 @@
 static constexpr dart::compiler::target::word Function_code_offset = 88;
 static constexpr dart::compiler::target::word Function_entry_point_offset[] = {
     8, 16};
-static constexpr dart::compiler::target::word Function_usage_counter_offset =
-    132;
 static constexpr dart::compiler::target::word FutureOr_type_arguments_offset =
     8;
 static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
@@ -630,8 +633,6 @@
 static constexpr dart::compiler::target::word ICData_owner_offset = 40;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
 static constexpr dart::compiler::target::word
-    ICData_receivers_static_type_offset = 32;
-static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
     Isolate_cached_class_table_table_offset = 80;
@@ -692,9 +693,9 @@
 static constexpr dart::compiler::target::word
     Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1432;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
     1440;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    1448;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
@@ -720,7 +721,7 @@
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1504;
+    1512;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     192;
 static constexpr dart::compiler::target::word
@@ -733,7 +734,7 @@
     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 = 1520;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1528;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -751,7 +752,7 @@
 static constexpr dart::compiler::target::word
     Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1472;
+    1480;
 static constexpr dart::compiler::target::word
     Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
@@ -771,7 +772,7 @@
 static constexpr dart::compiler::target::word
     Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1448;
+    1456;
 static constexpr dart::compiler::target::word
     Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
@@ -779,7 +780,7 @@
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1496;
+    1504;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     136;
@@ -818,11 +819,11 @@
 static constexpr dart::compiler::target::word Thread_object_null_offset = 208;
 static constexpr dart::compiler::target::word
     Thread_predefined_symbols_address_offset = 672;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1456;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1464;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1464;
+    Thread_saved_shadow_call_stack_offset = 1472;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1480;
+    1488;
 static constexpr dart::compiler::target::word
     Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
@@ -856,7 +857,7 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     80;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1488;
+    1496;
 static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
     16;
 static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -899,8 +900,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1344, 1352, 1360, 1368, -1,   -1,   1376, 1384,
-        1392, 1400, 1408, -1,   1416, 1424, -1,   -1};
+        1352, 1360, 1368, 1376, -1,   -1,   1384, 1392,
+        1400, 1408, 1416, -1,   1424, 1432, -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;
@@ -952,7 +953,7 @@
 static constexpr dart::compiler::target::word KernelProgramInfo_InstanceSize =
     128;
 static constexpr dart::compiler::target::word LanguageError_InstanceSize = 48;
-static constexpr dart::compiler::target::word Library_InstanceSize = 152;
+static constexpr dart::compiler::target::word Library_InstanceSize = 160;
 static constexpr dart::compiler::target::word LibraryPrefix_InstanceSize = 40;
 static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 56;
 static constexpr dart::compiler::target::word LocalVarDescriptors_InstanceSize =
@@ -987,6 +988,7 @@
 static constexpr dart::compiler::target::word String_InstanceSize = 16;
 static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize =
     16;
+static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 32;
 static constexpr dart::compiler::target::word
     TransferableTypedData_InstanceSize = 8;
 static constexpr dart::compiler::target::word TwoByteString_InstanceSize = 16;
@@ -1008,6 +1010,10 @@
 #endif  // defined(TARGET_ARCH_X64)
 
 #if defined(TARGET_ARCH_IA32)
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    76;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 16;
 static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
     8;
 static constexpr dart::compiler::target::word ObjectPool_element_size = 4;
@@ -1066,7 +1072,7 @@
 static constexpr dart::compiler::target::word Class_declaration_type_offset =
     56;
 static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
-    90;
+    92;
 static constexpr dart::compiler::target::word Class_super_type_offset = 44;
 static constexpr dart::compiler::target::word
     Class_host_type_arguments_field_offset_in_words_offset = 104;
@@ -1108,8 +1114,6 @@
 static constexpr dart::compiler::target::word Function_code_offset = 44;
 static constexpr dart::compiler::target::word Function_entry_point_offset[] = {
     4, 8};
-static constexpr dart::compiler::target::word Function_usage_counter_offset =
-    76;
 static constexpr dart::compiler::target::word FutureOr_type_arguments_offset =
     4;
 static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
@@ -1127,8 +1131,6 @@
 static constexpr dart::compiler::target::word ICData_owner_offset = 20;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
 static constexpr dart::compiler::target::word
-    ICData_receivers_static_type_offset = 16;
-static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
     Isolate_cached_class_table_table_offset = 40;
@@ -1188,9 +1190,9 @@
 static constexpr dart::compiler::target::word
     Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    680;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
     684;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    688;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
@@ -1215,7 +1217,7 @@
     Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
     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_api_top_scope_offset = 720;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     96;
 static constexpr dart::compiler::target::word
@@ -1228,7 +1230,7 @@
     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 = 724;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 728;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -1246,7 +1248,7 @@
 static constexpr dart::compiler::target::word
     Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    700;
+    704;
 static constexpr dart::compiler::target::word
     Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
@@ -1266,7 +1268,7 @@
 static constexpr dart::compiler::target::word
     Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    688;
+    692;
 static constexpr dart::compiler::target::word
     Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
@@ -1274,7 +1276,7 @@
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    712;
+    716;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
@@ -1313,11 +1315,11 @@
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
     Thread_predefined_symbols_address_offset = 344;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 692;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 696;
+    Thread_saved_shadow_call_stack_offset = 700;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    704;
+    708;
 static constexpr dart::compiler::target::word
     Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
@@ -1350,7 +1352,7 @@
     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 = 708;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 712;
 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;
@@ -1441,7 +1443,7 @@
 static constexpr dart::compiler::target::word KernelProgramInfo_InstanceSize =
     64;
 static constexpr dart::compiler::target::word LanguageError_InstanceSize = 28;
-static constexpr dart::compiler::target::word Library_InstanceSize = 80;
+static constexpr dart::compiler::target::word Library_InstanceSize = 84;
 static constexpr dart::compiler::target::word LibraryPrefix_InstanceSize = 20;
 static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 28;
 static constexpr dart::compiler::target::word LocalVarDescriptors_InstanceSize =
@@ -1475,6 +1477,7 @@
 static constexpr dart::compiler::target::word StackTrace_InstanceSize = 20;
 static constexpr dart::compiler::target::word String_InstanceSize = 12;
 static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize = 8;
+static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 20;
 static constexpr dart::compiler::target::word
     TransferableTypedData_InstanceSize = 4;
 static constexpr dart::compiler::target::word TwoByteString_InstanceSize = 12;
@@ -1496,6 +1499,10 @@
 #endif  // defined(TARGET_ARCH_IA32)
 
 #if defined(TARGET_ARCH_ARM64)
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    132;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 32;
 static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
     16;
 static constexpr dart::compiler::target::word ObjectPool_element_size = 8;
@@ -1556,7 +1563,7 @@
 static constexpr dart::compiler::target::word Class_declaration_type_offset =
     112;
 static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
-    170;
+    172;
 static constexpr dart::compiler::target::word Class_super_type_offset = 88;
 static constexpr dart::compiler::target::word
     Class_host_type_arguments_field_offset_in_words_offset = 184;
@@ -1598,8 +1605,6 @@
 static constexpr dart::compiler::target::word Function_code_offset = 88;
 static constexpr dart::compiler::target::word Function_entry_point_offset[] = {
     8, 16};
-static constexpr dart::compiler::target::word Function_usage_counter_offset =
-    132;
 static constexpr dart::compiler::target::word FutureOr_type_arguments_offset =
     8;
 static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
@@ -1617,8 +1622,6 @@
 static constexpr dart::compiler::target::word ICData_owner_offset = 40;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
 static constexpr dart::compiler::target::word
-    ICData_receivers_static_type_offset = 32;
-static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
     Isolate_cached_class_table_table_offset = 80;
@@ -1679,9 +1682,9 @@
 static constexpr dart::compiler::target::word
     Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1504;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
     1512;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    1520;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
@@ -1707,7 +1710,7 @@
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1576;
+    1584;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     192;
 static constexpr dart::compiler::target::word
@@ -1720,7 +1723,7 @@
     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 = 1592;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1600;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -1738,7 +1741,7 @@
 static constexpr dart::compiler::target::word
     Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1544;
+    1552;
 static constexpr dart::compiler::target::word
     Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
@@ -1758,7 +1761,7 @@
 static constexpr dart::compiler::target::word
     Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1520;
+    1528;
 static constexpr dart::compiler::target::word
     Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
@@ -1766,7 +1769,7 @@
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1568;
+    1576;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     136;
@@ -1805,11 +1808,11 @@
 static constexpr dart::compiler::target::word Thread_object_null_offset = 208;
 static constexpr dart::compiler::target::word
     Thread_predefined_symbols_address_offset = 672;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1528;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1536;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1536;
+    Thread_saved_shadow_call_stack_offset = 1544;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1552;
+    1560;
 static constexpr dart::compiler::target::word
     Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
@@ -1843,7 +1846,7 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     80;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1560;
+    1568;
 static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
     16;
 static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -1886,9 +1889,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        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};
+        1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432,
+        1440, 1448, 1456, 1464, -1,   -1,   -1,   -1,   1472, 1480, -1,
+        -1,   1488, 1496, 1504, -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;
@@ -1940,7 +1943,7 @@
 static constexpr dart::compiler::target::word KernelProgramInfo_InstanceSize =
     128;
 static constexpr dart::compiler::target::word LanguageError_InstanceSize = 48;
-static constexpr dart::compiler::target::word Library_InstanceSize = 152;
+static constexpr dart::compiler::target::word Library_InstanceSize = 160;
 static constexpr dart::compiler::target::word LibraryPrefix_InstanceSize = 40;
 static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 56;
 static constexpr dart::compiler::target::word LocalVarDescriptors_InstanceSize =
@@ -1975,6 +1978,7 @@
 static constexpr dart::compiler::target::word String_InstanceSize = 16;
 static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize =
     16;
+static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 32;
 static constexpr dart::compiler::target::word
     TransferableTypedData_InstanceSize = 8;
 static constexpr dart::compiler::target::word TwoByteString_InstanceSize = 16;
@@ -1998,6 +2002,10 @@
 #else  // !defined(PRODUCT)
 
 #if defined(TARGET_ARCH_ARM)
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    76;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 16;
 static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
     8;
 static constexpr dart::compiler::target::word ObjectPool_element_size = 4;
@@ -2056,7 +2064,7 @@
 static constexpr dart::compiler::target::word Class_declaration_type_offset =
     56;
 static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
-    90;
+    92;
 static constexpr dart::compiler::target::word Class_super_type_offset = 44;
 static constexpr dart::compiler::target::word
     Class_host_type_arguments_field_offset_in_words_offset = 104;
@@ -2096,8 +2104,6 @@
 static constexpr dart::compiler::target::word Function_code_offset = 44;
 static constexpr dart::compiler::target::word Function_entry_point_offset[] = {
     4, 8};
-static constexpr dart::compiler::target::word Function_usage_counter_offset =
-    76;
 static constexpr dart::compiler::target::word FutureOr_type_arguments_offset =
     4;
 static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
@@ -2115,8 +2121,6 @@
 static constexpr dart::compiler::target::word ICData_owner_offset = 20;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
 static constexpr dart::compiler::target::word
-    ICData_receivers_static_type_offset = 16;
-static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
     Isolate_cached_class_table_table_offset = 40;
@@ -2175,9 +2179,9 @@
 static constexpr dart::compiler::target::word
     Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    712;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
     716;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    720;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
@@ -2202,7 +2206,7 @@
     Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
     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_api_top_scope_offset = 752;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     96;
 static constexpr dart::compiler::target::word
@@ -2215,7 +2219,7 @@
     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 = 756;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 760;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -2233,7 +2237,7 @@
 static constexpr dart::compiler::target::word
     Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    732;
+    736;
 static constexpr dart::compiler::target::word
     Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
@@ -2253,7 +2257,7 @@
 static constexpr dart::compiler::target::word
     Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    720;
+    724;
 static constexpr dart::compiler::target::word
     Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
@@ -2261,7 +2265,7 @@
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    744;
+    748;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
@@ -2300,11 +2304,11 @@
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
     Thread_predefined_symbols_address_offset = 344;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 724;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 728;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 728;
+    Thread_saved_shadow_call_stack_offset = 732;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    736;
+    740;
 static constexpr dart::compiler::target::word
     Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
@@ -2337,7 +2341,7 @@
     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 = 740;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 744;
 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;
@@ -2376,7 +2380,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        680, 684, 688, 692, 696, -1, 700, -1, 704, 708, -1, -1, -1, -1, -1, -1};
+        684, 688, 692, 696, 700, -1, 704, -1, 708, 712, -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;
@@ -2428,7 +2432,7 @@
 static constexpr dart::compiler::target::word KernelProgramInfo_InstanceSize =
     64;
 static constexpr dart::compiler::target::word LanguageError_InstanceSize = 28;
-static constexpr dart::compiler::target::word Library_InstanceSize = 80;
+static constexpr dart::compiler::target::word Library_InstanceSize = 84;
 static constexpr dart::compiler::target::word LibraryPrefix_InstanceSize = 20;
 static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 28;
 static constexpr dart::compiler::target::word LocalVarDescriptors_InstanceSize =
@@ -2462,6 +2466,7 @@
 static constexpr dart::compiler::target::word StackTrace_InstanceSize = 20;
 static constexpr dart::compiler::target::word String_InstanceSize = 12;
 static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize = 8;
+static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 20;
 static constexpr dart::compiler::target::word
     TransferableTypedData_InstanceSize = 4;
 static constexpr dart::compiler::target::word TwoByteString_InstanceSize = 12;
@@ -2483,6 +2488,10 @@
 #endif  // defined(TARGET_ARCH_ARM)
 
 #if defined(TARGET_ARCH_X64)
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    132;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 32;
 static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
     16;
 static constexpr dart::compiler::target::word ObjectPool_element_size = 8;
@@ -2543,7 +2552,7 @@
 static constexpr dart::compiler::target::word Class_declaration_type_offset =
     112;
 static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
-    170;
+    172;
 static constexpr dart::compiler::target::word Class_super_type_offset = 88;
 static constexpr dart::compiler::target::word
     Class_host_type_arguments_field_offset_in_words_offset = 184;
@@ -2583,8 +2592,6 @@
 static constexpr dart::compiler::target::word Function_code_offset = 88;
 static constexpr dart::compiler::target::word Function_entry_point_offset[] = {
     8, 16};
-static constexpr dart::compiler::target::word Function_usage_counter_offset =
-    132;
 static constexpr dart::compiler::target::word FutureOr_type_arguments_offset =
     8;
 static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
@@ -2602,8 +2609,6 @@
 static constexpr dart::compiler::target::word ICData_owner_offset = 40;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
 static constexpr dart::compiler::target::word
-    ICData_receivers_static_type_offset = 32;
-static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
     Isolate_cached_class_table_table_offset = 80;
@@ -2663,9 +2668,9 @@
 static constexpr dart::compiler::target::word
     Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1432;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
     1440;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    1448;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
@@ -2691,7 +2696,7 @@
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1504;
+    1512;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     192;
 static constexpr dart::compiler::target::word
@@ -2704,7 +2709,7 @@
     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 = 1520;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1528;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -2722,7 +2727,7 @@
 static constexpr dart::compiler::target::word
     Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1472;
+    1480;
 static constexpr dart::compiler::target::word
     Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
@@ -2742,7 +2747,7 @@
 static constexpr dart::compiler::target::word
     Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1448;
+    1456;
 static constexpr dart::compiler::target::word
     Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
@@ -2750,7 +2755,7 @@
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1496;
+    1504;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     136;
@@ -2789,11 +2794,11 @@
 static constexpr dart::compiler::target::word Thread_object_null_offset = 208;
 static constexpr dart::compiler::target::word
     Thread_predefined_symbols_address_offset = 672;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1456;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1464;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1464;
+    Thread_saved_shadow_call_stack_offset = 1472;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1480;
+    1488;
 static constexpr dart::compiler::target::word
     Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
@@ -2827,7 +2832,7 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     80;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1488;
+    1496;
 static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
     16;
 static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -2867,8 +2872,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1344, 1352, 1360, 1368, -1,   -1,   1376, 1384,
-        1392, 1400, 1408, -1,   1416, 1424, -1,   -1};
+        1352, 1360, 1368, 1376, -1,   -1,   1384, 1392,
+        1400, 1408, 1416, -1,   1424, 1432, -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;
@@ -2920,7 +2925,7 @@
 static constexpr dart::compiler::target::word KernelProgramInfo_InstanceSize =
     128;
 static constexpr dart::compiler::target::word LanguageError_InstanceSize = 48;
-static constexpr dart::compiler::target::word Library_InstanceSize = 152;
+static constexpr dart::compiler::target::word Library_InstanceSize = 160;
 static constexpr dart::compiler::target::word LibraryPrefix_InstanceSize = 40;
 static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 56;
 static constexpr dart::compiler::target::word LocalVarDescriptors_InstanceSize =
@@ -2955,6 +2960,7 @@
 static constexpr dart::compiler::target::word String_InstanceSize = 16;
 static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize =
     16;
+static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 32;
 static constexpr dart::compiler::target::word
     TransferableTypedData_InstanceSize = 8;
 static constexpr dart::compiler::target::word TwoByteString_InstanceSize = 16;
@@ -2976,6 +2982,10 @@
 #endif  // defined(TARGET_ARCH_X64)
 
 #if defined(TARGET_ARCH_IA32)
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    76;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 16;
 static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
     8;
 static constexpr dart::compiler::target::word ObjectPool_element_size = 4;
@@ -3034,7 +3044,7 @@
 static constexpr dart::compiler::target::word Class_declaration_type_offset =
     56;
 static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
-    90;
+    92;
 static constexpr dart::compiler::target::word Class_super_type_offset = 44;
 static constexpr dart::compiler::target::word
     Class_host_type_arguments_field_offset_in_words_offset = 104;
@@ -3074,8 +3084,6 @@
 static constexpr dart::compiler::target::word Function_code_offset = 44;
 static constexpr dart::compiler::target::word Function_entry_point_offset[] = {
     4, 8};
-static constexpr dart::compiler::target::word Function_usage_counter_offset =
-    76;
 static constexpr dart::compiler::target::word FutureOr_type_arguments_offset =
     4;
 static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
@@ -3093,8 +3101,6 @@
 static constexpr dart::compiler::target::word ICData_owner_offset = 20;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 28;
 static constexpr dart::compiler::target::word
-    ICData_receivers_static_type_offset = 16;
-static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
     Isolate_cached_class_table_table_offset = 40;
@@ -3153,9 +3159,9 @@
 static constexpr dart::compiler::target::word
     Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    680;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
     684;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    688;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
@@ -3180,7 +3186,7 @@
     Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
     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_api_top_scope_offset = 720;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     96;
 static constexpr dart::compiler::target::word
@@ -3193,7 +3199,7 @@
     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 = 724;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 728;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -3211,7 +3217,7 @@
 static constexpr dart::compiler::target::word
     Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    700;
+    704;
 static constexpr dart::compiler::target::word
     Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
@@ -3231,7 +3237,7 @@
 static constexpr dart::compiler::target::word
     Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    688;
+    692;
 static constexpr dart::compiler::target::word
     Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
@@ -3239,7 +3245,7 @@
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    712;
+    716;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
@@ -3278,11 +3284,11 @@
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
     Thread_predefined_symbols_address_offset = 344;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 692;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 696;
+    Thread_saved_shadow_call_stack_offset = 700;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    704;
+    708;
 static constexpr dart::compiler::target::word
     Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
@@ -3315,7 +3321,7 @@
     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 = 708;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 712;
 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;
@@ -3403,7 +3409,7 @@
 static constexpr dart::compiler::target::word KernelProgramInfo_InstanceSize =
     64;
 static constexpr dart::compiler::target::word LanguageError_InstanceSize = 28;
-static constexpr dart::compiler::target::word Library_InstanceSize = 80;
+static constexpr dart::compiler::target::word Library_InstanceSize = 84;
 static constexpr dart::compiler::target::word LibraryPrefix_InstanceSize = 20;
 static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 28;
 static constexpr dart::compiler::target::word LocalVarDescriptors_InstanceSize =
@@ -3437,6 +3443,7 @@
 static constexpr dart::compiler::target::word StackTrace_InstanceSize = 20;
 static constexpr dart::compiler::target::word String_InstanceSize = 12;
 static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize = 8;
+static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 20;
 static constexpr dart::compiler::target::word
     TransferableTypedData_InstanceSize = 4;
 static constexpr dart::compiler::target::word TwoByteString_InstanceSize = 12;
@@ -3458,6 +3465,10 @@
 #endif  // defined(TARGET_ARCH_IA32)
 
 #if defined(TARGET_ARCH_ARM64)
+static constexpr dart::compiler::target::word Function_usage_counter_offset =
+    132;
+static constexpr dart::compiler::target::word
+    ICData_receivers_static_type_offset = 32;
 static constexpr dart::compiler::target::word ObjectPool_elements_start_offset =
     16;
 static constexpr dart::compiler::target::word ObjectPool_element_size = 8;
@@ -3518,7 +3529,7 @@
 static constexpr dart::compiler::target::word Class_declaration_type_offset =
     112;
 static constexpr dart::compiler::target::word Class_num_type_arguments_offset =
-    170;
+    172;
 static constexpr dart::compiler::target::word Class_super_type_offset = 88;
 static constexpr dart::compiler::target::word
     Class_host_type_arguments_field_offset_in_words_offset = 184;
@@ -3558,8 +3569,6 @@
 static constexpr dart::compiler::target::word Function_code_offset = 88;
 static constexpr dart::compiler::target::word Function_entry_point_offset[] = {
     8, 16};
-static constexpr dart::compiler::target::word Function_usage_counter_offset =
-    132;
 static constexpr dart::compiler::target::word FutureOr_type_arguments_offset =
     8;
 static constexpr dart::compiler::target::word GrowableObjectArray_data_offset =
@@ -3577,8 +3586,6 @@
 static constexpr dart::compiler::target::word ICData_owner_offset = 40;
 static constexpr dart::compiler::target::word ICData_state_bits_offset = 52;
 static constexpr dart::compiler::target::word
-    ICData_receivers_static_type_offset = 32;
-static constexpr dart::compiler::target::word
     Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
     Isolate_cached_class_table_table_offset = 80;
@@ -3638,9 +3645,9 @@
 static constexpr dart::compiler::target::word
     Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1504;
-static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
     1512;
+static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
+    1520;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
@@ -3666,7 +3673,7 @@
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1576;
+    1584;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     192;
 static constexpr dart::compiler::target::word
@@ -3679,7 +3686,7 @@
     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 = 1592;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1600;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
@@ -3697,7 +3704,7 @@
 static constexpr dart::compiler::target::word
     Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1544;
+    1552;
 static constexpr dart::compiler::target::word
     Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
@@ -3717,7 +3724,7 @@
 static constexpr dart::compiler::target::word
     Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1520;
+    1528;
 static constexpr dart::compiler::target::word
     Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
@@ -3725,7 +3732,7 @@
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1568;
+    1576;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     136;
@@ -3764,11 +3771,11 @@
 static constexpr dart::compiler::target::word Thread_object_null_offset = 208;
 static constexpr dart::compiler::target::word
     Thread_predefined_symbols_address_offset = 672;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1528;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1536;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1536;
+    Thread_saved_shadow_call_stack_offset = 1544;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1552;
+    1560;
 static constexpr dart::compiler::target::word
     Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
@@ -3802,7 +3809,7 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     80;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1560;
+    1568;
 static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
     16;
 static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -3842,9 +3849,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        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};
+        1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432,
+        1440, 1448, 1456, 1464, -1,   -1,   -1,   -1,   1472, 1480, -1,
+        -1,   1488, 1496, 1504, -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;
@@ -3896,7 +3903,7 @@
 static constexpr dart::compiler::target::word KernelProgramInfo_InstanceSize =
     128;
 static constexpr dart::compiler::target::word LanguageError_InstanceSize = 48;
-static constexpr dart::compiler::target::word Library_InstanceSize = 152;
+static constexpr dart::compiler::target::word Library_InstanceSize = 160;
 static constexpr dart::compiler::target::word LibraryPrefix_InstanceSize = 40;
 static constexpr dart::compiler::target::word LinkedHashMap_InstanceSize = 56;
 static constexpr dart::compiler::target::word LocalVarDescriptors_InstanceSize =
@@ -3931,6 +3938,7 @@
 static constexpr dart::compiler::target::word String_InstanceSize = 16;
 static constexpr dart::compiler::target::word SubtypeTestCache_InstanceSize =
     16;
+static constexpr dart::compiler::target::word LoadingUnit_InstanceSize = 32;
 static constexpr dart::compiler::target::word
     TransferableTypedData_InstanceSize = 8;
 static constexpr dart::compiler::target::word TwoByteString_InstanceSize = 16;
@@ -4018,7 +4026,7 @@
 static constexpr dart::compiler::target::word
     AOT_Class_declaration_type_offset = 56;
 static constexpr dart::compiler::target::word
-    AOT_Class_num_type_arguments_offset = 90;
+    AOT_Class_num_type_arguments_offset = 92;
 static constexpr dart::compiler::target::word AOT_Class_super_type_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_Class_host_type_arguments_field_offset_in_words_offset = 104;
@@ -4051,6 +4059,13 @@
     AOT_Field_initializer_function_offset = 16;
 static constexpr dart::compiler::target::word
     AOT_Field_host_offset_or_field_id_offset = 20;
+static constexpr dart::compiler::target::word AOT_Field_guarded_cid_offset = 40;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_in_object_offset_offset = 44;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_offset = 24;
+static constexpr dart::compiler::target::word AOT_Field_is_nullable_offset = 42;
+static constexpr dart::compiler::target::word AOT_Field_kind_bits_offset = 46;
 static constexpr dart::compiler::target::word AOT_Function_code_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_Function_entry_point_offset[] = {4, 8};
@@ -4069,6 +4084,8 @@
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedMask = 3;
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedShift = 0;
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 12;
+static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 16;
+static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 20;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
@@ -4145,9 +4162,9 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 712;
+    AOT_Thread_active_exception_offset = 716;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 716;
+    AOT_Thread_active_stacktrace_offset = 720;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
@@ -4173,7 +4190,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 200;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    748;
+    752;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 96;
 static constexpr dart::compiler::target::word
@@ -4188,7 +4205,7 @@
 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 =
-    756;
+    760;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -4207,7 +4224,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 732;
+    AOT_Thread_execution_state_offset = 736;
 static constexpr dart::compiler::target::word
     AOT_Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
@@ -4227,7 +4244,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 720;
+    AOT_Thread_global_object_pool_offset = 724;
 static constexpr dart::compiler::target::word
     AOT_Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
@@ -4235,7 +4252,7 @@
 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 = 744;
+    AOT_Thread_exit_through_ffi_offset = 748;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 68;
@@ -4275,11 +4292,11 @@
     112;
 static constexpr dart::compiler::target::word
     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_resume_pc_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 728;
+    AOT_Thread_saved_shadow_call_stack_offset = 732;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 736;
+    AOT_Thread_safepoint_state_offset = 740;
 static constexpr dart::compiler::target::word
     AOT_Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
@@ -4315,7 +4332,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 40;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    740;
+    744;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 8;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -4364,7 +4381,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        680, 684, 688, 692, 696, -1, 700, -1, 704, 708, -1, -1, -1, -1, -1, -1};
+        684, 688, 692, 696, 700, -1, 704, -1, 708, 712, -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;
@@ -4420,7 +4437,7 @@
     AOT_KernelProgramInfo_InstanceSize = 64;
 static constexpr dart::compiler::target::word AOT_LanguageError_InstanceSize =
     28;
-static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 76;
+static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 80;
 static constexpr dart::compiler::target::word AOT_LibraryPrefix_InstanceSize =
     20;
 static constexpr dart::compiler::target::word AOT_LinkedHashMap_InstanceSize =
@@ -4463,6 +4480,7 @@
 static constexpr dart::compiler::target::word AOT_String_InstanceSize = 12;
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_InstanceSize = 8;
+static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 20;
 static constexpr dart::compiler::target::word
     AOT_TransferableTypedData_InstanceSize = 4;
 static constexpr dart::compiler::target::word AOT_TwoByteString_InstanceSize =
@@ -4554,7 +4572,7 @@
 static constexpr dart::compiler::target::word
     AOT_Class_declaration_type_offset = 112;
 static constexpr dart::compiler::target::word
-    AOT_Class_num_type_arguments_offset = 170;
+    AOT_Class_num_type_arguments_offset = 172;
 static constexpr dart::compiler::target::word AOT_Class_super_type_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Class_host_type_arguments_field_offset_in_words_offset = 184;
@@ -4587,6 +4605,13 @@
     AOT_Field_initializer_function_offset = 32;
 static constexpr dart::compiler::target::word
     AOT_Field_host_offset_or_field_id_offset = 40;
+static constexpr dart::compiler::target::word AOT_Field_guarded_cid_offset = 72;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_in_object_offset_offset = 76;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_offset = 48;
+static constexpr dart::compiler::target::word AOT_Field_is_nullable_offset = 74;
+static constexpr dart::compiler::target::word AOT_Field_kind_bits_offset = 78;
 static constexpr dart::compiler::target::word AOT_Function_code_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Function_entry_point_offset[] = {8, 16};
@@ -4605,6 +4630,8 @@
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedMask = 3;
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedShift = 0;
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 24;
+static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 32;
+static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 40;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -4681,9 +4708,9 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1432;
+    AOT_Thread_active_exception_offset = 1440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1440;
+    AOT_Thread_active_stacktrace_offset = 1448;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
@@ -4709,7 +4736,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1504;
+    1512;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 192;
 static constexpr dart::compiler::target::word
@@ -4724,7 +4751,7 @@
 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 =
-    1520;
+    1528;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -4743,7 +4770,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1472;
+    AOT_Thread_execution_state_offset = 1480;
 static constexpr dart::compiler::target::word
     AOT_Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
@@ -4763,7 +4790,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1448;
+    AOT_Thread_global_object_pool_offset = 1456;
 static constexpr dart::compiler::target::word
     AOT_Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
@@ -4771,7 +4798,7 @@
 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 = 1496;
+    AOT_Thread_exit_through_ffi_offset = 1504;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 136;
@@ -4812,11 +4839,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_predefined_symbols_address_offset = 672;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1456;
+    1464;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1464;
+    AOT_Thread_saved_shadow_call_stack_offset = 1472;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1480;
+    AOT_Thread_safepoint_state_offset = 1488;
 static constexpr dart::compiler::target::word
     AOT_Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
@@ -4852,7 +4879,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1488;
+    1496;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 16;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -4901,8 +4928,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1344, 1352, 1360, 1368, -1,   -1,   1376, 1384,
-        1392, 1400, 1408, -1,   1416, 1424, -1,   -1};
+        1352, 1360, 1368, 1376, -1,   -1,   1384, 1392,
+        1400, 1408, 1416, -1,   1424, 1432, -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;
@@ -4959,7 +4986,7 @@
     AOT_KernelProgramInfo_InstanceSize = 128;
 static constexpr dart::compiler::target::word AOT_LanguageError_InstanceSize =
     48;
-static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 144;
+static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 152;
 static constexpr dart::compiler::target::word AOT_LibraryPrefix_InstanceSize =
     40;
 static constexpr dart::compiler::target::word AOT_LinkedHashMap_InstanceSize =
@@ -5002,6 +5029,7 @@
 static constexpr dart::compiler::target::word AOT_String_InstanceSize = 16;
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_InstanceSize = 16;
+static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 32;
 static constexpr dart::compiler::target::word
     AOT_TransferableTypedData_InstanceSize = 8;
 static constexpr dart::compiler::target::word AOT_TwoByteString_InstanceSize =
@@ -5096,7 +5124,7 @@
 static constexpr dart::compiler::target::word
     AOT_Class_declaration_type_offset = 112;
 static constexpr dart::compiler::target::word
-    AOT_Class_num_type_arguments_offset = 170;
+    AOT_Class_num_type_arguments_offset = 172;
 static constexpr dart::compiler::target::word AOT_Class_super_type_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Class_host_type_arguments_field_offset_in_words_offset = 184;
@@ -5129,6 +5157,13 @@
     AOT_Field_initializer_function_offset = 32;
 static constexpr dart::compiler::target::word
     AOT_Field_host_offset_or_field_id_offset = 40;
+static constexpr dart::compiler::target::word AOT_Field_guarded_cid_offset = 72;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_in_object_offset_offset = 76;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_offset = 48;
+static constexpr dart::compiler::target::word AOT_Field_is_nullable_offset = 74;
+static constexpr dart::compiler::target::word AOT_Field_kind_bits_offset = 78;
 static constexpr dart::compiler::target::word AOT_Function_code_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Function_entry_point_offset[] = {8, 16};
@@ -5147,6 +5182,8 @@
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedMask = 3;
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedShift = 0;
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 24;
+static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 32;
+static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 40;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -5223,9 +5260,9 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1504;
+    AOT_Thread_active_exception_offset = 1512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1512;
+    AOT_Thread_active_stacktrace_offset = 1520;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
@@ -5251,7 +5288,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1576;
+    1584;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 192;
 static constexpr dart::compiler::target::word
@@ -5266,7 +5303,7 @@
 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 =
-    1592;
+    1600;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -5285,7 +5322,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1544;
+    AOT_Thread_execution_state_offset = 1552;
 static constexpr dart::compiler::target::word
     AOT_Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
@@ -5305,7 +5342,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1520;
+    AOT_Thread_global_object_pool_offset = 1528;
 static constexpr dart::compiler::target::word
     AOT_Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
@@ -5313,7 +5350,7 @@
 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 = 1568;
+    AOT_Thread_exit_through_ffi_offset = 1576;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 136;
@@ -5354,11 +5391,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_predefined_symbols_address_offset = 672;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1528;
+    1536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1536;
+    AOT_Thread_saved_shadow_call_stack_offset = 1544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1552;
+    AOT_Thread_safepoint_state_offset = 1560;
 static constexpr dart::compiler::target::word
     AOT_Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
@@ -5394,7 +5431,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1560;
+    1568;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 16;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -5443,9 +5480,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        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};
+        1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432,
+        1440, 1448, 1456, 1464, -1,   -1,   -1,   -1,   1472, 1480, -1,
+        -1,   1488, 1496, 1504, -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;
@@ -5502,7 +5539,7 @@
     AOT_KernelProgramInfo_InstanceSize = 128;
 static constexpr dart::compiler::target::word AOT_LanguageError_InstanceSize =
     48;
-static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 144;
+static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 152;
 static constexpr dart::compiler::target::word AOT_LibraryPrefix_InstanceSize =
     40;
 static constexpr dart::compiler::target::word AOT_LinkedHashMap_InstanceSize =
@@ -5545,6 +5582,7 @@
 static constexpr dart::compiler::target::word AOT_String_InstanceSize = 16;
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_InstanceSize = 16;
+static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 32;
 static constexpr dart::compiler::target::word
     AOT_TransferableTypedData_InstanceSize = 8;
 static constexpr dart::compiler::target::word AOT_TwoByteString_InstanceSize =
@@ -5637,7 +5675,7 @@
 static constexpr dart::compiler::target::word
     AOT_Class_declaration_type_offset = 56;
 static constexpr dart::compiler::target::word
-    AOT_Class_num_type_arguments_offset = 90;
+    AOT_Class_num_type_arguments_offset = 92;
 static constexpr dart::compiler::target::word AOT_Class_super_type_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_Class_host_type_arguments_field_offset_in_words_offset = 104;
@@ -5668,6 +5706,13 @@
     AOT_Field_initializer_function_offset = 16;
 static constexpr dart::compiler::target::word
     AOT_Field_host_offset_or_field_id_offset = 20;
+static constexpr dart::compiler::target::word AOT_Field_guarded_cid_offset = 40;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_in_object_offset_offset = 44;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_offset = 24;
+static constexpr dart::compiler::target::word AOT_Field_is_nullable_offset = 42;
+static constexpr dart::compiler::target::word AOT_Field_kind_bits_offset = 46;
 static constexpr dart::compiler::target::word AOT_Function_code_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_Function_entry_point_offset[] = {4, 8};
@@ -5686,6 +5731,8 @@
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedMask = 3;
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedShift = 0;
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 12;
+static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 16;
+static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 20;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 36;
 static constexpr dart::compiler::target::word
@@ -5760,9 +5807,9 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 712;
+    AOT_Thread_active_exception_offset = 716;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 716;
+    AOT_Thread_active_stacktrace_offset = 720;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
@@ -5788,7 +5835,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 200;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    748;
+    752;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 96;
 static constexpr dart::compiler::target::word
@@ -5803,7 +5850,7 @@
 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 =
-    756;
+    760;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -5822,7 +5869,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 732;
+    AOT_Thread_execution_state_offset = 736;
 static constexpr dart::compiler::target::word
     AOT_Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
@@ -5842,7 +5889,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 720;
+    AOT_Thread_global_object_pool_offset = 724;
 static constexpr dart::compiler::target::word
     AOT_Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
@@ -5850,7 +5897,7 @@
 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 = 744;
+    AOT_Thread_exit_through_ffi_offset = 748;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 68;
@@ -5890,11 +5937,11 @@
     112;
 static constexpr dart::compiler::target::word
     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_resume_pc_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 728;
+    AOT_Thread_saved_shadow_call_stack_offset = 732;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 736;
+    AOT_Thread_safepoint_state_offset = 740;
 static constexpr dart::compiler::target::word
     AOT_Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
@@ -5930,7 +5977,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 40;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    740;
+    744;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 8;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -5976,7 +6023,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        680, 684, 688, 692, 696, -1, 700, -1, 704, 708, -1, -1, -1, -1, -1, -1};
+        684, 688, 692, 696, 700, -1, 704, -1, 708, 712, -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;
@@ -6032,7 +6079,7 @@
     AOT_KernelProgramInfo_InstanceSize = 64;
 static constexpr dart::compiler::target::word AOT_LanguageError_InstanceSize =
     28;
-static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 76;
+static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 80;
 static constexpr dart::compiler::target::word AOT_LibraryPrefix_InstanceSize =
     20;
 static constexpr dart::compiler::target::word AOT_LinkedHashMap_InstanceSize =
@@ -6075,6 +6122,7 @@
 static constexpr dart::compiler::target::word AOT_String_InstanceSize = 12;
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_InstanceSize = 8;
+static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 20;
 static constexpr dart::compiler::target::word
     AOT_TransferableTypedData_InstanceSize = 4;
 static constexpr dart::compiler::target::word AOT_TwoByteString_InstanceSize =
@@ -6166,7 +6214,7 @@
 static constexpr dart::compiler::target::word
     AOT_Class_declaration_type_offset = 112;
 static constexpr dart::compiler::target::word
-    AOT_Class_num_type_arguments_offset = 170;
+    AOT_Class_num_type_arguments_offset = 172;
 static constexpr dart::compiler::target::word AOT_Class_super_type_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Class_host_type_arguments_field_offset_in_words_offset = 184;
@@ -6197,6 +6245,13 @@
     AOT_Field_initializer_function_offset = 32;
 static constexpr dart::compiler::target::word
     AOT_Field_host_offset_or_field_id_offset = 40;
+static constexpr dart::compiler::target::word AOT_Field_guarded_cid_offset = 72;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_in_object_offset_offset = 76;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_offset = 48;
+static constexpr dart::compiler::target::word AOT_Field_is_nullable_offset = 74;
+static constexpr dart::compiler::target::word AOT_Field_kind_bits_offset = 78;
 static constexpr dart::compiler::target::word AOT_Function_code_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Function_entry_point_offset[] = {8, 16};
@@ -6215,6 +6270,8 @@
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedMask = 3;
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedShift = 0;
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 24;
+static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 32;
+static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 40;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -6289,9 +6346,9 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1432;
+    AOT_Thread_active_exception_offset = 1440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1440;
+    AOT_Thread_active_stacktrace_offset = 1448;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
@@ -6317,7 +6374,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1504;
+    1512;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 192;
 static constexpr dart::compiler::target::word
@@ -6332,7 +6389,7 @@
 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 =
-    1520;
+    1528;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -6351,7 +6408,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1472;
+    AOT_Thread_execution_state_offset = 1480;
 static constexpr dart::compiler::target::word
     AOT_Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
@@ -6371,7 +6428,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1448;
+    AOT_Thread_global_object_pool_offset = 1456;
 static constexpr dart::compiler::target::word
     AOT_Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
@@ -6379,7 +6436,7 @@
 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 = 1496;
+    AOT_Thread_exit_through_ffi_offset = 1504;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 136;
@@ -6420,11 +6477,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_predefined_symbols_address_offset = 672;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1456;
+    1464;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1464;
+    AOT_Thread_saved_shadow_call_stack_offset = 1472;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1480;
+    AOT_Thread_safepoint_state_offset = 1488;
 static constexpr dart::compiler::target::word
     AOT_Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
@@ -6460,7 +6517,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1488;
+    1496;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 16;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -6506,8 +6563,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1344, 1352, 1360, 1368, -1,   -1,   1376, 1384,
-        1392, 1400, 1408, -1,   1416, 1424, -1,   -1};
+        1352, 1360, 1368, 1376, -1,   -1,   1384, 1392,
+        1400, 1408, 1416, -1,   1424, 1432, -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;
@@ -6564,7 +6621,7 @@
     AOT_KernelProgramInfo_InstanceSize = 128;
 static constexpr dart::compiler::target::word AOT_LanguageError_InstanceSize =
     48;
-static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 144;
+static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 152;
 static constexpr dart::compiler::target::word AOT_LibraryPrefix_InstanceSize =
     40;
 static constexpr dart::compiler::target::word AOT_LinkedHashMap_InstanceSize =
@@ -6607,6 +6664,7 @@
 static constexpr dart::compiler::target::word AOT_String_InstanceSize = 16;
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_InstanceSize = 16;
+static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 32;
 static constexpr dart::compiler::target::word
     AOT_TransferableTypedData_InstanceSize = 8;
 static constexpr dart::compiler::target::word AOT_TwoByteString_InstanceSize =
@@ -6701,7 +6759,7 @@
 static constexpr dart::compiler::target::word
     AOT_Class_declaration_type_offset = 112;
 static constexpr dart::compiler::target::word
-    AOT_Class_num_type_arguments_offset = 170;
+    AOT_Class_num_type_arguments_offset = 172;
 static constexpr dart::compiler::target::word AOT_Class_super_type_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Class_host_type_arguments_field_offset_in_words_offset = 184;
@@ -6732,6 +6790,13 @@
     AOT_Field_initializer_function_offset = 32;
 static constexpr dart::compiler::target::word
     AOT_Field_host_offset_or_field_id_offset = 40;
+static constexpr dart::compiler::target::word AOT_Field_guarded_cid_offset = 72;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_in_object_offset_offset = 76;
+static constexpr dart::compiler::target::word
+    AOT_Field_guarded_list_length_offset = 48;
+static constexpr dart::compiler::target::word AOT_Field_is_nullable_offset = 74;
+static constexpr dart::compiler::target::word AOT_Field_kind_bits_offset = 78;
 static constexpr dart::compiler::target::word AOT_Function_code_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Function_entry_point_offset[] = {8, 16};
@@ -6750,6 +6815,8 @@
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedMask = 3;
 static constexpr dart::compiler::target::word AOT_ICData_NumArgsTestedShift = 0;
 static constexpr dart::compiler::target::word AOT_ICData_entries_offset = 24;
+static constexpr dart::compiler::target::word AOT_ICData_owner_offset = 32;
+static constexpr dart::compiler::target::word AOT_ICData_state_bits_offset = 40;
 static constexpr dart::compiler::target::word
     AOT_Isolate_shared_class_table_offset = 72;
 static constexpr dart::compiler::target::word
@@ -6824,9 +6891,9 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1504;
+    AOT_Thread_active_exception_offset = 1512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1512;
+    AOT_Thread_active_stacktrace_offset = 1520;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
@@ -6852,7 +6919,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1576;
+    1584;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 192;
 static constexpr dart::compiler::target::word
@@ -6867,7 +6934,7 @@
 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 =
-    1592;
+    1600;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
@@ -6886,7 +6953,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1544;
+    AOT_Thread_execution_state_offset = 1552;
 static constexpr dart::compiler::target::word
     AOT_Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
@@ -6906,7 +6973,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1520;
+    AOT_Thread_global_object_pool_offset = 1528;
 static constexpr dart::compiler::target::word
     AOT_Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
@@ -6914,7 +6981,7 @@
 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 = 1568;
+    AOT_Thread_exit_through_ffi_offset = 1576;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 136;
@@ -6955,11 +7022,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_predefined_symbols_address_offset = 672;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1528;
+    1536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1536;
+    AOT_Thread_saved_shadow_call_stack_offset = 1544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1552;
+    AOT_Thread_safepoint_state_offset = 1560;
 static constexpr dart::compiler::target::word
     AOT_Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
@@ -6995,7 +7062,7 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1560;
+    1568;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 16;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -7041,9 +7108,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        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};
+        1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432,
+        1440, 1448, 1456, 1464, -1,   -1,   -1,   -1,   1472, 1480, -1,
+        -1,   1488, 1496, 1504, -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;
@@ -7100,7 +7167,7 @@
     AOT_KernelProgramInfo_InstanceSize = 128;
 static constexpr dart::compiler::target::word AOT_LanguageError_InstanceSize =
     48;
-static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 144;
+static constexpr dart::compiler::target::word AOT_Library_InstanceSize = 152;
 static constexpr dart::compiler::target::word AOT_LibraryPrefix_InstanceSize =
     40;
 static constexpr dart::compiler::target::word AOT_LinkedHashMap_InstanceSize =
@@ -7143,6 +7210,7 @@
 static constexpr dart::compiler::target::word AOT_String_InstanceSize = 16;
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_InstanceSize = 16;
+static constexpr dart::compiler::target::word AOT_LoadingUnit_InstanceSize = 32;
 static constexpr dart::compiler::target::word
     AOT_TransferableTypedData_InstanceSize = 8;
 static constexpr dart::compiler::target::word AOT_TwoByteString_InstanceSize =
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index 958adc1..67b3283 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -21,16 +21,17 @@
 // FIELD(Class, Name) Offset of a field within a class.
 // ARRAY(Class, Name) Offset of the first element and the size of the elements
 //     in an array of this class.
-// ARRAY_STRUCTFIELD(Class, Name, Element, Field) Offset of a field within a
-//     struct in an array of that struct, relative to the start of the array.
 // SIZEOF(Class, Name, What) Size of an object.
 // RANGE(Class, Name, Type, First, Last, Filter) An array of offsets generated
 //     by passing a value of the given Type in the range from First to Last to
 //     Class::Name() if Filter returns true for that value.
 // CONSTANT(Class, Name) Miscellaneous constant.
-// PRECOMP_NO_CHECK(Code) Don't check this offset in the precompiled runtime.
-#define OFFSETS_LIST(FIELD, ARRAY, ARRAY_STRUCTFIELD, SIZEOF, RANGE, CONSTANT, \
-                     PRECOMP_NO_CHECK)                                         \
+//
+// COMMON_OFFSETS_LIST is for declarations that are valid in all contexts.
+// JIT_OFFSETS_LIST is for declarations that are only valid in JIT mode.
+// A declaration that is not valid in product mode can be wrapped with
+// NOT_IN_PRODUCT().
+#define COMMON_OFFSETS_LIST(FIELD, ARRAY, SIZEOF, RANGE, CONSTANT)             \
   ARRAY(ObjectPool, element_offset)                                            \
   CONSTANT(Array, kMaxElements)                                                \
   CONSTANT(Array, kMaxNewSpaceElements)                                        \
@@ -85,15 +86,14 @@
   FIELD(Float64x2, value_offset)                                               \
   FIELD(Field, initializer_function_offset)                                    \
   FIELD(Field, host_offset_or_field_id_offset)                                 \
-  PRECOMP_NO_CHECK(FIELD(Field, guarded_cid_offset))                           \
-  PRECOMP_NO_CHECK(FIELD(Field, guarded_list_length_in_object_offset_offset))  \
-  PRECOMP_NO_CHECK(FIELD(Field, guarded_list_length_offset))                   \
-  PRECOMP_NO_CHECK(FIELD(Field, is_nullable_offset))                           \
-  PRECOMP_NO_CHECK(FIELD(Field, kind_bits_offset))                             \
+  FIELD(Field, guarded_cid_offset)                                             \
+  FIELD(Field, guarded_list_length_in_object_offset_offset)                    \
+  FIELD(Field, guarded_list_length_offset)                                     \
+  FIELD(Field, is_nullable_offset)                                             \
+  FIELD(Field, kind_bits_offset)                                               \
   FIELD(Function, code_offset)                                                 \
   RANGE(Function, entry_point_offset, CodeEntryKind, CodeEntryKind::kNormal,   \
         CodeEntryKind::kUnchecked, [](CodeEntryKind value) { return true; })   \
-  PRECOMP_NO_CHECK(FIELD(Function, usage_counter_offset))                      \
   FIELD(FutureOr, type_arguments_offset)                                       \
   FIELD(GrowableObjectArray, data_offset)                                      \
   FIELD(GrowableObjectArray, length_offset)                                    \
@@ -103,9 +103,8 @@
   FIELD(ICData, NumArgsTestedMask)                                             \
   FIELD(ICData, NumArgsTestedShift)                                            \
   FIELD(ICData, entries_offset)                                                \
-  PRECOMP_NO_CHECK(FIELD(ICData, owner_offset))                                \
-  PRECOMP_NO_CHECK(FIELD(ICData, state_bits_offset))                           \
-  NOT_IN_PRECOMPILED_RUNTIME(FIELD(ICData, receivers_static_type_offset))      \
+  FIELD(ICData, owner_offset)                                                  \
+  FIELD(ICData, state_bits_offset)                                             \
   FIELD(Isolate, shared_class_table_offset)                                    \
   FIELD(Isolate, cached_class_table_table_offset)                              \
   FIELD(Isolate, current_tag_offset)                                           \
@@ -337,6 +336,7 @@
   SIZEOF(StackTrace, InstanceSize, StackTraceLayout)                           \
   SIZEOF(String, InstanceSize, StringLayout)                                   \
   SIZEOF(SubtypeTestCache, InstanceSize, SubtypeTestCacheLayout)               \
+  SIZEOF(LoadingUnit, InstanceSize, LoadingUnitLayout)                         \
   SIZEOF(TransferableTypedData, InstanceSize, TransferableTypedDataLayout)     \
   SIZEOF(TwoByteString, InstanceSize, TwoByteStringLayout)                     \
   SIZEOF(Type, InstanceSize, TypeLayout)                                       \
@@ -354,4 +354,8 @@
   SIZEOF(WeakSerializationReference, InstanceSize,                             \
          WeakSerializationReferenceLayout)
 
+#define JIT_OFFSETS_LIST(FIELD, ARRAY, SIZEOF, RANGE, CONSTANT)                \
+  FIELD(Function, usage_counter_offset)                                        \
+  FIELD(ICData, receivers_static_type_offset)
+
 #endif  // RUNTIME_VM_COMPILER_RUNTIME_OFFSETS_LIST_H_
diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc
index e858c7d..deb8784 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm.cc
@@ -195,7 +195,7 @@
   }
   __ LeaveStubFrame();
   __ PopRegisters(all_registers);
-  __ Pop(LR);
+  __ Drop(1);  // We use the LR restored via LeaveStubFrame.
   __ bx(LR);
 }
 
@@ -208,7 +208,7 @@
   ASSERT(!store_runtime_result_in_r0 || allow_return);
   auto perform_runtime_call = [&]() {
     if (store_runtime_result_in_r0) {
-      __ PushRegister(LR);  // Push an even register.
+      __ PushRegister(LR);
     }
     __ CallRuntime(*target, /*argument_count=*/0);
     if (store_runtime_result_in_r0) {
@@ -1205,12 +1205,13 @@
   // For test purpose call allocation stub without inline allocation attempt.
   if (!FLAG_use_slow_path) {
     Label slow_case;
-    __ TryAllocate(compiler::MintClass(), &slow_case, /*instance_reg=*/R0,
-                   /*temp_reg=*/R1);
+    __ TryAllocate(compiler::MintClass(), &slow_case,
+                   AllocateMintABI::kResultReg, AllocateMintABI::kTempReg);
     __ Ret();
 
     __ Bind(&slow_case);
   }
+  COMPILE_ASSERT(AllocateMintABI::kResultReg == R0);
   GenerateSharedStub(assembler, /*save_fpu_registers=*/true,
                      &kAllocateMintRuntimeEntry,
                      target::Thread::allocate_mint_with_fpu_regs_stub_offset(),
@@ -1224,12 +1225,13 @@
   // For test purpose call allocation stub without inline allocation attempt.
   if (!FLAG_use_slow_path) {
     Label slow_case;
-    __ TryAllocate(compiler::MintClass(), &slow_case, /*instance_reg=*/R0,
-                   /*temp_reg=*/R1);
+    __ TryAllocate(compiler::MintClass(), &slow_case,
+                   AllocateMintABI::kResultReg, AllocateMintABI::kTempReg);
     __ Ret();
 
     __ Bind(&slow_case);
   }
+  COMPILE_ASSERT(AllocateMintABI::kResultReg == R0);
   GenerateSharedStub(
       assembler, /*save_fpu_registers=*/false, &kAllocateMintRuntimeEntry,
       target::Thread::allocate_mint_without_fpu_regs_stub_offset(),
@@ -2201,6 +2203,10 @@
     Assembler* assembler) {
   Register ic_reg = R9;
   Register func_reg = R8;
+  if (FLAG_precompiled_mode) {
+    __ Breakpoint();
+    return;
+  }
   if (FLAG_trace_optimized_ic_calls) {
     __ EnterStubFrame();
     __ PushList((1 << R9) | (1 << R8));  // Preserve.
@@ -2219,6 +2225,10 @@
 // Loads function into 'temp_reg'.
 void StubCodeCompiler::GenerateUsageCounterIncrement(Assembler* assembler,
                                                      Register temp_reg) {
+  if (FLAG_precompiled_mode) {
+    __ Breakpoint();
+    return;
+  }
   if (FLAG_optimization_counter_threshold >= 0) {
     Register ic_reg = R9;
     Register func_reg = temp_reg;
@@ -2333,6 +2343,11 @@
     Optimized optimized,
     CallType type,
     Exactness exactness) {
+  if (FLAG_precompiled_mode) {
+    __ Breakpoint();
+    return;
+  }
+
   const bool save_entry_point = kind == Token::kILLEGAL;
   if (save_entry_point) {
     GenerateRecordEntryPoint(assembler);
@@ -3716,6 +3731,12 @@
   __ bkpt(0);
 }
 
+void StubCodeCompiler::GenerateNotLoadedStub(Assembler* assembler) {
+  __ EnterStubFrame();
+  __ CallRuntime(kNotLoadedRuntimeEntry, 0);
+  __ bkpt(0);
+}
+
 // Instantiate type arguments from instantiator and function type args.
 // R3 uninstantiated type arguments.
 // R2 instantiator type arguments.
diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc
index 20eb970..db103f75 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc
@@ -209,7 +209,7 @@
   }
   __ LeaveStubFrame();
   __ PopRegisters(all_registers);
-  __ Pop(LR);
+  __ Drop(1);  // We use the LR restored via LeaveStubFrame.
   __ ret(LR);
 }
 
@@ -1331,12 +1331,13 @@
   // For test purpose call allocation stub without inline allocation attempt.
   if (!FLAG_use_slow_path) {
     Label slow_case;
-    __ TryAllocate(compiler::MintClass(), &slow_case, /*instance_reg=*/R0,
-                   /*temp_reg=*/R1);
+    __ TryAllocate(compiler::MintClass(), &slow_case,
+                   AllocateMintABI::kResultReg, AllocateMintABI::kTempReg);
     __ Ret();
 
     __ Bind(&slow_case);
   }
+  COMPILE_ASSERT(AllocateMintABI::kResultReg == R0);
   GenerateSharedStub(assembler, /*save_fpu_registers=*/true,
                      &kAllocateMintRuntimeEntry,
                      target::Thread::allocate_mint_with_fpu_regs_stub_offset(),
@@ -1349,12 +1350,13 @@
   // For test purpose call allocation stub without inline allocation attempt.
   if (!FLAG_use_slow_path) {
     Label slow_case;
-    __ TryAllocate(compiler::MintClass(), &slow_case, /*instance_reg=*/R0,
-                   /*temp_reg=*/R1);
+    __ TryAllocate(compiler::MintClass(), &slow_case,
+                   AllocateMintABI::kResultReg, AllocateMintABI::kTempReg);
     __ Ret();
 
     __ Bind(&slow_case);
   }
+  COMPILE_ASSERT(AllocateMintABI::kResultReg == R0);
   GenerateSharedStub(
       assembler, /*save_fpu_registers=*/false, &kAllocateMintRuntimeEntry,
       target::Thread::allocate_mint_without_fpu_regs_stub_offset(),
@@ -2348,6 +2350,10 @@
     Assembler* assembler) {
   Register ic_reg = R5;
   Register func_reg = R6;
+  if (FLAG_precompiled_mode) {
+    __ Breakpoint();
+    return;
+  }
   if (FLAG_trace_optimized_ic_calls) {
     __ EnterStubFrame();
     __ Push(R6);        // Preserve.
@@ -2370,6 +2376,10 @@
 // Loads function into 'temp_reg'.
 void StubCodeCompiler::GenerateUsageCounterIncrement(Assembler* assembler,
                                                      Register temp_reg) {
+  if (FLAG_precompiled_mode) {
+    __ Breakpoint();
+    return;
+  }
   if (FLAG_optimization_counter_threshold >= 0) {
     Register ic_reg = R5;
     Register func_reg = temp_reg;
@@ -2487,6 +2497,11 @@
     CallType type,
     Exactness exactness) {
   const bool save_entry_point = kind == Token::kILLEGAL;
+  if (FLAG_precompiled_mode) {
+    __ Breakpoint();
+    return;
+  }
+
   if (save_entry_point) {
     GenerateRecordEntryPoint(assembler);
   }
@@ -3900,6 +3915,12 @@
   __ brk(0);
 }
 
+void StubCodeCompiler::GenerateNotLoadedStub(Assembler* assembler) {
+  __ EnterStubFrame();
+  __ CallRuntime(kNotLoadedRuntimeEntry, 0);
+  __ brk(0);
+}
+
 // Instantiate type arguments from instantiator and function type args.
 // R3 uninstantiated type arguments.
 // R2 instantiator type arguments.
diff --git a/runtime/vm/compiler/stub_code_compiler_ia32.cc b/runtime/vm/compiler/stub_code_compiler_ia32.cc
index 6649df4..96bf0ff 100644
--- a/runtime/vm/compiler/stub_code_compiler_ia32.cc
+++ b/runtime/vm/compiler/stub_code_compiler_ia32.cc
@@ -2965,6 +2965,12 @@
   __ int3();  // Marker stub.
 }
 
+void StubCodeCompiler::GenerateNotLoadedStub(Assembler* assembler) {
+  __ EnterStubFrame();
+  __ CallRuntime(kNotLoadedRuntimeEntry, 0);
+  __ int3();
+}
+
 // Instantiate type arguments from instantiator and function type args.
 // EBX: uninstantiated type arguments.
 // EDX: instantiator type arguments.
diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc
index 23ec342..a4a6045 100644
--- a/runtime/vm/compiler/stub_code_compiler_x64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_x64.cc
@@ -194,14 +194,11 @@
     return;
   }
   __ LeaveStubFrame();
-
-  // Drop "official" return address -- we can just use the one stored above the
-  // saved registers.
-  __ Drop(1);
-
+  // Copy up the return address (in case it was changed).
+  __ popq(TMP);
+  __ movq(Address(RSP, kAllSavedRegistersSlots * target::kWordSize), TMP);
   __ PopRegisters(kDartAvailableCpuRegs,
                   save_fpu_registers ? kAllFpuRegistersList : 0);
-
   __ ret();
 }
 
@@ -209,9 +206,20 @@
                                bool save_fpu_registers,
                                const RuntimeEntry* target,
                                intptr_t self_code_stub_offset_from_thread,
-                               bool allow_return) {
+                               bool allow_return,
+                               bool store_runtime_result_in_rax = false) {
   auto perform_runtime_call = [&]() {
+    if (store_runtime_result_in_rax) {
+      __ PushImmediate(Immediate(0));
+    }
     __ CallRuntime(*target, /*argument_count=*/0);
+    if (store_runtime_result_in_rax) {
+      __ PopRegister(RAX);
+      __ movq(Address(RBP,
+                      target::kWordSize *
+                          StubCodeCompiler::WordOffsetFromFpToCpuRegister(RAX)),
+              RAX);
+    }
   };
   GenerateSharedStubGeneric(assembler, save_fpu_registers,
                             self_code_stub_offset_from_thread, allow_return,
@@ -1241,12 +1249,40 @@
 
 void StubCodeCompiler::GenerateAllocateMintSharedWithFPURegsStub(
     Assembler* assembler) {
-  __ Stop("Unimplemented");
+  // For test purpose call allocation stub without inline allocation attempt.
+  if (!FLAG_use_slow_path) {
+    Label slow_case;
+    __ TryAllocate(compiler::MintClass(), &slow_case, /*near_jump=*/true,
+                   AllocateMintABI::kResultReg, AllocateMintABI::kTempReg);
+    __ Ret();
+
+    __ Bind(&slow_case);
+  }
+  COMPILE_ASSERT(AllocateMintABI::kResultReg == RAX);
+  GenerateSharedStub(assembler, /*save_fpu_registers=*/true,
+                     &kAllocateMintRuntimeEntry,
+                     target::Thread::allocate_mint_with_fpu_regs_stub_offset(),
+                     /*allow_return=*/true,
+                     /*store_runtime_result_in_rax=*/true);
 }
 
 void StubCodeCompiler::GenerateAllocateMintSharedWithoutFPURegsStub(
     Assembler* assembler) {
-  __ Stop("Unimplemented");
+  // For test purpose call allocation stub without inline allocation attempt.
+  if (!FLAG_use_slow_path) {
+    Label slow_case;
+    __ TryAllocate(compiler::MintClass(), &slow_case, /*near_jump=*/true,
+                   AllocateMintABI::kResultReg, AllocateMintABI::kTempReg);
+    __ Ret();
+
+    __ Bind(&slow_case);
+  }
+  COMPILE_ASSERT(AllocateMintABI::kResultReg == RAX);
+  GenerateSharedStub(
+      assembler, /*save_fpu_registers=*/false, &kAllocateMintRuntimeEntry,
+      target::Thread::allocate_mint_without_fpu_regs_stub_offset(),
+      /*allow_return=*/true,
+      /*store_runtime_result_in_rax=*/true);
 }
 
 // Called when invoking Dart code from C++ (VM code).
@@ -2240,6 +2276,10 @@
 // function and not the top-scope function.
 void StubCodeCompiler::GenerateOptimizedUsageCounterIncrement(
     Assembler* assembler) {
+  if (FLAG_precompiled_mode) {
+    __ Breakpoint();
+    return;
+  }
   Register ic_reg = RBX;
   Register func_reg = RDI;
   if (FLAG_trace_optimized_ic_calls) {
@@ -2261,6 +2301,10 @@
 // Loads function into 'temp_reg', preserves 'ic_reg'.
 void StubCodeCompiler::GenerateUsageCounterIncrement(Assembler* assembler,
                                                      Register temp_reg) {
+  if (FLAG_precompiled_mode) {
+    __ Breakpoint();
+    return;
+  }
   if (FLAG_optimization_counter_threshold >= 0) {
     Register ic_reg = RBX;
     Register func_reg = temp_reg;
@@ -2380,6 +2424,11 @@
     Optimized optimized,
     CallType type,
     Exactness exactness) {
+  if (FLAG_precompiled_mode) {
+    __ Breakpoint();
+    return;
+  }
+
   const bool save_entry_point = kind == Token::kILLEGAL;
   if (save_entry_point) {
     GenerateRecordEntryPoint(assembler);
@@ -2558,8 +2607,8 @@
             FieldAddress(RBX, target::ICData::receivers_static_type_offset()));
     __ movq(RCX, FieldAddress(RCX, target::Type::arguments_offset()));
     // RAX contains an offset to type arguments in words as a smi,
-    // hence TIMES_4. RDX is guaranteed to be non-smi because it is expected to
-    // have type arguments.
+    // hence TIMES_4. RDX is guaranteed to be non-smi because it is expected
+    // to have type arguments.
     __ cmpq(RCX, FieldAddress(RDX, RAX, TIMES_4, 0));
     __ j(EQUAL, &call_target_function_through_unchecked_entry);
 
@@ -3793,6 +3842,12 @@
   __ int3();
 }
 
+void StubCodeCompiler::GenerateNotLoadedStub(Assembler* assembler) {
+  __ EnterStubFrame();
+  __ CallRuntime(kNotLoadedRuntimeEntry, 0);
+  __ int3();
+}
+
 // Instantiate type arguments from instantiator and function type args.
 // RBX: uninstantiated type arguments.
 // RDX: instantiator type arguments.
diff --git a/runtime/vm/compiler_test.cc b/runtime/vm/compiler_test.cc
index e7b6d31..fc900fa 100644
--- a/runtime/vm/compiler_test.cc
+++ b/runtime/vm/compiler_test.cc
@@ -225,6 +225,7 @@
 
     Dart_KernelCompilationResult compilation_result =
         KernelIsolate::CompileExpressionToKernel(
+            /*platform_kernel=*/nullptr, /*platform_kernel_size=*/0,
             expr_text.ToCString(), Array::empty_array(), Array::empty_array(),
             String::Handle(lib_handle.url()).ToCString(), "A",
             /* is_static= */ false);
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index 7a34b6e..ea46f78a 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -387,6 +387,12 @@
   static const Register kIndexReg = R1;
 };
 
+// ABI for AllocateMint*Stub.
+struct AllocateMintABI {
+  static const Register kResultReg = R0;
+  static const Register kTempReg = R1;
+};
+
 // TODO(regis): Add ABIs for type testing stubs and is-type test stubs instead
 // of reusing the constants of the instantiation stubs ABI.
 
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index 1568201..2ce6ac37 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -219,6 +219,12 @@
   static const Register kIndexReg = R1;
 };
 
+// ABI for AllocateMint*Stub.
+struct AllocateMintABI {
+  static const Register kResultReg = R0;
+  static const Register kTempReg = R1;
+};
+
 // TODO(regis): Add ABIs for type testing stubs and is-type test stubs instead
 // of reusing the constants of the instantiation stubs ABI.
 
diff --git a/runtime/vm/constants_x64.h b/runtime/vm/constants_x64.h
index 84d27c1..d696eac 100644
--- a/runtime/vm/constants_x64.h
+++ b/runtime/vm/constants_x64.h
@@ -200,6 +200,12 @@
   static const Register kIndexReg = RBX;
 };
 
+// ABI for AllocateMint*Stub.
+struct AllocateMintABI {
+  static const Register kResultReg = RAX;
+  static const Register kTempReg = RBX;
+};
+
 // Registers used inside the implementation of type testing stubs.
 struct TTSInternalRegs {
   static const Register kInstanceTypeArgumentsReg = RSI;
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index c7f2b50..e419af5 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -106,26 +106,48 @@
     ok = false;                                                                \
   }
 
-#define CHECK_FIELD(Class, Name) CHECK_OFFSET(Class::Name(), Class##_##Name)
+#if defined(DART_PRECOMPILED_RUNTIME)
+#define CHECK_FIELD(Class, Name)                                               \
+  CHECK_OFFSET(Class::Name(), AOT_##Class##_##Name);
 #define CHECK_ARRAY(Class, Name)                                               \
   CHECK_OFFSET(Class::ArrayTraits::elements_start_offset(),                    \
-               Class##_elements_start_offset)                                  \
-  CHECK_OFFSET(Class::ArrayTraits::kElementSize, Class##_element_size)
-#define CHECK_ARRAY_STRUCTFIELD(Class, Name, ElementOffsetName, FieldOffset)
-
-#if defined(DART_PRECOMPILED_RUNTIME)
+               AOT_##Class##_elements_start_offset);                           \
+  CHECK_OFFSET(Class::ArrayTraits::kElementSize, AOT_##Class##_element_size)
 #define CHECK_SIZEOF(Class, Name, What)                                        \
-  CHECK_OFFSET(sizeof(What), AOT_##Class##_##Name)
+  CHECK_OFFSET(sizeof(What), AOT_##Class##_##Name);
+#define CHECK_RANGE(Class, Getter, Type, First, Last, Filter)                  \
+  for (intptr_t i = static_cast<intptr_t>(First);                              \
+       i <= static_cast<intptr_t>(Last); i++) {                                \
+    if (Filter(static_cast<Type>(i))) {                                        \
+      CHECK_OFFSET(Class::Getter(static_cast<Type>(i)),                        \
+                   AOT_##Class##_##Getter[i]);                                 \
+    }                                                                          \
+  }
+#define CHECK_CONSTANT(Class, Name)                                            \
+  CHECK_OFFSET(Class::Name, AOT_##Class##_##Name);
 #else
+#define CHECK_FIELD(Class, Name) CHECK_OFFSET(Class::Name(), Class##_##Name);
+#define CHECK_ARRAY(Class, Name)                                               \
+  CHECK_OFFSET(Class::ArrayTraits::elements_start_offset(),                    \
+               Class##_elements_start_offset);                                 \
+  CHECK_OFFSET(Class::ArrayTraits::kElementSize, Class##_element_size);
 #define CHECK_SIZEOF(Class, Name, What)                                        \
-  CHECK_OFFSET(sizeof(What), Class##_##Name)
-#endif
+  CHECK_OFFSET(sizeof(What), Class##_##Name);
+#define CHECK_RANGE(Class, Getter, Type, First, Last, Filter)                  \
+  for (intptr_t i = static_cast<intptr_t>(First);                              \
+       i <= static_cast<intptr_t>(Last); i++) {                                \
+    if (Filter(static_cast<Type>(i))) {                                        \
+      CHECK_OFFSET(Class::Getter(static_cast<Type>(i)), Class##_##Getter[i]);  \
+    }                                                                          \
+  }
+#define CHECK_CONSTANT(Class, Name) CHECK_OFFSET(Class::Name, Class##_##Name);
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 
-#define CHECK_RANGE(Class, Name, Type, First, Last, Filter)
-#define CHECK_CONSTANT(Class, Name) CHECK_OFFSET(Class::Name, Class##_##Name)
+  COMMON_OFFSETS_LIST(CHECK_FIELD, CHECK_ARRAY, CHECK_SIZEOF, CHECK_RANGE,
+                      CHECK_CONSTANT)
 
-  OFFSETS_LIST(CHECK_FIELD, CHECK_ARRAY, CHECK_ARRAY_STRUCTFIELD, CHECK_SIZEOF,
-               CHECK_RANGE, CHECK_CONSTANT, NOT_IN_PRECOMPILED_RUNTIME)
+  NOT_IN_PRECOMPILED_RUNTIME(JIT_OFFSETS_LIST(
+      CHECK_FIELD, CHECK_ARRAY, CHECK_SIZEOF, CHECK_RANGE, CHECK_CONSTANT))
 
   if (!ok) {
     FATAL(
@@ -657,14 +679,6 @@
   return isolate;
 }
 
-static bool IsSnapshotCompatible(Snapshot::Kind vm_kind,
-                                 Snapshot::Kind isolate_kind) {
-  if (vm_kind == isolate_kind) return true;
-  if (vm_kind == Snapshot::kFull && isolate_kind == Snapshot::kFullJIT)
-    return true;
-  return Snapshot::IsFull(isolate_kind);
-}
-
 #if defined(DART_PRECOMPILED_RUNTIME)
 static bool CloneIntoChildIsolateAOT(Thread* T,
                                      Isolate* I,
@@ -763,7 +777,7 @@
   //   generating the kernel file
   // - if loading from an appJIT, based on the mode used
   //   when generating the snapshot.
-  ASSERT(FLAG_null_safety == kNullSafetyOptionUnspecified);
+  ASSERT(FLAG_sound_null_safety == kNullSafetyOptionUnspecified);
 
   // If snapshot is an appJIT/AOT snapshot we will figure out the mode by
   // sniffing the feature string in the snapshot.
@@ -841,7 +855,7 @@
     }
     b.AddString("End of function pool.\n\n");
   }
-  THR_Print("%s", b.buf());
+  THR_Print("%s", b.buffer());
 }
 #endif
 
@@ -1025,7 +1039,7 @@
         buffer.AddString(" no-null-safety");
       }
     } else {
-      if (FLAG_null_safety == kNullSafetyOptionStrong) {
+      if (FLAG_sound_null_safety == kNullSafetyOptionStrong) {
         buffer.AddString(" null-safety");
       } else {
         buffer.AddString(" no-null-safety");
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index f82a6ba..f190dcc 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -10,6 +10,7 @@
 
 #include "lib/stacktrace.h"
 #include "platform/assert.h"
+#include "platform/unicode.h"
 #include "vm/class_finalizer.h"
 #include "vm/clustered_snapshot.h"
 #include "vm/compilation_trace.h"
@@ -22,7 +23,6 @@
 #include "vm/debugger.h"
 #include "vm/dwarf.h"
 #include "vm/elf.h"
-#include "platform/unicode.h"
 #include "vm/exceptions.h"
 #include "vm/flags.h"
 #include "vm/growable_array.h"
@@ -148,16 +148,9 @@
 static InstancePtr GetListInstance(Zone* zone, const Object& obj) {
   if (obj.IsInstance()) {
     ObjectStore* object_store = Isolate::Current()->object_store();
-    Type& list_rare_type =
+    const Type& list_rare_type =
         Type::Handle(zone, object_store->non_nullable_list_rare_type());
-    if (list_rare_type.IsNull()) {
-      const Library& core_lib = Library::Handle(zone, Library::CoreLibrary());
-      const Class& list_class =
-          Class::Handle(zone, core_lib.LookupClass(Symbols::List()));
-      ASSERT(!list_class.IsNull());
-      list_rare_type ^= list_class.RareType();
-      object_store->set_non_nullable_list_rare_type(list_rare_type);
-    }
+    ASSERT(!list_rare_type.IsNull());
     const Instance& instance = Instance::Cast(obj);
     const Class& obj_class = Class::Handle(zone, obj.clazz());
     if (Class::IsSubtypeOf(obj_class, Object::null_type_arguments(),
@@ -172,16 +165,9 @@
 static InstancePtr GetMapInstance(Zone* zone, const Object& obj) {
   if (obj.IsInstance()) {
     ObjectStore* object_store = Isolate::Current()->object_store();
-    Type& map_rare_type =
+    const Type& map_rare_type =
         Type::Handle(zone, object_store->non_nullable_map_rare_type());
-    if (map_rare_type.IsNull()) {
-      const Library& core_lib = Library::Handle(zone, Library::CoreLibrary());
-      const Class& map_class =
-          Class::Handle(zone, core_lib.LookupClass(Symbols::Map()));
-      ASSERT(!map_class.IsNull());
-      map_rare_type ^= map_class.RareType();
-      object_store->set_non_nullable_map_rare_type(map_rare_type);
-    }
+    ASSERT(!map_rare_type.IsNull());
     const Instance& instance = Instance::Cast(obj);
     const Class& obj_class = Class::Handle(zone, obj.clazz());
     if (Class::IsSubtypeOf(obj_class, Object::null_type_arguments(),
@@ -704,6 +690,14 @@
 #endif
   return reinterpret_cast<FinalizablePersistentHandle*>(handle);
 }
+FinalizablePersistentHandle* FinalizablePersistentHandle::Cast(
+    Dart_FinalizableHandle handle) {
+#if defined(DEBUG)
+  ApiState* state = IsolateGroup::Current()->api_state();
+  ASSERT(state->IsValidFinalizableHandle(handle));
+#endif
+  return reinterpret_cast<FinalizablePersistentHandle*>(handle);
+}
 
 void FinalizablePersistentHandle::Finalize(
     IsolateGroup* isolate_group,
@@ -711,13 +705,24 @@
   if (!handle->raw()->IsHeapObject()) {
     return;  // Free handle.
   }
-  Dart_WeakPersistentHandleFinalizer callback = handle->callback();
-  ASSERT(callback != NULL);
   void* peer = handle->peer();
-  Dart_WeakPersistentHandle object = handle->apiHandle();
-  (*callback)(isolate_group->embedder_data(), object, peer);
   ApiState* state = isolate_group->api_state();
   ASSERT(state != NULL);
+
+  ASSERT(handle->auto_delete());
+
+  if (handle->callback_signature_ == CallbackSignature::kHandleFinalizer) {
+    Dart_HandleFinalizer callback = handle->callback();
+    ASSERT(callback != NULL);
+    (*callback)(isolate_group->embedder_data(), peer);
+  } else {
+    Dart_WeakPersistentHandleFinalizer callback =
+        handle->CallbackWeakFinalizer();
+    ASSERT(callback != NULL);
+    Dart_WeakPersistentHandle object = handle->ApiWeakPersistentHandle();
+    (*callback)(isolate_group->embedder_data(), object, peer);
+  }
+
   state->FreeWeakPersistentHandle(handle);
 }
 
@@ -934,6 +939,19 @@
   return Api::NewHandle(thread, weak_ref->raw());
 }
 
+static Dart_Handle HandleFromFinalizable(Dart_FinalizableHandle object) {
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  CHECK_ISOLATE(isolate);
+  ApiState* state = isolate->group()->api_state();
+  ASSERT(state != NULL);
+  TransitionNativeToVM transition(thread);
+  NoSafepointScope no_safepoint_scope;
+  FinalizablePersistentHandle* weak_ref =
+      FinalizablePersistentHandle::Cast(object);
+  return Api::NewHandle(thread, weak_ref->raw());
+}
+
 DART_EXPORT Dart_PersistentHandle Dart_NewPersistentHandle(Dart_Handle object) {
   DARTSCOPE(Thread::Current());
   Isolate* I = T->isolate();
@@ -957,7 +975,7 @@
   obj1_ref->set_raw(obj2_ref);
 }
 
-static Dart_WeakPersistentHandle AllocateFinalizableHandle(
+static Dart_WeakPersistentHandle AllocateWeakPersistentHandle(
     Thread* thread,
     const Object& ref,
     void* peer,
@@ -968,11 +986,12 @@
   }
   FinalizablePersistentHandle* finalizable_ref =
       FinalizablePersistentHandle::New(thread->isolate(), ref, peer, callback,
-                                       external_allocation_size);
-  return finalizable_ref->apiHandle();
+                                       external_allocation_size,
+                                       /*auto_delete=*/true);
+  return finalizable_ref->ApiWeakPersistentHandle();
 }
 
-static Dart_WeakPersistentHandle AllocateFinalizableHandle(
+static Dart_WeakPersistentHandle AllocateWeakPersistentHandle(
     Thread* thread,
     Dart_Handle object,
     void* peer,
@@ -981,6 +1000,36 @@
   REUSABLE_OBJECT_HANDLESCOPE(thread);
   Object& ref = thread->ObjectHandle();
   ref = Api::UnwrapHandle(object);
+  return AllocateWeakPersistentHandle(thread, ref, peer,
+                                      external_allocation_size, callback);
+}
+
+static Dart_FinalizableHandle AllocateFinalizableHandle(
+    Thread* thread,
+    const Object& ref,
+    void* peer,
+    intptr_t external_allocation_size,
+    Dart_HandleFinalizer callback) {
+  if (!ref.raw()->IsHeapObject()) {
+    return NULL;
+  }
+
+  FinalizablePersistentHandle* finalizable_ref =
+      FinalizablePersistentHandle::New(thread->isolate(), ref, peer, callback,
+                                       external_allocation_size,
+                                       /*auto_delete=*/true);
+  return finalizable_ref->ApiFinalizableHandle();
+}
+
+static Dart_FinalizableHandle AllocateFinalizableHandle(
+    Thread* thread,
+    Dart_Handle object,
+    void* peer,
+    intptr_t external_allocation_size,
+    Dart_HandleFinalizer callback) {
+  REUSABLE_OBJECT_HANDLESCOPE(thread);
+  Object& ref = thread->ObjectHandle();
+  ref = Api::UnwrapHandle(object);
   return AllocateFinalizableHandle(thread, ref, peer, external_allocation_size,
                                    callback);
 }
@@ -996,6 +1045,22 @@
     return NULL;
   }
   TransitionNativeToVM transition(thread);
+
+  return AllocateWeakPersistentHandle(thread, object, peer,
+                                      external_allocation_size, callback);
+}
+
+DART_EXPORT Dart_FinalizableHandle
+Dart_NewFinalizableHandle(Dart_Handle object,
+                          void* peer,
+                          intptr_t external_allocation_size,
+                          Dart_HandleFinalizer callback) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  if (callback == nullptr) {
+    return nullptr;
+  }
+  TransitionNativeToVM transition(thread);
   return AllocateFinalizableHandle(thread, object, peer,
                                    external_allocation_size, callback);
 }
@@ -1012,6 +1077,21 @@
   weak_ref->UpdateExternalSize(external_size, isolate_group);
 }
 
+DART_EXPORT void Dart_UpdateFinalizableExternalSize(
+    Dart_FinalizableHandle object,
+    Dart_Handle strong_ref_to_object,
+    intptr_t external_allocation_size) {
+  if (!::Dart_IdentityEquals(strong_ref_to_object,
+                             HandleFromFinalizable(object))) {
+    FATAL1(
+        "%s expects arguments 'object' and 'strong_ref_to_object' to point to "
+        "the same object.",
+        CURRENT_FUNC);
+  }
+  auto wph_object = reinterpret_cast<Dart_WeakPersistentHandle>(object);
+  ::Dart_UpdateExternalSize(wph_object, external_allocation_size);
+}
+
 DART_EXPORT void Dart_DeletePersistentHandle(Dart_PersistentHandle object) {
   IsolateGroup* isolate_group = IsolateGroup::Current();
   CHECK_ISOLATE_GROUP(isolate_group);
@@ -1039,6 +1119,22 @@
   state->FreeWeakPersistentHandle(weak_ref);
 }
 
+DART_EXPORT void Dart_DeleteFinalizableHandle(
+    Dart_FinalizableHandle object,
+    Dart_Handle strong_ref_to_object) {
+  if (!::Dart_IdentityEquals(strong_ref_to_object,
+                             HandleFromFinalizable(object))) {
+    FATAL1(
+        "%s expects arguments 'object' and 'strong_ref_to_object' to point to "
+        "the same object.",
+        CURRENT_FUNC);
+  }
+
+  auto wph_object = reinterpret_cast<Dart_WeakPersistentHandle>(object);
+
+  ::Dart_DeleteWeakPersistentHandle(wph_object);
+}
+
 // --- Initialization and Globals ---
 
 DART_EXPORT const char* Dart_VersionString() {
@@ -1160,7 +1256,7 @@
                is_new_group ? nullptr : group, isolate_data));
     if (error_obj.IsNull()) {
 #if defined(DEBUG) && !defined(DART_PRECOMPILED_RUNTIME)
-      if (FLAG_check_function_fingerprints && source->kernel_buffer == NULL) {
+      if (FLAG_check_function_fingerprints && !FLAG_precompiled_mode) {
         Library::CheckFunctionFingerprints();
       }
 #endif  // defined(DEBUG) && !defined(DART_PRECOMPILED_RUNTIME).
@@ -2416,14 +2512,9 @@
   const Object& obj = Object::Handle(Z, Api::UnwrapHandle(handle));
   if (obj.IsInstance()) {
     ObjectStore* object_store = T->isolate()->object_store();
-    Type& future_rare_type =
+    const Type& future_rare_type =
         Type::Handle(Z, object_store->non_nullable_future_rare_type());
-    if (future_rare_type.IsNull()) {
-      const Class& future_class = Class::Handle(object_store->future_class());
-      ASSERT(!future_class.IsNull());
-      future_rare_type ^= future_class.RareType();
-      object_store->set_non_nullable_future_rare_type(future_rare_type);
-    }
+    ASSERT(!future_rare_type.IsNull());
     const Class& obj_class = Class::Handle(Z, obj.clazz());
     bool is_future = Class::IsSubtypeOf(
         obj_class, Object::null_type_arguments(), Nullability::kNonNullable,
@@ -3051,7 +3142,7 @@
   DARTSCOPE(Thread::Current());
   if (T->isolate()->null_safety() && element_type_id != Dart_CoreType_Dynamic) {
     return Api::NewError(
-        "Cannot use legacy types with --null-safety enabled. "
+        "Cannot use legacy types with --sound-null-safety enabled. "
         "Use Dart_NewListOfType or Dart_NewListOfTypeFilled instead.");
   }
   CHECK_LENGTH(length, Array::kMaxElements);
@@ -3729,11 +3820,21 @@
     case kExternalTypedDataFloat64ArrayCid:
       type = Dart_TypedData_kFloat64;
       break;
+    case kTypedDataInt32x4ArrayCid:
+    case kTypedDataInt32x4ArrayViewCid:
+    case kExternalTypedDataInt32x4ArrayCid:
+      type = Dart_TypedData_kInt32x4;
+      break;
     case kTypedDataFloat32x4ArrayCid:
     case kTypedDataFloat32x4ArrayViewCid:
     case kExternalTypedDataFloat32x4ArrayCid:
       type = Dart_TypedData_kFloat32x4;
       break;
+    case kTypedDataFloat64x2ArrayCid:
+    case kTypedDataFloat64x2ArrayViewCid:
+    case kExternalTypedDataFloat64x2ArrayCid:
+      type = Dart_TypedData_kFloat64x2;
+      break;
     default:
       type = Dart_TypedData_kInvalid;
       break;
@@ -3825,13 +3926,16 @@
   CHECK_LENGTH(length, ExternalTypedData::MaxElements(cid));
   Zone* zone = thread->zone();
   intptr_t bytes = length * ExternalTypedData::ElementSizeInBytes(cid);
-  const ExternalTypedData& result = ExternalTypedData::Handle(
-      zone,
-      ExternalTypedData::New(cid, reinterpret_cast<uint8_t*>(data), length,
-                             thread->heap()->SpaceForExternal(bytes)));
-  if (callback != NULL) {
-    AllocateFinalizableHandle(thread, result, peer, external_allocation_size,
-                              callback);
+  auto& cls = Class::Handle(zone, thread->isolate()->class_table()->At(cid));
+  auto& result = Object::Handle(zone, cls.EnsureIsAllocateFinalized(thread));
+  if (result.IsError()) {
+    return Api::NewHandle(thread, result.raw());
+  }
+  result = ExternalTypedData::New(cid, reinterpret_cast<uint8_t*>(data), length,
+                                  thread->heap()->SpaceForExternal(bytes));
+  if (callback != nullptr) {
+    AllocateWeakPersistentHandle(thread, result, peer, external_allocation_size,
+                                 callback);
   }
   return Api::NewHandle(thread, result.raw());
 }
@@ -3906,8 +4010,12 @@
       return NewTypedData(T, kTypedDataFloat32ArrayCid, length);
     case Dart_TypedData_kFloat64:
       return NewTypedData(T, kTypedDataFloat64ArrayCid, length);
+    case Dart_TypedData_kInt32x4:
+      return NewTypedData(T, kTypedDataInt32x4ArrayCid, length);
     case Dart_TypedData_kFloat32x4:
       return NewTypedData(T, kTypedDataFloat32x4ArrayCid, length);
+    case Dart_TypedData_kFloat64x2:
+      return NewTypedData(T, kTypedDataFloat64x2ArrayCid, length);
     default:
       return Api::NewError("%s expects argument 'type' to be of 'TypedData'",
                            CURRENT_FUNC);
@@ -3983,10 +4091,18 @@
       return NewExternalTypedData(T, kExternalTypedDataFloat64ArrayCid, data,
                                   length, peer, external_allocation_size,
                                   callback);
+    case Dart_TypedData_kInt32x4:
+      return NewExternalTypedData(T, kExternalTypedDataInt32x4ArrayCid, data,
+                                  length, peer, external_allocation_size,
+                                  callback);
     case Dart_TypedData_kFloat32x4:
       return NewExternalTypedData(T, kExternalTypedDataFloat32x4ArrayCid, data,
                                   length, peer, external_allocation_size,
                                   callback);
+    case Dart_TypedData_kFloat64x2:
+      return NewExternalTypedData(T, kExternalTypedDataFloat64x2ArrayCid, data,
+                                  length, peer, external_allocation_size,
+                                  callback);
     default:
       return Api::NewError(
           "%s expects argument 'type' to be of"
@@ -4270,6 +4386,8 @@
         CURRENT_FUNC);
   }
   Class& cls = Class::Handle(Z, type_obj.type_class());
+  CHECK_ERROR_HANDLE(cls.EnsureIsAllocateFinalized(T));
+
   TypeArguments& type_arguments =
       TypeArguments::Handle(Z, type_obj.arguments());
 
@@ -5419,6 +5537,14 @@
   return Api::NewHandle(T, String::New(resolved_uri));
 }
 
+DART_EXPORT Dart_Handle
+Dart_SetDeferredLoadHandler(Dart_DeferredLoadHandler handler) {
+  Isolate* isolate = Isolate::Current();
+  CHECK_ISOLATE(isolate);
+  isolate->group()->set_deferred_load_handler(handler);
+  return Api::Success();
+}
+
 DART_EXPORT Dart_Handle Dart_LoadScriptFromKernel(const uint8_t* buffer,
                                                   intptr_t buffer_size) {
 #if defined(DART_PRECOMPILED_RUNTIME)
@@ -5599,7 +5725,7 @@
                                      Dart_Handle* type_arguments) {
   if (Thread::Current()->isolate()->null_safety()) {
     return Api::NewError(
-        "Cannot use legacy types with --null-safety enabled. "
+        "Cannot use legacy types with --sound-null-safety enabled. "
         "Use Dart_GetNullableType or Dart_GetNonNullableType instead.");
   }
   return GetTypeCommon(library, class_name, number_of_type_arguments,
@@ -5774,6 +5900,9 @@
       kernel::KernelLoader::LoadEntireProgram(program.get(), false);
   program.reset();
 
+  IsolateGroupSource* source = Isolate::Current()->source();
+  source->add_loaded_blob(Z, td);
+
   return Api::NewHandle(T, result.raw());
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
@@ -5858,6 +5987,78 @@
   return Api::Success();
 }
 
+static Dart_Handle DeferredLoadComplete(intptr_t loading_unit_id,
+                                        bool error,
+                                        const uint8_t* snapshot_data,
+                                        const uint8_t* snapshot_instructions,
+                                        const char* error_message,
+                                        bool transient_error) {
+  DARTSCOPE(Thread::Current());
+  API_TIMELINE_DURATION(T);
+  Isolate* I = T->isolate();
+  CHECK_CALLBACK_STATE(T);
+
+  const Array& loading_units =
+      Array::Handle(I->object_store()->loading_units());
+  if (loading_units.IsNull() || (loading_unit_id < LoadingUnit::kRootId) ||
+      (loading_unit_id >= loading_units.Length())) {
+    return Api::NewError("Invalid loading unit");
+  }
+  LoadingUnit& unit = LoadingUnit::Handle();
+  unit ^= loading_units.At(loading_unit_id);
+  if (unit.loaded()) {
+    return Api::NewError("Unit already loaded");
+  }
+
+  if (error) {
+    CHECK_NULL(error_message);
+    unit.CompleteLoad(String::Handle(String::New(error_message)),
+                      transient_error);
+  } else {
+#if defined(SUPPORT_TIMELINE)
+    TimelineBeginEndScope tbes(T, Timeline::GetIsolateStream(),
+                               "ReadUnitSnapshot");
+#endif  // defined(SUPPORT_TIMELINE)
+    const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_data);
+    if (snapshot == NULL) {
+      return Api::NewError("Invalid snapshot");
+    }
+    if (!IsSnapshotCompatible(Dart::vm_snapshot_kind(), snapshot->kind())) {
+      const String& message = String::Handle(String::NewFormatted(
+          "Incompatible snapshot kinds: vm '%s', isolate '%s'",
+          Snapshot::KindToCString(Dart::vm_snapshot_kind()),
+          Snapshot::KindToCString(snapshot->kind())));
+      return Api::NewHandle(T, ApiError::New(message));
+    }
+
+    FullSnapshotReader reader(snapshot, snapshot_instructions, T);
+    const Error& error = Error::Handle(reader.ReadUnitSnapshot(unit));
+    if (!error.IsNull()) {
+      return Api::NewHandle(T, error.raw());
+    }
+
+    unit.CompleteLoad(String::Handle(), false);
+  }
+
+  return Api::Success();
+}
+
+DART_EXPORT Dart_Handle
+Dart_DeferredLoadComplete(intptr_t loading_unit_id,
+                          const uint8_t* snapshot_data,
+                          const uint8_t* snapshot_instructions) {
+  return DeferredLoadComplete(loading_unit_id, false, snapshot_data,
+                              snapshot_instructions, nullptr, false);
+}
+
+DART_EXPORT Dart_Handle
+Dart_DeferredLoadCompleteError(intptr_t loading_unit_id,
+                               const char* error_message,
+                               bool transient) {
+  return DeferredLoadComplete(loading_unit_id, true, nullptr, nullptr,
+                              error_message, transient);
+}
+
 DART_EXPORT Dart_Handle
 Dart_SetNativeResolver(Dart_Handle library,
                        Dart_NativeEntryResolver resolver,
@@ -6033,16 +6234,16 @@
                                        const uint8_t* kernel_buffer,
                                        intptr_t kernel_buffer_size) {
 #if defined(DART_PRECOMPILED_RUNTIME)
-  ASSERT(FLAG_null_safety != kNullSafetyOptionUnspecified);
-  return (FLAG_null_safety == kNullSafetyOptionStrong);
+  ASSERT(FLAG_sound_null_safety != kNullSafetyOptionUnspecified);
+  return (FLAG_sound_null_safety == kNullSafetyOptionStrong);
 #else
   bool null_safety;
-  if (FLAG_null_safety == kNullSafetyOptionUnspecified) {
+  if (FLAG_sound_null_safety == kNullSafetyOptionUnspecified) {
     null_safety = Dart::DetectNullSafety(
         script_uri, snapshot_data, snapshot_instructions, kernel_buffer,
         kernel_buffer_size, package_config, original_working_directory);
   } else {
-    null_safety = (FLAG_null_safety == kNullSafetyOptionStrong);
+    null_safety = (FLAG_sound_null_safety == kNullSafetyOptionStrong);
   }
   return null_safety;
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
@@ -6423,6 +6624,127 @@
 #if !defined(TARGET_ARCH_IA32) && defined(DART_PRECOMPILER)
 static const intptr_t kInitialSize = 2 * MB;
 static const intptr_t kInitialDebugSize = 1 * MB;
+
+static void CreateAppAOTSnapshot(
+    Dart_StreamingWriteCallback callback,
+    void* callback_data,
+    bool strip,
+    bool as_elf,
+    void* debug_callback_data,
+    GrowableArray<LoadingUnitSerializationData*>* units,
+    LoadingUnitSerializationData* unit,
+    uint32_t program_hash) {
+  Thread* T = Thread::Current();
+
+  NOT_IN_PRODUCT(TimelineBeginEndScope tbes2(T, Timeline::GetIsolateStream(),
+                                             "WriteAppAOTSnapshot"));
+
+  uint8_t* vm_snapshot_data_buffer = nullptr;
+  uint8_t* vm_snapshot_instructions_buffer = nullptr;
+  uint8_t* isolate_snapshot_data_buffer = nullptr;
+  uint8_t* isolate_snapshot_instructions_buffer = nullptr;
+
+  const bool generate_debug = debug_callback_data != nullptr;
+
+  if (as_elf) {
+    StreamingWriteStream elf_stream(kInitialSize, callback, callback_data);
+    StreamingWriteStream debug_stream(generate_debug ? kInitialDebugSize : 0,
+                                      callback, debug_callback_data);
+
+    auto const dwarf = strip ? nullptr : new (Z) Dwarf(Z);
+    auto const elf = new (Z) Elf(Z, &elf_stream, Elf::Type::Snapshot, dwarf);
+    // Re-use the same DWARF object if the snapshot is unstripped.
+    auto const debug_elf =
+        generate_debug ? new (Z) Elf(Z, &debug_stream, Elf::Type::DebugInfo,
+                                     strip ? new (Z) Dwarf(Z) : dwarf)
+                       : nullptr;
+
+    BlobImageWriter vm_image_writer(T, &vm_snapshot_instructions_buffer,
+                                    ApiReallocate, kInitialSize, debug_elf,
+                                    elf);
+    BlobImageWriter isolate_image_writer(
+        T, &isolate_snapshot_instructions_buffer, ApiReallocate, kInitialSize,
+        debug_elf, elf);
+    FullSnapshotWriter writer(Snapshot::kFullAOT, &vm_snapshot_data_buffer,
+                              &isolate_snapshot_data_buffer, ApiReallocate,
+                              &vm_image_writer, &isolate_image_writer);
+
+    if (unit == nullptr || unit->id() == LoadingUnit::kRootId) {
+      writer.WriteFullSnapshot(units);
+    } else {
+      writer.WriteUnitSnapshot(units, unit, program_hash);
+    }
+
+    elf->Finalize();
+    if (debug_elf != nullptr) {
+      debug_elf->Finalize();
+    }
+  } else {
+    StreamingWriteStream debug_stream(generate_debug ? kInitialDebugSize : 0,
+                                      callback, debug_callback_data);
+
+    auto const elf = generate_debug
+                         ? new (Z) Elf(Z, &debug_stream, Elf::Type::DebugInfo,
+                                       new (Z) Dwarf(Z))
+                         : nullptr;
+
+    AssemblyImageWriter image_writer(T, callback, callback_data, strip, elf);
+    uint8_t* vm_snapshot_data_buffer = NULL;
+    uint8_t* isolate_snapshot_data_buffer = NULL;
+    FullSnapshotWriter writer(Snapshot::kFullAOT, &vm_snapshot_data_buffer,
+                              &isolate_snapshot_data_buffer, ApiReallocate,
+                              &image_writer, &image_writer);
+
+    if (unit == nullptr || unit->id() == LoadingUnit::kRootId) {
+      writer.WriteFullSnapshot(units);
+    } else {
+      writer.WriteUnitSnapshot(units, unit, program_hash);
+    }
+    image_writer.Finalize();
+  }
+}
+
+static void Split(Dart_CreateLoadingUnitCallback next_callback,
+                  void* next_callback_data,
+                  bool strip,
+                  bool as_elf,
+                  Dart_StreamingWriteCallback write_callback,
+                  Dart_StreamingCloseCallback close_callback) {
+  Thread* T = Thread::Current();
+  ProgramVisitor::AssignUnits(T);
+
+  const Array& loading_units =
+      Array::Handle(T->isolate()->object_store()->loading_units());
+  const uint32_t program_hash = ProgramVisitor::Hash(T);
+  loading_units.SetAt(0, Smi::Handle(Z, Smi::New(program_hash)));
+  GrowableArray<LoadingUnitSerializationData*> data;
+  data.SetLength(loading_units.Length());
+  data[0] = nullptr;
+
+  LoadingUnit& loading_unit = LoadingUnit::Handle();
+  LoadingUnit& parent = LoadingUnit::Handle();
+  for (intptr_t id = 1; id < loading_units.Length(); id++) {
+    loading_unit ^= loading_units.At(id);
+    parent = loading_unit.parent();
+    LoadingUnitSerializationData* parent_data =
+        parent.IsNull() ? nullptr : data[parent.id()];
+    data[id] = new LoadingUnitSerializationData(id, parent_data);
+  }
+
+  for (intptr_t id = 1; id < loading_units.Length(); id++) {
+    void* write_callback_data = nullptr;
+    void* write_debug_callback_data = nullptr;
+    next_callback(next_callback_data, id, &write_callback_data,
+                  &write_debug_callback_data);
+    CreateAppAOTSnapshot(write_callback, write_callback_data, strip, as_elf,
+                         write_debug_callback_data, &data, data[id],
+                         program_hash);
+    close_callback(write_callback_data);
+    if (write_debug_callback_data != nullptr) {
+      close_callback(write_debug_callback_data);
+    }
+  }
+}
 #endif
 
 DART_EXPORT Dart_Handle
@@ -6442,26 +6764,43 @@
   API_TIMELINE_DURATION(T);
   CHECK_NULL(callback);
 
-  TIMELINE_DURATION(T, Isolate, "WriteAppAOTSnapshot");
-  const bool generate_debug = debug_callback_data != nullptr;
+  // Mark as not split.
+  T->isolate()->object_store()->set_loading_units(Object::null_array());
 
-  StreamingWriteStream debug_stream(generate_debug ? kInitialDebugSize : 0,
-                                    callback, debug_callback_data);
+  CreateAppAOTSnapshot(callback, callback_data, strip, /*as_elf*/ false,
+                       debug_callback_data, nullptr, nullptr, 0);
 
-  auto const elf = generate_debug
-                       ? new (Z) Elf(Z, &debug_stream, Elf::Type::DebugInfo,
-                                     new (Z) Dwarf(Z))
-                       : nullptr;
+  return Api::Success();
+#endif
+}
 
-  AssemblyImageWriter image_writer(T, callback, callback_data, strip, elf);
-  uint8_t* vm_snapshot_data_buffer = NULL;
-  uint8_t* isolate_snapshot_data_buffer = NULL;
-  FullSnapshotWriter writer(Snapshot::kFullAOT, &vm_snapshot_data_buffer,
-                            &isolate_snapshot_data_buffer, ApiReallocate,
-                            &image_writer, &image_writer);
+DART_EXPORT Dart_Handle Dart_CreateAppAOTSnapshotAsAssemblies(
+    Dart_CreateLoadingUnitCallback next_callback,
+    void* next_callback_data,
+    bool strip,
+    Dart_StreamingWriteCallback write_callback,
+    Dart_StreamingCloseCallback close_callback) {
+#if defined(TARGET_ARCH_IA32)
+  return Api::NewError("AOT compilation is not supported on IA32.");
+#elif defined(TARGET_OS_WINDOWS)
+  return Api::NewError("Assembly generation is not implemented for Windows.");
+#elif !defined(DART_PRECOMPILER)
+  return Api::NewError(
+      "This VM was built without support for AOT compilation.");
+#else
+  if (FLAG_use_bare_instructions) {
+    return Api::NewError(
+        "Splitting is not compatible with --use_bare_instructions.");
+  }
 
-  writer.WriteFullSnapshot();
-  image_writer.Finalize();
+  DARTSCOPE(Thread::Current());
+  API_TIMELINE_DURATION(T);
+  CHECK_NULL(next_callback);
+  CHECK_NULL(write_callback);
+  CHECK_NULL(close_callback);
+
+  Split(next_callback, next_callback_data, strip, /*as_elf*/ false,
+        write_callback, close_callback);
 
   return Api::Success();
 #endif
@@ -6507,45 +6846,44 @@
 #else
   DARTSCOPE(Thread::Current());
   API_TIMELINE_DURATION(T);
+  CHECK_NULL(callback);
 
-  NOT_IN_PRODUCT(TimelineBeginEndScope tbes2(T, Timeline::GetIsolateStream(),
-                                             "WriteAppAOTSnapshot"));
+  // Mark as not split.
+  T->isolate()->object_store()->set_loading_units(Object::null_array());
 
-  uint8_t* vm_snapshot_data_buffer = nullptr;
-  uint8_t* vm_snapshot_instructions_buffer = nullptr;
-  uint8_t* isolate_snapshot_data_buffer = nullptr;
-  uint8_t* isolate_snapshot_instructions_buffer = nullptr;
+  CreateAppAOTSnapshot(callback, callback_data, strip, /*as_elf*/ true,
+                       debug_callback_data, nullptr, nullptr, 0);
 
-  const bool generate_debug = debug_callback_data != nullptr;
+  return Api::Success();
+#endif
+}
 
-  StreamingWriteStream elf_stream(kInitialSize, callback, callback_data);
-  StreamingWriteStream debug_stream(generate_debug ? kInitialDebugSize : 0,
-                                    callback, debug_callback_data);
-
-  auto const dwarf = strip ? nullptr : new (Z) Dwarf(Z);
-  auto const elf = new (Z) Elf(Z, &elf_stream, Elf::Type::Snapshot, dwarf);
-  // Re-use the same DWARF object if the snapshot is unstripped.
-  auto const debug_elf =
-      generate_debug ? new (Z) Elf(Z, &debug_stream, Elf::Type::DebugInfo,
-                                   strip ? new (Z) Dwarf(Z) : dwarf)
-                     : nullptr;
-
-  BlobImageWriter vm_image_writer(T, &vm_snapshot_instructions_buffer,
-                                  ApiReallocate, kInitialSize, debug_elf, elf);
-  BlobImageWriter isolate_image_writer(T, &isolate_snapshot_instructions_buffer,
-                                       ApiReallocate, kInitialSize, debug_elf,
-                                       elf);
-  FullSnapshotWriter writer(Snapshot::kFullAOT, &vm_snapshot_data_buffer,
-                            &isolate_snapshot_data_buffer, ApiReallocate,
-                            &vm_image_writer, &isolate_image_writer);
-
-  writer.WriteFullSnapshot();
-
-  elf->Finalize();
-  if (debug_elf != nullptr) {
-    debug_elf->Finalize();
+DART_EXPORT Dart_Handle
+Dart_CreateAppAOTSnapshotAsElfs(Dart_CreateLoadingUnitCallback next_callback,
+                                void* next_callback_data,
+                                bool strip,
+                                Dart_StreamingWriteCallback write_callback,
+                                Dart_StreamingCloseCallback close_callback) {
+#if defined(TARGET_ARCH_IA32)
+  return Api::NewError("AOT compilation is not supported on IA32.");
+#elif !defined(DART_PRECOMPILER)
+  return Api::NewError(
+      "This VM was built without support for AOT compilation.");
+#else
+  if (FLAG_use_bare_instructions) {
+    return Api::NewError(
+        "Splitting is not compatible with --use_bare_instructions.");
   }
 
+  DARTSCOPE(Thread::Current());
+  API_TIMELINE_DURATION(T);
+  CHECK_NULL(next_callback);
+  CHECK_NULL(write_callback);
+  CHECK_NULL(close_callback);
+
+  Split(next_callback, next_callback_data, strip, /*as_elf*/ true,
+        write_callback, close_callback);
+
   return Api::Success();
 #endif
 }
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 1940670..84681a8 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -2792,12 +2792,16 @@
 static void NopCallback(void* isolate_callback_data,
                         Dart_WeakPersistentHandle handle,
                         void* peer) {}
+static void NopCallback(void* isolate_callback_data, void* peer) {}
 
 static void UnreachedCallback(void* isolate_callback_data,
                               Dart_WeakPersistentHandle handle,
                               void* peer) {
   UNREACHABLE();
 }
+static void UnreachedCallback(void* isolate_callback_data, void* peer) {
+  UNREACHABLE();
+}
 
 static void ExternalTypedDataFinalizer(void* isolate_callback_data,
                                        Dart_WeakPersistentHandle handle,
@@ -2826,9 +2830,7 @@
   }
 }
 
-static void SlowFinalizer(void* isolate_callback_data,
-                          Dart_WeakPersistentHandle handle,
-                          void* peer) {
+static void SlowFinalizer(void* isolate_callback_data, void* peer) {
   OS::Sleep(10);
   intptr_t* count = reinterpret_cast<intptr_t*>(peer);
   (*count)++;
@@ -2839,9 +2841,36 @@
   for (intptr_t i = 0; i < 10; i++) {
     Dart_EnterScope();
     Dart_Handle str1 = Dart_NewStringFromCString("Live fast");
-    Dart_NewWeakPersistentHandle(str1, &count, 0, SlowFinalizer);
+    Dart_NewFinalizableHandle(str1, &count, 0, SlowFinalizer);
     Dart_Handle str2 = Dart_NewStringFromCString("Die young");
-    Dart_NewWeakPersistentHandle(str2, &count, 0, SlowFinalizer);
+    Dart_NewFinalizableHandle(str2, &count, 0, SlowFinalizer);
+    Dart_ExitScope();
+
+    {
+      TransitionNativeToVM transition(thread);
+      GCTestHelper::CollectAllGarbage();
+    }
+  }
+
+  EXPECT_EQ(20, count);
+}
+
+static void SlowWeakPersistentHandle(void* isolate_callback_data,
+                                     Dart_WeakPersistentHandle handle,
+                                     void* peer) {
+  OS::Sleep(10);
+  intptr_t* count = reinterpret_cast<intptr_t*>(peer);
+  (*count)++;
+}
+
+TEST_CASE(DartAPI_SlowWeakPersistenhandle) {
+  intptr_t count = 0;
+  for (intptr_t i = 0; i < 10; i++) {
+    Dart_EnterScope();
+    Dart_Handle str1 = Dart_NewStringFromCString("Live fast");
+    Dart_NewWeakPersistentHandle(str1, &count, 0, SlowWeakPersistentHandle);
+    Dart_Handle str2 = Dart_NewStringFromCString("Die young");
+    Dart_NewWeakPersistentHandle(str2, &count, 0, SlowWeakPersistentHandle);
     Dart_ExitScope();
 
     {
@@ -3219,6 +3248,122 @@
   }
 }
 
+static Dart_FinalizableHandle finalizable_new_ref = nullptr;
+static void* finalizable_new_ref_peer = 0;
+static Dart_FinalizableHandle finalizable_old_ref = nullptr;
+static void* finalizable_old_ref_peer = 0;
+
+static void FinalizableHandleCallback(void* isolate_callback_data, void* peer) {
+  if (peer == finalizable_new_ref_peer) {
+    finalizable_new_ref_peer = 0;
+    finalizable_new_ref = nullptr;
+  } else if (peer == finalizable_old_ref_peer) {
+    finalizable_old_ref_peer = 0;
+    finalizable_old_ref = nullptr;
+  }
+}
+
+TEST_CASE(DartAPI_FinalizableHandle) {
+  // GCs due to allocations or weak handle creation can cause early promotion
+  // and interfer with the scenario this test is verifying.
+  NoHeapGrowthControlScope force_growth;
+
+  void* peer = reinterpret_cast<void*>(0);
+  Dart_Handle local_new_ref = Dart_Null();
+  finalizable_new_ref = Dart_NewFinalizableHandle(local_new_ref, peer, 0,
+                                                  FinalizableHandleCallback);
+  finalizable_new_ref_peer = peer;
+
+  peer = reinterpret_cast<void*>(1);
+  Dart_Handle local_old_ref = Dart_Null();
+  finalizable_old_ref = Dart_NewFinalizableHandle(local_old_ref, peer, 0,
+                                                  FinalizableHandleCallback);
+  finalizable_old_ref_peer = peer;
+
+  {
+    Dart_EnterScope();
+
+    // Create an object in new space.
+    Dart_Handle new_ref = AllocateNewString("new string");
+    EXPECT_VALID(new_ref);
+
+    // Create an object in old space.
+    Dart_Handle old_ref = AllocateOldString("old string");
+    EXPECT_VALID(old_ref);
+
+    // Create a weak ref to the new space object.
+    peer = reinterpret_cast<void*>(2);
+    finalizable_new_ref =
+        Dart_NewFinalizableHandle(new_ref, peer, 0, FinalizableHandleCallback);
+    finalizable_new_ref_peer = peer;
+
+    // Create a weak ref to the old space object.
+    peer = reinterpret_cast<void*>(3);
+    finalizable_old_ref =
+        Dart_NewFinalizableHandle(old_ref, peer, 0, FinalizableHandleCallback);
+    finalizable_old_ref_peer = peer;
+
+    {
+      TransitionNativeToVM transition(thread);
+      // Garbage collect new space.
+      GCTestHelper::CollectNewSpace();
+    }
+
+    // Nothing should be invalidated or cleared.
+    EXPECT_VALID(new_ref);
+    EXPECT(!Dart_IsNull(new_ref));
+    EXPECT_VALID(old_ref);
+    EXPECT(!Dart_IsNull(old_ref));
+
+    {
+      TransitionNativeToVM transition(thread);
+      // Garbage collect old space.
+      GCTestHelper::CollectOldSpace();
+    }
+
+    // Nothing should be invalidated or cleared.
+    EXPECT_VALID(new_ref);
+    EXPECT(!Dart_IsNull(new_ref));
+    EXPECT_VALID(old_ref);
+    EXPECT(!Dart_IsNull(old_ref));
+
+    // Delete local (strong) references.
+    Dart_ExitScope();
+  }
+
+  {
+    TransitionNativeToVM transition(thread);
+    // Garbage collect new space again.
+    GCTestHelper::CollectNewSpace();
+  }
+
+  {
+    Dart_EnterScope();
+    // Weak ref to new space object should now be cleared.
+    EXPECT(finalizable_new_ref == nullptr);
+    Dart_ExitScope();
+  }
+
+  {
+    TransitionNativeToVM transition(thread);
+    // Garbage collect old space again.
+    GCTestHelper::CollectOldSpace();
+  }
+
+  {
+    Dart_EnterScope();
+    // Weak ref to old space object should now be cleared.
+    EXPECT(finalizable_new_ref == nullptr);
+    EXPECT(finalizable_old_ref == nullptr);
+    Dart_ExitScope();
+  }
+
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::CollectAllGarbage();
+  }
+}
+
 TEST_CASE(DartAPI_WeakPersistentHandleErrors) {
   Dart_EnterScope();
 
@@ -3239,6 +3384,26 @@
   Dart_ExitScope();
 }
 
+TEST_CASE(DartAPI_FinalizableHandleErrors) {
+  Dart_EnterScope();
+
+  // NULL callback.
+  Dart_Handle obj1 = NewString("new string");
+  EXPECT_VALID(obj1);
+  Dart_FinalizableHandle ref1 =
+      Dart_NewFinalizableHandle(obj1, nullptr, 0, nullptr);
+  EXPECT_EQ(ref1, static_cast<void*>(nullptr));
+
+  // Immediate object.
+  Dart_Handle obj2 = Dart_NewInteger(0);
+  EXPECT_VALID(obj2);
+  Dart_FinalizableHandle ref2 =
+      Dart_NewFinalizableHandle(obj2, nullptr, 0, FinalizableHandleCallback);
+  EXPECT_EQ(ref2, static_cast<void*>(nullptr));
+
+  Dart_ExitScope();
+}
+
 static Dart_PersistentHandle persistent_handle1;
 static Dart_WeakPersistentHandle weak_persistent_handle2;
 static Dart_WeakPersistentHandle weak_persistent_handle3;
@@ -3285,6 +3450,44 @@
   Dart_ExitScope();
 }
 
+static Dart_FinalizableHandle finalizable_handle3;
+
+static void FinalizableHandlePeerCleanupFinalizer(void* isolate_callback_data,
+                                                  void* peer) {
+  Dart_DeletePersistentHandle(persistent_handle1);
+  Dart_DeleteWeakPersistentHandle(weak_persistent_handle2);
+  *static_cast<int*>(peer) = 42;
+}
+
+TEST_CASE(DartAPI_FinalizableHandleCleanupFinalizer) {
+  Heap* heap = Isolate::Current()->heap();
+
+  const char* kTestString1 = "Test String1";
+  Dart_EnterScope();
+  CHECK_API_SCOPE(thread);
+  Dart_Handle ref1 = Dart_NewStringFromCString(kTestString1);
+  persistent_handle1 = Dart_NewPersistentHandle(ref1);
+  Dart_Handle ref2 = Dart_NewStringFromCString(kTestString1);
+  int peer2 = 0;
+  weak_persistent_handle2 =
+      Dart_NewWeakPersistentHandle(ref2, &peer2, 0, NopCallback);
+  int peer3 = 0;
+  {
+    Dart_EnterScope();
+    Dart_Handle ref3 = Dart_NewStringFromCString(kTestString1);
+    finalizable_handle3 = Dart_NewFinalizableHandle(
+        ref3, &peer3, 0, FinalizableHandlePeerCleanupFinalizer);
+    Dart_ExitScope();
+  }
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::CollectAllGarbage();
+    EXPECT(heap->ExternalInWords(Heap::kOld) == 0);
+    EXPECT(peer3 == 42);
+  }
+  Dart_ExitScope();
+}
+
 static void WeakPersistentHandlePeerFinalizer(void* isolate_callback_data,
                                               Dart_WeakPersistentHandle handle,
                                               void* peer) {
@@ -3313,6 +3516,32 @@
   }
 }
 
+static void FinalizableHandlePeerFinalizer(void* isolate_callback_data,
+                                           void* peer) {
+  *static_cast<int*>(peer) = 42;
+}
+
+TEST_CASE(DartAPI_FinalizableHandleCallback) {
+  Dart_FinalizableHandle weak_ref = nullptr;
+  int peer = 0;
+  {
+    Dart_EnterScope();
+    Dart_Handle obj = NewString("new string");
+    EXPECT_VALID(obj);
+    weak_ref = Dart_NewFinalizableHandle(obj, &peer, 0,
+                                         FinalizableHandlePeerFinalizer);
+    EXPECT(peer == 0);
+    Dart_ExitScope();
+  }
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::CollectOldSpace();
+    EXPECT(peer == 0);
+    GCTestHelper::CollectNewSpace();
+    EXPECT(peer == 42);
+  }
+}
+
 TEST_CASE(DartAPI_WeakPersistentHandleNoCallback) {
   Dart_WeakPersistentHandle weak_ref = NULL;
   int peer = 0;
@@ -3337,6 +3566,35 @@
   }
 }
 
+TEST_CASE(DartAPI_FinalizableHandleNoCallback) {
+  Dart_FinalizableHandle weak_ref = nullptr;
+  Dart_PersistentHandle strong_ref = nullptr;
+  int peer = 0;
+  {
+    Dart_EnterScope();
+    Dart_Handle obj = NewString("new string");
+    EXPECT_VALID(obj);
+    weak_ref = Dart_NewFinalizableHandle(obj, &peer, 0,
+                                         FinalizableHandlePeerFinalizer);
+    strong_ref = Dart_NewPersistentHandle(obj);
+    Dart_ExitScope();
+  }
+  // A finalizer is not invoked on a deleted handle.  Therefore, the
+  // peer value should not change after the referent is collected.
+  Dart_DeleteFinalizableHandle(weak_ref, strong_ref);
+  Dart_DeletePersistentHandle(strong_ref);
+  EXPECT(peer == 0);
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::CollectOldSpace();
+    EXPECT(peer == 0);
+    GCTestHelper::CollectNewSpace();
+    EXPECT(peer == 0);
+  }
+}
+
+Dart_WeakPersistentHandle delete_on_finalization;
+
 VM_UNIT_TEST_CASE(DartAPI_WeakPersistentHandlesCallbackShutdown) {
   TestCase::CreateTestIsolate();
   Dart_EnterScope();
@@ -3349,6 +3607,17 @@
   EXPECT(peer == 42);
 }
 
+VM_UNIT_TEST_CASE(DartAPI_FinalizableHandlesCallbackShutdown) {
+  TestCase::CreateTestIsolate();
+  Dart_EnterScope();
+  Dart_Handle ref = Dart_True();
+  int peer = 1234;
+  Dart_NewFinalizableHandle(ref, &peer, 0, FinalizableHandlePeerFinalizer);
+  Dart_ExitScope();
+  Dart_ShutdownIsolate();
+  EXPECT(peer == 42);
+}
+
 TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSize) {
   Heap* heap = Isolate::Current()->heap();
   EXPECT(heap->ExternalInWords(Heap::kNew) == 0);
@@ -3397,6 +3666,52 @@
   }
 }
 
+TEST_CASE(DartAPI_FinalizableHandleExternalAllocationSize) {
+  Heap* heap = Isolate::Current()->heap();
+  EXPECT(heap->ExternalInWords(Heap::kNew) == 0);
+  EXPECT(heap->ExternalInWords(Heap::kOld) == 0);
+  Dart_FinalizableHandle weak1 = nullptr;
+  static const intptr_t kWeak1ExternalSize = 1 * KB;
+  {
+    Dart_EnterScope();
+    Dart_Handle obj = NewString("weakly referenced string");
+    EXPECT_VALID(obj);
+    weak1 = Dart_NewFinalizableHandle(obj, nullptr, kWeak1ExternalSize,
+                                      NopCallback);
+    Dart_ExitScope();
+  }
+  Dart_PersistentHandle strong_ref = nullptr;
+  Dart_FinalizableHandle weak2 = nullptr;
+  static const intptr_t kWeak2ExternalSize = 2 * KB;
+  {
+    Dart_EnterScope();
+    Dart_Handle obj = NewString("strongly referenced string");
+    EXPECT_VALID(obj);
+    strong_ref = Dart_NewPersistentHandle(obj);
+    weak2 = Dart_NewFinalizableHandle(obj, nullptr, kWeak2ExternalSize,
+                                      NopCallback);
+    EXPECT_VALID(AsHandle(strong_ref));
+    Dart_ExitScope();
+  }
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::CollectOldSpace();
+    EXPECT(heap->ExternalInWords(Heap::kNew) ==
+           (kWeak1ExternalSize + kWeak2ExternalSize) / kWordSize);
+    // Collect weakly referenced string, and promote strongly referenced string.
+    GCTestHelper::CollectNewSpace();
+    GCTestHelper::CollectNewSpace();
+    EXPECT(heap->ExternalInWords(Heap::kNew) == 0);
+    EXPECT(heap->ExternalInWords(Heap::kOld) == kWeak2ExternalSize / kWordSize);
+  }
+  Dart_DeletePersistentHandle(strong_ref);
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::CollectOldSpace();
+    EXPECT(heap->ExternalInWords(Heap::kOld) == 0);
+  }
+}
+
 TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSizeNewspaceGC) {
   Heap* heap = Isolate::Current()->heap();
   Dart_WeakPersistentHandle weak1 = NULL;
@@ -3439,6 +3754,49 @@
   }
 }
 
+TEST_CASE(DartAPI_FinalizableHandleExternalAllocationSizeNewspaceGC) {
+  Heap* heap = Isolate::Current()->heap();
+  Dart_FinalizableHandle weak1 = nullptr;
+  Dart_PersistentHandle strong1 = nullptr;
+  // Large enough to exceed any new space limit. Not actually allocated.
+  const intptr_t kWeak1ExternalSize = 500 * MB;
+  {
+    Dart_EnterScope();
+    Dart_Handle obj = NewString("weakly referenced string");
+    EXPECT_VALID(obj);
+    // Triggers a scavenge immediately, since kWeak1ExternalSize is above limit.
+    weak1 = Dart_NewFinalizableHandle(obj, nullptr, kWeak1ExternalSize,
+                                      NopCallback);
+    strong1 = Dart_NewPersistentHandle(obj);
+    // ... but the object is still alive and not yet promoted, so external size
+    // in new space is still above the limit. Thus, even the following tiny
+    // external allocation will trigger another scavenge.
+    Dart_FinalizableHandle trigger =
+        Dart_NewFinalizableHandle(obj, nullptr, 1, NopCallback);
+    Dart_DeleteFinalizableHandle(trigger, obj);
+    // After the two scavenges above, 'obj' should now be promoted, hence its
+    // external size charged to old space.
+    {
+      CHECK_API_SCOPE(thread);
+      TransitionNativeToVM transition(thread);
+      HANDLESCOPE(thread);
+      String& handle = String::Handle(thread->zone());
+      handle ^= Api::UnwrapHandle(obj);
+      EXPECT(handle.IsOld());
+    }
+    EXPECT(heap->ExternalInWords(Heap::kNew) == 0);
+    EXPECT(heap->ExternalInWords(Heap::kOld) == kWeak1ExternalSize / kWordSize);
+    Dart_ExitScope();
+  }
+  Dart_DeleteFinalizableHandle(weak1, strong1);
+  Dart_DeletePersistentHandle(strong1);
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::CollectOldSpace();
+    EXPECT_EQ(0, heap->ExternalInWords(Heap::kOld));
+  }
+}
+
 TEST_CASE(DartAPI_WeakPersistentHandleExternalAllocationSizeOldspaceGC) {
   // Check that external allocation in old space can trigger GC.
   Isolate* isolate = Isolate::Current();
@@ -3446,6 +3804,7 @@
   Dart_Handle live = AllocateOldString("live");
   EXPECT_VALID(live);
   Dart_WeakPersistentHandle weak = NULL;
+  Dart_WeakPersistentHandle weak2 = NULL;
   {
     TransitionNativeToVM transition(thread);
     GCTestHelper::WaitForGCTasks();  // Finalize GC for accurate live size.
@@ -3469,7 +3828,48 @@
   }
   // Large enough to trigger GC in old space. Not actually allocated.
   const intptr_t kHugeExternalSize = (kWordSize == 4) ? 513 * MB : 1025 * MB;
-  Dart_NewWeakPersistentHandle(live, NULL, kHugeExternalSize, NopCallback);
+  weak2 =
+      Dart_NewWeakPersistentHandle(live, NULL, kHugeExternalSize, NopCallback);
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::WaitForGCTasks();  // Finalize GC for accurate live size.
+    // Expect small garbage to be collected.
+    EXPECT_EQ(kHugeExternalSize,
+              isolate->heap()->ExternalInWords(Heap::kOld) * kWordSize);
+  }
+  Dart_ExitScope();
+}
+
+TEST_CASE(DartAPI_FinalizableHandleExternalAllocationSizeOldspaceGC) {
+  // Check that external allocation in old space can trigger GC.
+  Isolate* isolate = Isolate::Current();
+  Dart_EnterScope();
+  Dart_Handle live = AllocateOldString("live");
+  EXPECT_VALID(live);
+  Dart_FinalizableHandle weak = NULL;
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::WaitForGCTasks();  // Finalize GC for accurate live size.
+    EXPECT_EQ(0, isolate->heap()->ExternalInWords(Heap::kOld));
+  }
+  const intptr_t kSmallExternalSize = 1 * KB;
+  {
+    Dart_EnterScope();
+    Dart_Handle dead = AllocateOldString("dead");
+    EXPECT_VALID(dead);
+    weak = Dart_NewFinalizableHandle(dead, nullptr, kSmallExternalSize,
+                                     NopCallback);
+    Dart_ExitScope();
+  }
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::WaitForGCTasks();  // Finalize GC for accurate live size.
+    EXPECT_EQ(kSmallExternalSize,
+              isolate->heap()->ExternalInWords(Heap::kOld) * kWordSize);
+  }
+  // Large enough to trigger GC in old space. Not actually allocated.
+  const intptr_t kHugeExternalSize = (kWordSize == 4) ? 513 * MB : 1025 * MB;
+  Dart_NewFinalizableHandle(live, nullptr, kHugeExternalSize, NopCallback);
   {
     TransitionNativeToVM transition(thread);
     GCTestHelper::WaitForGCTasks();  // Finalize GC for accurate live size.
@@ -3514,6 +3914,44 @@
   }
 }
 
+TEST_CASE(DartAPI_FinalizableHandleExternalAllocationSizeOddReferents) {
+  Heap* heap = Isolate::Current()->heap();
+  Dart_FinalizableHandle weak1 = nullptr;
+  Dart_PersistentHandle strong1 = nullptr;
+  static const intptr_t kWeak1ExternalSize = 1 * KB;
+  Dart_FinalizableHandle weak2 = nullptr;
+  Dart_PersistentHandle strong2 = nullptr;
+  static const intptr_t kWeak2ExternalSize = 2 * KB;
+  EXPECT_EQ(0, heap->ExternalInWords(Heap::kOld));
+  {
+    Dart_EnterScope();
+    Dart_Handle dart_true = Dart_True();  // VM heap object.
+    EXPECT_VALID(dart_true);
+    weak1 = Dart_NewFinalizableHandle(dart_true, nullptr, kWeak1ExternalSize,
+                                      UnreachedCallback);
+    strong1 = Dart_NewPersistentHandle(dart_true);
+    Dart_Handle zero = Dart_False();  // VM heap object.
+    EXPECT_VALID(zero);
+    weak2 = Dart_NewFinalizableHandle(zero, nullptr, kWeak2ExternalSize,
+                                      UnreachedCallback);
+    strong2 = Dart_NewPersistentHandle(zero);
+    // Both should be charged to old space.
+    EXPECT(heap->ExternalInWords(Heap::kOld) ==
+           (kWeak1ExternalSize + kWeak2ExternalSize) / kWordSize);
+    Dart_ExitScope();
+  }
+  Dart_DeleteFinalizableHandle(weak1, strong1);
+  Dart_DeletePersistentHandle(strong1);
+  Dart_DeleteFinalizableHandle(weak2, strong2);
+  Dart_DeletePersistentHandle(strong2);
+  EXPECT_EQ(0, heap->ExternalInWords(Heap::kOld));
+  {
+    TransitionNativeToVM transition(thread);
+    GCTestHelper::CollectOldSpace();
+    EXPECT_EQ(0, heap->ExternalInWords(Heap::kOld));
+  }
+}
+
 #define EXAMPLE_RESOURCE_NATIVE_LIST(V)                                        \
   V(ExampleResource_Allocate, 1)                                               \
   V(ExampleResource_Use, 1)                                                    \
@@ -5335,7 +5773,7 @@
     EXPECT_STREQ("null", str);
   } else {
     EXPECT_ERROR(string_list,
-                 "Cannot use legacy types with --null-safety enabled. "
+                 "Cannot use legacy types with --sound-null-safety enabled. "
                  "Use Dart_NewListOfType or Dart_NewListOfTypeFilled instead.");
   }
 
@@ -5356,7 +5794,7 @@
     EXPECT_STREQ("null", str);
   } else {
     EXPECT_ERROR(int_list,
-                 "Cannot use legacy types with --null-safety enabled. "
+                 "Cannot use legacy types with --sound-null-safety enabled. "
                  "Use Dart_NewListOfType or Dart_NewListOfTypeFilled instead.");
   }
 }
@@ -6222,7 +6660,7 @@
   if (Dart_IsError(type)) {
     EXPECT_ERROR(
         type,
-        "Cannot use legacy types with --null-safety enabled. "
+        "Cannot use legacy types with --sound-null-safety enabled. "
         "Use Dart_GetNullableType or Dart_GetNonNullableType instead.");
 
     nonNullableType = Dart_GetNonNullableType(lib, name, 0, nullptr);
diff --git a/runtime/vm/dart_api_message.cc b/runtime/vm/dart_api_message.cc
index f5814c4..613614e 100644
--- a/runtime/vm/dart_api_message.cc
+++ b/runtime/vm/dart_api_message.cc
@@ -139,6 +139,10 @@
     case Dart_TypedData_kUint64:
     case Dart_TypedData_kFloat64:
       return 8;
+    case Dart_TypedData_kInt32x4:
+    case Dart_TypedData_kFloat32x4:
+    case Dart_TypedData_kFloat64x2:
+      return 16;
     default:
       break;
   }
@@ -636,7 +640,10 @@
   V(Int64, int64_t)                                                            \
   V(Uint64, uint64_t)                                                          \
   V(Float32, float)                                                            \
-  V(Float64, double)
+  V(Float64, double)                                                           \
+  V(Int32x4, simd128_value_t)                                                  \
+  V(Float32x4, simd128_value_t)                                                \
+  V(Float64x2, simd128_value_t)
 
 #define EMIT_TYPED_DATA_CASES(type, c_type)                                    \
   case kTypedData##type##ArrayCid:                                             \
diff --git a/runtime/vm/dart_api_state.h b/runtime/vm/dart_api_state.h
index 5b22c93..7b52e98 100644
--- a/runtime/vm/dart_api_state.h
+++ b/runtime/vm/dart_api_state.h
@@ -190,12 +190,29 @@
 // dart API.
 class FinalizablePersistentHandle {
  public:
+  // TODO(http://dartbug.com/42312): Delete this on migrating signature
+  // Dart_NewWeakPersistentHandle to Dart_HandleFinalizer.
+  enum class CallbackSignature {
+    // Uses a Dart_WeakPersistentHandleFinalizer.
+    kWeakPersistentHandleFinalizer = 0,
+    // Uses a Dart_HandleFinalizer.
+    kHandleFinalizer = 1,
+  };
+
   static FinalizablePersistentHandle* New(
       Isolate* isolate,
       const Object& object,
       void* peer,
       Dart_WeakPersistentHandleFinalizer callback,
-      intptr_t external_size);
+      intptr_t external_size,
+      bool auto_delete);
+
+  static FinalizablePersistentHandle* New(Isolate* isolate,
+                                          const Object& object,
+                                          void* peer,
+                                          Dart_HandleFinalizer callback,
+                                          intptr_t external_size,
+                                          bool auto_delete);
 
   // Accessors.
   ObjectPtr raw() const { return raw_; }
@@ -204,10 +221,26 @@
     return OFFSET_OF(FinalizablePersistentHandle, raw_);
   }
   void* peer() const { return peer_; }
-  Dart_WeakPersistentHandleFinalizer callback() const { return callback_; }
-  Dart_WeakPersistentHandle apiHandle() {
+  Dart_WeakPersistentHandleFinalizer CallbackWeakFinalizer() const {
+    ASSERT(callback_signature_ ==
+           CallbackSignature::kWeakPersistentHandleFinalizer);
+    return callback_.weak_persistent;
+  }
+  Dart_HandleFinalizer callback() const {
+    ASSERT(callback_signature_ == CallbackSignature::kHandleFinalizer);
+    return callback_.finalizable;
+  }
+  uword callback_address() const {
+    return reinterpret_cast<uword>(callback_.finalizable);
+  }
+  Dart_WeakPersistentHandle ApiWeakPersistentHandle() {
     return reinterpret_cast<Dart_WeakPersistentHandle>(this);
   }
+  Dart_FinalizableHandle ApiFinalizableHandle() {
+    return reinterpret_cast<Dart_FinalizableHandle>(this);
+  }
+
+  bool auto_delete() const { return auto_delete_; }
 
   intptr_t external_size() const {
     return ExternalSizeInWordsBits::decode(external_data_) * kWordSize;
@@ -256,6 +289,7 @@
   }
 
   static FinalizablePersistentHandle* Cast(Dart_WeakPersistentHandle handle);
+  static FinalizablePersistentHandle* Cast(Dart_FinalizableHandle handle);
 
  private:
   enum {
@@ -264,6 +298,15 @@
     kExternalSizeBitsSize = (kBitsPerWord - 1),
   };
 
+  union HandleFinalizer {
+    Dart_HandleFinalizer finalizable;
+    Dart_WeakPersistentHandleFinalizer weak_persistent;
+    HandleFinalizer(Dart_HandleFinalizer finalizer) : finalizable(finalizer) {}
+    HandleFinalizer(Dart_WeakPersistentHandleFinalizer finalizer)
+        : weak_persistent(finalizer) {}
+    HandleFinalizer() : finalizable(nullptr) {}
+  };
+
   // This part of external_data_ is the number of externally allocated bytes.
   class ExternalSizeInWordsBits : public BitField<uword,
                                                   intptr_t,
@@ -277,7 +320,10 @@
   friend class FinalizablePersistentHandles;
 
   FinalizablePersistentHandle()
-      : raw_(nullptr), peer_(NULL), external_data_(0), callback_(NULL) {}
+      : raw_(nullptr),
+        peer_(NULL),
+        external_data_(0),
+        callback_(HandleFinalizer()) {}
   ~FinalizablePersistentHandle() {}
 
   static void Finalize(IsolateGroup* isolate_group,
@@ -293,6 +339,7 @@
     raw_ = static_cast<ObjectPtr>(reinterpret_cast<uword>(free_list));
     ASSERT(!raw_->IsHeapObject());
   }
+
   void FreeHandle(FinalizablePersistentHandle* free_list) {
     Clear();
     SetNext(free_list);
@@ -302,7 +349,9 @@
     raw_ = Object::null();
     peer_ = NULL;
     external_data_ = 0;
-    callback_ = NULL;
+    callback_ = HandleFinalizer();
+    auto_delete_ = false;
+    callback_signature_ = CallbackSignature::kWeakPersistentHandleFinalizer;
   }
 
   void set_raw(ObjectPtr raw) { raw_ = raw; }
@@ -311,10 +360,14 @@
 
   void set_peer(void* peer) { peer_ = peer; }
 
-  void set_callback(Dart_WeakPersistentHandleFinalizer callback) {
-    callback_ = callback;
+  void set_callback_signature(CallbackSignature callback_signature) {
+    callback_signature_ = callback_signature;
   }
 
+  void set_callback(HandleFinalizer callback) { callback_ = callback; }
+
+  void set_auto_delete(bool auto_delete) { auto_delete_ = auto_delete; }
+
   void set_external_size(intptr_t size) {
     intptr_t size_in_words = Utils::RoundUp(size, kObjectAlignment) / kWordSize;
     ASSERT(ExternalSizeInWordsBits::is_valid(size_in_words));
@@ -343,7 +396,9 @@
   ObjectPtr raw_;
   void* peer_;
   uword external_data_;
-  Dart_WeakPersistentHandleFinalizer callback_;
+  HandleFinalizer callback_;
+  bool auto_delete_;
+  CallbackSignature callback_signature_;
 
   DISALLOW_ALLOCATION();  // Allocated through AllocateHandle methods.
   DISALLOW_COPY_AND_ASSIGN(FinalizablePersistentHandle);
@@ -563,6 +618,10 @@
     return IsValidScopedHandle(reinterpret_cast<uword>(object));
   }
 
+  bool IsValidHandle(Dart_FinalizableHandle object) const {
+    return IsValidScopedHandle(reinterpret_cast<uword>(object));
+  }
+
   bool IsFreeHandle(Dart_WeakPersistentHandle object) const {
     FinalizablePersistentHandle* handle = free_list_;
     while (handle != NULL) {
@@ -746,6 +805,7 @@
     MutexLocker ml(&mutex_);
     return weak_persistent_handles_.AllocateHandle();
   }
+
   void FreeWeakPersistentHandle(FinalizablePersistentHandle* weak_ref) {
     MutexLocker ml(&mutex_);
     weak_persistent_handles_.FreeHandle(weak_ref);
@@ -767,6 +827,11 @@
     return weak_persistent_handles_.IsValidHandle(object);
   }
 
+  bool IsValidFinalizableHandle(Dart_FinalizableHandle object) {
+    MutexLocker ml(&mutex_);
+    return weak_persistent_handles_.IsValidHandle(object);
+  }
+
   bool IsActiveWeakPersistentHandle(Dart_WeakPersistentHandle object) {
     MutexLocker ml(&mutex_);
     return weak_persistent_handles_.IsValidHandle(object) &&
@@ -832,13 +897,38 @@
     const Object& object,
     void* peer,
     Dart_WeakPersistentHandleFinalizer callback,
-    intptr_t external_size) {
+    intptr_t external_size,
+    bool auto_delete) {
+  ApiState* state = isolate->group()->api_state();
+  ASSERT(state != NULL);
+  ASSERT(callback != NULL);
+  FinalizablePersistentHandle* ref = state->AllocateWeakPersistentHandle();
+  ref->set_raw(object);
+  ref->set_peer(peer);
+  ref->set_callback_signature(
+      CallbackSignature::kWeakPersistentHandleFinalizer);
+  ref->set_callback(HandleFinalizer(callback));
+  ref->set_auto_delete(auto_delete);
+  // This may trigger GC, so it must be called last.
+  ref->SetExternalSize(external_size, isolate->group());
+  return ref;
+}
+
+inline FinalizablePersistentHandle* FinalizablePersistentHandle::New(
+    Isolate* isolate,
+    const Object& object,
+    void* peer,
+    Dart_HandleFinalizer callback,
+    intptr_t external_size,
+    bool auto_delete) {
   ApiState* state = isolate->group()->api_state();
   ASSERT(state != NULL);
   FinalizablePersistentHandle* ref = state->AllocateWeakPersistentHandle();
   ref->set_raw(object);
   ref->set_peer(peer);
-  ref->set_callback(callback);
+  ref->set_callback_signature(CallbackSignature::kHandleFinalizer);
+  ref->set_callback(HandleFinalizer(callback));
+  ref->set_auto_delete(auto_delete);
   // This may trigger GC, so it must be called last.
   ref->SetExternalSize(external_size, isolate->group());
   return ref;
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 3a82369..f60c17b 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -110,7 +110,7 @@
 #if !defined(DART_PRECOMPILED_RUNTIME)
     UNREACHABLE();
 #else
-    if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    if (FLAG_use_bare_instructions) {
       Thread* thread = Thread::Current();
       thread->set_global_object_pool(
           thread->isolate()->object_store()->global_object_pool());
@@ -215,8 +215,6 @@
   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);
@@ -226,11 +224,19 @@
   // 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();
+    // The instance is a callable, so check that its function is compatible.
+    if (instance.IsCallable(&function)) {
+      bool matches = function.AreValidArguments(args_desc, nullptr);
+
+      if (matches && type_args_len > 0 && function.IsClosureFunction()) {
+        // Though the closure function is generic, the closure itself may
+        // not be because it closes over delayed function type arguments.
+        matches = Closure::Cast(instance).IsGeneric(thread);
+      }
+
+      if (matches) {
+        return function.raw();
+      }
     }
 
     // Special case: closures are implemented with a call getter instead of a
@@ -239,38 +245,31 @@
       break;
     }
 
+    cls = instance.clazz();
     // 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);
+    function = Resolver::ResolveDynamicAnyArgs(zone, cls, getter_name,
+                                               /*allow_add=*/false);
+    if (function.IsNull()) {
       break;
     }
-
-    // No call getter was found in the hierarchy, so stop the search.
-    if (cls.IsNull()) {
-      break;
+    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);
   }
 
   // No compatible callable was found.
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 6f3e711..eaa2fbd 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -1962,10 +1962,14 @@
   GrowableObjectArray& closures = GrowableObjectArray::Handle(zone);
   Function& function = Function::Handle(zone);
   Code& code = Code::Handle(zone);
-  intptr_t num_classes = class_table.NumCids();
-  for (intptr_t i = 1; i < num_classes; i++) {
-    if (class_table.HasValidClassAt(i)) {
-      cls = class_table.At(i);
+
+  const intptr_t num_classes = class_table.NumCids();
+  const intptr_t num_tlc_classes = class_table.NumTopLevelCids();
+  for (intptr_t i = 1; i < num_classes + num_tlc_classes; i++) {
+    const classid_t cid =
+        i < num_classes ? i : ClassTable::CidFromTopLevelIndex(i - num_classes);
+    if (class_table.HasValidClassAt(cid)) {
+      cls = class_table.At(cid);
 
       // Disable optimized functions.
       functions = cls.functions();
@@ -3297,9 +3301,12 @@
 
   const ClassTable& class_table = *isolate_->class_table();
   const intptr_t num_classes = class_table.NumCids();
-  for (intptr_t i = 1; i < num_classes; i++) {
-    if (class_table.HasValidClassAt(i)) {
-      cls = class_table.At(i);
+  const intptr_t num_tlc_classes = class_table.NumTopLevelCids();
+  for (intptr_t i = 1; i < num_classes + num_tlc_classes; i++) {
+    const classid_t cid =
+        i < num_classes ? i : ClassTable::CidFromTopLevelIndex(i - num_classes);
+    if (class_table.HasValidClassAt(cid)) {
+      cls = class_table.At(cid);
       // If the class is not finalized, e.g. if it hasn't been parsed
       // yet entirely, we can ignore it. If it contains a function with
       // an unresolved breakpoint, we will detect it if and when the
@@ -3426,11 +3433,15 @@
 
     const ClassTable& class_table = *isolate_->class_table();
     const intptr_t num_classes = class_table.NumCids();
-    for (intptr_t i = 1; i < num_classes; i++) {
-      if (!class_table.HasValidClassAt(i)) {
+    const intptr_t num_tlc_classes = class_table.NumTopLevelCids();
+    for (intptr_t i = 1; i < num_classes + num_tlc_classes; i++) {
+      const classid_t cid =
+          i < num_classes ? i
+                          : ClassTable::CidFromTopLevelIndex(i - num_classes);
+      if (!class_table.HasValidClassAt(cid)) {
         continue;
       }
-      cls = class_table.At(i);
+      cls = class_table.At(cid);
       // This class is relevant to us only if it belongs to the
       // library to which |script| belongs.
       if (cls.library() != lib.raw()) {
diff --git a/runtime/vm/debugger_api_impl_test.cc b/runtime/vm/debugger_api_impl_test.cc
index 8ca5a67..bcd63b0 100644
--- a/runtime/vm/debugger_api_impl_test.cc
+++ b/runtime/vm/debugger_api_impl_test.cc
@@ -180,6 +180,7 @@
   } else {
     Dart_KernelCompilationResult compilation_result =
         KernelIsolate::CompileExpressionToKernel(
+            /* platform_kernel= */ nullptr, /* platform_kernel_size= */ 0,
             expr.ToCString(),
             /* definitions= */ Array::empty_array(),
             /* type_defintions= */ Array::empty_array(),
diff --git a/runtime/vm/dwarf.cc b/runtime/vm/dwarf.cc
index db73b08..da8bb08 100644
--- a/runtime/vm/dwarf.cc
+++ b/runtime/vm/dwarf.cc
@@ -727,15 +727,23 @@
   }
 
   // Advance pc to end of the compilation unit if not already there.
-  const intptr_t last_code_index = codes_.length() - 1;
-  const Code& last_code = *(codes_[last_code_index]);
-  const intptr_t last_pc_offset = last_code.Size();
-  const char* last_asm_name = namer.SnapshotNameFor(last_code_index, last_code);
+  if (codes_.length() != 0) {
+    const intptr_t last_code_index = codes_.length() - 1;
+    const Code& last_code = *(codes_[last_code_index]);
+    const intptr_t last_pc_offset = last_code.Size();
+    const char* last_asm_name =
+        namer.SnapshotNameFor(last_code_index, last_code);
 
-  stream->u1(DW_LNS_advance_pc);
-  ASSERT(previous_asm_name != nullptr);
-  stream->DistanceBetweenSymbolOffsets(last_asm_name, last_pc_offset,
-                                       previous_asm_name, previous_pc_offset);
+    stream->u1(DW_LNS_advance_pc);
+    if (previous_asm_name != nullptr) {
+      stream->DistanceBetweenSymbolOffsets(
+          last_asm_name, last_pc_offset, previous_asm_name, previous_pc_offset);
+    } else {
+      // No LNP entries (e.g., only stub code).
+      ASSERT(previous_pc_offset == 0);
+      stream->uleb128(last_pc_offset);
+    }
+  }
 
   // End of contiguous machine code.
   stream->u1(0);  // This is an extended opcode
@@ -766,7 +774,7 @@
     i += offset;
   }
   if (!changed) return cstr;
-  return OS::SCreate(zone_, "%s", buffer.buf());
+  return OS::SCreate(zone_, "%s", buffer.buffer());
 }
 
 Trie<const char>* Dwarf::CreateReverseObfuscationTrie(Zone* zone) {
diff --git a/runtime/vm/elf.cc b/runtime/vm/elf.cc
index 2ce45e3..606ef61 100644
--- a/runtime/vm/elf.cc
+++ b/runtime/vm/elf.cc
@@ -1125,17 +1125,20 @@
   // Need these to turn offsets into relocated addresses.
   auto const vm_start =
       symbol_to_address_map.LookupValue(kVmSnapshotInstructionsAsmSymbol);
-  ASSERT(vm_start > 0);
+  // vm_start is absent in deferred loading peices.
   auto const isolate_start =
       symbol_to_address_map.LookupValue(kIsolateSnapshotInstructionsAsmSymbol);
   ASSERT(isolate_start > 0);
   auto const vm_text = FindSectionForAddress(vm_start);
-  ASSERT(vm_text != nullptr);
+  // vm_text is absent in deferred loading peices.
   auto const isolate_text = FindSectionForAddress(isolate_start);
   ASSERT(isolate_text != nullptr);
 
   SnapshotTextObjectNamer namer(zone_);
   const auto& codes = dwarf_->codes();
+  if (codes.length() == 0) {
+    return;
+  }
   for (intptr_t i = 0; i < codes.length(); i++) {
     const auto& code = *codes[i];
     auto const name = namer.SnapshotNameFor(i, code);
@@ -1300,7 +1303,8 @@
     auto const name = kBuildIdSegmentNames[i];
     auto const symbol = LookupSymbol(dynstrtab_, dynsym_, name);
     if (symbol == nullptr) {
-      FATAL1("No symbol %s found for expected segment\n", name);
+      stream.WriteFixed(static_cast<uint32_t>(0));
+      continue;
     }
     auto const bits = sections_[symbol->section_index]->AsBitsContainer();
     if (bits == nullptr) {
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index f9f9346..fb19f98 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -63,6 +63,7 @@
     "Use --[no-]dwarf-stack-traces instead.")                                  \
   P(causal_async_stacks, bool, !USING_PRODUCT, "Improved async stacks")        \
   P(lazy_async_stacks, bool, false, "Reconstruct async stacks from listeners") \
+  P(lazy_dispatchers, bool, true, "Generate dispatchers lazily")               \
   P(use_bare_instructions, bool, true, "Enable bare instructions mode.")       \
   R(dedup_instructions, true, bool, false,                                     \
     "Canonicalize instructions when precompiling.")
@@ -137,7 +138,6 @@
   P(idle_duration_micros, int, 500 * kMicrosecondsPerMillisecond,              \
     "Allow idle tasks to run for this long.")                                  \
   P(interpret_irregexp, bool, false, "Use irregexp bytecode interpreter")      \
-  P(lazy_dispatchers, bool, true, "Generate dispatchers lazily")               \
   P(link_natives_lazily, bool, false, "Link native calls lazily")              \
   R(log_marker_tasks, false, bool, false,                                      \
     "Log debugging information for old gen GC marking tasks.")                 \
diff --git a/runtime/vm/hash.h b/runtime/vm/hash.h
index cbd4c83..7365500 100644
--- a/runtime/vm/hash.h
+++ b/runtime/vm/hash.h
@@ -27,6 +27,16 @@
   return (hash == 0) ? 1 : hash;
 }
 
+inline uint32_t HashBytes(const uint8_t* bytes, intptr_t size) {
+  uint32_t hash = size;
+  while (size > 0) {
+    hash = CombineHashes(hash, *bytes);
+    bytes++;
+    size--;
+  }
+  return hash;
+}
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_HASH_H_
diff --git a/runtime/vm/hash_map.h b/runtime/vm/hash_map.h
index 0ac5463..409ab89 100644
--- a/runtime/vm/hash_map.h
+++ b/runtime/vm/hash_map.h
@@ -574,6 +574,25 @@
   DISALLOW_COPY_AND_ASSIGN(IntMap);
 };
 
+template <typename V>
+class IdentitySetKeyValueTrait {
+ public:
+  // Typedefs needed for the DirectChainedHashMap template.
+  typedef V Key;
+  typedef V Value;
+  typedef V Pair;
+
+  static Key KeyOf(Pair kv) { return kv; }
+
+  static Value ValueOf(Pair kv) { return kv; }
+
+  static inline intptr_t Hashcode(Key key) {
+    return reinterpret_cast<intptr_t>(key);
+  }
+
+  static inline bool IsKeyEqual(Pair pair, Key key) { return pair == key; }
+};
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_HASH_MAP_H_
diff --git a/runtime/vm/heap/become.h b/runtime/vm/heap/become.h
index ef76a45..3958c8d 100644
--- a/runtime/vm/heap/become.h
+++ b/runtime/vm/heap/become.h
@@ -86,11 +86,11 @@
   // (used for morphic instances during reload).
   static void MakeDummyObject(const Instance& instance);
 
- private:
   // Update any references pointing to forwarding objects to point the
   // forwarding objects' targets.
   static void FollowForwardingPointers(Thread* thread);
 
+ private:
   static void CrashDump(ObjectPtr before_obj, ObjectPtr after_obj);
 };
 
diff --git a/runtime/vm/heap/compactor.cc b/runtime/vm/heap/compactor.cc
index 4f2723c..a4c5370 100644
--- a/runtime/vm/heap/compactor.cc
+++ b/runtime/vm/heap/compactor.cc
@@ -569,29 +569,27 @@
 }
 
 void GCCompactor::SetupImagePageBoundaries() {
-  for (intptr_t i = 0; i < kMaxImagePages; i++) {
-    image_page_ranges_[i].base = 0;
-    image_page_ranges_[i].size = 0;
-  }
-  intptr_t next_offset = 0;
+  MallocGrowableArray<ImagePageRange> ranges(4);
+
   OldPage* image_page = Dart::vm_isolate()->heap()->old_space()->image_pages_;
   while (image_page != NULL) {
-    RELEASE_ASSERT(next_offset <= kMaxImagePages);
-    image_page_ranges_[next_offset].base = image_page->object_start();
-    image_page_ranges_[next_offset].size =
-        image_page->object_end() - image_page->object_start();
+    ImagePageRange range = {image_page->object_start(),
+                            image_page->object_end()};
+    ranges.Add(range);
     image_page = image_page->next();
-    next_offset++;
   }
   image_page = heap_->old_space()->image_pages_;
   while (image_page != NULL) {
-    RELEASE_ASSERT(next_offset <= kMaxImagePages);
-    image_page_ranges_[next_offset].base = image_page->object_start();
-    image_page_ranges_[next_offset].size =
-        image_page->object_end() - image_page->object_start();
+    ImagePageRange range = {image_page->object_start(),
+                            image_page->object_end()};
+    ranges.Add(range);
     image_page = image_page->next();
-    next_offset++;
   }
+
+  ranges.Sort(CompareImagePageRanges);
+  intptr_t image_page_count;
+  ranges.StealBuffer(&image_page_ranges_, &image_page_count);
+  image_page_hi_ = image_page_count - 1;
 }
 
 DART_FORCE_INLINE
@@ -602,8 +600,17 @@
   }
 
   uword old_addr = ObjectLayout::ToAddr(old_target);
-  for (intptr_t i = 0; i < kMaxImagePages; i++) {
-    if ((old_addr - image_page_ranges_[i].base) < image_page_ranges_[i].size) {
+  intptr_t lo = 0;
+  intptr_t hi = image_page_hi_;
+  while (lo <= hi) {
+    intptr_t mid = (hi - lo + 1) / 2 + lo;
+    ASSERT(mid >= lo);
+    ASSERT(mid <= hi);
+    if (old_addr < image_page_ranges_[mid].start) {
+      hi = mid - 1;
+    } else if (old_addr >= image_page_ranges_[mid].end) {
+      lo = mid + 1;
+    } else {
       return;  // Not moved (unaligned image page).
     }
   }
diff --git a/runtime/vm/heap/compactor.h b/runtime/vm/heap/compactor.h
index 0de8b14..4ba033b 100644
--- a/runtime/vm/heap/compactor.h
+++ b/runtime/vm/heap/compactor.h
@@ -28,7 +28,7 @@
       : HandleVisitor(thread),
         ObjectPointerVisitor(thread->isolate_group()),
         heap_(heap) {}
-  ~GCCompactor() {}
+  ~GCCompactor() { free(image_page_ranges_); }
 
   void Compact(OldPage* pages, FreeList* freelist, Mutex* mutex);
 
@@ -47,13 +47,21 @@
   Heap* heap_;
 
   struct ImagePageRange {
-    uword base;
-    uword size;
+    uword start;
+    uword end;
   };
-  // There are up to 4 images to consider:
-  // {instructions, data} x {vm isolate, current isolate}
-  static const intptr_t kMaxImagePages = 4;
-  ImagePageRange image_page_ranges_[kMaxImagePages];
+  static int CompareImagePageRanges(const ImagePageRange* a,
+                                    const ImagePageRange* b) {
+    if (a->start < b->start) {
+      return -1;
+    } else if (a->start == b->start) {
+      return 0;
+    } else {
+      return 1;
+    }
+  }
+  intptr_t image_page_hi_ = 0;
+  ImagePageRange* image_page_ranges_ = nullptr;
 
   // The typed data views whose inner pointer must be updated after sliding is
   // complete.
diff --git a/runtime/vm/heap/heap.cc b/runtime/vm/heap/heap.cc
index 1eb27bf..8c89691 100644
--- a/runtime/vm/heap/heap.cc
+++ b/runtime/vm/heap/heap.cc
@@ -68,6 +68,7 @@
       gc_new_space_in_progress_(false),
       gc_old_space_in_progress_(false),
       last_gc_was_old_space_(false),
+      assume_scavenge_will_fail_(false),
       gc_on_nth_allocation_(kNoForcedGarbageCollection) {
   UpdateGlobalMaxUsed();
   for (int sel = 0; sel < kNumWeakSelectors; sel++) {
@@ -92,7 +93,7 @@
   if (LIKELY(addr != 0)) {
     return addr;
   }
-  if (new_space_.GrowthControlState()) {
+  if (!assume_scavenge_will_fail_ && new_space_.GrowthControlState()) {
     // This call to CollectGarbage might end up "reusing" a collection spawned
     // from a different thread and will be racing to allocate the requested
     // memory with other threads being released after the collection.
@@ -400,6 +401,7 @@
   ASSERT(gc_old_space_in_progress_);
   gc_old_space_in_progress_ = false;
   last_gc_was_old_space_ = true;
+  assume_scavenge_will_fail_ = false;
   ml.NotifyAll();
 }
 
@@ -595,7 +597,7 @@
   EvacuateNewSpace(thread, reason);
   if (thread->is_marking()) {
     // If incremental marking is happening, we need to finish the GC cycle
-    // and perform a follow-up GC to pruge any "floating garbage" that may be
+    // and perform a follow-up GC to purge any "floating garbage" that may be
     // retained by the incremental barrier.
     CollectOldSpaceGarbage(thread, kMarkSweep, reason);
   }
diff --git a/runtime/vm/heap/heap.h b/runtime/vm/heap/heap.h
index fb57895..bb6652e 100644
--- a/runtime/vm/heap/heap.h
+++ b/runtime/vm/heap/heap.h
@@ -45,6 +45,7 @@
 #endif
     kCanonicalHashes,
     kObjectIds,
+    kLoadingUnits,
     kNumWeakSelectors
   };
 
@@ -60,7 +61,7 @@
     kOldSpace,     // Old space limit crossed.
     kFinalize,     // Concurrent marking finished.
     kFull,         // Heap::CollectAllGarbage
-    kExternal,     // Dart_NewWeakPersistentHandle
+    kExternal,     // Dart_NewFinalizableHandle Dart_NewWeakPersistentHandle
     kIdle,         // Dart_NotifyIdle
     kLowMemory,    // Dart_NotifyLowMemory
     kDebugging,    // service request, etc.
@@ -234,6 +235,15 @@
   }
   void ResetObjectIdTable();
 
+  void SetLoadingUnit(ObjectPtr raw_obj, intptr_t object_id) {
+    ASSERT(Thread::Current()->IsMutatorThread());
+    SetWeakEntry(raw_obj, kLoadingUnits, object_id);
+  }
+  intptr_t GetLoadingUnit(ObjectPtr raw_obj) const {
+    ASSERT(Thread::Current()->IsMutatorThread());
+    return GetWeakEntry(raw_obj, kLoadingUnits);
+  }
+
   // Used by the GC algorithms to propagate weak entries.
   intptr_t GetWeakEntry(ObjectPtr raw_obj, WeakSelector sel) const;
   void SetWeakEntry(ObjectPtr raw_obj, WeakSelector sel, intptr_t val);
@@ -406,6 +416,7 @@
   bool gc_new_space_in_progress_;
   bool gc_old_space_in_progress_;
   bool last_gc_was_old_space_;
+  bool assume_scavenge_will_fail_;
 
   static const intptr_t kNoForcedGarbageCollection = -1;
 
diff --git a/runtime/vm/heap/heap_test.cc b/runtime/vm/heap/heap_test.cc
index cd2c0e8..f7201f1 100644
--- a/runtime/vm/heap/heap_test.cc
+++ b/runtime/vm/heap/heap_test.cc
@@ -571,9 +571,7 @@
   EXPECT(size_before < size_after);
 }
 
-static void NoopFinalizer(void* isolate_callback_data,
-                          Dart_WeakPersistentHandle handle,
-                          void* peer) {}
+static void NoopFinalizer(void* isolate_callback_data, void* peer) {}
 
 ISOLATE_UNIT_TEST_CASE(ExternalPromotion) {
   Isolate* isolate = Isolate::Current();
@@ -587,7 +585,8 @@
   Array& neu = Array::Handle();
   for (intptr_t i = 0; i < 100; i++) {
     neu = Array::New(1, Heap::kNew);
-    FinalizablePersistentHandle::New(isolate, neu, NULL, NoopFinalizer, 1 * MB);
+    FinalizablePersistentHandle::New(isolate, neu, NULL, NoopFinalizer, 1 * MB,
+                                     /*auto_delete=*/true);
     old.SetAt(i, neu);
   }
 
@@ -753,7 +752,8 @@
   Array& neu = Array::Handle();
   for (intptr_t i = 0; i < 100; i++) {
     neu = Array::New(1, Heap::kNew);
-    FinalizablePersistentHandle::New(isolate, neu, NULL, NoopFinalizer, 1 * MB);
+    FinalizablePersistentHandle::New(isolate, neu, NULL, NoopFinalizer, 1 * MB,
+                                     /*auto_delete=*/true);
     old.SetAt(i, neu);
 
     if ((i % 4) == 0) {
diff --git a/runtime/vm/heap/pages.cc b/runtime/vm/heap/pages.cc
index a542ec4..b2f4ae4 100644
--- a/runtime/vm/heap/pages.cc
+++ b/runtime/vm/heap/pages.cc
@@ -1612,15 +1612,28 @@
     grow_heap = 0;
   }
   heap_->RecordData(PageSpace::kPageGrowth, grow_heap);
-
-  // Limit shrinkage: allow growth by at least half the pages freed by GC.
-  const intptr_t freed_pages =
-      (before.CombinedUsedInWords() - after.CombinedUsedInWords()) /
-      kOldPageSizeInWords;
-  grow_heap = Utils::Maximum(grow_heap, freed_pages / 2);
-  heap_->RecordData(PageSpace::kAllowedGrowth, grow_heap);
   last_usage_ = after;
 
+  intptr_t max_capacity_in_words = heap_->old_space()->max_capacity_in_words_;
+  if (max_capacity_in_words != 0) {
+    ASSERT(grow_heap >= 0);
+    // Fraction of asymptote used.
+    double f = static_cast<double>(after.CombinedUsedInWords() +
+                                   (kOldPageSizeInWords * grow_heap)) /
+               static_cast<double>(max_capacity_in_words);
+    ASSERT(f >= 0.0);
+    // Increase weight at the high end.
+    f = f * f;
+    // Fraction of asymptote available.
+    f = 1.0 - f;
+    ASSERT(f <= 1.0);
+    // Discount growth more the closer we get to the desired asymptote.
+    grow_heap = static_cast<intptr_t>(grow_heap * f);
+    // Minimum growth step after reaching the asymptote.
+    intptr_t min_step = (2 * MB) / kOldPageSize;
+    grow_heap = Utils::Maximum(min_step, grow_heap);
+  }
+
   RecordUpdate(before, after, grow_heap, "gc");
 }
 
diff --git a/runtime/vm/heap/scavenger.cc b/runtime/vm/heap/scavenger.cc
index 0fb6cb9..cfed7d7 100644
--- a/runtime/vm/heap/scavenger.cc
+++ b/runtime/vm/heap/scavenger.cc
@@ -15,6 +15,7 @@
 #include "vm/heap/weak_table.h"
 #include "vm/isolate.h"
 #include "vm/lockers.h"
+#include "vm/longjump.h"
 #include "vm/object.h"
 #include "vm/object_id_ring.h"
 #include "vm/object_set.h"
@@ -178,43 +179,69 @@
   void ProcessRoots() {
     thread_ = Thread::Current();
     page_space_->AcquireLock(freelist_);
-    scavenger_->IterateRoots(this);
+
+    LongJumpScope jump;
+    if (setjmp(*jump.Set()) == 0) {
+      scavenger_->IterateRoots(this);
+    } else {
+      ASSERT(scavenger_->abort_);
+      thread_->ClearStickyError();
+    }
   }
 
   void ProcessSurvivors() {
-    // Iterate until all work has been drained.
-    do {
-      ProcessToSpace();
-      ProcessPromotedList();
-    } while (HasWork());
+    LongJumpScope jump;
+    if (setjmp(*jump.Set()) == 0) {
+      // Iterate until all work has been drained.
+      do {
+        ProcessToSpace();
+        ProcessPromotedList();
+      } while (HasWork());
+    } else {
+      ASSERT(scavenger_->abort_);
+      thread_->ClearStickyError();
+    }
   }
 
   void ProcessAll() {
-    do {
-      ProcessSurvivors();
-      ProcessWeakProperties();
-    } while (HasWork());
+    LongJumpScope jump;
+    if (setjmp(*jump.Set()) == 0) {
+      do {
+        do {
+          ProcessToSpace();
+          ProcessPromotedList();
+        } while (HasWork());
+        ProcessWeakProperties();
+      } while (HasWork());
+    } else {
+      ASSERT(scavenger_->abort_);
+      thread_->ClearStickyError();
+    }
   }
 
   inline void ProcessWeakProperties();
 
   bool HasWork() {
+    if (scavenger_->abort_) return false;
     return (scan_ != tail_) || (scan_ != nullptr && !scan_->IsResolved()) ||
            !promoted_list_.IsEmpty();
   }
 
   void Finalize() {
-    ASSERT(!HasWork());
+    if (scavenger_->abort_) {
+      promoted_list_.AbandonWork();
+    } else {
+      ASSERT(!HasWork());
 
-    for (NewPage* page = head_; page != nullptr; page = page->next()) {
-      ASSERT(page->IsResolved());
-      page->RecordSurvivors();
+      for (NewPage* page = head_; page != nullptr; page = page->next()) {
+        ASSERT(page->IsResolved());
+        page->RecordSurvivors();
+      }
+
+      promoted_list_.Finalize();
+
+      MournWeakProperties();
     }
-
-    promoted_list_.Finalize();
-
-    MournWeakProperties();
-
     page_space_->ReleaseLock(freelist_);
     thread_ = nullptr;
   }
@@ -278,7 +305,7 @@
           // To-space was exhausted by fragmentation and old-space could not
           // grow.
           if (UNLIKELY(new_addr == 0)) {
-            OUT_OF_MEMORY();
+            AbortScavenge();
           }
         }
       }
@@ -375,6 +402,14 @@
 
   DART_NOINLINE inline uword TryAllocateCopySlow(intptr_t size);
 
+  DART_NOINLINE DART_NORETURN void AbortScavenge() {
+    if (FLAG_verbose_gc) {
+      OS::PrintErr("Aborting scavenge\n");
+    }
+    scavenger_->abort_ = true;
+    thread_->long_jump_base()->Jump(1, Object::out_of_memory_error());
+  }
+
   inline void ProcessToSpace();
   DART_FORCE_INLINE intptr_t ProcessCopied(ObjectPtr raw_obj);
   inline void ProcessPromotedList();
@@ -587,9 +622,7 @@
         VirtualMemory::AllocateAligned(size, alignment, is_executable, name);
   }
   if (memory == nullptr) {
-    // TODO(koda): We could try to recover (collect old space, wait for another
-    // isolate to finish scavenge, etc.).
-    OUT_OF_MEMORY();
+    return nullptr;  // Out of memory.
   }
 
 #if defined(DEBUG)
@@ -639,6 +672,9 @@
     return nullptr;  // Full.
   }
   NewPage* page = NewPage::Allocate();
+  if (page == nullptr) {
+    return nullptr;  // Out of memory;
+  }
   capacity_in_words_ += kNewPageSizeInWords;
   if (link) {
     if (head_ == nullptr) {
@@ -705,7 +741,8 @@
       scavenge_words_per_micro_(kConservativeInitialScavengeSpeed),
       idle_scavenge_threshold_in_words_(0),
       external_size_(0),
-      failed_to_promote_(false) {
+      failed_to_promote_(false),
+      abort_(false) {
   // Verify assumptions about the first word in objects which the scavenger is
   // going to use for forwarding pointers.
   ASSERT(Object::tags_offset() == 0);
@@ -1137,6 +1174,8 @@
 
 template <bool parallel>
 void ScavengerVisitorBase<parallel>::ProcessWeakProperties() {
+  if (scavenger_->abort_) return;
+
   // Finished this round of scavenging. Process the pending weak properties
   // for which the keys have become reachable. Potentially this adds more
   // objects to the to space.
@@ -1285,6 +1324,8 @@
 
 template <bool parallel>
 void ScavengerVisitorBase<parallel>::MournWeakProperties() {
+  ASSERT(!scavenger_->abort_);
+
   // The queued weak properties at this point do not refer to reachable keys,
   // so we clear their key and value fields.
   WeakPropertyPtr cur_weak = delayed_weak_properties_;
@@ -1447,6 +1488,7 @@
 
   // Prepare for a scavenge.
   failed_to_promote_ = false;
+  abort_ = false;
   root_slices_started_ = 0;
   intptr_t abandoned_bytes = 0;  // TODO(rmacnak): Count fragmentation?
   SpaceUsage usage_before = GetCurrentUsage();
@@ -1466,6 +1508,11 @@
   } else {
     bytes_promoted = ParallelScavenge(from);
   }
+  if (abort_) {
+    ReverseScavenge(&from);
+    bytes_promoted = 0;
+  }
+  ASSERT(promotion_stack_.IsEmpty());
   MournWeakHandles();
   MournWeakTables();
 
@@ -1544,6 +1591,65 @@
   return bytes_promoted;
 }
 
+void Scavenger::ReverseScavenge(SemiSpace** from) {
+  Thread* thread = Thread::Current();
+  TIMELINE_FUNCTION_GC_DURATION(thread, "ReverseScavenge");
+
+  class ReverseFromForwardingVisitor : public ObjectVisitor {
+    uword ReadHeader(ObjectPtr raw_obj) {
+      return reinterpret_cast<std::atomic<uword>*>(
+                 ObjectLayout::ToAddr(raw_obj))
+          ->load(std::memory_order_relaxed);
+    }
+    void WriteHeader(ObjectPtr raw_obj, uword header) {
+      reinterpret_cast<std::atomic<uword>*>(ObjectLayout::ToAddr(raw_obj))
+          ->store(header, std::memory_order_relaxed);
+    }
+    void VisitObject(ObjectPtr from_obj) {
+      uword from_header = ReadHeader(from_obj);
+      if (IsForwarding(from_header)) {
+        ObjectPtr to_obj = ForwardedObj(from_header);
+        uword to_header = ReadHeader(to_obj);
+        intptr_t size = to_obj->ptr()->HeapSize();
+
+        // Reset the ages bits in case this was a promotion.
+        uint32_t tags = static_cast<uint32_t>(to_header);
+        tags = ObjectLayout::OldBit::update(false, tags);
+        tags = ObjectLayout::OldAndNotRememberedBit::update(false, tags);
+        tags = ObjectLayout::NewBit::update(true, tags);
+        tags = ObjectLayout::OldAndNotMarkedBit::update(false, tags);
+        uword original_header =
+            (to_header & ~static_cast<uword>(0xFFFFFFFF)) | tags;
+
+        WriteHeader(from_obj, original_header);
+
+        ForwardingCorpse::AsForwarder(ObjectLayout::ToAddr(to_obj), size)
+            ->set_target(from_obj);
+      }
+    }
+  };
+
+  ReverseFromForwardingVisitor visitor;
+  for (NewPage* page = (*from)->head(); page != nullptr; page = page->next()) {
+    page->VisitObjects(&visitor);
+  }
+
+  // Swap from-space and to-space. The abandoned to-space will be deleted in
+  // the epilogue.
+  SemiSpace* temp = to_;
+  to_ = *from;
+  *from = temp;
+
+  promotion_stack_.Reset();
+
+  // This also rebuilds the remembered set.
+  Become::FollowForwardingPointers(thread);
+
+  // Don't scavenge again until the next old-space GC has occurred. Prevents
+  // performing one scavenge per allocation as the heap limit is approached.
+  heap_->assume_scavenge_will_fail_ = true;
+}
+
 void Scavenger::WriteProtect(bool read_only) {
   ASSERT(!scavenging_);
   to_->WriteProtect(read_only);
diff --git a/runtime/vm/heap/scavenger.h b/runtime/vm/heap/scavenger.h
index f7874e9..9f84dcd 100644
--- a/runtime/vm/heap/scavenger.h
+++ b/runtime/vm/heap/scavenger.h
@@ -394,6 +394,7 @@
   SemiSpace* Prologue();
   intptr_t ParallelScavenge(SemiSpace* from);
   intptr_t SerialScavenge(SemiSpace* from);
+  void ReverseScavenge(SemiSpace** from);
   void IterateIsolateRoots(ObjectPointerVisitor* visitor);
   template <bool parallel>
   void IterateStoreBuffers(ScavengerVisitorBase<parallel>* visitor);
@@ -441,7 +442,8 @@
   // The total size of external data associated with objects in this scavenger.
   RelaxedAtomic<intptr_t> external_size_;
 
-  bool failed_to_promote_;
+  RelaxedAtomic<bool> failed_to_promote_;
+  RelaxedAtomic<bool> abort_;
 
   bool growth_control_;
 
diff --git a/runtime/vm/heap/weak_table.h b/runtime/vm/heap/weak_table.h
index 1a81be4..f145dfe 100644
--- a/runtime/vm/heap/weak_table.h
+++ b/runtime/vm/heap/weak_table.h
@@ -15,6 +15,8 @@
 
 class WeakTable {
  public:
+  static constexpr intptr_t kNoValue = 0;
+
   WeakTable() : size_(kMinSize), used_(0), count_(0) {
     ASSERT(Utils::IsPowerOfTwo(size_));
     data_ = reinterpret_cast<intptr_t*>(calloc(size_, kEntrySize * kWordSize));
@@ -104,7 +106,7 @@
       obj = ObjectAtExclusive(idx);
     }
     ASSERT(ValueAtExclusive(idx) == 0);
-    return 0;
+    return kNoValue;
   }
 
   // Removes and returns the value associated with |key|. Returns 0 if there is
@@ -123,7 +125,7 @@
       obj = ObjectAtExclusive(idx);
     }
     ASSERT(ValueAtExclusive(idx) == 0);
-    return 0;
+    return kNoValue;
   }
 
   void Forward(ObjectPointerVisitor* visitor);
diff --git a/runtime/vm/instructions_arm.cc b/runtime/vm/instructions_arm.cc
index d46838f..e3a570c 100644
--- a/runtime/vm/instructions_arm.cc
+++ b/runtime/vm/instructions_arm.cc
@@ -20,7 +20,7 @@
       target_code_pool_index_(-1) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: blx lr.
-  ASSERT(*(reinterpret_cast<uword*>(pc) - 1) == 0xe12fff3e);
+  ASSERT(*(reinterpret_cast<uint32_t*>(pc) - 1) == 0xe12fff3e);
 
   Register reg;
   InstructionPattern::DecodeLoadWordFromPool(pc - 2 * Instr::kInstrSize, &reg,
@@ -34,7 +34,7 @@
       data_pool_index_(-1) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: blx lr.
-  ASSERT(*(reinterpret_cast<uword*>(pc) - 1) == 0xe12fff3e);
+  ASSERT(*(reinterpret_cast<uint32_t*>(pc) - 1) == 0xe12fff3e);
 
   Register reg;
   uword data_load_end = InstructionPattern::DecodeLoadWordFromPool(
@@ -53,7 +53,7 @@
       target_code_pool_index_(-1) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: blx lr.
-  ASSERT(*(reinterpret_cast<uword*>(end_) - 1) == 0xe12fff3e);
+  ASSERT(*(reinterpret_cast<uint32_t*>(end_) - 1) == 0xe12fff3e);
 
   Register reg;
   uword native_function_load_end = InstructionPattern::DecodeLoadWordFromPool(
@@ -278,7 +278,7 @@
     : SwitchableCallPatternBase(code) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: blx lr.
-  ASSERT(*(reinterpret_cast<uword*>(pc) - 1) == 0xe12fff3e);
+  ASSERT(*(reinterpret_cast<uint32_t*>(pc) - 1) == 0xe12fff3e);
 
   Register reg;
   uword data_load_end = InstructionPattern::DecodeLoadWordFromPool(
@@ -301,7 +301,7 @@
     : SwitchableCallPatternBase(code) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: blx lr.
-  ASSERT(*(reinterpret_cast<uword*>(pc) - 1) == 0xe12fff3e);
+  ASSERT(*(reinterpret_cast<uint32_t*>(pc) - 1) == 0xe12fff3e);
 
   Register reg;
   uword data_load_end = InstructionPattern::DecodeLoadWordFromPool(
@@ -429,7 +429,7 @@
   // Ensure the caller of the type testing stub (whose return address is [pc_])
   // branched via `blx R9` or a pc-relative call.
   uword pc = pc_ - Instr::kInstrSize;
-  const uword blx_r9 = 0xe12fff39;
+  const uint32_t blx_r9 = 0xe12fff39;
   if (*reinterpret_cast<uint32_t*>(pc) != blx_r9) {
     PcRelativeCallPattern pattern(pc);
     RELEASE_ASSERT(pattern.IsValid());
diff --git a/runtime/vm/interpreter.cc b/runtime/vm/interpreter.cc
index d296e6e..5b16c67c 100644
--- a/runtime/vm/interpreter.cc
+++ b/runtime/vm/interpreter.cc
@@ -232,9 +232,9 @@
     return false;
   }
 
-  DART_FORCE_INLINE static bool IsFinalized(ClassPtr cls) {
+  DART_FORCE_INLINE static bool IsAllocateFinalized(ClassPtr cls) {
     return Class::ClassFinalizedBits::decode(cls->ptr()->state_bits_) ==
-           ClassLayout::kFinalized;
+           ClassLayout::kAllocateFinalized;
   }
 };
 
@@ -746,6 +746,7 @@
                                                  const KBCInstr** pc,
                                                  ObjectPtr** FP,
                                                  ObjectPtr** SP) {
+  ObjectPtr null_value = Object::null();
   const intptr_t type_args_len =
       InterpreterHelpers::ArgDescTypeArgsLen(argdesc_);
   const intptr_t receiver_idx = type_args_len > 0 ? 1 : 0;
@@ -757,11 +758,11 @@
   if (UNLIKELY(!lookup_cache_.Lookup(receiver_cid, target_name, argdesc_,
                                      &target))) {
     // Table lookup miss.
-    top[0] = 0;  // Clean up slot as it may be visited by GC.
+    top[0] = null_value;  // Clean up slot as it may be visited by GC.
     top[1] = call_base[receiver_idx];
     top[2] = target_name;
     top[3] = argdesc_;
-    top[4] = 0;  // Result slot.
+    top[4] = null_value;  // Result slot.
 
     Exit(thread, *FP, top + 5, *pc);
     NativeArguments native_args(thread, 3, /* argv */ top + 1,
@@ -774,12 +775,61 @@
     target = static_cast<FunctionPtr>(top[4]);
     target_name = static_cast<StringPtr>(top[2]);
     argdesc_ = static_cast<ArrayPtr>(top[3]);
-    ASSERT(target->IsFunction());
-    lookup_cache_.Insert(receiver_cid, target_name, argdesc_, target);
   }
 
-  top[0] = target;
-  return Invoke(thread, call_base, top, pc, FP, SP);
+  if (target != Function::null()) {
+    lookup_cache_.Insert(receiver_cid, target_name, argdesc_, target);
+    top[0] = target;
+    return Invoke(thread, call_base, top, pc, FP, SP);
+  }
+
+  // The miss handler should only fail to return a function if lazy dispatchers
+  // are disabled, in which case we need to call DRT_InvokeNoSuchMethod, which
+  // walks the receiver appropriately in this case.
+  ASSERT(!FLAG_lazy_dispatchers);
+
+  // The receiver, name, and argument descriptor are already in the appropriate
+  // places on the stack from the previous call.
+  ASSERT(top[4] == null_value);
+
+  // Allocate array of arguments.
+  {
+    const intptr_t argc =
+        InterpreterHelpers::ArgDescArgCount(argdesc_) + receiver_idx;
+    ASSERT_EQUAL(top - call_base, argc);
+
+    top[5] = Smi::New(argc);  // length
+    top[6] = null_value;      // type
+    Exit(thread, *FP, top + 7, *pc);
+    NativeArguments native_args(thread, 2, /* argv */ top + 5,
+                                /* result */ top + 4);
+    if (!InvokeRuntime(thread, this, DRT_AllocateArray, native_args)) {
+      return false;
+    }
+
+    // Copy arguments into the newly allocated array.
+    ArrayPtr array = Array::RawCast(top[4]);
+    for (intptr_t i = 0; i < argc; i++) {
+      array->ptr()->data()[i] = call_base[i];
+    }
+  }
+
+  {
+    Exit(thread, *FP, top + 5, *pc);
+    NativeArguments native_args(thread, 4, /* argv */ top + 1,
+                                /* result */ top);
+    if (!InvokeRuntime(thread, this, DRT_InvokeNoSuchMethod, native_args)) {
+      return false;
+    }
+
+    // Pop the call args and push the result.
+    ObjectPtr result = top[0];
+    *SP = call_base;
+    **SP = result;
+    pp_ = InterpreterHelpers::FrameBytecode(*FP)->ptr()->object_pool_;
+  }
+
+  return true;
 }
 
 // Note:
@@ -1543,7 +1593,7 @@
               reentering ? "Re-entering" : "Entering",
               reinterpret_cast<uword>(this), reinterpret_cast<uword>(fp_),
               thread->top_exit_frame_info(),
-              Function::Handle(function).ToCString());
+              Function::Handle(function).ToFullyQualifiedCString());
   }
 #endif
 
@@ -2550,7 +2600,7 @@
   {
     BYTECODE(Allocate, D);
     ClassPtr cls = Class::RawCast(LOAD_CONSTANT(rD));
-    if (LIKELY(InterpreterHelpers::IsFinalized(cls))) {
+    if (LIKELY(InterpreterHelpers::IsAllocateFinalized(cls))) {
       const intptr_t class_id = cls->ptr()->id_;
       const intptr_t instance_size = cls->ptr()->host_instance_size_in_words_
                                      << kWordSizeLog2;
@@ -2580,7 +2630,7 @@
     BYTECODE(AllocateT, 0);
     ClassPtr cls = Class::RawCast(SP[0]);
     TypeArgumentsPtr type_args = TypeArguments::RawCast(SP[-1]);
-    if (LIKELY(InterpreterHelpers::IsFinalized(cls))) {
+    if (LIKELY(InterpreterHelpers::IsAllocateFinalized(cls))) {
       const intptr_t class_id = cls->ptr()->id_;
       const intptr_t instance_size = cls->ptr()->host_instance_size_in_words_
                                      << kWordSizeLog2;
@@ -3492,33 +3542,31 @@
     // Invoke noSuchMethod.
     SP[1] = null_value;
     SP[2] = receiver;
-    SP[3] = argdesc_;
-    SP[4] = null_value;  // Array of arguments (will be filled).
+    SP[3] = Symbols::Call().raw();  // We failed to resolve the 'call' function.
+    SP[4] = argdesc_;
+    SP[5] = null_value;  // Array of arguments (will be filled).
 
     // Allocate array of arguments.
     {
-      SP[5] = Smi::New(argc);  // length
-      SP[6] = null_value;      // type
-      Exit(thread, FP, SP + 7, pc);
+      SP[6] = Smi::New(argc);  // length
+      SP[7] = null_value;      // type
+      Exit(thread, FP, SP + 8, pc);
       if (!InvokeRuntime(thread, this, DRT_AllocateArray,
-                         NativeArguments(thread, 2, SP + 5, SP + 4))) {
+                         NativeArguments(thread, 2, SP + 6, SP + 5))) {
         HANDLE_EXCEPTION;
       }
     }
 
     // Copy arguments into the newly allocated array.
     ObjectPtr* argv = FrameArguments(FP, argc);
-    ArrayPtr array = static_cast<ArrayPtr>(SP[4]);
+    ArrayPtr array = static_cast<ArrayPtr>(SP[5]);
     ASSERT(array->GetClassId() == kArrayCid);
     for (intptr_t i = 0; i < argc; i++) {
       array->ptr()->data()[i] = argv[i];
     }
 
-    // We failed to resolve 'call' function.
-    SP[5] = Symbols::Call().raw();
-
-    // Invoke noSuchMethod passing down receiver, argument descriptor,
-    // array of arguments, and target name.
+    // Invoke noSuchMethod passing down receiver, target name, argument
+    // descriptor, and array of arguments.
     {
       Exit(thread, FP, SP + 6, pc);
       if (!InvokeRuntime(thread, this, DRT_InvokeNoSuchMethod,
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index eaa3b25..5d87370 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -88,15 +88,15 @@
                     deterministic,
                     "Enable deterministic mode.");
 
-int FLAG_null_safety = kNullSafetyOptionUnspecified;
-static void NullSafetyHandler(bool value) {
-  FLAG_null_safety = value ? kNullSafetyOptionStrong : kNullSafetyOptionWeak;
+int FLAG_sound_null_safety = kNullSafetyOptionUnspecified;
+static void SoundNullSafetyHandler(bool value) {
+  FLAG_sound_null_safety =
+      value ? kNullSafetyOptionStrong : kNullSafetyOptionWeak;
 }
 
-DEFINE_FLAG_HANDLER(
-    NullSafetyHandler,
-    null_safety,
-    "Respect the nullability of types in casts and instance checks.");
+DEFINE_FLAG_HANDLER(SoundNullSafetyHandler,
+                    sound_null_safety,
+                    "Respect the nullability of types at runtime.");
 
 DEFINE_FLAG(bool,
             disable_thread_pool_limit,
@@ -148,6 +148,63 @@
   }
 }
 
+void IsolateGroupSource::add_loaded_blob(
+    Zone* zone,
+    const ExternalTypedData& external_typed_data) {
+  Array& loaded_blobs = Array::Handle();
+  bool saved_external_typed_data = false;
+  if (loaded_blobs_ != nullptr) {
+    loaded_blobs = loaded_blobs_;
+
+    // Walk the array, and (if stuff was removed) compact and reuse the space.
+    // Note that the space has to be compacted as the ordering is important.
+    WeakProperty& weak_property = WeakProperty::Handle();
+    WeakProperty& weak_property_tmp = WeakProperty::Handle();
+    ExternalTypedData& existing_entry = ExternalTypedData::Handle(zone);
+    intptr_t next_entry_index = 0;
+    for (intptr_t i = 0; i < loaded_blobs.Length(); i++) {
+      weak_property ^= loaded_blobs.At(i);
+      if (weak_property.key() != ExternalTypedData::null()) {
+        if (i != next_entry_index) {
+          existing_entry = ExternalTypedData::RawCast(weak_property.key());
+          weak_property_tmp ^= loaded_blobs.At(next_entry_index);
+          weak_property_tmp.set_key(existing_entry);
+        }
+        next_entry_index++;
+      }
+    }
+    if (next_entry_index < loaded_blobs.Length()) {
+      // There's now space to re-use.
+      weak_property ^= loaded_blobs.At(next_entry_index);
+      weak_property.set_key(external_typed_data);
+      next_entry_index++;
+      saved_external_typed_data = true;
+    }
+    if (next_entry_index < loaded_blobs.Length()) {
+      ExternalTypedData& nullExternalTypedData =
+          ExternalTypedData::Handle(zone);
+      while (next_entry_index < loaded_blobs.Length()) {
+        // Null out any extra spaces.
+        weak_property ^= loaded_blobs.At(next_entry_index);
+        weak_property.set_key(nullExternalTypedData);
+        next_entry_index++;
+      }
+    }
+  }
+  if (!saved_external_typed_data) {
+    const WeakProperty& weak_property =
+        WeakProperty::Handle(WeakProperty::New(Heap::kOld));
+    weak_property.set_key(external_typed_data);
+
+    intptr_t length = loaded_blobs.IsNull() ? 0 : loaded_blobs.Length();
+    Array& new_array =
+        Array::Handle(Array::Grow(loaded_blobs, length + 1, Heap::kOld));
+    new_array.SetAt(length, weak_property);
+    loaded_blobs_ = new_array.raw();
+  }
+  num_blob_loads_++;
+}
+
 void IdleTimeHandler::InitializeWithHeap(Heap* heap) {
   MutexLocker ml(&mutex_);
   ASSERT(heap_ == nullptr && heap != nullptr);
@@ -827,7 +884,11 @@
     return;
   }
 #endif  // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
-  class_table()->Register(cls);
+  if (cls.IsTopLevel()) {
+    class_table()->RegisterTopLevel(cls);
+  } else {
+    class_table()->Register(cls);
+  }
 }
 
 #if defined(DEBUG)
@@ -1812,6 +1873,18 @@
   return Api::UnwrapHandle(api_result);
 }
 
+ObjectPtr Isolate::CallDeferredLoadHandler(intptr_t id) {
+  Thread* thread = Thread::Current();
+  Api::Scope api_scope(thread);
+  Dart_Handle api_result;
+  {
+    TransitionVMToNative transition(thread);
+    RELEASE_ASSERT(HasDeferredLoadHandler());
+    api_result = group()->deferred_load_handler()(id);
+  }
+  return Api::UnwrapHandle(api_result);
+}
+
 void Isolate::SetupImagePage(const uint8_t* image_buffer, bool is_executable) {
   Image image(image_buffer);
   heap()->SetupImagePage(image.object_start(), image.object_size(),
@@ -2671,9 +2744,9 @@
   visitor->VisitPointer(reinterpret_cast<ObjectPtr*>(&deoptimized_code_array_));
   visitor->VisitPointer(reinterpret_cast<ObjectPtr*>(&sticky_error_));
   if (isolate_group_ != nullptr) {
-    if (isolate_group_->source()->hot_reload_blobs_ != nullptr) {
+    if (isolate_group_->source()->loaded_blobs_ != nullptr) {
       visitor->VisitPointer(reinterpret_cast<ObjectPtr*>(
-          &(isolate_group_->source()->hot_reload_blobs_)));
+          &(isolate_group_->source()->loaded_blobs_)));
     }
   }
 #if !defined(PRODUCT)
@@ -2782,20 +2855,20 @@
   return isolates_.IsEmpty() ? nullptr : isolates_.First();
 }
 
-void IsolateGroup::RunWithStoppedMutators(
-    std::function<void()> single_current_mutator,
-    std::function<void()> otherwise,
+void IsolateGroup::RunWithStoppedMutatorsCallable(
+    Callable* single_current_mutator,
+    Callable* otherwise,
     bool use_force_growth_in_otherwise) {
   auto thread = Thread::Current();
 
   if (thread->IsMutatorThread() && !FLAG_enable_isolate_groups) {
-    single_current_mutator();
+    single_current_mutator->Call();
     return;
   }
 
   if (thread->IsAtSafepoint()) {
     RELEASE_ASSERT(safepoint_handler()->IsOwnedByTheThread(thread));
-    single_current_mutator();
+    single_current_mutator->Call();
     return;
   }
 
@@ -2803,7 +2876,7 @@
     SafepointReadRwLocker ml(thread, isolates_lock_.get());
     const bool only_one_isolate = isolates_.First() == isolates_.Last();
     if (thread->IsMutatorThread() && only_one_isolate) {
-      single_current_mutator();
+      single_current_mutator->Call();
       return;
     }
   }
@@ -2813,10 +2886,10 @@
   // though we only need to ensure that the mutator threads are stopped.
   if (use_force_growth_in_otherwise) {
     ForceGrowthSafepointOperationScope safepoint_scope(thread);
-    otherwise();
+    otherwise->Call();
   } else {
     SafepointOperationScope safepoint_scope(thread);
-    otherwise();
+    otherwise->Call();
   }
 }
 
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 2c217e6..df4b9ab 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -99,7 +99,7 @@
 constexpr int kNullSafetyOptionUnspecified = 0;
 constexpr int kNullSafetyOptionWeak = 1;
 constexpr int kNullSafetyOptionStrong = 2;
-extern int FLAG_null_safety;
+extern int FLAG_sound_null_safety;
 
 class PendingLazyDeopt {
  public:
@@ -128,6 +128,28 @@
   DISALLOW_COPY_AND_ASSIGN(IsolateVisitor);
 };
 
+class Callable : public ValueObject {
+ public:
+  Callable() {}
+  virtual ~Callable() {}
+
+  virtual void Call() = 0;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Callable);
+};
+
+template <typename T>
+class LambdaCallable : public Callable {
+ public:
+  explicit LambdaCallable(T& lambda) : lambda_(lambda) {}
+  void Call() { lambda_(); }
+
+ private:
+  T& lambda_;
+  DISALLOW_COPY_AND_ASSIGN(LambdaCallable);
+};
+
 // Disallow OOB message handling within this scope.
 class NoOOBMessageScope : public ThreadStackResource {
  public:
@@ -200,10 +222,13 @@
         flags(flags),
         script_kernel_buffer(nullptr),
         script_kernel_size(-1),
-        hot_reload_blobs_(nullptr),
-        num_hot_reloads_(0) {}
+        loaded_blobs_(nullptr),
+        num_blob_loads_(0) {}
   ~IsolateGroupSource() { free(name); }
 
+  void add_loaded_blob(Zone* zone_,
+                       const ExternalTypedData& external_typed_data);
+
   // The arguments used for spawning in
   // `Dart_CreateIsolateGroupFromKernel` / `Dart_CreateIsolate`.
   const char* script_uri;
@@ -223,9 +248,9 @@
   // Any newly spawned isolates need to use this permutation map.
   std::unique_ptr<intptr_t[]> cid_permutation_map;
 
-  // List of weak pointers to external typed data for hot reload blobs.
-  ArrayPtr hot_reload_blobs_;
-  intptr_t num_hot_reloads_;
+  // List of weak pointers to external typed data for loaded blobs.
+  ArrayPtr loaded_blobs_;
+  intptr_t num_blob_loads_;
 };
 
 // Tracks idle time and notifies heap when idle time expired.
@@ -407,6 +432,12 @@
   void set_library_tag_handler(Dart_LibraryTagHandler handler) {
     library_tag_handler_ = handler;
   }
+  Dart_DeferredLoadHandler deferred_load_handler() const {
+    return deferred_load_handler_;
+  }
+  void set_deferred_load_handler(Dart_DeferredLoadHandler handler) {
+    deferred_load_handler_ = handler;
+  }
 
   intptr_t GetClassSizeForHeapWalkAt(intptr_t cid);
 
@@ -444,13 +475,25 @@
   //
   // During the duration of this function, no new isolates can be added to the
   // isolate group.
-  void RunWithStoppedMutators(std::function<void()> single_current_mutator,
-                              std::function<void()> otherwise,
-                              bool use_force_growth_in_otherwise = false);
+  void RunWithStoppedMutatorsCallable(
+      Callable* single_current_mutator,
+      Callable* otherwise,
+      bool use_force_growth_in_otherwise = false);
 
-  void RunWithStoppedMutators(std::function<void()> function,
-                              bool use_force_growth = false) {
-    RunWithStoppedMutators(function, function, use_force_growth);
+  template <typename T, typename S>
+  void RunWithStoppedMutators(T single_current_mutator,
+                              S otherwise,
+                              bool use_force_growth_in_otherwise = false) {
+    LambdaCallable<T> single_callable(single_current_mutator);
+    LambdaCallable<S> otherwise_callable(otherwise);
+    RunWithStoppedMutatorsCallable(&single_callable, &otherwise_callable,
+                                   use_force_growth_in_otherwise);
+  }
+
+  template <typename T>
+  void RunWithStoppedMutators(T function, bool use_force_growth = false) {
+    LambdaCallable<T> callable(function);
+    RunWithStoppedMutatorsCallable(&callable, &callable, use_force_growth);
   }
 
 #ifndef PRODUCT
@@ -602,6 +645,7 @@
   intptr_t isolate_count_ = 0;
   bool initial_spawn_successful_ = false;
   Dart_LibraryTagHandler library_tag_handler_ = nullptr;
+  Dart_DeferredLoadHandler deferred_load_handler_ = nullptr;
   int64_t start_time_micros_;
 
 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
@@ -843,6 +887,10 @@
   ObjectPtr CallTagHandler(Dart_LibraryTag tag,
                            const Object& arg1,
                            const Object& arg2);
+  bool HasDeferredLoadHandler() const {
+    return group()->deferred_load_handler() != nullptr;
+  }
+  ObjectPtr CallDeferredLoadHandler(intptr_t id);
 
   void SetupImagePage(const uint8_t* snapshot_buffer, bool is_executable);
 
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 6c83404..786c2ed 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -404,11 +404,6 @@
 };
 
 bool IsolateReloadContext::IsSameClass(const Class& a, const Class& b) {
-  if (a.is_patch() != b.is_patch()) {
-    // TODO(johnmccutchan): Should we just check the class kind bits?
-    return false;
-  }
-
   // TODO(turnidge): We need to look at generic type arguments for
   // synthetic mixin classes.  Their names are not necessarily unique
   // currently.
@@ -463,6 +458,7 @@
       group_reload_context_(group_reload_context),
       isolate_(isolate),
       saved_class_table_(nullptr),
+      saved_tlc_class_table_(nullptr),
       old_classes_set_storage_(Array::null()),
       class_map_storage_(Array::null()),
       removed_class_set_storage_(Array::null()),
@@ -481,6 +477,7 @@
 IsolateReloadContext::~IsolateReloadContext() {
   ASSERT(zone_ == Thread::Current()->zone());
   ASSERT(saved_class_table_.load(std::memory_order_relaxed) == nullptr);
+  ASSERT(saved_tlc_class_table_.load(std::memory_order_relaxed) == nullptr);
 }
 
 void IsolateGroupReloadContext::ReportError(const Error& error) {
@@ -624,65 +621,13 @@
       const auto& typed_data = ExternalTypedData::Handle(
           Z, ExternalTypedData::NewFinalizeWithFree(
                  const_cast<uint8_t*>(kernel_buffer), kernel_buffer_size));
-
       kernel_program = kernel::Program::ReadFromTypedData(typed_data);
     }
 
     ExternalTypedData& external_typed_data =
         ExternalTypedData::Handle(Z, kernel_program.get()->typed_data()->raw());
     IsolateGroupSource* source = Isolate::Current()->source();
-    Array& hot_reload_blobs = Array::Handle();
-    bool saved_external_typed_data = false;
-    if (source->hot_reload_blobs_ != nullptr) {
-      hot_reload_blobs = source->hot_reload_blobs_;
-
-      // Walk the array, and (if stuff was removed) compact and reuse the space.
-      // Note that the space has to be compacted as the ordering is important.
-      WeakProperty& weak_property = WeakProperty::Handle();
-      WeakProperty& weak_property_tmp = WeakProperty::Handle();
-      ExternalTypedData& existing_entry = ExternalTypedData::Handle(Z);
-      intptr_t next_entry_index = 0;
-      for (intptr_t i = 0; i < hot_reload_blobs.Length(); i++) {
-        weak_property ^= hot_reload_blobs.At(i);
-        if (weak_property.key() != ExternalTypedData::null()) {
-          if (i != next_entry_index) {
-            existing_entry = ExternalTypedData::RawCast(weak_property.key());
-            weak_property_tmp ^= hot_reload_blobs.At(next_entry_index);
-            weak_property_tmp.set_key(existing_entry);
-          }
-          next_entry_index++;
-        }
-      }
-      if (next_entry_index < hot_reload_blobs.Length()) {
-        // There's now space to re-use.
-        weak_property ^= hot_reload_blobs.At(next_entry_index);
-        weak_property.set_key(external_typed_data);
-        next_entry_index++;
-        saved_external_typed_data = true;
-      }
-      if (next_entry_index < hot_reload_blobs.Length()) {
-        ExternalTypedData& nullExternalTypedData = ExternalTypedData::Handle(Z);
-        while (next_entry_index < hot_reload_blobs.Length()) {
-          // Null out any extra spaces.
-          weak_property ^= hot_reload_blobs.At(next_entry_index);
-          weak_property.set_key(nullExternalTypedData);
-          next_entry_index++;
-        }
-      }
-    }
-    if (!saved_external_typed_data) {
-      const WeakProperty& weak_property =
-          WeakProperty::Handle(WeakProperty::New(Heap::kOld));
-      weak_property.set_key(external_typed_data);
-
-      intptr_t length =
-          hot_reload_blobs.IsNull() ? 0 : hot_reload_blobs.Length();
-      Array& new_array =
-          Array::Handle(Array::Grow(hot_reload_blobs, length + 1, Heap::kOld));
-      new_array.SetAt(length, weak_property);
-      source->hot_reload_blobs_ = new_array.raw();
-    }
-    source->num_hot_reloads_++;
+    source->add_loaded_blob(Z, external_typed_data);
 
     modified_libs_ = new (Z) BitVector(Z, num_old_libs_);
     kernel::KernelLoader::FindModifiedLibraries(
@@ -1189,7 +1134,11 @@
 void IsolateReloadContext::RegisterClass(const Class& new_cls) {
   const Class& old_cls = Class::Handle(OldClassOrNull(new_cls));
   if (old_cls.IsNull()) {
-    I->class_table()->Register(new_cls);
+    if (new_cls.IsTopLevel()) {
+      I->class_table()->RegisterTopLevel(new_cls);
+    } else {
+      I->class_table()->Register(new_cls);
+    }
 
     if (FLAG_identity_reload) {
       TIR_Print("Could not find replacement class for %s\n",
@@ -1320,16 +1269,22 @@
   // Copy the size table for isolate group.
   intptr_t* saved_size_table = nullptr;
   shared_class_table_->CopyBeforeHotReload(&saved_size_table, &saved_num_cids_);
+
+  Thread* thread = Thread::Current();
   {
-    NoSafepointScope no_safepoint_scope(Thread::Current());
+    NoSafepointScope no_safepoint_scope(thread);
 
     // The saved_size_table_ will now become source of truth for GC.
     saved_size_table_.store(saved_size_table, std::memory_order_release);
-
-    // We can therefore wipe out all of the old entries (if that table is used
-    // for GC during the hot-reload we have a bug).
-    shared_class_table_->ResetBeforeHotReload();
   }
+
+  // But the concurrent sweeper may still be reading from the old table.
+  thread->heap()->WaitForSweeperTasks(thread);
+
+  // Now we can clear the old table. This satisfies asserts during class
+  // registration and encourages fast failure if we use the wrong table
+  // for GC during reload, but isn't strictly needed for correctness.
+  shared_class_table_->ResetBeforeHotReload();
 }
 
 void IsolateReloadContext::CheckpointClasses() {
@@ -1343,7 +1298,9 @@
   // Copy the class table for isolate.
   ClassTable* class_table = I->class_table();
   ClassPtr* saved_class_table = nullptr;
-  class_table->CopyBeforeHotReload(&saved_class_table, &saved_num_cids_);
+  ClassPtr* saved_tlc_class_table = nullptr;
+  class_table->CopyBeforeHotReload(&saved_class_table, &saved_tlc_class_table,
+                                   &saved_num_cids_, &saved_num_tlc_cids_);
 
   // Copy classes into saved_class_table_ first. Make sure there are no
   // safepoints until saved_class_table_ is filled up and saved so class raw
@@ -1353,6 +1310,8 @@
 
     // The saved_class_table_ is now source of truth for GC.
     saved_class_table_.store(saved_class_table, std::memory_order_release);
+    saved_tlc_class_table_.store(saved_tlc_class_table,
+                                 std::memory_order_release);
 
     // We can therefore wipe out all of the old entries (if that table is used
     // for GC during the hot-reload we have a bug).
@@ -1372,6 +1331,14 @@
       }
     }
   }
+  for (intptr_t i = 0; i < saved_num_tlc_cids_; i++) {
+    const intptr_t cid = ClassTable::CidFromTopLevelIndex(i);
+    if (class_table->IsValidIndex(cid) && class_table->HasValidClassAt(cid)) {
+      cls = class_table->At(cid);
+      bool already_present = old_classes_set.Insert(cls);
+      ASSERT(!already_present);
+    }
+  }
   old_classes_set_storage_ = old_classes_set.Release().raw();
   TIR_Print("---- System had %" Pd " classes\n", saved_num_cids_);
 }
@@ -1520,8 +1487,9 @@
 
 void IsolateReloadContext::RollbackClasses() {
   TIR_Print("---- ROLLING BACK CLASS TABLE\n");
-  ASSERT(saved_num_cids_ > 0);
+  ASSERT((saved_num_cids_ + saved_num_tlc_cids_) > 0);
   ASSERT(saved_class_table_.load(std::memory_order_relaxed) != nullptr);
+  ASSERT(saved_tlc_class_table_.load(std::memory_order_relaxed) != nullptr);
 
   DiscardSavedClassTable(/*is_rollback=*/true);
 }
@@ -1743,6 +1711,10 @@
       TIR_Print("Identity reload failed! B#C=%" Pd " A#C=%" Pd "\n",
                 saved_num_cids_, I->class_table()->NumCids());
     }
+    if (saved_num_tlc_cids_ != I->class_table()->NumTopLevelCids()) {
+      TIR_Print("Identity reload failed! B#TLC=%" Pd " A#TLC=%" Pd "\n",
+                saved_num_tlc_cids_, I->class_table()->NumTopLevelCids());
+    }
     const auto& saved_libs = GrowableObjectArray::Handle(saved_libraries_);
     const GrowableObjectArray& libs =
         GrowableObjectArray::Handle(I->object_store()->libraries());
@@ -1887,20 +1859,29 @@
 }
 
 ClassPtr IsolateReloadContext::GetClassForHeapWalkAt(intptr_t cid) {
-  ClassPtr* class_table = saved_class_table_.load(std::memory_order_acquire);
-  if (class_table != NULL) {
-    ASSERT(cid > 0);
-    ASSERT(cid < saved_num_cids_);
-    return class_table[cid];
+  ClassPtr* class_table = nullptr;
+  intptr_t index = -1;
+  if (ClassTable::IsTopLevelCid(cid)) {
+    class_table = saved_tlc_class_table_.load(std::memory_order_acquire);
+    index = ClassTable::IndexFromTopLevelCid(cid);
+    ASSERT(index < saved_num_tlc_cids_);
   } else {
-    return isolate_->class_table()->At(cid);
+    class_table = saved_class_table_.load(std::memory_order_acquire);
+    index = cid;
+    ASSERT(cid > 0 && cid < saved_num_cids_);
   }
+  if (class_table != nullptr) {
+    return class_table[index];
+  }
+  return isolate_->class_table()->At(cid);
 }
 
 intptr_t IsolateGroupReloadContext::GetClassSizeForHeapWalkAt(classid_t cid) {
+  if (ClassTable::IsTopLevelCid(cid)) {
+    return 0;
+  }
   intptr_t* size_table = saved_size_table_.load(std::memory_order_acquire);
   if (size_table != nullptr) {
-    ASSERT(cid > 0);
     ASSERT(cid < saved_num_cids_);
     return size_table[cid];
   } else {
@@ -1911,9 +1892,13 @@
 void IsolateReloadContext::DiscardSavedClassTable(bool is_rollback) {
   ClassPtr* local_saved_class_table =
       saved_class_table_.load(std::memory_order_relaxed);
-  I->class_table()->ResetAfterHotReload(local_saved_class_table,
-                                        saved_num_cids_, is_rollback);
+  ClassPtr* local_saved_tlc_class_table =
+      saved_tlc_class_table_.load(std::memory_order_relaxed);
+  I->class_table()->ResetAfterHotReload(
+      local_saved_class_table, local_saved_tlc_class_table, saved_num_cids_,
+      saved_num_tlc_cids_, is_rollback);
   saved_class_table_.store(nullptr, std::memory_order_release);
+  saved_tlc_class_table_.store(nullptr, std::memory_order_release);
 }
 
 void IsolateGroupReloadContext::DiscardSavedClassTable(bool is_rollback) {
@@ -1937,6 +1922,13 @@
     auto class_table = reinterpret_cast<ObjectPtr*>(&(saved_class_table[0]));
     visitor->VisitPointers(class_table, saved_num_cids_);
   }
+  ClassPtr* saved_tlc_class_table =
+      saved_class_table_.load(std::memory_order_relaxed);
+  if (saved_tlc_class_table != NULL) {
+    auto class_table =
+        reinterpret_cast<ObjectPtr*>(&(saved_tlc_class_table[0]));
+    visitor->VisitPointers(class_table, saved_num_tlc_cids_);
+  }
 }
 
 ObjectStore* IsolateReloadContext::object_store() {
diff --git a/runtime/vm/isolate_reload.h b/runtime/vm/isolate_reload.h
index 2295441..b06ca57 100644
--- a/runtime/vm/isolate_reload.h
+++ b/runtime/vm/isolate_reload.h
@@ -384,7 +384,9 @@
   std::shared_ptr<IsolateGroupReloadContext> group_reload_context_;
   Isolate* isolate_;
   intptr_t saved_num_cids_ = -1;
+  intptr_t saved_num_tlc_cids_ = -1;
   std::atomic<ClassPtr*> saved_class_table_;
+  std::atomic<ClassPtr*> saved_tlc_class_table_;
   MallocGrowableArray<LibraryInfo> library_infos_;
 
   ClassPtr OldClassOrNull(const Class& replacement_or_new);
diff --git a/runtime/vm/json_test.cc b/runtime/vm/json_test.cc
index d25d01d..db2e2f3 100644
--- a/runtime/vm/json_test.cc
+++ b/runtime/vm/json_test.cc
@@ -15,9 +15,9 @@
 TEST_CASE(JSON_TextBuffer) {
   TextBuffer w(5);  // Small enough to make buffer grow at least once.
   w.Printf("{ \"%s\" : %d", "length", 175);
-  EXPECT_STREQ("{ \"length\" : 175", w.buf());
+  EXPECT_STREQ("{ \"length\" : 175", w.buffer());
   w.Printf(", \"%s\" : \"%s\" }", "command", "stopIt");
-  EXPECT_STREQ("{ \"length\" : 175, \"command\" : \"stopIt\" }", w.buf());
+  EXPECT_STREQ("{ \"length\" : 175, \"command\" : \"stopIt\" }", w.buffer());
 }
 
 TEST_CASE(JSON_JSONStream_Primitives) {
diff --git a/runtime/vm/json_writer.cc b/runtime/vm/json_writer.cc
index 587bf15..b0358f3 100644
--- a/runtime/vm/json_writer.cc
+++ b/runtime/vm/json_writer.cc
@@ -69,7 +69,7 @@
 void JSONWriter::UncloseObject() {
   intptr_t len = buffer_.length();
   ASSERT(len > 0);
-  ASSERT(buffer_.buf()[len - 1] == '}');
+  ASSERT(buffer_.buffer()[len - 1] == '}');
   open_objects_++;
   buffer_.set_length(len - 1);
 }
@@ -315,7 +315,7 @@
 }
 
 bool JSONWriter::NeedComma() {
-  const char* buffer = buffer_.buf();
+  const char* buffer = buffer_.buffer();
   intptr_t length = buffer_.length();
   if (length == 0) {
     return false;
diff --git a/runtime/vm/json_writer.h b/runtime/vm/json_writer.h
index c9d4375..311e476 100644
--- a/runtime/vm/json_writer.h
+++ b/runtime/vm/json_writer.h
@@ -17,7 +17,7 @@
   explicit JSONWriter(intptr_t buf_size = 256);
 
   TextBuffer* buffer() { return &buffer_; }
-  const char* ToCString() { return buffer_.buf(); }
+  const char* ToCString() { return buffer_.buffer(); }
 
   void Steal(char** buffer, intptr_t* buffer_length);
 
diff --git a/runtime/vm/kernel.cc b/runtime/vm/kernel.cc
index 84f456c..19070a4 100644
--- a/runtime/vm/kernel.cc
+++ b/runtime/vm/kernel.cc
@@ -718,12 +718,42 @@
 bool NeedsDynamicInvocationForwarder(const Function& function) {
   Zone* zone = Thread::Current()->zone();
 
+  // Right now closures do not need a dyn:* forwarder.
+  // See https://github.com/dart-lang/sdk/issues/40813
+  if (function.IsClosureFunction()) return false;
+
+  // Method extractors have no parameters to check and return value is a closure
+  // and therefore not an unboxed primitive type.
+  if (function.IsMethodExtractor()) {
+    return false;
+  }
+
+  // Invoke field dispatchers are dynamically generated, will invoke a getter to
+  // obtain the field value and then invoke ".call()" on the result.
+  // Those dynamically generated dispathers don't have proper kernel metadata
+  // associated with them - we can therefore not query if there are dynamic
+  // calls to them or not and are therefore conservative.
+  if (function.IsInvokeFieldDispatcher()) {
+    return true;
+  }
+
+  // The dyn:* forwarders perform unboxing of parameters before calling the
+  // actual target (which accepts unboxed parameters) and boxes return values
+  // of the return value.
+  if (function.HasUnboxedParameters() || function.HasUnboxedReturnValue()) {
+    return true;
+  }
+
+  // There are no parameters to type check for getters and if the return value
+  // is boxed, then the dyn:* forwarder is not needed.
+  if (function.IsImplicitGetterFunction()) {
+    return false;
+  }
+
   // Covariant parameters (both explicitly covariant and generic-covariant-impl)
   // are checked in the body of a function and therefore don't need checks in a
   // dynamic invocation forwarder. So dynamic invocation forwarder is only
   // needed if there are non-covariant parameters of non-top type.
-
-  ASSERT(!function.IsImplicitGetterFunction());
   if (function.IsImplicitSetterFunction()) {
     const auto& field = Field::Handle(zone, function.accessor_field());
     return !(field.is_covariant() || field.is_generic_covariant_impl());
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index 33dc838..01e34ab 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 = 43;
-static const uint32_t kMaxSupportedKernelFormatVersion = 43;
+static const uint32_t kMinSupportedKernelFormatVersion = 44;
+static const uint32_t kMaxSupportedKernelFormatVersion = 44;
 
 // Keep in sync with package:kernel/lib/binary/tag.dart
 #define KERNEL_TAG_LIST(V)                                                     \
diff --git a/runtime/vm/kernel_isolate.cc b/runtime/vm/kernel_isolate.cc
index ae0b54a..968c212 100644
--- a/runtime/vm/kernel_isolate.cc
+++ b/runtime/vm/kernel_isolate.cc
@@ -476,6 +476,8 @@
 
   Dart_KernelCompilationResult SendAndWaitForResponse(
       Dart_Port kernel_port,
+      const uint8_t* platform_kernel,
+      intptr_t platform_kernel_size,
       const char* expression,
       const Array& definitions,
       const Array& type_definitions,
@@ -494,6 +496,25 @@
     send_port.value.as_send_port.id = port_;
     send_port.value.as_send_port.origin_id = ILLEGAL_PORT;
 
+    Dart_CObject dart_platform_kernel;
+    if (platform_kernel != NULL) {
+      dart_platform_kernel.type = Dart_CObject_kExternalTypedData;
+      dart_platform_kernel.value.as_external_typed_data.type =
+          Dart_TypedData_kUint8;
+      dart_platform_kernel.value.as_external_typed_data.length =
+          platform_kernel_size;
+      dart_platform_kernel.value.as_external_typed_data.data =
+          const_cast<uint8_t*>(platform_kernel);
+      dart_platform_kernel.value.as_external_typed_data.peer =
+          const_cast<uint8_t*>(platform_kernel);
+      dart_platform_kernel.value.as_external_typed_data.callback =
+          PassThroughFinalizer;
+    } else {
+      // If NULL, the kernel service looks up the platform dill file
+      // next to the executable.
+      dart_platform_kernel.type = Dart_CObject_kNull;
+    }
+
     Dart_CObject expression_object;
     expression_object.type = Dart_CObject_kString;
     expression_object.value.as_string = const_cast<char*>(expression);
@@ -560,19 +581,17 @@
     if (source->script_kernel_buffer != nullptr) {
       num_dills++;
     }
-    Array& hot_reload_blobs = Array::Handle();
-    if (source->hot_reload_blobs_ != nullptr) {
-      hot_reload_blobs = source->hot_reload_blobs_;
+    Array& loaded_blobs = Array::Handle();
+    if (source->loaded_blobs_ != nullptr) {
+      loaded_blobs = source->loaded_blobs_;
       WeakProperty& weak_property = WeakProperty::Handle();
-      for (intptr_t i = 0; i < hot_reload_blobs.Length(); i++) {
-        weak_property ^= hot_reload_blobs.At(i);
+      for (intptr_t i = 0; i < loaded_blobs.Length(); i++) {
+        weak_property ^= loaded_blobs.At(i);
         if (weak_property.key() != ExternalTypedData::null()) {
           num_dills++;
         }
       }
     }
-    // TODO(jensj): Get the platform somehow. Currently the dart side simply
-    // loads the dill from file.
 
     Dart_CObject dills_object;
     dills_object.type = Dart_CObject_kArray;
@@ -584,10 +603,10 @@
                            source->kernel_buffer_size);
     dill_num = setDillData(dills_array, dill_num, source->script_kernel_buffer,
                            source->script_kernel_size);
-    if (!hot_reload_blobs.IsNull()) {
+    if (!loaded_blobs.IsNull()) {
       WeakProperty& weak_property = WeakProperty::Handle();
-      for (intptr_t i = 0; i < hot_reload_blobs.Length(); i++) {
-        weak_property ^= hot_reload_blobs.At(i);
+      for (intptr_t i = 0; i < loaded_blobs.Length(); i++) {
+        weak_property ^= loaded_blobs.At(i);
         if (weak_property.key() != ExternalTypedData::null()) {
           ExternalTypedData& externalTypedData = ExternalTypedData::Handle(
               thread->zone(), ExternalTypedData::RawCast(weak_property.key()));
@@ -601,9 +620,9 @@
     }
     dills_object.value.as_array.values = dills_array;
 
-    Dart_CObject hot_reload_count;
-    hot_reload_count.type = Dart_CObject_kInt64;
-    hot_reload_count.value.as_int64 = source->num_hot_reloads_;
+    Dart_CObject num_blob_loads;
+    num_blob_loads.type = Dart_CObject_kInt64;
+    num_blob_loads.value.as_int64 = source->num_blob_loads_;
 
     Dart_CObject suppress_warnings;
     suppress_warnings.type = Dart_CObject_kBool;
@@ -637,6 +656,7 @@
     Dart_CObject* message_arr[] = {&tag,
                                    &send_port,
                                    &isolate_id,
+                                   &dart_platform_kernel,
                                    &expression_object,
                                    &definitions_object,
                                    &type_definitions_object,
@@ -644,7 +664,7 @@
                                    &class_object,
                                    &is_static_object,
                                    &dills_object,
-                                   &hot_reload_count,
+                                   &num_blob_loads,
                                    &suppress_warnings,
                                    &enable_asserts,
                                    &experimental_flags_object,
@@ -777,7 +797,7 @@
     null_safety.value.as_int32 =
         (isolate != NULL) ? (isolate->null_safety() ? kNullSafetyOptionStrong
                                                     : kNullSafetyOptionWeak)
-                          : FLAG_null_safety;
+                          : FLAG_sound_null_safety;
 
     intptr_t num_experimental_flags = experimental_flags->length();
     Dart_CObject** experimental_flags_array =
@@ -1088,6 +1108,8 @@
 }
 
 Dart_KernelCompilationResult KernelIsolate::CompileExpressionToKernel(
+    const uint8_t* platform_kernel,
+    intptr_t platform_kernel_size,
     const char* expression,
     const Array& definitions,
     const Array& type_definitions,
@@ -1105,9 +1127,10 @@
   TransitionVMToNative transition(Thread::Current());
   KernelCompilationRequest request;
   ASSERT(is_static || (klass != nullptr));
-  return request.SendAndWaitForResponse(kernel_port, expression, definitions,
-                                        type_definitions, library_url, klass,
-                                        is_static, experimental_flags_);
+  return request.SendAndWaitForResponse(
+      kernel_port, platform_kernel, platform_kernel_size, expression,
+      definitions, type_definitions, library_url, klass, is_static,
+      experimental_flags_);
 }
 
 Dart_KernelCompilationResult KernelIsolate::UpdateInMemorySources(
diff --git a/runtime/vm/kernel_isolate.h b/runtime/vm/kernel_isolate.h
index fbf31e2..e45022d 100644
--- a/runtime/vm/kernel_isolate.h
+++ b/runtime/vm/kernel_isolate.h
@@ -64,6 +64,8 @@
       Dart_SourceFile source_files[]);
 
   static Dart_KernelCompilationResult CompileExpressionToKernel(
+      const uint8_t* platform_kernel,
+      intptr_t platform_kernel_size,
       const char* expression,
       const Array& definitions,
       const Array& type_definitions,
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index 37a5469..092af49 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -231,6 +231,11 @@
   helper.ReadProhibitions();
 }
 
+void KernelLoader::ReadLoadingUnits() {
+  LoadingUnitsMetadataHelper helper(&helper_);
+  helper.ReadLoadingUnits();
+}
+
 Object& KernelLoader::LoadEntireProgram(Program* program,
                                         bool process_pending_classes) {
   Thread* thread = Thread::Current();
@@ -274,11 +279,19 @@
       if (pair != NULL) {
         // At least two entries with content. Unless the content is the same
         // that's not valid.
-        if (pair->sources->CompareTo(script_source) != 0 ||
-            !pair->line_starts->CanonicalizeEquals(line_starts)) {
-          FATAL(
+        const bool src_differ = pair->sources->CompareTo(script_source) != 0;
+        const bool line_starts_differ =
+            !pair->line_starts->CanonicalizeEquals(line_starts);
+        if (src_differ || line_starts_differ) {
+          FATAL3(
               "Invalid kernel binary: Contains at least two source entries "
-              "that do not agree.");
+              "that do not agree. URI '%s', difference: %s. Subprogram count: "
+              "%" Pd ".",
+              uri_string.ToCString(),
+              src_differ && line_starts_differ
+                  ? "src and line starts"
+                  : (src_differ ? "src" : "line starts"),
+              subprogram_count);
         }
       } else {
         UriToSourceTableEntry* tmp = new UriToSourceTableEntry();
@@ -363,7 +376,6 @@
   const intptr_t source_table_size = helper_.SourceTableSize();
   const Array& scripts =
       Array::Handle(Z, Array::New(source_table_size, Heap::kOld));
-  patch_classes_ = Array::New(source_table_size, Heap::kOld);
 
   // Copy the Kernel string offsets out of the binary and into the VM's heap.
   ASSERT(program_->string_table_offset() >= 0);
@@ -476,11 +488,7 @@
       expression_evaluation_library_(Library::Handle(Z)) {
   ASSERT(T.active_class_ == &active_class_);
   T.finalize_ = false;
-
-  const Array& scripts = Array::Handle(Z, kernel_program_info_.scripts());
-  patch_classes_ = Array::New(scripts.Length(), Heap::kOld);
   library_kernel_data_ = kernel_data.raw();
-
   H.InitFromKernelProgramInfo(kernel_program_info_);
 }
 
@@ -539,7 +547,7 @@
     for (intptr_t j = 0; j < annotation_count; ++j) {
       const intptr_t tag = helper_.PeekTag();
       if (tag == kConstantExpression) {
-        helper_.ReadByte();  // Skip the tag.
+        helper_.ReadByte();      // Skip the tag.
         helper_.ReadPosition();  // Skip fileOffset.
         helper_.SkipDartType();  // Skip type.
 
@@ -670,7 +678,7 @@
 
         const intptr_t tag = helper_.PeekTag();
         if (tag == kConstantExpression) {
-          helper_.ReadByte();  // Skip the tag.
+          helper_.ReadByte();      // Skip the tag.
           helper_.ReadPosition();  // Skip fileOffset.
           helper_.SkipDartType();  // Skip type.
 
@@ -1040,15 +1048,17 @@
       library_helper.GetNonNullableByDefaultCompiledMode();
   if (!I->null_safety() && mode == NNBDCompiledMode::kStrong) {
     H.ReportError(
-        "Library '%s' was compiled with null safety (in strong mode) and it "
-        "requires --null-safety option at runtime",
+        "Library '%s' was compiled with sound null safety (in strong mode) and "
+        "it "
+        "requires --sound-null-safety option at runtime",
         String::Handle(library.url()).ToCString());
   }
   if (I->null_safety() && (mode == NNBDCompiledMode::kWeak ||
                            mode == NNBDCompiledMode::kDisabled)) {
     H.ReportError(
-        "Library '%s' was compiled without null safety (in weak mode) and it "
-        "cannot be used with --null-safety at runtime",
+        "Library '%s' was compiled without sound null safety (in weak mode) "
+        "and it "
+        "cannot be used with --sound-null-safety at runtime",
         String::Handle(library.url()).ToCString());
   }
   library.set_nnbd_compiled_mode(mode);
@@ -1104,6 +1114,7 @@
   Class& toplevel_class =
       Class::Handle(Z, Class::New(library, Symbols::TopLevel(), script,
                                   TokenPosition::kNoSource, register_class));
+  toplevel_class.set_is_abstract();
   toplevel_class.set_is_declaration_loaded();
   toplevel_class.set_is_type_finalized();
   library.set_toplevel_class(toplevel_class);
@@ -1867,7 +1878,7 @@
         // TODO(sjindel): Refactor `ExternalName` handling to do this as well
         // and avoid the "potential natives" list.
 
-        helper_.ReadByte();  // Skip the tag.
+        helper_.ReadByte();      // Skip the tag.
         helper_.ReadPosition();  // Skip fileOffset.
         helper_.SkipDartType();  // Skip type.
         const intptr_t offset_in_constant_table = helper_.ReadUInt();
@@ -2091,6 +2102,13 @@
                                              intptr_t source_uri_index) {
   const Script& correct_script = Script::Handle(Z, ScriptAt(source_uri_index));
   if (klass.script() != correct_script.raw()) {
+    // Lazily create the [patch_classes_] array in case we need it.
+    if (patch_classes_.IsNull()) {
+      const Array& scripts = Array::Handle(Z, kernel_program_info_.scripts());
+      ASSERT(!scripts.IsNull());
+      patch_classes_ = Array::New(scripts.Length(), Heap::kOld);
+    }
+
     // Use cache for patch classes. This works best for in-order usages.
     PatchClass& patch_class = PatchClass::ZoneHandle(Z);
     patch_class ^= patch_classes_.At(source_uri_index);
@@ -2228,6 +2246,7 @@
   getter.set_accessor_field(field);
   getter.set_is_extension_member(field.is_extension_member());
   H.SetupFieldAccessorFunction(klass, getter, field_type);
+  T.SetupUnboxingInfoMetadataForFieldAccessors(getter, library_kernel_offset_);
 
   if (field.NeedsSetter()) {
     // Only static fields can be const.
@@ -2249,6 +2268,8 @@
     setter.set_accessor_field(field);
     setter.set_is_extension_member(field.is_extension_member());
     H.SetupFieldAccessorFunction(klass, setter, field_type);
+    T.SetupUnboxingInfoMetadataForFieldAccessors(getter,
+                                                 library_kernel_offset_);
   }
 }
 
diff --git a/runtime/vm/kernel_loader.h b/runtime/vm/kernel_loader.h
index 8e79898..7826867 100644
--- a/runtime/vm/kernel_loader.h
+++ b/runtime/vm/kernel_loader.h
@@ -223,6 +223,7 @@
   static void FinishLoading(const Class& klass);
 
   void ReadObfuscationProhibitions();
+  void ReadLoadingUnits();
 
  private:
   // Check for the presence of a (possibly const) constructor for the
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 66640b8..58327ce 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -8,6 +8,7 @@
 
 #include "include/dart_api.h"
 #include "platform/assert.h"
+#include "platform/text_buffer.h"
 #include "platform/unaligned.h"
 #include "platform/unicode.h"
 #include "vm/bit_vector.h"
@@ -173,6 +174,7 @@
 ClassPtr Object::icdata_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::megamorphic_cache_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::subtypetestcache_class_ = static_cast<ClassPtr>(RAW_NULL);
+ClassPtr Object::loadingunit_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::api_error_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::language_error_class_ = static_cast<ClassPtr>(RAW_NULL);
 ClassPtr Object::unhandled_exception_class_ = static_cast<ClassPtr>(RAW_NULL);
@@ -182,7 +184,7 @@
 
 const double MegamorphicCache::kLoadFactor = 0.50;
 
-static void AppendSubString(ZoneTextBuffer* buffer,
+static void AppendSubString(BaseTextBuffer* buffer,
                             const char* name,
                             intptr_t start_pos,
                             intptr_t len) {
@@ -736,7 +738,7 @@
     cls.set_next_field_offset(host_next_field_offset, target_next_field_offset);
     cls.set_id(Class::kClassId);
     cls.set_state_bits(0);
-    cls.set_is_finalized();
+    cls.set_is_allocate_finalized();
     cls.set_is_declaration_loaded();
     cls.set_is_type_finalized();
     cls.set_type_arguments_field_offset_in_words(Class::kNoTypeArguments,
@@ -744,7 +746,7 @@
     cls.set_num_type_arguments(0);
     cls.set_num_native_fields(0);
     cls.InitEmptyFields();
-    isolate->RegisterClass(cls);
+    isolate->class_table()->Register(cls);
   }
 
   // Allocate and initialize the null class.
@@ -755,7 +757,7 @@
   // Allocate and initialize Never class.
   cls = Class::New<Instance, RTN::Instance>(kNeverCid, isolate);
   cls.set_num_type_arguments(0);
-  cls.set_is_finalized();
+  cls.set_is_allocate_finalized();
   cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
   isolate->object_store()->set_never_class(cls);
@@ -765,7 +767,7 @@
       Class::New<FreeListElement::FakeInstance,
                  RTN::FreeListElement::FakeInstance>(kFreeListElement, isolate);
   cls.set_num_type_arguments(0);
-  cls.set_is_finalized();
+  cls.set_is_allocate_finalized();
   cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
 
@@ -774,7 +776,7 @@
                    RTN::ForwardingCorpse::FakeInstance>(kForwardingCorpse,
                                                         isolate);
   cls.set_num_type_arguments(0);
-  cls.set_is_finalized();
+  cls.set_is_allocate_finalized();
   cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
 
@@ -890,6 +892,9 @@
   cls = Class::New<SubtypeTestCache, RTN::SubtypeTestCache>(isolate);
   subtypetestcache_class_ = cls.raw();
 
+  cls = Class::New<LoadingUnit, RTN::LoadingUnit>(isolate);
+  loadingunit_class_ = cls.raw();
+
   cls = Class::New<ApiError, RTN::ApiError>(isolate);
   api_error_class_ = cls.raw();
 
@@ -1047,6 +1052,7 @@
                                     Smi::New(0));
     empty_type_arguments_->StoreSmi(&empty_type_arguments_->raw_ptr()->hash_,
                                     Smi::New(0));
+    empty_type_arguments_->ComputeHash();
     empty_type_arguments_->SetCanonical();
   }
 
@@ -1057,20 +1063,20 @@
   cls = Class::New<Instance, RTN::Instance>(kDynamicCid, isolate);
   cls.set_is_abstract();
   cls.set_num_type_arguments(0);
-  cls.set_is_finalized();
+  cls.set_is_allocate_finalized();
   cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
   dynamic_class_ = cls.raw();
 
   cls = Class::New<Instance, RTN::Instance>(kVoidCid, isolate);
   cls.set_num_type_arguments(0);
-  cls.set_is_finalized();
+  cls.set_is_allocate_finalized();
   cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
   void_class_ = cls.raw();
 
   cls = Class::New<Type, RTN::Type>(isolate);
-  cls.set_is_finalized();
+  cls.set_is_allocate_finalized();
   cls.set_is_declaration_loaded();
   cls.set_is_type_finalized();
 
@@ -1121,6 +1127,9 @@
   error_str = String::New("Background Compilation Failed", Heap::kOld);
   *background_compilation_error_ =
       LanguageError::New(error_str, Report::kBailout, Heap::kOld);
+  error_str = String::New("Out of memory", Heap::kOld);
+  *out_of_memory_error_ =
+      LanguageError::New(error_str, Report::kBailout, Heap::kOld);
 
   // Allocate the parameter arrays for method extractor types and names.
   *extractor_parameter_types_ = Array::New(1, Heap::kOld);
@@ -1211,6 +1220,8 @@
   ASSERT(speculative_inlining_error_->IsLanguageError());
   ASSERT(!background_compilation_error_->IsSmi());
   ASSERT(background_compilation_error_->IsLanguageError());
+  ASSERT(!out_of_memory_error_->IsSmi());
+  ASSERT(out_of_memory_error_->IsLanguageError());
   ASSERT(!vm_isolate_snapshot_object_table_->IsSmi());
   ASSERT(vm_isolate_snapshot_object_table_->IsArray());
   ASSERT(!extractor_parameter_types_->IsSmi());
@@ -1286,6 +1297,7 @@
   icdata_class_ = static_cast<ClassPtr>(RAW_NULL);
   megamorphic_cache_class_ = static_cast<ClassPtr>(RAW_NULL);
   subtypetestcache_class_ = static_cast<ClassPtr>(RAW_NULL);
+  loadingunit_class_ = static_cast<ClassPtr>(RAW_NULL);
   api_error_class_ = static_cast<ClassPtr>(RAW_NULL);
   language_error_class_ = static_cast<ClassPtr>(RAW_NULL);
   unhandled_exception_class_ = static_cast<ClassPtr>(RAW_NULL);
@@ -1388,6 +1400,7 @@
   SET_CLASS_NAME(icdata, ICData);
   SET_CLASS_NAME(megamorphic_cache, MegamorphicCache);
   SET_CLASS_NAME(subtypetestcache, SubtypeTestCache);
+  SET_CLASS_NAME(loadingunit, LoadingUnit);
   SET_CLASS_NAME(api_error, ApiError);
   SET_CLASS_NAME(language_error, LanguageError);
   SET_CLASS_NAME(unhandled_exception, UnhandledException);
@@ -1844,7 +1857,7 @@
 
     cls = Class::New<Instance, RTN::Instance>(kNeverCid, isolate);
     cls.set_num_type_arguments(0);
-    cls.set_is_finalized();
+    cls.set_is_allocate_finalized();
     cls.set_is_declaration_loaded();
     cls.set_is_type_finalized();
     cls.set_name(Symbols::Never());
@@ -2009,7 +2022,7 @@
                                               /*register_class=*/false);
     cls.set_instance_size(0, 0);
     cls.set_next_field_offset(-kWordSize, -compiler::target::kWordSize);
-    isolate->RegisterClass(cls);
+    isolate->class_table()->Register(cls);
     RegisterPrivateClass(cls, Symbols::_ByteBuffer(), lib);
     pending_classes.Add(cls);
 
@@ -2458,7 +2471,7 @@
     cls = Class::New<Instance, RTN::Instance>(kByteBufferCid, isolate,
                                               /*register_isolate=*/false);
     cls.set_instance_size_in_words(0, 0);
-    isolate->RegisterClass(cls);
+    isolate->class_table()->Register(cls);
 
     cls = Class::New<Integer, RTN::Integer>(isolate);
     object_store->set_integer_implementation_class(cls);
@@ -2639,8 +2652,11 @@
           Instance::Handle(thread->isolate()->object_store()->out_of_memory());
       Exceptions::Throw(thread, exception);
       UNREACHABLE();
+    } else if (thread->long_jump_base() != nullptr) {
+      Report::LongJump(Object::out_of_memory_error());
+      UNREACHABLE();
     } else {
-      // No Dart to propagate an exception to.
+      // Nowhere to propagate an exception to.
       OUT_OF_MEMORY();
     }
   }
@@ -2841,7 +2857,7 @@
     // possible in this case.
     result.set_is_declaration_loaded();
     result.set_is_type_finalized();
-    result.set_is_finalized();
+    result.set_is_allocate_finalized();
   } else if (FakeObject::kClassId != kClosureCid) {
     // VM backed classes are almost ready: run checks and resolve class
     // references, but do not recompute size.
@@ -2851,7 +2867,7 @@
   NOT_IN_PRECOMPILED(result.set_binary_declaration_offset(0));
   result.InitEmptyFields();
   if (register_class) {
-    isolate->RegisterClass(result);
+    isolate->class_table()->Register(result);
   }
   return result.raw();
 }
@@ -3654,7 +3670,11 @@
 }
 
 bool Function::IsDynamicInvocationForwarderName(const String& name) {
-  return name.StartsWith(Symbols::DynamicPrefix());
+  return IsDynamicInvocationForwarderName(name.raw());
+}
+
+bool Function::IsDynamicInvocationForwarderName(StringPtr name) {
+  return String::StartsWith(name, Symbols::DynamicPrefix().raw());
 }
 
 StringPtr Function::DemangleDynamicInvocationForwarderName(const String& name) {
@@ -3664,6 +3684,10 @@
                       name.Length() - kDynamicPrefixLength);
 }
 
+StringPtr Function::CreateDynamicInvocationForwarderName(const String& name) {
+  return Symbols::FromConcat(Thread::Current(), Symbols::DynamicPrefix(), name);
+}
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
 FunctionPtr Function::CreateDynamicInvocationForwarder(
     const String& mangled_name) const {
@@ -3706,18 +3730,17 @@
   return forwarder.raw();
 }
 
-StringPtr Function::CreateDynamicInvocationForwarderName(const String& name) {
-  return Symbols::FromConcat(Thread::Current(), Symbols::DynamicPrefix(), name);
-}
-
 FunctionPtr Function::GetDynamicInvocationForwarder(
     const String& mangled_name,
     bool allow_add /* = true */) const {
   ASSERT(IsDynamicInvocationForwarderName(mangled_name));
-  const Class& owner = Class::Handle(Owner());
-  Function& result = Function::Handle(owner.GetInvocationDispatcher(
-      mangled_name, Array::null_array(),
-      FunctionLayout::kDynamicInvocationForwarder, /*create_if_absent=*/false));
+  auto zone = Thread::Current()->zone();
+  const Class& owner = Class::Handle(zone, Owner());
+  Function& result = Function::Handle(
+      zone,
+      owner.GetInvocationDispatcher(mangled_name, Array::null_array(),
+                                    FunctionLayout::kDynamicInvocationForwarder,
+                                    /*create_if_absent=*/false));
 
   if (!result.IsNull()) {
     return result.raw();
@@ -3778,7 +3801,7 @@
     if (raw() == isolate->class_table()->At(id())) {
       // Sets the new size in the class table.
       isolate->class_table()->SetAt(id(), raw());
-      if (FLAG_precompiled_mode) {
+      if (FLAG_precompiled_mode && !ClassTable::IsTopLevelCid(id())) {
         isolate->group()->shared_class_table()->SetUnboxedFieldsMapAt(
             id(), host_bitmap);
       }
@@ -4079,6 +4102,69 @@
   return value.raw();
 }
 
+// Creates a new array of boxed arguments suitable for invoking the callable
+// from the original boxed arguments for a static call. Also sets the contents
+// of the handle pointed to by [callable_args_desc_array_out] to an appropriate
+// arguments descriptor array for the new arguments.
+//
+// Assumes [arg_names] are consistent with [static_args_descriptor].
+static ArrayPtr CreateCallableArgumentsFromStatic(
+    Zone* zone,
+    const Instance& receiver,
+    const Array& static_args,
+    const Array& arg_names,
+    const ArgumentsDescriptor& static_args_descriptor) {
+  const intptr_t num_static_type_args = static_args_descriptor.TypeArgsLen();
+  const intptr_t num_static_args = static_args_descriptor.Count();
+  // Double check that the static args descriptor expects boxed arguments
+  // and the static args descriptor is consistent with the static arguments.
+  ASSERT_EQUAL(static_args_descriptor.Size(), num_static_args);
+  ASSERT_EQUAL(static_args.Length(),
+               num_static_args + (num_static_type_args > 0 ? 1 : 0));
+  // Add an additional slot to store the callable as the receiver.
+  const auto& callable_args =
+      Array::Handle(zone, Array::New(static_args.Length() + 1));
+  const intptr_t first_arg_index = static_args_descriptor.FirstArgIndex();
+  auto& temp = Object::Handle(zone);
+  // Copy the static args into the corresponding slots of the callable args.
+  if (num_static_type_args > 0) {
+    temp = static_args.At(0);
+    callable_args.SetAt(0, temp);
+  }
+  for (intptr_t i = first_arg_index; i < static_args.Length(); i++) {
+    temp = static_args.At(i);
+    callable_args.SetAt(i + 1, temp);
+  }
+  // Set the receiver slot in the callable args.
+  callable_args.SetAt(first_arg_index, receiver);
+  return callable_args.raw();
+}
+
+// Return the result of invoking the callable contained in the arguments.
+// Performs non-covariant type checks when the callable function does not
+// expect to be called dynamically.
+static ObjectPtr InvokeCallableWithChecks(Zone* zone,
+                                          const Array& args,
+                                          const Array& args_descriptor_array) {
+  auto& result = Object::Handle(
+      zone, DartEntry::ResolveCallable(args, args_descriptor_array));
+  if (result.IsError()) {
+    return result.raw();
+  }
+  const auto& function =
+      Function::Handle(zone, Function::RawCast(result.raw()));
+  if (!function.IsNull() && !function.CanReceiveDynamicInvocation()) {
+    // Let DoArgumentTypesMatch extract the appropriate instantiator
+    // and function tavs from the arguments (including the callable).
+    ArgumentsDescriptor call_args_descriptor(args_descriptor_array);
+    result = function.DoArgumentTypesMatch(args, call_args_descriptor);
+    if (result.IsError()) {
+      return result.raw();
+    }
+  }
+  return DartEntry::InvokeCallable(function, args, args_descriptor_array);
+}
+
 ObjectPtr Class::Invoke(const String& function_name,
                         const Array& args,
                         const Array& arg_names,
@@ -4086,11 +4172,16 @@
                         bool check_is_entrypoint) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
-
-  // TODO(regis): Support invocation of generic functions with type arguments.
-  const int kTypeArgsLen = 0;
   CHECK_ERROR(EnsureIsFinalized(thread));
 
+  // We don't pass any explicit type arguments, which will be understood as
+  // using dynamic for any function type arguments by lower layers.
+  const int kTypeArgsLen = 0;
+  const Array& args_descriptor_array = Array::Handle(
+      zone, ArgumentsDescriptor::NewBoxed(kTypeArgsLen, args.Length(),
+                                          arg_names, Heap::kNew));
+  ArgumentsDescriptor args_descriptor(args_descriptor_array);
+
   Function& function =
       Function::Handle(zone, LookupStaticFunction(function_name));
 
@@ -4107,37 +4198,34 @@
       if (check_is_entrypoint) {
         CHECK_ERROR(EntryPointFieldInvocationError(function_name));
       }
-      // Make room for the closure (receiver) in the argument list.
-      const intptr_t num_args = args.Length();
-      const Array& call_args = Array::Handle(zone, Array::New(num_args + 1));
-      Object& temp = Object::Handle(zone);
-      for (int i = 0; i < num_args; i++) {
-        temp = args.At(i);
-        call_args.SetAt(i + 1, temp);
-      }
-      call_args.SetAt(0, getter_result);
-      const Array& call_args_descriptor_array = Array::Handle(
-          zone, ArgumentsDescriptor::NewBoxed(kTypeArgsLen, call_args.Length(),
+      const auto& call_args_descriptor_array = Array::Handle(
+          zone, ArgumentsDescriptor::NewBoxed(args_descriptor.TypeArgsLen(),
+                                              args_descriptor.Count() + 1,
                                               arg_names, Heap::kNew));
-      // Call the closure.
-      return DartEntry::InvokeClosure(call_args, call_args_descriptor_array);
+      const auto& call_args = Array::Handle(
+          zone,
+          CreateCallableArgumentsFromStatic(zone, Instance::Cast(getter_result),
+                                            args, arg_names, args_descriptor));
+      return InvokeCallableWithChecks(zone, call_args,
+                                      call_args_descriptor_array);
     }
   }
-  const Array& args_descriptor_array = Array::Handle(
-      zone, ArgumentsDescriptor::NewBoxed(kTypeArgsLen, args.Length(),
-                                          arg_names, Heap::kNew));
-  ArgumentsDescriptor args_descriptor(args_descriptor_array);
-  const TypeArguments& type_args = Object::null_type_arguments();
-  if (function.IsNull() || !function.AreValidArguments(args_descriptor, NULL) ||
+
+  if (function.IsNull() ||
+      !function.AreValidArguments(args_descriptor, nullptr) ||
       (respect_reflectable && !function.is_reflectable())) {
     return ThrowNoSuchMethod(
         AbstractType::Handle(zone, RareType()), function_name, args, arg_names,
         InvocationMirror::kStatic, InvocationMirror::kMethod);
   }
-  ObjectPtr type_error =
-      function.DoArgumentTypesMatch(args, args_descriptor, type_args);
-  if (type_error != Error::null()) {
-    return type_error;
+  // This is a static function, so we pass an empty instantiator tav.
+  ASSERT(function.is_static());
+  if (!function.CanReceiveDynamicInvocation()) {
+    ObjectPtr type_error = function.DoArgumentTypesMatch(
+        args, args_descriptor, Object::empty_type_arguments());
+    if (type_error != Error::null()) {
+      return type_error;
+    }
   }
   return DartEntry::InvokeFunction(function, args, args_descriptor_array);
 }
@@ -4212,6 +4300,32 @@
   return error.raw();
 }
 
+// Ensure that code outdated by finalized class is cleaned up, new instance of
+// this class is ready to be allocated.
+ErrorPtr Class::EnsureIsAllocateFinalized(Thread* thread) const {
+  ASSERT(!IsNull());
+  // Finalized classes have already been parsed.
+  if (is_allocate_finalized()) {
+    return Error::null();
+  }
+  if (Compiler::IsBackgroundCompilation()) {
+    Compiler::AbortBackgroundCompilation(
+        DeoptId::kNone, "Class allocate finalization while compiling");
+  }
+  ASSERT(thread->IsMutatorThread());
+  ASSERT(thread != NULL);
+  Error& error = Error::Handle(thread->zone(), EnsureIsFinalized(thread));
+  if (!error.IsNull()) {
+    ASSERT(thread == Thread::Current());
+    if (thread->long_jump_base() != NULL) {
+      Report::LongJump(error);
+      UNREACHABLE();
+    }
+  }
+  error ^= ClassFinalizer::AllocateFinalizeClass(*this);
+  return error.raw();
+}
+
 void Class::SetFields(const Array& value) const {
   ASSERT(!value.IsNull());
 #if defined(DEBUG)
@@ -4347,7 +4461,7 @@
     result.set_is_abstract();
   }
   if (register_class) {
-    isolate->RegisterClass(result);
+    isolate->class_table()->Register(result);
   }
   return result.raw();
 }
@@ -4405,7 +4519,7 @@
         compiler::target::RoundedAllocationSize(target_instance_size));
     cls.set_next_field_offset(host_instance_size, target_instance_size);
     cls.set_num_native_fields(field_count);
-    cls.set_is_finalized();
+    cls.set_is_allocate_finalized();
     cls.set_is_declaration_loaded();
     cls.set_is_type_finalized();
     cls.set_is_synthesized_class();
@@ -4445,7 +4559,7 @@
   result.set_next_field_offset(host_next_field_offset,
                                target_next_field_offset);
   result.set_is_prefinalized();
-  isolate->RegisterClass(result);
+  isolate->class_table()->Register(result);
   return result.raw();
 }
 
@@ -4463,7 +4577,7 @@
   result.set_next_field_offset(host_next_field_offset,
                                target_next_field_offset);
   result.set_is_prefinalized();
-  isolate->RegisterClass(result);
+  isolate->class_table()->Register(result);
   return result.raw();
 }
 
@@ -4482,7 +4596,7 @@
   result.set_next_field_offset(host_next_field_offset,
                                target_next_field_offset);
   result.set_is_prefinalized();
-  isolate->RegisterClass(result);
+  isolate->class_table()->Register(result);
   return result.raw();
 }
 
@@ -4501,7 +4615,7 @@
   result.set_next_field_offset(host_next_field_offset,
                                target_next_field_offset);
   result.set_is_prefinalized();
-  isolate->RegisterClass(result);
+  isolate->class_table()->Register(result);
   return result.raw();
 }
 
@@ -4522,7 +4636,7 @@
   result.set_next_field_offset(host_next_field_offset,
                                target_next_field_offset);
   result.set_is_prefinalized();
-  isolate->RegisterClass(result);
+  isolate->class_table()->Register(result);
   return result.raw();
 }
 
@@ -4676,6 +4790,8 @@
       return Symbols::MegamorphicCache().ToCString();
     case kSubtypeTestCacheCid:
       return Symbols::SubtypeTestCache().ToCString();
+    case kLoadingUnitCid:
+      return Symbols::LoadingUnit().ToCString();
     case kApiErrorCid:
       return Symbols::ApiError().ToCString();
     case kLanguageErrorCid:
@@ -4757,10 +4873,6 @@
                                           raw_ptr()->state_bits_));
 }
 
-void Class::set_is_patch() const {
-  set_state_bits(PatchBit::update(true, raw_ptr()->state_bits_));
-}
-
 void Class::set_is_synthesized_class() const {
   set_state_bits(SynthesizedClassBit::update(true, raw_ptr()->state_bits_));
 }
@@ -4796,6 +4908,12 @@
                                             raw_ptr()->state_bits_));
 }
 
+void Class::set_is_allocate_finalized() const {
+  ASSERT(!is_allocate_finalized());
+  set_state_bits(ClassFinalizedBits::update(ClassLayout::kAllocateFinalized,
+                                            raw_ptr()->state_bits_));
+}
+
 void Class::set_is_prefinalized() const {
   ASSERT(!is_finalized());
   set_state_bits(ClassFinalizedBits::update(ClassLayout::kPreFinalized,
@@ -4874,9 +4992,9 @@
   ASSERT(!value.IsNull() && value.IsCanonical() && value.IsOld());
   ASSERT((declaration_type() == Object::null()) ||
          (declaration_type() == value.raw()));  // Set during own finalization.
-  // Since declaration type is used as the runtime type of instances of a
-  // non-generic class, the nullability is set to kNonNullable instead of
-  // kLegacy when the non-nullable experiment is enabled.
+  // Since DeclarationType is used as the runtime type of instances of a
+  // non-generic class, its nullability must be kNonNullable.
+  // The exception is DeclarationType of Null which is kNullable.
   ASSERT(value.type_class_id() != kNullCid || value.IsNullable());
   ASSERT(value.type_class_id() == kNullCid || value.IsNonNullable());
   StorePointer(&raw_ptr()->declaration_type_, value.raw());
@@ -5440,10 +5558,9 @@
   NoSafepointScope no_safepoint;
   const Library& lib = Library::Handle(library());
   const char* library_name = lib.IsNull() ? "" : lib.ToCString();
-  const char* patch_prefix = is_patch() ? "Patch " : "";
   const char* class_name = String::Handle(Name()).ToCString();
-  return OS::SCreate(Thread::Current()->zone(), "%s %sClass: %s", library_name,
-                     patch_prefix, class_name);
+  return OS::SCreate(Thread::Current()->zone(), "%s Class: %s", library_name,
+                     class_name);
 }
 
 // Thomas Wang, Integer Hash Functions.
@@ -5747,14 +5864,13 @@
   StoreSmi(&raw_ptr()->nullability_, Smi::New(value));
 }
 
-intptr_t TypeArguments::ComputeHash() const {
-  if (IsNull()) return 0;
-  const intptr_t num_types = Length();
-  if (IsRaw(0, num_types)) return 0;
+intptr_t TypeArguments::HashForRange(intptr_t from_index, intptr_t len) const {
+  if (IsNull()) return kAllDynamicHash;
+  if (IsRaw(from_index, len)) return kAllDynamicHash;
   uint32_t result = 0;
   AbstractType& type = AbstractType::Handle();
-  for (intptr_t i = 0; i < num_types; i++) {
-    type = TypeAt(i);
+  for (intptr_t i = 0; i < len; i++) {
+    type = TypeAt(from_index + i);
     // The hash may be calculated during type finalization (for debugging
     // purposes only) while a type argument is still temporarily null.
     if (type.IsNull() || type.IsNullTypeRef()) {
@@ -5763,7 +5879,16 @@
     result = CombineHashes(result, type.Hash());
   }
   result = FinalizeHash(result, kHashBits);
-  SetHash(result);
+  return result;
+}
+
+intptr_t TypeArguments::ComputeHash() const {
+  if (IsNull()) return kAllDynamicHash;
+  const intptr_t num_types = Length();
+  const uint32_t result = HashForRange(0, num_types);
+  if (result != 0) {
+    SetHash(result);
+  }
   return result;
 }
 
@@ -5826,7 +5951,7 @@
     intptr_t from_index,
     intptr_t len,
     NameVisibility name_visibility,
-    ZoneTextBuffer* printer,
+    BaseTextBuffer* printer,
     NameDisambiguation name_disambiguation /* = NameDisambiguation::kNo */)
     const {
   printer->AddString("<");
@@ -7723,83 +7848,358 @@
   return true;
 }
 
+// Checks each supplied function type argument is a subtype of the corresponding
+// bound. Also takes the number of type arguments to skip over because they
+// belong to parent functions and are not included in the type parameters.
+// Returns null if all checks succeed, otherwise returns a non-null Error for
+// one of the failures.
+static ObjectPtr TypeArgumentsAreBoundSubtypes(
+    Zone* zone,
+    const TokenPosition& token_pos,
+    const TypeArguments& type_parameters,
+    intptr_t num_parent_type_args,
+    const TypeArguments& instantiator_type_arguments,
+    const TypeArguments& function_type_arguments) {
+  ASSERT(!type_parameters.IsNull());
+  ASSERT(!function_type_arguments.IsNull());
+  const intptr_t kNumTypeArgs = function_type_arguments.Length();
+  ASSERT_EQUAL(num_parent_type_args + type_parameters.Length(), kNumTypeArgs);
+
+  // Don't bother allocating handles, there's nothing to check.
+  if (kNumTypeArgs - num_parent_type_args == 0) return Error::null();
+
+  auto& type = AbstractType::Handle(zone);
+  auto& bound = AbstractType::Handle(zone);
+  auto& name = String::Handle(zone);
+  for (intptr_t i = num_parent_type_args; i < kNumTypeArgs; i++) {
+    type = type_parameters.TypeAt(i - num_parent_type_args);
+    ASSERT(type.IsTypeParameter());
+    const auto& parameter = TypeParameter::Cast(type);
+    bound = parameter.bound();
+    name = parameter.name();
+    // Only perform non-covariant checks where the bound is not the top type.
+    if (parameter.IsGenericCovariantImpl() || bound.IsTopTypeForSubtyping()) {
+      continue;
+    }
+    if (!AbstractType::InstantiateAndTestSubtype(&type, &bound,
+                                                 instantiator_type_arguments,
+                                                 function_type_arguments)) {
+      return Error::RawCast(ThrowTypeError(token_pos, type, bound, name));
+    }
+  }
+
+  return Error::null();
+}
+
+// Returns a TypeArguments object where, for each type parameter local to this
+// function, the entry in the TypeArguments is an instantiated version of its
+// bound. In the instantiated bound, any local function type parameter
+// references are replaced with the corresponding bound if that bound can be
+// fully instantiated without local function type parameters, otherwise dynamic.
+static TypeArgumentsPtr InstantiateTypeParametersToBounds(
+    Zone* zone,
+    const TokenPosition& token_pos,
+    const TypeArguments& type_parameters,
+    const TypeArguments& instantiator_type_args,
+    intptr_t num_parent_type_args,
+    const TypeArguments& parent_type_args) {
+  ASSERT(!type_parameters.IsNull());
+  const intptr_t kNumCurrentTypeArgs = type_parameters.Length();
+  const intptr_t kNumTypeArgs = kNumCurrentTypeArgs + num_parent_type_args;
+  auto& function_type_args = TypeArguments::Handle(zone);
+
+  bool all_bounds_instantiated = true;
+
+  // Create a type argument vector large enough for the parents' and current
+  // type arguments.
+  function_type_args = TypeArguments::New(kNumTypeArgs);
+  auto& type = AbstractType::Handle(zone);
+  auto& bound = AbstractType::Handle(zone);
+  // First copy over the parent type args (or the dynamic type if null).
+  for (intptr_t i = 0; i < num_parent_type_args; i++) {
+    type = parent_type_args.IsNull() ? Type::DynamicType()
+                                     : parent_type_args.TypeAt(i);
+    function_type_args.SetTypeAt(i, type);
+  }
+  // Now try fully instantiating the bounds of each parameter using only
+  // the instantiator and parent function type arguments. If possible, keep the
+  // instantiated bound as the entry. Otherwise, just set that entry to dynamic.
+  for (intptr_t i = num_parent_type_args; i < kNumTypeArgs; i++) {
+    type = type_parameters.TypeAt(i - num_parent_type_args);
+    const auto& param = TypeParameter::Cast(type);
+    bound = param.bound();
+    // Only instantiate up to the parent type parameters.
+    if (!bound.IsInstantiated(kAny, num_parent_type_args)) {
+      bound = bound.InstantiateFrom(instantiator_type_args, function_type_args,
+                                    num_parent_type_args, Heap::kNew);
+    }
+    if (!bound.IsInstantiated()) {
+      // There are local type variables used in this bound.
+      bound = Type::DynamicType();
+      all_bounds_instantiated = false;
+    }
+    function_type_args.SetTypeAt(i, bound);
+  }
+
+  // If all the bounds were instantiated in the first pass, then there can't
+  // be any self or mutual recursion, so skip the bounds subtype check.
+  if (all_bounds_instantiated) return function_type_args.raw();
+
+  // Do another pass, using the set of TypeArguments we just created. If a given
+  // bound was instantiated in the last pass, just copy it over. (We don't need
+  // to iterate to a fixed point, since there should be no self or mutual
+  // recursion in the bounds.)
+  const auto& first_round =
+      TypeArguments::Handle(zone, function_type_args.raw());
+  function_type_args = TypeArguments::New(kNumTypeArgs);
+  // Again, copy over the parent type arguments first.
+  for (intptr_t i = 0; i < num_parent_type_args; i++) {
+    type = first_round.TypeAt(i);
+    function_type_args.SetTypeAt(i, type);
+  }
+  for (intptr_t i = num_parent_type_args; i < kNumTypeArgs; i++) {
+    type = type_parameters.TypeAt(i - num_parent_type_args);
+    const auto& param = TypeParameter::Cast(type);
+    bound = first_round.TypeAt(i);
+    // The dynamic type is never a bound, even when implicit, so it also marks
+    // bounds that were not already fully instantiated.
+    if (bound.raw() == Type::DynamicType()) {
+      bound = param.bound();
+      bound = bound.InstantiateFrom(instantiator_type_args, first_round,
+                                    kAllFree, Heap::kNew);
+    }
+    function_type_args.SetTypeAt(i, bound);
+  }
+
+  return function_type_args.raw();
+}
+
+// Retrieves the function type arguments, if any. This could be explicitly
+// passed type from the arguments array, delayed type arguments in closures,
+// or instantiated bounds for the type parameters if no other source for
+// function type arguments are found.
+static TypeArgumentsPtr RetrieveFunctionTypeArguments(
+    Thread* thread,
+    Zone* zone,
+    const Function& function,
+    const Instance& receiver,
+    const TypeArguments& instantiator_type_args,
+    const TypeArguments& type_params,
+    const Array& args,
+    const ArgumentsDescriptor& args_desc) {
+  ASSERT(!function.IsNull());
+
+  const intptr_t kNumCurrentTypeArgs = function.NumTypeParameters(thread);
+  const intptr_t kNumParentTypeArgs = function.NumParentTypeParameters();
+  const intptr_t kNumTypeArgs = kNumCurrentTypeArgs + kNumParentTypeArgs;
+  // Non-generic functions don't receive type arguments.
+  if (kNumTypeArgs == 0) return Object::empty_type_arguments().raw();
+  // Closure functions require that the receiver be provided (and is a closure).
+  ASSERT(!function.IsClosureFunction() || receiver.IsClosure());
+
+  // Only closure functions should have possibly generic parents.
+  ASSERT(function.IsClosureFunction() || kNumParentTypeArgs == 0);
+  const auto& parent_type_args =
+      function.IsClosureFunction()
+          ? TypeArguments::Handle(
+                zone, Closure::Cast(receiver).function_type_arguments())
+          : Object::null_type_arguments();
+  // We don't try to instantiate the parent type parameters to their bounds
+  // if not provided or check any closed-over type arguments against the parent
+  // type parameter bounds (since they have been type checked already).
+  if (kNumCurrentTypeArgs == 0) return parent_type_args.raw();
+
+  auto& function_type_args = TypeArguments::Handle(zone);
+  if (function.IsClosureFunction()) {
+    const auto& closure = Closure::Cast(receiver);
+    function_type_args = closure.delayed_type_arguments();
+    if (function_type_args.raw() == Object::empty_type_arguments().raw()) {
+      // There are no delayed type arguments, so set back to null.
+      function_type_args = TypeArguments::null();
+    }
+  }
+
+  if (function_type_args.IsNull() && args_desc.TypeArgsLen() > 0) {
+    function_type_args ^= args.At(0);
+  }
+
+  if (function_type_args.IsNull()) {
+    // We have no explicitly provided function type arguments, so generate
+    // some by instantiating the parameters to bounds.
+    return InstantiateTypeParametersToBounds(
+        zone, function.token_pos(), type_params, instantiator_type_args,
+        kNumParentTypeArgs, parent_type_args);
+  }
+
+  if (kNumParentTypeArgs > 0) {
+    function_type_args = function_type_args.Prepend(
+        zone, parent_type_args, kNumParentTypeArgs, kNumTypeArgs);
+  }
+
+  return function_type_args.raw();
+}
+
+// Retrieves the instantiator type arguments, if any, from the receiver.
+static TypeArgumentsPtr RetrieveInstantiatorTypeArguments(
+    Zone* zone,
+    const Function& function,
+    const Instance& receiver) {
+  if (function.IsClosureFunction()) {
+    ASSERT(receiver.IsClosure());
+    const auto& closure = Closure::Cast(receiver);
+    return closure.instantiator_type_arguments();
+  }
+  if (!receiver.IsNull()) {
+    const auto& cls = Class::Handle(zone, receiver.clazz());
+    if (cls.NumTypeArguments() > 0) {
+      return receiver.GetTypeArguments();
+    }
+  }
+  return Object::empty_type_arguments().raw();
+}
+
+ObjectPtr Function::DoArgumentTypesMatch(
+    const Array& args,
+    const ArgumentsDescriptor& args_desc) const {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+
+  auto& receiver = Instance::Handle(zone);
+  if (IsClosureFunction() || HasThisParameter()) {
+    receiver ^= args.At(args_desc.FirstArgIndex());
+  }
+  const auto& instantiator_type_arguments = TypeArguments::Handle(
+      zone, RetrieveInstantiatorTypeArguments(zone, *this, receiver));
+  return Function::DoArgumentTypesMatch(args, args_desc,
+                                        instantiator_type_arguments);
+}
+
 ObjectPtr Function::DoArgumentTypesMatch(
     const Array& args,
     const ArgumentsDescriptor& args_desc,
-    const TypeArguments& instantiator_type_args) const {
+    const TypeArguments& instantiator_type_arguments) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
-  Function& instantiated_func = Function::Handle(zone, raw());
 
-  if (!HasInstantiatedSignature()) {
-    instantiated_func = InstantiateSignatureFrom(instantiator_type_args,
-                                                 Object::null_type_arguments(),
-                                                 kAllFree, Heap::kNew);
+  auto& receiver = Instance::Handle(zone);
+  if (IsClosureFunction() || HasThisParameter()) {
+    receiver ^= args.At(args_desc.FirstArgIndex());
   }
-  AbstractType& argument_type = AbstractType::Handle(zone);
-  AbstractType& parameter_type = AbstractType::Handle(zone);
+
+  const auto& params = TypeArguments::Handle(zone, type_parameters());
+  const auto& function_type_arguments = TypeArguments::Handle(
+      zone, RetrieveFunctionTypeArguments(thread, zone, *this, receiver,
+                                          instantiator_type_arguments, params,
+                                          args, args_desc));
+  return Function::DoArgumentTypesMatch(
+      args, args_desc, instantiator_type_arguments, function_type_arguments);
+}
+
+ObjectPtr Function::DoArgumentTypesMatch(
+    const Array& args,
+    const ArgumentsDescriptor& args_desc,
+    const TypeArguments& instantiator_type_arguments,
+    const TypeArguments& function_type_arguments) const {
+  // We need a concrete (possibly empty) type arguments vector, not the
+  // implicitly filled with dynamic one.
+  ASSERT(!function_type_arguments.IsNull());
+
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+
+  // Perform any non-covariant bounds checks on the provided function type
+  // arguments to make sure they are appropriate subtypes of the bounds.
+  const intptr_t kNumLocalTypeArgs = NumTypeParameters(thread);
+  if (kNumLocalTypeArgs > 0) {
+    const intptr_t kNumParentTypeArgs = NumParentTypeParameters();
+    ASSERT_EQUAL(kNumLocalTypeArgs + kNumParentTypeArgs,
+                 function_type_arguments.Length());
+    const auto& params = TypeArguments::Handle(zone, type_parameters());
+    const auto& result = Object::Handle(
+        zone, TypeArgumentsAreBoundSubtypes(
+                  zone, token_pos(), params, kNumParentTypeArgs,
+                  instantiator_type_arguments, function_type_arguments));
+    if (result.IsError()) {
+      return result.raw();
+    }
+  } else {
+    ASSERT_EQUAL(NumParentTypeParameters(), function_type_arguments.Length());
+  }
+
+  AbstractType& type = AbstractType::Handle(zone);
   Instance& argument = Instance::Handle(zone);
 
-  // Check types of the provided arguments against the expected parameter types.
-  for (intptr_t i = args_desc.FirstArgIndex(); i < args_desc.PositionalCount();
-       ++i) {
-    argument ^= args.At(i);
-    argument_type = argument.GetType(Heap::kNew);
-    parameter_type = instantiated_func.ParameterTypeAt(i);
-
-    // If the argument type is dynamic or the parameter is null, move on.
-    if (parameter_type.IsDynamicType() || argument_type.IsNullType()) {
-      continue;
+  auto check_argument = [](const Instance& argument, const AbstractType& type,
+                           const TypeArguments& instantiator_type_args,
+                           const TypeArguments& function_type_args) -> bool {
+    // If the argument type is the top type, no need to check.
+    if (type.IsTopTypeForSubtyping()) return true;
+    if (argument.IsNull()) {
+      return Instance::NullIsAssignableTo(type);
     }
-    if (!argument.IsInstanceOf(parameter_type, instantiator_type_args,
-                               Object::null_type_arguments())) {
-      String& argument_name = String::Handle(zone, ParameterNameAt(i));
-      return ThrowTypeError(token_pos(), argument, parameter_type,
-                            argument_name);
+    return argument.IsAssignableTo(type, instantiator_type_args,
+                                   function_type_args);
+  };
+
+  // Check types of the provided arguments against the expected parameter types.
+  const intptr_t arg_offset = args_desc.FirstArgIndex();
+  // Only check explicit arguments.
+  const intptr_t arg_start = arg_offset + NumImplicitParameters();
+  const intptr_t num_positional_args = args_desc.PositionalCount();
+  for (intptr_t arg_index = arg_start; arg_index < num_positional_args;
+       ++arg_index) {
+    argument ^= args.At(arg_index);
+    // Adjust for type arguments when they're present.
+    const intptr_t param_index = arg_index - arg_offset;
+    type = ParameterTypeAt(param_index);
+
+    if (!check_argument(argument, type, instantiator_type_arguments,
+                        function_type_arguments)) {
+      auto& name = String::Handle(zone, ParameterNameAt(param_index));
+      return ThrowTypeError(token_pos(), argument, type, name);
     }
   }
 
-  const intptr_t num_arguments = args_desc.Count();
   const intptr_t num_named_arguments = args_desc.NamedCount();
   if (num_named_arguments == 0) {
     return Error::null();
   }
 
+  const int num_parameters = NumParameters();
+  const int num_fixed_params = num_fixed_parameters();
+
   String& argument_name = String::Handle(zone);
   String& parameter_name = String::Handle(zone);
 
   // Check types of named arguments against expected parameter type.
-  for (intptr_t i = 0; i < num_named_arguments; i++) {
-    argument_name = args_desc.NameAt(i);
+  for (intptr_t named_index = 0; named_index < num_named_arguments;
+       named_index++) {
+    argument_name = args_desc.NameAt(named_index);
     ASSERT(argument_name.IsSymbol());
-    bool found = false;
-    const intptr_t num_positional_args = num_arguments - num_named_arguments;
-    const int num_parameters = NumParameters();
+    argument ^= args.At(args_desc.PositionAt(named_index));
 
     // Try to find the named parameter that matches the provided argument.
-    for (intptr_t j = num_positional_args; !found && (j < num_parameters);
-         j++) {
-      parameter_name = ParameterNameAt(j);
-      ASSERT(argument_name.IsSymbol());
-      if (argument_name.Equals(parameter_name)) {
-        found = true;
-        argument ^= args.At(args_desc.PositionAt(i));
-        argument_type = argument.GetType(Heap::kNew);
-        parameter_type = instantiated_func.ParameterTypeAt(j);
+    // Even when annotated with @required, named parameters are still stored
+    // as if they were optional and so come after the fixed parameters.
+    // Currently O(n^2) as there's no guarantee from either the CFE or the
+    // VM that named parameters and named arguments are sorted in the same way.
+    intptr_t param_index = num_fixed_params;
+    for (; param_index < num_parameters; param_index++) {
+      parameter_name = ParameterNameAt(param_index);
+      ASSERT(parameter_name.IsSymbol());
 
-        // If the argument type is dynamic or the parameter is null, move on.
-        if (parameter_type.IsDynamicType() || argument_type.IsNullType()) {
-          continue;
-        }
-        if (!argument.IsInstanceOf(parameter_type, instantiator_type_args,
-                                   Object::null_type_arguments())) {
-          String& argument_name = String::Handle(zone, ParameterNameAt(i));
-          return ThrowTypeError(token_pos(), argument, parameter_type,
-                                argument_name);
-        }
+      if (!parameter_name.Equals(argument_name)) continue;
+
+      type = ParameterTypeAt(param_index);
+      if (!check_argument(argument, type, instantiator_type_arguments,
+                          function_type_arguments)) {
+        auto& name = String::Handle(zone, ParameterNameAt(param_index));
+        return ThrowTypeError(token_pos(), argument, type, name);
       }
+      break;
     }
-    ASSERT(found);
+    // Only should fail if AreValidArguments returns a false positive.
+    ASSERT(param_index < num_parameters);
   }
   return Error::null();
 }
@@ -8510,7 +8910,7 @@
 void Function::PrintSignatureParameters(Thread* thread,
                                         Zone* zone,
                                         NameVisibility name_visibility,
-                                        ZoneTextBuffer* printer) const {
+                                        BaseTextBuffer* printer) const {
   AbstractType& param_type = AbstractType::Handle(zone);
   const intptr_t num_params = NumParameters();
   const intptr_t num_fixed_params = num_fixed_parameters();
@@ -8551,7 +8951,7 @@
       if (num_opt_named_params > 0) {
         name = ParameterNameAt(i);
         printer->AddString(" ");
-        printer->AddString(name);
+        printer->AddString(name.ToCString());
       }
       if (i != (num_params - 1)) {
         printer->AddString(", ");
@@ -8603,7 +9003,7 @@
 }
 
 void Function::PrintSignature(NameVisibility name_visibility,
-                              ZoneTextBuffer* printer) const {
+                              BaseTextBuffer* printer) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   Isolate* isolate = thread->isolate();
@@ -8746,7 +9146,15 @@
 ScriptPtr Function::script() const {
   // NOTE(turnidge): If you update this function, you probably want to
   // update Class::PatchFieldsAndFunctions() at the same time.
-  Object& data = Object::Handle(raw_ptr()->data_);
+  const Object& data = Object::Handle(raw_ptr()->data_);
+  if (IsDynamicInvocationForwarder()) {
+    const auto& forwarding_target = Function::Handle(ForwardingTarget());
+    return forwarding_target.script();
+  }
+  if (IsImplicitGetterOrSetter()) {
+    const auto& field = Field::Handle(accessor_field());
+    return field.Script();
+  }
   if (data.IsArray()) {
     Object& script = Object::Handle(Array::Cast(data).At(0));
     if (script.IsScript()) {
@@ -8881,7 +9289,7 @@
 }
 
 void Function::PrintName(const NameFormattingParams& params,
-                         ZoneTextBuffer* printer) const {
+                         BaseTextBuffer* printer) const {
   // If |this| is the generated asynchronous body closure, use the
   // name of the parent function.
   Function& fun = Function::Handle(raw());
@@ -9150,7 +9558,11 @@
   }
 }
 
-bool Function::CheckSourceFingerprint(const char* prefix, int32_t fp) const {
+bool Function::CheckSourceFingerprint(int32_t fp) const {
+#if !defined(DEBUG)
+  return true;  // Only check on debug.
+#endif
+
   if (Isolate::Current()->obfuscate() || FLAG_precompiled_mode ||
       (Dart::vm_snapshot_kind() != Snapshot::kNone)) {
     return true;  // The kernel structure has been altered, skip checking.
@@ -9162,31 +9574,14 @@
     return true;
   }
 
-#if 1
-  // The non-nullable experiment changes the fingerprints, we only track
-  // one fingerprint set, until we unfork and settle on a single snapshot
-  // version this check has to be bypassed.
-  // TODO(36376) - Restore checking fingerprints of recognized methods.
-#else
   if (SourceFingerprint() != fp) {
-    const bool recalculatingFingerprints = false;
-    if (recalculatingFingerprints) {
-      // This output can be copied into a file, then used with sed
-      // to replace the old values.
-      // sed -i.bak -f /tmp/newkeys \
-      //    runtime/vm/compiler/recognized_methods_list.h
-      THR_Print("s/0x%08x/0x%08x/\n", fp, SourceFingerprint());
-    } else {
-      THR_Print(
-          "FP mismatch while recognizing method %s: expecting 0x%08x found "
-          "0x%08x.\nIf the behavior of this function has changed, then changes "
-          "are also needed in the VM's compiler. Otherwise the fingerprint can "
-          "simply be updated in recognized_methods_list.h\n",
-          ToFullyQualifiedCString(), fp, SourceFingerprint());
-      return false;
-    }
+    // This output can be copied into a file, then used with sed
+    // to replace the old values.
+    // sed -i.bak -f /tmp/newkeys \
+    //    runtime/vm/compiler/recognized_methods_list.h
+    THR_Print("s/0x%08x/0x%08x/\n", fp, SourceFingerprint());
+    return false;
   }
-#endif
   return true;
 }
 
@@ -9223,16 +9618,43 @@
   // monomorphic entry).
   //
   // See runtime_entry.cc:DEFINE_RUNTIME_ENTRY(UnlinkedCall)
-  if (HasOptionalParameters() || IsGeneric()) {
+  if (PrologueNeedsArgumentsDescriptor()) {
     return false;
   }
 
+  // All dyn:* forwarders are called via SwitchableCalls and all except the ones
+  // with `PrologueNeedsArgumentsDescriptor()` transition into monomorphic
+  // state.
+  if (Function::IsDynamicInvocationForwarderName(name())) {
+    return true;
+  }
+
   // If table dispatch is disabled, all instance calls use switchable calls.
   if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions &&
         FLAG_use_table_dispatch)) {
     return true;
   }
 
+  // Only if there are dynamic callers and if we didn't create a dyn:* forwarder
+  // for it do we need the monomorphic checked entry.
+  return HasDynamicCallers(zone) &&
+         !kernel::NeedsDynamicInvocationForwarder(*this);
+#else
+  UNREACHABLE();
+  return true;
+#endif
+}
+
+bool Function::HasDynamicCallers(Zone* zone) const {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  // Issue(dartbug.com/42719):
+  // Right now the metadata of _Closure.call says there are no dynamic callers -
+  // even though there can be. To be conservative we return true.
+  if ((name() == Symbols::GetCall().raw() || name() == Symbols::Call().raw()) &&
+      Class::IsClosureClass(Owner())) {
+    return true;
+  }
+
   // Use the results of TFA to determine whether this function is ever
   // called dynamically, i.e. using switchable calls.
   kernel::ProcedureAttributesMetadata metadata;
@@ -9248,6 +9670,12 @@
 #endif
 }
 
+bool Function::PrologueNeedsArgumentsDescriptor() const {
+  // The prologue of those functions need to examine the arg descriptor for
+  // various purposes.
+  return IsGeneric() || HasOptionalParameters();
+}
+
 bool Function::MayHaveUncheckedEntryPoint() const {
   return FLAG_enable_multiple_entrypoints &&
          (NeedsArgumentTypeChecks() || IsImplicitClosureFunction());
@@ -9457,6 +9885,11 @@
       signature_type_name.IsNull() ? "null" : signature_type_name.ToCString());
 }
 
+bool Field::ShouldCloneFields() {
+  return Compiler::IsBackgroundCompilation() ||
+         FLAG_force_clone_compiler_objects;
+}
+
 FieldPtr Field::CloneFromOriginal() const {
   return this->Clone(*this);
 }
@@ -11138,6 +11571,10 @@
   StorePointer(&raw_ptr()->kernel_data_, data.raw());
 }
 
+void Library::set_loading_unit(const LoadingUnit& value) const {
+  StorePointer(&raw_ptr()->loading_unit_, value.raw());
+}
+
 void Library::SetName(const String& name) const {
   // Only set name once.
   ASSERT(!Loaded());
@@ -12315,15 +12752,18 @@
   // Note "args" is already the internal arguments with the receiver as the
   // first element.
   ArgumentsDescriptor args_descriptor(args_descriptor_array);
-  if (function.IsNull() || !function.AreValidArguments(args_descriptor, NULL) ||
+  if (function.IsNull() ||
+      !function.AreValidArguments(args_descriptor, nullptr) ||
       (respect_reflectable && !function.is_reflectable())) {
     return DartEntry::InvokeNoSuchMethod(receiver, target_name, args,
                                          args_descriptor_array);
   }
-  ObjectPtr type_error = function.DoArgumentTypesMatch(args, args_descriptor,
-                                                       instantiator_type_args);
-  if (type_error != Error::null()) {
-    return type_error;
+  if (!function.CanReceiveDynamicInvocation()) {
+    ObjectPtr type_error = function.DoArgumentTypesMatch(
+        args, args_descriptor, instantiator_type_args);
+    if (type_error != Error::null()) {
+      return type_error;
+    }
   }
   return DartEntry::InvokeFunction(function, args, args_descriptor_array);
 }
@@ -12465,13 +12905,22 @@
                           const Array& arg_names,
                           bool respect_reflectable,
                           bool check_is_entrypoint) const {
-  // TODO(regis): Support invocation of generic functions with type arguments.
-  const int kTypeArgsLen = 0;
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
 
-  Function& function = Function::Handle();
-  Object& obj = Object::Handle(LookupLocalOrReExportObject(function_name));
-  if (obj.IsFunction()) {
-    function ^= obj.raw();
+  // We don't pass any explicit type arguments, which will be understood as
+  // using dynamic for any function type arguments by lower layers.
+  const int kTypeArgsLen = 0;
+  const Array& args_descriptor_array = Array::Handle(
+      zone, ArgumentsDescriptor::NewBoxed(kTypeArgsLen, args.Length(),
+                                          arg_names, Heap::kNew));
+  ArgumentsDescriptor args_descriptor(args_descriptor_array);
+
+  auto& function = Function::Handle(zone);
+  auto& result =
+      Object::Handle(zone, LookupLocalOrReExportObject(function_name));
+  if (result.IsFunction()) {
+    function ^= result.raw();
   }
 
   if (!function.IsNull() && check_is_entrypoint) {
@@ -12480,45 +12929,43 @@
 
   if (function.IsNull()) {
     // Didn't find a method: try to find a getter and invoke call on its result.
-    const Object& getter_result = Object::Handle(InvokeGetter(
-        function_name, false, respect_reflectable, check_is_entrypoint));
+    const Object& getter_result = Object::Handle(
+        zone, InvokeGetter(function_name, false, respect_reflectable,
+                           check_is_entrypoint));
     if (getter_result.raw() != Object::sentinel().raw()) {
       if (check_is_entrypoint) {
         CHECK_ERROR(EntryPointFieldInvocationError(function_name));
       }
-      // Make room for the closure (receiver) in arguments.
-      intptr_t numArgs = args.Length();
-      const Array& call_args = Array::Handle(Array::New(numArgs + 1));
-      Object& temp = Object::Handle();
-      for (int i = 0; i < numArgs; i++) {
-        temp = args.At(i);
-        call_args.SetAt(i + 1, temp);
-      }
-      call_args.SetAt(0, getter_result);
-      const Array& call_args_descriptor_array =
-          Array::Handle(ArgumentsDescriptor::NewBoxed(
-              kTypeArgsLen, call_args.Length(), arg_names, Heap::kNew));
-      // Call closure.
-      return DartEntry::InvokeClosure(call_args, call_args_descriptor_array);
+      const auto& call_args_descriptor_array = Array::Handle(
+          zone, ArgumentsDescriptor::NewBoxed(args_descriptor.TypeArgsLen(),
+                                              args_descriptor.Count() + 1,
+                                              arg_names, Heap::kNew));
+      const auto& call_args = Array::Handle(
+          zone,
+          CreateCallableArgumentsFromStatic(zone, Instance::Cast(getter_result),
+                                            args, arg_names, args_descriptor));
+      return InvokeCallableWithChecks(zone, call_args,
+                                      call_args_descriptor_array);
     }
   }
 
-  const Array& args_descriptor_array =
-      Array::Handle(ArgumentsDescriptor::NewBoxed(kTypeArgsLen, args.Length(),
-                                                  arg_names, Heap::kNew));
-  ArgumentsDescriptor args_descriptor(args_descriptor_array);
-  const TypeArguments& type_args = Object::null_type_arguments();
-  if (function.IsNull() || !function.AreValidArguments(args_descriptor, NULL) ||
+  if (function.IsNull() ||
+      !function.AreValidArguments(args_descriptor, nullptr) ||
       (respect_reflectable && !function.is_reflectable())) {
     return ThrowNoSuchMethod(
-        AbstractType::Handle(Class::Handle(toplevel_class()).RareType()),
+        AbstractType::Handle(zone,
+                             Class::Handle(zone, toplevel_class()).RareType()),
         function_name, args, arg_names, InvocationMirror::kTopLevel,
         InvocationMirror::kMethod);
   }
-  ObjectPtr type_error =
-      function.DoArgumentTypesMatch(args, args_descriptor, type_args);
-  if (type_error != Error::null()) {
-    return type_error;
+  // This is a static function, so we pass an empty instantiator tav.
+  ASSERT(function.is_static());
+  if (!function.CanReceiveDynamicInvocation()) {
+    ObjectPtr type_error = function.DoArgumentTypesMatch(
+        args, args_descriptor, Object::empty_type_arguments());
+    if (type_error != Error::null()) {
+      return type_error;
+    }
   }
   return DartEntry::InvokeFunction(function, args, args_descriptor_array);
 }
@@ -13506,15 +13953,16 @@
 void Library::CheckFunctionFingerprints() {
   GrowableArray<Library*> all_libs;
   Function& func = Function::Handle();
-  bool has_errors = false;
+  bool fingerprints_match = true;
 
 #define CHECK_FINGERPRINTS(class_name, function_name, dest, fp)                \
   func = GetFunction(all_libs, #class_name, #function_name);                   \
   if (func.IsNull()) {                                                         \
-    has_errors = true;                                                         \
+    fingerprints_match = false;                                                \
     OS::PrintErr("Function not found %s.%s\n", #class_name, #function_name);   \
   } else {                                                                     \
-    CHECK_FINGERPRINT3(func, class_name, function_name, dest, fp);             \
+    fingerprints_match =                                                       \
+        func.CheckSourceFingerprint(fp) && fingerprints_match;                 \
   }
 
 #define CHECK_FINGERPRINTS2(class_name, function_name, dest, fp)               \
@@ -13554,10 +14002,11 @@
 #define CHECK_FACTORY_FINGERPRINTS(symbol, class_name, factory_name, cid, fp)  \
   func = GetFunction(all_libs, #class_name, #factory_name);                    \
   if (func.IsNull()) {                                                         \
-    has_errors = true;                                                         \
+    fingerprints_match = false;                                                \
     OS::PrintErr("Function not found %s.%s\n", #class_name, #factory_name);    \
   } else {                                                                     \
-    CHECK_FINGERPRINT2(func, symbol, cid, fp);                                 \
+    fingerprints_match =                                                       \
+        func.CheckSourceFingerprint(fp) && fingerprints_match;                 \
   }
 
   all_libs.Add(&Library::ZoneHandle(Library::CoreLibrary()));
@@ -13565,8 +14014,12 @@
 
 #undef CHECK_FACTORY_FINGERPRINTS
 
-  if (has_errors) {
-    FATAL("Fingerprint mismatch.");
+  if (!fingerprints_match) {
+    FATAL(
+        "FP mismatch while recognizing methods. If the behavior of "
+        "these functions has changed, then changes are also needed in "
+        "the VM's compiler. Otherwise the fingerprint can simply be "
+        "updated in recognized_methods_list.h\n");
   }
 }
 #endif  // defined(DEBUG) && !defined(DART_PRECOMPILED_RUNTIME).
@@ -14239,7 +14692,7 @@
 }
 
 const char* ExceptionHandlers::ToCString() const {
-#define FORMAT1 "%" Pd " => %#x  (%" Pd " types) (outer %d) %s\n"
+#define FORMAT1 "%" Pd " => %#x  (%" Pd " types) (outer %d)%s%s\n"
 #define FORMAT2 "  %d. %s\n"
   if (num_entries() == 0) {
     return "empty ExceptionHandlers\n";
@@ -14254,9 +14707,11 @@
     handled_types = GetHandledTypes(i);
     const intptr_t num_types =
         handled_types.IsNull() ? 0 : handled_types.Length();
-    len += Utils::SNPrint(NULL, 0, FORMAT1, i, info.handler_pc_offset,
-                          num_types, info.outer_try_index,
-                          info.is_generated != 0 ? "(generated)" : "");
+    len += Utils::SNPrint(
+        NULL, 0, FORMAT1, i, info.handler_pc_offset, num_types,
+        info.outer_try_index,
+        ((info.needs_stacktrace != 0) ? " (needs stack trace)" : ""),
+        ((info.is_generated != 0) ? " (generated)" : ""));
     for (int k = 0; k < num_types; k++) {
       type ^= handled_types.At(k);
       ASSERT(!type.IsNull());
@@ -14272,10 +14727,11 @@
     handled_types = GetHandledTypes(i);
     const intptr_t num_types =
         handled_types.IsNull() ? 0 : handled_types.Length();
-    num_chars +=
-        Utils::SNPrint((buffer + num_chars), (len - num_chars), FORMAT1, i,
-                       info.handler_pc_offset, num_types, info.outer_try_index,
-                       info.is_generated != 0 ? "(generated)" : "");
+    num_chars += Utils::SNPrint(
+        (buffer + num_chars), (len - num_chars), FORMAT1, i,
+        info.handler_pc_offset, num_types, info.outer_try_index,
+        ((info.needs_stacktrace != 0) ? " (needs stack trace)" : ""),
+        ((info.is_generated != 0) ? " (generated)" : ""));
     for (int k = 0; k < num_types; k++) {
       type ^= handled_types.At(k);
       num_chars += Utils::SNPrint((buffer + num_chars), (len - num_chars),
@@ -17146,6 +17602,71 @@
   return "SubtypeTestCache";
 }
 
+LoadingUnitPtr LoadingUnit::New() {
+  ASSERT(Object::loadingunit_class() != Class::null());
+  LoadingUnit& result = LoadingUnit::Handle();
+  {
+    // LoadingUnit objects are long living objects, allocate them in the
+    // old generation.
+    ObjectPtr raw = Object::Allocate(LoadingUnit::kClassId,
+                                     LoadingUnit::InstanceSize(), Heap::kOld);
+    NoSafepointScope no_safepoint;
+    result ^= raw;
+  }
+  result.set_id(kIllegalId);
+  result.set_loaded(false);
+  result.set_load_outstanding(false);
+  return result.raw();
+}
+
+LoadingUnitPtr LoadingUnit::parent() const {
+  return raw_ptr()->parent_;
+}
+void LoadingUnit::set_parent(const LoadingUnit& value) const {
+  StorePointer(&raw_ptr()->parent_, value.raw());
+}
+
+ArrayPtr LoadingUnit::base_objects() const {
+  return raw_ptr()->base_objects_;
+}
+void LoadingUnit::set_base_objects(const Array& value) const {
+  StorePointer(&raw_ptr()->base_objects_, value.raw());
+}
+
+const char* LoadingUnit::ToCString() const {
+  return "LoadingUnit";
+}
+
+ObjectPtr LoadingUnit::IssueLoad() const {
+  ASSERT(!loaded());
+  ASSERT(!load_outstanding());
+  set_load_outstanding(true);
+  return Isolate::Current()->CallDeferredLoadHandler(id());
+}
+
+void LoadingUnit::CompleteLoad(const String& error_message,
+                               bool transient_error) const {
+  ASSERT(!loaded());
+  ASSERT(load_outstanding());
+  set_loaded(error_message.IsNull());
+  set_load_outstanding(false);
+
+  const Library& lib = Library::Handle(Library::CoreLibrary());
+  const String& sel = String::Handle(String::New("_completeLoads"));
+  const Function& func = Function::Handle(lib.LookupFunctionAllowPrivate(sel));
+  ASSERT(!func.IsNull());
+  const Array& args = Array::Handle(Array::New(3));
+  args.SetAt(0, Smi::Handle(Smi::New(id())));
+  args.SetAt(1, error_message);
+  args.SetAt(2, Bool::Get(transient_error));
+  const Object& result = Object::Handle(DartEntry::InvokeFunction(func, args));
+  if (result.IsUnwindError()) {
+    Thread::Current()->set_sticky_error(Error::Cast(result));
+  } else if (result.IsError()) {
+    UNREACHABLE();
+  }
+}
+
 const char* Error::ToErrorCString() const {
   if (IsNull()) {
     return "Error: null";
@@ -17439,10 +17960,10 @@
 
   Class& klass = Class::Handle(zone, clazz());
   CHECK_ERROR(klass.EnsureIsFinalized(thread));
-  TypeArguments& type_args = TypeArguments::Handle(zone);
-  if (klass.NumTypeArguments() > 0) {
-    type_args = GetTypeArguments();
-  }
+  const auto& inst_type_args =
+      klass.NumTypeArguments() > 0
+          ? TypeArguments::Handle(zone, GetTypeArguments())
+          : Object::null_type_arguments();
 
   const String& internal_getter_name =
       String::Handle(zone, Field::GetterName(getter_name));
@@ -17488,7 +18009,7 @@
 
   return InvokeInstanceFunction(*this, function, internal_getter_name, args,
                                 args_descriptor, respect_reflectable,
-                                type_args);
+                                inst_type_args);
 }
 
 ObjectPtr Instance::InvokeSetter(const String& setter_name,
@@ -17500,10 +18021,10 @@
 
   const Class& klass = Class::Handle(zone, clazz());
   CHECK_ERROR(klass.EnsureIsFinalized(thread));
-  TypeArguments& type_args = TypeArguments::Handle(zone);
-  if (klass.NumTypeArguments() > 0) {
-    type_args = GetTypeArguments();
-  }
+  const auto& inst_type_args =
+      klass.NumTypeArguments() > 0
+          ? TypeArguments::Handle(zone, GetTypeArguments())
+          : Object::null_type_arguments();
 
   const String& internal_setter_name =
       String::Handle(zone, Field::SetterName(setter_name));
@@ -17535,7 +18056,7 @@
 
   return InvokeInstanceFunction(*this, setter, internal_setter_name, args,
                                 args_descriptor, respect_reflectable,
-                                type_args);
+                                inst_type_args);
 }
 
 ObjectPtr Instance::Invoke(const String& function_name,
@@ -17547,6 +18068,7 @@
   Zone* zone = thread->zone();
   Class& klass = Class::Handle(zone, clazz());
   CHECK_ERROR(klass.EnsureIsFinalized(thread));
+
   Function& function = Function::Handle(
       zone, Resolver::ResolveDynamicAnyArgs(zone, klass, function_name));
 
@@ -17554,16 +18076,17 @@
     CHECK_ERROR(function.VerifyCallEntryPoint());
   }
 
-  // TODO(regis): Support invocation of generic functions with type arguments.
+  // We don't pass any explicit type arguments, which will be understood as
+  // using dynamic for any function type arguments by lower layers.
   const int kTypeArgsLen = 0;
   const Array& args_descriptor = Array::Handle(
       zone, ArgumentsDescriptor::NewBoxed(kTypeArgsLen, args.Length(),
                                           arg_names, Heap::kNew));
 
-  TypeArguments& type_args = TypeArguments::Handle(zone);
-  if (klass.NumTypeArguments() > 0) {
-    type_args = GetTypeArguments();
-  }
+  const auto& inst_type_args =
+      klass.NumTypeArguments() > 0
+          ? TypeArguments::Handle(zone, GetTypeArguments())
+          : Object::null_type_arguments();
 
   if (function.IsNull()) {
     // Didn't find a method: try to find a getter and invoke call on its result.
@@ -17585,21 +18108,20 @@
       const Object& getter_result = Object::Handle(
           zone, InvokeInstanceFunction(*this, function, getter_name,
                                        getter_args, getter_args_descriptor,
-                                       respect_reflectable, type_args));
+                                       respect_reflectable, inst_type_args));
       if (getter_result.IsError()) {
         return getter_result.raw();
       }
       // Replace the closure as the receiver in the arguments list.
       args.SetAt(0, getter_result);
-      // Call the closure.
-      return DartEntry::InvokeClosure(args, args_descriptor);
+      return InvokeCallableWithChecks(zone, args, args_descriptor);
     }
   }
 
   // Found an ordinary method.
   return InvokeInstanceFunction(*this, function, function_name, args,
                                 args_descriptor, respect_reflectable,
-                                type_args);
+                                inst_type_args);
 }
 
 ObjectPtr Instance::EvaluateCompiledExpression(
@@ -18234,24 +18756,23 @@
 bool Instance::IsCallable(Function* function) const {
   Class& cls = Class::Handle(clazz());
   if (cls.IsClosureClass()) {
-    if (function != NULL) {
+    if (function != nullptr) {
       *function = Closure::Cast(*this).function();
     }
     return true;
   }
   // Try to resolve a "call" method.
-  Function& call_function = Function::Handle();
-  do {
-    call_function = cls.LookupDynamicFunction(Symbols::Call());
-    if (!call_function.IsNull()) {
-      if (function != NULL) {
-        *function = call_function.raw();
-      }
-      return true;
-    }
-    cls = cls.SuperClass();
-  } while (!cls.IsNull());
-  return false;
+  Zone* zone = Thread::Current()->zone();
+  Function& call_function = Function::Handle(
+      zone, Resolver::ResolveDynamicAnyArgs(zone, cls, Symbols::Call(),
+                                            /*allow_add=*/false));
+  if (call_function.IsNull()) {
+    return false;
+  }
+  if (function != nullptr) {
+    *function = call_function.raw();
+  }
+  return true;
 }
 
 InstancePtr Instance::New(const Class& cls, Heap::Space space) {
@@ -18454,7 +18975,9 @@
 
 AbstractTypePtr AbstractType::NormalizeFutureOrType(Heap::Space space) const {
   if (IsFutureOrType()) {
-    const AbstractType& unwrapped_type = AbstractType::Handle(UnwrapFutureOr());
+    Zone* zone = Thread::Current()->zone();
+    const AbstractType& unwrapped_type =
+        AbstractType::Handle(zone, UnwrapFutureOr());
     const classid_t cid = unwrapped_type.type_class_id();
     if (cid == kDynamicCid || cid == kVoidCid) {
       return unwrapped_type.raw();
@@ -18472,38 +18995,14 @@
     }
     if (cid == kNeverCid && unwrapped_type.IsNonNullable()) {
       ObjectStore* object_store = Isolate::Current()->object_store();
-      if (object_store->non_nullable_future_never_type() == Type::null()) {
-        const Class& cls = Class::Handle(object_store->future_class());
-        ASSERT(!cls.IsNull());
-        const TypeArguments& type_args =
-            TypeArguments::Handle(TypeArguments::New(1));
-        type_args.SetTypeAt(0, Type::Handle(object_store->never_type()));
-        Type& type =
-            Type::Handle(Type::New(cls, type_args, TokenPosition::kNoSource,
-                                   Nullability::kNonNullable));
-        type.SetIsFinalized();
-        type ^= type.Canonicalize();
-        object_store->set_non_nullable_future_never_type(type);
-      }
       const Type& future_never_type =
-          Type::Handle(object_store->non_nullable_future_never_type());
+          Type::Handle(zone, object_store->non_nullable_future_never_type());
+      ASSERT(!future_never_type.IsNull());
       return future_never_type.ToNullability(nullability(), space);
     }
     if (cid == kNullCid) {
       ObjectStore* object_store = Isolate::Current()->object_store();
-      if (object_store->nullable_future_null_type() == Type::null()) {
-        const Class& cls = Class::Handle(object_store->future_class());
-        ASSERT(!cls.IsNull());
-        const TypeArguments& type_args =
-            TypeArguments::Handle(TypeArguments::New(1));
-        Type& type = Type::Handle(object_store->null_type());
-        type_args.SetTypeAt(0, type);
-        type = Type::New(cls, type_args, TokenPosition::kNoSource,
-                         Nullability::kNullable);
-        type.SetIsFinalized();
-        type ^= type.Canonicalize();
-        object_store->set_nullable_future_null_type(type);
-      }
+      ASSERT(object_store->nullable_future_null_type() != Type::null());
       return object_store->nullable_future_null_type();
     }
     if (IsNullable() && unwrapped_type.IsNullable()) {
@@ -18731,14 +19230,14 @@
 
 void AbstractType::PrintName(
     NameVisibility name_visibility,
-    ZoneTextBuffer* printer,
+    BaseTextBuffer* printer,
     NameDisambiguation name_disambiguation /* = NameDisambiguation::kNo */)
     const {
   ASSERT(name_visibility != kScrubbedName);
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   Class& cls = Class::Handle(zone);
-  String& class_name = String::Handle(zone);
+  String& name_str = String::Handle(zone);
   if (IsTypeParameter()) {
     const TypeParameter& param = TypeParameter::Cast(*this);
 
@@ -18760,7 +19259,8 @@
       }
     }
 
-    printer->AddString(String::Handle(zone, param.name()));
+    name_str = param.name();
+    printer->AddString(name_str.ToCString());
     printer->AddString(NullabilitySuffix(name_visibility));
     return;
   }
@@ -18786,10 +19286,10 @@
     }
     // Instead of printing the actual signature, use the typedef name with
     // its type arguments, if any.
-    class_name = cls.Name();  // Typedef name.
+    name_str = cls.Name();  // Typedef name.
     if (!IsFinalized() || IsBeingFinalized()) {
       // TODO(regis): Check if this is dead code.
-      printer->AddString(class_name);
+      printer->AddString(name_str.ToCString());
       printer->AddString(NullabilitySuffix(name_visibility));
       return;
     }
@@ -18798,8 +19298,8 @@
   // Do not print the full vector, but only the declared type parameters.
   num_type_params = cls.NumTypeParameters();
   if (name_visibility == kInternalName) {
-    class_name = cls.Name();
-    printer->AddString(class_name);
+    name_str = cls.Name();
+    printer->AddString(name_str.ToCString());
   } else {
     ASSERT(name_visibility == kUserVisibleName);
     // Map internal types to their corresponding public interfaces.
@@ -19812,7 +20312,7 @@
 
 intptr_t Type::ComputeHash() const {
   ASSERT(IsFinalized());
-  uint32_t result = 1;
+  uint32_t result = 0;
   result = CombineHashes(result, type_class_id());
   // A legacy type should have the same hash as its non-nullable version to be
   // consistent with the definition of type equality in Dart code.
@@ -19821,7 +20321,20 @@
     type_nullability = Nullability::kNonNullable;
   }
   result = CombineHashes(result, static_cast<uint32_t>(type_nullability));
-  result = CombineHashes(result, TypeArguments::Handle(arguments()).Hash());
+  uint32_t type_args_hash = TypeArguments::kAllDynamicHash;
+  if (arguments() != TypeArguments::null()) {
+    // Only include hashes of type arguments corresponding to type parameters.
+    // This prevents obtaining different hashes depending on the location of
+    // TypeRefs in the super class type argument vector.
+    const TypeArguments& type_args = TypeArguments::Handle(arguments());
+    const Class& cls = Class::Handle(type_class());
+    const intptr_t num_type_params = cls.NumTypeParameters();
+    if (num_type_params > 0) {
+      const intptr_t from_index = cls.NumTypeArguments() - num_type_params;
+      type_args_hash = type_args.HashForRange(from_index, num_type_params);
+    }
+  }
+  result = CombineHashes(result, type_args_hash);
   if (IsFunctionType()) {
     AbstractType& type = AbstractType::Handle();
     const Function& sig_fun = Function::Handle(signature());
@@ -20532,18 +21045,21 @@
 const char* TypeParameter::ToCString() const {
   Thread* thread = Thread::Current();
   ZoneTextBuffer printer(thread->zone());
+  auto& name_str = String::Handle(thread->zone(), name());
   printer.Printf("TypeParameter: name ");
-  printer.AddString(String::Handle(name()));
+  printer.AddString(name_str.ToCString());
   printer.AddString(NullabilitySuffix(kInternalName));
   printer.Printf("; index: %" Pd ";", index());
   if (IsFunctionTypeParameter()) {
     const Function& function = Function::Handle(parameterized_function());
     printer.Printf(" function: ");
-    printer.AddString(String::Handle(function.name()));
+    name_str = function.name();
+    printer.AddString(name_str.ToCString());
   } else {
     const Class& cls = Class::Handle(parameterized_class());
     printer.Printf(" class: ");
-    printer.AddString(String::Handle(cls.Name()));
+    name_str = cls.Name();
+    printer.AddString(name_str.ToCString());
   }
   printer.Printf("; bound: ");
   const AbstractType& upper_bound = AbstractType::Handle(bound());
@@ -21253,22 +21769,6 @@
   return HashImpl(characters, len);
 }
 
-uint16_t String::CharAt(intptr_t index) const {
-  intptr_t class_id = raw()->GetClassId();
-  ASSERT(IsStringClassId(class_id));
-  if (class_id == kOneByteStringCid) {
-    return OneByteString::CharAt(*this, index);
-  }
-  if (class_id == kTwoByteStringCid) {
-    return TwoByteString::CharAt(*this, index);
-  }
-  if (class_id == kExternalOneByteStringCid) {
-    return ExternalOneByteString::CharAt(*this, index);
-  }
-  ASSERT(class_id == kExternalTwoByteStringCid);
-  return ExternalTwoByteString::CharAt(*this, index);
-}
-
 intptr_t String::CharSize() const {
   intptr_t class_id = raw()->GetClassId();
   if (class_id == kOneByteStringCid || class_id == kExternalOneByteStringCid) {
@@ -21414,13 +21914,15 @@
   return 0;
 }
 
-bool String::StartsWith(const String& other) const {
-  if (other.IsNull() || (other.Length() > this->Length())) {
-    return false;
-  }
-  intptr_t slen = other.Length();
-  for (int i = 0; i < slen; i++) {
-    if (this->CharAt(i) != other.CharAt(i)) {
+bool String::StartsWith(StringPtr str, StringPtr prefix) {
+  if (prefix == String::null()) return false;
+
+  const intptr_t length = String::LengthOf(str);
+  const intptr_t prefix_length = String::LengthOf(prefix);
+  if (prefix_length > length) return false;
+
+  for (intptr_t i = 0; i < prefix_length; i++) {
+    if (String::CharAt(str, i) != String::CharAt(prefix, i)) {
       return false;
     }
   }
@@ -21961,7 +22463,8 @@
     intptr_t external_size) {
   ASSERT(callback != NULL);
   return FinalizablePersistentHandle::New(Isolate::Current(), referent, peer,
-                                          callback, external_size);
+                                          callback, external_size,
+                                          /*auto_delete=*/true);
 }
 
 StringPtr String::Transform(int32_t (*mapping)(int32_t ch),
@@ -23592,7 +24095,6 @@
 }
 
 static void TransferableTypedDataFinalizer(void* isolate_callback_data,
-                                           Dart_WeakPersistentHandle handle,
                                            void* peer) {
   delete (reinterpret_cast<TransferableTypedDataPeer*>(peer));
 }
@@ -23615,8 +24117,8 @@
   // Set up finalizer so it frees allocated memory if handle is
   // garbage-collected.
   peer->set_handle(FinalizablePersistentHandle::New(
-      thread->isolate(), result, peer, &TransferableTypedDataFinalizer,
-      length));
+      thread->isolate(), result, peer, &TransferableTypedDataFinalizer, length,
+      /*auto_delete=*/true));
 
   return result.raw();
 }
@@ -23625,6 +24127,16 @@
   return "TransferableTypedData";
 }
 
+intptr_t Closure::NumTypeParameters(Thread* thread) const {
+  if (delayed_type_arguments() != Object::null_type_arguments().raw() &&
+      delayed_type_arguments() != Object::empty_type_arguments().raw()) {
+    return 0;
+  } else {
+    const auto& closure_function = Function::Handle(thread->zone(), function());
+    return closure_function.NumTypeParameters(thread);
+  }
+}
+
 const char* Closure::ToCString() const {
   Zone* zone = Thread::Current()->zone();
   const Function& fun = Function::Handle(zone, function());
@@ -23835,7 +24347,7 @@
 
 #if defined(DART_PRECOMPILED_RUNTIME)
 // Prints the best representation(s) for the call address.
-static void PrintNonSymbolicStackFrameBody(ZoneTextBuffer* buffer,
+static void PrintNonSymbolicStackFrameBody(BaseTextBuffer* buffer,
                                            uword call_addr,
                                            uword isolate_instructions,
                                            uword vm_instructions,
@@ -23871,12 +24383,12 @@
 }
 #endif
 
-static void PrintSymbolicStackFrameIndex(ZoneTextBuffer* buffer,
+static void PrintSymbolicStackFrameIndex(BaseTextBuffer* buffer,
                                          intptr_t frame_index) {
   buffer->Printf("#%-6" Pd "", frame_index);
 }
 
-static void PrintSymbolicStackFrameBody(ZoneTextBuffer* buffer,
+static void PrintSymbolicStackFrameBody(BaseTextBuffer* buffer,
                                         const char* function_name,
                                         const char* url,
                                         intptr_t line = -1,
@@ -23892,7 +24404,7 @@
 }
 
 static void PrintSymbolicStackFrame(Zone* zone,
-                                    ZoneTextBuffer* buffer,
+                                    BaseTextBuffer* buffer,
                                     const Function& function,
                                     TokenPosition token_pos,
                                     intptr_t frame_index) {
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index ccb84d4..2824547 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -9,6 +9,7 @@
 #error "Should not include runtime"
 #endif
 
+#include <limits>
 #include <tuple>
 
 #include "include/dart_api.h"
@@ -70,7 +71,7 @@
 #undef REUSABLE_FORWARD_DECLARATION
 
 class Symbols;
-class ZoneTextBuffer;
+class BaseTextBuffer;
 
 #if defined(DEBUG)
 #define CHECK_HANDLE() CheckHandle();
@@ -448,6 +449,7 @@
   V(LanguageError, branch_offset_error)                                        \
   V(LanguageError, speculative_inlining_error)                                 \
   V(LanguageError, background_compilation_error)                               \
+  V(LanguageError, out_of_memory_error)                                        \
   V(Array, vm_isolate_snapshot_object_table)                                   \
   V(Type, dynamic_type)                                                        \
   V(Type, void_type)                                                           \
@@ -516,6 +518,7 @@
   static ClassPtr icdata_class() { return icdata_class_; }
   static ClassPtr megamorphic_cache_class() { return megamorphic_cache_class_; }
   static ClassPtr subtypetestcache_class() { return subtypetestcache_class_; }
+  static ClassPtr loadingunit_class() { return loadingunit_class_; }
   static ClassPtr weak_serialization_reference_class() {
     return weak_serialization_reference_class_;
   }
@@ -808,6 +811,7 @@
   static ClassPtr icdata_class_;             // Class of ICData.
   static ClassPtr megamorphic_cache_class_;  // Class of MegamorphiCache.
   static ClassPtr subtypetestcache_class_;   // Class of SubtypeTestCache.
+  static ClassPtr loadingunit_class_;        // Class of LoadingUnit.
   static ClassPtr api_error_class_;          // Class of ApiError.
   static ClassPtr language_error_class_;     // Class of LanguageError.
   static ClassPtr unhandled_exception_class_;  // Class of UnhandledException.
@@ -906,8 +910,7 @@
 };
 
 // The NNBDMode reflects the opted-in status of libraries.
-// Note that the weak or strong testing mode is not reflected in NNBDMode, but
-// imposed globally by the value of --null-safety.
+// Note that the weak or strong checking mode is not reflected in NNBDMode.
 enum class NNBDMode {
   // Status of the library:
   kLegacyLib = 0,   // Library is legacy.
@@ -1021,7 +1024,7 @@
   }
   intptr_t id() const { return raw_ptr()->id_; }
   void set_id(intptr_t value) const {
-    ASSERT(is_valid_id(value));
+    ASSERT(value >= 0 && value < std::numeric_limits<classid_t>::max());
     StoreNonPointer(&raw_ptr()->id_, value);
   }
   static intptr_t id_offset() { return OFFSET_OF(ClassLayout, id_); }
@@ -1359,9 +1362,6 @@
   }
   void set_is_type_finalized() const;
 
-  bool is_patch() const { return PatchBit::decode(raw_ptr()->state_bits_); }
-  void set_is_patch() const;
-
   bool is_synthesized_class() const {
     return SynthesizedClassBit::decode(raw_ptr()->state_bits_);
   }
@@ -1372,10 +1372,18 @@
 
   bool is_finalized() const {
     return ClassFinalizedBits::decode(raw_ptr()->state_bits_) ==
-           ClassLayout::kFinalized;
+               ClassLayout::kFinalized ||
+           ClassFinalizedBits::decode(raw_ptr()->state_bits_) ==
+               ClassLayout::kAllocateFinalized;
   }
   void set_is_finalized() const;
 
+  bool is_allocate_finalized() const {
+    return ClassFinalizedBits::decode(raw_ptr()->state_bits_) ==
+           ClassLayout::kAllocateFinalized;
+  }
+  void set_is_allocate_finalized() const;
+
   bool is_prefinalized() const {
     return ClassFinalizedBits::decode(raw_ptr()->state_bits_) ==
            ClassLayout::kPreFinalized;
@@ -1529,6 +1537,7 @@
   void EnsureDeclarationLoaded() const;
 
   ErrorPtr EnsureIsFinalized(Thread* thread) const;
+  ErrorPtr EnsureIsAllocateFinalized(Thread* thread) const;
 
   // Allocate a class used for VM internal objects.
   template <class FakeObject, class TargetFakeObject>
@@ -1666,7 +1675,6 @@
     kClassLoadingPos = kClassFinalizedPos + kClassFinalizedSize,  // = 4
     kClassLoadingSize = 2,
     kAbstractBit = kClassLoadingPos + kClassLoadingSize,  // = 6
-    kPatchBit,
     kSynthesizedClassBit,
     kMixinAppAliasBit,
     kMixinTypeAppliedBit,
@@ -1688,7 +1696,6 @@
                                            kClassLoadingPos,
                                            kClassLoadingSize> {};
   class AbstractBit : public BitField<uint32_t, bool, kAbstractBit, 1> {};
-  class PatchBit : public BitField<uint32_t, bool, kPatchBit, 1> {};
   class SynthesizedClassBit
       : public BitField<uint32_t, bool, kSynthesizedClassBit, 1> {};
   class FieldsMarkedNullableBit
@@ -1767,6 +1774,7 @@
   friend class InterpreterHelpers;
   friend class Intrinsifier;
   friend class ProgramWalker;
+  friend class Precompiler;
 };
 
 // Classification of type genericity according to type parameter owners.
@@ -2470,7 +2478,7 @@
   const char* NameCString(NameVisibility name_visibility) const;
 
   void PrintName(const NameFormattingParams& params,
-                 ZoneTextBuffer* printer) const;
+                 BaseTextBuffer* printer) const;
   StringPtr QualifiedScrubbedName() const;
   StringPtr QualifiedUserVisibleName() const;
 
@@ -2544,7 +2552,7 @@
   StringPtr UserVisibleSignature() const;
 
   void PrintSignature(NameVisibility name_visibility,
-                      ZoneTextBuffer* printer) const;
+                      BaseTextBuffer* printer) const;
 
   // Returns true if the signature of this function is instantiated, i.e. if it
   // does not involve generic parameter types or generic result type.
@@ -2749,6 +2757,10 @@
   void set_accessor_field(const Field& value) const;
   FieldPtr accessor_field() const;
 
+  bool IsRegularFunction() const {
+    return kind() == FunctionLayout::kRegularFunction;
+  }
+
   bool IsMethodExtractor() const {
     return kind() == FunctionLayout::kMethodExtractor;
   }
@@ -2824,10 +2836,15 @@
     return (kind() == FunctionLayout::kConstructor) && is_static();
   }
 
+  static bool ClosureBodiesContainNonCovariantChecks() {
+    return FLAG_precompiled_mode || FLAG_lazy_dispatchers;
+  }
+
   // Whether this function can receive an invocation where the number and names
   // of arguments have not been checked.
   bool CanReceiveDynamicInvocation() const {
-    return IsClosureFunction() || IsFfiTrampoline();
+    return (IsClosureFunction() && ClosureBodiesContainNonCovariantChecks()) ||
+           IsFfiTrampoline();
   }
 
   bool HasThisParameter() const {
@@ -2894,11 +2911,13 @@
   bool IsInFactoryScope() const;
 
   bool NeedsArgumentTypeChecks() const {
-    return IsClosureFunction() ||
+    return (IsClosureFunction() && ClosureBodiesContainNonCovariantChecks()) ||
            !(is_static() || (kind() == FunctionLayout::kConstructor));
   }
 
   bool NeedsMonomorphicCheckedEntry(Zone* zone) const;
+  bool HasDynamicCallers(Zone* zone) const;
+  bool PrologueNeedsArgumentsDescriptor() const;
 
   bool MayHaveUncheckedEntryPoint() const;
 
@@ -3118,12 +3137,52 @@
                               String* error_message) const;
 
   // Returns a TypeError if the provided arguments don't match the function
-  // parameter types, NULL otherwise. Assumes AreValidArguments is called first.
+  // parameter types, null otherwise. Assumes AreValidArguments is called first.
+  //
+  // If the function has a non-null receiver in the arguments, the instantiator
+  // type arguments are retrieved from the receiver, otherwise the null type
+  // arguments vector is used.
+  //
+  // If the function is generic, the appropriate function type arguments are
+  // retrieved either from the arguments array or the receiver (if a closure).
+  // If no function type arguments are available in either location, the bounds
+  // of the function type parameters are instantiated and used as the function
+  // type arguments.
+  //
+  // The local function type arguments (_not_ parent function type arguments)
+  // are also checked against the bounds of the corresponding parameters to
+  // ensure they are appropriate subtypes if the function is generic.
+  ObjectPtr DoArgumentTypesMatch(const Array& args,
+                                 const ArgumentsDescriptor& arg_names) const;
+
+  // Returns a TypeError if the provided arguments don't match the function
+  // parameter types, null otherwise. Assumes AreValidArguments is called first.
+  //
+  // If the function is generic, the appropriate function type arguments are
+  // retrieved either from the arguments array or the receiver (if a closure).
+  // If no function type arguments are available in either location, the bounds
+  // of the function type parameters are instantiated and used as the function
+  // type arguments.
+  //
+  // The local function type arguments (_not_ parent function type arguments)
+  // are also checked against the bounds of the corresponding parameters to
+  // ensure they are appropriate subtypes if the function is generic.
   ObjectPtr DoArgumentTypesMatch(
       const Array& args,
       const ArgumentsDescriptor& arg_names,
       const TypeArguments& instantiator_type_args) const;
 
+  // Returns a TypeError if the provided arguments don't match the function
+  // parameter types, null otherwise. Assumes AreValidArguments is called first.
+  //
+  // The local function type arguments (_not_ parent function type arguments)
+  // are also checked against the bounds of the corresponding parameters to
+  // ensure they are appropriate subtypes if the function is generic.
+  ObjectPtr DoArgumentTypesMatch(const Array& args,
+                                 const ArgumentsDescriptor& arg_names,
+                                 const TypeArguments& instantiator_type_args,
+                                 const TypeArguments& function_type_args) const;
+
   // Returns true if the type argument count, total argument count and the names
   // of optional arguments are valid for calling this function.
   // Otherwise, it returns false and the reason (if error_message is not NULL).
@@ -3254,6 +3313,15 @@
 #endif  //  !defined(DART_PRECOMPILED_RUNTIME)
   }
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  bool HasUnboxedParameters() const {
+    return raw_ptr()->unboxed_parameters_info_.HasUnboxedParameters();
+  }
+  bool HasUnboxedReturnValue() const {
+    return raw_ptr()->unboxed_parameters_info_.HasUnboxedReturnValue();
+  }
+#endif  //  !defined(DART_PRECOMPILED_RUNTIME)
+
   // Returns true if the type of this function is a subtype of the type of
   // the other function.
   bool IsSubtypeOf(const Function& other, Heap::Space space) const;
@@ -3282,6 +3350,12 @@
     return kind() == FunctionLayout::kImplicitGetter;
   }
 
+  // Returns true if this function represents an implicit static getter
+  // function.
+  bool IsImplicitStaticGetterFunction() const {
+    return kind() == FunctionLayout::kImplicitStaticGetter;
+  }
+
   // Returns true if this function represents an explicit setter function.
   bool IsSetterFunction() const {
     return kind() == FunctionLayout::kSetterFunction;
@@ -3501,12 +3575,13 @@
   FunctionPtr GetMethodExtractor(const String& getter_name) const;
 
   static bool IsDynamicInvocationForwarderName(const String& name);
+  static bool IsDynamicInvocationForwarderName(StringPtr name);
 
   static StringPtr DemangleDynamicInvocationForwarderName(const String& name);
 
-#if !defined(DART_PRECOMPILED_RUNTIME)
   static StringPtr CreateDynamicInvocationForwarderName(const String& name);
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
   FunctionPtr CreateDynamicInvocationForwarder(
       const String& mangled_name) const;
 
@@ -3519,7 +3594,7 @@
   int32_t SourceFingerprint() const;
 
   // Return false and report an error if the fingerprint does not match.
-  bool CheckSourceFingerprint(const char* prefix, int32_t fp) const;
+  bool CheckSourceFingerprint(int32_t fp) const;
 
   // Works with map [deopt-id] -> ICData.
   void SaveICDataMap(
@@ -3717,7 +3792,7 @@
   void PrintSignatureParameters(Thread* thread,
                                 Zone* zone,
                                 NameVisibility name_visibility,
-                                ZoneTextBuffer* printer) const;
+                                BaseTextBuffer* printer) const;
 
   // Returns true if the type of the formal parameter at the given position in
   // this function is contravariant with the type of the other formal parameter
@@ -3882,6 +3957,10 @@
     return !raw_ptr()->owner_->IsField();
   }
 
+  // Returns whether fields must be cloned via [CloneFromOriginal] for the
+  // current compilation thread.
+  static bool ShouldCloneFields();
+
   // Returns a field cloned from 'this'. 'this' is set as the
   // original field of result.
   FieldPtr CloneFromOriginal() const;
@@ -4611,6 +4690,9 @@
   }
   void SetLoaded() const;
 
+  LoadingUnitPtr loading_unit() const { return raw_ptr()->loading_unit_; }
+  void set_loading_unit(const LoadingUnit& value) const;
+
   static intptr_t InstanceSize() {
     return RoundedAllocationSize(sizeof(LibraryLayout));
   }
@@ -4800,6 +4882,8 @@
 
   intptr_t index() const { return raw_ptr()->index_; }
   void set_index(intptr_t value) const {
+    ASSERT(value == -1 ||
+           value >= 0 && value < std::numeric_limits<classid_t>::max());
     StoreNonPointer(&raw_ptr()->index_, value);
   }
 
@@ -5208,14 +5292,17 @@
   };
 
   EntryType TypeAt(intptr_t index) const {
+    ASSERT((index >= 0) && (index <= Length()));
     return TypeBits::decode(raw_ptr()->entry_bits()[index]);
   }
 
   Patchability PatchableAt(intptr_t index) const {
+    ASSERT((index >= 0) && (index <= Length()));
     return PatchableBit::decode(raw_ptr()->entry_bits()[index]);
   }
 
   void SetTypeAt(intptr_t index, EntryType type, Patchability patchable) const {
+    ASSERT(index >= 0 && index <= Length());
     const uint8_t bits =
         PatchableBit::encode(patchable) | TypeBits::encode(type);
     StoreNonPointer(&raw_ptr()->entry_bits()[index], bits);
@@ -5275,8 +5362,13 @@
   static intptr_t IndexFromOffset(intptr_t offset) {
     ASSERT(
         Utils::IsAligned(offset + kHeapObjectTag, compiler::target::kWordSize));
-    return (offset + kHeapObjectTag - data_offset()) /
-           sizeof(ObjectPoolLayout::Entry);
+#if defined(DART_PRECOMPILER)
+    return (offset + kHeapObjectTag -
+            compiler::target::ObjectPool::element_offset(0)) /
+           compiler::target::kWordSize;
+#else
+    return (offset + kHeapObjectTag - element_offset(0)) / kWordSize;
+#endif
   }
 
   static intptr_t OffsetFromIndex(intptr_t index) {
@@ -5406,6 +5498,10 @@
     return memcmp(a->ptr(), b->ptr(), InstanceSize(Size(a))) == 0;
   }
 
+  uint32_t Hash() const {
+    return HashBytes(reinterpret_cast<const uint8_t*>(PayloadStart()), Size());
+  }
+
   CodeStatistics* stats() const;
   void set_stats(CodeStatistics* stats) const;
 
@@ -6713,6 +6809,10 @@
   static const intptr_t kAwaitJumpVarIndex = 0;
   static const intptr_t kAsyncCompleterIndex = 1;
   static const intptr_t kControllerIndex = 1;
+  // Expected context index of chained futures in recognized async functions.
+  // These are used to unwind async stacks.
+  static const intptr_t kFutureTimeoutFutureIndex = 2;
+  static const intptr_t kFutureWaitFutureIndex = 2;
 
   static intptr_t variable_offset(intptr_t context_index) {
     return OFFSET_OF_RETURNED_VALUE(ContextLayout, data) +
@@ -6970,6 +7070,48 @@
   friend class Deserializer;
 };
 
+class LoadingUnit : public Object {
+ public:
+  static constexpr intptr_t kIllegalId = 0;
+  COMPILE_ASSERT(kIllegalId == WeakTable::kNoValue);
+  static constexpr intptr_t kRootId = 1;
+
+  static LoadingUnitPtr New();
+
+  static intptr_t InstanceSize() {
+    return RoundedAllocationSize(sizeof(LoadingUnitLayout));
+  }
+
+  LoadingUnitPtr parent() const;
+  void set_parent(const LoadingUnit& value) const;
+
+  ArrayPtr base_objects() const;
+  void set_base_objects(const Array& value) const;
+
+  intptr_t id() const { return raw_ptr()->id_; }
+  void set_id(intptr_t id) const { StoreNonPointer(&raw_ptr()->id_, id); }
+
+  // True once the VM deserializes this unit's snapshot.
+  bool loaded() const { return raw_ptr()->loaded_; }
+  void set_loaded(bool value) const {
+    StoreNonPointer(&raw_ptr()->loaded_, value);
+  }
+
+  // True once the VM invokes the embedder's deferred load callback until the
+  // embedder calls Dart_DeferredLoadComplete[Error].
+  bool load_outstanding() const { return raw_ptr()->load_outstanding_; }
+  void set_load_outstanding(bool value) const {
+    StoreNonPointer(&raw_ptr()->load_outstanding_, value);
+  }
+
+  ObjectPtr IssueLoad() const;
+  void CompleteLoad(const String& error_message, bool transient_error) const;
+
+ private:
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(LoadingUnit, Object);
+  friend class Class;
+};
+
 class Error : public Object {
  public:
   virtual const char* ToErrorCString() const;
@@ -7386,6 +7528,9 @@
   // architecture.
   static const intptr_t kHashBits = 30;
 
+  // Hash value for a type argument vector consisting solely of dynamic types.
+  static const intptr_t kAllDynamicHash = 1;
+
   intptr_t Length() const;
   AbstractTypePtr TypeAt(intptr_t index) const;
   AbstractTypePtr TypeAtNullSafe(intptr_t index) const;
@@ -7441,7 +7586,7 @@
       intptr_t from_index,
       intptr_t len,
       NameVisibility name_visibility,
-      ZoneTextBuffer* printer,
+      BaseTextBuffer* printer,
       NameDisambiguation name_disambiguation = NameDisambiguation::kNo) const;
 
   // Check if the subvector of length 'len' starting at 'from_index' of this
@@ -7600,6 +7745,7 @@
     return 0;
   }
   intptr_t Hash() const;
+  intptr_t HashForRange(intptr_t from_index, intptr_t len) const;
 
   static TypeArgumentsPtr New(intptr_t len, Heap::Space space = Heap::kOld);
 
@@ -7768,7 +7914,7 @@
   // type arguments, if any.
   void PrintName(
       NameVisibility visibility,
-      ZoneTextBuffer* printer,
+      BaseTextBuffer* printer,
       NameDisambiguation name_disambiguation = NameDisambiguation::kNo) const;
 
   // Add the class name and URI of each occuring type to the uris
@@ -7855,6 +8001,11 @@
   // Returns unmodified type if this type is not a 'FutureOr' type.
   AbstractTypePtr UnwrapFutureOr() const;
 
+  // Returns true if catching this type will catch all exceptions.
+  // Exception objects are guaranteed to be non-nullable, so
+  // non-nullable Object is also a catch-all type.
+  bool IsCatchAllType() const { return IsDynamicType() || IsObjectType(); }
+
   // Check the subtype relationship.
   bool IsSubtypeOf(const AbstractType& other,
                    Heap::Space space,
@@ -8569,7 +8720,10 @@
     DISALLOW_IMPLICIT_CONSTRUCTORS(CodePointIterator);
   };
 
-  intptr_t Length() const { return Smi::Value(raw_ptr()->length_); }
+  intptr_t Length() const { return LengthOf(raw()); }
+  static intptr_t LengthOf(StringPtr obj) {
+    return Smi::Value(obj->ptr()->length_);
+  }
   static intptr_t length_offset() { return OFFSET_OF(StringLayout, length_); }
 
   intptr_t Hash() const {
@@ -8606,7 +8760,8 @@
 
   virtual ObjectPtr HashCode() const { return Integer::New(Hash()); }
 
-  uint16_t CharAt(intptr_t index) const;
+  uint16_t CharAt(intptr_t index) const { return CharAt(raw(), index); }
+  static uint16_t CharAt(StringPtr str, intptr_t index);
 
   intptr_t CharSize() const;
 
@@ -8644,7 +8799,11 @@
 
   intptr_t CompareTo(const String& other) const;
 
-  bool StartsWith(const String& other) const;
+  bool StartsWith(const String& other) const {
+    NoSafepointScope no_safepoint;
+    return StartsWith(raw(), other.raw());
+  }
+  static bool StartsWith(StringPtr str, StringPtr prefix);
   bool EndsWith(const String& other) const;
 
   // Strings are canonicalized using the symbol table.
@@ -8857,9 +9016,15 @@
 class OneByteString : public AllStatic {
  public:
   static uint16_t CharAt(const String& str, intptr_t index) {
-    ASSERT((index >= 0) && (index < str.Length()));
     ASSERT(str.IsOneByteString());
-    return raw_ptr(str)->data()[index];
+    NoSafepointScope no_safepoint;
+    return OneByteString::CharAt(static_cast<OneByteStringPtr>(str.raw()),
+                                 index);
+  }
+
+  static uint16_t CharAt(OneByteStringPtr str, intptr_t index) {
+    ASSERT(index >= 0 && index < String::LengthOf(str));
+    return str->ptr()->data()[index];
   }
 
   static void SetCharAt(const String& str, intptr_t index, uint8_t code_unit) {
@@ -8950,11 +9115,6 @@
                                              intptr_t length,
                                              Heap::Space space);
 
-  static void SetPeer(const String& str,
-                      void* peer,
-                      intptr_t external_allocation_size,
-                      Dart_WeakPersistentHandleFinalizer callback);
-
   static const ClassId kClassId = kOneByteStringCid;
 
   static OneByteStringPtr null() {
@@ -8999,9 +9159,15 @@
 class TwoByteString : public AllStatic {
  public:
   static uint16_t CharAt(const String& str, intptr_t index) {
-    ASSERT((index >= 0) && (index < str.Length()));
     ASSERT(str.IsTwoByteString());
-    return raw_ptr(str)->data()[index];
+    NoSafepointScope no_safepoint;
+    return TwoByteString::CharAt(static_cast<TwoByteStringPtr>(str.raw()),
+                                 index);
+  }
+
+  static uint16_t CharAt(TwoByteStringPtr str, intptr_t index) {
+    ASSERT(index >= 0 && index < String::LengthOf(str));
+    return str->ptr()->data()[index];
   }
 
   static void SetCharAt(const String& str, intptr_t index, uint16_t ch) {
@@ -9073,11 +9239,6 @@
                                     const String& str,
                                     Heap::Space space);
 
-  static void SetPeer(const String& str,
-                      void* peer,
-                      intptr_t external_allocation_size,
-                      Dart_WeakPersistentHandleFinalizer callback);
-
   static TwoByteStringPtr null() {
     return static_cast<TwoByteStringPtr>(Object::null());
   }
@@ -9121,8 +9282,15 @@
 class ExternalOneByteString : public AllStatic {
  public:
   static uint16_t CharAt(const String& str, intptr_t index) {
+    ASSERT(str.IsExternalOneByteString());
     NoSafepointScope no_safepoint;
-    return *CharAddr(str, index);
+    return ExternalOneByteString::CharAt(
+        static_cast<ExternalOneByteStringPtr>(str.raw()), index);
+  }
+
+  static uint16_t CharAt(ExternalOneByteStringPtr str, intptr_t index) {
+    ASSERT(index >= 0 && index < String::LengthOf(str));
+    return str->ptr()->external_data_[index];
   }
 
   static void* GetPeer(const String& str) { return raw_ptr(str)->peer_; }
@@ -9212,8 +9380,15 @@
 class ExternalTwoByteString : public AllStatic {
  public:
   static uint16_t CharAt(const String& str, intptr_t index) {
+    ASSERT(str.IsExternalTwoByteString());
     NoSafepointScope no_safepoint;
-    return *CharAddr(str, index);
+    return ExternalTwoByteString::CharAt(
+        static_cast<ExternalTwoByteStringPtr>(str.raw()), index);
+  }
+
+  static uint16_t CharAt(ExternalTwoByteStringPtr str, intptr_t index) {
+    ASSERT(index >= 0 && index < String::LengthOf(str));
+    return str->ptr()->external_data_[index];
   }
 
   static void* GetPeer(const String& str) { return raw_ptr(str)->peer_; }
@@ -10401,6 +10576,11 @@
     return OFFSET_OF(ClosureLayout, context_);
   }
 
+  bool IsGeneric(Thread* thread) const { return NumTypeParameters(thread) > 0; }
+  intptr_t NumTypeParameters(Thread* thread) const;
+  // No need for NumParentTypeParameters, as a closure is always closed over
+  // its parents type parameters (i.e., function_type_parameters() above).
+
   SmiPtr hash() const { return raw_ptr()->hash_; }
   static intptr_t hash_offset() { return OFFSET_OF(ClosureLayout, hash_); }
 
@@ -11150,7 +11330,7 @@
 }
 
 inline intptr_t TypeArguments::Hash() const {
-  if (IsNull()) return 0;
+  if (IsNull()) return kAllDynamicHash;
   intptr_t result = Smi::Value(raw_ptr()->hash_);
   if (result != 0) {
     return result;
@@ -11164,6 +11344,23 @@
   StoreSmi(&raw_ptr()->hash_, Smi::New(value));
 }
 
+inline uint16_t String::CharAt(StringPtr str, intptr_t index) {
+  switch (str->GetClassId()) {
+    case kOneByteStringCid:
+      return OneByteString::CharAt(static_cast<OneByteStringPtr>(str), index);
+    case kTwoByteStringCid:
+      return TwoByteString::CharAt(static_cast<TwoByteStringPtr>(str), index);
+    case kExternalOneByteStringCid:
+      return ExternalOneByteString::CharAt(
+          static_cast<ExternalOneByteStringPtr>(str), index);
+    case kExternalTwoByteStringCid:
+      return ExternalTwoByteString::CharAt(
+          static_cast<ExternalTwoByteStringPtr>(str), index);
+  }
+  UNREACHABLE();
+  return 0;
+}
+
 // A view on an [Array] as a list of tuples, optionally starting at an offset.
 //
 // Example: We store a list of (kind, function, code) tuples into the
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 7e0ab00..e127267 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -643,7 +643,7 @@
   }
 
   Service::SendEventWithData(Service::heapsnapshot_stream.id(), "HeapSnapshot",
-                             kMetadataReservation, js.buffer()->buf(),
+                             kMetadataReservation, js.buffer()->buffer(),
                              js.buffer()->length(), buffer_, size_);
   buffer_ = nullptr;
   size_ = 0;
@@ -982,7 +982,7 @@
     writer_->WriteUnsigned(weak_persistent_handle->external_size());
     // Attempt to include a native symbol name.
     auto const name = NativeSymbolResolver::LookupSymbolName(
-        reinterpret_cast<uword>(weak_persistent_handle->callback()), nullptr);
+        weak_persistent_handle->callback_address(), nullptr);
     writer_->WriteUtf8((name == nullptr) ? "Unknown native function" : name);
     if (name != nullptr) {
       NativeSymbolResolver::FreeSymbolName(name);
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index 2e4bc9b..319cff6 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -96,7 +96,7 @@
   jsobj.AddProperty("const", is_const());
   jsobj.AddProperty("_finalized", is_finalized());
   jsobj.AddProperty("_implemented", is_implemented());
-  jsobj.AddProperty("_patch", is_patch());
+  jsobj.AddProperty("_patch", false);
   jsobj.AddProperty("_traceAllocations", TraceAllocation(isolate));
 
   const Class& superClass = Class::Handle(SuperClass());
@@ -247,16 +247,30 @@
   }
   if (id != -1) {
     ASSERT(selector != NULL);
-    jsobj.AddFixedServiceId("classes/%" Pd "/%s/%" Pd "", cls.id(), selector,
-                            id);
+    if (cls.IsTopLevel()) {
+      const auto& library = Library::Handle(cls.library());
+      const auto& private_key = String::Handle(library.private_key());
+      jsobj.AddFixedServiceId("libraries/%s/%s/%" Pd "",
+                              private_key.ToCString(), selector, id);
+    } else {
+      jsobj.AddFixedServiceId("classes/%" Pd "/%s/%" Pd "", cls.id(), selector,
+                              id);
+    }
     return;
   }
   // Regular functions known to their owner use their name (percent-encoded).
   String& name = String::Handle(f.name());
   if (cls.LookupFunction(name) == f.raw()) {
     const char* encoded_name = String::EncodeIRI(name);
-    jsobj.AddFixedServiceId("classes/%" Pd "/functions/%s", cls.id(),
-                            encoded_name);
+    if (cls.IsTopLevel()) {
+      const auto& library = Library::Handle(cls.library());
+      const auto& private_key = String::Handle(library.private_key());
+      jsobj.AddFixedServiceId("libraries/%s/functions/%s",
+                              private_key.ToCString(), encoded_name);
+    } else {
+      jsobj.AddFixedServiceId("classes/%" Pd "/functions/%s", cls.id(),
+                              encoded_name);
+    }
     return;
   }
   // Oddball functions (not known to their owner) fall back to use the object
@@ -356,8 +370,15 @@
   String& field_name = String::Handle(name());
   const char* encoded_field_name = String::EncodeIRI(field_name);
   AddCommonObjectProperties(&jsobj, "Field", ref);
-  jsobj.AddFixedServiceId("classes/%" Pd "/fields/%s", cls.id(),
-                          encoded_field_name);
+  if (cls.IsTopLevel()) {
+    const auto& library = Library::Handle(cls.library());
+    const auto& private_key = String::Handle(library.private_key());
+    jsobj.AddFixedServiceId("libraries/%s/fields/%s", private_key.ToCString(),
+                            encoded_field_name);
+  } else {
+    jsobj.AddFixedServiceId("classes/%" Pd "/fields/%s", cls.id(),
+                            encoded_field_name);
+  }
 
   const char* user_name = UserVisibleNameCString();
   const String& vm_name = String::Handle(name());
@@ -1030,6 +1051,20 @@
   jsobj.AddProperty("_cache", Array::Handle(cache()));
 }
 
+void LoadingUnit::PrintJSONImpl(JSONStream* stream, bool ref) const {
+  JSONObject jsobj(stream);
+  AddCommonObjectProperties(&jsobj, "Object", ref);
+  jsobj.AddServiceId(*this);
+  if (ref) {
+    return;
+  }
+  jsobj.AddProperty("_parent", LoadingUnit::Handle(parent()));
+  jsobj.AddProperty("_baseObjects", Array::Handle(base_objects()));
+  jsobj.AddProperty("_id", static_cast<intptr_t>(id()));
+  jsobj.AddProperty("_loaded", loaded());
+  jsobj.AddProperty("_loadOutstanding", load_outstanding());
+}
+
 void Error::PrintJSONImpl(JSONStream* stream, bool ref) const {
   UNREACHABLE();
 }
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index c14a52a..9683d81 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -103,7 +103,7 @@
 
 ObjectStore::ObjectStore() {
 #define INIT_FIELD(Type, name) name##_ = Type::null();
-  OBJECT_STORE_FIELD_LIST(INIT_FIELD, INIT_FIELD)
+  OBJECT_STORE_FIELD_LIST(INIT_FIELD, INIT_FIELD, INIT_FIELD, INIT_FIELD)
 #undef INIT_FIELD
 
   for (ObjectPtr* current = from(); current <= to(); current++) {
@@ -136,7 +136,8 @@
 #define PRINT_OBJECT_STORE_FIELD(type, name)                                   \
   value = name##_;                                                             \
   fields.AddProperty(#name "_", value);
-    OBJECT_STORE_FIELD_LIST(PRINT_OBJECT_STORE_FIELD, PRINT_OBJECT_STORE_FIELD);
+    OBJECT_STORE_FIELD_LIST(PRINT_OBJECT_STORE_FIELD, PRINT_OBJECT_STORE_FIELD,
+                            PRINT_OBJECT_STORE_FIELD, PRINT_OBJECT_STORE_FIELD);
 #undef PRINT_OBJECT_STORE_FIELD
   }
 }
@@ -333,4 +334,60 @@
 #endif
 }
 
+void ObjectStore::LazyInitCoreTypes() {
+  if (non_nullable_list_rare_type_ == Type::null()) {
+    ASSERT(non_nullable_map_rare_type_ == Type::null());
+    Thread* thread = Thread::Current();
+    Zone* zone = thread->zone();
+    const Library& core_lib = Library::Handle(zone, Library::CoreLibrary());
+    Class& cls = Class::Handle(zone, core_lib.LookupClass(Symbols::List()));
+    ASSERT(!cls.IsNull());
+    Type& type = Type::Handle(zone);
+    type ^= cls.RareType();
+    set_non_nullable_list_rare_type(type);
+    cls = core_lib.LookupClass(Symbols::Map());
+    ASSERT(!cls.IsNull());
+    type ^= cls.RareType();
+    set_non_nullable_map_rare_type(type);
+  }
+}
+
+void ObjectStore::LazyInitFutureTypes() {
+  if (non_nullable_future_rare_type_ == Type::null()) {
+    ASSERT(non_nullable_future_never_type_ == Type::null() &&
+           nullable_future_null_type_ == Type::null());
+    Thread* thread = Thread::Current();
+    Zone* zone = thread->zone();
+    Class& cls = Class::Handle(zone, future_class());
+    if (cls.IsNull()) {
+      const Library& async_lib = Library::Handle(zone, async_library());
+      ASSERT(!async_lib.IsNull());
+      cls = async_lib.LookupClass(Symbols::Future());
+      ASSERT(!cls.IsNull());
+    }
+    TypeArguments& type_args = TypeArguments::Handle(zone);
+    Type& type = Type::Handle(zone);
+    type = never_type();
+    ASSERT(!type.IsNull());
+    type_args = TypeArguments::New(1);
+    type_args.SetTypeAt(0, type);
+    type = Type::New(cls, type_args, TokenPosition::kNoSource,
+                     Nullability::kNonNullable);
+    type.SetIsFinalized();
+    type ^= type.Canonicalize();
+    set_non_nullable_future_never_type(type);
+    type = null_type();
+    ASSERT(!type.IsNull());
+    type_args = TypeArguments::New(1);
+    type_args.SetTypeAt(0, type);
+    type = Type::New(cls, type_args, TokenPosition::kNoSource,
+                     Nullability::kNullable);
+    type.SetIsFinalized();
+    type ^= type.Canonicalize();
+    set_nullable_future_null_type(type);
+    type ^= cls.RareType();
+    set_non_nullable_future_rare_type(type);
+  }
+}
+
 }  // namespace dart
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index 4b28057..5d7a535 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -37,7 +37,9 @@
 //
 // R_ - needs getter only
 // RW - needs getter and setter
-#define OBJECT_STORE_FIELD_LIST(R_, RW)                                        \
+// CW - needs lazy Core init getter and setter
+// FW - needs lazy Future init getter and setter
+#define OBJECT_STORE_FIELD_LIST(R_, RW, CW, FW)                                \
   RW(Class, object_class)                                                      \
   RW(Type, object_type)                                                        \
   RW(Type, legacy_object_type)                                                 \
@@ -80,9 +82,11 @@
   RW(Type, string_type)                                                        \
   RW(Type, legacy_string_type)                                                 \
   RW(Type, non_nullable_string_type)                                           \
-  RW(Type, non_nullable_list_rare_type)   /* maybe be null, lazily built */    \
-  RW(Type, non_nullable_map_rare_type)    /* maybe be null, lazily built */    \
-  RW(Type, non_nullable_future_rare_type) /* maybe be null, lazily built */    \
+  CW(Type, non_nullable_list_rare_type)    /* maybe be null, lazily built */   \
+  CW(Type, non_nullable_map_rare_type)     /* maybe be null, lazily built */   \
+  FW(Type, non_nullable_future_rare_type)  /* maybe be null, lazily built */   \
+  FW(Type, non_nullable_future_never_type) /* maybe be null, lazily built */   \
+  FW(Type, nullable_future_null_type)      /* maybe be null, lazily built */   \
   RW(TypeArguments, type_argument_int)                                         \
   RW(TypeArguments, type_argument_legacy_int)                                  \
   RW(TypeArguments, type_argument_non_nullable_int)                            \
@@ -103,8 +107,6 @@
   RW(Field, pragma_name)                                                       \
   RW(Field, pragma_options)                                                    \
   RW(Class, future_class)                                                      \
-  RW(Type, non_nullable_future_never_type) /* maybe be null, lazily built */   \
-  RW(Type, nullable_future_null_type)      /* maybe be null, lazily built */   \
   RW(Class, completer_class)                                                   \
   RW(Class, symbol_class)                                                      \
   RW(Class, one_byte_string_class)                                             \
@@ -151,6 +153,7 @@
   RW(Library, wasm_library)                                                    \
   RW(GrowableObjectArray, libraries)                                           \
   RW(Array, libraries_map)                                                     \
+  RW(Array, loading_units)                                                     \
   RW(GrowableObjectArray, closure_functions)                                   \
   RW(GrowableObjectArray, pending_classes)                                     \
   RW(Instance, stack_overflow)                                                 \
@@ -353,9 +356,29 @@
 #define DECLARE_GETTER_AND_SETTER(Type, name)                                  \
   DECLARE_GETTER(Type, name)                                                   \
   void set_##name(const Type& value) { name##_ = value.raw(); }
-  OBJECT_STORE_FIELD_LIST(DECLARE_GETTER, DECLARE_GETTER_AND_SETTER)
+#define DECLARE_LAZY_INIT_GETTER(Type, name, init)                             \
+  Type##Ptr name() {                                                           \
+    if (name##_ == Type::null()) {                                             \
+      init();                                                                  \
+    }                                                                          \
+    return name##_;                                                            \
+  }                                                                            \
+  static intptr_t name##_offset() { return OFFSET_OF(ObjectStore, name##_); }
+#define DECLARE_LAZY_INIT_CORE_GETTER_AND_SETTER(Type, name)                   \
+  DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitCoreTypes)                      \
+  void set_##name(const Type& value) { name##_ = value.raw(); }
+#define DECLARE_LAZY_INIT_FUTURE_GETTER_AND_SETTER(Type, name)                 \
+  DECLARE_LAZY_INIT_GETTER(Type, name, LazyInitFutureTypes)                    \
+  void set_##name(const Type& value) { name##_ = value.raw(); }
+  OBJECT_STORE_FIELD_LIST(DECLARE_GETTER,
+                          DECLARE_GETTER_AND_SETTER,
+                          DECLARE_LAZY_INIT_CORE_GETTER_AND_SETTER,
+                          DECLARE_LAZY_INIT_FUTURE_GETTER_AND_SETTER)
 #undef DECLARE_GETTER
 #undef DECLARE_GETTER_AND_SETTER
+#undef DECLARE_LAZY_INIT_GETTER
+#undef DECLARE_LAZY_INIT_CORE_GETTER_AND_SETTER
+#undef DECLARE_LAZY_INIT_FUTURE_GETTER_AND_SETTER
 
   LibraryPtr bootstrap_library(BootstrapLibraryId index) {
     switch (index) {
@@ -403,12 +426,17 @@
 #endif
 
  private:
+  void LazyInitCoreTypes();
+  void LazyInitFutureTypes();
+
   // Finds a core library private method in Object.
   FunctionPtr PrivateObjectLookup(const String& name);
 
   ObjectPtr* from() { return reinterpret_cast<ObjectPtr*>(&object_class_); }
 #define DECLARE_OBJECT_STORE_FIELD(type, name) type##Ptr name##_;
   OBJECT_STORE_FIELD_LIST(DECLARE_OBJECT_STORE_FIELD,
+                          DECLARE_OBJECT_STORE_FIELD,
+                          DECLARE_OBJECT_STORE_FIELD,
                           DECLARE_OBJECT_STORE_FIELD)
 #undef DECLARE_OBJECT_STORE_FIELD
   ObjectPtr* to() {
@@ -432,6 +460,7 @@
 
   friend class Serializer;
   friend class Deserializer;
+  friend class ProgramVisitor;
 
   DISALLOW_COPY_AND_ASSIGN(ObjectStore);
 };
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 42714c5..2d3b16e 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#include <limits>
+
 #include "include/dart_api.h"
 
 #include "bin/builtin.h"
@@ -151,6 +153,88 @@
   EXPECT_EQ(kNumOptionalParameters, function.NumOptionalParameters());
 }
 
+ISOLATE_UNIT_TEST_CASE(SixtyThousandDartClasses) {
+  auto zone = thread->zone();
+  auto isolate = thread->isolate();
+  auto class_table = isolate->class_table();
+
+  const intptr_t start_cid = class_table->NumCids();
+  const intptr_t num_classes = std::numeric_limits<uint16_t>::max() - start_cid;
+
+  const Script& script = Script::Handle(zone);
+  String& name = String::Handle(zone);
+  Class& cls = Class::Handle(zone);
+  Field& field = Field::Handle(zone);
+  Array& fields = Array::Handle(zone);
+  Instance& instance = Instance::Handle(zone);
+  Instance& instance2 = Instance::Handle(zone);
+
+  const auto& instances =
+      GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
+
+  // Create many top-level classes - they should not consume 16-bit range.
+  for (intptr_t i = 0; i < (1 << 16); ++i) {
+    cls = CreateDummyClass(Symbols::TopLevel(), script);
+    cls.Finalize();
+    EXPECT(cls.id() > std::numeric_limits<uint16_t>::max());
+  }
+
+  // Create many concrete classes - they should occupy the entire 16-bit space.
+  for (intptr_t i = 0; i < num_classes; ++i) {
+    name = Symbols::New(thread, OS::SCreate(zone, "MyClass%" Pd "", i));
+    cls = CreateDummyClass(name, script);
+    EXPECT_EQ(start_cid + i, cls.id());
+
+    const intptr_t num_fields = (i % 10);
+    fields = Array::New(num_fields);
+    for (intptr_t f = 0; f < num_fields; ++f) {
+      name =
+          Symbols::New(thread, OS::SCreate(zone, "myField_%" Pd "_%" Pd, i, f));
+      field = Field::New(name, false, false, false, true, false, cls,
+                         Object::dynamic_type(), TokenPosition::kMinSource,
+                         TokenPosition::kMinSource);
+      fields.SetAt(f, field);
+    }
+
+    cls.set_interfaces(Array::empty_array());
+    cls.SetFunctions(Array::empty_array());
+    cls.SetFields(fields);
+    cls.Finalize();
+
+    instance = Instance::New(cls);
+    for (intptr_t f = 0; f < num_fields; ++f) {
+      field ^= fields.At(f);
+      name = Symbols::New(thread,
+                          OS::SCreate(zone, "myFieldValue_%" Pd "_%" Pd, i, f));
+      instance.SetField(field, name);
+    }
+    instances.Add(instance);
+  }
+  EXPECT_EQ((1 << 16) - 1, class_table->NumCids());
+
+  // Ensure GC runs and can recognize all those new instances.
+  isolate->heap()->CollectAllGarbage();
+
+  // Ensure the instances are what we expect.
+  for (intptr_t i = 0; i < num_classes; ++i) {
+    instance ^= instances.At(i);
+    cls = instance.clazz();
+    fields = cls.fields();
+
+    name = cls.Name();
+    EXPECT(strstr(name.ToCString(), OS::SCreate(zone, "MyClass%" Pd "", i)) !=
+           0);
+    EXPECT_EQ((i % 10), fields.Length());
+
+    for (intptr_t f = 0; f < fields.Length(); ++f) {
+      field ^= fields.At(f);
+      instance2 ^= instance.GetField(field);
+      EXPECT(strstr(instance2.ToCString(),
+                    OS::SCreate(zone, "myFieldValue_%" Pd "_%" Pd, i, f)) != 0);
+    }
+  }
+}
+
 ISOLATE_UNIT_TEST_CASE(TypeArguments) {
   const Type& type1 = Type::Handle(Type::Double());
   const Type& type2 = Type::Handle(Type::StringType());
@@ -4325,7 +4409,7 @@
   // Test that Instance::OperatorEquals can call a user-defined operator==.
   const char* kScript =
       "class A {\n"
-      "  bool operator==(A other) { return true; }\n"
+      "  bool operator==(covariant A other) { return true; }\n"
       "}\n"
       "main() {\n"
       "  A a = new A();\n"
diff --git a/runtime/vm/os_fuchsia.cc b/runtime/vm/os_fuchsia.cc
index ff576ff..c30ee49 100644
--- a/runtime/vm/os_fuchsia.cc
+++ b/runtime/vm/os_fuchsia.cc
@@ -12,6 +12,9 @@
 #include <stdint.h>
 
 #include <fuchsia/deprecatedtimezone/cpp/fidl.h>
+#include <lib/async/default.h>
+#include <lib/async-loop/loop.h>
+#include <lib/async-loop/default.h>
 #include <lib/inspect/cpp/inspect.h>
 #include <lib/sys/cpp/component_context.h>
 #include <lib/sys/cpp/service_directory.h>
@@ -87,6 +90,7 @@
 // Initialized on OS:Init(), deinitialized on OS::Cleanup.
 std::unique_ptr<sys::ComponentInspector> component_inspector;
 std::unique_ptr<InspectMetrics> metrics;
+async_loop_t* message_loop = nullptr;
 
 // Initializes the source of timezone data if available.  Timezone data file in
 // Fuchsia is at a fixed directory path.  Returns true on success.
@@ -342,6 +346,12 @@
 }
 
 void OS::Init() {
+  if (async_get_default_dispatcher() == NULL) {
+    async_loop_create(&kAsyncLoopConfigAttachToCurrentThread, &message_loop);
+    async_set_default_dispatcher(async_loop_get_dispatcher(message_loop));
+    async_loop_start_thread(message_loop, "Fuchsia async loop", nullptr);
+  }
+
   sys::ComponentContext* context = dart::ComponentContext();
   component_inspector = std::make_unique<sys::ComponentInspector>(context);
   metrics = std::make_unique<InspectMetrics>(component_inspector->inspector());
@@ -353,6 +363,10 @@
 void OS::Cleanup() {
   metrics = nullptr;
   component_inspector = nullptr;
+  if (message_loop != nullptr) {
+    async_loop_destroy(message_loop);
+    message_loop = nullptr;
+  }
 }
 
 void OS::PrepareToAbort() {}
diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc
index 41582a3..14708e3 100644
--- a/runtime/vm/program_visitor.cc
+++ b/runtime/vm/program_visitor.cc
@@ -1092,7 +1092,7 @@
 
   static Value ValueOf(Pair kv) { return kv; }
 
-  static inline intptr_t Hashcode(Key key) { return key->Size(); }
+  static inline intptr_t Hashcode(Key key) { return key->Hash(); }
 
   static inline bool IsKeyEqual(Pair pair, Key key) {
     return pair->Equals(*key);
@@ -1300,4 +1300,154 @@
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 }
 
+#if defined(DART_PRECOMPILER)
+class AssignLoadingUnitsCodeVisitor : public CodeVisitor {
+ public:
+  explicit AssignLoadingUnitsCodeVisitor(Zone* zone)
+      : heap_(Thread::Current()->heap()),
+        func_(Function::Handle(zone)),
+        cls_(Class::Handle(zone)),
+        lib_(Library::Handle(zone)),
+        unit_(LoadingUnit::Handle(zone)),
+        obj_(Object::Handle(zone)) {}
+
+  void VisitCode(const Code& code) {
+    intptr_t id;
+    if (code.IsFunctionCode()) {
+      func_ ^= code.owner();
+      cls_ = func_.Owner();
+      lib_ = cls_.library();
+      unit_ = lib_.loading_unit();
+      id = unit_.id();
+    } else if (code.IsAllocationStubCode()) {
+      cls_ ^= code.owner();
+      lib_ = cls_.library();
+      unit_ = lib_.loading_unit();
+      id = unit_.id();
+    } else if (code.IsStubCode()) {
+      id = LoadingUnit::kRootId;
+    } else {
+      UNREACHABLE();
+    }
+
+    ASSERT(heap_->GetLoadingUnit(code.raw()) == WeakTable::kNoValue);
+    heap_->SetLoadingUnit(code.raw(), id);
+
+    obj_ = code.code_source_map();
+    MergeAssignment(obj_, id);
+    obj_ = code.compressed_stackmaps();
+    MergeAssignment(obj_, id);
+  }
+
+  void MergeAssignment(const Object& obj, intptr_t id) {
+    intptr_t old_id = heap_->GetLoadingUnit(obj_.raw());
+    if (old_id == WeakTable::kNoValue) {
+      heap_->SetLoadingUnit(obj_.raw(), id);
+    } else if (old_id == id) {
+      // Shared with another code in the same loading unit.
+    } else {
+      // Shared with another code in a different loading unit.
+      // Could assign to dominating loading unit.
+      heap_->SetLoadingUnit(obj_.raw(), LoadingUnit::kRootId);
+    }
+  }
+
+ private:
+  Heap* heap_;
+  Function& func_;
+  Class& cls_;
+  Library& lib_;
+  LoadingUnit& unit_;
+  Object& obj_;
+};
+
+void ProgramVisitor::AssignUnits(Thread* thread) {
+  StackZone stack_zone(thread);
+  HANDLESCOPE(thread);
+  Zone* zone = thread->zone();
+
+  // VM stubs.
+  Instructions& inst = Instructions::Handle(zone);
+  Code& code = Code::Handle(zone);
+  for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
+    inst = StubCode::EntryAt(i).instructions();
+    thread->heap()->SetLoadingUnit(inst.raw(), LoadingUnit::kRootId);
+  }
+
+  // Isolate stubs.
+  ObjectStore* object_store = thread->isolate()->object_store();
+  ObjectPtr* from = object_store->from();
+  ObjectPtr* to = object_store->to_snapshot(Snapshot::kFullAOT);
+  for (ObjectPtr* p = from; p <= to; p++) {
+    if ((*p)->IsCode()) {
+      code ^= *p;
+      inst = code.instructions();
+      thread->heap()->SetLoadingUnit(inst.raw(), LoadingUnit::kRootId);
+    }
+  }
+
+  // Function code / allocation stubs.
+  AssignLoadingUnitsCodeVisitor visitor(zone);
+  WalkProgram(zone, thread->isolate(), &visitor);
+}
+
+class ProgramHashVisitor : public CodeVisitor {
+ public:
+  explicit ProgramHashVisitor(Zone* zone)
+      : str_(String::Handle(zone)),
+        pool_(ObjectPool::Handle(zone)),
+        obj_(Object::Handle(zone)),
+        instr_(Instructions::Handle(zone)),
+        hash_(0) {}
+
+  void VisitClass(const Class& cls) {
+    str_ = cls.Name();
+    Hash(str_);
+  }
+
+  void VisitFunction(const Function& function) {
+    str_ = function.name();
+    Hash(str_);
+  }
+
+  void VisitCode(const Code& code) {
+    pool_ = code.object_pool();
+    for (intptr_t i = 0; i < pool_.Length(); i++) {
+      if (pool_.TypeAt(i) == ObjectPool::EntryType::kTaggedObject) {
+        obj_ = pool_.ObjectAt(i);
+        if (obj_.IsInstance()) {
+          Hash(Instance::Cast(obj_));
+        }
+      }
+    }
+    instr_ = code.instructions();
+    hash_ = CombineHashes(hash_, instr_.Hash());
+  }
+
+  void Hash(const Instance& instance) {
+    hash_ = CombineHashes(hash_, instance.CanonicalizeHash());
+  }
+
+  uint32_t hash() const { return FinalizeHash(hash_, String::kHashBits); }
+
+ private:
+  String& str_;
+  ObjectPool& pool_;
+  Object& obj_;
+  Instructions& instr_;
+  uint32_t hash_;
+};
+
+uint32_t ProgramVisitor::Hash(Thread* thread) {
+  StackZone stack_zone(thread);
+  HANDLESCOPE(thread);
+  Zone* zone = thread->zone();
+
+  ProgramHashVisitor visitor(zone);
+  WalkProgram(zone, thread->isolate(), &visitor);
+  return visitor.hash();
+}
+
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
 }  // namespace dart
diff --git a/runtime/vm/program_visitor.h b/runtime/vm/program_visitor.h
index e10ffd2..d535f1f 100644
--- a/runtime/vm/program_visitor.h
+++ b/runtime/vm/program_visitor.h
@@ -96,6 +96,10 @@
   static void WalkProgram(Zone* zone, Isolate* isolate, ClassVisitor* visitor);
 
   static void Dedup(Thread* thread);
+#if defined(DART_PRECOMPILER)
+  static void AssignUnits(Thread* thread);
+  static uint32_t Hash(Thread* thread);
+#endif
 
  private:
 #if !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index d29e083..9797fc2 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -544,6 +544,7 @@
 REGULAR_VISITOR(MirrorReference)
 REGULAR_VISITOR(UserTag)
 REGULAR_VISITOR(SubtypeTestCache)
+REGULAR_VISITOR(LoadingUnit)
 REGULAR_VISITOR(KernelProgramInfo)
 VARIABLE_VISITOR(TypeArguments, Smi::Value(raw_obj->ptr()->length_))
 VARIABLE_VISITOR(LocalVarDescriptors, raw_obj->ptr()->num_entries_)
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 3089d0b..afcf33d 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -138,8 +138,6 @@
   // See Object::MakeUnusedSpaceTraversable.
   COMPILE_ASSERT(kCardRememberedBit == 0);
 
-  COMPILE_ASSERT(kClassIdTagSize == (sizeof(classid_t) * kBitsPerByte));
-
   // Encodes the object size in the tag in units of object alignment.
   class SizeTag {
    public:
@@ -181,8 +179,11 @@
     }
   };
 
-  class ClassIdTag
-      : public BitField<uint32_t, intptr_t, kClassIdTagPos, kClassIdTagSize> {};
+  class ClassIdTag : public BitField<uint32_t,
+                                     ClassIdTagType,
+                                     kClassIdTagPos,
+                                     kClassIdTagSize> {};
+  COMPILE_ASSERT(kBitsPerByte * sizeof(ClassIdTagType) == kClassIdTagSize);
 
   class CardRememberedBit
       : public BitField<uint32_t, bool, kCardRememberedBit, 1> {};
@@ -704,7 +705,8 @@
   enum ClassFinalizedState {
     kAllocated = 0,  // Initial state.
     kPreFinalized,   // VM classes: size precomputed, but no checks done.
-    kFinalized,      // Class parsed, finalized and ready for use.
+    kFinalized,      // Class parsed, code compiled, not ready for allocation.
+    kAllocateFinalized,  // CHA invalidated, class is ready for allocation.
   };
   enum ClassLoadingState {
     // Class object is created, but it is not filled up.
@@ -930,6 +932,7 @@
   class UnboxedParameterBitmap {
    public:
     static constexpr intptr_t kBitsPerParameter = 2;
+    static constexpr intptr_t kParameterBitmask = (1 << kBitsPerParameter) - 1;
     static constexpr intptr_t kCapacity =
         (kBitsPerByte * sizeof(uint64_t)) / kBitsPerParameter;
 
@@ -942,37 +945,44 @@
       if (position >= kCapacity) {
         return false;
       }
-      ASSERT(Utils::TestBit(bitmap_, 2 * position) ||
-             !Utils::TestBit(bitmap_, 2 * position + 1));
-      return Utils::TestBit(bitmap_, 2 * position);
+      ASSERT(Utils::TestBit(bitmap_, kBitsPerParameter * position) ||
+             !Utils::TestBit(bitmap_, kBitsPerParameter * position + 1));
+      return Utils::TestBit(bitmap_, kBitsPerParameter * position);
     }
     DART_FORCE_INLINE bool IsUnboxedInteger(intptr_t position) const {
       if (position >= kCapacity) {
         return false;
       }
-      return Utils::TestBit(bitmap_, 2 * position) &&
-             !Utils::TestBit(bitmap_, 2 * position + 1);
+      return Utils::TestBit(bitmap_, kBitsPerParameter * position) &&
+             !Utils::TestBit(bitmap_, kBitsPerParameter * position + 1);
     }
     DART_FORCE_INLINE bool IsUnboxedDouble(intptr_t position) const {
       if (position >= kCapacity) {
         return false;
       }
-      return Utils::TestBit(bitmap_, 2 * position) &&
-             Utils::TestBit(bitmap_, 2 * position + 1);
+      return Utils::TestBit(bitmap_, kBitsPerParameter * position) &&
+             Utils::TestBit(bitmap_, kBitsPerParameter * position + 1);
     }
     DART_FORCE_INLINE void SetUnboxedInteger(intptr_t position) {
       ASSERT(position < kCapacity);
-      bitmap_ |= Utils::Bit<decltype(bitmap_)>(2 * position);
-      ASSERT(!Utils::TestBit(bitmap_, 2 * position + 1));
+      bitmap_ |= Utils::Bit<decltype(bitmap_)>(kBitsPerParameter * position);
+      ASSERT(!Utils::TestBit(bitmap_, kBitsPerParameter * position + 1));
     }
     DART_FORCE_INLINE void SetUnboxedDouble(intptr_t position) {
       ASSERT(position < kCapacity);
-      bitmap_ |= Utils::Bit<decltype(bitmap_)>(2 * position);
-      bitmap_ |= Utils::Bit<decltype(bitmap_)>(2 * position + 1);
+      bitmap_ |= Utils::Bit<decltype(bitmap_)>(kBitsPerParameter * position);
+      bitmap_ |=
+          Utils::Bit<decltype(bitmap_)>(kBitsPerParameter * position + 1);
     }
     DART_FORCE_INLINE uint64_t Value() const { return bitmap_; }
     DART_FORCE_INLINE bool IsEmpty() const { return bitmap_ == 0; }
     DART_FORCE_INLINE void Reset() { bitmap_ = 0; }
+    DART_FORCE_INLINE bool HasUnboxedParameters() const {
+      return (bitmap_ >> kBitsPerParameter) != 0;
+    }
+    DART_FORCE_INLINE bool HasUnboxedReturnValue() const {
+      return (bitmap_ & kParameterBitmask) != 0;
+    }
 
    private:
     uint64_t bitmap_;
@@ -1186,9 +1196,9 @@
 #endif
   TokenPosition token_pos_;
   TokenPosition end_token_pos_;
-  classid_t guarded_cid_;
-  classid_t is_nullable_;  // kNullCid if field can contain null value and
-                           // kInvalidCid otherwise.
+  ClassIdTagType guarded_cid_;
+  ClassIdTagType is_nullable_;  // kNullCid if field can contain null value and
+                                // kInvalidCid otherwise.
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
   typedef BitField<uint32_t, bool, 0, 1> IsDeclaredInBytecode;
@@ -1214,6 +1224,9 @@
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
   friend class CidRewriteVisitor;
+  friend class GuardFieldClassInstr;     // For sizeof(guarded_cid_/...)
+  friend class LoadFieldInstr;           // For sizeof(guarded_cid_/...)
+  friend class StoreInstanceFieldInstr;  // For sizeof(guarded_cid_/...)
 };
 
 class ScriptLayout : public ObjectLayout {
@@ -1303,6 +1316,7 @@
   GrowableObjectArrayPtr metadata_;  // Metadata on classes, methods etc.
   ClassPtr toplevel_class_;          // Class containing top-level elements.
   GrowableObjectArrayPtr used_scripts_;
+  LoadingUnitPtr loading_unit_;
   ArrayPtr imports_;  // List of Namespaces imported without prefix.
   ArrayPtr exports_;  // List of re-exported Namespaces.
   ArrayPtr dependencies_;
@@ -1389,7 +1403,7 @@
 
 #if defined(DART_PRECOMPILED_RUNTIME)
   VISIT_NOTHING();
-  classid_t cid_;
+  ClassIdTagType cid_;
 #else
   VISIT_FROM(ObjectPtr, target_);
   ObjectPtr target_;
@@ -1975,8 +1989,8 @@
   CodePtr target_;
   VISIT_TO(ObjectPtr, target_);
   uword entry_point_;
-  classid_t lower_limit_;
-  classid_t upper_limit_;
+  ClassIdTagType lower_limit_;
+  ClassIdTagType upper_limit_;
 };
 
 class MonomorphicSmiableCallLayout : public ObjectLayout {
@@ -2054,6 +2068,17 @@
   VISIT_TO(ObjectPtr, cache_);
 };
 
+class LoadingUnitLayout : public ObjectLayout {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(LoadingUnit);
+  VISIT_FROM(ObjectPtr, parent_);
+  LoadingUnitPtr parent_;
+  ArrayPtr base_objects_;
+  VISIT_TO(ObjectPtr, base_objects_);
+  int32_t id_;
+  bool load_outstanding_;
+  bool loaded_;
+};
+
 class ErrorLayout : public ObjectLayout {
   RAW_HEAP_OBJECT_IMPLEMENTATION(Error);
 };
@@ -2117,9 +2142,8 @@
     switch (kind) {
       case Snapshot::kFull:
       case Snapshot::kFullJIT:
-        return reinterpret_cast<ObjectPtr*>(&imports_);
       case Snapshot::kFullAOT:
-        return reinterpret_cast<ObjectPtr*>(&importer_);
+        return reinterpret_cast<ObjectPtr*>(&imports_);
       case Snapshot::kMessage:
       case Snapshot::kNone:
       case Snapshot::kInvalid:
@@ -2233,7 +2257,7 @@
   AbstractTypePtr bound_;  // ObjectType if no explicit bound specified.
   FunctionPtr parameterized_function_;
   VISIT_TO(ObjectPtr, parameterized_function_)
-  classid_t parameterized_class_id_;
+  ClassIdTagType parameterized_class_id_;
   TokenPosition token_pos_;
   int16_t index_;
   uint8_t flags_;
diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc
index 13c759b..8b6b184 100644
--- a/runtime/vm/raw_object_fields.cc
+++ b/runtime/vm/raw_object_fields.cc
@@ -71,6 +71,7 @@
   F(Library, metadata_)                                                        \
   F(Library, toplevel_class_)                                                  \
   F(Library, used_scripts_)                                                    \
+  F(Library, loading_unit_)                                                    \
   F(Library, imports_)                                                         \
   F(Library, exports_)                                                         \
   F(Library, kernel_data_)                                                     \
@@ -128,6 +129,8 @@
   F(MegamorphicCache, buckets_)                                                \
   F(MegamorphicCache, mask_)                                                   \
   F(SubtypeTestCache, cache_)                                                  \
+  F(LoadingUnit, parent_)                                                      \
+  F(LoadingUnit, base_objects_)                                                \
   F(ApiError, message_)                                                        \
   F(LanguageError, previous_error_)                                            \
   F(LanguageError, script_)                                                    \
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index ebe73f8..2ef43f3 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -575,6 +575,7 @@
 MESSAGE_SNAPSHOT_UNREACHABLE(SingleTargetCache);
 MESSAGE_SNAPSHOT_UNREACHABLE(String);
 MESSAGE_SNAPSHOT_UNREACHABLE(SubtypeTestCache);
+MESSAGE_SNAPSHOT_UNREACHABLE(LoadingUnit);
 MESSAGE_SNAPSHOT_UNREACHABLE(TypedDataBase);
 MESSAGE_SNAPSHOT_UNREACHABLE(UnlinkedCall);
 MESSAGE_SNAPSHOT_UNREACHABLE(MonomorphicSmiableCall);
diff --git a/runtime/vm/resolver.cc b/runtime/vm/resolver.cc
index d05a03d..8e2c533 100644
--- a/runtime/vm/resolver.cc
+++ b/runtime/vm/resolver.cc
@@ -30,17 +30,86 @@
   return ResolveDynamicForReceiverClass(cls, function_name, args_desc);
 }
 
-FunctionPtr Resolver::ResolveDynamicForReceiverClass(
+static FunctionPtr ResolveDynamicAnyArgsWithCustomLookup(
+    Zone* zone,
+    const Class& receiver_class,
+    const String& function_name,
+    bool allow_add,
+    std::function<FunctionPtr(Class&, const String&)> lookup) {
+  Class& cls = Class::Handle(zone, receiver_class.raw());
+  if (FLAG_trace_resolving) {
+    THR_Print("ResolveDynamic '%s' for class %s\n", function_name.ToCString(),
+              String::Handle(zone, cls.Name()).ToCString());
+  }
+  Function& function = Function::Handle(zone);
+
+  const String& demangled = String::Handle(
+      zone,
+      Function::IsDynamicInvocationForwarderName(function_name)
+          ? Function::DemangleDynamicInvocationForwarderName(function_name)
+          : function_name.raw());
+
+  const bool is_getter = Field::IsGetterName(demangled);
+  String& demangled_getter_name = String::Handle();
+  if (is_getter) {
+    demangled_getter_name = Field::NameFromGetter(demangled);
+  }
+
+  const bool is_dyn_call = demangled.raw() != function_name.raw();
+
+  while (!cls.IsNull()) {
+    if (is_dyn_call) {
+      // Try to find a dyn:* forwarder & return it.
+      function = cls.GetInvocationDispatcher(
+          function_name, Array::null_array(),
+          FunctionLayout::kDynamicInvocationForwarder,
+          /*create_if_absent=*/false);
+    }
+    if (!function.IsNull()) return function.raw();
+
+    function = lookup(cls, demangled);
+#if !defined(DART_PRECOMPILED_RUNTIME)
+    // In JIT we might need to lazily create a dyn:* forwarder.
+    if (is_dyn_call && !function.IsNull()) {
+      function =
+          function.GetDynamicInvocationForwarder(function_name, allow_add);
+    }
+#endif
+    if (!function.IsNull()) return function.raw();
+
+    // Getter invocation might actually be a method extraction.
+    if (is_getter) {
+      function = cls.LookupDynamicFunction(demangled_getter_name);
+      if (!function.IsNull()) {
+        if (allow_add && FLAG_lazy_dispatchers) {
+          // We were looking for the getter but found a method with the same
+          // name. Create a method extractor and return it.
+          // The extractor does not exist yet, so using GetMethodExtractor is
+          // not necessary here.
+          function = function.CreateMethodExtractor(demangled);
+          return function.raw();
+        } else {
+          return Function::null();
+        }
+      }
+    }
+    cls = cls.SuperClass();
+  }
+  return function.raw();
+}
+
+static FunctionPtr ResolveDynamicForReceiverClassWithCustomLookup(
     const Class& receiver_class,
     const String& function_name,
     const ArgumentsDescriptor& args_desc,
-    bool allow_add) {
+    bool allow_add,
+    std::function<FunctionPtr(Class&, const String&)> lookup) {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
 
   Function& function = Function::Handle(
-      zone,
-      ResolveDynamicAnyArgs(zone, receiver_class, function_name, allow_add));
+      zone, ResolveDynamicAnyArgsWithCustomLookup(
+                zone, receiver_class, function_name, allow_add, lookup));
 
   if (function.IsNull() || !function.AreValidArguments(args_desc, NULL)) {
     // Return a null function to signal to the upper levels to dispatch to
@@ -60,81 +129,43 @@
   return function.raw();
 }
 
+FunctionPtr Resolver::ResolveDynamicForReceiverClass(
+    const Class& receiver_class,
+    const String& function_name,
+    const ArgumentsDescriptor& args_desc,
+    bool allow_add) {
+  return ResolveDynamicForReceiverClassWithCustomLookup(
+      receiver_class, function_name, args_desc, allow_add,
+      &Class::LookupDynamicFunction);
+}
+
+FunctionPtr Resolver::ResolveDynamicForReceiverClassAllowPrivate(
+    const Class& receiver_class,
+    const String& function_name,
+    const ArgumentsDescriptor& args_desc,
+    bool allow_add) {
+  return ResolveDynamicForReceiverClassWithCustomLookup(
+      receiver_class, function_name, args_desc, allow_add,
+      &Class::LookupDynamicFunctionAllowPrivate);
+}
+
 FunctionPtr Resolver::ResolveDynamicAnyArgs(Zone* zone,
                                             const Class& receiver_class,
                                             const String& function_name,
                                             bool allow_add) {
-  Class& cls = Class::Handle(zone, receiver_class.raw());
-  if (FLAG_trace_resolving) {
-    THR_Print("ResolveDynamic '%s' for class %s\n", function_name.ToCString(),
-              String::Handle(zone, cls.Name()).ToCString());
-  }
-  Function& function = Function::Handle(zone);
+  return ResolveDynamicAnyArgsWithCustomLookup(
+      zone, receiver_class, function_name, allow_add,
+      std::mem_fn(&Class::LookupDynamicFunctionAllowPrivate));
+}
 
-  String& demangled = String::Handle(zone);
-
-  const bool is_getter = Field::IsGetterName(function_name);
-  if (is_getter) {
-    demangled = Field::NameFromGetter(function_name);
-  }
-
-  if (Function::IsDynamicInvocationForwarderName(function_name)) {
-    demangled = Function::DemangleDynamicInvocationForwarderName(function_name);
-#ifdef DART_PRECOMPILED_RUNTIME
-    // In precompiled mode, the non-dynamic version of the function may be
-    // tree-shaken away, so can't necessarily resolve the demanged name.
-    while (!cls.IsNull()) {
-      function = cls.GetInvocationDispatcher(
-          function_name, Array::null_array(),
-          FunctionLayout::kDynamicInvocationForwarder,
-          /*create_if_absent=*/false);
-      if (!function.IsNull()) break;
-      cls = cls.SuperClass();
-    }
-    // Some functions don't require dynamic invocation forwarders, for example
-    // if there are no parameters or all the parameters are marked
-    // `generic-covariant` (meaning there's no work for the dynamic invocation
-    // forwarder to do, see `kernel::DynamicInvocationForwarder`). For these
-    // functions, we won't have built a `dyn:` version, but it's safe to just
-    // return the original version directly.
-    return !function.IsNull() ? function.raw()
-                              : ResolveDynamicAnyArgs(zone, receiver_class,
-                                                      demangled, allow_add);
-#else
-    function =
-        ResolveDynamicAnyArgs(zone, receiver_class, demangled, allow_add);
-    return function.IsNull() ? function.raw()
-                             : function.GetDynamicInvocationForwarder(
-                                   function_name, allow_add);
-#endif
-  }
-
-  // Now look for an instance function whose name matches function_name
-  // in the class.
-  while (!cls.IsNull()) {
-    function = cls.LookupDynamicFunction(function_name);
-    if (!function.IsNull()) {
-      return function.raw();
-    }
-    // Getter invocation might actually be a method extraction.
-    if (is_getter && function.IsNull()) {
-      function = cls.LookupDynamicFunction(demangled);
-      if (!function.IsNull()) {
-        if (allow_add && FLAG_lazy_dispatchers) {
-          // We were looking for the getter but found a method with the same
-          // name. Create a method extractor and return it.
-          // The extractor does not exist yet, so using GetMethodExtractor is
-          // not necessary here.
-          function = function.CreateMethodExtractor(function_name);
-          return function.raw();
-        } else {
-          return Function::null();
-        }
-      }
-    }
-    cls = cls.SuperClass();
-  }
-  return function.raw();
+FunctionPtr Resolver::ResolveDynamicAnyArgsAllowPrivate(
+    Zone* zone,
+    const Class& receiver_class,
+    const String& function_name,
+    bool allow_add) {
+  return ResolveDynamicAnyArgsWithCustomLookup(
+      zone, receiver_class, function_name, allow_add,
+      std::mem_fn(&Class::LookupDynamicFunctionAllowPrivate));
 }
 
 FunctionPtr Resolver::ResolveStatic(const Library& library,
diff --git a/runtime/vm/resolver.h b/runtime/vm/resolver.h
index 0d9f8a9..e440c24 100644
--- a/runtime/vm/resolver.h
+++ b/runtime/vm/resolver.h
@@ -33,12 +33,22 @@
       const String& function_name,
       const ArgumentsDescriptor& args_desc,
       bool allow_add = true);
+  static FunctionPtr ResolveDynamicForReceiverClassAllowPrivate(
+      const Class& receiver_class,
+      const String& function_name,
+      const ArgumentsDescriptor& args_desc,
+      bool allow_add);
 
   // If 'allow_add' is true we may add a function to the class during lookup.
   static FunctionPtr ResolveDynamicAnyArgs(Zone* zone,
                                            const Class& receiver_class,
                                            const String& function_name,
                                            bool allow_add = true);
+  static FunctionPtr ResolveDynamicAnyArgsAllowPrivate(
+      Zone* zone,
+      const Class& receiver_class,
+      const String& function_name,
+      bool allow_add);
 
   // Resolve specified dart static function. If library.IsNull, use
   // either application library or core library if no application library
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 4bfefb8..4b7e6ad 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -312,12 +312,23 @@
   return caller_frame->GetTokenPos();
 }
 
+// Result of an invoke may be an unhandled exception, in which case we
+// rethrow it.
+static void ThrowIfError(const Object& result) {
+  if (!result.IsNull() && result.IsError()) {
+    Exceptions::PropagateError(Error::Cast(result));
+  }
+}
+
 // Allocate a new object.
 // Arg0: class of the object that needs to be allocated.
 // Arg1: type arguments of the object that needs to be allocated.
 // Return value: newly allocated object.
 DEFINE_RUNTIME_ENTRY(AllocateObject, 2) {
   const Class& cls = Class::CheckedHandle(zone, arguments.ArgAt(0));
+  const Error& error =
+      Error::Handle(zone, cls.EnsureIsAllocateFinalized(thread));
+  ThrowIfError(error);
   const Instance& instance =
       Instance::Handle(zone, Instance::New(cls, SpaceForRuntimeAllocation()));
 
@@ -510,14 +521,6 @@
   arguments.SetReturn(cloned_ctx);
 }
 
-// Result of an invoke may be an unhandled exception, in which case we
-// rethrow it.
-static void ThrowIfError(const Object& result) {
-  if (!result.IsNull() && result.IsError()) {
-    Exceptions::PropagateError(Error::Cast(result));
-  }
-}
-
 // Invoke field getter before dispatch.
 // Arg0: instance.
 // Arg1: field name (may be demangled during call).
@@ -559,17 +562,10 @@
   ArgumentsDescriptor args_desc(descriptor);
   ASSERT(!receiver.IsClosure());  // Interpreter tests for closure.
   Class& cls = Class::Handle(zone, receiver.clazz());
-  Function& call_function = Function::Handle(zone);
-  do {
-    call_function = cls.LookupDynamicFunction(Symbols::Call());
-    if (!call_function.IsNull()) {
-      if (!call_function.AreValidArguments(args_desc, NULL)) {
-        call_function = Function::null();
-      }
-      break;
-    }
-    cls = cls.SuperClass();
-  } while (!cls.IsNull());
+  Function& call_function = Function::Handle(
+      zone,
+      Resolver::ResolveDynamicForReceiverClass(cls, Symbols::Call(), args_desc,
+                                               /*allow_add=*/false));
   arguments.SetReturn(call_function);
 }
 
@@ -1216,8 +1212,7 @@
     // A call site in the monomorphic state does not load the arguments
     // descriptor, so do not allow transition to this state if the callee
     // needs it.
-    if (target_function.HasOptionalParameters() ||
-        target_function.IsGeneric()) {
+    if (target_function.PrologueNeedsArgumentsDescriptor()) {
       return;
     }
 
@@ -1489,8 +1484,8 @@
     cls = table->At(cid);
     if (cls.is_abstract()) continue;
     if (!cls.is_allocated()) continue;
-    other_target =
-        Resolver::ResolveDynamicAnyArgs(zone, cls, name, false /* allow_add */);
+    other_target = Resolver::ResolveDynamicAnyArgs(zone, cls, name,
+                                                   /*allow_add=*/false);
     if (other_target.raw() != target.raw()) {
       return false;
     }
@@ -1652,8 +1647,8 @@
   //
   // Because of this we also don't generate monomorphic checks for those
   // functions.
-  if (!target_function.IsNull() && !target_function.HasOptionalParameters() &&
-      !target_function.IsGeneric()) {
+  if (!target_function.IsNull() &&
+      !target_function.PrologueNeedsArgumentsDescriptor()) {
     // Patch to monomorphic call.
     ASSERT(target_function.HasCode());
     const Code& target_code =
@@ -1664,6 +1659,7 @@
     if (unlinked.can_patch_to_monomorphic()) {
       object = expected_cid.raw();
       code = target_code.raw();
+      ASSERT(code.HasMonomorphicEntry());
     } else {
       object = MonomorphicSmiableCall::New(expected_cid.Value(), target_code);
       code = StubCode::MonomorphicSmiableCheck().raw();
@@ -1905,8 +1901,7 @@
 
   if ((number_of_checks == 0) &&
       (!FLAG_precompiled_mode || ic_data.receiver_cannot_be_smi()) &&
-      !target_function.HasOptionalParameters() &&
-      !target_function.IsGeneric()) {
+      !target_function.PrologueNeedsArgumentsDescriptor()) {
     // This call site is unlinked: transition to a monomorphic direct call.
     // Note we cannot do this if the target has optional parameters because
     // the monomorphic direct call does not load the arguments descriptor.
@@ -1917,6 +1912,7 @@
         Code::Handle(zone_, target_function.EnsureHasCode());
     const Smi& expected_cid =
         Smi::Handle(zone_, Smi::New(receiver_.GetClassId()));
+    ASSERT(target_code.HasMonomorphicEntry());
     CodePatcher::PatchSwitchableCallAtWithMutatorsStopped(
         thread_, caller_frame_->pc(), caller_code_, expected_cid, target_code);
     arguments_.SetArgAt(0, target_code);
@@ -2137,7 +2133,7 @@
 //   Arg0: receiver
 //   Arg1: target name
 //   Arg2: arguments descriptor
-//   Returns: target function
+//   Returns: target function (can only be null if !FLAG_lazy_dispatchers)
 // Modifies the instance call table in current interpreter.
 DEFINE_RUNTIME_ENTRY(InterpretedInstanceCallMissHandler, 3) {
 #if defined(DART_PRECOMPILED_RUNTIME)
@@ -2161,11 +2157,164 @@
     target_function =
         InlineCacheMissHelper(receiver_class, arg_desc, target_name);
   }
-  ASSERT(!target_function.IsNull());
+  ASSERT(!target_function.IsNull() || !FLAG_lazy_dispatchers);
   arguments.SetReturn(target_function);
 #endif
 }
 
+// Used to find the correct receiver and function to invoke or to fall back to
+// invoking noSuchMethod when lazy dispatchers are disabled. Returns the
+// result of the invocation or an Error.
+static ObjectPtr InvokeCallThroughGetterOrNoSuchMethod(
+    Zone* zone,
+    const Instance& receiver,
+    const String& target_name,
+    const Array& orig_arguments,
+    const Array& orig_arguments_desc) {
+  ASSERT(!FLAG_lazy_dispatchers);
+  const bool is_dynamic_call =
+      Function::IsDynamicInvocationForwarderName(target_name);
+  String& demangled_target_name = String::Handle(zone, target_name.raw());
+  if (is_dynamic_call) {
+    demangled_target_name =
+        Function::DemangleDynamicInvocationForwarderName(target_name);
+  }
+
+  Class& cls = Class::Handle(zone, receiver.clazz());
+  Function& function = Function::Handle(zone);
+
+  // Dart distinguishes getters and regular methods and allows their calls
+  // to mix with conversions, and its selectors are independent of arity. So do
+  // a zigzagged lookup to see if this call failed because of an arity mismatch,
+  // need for conversion, or there really is no such method.
+
+  const bool is_getter = Field::IsGetterName(demangled_target_name);
+  if (is_getter) {
+    // Tear-off of a method
+    // o.foo (o.get:foo) failed, closurize o.foo() if it exists.
+    const auto& function_name =
+        String::Handle(zone, Field::NameFromGetter(demangled_target_name));
+    while (!cls.IsNull()) {
+      // We don't generate dyn:* forwarders for method extractors so there is no
+      // need to try to find a dyn:get:foo first (see assertion below)
+      if (function.IsNull()) {
+        function = cls.LookupDynamicFunction(function_name);
+      }
+      if (!function.IsNull()) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+        ASSERT(!kernel::NeedsDynamicInvocationForwarder(Function::Handle(
+            function.GetMethodExtractor(demangled_target_name))));
+#endif
+        const Function& closure_function =
+            Function::Handle(zone, function.ImplicitClosureFunction());
+        const Object& result = Object::Handle(
+            zone, closure_function.ImplicitInstanceClosure(receiver));
+        return result.raw();
+      }
+      cls = cls.SuperClass();
+    }
+
+    // Fall through for noSuchMethod
+  } else {
+    // Call through field.
+    // o.foo(...) failed, invoke noSuchMethod is foo exists but has the wrong
+    // number of arguments, or try (o.foo).call(...)
+
+    if ((target_name.raw() == Symbols::Call().raw()) && receiver.IsClosure()) {
+      // 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.
+      auto& result = Object::Handle(
+          zone,
+          DartEntry::ResolveCallable(orig_arguments, orig_arguments_desc));
+      if (result.IsError()) {
+        return result.raw();
+      }
+      function ^= result.raw();
+      if (is_dynamic_call && !function.IsNull() &&
+          !function.CanReceiveDynamicInvocation()) {
+        ArgumentsDescriptor args_desc(orig_arguments_desc);
+        result = function.DoArgumentTypesMatch(orig_arguments, args_desc);
+        if (result.IsError()) {
+          return result.raw();
+        }
+      }
+      result = DartEntry::InvokeCallable(function, orig_arguments,
+                                         orig_arguments_desc);
+      return result.raw();
+    }
+
+    // Dynamic call sites have to use the dynamic getter as well (if it was
+    // created).
+    const auto& getter_name =
+        String::Handle(zone, Field::GetterName(demangled_target_name));
+    const auto& dyn_getter_name = String::Handle(
+        zone, is_dynamic_call
+                  ? Function::CreateDynamicInvocationForwarderName(getter_name)
+                  : getter_name.raw());
+    ArgumentsDescriptor args_desc(orig_arguments_desc);
+    while (!cls.IsNull()) {
+      // If there is a function with the target name but mismatched arguments
+      // we need to call `receiver.noSuchMethod()`.
+      function = cls.LookupDynamicFunction(target_name);
+      if (!function.IsNull()) {
+        ASSERT(!function.AreValidArguments(args_desc, NULL));
+        break;  // mismatch, invoke noSuchMethod
+      }
+      if (is_dynamic_call) {
+        function = cls.LookupDynamicFunction(demangled_target_name);
+        if (!function.IsNull()) {
+          ASSERT(!function.AreValidArguments(args_desc, NULL));
+          break;  // mismatch, invoke noSuchMethod
+        }
+      }
+
+      // If there is a getter we need to call-through-getter.
+      if (is_dynamic_call) {
+        function = cls.LookupDynamicFunction(dyn_getter_name);
+      }
+      if (function.IsNull()) {
+        function = cls.LookupDynamicFunction(getter_name);
+      }
+      if (!function.IsNull()) {
+        const Array& getter_arguments = Array::Handle(Array::New(1));
+        getter_arguments.SetAt(0, receiver);
+        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());
+
+        orig_arguments.SetAt(args_desc.FirstArgIndex(), getter_result);
+        auto& result = Object::Handle(
+            zone,
+            DartEntry::ResolveCallable(orig_arguments, orig_arguments_desc));
+        if (result.IsError()) {
+          return result.raw();
+        }
+        function ^= result.raw();
+        if (is_dynamic_call && !function.IsNull() &&
+            !function.CanReceiveDynamicInvocation()) {
+          result = function.DoArgumentTypesMatch(orig_arguments, args_desc);
+          if (result.IsError()) {
+            return result.raw();
+          }
+        }
+        result = DartEntry::InvokeCallable(function, orig_arguments,
+                                           orig_arguments_desc);
+        return result.raw();
+      }
+      cls = cls.SuperClass();
+    }
+  }
+
+  const Object& result = Object::Handle(
+      zone, DartEntry::InvokeNoSuchMethod(receiver, demangled_target_name,
+                                          orig_arguments, orig_arguments_desc));
+  return result.raw();
+}
+
 // Invoke appropriate noSuchMethod or closure from getter.
 // Arg0: receiver
 // Arg1: ICData or MegamorphicCache
@@ -2186,119 +2335,12 @@
     target_name = MegamorphicCache::Cast(ic_data_or_cache).target_name();
   }
 
-  const bool is_dynamic_call =
-      Function::IsDynamicInvocationForwarderName(target_name);
-  if (is_dynamic_call) {
-    target_name = Function::DemangleDynamicInvocationForwarderName(target_name);
-  }
-
-  Class& cls = Class::Handle(zone, receiver.clazz());
-  Function& function = Function::Handle(zone);
-
-  // Dart distinguishes getters and regular methods and allows their calls
-  // to mix with conversions, and its selectors are independent of arity. So do
-  // a zigzagged lookup to see if this call failed because of an arity mismatch,
-  // need for conversion, or there really is no such method.
-
-#define NO_SUCH_METHOD()                                                       \
-  const Object& result = Object::Handle(                                       \
-      zone, DartEntry::InvokeNoSuchMethod(                                     \
-                receiver, target_name, orig_arguments, orig_arguments_desc));  \
-  ThrowIfError(result);                                                        \
+  const auto& result = Object::Handle(
+      zone,
+      InvokeCallThroughGetterOrNoSuchMethod(
+          zone, receiver, target_name, orig_arguments, orig_arguments_desc));
+  ThrowIfError(result);
   arguments.SetReturn(result);
-
-#define CLOSURIZE(some_function)                                               \
-  const Function& closure_function =                                           \
-      Function::Handle(zone, some_function.ImplicitClosureFunction());         \
-  const Object& result = Object::Handle(                                       \
-      zone, closure_function.ImplicitInstanceClosure(receiver));               \
-  arguments.SetReturn(result);
-
-  const bool is_getter = Field::IsGetterName(target_name);
-  if (is_getter) {
-    // o.foo (o.get:foo) failed, closurize o.foo() if it exists.
-    String& field_name =
-        String::Handle(zone, Field::NameFromGetter(target_name));
-    while (!cls.IsNull()) {
-      function = cls.LookupDynamicFunction(field_name);
-      if (!function.IsNull()) {
-        CLOSURIZE(function);
-        return;
-      }
-      cls = cls.SuperClass();
-    }
-
-    // Fall through for noSuchMethod
-  } else {
-    // o.foo(...) failed, invoke noSuchMethod is foo exists but has the wrong
-    // number of arguments, or try (o.foo).call(...)
-
-    if ((target_name.raw() == Symbols::Call().raw()) && receiver.IsClosure()) {
-      // 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.
-      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;
-    }
-
-    const String& getter_name =
-        String::Handle(zone, Field::GetterName(target_name));
-    ArgumentsDescriptor args_desc(orig_arguments_desc);
-    while (!cls.IsNull()) {
-      function = cls.LookupDynamicFunction(target_name);
-      if (!function.IsNull()) {
-        ASSERT(!function.AreValidArguments(args_desc, NULL));
-        break;  // mismatch, invoke noSuchMethod
-      }
-      function = cls.LookupDynamicFunction(getter_name);
-      if (!function.IsNull()) {
-        const Array& getter_arguments = Array::Handle(Array::New(1));
-        getter_arguments.SetAt(0, receiver);
-        const Object& getter_result = Object::Handle(
-            zone, DartEntry::InvokeFunction(function, getter_arguments));
-        ThrowIfError(getter_result);
-        ASSERT(getter_result.IsNull() || getter_result.IsInstance());
-
-        orig_arguments.SetAt(args_desc.FirstArgIndex(), getter_result);
-        auto& call_result = Object::Handle(
-            zone,
-            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;
-      }
-      cls = cls.SuperClass();
-    }
-  }
-
-  NO_SUCH_METHOD();
-
-#undef NO_SUCH_METHOD
-#undef CLOSURIZE
 }
 
 // Invoke appropriate noSuchMethod function.
@@ -2331,22 +2373,32 @@
   arguments.SetReturn(result);
 }
 
-// Invoke appropriate noSuchMethod function.
+// Invoke appropriate noSuchMethod function (or in the case of no lazy
+// dispatchers, walk the receiver to find the correct method to call).
 // Arg0: receiver
-// Arg1: arguments descriptor array.
-// Arg2: arguments array.
-// Arg3: function name.
+// Arg1: function name.
+// Arg2: arguments descriptor array.
+// Arg3: arguments array.
 DEFINE_RUNTIME_ENTRY(InvokeNoSuchMethod, 4) {
   ASSERT(FLAG_enable_interpreter);
   const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
-  const Array& orig_arguments_desc =
-      Array::CheckedHandle(zone, arguments.ArgAt(1));
-  const Array& orig_arguments = Array::CheckedHandle(zone, arguments.ArgAt(2));
   const String& original_function_name =
-      String::CheckedHandle(zone, arguments.ArgAt(3));
+      String::CheckedHandle(zone, arguments.ArgAt(1));
+  const Array& orig_arguments_desc =
+      Array::CheckedHandle(zone, arguments.ArgAt(2));
+  const Array& orig_arguments = Array::CheckedHandle(zone, arguments.ArgAt(3));
 
-  const Object& result = Object::Handle(DartEntry::InvokeNoSuchMethod(
-      receiver, original_function_name, orig_arguments, orig_arguments_desc));
+  auto& result = Object::Handle(zone);
+  if (!FLAG_lazy_dispatchers) {
+    // Failing to find the method could be due to the lack of lazy invoke field
+    // dispatchers, so attempt a deeper search before calling noSuchMethod.
+    result = InvokeCallThroughGetterOrNoSuchMethod(
+        zone, receiver, original_function_name, orig_arguments,
+        orig_arguments_desc);
+  } else {
+    result = DartEntry::InvokeNoSuchMethod(receiver, original_function_name,
+                                           orig_arguments, orig_arguments_desc);
+  }
   ThrowIfError(result);
   arguments.SetReturn(result);
 }
@@ -3249,6 +3301,12 @@
   Exceptions::ThrowLateInitializationError(String::Handle(field.name()));
 }
 
+DEFINE_RUNTIME_ENTRY(NotLoaded, 0) {
+  // We could just use a trap instruction in the stub, but we get better stack
+  // traces when there is an exit frame.
+  FATAL("Not loaded");
+}
+
 // Use expected function signatures to help MSVC compiler resolve overloading.
 typedef double (*UnaryMathCFunction)(double x);
 typedef double (*BinaryMathCFunction)(double x, double y);
diff --git a/runtime/vm/runtime_entry.h b/runtime/vm/runtime_entry.h
index 1b35e0e..bede33e 100644
--- a/runtime/vm/runtime_entry.h
+++ b/runtime/vm/runtime_entry.h
@@ -85,6 +85,15 @@
   } while (0)
 #endif
 
+#if defined(USING_SIMULATOR)
+#define CHECK_SIMULATOR_STACK_OVERFLOW()                                       \
+  if (!OSThread::Current()->HasStackHeadroom()) {                              \
+    Exceptions::ThrowStackOverflow();                                          \
+  }
+#else
+#define CHECK_SIMULATOR_STACK_OVERFLOW()
+#endif  // defined(USING_SIMULATOR)
+
 // Helper macros for declaring and defining runtime entries.
 
 #define DEFINE_RUNTIME_ENTRY(name, argument_count)                             \
@@ -106,6 +115,7 @@
       TransitionGeneratedToVM transition(thread);                              \
       StackZone zone(thread);                                                  \
       HANDLESCOPE(thread);                                                     \
+      CHECK_SIMULATOR_STACK_OVERFLOW();                                        \
       DRT_Helper##name(isolate, thread, zone.GetZone(), arguments);            \
     }                                                                          \
   }                                                                            \
diff --git a/runtime/vm/runtime_entry_list.h b/runtime/vm/runtime_entry_list.h
index 5b83f13..8945038 100644
--- a/runtime/vm/runtime_entry_list.h
+++ b/runtime/vm/runtime_entry_list.h
@@ -57,7 +57,8 @@
   V(LateInitializationError)                                                   \
   V(CompileFunction)                                                           \
   V(CompileInterpretedFunction)                                                \
-  V(SwitchableCallMiss)
+  V(SwitchableCallMiss)                                                        \
+  V(NotLoaded)
 
 // Note: Leaf runtime function have C linkage, so they cannot pass C++ struct
 // values like ObjectPtr.
diff --git a/runtime/vm/scopes.cc b/runtime/vm/scopes.cc
index ca297b7..e8e2ba6 100644
--- a/runtime/vm/scopes.cc
+++ b/runtime/vm/scopes.cc
@@ -212,6 +212,7 @@
   LocalVariable* await_jump_var = nullptr;
   LocalVariable* async_completer = nullptr;
   LocalVariable* controller = nullptr;
+  LocalVariable* chained_future = nullptr;
   for (intptr_t i = 0; i < num_variables(); i++) {
     LocalVariable* variable = VariableAt(i);
     if (variable->owner() == this) {
@@ -222,6 +223,8 @@
           async_completer = variable;
         } else if (variable->name().Equals(Symbols::Controller())) {
           controller = variable;
+        } else if (variable->is_chained_future()) {
+          chained_future = variable;
         }
       }
     }
@@ -243,6 +246,12 @@
     *found_captured_variables = true;
     ASSERT(controller->index().value() == Context::kControllerIndex);
   }
+  if (chained_future != nullptr) {
+    AllocateContextVariable(chained_future, &context_owner);
+    *found_captured_variables = true;
+    ASSERT(chained_future->index().value() ==
+           chained_future->expected_context_index());
+  }
 
   while (pos < num_parameters) {
     LocalVariable* parameter = VariableAt(pos);
@@ -271,9 +280,9 @@
     LocalVariable* variable = VariableAt(pos);
     if (variable->owner() == this) {
       if (variable->is_captured()) {
-        // Skip the two variables already pre-allocated above.
+        // Skip the variables already pre-allocated above.
         if (variable != await_jump_var && variable != async_completer &&
-            variable != controller) {
+            variable != controller && variable != chained_future) {
           AllocateContextVariable(variable, &context_owner);
           *found_captured_variables = true;
         }
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index fd012c6..a9761d7 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -93,6 +93,8 @@
         is_forced_stack_(false),
         is_explicit_covariant_parameter_(false),
         is_late_(false),
+        is_chained_future_(false),
+        expected_context_index_(-1),
         late_init_offset_(0),
         type_check_mode_(kDoTypeCheck),
         index_() {
@@ -131,6 +133,14 @@
   bool is_late() const { return is_late_; }
   void set_is_late() { is_late_ = true; }
 
+  bool is_chained_future() const { return is_chained_future_; }
+  void set_is_chained_future() { is_chained_future_ = true; }
+
+  intptr_t expected_context_index() const { return expected_context_index_; }
+  void set_expected_context_index(int index) {
+    expected_context_index_ = index;
+  }
+
   intptr_t late_init_offset() const { return late_init_offset_; }
   void set_late_init_offset(intptr_t late_init_offset) {
     late_init_offset_ = late_init_offset;
@@ -220,6 +230,8 @@
   bool is_forced_stack_;
   bool is_explicit_covariant_parameter_;
   bool is_late_;
+  bool is_chained_future_;
+  intptr_t expected_context_index_;
   intptr_t late_init_offset_;
   TypeCheckMode type_check_mode_;
   VariableIndex index_;
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index c16ed19..f82c430 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -1117,6 +1117,9 @@
     }
     // Ignore events when no one is listening to the event stream.
     return;
+  } else if (event->stream_info() != NULL &&
+             FLAG_warn_on_pause_with_no_debugger && event->IsPause()) {
+    ReportPauseOnConsole(event);
   }
   if (!ServiceIsolate::IsRunning()) {
     return;
@@ -1139,7 +1142,7 @@
       event->stream_info()->consumer() != nullptr) {
     auto length = js.buffer()->length();
     event->stream_info()->consumer()(
-        reinterpret_cast<uint8_t*>(js.buffer()->buf()), length);
+        reinterpret_cast<uint8_t*>(js.buffer()->buffer()), length);
   }
 }
 
@@ -1620,8 +1623,9 @@
   data[reservation + 0] = 0;
   data[reservation + 1] = 128;
   data[reservation + 2] = 255;
-  SendEventWithData(echo_stream.id(), "_Echo", reservation, js.buffer()->buf(),
-                    js.buffer()->length(), data, data_size);
+  SendEventWithData(echo_stream.id(), "_Echo", reservation,
+                    js.buffer()->buffer(), js.buffer()->length(), data,
+                    data_size);
 }
 
 static bool TriggerEchoEvent(Thread* thread, JSONStream* js) {
@@ -1694,6 +1698,84 @@
   return ring->GetObjectForId(id, kind);
 }
 
+static ObjectPtr LookupClassMembers(Thread* thread,
+                                    const Class& klass,
+                                    char** parts,
+                                    int num_parts) {
+  auto isolate = thread->isolate();
+  auto zone = thread->zone();
+
+  if (num_parts != 4) {
+    return Object::sentinel().raw();
+  }
+
+  const char* encoded_id = parts[3];
+  auto& id = String::Handle(String::New(encoded_id));
+  id = String::DecodeIRI(id);
+  if (id.IsNull()) {
+    return Object::sentinel().raw();
+  }
+
+  if (strcmp(parts[2], "fields") == 0) {
+    // Field ids look like: "classes/17/fields/name"
+    const auto& field = Field::Handle(klass.LookupField(id));
+    if (field.IsNull()) {
+      return Object::sentinel().raw();
+    }
+    return field.raw();
+  }
+  if (strcmp(parts[2], "functions") == 0) {
+    // Function ids look like: "classes/17/functions/name"
+    const auto& function = Function::Handle(klass.LookupFunction(id));
+    if (function.IsNull()) {
+      return Object::sentinel().raw();
+    }
+    return function.raw();
+  }
+  if (strcmp(parts[2], "implicit_closures") == 0) {
+    // Function ids look like: "classes/17/implicit_closures/11"
+    intptr_t id;
+    if (!GetIntegerId(parts[3], &id)) {
+      return Object::sentinel().raw();
+    }
+    const auto& func =
+        Function::Handle(zone, klass.ImplicitClosureFunctionFromIndex(id));
+    if (func.IsNull()) {
+      return Object::sentinel().raw();
+    }
+    return func.raw();
+  }
+  if (strcmp(parts[2], "dispatchers") == 0) {
+    // Dispatcher Function ids look like: "classes/17/dispatchers/11"
+    intptr_t id;
+    if (!GetIntegerId(parts[3], &id)) {
+      return Object::sentinel().raw();
+    }
+    const auto& func =
+        Function::Handle(zone, klass.InvocationDispatcherFunctionFromIndex(id));
+    if (func.IsNull()) {
+      return Object::sentinel().raw();
+    }
+    return func.raw();
+  }
+  if (strcmp(parts[2], "closures") == 0) {
+    // Closure ids look like: "classes/17/closures/11"
+    intptr_t id;
+    if (!GetIntegerId(parts[3], &id)) {
+      return Object::sentinel().raw();
+    }
+    Function& func = Function::Handle(zone);
+    func = isolate->ClosureFunctionFromIndex(id);
+    if (func.IsNull()) {
+      return Object::sentinel().raw();
+    }
+    return func.raw();
+  }
+
+  UNREACHABLE();
+  return Object::sentinel().raw();
+}
+
 static ObjectPtr LookupHeapObjectLibraries(Isolate* isolate,
                                            char** parts,
                                            int num_parts) {
@@ -1721,9 +1803,30 @@
   if (!lib_found) {
     return Object::sentinel().raw();
   }
+
+  const auto& klass = Class::Handle(lib.toplevel_class());
+  ASSERT(!klass.IsNull());
+
   if (num_parts == 2) {
     return lib.raw();
   }
+  if (strcmp(parts[2], "fields") == 0) {
+    // Library field ids look like: "libraries/17/fields/name"
+    return LookupClassMembers(Thread::Current(), klass, parts, num_parts);
+  }
+  if (strcmp(parts[2], "functions") == 0) {
+    // Library function ids look like: "libraries/17/functions/name"
+    return LookupClassMembers(Thread::Current(), klass, parts, num_parts);
+  }
+  if (strcmp(parts[2], "closures") == 0) {
+    // Library function ids look like: "libraries/17/closures/name"
+    return LookupClassMembers(Thread::Current(), klass, parts, num_parts);
+  }
+  if (strcmp(parts[2], "implicit_closures") == 0) {
+    // Library function ids look like: "libraries/17/implicit_closures/name"
+    return LookupClassMembers(Thread::Current(), klass, parts, num_parts);
+  }
+
   if (strcmp(parts[2], "scripts") == 0) {
     // Script ids look like "libraries/35/scripts/library%2Furl.dart/12345"
     if (num_parts != 5) {
@@ -1780,86 +1883,19 @@
   }
   if (strcmp(parts[2], "closures") == 0) {
     // Closure ids look like: "classes/17/closures/11"
-    if (num_parts != 4) {
-      return Object::sentinel().raw();
-    }
-    intptr_t id;
-    if (!GetIntegerId(parts[3], &id)) {
-      return Object::sentinel().raw();
-    }
-    Function& func = Function::Handle(zone);
-    func = isolate->ClosureFunctionFromIndex(id);
-    if (func.IsNull()) {
-      return Object::sentinel().raw();
-    }
-    return func.raw();
-
+    return LookupClassMembers(thread, cls, parts, num_parts);
   } else if (strcmp(parts[2], "fields") == 0) {
     // Field ids look like: "classes/17/fields/name"
-    if (num_parts != 4) {
-      return Object::sentinel().raw();
-    }
-    const char* encoded_id = parts[3];
-    String& id = String::Handle(zone, String::New(encoded_id));
-    id = String::DecodeIRI(id);
-    if (id.IsNull()) {
-      return Object::sentinel().raw();
-    }
-    Field& field = Field::Handle(zone, cls.LookupField(id));
-    if (field.IsNull()) {
-      return Object::sentinel().raw();
-    }
-    return field.raw();
-
+    return LookupClassMembers(thread, cls, parts, num_parts);
   } else if (strcmp(parts[2], "functions") == 0) {
     // Function ids look like: "classes/17/functions/name"
-    if (num_parts != 4) {
-      return Object::sentinel().raw();
-    }
-    const char* encoded_id = parts[3];
-    String& id = String::Handle(zone, String::New(encoded_id));
-    id = String::DecodeIRI(id);
-    if (id.IsNull()) {
-      return Object::sentinel().raw();
-    }
-    Function& func = Function::Handle(zone, cls.LookupFunction(id));
-    if (func.IsNull()) {
-      return Object::sentinel().raw();
-    }
-    return func.raw();
-
+    return LookupClassMembers(thread, cls, parts, num_parts);
   } else if (strcmp(parts[2], "implicit_closures") == 0) {
     // Function ids look like: "classes/17/implicit_closures/11"
-    if (num_parts != 4) {
-      return Object::sentinel().raw();
-    }
-    intptr_t id;
-    if (!GetIntegerId(parts[3], &id)) {
-      return Object::sentinel().raw();
-    }
-    Function& func = Function::Handle(zone);
-    func = cls.ImplicitClosureFunctionFromIndex(id);
-    if (func.IsNull()) {
-      return Object::sentinel().raw();
-    }
-    return func.raw();
-
+    return LookupClassMembers(thread, cls, parts, num_parts);
   } else if (strcmp(parts[2], "dispatchers") == 0) {
     // Dispatcher Function ids look like: "classes/17/dispatchers/11"
-    if (num_parts != 4) {
-      return Object::sentinel().raw();
-    }
-    intptr_t id;
-    if (!GetIntegerId(parts[3], &id)) {
-      return Object::sentinel().raw();
-    }
-    Function& func = Function::Handle(zone);
-    func = cls.InvocationDispatcherFunctionFromIndex(id);
-    if (func.IsNull()) {
-      return Object::sentinel().raw();
-    }
-    return func.raw();
-
+    return LookupClassMembers(thread, cls, parts, num_parts);
   } else if (strcmp(parts[2], "types") == 0) {
     // Type ids look like: "classes/17/types/11"
     if (num_parts != 4) {
@@ -2704,7 +2740,8 @@
         cls = instance.clazz();
         isStatic = false;
       }
-      if (cls.id() < kInstanceCid || cls.id() == kTypeArgumentsCid) {
+      if (!cls.IsTopLevel() &&
+          (cls.id() < kInstanceCid || cls.id() == kTypeArgumentsCid)) {
         js->PrintError(
             kInvalidParams,
             "Expressions can be evaluated only with regular Dart instances");
@@ -2834,9 +2871,12 @@
     return true;
   }
 
+  const uint8_t* kernel_buffer = Service::dart_library_kernel();
+  const intptr_t kernel_buffer_len = Service::dart_library_kernel_length();
+
   Dart_KernelCompilationResult compilation_result =
       KernelIsolate::CompileExpressionToKernel(
-          js->LookupParam("expression"),
+          kernel_buffer, kernel_buffer_len, js->LookupParam("expression"),
           Array::Handle(Array::MakeFixedLength(params)),
           Array::Handle(Array::MakeFixedLength(type_params)),
           js->LookupParam("libraryUri"), js->LookupParam("klass"), is_static);
@@ -4059,11 +4099,7 @@
   return true;
 }
 
-static const MethodParameter* get_process_memory_usage_params[] = {
-    NULL,
-};
-
-static bool GetProcessMemoryUsage(Thread* thread, JSONStream* js) {
+static intptr_t GetProcessMemoryUsageHelper(JSONStream* js) {
   JSONObject response(js);
   response.AddProperty("type", "ProcessMemoryUsage");
 
@@ -4073,41 +4109,55 @@
   rss.AddProperty64("size", Service::CurrentRSS());
   JSONArray rss_children(&rss, "children");
 
+  JSONObject vm(&rss_children);
+  intptr_t vm_size = 0;
   {
-    JSONObject profiler(&rss_children);
-    profiler.AddProperty("name", "Profiler");
-    profiler.AddProperty("description", "Samples from the Dart VM's profiler");
-    profiler.AddProperty64("size", Profiler::Size());
-    JSONArray(&profiler, "children");
-  }
+    JSONArray vm_children(&vm, "children");
+
+    {
+      JSONObject profiler(&vm_children);
+      profiler.AddProperty("name", "Profiler");
+      profiler.AddProperty("description",
+                           "Samples from the Dart VM's profiler");
+      intptr_t size = Profiler::Size();
+      vm_size += size;
+      profiler.AddProperty64("size", size);
+      JSONArray(&profiler, "children");
+    }
 
   {
-    JSONObject timeline(&rss_children);
+    JSONObject timeline(&vm_children);
     timeline.AddProperty("name", "Timeline");
     timeline.AddProperty(
         "description",
         "Timeline events from dart:developer and Dart_TimelineEvent");
-    timeline.AddProperty64("size", Timeline::recorder()->Size());
+    intptr_t size = Timeline::recorder()->Size();
+    vm_size += size;
+    timeline.AddProperty64("size", size);
     JSONArray(&timeline, "children");
   }
 
   {
-    JSONObject zone(&rss_children);
+    JSONObject zone(&vm_children);
     zone.AddProperty("name", "Zone");
     zone.AddProperty("description", "Arena allocation in the Dart VM");
-    zone.AddProperty64("size", Zone::Size());
+    intptr_t size = Zone::Size();
+    vm_size += size;
+    zone.AddProperty64("size", size);
     JSONArray(&zone, "children");
   }
 
   {
-    JSONObject semi(&rss_children);
+    JSONObject semi(&vm_children);
     semi.AddProperty("name", "SemiSpace Cache");
     semi.AddProperty("description", "Cached heap regions");
-    semi.AddProperty64("size", SemiSpace::CachedSize());
+    intptr_t size = SemiSpace::CachedSize();
+    vm_size += size;
+    semi.AddProperty64("size", size);
     JSONArray(&semi, "children");
   }
 
-  IsolateGroup::ForEach([&rss_children](IsolateGroup* isolate_group) {
+  IsolateGroup::ForEach([&vm_children, &vm_size](IsolateGroup* isolate_group) {
     // Note: new_space()->CapacityInWords() includes memory that hasn't been
     // allocated from the OS yet.
     int64_t capacity = (isolate_group->heap()->new_space()->UsedInWords() +
@@ -4116,10 +4166,11 @@
     int64_t used = isolate_group->heap()->TotalUsedInWords() * kWordSize;
     int64_t free = capacity - used;
 
-    JSONObject group(&rss_children);
+    JSONObject group(&vm_children);
     group.AddPropertyF("name", "IsolateGroup %s",
                        isolate_group->source()->name);
     group.AddProperty("description", "Dart heap capacity");
+    vm_size += capacity;
     group.AddProperty64("size", capacity);
     JSONArray group_children(&group, "children");
 
@@ -4139,7 +4190,21 @@
       JSONArray(&jsfree, "children");
     }
   });
+  }  // vm_children
 
+  vm.AddProperty("name", "Dart VM");
+  vm.AddProperty("description", "");
+  vm.AddProperty64("size", vm_size);
+
+  return vm_size;
+}
+
+static const MethodParameter* get_process_memory_usage_params[] = {
+    NULL,
+};
+
+static bool GetProcessMemoryUsage(Thread* thread, JSONStream* js) {
+  GetProcessMemoryUsageHelper(js);
   return true;
 }
 
@@ -4238,12 +4303,11 @@
     obj.AddPropertyF(
         "peer", "0x%" Px "",
         reinterpret_cast<uintptr_t>(weak_persistent_handle->peer()));
-    obj.AddPropertyF(
-        "callbackAddress", "0x%" Px "",
-        reinterpret_cast<uintptr_t>(weak_persistent_handle->callback()));
+    obj.AddPropertyF("callbackAddress", "0x%" Px "",
+                     weak_persistent_handle->callback_address());
     // Attempt to include a native symbol name.
     char* name = NativeSymbolResolver::LookupSymbolName(
-        reinterpret_cast<uword>(weak_persistent_handle->callback()), nullptr);
+        weak_persistent_handle->callback_address(), nullptr);
     obj.AddProperty("callbackSymbolName", (name == nullptr) ? "" : name);
     if (name != nullptr) {
       NativeSymbolResolver::FreeSymbolName(name);
@@ -4561,6 +4625,11 @@
       }
     });
   }
+  {
+    JSONStream discard_js;
+    intptr_t vm_memory = GetProcessMemoryUsageHelper(&discard_js);
+    jsobj.AddProperty("_currentMemory", vm_memory);
+  }
 }
 
 static bool GetVM(Thread* thread, JSONStream* js) {
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index b7cb009..6488425 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -15,7 +15,7 @@
 namespace dart {
 
 #define SERVICE_PROTOCOL_MAJOR_VERSION 3
-#define SERVICE_PROTOCOL_MINOR_VERSION 36
+#define SERVICE_PROTOCOL_MINOR_VERSION 37
 
 class Array;
 class EmbedderServiceHandler;
diff --git a/runtime/vm/service/service.md b/runtime/vm/service/service.md
index b46ceac..281f21b 100644
--- a/runtime/vm/service/service.md
+++ b/runtime/vm/service/service.md
@@ -1,8 +1,8 @@
-# Dart VM Service Protocol 3.36
+# Dart VM Service Protocol 3.37
 
 > Please post feedback to the [observatory-discuss group][discuss-list]
 
-This document describes of _version 3.36_ of the Dart VM Service Protocol. This
+This document describes of _version 3.37_ of the Dart VM Service Protocol. This
 protocol is used to communicate with a running Dart Virtual Machine.
 
 To use the Service Protocol, start the VM with the *--observe* flag.
@@ -59,6 +59,7 @@
   - [getVMTimeline](#getvmtimeline)
   - [getVMTimelineFlags](#getvmtimelineflags)
   - [getVMTimelineMicros](#getvmtimelinemicros)
+  - [getWebSocketTarget](#getwebsockettarget)
   - [invoke](#invoke)
   - [pause](#pause)
   - [kill](#kill)
@@ -139,6 +140,7 @@
   - [UresolvedSourceLocation](#unresolvedsourcelocation)
   - [Version](#version)
   - [VM](#vm)
+  - [WebSocketTarget](#websockettarget)
 - [Revision History](#revision-history)
 
 ## RPCs, Requests, and Responses
@@ -423,6 +425,8 @@
 the web socket connection request to DDS. If DDS disconnects from the VM service,
 the VM service will once again start accepting incoming web socket connections.
 
+The VM service forwards the web socket connection by issuing a redirect 
+
 ### Protocol Extensions
 
 Middleware like the Dart Development Service have the option of providing
@@ -1140,6 +1144,17 @@
 
 See [Timestamp](#timestamp) and [getVMTimeline](#getvmtimeline).
 
+### getWebSocketTarget
+
+```
+WebSocketTarget getWebSocketTarget()
+```
+
+The _getWebSocketTarget_ RPC returns the web socket URI that should be used by VM service clients
+with WebSocket implementations that do not follow redirects (e.g., `dart:html`'s [WebSocket](https://api.dart.dev/dart-html/WebSocket-class.html)).
+
+See [WebSocketTarget](#websockettarget).
+
 ### pause
 
 ```
@@ -3098,10 +3113,11 @@
 class MemoryUsage extends Response {
   // The amount of non-Dart memory that is retained by Dart objects. For
   // example, memory associated with Dart objects through APIs such as
-  // Dart_NewWeakPersistentHandle and Dart_NewExternalTypedData.  This usage is
-  // only as accurate as the values supplied to these APIs from the VM embedder or
-  // native extensions. This external memory applies GC pressure, but is separate
-  // from heapUsage and heapCapacity.
+  // Dart_NewFinalizableHandle, Dart_NewWeakPersistentHandle and
+  // Dart_NewExternalTypedData.  This usage is only as accurate as the values
+  // supplied to these APIs from the VM embedder or native extensions. This
+  // external memory applies GC pressure, but is separate from heapUsage and
+  // heapCapacity.
   int externalUsage;
 
   // The total capacity of the heap in bytes. This is the amount of memory used
@@ -3849,6 +3865,17 @@
 }
 ```
 
+### WebSocketTarget
+
+```
+class WebSocketTarget extends Response {
+  // The web socket URI that should be used to connect to the service.
+  string uri;
+}
+```
+
+See [getWebSocketTarget](#getwebsockettarget)
+
 ## Revision History
 
 version | comments
@@ -3893,5 +3920,6 @@
 3.34 | Added `TimelineStreamSubscriptionsUpdate` event which is sent when `setVMTimelineFlags` is invoked.
 3.35 | Added `getSupportedProtocols` RPC and `ProtocolList`, `Protocol` objects.
 3.36 | Added `getProcessMemoryUsage` RPC and `ProcessMemoryUsage` and `ProcessMemoryItem` objects.
+3.37 | Added `getWebSocketTarget` RPC and `WebSocketTarget` object.
 
 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index e78bd6a..db0775c 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -168,6 +168,14 @@
   DISALLOW_COPY_AND_ASSIGN(Snapshot);
 };
 
+inline static bool IsSnapshotCompatible(Snapshot::Kind vm_kind,
+                                        Snapshot::Kind isolate_kind) {
+  if (vm_kind == isolate_kind) return true;
+  if (vm_kind == Snapshot::kFull && isolate_kind == Snapshot::kFullJIT)
+    return true;
+  return Snapshot::IsFull(isolate_kind);
+}
+
 class BaseReader {
  public:
   BaseReader(const uint8_t* buffer, intptr_t size) : stream_(buffer, size) {}
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index 5668365..ed50a53 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -1703,7 +1703,7 @@
   static const char* kScriptChars =
       "import 'dart:typed_data';\n"
       "getTypedDataList() {\n"
-      "  var list = List<dynamic>.filled(10, null);\n"
+      "  var list = List<dynamic>.filled(13, null);\n"
       "  var index = 0;\n"
       "  list[index++] = Int8List(256);\n"
       "  list[index++] = Uint8List(256);\n"
@@ -1715,10 +1715,13 @@
       "  list[index++] = Uint64List(256);\n"
       "  list[index++] = Float32List(256);\n"
       "  list[index++] = Float64List(256);\n"
+      "  list[index++] = Int32x4List(256);\n"
+      "  list[index++] = Float32x4List(256);\n"
+      "  list[index++] = Float64x2List(256);\n"
       "  return list;\n"
       "}\n"
       "getTypedDataViewList() {\n"
-      "  var list = List<dynamic>.filled(30, null);\n"
+      "  var list = List<dynamic>.filled(45, null);\n"
       "  var index = 0;\n"
       "  list[index++] = Int8List.view(Int8List(256).buffer);\n"
       "  list[index++] = Uint8List.view(Uint8List(256).buffer);\n"
@@ -1730,6 +1733,9 @@
       "  list[index++] = Uint64List.view(new Uint64List(256).buffer);\n"
       "  list[index++] = Float32List.view(new Float32List(256).buffer);\n"
       "  list[index++] = Float64List.view(new Float64List(256).buffer);\n"
+      "  list[index++] = Int32x4List.view(new Int32x4List(256).buffer);\n"
+      "  list[index++] = Float32x4List.view(new Float32x4List(256).buffer);\n"
+      "  list[index++] = Float64x2List.view(new Float64x2List(256).buffer);\n"
 
       "  list[index++] = Int8List.view(new Int16List(256).buffer);\n"
       "  list[index++] = Uint8List.view(new Uint16List(256).buffer);\n"
@@ -1741,6 +1747,12 @@
       "  list[index++] = Uint8List.view(new Float32List(256).buffer);\n"
       "  list[index++] = Int8List.view(new Float64List(256).buffer);\n"
       "  list[index++] = Uint8List.view(new Float64List(256).buffer);\n"
+      "  list[index++] = Int8List.view(new Int32x4List(256).buffer);\n"
+      "  list[index++] = Uint8List.view(new Int32x4List(256).buffer);\n"
+      "  list[index++] = Int8List.view(new Float32x4List(256).buffer);\n"
+      "  list[index++] = Uint8List.view(new Float32x4List(256).buffer);\n"
+      "  list[index++] = Int8List.view(new Float64x2List(256).buffer);\n"
+      "  list[index++] = Uint8List.view(new Float64x2List(256).buffer);\n"
 
       "  list[index++] = Int16List.view(new Int8List(256).buffer);\n"
       "  list[index++] = Uint16List.view(new Uint8List(256).buffer);\n"
@@ -1752,10 +1764,16 @@
       "  list[index++] = Uint16List.view(new Float32List(256).buffer);\n"
       "  list[index++] = Int16List.view(new Float64List(256).buffer);\n"
       "  list[index++] = Uint16List.view(new Float64List(256).buffer);\n"
+      "  list[index++] = Int16List.view(new Int32x4List(256).buffer);\n"
+      "  list[index++] = Uint16List.view(new Int32x4List(256).buffer);\n"
+      "  list[index++] = Int16List.view(new Float32x4List(256).buffer);\n"
+      "  list[index++] = Uint16List.view(new Float32x4List(256).buffer);\n"
+      "  list[index++] = Int16List.view(new Float64x2List(256).buffer);\n"
+      "  list[index++] = Uint16List.view(new Float64x2List(256).buffer);\n"
       "  return list;\n"
       "}\n"
       "getMultipleTypedDataViewList() {\n"
-      "  var list = List<dynamic>.filled(10, null);\n"
+      "  var list = List<dynamic>.filled(13, null);\n"
       "  var index = 0;\n"
       "  var data = Uint8List(256).buffer;\n"
       "  list[index++] = Int8List.view(data);\n"
@@ -1768,6 +1786,9 @@
       "  list[index++] = Uint64List.view(data);\n"
       "  list[index++] = Float32List.view(data);\n"
       "  list[index++] = Float64List.view(data);\n"
+      "  list[index++] = Int32x4List.view(data);\n"
+      "  list[index++] = Float32x4List.view(data);\n"
+      "  list[index++] = Float64x2List.view(data);\n"
       "  return list;\n"
       "}\n";
 
@@ -1795,12 +1816,13 @@
         Dart_TypedData_Type type;
         int size;
       } expected[] = {
-          {Dart_TypedData_kInt8, 256},     {Dart_TypedData_kUint8, 256},
-          {Dart_TypedData_kInt16, 512},    {Dart_TypedData_kUint16, 512},
-          {Dart_TypedData_kInt32, 1024},   {Dart_TypedData_kUint32, 1024},
-          {Dart_TypedData_kInt64, 2048},   {Dart_TypedData_kUint64, 2048},
-          {Dart_TypedData_kFloat32, 1024}, {Dart_TypedData_kFloat64, 2048},
-          {Dart_TypedData_kInvalid, -1}};
+          {Dart_TypedData_kInt8, 256},       {Dart_TypedData_kUint8, 256},
+          {Dart_TypedData_kInt16, 512},      {Dart_TypedData_kUint16, 512},
+          {Dart_TypedData_kInt32, 1024},     {Dart_TypedData_kUint32, 1024},
+          {Dart_TypedData_kInt64, 2048},     {Dart_TypedData_kUint64, 2048},
+          {Dart_TypedData_kFloat32, 1024},   {Dart_TypedData_kFloat64, 2048},
+          {Dart_TypedData_kInt32x4, 4096},   {Dart_TypedData_kFloat32x4, 4096},
+          {Dart_TypedData_kFloat64x2, 4096}, {Dart_TypedData_kInvalid, -1}};
 
       int i = 0;
       while (expected[i].type != Dart_TypedData_kInvalid) {
@@ -1822,23 +1844,31 @@
         Dart_TypedData_Type type;
         int size;
       } expected[] = {
-          {Dart_TypedData_kInt8, 256},     {Dart_TypedData_kUint8, 256},
-          {Dart_TypedData_kInt16, 512},    {Dart_TypedData_kUint16, 512},
-          {Dart_TypedData_kInt32, 1024},   {Dart_TypedData_kUint32, 1024},
-          {Dart_TypedData_kInt64, 2048},   {Dart_TypedData_kUint64, 2048},
-          {Dart_TypedData_kFloat32, 1024}, {Dart_TypedData_kFloat64, 2048},
+          {Dart_TypedData_kInt8, 256},       {Dart_TypedData_kUint8, 256},
+          {Dart_TypedData_kInt16, 512},      {Dart_TypedData_kUint16, 512},
+          {Dart_TypedData_kInt32, 1024},     {Dart_TypedData_kUint32, 1024},
+          {Dart_TypedData_kInt64, 2048},     {Dart_TypedData_kUint64, 2048},
+          {Dart_TypedData_kFloat32, 1024},   {Dart_TypedData_kFloat64, 2048},
+          {Dart_TypedData_kInt32x4, 4096},   {Dart_TypedData_kFloat32x4, 4096},
+          {Dart_TypedData_kFloat64x2, 4096},
 
-          {Dart_TypedData_kInt8, 512},     {Dart_TypedData_kUint8, 512},
-          {Dart_TypedData_kInt8, 1024},    {Dart_TypedData_kUint8, 1024},
-          {Dart_TypedData_kInt8, 2048},    {Dart_TypedData_kUint8, 2048},
-          {Dart_TypedData_kInt8, 1024},    {Dart_TypedData_kUint8, 1024},
-          {Dart_TypedData_kInt8, 2048},    {Dart_TypedData_kUint8, 2048},
+          {Dart_TypedData_kInt8, 512},       {Dart_TypedData_kUint8, 512},
+          {Dart_TypedData_kInt8, 1024},      {Dart_TypedData_kUint8, 1024},
+          {Dart_TypedData_kInt8, 2048},      {Dart_TypedData_kUint8, 2048},
+          {Dart_TypedData_kInt8, 1024},      {Dart_TypedData_kUint8, 1024},
+          {Dart_TypedData_kInt8, 2048},      {Dart_TypedData_kUint8, 2048},
+          {Dart_TypedData_kInt8, 4096},      {Dart_TypedData_kUint8, 4096},
+          {Dart_TypedData_kInt8, 4096},      {Dart_TypedData_kUint8, 4096},
+          {Dart_TypedData_kInt8, 4096},      {Dart_TypedData_kUint8, 4096},
 
-          {Dart_TypedData_kInt16, 256},    {Dart_TypedData_kUint16, 256},
-          {Dart_TypedData_kInt16, 1024},   {Dart_TypedData_kUint16, 1024},
-          {Dart_TypedData_kInt16, 2048},   {Dart_TypedData_kUint16, 2048},
-          {Dart_TypedData_kInt16, 1024},   {Dart_TypedData_kUint16, 1024},
-          {Dart_TypedData_kInt16, 2048},   {Dart_TypedData_kUint16, 2048},
+          {Dart_TypedData_kInt16, 256},      {Dart_TypedData_kUint16, 256},
+          {Dart_TypedData_kInt16, 1024},     {Dart_TypedData_kUint16, 1024},
+          {Dart_TypedData_kInt16, 2048},     {Dart_TypedData_kUint16, 2048},
+          {Dart_TypedData_kInt16, 1024},     {Dart_TypedData_kUint16, 1024},
+          {Dart_TypedData_kInt16, 2048},     {Dart_TypedData_kUint16, 2048},
+          {Dart_TypedData_kInt16, 4096},     {Dart_TypedData_kUint16, 4096},
+          {Dart_TypedData_kInt16, 4096},     {Dart_TypedData_kUint16, 4096},
+          {Dart_TypedData_kInt16, 4096},     {Dart_TypedData_kUint16, 4096},
 
           {Dart_TypedData_kInvalid, -1}};
 
@@ -1862,12 +1892,13 @@
         Dart_TypedData_Type type;
         int size;
       } expected[] = {
-          {Dart_TypedData_kInt8, 256},    {Dart_TypedData_kUint8, 256},
-          {Dart_TypedData_kInt16, 256},   {Dart_TypedData_kUint16, 256},
-          {Dart_TypedData_kInt32, 256},   {Dart_TypedData_kUint32, 256},
-          {Dart_TypedData_kInt64, 256},   {Dart_TypedData_kUint64, 256},
-          {Dart_TypedData_kFloat32, 256}, {Dart_TypedData_kFloat64, 256},
-          {Dart_TypedData_kInvalid, -1}};
+          {Dart_TypedData_kInt8, 256},      {Dart_TypedData_kUint8, 256},
+          {Dart_TypedData_kInt16, 256},     {Dart_TypedData_kUint16, 256},
+          {Dart_TypedData_kInt32, 256},     {Dart_TypedData_kUint32, 256},
+          {Dart_TypedData_kInt64, 256},     {Dart_TypedData_kUint64, 256},
+          {Dart_TypedData_kFloat32, 256},   {Dart_TypedData_kFloat64, 256},
+          {Dart_TypedData_kInt32x4, 256},   {Dart_TypedData_kFloat32x4, 256},
+          {Dart_TypedData_kFloat64x2, 256}, {Dart_TypedData_kInvalid, -1}};
 
       int i = 0;
       while (expected[i].type != Dart_TypedData_kInvalid) {
diff --git a/runtime/vm/stack_trace.cc b/runtime/vm/stack_trace.cc
index a9df9e1..468edfc 100644
--- a/runtime/vm/stack_trace.cc
+++ b/runtime/vm/stack_trace.cc
@@ -104,6 +104,7 @@
   explicit CallerClosureFinder(Zone* zone)
       : receiver_context_(Context::Handle(zone)),
         receiver_function_(Function::Handle(zone)),
+        parent_function_(Function::Handle(zone)),
         context_entry_(Object::Handle(zone)),
         is_sync(Object::Handle(zone)),
         future_(Object::Handle(zone)),
@@ -285,6 +286,20 @@
       return FindCallerInAsyncClosure(receiver_context_);
     } else if (receiver_function_.IsAsyncGenClosure()) {
       return FindCallerInAsyncGenClosure(receiver_context_);
+    } else if (receiver_function_.IsLocalFunction()) {
+      parent_function_ = receiver_function_.parent_function();
+      if (parent_function_.recognized_kind() ==
+          MethodRecognizer::kFutureTimeout) {
+        context_entry_ =
+            receiver_context_.At(Context::kFutureTimeoutFutureIndex);
+        return GetCallerInFutureImpl(context_entry_);
+      } else if (parent_function_.recognized_kind() ==
+                 MethodRecognizer::kFutureWait) {
+        receiver_context_ = receiver_context_.parent();
+        ASSERT(!receiver_context_.IsNull());
+        context_entry_ = receiver_context_.At(Context::kFutureWaitFutureIndex);
+        return GetCallerInFutureImpl(context_entry_);
+      }
     }
 
     return Closure::null();
@@ -318,6 +333,7 @@
  private:
   Context& receiver_context_;
   Function& receiver_function_;
+  Function& parent_function_;
 
   Object& context_entry_;
   Object& is_sync;
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index 58bba60..1c9ff6c6 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -160,7 +160,8 @@
   Thread* thread = Thread::Current();
   auto object_store = thread->isolate()->object_store();
   Zone* zone = thread->zone();
-  const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread));
+  const Error& error =
+      Error::Handle(zone, cls.EnsureIsAllocateFinalized(thread));
   ASSERT(error.IsNull());
   if (cls.id() == kArrayCid) {
     return object_store->allocate_array_stub();
@@ -220,7 +221,7 @@
       }
     };
     auto bg_compiler_fun = [&]() {
-      ForceGrowthSafepointOperationScope safepoint_scope(thread);
+      ASSERT(Thread::Current()->IsAtSafepoint());
       stub = cls.allocation_stub();
       // Check if stub was already generated.
       if (!stub.IsNull()) {
diff --git a/runtime/vm/stub_code_list.h b/runtime/vm/stub_code_list.h
index 8343572..f759ea8 100644
--- a/runtime/vm/stub_code_list.h
+++ b/runtime/vm/stub_code_list.h
@@ -76,6 +76,7 @@
   V(CallClosureNoSuchMethod)                                                   \
   V(FrameAwaitingMaterialization)                                              \
   V(AsynchronousGapMarker)                                                     \
+  V(NotLoaded)                                                                 \
   V(DispatchTableNullError)                                                    \
   V(NullErrorSharedWithFPURegs)                                                \
   V(NullErrorSharedWithoutFPURegs)                                             \
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 7e38f9e..529f4fa 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -269,6 +269,7 @@
   V(Struct, "Struct")                                                          \
   V(StructFromPointer, "#fromPointer")                                         \
   V(SubtypeTestCache, "SubtypeTestCache")                                      \
+  V(LoadingUnit, "LoadingUnit")                                                \
   V(SwitchExpr, ":switch_expr")                                                \
   V(Symbol, "Symbol")                                                          \
   V(SymbolCtor, "Symbol.")                                                     \
@@ -362,6 +363,7 @@
   V(_GrowableList, "_GrowableList")                                            \
   V(_GrowableListFactory, "_GrowableList.")                                    \
   V(_GrowableListFilledFactory, "_GrowableList.filled")                        \
+  V(_GrowableListGenerateFactory, "_GrowableList.generate")                    \
   V(_GrowableListWithData, "_GrowableList._withData")                          \
   V(_ImmutableList, "_ImmutableList")                                          \
   V(_Int16ArrayFactory, "Int16List.")                                          \
@@ -390,6 +392,7 @@
   V(_List, "_List")                                                            \
   V(_ListFactory, "_List.")                                                    \
   V(_ListFilledFactory, "_List.filled")                                        \
+  V(_ListGenerateFactory, "_List.generate")                                    \
   V(_MethodMirror, "_MethodMirror")                                            \
   V(_Mint, "_Mint")                                                            \
   V(_MirrorReference, "_MirrorReference")                                      \
@@ -490,6 +493,7 @@
   V(start_index_param, ":start_index_param")                                   \
   V(string_param, ":string_param")                                             \
   V(string_param_length, ":string_param_length")                               \
+  V(timeout, "timeout")                                                        \
   V(toString, "toString")                                                      \
   V(vm_prefer_inline, "vm:prefer-inline")                                      \
   V(vm_entry_point, "vm:entry-point")                                          \
diff --git a/runtime/vm/tagged_pointer.h b/runtime/vm/tagged_pointer.h
index 9b92514..b81e29d 100644
--- a/runtime/vm/tagged_pointer.h
+++ b/runtime/vm/tagged_pointer.h
@@ -263,6 +263,7 @@
 DEFINE_TAGGED_POINTER(ICData, CallSiteData)
 DEFINE_TAGGED_POINTER(MegamorphicCache, CallSiteData)
 DEFINE_TAGGED_POINTER(SubtypeTestCache, Object)
+DEFINE_TAGGED_POINTER(LoadingUnit, Object)
 DEFINE_TAGGED_POINTER(Error, Object)
 DEFINE_TAGGED_POINTER(ApiError, Error)
 DEFINE_TAGGED_POINTER(LanguageError, Error)
diff --git a/runtime/vm/timeline_android.cc b/runtime/vm/timeline_android.cc
index 0a97b1d..046d0a2 100644
--- a/runtime/vm/timeline_android.cc
+++ b/runtime/vm/timeline_android.cc
@@ -10,6 +10,7 @@
 #include <cstdlib>
 
 #include "platform/atomic.h"
+#include "platform/signal_blocker.h"
 #include "vm/isolate.h"
 #include "vm/json_stream.h"
 #include "vm/lockers.h"
@@ -23,16 +24,25 @@
 
 DECLARE_FLAG(bool, trace_timeline);
 
-TimelineEventSystraceRecorder::TimelineEventSystraceRecorder()
-    : TimelineEventPlatformRecorder(), systrace_fd_(-1) {
-  const char* kSystracePath = "/sys/kernel/debug/tracing/trace_marker";
-  systrace_fd_ = open(kSystracePath, O_WRONLY);
-  if ((systrace_fd_ < 0) && FLAG_trace_timeline) {
-    OS::PrintErr("TimelineEventSystraceRecorder: Could not open `%s`\n",
-                 kSystracePath);
+static int OpenTraceFD() {
+  const char* kSystraceDebugPath = "/sys/kernel/debug/tracing/trace_marker";
+  const char* kSystracePath = "/sys/kernel/tracing/trace_marker";
+
+  int fd = TEMP_FAILURE_RETRY(::open(kSystracePath, O_WRONLY));
+  if (fd < 0) {
+    fd = TEMP_FAILURE_RETRY(::open(kSystraceDebugPath, O_WRONLY));
   }
+
+  if (fd < 0 && FLAG_trace_timeline) {
+    OS::PrintErr("TimelineEventSystraceRecorder: Could not open `%s` or `%s`\n",
+                 kSystraceDebugPath, kSystracePath);
+  }
+  return fd;
 }
 
+TimelineEventSystraceRecorder::TimelineEventSystraceRecorder()
+    : TimelineEventPlatformRecorder(), systrace_fd_(OpenTraceFD()) {}
+
 TimelineEventSystraceRecorder::~TimelineEventSystraceRecorder() {
   if (systrace_fd_ >= 0) {
     close(systrace_fd_);
diff --git a/runtime/vm/timeline_linux.cc b/runtime/vm/timeline_linux.cc
index dc45ffb..3756f16 100644
--- a/runtime/vm/timeline_linux.cc
+++ b/runtime/vm/timeline_linux.cc
@@ -75,6 +75,16 @@
       }
       break;
     }
+    case TimelineEvent::kAsyncBegin: {
+      length = Utils::SNPrint(buffer, buffer_size, "S|%" Pd64 "|%s|%" Pd64 "",
+                              pid, event->label(), event->AsyncId());
+      break;
+    }
+    case TimelineEvent::kAsyncEnd: {
+      length = Utils::SNPrint(buffer, buffer_size, "F|%" Pd64 "|%s|%" Pd64 "",
+                              pid, event->label(), event->AsyncId());
+      break;
+    }
     default:
       // Ignore event types that we cannot serialize to the Systrace format.
       break;
diff --git a/runtime/vm/type_testing_stubs.cc b/runtime/vm/type_testing_stubs.cc
index b07969d..fe40775 100644
--- a/runtime/vm/type_testing_stubs.cc
+++ b/runtime/vm/type_testing_stubs.cc
@@ -226,8 +226,8 @@
   //   a) We allocate an instructions object, which might cause us to
   //      temporarily flip page protections from (RX -> RW -> RX).
   //
-  thread->isolate_group()->RunWithStoppedMutators(
-      install_code_fun, install_code_fun, /*use_force_growth=*/true);
+  thread->isolate_group()->RunWithStoppedMutators(install_code_fun,
+                                                  /*use_force_growth=*/true);
 
   Code::NotifyCodeObservers(name, code, /*optimized=*/false);
 
@@ -270,6 +270,14 @@
     __ Ret();
     __ Bind(&continue_checking);
 
+  } else if (type.IsObjectType()) {
+    ASSERT(type.IsNonNullable() && Isolate::Current()->null_safety());
+    compiler::Label continue_checking;
+    __ CompareObject(TypeTestABI::kInstanceReg, Object::null_object());
+    __ BranchIf(EQUAL, &continue_checking);
+    __ Ret();
+    __ Bind(&continue_checking);
+
   } else {
     // TODO(kustermann): Make more fast cases, e.g. Type::Number()
     // is implemented by Smi.
@@ -477,7 +485,6 @@
     // ("Right Legacy", "Right Nullable" rules).
     if (Isolate::Current()->null_safety() && !type_arg.IsNullable() &&
         !type_arg.IsLegacy()) {
-      compiler::Label skip_nullable_check;
       // Nullable type is not a subtype of non-nullable type.
       // TODO(dartbug.com/40736): Allocate a register for instance type argument
       // and avoid reloading it.
@@ -489,10 +496,6 @@
       __ CompareTypeNullabilityWith(TTSInternalRegs::kScratchReg,
                                     compiler::target::Nullability::kNullable);
       __ BranchIf(EQUAL, check_failed);
-
-      if (type_arg.IsTypeParameter()) {
-        __ Bind(&skip_nullable_check);
-      }
     }
   }
 
diff --git a/runtime/vm/type_testing_stubs_test.cc b/runtime/vm/type_testing_stubs_test.cc
index 1094bb4..f6afdad 100644
--- a/runtime/vm/type_testing_stubs_test.cc
+++ b/runtime/vm/type_testing_stubs_test.cc
@@ -410,6 +410,17 @@
              ExpectLazilyFailedViaSTC, ExpectFailedViaSTC);
   RunTTSTest(obj_b2, type_dynamic_t, tav_object, tav_null,
              ExpectLazilyHandledViaSTC, ExpectHandledViaSTC);
+
+  // obj as Object (with null safety)
+  Isolate* isolate = Isolate::Current();
+  if (isolate->null_safety()) {
+    auto& type_non_nullable_object =
+        Type::Handle(isolate->object_store()->non_nullable_object_type());
+    RunTTSTest(obj_a, type_non_nullable_object, tav_null, tav_null,
+               ExpectLazilyHandledViaTTS, ExpectHandledViaTTS);
+    RunTTSTest(Object::null_object(), type_non_nullable_object, tav_null,
+               tav_null, ExpectLazilyFailedViaTTS, ExpectFailedViaTTS);
+  }
 }
 
 ISOLATE_UNIT_TEST_CASE(TTS_GenericSubtypeRangeCheck) {
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index bcc7d99..b6cb15e 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -115,6 +115,7 @@
   char* err;
   Dart_IsolateFlags api_flags;
   Isolate::FlagsInitialize(&api_flags);
+  api_flags.null_safety = (FLAG_sound_null_safety == kNullSafetyOptionStrong);
   Dart_Isolate isolate = NULL;
   if (len == 0) {
     isolate = Dart_CreateIsolateGroup(
@@ -630,6 +631,7 @@
   } else {
     Dart_KernelCompilationResult compilation_result =
         KernelIsolate::CompileExpressionToKernel(
+            /* platform_kernel= */ nullptr, /* platform_kernel_size= */ 0,
             expr.ToCString(), param_names, Array::empty_array(),
             String::Handle(lib.url()).ToCString(), /* klass=*/nullptr,
             /* is_static= */ true);
diff --git a/runtime/vm/version.h b/runtime/vm/version.h
index a3769f6..cab6c26 100644
--- a/runtime/vm/version.h
+++ b/runtime/vm/version.h
@@ -14,8 +14,6 @@
   static const char* String();
   static const char* SnapshotString();
   static const char* CommitString();
-  static int CurrentAbiVersion();
-  static int OldestSupportedAbiVersion();
   static const char* SdkHash();
 
  private:
diff --git a/runtime/vm/version_in.cc b/runtime/vm/version_in.cc
index f63fe3f..2fcf5c5 100644
--- a/runtime/vm/version_in.cc
+++ b/runtime/vm/version_in.cc
@@ -5,7 +5,6 @@
 #include "vm/version.h"
 
 #include "vm/cpu.h"
-#include "vm/flags.h"
 #include "vm/os.h"
 
 namespace dart {
@@ -30,14 +29,6 @@
   return commit_;
 }
 
-int Version::CurrentAbiVersion() {
-  return {{ABI_VERSION}};
-}
-
-int Version::OldestSupportedAbiVersion() {
-  return {{OLDEST_SUPPORTED_ABI_VERSION}};
-}
-
 const char* Version::SdkHash() {
   return git_short_hash_;
 }
diff --git a/runtime/vm/zone_text_buffer.cc b/runtime/vm/zone_text_buffer.cc
index 446f952..f265937 100644
--- a/runtime/vm/zone_text_buffer.cc
+++ b/runtime/vm/zone_text_buffer.cc
@@ -14,51 +14,13 @@
 namespace dart {
 
 ZoneTextBuffer::ZoneTextBuffer(Zone* zone, intptr_t initial_capacity)
-    : zone_(zone), buffer_(NULL), length_(0), capacity_(0) {
+    : zone_(zone) {
   ASSERT(initial_capacity > 0);
   buffer_ = reinterpret_cast<char*>(zone->Alloc<char>(initial_capacity));
   capacity_ = initial_capacity;
   buffer_[length_] = '\0';
 }
 
-intptr_t ZoneTextBuffer::Printf(const char* format, ...) {
-  va_list args;
-  va_start(args, format);
-  intptr_t remaining = capacity_ - length_;
-  ASSERT(remaining >= 0);
-  intptr_t len = Utils::VSNPrint(buffer_ + length_, remaining, format, args);
-  va_end(args);
-  if (len >= remaining) {
-    EnsureCapacity(len);
-    remaining = capacity_ - length_;
-    ASSERT(remaining > len);
-    va_list args2;
-    va_start(args2, format);
-    intptr_t len2 =
-        Utils::VSNPrint(buffer_ + length_, remaining, format, args2);
-    va_end(args2);
-    ASSERT(len == len2);
-  }
-  length_ += len;
-  buffer_[length_] = '\0';
-  return len;
-}
-
-void ZoneTextBuffer::AddChar(char ch) {
-  EnsureCapacity(sizeof(ch));
-  buffer_[length_] = ch;
-  length_++;
-  buffer_[length_] = '\0';
-}
-
-void ZoneTextBuffer::AddString(const char* s) {
-  Printf("%s", s);
-}
-
-void ZoneTextBuffer::AddString(const String& s) {
-  Printf("%s", s.ToCString());
-}
-
 void ZoneTextBuffer::Clear() {
   const intptr_t initial_capacity = 64;
   buffer_ = reinterpret_cast<char*>(zone_->Alloc<char>(initial_capacity));
@@ -67,13 +29,14 @@
   buffer_[length_] = '\0';
 }
 
-void ZoneTextBuffer::EnsureCapacity(intptr_t len) {
+bool ZoneTextBuffer::EnsureCapacity(intptr_t len) {
   intptr_t remaining = capacity_ - length_;
   if (remaining <= len) {
     intptr_t new_capacity = capacity_ + Utils::Maximum(capacity_, len);
     buffer_ = zone_->Realloc<char>(buffer_, capacity_, new_capacity);
     capacity_ = new_capacity;
   }
+  return true;
 }
 
 }  // namespace dart
diff --git a/runtime/vm/zone_text_buffer.h b/runtime/vm/zone_text_buffer.h
index 1b7fef3..21e6739 100644
--- a/runtime/vm/zone_text_buffer.h
+++ b/runtime/vm/zone_text_buffer.h
@@ -5,6 +5,7 @@
 #ifndef RUNTIME_VM_ZONE_TEXT_BUFFER_H_
 #define RUNTIME_VM_ZONE_TEXT_BUFFER_H_
 
+#include "platform/text_buffer.h"
 #include "vm/allocation.h"
 #include "vm/globals.h"
 
@@ -13,29 +14,22 @@
 class String;
 class Zone;
 
-// TextBuffer maintains a dynamic character buffer with a printf-style way to
-// append text.
-class ZoneTextBuffer : ValueObject {
+// ZoneTextBuffer allocates the character buffer in the given zone. Thus,
+// pointers returned by buffer() have the same lifetime as the zone.
+class ZoneTextBuffer : public BaseTextBuffer {
  public:
   explicit ZoneTextBuffer(Zone* zone, intptr_t initial_capacity = 64);
   ~ZoneTextBuffer() {}
 
-  intptr_t Printf(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
-  void AddChar(char ch);
-  void AddString(const char* s);
-  void AddString(const String& s);
-
-  char* buffer() { return buffer_; }
-  intptr_t length() const { return length_; }
-
+  // Allocates a new internal buffer. Thus, the contents of buffers returned by
+  // previous calls to buffer() are no longer affected by this object.
   void Clear();
 
  private:
-  void EnsureCapacity(intptr_t len);
+  bool EnsureCapacity(intptr_t len);
   Zone* zone_;
-  char* buffer_;
-  intptr_t length_;
-  intptr_t capacity_;
+
+  DISALLOW_COPY_AND_ASSIGN(ZoneTextBuffer);
 };
 
 }  // namespace dart
diff --git a/samples-dev/swarm/swarm_ui_lib/base/Size.dart b/samples-dev/swarm/swarm_ui_lib/base/Size.dart
index 920b4a3..08fc365 100644
--- a/samples-dev/swarm/swarm_ui_lib/base/Size.dart
+++ b/samples-dev/swarm/swarm_ui_lib/base/Size.dart
@@ -13,7 +13,7 @@
 
   Size(num this.width, num this.height) {}
 
-  bool operator ==(Size other) {
+  bool operator ==(covariant Size other) {
     return other != null && width == other.width && height == other.height;
   }
 
diff --git a/samples-dev/swarm/swarm_ui_lib/touch/Geometry.dart b/samples-dev/swarm/swarm_ui_lib/touch/Geometry.dart
index 6f033c5..2686432 100644
--- a/samples-dev/swarm/swarm_ui_lib/touch/Geometry.dart
+++ b/samples-dev/swarm/swarm_ui_lib/touch/Geometry.dart
@@ -36,7 +36,7 @@
     return Math.sqrt(dx * dx + dy * dy);
   }
 
-  bool operator ==(Coordinate other) {
+  bool operator ==(covariant Coordinate other) {
     return other != null && x == other.x && y == other.y;
   }
 
@@ -73,7 +73,7 @@
     return end - start;
   }
 
-  bool operator ==(Interval other) {
+  bool operator ==(covariant Interval other) {
     return other != null && other.start == start && other.end == end;
   }
 
diff --git a/samples/ffi/async/sample_async_callback.dart b/samples/ffi/async/sample_async_callback.dart
index 432a2eb..06cbef3 100644
--- a/samples/ffi/async/sample_async_callback.dart
+++ b/samples/ffi/async/sample_async_callback.dart
@@ -27,7 +27,7 @@
   print("C    = C T1 or C T2.");
   print("Dart: Setup.");
   Expect.isTrue(NativeApi.majorVersion == 1);
-  Expect.isTrue(NativeApi.minorVersion >= 0);
+  Expect.isTrue(NativeApi.minorVersion >= 1);
   final initializeApi = dl.lookupFunction<IntPtr Function(Pointer<Void>),
       int Function(Pointer<Void>)>("InitDartApiDL");
   Expect.isTrue(initializeApi(NativeApi.initializeApiDLData) == 0);
diff --git a/samples/ffi/async/sample_native_port_call.dart b/samples/ffi/async/sample_native_port_call.dart
index aa4b48e..43891e2 100644
--- a/samples/ffi/async/sample_native_port_call.dart
+++ b/samples/ffi/async/sample_native_port_call.dart
@@ -36,7 +36,7 @@
   print("C    = C T1 or C T2.");
   print("Dart: Setup.");
   Expect.isTrue(NativeApi.majorVersion == 1);
-  Expect.isTrue(NativeApi.minorVersion >= 0);
+  Expect.isTrue(NativeApi.minorVersion >= 1);
   final initializeApi = dl.lookupFunction<IntPtr Function(Pointer<Void>),
       int Function(Pointer<Void>)>("InitDartApiDL");
   Expect.isTrue(initializeApi(NativeApi.initializeApiDLData) == 0);
diff --git a/samples/ffi/sample_ffi_functions_callbacks_closures.dart b/samples/ffi/sample_ffi_functions_callbacks_closures.dart
index ba876da..e5bb157 100644
--- a/samples/ffi/sample_ffi_functions_callbacks_closures.dart
+++ b/samples/ffi/sample_ffi_functions_callbacks_closures.dart
@@ -54,7 +54,7 @@
 
 void doDynamicLinking() {
   Expect.isTrue(NativeApi.majorVersion == 1);
-  Expect.isTrue(NativeApi.minorVersion >= 0);
+  Expect.isTrue(NativeApi.minorVersion >= 1);
   final initializeApi = testLibrary.lookupFunction<
       IntPtr Function(Pointer<Void>),
       int Function(Pointer<Void>)>("InitDartApiDL");
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index bd50f42..4e327d9 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -47,6 +47,7 @@
 # ........analysis_server.dart.snapshot
 # ........dart2js.dart.snapshot
 # ........dartanalyzer.dart.snapshot
+# ........dds.dart.snapshot
 # ........dartdev.dart.snapshot
 # ........dartdoc.dart.snapshot
 # ........dartfmt.dart.snapshot
@@ -123,7 +124,7 @@
   ],
   [
     "dartdev",
-    "../utils/dartdev:generate_dartdev_snapshot",
+    "../utils/dartdev:dartdev",
   ],
   [
     "dartdoc",
@@ -134,6 +135,10 @@
     "../utils/dartfmt",
   ],
   [
+    "dds",
+    "../utils/dds:dds",
+  ],
+  [
     "pub",
     "../utils/pub",
   ],
@@ -168,7 +173,7 @@
   ],
   [
     "dartdev",
-    "../utils/dartdev:generate_dartdev_snapshot",
+    "../utils/dartdev:dartdev",
   ],
   [
     "dartdevc",
@@ -183,6 +188,10 @@
     "../utils/dartfmt",
   ],
   [
+    "dds",
+    "../utils/dds:dds",
+  ],
+  [
     "kernel_worker",
     "../utils/bazel:kernel_worker",
   ],
@@ -607,12 +616,6 @@
   outputs = [ "$root_out_dir/dart-sdk/lib/_internal/{{source_file_part}}" ]
 }
 
-copy("copy_abi_dill_files") {
-  visibility = [ ":create_sdk_with_abi_versions" ]
-  sources = [ "../tools/abiversions" ]
-  outputs = [ "$root_out_dir/dart-sdk/lib/_internal/abiversions" ]
-}
-
 copy("copy_dart2js_dill_files") {
   visibility = [ ":create_full_sdk" ]
   deps = [
@@ -631,27 +634,32 @@
   outputs = [ "$root_out_dir/dart-sdk/lib/_internal/{{source_file_part}}" ]
 }
 
-# Copies DDC's SDK outline .dill to lib/_internal
-copy("copy_dev_compiler_outline") {
+# Copies DDC's SDK weak outline .dill to lib/_internal
+# TODO(nshahan) Fix the outline to be consistent and merge with below as a
+# breaking change.
+copy("copy_dev_compiler_weak_outline") {
   visibility = [ ":copy_dev_compiler_sdk" ]
   deps = [
     ":copy_libraries",
     "../utils/dartdevc:dartdevc_platform",
   ]
   sources = [ "$root_out_dir/ddc_outline.dill" ]
-
-  # TODO(nshahan) Fix the name here to be consistent and merge with below.
   outputs = [ "$root_out_dir/dart-sdk/lib/_internal/ddc_sdk.dill" ]
 }
 
-# Copies DDC's SDK outline .dill with sound null safety to lib/_internal
-copy("copy_dev_compiler_outline_sound") {
-  visibility = [ "../utils/dartdevc:dartdevc_test" ]
+# Copies DDC's SDK full and outline .dill files to lib/_internal.
+copy("copy_dev_compiler_dills") {
+  visibility = [ ":copy_dev_compiler_sdk" ]
   deps = [
     ":copy_libraries",
+    "../utils/dartdevc:dartdevc_platform",
     "../utils/dartdevc:dartdevc_platform_sound",
   ]
-  sources = [ "$root_out_dir/ddc_outline_sound.dill" ]
+  sources = [
+    "$root_out_dir/ddc_outline_sound.dill",
+    "$root_out_dir/ddc_platform.dill",
+    "$root_out_dir/ddc_platform_sound.dill",
+  ]
   outputs = [ "$root_out_dir/dart-sdk/lib/_internal/{{source_file_part}}" ]
 }
 
@@ -731,9 +739,10 @@
 group("copy_dev_compiler_sdk") {
   visibility = [ ":create_full_sdk" ]
   public_deps = [
+    ":copy_dev_compiler_dills",
     ":copy_dev_compiler_js",
-    ":copy_dev_compiler_outline",
     ":copy_dev_compiler_tools",
+    ":copy_dev_compiler_weak_outline",
   ]
 }
 
@@ -793,7 +802,10 @@
 
 # This rule writes the version file.
 action("write_version_file") {
-  visibility = [ ":create_common_sdk" ]
+  visibility = [
+    ":create_common_sdk",
+    "../utils/dartanalyzer:generate_summary_strong",
+  ]
   inputs = [
     "../tools/VERSION",
     "$default_git_folder/logs/HEAD",
@@ -950,11 +962,3 @@
     public_deps += [ ":create_full_sdk" ]
   }
 }
-
-# Same as create_sdk, but with abi version files.
-group("create_sdk_with_abi_versions") {
-  public_deps = [
-    ":copy_abi_dill_files",
-    ":create_sdk",
-  ]
-}
diff --git a/sdk/lib/_http/embedder_config.dart b/sdk/lib/_http/embedder_config.dart
index 730bc2dd..8a12201 100644
--- a/sdk/lib/_http/embedder_config.dart
+++ b/sdk/lib/_http/embedder_config.dart
@@ -7,5 +7,9 @@
 /// Embedder-specific `dart:_http` configuration.
 
 /// [HttpClient] will disallow HTTP URLs if this value is set to `false`.
+///
+/// TODO(https://github.com/dart-lang/sdk/issues/41796): This setting will be
+/// removed in favor of explicit domain settings.
+@deprecated
 @pragma("vm:entry-point")
 bool _embedderAllowsHttp = true;
diff --git a/sdk/lib/_http/http_headers.dart b/sdk/lib/_http/http_headers.dart
index a2edfbd..73ed901 100644
--- a/sdk/lib/_http/http_headers.dart
+++ b/sdk/lib/_http/http_headers.dart
@@ -646,8 +646,7 @@
   }
 
   String _originalHeaderName(String name) {
-    // TODO: Update syntax to_originalHeaderNames?[name].
-    return _originalHeaderNames?.[name] ?? name;
+    return _originalHeaderNames?[name] ?? name;
   }
 }
 
diff --git a/sdk/lib/_http/http_impl.dart b/sdk/lib/_http/http_impl.dart
index 162461c..bc43046 100644
--- a/sdk/lib/_http/http_impl.dart
+++ b/sdk/lib/_http/http_impl.dart
@@ -1091,7 +1091,7 @@
     }
 
     _responseCompleter.future.then((response) {
-      _timeline?.instant('Response receieved');
+      _timeline?.instant('Response received');
       Map formatConnectionInfo() => {
             'localPort': response.connectionInfo?.localPort,
             'remoteAddress': response.connectionInfo?.remoteAddress.address,
@@ -2271,32 +2271,6 @@
     });
   }
 
-  /// Whether HTTP requests are currently allowed.
-  ///
-  /// If the [Zone] variable `#dart.library.io.allow_http` is set to a boolean,
-  /// it determines whether the HTTP protocol is allowed. If the zone variable
-  /// is set to any other non-null value, HTTP is not allowed.
-  /// Otherwise, if the `dart.library.io.allow_http` environment flag
-  /// is set to `false`, HTTP is not allowed.
-  /// Otherwise, [_embedderAllowsHttp] determines the result.
-  bool get _isHttpAllowed {
-    final zoneOverride = Zone.current[#dart.library.io.allow_http];
-    if (zoneOverride != null) return true == zoneOverride;
-    bool envOverride =
-        bool.fromEnvironment("dart.library.io.allow_http", defaultValue: true);
-    return envOverride && _embedderAllowsHttp;
-  }
-
-  bool _isLoopback(String host) {
-    if (host.isEmpty) return false;
-    if ("localhost" == host) return true;
-    try {
-      return InternetAddress(host).isLoopback;
-    } on ArgumentError {
-      return false;
-    }
-  }
-
   Future<_HttpClientRequest> _openUrl(String method, Uri uri) {
     if (_closing) {
       throw new StateError("Client is closed");
@@ -2318,11 +2292,6 @@
     }
 
     bool isSecure = uri.isScheme("https");
-    if (!_isHttpAllowed && !isSecure && !_isLoopback(uri.host)) {
-      throw new StateError(
-          "Insecure HTTP is not allowed by the current platform: $uri");
-    }
-
     int port = uri.port;
     if (port == 0) {
       port =
diff --git a/sdk/lib/_http/http_parser.dart b/sdk/lib/_http/http_parser.dart
index 9459789..cb13b24 100644
--- a/sdk/lib/_http/http_parser.dart
+++ b/sdk/lib/_http/http_parser.dart
@@ -978,7 +978,6 @@
 
   static bool _isValueChar(int byte) {
     return (byte > 31 && byte < 128) ||
-        (byte == _CharCode.SP) ||
         (byte == _CharCode.HT);
   }
 
diff --git a/sdk/lib/_internal/allowed_experiments.json b/sdk/lib/_internal/allowed_experiments.json
index bd6900f..235e683 100644
--- a/sdk/lib/_internal/allowed_experiments.json
+++ b/sdk/lib/_internal/allowed_experiments.json
@@ -34,12 +34,24 @@
     "collection": {
       "experimentSet": "nullSafety"
     },
+    "convert": {
+      "experimentSet": "nullSafety"
+    },
+    "crypto": {
+      "experimentSet": "nullSafety"
+    },
+    "csslib": {
+      "experimentSet": "nullSafety"
+    },
     "dart_internal": {
       "experimentSet": "nullSafety"
     },
     "fake_async": {
       "experimentSet": "nullSafety"
     },
+    "file": {
+      "experimentSet": "nullSafety"
+    },
     "fixnum": {
       "experimentSet": "nullSafety"
     },
@@ -49,6 +61,12 @@
     "flutter_test": {
       "experimentSet": "nullSafety"
     },
+    "flutter_goldens": {
+      "experimentSet": "nullSafety"
+    },
+    "flutter_goldens_client": {
+      "experimentSet": "nullSafety"
+    },
     "js": {
       "experimentSet": "nullSafety"
     },
@@ -64,9 +82,15 @@
     "pedantic": {
       "experimentSet": "nullSafety"
     },
+    "platform": {
+      "experimentSet": "nullSafety"
+    },
     "pool": {
       "experimentSet": "nullSafety"
     },
+    "process": {
+      "experimentSet": "nullSafety"
+    },
     "sky_engine": {
       "experimentSet": "nullSafety"
     },
diff --git a/sdk/lib/_internal/js_dev_runtime/patch/internal_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/internal_patch.dart
index 2e605a2..66c6bb1 100644
--- a/sdk/lib/_internal/js_dev_runtime/patch/internal_patch.dart
+++ b/sdk/lib/_internal/js_dev_runtime/patch/internal_patch.dart
@@ -11,7 +11,8 @@
 import 'dart:_runtime' as dart;
 
 @patch
-bool typeAcceptsNull<T>() => !dart.strictNullSafety || null is T;
+bool typeAcceptsNull<T>() =>
+    !dart.compileTimeFlag('soundNullSafety') || null is T;
 
 @patch
 class Symbol implements core.Symbol {
diff --git a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/classes.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/classes.dart
index bb58063..8038b81 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/classes.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/classes.dart
@@ -268,9 +268,18 @@
 
 getGenericTypeCtor(value) => JS('', '#[#]', value, _genericTypeCtor);
 
-/// Get the type of a method from an object using the stored signature
-getType(obj) =>
-    JS('', '# == null ? # : #.__proto__.constructor', obj, Object, obj);
+/// Get the type of an object.
+getType(obj) {
+  if (obj == null) return JS('!', '#', Object);
+
+  if (JS<bool>('!', '#.__proto__ == null', obj)) {
+    // Object.create(null) produces a js object without a prototype.
+    // In that case use the version from a js object literal.
+    return JS('!', '#.Object.prototype.constructor', global_);
+  }
+
+  return JS('!', '#.__proto__.constructor', obj);
+}
 
 getLibraryUri(value) => JS('', '#[#]', value, _libraryUri);
 setLibraryUri(f, uri) => JS('', '#[#] = #', f, _libraryUri, uri);
diff --git a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart
index ba418a4..6b33186 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart
@@ -25,23 +25,21 @@
 }
 
 final _nullFailedSet = JS('!', 'new Set()');
+
+String _nullFailedMessage(variableName) =>
+    'A null value was passed into a non-nullable parameter: $variableName.';
+
 // Run-time null safety assertion per:
 // https://github.com/dart-lang/language/blob/master/accepted/future-releases/nnbd/feature-specification.md#automatic-debug-assertion-insertion
 nullFailed(String? fileUri, int? line, int? column, String? variable) {
-  if (strictNullSafety) {
-    throw AssertionErrorImpl(
-        'A null value was passed into a non-nullable parameter $variable',
-        fileUri,
-        line,
-        column,
-        '$variable != null');
-  } else {
-    var key = '$fileUri:$line:$column';
-    if (!JS('!', '#.has(#)', _nullFailedSet, key)) {
-      JS('', '#.add(#)', _nullFailedSet, key);
-      _nullWarn(
-          'A null value was passed into a non-nullable parameter $variable');
-    }
+  if (_nonNullAsserts) {
+    throw AssertionErrorImpl(_nullFailedMessage(variable), fileUri, line,
+        column, '$variable != null');
+  }
+  var key = '$fileUri:$line:$column';
+  if (!JS('!', '#.has(#)', _nullFailedSet, key)) {
+    JS('', '#.add(#)', _nullFailedSet, key);
+    _nullWarn(_nullFailedMessage(variable));
   }
 }
 
diff --git a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
index fd9a7d4..489795f 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
@@ -185,7 +185,7 @@
     if (missingRequired.isNotEmpty) {
       var error = "Dynamic call with missing required named arguments: "
           "${missingRequired.join(', ')}.";
-      if (!strictNullSafety) {
+      if (!compileTimeFlag('soundNullSafety')) {
         _nullWarn(error);
       } else {
         return error;
@@ -430,7 +430,7 @@
 cast(obj, type) {
   // We hoist the common case where null is checked against another type here
   // for better performance.
-  if (obj == null && !strictNullSafety) {
+  if (obj == null && !compileTimeFlag('soundNullSafety')) {
     // Check the null comparison cache to avoid emitting repeated warnings.
     _nullWarnOnType(type);
     return obj;
@@ -450,11 +450,13 @@
 bool dtest(obj) {
   // Only throw an AssertionError in weak mode for compatibility. Strong mode
   // should throw a TypeError.
-  if (obj is! bool) booleanConversionFailed(strictNullSafety ? obj : test(obj));
+  if (obj is! bool)
+    booleanConversionFailed(
+        compileTimeFlag('soundNullSafety') ? obj : test(obj));
   return obj;
 }
 
-void booleanConversionFailed(obj) {
+Never booleanConversionFailed(obj) {
   var actual = typeName(getReifiedType(obj));
   throw TypeErrorImpl("type '$actual' is not a 'bool' in boolean expression");
 }
@@ -462,7 +464,7 @@
 asInt(obj) {
   // Note: null (and undefined) will fail this test.
   if (JS('!', 'Math.floor(#) != #', obj, obj)) {
-    if (obj == null && !strictNullSafety) {
+    if (obj == null && !compileTimeFlag('soundNullSafety')) {
       _nullWarnOnType(JS('', '#', int));
       return null;
     } else {
@@ -474,7 +476,9 @@
 
 asNullableInt(obj) => obj == null ? null : asInt(obj);
 
-/// Checks that `x` is not null or undefined.
+/// Checks for null or undefined and returns [x].
+///
+/// Throws [NoSuchMethodError] when it is null or undefined.
 //
 // TODO(jmesserly): inline this, either by generating it as a function into
 // the module, or via some other pattern such as:
@@ -487,15 +491,16 @@
   return x;
 }
 
-/// Checks that `x` is not null or undefined.
+/// Checks for null or undefined and returns [x].
 ///
-/// Unlike `_notNull`, this throws a `CastError` (under strict checking)
-/// or emits a runtime warning (otherwise).  This is only used by the
-/// compiler when casting from nullable to non-nullable variants of the
-/// same type.
+/// Throws a [TypeError] when [x] is null or undefined (under sound null safety
+/// mode) or emits a runtime warning (otherwise).
+///
+/// This is only used by the compiler when casting from nullable to non-nullable
+/// variants of the same type.
 nullCast(x, type) {
   if (x == null) {
-    if (!strictNullSafety) {
+    if (!compileTimeFlag('soundNullSafety')) {
       _nullWarnOnType(type);
     } else {
       castError(x, type);
@@ -504,6 +509,16 @@
   return x;
 }
 
+/// Checks for null or undefined and returns [x].
+///
+/// Throws a [TypeError] when [x] is null or undefined.
+///
+/// This is only used by the compiler for the runtime null check operator `!`.
+nullCheck(x) {
+  if (x == null) throw TypeErrorImpl("Unexpected null value.");
+  return x;
+}
+
 /// The global constant map table.
 final constantMaps = JS<Object>('!', 'new Map()');
 
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 a4bcaf8..2a6c61e 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
@@ -5,33 +5,18 @@
 /// This library defines the representation of runtime types.
 part of dart._runtime;
 
+/// Returns the state of [flag] that is determined at compile time.
+///
+/// The constant value itself is inlined by the compiler in place of the call
+/// to this method.
+@notNull
+external bool compileTimeFlag(String flag);
+
 _throwNullSafetyWarningError() => throw UnsupportedError(
     'Null safety errors cannot be shown as warnings when running with sound '
     'null safety.');
 
 @notNull
-bool _setNullSafety = false;
-
-@notNull
-bool strictNullSafety = false;
-
-/// Sets the mode of the runtime subtype checks.
-///
-/// Changing the mode after the application has started running is not
-/// supported.
-void nullSafety(bool soundNullSafety) {
-  if (_setNullSafety) {
-    throw UnsupportedError('The Null Safety mode can only be set once.');
-  }
-
-  if (soundNullSafety && _weakNullSafetyWarnings)
-    _throwNullSafetyWarningError();
-
-  strictNullSafety = soundNullSafety;
-  _setNullSafety = true;
-}
-
-@notNull
 bool _weakNullSafetyWarnings = false;
 
 /// Sets the runtime mode to show warnings when running with weak null safety.
@@ -40,11 +25,25 @@
 /// is enabled. Showing warnings while running with sound null safety is not
 /// supported (they will be errors).
 void weakNullSafetyWarnings(bool showWarnings) {
-  if (showWarnings && strictNullSafety) _throwNullSafetyWarningError();
+  if (showWarnings && compileTimeFlag('soundNullSafety')) {
+    _throwNullSafetyWarningError();
+  }
 
   _weakNullSafetyWarnings = showWarnings;
 }
 
+@notNull
+bool _nonNullAsserts = false;
+
+/// Sets the runtime mode to insert non-null assertions on non-nullable method
+/// parameters.
+///
+/// When [weakNullSafetyWarnings] is also `true` the assertions will fail
+/// instead of printing a warning for the non-null parameters.
+void nonNullAsserts(bool enable) {
+  _nonNullAsserts = enable;
+}
+
 final metadata = JS('', 'Symbol("metadata")');
 
 /// Types in dart are represented internally at runtime as follows.
@@ -898,7 +897,7 @@
       var bound = typeBounds[i];
       if (_equalType(bound, dynamic) ||
           JS<bool>('!', '# === #', bound, nullable(unwrapType(Object))) ||
-          (!strictNullSafety && _equalType(bound, Object))) {
+          (!compileTimeFlag('soundNullSafety') && _equalType(bound, Object))) {
         // Do not print the bound when it is a top type. In weak mode the bounds
         // of Object and Object* will also be elided.
         continue;
@@ -997,7 +996,8 @@
       // difference is rare.
       if (_equalType(type, dynamic)) return true;
       if (_jsInstanceOf(type, NullableType) ||
-          (!strictNullSafety && _jsInstanceOf(type, LegacyType))) {
+          (!compileTimeFlag('soundNullSafety') &&
+              _jsInstanceOf(type, LegacyType))) {
         return _equalType(JS('!', '#.type', type), Object);
       }
       return false;
@@ -1289,7 +1289,7 @@
   if (JS('!', '# !== void 0', result)) return result;
 
   var validSubtype = _isSubtype(t1, t2, true);
-  if (!validSubtype && !strictNullSafety) {
+  if (!validSubtype && !compileTimeFlag('soundNullSafety')) {
     validSubtype = _isSubtype(t1, t2, false);
     if (validSubtype) {
       // TODO(nshahan) Need more information to be helpful here.
@@ -1745,7 +1745,7 @@
     var supertypeRequiredNamed = supertype.getRequiredNamedParameters();
     var subtypeNamed = supertype.getNamedParameters();
     var subtypeRequiredNamed = supertype.getRequiredNamedParameters();
-    if (!strictNullSafety) {
+    if (!compileTimeFlag('soundNullSafety')) {
       // In weak mode, treat required named params as optional named params.
       supertypeNamed = {...supertypeNamed, ...supertypeRequiredNamed};
       subtypeNamed = {...subtypeNamed, ...subtypeRequiredNamed};
diff --git a/sdk/lib/_internal/js_dev_runtime/private/js_number.dart b/sdk/lib/_internal/js_dev_runtime/private/js_number.dart
index d2b9661..fcaa2cd 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/js_number.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/js_number.dart
@@ -141,7 +141,7 @@
   double toDouble() => this;
 
   @notNull
-  String toStringAsFixed(@notNull int fractionDigits) {
+  String toStringAsFixed(@nullCheck int fractionDigits) {
     if (fractionDigits < 0 || fractionDigits > 20) {
       throw RangeError.range(fractionDigits, 0, 20, "fractionDigits");
     }
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 7e3b6f1..b1a7f44 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -1518,7 +1518,7 @@
   }
 }
 
-class NullError extends Error implements NoSuchMethodError {
+class NullError extends TypeError implements NoSuchMethodError {
   final String _message;
   final String? _method;
 
diff --git a/sdk/lib/_internal/js_runtime/lib/rti.dart b/sdk/lib/_internal/js_runtime/lib/rti.dart
index aceef48..2f59b9d 100644
--- a/sdk/lib/_internal/js_runtime/lib/rti.dart
+++ b/sdk/lib/_internal/js_runtime/lib/rti.dart
@@ -2913,12 +2913,14 @@
       String sName = _Utils.asString(_Utils.arrayAt(sNamed, sIndex));
       sIndex += 3;
       if (_Utils.stringLessThan(tName, sName)) return false;
-      bool sIsRequired = _Utils.asBool(_Utils.arrayAt(sNamed, sIndex - 2));
+      bool sIsRequired = !JS_GET_FLAG('LEGACY') &&
+          _Utils.asBool(_Utils.arrayAt(sNamed, sIndex - 2));
       if (_Utils.stringLessThan(sName, tName)) {
         if (sIsRequired) return false;
         continue;
       }
-      bool tIsRequired = _Utils.asBool(_Utils.arrayAt(tNamed, tIndex + 1));
+      bool tIsRequired = !JS_GET_FLAG('LEGACY') &&
+          _Utils.asBool(_Utils.arrayAt(tNamed, tIndex + 1));
       if (sIsRequired && !tIsRequired) return false;
       Rti sType = _Utils.asRti(_Utils.arrayAt(sNamed, sIndex - 1));
       Rti tType = _Utils.asRti(_Utils.arrayAt(tNamed, tIndex + 2));
@@ -2926,9 +2928,11 @@
       break;
     }
   }
-  while (sIndex < sNamedLength) {
-    if (_Utils.asBool(_Utils.arrayAt(sNamed, sIndex + 1))) return false;
-    sIndex += 3;
+  if (!JS_GET_FLAG('LEGACY')) {
+    while (sIndex < sNamedLength) {
+      if (_Utils.asBool(_Utils.arrayAt(sNamed, sIndex + 1))) return false;
+      sIndex += 3;
+    }
   }
   return true;
 }
diff --git a/sdk/lib/_internal/js_runtime/pubspec.yaml b/sdk/lib/_internal/js_runtime/pubspec.yaml
index 75ee57a..96abf65 100644
--- a/sdk/lib/_internal/js_runtime/pubspec.yaml
+++ b/sdk/lib/_internal/js_runtime/pubspec.yaml
@@ -3,4 +3,4 @@
 name: js_runtime
 publish_to: none
 environment:
-  sdk: '>=2.9.0-1 <3.0.0'
+  sdk: '>=2.10.0-0.0 <3.0.0'
diff --git a/sdk/lib/_internal/sdk_library_metadata/pubspec.yaml b/sdk/lib/_internal/sdk_library_metadata/pubspec.yaml
index 7179805..8f46e53 100644
--- a/sdk/lib/_internal/sdk_library_metadata/pubspec.yaml
+++ b/sdk/lib/_internal/sdk_library_metadata/pubspec.yaml
@@ -3,4 +3,4 @@
 name: sdk_library_metadata
 publish_to: none
 environment:
-  sdk: '>=2.9.0-1 <3.0.0'
+  sdk: '>=2.10.0-0.0 <3.0.0'
diff --git a/sdk/lib/_internal/vm/bin/builtin.dart b/sdk/lib/_internal/vm/bin/builtin.dart
index 5abcbfb..7a3bafb 100644
--- a/sdk/lib/_internal/vm/bin/builtin.dart
+++ b/sdk/lib/_internal/vm/bin/builtin.dart
@@ -486,7 +486,8 @@
 // Embedder Entrypoint:
 // The embedder calls this method to initial the package resolution state.
 @pragma("vm:entry-point")
-void _Init(String packagesConfig, String workingDirectory, String rootScript) {
+void _Init(
+    String? packagesConfig, String workingDirectory, String? rootScript) {
   // Register callbacks and hooks with the rest of core libraries.
   _setupHooks();
 
diff --git a/sdk/lib/_internal/vm/bin/common_patch.dart b/sdk/lib/_internal/vm/bin/common_patch.dart
index 9899f2e..cd9f149 100644
--- a/sdk/lib/_internal/vm/bin/common_patch.dart
+++ b/sdk/lib/_internal/vm/bin/common_patch.dart
@@ -33,7 +33,7 @@
 
 import "dart:nativewrappers" show NativeFieldWrapperClass1;
 
-import "dart:typed_data" show Uint8List;
+import "dart:typed_data" show Uint8List, BytesBuilder;
 
 /// These are the additional parts of this patch library:
 // part "directory_patch.dart";
diff --git a/sdk/lib/_internal/vm/bin/socket_patch.dart b/sdk/lib/_internal/vm/bin/socket_patch.dart
index e2bff2f..a4cd2f2 100644
--- a/sdk/lib/_internal/vm/bin/socket_patch.dart
+++ b/sdk/lib/_internal/vm/bin/socket_patch.dart
@@ -226,14 +226,36 @@
       return _InternetAddress(
           InternetAddressType.unix, address, null, rawAddress);
     } else {
-      var in_addr = _parse(address);
-      if (in_addr == null) {
-        throw ArgumentError("Invalid internet address $address");
+      int index = address.indexOf('%');
+      String originalAddress = address;
+      String? scopeID;
+      if (index > 0) {
+        scopeID = address.substring(index, address.length);
+        address = address.substring(0, index);
       }
-      InternetAddressType type = in_addr.length == _IPv4AddrLength
+      var inAddr = _parse(address);
+      if (inAddr == null) {
+        throw ArgumentError.value("Invalid internet address $address");
+      }
+      InternetAddressType type = inAddr.length == _IPv4AddrLength
           ? InternetAddressType.IPv4
           : InternetAddressType.IPv6;
-      return _InternetAddress(type, address, null, in_addr);
+      if (scopeID != null && scopeID.length > 0) {
+        if (type != InternetAddressType.IPv6) {
+          throw ArgumentError.value("IPv4 addresses cannot have a scope id");
+        }
+        // This is an IPv6 address with scope id.
+        var list = _parseScopedLinkLocalAddress(originalAddress);
+
+        if (list is! OSError && (list as List).isNotEmpty) {
+          return _InternetAddress(InternetAddressType.IPv6, originalAddress,
+              null, inAddr, list.first);
+        } else {
+          throw ArgumentError.value(
+              "Invalid IPv6 address $address with scope ID");
+        }
+      }
+      return _InternetAddress(type, originalAddress, null, inAddr, 0);
     }
   }
 
@@ -262,12 +284,11 @@
 
   static _InternetAddress? tryParse(String address) {
     checkNotNullable(address, "address");
-    var addressBytes = _parse(address);
-    if (addressBytes == null) return null;
-    var type = addressBytes.length == _IPv4AddrLength
-        ? InternetAddressType.IPv4
-        : InternetAddressType.IPv6;
-    return _InternetAddress(type, address, null, addressBytes);
+    try {
+      return _InternetAddress.fromString(address);
+    } catch (e) {
+      return null;
+    }
   }
 
   factory _InternetAddress.fixed(int id) {
@@ -297,7 +318,8 @@
 
   // Create a clone of this _InternetAddress replacing the host.
   _InternetAddress _cloneWithNewHost(String host) {
-    return _InternetAddress(type, address, host, Uint8List.fromList(_in_addr));
+    return _InternetAddress(
+        type, address, host, Uint8List.fromList(_in_addr), _scope_id);
   }
 
   bool operator ==(other) {
@@ -330,7 +352,8 @@
 
   static String _rawAddrToString(Uint8List address)
       native "InternetAddress_RawAddrToString";
-
+  static List _parseScopedLinkLocalAddress(String address)
+      native "InternetAddress_ParseScopedLinkLocalAddress";
   static Uint8List? _parse(String address) native "InternetAddress_Parse";
 }
 
diff --git a/sdk/lib/_internal/vm/bin/vmservice_io.dart b/sdk/lib/_internal/vm/bin/vmservice_io.dart
index aea026b..e84c8f8 100644
--- a/sdk/lib/_internal/vm/bin/vmservice_io.dart
+++ b/sdk/lib/_internal/vm/bin/vmservice_io.dart
@@ -222,6 +222,12 @@
 Timer? _registerSignalHandlerTimer;
 
 _registerSignalHandler() {
+  if (VMService().isExiting) {
+    // If the VM started shutting down we don't want to register this signal
+    // handler, otherwise we'll cause the VM to hang after killing the service
+    // isolate.
+    return;
+  }
   _registerSignalHandlerTimer = null;
   if (_signalWatch == null) {
     // Cannot register for signals.
diff --git a/sdk/lib/_internal/vm/bin/vmservice_server.dart b/sdk/lib/_internal/vm/bin/vmservice_server.dart
index 9857cd6..68e18a3 100644
--- a/sdk/lib/_internal/vm/bin/vmservice_server.dart
+++ b/sdk/lib/_internal/vm/bin/vmservice_server.dart
@@ -354,14 +354,41 @@
 
     final String path = result;
     if (path == WEBSOCKET_PATH) {
+      final subprotocols = request.headers['sec-websocket-protocol'];
       if (acceptNewWebSocketConnections) {
         WebSocketTransformer.upgrade(request,
+                protocolSelector:
+                    subprotocols == null ? null : (_) => 'implicit-redirect',
                 compression: CompressionOptions.compressionOff)
             .then((WebSocket webSocket) {
           WebSocketClient(webSocket, _service);
         });
       } else {
         // Forward the websocket connection request to DDS.
+        // The Javascript WebSocket implementation doesn't like websocket
+        // connection requests being redirected. Instead of redirecting, we'll
+        // just forward the connection manually if 'implicit-redirect' is
+        // provided as a protocol.
+        if (subprotocols != null) {
+          if (subprotocols.contains('implicit-redirect')) {
+            WebSocketTransformer.upgrade(request,
+                    protocolSelector: (_) => 'implicit-redirect',
+                    compression: CompressionOptions.compressionOff)
+                .then((WebSocket webSocket) async {
+              final ddsWs = await WebSocket.connect(
+                  _service.ddsUri!.replace(scheme: 'ws').toString());
+              ddsWs.addStream(webSocket);
+              webSocket.addStream(ddsWs);
+              webSocket.done.then((_) {
+                ddsWs.close();
+              });
+              ddsWs.done.then((_) {
+                webSocket.close();
+              });
+            });
+            return;
+          }
+        }
         request.response.redirect(_service.ddsUri!);
       }
       return;
diff --git a/sdk/lib/_internal/vm/lib/array.dart b/sdk/lib/_internal/vm/lib/array.dart
index 9ada6e9..d615f7b 100644
--- a/sdk/lib/_internal/vm/lib/array.dart
+++ b/sdk/lib/_internal/vm/lib/array.dart
@@ -23,6 +23,17 @@
     return result;
   }
 
+  // Specialization of List.generate constructor for growable == false.
+  // Used by pkg/vm/lib/transformations/list_factory_specializer.dart.
+  @pragma("vm:prefer-inline")
+  factory _List.generate(int length, E generator(int index)) {
+    final result = _List<E>(length);
+    for (int i = 0; i < result.length; ++i) {
+      result[i] = generator(i);
+    }
+    return result;
+  }
+
   E operator [](int index) native "List_getIndexed";
 
   void operator []=(int index, E value) {
diff --git a/sdk/lib/_internal/vm/lib/core_patch.dart b/sdk/lib/_internal/vm/lib/core_patch.dart
index 2133763..b4bbd57 100644
--- a/sdk/lib/_internal/vm/lib/core_patch.dart
+++ b/sdk/lib/_internal/vm/lib/core_patch.dart
@@ -32,7 +32,7 @@
         writeIntoOneByteString,
         writeIntoTwoByteString;
 
-import "dart:async" show Completer, Future, Timer;
+import "dart:async" show Completer, DeferredLoadException, Future, Timer;
 
 import "dart:collection"
     show
diff --git a/sdk/lib/_internal/vm/lib/developer.dart b/sdk/lib/_internal/vm/lib/developer.dart
index d9c87a8..82eac19 100644
--- a/sdk/lib/_internal/vm/lib/developer.dart
+++ b/sdk/lib/_internal/vm/lib/developer.dart
@@ -21,7 +21,7 @@
 bool debugger({bool when: true, String? message}) native "Developer_debugger";
 
 @patch
-Object inspect(Object object) native "Developer_inspect";
+Object? inspect(Object? object) native "Developer_inspect";
 
 @patch
 void log(String message,
diff --git a/sdk/lib/_internal/vm/lib/growable_array.dart b/sdk/lib/_internal/vm/lib/growable_array.dart
index 1c14701..0e63557 100644
--- a/sdk/lib/_internal/vm/lib/growable_array.dart
+++ b/sdk/lib/_internal/vm/lib/growable_array.dart
@@ -119,6 +119,17 @@
     return result;
   }
 
+  // Specialization of List.generate constructor for growable == true.
+  // Used by pkg/vm/lib/transformations/list_factory_specializer.dart.
+  @pragma("vm:prefer-inline")
+  factory _GrowableList.generate(int length, T generator(int index)) {
+    final result = _GrowableList<T>(length);
+    for (int i = 0; i < result.length; ++i) {
+      result[i] = generator(i);
+    }
+    return result;
+  }
+
   @pragma("vm:exact-result-type",
       <dynamic>[_GrowableList, "result-type-uses-passed-type-arguments"])
   factory _GrowableList._withData(_List data) native "GrowableList_allocate";
diff --git a/sdk/lib/_internal/vm/lib/isolate_patch.dart b/sdk/lib/_internal/vm/lib/isolate_patch.dart
index da2ed68..91a567d 100644
--- a/sdk/lib/_internal/vm/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/vm/lib/isolate_patch.dart
@@ -229,7 +229,7 @@
  * isolate is in the message loop.
  */
 @pragma("vm:entry-point", "call")
-void _startMainIsolate(Function entryPoint, List<String> args) {
+void _startMainIsolate(Function entryPoint, List<String>? args) {
   _startIsolate(
       null, // no parent port
       entryPoint,
diff --git a/sdk/lib/_internal/vm/lib/lib_prefix.dart b/sdk/lib/_internal/vm/lib/lib_prefix.dart
index d8e52fd..4259640 100644
--- a/sdk/lib/_internal/vm/lib/lib_prefix.dart
+++ b/sdk/lib/_internal/vm/lib/lib_prefix.dart
@@ -13,6 +13,10 @@
 
   bool _isLoaded() native "LibraryPrefix_isLoaded";
   void _setLoaded() native "LibraryPrefix_setLoaded";
+  Object _loadingUnit() native "LibraryPrefix_loadingUnit";
+  static void _issueLoad(Object unit) native "LibraryPrefix_issueLoad";
+
+  static final _loads = new Map<Object, Completer<void>>();
 }
 
 class _DeferredNotLoadedError extends Error implements NoSuchMethodError {
@@ -26,9 +30,39 @@
 }
 
 @pragma("vm:entry-point")
+void _completeLoads(Object unit, String? errorMessage, bool transientError) {
+  Completer<void> load = _LibraryPrefix._loads[unit]!;
+  if (errorMessage == null) {
+    load.complete(null);
+  } else {
+    if (transientError) {
+      _LibraryPrefix._loads.remove(unit);
+    }
+    load.completeError(new DeferredLoadException(errorMessage));
+  }
+}
+
+@pragma("vm:entry-point")
 @pragma("vm:never-inline") // Don't duplicate prefix checking code.
-Future<void> _loadLibrary(_LibraryPrefix prefix) {
-  return new Future<void>(() {
+Future<void> _loadLibrary(_LibraryPrefix prefix) async {
+  if (!prefix._isLoaded()) {
+    Object unit = prefix._loadingUnit();
+    // Don't issue a load request for the root unit. A deferred prefix can
+    // point to a library in the root unit if there is also an immediate import
+    // of that library.
+    if (unit != 1) {
+      Completer<void>? load = _LibraryPrefix._loads[unit];
+      if (load == null) {
+        _LibraryPrefix._loads[unit] = load = new Completer<void>();
+        _LibraryPrefix._issueLoad(unit);
+      }
+      await load.future;
+    }
+  }
+  // Ensure the prefix's future does not complete until the next Turn even
+  // when loading is a no-op or synchronous. Helps applications avoid writing
+  // code that only works when loading isn't really deferred.
+  await new Future<void>(() {
     prefix._setLoaded();
   });
 }
diff --git a/sdk/lib/async/async.dart b/sdk/lib/async/async.dart
index 5e72a00..223af14 100644
--- a/sdk/lib/async/async.dart
+++ b/sdk/lib/async/async.dart
@@ -77,16 +77,16 @@
  *   wanted to know about handling errors and exceptions when working with
  *   Futures (but were afraid to ask).
  *
- * * [The Event Loop and Dart](https://www.dartlang.org/articles/event-loop/):
+ * * [The Event Loop and Dart](https://dart.dev/articles/event-loop/):
  *   Learn how Dart handles the event queue and microtask queue, so you can
  *   write better asynchronous code with fewer surprises.
  *
  * * [test package: Asynchronous Tests][test-readme]: How to test asynchronous
  *   code.
  *
- * [asynchronous-programming]: https://www.dartlang.org/docs/dart-up-and-running/ch03.html#dartasync---asynchronous-programming
- * [futures-tutorial]: https://www.dartlang.org/docs/tutorials/futures/
- * [futures-error-handling]: https://www.dartlang.org/articles/futures-and-error-handling/
+ * [asynchronous-programming]: https://dart.dev/guides/libraries/library-tour#dartasync---asynchronous-programming
+ * [futures-tutorial]: https://dart.dev/codelabs/async-await
+ * [futures-error-handling]: https://dart.dev/guides/libraries/futures-error-handling
  * [test-readme]: https://pub.dev/packages/test
  *
  * {@category Core}
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index 6449304..bb6ed77 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -258,8 +258,9 @@
    * Use [Completer] to create a future and complete it later.
    */
   @pragma("vm:entry-point")
+  @pragma("vm:prefer-inline")
   factory Future.value([FutureOr<T>? value]) {
-    return new _Future<T>.immediate(value == null ? value as dynamic : value);
+    return new _Future<T>.immediate(value == null ? value as T : value);
   }
 
   /**
@@ -360,9 +361,12 @@
    * The call to [cleanUp] should not throw. If it does, the error will be an
    * uncaught asynchronous error.
    */
+  @pragma("vm:entry-point")
   static Future<List<T>> wait<T>(Iterable<Future<T>> futures,
       {bool eagerError = false, void cleanUp(T successValue)?}) {
-    final _Future<List<T>> result = new _Future<List<T>>();
+    // This is a VM recognised method, and the _future variable is deliberately
+    // allocated in a specific slot in the closure context for stack unwinding.
+    final _Future<List<T>> _future = _Future<List<T>>();
     List<T?>? values; // Collects the values. Set to null on error.
     int remaining = 0; // How many futures are we waiting for.
     late Object error; // The first error from a future.
@@ -386,13 +390,13 @@
         }
         values = null;
         if (remaining == 0 || eagerError) {
-          result._completeError(theError, theStackTrace);
+          _future._completeError(theError, theStackTrace);
         } else {
           error = theError;
           stackTrace = theStackTrace;
         }
       } else if (remaining == 0 && !eagerError) {
-        result._completeError(error, stackTrace);
+        _future._completeError(error, stackTrace);
       }
     }
 
@@ -407,7 +411,7 @@
           if (valueList != null) {
             valueList[pos] = value;
             if (remaining == 0) {
-              result._completeWithValue(List<T>.from(valueList));
+              _future._completeWithValue(List<T>.from(valueList));
             }
           } else {
             if (cleanUp != null && value != null) {
@@ -419,7 +423,7 @@
             if (remaining == 0 && !eagerError) {
               // If eagerError is false, and valueList is null, then
               // error and stackTrace have been set in handleError above.
-              result._completeError(error, stackTrace);
+              _future._completeError(error, stackTrace);
             }
           }
         }, onError: handleError);
@@ -439,7 +443,7 @@
       // gracefully.
       if (remaining == 0 || eagerError) {
         // Throw a new Future.error.
-        // Don't just call `result._completeError` since that would propagate
+        // Don't just call `_future._completeError` since that would propagate
         // the error too eagerly, not giving the callers time to install
         // error handlers.
         // Also, don't use `_asyncCompleteError` since that one doesn't give
@@ -453,7 +457,7 @@
         stackTrace = st;
       }
     }
-    return result;
+    return _future;
   }
 
   /**
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index 3f33737..4e24a48 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -768,13 +768,16 @@
     }
   }
 
+  @pragma("vm:entry-point")
   Future<T> timeout(Duration timeLimit, {FutureOr<T> onTimeout()?}) {
     if (_isComplete) return new _Future.immediate(this);
-    _Future<T> result = new _Future<T>();
+    // This is a VM recognised method, and the _future variable is deliberately
+    // allocated in a specific slot in the closure context for stack unwinding.
+    _Future<T> _future = new _Future<T>();
     Timer timer;
     if (onTimeout == null) {
       timer = new Timer(timeLimit, () {
-        result._completeError(
+        _future._completeError(
             new TimeoutException("Future not completed", timeLimit),
             StackTrace.empty);
       });
@@ -785,24 +788,24 @@
 
       timer = new Timer(timeLimit, () {
         try {
-          result._complete(zone.run(onTimeoutHandler));
+          _future._complete(zone.run(onTimeoutHandler));
         } catch (e, s) {
-          result._completeError(e, s);
+          _future._completeError(e, s);
         }
       });
     }
     this.then((T v) {
       if (timer.isActive) {
         timer.cancel();
-        result._completeWithValue(v);
+        _future._completeWithValue(v);
       }
     }, onError: (Object e, StackTrace s) {
       if (timer.isActive) {
         timer.cancel();
-        result._completeError(e, s);
+        _future._completeError(e, s);
       }
     });
-    return result;
+    return _future;
   }
 }
 
diff --git a/sdk/lib/async/schedule_microtask.dart b/sdk/lib/async/schedule_microtask.dart
index 940989c..7e2e933 100644
--- a/sdk/lib/async/schedule_microtask.dart
+++ b/sdk/lib/async/schedule_microtask.dart
@@ -128,7 +128,7 @@
  *
  * ## Other resources
  *
- * * [The Event Loop and Dart](https://www.dartlang.org/articles/event-loop/):
+ * * [The Event Loop and Dart](https://dart.dev/articles/event-loop/):
  * Learn how Dart handles the event queue and microtask queue, so you can write
  * better asynchronous code with fewer surprises.
  */
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart
index fdf2f8a..045bbd5 100644
--- a/sdk/lib/collection/list.dart
+++ b/sdk/lib/collection/list.dart
@@ -9,17 +9,27 @@
 /// `ListBase` can be used as a base class for implementing the `List`
 /// interface.
 ///
-/// All operations are defined in terms of `length`, `operator[]`,
-/// `operator[]=` and `length=`, which need to be implemented.
+/// This class implements all read operations using only the `length` and
+/// `operator[]` and members. It implements write operations using those and
+/// `add`, `length=` and `operator[]=`
+/// Classes using this base classs  should implement those five operations.
 ///
-/// *NOTICE*: Forwarding just these four operations to a normal growable [List]
-/// (as created by `[]`) will give very bad performance for `add` and
-/// `addAll` operations of `ListBase`. These operations are implemented by
-/// increasing the length of the list by one for each `add` operation, and
-/// repeatedly increasing the length of a growable list is not efficient.
-/// To avoid this, either override 'add' and 'addAll' to also forward directly
-/// to the growable list, or, preferably, use `DelegatingList` from
-/// "package:collection/collection.dart" instead.
+/// **NOTICE**: For backwards compatability reasons,
+/// there is a default implementation of `add`
+/// which only works for lists with a nullable element type.
+/// For list with a non-nullable element type,
+/// the `add` method must be implemented.
+///
+/// **NOTICE**: Forwarding just the four `length` and `[]` read/write operations
+/// to a normal growable [List] (as created by a `[]` literal)
+/// will give very bad performance for `add` and `addAll` operations
+/// of `ListBase`.
+/// These operations are implemented by
+/// increasing the length of the list by one for each `add` operation,
+/// and repeatedly increasing the length of a growable list is not efficient.
+/// To avoid this, override 'add' and 'addAll' to also forward directly
+/// to the growable list, or, if possible, use `DelegatingList` from
+/// "package:collection/collection.dart" instead of a `ListMixin`.
 abstract class ListBase<E> extends Object with ListMixin<E> {
   /// Converts a [List] to a [String].
   ///
@@ -38,18 +48,27 @@
 /// `ListMixin` can be used as a mixin to make a class implement
 /// the `List` interface.
 ///
-/// This implements all read operations using only the `length` and
-/// `operator[]` members. It implements write operations using those and
-/// `length=` and `operator[]=`
+/// This mixin implements all read operations using only the `length` and
+/// `operator[]` and members. It implements write operations using those and
+/// `add`, `length=` and `operator[]=`.
+/// Classes using this mixin should implement those five operations.
 ///
-/// *NOTICE*: Forwarding just these four operations to a normal growable [List]
-/// (as created by `[]`) will give very bad performance for `add` and
-/// `addAll` operations of `ListBase`. These operations are implemented by
-/// increasing the length of the list by one for each `add` operation, and
-/// repeatedly increasing the length of a growable list is not efficient.
-/// To avoid this, either override 'add' and 'addAll' to also forward directly
+/// **NOTICE**: For backwards compatability reasons,
+/// there is a default implementation of `add`
+/// which only works for lists with a nullable element type.
+/// For lists with a non-nullable element type,
+/// the `add` method must be implemented.
+///
+/// **NOTICE**: Forwarding just the four `length` and `[]` read/write operations
+/// to a normal growable [List] (as created by a `[]` literal)
+/// will give very bad performance for `add` and `addAll` operations
+/// of `ListMixin`.
+/// These operations are implemented by
+/// increasing the length of the list by one for each `add` operation,
+/// and repeatedly increasing the length of a growable list is not efficient.
+/// To avoid this, override 'add' and 'addAll' to also forward directly
 /// to the growable list, or, if possible, use `DelegatingList` from
-/// "package:collection/collection.dart" instead.
+/// "package:collection/collection.dart" instead of a `ListMixin`.
 abstract class ListMixin<E> implements List<E> {
   // Iterable interface.
   // TODO(lrn): When we get composable mixins, reuse IterableMixin instead
@@ -255,6 +274,7 @@
 
   // List interface.
   void add(E element) {
+    // This implementation only works for lists which allow `null` as element.
     this[this.length++] = element;
   }
 
@@ -504,14 +524,13 @@
 
   void insert(int index, E element) {
     ArgumentError.checkNotNull(index, "index");
+    var length = this.length;
     RangeError.checkValueInInterval(index, 0, length, "index");
-    if (index == this.length) {
-      add(element);
-      return;
+    add(element);
+    if (index != length) {
+      setRange(index + 1, length + 1, this, index);
+      this[index] = element;
     }
-    this.length++;
-    setRange(index + 1, this.length, this, index);
-    this[index] = element;
   }
 
   E removeAt(int index) {
diff --git a/sdk/lib/convert/encoding.dart b/sdk/lib/convert/encoding.dart
index b9238a8..5974366 100644
--- a/sdk/lib/convert/encoding.dart
+++ b/sdk/lib/convert/encoding.dart
@@ -65,12 +65,12 @@
     "utf-8": utf8
   };
 
-  /// Gets an [Encoding] object from the name of the character set
-  /// name. The names used are the IANA official names for the
-  /// character set (see
-  /// http://www.iana.org/assignments/character-sets/character-sets.xml).
+  /// Returns an [Encoding] for a named character set.
   ///
-  /// The [name] passed is case insensitive.
+  /// The names used are the IANA official names for the character set (see
+  /// [IANA character sets][]). The names are case insensitive.
+  ///
+  /// [IANA character sets]: http://www.iana.org/assignments/character-sets/character-sets.xml
   ///
   /// If character set is not supported `null` is returned.
   static Encoding? getByName(String? name) {
diff --git a/sdk/lib/core/core.dart b/sdk/lib/core/core.dart
index dc037a3..8997c0a 100644
--- a/sdk/lib/core/core.dart
+++ b/sdk/lib/core/core.dart
@@ -137,17 +137,16 @@
  *
  * ## Other documentation
  *
- * For more information about how to use the built-in types, refer to [Built-in
- * Types](http://www.dartlang.org/docs/dart-up-and-running/contents/ch02.html#built-in-types)
- * in Chapter 2 of
- * [Dart: Up and Running](http://www.dartlang.org/docs/dart-up-and-running/).
+ * For more information about how to use the built-in types, refer to
+ * [Built-in Types](https://dart.dev/guides/language/language-tour#built-in-types)
+ * in
+ * [A tour of the Dart language](https://dart.dev/guides/language/language-tour).
  *
- * Also, see [dart:core - Numbers, Collections, Strings, and
- * More](https://www.dartlang.org/docs/dart-up-and-running/ch03.html#dartcore---numbers-collections-strings-and-more)
- * for more coverage of classes in this package.
+ * Also, see
+ * [dart:core - numbers, collections, strings, and more](https://dart.dev/guides/libraries/library-tour#dartcore---numbers-collections-strings-and-more)
+ * for more coverage of types in this library.
  *
- * The
- * [Dart Language Specification](http://www.dartlang.org/docs/spec/)
+ * The [Dart Language Specification](https://dart.dev/guides/language/spec)
  * provides technical details.
  *
  * {@category Core}
diff --git a/sdk/lib/core/function.dart b/sdk/lib/core/function.dart
index b21f6759..e560eb4 100644
--- a/sdk/lib/core/function.dart
+++ b/sdk/lib/core/function.dart
@@ -7,8 +7,8 @@
 /**
  * The base class for all function types.
  *
- * A function value, or an instance of a class with a "call" method, is a
- * subtype of a function type, and as such, a subtype of [Function].
+ * The run-time type of a function object is subtype of a function type,
+ * and as such, a subtype of [Function].
  */
 abstract class Function {
   /**
diff --git a/sdk/lib/core/iterator.dart b/sdk/lib/core/iterator.dart
index f116c1b..e9a6284 100644
--- a/sdk/lib/core/iterator.dart
+++ b/sdk/lib/core/iterator.dart
@@ -30,8 +30,8 @@
  *     }
  *
  * **See also:**
- * [Iteration](http://www.dartlang.org/docs/dart-up-and-running/contents/ch03.html#iteration)
- * in the [library tour](http://www.dartlang.org/docs/dart-up-and-running/contents/ch03.html)
+ * [Iteration](https://dart.dev/guides/libraries/library-tour#iteration)
+ * in the [library tour](https://dart.dev/guides/libraries/library-tour)
  */
 abstract class Iterator<E> {
   /**
diff --git a/sdk/lib/core/object.dart b/sdk/lib/core/object.dart
index 31602df..0f7d97b 100644
--- a/sdk/lib/core/object.dart
+++ b/sdk/lib/core/object.dart
@@ -14,9 +14,9 @@
  * to return a string describing an instance of that class.
  * You might also need to define [hashCode] and [operator ==], as described in the
  * [Implementing map
- * keys](https://www.dartlang.org/docs/dart-up-and-running/ch03.html#implementing-map-keys)
+ * keys](https://dart.dev/guides/libraries/library-tour#implementing-map-keys)
  * section of the [library
- * tour](http://www.dartlang.org/docs/dart-up-and-running/contents/ch03.html).
+ * tour](https://dart.dev/guides/libraries/library-tour).
  */
 @pragma("vm:entry-point")
 class Object {
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index 4a353b2..7bef81c 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -93,9 +93,7 @@
  *
  * Also see:
  *
- * * [Dart Cookbook](https://www.dartlang.org/docs/cookbook/#strings)
- *   for String examples and recipes.
- * * [Dart Up and Running](https://www.dartlang.org/docs/dart-up-and-running/ch03.html#strings-and-regular-expressions)
+ * * [Strings and regular expressions](https://dart.dev/guides/libraries/library-tour#strings-and-regular-expressions)
  */
 @pragma('vm:entry-point')
 abstract class String implements Comparable<String>, Pattern {
diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart
index 234241c..998cb83 100644
--- a/sdk/lib/core/uri.dart
+++ b/sdk/lib/core/uri.dart
@@ -32,8 +32,8 @@
  * * [URIs][uris] in the [library tour][libtour]
  * * [RFC-3986](http://tools.ietf.org/html/rfc3986)
  *
- * [uris]: https://www.dartlang.org/docs/dart-up-and-running/ch03.html#uris
- * [libtour]: https://www.dartlang.org/docs/dart-up-and-running/contents/ch03.html
+ * [uris]: https://dart.dev/guides/libraries/library-tour#uris
+ * [libtour]: https://dart.dev/guides/libraries/library-tour
  */
 abstract class Uri {
   /**
@@ -3256,7 +3256,7 @@
       bool base64 = false}) {
     StringBuffer buffer = StringBuffer();
     List<int> indices = [_noScheme];
-    String? charsetName = parameters?.["charset"];
+    String? charsetName = parameters?["charset"];
     String? encodingName;
     if (encoding == null) {
       if (charsetName != null) {
diff --git a/sdk/lib/ffi/dynamic_library.dart b/sdk/lib/ffi/dynamic_library.dart
index d11c945..bcfa586 100644
--- a/sdk/lib/ffi/dynamic_library.dart
+++ b/sdk/lib/ffi/dynamic_library.dart
@@ -20,6 +20,10 @@
   /// Loads a dynamic library file with local visibility.
   ///
   /// Throws an [ArgumentError] if loading the dynamic library fails.
+  ///
+  /// Calling this function multiple times, even in different isolates, returns
+  /// objects which are equal but not identical. The underlying library is only
+  /// loaded once into the DartVM by the OS.
   external factory DynamicLibrary.open(String name);
 
   /// Looks up a symbol in the [DynamicLibrary] and returns its address in
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index a3bcc02..4842c30 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -486,9 +486,9 @@
   static AccessibleNodeList _create_2() =>
       JS('AccessibleNodeList', 'new AccessibleNodeList()');
 
-  int get length native;
+  int? get length native;
 
-  set length(int value) native;
+  set length(int? value) native;
 
   void __setter__(int index, AccessibleNode node) native;
 
@@ -550,17 +550,17 @@
    */
   AnchorElement.created() : super.created();
 
-  String get download native;
+  String? get download native;
 
-  set download(String value) native;
+  set download(String? value) native;
 
   String get hreflang native;
 
   set hreflang(String value) native;
 
-  String get referrerPolicy native;
+  String? get referrerPolicy native;
 
-  set referrerPolicy(String value) native;
+  set referrerPolicy(String? value) native;
 
   String get rel native;
 
@@ -576,47 +576,47 @@
 
   // From HTMLHyperlinkElementUtils
 
-  String get hash native;
+  String? get hash native;
 
-  set hash(String value) native;
+  set hash(String? value) native;
 
-  String get host native;
+  String? get host native;
 
-  set host(String value) native;
+  set host(String? value) native;
 
-  String get hostname native;
+  String? get hostname native;
 
-  set hostname(String value) native;
+  set hostname(String? value) native;
 
-  String get href native;
+  String? get href native;
 
-  set href(String value) native;
+  set href(String? value) native;
 
-  String get origin native;
+  String? get origin native;
 
-  String get password native;
+  String? get password native;
 
-  set password(String value) native;
+  set password(String? value) native;
 
-  String get pathname native;
+  String? get pathname native;
 
-  set pathname(String value) native;
+  set pathname(String? value) native;
 
-  String get port native;
+  String? get port native;
 
-  set port(String value) native;
+  set port(String? value) native;
 
-  String get protocol native;
+  String? get protocol native;
 
-  set protocol(String value) native;
+  set protocol(String? value) native;
 
-  String get search native;
+  String? get search native;
 
-  set search(String value) native;
+  set search(String? value) native;
 
-  String get username native;
+  String? get username native;
 
-  set username(String value) native;
+  set username(String? value) native;
 
   String toString() => JS('String', 'String(#)', this);
 }
@@ -667,15 +667,15 @@
   Future<Animation> get finished =>
       promiseToFuture<Animation>(JS("", "#.finished", this));
 
-  String get id native;
+  String? get id native;
 
-  set id(String value) native;
+  set id(String? value) native;
 
-  String get playState native;
+  String? get playState native;
 
-  num get playbackRate native;
+  num? get playbackRate native;
 
-  set playbackRate(num value) native;
+  set playbackRate(num? value) native;
 
   Future<Animation> get ready =>
       promiseToFuture<Animation>(JS("", "#.ready", this));
@@ -711,7 +711,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  AnimationEffectTimingReadOnly get timing native;
+  AnimationEffectTimingReadOnly? get timing native;
 
   Map getComputedTiming() {
     return convertNativeToDart_Dictionary(_getComputedTiming_1())!;
@@ -733,15 +733,15 @@
 
   // Shadowing definition.
 
-  num get delay native;
+  num? get delay native;
 
-  set delay(num value) native;
+  set delay(num? value) native;
 
   // Shadowing definition.
 
-  String get direction native;
+  String? get direction native;
 
-  set direction(String value) native;
+  set direction(String? value) native;
 
   // Shadowing definition.
 
@@ -752,33 +752,33 @@
 
   // Shadowing definition.
 
-  String get easing native;
+  String? get easing native;
 
-  set easing(String value) native;
+  set easing(String? value) native;
 
   // Shadowing definition.
 
-  num get endDelay native;
+  num? get endDelay native;
 
-  set endDelay(num value) native;
+  set endDelay(num? value) native;
 
   // Shadowing definition.
 
-  String get fill native;
+  String? get fill native;
 
-  set fill(String value) native;
+  set fill(String? value) native;
 
   // Shadowing definition.
 
-  num get iterationStart native;
+  num? get iterationStart native;
 
-  set iterationStart(num value) native;
+  set iterationStart(num? value) native;
 
   // Shadowing definition.
 
-  num get iterations native;
+  num? get iterations native;
 
-  set iterations(num value) native;
+  set iterations(num? value) native;
 }
 // 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
@@ -791,21 +791,21 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get delay native;
+  num? get delay native;
 
-  String get direction native;
+  String? get direction native;
 
   Object? get duration native;
 
-  String get easing native;
+  String? get easing native;
 
-  num get endDelay native;
+  num? get endDelay native;
 
-  String get fill native;
+  String? get fill native;
 
-  num get iterationStart native;
+  num? get iterationStart native;
 
-  num get iterations native;
+  num? get iterations native;
 }
 // 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
@@ -830,9 +830,9 @@
   static AnimationEvent _create_2(type) =>
       JS('AnimationEvent', 'new AnimationEvent(#)', type);
 
-  String get animationName native;
+  String? get animationName native;
 
-  num get elapsedTime native;
+  num? get elapsedTime native;
 }
 // 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
@@ -997,7 +997,7 @@
 
   static const int UPDATEREADY = 4;
 
-  int get status native;
+  int? get status native;
 
   void abort() native;
 
@@ -1055,13 +1055,13 @@
   static ApplicationCacheErrorEvent _create_2(type) => JS(
       'ApplicationCacheErrorEvent', 'new ApplicationCacheErrorEvent(#)', type);
 
-  String get message native;
+  String? get message native;
 
-  String get reason native;
+  String? get reason native;
 
-  int get status native;
+  int? get status native;
 
-  String get url native;
+  String? get url native;
 }
 // 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
@@ -1104,13 +1104,13 @@
 
   set coords(String value) native;
 
-  String get download native;
+  String? get download native;
 
-  set download(String value) native;
+  set download(String? value) native;
 
-  String get referrerPolicy native;
+  String? get referrerPolicy native;
 
-  set referrerPolicy(String value) native;
+  set referrerPolicy(String? value) native;
 
   String get rel native;
 
@@ -1126,47 +1126,47 @@
 
   // From HTMLHyperlinkElementUtils
 
-  String get hash native;
+  String? get hash native;
 
-  set hash(String value) native;
+  set hash(String? value) native;
 
-  String get host native;
+  String? get host native;
 
-  set host(String value) native;
+  set host(String? value) native;
 
-  String get hostname native;
+  String? get hostname native;
 
-  set hostname(String value) native;
+  set hostname(String? value) native;
 
-  String get href native;
+  String? get href native;
 
-  set href(String value) native;
+  set href(String? value) native;
 
-  String get origin native;
+  String? get origin native;
 
-  String get password native;
+  String? get password native;
 
-  set password(String value) native;
+  set password(String? value) native;
 
-  String get pathname native;
+  String? get pathname native;
 
-  set pathname(String value) native;
+  set pathname(String? value) native;
 
-  String get port native;
+  String? get port native;
 
-  set port(String value) native;
+  set port(String? value) native;
 
-  String get protocol native;
+  String? get protocol native;
 
-  set protocol(String value) native;
+  set protocol(String? value) native;
 
-  String get search native;
+  String? get search native;
 
-  set search(String value) native;
+  set search(String? value) native;
 
-  String get username native;
+  String? get username native;
 
-  set username(String value) native;
+  set username(String? value) native;
 
   String toString() => JS('String', 'String(#)', this);
 }
@@ -1204,9 +1204,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  ByteBuffer get authenticatorData native;
+  ByteBuffer? get authenticatorData native;
 
-  ByteBuffer get signature native;
+  ByteBuffer? get signature native;
 }
 // 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
@@ -1219,7 +1219,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  ByteBuffer get attestationObject native;
+  ByteBuffer? get attestationObject native;
 }
 // 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
@@ -1233,7 +1233,7 @@
   }
 
   @JSName('clientDataJSON')
-  ByteBuffer get clientDataJson native;
+  ByteBuffer? get clientDataJson native;
 }
 // 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
@@ -1279,7 +1279,7 @@
       type,
       init);
 
-  String get state native;
+  String? get state native;
 }
 // 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
@@ -1299,7 +1299,7 @@
   static BackgroundFetchEvent _create_1(type, init) =>
       JS('BackgroundFetchEvent', 'new BackgroundFetchEvent(#,#)', type, init);
 
-  String get id native;
+  String? get id native;
 }
 // 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
@@ -1322,7 +1322,7 @@
       type,
       init);
 
-  List<BackgroundFetchSettledFetch> get fetches native;
+  List<BackgroundFetchSettledFetch>? get fetches native;
 }
 // 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
@@ -1335,7 +1335,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  _Request get request native;
+  _Request? get request native;
 }
 // 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
@@ -1376,19 +1376,19 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get downloadTotal native;
+  int? get downloadTotal native;
 
-  int get downloaded native;
+  int? get downloaded native;
 
-  String get id native;
+  String? get id native;
 
-  String get title native;
+  String? get title native;
 
-  int get totalDownloadSize native;
+  int? get totalDownloadSize native;
 
-  int get uploadTotal native;
+  int? get uploadTotal native;
 
-  int get uploaded native;
+  int? get uploaded native;
 
   Future<bool> abort() => promiseToFuture<bool>(JS("", "#.abort()", this));
 }
@@ -1432,7 +1432,7 @@
   static BackgroundFetchedEvent _create_1(type, init) => JS(
       'BackgroundFetchedEvent', 'new BackgroundFetchedEvent(#,#)', type, init);
 
-  List<BackgroundFetchSettledFetch> get fetches native;
+  List<BackgroundFetchSettledFetch>? get fetches native;
 
   Future updateUI(String title) =>
       promiseToFuture(JS("", "#.updateUI(#)", this, title));
@@ -1450,7 +1450,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get visible native;
+  bool? get visible native;
 }
 // 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
@@ -1514,13 +1514,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get charging native;
+  bool? get charging native;
 
-  num get chargingTime native;
+  num? get chargingTime native;
 
-  num get dischargingTime native;
+  num? get dischargingTime native;
 
-  num get level native;
+  num? get level native;
 }
 // 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
@@ -1548,7 +1548,7 @@
   static BeforeInstallPromptEvent _create_2(type) =>
       JS('BeforeInstallPromptEvent', 'new BeforeInstallPromptEvent(#)', type);
 
-  List<String> get platforms native;
+  List<String>? get platforms native;
 
   Future<Map<String, dynamic>?> get userChoice =>
       promiseToFutureAsMap(JS("", "#.userChoice", this));
@@ -1568,9 +1568,9 @@
 
   // Shadowing definition.
 
-  String get returnValue native;
+  String? get returnValue native;
 
-  set returnValue(String value) native;
+  set returnValue(String? value) native;
 }
 // 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
@@ -1635,9 +1635,9 @@
   static BlobEvent _create_1(type, eventInitDict) =>
       JS('BlobEvent', 'new BlobEvent(#,#)', type, eventInitDict);
 
-  Blob get data native;
+  Blob? get data native;
 
-  num get timecode native;
+  num? get timecode native;
 }
 // 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
@@ -1650,9 +1650,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  _BluetoothRemoteGATTCharacteristic get characteristic native;
+  _BluetoothRemoteGATTCharacteristic? get characteristic native;
 
-  String get uuid native;
+  String? get uuid native;
 
   ByteData? get value native;
 
@@ -1672,7 +1672,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get bodyUsed native;
+  bool? get bodyUsed native;
 
   Future arrayBuffer() => promiseToFuture(JS("", "#.arrayBuffer()", this));
 
@@ -1877,7 +1877,7 @@
   static BroadcastChannel _create_1(name) =>
       JS('BroadcastChannel', 'new BroadcastChannel(#)', name);
 
-  String get name native;
+  String? get name native;
 
   void close() native;
 
@@ -1896,9 +1896,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get budgetAt native;
+  num? get budgetAt native;
 
-  int get time native;
+  int? get time native;
 }
 // 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
@@ -1933,9 +1933,9 @@
 
   FormElement? get form native;
 
-  String get formAction native;
+  String? get formAction native;
 
-  set formAction(String value) native;
+  set formAction(String? value) native;
 
   String get formEnctype native;
 
@@ -1956,7 +1956,7 @@
   @Unstable()
   @Returns('NodeList')
   @Creates('NodeList')
-  List<Node> get labels native;
+  List<Node>? get labels native;
 
   String get name native;
 
@@ -2047,13 +2047,13 @@
       type,
       eventInitDict);
 
-  List get methodData native;
+  List? get methodData native;
 
-  List get modifiers native;
+  List? get modifiers native;
 
-  String get paymentRequestOrigin native;
+  String? get paymentRequestOrigin native;
 
-  String get topLevelOrigin native;
+  String? get topLevelOrigin native;
 
   void respondWith(Future canMakePaymentResponse) native;
 }
@@ -2068,7 +2068,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  CanvasElement get canvas native;
+  CanvasElement? get canvas native;
 
   void requestFrame() native;
 }
@@ -2367,13 +2367,13 @@
 
   CanvasElement get canvas native;
 
-  Matrix get currentTransform native;
+  Matrix? get currentTransform native;
 
-  set currentTransform(Matrix value) native;
+  set currentTransform(Matrix? value) native;
 
-  String get direction native;
+  String? get direction native;
 
-  set direction(String value) native;
+  set direction(String? value) native;
 
   @Creates('String|CanvasGradient|CanvasPattern')
   @Returns('String|CanvasGradient|CanvasPattern')
@@ -2381,9 +2381,9 @@
 
   set fillStyle(Object? value) native;
 
-  String get filter native;
+  String? get filter native;
 
-  set filter(String value) native;
+  set filter(String? value) native;
 
   String get font native;
 
@@ -2408,13 +2408,13 @@
    *   from WHATWG.
    */
 
-  bool get imageSmoothingEnabled native;
+  bool? get imageSmoothingEnabled native;
 
-  set imageSmoothingEnabled(bool value) native;
+  set imageSmoothingEnabled(bool? value) native;
 
-  String get imageSmoothingQuality native;
+  String? get imageSmoothingQuality native;
 
-  set imageSmoothingQuality(String value) native;
+  set imageSmoothingQuality(String? value) native;
 
   String get lineCap native;
 
@@ -2976,11 +2976,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get data native;
+  String? get data native;
 
-  set data(String value) native;
+  set data(String? value) native;
 
-  int get length native;
+  int? get length native;
 
   void appendData(String data) native;
 
@@ -3031,13 +3031,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get frameType native;
+  String? get frameType native;
 
-  String get id native;
+  String? get id native;
 
-  String get type native;
+  String? get type native;
 
-  String get url native;
+  String? get url native;
 
   void postMessage(Object message, [List<Object>? transfer]) native;
 }
@@ -3116,11 +3116,11 @@
   static CloseEvent _create_2(type) =>
       JS('CloseEvent', 'new CloseEvent(#)', type);
 
-  int get code native;
+  int? get code native;
 
-  String get reason native;
+  String? get reason native;
 
-  bool get wasClean native;
+  bool? get wasClean native;
 }
 // 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
@@ -3180,7 +3180,7 @@
   static CompositionEvent _create_2(type) =>
       JS('CompositionEvent', 'new CompositionEvent(#)', type);
 
-  String get data native;
+  String? get data native;
 
   @JSName('initCompositionEvent')
   void _initCompositionEvent(String? type, bool? bubbles, bool? cancelable,
@@ -3210,9 +3210,9 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => Element.isTagSupported('content');
 
-  String get select native;
+  String? get select native;
 
-  set select(String value) native;
+  set select(String? value) native;
 
   @Returns('NodeList')
   @Creates('NodeList')
@@ -3257,7 +3257,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get accuracy native;
+  num? get accuracy native;
 
   num? get altitude native;
 
@@ -3265,9 +3265,9 @@
 
   num? get heading native;
 
-  num get latitude native;
+  num? get latitude native;
 
-  num get longitude native;
+  num? get longitude native;
 
   num? get speed native;
 }
@@ -3282,9 +3282,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get id native;
+  String? get id native;
 
-  String get type native;
+  String? get type native;
 }
 // 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
@@ -3298,9 +3298,9 @@
   }
 
   @JSName('iconURL')
-  String get iconUrl native;
+  String? get iconUrl native;
 
-  String get name native;
+  String? get name native;
 }
 // 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
@@ -3359,7 +3359,7 @@
   static bool get supported =>
       JS('bool', '!!(window.crypto && window.crypto.getRandomValues)');
 
-  _SubtleCrypto get subtle native;
+  _SubtleCrypto? get subtle native;
 
   @JSName('getRandomValues')
   @Creates('TypedData')
@@ -3378,13 +3378,13 @@
   }
 
   @Creates('Null')
-  Object get algorithm native;
+  Object? get algorithm native;
 
-  bool get extractable native;
+  bool? get extractable native;
 
-  String get type native;
+  String? get type native;
 
-  Object get usages native;
+  Object? get usages native;
 }
 // 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
@@ -3397,7 +3397,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  static _Worklet get paintWorklet native;
+  static _Worklet? get paintWorklet native;
 
   static CssUnitValue Hz(num value) native;
 
@@ -3483,9 +3483,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get encoding native;
+  String? get encoding native;
 
-  set encoding(String value) native;
+  set encoding(String? value) native;
 }
 // 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
@@ -3498,7 +3498,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get conditionText native;
+  String? get conditionText native;
 }
 // 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
@@ -3511,7 +3511,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  CssStyleDeclaration get style native;
+  CssStyleDeclaration? get style native;
 }
 // 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
@@ -3526,7 +3526,7 @@
 
   @Returns('_CssRuleList')
   @Creates('_CssRuleList')
-  List<CssRule> get cssRules native;
+  List<CssRule>? get cssRules native;
 
   void deleteRule(int index) native;
 
@@ -3560,11 +3560,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get href native;
+  String? get href native;
 
-  MediaList get media native;
+  MediaList? get media native;
 
-  CssStyleSheet get styleSheet native;
+  CssStyleSheet? get styleSheet native;
 }
 // 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
@@ -3577,11 +3577,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get keyText native;
+  String? get keyText native;
 
-  set keyText(String value) native;
+  set keyText(String? value) native;
 
-  CssStyleDeclaration get style native;
+  CssStyleDeclaration? get style native;
 }
 // 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
@@ -3596,11 +3596,11 @@
 
   @Returns('_CssRuleList')
   @Creates('_CssRuleList')
-  List<CssRule> get cssRules native;
+  List<CssRule>? get cssRules native;
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
   CssKeyframeRule __getter__(int index) native;
 
@@ -3627,9 +3627,9 @@
   static CssKeywordValue _create_1(keyword) =>
       JS('CssKeywordValue', 'new CSSKeywordValue(#)', keyword);
 
-  String get value native;
+  String? get value native;
 
-  set value(String value) native;
+  set value(String? value) native;
 }
 // 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
@@ -3654,9 +3654,9 @@
   static CssMatrixComponent _create_2(matrix) =>
       JS('CssMatrixComponent', 'new CSSMatrixComponent(#)', matrix);
 
-  DomMatrix get matrix native;
+  DomMatrix? get matrix native;
 
-  set matrix(DomMatrix value) native;
+  set matrix(DomMatrix? value) native;
 }
 // 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
@@ -3669,7 +3669,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  MediaList get media native;
+  MediaList? get media native;
 }
 // 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
@@ -3683,9 +3683,9 @@
   }
 
   @JSName('namespaceURI')
-  String get namespaceUri native;
+  String? get namespaceUri native;
 
-  String get prefix native;
+  String? get prefix native;
 }
 // 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
@@ -3721,11 +3721,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get selectorText native;
+  String? get selectorText native;
 
-  set selectorText(String value) native;
+  set selectorText(String? value) native;
 
-  CssStyleDeclaration get style native;
+  CssStyleDeclaration? get style native;
 }
 // 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
@@ -3744,9 +3744,9 @@
   static CssPerspective _create_1(length) =>
       JS('CssPerspective', 'new CSSPerspective(#)', length);
 
-  CssNumericValue get length native;
+  CssNumericValue? get length native;
 
-  set length(CssNumericValue value) native;
+  set length(CssNumericValue? value) native;
 }
 // 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
@@ -3765,13 +3765,13 @@
   static CssPositionValue _create_1(x, y) =>
       JS('CssPositionValue', 'new CSSPositionValue(#,#)', x, y);
 
-  CssNumericValue get x native;
+  CssNumericValue? get x native;
 
-  set x(CssNumericValue value) native;
+  set x(CssNumericValue? value) native;
 
-  CssNumericValue get y native;
+  CssNumericValue? get y native;
 
-  set y(CssNumericValue value) native;
+  set y(CssNumericValue? value) native;
 }
 // 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
@@ -3784,7 +3784,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get state native;
+  String? get state native;
 }
 // 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
@@ -3818,21 +3818,21 @@
   static CssRotation _create_2(angleValue_OR_x, y, z, angle) => JS(
       'CssRotation', 'new CSSRotation(#,#,#,#)', angleValue_OR_x, y, z, angle);
 
-  CssNumericValue get angle native;
+  CssNumericValue? get angle native;
 
-  set angle(CssNumericValue value) native;
+  set angle(CssNumericValue? value) native;
 
-  num get x native;
+  num? get x native;
 
-  set x(num value) native;
+  set x(num? value) native;
 
-  num get y native;
+  num? get y native;
 
-  set y(num value) native;
+  set y(num? value) native;
 
-  num get z native;
+  num? get z native;
 
-  set z(num value) native;
+  set z(num? value) native;
 }
 // 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
@@ -3867,15 +3867,15 @@
 
   static const int VIEWPORT_RULE = 15;
 
-  String get cssText native;
+  String? get cssText native;
 
-  set cssText(String value) native;
+  set cssText(String? value) native;
 
   CssRule? get parentRule native;
 
   CssStyleSheet? get parentStyleSheet native;
 
-  int get type native;
+  int? get type native;
 }
 // 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
@@ -3901,17 +3901,17 @@
   static CssScale _create_2(x, y, z) =>
       JS('CssScale', 'new CSSScale(#,#,#)', x, y, z);
 
-  num get x native;
+  num? get x native;
 
-  set x(num value) native;
+  set x(num? value) native;
 
-  num get y native;
+  num? get y native;
 
-  set y(num value) native;
+  set y(num? value) native;
 
-  num get z native;
+  num? get z native;
 
-  set z(num value) native;
+  set z(num? value) native;
 }
 // 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
@@ -3929,13 +3929,13 @@
   }
   static CssSkew _create_1(ax, ay) => JS('CssSkew', 'new CSSSkew(#,#)', ax, ay);
 
-  CssNumericValue get ax native;
+  CssNumericValue? get ax native;
 
-  set ax(CssNumericValue value) native;
+  set ax(CssNumericValue? value) native;
 
-  CssNumericValue get ay native;
+  CssNumericValue? get ay native;
 
-  set ay(CssNumericValue value) native;
+  set ay(CssNumericValue? value) native;
 }
 
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
@@ -4048,13 +4048,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get cssFloat native;
+  String? get cssFloat native;
 
   set cssFloat(String? value) native;
 
-  String get cssText native;
+  String? get cssText native;
 
-  set cssText(String value) native;
+  set cssText(String? value) native;
 
   int get length native;
 
@@ -8699,7 +8699,7 @@
 
   @Returns('_CssRuleList')
   @Creates('_CssRuleList')
-  List<CssRule> get rules native;
+  List<CssRule>? get rules native;
 
   int addRule(String? selector, String? style, [int? index]) native;
 
@@ -8744,9 +8744,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get is2D native;
+  bool? get is2D native;
 
-  set is2D(bool value) native;
+  set is2D(bool? value) native;
 }
 // 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
@@ -8774,9 +8774,9 @@
   static CssTransformValue _create_2(transformComponents) =>
       JS('CssTransformValue', 'new CSSTransformValue(#)', transformComponents);
 
-  bool get is2D native;
+  bool? get is2D native;
 
-  int get length native;
+  int? get length native;
 
   CssTransformComponent componentAtIndex(int index) native;
 
@@ -8810,17 +8810,17 @@
   static CssTranslation _create_2(x, y, z) =>
       JS('CssTranslation', 'new CSSTranslation(#,#,#)', x, y, z);
 
-  CssNumericValue get x native;
+  CssNumericValue? get x native;
 
-  set x(CssNumericValue value) native;
+  set x(CssNumericValue? value) native;
 
-  CssNumericValue get y native;
+  CssNumericValue? get y native;
 
-  set y(CssNumericValue value) native;
+  set y(CssNumericValue? value) native;
 
-  CssNumericValue get z native;
+  CssNumericValue? get z native;
 
-  set z(CssNumericValue value) native;
+  set z(CssNumericValue? value) native;
 }
 // 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
@@ -8839,15 +8839,15 @@
   static CssUnitValue _create_1(value, unit) =>
       JS('CssUnitValue', 'new CSSUnitValue(#,#)', value, unit);
 
-  String get type native;
+  String? get type native;
 
-  String get unit native;
+  String? get unit native;
 
-  set unit(String value) native;
+  set unit(String? value) native;
 
-  num get value native;
+  num? get value native;
 
-  set value(num value) native;
+  set value(num? value) native;
 }
 // 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
@@ -8860,7 +8860,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get length native;
+  int? get length native;
 
   Object? fragmentAtIndex(int index) native;
 }
@@ -8875,9 +8875,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  CssUnparsedValue get fallback native;
+  CssUnparsedValue? get fallback native;
 
-  String get variable native;
+  String? get variable native;
 }
 // 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
@@ -8890,7 +8890,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  CssStyleDeclaration get style native;
+  CssStyleDeclaration? get style native;
 }
 // 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
@@ -8909,7 +8909,7 @@
   static CssurlImageValue _create_1(url) =>
       JS('CssurlImageValue', 'new CSSURLImageValue(#)', url);
 
-  String get url native;
+  String? get url native;
 }
 // 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
@@ -9053,9 +9053,9 @@
    */
   DataElement.created() : super.created();
 
-  String get value native;
+  String? get value native;
 
-  set value(String value) native;
+  set value(String? value) native;
 }
 // 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
@@ -9086,7 +9086,7 @@
 
   @Returns('HtmlCollection')
   @Creates('HtmlCollection')
-  List<Node> get options native;
+  List<Node>? get options native;
 }
 // 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
@@ -9104,21 +9104,21 @@
   }
   static DataTransfer _create_1() => JS('DataTransfer', 'new DataTransfer()');
 
-  String get dropEffect native;
+  String? get dropEffect native;
 
-  set dropEffect(String value) native;
+  set dropEffect(String? value) native;
 
-  String get effectAllowed native;
+  String? get effectAllowed native;
 
-  set effectAllowed(String value) native;
+  set effectAllowed(String? value) native;
 
   @Returns('FileList')
   @Creates('FileList')
-  List<File> get files native;
+  List<File>? get files native;
 
-  DataTransferItemList get items native;
+  DataTransferItemList? get items native;
 
-  List<String> get types native;
+  List<String>? get types native;
 
   void clearData([String? format]) native;
 
@@ -9137,9 +9137,9 @@
   Entry getAsEntry() {
     Entry entry = _webkitGetAsEntry() as Entry;
 
-    if (entry.isFile)
+    if (entry.isFile!)
       applyExtension('FileEntry', entry);
-    else if (entry.isDirectory)
+    else if (entry.isDirectory!)
       applyExtension('DirectoryEntry', entry);
     else
       applyExtension('Entry', entry);
@@ -9152,9 +9152,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get kind native;
+  String? get kind native;
 
-  String get type native;
+  String? get type native;
 
   File? getAsFile() native;
 
@@ -9174,7 +9174,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get length native;
+  int? get length native;
 
   DataTransferItem? add(data_OR_file, [String? type]) native;
 
@@ -9341,11 +9341,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get lineNumber native;
+  int? get lineNumber native;
 
-  String get message native;
+  String? get message native;
 
-  String get sourceFile native;
+  String? get sourceFile native;
 }
 // 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
@@ -9372,9 +9372,9 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => Element.isTagSupported('details');
 
-  bool get open native;
+  bool? get open native;
 
-  set open(bool value) native;
+  set open(bool? value) native;
 }
 // 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
@@ -9393,11 +9393,11 @@
   static DetectedBarcode _create_1() =>
       JS('DetectedBarcode', 'new DetectedBarcode()');
 
-  Rectangle get boundingBox native;
+  Rectangle? get boundingBox native;
 
-  List get cornerPoints native;
+  List? get cornerPoints native;
 
-  String get rawValue native;
+  String? get rawValue native;
 }
 // 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
@@ -9415,9 +9415,9 @@
   }
   static DetectedFace _create_1() => JS('DetectedFace', 'new DetectedFace()');
 
-  Rectangle get boundingBox native;
+  Rectangle? get boundingBox native;
 
-  List get landmarks native;
+  List? get landmarks native;
 }
 // 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
@@ -9435,11 +9435,11 @@
   }
   static DetectedText _create_1() => JS('DetectedText', 'new DetectedText()');
 
-  Rectangle get boundingBox native;
+  Rectangle? get boundingBox native;
 
-  List get cornerPoints native;
+  List? get cornerPoints native;
 
-  String get rawValue native;
+  String? get rawValue native;
 }
 // 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
@@ -9485,7 +9485,7 @@
 
   DeviceAcceleration? get accelerationIncludingGravity native;
 
-  num get interval native;
+  num? get interval native;
 
   DeviceRotationRate? get rotationRate native;
 }
@@ -9515,7 +9515,7 @@
   static DeviceOrientationEvent _create_2(type) =>
       JS('DeviceOrientationEvent', 'new DeviceOrientationEvent(#)', type);
 
-  bool get absolute native;
+  bool? get absolute native;
 
   num? get alpha native;
 
@@ -9558,13 +9558,13 @@
    */
   DialogElement.created() : super.created();
 
-  bool get open native;
+  bool? get open native;
 
-  set open(bool value) native;
+  set open(bool? value) native;
 
-  String get returnValue native;
+  String? get returnValue native;
 
-  set returnValue(String value) native;
+  set returnValue(String? value) native;
 
   void close([String? returnValue]) native;
 
@@ -9754,9 +9754,9 @@
       values.forEach((value) {
         applyExtension('Entry', value);
         Entry entry = value as Entry;
-        if (entry.isFile)
+        if (entry.isFile!)
           applyExtension('FileEntry', entry);
-        else if (entry.isDirectory) applyExtension('DirectoryEntry', entry);
+        else if (entry.isDirectory!) applyExtension('DirectoryEntry', entry);
       });
       completer.complete(new List<Entry>.from(values));
     }, (error) {
@@ -9871,7 +9871,7 @@
   }
   static Document _create_1() => JS('Document', 'new Document()');
 
-  String get addressSpace native;
+  String? get addressSpace native;
 
   @JSName('body')
   HtmlElement? get _body native;
@@ -9879,11 +9879,11 @@
   @JSName('body')
   set _body(HtmlElement? value) native;
 
-  String get contentType native;
+  String? get contentType native;
 
-  String get cookie native;
+  String? get cookie native;
 
-  set cookie(String value) native;
+  set cookie(String? value) native;
 
   ScriptElement? get currentScript native;
 
@@ -9897,31 +9897,31 @@
 
   Element? get documentElement native;
 
-  String get domain native;
+  String? get domain native;
 
-  bool get fullscreenEnabled native;
+  bool? get fullscreenEnabled native;
 
   @JSName('head')
   HeadElement? get _head native;
 
-  bool get hidden native;
+  bool? get hidden native;
 
-  DomImplementation get implementation native;
+  DomImplementation? get implementation native;
 
   @JSName('lastModified')
-  String get _lastModified native;
+  String? get _lastModified native;
 
-  String get origin native;
+  String? get origin native;
 
   @JSName('preferredStylesheetSet')
   String? get _preferredStylesheetSet native;
 
-  String get readyState native;
+  String? get readyState native;
 
   @JSName('referrer')
   String get _referrer native;
 
-  SvgSvgElement get rootElement native;
+  SvgSvgElement? get rootElement native;
 
   Element? get rootScroller native;
 
@@ -9935,9 +9935,9 @@
   @JSName('selectedStylesheetSet')
   set _selectedStylesheetSet(String? value) native;
 
-  String get suborigin native;
+  String? get suborigin native;
 
-  DocumentTimeline get timeline native;
+  DocumentTimeline? get timeline native;
 
   @JSName('title')
   String get _title native;
@@ -9946,27 +9946,27 @@
   set _title(String value) native;
 
   @JSName('visibilityState')
-  String get _visibilityState native;
+  String? get _visibilityState native;
 
   @JSName('webkitFullscreenElement')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  Element get _webkitFullscreenElement native;
+  Element? get _webkitFullscreenElement native;
 
   @JSName('webkitFullscreenEnabled')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  bool get _webkitFullscreenEnabled native;
+  bool? get _webkitFullscreenEnabled native;
 
   @JSName('webkitHidden')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  bool get _webkitHidden native;
+  bool? get _webkitHidden native;
 
   @JSName('webkitVisibilityState')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  String get _webkitVisibilityState native;
+  String? get _webkitVisibilityState native;
 
   Node adoptNode(Node node) native;
 
@@ -10103,7 +10103,7 @@
   @JSName('styleSheets')
   @Returns('_StyleSheetList')
   @Creates('_StyleSheetList')
-  List<StyleSheet> get _styleSheets native;
+  List<StyleSheet>? get _styleSheets native;
 
   @JSName('elementFromPoint')
   Element? _elementFromPoint(int x, int y) native;
@@ -10112,7 +10112,7 @@
 
   // From FontFaceSource
 
-  FontFaceSet get fonts native;
+  FontFaceSet? get fonts native;
 
   // From ParentNode
 
@@ -10122,7 +10122,7 @@
   @JSName('children')
   @Returns('HtmlCollection')
   @Creates('HtmlCollection')
-  List<Node> get _children native;
+  List<Node>? get _children native;
 
   @JSName('firstElementChild')
   Element? get _firstElementChild native;
@@ -10498,7 +10498,10 @@
   ElementList<T> querySelectorAll<T extends Element>(String selectors) =>
       new _FrozenElementList<T>._wrap(_querySelectorAll(selectors));
 
-  String get innerHtml {
+  // innerHtml is marked as nullable, even though it is guaranteed to return a
+  // non-nullable, because ShadowRoot.innerHtml overrides it and can be
+  // incompatible.
+  String? get innerHtml {
     final e = new DivElement();
     e.append(this.clone(true));
     return e.innerHtml;
@@ -10591,7 +10594,7 @@
 
   @Returns('_StyleSheetList')
   @Creates('_StyleSheetList')
-  List<StyleSheet> get styleSheets native;
+  List<StyleSheet>? get styleSheets native;
 
   Element? elementFromPoint(int x, int y) native;
 
@@ -10643,9 +10646,9 @@
       JS('DomError', 'new DOMError(#,#)', name, message);
   static DomError _create_2(name) => JS('DomError', 'new DOMError(#)', name);
 
-  String get message native;
+  String? get message native;
 
-  String get name native;
+  String? get name native;
 }
 // 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
@@ -10703,7 +10706,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get message native;
+  String? get message native;
 
   String toString() => JS('String', 'String(#)', this);
 }
@@ -10764,135 +10767,135 @@
 
   // Shadowing definition.
 
-  num get a native;
+  num? get a native;
 
-  set a(num value) native;
+  set a(num? value) native;
 
   // Shadowing definition.
 
-  num get b native;
+  num? get b native;
 
-  set b(num value) native;
+  set b(num? value) native;
 
   // Shadowing definition.
 
-  num get c native;
+  num? get c native;
 
-  set c(num value) native;
+  set c(num? value) native;
 
   // Shadowing definition.
 
-  num get d native;
+  num? get d native;
 
-  set d(num value) native;
+  set d(num? value) native;
 
   // Shadowing definition.
 
-  num get e native;
+  num? get e native;
 
-  set e(num value) native;
+  set e(num? value) native;
 
   // Shadowing definition.
 
-  num get f native;
+  num? get f native;
 
-  set f(num value) native;
+  set f(num? value) native;
 
   // Shadowing definition.
 
-  num get m11 native;
+  num? get m11 native;
 
-  set m11(num value) native;
+  set m11(num? value) native;
 
   // Shadowing definition.
 
-  num get m12 native;
+  num? get m12 native;
 
-  set m12(num value) native;
+  set m12(num? value) native;
 
   // Shadowing definition.
 
-  num get m13 native;
+  num? get m13 native;
 
-  set m13(num value) native;
+  set m13(num? value) native;
 
   // Shadowing definition.
 
-  num get m14 native;
+  num? get m14 native;
 
-  set m14(num value) native;
+  set m14(num? value) native;
 
   // Shadowing definition.
 
-  num get m21 native;
+  num? get m21 native;
 
-  set m21(num value) native;
+  set m21(num? value) native;
 
   // Shadowing definition.
 
-  num get m22 native;
+  num? get m22 native;
 
-  set m22(num value) native;
+  set m22(num? value) native;
 
   // Shadowing definition.
 
-  num get m23 native;
+  num? get m23 native;
 
-  set m23(num value) native;
+  set m23(num? value) native;
 
   // Shadowing definition.
 
-  num get m24 native;
+  num? get m24 native;
 
-  set m24(num value) native;
+  set m24(num? value) native;
 
   // Shadowing definition.
 
-  num get m31 native;
+  num? get m31 native;
 
-  set m31(num value) native;
+  set m31(num? value) native;
 
   // Shadowing definition.
 
-  num get m32 native;
+  num? get m32 native;
 
-  set m32(num value) native;
+  set m32(num? value) native;
 
   // Shadowing definition.
 
-  num get m33 native;
+  num? get m33 native;
 
-  set m33(num value) native;
+  set m33(num? value) native;
 
   // Shadowing definition.
 
-  num get m34 native;
+  num? get m34 native;
 
-  set m34(num value) native;
+  set m34(num? value) native;
 
   // Shadowing definition.
 
-  num get m41 native;
+  num? get m41 native;
 
-  set m41(num value) native;
+  set m41(num? value) native;
 
   // Shadowing definition.
 
-  num get m42 native;
+  num? get m42 native;
 
-  set m42(num value) native;
+  set m42(num? value) native;
 
   // Shadowing definition.
 
-  num get m43 native;
+  num? get m43 native;
 
-  set m43(num value) native;
+  set m43(num? value) native;
 
   // Shadowing definition.
 
-  num get m44 native;
+  num? get m44 native;
 
-  set m44(num value) native;
+  set m44(num? value) native;
 
   static DomMatrix fromFloat32Array(Float32List array32) native;
 
@@ -10986,53 +10989,53 @@
   static DomMatrixReadOnly _create_2() =>
       JS('DomMatrixReadOnly', 'new DOMMatrixReadOnly()');
 
-  num get a native;
+  num? get a native;
 
-  num get b native;
+  num? get b native;
 
-  num get c native;
+  num? get c native;
 
-  num get d native;
+  num? get d native;
 
-  num get e native;
+  num? get e native;
 
-  num get f native;
+  num? get f native;
 
-  bool get is2D native;
+  bool? get is2D native;
 
-  bool get isIdentity native;
+  bool? get isIdentity native;
 
-  num get m11 native;
+  num? get m11 native;
 
-  num get m12 native;
+  num? get m12 native;
 
-  num get m13 native;
+  num? get m13 native;
 
-  num get m14 native;
+  num? get m14 native;
 
-  num get m21 native;
+  num? get m21 native;
 
-  num get m22 native;
+  num? get m22 native;
 
-  num get m23 native;
+  num? get m23 native;
 
-  num get m24 native;
+  num? get m24 native;
 
-  num get m31 native;
+  num? get m31 native;
 
-  num get m32 native;
+  num? get m32 native;
 
-  num get m33 native;
+  num? get m33 native;
 
-  num get m34 native;
+  num? get m34 native;
 
-  num get m41 native;
+  num? get m41 native;
 
-  num get m42 native;
+  num? get m42 native;
 
-  num get m43 native;
+  num? get m43 native;
 
-  num get m44 native;
+  num? get m44 native;
 
   DomMatrix flipX() native;
 
@@ -11168,27 +11171,27 @@
 
   // Shadowing definition.
 
-  num get w native;
+  num? get w native;
 
-  set w(num value) native;
+  set w(num? value) native;
 
   // Shadowing definition.
 
-  num get x native;
+  num? get x native;
 
-  set x(num value) native;
+  set x(num? value) native;
 
   // Shadowing definition.
 
-  num get y native;
+  num? get y native;
 
-  set y(num value) native;
+  set y(num? value) native;
 
   // Shadowing definition.
 
-  num get z native;
+  num? get z native;
 
-  set z(num value) native;
+  set z(num? value) native;
 
   static DomPoint fromPoint([Map? other]) {
     if (other != null) {
@@ -11240,13 +11243,13 @@
   static DomPointReadOnly _create_5() =>
       JS('DomPointReadOnly', 'new DOMPointReadOnly()');
 
-  num get w native;
+  num? get w native;
 
-  num get x native;
+  num? get x native;
 
-  num get y native;
+  num? get y native;
 
-  num get z native;
+  num? get z native;
 
   static DomPointReadOnly fromPoint([Map? other]) {
     if (other != null) {
@@ -11318,13 +11321,13 @@
   static DomQuad _create_4(p1) => JS('DomQuad', 'new DOMQuad(#)', p1);
   static DomQuad _create_5() => JS('DomQuad', 'new DOMQuad()');
 
-  DomPoint get p1 native;
+  DomPoint? get p1 native;
 
-  DomPoint get p2 native;
+  DomPoint? get p2 native;
 
-  DomPoint get p3 native;
+  DomPoint? get p3 native;
 
-  DomPoint get p4 native;
+  DomPoint? get p4 native;
 
   static DomQuad fromQuad([Map? other]) {
     if (other != null) {
@@ -11539,21 +11542,57 @@
   static DomRectReadOnly _create_5() =>
       JS('DomRectReadOnly', 'new DOMRectReadOnly()');
 
-  num get bottom native;
+  // The following getter is incompatible with some browsers but
+  // must be made non-nullable to match the overridden method.
 
-  num get height native;
+  @JSName('bottom')
+  num? get _bottom native;
 
-  num get left native;
+  num get bottom => _bottom!;
 
-  num get right native;
+  // The following getter is incompatible with some browsers but
+  // must be made non-nullable to match the overridden method.
 
-  num get top native;
+  @JSName('height')
+  num? get _height native;
 
-  num get width native;
+  num get height => _height!;
 
-  num get x native;
+  // The following getter is incompatible with some browsers but
+  // must be made non-nullable to match the overridden method.
 
-  num get y native;
+  @JSName('left')
+  num? get _left native;
+
+  num get left => _left!;
+
+  // The following getter is incompatible with some browsers but
+  // must be made non-nullable to match the overridden method.
+
+  @JSName('right')
+  num? get _right native;
+
+  num get right => _right!;
+
+  // The following getter is incompatible with some browsers but
+  // must be made non-nullable to match the overridden method.
+
+  @JSName('top')
+  num? get _top native;
+
+  num get top => _top!;
+
+  // The following getter is incompatible with some browsers but
+  // must be made non-nullable to match the overridden method.
+
+  @JSName('width')
+  num? get _width native;
+
+  num get width => _width!;
+
+  num? get x native;
+
+  num? get y native;
 
   static DomRectReadOnly fromRect([Map? other]) {
     if (other != null) {
@@ -11659,9 +11698,9 @@
 
   int get length native;
 
-  String get value native;
+  String? get value native;
 
-  set value(String value) native;
+  set value(String? value) native;
 
   void add(String tokens) native;
 
@@ -11722,6 +11761,10 @@
   Iterator<Element> get iterator => toList().iterator;
 
   void addAll(Iterable<Element> iterable) {
+    _addAll(_element, iterable);
+  }
+
+  static void _addAll(Element _element, Iterable<Element> iterable) {
     if (iterable is _ChildNodeListLazy) {
       iterable = new List.from(iterable);
     }
@@ -11775,6 +11818,10 @@
   }
 
   bool remove(Object? object) {
+    return _remove(_element, object);
+  }
+
+  static bool _remove(Element _element, Object? object) {
     if (object is Element) {
       Element element = object;
       if (identical(element.parentNode, _element)) {
@@ -11823,7 +11870,10 @@
     return result;
   }
 
-  Element get first {
+  Element get first => _first(_element);
+
+  @pragma('dart2js:noInline')
+  static Element _first(Element _element) {
     Element? result = _element._firstElementChild;
     if (result == null) throw new StateError("No elements");
     return result;
@@ -12965,6 +13015,16 @@
    */
   List<Element> get children => new _ChildrenElementList._wrap(this);
 
+  List<Node> get _children =>
+      // Element.children always returns the same list-like object which is a
+      // live view on the underlying DOM tree. So we can GVN it and remove it if
+      // unused.
+      JS(
+          'returns:HtmlCollection;creates:HtmlCollection;'
+              'depends:none;effects:none;gvn:true',
+          '#.children',
+          this);
+
   set children(List<Element> value) {
     // Copy list first since we don't want liveness during iteration.
     var copy = value.toList();
@@ -13105,7 +13165,7 @@
    * Gets the position of this element relative to the client area of the page.
    */
   Rectangle get client =>
-      new Rectangle(clientLeft, clientTop, clientWidth, clientHeight);
+      new Rectangle(clientLeft!, clientTop!, clientWidth, clientHeight);
 
   /**
    * Gets the offset of this element relative to its offsetParent.
@@ -13648,13 +13708,13 @@
     }
 
     if (_parseDocument == null) {
-      _parseDocument = document.implementation.createHtmlDocument('');
+      _parseDocument = document.implementation!.createHtmlDocument('');
       _parseRange = _parseDocument!.createRange();
 
       // Workaround for Safari bug. Was also previously Chrome bug 229142
       // - URIs are not resolved in new doc.
       BaseElement base = _parseDocument!.createElement('base') as BaseElement;
-      base.href = document.baseUri;
+      base.href = document.baseUri!;
       _parseDocument!.head!.append(base);
     }
 
@@ -13776,7 +13836,7 @@
     }
   }
 
-  String get innerHtml => _innerHtml;
+  String? get innerHtml => _innerHtml;
 
   @JSName('innerText')
   String get innerText native;
@@ -14449,9 +14509,9 @@
 
   set contentEditable(String value) native;
 
-  String get dir native;
+  String? get dir native;
 
-  set dir(String value) native;
+  set dir(String? value) native;
 
   /**
    * Indicates whether the element can be dragged and dropped.
@@ -14485,33 +14545,33 @@
 
   set hidden(bool value) native;
 
-  bool get inert native;
+  bool? get inert native;
 
-  set inert(bool value) native;
+  set inert(bool? value) native;
 
-  String get inputMode native;
+  String? get inputMode native;
 
-  set inputMode(String value) native;
+  set inputMode(String? value) native;
 
-  bool get isContentEditable native;
+  bool? get isContentEditable native;
 
-  String get lang native;
+  String? get lang native;
 
-  set lang(String value) native;
+  set lang(String? value) native;
 
-  bool get spellcheck native;
+  bool? get spellcheck native;
 
-  set spellcheck(bool value) native;
+  set spellcheck(bool? value) native;
 
   CssStyleDeclaration get style native;
 
-  int get tabIndex native;
+  int? get tabIndex native;
 
-  set tabIndex(int value) native;
+  set tabIndex(int? value) native;
 
-  String get title native;
+  String? get title native;
 
-  set title(String value) native;
+  set title(String? value) native;
 
   /**
    * Specifies whether this element's text content changes when the page is
@@ -14524,9 +14584,9 @@
    *   from WHATWG.
    */
 
-  bool get translate native;
+  bool? get translate native;
 
-  set translate(bool value) native;
+  set translate(bool? value) native;
 
   void blur() native;
 
@@ -14539,7 +14599,7 @@
   SlotElement? get assignedSlot native;
 
   @JSName('attributes')
-  _NamedNodeMap get _attributes native;
+  _NamedNodeMap? get _attributes native;
 
   String get className native;
 
@@ -14547,9 +14607,9 @@
 
   int get clientHeight native;
 
-  int get clientLeft native;
+  int? get clientLeft native;
 
-  int get clientTop native;
+  int? get clientTop native;
 
   int get clientWidth native;
 
@@ -14562,22 +14622,22 @@
   set id(String value) native;
 
   @JSName('innerHTML')
-  String get _innerHtml native;
+  String? get _innerHtml native;
 
   @JSName('innerHTML')
   set _innerHtml(String? value) native;
 
   @JSName('localName')
-  String get _localName native;
+  String? get _localName native;
 
   @JSName('namespaceURI')
   String? get _namespaceUri native;
 
   @JSName('outerHTML')
-  String get outerHtml native;
+  String? get outerHtml native;
 
   @JSName('scrollHeight')
-  int get _scrollHeight native;
+  int? get _scrollHeight native;
 
   @JSName('scrollLeft')
   num get _scrollLeft native;
@@ -14592,13 +14652,13 @@
   set _scrollTop(num value) native;
 
   @JSName('scrollWidth')
-  int get _scrollWidth native;
+  int? get _scrollWidth native;
 
-  String get slot native;
+  String? get slot native;
 
-  set slot(String value) native;
+  set slot(String? value) native;
 
-  StylePropertyMap get styleMap native;
+  StylePropertyMap? get styleMap native;
 
   String get tagName native;
 
@@ -14824,11 +14884,6 @@
   @JSName('childElementCount')
   int get _childElementCount native;
 
-  @JSName('children')
-  @Returns('HtmlCollection')
-  @Creates('HtmlCollection')
-  List<Node> get _children native;
-
   @JSName('firstElementChild')
   Element? get _firstElementChild native;
 
@@ -15226,9 +15281,9 @@
 
   set height(String value) native;
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
   String get src native;
 
@@ -15264,15 +15319,15 @@
     throw new UnsupportedError("Not supported");
   }
 
-  FileSystem get filesystem native;
+  FileSystem? get filesystem native;
 
-  String get fullPath native;
+  String? get fullPath native;
 
-  bool get isDirectory native;
+  bool? get isDirectory native;
 
-  bool get isFile native;
+  bool? get isFile native;
 
-  String get name native;
+  String? get name native;
 
   @JSName('copyTo')
   void _copyTo(DirectoryEntry parent,
@@ -15396,16 +15451,16 @@
   static ErrorEvent _create_2(type) =>
       JS('ErrorEvent', 'new ErrorEvent(#)', type);
 
-  int get colno native;
+  int? get colno native;
 
   @Creates('Null')
   Object? get error native;
 
-  String get filename native;
+  String? get filename native;
 
-  int get lineno native;
+  int? get lineno native;
 
-  String get message native;
+  String? get message native;
 }
 // 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
@@ -15510,11 +15565,11 @@
    */
   static const int CAPTURING_PHASE = 1;
 
-  bool get bubbles native;
+  bool? get bubbles native;
 
-  bool get cancelable native;
+  bool? get cancelable native;
 
-  bool get composed native;
+  bool? get composed native;
 
   EventTarget? get currentTarget =>
       _convertNativeToDart_EventTarget(this._get_currentTarget);
@@ -15527,7 +15582,7 @@
 
   int get eventPhase native;
 
-  bool get isTrusted native;
+  bool? get isTrusted native;
 
   EventTarget? get target => _convertNativeToDart_EventTarget(this._get_target);
   @JSName('target')
@@ -15535,7 +15590,7 @@
   @Returns('EventTarget|=Object')
   dynamic get _get_target native;
 
-  num get timeStamp native;
+  num? get timeStamp native;
 
   String get type native;
 
@@ -15615,11 +15670,11 @@
 
   static const int OPEN = 1;
 
-  int get readyState native;
+  int? get readyState native;
 
-  String get url native;
+  String? get url native;
 
-  bool get withCredentials native;
+  bool? get withCredentials native;
 
   void close() native;
 
@@ -15806,11 +15861,11 @@
   @annotation_Returns_SerializedScriptValue
   Object? get data native;
 
-  String get lastEventId native;
+  String? get lastEventId native;
 
-  String get origin native;
+  String? get origin native;
 
-  List<MessagePort> get ports native;
+  List<MessagePort>? get ports native;
 
   @Creates('Client|ServiceWorker|MessagePort')
   @Returns('Client|ServiceWorker|MessagePort|Null')
@@ -15877,14 +15932,14 @@
 
   String? get protocol native;
 
-  String get provider native;
+  String? get provider native;
 
   // From CredentialUserData
 
   @JSName('iconURL')
-  String get iconUrl native;
+  String? get iconUrl native;
 
-  String get name native;
+  String? get name native;
 }
 // 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
@@ -15906,12 +15961,12 @@
 
   String? get clientId native;
 
-  bool get isReload native;
+  bool? get isReload native;
 
   Future get preloadResponse =>
       promiseToFuture(JS("", "#.preloadResponse", this));
 
-  _Request get request native;
+  _Request? get request native;
 
   void respondWith(Future r) native;
 }
@@ -15945,7 +16000,7 @@
 
   @Returns('HtmlCollection')
   @Creates('HtmlCollection')
-  List<Node> get elements native;
+  List<Node>? get elements native;
 
   FormElement? get form native;
 
@@ -15990,7 +16045,7 @@
   static File _create_2(fileBits, fileName) =>
       JS('File', 'new File(#,#)', fileBits, fileName);
 
-  int get lastModified native;
+  int? get lastModified native;
 
   DateTime get lastModifiedDate =>
       convertNativeToDart_DateTime(this._get_lastModifiedDate);
@@ -16003,7 +16058,7 @@
   @JSName('webkitRelativePath')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  String get relativePath native;
+  String? get relativePath native;
 }
 // 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
@@ -16245,9 +16300,9 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => JS('bool', '!!(window.webkitRequestFileSystem)');
 
-  String get name native;
+  String? get name native;
 
-  DirectoryEntry get root native;
+  DirectoryEntry? get root native;
 }
 // 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
@@ -16329,11 +16384,11 @@
 
   DomException? get error native;
 
-  int get length native;
+  int? get length native;
 
-  int get position native;
+  int? get position native;
 
-  int get readyState native;
+  int? get readyState native;
 
   void abort() native;
 
@@ -16420,42 +16475,42 @@
   static FontFace _create_2(family, source) =>
       JS('FontFace', 'new FontFace(#,#)', family, source);
 
-  String get display native;
+  String? get display native;
 
-  set display(String value) native;
+  set display(String? value) native;
 
-  String get family native;
+  String? get family native;
 
-  set family(String value) native;
+  set family(String? value) native;
 
-  String get featureSettings native;
+  String? get featureSettings native;
 
-  set featureSettings(String value) native;
+  set featureSettings(String? value) native;
 
   Future<FontFace> get loaded =>
       promiseToFuture<FontFace>(JS("", "#.loaded", this));
 
-  String get status native;
+  String? get status native;
 
-  String get stretch native;
+  String? get stretch native;
 
-  set stretch(String value) native;
+  set stretch(String? value) native;
 
-  String get style native;
+  String? get style native;
 
-  set style(String value) native;
+  set style(String? value) native;
 
-  String get unicodeRange native;
+  String? get unicodeRange native;
 
-  set unicodeRange(String value) native;
+  set unicodeRange(String? value) native;
 
-  String get variant native;
+  String? get variant native;
 
-  set variant(String value) native;
+  set variant(String? value) native;
 
-  String get weight native;
+  String? get weight native;
 
-  set weight(String value) native;
+  set weight(String? value) native;
 
   Future<FontFace> load() =>
       promiseToFuture<FontFace>(JS("", "#.load()", this));
@@ -16480,7 +16535,7 @@
   static const EventStreamProvider<FontFaceSetLoadEvent> loadingErrorEvent =
       const EventStreamProvider<FontFaceSetLoadEvent>('loadingerror');
 
-  String get status native;
+  String? get status native;
 
   FontFaceSet add(FontFace arg) native;
 
@@ -16528,7 +16583,7 @@
   static FontFaceSetLoadEvent _create_2(type) =>
       JS('FontFaceSetLoadEvent', 'new FontFaceSetLoadEvent(#)', type);
 
-  List<FontFace> get fontfaces native;
+  List<FontFace>? get fontfaces native;
 }
 // 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
@@ -16541,7 +16596,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  FontFaceSet get fonts native;
+  FontFaceSet? get fonts native;
 }
 // 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
@@ -16561,9 +16616,9 @@
   static ForeignFetchEvent _create_1(type, eventInitDict) => JS(
       'ForeignFetchEvent', 'new ForeignFetchEvent(#,#)', type, eventInitDict);
 
-  String get origin native;
+  String? get origin native;
 
-  _Request get request native;
+  _Request? get request native;
 
   void respondWith(Future r) native;
 }
@@ -16632,43 +16687,43 @@
    */
   FormElement.created() : super.created();
 
-  String get acceptCharset native;
+  String? get acceptCharset native;
 
-  set acceptCharset(String value) native;
+  set acceptCharset(String? value) native;
 
-  String get action native;
+  String? get action native;
 
-  set action(String value) native;
+  set action(String? value) native;
 
-  String get autocomplete native;
+  String? get autocomplete native;
 
-  set autocomplete(String value) native;
+  set autocomplete(String? value) native;
 
-  String get encoding native;
+  String? get encoding native;
 
-  set encoding(String value) native;
+  set encoding(String? value) native;
 
-  String get enctype native;
+  String? get enctype native;
 
-  set enctype(String value) native;
+  set enctype(String? value) native;
 
-  int get length native;
+  int? get length native;
 
-  String get method native;
+  String? get method native;
 
-  set method(String value) native;
+  set method(String? value) native;
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
-  bool get noValidate native;
+  bool? get noValidate native;
 
-  set noValidate(bool value) native;
+  set noValidate(bool? value) native;
 
-  String get target native;
+  String? get target native;
 
-  set target(String value) native;
+  set target(String? value) native;
 
   Object? __getter__(String name) native;
 
@@ -16716,27 +16771,27 @@
     throw new UnsupportedError("Not supported");
   }
 
-  List<num> get axes native;
+  List<num>? get axes native;
 
   @Creates('JSExtendableArray|GamepadButton')
   @Returns('JSExtendableArray')
-  List<GamepadButton> get buttons native;
+  List<GamepadButton>? get buttons native;
 
-  bool get connected native;
+  bool? get connected native;
 
-  int get displayId native;
+  int? get displayId native;
 
-  String get hand native;
+  String? get hand native;
 
-  String get id native;
+  String? get id native;
 
-  int get index native;
+  int? get index native;
 
-  String get mapping native;
+  String? get mapping native;
 
   GamepadPose? get pose native;
 
-  int get timestamp native;
+  int? get timestamp native;
 }
 // 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
@@ -16749,11 +16804,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get pressed native;
+  bool? get pressed native;
 
-  bool get touched native;
+  bool? get touched native;
 
-  num get value native;
+  num? get value native;
 }
 // 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
@@ -16778,7 +16833,7 @@
   static GamepadEvent _create_2(type) =>
       JS('GamepadEvent', 'new GamepadEvent(#)', type);
 
-  Gamepad get gamepad native;
+  Gamepad? get gamepad native;
 }
 // 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
@@ -16795,9 +16850,9 @@
 
   Float32List? get angularVelocity native;
 
-  bool get hasOrientation native;
+  bool? get hasOrientation native;
 
-  bool get hasPosition native;
+  bool? get hasPosition native;
 
   Float32List? get linearAcceleration native;
 
@@ -16965,9 +17020,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Coordinates get coords native;
+  Coordinates? get coords native;
 
-  int get timestamp native;
+  int? get timestamp native;
 }
 // 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
@@ -17377,10 +17432,10 @@
   static bool get supported => Device.isEventTypeSupported('HashChangeEvent');
 
   @JSName('newURL')
-  String get newUrl native;
+  String? get newUrl native;
 
   @JSName('oldURL')
-  String get oldUrl native;
+  String? get oldUrl native;
 }
 // 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
@@ -17501,9 +17556,9 @@
 
   int get length native;
 
-  String get scrollRestoration native;
+  String? get scrollRestoration native;
 
-  set scrollRestoration(String value) native;
+  set scrollRestoration(String? value) native;
 
   dynamic get state =>
       convertNativeToDart_SerializedScriptValue(this._get_state);
@@ -17642,7 +17697,7 @@
 
   HeadElement? get head => _head;
 
-  String get lastModified => _lastModified;
+  String? get lastModified => _lastModified;
 
   String? get preferredStylesheetSet => _preferredStylesheetSet;
 
@@ -17653,7 +17708,7 @@
     _selectedStylesheetSet = value;
   }
 
-  List<StyleSheet> get styleSheets => _styleSheets;
+  List<StyleSheet>? get styleSheets => _styleSheets;
 
   String get title => _title;
 
@@ -17821,47 +17876,47 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get hash native;
+  String? get hash native;
 
-  set hash(String value) native;
+  set hash(String? value) native;
 
-  String get host native;
+  String? get host native;
 
-  set host(String value) native;
+  set host(String? value) native;
 
-  String get hostname native;
+  String? get hostname native;
 
-  set hostname(String value) native;
+  set hostname(String? value) native;
 
-  String get href native;
+  String? get href native;
 
-  set href(String value) native;
+  set href(String? value) native;
 
-  String get origin native;
+  String? get origin native;
 
-  String get password native;
+  String? get password native;
 
-  set password(String value) native;
+  set password(String? value) native;
 
-  String get pathname native;
+  String? get pathname native;
 
-  set pathname(String value) native;
+  set pathname(String? value) native;
 
-  String get port native;
+  String? get port native;
 
-  set port(String value) native;
+  set port(String? value) native;
 
-  String get protocol native;
+  String? get protocol native;
 
-  set protocol(String value) native;
+  set protocol(String? value) native;
 
-  String get search native;
+  String? get search native;
 
-  set search(String value) native;
+  set search(String? value) native;
 
-  String get username native;
+  String? get username native;
 
-  set username(String value) native;
+  set username(String? value) native;
 }
 // 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
@@ -17953,7 +18008,7 @@
       {bool? withCredentials, void onProgress(ProgressEvent e)?}) {
     return request(url,
             withCredentials: withCredentials, onProgress: onProgress)
-        .then((HttpRequest xhr) => xhr.responseText);
+        .then((HttpRequest xhr) => xhr.responseText!);
   }
 
   /**
@@ -18101,15 +18156,16 @@
     }
 
     xhr.onLoad.listen((e) {
-      var accepted = xhr.status >= 200 && xhr.status < 300;
-      var fileUri = xhr.status == 0; // file:// URIs have status of 0.
-      var notModified = xhr.status == 304;
+      var status = xhr.status!;
+      var accepted = status >= 200 && status < 300;
+      var fileUri = status == 0; // file:// URIs have status of 0.
+      var notModified = status == 304;
       // Redirect status is specified up to 307, but others have been used in
       // practice. Notably Google Drive uses 308 Resume Incomplete for
       // resumable uploads, and it's also been used as a redirect. The
       // redirect case will be handled by the browser before it gets to us,
       // so if we see it we should pass it through to the user.
-      var unknownRedirect = xhr.status > 307 && xhr.status < 400;
+      var unknownRedirect = status > 307 && status < 400;
 
       if (accepted || fileUri || notModified || unknownRedirect) {
         completer.complete(xhr);
@@ -18176,7 +18232,7 @@
       {String? method, String? sendData}) {
     if (supportsCrossOrigin) {
       return request(url, method: method, sendData: sendData).then((xhr) {
-        return xhr.responseText;
+        return xhr.responseText!;
       });
     }
     var completer = new Completer<String>();
@@ -18383,7 +18439,7 @@
    * The response in String form or empty String on failure.
    */
 
-  String get responseText native;
+  String? get responseText native;
 
   /**
    * [String] telling the server the desired response format.
@@ -18402,7 +18458,7 @@
   set responseType(String value) native;
 
   @JSName('responseURL')
-  String get responseUrl native;
+  String? get responseUrl native;
 
   @JSName('responseXML')
 
@@ -18421,14 +18477,14 @@
    * See also: [HTTP Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
    */
 
-  int get status native;
+  int? get status native;
 
   /**
    * The request response string (such as \"OK\").
    * See also: [HTTP Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
    */
 
-  String get statusText native;
+  String? get statusText native;
 
   /**
    * Length of time in milliseconds before a request is automatically
@@ -18446,9 +18502,9 @@
    *   from W3C.
    */
 
-  int get timeout native;
+  int? get timeout native;
 
-  set timeout(int value) native;
+  set timeout(int? value) native;
 
   /**
    * [EventTarget] that can hold listeners to track the progress of the request.
@@ -18464,9 +18520,9 @@
    * This value is ignored for same-site requests.
    */
 
-  bool get withCredentials native;
+  bool? get withCredentials native;
 
-  set withCredentials(bool value) native;
+  set withCredentials(bool? value) native;
 
   /**
    * Stop the current request.
@@ -18691,17 +18747,17 @@
    */
   IFrameElement.created() : super.created();
 
-  String get allow native;
+  String? get allow native;
 
-  set allow(String value) native;
+  set allow(String? value) native;
 
-  bool get allowFullscreen native;
+  bool? get allowFullscreen native;
 
-  set allowFullscreen(bool value) native;
+  set allowFullscreen(bool? value) native;
 
-  bool get allowPaymentRequest native;
+  bool? get allowPaymentRequest native;
 
-  set allowPaymentRequest(bool value) native;
+  set allowPaymentRequest(bool? value) native;
 
   WindowBase? get contentWindow =>
       _convertNativeToDart_Window(this._get_contentWindow);
@@ -18710,35 +18766,35 @@
   @Returns('Window|=Object')
   dynamic get _get_contentWindow native;
 
-  String get csp native;
+  String? get csp native;
 
-  set csp(String value) native;
+  set csp(String? value) native;
 
-  String get height native;
+  String? get height native;
 
-  set height(String value) native;
+  set height(String? value) native;
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
-  String get referrerPolicy native;
+  String? get referrerPolicy native;
 
-  set referrerPolicy(String value) native;
+  set referrerPolicy(String? value) native;
 
-  DomTokenList get sandbox native;
+  DomTokenList? get sandbox native;
 
-  String get src native;
+  String? get src native;
 
-  set src(String value) native;
+  set src(String? value) native;
 
-  String get srcdoc native;
+  String? get srcdoc native;
 
-  set srcdoc(String value) native;
+  set srcdoc(String? value) native;
 
-  String get width native;
+  String? get width native;
 
-  set width(String value) native;
+  set width(String? value) native;
 }
 // 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
@@ -18751,7 +18807,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get didTimeout native;
+  bool? get didTimeout native;
 
   double timeRemaining() native;
 }
@@ -18773,9 +18829,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get height native;
+  int? get height native;
 
-  int get width native;
+  int? get width native;
 
   void close() native;
 }
@@ -18790,7 +18846,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  CanvasElement get canvas native;
+  CanvasElement? get canvas native;
 
   void transferFromImageBitmap(ImageBitmap? bitmap) native;
 }
@@ -18811,7 +18867,7 @@
   static ImageCapture _create_1(track) =>
       JS('ImageCapture', 'new ImageCapture(#)', track);
 
-  MediaStreamTrack get track native;
+  MediaStreamTrack? get track native;
 
   Future<PhotoCapabilities> getPhotoCapabilities() =>
       promiseToFuture<PhotoCapabilities>(
@@ -18904,57 +18960,57 @@
    */
   ImageElement.created() : super.created();
 
-  String get alt native;
+  String? get alt native;
 
-  set alt(String value) native;
+  set alt(String? value) native;
 
-  String get async native;
+  String? get async native;
 
-  set async(String value) native;
+  set async(String? value) native;
 
-  bool get complete native;
+  bool? get complete native;
 
   String? get crossOrigin native;
 
   set crossOrigin(String? value) native;
 
-  String get currentSrc native;
+  String? get currentSrc native;
 
-  int get height native;
+  int? get height native;
 
-  set height(int value) native;
+  set height(int? value) native;
 
-  bool get isMap native;
+  bool? get isMap native;
 
-  set isMap(bool value) native;
+  set isMap(bool? value) native;
 
   int get naturalHeight native;
 
   int get naturalWidth native;
 
-  String get referrerPolicy native;
+  String? get referrerPolicy native;
 
-  set referrerPolicy(String value) native;
+  set referrerPolicy(String? value) native;
 
-  String get sizes native;
+  String? get sizes native;
 
-  set sizes(String value) native;
+  set sizes(String? value) native;
 
-  String get src native;
+  String? get src native;
 
-  set src(String value) native;
+  set src(String? value) native;
 
-  String get srcset native;
+  String? get srcset native;
 
-  set srcset(String value) native;
+  set srcset(String? value) native;
 
-  String get useMap native;
+  String? get useMap native;
 
-  set useMap(String value) native;
+  set useMap(String? value) native;
 
-  int get width native;
+  int? get width native;
 
-  set width(int value) native;
+  set width(int? value) native;
 
   Future decode() => promiseToFuture(JS("", "#.decode()", this));
 }
@@ -18983,7 +19039,7 @@
   static InputDeviceCapabilities _create_2() =>
       JS('InputDeviceCapabilities', 'new InputDeviceCapabilities()');
 
-  bool get firesTouchEvents native;
+  bool? get firesTouchEvents native;
 }
 // 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
@@ -19035,17 +19091,17 @@
    */
   InputElement.created() : super.created();
 
-  String get accept native;
+  String? get accept native;
 
-  set accept(String value) native;
+  set accept(String? value) native;
 
-  String get alt native;
+  String? get alt native;
 
-  set alt(String value) native;
+  set alt(String? value) native;
 
-  String get autocapitalize native;
+  String? get autocapitalize native;
 
-  set autocapitalize(String value) native;
+  set autocapitalize(String? value) native;
 
   String get autocomplete native;
 
@@ -19055,29 +19111,29 @@
 
   set autofocus(bool value) native;
 
-  String get capture native;
+  String? get capture native;
 
-  set capture(String value) native;
+  set capture(String? value) native;
 
-  bool get checked native;
+  bool? get checked native;
 
-  set checked(bool value) native;
+  set checked(bool? value) native;
 
-  bool get defaultChecked native;
+  bool? get defaultChecked native;
 
-  set defaultChecked(bool value) native;
+  set defaultChecked(bool? value) native;
 
-  String get defaultValue native;
+  String? get defaultValue native;
 
-  set defaultValue(String value) native;
+  set defaultValue(String? value) native;
 
-  String get dirName native;
+  String? get dirName native;
 
-  set dirName(String value) native;
+  set dirName(String? value) native;
 
-  bool get disabled native;
+  bool? get disabled native;
 
-  set disabled(bool value) native;
+  set disabled(bool? value) native;
 
   @Returns('FileList|Null')
   @Creates('FileList')
@@ -19107,47 +19163,47 @@
 
   set formTarget(String value) native;
 
-  int get height native;
+  int? get height native;
 
-  set height(int value) native;
+  set height(int? value) native;
 
-  bool get incremental native;
+  bool? get incremental native;
 
-  set incremental(bool value) native;
+  set incremental(bool? value) native;
 
-  bool get indeterminate native;
+  bool? get indeterminate native;
 
-  set indeterminate(bool value) native;
+  set indeterminate(bool? value) native;
 
   @Returns('NodeList')
   @Creates('NodeList')
-  List<Node> get labels native;
+  List<Node>? get labels native;
 
   HtmlElement? get list native;
 
-  String get max native;
+  String? get max native;
 
-  set max(String value) native;
+  set max(String? value) native;
 
-  int get maxLength native;
+  int? get maxLength native;
 
-  set maxLength(int value) native;
+  set maxLength(int? value) native;
 
-  String get min native;
+  String? get min native;
 
-  set min(String value) native;
+  set min(String? value) native;
 
-  int get minLength native;
+  int? get minLength native;
 
-  set minLength(int value) native;
+  set minLength(int? value) native;
 
-  bool get multiple native;
+  bool? get multiple native;
 
-  set multiple(bool value) native;
+  set multiple(bool? value) native;
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
   String get pattern native;
 
@@ -19157,9 +19213,9 @@
 
   set placeholder(String value) native;
 
-  bool get readOnly native;
+  bool? get readOnly native;
 
-  set readOnly(bool value) native;
+  set readOnly(bool? value) native;
 
   bool get required native;
 
@@ -19177,27 +19233,27 @@
 
   set selectionStart(int? value) native;
 
-  int get size native;
+  int? get size native;
 
-  set size(int value) native;
+  set size(int? value) native;
 
-  String get src native;
+  String? get src native;
 
-  set src(String value) native;
+  set src(String? value) native;
 
-  String get step native;
+  String? get step native;
 
-  set step(String value) native;
+  set step(String? value) native;
 
-  String get type native;
+  String? get type native;
 
-  set type(String value) native;
+  set type(String? value) native;
 
   String get validationMessage native;
 
   ValidityState get validity native;
 
-  String get value native;
+  String? get value native;
 
   set value(String? value) native;
 
@@ -19215,26 +19271,26 @@
     JS("void", "#.valueAsDate = #", this, value);
   }
 
-  num get valueAsNumber native;
+  num? get valueAsNumber native;
 
-  set valueAsNumber(num value) native;
+  set valueAsNumber(num? value) native;
 
   @JSName('webkitEntries')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  List<Entry> get entries native;
+  List<Entry>? get entries native;
 
   @JSName('webkitdirectory')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  bool get directory native;
+  bool? get directory native;
 
   @JSName('webkitdirectory')
-  set directory(bool value) native;
+  set directory(bool? value) native;
 
-  int get width native;
+  int? get width native;
 
-  set width(int value) native;
+  set width(int? value) native;
 
   bool get willValidate native;
 
@@ -19267,22 +19323,22 @@
   bool get autofocus;
   set autofocus(bool value);
 
-  bool get disabled;
-  set disabled(bool value);
+  bool? get disabled;
+  set disabled(bool? value);
 
-  bool get incremental;
-  set incremental(bool value);
+  bool? get incremental;
+  set incremental(bool? value);
 
-  bool get indeterminate;
-  set indeterminate(bool value);
+  bool? get indeterminate;
+  set indeterminate(bool? value);
 
-  String get name;
-  set name(String value);
+  String? get name;
+  set name(String? value);
 
-  String get value;
+  String? get value;
   set value(String? value);
 
-  List<Node> get labels;
+  List<Node>? get labels;
 
   String get validationMessage;
 
@@ -19309,8 +19365,8 @@
   String get autocomplete;
   set autocomplete(String value);
 
-  int get maxLength;
-  set maxLength(int value);
+  int? get maxLength;
+  set maxLength(int? value);
 
   String get pattern;
   set pattern(String value);
@@ -19318,14 +19374,14 @@
   String get placeholder;
   set placeholder(String value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool? get readOnly;
+  set readOnly(bool? value);
 
   bool get required;
   set required(bool value);
 
-  int get size;
-  set size(int value);
+  int? get size;
+  set size(int? value);
 
   void select();
 
@@ -19354,8 +19410,8 @@
 abstract class SearchInputElement implements TextInputElementBase {
   factory SearchInputElement() => new InputElement(type: 'search');
 
-  String get dirName;
-  set dirName(String value);
+  String? get dirName;
+  set dirName(String? value);
 
   Element? get list;
 
@@ -19371,8 +19427,8 @@
 abstract class TextInputElement implements TextInputElementBase {
   factory TextInputElement() => new InputElement(type: 'text');
 
-  String get dirName;
-  set dirName(String value);
+  String? get dirName;
+  set dirName(String? value);
 
   Element? get list;
 }
@@ -19440,11 +19496,11 @@
 
   Element? get list;
 
-  int get maxLength;
-  set maxLength(int value);
+  int? get maxLength;
+  set maxLength(int? value);
 
-  bool get multiple;
-  set multiple(bool value);
+  bool? get multiple;
+  set multiple(bool? value);
 
   String get pattern;
   set pattern(String value);
@@ -19452,14 +19508,14 @@
   String get placeholder;
   set placeholder(String value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool? get readOnly;
+  set readOnly(bool? value);
 
   bool get required;
   set required(bool value);
 
-  int get size;
-  set size(int value);
+  int? get size;
+  set size(int? value);
 
   /// Returns true if this input type is supported on the current platform.
   static bool get supported {
@@ -19480,17 +19536,17 @@
 abstract class RangeInputElementBase implements InputElementBase {
   Element? get list;
 
-  String get max;
-  set max(String value);
+  String? get max;
+  set max(String? value);
 
-  String get min;
-  set min(String value);
+  String? get min;
+  set min(String? value);
 
-  String get step;
-  set step(String value);
+  String? get step;
+  set step(String? value);
 
-  num get valueAsNumber;
-  set valueAsNumber(num value);
+  num? get valueAsNumber;
+  set valueAsNumber(num? value);
 
   void stepDown([int? n]);
 
@@ -19509,8 +19565,8 @@
   DateTime get valueAsDate;
   set valueAsDate(DateTime value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool? get readOnly;
+  set readOnly(bool? value);
 
   bool get required;
   set required(bool value);
@@ -19533,8 +19589,8 @@
   DateTime get valueAsDate;
   set valueAsDate(DateTime value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool? get readOnly;
+  set readOnly(bool? value);
 
   bool get required;
   set required(bool value);
@@ -19557,8 +19613,8 @@
   DateTime get valueAsDate;
   set valueAsDate(DateTime value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool? get readOnly;
+  set readOnly(bool? value);
 
   bool get required;
   set required(bool value);
@@ -19581,8 +19637,8 @@
   DateTime get valueAsDate;
   set valueAsDate(DateTime value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool? get readOnly;
+  set readOnly(bool? value);
 
   bool get required;
   set required(bool value);
@@ -19604,8 +19660,8 @@
   factory LocalDateTimeInputElement() =>
       new InputElement(type: 'datetime-local');
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool? get readOnly;
+  set readOnly(bool? value);
 
   bool get required;
   set required(bool value);
@@ -19628,8 +19684,8 @@
   String get placeholder;
   set placeholder(String value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool? get readOnly;
+  set readOnly(bool? value);
 
   bool get required;
   set required(bool value);
@@ -19666,8 +19722,8 @@
 abstract class CheckboxInputElement implements InputElementBase {
   factory CheckboxInputElement() => new InputElement(type: 'checkbox');
 
-  bool get checked;
-  set checked(bool value);
+  bool? get checked;
+  set checked(bool? value);
 
   bool get required;
   set required(bool value);
@@ -19687,8 +19743,8 @@
 abstract class RadioButtonInputElement implements InputElementBase {
   factory RadioButtonInputElement() => new InputElement(type: 'radio');
 
-  bool get checked;
-  set checked(bool value);
+  bool? get checked;
+  set checked(bool? value);
 
   bool get required;
   set required(bool value);
@@ -19700,11 +19756,11 @@
 abstract class FileUploadInputElement implements InputElementBase {
   factory FileUploadInputElement() => new InputElement(type: 'file');
 
-  String get accept;
-  set accept(String value);
+  String? get accept;
+  set accept(String? value);
 
-  bool get multiple;
-  set multiple(bool value);
+  bool? get multiple;
+  set multiple(bool? value);
 
   bool get required;
   set required(bool value);
@@ -19741,8 +19797,8 @@
 abstract class ImageButtonInputElement implements InputElementBase {
   factory ImageButtonInputElement() => new InputElement(type: 'image');
 
-  String get alt;
-  set alt(String value);
+  String? get alt;
+  set alt(String? value);
 
   String get formAction;
   set formAction(String value);
@@ -19759,14 +19815,14 @@
   String get formTarget;
   set formTarget(String value);
 
-  int get height;
-  set height(int value);
+  int? get height;
+  set height(int? value);
 
-  String get src;
-  set src(String value);
+  String? get src;
+  set src(String? value);
 
-  int get width;
-  set width(int value);
+  int? get width;
+  set width(int? value);
 }
 
 /**
@@ -19845,9 +19901,9 @@
 
   Element? get root native;
 
-  String get rootMargin native;
+  String? get rootMargin native;
 
-  List<num> get thresholds native;
+  List<num>? get thresholds native;
 
   void disconnect() native;
 
@@ -19876,19 +19932,19 @@
     throw new UnsupportedError("Not supported");
   }
 
-  DomRectReadOnly get boundingClientRect native;
+  DomRectReadOnly? get boundingClientRect native;
 
-  num get intersectionRatio native;
+  num? get intersectionRatio native;
 
-  DomRectReadOnly get intersectionRect native;
+  DomRectReadOnly? get intersectionRect native;
 
-  bool get isIntersecting native;
+  bool? get isIntersecting native;
 
   DomRectReadOnly? get rootBounds native;
 
-  Element get target native;
+  Element? get target native;
 
-  num get time native;
+  num? get time native;
 }
 // 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
@@ -19901,11 +19957,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get lineNumber native;
+  int? get lineNumber native;
 
-  String get message native;
+  String? get message native;
 
-  String get sourceFile native;
+  String? get sourceFile native;
 }
 // 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
@@ -19993,7 +20049,7 @@
 
   int get charCode native;
 
-  int get which => _which;
+  int? get which => _which;
 
   factory KeyboardEvent._(String type, [Map? eventInitDict]) {
     if (eventInitDict != null) {
@@ -20020,13 +20076,13 @@
   @JSName('charCode')
   int get _charCode native;
 
-  String get code native;
+  String? get code native;
 
   bool get ctrlKey native;
 
-  bool get isComposing native;
+  bool? get isComposing native;
 
-  String get key native;
+  String? get key native;
 
   @JSName('keyCode')
   int get _keyCode native;
@@ -20035,7 +20091,7 @@
 
   bool get metaKey native;
 
-  bool get repeat native;
+  bool? get repeat native;
 
   bool get shiftKey native;
 
@@ -20224,17 +20280,17 @@
    */
   LinkElement.created() : super.created();
 
-  String get as native;
+  String? get as native;
 
-  set as(String value) native;
+  set as(String? value) native;
 
   String? get crossOrigin native;
 
   set crossOrigin(String? value) native;
 
-  bool get disabled native;
+  bool? get disabled native;
 
-  set disabled(bool value) native;
+  set disabled(bool? value) native;
 
   String get href native;
 
@@ -20246,31 +20302,31 @@
 
   Document? get import native;
 
-  String get integrity native;
+  String? get integrity native;
 
-  set integrity(String value) native;
+  set integrity(String? value) native;
 
   String get media native;
 
   set media(String value) native;
 
-  String get referrerPolicy native;
+  String? get referrerPolicy native;
 
-  set referrerPolicy(String value) native;
+  set referrerPolicy(String? value) native;
 
   String get rel native;
 
   set rel(String value) native;
 
-  DomTokenList get relList native;
+  DomTokenList? get relList native;
 
-  String get scope native;
+  String? get scope native;
 
-  set scope(String value) native;
+  set scope(String? value) native;
 
   StyleSheet? get sheet native;
 
-  DomTokenList get sizes native;
+  DomTokenList? get sizes native;
 
   String get type native;
 
@@ -20294,7 +20350,7 @@
 
   @Returns('DomStringList')
   @Creates('DomStringList')
-  List<String> get ancestorOrigins native;
+  List<String>? get ancestorOrigins native;
 
   String get hash native;
 
@@ -20304,17 +20360,17 @@
 
   set host(String value) native;
 
-  String get hostname native;
+  String? get hostname native;
 
-  set hostname(String value) native;
+  set hostname(String? value) native;
 
   String get href native;
 
   set href(String value) native;
 
-  String get pathname native;
+  String? get pathname native;
 
-  set pathname(String value) native;
+  set pathname(String? value) native;
 
   String get port native;
 
@@ -20324,13 +20380,13 @@
 
   set protocol(String value) native;
 
-  String get search native;
+  String? get search native;
 
-  set search(String value) native;
+  set search(String? value) native;
 
-  TrustedUrl get trustedHref native;
+  TrustedUrl? get trustedHref native;
 
-  set trustedHref(TrustedUrl value) native;
+  set trustedHref(TrustedUrl? value) native;
 
   void assign([String? url]) native;
 
@@ -20440,11 +20496,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get powerEfficient native;
+  bool? get powerEfficient native;
 
-  bool get smooth native;
+  bool? get smooth native;
 
-  bool get supported native;
+  bool? get supported native;
 }
 // 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
@@ -20457,13 +20513,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get deviceId native;
+  String? get deviceId native;
 
-  String get groupId native;
+  String? get groupId native;
 
-  String get kind native;
+  String? get kind native;
 
-  String get label native;
+  String? get label native;
 }
 // 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
@@ -20531,7 +20587,7 @@
 
   static const int NETWORK_NO_SOURCE = 3;
 
-  AudioTrackList get audioTracks native;
+  AudioTrackList? get audioTracks native;
 
   bool get autoplay native;
 
@@ -20543,7 +20599,7 @@
 
   set controls(bool value) native;
 
-  DomTokenList get controlsList native;
+  DomTokenList? get controlsList native;
 
   String? get crossOrigin native;
 
@@ -20555,9 +20611,9 @@
 
   set currentTime(num value) native;
 
-  bool get defaultMuted native;
+  bool? get defaultMuted native;
 
-  set defaultMuted(bool value) native;
+  set defaultMuted(bool? value) native;
 
   num get defaultPlaybackRate native;
 
@@ -20577,13 +20633,13 @@
 
   set loop(bool value) native;
 
-  MediaKeys get mediaKeys native;
+  MediaKeys? get mediaKeys native;
 
   bool get muted native;
 
   set muted(bool value) native;
 
-  int get networkState native;
+  int? get networkState native;
 
   bool get paused native;
 
@@ -20599,25 +20655,25 @@
 
   int get readyState native;
 
-  RemotePlayback get remote native;
+  RemotePlayback? get remote native;
 
   TimeRanges get seekable native;
 
   bool get seeking native;
 
-  String get sinkId native;
+  String? get sinkId native;
 
   String get src native;
 
   set src(String value) native;
 
-  MediaStream get srcObject native;
+  MediaStream? get srcObject native;
 
-  set srcObject(MediaStream value) native;
+  set srcObject(MediaStream? value) native;
 
-  TextTrackList get textTracks native;
+  TextTrackList? get textTracks native;
 
-  VideoTrackList get videoTracks native;
+  VideoTrackList? get videoTracks native;
 
   num get volume native;
 
@@ -20626,12 +20682,12 @@
   @JSName('webkitAudioDecodedByteCount')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  int get audioDecodedByteCount native;
+  int? get audioDecodedByteCount native;
 
   @JSName('webkitVideoDecodedByteCount')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  int get videoDecodedByteCount native;
+  int? get videoDecodedByteCount native;
 
   TextTrack addTextTrack(String kind, [String? label, String? language]) native;
 
@@ -20680,7 +20736,7 @@
 
   ByteBuffer? get initData native;
 
-  String get initDataType native;
+  String? get initDataType native;
 }
 // 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
@@ -20704,7 +20760,7 @@
 
   int get code native;
 
-  String get message native;
+  String? get message native;
 }
 // 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
@@ -20727,9 +20783,9 @@
       type,
       eventInitDict);
 
-  ByteBuffer get message native;
+  ByteBuffer? get message native;
 
-  String get messageType native;
+  String? get messageType native;
 }
 // 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
@@ -20747,11 +20803,11 @@
 
   Future<void> get closed => promiseToFuture<void>(JS("", "#.closed", this));
 
-  num get expiration native;
+  num? get expiration native;
 
-  MediaKeyStatusMap get keyStatuses native;
+  MediaKeyStatusMap? get keyStatuses native;
 
-  String get sessionId native;
+  String? get sessionId native;
 
   Future close() => promiseToFuture(JS("", "#.close()", this));
 
@@ -20780,7 +20836,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get size native;
+  int? get size native;
 
   Object? get(/*BufferSource*/ keyId) native;
 
@@ -20797,7 +20853,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get keySystem native;
+  String? get keySystem native;
 
   Future createMediaKeys() =>
       promiseToFuture(JS("", "#.createMediaKeys()", this));
@@ -20848,7 +20904,7 @@
   static MediaKeysPolicy _create_1(init) =>
       JS('MediaKeysPolicy', 'new MediaKeysPolicy(#)', init);
 
-  String get minHdcpVersion native;
+  String? get minHdcpVersion native;
 }
 // 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
@@ -20862,7 +20918,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get length native;
+  int? get length native;
 
   String? get mediaText native;
 
@@ -20897,21 +20953,21 @@
   static MediaMetadata _create_2() =>
       JS('MediaMetadata', 'new MediaMetadata()');
 
-  String get album native;
+  String? get album native;
 
-  set album(String value) native;
+  set album(String? value) native;
 
-  String get artist native;
+  String? get artist native;
 
-  set artist(String value) native;
+  set artist(String? value) native;
 
-  List get artwork native;
+  List? get artwork native;
 
-  set artwork(List value) native;
+  set artwork(List? value) native;
 
-  String get title native;
+  String? get title native;
 
-  set title(String value) native;
+  set title(String? value) native;
 }
 // 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
@@ -20964,9 +21020,9 @@
   static MediaQueryListEvent _create_2(type) =>
       JS('MediaQueryListEvent', 'new MediaQueryListEvent(#)', type);
 
-  bool get matches native;
+  bool? get matches native;
 
-  String get media native;
+  String? get media native;
 }
 // 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
@@ -20997,15 +21053,15 @@
   static MediaRecorder _create_2(stream) =>
       JS('MediaRecorder', 'new MediaRecorder(#)', stream);
 
-  int get audioBitsPerSecond native;
+  int? get audioBitsPerSecond native;
 
-  String get mimeType native;
+  String? get mimeType native;
 
-  String get state native;
+  String? get state native;
 
-  MediaStream get stream native;
+  MediaStream? get stream native;
 
-  int get videoBitsPerSecond native;
+  int? get videoBitsPerSecond native;
 
   static bool isTypeSupported(String type) native;
 
@@ -21038,9 +21094,9 @@
 
   set metadata(MediaMetadata? value) native;
 
-  String get playbackState native;
+  String? get playbackState native;
 
-  set playbackState(String value) native;
+  set playbackState(String? value) native;
 
   void setActionHandler(String action, MediaSessionActionHandler? handler)
       native;
@@ -21063,11 +21119,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get max native;
+  num? get max native;
 
-  num get min native;
+  num? get min native;
 
-  num get step native;
+  num? get step native;
 }
 // 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
@@ -21090,15 +21146,15 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => JS('bool', '!!(window.MediaSource)');
 
-  SourceBufferList get activeSourceBuffers native;
+  SourceBufferList? get activeSourceBuffers native;
 
-  num get duration native;
+  num? get duration native;
 
-  set duration(num value) native;
+  set duration(num? value) native;
 
-  String get readyState native;
+  String? get readyState native;
 
-  SourceBufferList get sourceBuffers native;
+  SourceBufferList? get sourceBuffers native;
 
   SourceBuffer addSourceBuffer(String type) native;
 
@@ -21160,9 +21216,9 @@
   static MediaStream _create_3(stream_OR_tracks) =>
       JS('MediaStream', 'new MediaStream(#)', stream_OR_tracks);
 
-  bool get active native;
+  bool? get active native;
 
-  String get id native;
+  String? get id native;
 
   void addTrack(MediaStreamTrack track) native;
 
@@ -21272,23 +21328,23 @@
   static const EventStreamProvider<Event> unmuteEvent =
       const EventStreamProvider<Event>('unmute');
 
-  String get contentHint native;
+  String? get contentHint native;
 
-  set contentHint(String value) native;
+  set contentHint(String? value) native;
 
-  bool get enabled native;
+  bool? get enabled native;
 
-  set enabled(bool value) native;
+  set enabled(bool? value) native;
 
-  String get id native;
+  String? get id native;
 
-  String get kind native;
+  String? get kind native;
 
-  String get label native;
+  String? get label native;
 
-  bool get muted native;
+  bool? get muted native;
 
-  String get readyState native;
+  String? get readyState native;
 
   Future applyConstraints([Map? constraints]) {
     var constraints_dict = null;
@@ -21359,7 +21415,7 @@
   static bool get supported =>
       Device.isEventTypeSupported('MediaStreamTrackEvent');
 
-  MediaStreamTrack get track native;
+  MediaStreamTrack? get track native;
 }
 // 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
@@ -21372,11 +21428,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get jsHeapSizeLimit native;
+  int? get jsHeapSizeLimit native;
 
-  int get totalJSHeapSize native;
+  int? get totalJSHeapSize native;
 
-  int get usedJSHeapSize native;
+  int? get usedJSHeapSize native;
 }
 // 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
@@ -21517,7 +21573,7 @@
   @Returns('EventTarget|=Object')
   dynamic get _get_source native;
 
-  String get suborigin native;
+  String? get suborigin native;
 
   void _initMessageEvent(
       String? typeArg,
@@ -21624,9 +21680,9 @@
 
   set content(String value) native;
 
-  String get httpEquiv native;
+  String? get httpEquiv native;
 
-  set httpEquiv(String value) native;
+  set httpEquiv(String? value) native;
 
   String get name native;
 
@@ -21649,7 +21705,7 @@
   @Creates('Null')
   dynamic get _get_modificationTime native;
 
-  int get size native;
+  int? get size native;
 }
 // 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
@@ -21691,7 +21747,7 @@
   @Unstable()
   @Returns('NodeList')
   @Creates('NodeList')
-  List<Node> get labels native;
+  List<Node>? get labels native;
 
   num get low native;
 
@@ -21724,11 +21780,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  MidiInputMap get inputs native;
+  MidiInputMap? get inputs native;
 
-  MidiOutputMap get outputs native;
+  MidiOutputMap? get outputs native;
 
-  bool get sysexEnabled native;
+  bool? get sysexEnabled native;
 }
 // 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
@@ -21756,7 +21812,7 @@
   static MidiConnectionEvent _create_2(type) =>
       JS('MidiConnectionEvent', 'new MIDIConnectionEvent(#)', type);
 
-  MidiPort get port native;
+  MidiPort? get port native;
 }
 // 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
@@ -21873,7 +21929,7 @@
   static MidiMessageEvent _create_2(type) =>
       JS('MidiMessageEvent', 'new MIDIMessageEvent(#)', type);
 
-  Uint8List get data native;
+  Uint8List? get data native;
 }
 // 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
@@ -21967,19 +22023,19 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get connection native;
+  String? get connection native;
 
-  String get id native;
+  String? get id native;
 
-  String get manufacturer native;
+  String? get manufacturer native;
 
-  String get name native;
+  String? get name native;
 
-  String get state native;
+  String? get state native;
 
-  String get type native;
+  String? get type native;
 
-  String get version native;
+  String? get version native;
 
   Future close() => promiseToFuture(JS("", "#.close()", this));
 
@@ -21996,13 +22052,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get description native;
+  String? get description native;
 
-  Plugin get enabledPlugin native;
+  Plugin? get enabledPlugin native;
 
-  String get suffixes native;
+  String? get suffixes native;
 
-  String get type native;
+  String? get type native;
 }
 // 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
@@ -22159,7 +22215,7 @@
 
   int get button native;
 
-  int get buttons native;
+  int? get buttons native;
 
   @JSName('clientX')
   num get _clientX native;
@@ -22177,27 +22233,27 @@
    * relatedTarget to get the same information in the standard way.
    */
   @deprecated
-  Node get fromElement native;
+  Node? get fromElement native;
 
   @JSName('layerX')
-  int get _layerX native;
+  int? get _layerX native;
 
   @JSName('layerY')
-  int get _layerY native;
+  int? get _layerY native;
 
   bool get metaKey native;
 
   @JSName('movementX')
-  int get _movementX native;
+  int? get _movementX native;
 
   @JSName('movementY')
-  int get _movementY native;
+  int? get _movementY native;
 
   @JSName('pageX')
-  num get _pageX native;
+  num? get _pageX native;
 
   @JSName('pageY')
-  num get _pageY native;
+  num? get _pageY native;
 
   String? get region native;
 
@@ -22224,7 +22280,7 @@
    * relatedTarget to get the same information in the standard way.
    */
   @deprecated
-  Node get toElement native;
+  Node? get toElement native;
 
   bool getModifierState(String keyArg) native;
 
@@ -22286,7 +22342,7 @@
 
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.FIREFOX)
-  Point get movement => new Point(_movementX, _movementY);
+  Point get movement => new Point(_movementX!, _movementY!);
 
   /**
    * The coordinates of the mouse pointer in target node coordinates.
@@ -22313,9 +22369,9 @@
 
   Point get screen => new Point(_screenX, _screenY);
 
-  Point get layer => new Point(_layerX, _layerY);
+  Point get layer => new Point(_layerX!, _layerY!);
 
-  Point get page => new Point(_pageX, _pageY);
+  Point get page => new Point(_pageX!, _pageY!);
 
   DataTransfer get dataTransfer =>
       JS('DataTransfer', "#['dataTransfer']", this);
@@ -22346,13 +22402,13 @@
 
   static const int REMOVAL = 3;
 
-  int get attrChange native;
+  int? get attrChange native;
 
-  String get attrName native;
+  String? get attrName native;
 
-  String get newValue native;
+  String? get newValue native;
 
-  String get prevValue native;
+  String? get prevValue native;
 
   Node? get relatedNode native;
 
@@ -22487,7 +22543,7 @@
 
   @Returns('NodeList')
   @Creates('NodeList')
-  List<Node> get addedNodes native;
+  List<Node>? get addedNodes native;
 
   String? get attributeName native;
 
@@ -22501,11 +22557,11 @@
 
   @Returns('NodeList')
   @Creates('NodeList')
-  List<Node> get removedNodes native;
+  List<Node>? get removedNodes native;
 
-  Node get target native;
+  Node? get target native;
 
-  String get type native;
+  String? get type native;
 }
 // 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
@@ -22626,13 +22682,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  _BudgetService get budget native;
+  _BudgetService? get budget native;
 
-  _Clipboard get clipboard native;
+  _Clipboard? get clipboard native;
 
   NetworkInformation? get connection native;
 
-  CredentialsContainer get credentials native;
+  CredentialsContainer? get credentials native;
 
   num? get deviceMemory native;
 
@@ -22641,28 +22697,28 @@
   @Unstable()
   Geolocation get geolocation native;
 
-  int get maxTouchPoints native;
+  int? get maxTouchPoints native;
 
-  MediaCapabilities get mediaCapabilities native;
+  MediaCapabilities? get mediaCapabilities native;
 
-  MediaDevices get mediaDevices native;
+  MediaDevices? get mediaDevices native;
 
-  MediaSession get mediaSession native;
+  MediaSession? get mediaSession native;
 
-  MimeTypeArray get mimeTypes native;
+  MimeTypeArray? get mimeTypes native;
 
-  _NFC get nfc native;
+  _NFC? get nfc native;
 
-  Permissions get permissions native;
+  Permissions? get permissions native;
 
-  Presentation get presentation native;
+  Presentation? get presentation native;
 
   @Unstable()
-  String get productSub native;
+  String? get productSub native;
 
-  ServiceWorkerContainer get serviceWorker native;
+  ServiceWorkerContainer? get serviceWorker native;
 
-  StorageManager get storage native;
+  StorageManager? get storage native;
 
   @Unstable()
   String get vendor native;
@@ -22670,17 +22726,17 @@
   @Unstable()
   String get vendorSub native;
 
-  VR get vr native;
+  VR? get vr native;
 
   @JSName('webkitPersistentStorage')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  DeprecatedStorageQuota get persistentStorage native;
+  DeprecatedStorageQuota? get persistentStorage native;
 
   @JSName('webkitTemporaryStorage')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  DeprecatedStorageQuota get temporaryStorage native;
+  DeprecatedStorageQuota? get temporaryStorage native;
 
   void cancelKeyboardLock() native;
 
@@ -22742,12 +22798,12 @@
 
   // From NavigatorAutomationInformation
 
-  bool get webdriver native;
+  bool? get webdriver native;
 
   // From NavigatorCookies
 
   @Unstable()
-  bool get cookieEnabled native;
+  bool? get cookieEnabled native;
 
   // From NavigatorID
 
@@ -22757,9 +22813,9 @@
 
   String get appVersion native;
 
-  bool get dartEnabled native;
+  bool? get dartEnabled native;
 
-  String get platform native;
+  String? get platform native;
 
   @Unstable()
   String get product native;
@@ -22768,12 +22824,12 @@
 
   // From NavigatorLanguage
 
-  List<String> get languages native;
+  List<String>? get languages native;
 
   // From NavigatorOnLine
 
   @Unstable()
-  bool get onLine native;
+  bool? get onLine native;
 }
 // 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
@@ -22786,7 +22842,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get webdriver native;
+  bool? get webdriver native;
 }
 // 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
@@ -22799,7 +22855,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get hardwareConcurrency native;
+  int? get hardwareConcurrency native;
 }
 // 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
@@ -22812,7 +22868,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get cookieEnabled native;
+  bool? get cookieEnabled native;
 }
 // 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
@@ -22830,9 +22886,9 @@
 
   String get appVersion native;
 
-  bool get dartEnabled native;
+  bool? get dartEnabled native;
 
-  String get platform native;
+  String? get platform native;
 
   String get product native;
 
@@ -22848,9 +22904,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get language native;
+  String? get language native;
 
-  List<String> get languages native;
+  List<String>? get languages native;
 }
 // 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
@@ -22862,7 +22918,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get onLine native;
+  bool? get onLine native;
 }
 // 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
@@ -22875,11 +22931,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get constraintName native;
+  String? get constraintName native;
 
-  String get message native;
+  String? get message native;
 
-  String get name native;
+  String? get name native;
 }
 // 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
@@ -22911,13 +22967,13 @@
 
   num? get downlink native;
 
-  num get downlinkMax native;
+  num? get downlinkMax native;
 
-  String get effectiveType native;
+  String? get effectiveType native;
 
-  int get rtt native;
+  int? get rtt native;
 
-  String get type native;
+  String? get type native;
 
   Stream<Event> get onChange => changeEvent.forTarget(this);
 }
@@ -23220,7 +23276,7 @@
   static const int TEXT_NODE = 3;
 
   @JSName('baseURI')
-  String get baseUri native;
+  String? get baseUri native;
 
   /**
    * The first child of this node.
@@ -23233,7 +23289,7 @@
 
   Node? get firstChild native;
 
-  bool get isConnected native;
+  bool? get isConnected native;
 
   /**
    * The last child of this node.
@@ -23271,7 +23327,7 @@
    *   [nodeType].
    */
 
-  String get nodeName native;
+  String? get nodeName native;
 
   /**
    * The type of node.
@@ -23506,9 +23562,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get pointerBeforeReferenceNode native;
+  bool? get pointerBeforeReferenceNode native;
 
-  Node get referenceNode native;
+  Node? get referenceNode native;
 
   Node get root native;
 
@@ -23697,41 +23753,41 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => JS('bool', '!!(window.Notification)');
 
-  List get actions native;
+  List? get actions native;
 
-  String get badge native;
+  String? get badge native;
 
-  String get body native;
+  String? get body native;
 
   @annotation_Creates_SerializedScriptValue
   @annotation_Returns_SerializedScriptValue
   Object? get data native;
 
-  String get dir native;
+  String? get dir native;
 
-  String get icon native;
+  String? get icon native;
 
-  String get image native;
+  String? get image native;
 
-  String get lang native;
+  String? get lang native;
 
-  static int get maxActions native;
+  static int? get maxActions native;
 
-  static String get permission native;
+  static String? get permission native;
 
-  bool get renotify native;
+  bool? get renotify native;
 
-  bool get requireInteraction native;
+  bool? get requireInteraction native;
 
-  bool get silent native;
+  bool? get silent native;
 
-  String get tag native;
+  String? get tag native;
 
-  int get timestamp native;
+  int? get timestamp native;
 
-  String get title native;
+  String? get title native;
 
-  List<int> get vibrate native;
+  List<int>? get vibrate native;
 
   void close() native;
 
@@ -23778,9 +23834,9 @@
   static NotificationEvent _create_1(type, eventInitDict) => JS(
       'NotificationEvent', 'new NotificationEvent(#,#)', type, eventInitDict);
 
-  String get action native;
+  String? get action native;
 
-  Notification get notification native;
+  Notification? get notification native;
 
   String? get reply native;
 }
@@ -23814,9 +23870,9 @@
    */
   OListElement.created() : super.created();
 
-  bool get reversed native;
+  bool? get reversed native;
 
-  set reversed(bool value) native;
+  set reversed(bool? value) native;
 
   int get start native;
 
@@ -23918,13 +23974,13 @@
   static OffscreenCanvas _create_1(width, height) =>
       JS('OffscreenCanvas', 'new OffscreenCanvas(#,#)', width, height);
 
-  int get height native;
+  int? get height native;
 
-  set height(int value) native;
+  set height(int? value) native;
 
-  int get width native;
+  int? get width native;
 
-  set width(int value) native;
+  set width(int? value) native;
 
   Future<Blob> convertToBlob([Map? options]) {
     var options_dict = null;
@@ -23962,87 +24018,87 @@
     throw new UnsupportedError("Not supported");
   }
 
-  OffscreenCanvas get canvas native;
+  OffscreenCanvas? get canvas native;
 
-  String get direction native;
+  String? get direction native;
 
-  set direction(String value) native;
+  set direction(String? value) native;
 
   Object? get fillStyle native;
 
   set fillStyle(Object? value) native;
 
-  String get filter native;
+  String? get filter native;
 
-  set filter(String value) native;
+  set filter(String? value) native;
 
-  String get font native;
+  String? get font native;
 
-  set font(String value) native;
+  set font(String? value) native;
 
-  num get globalAlpha native;
+  num? get globalAlpha native;
 
-  set globalAlpha(num value) native;
+  set globalAlpha(num? value) native;
 
-  String get globalCompositeOperation native;
+  String? get globalCompositeOperation native;
 
-  set globalCompositeOperation(String value) native;
+  set globalCompositeOperation(String? value) native;
 
-  bool get imageSmoothingEnabled native;
+  bool? get imageSmoothingEnabled native;
 
-  set imageSmoothingEnabled(bool value) native;
+  set imageSmoothingEnabled(bool? value) native;
 
-  String get imageSmoothingQuality native;
+  String? get imageSmoothingQuality native;
 
-  set imageSmoothingQuality(String value) native;
+  set imageSmoothingQuality(String? value) native;
 
-  String get lineCap native;
+  String? get lineCap native;
 
-  set lineCap(String value) native;
+  set lineCap(String? value) native;
 
-  num get lineDashOffset native;
+  num? get lineDashOffset native;
 
-  set lineDashOffset(num value) native;
+  set lineDashOffset(num? value) native;
 
-  String get lineJoin native;
+  String? get lineJoin native;
 
-  set lineJoin(String value) native;
+  set lineJoin(String? value) native;
 
-  num get lineWidth native;
+  num? get lineWidth native;
 
-  set lineWidth(num value) native;
+  set lineWidth(num? value) native;
 
-  num get miterLimit native;
+  num? get miterLimit native;
 
-  set miterLimit(num value) native;
+  set miterLimit(num? value) native;
 
-  num get shadowBlur native;
+  num? get shadowBlur native;
 
-  set shadowBlur(num value) native;
+  set shadowBlur(num? value) native;
 
-  String get shadowColor native;
+  String? get shadowColor native;
 
-  set shadowColor(String value) native;
+  set shadowColor(String? value) native;
 
-  num get shadowOffsetX native;
+  num? get shadowOffsetX native;
 
-  set shadowOffsetX(num value) native;
+  set shadowOffsetX(num? value) native;
 
-  num get shadowOffsetY native;
+  num? get shadowOffsetY native;
 
-  set shadowOffsetY(num value) native;
+  set shadowOffsetY(num? value) native;
 
   Object? get strokeStyle native;
 
   set strokeStyle(Object? value) native;
 
-  String get textAlign native;
+  String? get textAlign native;
 
-  set textAlign(String value) native;
+  set textAlign(String? value) native;
 
-  String get textBaseline native;
+  String? get textBaseline native;
 
-  set textBaseline(String value) native;
+  set textBaseline(String? value) native;
 
   void beginPath() native;
 
@@ -24307,9 +24363,9 @@
 
   int get index native;
 
-  String get label native;
+  String? get label native;
 
-  set label(String value) native;
+  set label(String? value) native;
 
   bool get selected native;
 
@@ -24359,34 +24415,34 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => Element.isTagSupported('output');
 
-  String get defaultValue native;
+  String? get defaultValue native;
 
-  set defaultValue(String value) native;
+  set defaultValue(String? value) native;
 
   FormElement? get form native;
 
-  DomTokenList get htmlFor native;
+  DomTokenList? get htmlFor native;
 
   @Unstable()
   @Returns('NodeList')
   @Creates('NodeList')
-  List<Node> get labels native;
+  List<Node>? get labels native;
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
-  String get type native;
+  String? get type native;
 
-  String get validationMessage native;
+  String? get validationMessage native;
 
-  ValidityState get validity native;
+  ValidityState? get validity native;
 
-  String get value native;
+  String? get value native;
 
-  set value(String value) native;
+  set value(String? value) native;
 
-  bool get willValidate native;
+  bool? get willValidate native;
 
   bool checkValidity() native;
 
@@ -24418,7 +24474,7 @@
 
   String? get message native;
 
-  String get name native;
+  String? get name native;
 }
 // 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
@@ -24446,7 +24502,7 @@
   static PageTransitionEvent _create_2(type) =>
       JS('PageTransitionEvent', 'new PageTransitionEvent(#)', type);
 
-  bool get persisted native;
+  bool? get persisted native;
 }
 // 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
@@ -24459,69 +24515,69 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Matrix get currentTransform native;
+  Matrix? get currentTransform native;
 
-  set currentTransform(Matrix value) native;
+  set currentTransform(Matrix? value) native;
 
   Object? get fillStyle native;
 
   set fillStyle(Object? value) native;
 
-  String get filter native;
+  String? get filter native;
 
-  set filter(String value) native;
+  set filter(String? value) native;
 
-  num get globalAlpha native;
+  num? get globalAlpha native;
 
-  set globalAlpha(num value) native;
+  set globalAlpha(num? value) native;
 
-  String get globalCompositeOperation native;
+  String? get globalCompositeOperation native;
 
-  set globalCompositeOperation(String value) native;
+  set globalCompositeOperation(String? value) native;
 
-  bool get imageSmoothingEnabled native;
+  bool? get imageSmoothingEnabled native;
 
-  set imageSmoothingEnabled(bool value) native;
+  set imageSmoothingEnabled(bool? value) native;
 
-  String get imageSmoothingQuality native;
+  String? get imageSmoothingQuality native;
 
-  set imageSmoothingQuality(String value) native;
+  set imageSmoothingQuality(String? value) native;
 
-  String get lineCap native;
+  String? get lineCap native;
 
-  set lineCap(String value) native;
+  set lineCap(String? value) native;
 
-  num get lineDashOffset native;
+  num? get lineDashOffset native;
 
-  set lineDashOffset(num value) native;
+  set lineDashOffset(num? value) native;
 
-  String get lineJoin native;
+  String? get lineJoin native;
 
-  set lineJoin(String value) native;
+  set lineJoin(String? value) native;
 
-  num get lineWidth native;
+  num? get lineWidth native;
 
-  set lineWidth(num value) native;
+  set lineWidth(num? value) native;
 
-  num get miterLimit native;
+  num? get miterLimit native;
 
-  set miterLimit(num value) native;
+  set miterLimit(num? value) native;
 
-  num get shadowBlur native;
+  num? get shadowBlur native;
 
-  set shadowBlur(num value) native;
+  set shadowBlur(num? value) native;
 
-  String get shadowColor native;
+  String? get shadowColor native;
 
-  set shadowColor(String value) native;
+  set shadowColor(String? value) native;
 
-  num get shadowOffsetX native;
+  num? get shadowOffsetX native;
 
-  set shadowOffsetX(num value) native;
+  set shadowOffsetX(num? value) native;
 
-  num get shadowOffsetY native;
+  num? get shadowOffsetY native;
 
-  set shadowOffsetY(num value) native;
+  set shadowOffsetY(num? value) native;
 
   Object? get strokeStyle native;
 
@@ -24616,9 +24672,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get height native;
+  num? get height native;
 
-  num get width native;
+  num? get width native;
 }
 // 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
@@ -24631,7 +24687,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get devicePixelRatio native;
+  num? get devicePixelRatio native;
 
   void registerPaint(String name, Object paintCtor) native;
 }
@@ -24702,7 +24758,7 @@
 
   int get _childElementCount native;
 
-  List<Node> get _children native;
+  List<Node>? get _children native;
 
   Element? get _firstElementChild native;
 
@@ -24742,22 +24798,22 @@
 
   set additionalData(Object? value) native;
 
-  String get idName native;
+  String? get idName native;
 
-  set idName(String value) native;
+  set idName(String? value) native;
 
-  String get password native;
+  String? get password native;
 
-  String get passwordName native;
+  String? get passwordName native;
 
-  set passwordName(String value) native;
+  set passwordName(String? value) native;
 
   // From CredentialUserData
 
   @JSName('iconURL')
-  String get iconUrl native;
+  String? get iconUrl native;
 
-  String get name native;
+  String? get name native;
 }
 // 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
@@ -24824,27 +24880,27 @@
     throw new UnsupportedError("Not supported");
   }
 
-  List<String> get addressLine native;
+  List<String>? get addressLine native;
 
-  String get city native;
+  String? get city native;
 
-  String get country native;
+  String? get country native;
 
-  String get dependentLocality native;
+  String? get dependentLocality native;
 
-  String get languageCode native;
+  String? get languageCode native;
 
-  String get organization native;
+  String? get organization native;
 
-  String get phone native;
+  String? get phone native;
 
-  String get postalCode native;
+  String? get postalCode native;
 
-  String get recipient native;
+  String? get recipient native;
 
-  String get region native;
+  String? get region native;
 
-  String get sortingCode native;
+  String? get sortingCode native;
 }
 // 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
@@ -24888,11 +24944,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  PaymentInstruments get instruments native;
+  PaymentInstruments? get instruments native;
 
-  String get userHint native;
+  String? get userHint native;
 
-  set userHint(String value) native;
+  set userHint(String? value) native;
 }
 // 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
@@ -24928,7 +24984,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get id native;
+  String? get id native;
 
   PaymentAddress? get shippingAddress native;
 
@@ -24966,19 +25022,19 @@
       type,
       eventInitDict);
 
-  String get instrumentKey native;
+  String? get instrumentKey native;
 
-  List get methodData native;
+  List? get methodData native;
 
-  List get modifiers native;
+  List? get modifiers native;
 
-  String get paymentRequestId native;
+  String? get paymentRequestId native;
 
-  String get paymentRequestOrigin native;
+  String? get paymentRequestOrigin native;
 
-  String get topLevelOrigin native;
+  String? get topLevelOrigin native;
 
-  Object get total native;
+  Object? get total native;
 
   Future<WindowClient> openWindow(String url) =>
       promiseToFuture<WindowClient>(JS("", "#.openWindow(#)", this, url));
@@ -25024,9 +25080,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Object get details native;
+  Object? get details native;
 
-  String get methodName native;
+  String? get methodName native;
 
   String? get payerEmail native;
 
@@ -25034,7 +25090,7 @@
 
   String? get payerPhone native;
 
-  String get requestId native;
+  String? get requestId native;
 
   PaymentAddress? get shippingAddress native;
 
@@ -25064,7 +25120,7 @@
 
   PerformanceNavigation get navigation native;
 
-  num get timeOrigin native;
+  num? get timeOrigin native;
 
   PerformanceTiming get timing native;
 
@@ -25119,7 +25175,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  List<TaskAttributionTiming> get attribution native;
+  List<TaskAttributionTiming>? get attribution native;
 }
 // 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
@@ -25163,9 +25219,9 @@
 
   static const int TYPE_RESERVED = 255;
 
-  int get redirectCount native;
+  int? get redirectCount native;
 
-  int get type native;
+  int? get type native;
 }
 // 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
@@ -25178,25 +25234,25 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get domComplete native;
+  num? get domComplete native;
 
-  num get domContentLoadedEventEnd native;
+  num? get domContentLoadedEventEnd native;
 
-  num get domContentLoadedEventStart native;
+  num? get domContentLoadedEventStart native;
 
-  num get domInteractive native;
+  num? get domInteractive native;
 
-  num get loadEventEnd native;
+  num? get loadEventEnd native;
 
-  num get loadEventStart native;
+  num? get loadEventStart native;
 
-  int get redirectCount native;
+  int? get redirectCount native;
 
-  String get type native;
+  String? get type native;
 
-  num get unloadEventEnd native;
+  num? get unloadEventEnd native;
 
-  num get unloadEventStart native;
+  num? get unloadEventStart native;
 }
 // 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
@@ -25279,37 +25335,37 @@
 
   num get connectStart native;
 
-  int get decodedBodySize native;
+  int? get decodedBodySize native;
 
-  num get domainLookupEnd native;
+  num? get domainLookupEnd native;
 
-  num get domainLookupStart native;
+  num? get domainLookupStart native;
 
-  int get encodedBodySize native;
+  int? get encodedBodySize native;
 
-  num get fetchStart native;
+  num? get fetchStart native;
 
-  String get initiatorType native;
+  String? get initiatorType native;
 
-  String get nextHopProtocol native;
+  String? get nextHopProtocol native;
 
-  num get redirectEnd native;
+  num? get redirectEnd native;
 
-  num get redirectStart native;
+  num? get redirectStart native;
 
-  num get requestStart native;
+  num? get requestStart native;
 
-  num get responseEnd native;
+  num? get responseEnd native;
 
-  num get responseStart native;
+  num? get responseStart native;
 
-  num get secureConnectionStart native;
+  num? get secureConnectionStart native;
 
-  List<PerformanceServerTiming> get serverTiming native;
+  List<PerformanceServerTiming>? get serverTiming native;
 
-  int get transferSize native;
+  int? get transferSize native;
 
-  num get workerStart native;
+  num? get workerStart native;
 }
 // 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
@@ -25322,11 +25378,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get description native;
+  String? get description native;
 
-  num get duration native;
+  num? get duration native;
 
-  String get name native;
+  String? get name native;
 }
 // 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
@@ -25396,7 +25452,7 @@
   static const EventStreamProvider<Event> changeEvent =
       const EventStreamProvider<Event>('change');
 
-  String get state native;
+  String? get state native;
 
   Stream<Event> get onChange => changeEvent.forTarget(this);
 }
@@ -25444,13 +25500,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  List get fillLightMode native;
+  List? get fillLightMode native;
 
-  MediaSettingsRange get imageHeight native;
+  MediaSettingsRange? get imageHeight native;
 
-  MediaSettingsRange get imageWidth native;
+  MediaSettingsRange? get imageWidth native;
 
-  String get redEyeReduction native;
+  String? get redEyeReduction native;
 }
 // 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
@@ -25480,13 +25536,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get description native;
+  String? get description native;
 
-  String get filename native;
+  String? get filename native;
 
-  int get length native;
+  int? get length native;
 
-  String get name native;
+  String? get name native;
 
   MimeType? item(int index) native;
 
@@ -25581,25 +25637,25 @@
   static PointerEvent _create_2(type) =>
       JS('PointerEvent', 'new PointerEvent(#)', type);
 
-  num get height native;
+  num? get height native;
 
-  bool get isPrimary native;
+  bool? get isPrimary native;
 
-  int get pointerId native;
+  int? get pointerId native;
 
-  String get pointerType native;
+  String? get pointerType native;
 
-  num get pressure native;
+  num? get pressure native;
 
-  num get tangentialPressure native;
+  num? get tangentialPressure native;
 
-  int get tiltX native;
+  int? get tiltX native;
 
-  int get tiltY native;
+  int? get tiltY native;
 
-  int get twist native;
+  int? get twist native;
 
-  num get width native;
+  num? get width native;
 
   List<PointerEvent> getCoalescedEvents() native;
 
@@ -25674,9 +25730,9 @@
 
   static const int TIMEOUT = 3;
 
-  int get code native;
+  int? get code native;
 
-  String get message native;
+  String? get message native;
 }
 // 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
@@ -25740,7 +25796,7 @@
   static const EventStreamProvider<Event> changeEvent =
       const EventStreamProvider<Event>('change');
 
-  bool get value native;
+  bool? get value native;
 
   Stream<Event> get onChange => changeEvent.forTarget(this);
 }
@@ -25758,15 +25814,15 @@
   static const EventStreamProvider<MessageEvent> messageEvent =
       const EventStreamProvider<MessageEvent>('message');
 
-  String get binaryType native;
+  String? get binaryType native;
 
-  set binaryType(String value) native;
+  set binaryType(String? value) native;
 
-  String get id native;
+  String? get id native;
 
-  String get state native;
+  String? get state native;
 
-  String get url native;
+  String? get url native;
 
   void close() native;
 
@@ -25796,7 +25852,7 @@
       JS('PresentationConnectionAvailableEvent',
           'new PresentationConnectionAvailableEvent(#,#)', type, eventInitDict);
 
-  PresentationConnection get connection native;
+  PresentationConnection? get connection native;
 }
 // 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
@@ -25819,9 +25875,9 @@
       type,
       eventInitDict);
 
-  String get message native;
+  String? get message native;
 
-  String get reason native;
+  String? get reason native;
 }
 // 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
@@ -25834,7 +25890,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  List<PresentationConnection> get connections native;
+  List<PresentationConnection>? get connections native;
 }
 // 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
@@ -25902,7 +25958,7 @@
 
   StyleSheet? get sheet native;
 
-  String get target native;
+  String? get target native;
 }
 // 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
@@ -25934,7 +25990,7 @@
   @Unstable()
   @Returns('NodeList')
   @Creates('NodeList')
-  List<Node> get labels native;
+  List<Node>? get labels native;
 
   num get max native;
 
@@ -25971,9 +26027,9 @@
 
   bool get lengthComputable native;
 
-  int get loaded native;
+  int? get loaded native;
 
-  int get total native;
+  int? get total native;
 }
 // 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
@@ -26011,9 +26067,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  ByteBuffer get rawId native;
+  ByteBuffer? get rawId native;
 
-  AuthenticatorResponse get response native;
+  AuthenticatorResponse? get response native;
 }
 // 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
@@ -26050,7 +26106,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  static List<String> get supportedContentEncodings native;
+  static List<String>? get supportedContentEncodings native;
 
   Future<PushSubscription> getSubscription() =>
       promiseToFuture<PushSubscription>(JS("", "#.getSubscription()", this));
@@ -26102,11 +26158,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get endpoint native;
+  String? get endpoint native;
 
-  int get expirationTime native;
+  int? get expirationTime native;
 
-  PushSubscriptionOptions get options native;
+  PushSubscriptionOptions? get options native;
 
   ByteBuffer? getKey(String name) native;
 
@@ -26126,7 +26182,7 @@
 
   ByteBuffer? get applicationServerKey native;
 
-  bool get userVisibleOnly native;
+  bool? get userVisibleOnly native;
 }
 // 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
@@ -26298,11 +26354,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get id native;
+  String? get id native;
 
-  String get platform native;
+  String? get platform native;
 
-  String get url native;
+  String? get url native;
 }
 // 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
@@ -26340,7 +26396,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get state native;
+  String? get state native;
 
   Future cancelWatchAvailability([int? id]) =>
       promiseToFuture(JS("", "#.cancelWatchAvailability(#)", this, id));
@@ -26447,9 +26503,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  DomRectReadOnly get contentRect native;
+  DomRectReadOnly? get contentRect native;
 
-  Element get target native;
+  Element? get target native;
 }
 // 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
@@ -26462,7 +26518,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get expires native;
+  int? get expires native;
 
   List<Map> getFingerprints() native;
 }
@@ -26513,33 +26569,33 @@
   static const EventStreamProvider<Event> openEvent =
       const EventStreamProvider<Event>('open');
 
-  String get binaryType native;
+  String? get binaryType native;
 
-  set binaryType(String value) native;
+  set binaryType(String? value) native;
 
-  int get bufferedAmount native;
+  int? get bufferedAmount native;
 
-  int get bufferedAmountLowThreshold native;
+  int? get bufferedAmountLowThreshold native;
 
-  set bufferedAmountLowThreshold(int value) native;
+  set bufferedAmountLowThreshold(int? value) native;
 
-  int get id native;
+  int? get id native;
 
-  String get label native;
+  String? get label native;
 
-  int get maxRetransmitTime native;
+  int? get maxRetransmitTime native;
 
-  int get maxRetransmits native;
+  int? get maxRetransmits native;
 
-  bool get negotiated native;
+  bool? get negotiated native;
 
-  bool get ordered native;
+  bool? get ordered native;
 
-  String get protocol native;
+  String? get protocol native;
 
-  String get readyState native;
+  String? get readyState native;
 
-  bool get reliable native;
+  bool? get reliable native;
 
   void close() native;
 
@@ -26590,7 +26646,7 @@
       type,
       eventInitDict);
 
-  RtcDataChannel get channel native;
+  RtcDataChannel? get channel native;
 }
 // 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
@@ -26613,15 +26669,15 @@
       const EventStreamProvider<RtcDtmfToneChangeEvent>('tonechange');
 
   @JSName('canInsertDTMF')
-  bool get canInsertDtmf native;
+  bool? get canInsertDtmf native;
 
-  int get duration native;
+  int? get duration native;
 
-  int get interToneGap native;
+  int? get interToneGap native;
 
-  String get toneBuffer native;
+  String? get toneBuffer native;
 
-  MediaStreamTrack get track native;
+  MediaStreamTrack? get track native;
 
   @JSName('insertDTMF')
   void insertDtmf(String tones, [int? duration, int? interToneGap]) native;
@@ -26651,7 +26707,7 @@
       type,
       eventInitDict);
 
-  String get tone native;
+  String? get tone native;
 }
 // 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
@@ -26670,17 +26726,17 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get candidate native;
+  String? get candidate native;
 
-  set candidate(String value) native;
+  set candidate(String? value) native;
 
-  int get sdpMLineIndex native;
+  int? get sdpMLineIndex native;
 
-  set sdpMLineIndex(int value) native;
+  set sdpMLineIndex(int? value) native;
 
-  String get sdpMid native;
+  String? get sdpMid native;
 
-  set sdpMid(String value) native;
+  set sdpMid(String? value) native;
 }
 // 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
@@ -26693,13 +26749,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get id native;
+  String? get id native;
 
   DateTime get timestamp => convertNativeToDart_DateTime(this._get_timestamp);
   @JSName('timestamp')
   dynamic get _get_timestamp native;
 
-  String get type native;
+  String? get type native;
 
   List<String> names() native;
 
@@ -26847,15 +26903,15 @@
   static const EventStreamProvider<RtcTrackEvent> trackEvent =
       const EventStreamProvider<RtcTrackEvent>('track');
 
-  String get iceConnectionState native;
+  String? get iceConnectionState native;
 
-  String get iceGatheringState native;
+  String? get iceGatheringState native;
 
   RtcSessionDescription? get localDescription native;
 
   RtcSessionDescription? get remoteDescription native;
 
-  String get signalingState native;
+  String? get signalingState native;
 
   Future addIceCandidate(Object candidate,
           [VoidCallback? successCallback,
@@ -27021,9 +27077,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get source native;
+  int? get source native;
 
-  num get timestamp native;
+  num? get timestamp native;
 }
 // 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
@@ -27036,7 +27092,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  MediaStreamTrack get track native;
+  MediaStreamTrack? get track native;
 
   List<RtcRtpContributingSource> getContributingSources() native;
 }
@@ -27179,11 +27235,11 @@
   static RtcTrackEvent _create_1(type, eventInitDict) =>
       JS('RtcTrackEvent', 'new RTCTrackEvent(#,#)', type, eventInitDict);
 
-  RtcRtpReceiver get receiver native;
+  RtcRtpReceiver? get receiver native;
 
-  List<MediaStream> get streams native;
+  List<MediaStream>? get streams native;
 
-  MediaStreamTrack get track native;
+  MediaStreamTrack? get track native;
 }
 // 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
@@ -27192,37 +27248,37 @@
 @Native("Screen")
 class Screen extends Interceptor {
   Rectangle get available =>
-      new Rectangle(_availLeft, _availTop, _availWidth, _availHeight);
+      new Rectangle(_availLeft!, _availTop!, _availWidth!, _availHeight!);
   // To suppress missing implicit constructor warnings.
   factory Screen._() {
     throw new UnsupportedError("Not supported");
   }
 
   @JSName('availHeight')
-  int get _availHeight native;
+  int? get _availHeight native;
 
   @JSName('availLeft')
-  int get _availLeft native;
+  int? get _availLeft native;
 
   @JSName('availTop')
-  int get _availTop native;
+  int? get _availTop native;
 
   @JSName('availWidth')
-  int get _availWidth native;
+  int? get _availWidth native;
 
-  int get colorDepth native;
+  int? get colorDepth native;
 
-  int get height native;
+  int? get height native;
 
-  bool get keepAwake native;
+  bool? get keepAwake native;
 
-  set keepAwake(bool value) native;
+  set keepAwake(bool? value) native;
 
-  ScreenOrientation get orientation native;
+  ScreenOrientation? get orientation native;
 
-  int get pixelDepth native;
+  int? get pixelDepth native;
 
-  int get width native;
+  int? get width native;
 }
 // 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
@@ -27238,9 +27294,9 @@
   static const EventStreamProvider<Event> changeEvent =
       const EventStreamProvider<Event>('change');
 
-  int get angle native;
+  int? get angle native;
 
-  String get type native;
+  String? get type native;
 
   Future lock(String orientation) =>
       promiseToFuture(JS("", "#.lock(#)", this, orientation));
@@ -27272,9 +27328,9 @@
    */
   ScriptElement.created() : super.created();
 
-  bool get async native;
+  bool? get async native;
 
-  set async(bool value) native;
+  set async(bool? value) native;
 
   String get charset native;
 
@@ -27284,17 +27340,17 @@
 
   set crossOrigin(String? value) native;
 
-  bool get defer native;
+  bool? get defer native;
 
-  set defer(bool value) native;
+  set defer(bool? value) native;
 
-  String get integrity native;
+  String? get integrity native;
 
-  set integrity(String value) native;
+  set integrity(String? value) native;
 
-  bool get noModule native;
+  bool? get noModule native;
 
-  set noModule(bool value) native;
+  set noModule(bool? value) native;
 
   String get src native;
 
@@ -27326,29 +27382,29 @@
       JS('ScrollState', 'new ScrollState(#)', scrollStateInit);
   static ScrollState _create_2() => JS('ScrollState', 'new ScrollState()');
 
-  num get deltaGranularity native;
+  num? get deltaGranularity native;
 
-  num get deltaX native;
+  num? get deltaX native;
 
-  num get deltaY native;
+  num? get deltaY native;
 
-  bool get fromUserInput native;
+  bool? get fromUserInput native;
 
-  bool get inInertialPhase native;
+  bool? get inInertialPhase native;
 
-  bool get isBeginning native;
+  bool? get isBeginning native;
 
-  bool get isDirectManipulation native;
+  bool? get isDirectManipulation native;
 
-  bool get isEnding native;
+  bool? get isEnding native;
 
-  int get positionX native;
+  int? get positionX native;
 
-  int get positionY native;
+  int? get positionY native;
 
-  num get velocityX native;
+  num? get velocityX native;
 
-  num get velocityY native;
+  num? get velocityY native;
 
   void consumeDelta(num x, num y) native;
 
@@ -27384,7 +27440,7 @@
   static ScrollTimeline _create_2() =>
       JS('ScrollTimeline', 'new ScrollTimeline()');
 
-  String get orientation native;
+  String? get orientation native;
 
   Element? get scrollSource native;
 
@@ -27419,30 +27475,30 @@
       type);
 
   @JSName('blockedURI')
-  String get blockedUri native;
+  String? get blockedUri native;
 
-  int get columnNumber native;
+  int? get columnNumber native;
 
-  String get disposition native;
+  String? get disposition native;
 
   @JSName('documentURI')
-  String get documentUri native;
+  String? get documentUri native;
 
-  String get effectiveDirective native;
+  String? get effectiveDirective native;
 
-  int get lineNumber native;
+  int? get lineNumber native;
 
-  String get originalPolicy native;
+  String? get originalPolicy native;
 
-  String get referrer native;
+  String? get referrer native;
 
-  String get sample native;
+  String? get sample native;
 
-  String get sourceFile native;
+  String? get sourceFile native;
 
-  int get statusCode native;
+  int? get statusCode native;
 
-  String get violatedDirective native;
+  String? get violatedDirective native;
 }
 // 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
@@ -27480,31 +27536,31 @@
   @Unstable()
   @Returns('NodeList')
   @Creates('NodeList')
-  List<Node> get labels native;
+  List<Node>? get labels native;
 
-  int get length native;
+  int? get length native;
 
-  set length(int value) native;
+  set length(int? value) native;
 
-  bool get multiple native;
+  bool? get multiple native;
 
-  set multiple(bool value) native;
+  set multiple(bool? value) native;
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
-  bool get required native;
+  bool? get required native;
 
-  set required(bool value) native;
+  set required(bool? value) native;
 
-  int get selectedIndex native;
+  int? get selectedIndex native;
 
-  set selectedIndex(int value) native;
+  set selectedIndex(int? value) native;
 
-  int get size native;
+  int? get size native;
 
-  set size(int value) native;
+  set size(int? value) native;
 
   String get type native;
 
@@ -27512,9 +27568,9 @@
 
   ValidityState get validity native;
 
-  String get value native;
+  String? get value native;
 
-  set value(String value) native;
+  set value(String? value) native;
 
   bool get willValidate native;
 
@@ -27541,11 +27597,11 @@
 
   List<OptionElement> get selectedOptions {
     // IE does not change the selected flag for single-selection items.
-    if (this.multiple) {
+    if (this.multiple!) {
       var options = this.options.where((o) => o.selected).toList();
       return new UnmodifiableListView(options);
     } else {
-      return [this.options[this.selectedIndex]];
+      return [this.options[this.selectedIndex!]];
     }
   }
 }
@@ -27562,25 +27618,25 @@
 
   Node? get anchorNode native;
 
-  int get anchorOffset native;
+  int? get anchorOffset native;
 
   Node? get baseNode native;
 
-  int get baseOffset native;
+  int? get baseOffset native;
 
   Node? get extentNode native;
 
-  int get extentOffset native;
+  int? get extentOffset native;
 
   Node? get focusNode native;
 
-  int get focusOffset native;
+  int? get focusOffset native;
 
-  bool get isCollapsed native;
+  bool? get isCollapsed native;
 
-  int get rangeCount native;
+  int? get rangeCount native;
 
-  String get type native;
+  String? get type native;
 
   void addRange(Range range) native;
 
@@ -27627,11 +27683,11 @@
   static const EventStreamProvider<Event> errorEvent =
       const EventStreamProvider<Event>('error');
 
-  bool get activated native;
+  bool? get activated native;
 
-  bool get hasReading native;
+  bool? get hasReading native;
 
-  num get timestamp native;
+  num? get timestamp native;
 
   void start() native;
 
@@ -27657,7 +27713,7 @@
   static SensorErrorEvent _create_1(type, eventInitDict) =>
       JS('SensorErrorEvent', 'new SensorErrorEvent(#,#)', type, eventInitDict);
 
-  DomException get error native;
+  DomException? get error native;
 }
 // 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
@@ -27674,9 +27730,9 @@
       const EventStreamProvider<Event>('error');
 
   @JSName('scriptURL')
-  String get scriptUrl native;
+  String? get scriptUrl native;
 
-  String get state native;
+  String? get state native;
 
   void postMessage(/*any*/ message, [List<Object>? transfer]) {
     if (transfer != null) {
@@ -27759,9 +27815,9 @@
   static const EventStreamProvider<MessageEvent> messageEvent =
       const EventStreamProvider<MessageEvent>('message');
 
-  Clients get clients native;
+  Clients? get clients native;
 
-  ServiceWorkerRegistration get registration native;
+  ServiceWorkerRegistration? get registration native;
 
   Future skipWaiting() => promiseToFuture(JS("", "#.skipWaiting()", this));
 
@@ -27794,19 +27850,19 @@
 
   ServiceWorker? get active native;
 
-  BackgroundFetchManager get backgroundFetch native;
+  BackgroundFetchManager? get backgroundFetch native;
 
   ServiceWorker? get installing native;
 
-  NavigationPreloadManager get navigationPreload native;
+  NavigationPreloadManager? get navigationPreload native;
 
-  PaymentManager get paymentManager native;
+  PaymentManager? get paymentManager native;
 
-  PushManager get pushManager native;
+  PushManager? get pushManager native;
 
-  String get scope native;
+  String? get scope native;
 
-  SyncManager get sync native;
+  SyncManager? get sync native;
 
   ServiceWorker? get waiting native;
 
@@ -27874,17 +27930,17 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get delegatesFocus native;
+  bool? get delegatesFocus native;
 
-  Element get host native;
+  Element? get host native;
 
   @JSName('innerHTML')
-  String get innerHtml native;
+  String? get innerHtml native;
 
   @JSName('innerHTML')
   set innerHtml(String? value) native;
 
-  String get mode native;
+  String? get mode native;
 
   ShadowRoot? get olderShadowRoot native;
 
@@ -27898,7 +27954,7 @@
 
   @Returns('_StyleSheetList')
   @Creates('_StyleSheetList')
-  List<StyleSheet> get styleSheets native;
+  List<StyleSheet>? get styleSheets native;
 
   Element? elementFromPoint(int x, int y) native;
 
@@ -27957,7 +28013,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get byteLength native;
+  int? get byteLength native;
 }
 // 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
@@ -27984,7 +28040,7 @@
   static SharedWorker _create_2(scriptURL) =>
       JS('SharedWorker', 'new SharedWorker(#)', scriptURL);
 
-  MessagePort get port native;
+  MessagePort? get port native;
 
   Stream<Event> get onError => errorEvent.forTarget(this);
 }
@@ -28012,7 +28068,7 @@
 
   static const int TEMPORARY = 0;
 
-  String get name native;
+  String? get name native;
 
   void close() native;
 
@@ -28065,9 +28121,9 @@
    */
   SlotElement.created() : super.created();
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
   List<Node> assignedNodes([Map? options]) {
     if (options != null) {
@@ -28099,33 +28155,33 @@
   static const EventStreamProvider<Event> errorEvent =
       const EventStreamProvider<Event>('error');
 
-  num get appendWindowEnd native;
+  num? get appendWindowEnd native;
 
-  set appendWindowEnd(num value) native;
+  set appendWindowEnd(num? value) native;
 
-  num get appendWindowStart native;
+  num? get appendWindowStart native;
 
-  set appendWindowStart(num value) native;
+  set appendWindowStart(num? value) native;
 
-  AudioTrackList get audioTracks native;
+  AudioTrackList? get audioTracks native;
 
-  TimeRanges get buffered native;
+  TimeRanges? get buffered native;
 
-  String get mode native;
+  String? get mode native;
 
-  set mode(String value) native;
+  set mode(String? value) native;
 
-  num get timestampOffset native;
+  num? get timestampOffset native;
 
-  set timestampOffset(num value) native;
+  set timestampOffset(num? value) native;
 
-  TrackDefaultList get trackDefaults native;
+  TrackDefaultList? get trackDefaults native;
 
-  set trackDefaults(TrackDefaultList value) native;
+  set trackDefaults(TrackDefaultList? value) native;
 
-  bool get updating native;
+  bool? get updating native;
 
-  VideoTrackList get videoTracks native;
+  VideoTrackList? get videoTracks native;
 
   void abort() native;
 
@@ -28227,17 +28283,17 @@
 
   set media(String value) native;
 
-  String get sizes native;
+  String? get sizes native;
 
-  set sizes(String value) native;
+  set sizes(String? value) native;
 
   String get src native;
 
   set src(String value) native;
 
-  String get srcset native;
+  String? get srcset native;
 
-  set srcset(String value) native;
+  set srcset(String? value) native;
 
   String get type native;
 
@@ -28283,13 +28339,13 @@
   static SpeechGrammar _create_1() =>
       JS('SpeechGrammar', 'new SpeechGrammar()');
 
-  String get src native;
+  String? get src native;
 
-  set src(String value) native;
+  set src(String? value) native;
 
-  num get weight native;
+  num? get weight native;
 
-  set weight(num value) native;
+  set weight(num? value) native;
 }
 // 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
@@ -28480,25 +28536,25 @@
 
   set audioTrack(MediaStreamTrack? value) native;
 
-  bool get continuous native;
+  bool? get continuous native;
 
-  set continuous(bool value) native;
+  set continuous(bool? value) native;
 
-  SpeechGrammarList get grammars native;
+  SpeechGrammarList? get grammars native;
 
-  set grammars(SpeechGrammarList value) native;
+  set grammars(SpeechGrammarList? value) native;
 
-  bool get interimResults native;
+  bool? get interimResults native;
 
-  set interimResults(bool value) native;
+  set interimResults(bool? value) native;
 
-  String get lang native;
+  String? get lang native;
 
-  set lang(String value) native;
+  set lang(String? value) native;
 
-  int get maxAlternatives native;
+  int? get maxAlternatives native;
 
-  set maxAlternatives(int value) native;
+  set maxAlternatives(int? value) native;
 
   void abort() native;
 
@@ -28556,9 +28612,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get confidence native;
+  num? get confidence native;
 
-  String get transcript native;
+  String? get transcript native;
 }
 // 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
@@ -28587,9 +28643,9 @@
   static SpeechRecognitionError _create_2(type) =>
       JS('SpeechRecognitionError', 'new SpeechRecognitionError(#)', type);
 
-  String get error native;
+  String? get error native;
 
-  String get message native;
+  String? get message native;
 }
 // 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
@@ -28622,7 +28678,7 @@
 
   Document? get interpretation native;
 
-  int get resultIndex native;
+  int? get resultIndex native;
 
   @Returns('_SpeechRecognitionResultList|Null')
   @Creates('_SpeechRecognitionResultList')
@@ -28640,9 +28696,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get isFinal native;
+  bool? get isFinal native;
 
-  int get length native;
+  int? get length native;
 
   SpeechRecognitionAlternative item(int index) native;
 }
@@ -28663,11 +28719,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get paused native;
+  bool? get paused native;
 
-  bool get pending native;
+  bool? get pending native;
 
-  bool get speaking native;
+  bool? get speaking native;
 
   void cancel() native;
 
@@ -28691,13 +28747,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get charIndex native;
+  int? get charIndex native;
 
-  num get elapsedTime native;
+  num? get elapsedTime native;
 
-  String get name native;
+  String? get name native;
 
-  SpeechSynthesisUtterance get utterance native;
+  SpeechSynthesisUtterance? get utterance native;
 }
 // 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
@@ -28784,29 +28840,29 @@
   static SpeechSynthesisUtterance _create_2() =>
       JS('SpeechSynthesisUtterance', 'new SpeechSynthesisUtterance()');
 
-  String get lang native;
+  String? get lang native;
 
-  set lang(String value) native;
+  set lang(String? value) native;
 
-  num get pitch native;
+  num? get pitch native;
 
-  set pitch(num value) native;
+  set pitch(num? value) native;
 
-  num get rate native;
+  num? get rate native;
 
-  set rate(num value) native;
+  set rate(num? value) native;
 
-  String get text native;
+  String? get text native;
 
-  set text(String value) native;
+  set text(String? value) native;
 
   SpeechSynthesisVoice? get voice native;
 
   set voice(SpeechSynthesisVoice? value) native;
 
-  num get volume native;
+  num? get volume native;
 
-  set volume(num value) native;
+  set volume(num? value) native;
 
   /// Stream of `boundary` events handled by this [SpeechSynthesisUtterance].
   Stream<SpeechSynthesisEvent> get onBoundary => boundaryEvent.forTarget(this);
@@ -28841,16 +28897,16 @@
   }
 
   @JSName('default')
-  bool get defaultValue native;
+  bool? get defaultValue native;
 
-  String get lang native;
+  String? get lang native;
 
-  bool get localService native;
+  bool? get localService native;
 
-  String get name native;
+  String? get name native;
 
   @JSName('voiceURI')
-  String get voiceUri native;
+  String? get voiceUri native;
 }
 // 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
@@ -28863,15 +28919,15 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get collapsed native;
+  bool? get collapsed native;
 
-  Node get endContainer native;
+  Node? get endContainer native;
 
-  int get endOffset native;
+  int? get endOffset native;
 
-  Node get startContainer native;
+  Node? get startContainer native;
 
-  int get startOffset native;
+  int? get startOffset native;
 }
 // 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
@@ -29034,7 +29090,7 @@
 
   Storage? get storageArea native;
 
-  String get url native;
+  String? get url native;
 
   @JSName('initStorageEvent')
   void _initStorageEvent(
@@ -29129,7 +29185,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get type native;
+  String? get type native;
 
   bool matchMedium(String? mediaquery) native;
 }
@@ -29180,13 +29236,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get disabled native;
+  bool? get disabled native;
 
-  set disabled(bool value) native;
+  set disabled(bool? value) native;
 
   String? get href native;
 
-  MediaList get media native;
+  MediaList? get media native;
 
   Node? get ownerNode native;
 
@@ -29194,7 +29250,7 @@
 
   String? get title native;
 
-  String get type native;
+  String? get type native;
 }
 // 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
@@ -29214,9 +29270,9 @@
   static SyncEvent _create_1(type, init) =>
       JS('SyncEvent', 'new SyncEvent(#,#)', type, init);
 
-  bool get lastChance native;
+  bool? get lastChance native;
 
-  String get tag native;
+  String? get tag native;
 }
 // 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
@@ -29559,16 +29615,16 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get containerId native;
+  String? get containerId native;
 
-  String get containerName native;
+  String? get containerName native;
 
-  String get containerSrc native;
+  String? get containerSrc native;
 
-  String get containerType native;
+  String? get containerType native;
 
   @JSName('scriptURL')
-  String get scriptUrl native;
+  String? get scriptUrl native;
 }
 // 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
@@ -29596,7 +29652,7 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => Element.isTagSupported('template');
 
-  DocumentFragment get content native;
+  DocumentFragment? get content native;
 
   /**
    * An override to place the contents into content rather than as child nodes.
@@ -29608,11 +29664,11 @@
   void setInnerHtml(String? html,
       {NodeValidator? validator, NodeTreeSanitizer? treeSanitizer}) {
     text = null;
-    content.nodes.clear();
+    content!.nodes.clear();
     var fragment = createFragment(html,
         validator: validator, treeSanitizer: treeSanitizer);
 
-    content.append(fragment);
+    content!.append(fragment);
   }
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -29666,9 +29722,9 @@
    */
   TextAreaElement.created() : super.created();
 
-  String get autocapitalize native;
+  String? get autocapitalize native;
 
-  set autocapitalize(String value) native;
+  set autocapitalize(String? value) native;
 
   bool get autofocus native;
 
@@ -29678,13 +29734,13 @@
 
   set cols(int value) native;
 
-  String get defaultValue native;
+  String? get defaultValue native;
 
-  set defaultValue(String value) native;
+  set defaultValue(String? value) native;
 
-  String get dirName native;
+  String? get dirName native;
 
-  set dirName(String value) native;
+  set dirName(String? value) native;
 
   bool get disabled native;
 
@@ -29695,7 +29751,7 @@
   @Unstable()
   @Returns('NodeList')
   @Creates('NodeList')
-  List<Node> get labels native;
+  List<Node>? get labels native;
 
   int get maxLength native;
 
@@ -29725,31 +29781,31 @@
 
   set rows(int value) native;
 
-  String get selectionDirection native;
+  String? get selectionDirection native;
 
-  set selectionDirection(String value) native;
+  set selectionDirection(String? value) native;
 
-  int get selectionEnd native;
+  int? get selectionEnd native;
 
-  set selectionEnd(int value) native;
+  set selectionEnd(int? value) native;
 
-  int get selectionStart native;
+  int? get selectionStart native;
 
-  set selectionStart(int value) native;
+  set selectionStart(int? value) native;
 
-  int get textLength native;
+  int? get textLength native;
 
-  String get type native;
+  String? get type native;
 
-  String get validationMessage native;
+  String? get validationMessage native;
 
-  ValidityState get validity native;
+  ValidityState? get validity native;
 
-  String get value native;
+  String? get value native;
 
   set value(String? value) native;
 
-  bool get willValidate native;
+  bool? get willValidate native;
 
   String get wrap native;
 
@@ -29813,7 +29869,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get data native;
+  String? get data native;
 
   @JSName('initTextEvent')
   void _initTextEvent(String? type, bool? bubbles, bool? cancelable,
@@ -29830,29 +29886,29 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get actualBoundingBoxAscent native;
+  num? get actualBoundingBoxAscent native;
 
-  num get actualBoundingBoxDescent native;
+  num? get actualBoundingBoxDescent native;
 
-  num get actualBoundingBoxLeft native;
+  num? get actualBoundingBoxLeft native;
 
-  num get actualBoundingBoxRight native;
+  num? get actualBoundingBoxRight native;
 
-  num get alphabeticBaseline native;
+  num? get alphabeticBaseline native;
 
-  num get emHeightAscent native;
+  num? get emHeightAscent native;
 
-  num get emHeightDescent native;
+  num? get emHeightDescent native;
 
-  num get fontBoundingBoxAscent native;
+  num? get fontBoundingBoxAscent native;
 
-  num get fontBoundingBoxDescent native;
+  num? get fontBoundingBoxDescent native;
 
-  num get hangingBaseline native;
+  num? get hangingBaseline native;
 
-  num get ideographicBaseline native;
+  num? get ideographicBaseline native;
 
-  num get width native;
+  num? get width native;
 }
 // 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
@@ -29886,9 +29942,9 @@
 
   String get language native;
 
-  String get mode native;
+  String? get mode native;
 
-  set mode(String value) native;
+  set mode(String? value) native;
 
   void addCue(TextTrackCue cue) native;
 
@@ -29926,21 +29982,21 @@
   static const EventStreamProvider<Event> exitEvent =
       const EventStreamProvider<Event>('exit');
 
-  num get endTime native;
+  num? get endTime native;
 
-  set endTime(num value) native;
+  set endTime(num? value) native;
 
-  String get id native;
+  String? get id native;
 
-  set id(String value) native;
+  set id(String? value) native;
 
-  bool get pauseOnExit native;
+  bool? get pauseOnExit native;
 
-  set pauseOnExit(bool value) native;
+  set pauseOnExit(bool? value) native;
 
-  num get startTime native;
+  num? get startTime native;
 
-  set startTime(num value) native;
+  set startTime(num? value) native;
 
   TextTrack? get track native;
 
@@ -30108,9 +30164,9 @@
    */
   TimeElement.created() : super.created();
 
-  String get dateTime native;
+  String? get dateTime native;
 
-  set dateTime(String value) native;
+  set dateTime(String? value) native;
 }
 // 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
@@ -30178,36 +30234,36 @@
   static Touch _create_1(initDict) => JS('Touch', 'new Touch(#)', initDict);
 
   @JSName('clientX')
-  num get _clientX native;
+  num? get _clientX native;
 
   @JSName('clientY')
-  num get _clientY native;
+  num? get _clientY native;
 
-  num get force native;
+  num? get force native;
 
-  int get identifier native;
+  int? get identifier native;
 
   @JSName('pageX')
-  num get _pageX native;
+  num? get _pageX native;
 
   @JSName('pageY')
-  num get _pageY native;
+  num? get _pageY native;
 
   @JSName('radiusX')
-  num get _radiusX native;
+  num? get _radiusX native;
 
   @JSName('radiusY')
-  num get _radiusY native;
+  num? get _radiusY native;
 
   String? get region native;
 
-  num get rotationAngle native;
+  num? get rotationAngle native;
 
   @JSName('screenX')
-  num get _screenX native;
+  num? get _screenX native;
 
   @JSName('screenY')
-  num get _screenY native;
+  num? get _screenY native;
 
   EventTarget? get target => _convertNativeToDart_EventTarget(this._get_target);
   @JSName('target')
@@ -30265,19 +30321,19 @@
   static TouchEvent _create_2(type) =>
       JS('TouchEvent', 'new TouchEvent(#)', type);
 
-  bool get altKey native;
+  bool? get altKey native;
 
-  TouchList get changedTouches native;
+  TouchList? get changedTouches native;
 
-  bool get ctrlKey native;
+  bool? get ctrlKey native;
 
-  bool get metaKey native;
+  bool? get metaKey native;
 
-  bool get shiftKey native;
+  bool? get shiftKey native;
 
-  TouchList get targetTouches native;
+  TouchList? get targetTouches native;
 
-  TouchList get touches native;
+  TouchList? get touches native;
 
   /**
    * Checks if touch events supported on the current platform.
@@ -30387,15 +30443,15 @@
       label,
       kinds);
 
-  String get byteStreamTrackID native;
+  String? get byteStreamTrackID native;
 
-  Object get kinds native;
+  Object? get kinds native;
 
-  String get label native;
+  String? get label native;
 
-  String get language native;
+  String? get language native;
 
-  String get type native;
+  String? get type native;
 }
 // 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
@@ -30419,7 +30475,7 @@
   static TrackDefaultList _create_2() =>
       JS('TrackDefaultList', 'new TrackDefaultList()');
 
-  int get length native;
+  int? get length native;
 
   TrackDefault item(int index) native;
 }
@@ -30457,30 +30513,30 @@
   static const int NONE = 0;
 
   @JSName('default')
-  bool get defaultValue native;
+  bool? get defaultValue native;
 
   @JSName('default')
-  set defaultValue(bool value) native;
+  set defaultValue(bool? value) native;
 
-  String get kind native;
+  String? get kind native;
 
-  set kind(String value) native;
+  set kind(String? value) native;
 
-  String get label native;
+  String? get label native;
 
-  set label(String value) native;
+  set label(String? value) native;
 
-  int get readyState native;
+  int? get readyState native;
 
-  String get src native;
+  String? get src native;
 
-  set src(String value) native;
+  set src(String? value) native;
 
-  String get srclang native;
+  String? get srclang native;
 
-  set srclang(String value) native;
+  set srclang(String? value) native;
 
-  TextTrack get track native;
+  TextTrack? get track native;
 }
 // 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
@@ -30532,11 +30588,11 @@
   static TransitionEvent _create_2(type) =>
       JS('TransitionEvent', 'new TransitionEvent(#)', type);
 
-  num get elapsedTime native;
+  num? get elapsedTime native;
 
-  String get propertyName native;
+  String? get propertyName native;
 
-  String get pseudoElement native;
+  String? get pseudoElement native;
 }
 // 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
@@ -30658,7 +30714,7 @@
       JS('UIEvent', 'new UIEvent(#,#)', type, eventInitDict);
   static UIEvent _create_2(type) => JS('UIEvent', 'new UIEvent(#)', type);
 
-  int get detail native;
+  int? get detail native;
 
   InputDeviceCapabilities? get sourceCapabilities native;
 
@@ -30670,7 +30726,7 @@
 
   @JSName('which')
   @Unstable()
-  int get _which native;
+  int? get _which native;
 
   @JSName('initUIEvent')
   void _initUIEvent(String type, bool bubbles, bool cancelable, Window? view,
@@ -30769,49 +30825,49 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get hash native;
+  String? get hash native;
 
-  set hash(String value) native;
+  set hash(String? value) native;
 
-  String get host native;
+  String? get host native;
 
-  set host(String value) native;
+  set host(String? value) native;
 
-  String get hostname native;
+  String? get hostname native;
 
-  set hostname(String value) native;
+  set hostname(String? value) native;
 
-  String get href native;
+  String? get href native;
 
-  set href(String value) native;
+  set href(String? value) native;
 
-  String get origin native;
+  String? get origin native;
 
-  String get password native;
+  String? get password native;
 
-  set password(String value) native;
+  set password(String? value) native;
 
-  String get pathname native;
+  String? get pathname native;
 
-  set pathname(String value) native;
+  set pathname(String? value) native;
 
-  String get port native;
+  String? get port native;
 
-  set port(String value) native;
+  set port(String? value) native;
 
-  String get protocol native;
+  String? get protocol native;
 
-  set protocol(String value) native;
+  set protocol(String? value) native;
 
-  String get search native;
+  String? get search native;
 
-  set search(String value) native;
+  set search(String? value) native;
 
-  UrlSearchParams get searchParams native;
+  UrlSearchParams? get searchParams native;
 
-  String get username native;
+  String? get username native;
 
-  set username(String value) native;
+  set username(String? value) native;
 }
 // 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
@@ -30859,23 +30915,23 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get hash native;
+  String? get hash native;
 
-  String get host native;
+  String? get host native;
 
-  String get hostname native;
+  String? get hostname native;
 
-  String get href native;
+  String? get href native;
 
-  String get origin native;
+  String? get origin native;
 
-  String get pathname native;
+  String? get pathname native;
 
-  String get port native;
+  String? get port native;
 
-  String get protocol native;
+  String? get protocol native;
 
-  String get search native;
+  String? get search native;
 }
 // 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
@@ -30914,9 +30970,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get deviceName native;
+  String? get deviceName native;
 
-  bool get isExternal native;
+  bool? get isExternal native;
 
   Future requestSession([Map? options]) {
     var options_dict = null;
@@ -30952,7 +31008,7 @@
   static VRDeviceEvent _create_1(type, eventInitDict) =>
       JS('VRDeviceEvent', 'new VRDeviceEvent(#,#)', type, eventInitDict);
 
-  VRDevice get device native;
+  VRDevice? get device native;
 }
 // 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
@@ -30965,23 +31021,23 @@
     throw new UnsupportedError("Not supported");
   }
 
-  VRDisplayCapabilities get capabilities native;
+  VRDisplayCapabilities? get capabilities native;
 
-  num get depthFar native;
+  num? get depthFar native;
 
-  set depthFar(num value) native;
+  set depthFar(num? value) native;
 
-  num get depthNear native;
+  num? get depthNear native;
 
-  set depthNear(num value) native;
+  set depthNear(num? value) native;
 
-  int get displayId native;
+  int? get displayId native;
 
-  String get displayName native;
+  String? get displayName native;
 
-  bool get isPresenting native;
+  bool? get isPresenting native;
 
-  VRStageParameters get stageParameters native;
+  VRStageParameters? get stageParameters native;
 
   void cancelAnimationFrame(int handle) native;
 
@@ -31011,13 +31067,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get canPresent native;
+  bool? get canPresent native;
 
-  bool get hasExternalDisplay native;
+  bool? get hasExternalDisplay native;
 
-  bool get hasPosition native;
+  bool? get hasPosition native;
 
-  int get maxLayers native;
+  int? get maxLayers native;
 }
 // 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
@@ -31042,9 +31098,9 @@
   static VRDisplayEvent _create_2(type) =>
       JS('VRDisplayEvent', 'new VRDisplayEvent(#)', type);
 
-  VRDisplay get display native;
+  VRDisplay? get display native;
 
-  String get reason native;
+  String? get reason native;
 }
 // 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
@@ -31057,11 +31113,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Float32List get offset native;
+  Float32List? get offset native;
 
-  int get renderHeight native;
+  int? get renderHeight native;
 
-  int get renderWidth native;
+  int? get renderWidth native;
 }
 // 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
@@ -31079,15 +31135,15 @@
   }
   static VRFrameData _create_1() => JS('VRFrameData', 'new VRFrameData()');
 
-  Float32List get leftProjectionMatrix native;
+  Float32List? get leftProjectionMatrix native;
 
-  Float32List get leftViewMatrix native;
+  Float32List? get leftViewMatrix native;
 
-  VRPose get pose native;
+  VRPose? get pose native;
 
-  Float32List get rightProjectionMatrix native;
+  Float32List? get rightProjectionMatrix native;
 
-  Float32List get rightViewMatrix native;
+  Float32List? get rightViewMatrix native;
 }
 // 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
@@ -31102,7 +31158,7 @@
 
   VRStageBounds? get bounds native;
 
-  num get emulatedHeight native;
+  num? get emulatedHeight native;
 }
 // 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
@@ -31144,17 +31200,17 @@
   static const EventStreamProvider<Event> focusEvent =
       const EventStreamProvider<Event>('focus');
 
-  num get depthFar native;
+  num? get depthFar native;
 
-  set depthFar(num value) native;
+  set depthFar(num? value) native;
 
-  num get depthNear native;
+  num? get depthNear native;
 
-  set depthNear(num value) native;
+  set depthNear(num? value) native;
 
-  VRDevice get device native;
+  VRDevice? get device native;
 
-  bool get exclusive native;
+  bool? get exclusive native;
 
   Future end() => promiseToFuture(JS("", "#.end()", this));
 
@@ -31189,7 +31245,7 @@
   static VRSessionEvent _create_1(type, eventInitDict) =>
       JS('VRSessionEvent', 'new VRSessionEvent(#,#)', type, eventInitDict);
 
-  VRSession get session native;
+  VRSession? get session native;
 }
 // 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
@@ -31202,7 +31258,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  List<VRStageBoundsPoint> get geometry native;
+  List<VRStageBoundsPoint>? get geometry native;
 }
 // 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
@@ -31215,9 +31271,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get x native;
+  num? get x native;
 
-  num get z native;
+  num? get z native;
 }
 // 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
@@ -31230,11 +31286,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Float32List get sittingToStandingTransform native;
+  Float32List? get sittingToStandingTransform native;
 
-  num get sizeX native;
+  num? get sizeX native;
 
-  num get sizeZ native;
+  num? get sizeZ native;
 }
 // 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
@@ -31247,27 +31303,27 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get badInput native;
+  bool? get badInput native;
 
-  bool get customError native;
+  bool? get customError native;
 
-  bool get patternMismatch native;
+  bool? get patternMismatch native;
 
-  bool get rangeOverflow native;
+  bool? get rangeOverflow native;
 
-  bool get rangeUnderflow native;
+  bool? get rangeUnderflow native;
 
-  bool get stepMismatch native;
+  bool? get stepMismatch native;
 
-  bool get tooLong native;
+  bool? get tooLong native;
 
-  bool get tooShort native;
+  bool? get tooShort native;
 
-  bool get typeMismatch native;
+  bool? get typeMismatch native;
 
-  bool get valid native;
+  bool? get valid native;
 
-  bool get valueMissing native;
+  bool? get valueMissing native;
 }
 // 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
@@ -31307,12 +31363,12 @@
   @JSName('webkitDecodedFrameCount')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  int get decodedFrameCount native;
+  int? get decodedFrameCount native;
 
   @JSName('webkitDroppedFrameCount')
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.SAFARI)
-  int get droppedFrameCount native;
+  int? get droppedFrameCount native;
 
   int get width native;
 
@@ -31341,13 +31397,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get corruptedVideoFrames native;
+  int? get corruptedVideoFrames native;
 
-  num get creationTime native;
+  num? get creationTime native;
 
-  int get droppedVideoFrames native;
+  int? get droppedVideoFrames native;
 
-  int get totalVideoFrames native;
+  int? get totalVideoFrames native;
 }
 // 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
@@ -31360,17 +31416,17 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get id native;
+  String? get id native;
 
-  String get kind native;
+  String? get kind native;
 
-  String get label native;
+  String? get label native;
 
-  String get language native;
+  String? get language native;
 
-  bool get selected native;
+  bool? get selected native;
 
-  set selected(bool value) native;
+  set selected(bool? value) native;
 
   SourceBuffer? get sourceBuffer native;
 }
@@ -31388,9 +31444,9 @@
   static const EventStreamProvider<Event> changeEvent =
       const EventStreamProvider<Event>('change');
 
-  int get length native;
+  int? get length native;
 
-  int get selectedIndex native;
+  int? get selectedIndex native;
 
   VideoTrack __getter__(int index) native;
 
@@ -31415,19 +31471,19 @@
   static const EventStreamProvider<Event> scrollEvent =
       const EventStreamProvider<Event>('scroll');
 
-  num get height native;
+  num? get height native;
 
-  num get offsetLeft native;
+  num? get offsetLeft native;
 
-  num get offsetTop native;
+  num? get offsetTop native;
 
-  num get pageLeft native;
+  num? get pageLeft native;
 
-  num get pageTop native;
+  num? get pageTop native;
 
-  num get scale native;
+  num? get scale native;
 
-  num get width native;
+  num? get width native;
 
   Stream<Event> get onResize => resizeEvent.forTarget(this);
 
@@ -31457,9 +31513,9 @@
   static VttCue _create_1(startTime, endTime, text) =>
       JS('VttCue', 'new VTTCue(#,#,#)', startTime, endTime, text);
 
-  String get align native;
+  String? get align native;
 
-  set align(String value) native;
+  set align(String? value) native;
 
   @Creates('Null')
   @Returns('num|String')
@@ -31477,21 +31533,21 @@
 
   set region(VttRegion? value) native;
 
-  num get size native;
+  num? get size native;
 
-  set size(num value) native;
+  set size(num? value) native;
 
-  bool get snapToLines native;
+  bool? get snapToLines native;
 
-  set snapToLines(bool value) native;
+  set snapToLines(bool? value) native;
 
-  String get text native;
+  String? get text native;
 
-  set text(String value) native;
+  set text(String? value) native;
 
-  String get vertical native;
+  String? get vertical native;
 
-  set vertical(String value) native;
+  set vertical(String? value) native;
 
   @JSName('getCueAsHTML')
   DocumentFragment getCueAsHtml() native;
@@ -31512,37 +31568,37 @@
   }
   static VttRegion _create_1() => JS('VttRegion', 'new VTTRegion()');
 
-  String get id native;
+  String? get id native;
 
-  set id(String value) native;
+  set id(String? value) native;
 
-  int get lines native;
+  int? get lines native;
 
-  set lines(int value) native;
+  set lines(int? value) native;
 
-  num get regionAnchorX native;
+  num? get regionAnchorX native;
 
-  set regionAnchorX(num value) native;
+  set regionAnchorX(num? value) native;
 
-  num get regionAnchorY native;
+  num? get regionAnchorY native;
 
-  set regionAnchorY(num value) native;
+  set regionAnchorY(num? value) native;
 
-  String get scroll native;
+  String? get scroll native;
 
-  set scroll(String value) native;
+  set scroll(String? value) native;
 
-  num get viewportAnchorX native;
+  num? get viewportAnchorX native;
 
-  set viewportAnchorX(num value) native;
+  set viewportAnchorX(num? value) native;
 
-  num get viewportAnchorY native;
+  num? get viewportAnchorY native;
 
-  set viewportAnchorY(num value) native;
+  set viewportAnchorY(num? value) native;
 
-  num get width native;
+  num? get width native;
 
-  set width(num value) native;
+  set width(num? value) native;
 }
 // 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
@@ -31652,19 +31708,19 @@
 
   static const int OPEN = 1;
 
-  String get binaryType native;
+  String? get binaryType native;
 
-  set binaryType(String value) native;
+  set binaryType(String? value) native;
 
-  int get bufferedAmount native;
+  int? get bufferedAmount native;
 
-  String get extensions native;
+  String? get extensions native;
 
-  String get protocol native;
+  String? get protocol native;
 
   int get readyState native;
 
-  String get url native;
+  String? get url native;
 
   void close([int? code, String? reason]) native;
 
@@ -31802,12 +31858,12 @@
   static const int DOM_DELTA_PIXEL = 0x00;
 
   @JSName('deltaX')
-  num get _deltaX native;
+  num? get _deltaX native;
 
   @JSName('deltaY')
-  num get _deltaY native;
+  num? get _deltaY native;
 
-  num get deltaZ native;
+  num? get deltaZ native;
 
   /**
    * The amount that is expected to scroll vertically, in units determined by
@@ -31818,10 +31874,9 @@
    * * [WheelEvent.deltaY](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-WheelEvent-deltaY) from the W3C.
    */
   num get deltaY {
-    if (JS('bool', '#.deltaY !== undefined', this)) {
-      // W3C WheelEvent
-      return this._deltaY;
-    }
+    // deltaY may be missing or undefined.
+    num? value = JS('', '#.deltaY', this);
+    if (value != null) return value;
     throw new UnsupportedError('deltaY is not supported');
   }
 
@@ -31834,10 +31889,9 @@
    * * [WheelEvent.deltaX](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-WheelEvent-deltaX) from the W3C.
    */
   num get deltaX {
-    if (JS('bool', '#.deltaX !== undefined', this)) {
-      // W3C WheelEvent
-      return this._deltaX;
-    }
+    // deltaX may be missing or undefined.
+    num? value = JS('', '#.deltaX', this);
+    if (value != null) return value;
     throw new UnsupportedError('deltaX is not supported');
   }
 
@@ -32306,7 +32360,7 @@
    */
   static const int TEMPORARY = 0;
 
-  _Worklet get animationWorklet native;
+  _Worklet? get animationWorklet native;
 
   /**
    * The application cache for this window.
@@ -32321,15 +32375,15 @@
    *   from WHATWG.
    */
 
-  ApplicationCache get applicationCache native;
+  ApplicationCache? get applicationCache native;
 
-  _Worklet get audioWorklet native;
+  _Worklet? get audioWorklet native;
 
-  CacheStorage get caches native;
+  CacheStorage? get caches native;
 
-  bool get closed native;
+  bool? get closed native;
 
-  CookieStore get cookieStore native;
+  CookieStore? get cookieStore native;
 
   /**
    * Entrypoint for the browser's cryptographic functions.
@@ -32339,21 +32393,21 @@
    * * [Web cryptography API](http://www.w3.org/TR/WebCryptoAPI/) from W3C.
    */
 
-  Crypto get crypto native;
+  Crypto? get crypto native;
 
-  CustomElementRegistry get customElements native;
+  CustomElementRegistry? get customElements native;
 
   /// *Deprecated*.
 
-  String get defaultStatus native;
+  String? get defaultStatus native;
 
-  set defaultStatus(String value) native;
+  set defaultStatus(String? value) native;
 
   /// *Deprecated*.
 
-  String get defaultstatus native;
+  String? get defaultstatus native;
 
-  set defaultstatus(String value) native;
+  set defaultstatus(String? value) native;
 
   /**
    * The ratio between physical pixels and logical CSS pixels.
@@ -32368,7 +32422,7 @@
 
   num get devicePixelRatio native;
 
-  External get external native;
+  External? get external native;
 
   /**
    * The current session history for this window's newest document.
@@ -32390,7 +32444,7 @@
    *   from MDN.
    */
 
-  int get innerHeight native;
+  int? get innerHeight native;
 
   /**
    * The width of the viewport including scrollbars.
@@ -32401,9 +32455,9 @@
    *   from MDN.
    */
 
-  int get innerWidth native;
+  int? get innerWidth native;
 
-  bool get isSecureContext native;
+  bool? get isSecureContext native;
 
   /**
    * Storage for this window that persists across sessions.
@@ -32430,7 +32484,7 @@
    *   from WHATWG.
    */
 
-  BarProp get locationbar native;
+  BarProp? get locationbar native;
 
   /**
    * This window's menu bar, which displays menu commands.
@@ -32442,7 +32496,7 @@
    *   from WHATWG.
    */
 
-  BarProp get menubar native;
+  BarProp? get menubar native;
 
   /**
    * The name of this window.
@@ -32453,9 +32507,9 @@
    *   from MDN.
    */
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
   /**
    * The user agent accessing this window.
@@ -32478,7 +32532,7 @@
    *   from WebPlatform.org.
    */
 
-  bool get offscreenBuffering native;
+  bool? get offscreenBuffering native;
 
   WindowBase? get opener => _convertNativeToDart_Window(this._get_opener);
   @JSName('opener')
@@ -32488,9 +32542,9 @@
 
   set opener(WindowBase? value) native;
 
-  int get orientation native;
+  int? get orientation native;
 
-  String get origin native;
+  String? get origin native;
 
   /**
    * The height of this window including all user interface elements.
@@ -32581,7 +32635,7 @@
    *   from W3C.
    */
 
-  Screen get screen native;
+  Screen? get screen native;
 
   /**
    * The distance from the left side of the screen to the left side of this
@@ -32593,7 +32647,7 @@
    *   from W3C.
    */
 
-  int get screenLeft native;
+  int? get screenLeft native;
 
   /**
    * The distance from the top of the screen to the top of this window.
@@ -32604,7 +32658,7 @@
    *   from W3C.
    */
 
-  int get screenTop native;
+  int? get screenTop native;
 
   /**
    * The distance from the left side of the screen to the mouse pointer.
@@ -32615,7 +32669,7 @@
    *   from W3C.
    */
 
-  int get screenX native;
+  int? get screenX native;
 
   /**
    * The distance from the top of the screen to the mouse pointer.
@@ -32626,7 +32680,7 @@
    *   from W3C.
    */
 
-  int get screenY native;
+  int? get screenY native;
 
   /**
    * This window's scroll bars.
@@ -32638,7 +32692,7 @@
    *   from WHATWG.
    */
 
-  BarProp get scrollbars native;
+  BarProp? get scrollbars native;
 
   /**
    * The current window.
@@ -32688,13 +32742,13 @@
    *   from W3C.
    */
 
-  SpeechSynthesis get speechSynthesis native;
+  SpeechSynthesis? get speechSynthesis native;
 
   /// *Deprecated*.
 
-  String get status native;
+  String? get status native;
 
-  set status(String value) native;
+  set status(String? value) native;
 
   /**
    * This window's status bar.
@@ -32706,7 +32760,7 @@
    *   from WHATWG.
    */
 
-  BarProp get statusbar native;
+  BarProp? get statusbar native;
 
   /**
    * Access to CSS media queries.
@@ -32718,7 +32772,7 @@
    *   from Safari Developer Library.
    */
 
-  StyleMedia get styleMedia native;
+  StyleMedia? get styleMedia native;
 
   /**
    * This window's tool bar.
@@ -32730,7 +32784,7 @@
    *   from WHATWG.
    */
 
-  BarProp get toolbar native;
+  BarProp? get toolbar native;
 
   WindowBase? get top => _convertNativeToDart_Window(this._get_top);
   @JSName('top')
@@ -33639,8 +33693,9 @@
 
   String get returnValue => _returnValue;
 
-  set returnValue(String value) {
-    _returnValue = value;
+  set returnValue(String? value) {
+    // Typed as nullable only to be compatible with the overriden method.
+    _returnValue = value!;
     // FF and IE use the value as the return value, Chrome will return this from
     // the event callback function.
     if (JS<bool>('bool', '("returnValue" in #)', wrapped)) {
@@ -33712,9 +33767,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get focused native;
+  bool? get focused native;
 
-  String get visibilityState native;
+  String? get visibilityState native;
 
   Future<WindowClient> focus() =>
       promiseToFuture<WindowClient>(JS("", "#.focus()", this));
@@ -33855,23 +33910,23 @@
   static const EventStreamProvider<Event> errorEvent =
       const EventStreamProvider<Event>('error');
 
-  String get addressSpace native;
+  String? get addressSpace native;
 
-  CacheStorage get caches native;
+  CacheStorage? get caches native;
 
-  Crypto get crypto native;
+  Crypto? get crypto native;
 
-  IdbFactory get indexedDB native;
+  IdbFactory? get indexedDB native;
 
-  bool get isSecureContext native;
+  bool? get isSecureContext native;
 
   _WorkerLocation get location native;
 
   _WorkerNavigator get navigator native;
 
-  String get origin native;
+  String? get origin native;
 
-  WorkerPerformance get performance native;
+  WorkerPerformance? get performance native;
 
   WorkerGlobalScope get self native;
 
@@ -33930,9 +33985,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  MemoryInfo get memory native;
+  MemoryInfo? get memory native;
 
-  num get timeOrigin native;
+  num? get timeOrigin native;
 
   void clearMarks(String? markName) native;
 
@@ -33980,7 +34035,7 @@
       JS('WorkletAnimation', 'new WorkletAnimation(#,#,#,#)', animatorName,
           effects, timelines, options);
 
-  String get playState native;
+  String? get playState native;
 
   void cancel() native;
 
@@ -34089,19 +34144,19 @@
 
   static const int UNORDERED_NODE_SNAPSHOT_TYPE = 6;
 
-  bool get booleanValue native;
+  bool? get booleanValue native;
 
-  bool get invalidIteratorState native;
+  bool? get invalidIteratorState native;
 
-  num get numberValue native;
+  num? get numberValue native;
 
-  int get resultType native;
+  int? get resultType native;
 
-  Node get singleNodeValue native;
+  Node? get singleNodeValue native;
 
-  int get snapshotLength native;
+  int? get snapshotLength native;
 
-  String get stringValue native;
+  String? get stringValue native;
 
   Node? iterateNext() native;
 
@@ -34192,16 +34247,16 @@
   }
 
   @JSName('localName')
-  String get _localName native;
+  String? get _localName native;
 
-  String get name native;
+  String? get name native;
 
   @JSName('namespaceURI')
   String? get _namespaceUri native;
 
-  String get value native;
+  String? get value native;
 
-  set value(String value) native;
+  set value(String? value) native;
 }
 // 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
@@ -34579,27 +34634,39 @@
 
   // Shadowing definition.
 
-  num get height native;
+  // The following getter is incompatible with some browsers but
+  // must be made non-nullable to match the overridden method.
+
+  @JSName('height')
+  num? get _height native;
+
+  num get height => _height!;
 
   set height(num value) native;
 
   // Shadowing definition.
 
-  num get width native;
+  // The following getter is incompatible with some browsers but
+  // must be made non-nullable to match the overridden method.
+
+  @JSName('width')
+  num? get _width native;
+
+  num get width => _width!;
 
   set width(num value) native;
 
   // Shadowing definition.
 
-  num get x native;
+  num? get x native;
 
-  set x(num value) native;
+  set x(num? value) native;
 
   // Shadowing definition.
 
-  num get y native;
+  num? get y native;
 
-  set y(num value) native;
+  set y(num? value) native;
 }
 
 /**
@@ -35065,9 +35132,9 @@
 
   ReportBody? get body native;
 
-  String get type native;
+  String? get type native;
 
-  String get url native;
+  String? get url native;
 }
 // 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
@@ -35091,23 +35158,23 @@
       JS('_Request', 'new Request(#,#)', input, requestInitDict);
   static _Request _create_2(input) => JS('_Request', 'new Request(#)', input);
 
-  String get cache native;
+  String? get cache native;
 
-  String get credentials native;
+  String? get credentials native;
 
-  Headers get headers native;
+  Headers? get headers native;
 
-  String get integrity native;
+  String? get integrity native;
 
-  String get mode native;
+  String? get mode native;
 
-  String get redirect native;
+  String? get redirect native;
 
-  String get referrer native;
+  String? get referrer native;
 
-  String get referrerPolicy native;
+  String? get referrerPolicy native;
 
-  String get url native;
+  String? get url native;
 
   _Request clone() native;
 }
@@ -35671,12 +35738,12 @@
 
   Iterable<String> get keys {
     // TODO: generate a lazy collection instead.
-    var attributes = _element._attributes;
+    var attributes = _element._attributes!;
     var keys = <String>[];
     for (int i = 0, len = attributes.length; i < len; i++) {
       _Attr attr = attributes[i] as _Attr;
       if (_matches(attr)) {
-        keys.add(attr.name);
+        keys.add(attr.name!);
       }
     }
     return keys;
@@ -35684,12 +35751,12 @@
 
   Iterable<String> get values {
     // TODO: generate a lazy collection instead.
-    var attributes = _element._attributes;
+    var attributes = _element._attributes!;
     var values = <String>[];
     for (int i = 0, len = attributes.length; i < len; i++) {
       _Attr attr = attributes[i] as _Attr;
       if (_matches(attr)) {
-        values.add(attr.value);
+        values.add(attr.value!);
       }
     }
     return values;
@@ -36012,8 +36079,11 @@
    *     print(window.closed); // 'false'
    *     window.close();
    *     print(window.closed); // 'true'
+   *
+   * MDN does not have compatibility info on this attribute, and therefore is
+   * marked nullable.
    */
-  bool get closed;
+  bool? get closed;
 
   /**
    * A reference to the window that opened this one.
@@ -40521,12 +40591,12 @@
   static EventStreamProvider<KeyEvent> keyPressEvent =
       new _KeyboardEventHandler('keypress');
 
-  String get code => _parent.code;
+  String get code => _parent.code!;
   /** True if the ctrl key is pressed during this event. */
   bool get ctrlKey => _parent.ctrlKey;
-  int get detail => _parent.detail;
-  bool get isComposing => _parent.isComposing;
-  String get key => _parent.key;
+  int get detail => _parent.detail!;
+  bool get isComposing => _parent.isComposing!;
+  String get key => _parent.key!;
   /**
    * Accessor to the part of the keyboard that the key was pressed from (one of
    * KeyLocation.STANDARD, KeyLocation.RIGHT, KeyLocation.LEFT,
@@ -40608,11 +40678,11 @@
 
   _WrappedEvent(this.wrapped);
 
-  bool get bubbles => wrapped.bubbles;
+  bool get bubbles => wrapped.bubbles!;
 
-  bool get cancelable => wrapped.cancelable;
+  bool get cancelable => wrapped.cancelable!;
 
-  bool get composed => wrapped.composed;
+  bool get composed => wrapped.composed!;
 
   EventTarget? get currentTarget => wrapped.currentTarget;
 
@@ -40620,7 +40690,7 @@
 
   int get eventPhase => wrapped.eventPhase;
 
-  bool get isTrusted => wrapped.isTrusted;
+  bool get isTrusted => wrapped.isTrusted!;
 
   EventTarget? get target => wrapped.target;
 
@@ -41045,7 +41115,7 @@
 
     if (element is TemplateElement) {
       TemplateElement template = element;
-      sanitizeTree(template.content);
+      sanitizeTree(template.content!);
     }
   }
 
diff --git a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
index 4cb159b..f8fb0a7 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -244,7 +244,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get direction native;
+  String? get direction native;
 
   @_annotation_Creates_IDBKey
   @_annotation_Returns_IDBKey
@@ -400,15 +400,15 @@
   static const EventStreamProvider<VersionChangeEvent> versionChangeEvent =
       const EventStreamProvider<VersionChangeEvent>('versionchange');
 
-  String get name native;
+  String? get name native;
 
   @Returns('DomStringList')
   @Creates('DomStringList')
-  List<String> get objectStoreNames native;
+  List<String>? get objectStoreNames native;
 
   @Creates('int|String|Null')
   @Returns('int|String|Null')
-  int get version native;
+  int? get version native;
 
   void close() native;
 
@@ -656,15 +656,15 @@
   @annotation_Creates_SerializedScriptValue
   Object? get keyPath native;
 
-  bool get multiEntry native;
+  bool? get multiEntry native;
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
-  ObjectStore get objectStore native;
+  ObjectStore? get objectStore native;
 
-  bool get unique native;
+  bool? get unique native;
 
   @JSName('count')
   Request _count(Object? key) native;
@@ -727,12 +727,12 @@
   @annotation_Creates_SerializedScriptValue
   Object? get lower native;
 
-  bool get lowerOpen native;
+  bool? get lowerOpen native;
 
   @annotation_Creates_SerializedScriptValue
   Object? get upper native;
 
-  bool get upperOpen native;
+  bool? get upperOpen native;
 
   @JSName('bound')
   static KeyRange bound_(Object lower, Object upper,
@@ -879,20 +879,20 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get autoIncrement native;
+  bool? get autoIncrement native;
 
   @Returns('DomStringList')
   @Creates('DomStringList')
-  List<String> get indexNames native;
+  List<String>? get indexNames native;
 
   @annotation_Creates_SerializedScriptValue
   Object? get keyPath native;
 
-  String get name native;
+  String? get name native;
 
-  set name(String value) native;
+  set name(String? value) native;
 
-  Transaction get transaction native;
+  Transaction? get transaction native;
 
   @Returns('Request')
   @Creates('Request')
@@ -1028,7 +1028,7 @@
 
   Object? get key native;
 
-  String get type native;
+  String? get type native;
 
   Object? get value native;
 }
@@ -1072,11 +1072,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Database get database native;
+  Database? get database native;
 
   Object? get records native;
 
-  Transaction get transaction native;
+  Transaction? get transaction native;
 }
 // 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
@@ -1145,9 +1145,9 @@
   static const EventStreamProvider<Event> successEvent =
       const EventStreamProvider<Event>('success');
 
-  DomException get error native;
+  DomException? get error native;
 
-  String get readyState native;
+  String? get readyState native;
 
   dynamic get result => _convertNativeToDart_IDBAny(this._get_result);
   @JSName('result')
@@ -1157,7 +1157,7 @@
   @Creates('Null')
   Object? get source native;
 
-  Transaction get transaction native;
+  Transaction? get transaction native;
 
   /// Stream of `error` events handled by this [Request].
   Stream<Event> get onError => errorEvent.forTarget(this);
@@ -1232,15 +1232,15 @@
   static const EventStreamProvider<Event> errorEvent =
       const EventStreamProvider<Event>('error');
 
-  Database get db native;
+  Database? get db native;
 
-  DomException get error native;
+  DomException? get error native;
 
-  String get mode native;
+  String? get mode native;
 
   @Returns('DomStringList')
   @Creates('DomStringList')
-  List<String> get objectStoreNames native;
+  List<String>? get objectStoreNames native;
 
   void abort() native;
 
@@ -1282,9 +1282,9 @@
   static VersionChangeEvent _create_2(type) =>
       JS('VersionChangeEvent', 'new IDBVersionChangeEvent(#)', type);
 
-  String get dataLoss native;
+  String? get dataLoss native;
 
-  String get dataLossMessage native;
+  String? get dataLossMessage native;
 
   @Creates('int|String|Null')
   @Returns('int|String|Null')
@@ -1292,7 +1292,7 @@
 
   @Creates('int|String|Null')
   @Returns('int|String|Null')
-  int get oldVersion native;
+  int? get oldVersion native;
 
   @JSName('target')
   OpenDBRequest get target native;
diff --git a/sdk/lib/internal/bytes_builder.dart b/sdk/lib/internal/bytes_builder.dart
new file mode 100644
index 0000000..ea19576
--- /dev/null
+++ b/sdk/lib/internal/bytes_builder.dart
@@ -0,0 +1,240 @@
+// 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.
+
+part of dart._internal;
+
+/// Builds a list of bytes, allowing bytes and lists of bytes to be added at the
+/// end.
+///
+/// Used to efficiently collect bytes and lists of bytes.
+abstract class BytesBuilder {
+  /// Construct a new empty [BytesBuilder].
+  ///
+  /// If [copy] is true (the default), the created builder is a *copying*
+  /// builder. A copying builder maintains its own internal buffer and copies
+  /// the bytes added to it eagerly.
+  ///
+  /// If [copy] set to false, the created builder assumes that lists added
+  /// to it will not change.
+  /// Any [Uint8List] added using [add] is kept until
+  /// [toBytes] or [takeBytes] is called,
+  /// and only then are their contents copied.
+  /// A non-[Uint8List] may be copied eagerly.
+  /// If only a single [Uint8List] is added to the builder,
+  /// that list is returned by [toBytes] or [takeBytes] directly, without any copying.
+  /// A list added to a non-copying builder *should not* change its content
+  /// after being added, and it *must not* change its length after being added.
+  /// (Normal [Uint8List]s are fixed length lists, but growing lists implementing
+  /// [Uint8List] exist.)
+  factory BytesBuilder({bool copy = true}) =>
+      copy ? _CopyingBytesBuilder() : _BytesBuilder();
+
+  /// Appends [bytes] to the current contents of this builder.
+  ///
+  /// Each value of [bytes] will be truncated
+  /// to an 8-bit value in the range 0 .. 255.
+  void add(List<int> bytes);
+
+  /// Appends [byte] to the current contents of this builder.
+  ///
+  /// The [byte] will be truncated to an 8-bit value in the range 0 .. 255.
+  void addByte(int byte);
+
+  /// Returns the bytes currently contained in this builder and clears it.
+  ///
+  /// The returned list may be a view of a larger buffer.
+  Uint8List takeBytes();
+
+  /// Returns a copy of the current byte contents of this builder.
+  ///
+  /// Leaves the contents of this builder intact.
+  Uint8List toBytes();
+
+  /// The number of bytes in this builder.
+  int get length;
+
+  /// Whether the buffer is empty.
+  bool get isEmpty;
+
+  /// Whether the buffer is non-empty.
+  bool get isNotEmpty;
+
+  /// Clears the contents of this builder.
+  ///
+  /// The current contents are discarded and this builder becomes empty.
+  void clear();
+}
+
+/// A [BytesBuilder] which appends bytes to a growing internal buffer.
+class _CopyingBytesBuilder implements BytesBuilder {
+  /// Initial size of internal buffer.
+  static const int _initSize = 1024;
+
+  /// Reusable empty [Uint8List].
+  ///
+  /// Safe for reuse because a fixed-length empty list is immutable.
+  static final _emptyList = Uint8List(0);
+
+  /// Current count of bytes written to buffer.
+  int _length = 0;
+
+  /// Internal buffer accumulating bytes.
+  ///
+  /// Will grow as necessary
+  Uint8List _buffer;
+
+  _CopyingBytesBuilder() : _buffer = _emptyList;
+
+  void add(List<int> bytes) {
+    int byteCount = bytes.length;
+    if (byteCount == 0) return;
+    int required = _length + byteCount;
+    if (_buffer.length < required) {
+      _grow(required);
+    }
+    assert(_buffer.length >= required);
+    if (bytes is Uint8List) {
+      _buffer.setRange(_length, required, bytes);
+    } else {
+      for (int i = 0; i < byteCount; i++) {
+        _buffer[_length + i] = bytes[i];
+      }
+    }
+    _length = required;
+  }
+
+  void addByte(int byte) {
+    if (_buffer.length == _length) {
+      // The grow algorithm always at least doubles.
+      // If we added one to _length it would quadruple unnecessarily.
+      _grow(_length);
+    }
+    assert(_buffer.length > _length);
+    _buffer[_length] = byte;
+    _length++;
+  }
+
+  void _grow(int required) {
+    // We will create a list in the range of 2-4 times larger than
+    // required.
+    int newSize = required * 2;
+    if (newSize < _initSize) {
+      newSize = _initSize;
+    } else {
+      newSize = _pow2roundup(newSize);
+    }
+    var newBuffer = Uint8List(newSize);
+    newBuffer.setRange(0, _buffer.length, _buffer);
+    _buffer = newBuffer;
+  }
+
+  Uint8List takeBytes() {
+    if (_length == 0) return _emptyList;
+    var buffer = Uint8List.view(_buffer.buffer, _buffer.offsetInBytes, _length);
+    _clear();
+    return buffer;
+  }
+
+  Uint8List toBytes() {
+    if (_length == 0) return _emptyList;
+    return Uint8List.fromList(
+        Uint8List.view(_buffer.buffer, _buffer.offsetInBytes, _length));
+  }
+
+  int get length => _length;
+
+  bool get isEmpty => _length == 0;
+
+  bool get isNotEmpty => _length != 0;
+
+  void clear() {
+    _clear();
+  }
+
+  void _clear() {
+    _length = 0;
+    _buffer = _emptyList;
+  }
+
+  /// Rounds numbers <= 2^32 up to the nearest power of 2.
+  static int _pow2roundup(int x) {
+    assert(x > 0);
+    --x;
+    x |= x >> 1;
+    x |= x >> 2;
+    x |= x >> 4;
+    x |= x >> 8;
+    x |= x >> 16;
+    return x + 1;
+  }
+}
+
+/// A non-copying [BytesBuilder].
+///
+/// Accumulates lists of integers and lazily builds
+/// a collected list with all the bytes when requested.
+class _BytesBuilder implements BytesBuilder {
+  int _length = 0;
+  final List<Uint8List> _chunks = [];
+
+  void add(List<int> bytes) {
+    Uint8List typedBytes;
+    if (bytes is Uint8List) {
+      typedBytes = bytes;
+    } else {
+      typedBytes = Uint8List.fromList(bytes);
+    }
+    _chunks.add(typedBytes);
+    _length += typedBytes.length;
+  }
+
+  void addByte(int byte) {
+    // TODO(lrn): Optimize repeated `addByte` calls.
+    _chunks.add(Uint8List(1)..[0] = byte);
+    _length++;
+  }
+
+  Uint8List takeBytes() {
+    if (_length == 0) return _CopyingBytesBuilder._emptyList;
+    if (_chunks.length == 1) {
+      var buffer = _chunks[0];
+      _clear();
+      return buffer;
+    }
+    var buffer = Uint8List(_length);
+    int offset = 0;
+    for (var chunk in _chunks) {
+      buffer.setRange(offset, offset + chunk.length, chunk);
+      offset += chunk.length;
+    }
+    _clear();
+    return buffer;
+  }
+
+  Uint8List toBytes() {
+    if (_length == 0) return _CopyingBytesBuilder._emptyList;
+    var buffer = Uint8List(_length);
+    int offset = 0;
+    for (var chunk in _chunks) {
+      buffer.setRange(offset, offset + chunk.length, chunk);
+      offset += chunk.length;
+    }
+    return buffer;
+  }
+
+  int get length => _length;
+
+  bool get isEmpty => _length == 0;
+
+  bool get isNotEmpty => _length != 0;
+
+  void clear() {
+    _clear();
+  }
+
+  void _clear() {
+    _length = 0;
+    _chunks.clear();
+  }
+}
diff --git a/sdk/lib/internal/internal.dart b/sdk/lib/internal/internal.dart
index dad3b05..f86652e 100644
--- a/sdk/lib/internal/internal.dart
+++ b/sdk/lib/internal/internal.dart
@@ -21,6 +21,7 @@
 import 'dart:typed_data' show Uint8List;
 
 part 'async_cast.dart';
+part 'bytes_builder.dart';
 part 'cast.dart';
 part 'errors.dart';
 part 'iterable.dart';
@@ -186,7 +187,7 @@
 /// of that class.
 /// If applied to a class method, or parameter of such,
 /// any method implementing that interface method is also annotated.
-/// I multiple `Since` annotations apply to the same declaration or
+/// If multiple `Since` annotations apply to the same declaration or
 /// parameter, the latest version takes precendence.
 ///
 /// Any use of a marked API may trigger a warning if the using code
diff --git a/sdk/lib/internal/internal_sources.gni b/sdk/lib/internal/internal_sources.gni
index 8510ab2..c35e678 100644
--- a/sdk/lib/internal/internal_sources.gni
+++ b/sdk/lib/internal/internal_sources.gni
@@ -8,6 +8,7 @@
 
   # The above file needs to be first as it lists the parts below.
   "async_cast.dart",
+  "bytes_builder.dart",
   "cast.dart",
   "errors.dart",
   "iterable.dart",
diff --git a/sdk/lib/io/bytes_builder.dart b/sdk/lib/io/bytes_builder.dart
deleted file mode 100644
index 6f13693..0000000
--- a/sdk/lib/io/bytes_builder.dart
+++ /dev/null
@@ -1,234 +0,0 @@
-// 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.
-
-part of dart.io;
-
-/**
- * Builds a list of bytes, allowing bytes and lists of bytes to be added at the
- * end.
- *
- * Used to efficiently collect bytes and lists of bytes.
- */
-abstract class BytesBuilder {
-  /**
-   * Construct a new empty [BytesBuilder].
-   *
-   * If [copy] is true, the data is always copied when added to the list. If
-   * it [copy] is false, the data is only copied if needed. That means that if
-   * the lists are changed after added to the [BytesBuilder], it may effect the
-   * output. Default is `true`.
-   */
-  factory BytesBuilder({bool copy: true}) {
-    if (copy) {
-      return new _CopyingBytesBuilder();
-    } else {
-      return new _BytesBuilder();
-    }
-  }
-
-  /**
-   * Appends [bytes] to the current contents of the builder.
-   *
-   * Each value of [bytes] will be bit-representation truncated to the range
-   * 0 .. 255.
-   */
-  void add(List<int> bytes);
-
-  /**
-   * Append [byte] to the current contents of the builder.
-   *
-   * The [byte] will be bit-representation truncated to the range 0 .. 255.
-   */
-  void addByte(int byte);
-
-  /**
-   * Returns the contents of `this` and clears `this`.
-   *
-   * The list returned is a view of the internal buffer, limited to the
-   * [length].
-   */
-  Uint8List takeBytes();
-
-  /**
-   * Returns a copy of the current contents of the builder.
-   *
-   * Leaves the contents of the builder intact.
-   */
-  Uint8List toBytes();
-
-  /**
-   * The number of bytes in the builder.
-   */
-  int get length;
-
-  /**
-   * Returns `true` if the buffer is empty.
-   */
-  bool get isEmpty;
-
-  /**
-   * Returns `true` if the buffer is not empty.
-   */
-  bool get isNotEmpty;
-
-  /**
-   * Clear the contents of the builder.
-   */
-  void clear();
-}
-
-class _CopyingBytesBuilder implements BytesBuilder {
-  // Start with 1024 bytes.
-  static const int _initSize = 1024;
-
-  // Safe for reuse because a fixed-length empty list is immutable.
-  static final _emptyList = new Uint8List(0);
-
-  int _length = 0;
-  Uint8List _buffer;
-
-  _CopyingBytesBuilder([int initialCapacity = 0])
-      : _buffer = (initialCapacity <= 0)
-            ? _emptyList
-            : new Uint8List(_pow2roundup(initialCapacity));
-
-  void add(List<int> bytes) {
-    int bytesLength = bytes.length;
-    if (bytesLength == 0) return;
-    int required = _length + bytesLength;
-    if (_buffer.length < required) {
-      _grow(required);
-    }
-    assert(_buffer.length >= required);
-    if (bytes is Uint8List) {
-      _buffer.setRange(_length, required, bytes);
-    } else {
-      for (int i = 0; i < bytesLength; i++) {
-        _buffer[_length + i] = bytes[i];
-      }
-    }
-    _length = required;
-  }
-
-  void addByte(int byte) {
-    if (_buffer.length == _length) {
-      // The grow algorithm always at least doubles.
-      // If we added one to _length it would quadruple unnecessarily.
-      _grow(_length);
-    }
-    assert(_buffer.length > _length);
-    _buffer[_length] = byte;
-    _length++;
-  }
-
-  void _grow(int required) {
-    // We will create a list in the range of 2-4 times larger than
-    // required.
-    int newSize = required * 2;
-    if (newSize < _initSize) {
-      newSize = _initSize;
-    } else {
-      newSize = _pow2roundup(newSize);
-    }
-    var newBuffer = new Uint8List(newSize);
-    newBuffer.setRange(0, _buffer.length, _buffer);
-    _buffer = newBuffer;
-  }
-
-  Uint8List takeBytes() {
-    if (_length == 0) return _emptyList;
-    var buffer =
-        new Uint8List.view(_buffer.buffer, _buffer.offsetInBytes, _length);
-    clear();
-    return buffer;
-  }
-
-  Uint8List toBytes() {
-    if (_length == 0) return _emptyList;
-    return new Uint8List.fromList(
-        new Uint8List.view(_buffer.buffer, _buffer.offsetInBytes, _length));
-  }
-
-  int get length => _length;
-
-  bool get isEmpty => _length == 0;
-
-  bool get isNotEmpty => _length != 0;
-
-  void clear() {
-    _length = 0;
-    _buffer = _emptyList;
-  }
-
-  static int _pow2roundup(int x) {
-    assert(x > 0);
-    --x;
-    x |= x >> 1;
-    x |= x >> 2;
-    x |= x >> 4;
-    x |= x >> 8;
-    x |= x >> 16;
-    return x + 1;
-  }
-}
-
-class _BytesBuilder implements BytesBuilder {
-  int _length = 0;
-  final List<Uint8List> _chunks = [];
-
-  void add(List<int> bytes) {
-    Uint8List typedBytes;
-    if (bytes is Uint8List) {
-      typedBytes = bytes;
-    } else {
-      typedBytes = new Uint8List.fromList(bytes);
-    }
-    _chunks.add(typedBytes);
-    _length += typedBytes.length;
-  }
-
-  void addByte(int byte) {
-    _chunks.add(new Uint8List(1)..[0] = byte);
-    _length++;
-  }
-
-  Uint8List takeBytes() {
-    if (_length == 0) return _CopyingBytesBuilder._emptyList;
-    if (_chunks.length == 1) {
-      var buffer = _chunks[0];
-      clear();
-      return buffer;
-    }
-    var buffer = new Uint8List(_length);
-    int offset = 0;
-    for (var chunk in _chunks) {
-      buffer.setRange(offset, offset + chunk.length, chunk);
-      offset += chunk.length;
-    }
-    clear();
-    return buffer;
-  }
-
-  Uint8List toBytes() {
-    if (_length == 0) return _CopyingBytesBuilder._emptyList;
-    var buffer = new Uint8List(_length);
-    int offset = 0;
-    for (var chunk in _chunks) {
-      buffer.setRange(offset, offset + chunk.length, chunk);
-      offset += chunk.length;
-    }
-    return buffer;
-  }
-
-  int get length => _length;
-
-  bool get isEmpty => _length == 0;
-
-  bool get isNotEmpty => _length != 0;
-
-  void clear() {
-    _length = 0;
-    _chunks.clear();
-  }
-}
diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart
index 90e2159..ee8ef1d 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -99,15 +99,10 @@
  *
  * ## Other resources
  *
- * * [Dart by Example](https://www.dartlang.org/dart-by-example/#files-directories-and-symlinks)
- *   provides additional task-oriented code samples that show how to use
- *   various API from the Directory class and the related [File] class.
+ * * The [Files and directories](https://dart.dev/guides/libraries/library-tour#files-and-directories)
+ *   section of the library tour.
  *
- * * [I/O for Command-Line
- *   Apps](https://www.dartlang.org/docs/dart-up-and-running/ch03.html#dartio---io-for-command-line-apps)
- *   a section from _A Tour of the Dart Libraries_ covers files and directories.
- *
- * * [Write Command-Line Apps](https://www.dartlang.org/docs/tutorials/cmdline/),
+ * * [Write Command-Line Apps](https://dart.dev/tutorials/server/cmdline),
  *   a tutorial about writing command-line apps, includes information about
  *   files and directories.
  */
diff --git a/sdk/lib/io/directory_impl.dart b/sdk/lib/io/directory_impl.dart
index 9ca5b6c..0a356e1 100644
--- a/sdk/lib/io/directory_impl.dart
+++ b/sdk/lib/io/directory_impl.dart
@@ -70,7 +70,7 @@
     if (result is ArgumentError) throw result;
     if (result is OSError) {
       throw new FileSystemException(
-          "Setting current working directory failed", path, result);
+          "Setting current working directory failed", path.toString(), result);
     }
   }
 
diff --git a/sdk/lib/io/embedder_config.dart b/sdk/lib/io/embedder_config.dart
index cbc94f7..2042aa5 100644
--- a/sdk/lib/io/embedder_config.dart
+++ b/sdk/lib/io/embedder_config.dart
@@ -32,6 +32,18 @@
   @pragma('vm:entry-point')
   static bool _maySleep = true;
 
+  /// The Isolate may establish insecure socket connections to all domains.
+  ///
+  /// This setting can be overridden by per-domain policies.
+  @pragma('vm:entry-point')
+  static bool _mayInsecurelyConnectToAllDomains = true;
+
+  /// Domain network policies set by embedder.
+  @pragma('vm:entry-point')
+  static void _setDomainPolicies(String domainNetworkPolicyJson) {
+    _domainPolicies = _constructDomainPolicies(domainNetworkPolicyJson);
+  }
+
   // TODO(zra): Consider adding:
   // - an option to disallow modifying SecurityContext.defaultContext
   // - an option to disallow closing stdout and stderr.
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart
index 234220a..9c1f2f5 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -225,15 +225,10 @@
  *
  * ## Other resources
  *
- * * [Dart by Example](https://www.dartlang.org/dart-by-example/#files-directories-and-symlinks)
- *   provides additional task-oriented code samples that show how to use
- *   various API from the Directory class and the related [File] class.
+ * * The [Files and directories](https://dart.dev/guides/libraries/library-tour#files-and-directories)
+ *   section of the library tour.
  *
- * * [I/O for Command-Line
- *   Apps](https://www.dartlang.org/docs/dart-up-and-running/ch03.html#dartio---io-for-command-line-apps)
- *   a section from _A Tour of the Dart Libraries_ covers files and directories.
- *
- * * [Write Command-Line Apps](https://www.dartlang.org/docs/tutorials/cmdline/),
+ * * [Write Command-Line Apps](https://dart.dev/tutorials/server/cmdline),
  *   a tutorial about writing command-line apps, includes information about
  *   files and directories.
  */
diff --git a/sdk/lib/io/file_system_entity.dart b/sdk/lib/io/file_system_entity.dart
index 0741583..6bba998 100644
--- a/sdk/lib/io/file_system_entity.dart
+++ b/sdk/lib/io/file_system_entity.dart
@@ -232,21 +232,18 @@
  *
  * ## Other resources
  *
- * * [Dart by
- *   Example](https://www.dartlang.org/dart-by-example/#files-directories-and-symlinks)
- *   provides additional task-oriented code samples that show how to use various
- *   API from the [Directory] class and the [File] class, both subclasses of
- *   FileSystemEntity.
+ * * The [Files and directories](https://dart.dev/guides/libraries/library-tour#files-and-directories)
+ *   section of the library tour.
  *
- * * [I/O for Command-Line
- *   Apps](https://www.dartlang.org/docs/dart-up-and-running/ch03.html#dartio---io-for-command-line-apps),
- *   a section from _A Tour of the Dart Libraries_ covers files and directories.
- *
- * * [Write Command-Line Apps](https://www.dartlang.org/docs/tutorials/cmdline/),
+ * * [Write Command-Line Apps](https://dart.dev/tutorials/server/cmdline),
  *   a tutorial about writing command-line apps, includes information about
  *   files and directories.
  */
 abstract class FileSystemEntity {
+  static const _backslashChar = 0x5c;
+  static const _slashChar = 0x2f;
+  static const _colonChar = 0x3a;
+
   String get _path;
   Uint8List get _rawPath;
 
@@ -538,16 +535,31 @@
   }
 
   static final RegExp _absoluteWindowsPathPattern =
-      new RegExp(r'^(\\\\|[a-zA-Z]:[/\\])');
+      new RegExp(r'^(?:\\\\|[a-zA-Z]:[/\\])');
 
   /**
-   * Returns a [bool] indicating whether this object's path is absolute.
+   * Whether this object's path is absolute.
    *
-   * On Windows, a path is absolute if it starts with \\\\ or a drive letter
-   * between a and z (upper or lower case) followed by :\\ or :/.
-   * On non-Windows, a path is absolute if it starts with /.
+   * An absolute path is independent of the current working
+   * directory ([Directory.current]).
+   * A non-absolute path must be interpreted relative to
+   * the current working directory.
+   *
+   * On Windows, a path is absolute if it starts with `\\`
+   * (two backslashesor representing a UNC path) or with a drive letter
+   * between `a` and `z` (upper or lower case) followed by `:\` or `:/`.
+   * The makes, for example, `\file.ext` a non-absolute path
+   * because it depends on the current drive letter.
+   *
+   * On non-Windows, a path is absolute if it starts with `/`.
+   *
+   * If the path is not absolute, use [absolute] to get an entity
+   * with an absolute path referencing the same object in the file system,
+   * if possible.
    */
-  bool get isAbsolute {
+  bool get isAbsolute => _isAbsolute(path);
+
+  static bool _isAbsolute(String path) {
     if (Platform.isWindows) {
       return path.startsWith(_absoluteWindowsPathPattern);
     } else {
@@ -560,37 +572,86 @@
    *
    * The type of the returned instance is the type of [this].
    *
-   * The absolute path is computed by prefixing
-   * a relative path with the current working directory, and returning
-   * an absolute path unchanged.
+   * A file system entity with an already absolute path
+   * (as reported by [isAbsolute]) is returned directly.
+   * For a non-absolute path, the returned entity is absolute ([isAbsolute])
+   * *if possible*, but still refers to the same file system object.
    */
   FileSystemEntity get absolute;
 
   String get _absolutePath {
     if (isAbsolute) return path;
+    if (Platform.isWindows) return _absoluteWindowsPath(path);
     String current = Directory.current.path;
-    if (current.endsWith('/') ||
-        (Platform.isWindows && current.endsWith('\\'))) {
+    if (current.endsWith('/')) {
       return '$current$path';
     } else {
       return '$current${Platform.pathSeparator}$path';
     }
   }
 
-  Uint8List get _rawAbsolutePath {
-    if (isAbsolute) return _rawPath;
-    var current = Directory.current._rawPath.toList();
-    assert(current.last == 0);
-    current.removeLast(); // Remove null terminator.
-    if ((current.last == '/'.codeUnitAt(0)) ||
-        (Platform.isWindows && (current.last == '\\'.codeUnitAt(0)))) {
-      current.addAll(_rawPath);
-      return new Uint8List.fromList(current);
-    } else {
-      current.addAll(utf8.encode(Platform.pathSeparator));
-      current.addAll(_rawPath);
-      return new Uint8List.fromList(current);
+  /// The ASCII code of the Windows drive letter if [entity], if any.
+  ///
+  /// Returns the ASCII code of the upper-cased drive letter of
+  /// the path of [entity], if it has a drive letter (starts with `[a-zA-z]:`),
+  /// or `-1` if it has no drive letter.
+  static int _windowsDriveLetter(String path) {
+    if (!path.startsWith(':', 1)) return -1;
+    var first = path.codeUnitAt(0) & ~0x20;
+    if (first >= 0x41 && first <= 0x5b) return first;
+    return -1;
+  }
+
+  /// The relative [path] converted to an absolute path.
+  static String _absoluteWindowsPath(String path) {
+    assert(Platform.isWindows);
+    assert(!_isAbsolute(path));
+    // Could perhaps use something like
+    // https://docs.microsoft.com/en-us/windows/win32/api/pathcch/nf-pathcch-pathalloccombine
+    var current = Directory.current.path;
+    if (path.startsWith(r'\')) {
+      assert(!path.startsWith(r'\', 1));
+      // Absolute path, no drive letter.
+      var currentDrive = _windowsDriveLetter(current);
+      if (currentDrive >= 0) {
+        return '${current[0]}:$path';
+      }
+      // If `current` is a UNC path \\server\share[...],
+      // we make the absolute path relative to the share.
+      // Also works with `\\?\c:\` paths.
+      if (current.startsWith(r'\\')) {
+        var serverEnd = current.indexOf(r'\', 2);
+        if (serverEnd >= 0) {
+          // We may want to recognize UNC paths of the form:
+          //   \\?\UNC\Server\share\...
+          // specially, and be relative to the *share* not to UNC\.
+          var shareEnd = current.indexOf(r'\', serverEnd + 1);
+          if (shareEnd < 0) shareEnd = current.length;
+          return '${current.substring(0, shareEnd)}$path';
+        }
+      }
+      // If `current` is not in the drive-letter:path format,
+      // or not \\server\share[\path],
+      // we ignore it and return a relative path.
+      return path;
     }
+    var entityDrive = _windowsDriveLetter(path);
+    if (entityDrive >= 0) {
+      if (entityDrive != _windowsDriveLetter(current)) {
+        // Need to resolve relative to current directory of the drive.
+        // Windows remembers the last CWD of each drive.
+        // We currently don't have that information, so we assume the root of that drive.
+        return '${path[0]}:\\$path';
+      }
+
+      /// A `c:relative\path` path on the same drive as `current`.
+      path = path.substring(2);
+      assert(!path.startsWith(r'\\'));
+    }
+    if (current.endsWith(r'\') || current.endsWith('/')) {
+      return '$current$path';
+    }
+    return '$current\\$path';
   }
 
   static bool _identicalSync(String path1, String path2) {
diff --git a/sdk/lib/io/io.dart b/sdk/lib/io/io.dart
index 27cd6a3..7ffa6e3 100644
--- a/sdk/lib/io/io.dart
+++ b/sdk/lib/io/io.dart
@@ -21,7 +21,7 @@
  *     import 'dart:io';
  *
  * For an introduction to I/O in Dart, see the [dart:io library
- * tour](https://www.dartlang.org/dart-vm/io-library-tour).
+ * tour](https://dart.dev/guides/libraries/library-tour#dartio).
  *
  * ## File, Directory, and Link
  *
@@ -197,9 +197,10 @@
 import 'dart:typed_data';
 
 export 'dart:_http';
+@Deprecated("Import BytesBuilder from dart:typed_data instead")
+export 'dart:_internal' show BytesBuilder;
 export 'dart:_internal' show HttpStatus;
 
-part 'bytes_builder.dart';
 part 'common.dart';
 part 'data_transformer.dart';
 part 'directory.dart';
@@ -214,6 +215,7 @@
 part 'io_service.dart';
 part 'link.dart';
 part 'namespace_impl.dart';
+part 'network_policy.dart';
 part 'network_profiling.dart';
 part 'overrides.dart';
 part 'platform.dart';
diff --git a/sdk/lib/io/io_sources.gni b/sdk/lib/io/io_sources.gni
index 59b2ca9..7410a13 100644
--- a/sdk/lib/io/io_sources.gni
+++ b/sdk/lib/io/io_sources.gni
@@ -6,7 +6,6 @@
   "io.dart",
 
   # The above file needs to be first if additional parts are added to the lib.
-  "bytes_builder.dart",
   "common.dart",
   "data_transformer.dart",
   "directory.dart",
diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart
index 3f2896f..ce50a4e 100644
--- a/sdk/lib/io/link.dart
+++ b/sdk/lib/io/link.dart
@@ -53,7 +53,7 @@
    * On the Windows platform, this call will create a true symbolic link
    * instead of a Junction. In order to create a symbolic link on Windows, Dart
    * must be run in Administrator mode or the system must have Developer Mode
-   * enabled, otherwise a [FileSystemException] will be raised with 
+   * enabled, otherwise a [FileSystemException] will be raised with
    * `ERROR_PRIVILEGE_NOT_HELD` set as the errno when this call is made.
    *
    * On other platforms, the posix symlink() call is used to make a symbolic
@@ -74,7 +74,7 @@
    * On the Windows platform, this call will create a true symbolic link
    * instead of a Junction. In order to create a symbolic link on Windows, Dart
    * must be run in Administrator mode or the system must have Developer Mode
-   * enabled, otherwise a [FileSystemException] will be raised with 
+   * enabled, otherwise a [FileSystemException] will be raised with
    * `ERROR_PRIVILEGE_NOT_HELD` set as the errno when this call is made.
    *
    * On other platforms, the posix symlink() call is used to make a symbolic
@@ -172,7 +172,7 @@
 
   bool existsSync() => FileSystemEntity._isLinkRawSync(_rawPath);
 
-  Link get absolute => new Link.fromRawPath(_rawAbsolutePath);
+  Link get absolute => isAbsolute ? this : _Link(_absolutePath);
 
   Future<Link> create(String target, {bool recursive: false}) {
     var result =
diff --git a/sdk/lib/io/network_policy.dart b/sdk/lib/io/network_policy.dart
new file mode 100644
index 0000000..9fa586b
--- /dev/null
+++ b/sdk/lib/io/network_policy.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.
+
+part of dart.io;
+
+/// Whether insecure connections to [host] are allowed.
+///
+/// [host] must be a [String] or [InternetAddress].
+///
+/// If any of the domain policies match [host], the matching policy will make
+/// the decision. If multiple policies apply, the top matching policy makes the
+/// decision. If none of the domain policies match, the embedder default is
+/// used.
+///
+/// Loopback addresses are always allowed.
+bool isInsecureConnectionAllowed(dynamic host) {
+  String hostString;
+  if (host is String) {
+    try {
+      if ("localhost" == host || InternetAddress(host).isLoopback) return true;
+    } on ArgumentError {
+      // Assume not loopback.
+    }
+    hostString = host;
+  } else if (host is InternetAddress) {
+    if (host.isLoopback) return true;
+    hostString = host.host;
+  } else {
+    throw ArgumentError.value(
+        host, "host", "Must be a String or InternetAddress");
+  }
+  final topMatchedPolicy = _findBestDomainNetworkPolicy(hostString);
+  final envOverride = bool.fromEnvironment(
+      "dart.library.io.may_insecurely_connect_to_all_domains",
+      defaultValue: true);
+  return topMatchedPolicy?.allowInsecureConnections ??
+      (envOverride && _EmbedderConfig._mayInsecurelyConnectToAllDomains);
+}
+
+/// Policy for a specific domain.
+///
+/// [_DomainNetworkPolicy] can be used to create exceptions to the global
+/// network policy.
+class _DomainNetworkPolicy {
+  /// https://tools.ietf.org/html/rfc1034#:~:text=Name%20space%20specifications
+  ///
+  /// We specifically do not allow IP addresses.
+  static final _domainMatcher = RegExp(
+      r"^(?:[a-z\d-]{1,63}\.)+[a-z][a-z\d-]{0,62}$",
+      caseSensitive: false);
+
+  /// The domain on which the policy is being set.
+  ///
+  /// This cannot be a numeric IP address.
+  ///
+  /// For example: `example.com`.
+  final String domain;
+
+  /// Whether to allow insecure socket connections for this domain.
+  final bool allowInsecureConnections;
+
+  /// Whether this domain policy covers sub-domains as well.
+  ///
+  /// If this is true, all subdomains inherit the same policy. For instance,
+  /// a policy set on `example.com` would apply to `*.example.com` such as
+  /// `subdomain.example.com` or `www.example.com`.
+  final bool includesSubDomains;
+
+  /// Creates a new domain exception in the network policy.
+  ///
+  /// [domain] is the domain on which the policy is being set.
+  ///
+  /// [includesSubDomains] determines whether the policy applies to
+  /// all sub domains. If this is set to true, all subdomains inherit the
+  /// same policy. For instance, a policy set on `example.com` would apply to
+  /// `*.example.com` such as `subdomain.example.com` or `www.example.com`.
+  ///
+  /// [allowInsecureConnections] determines whether to allow insecure socket
+  /// connections for this [domain].
+  _DomainNetworkPolicy(this.domain,
+      {this.includesSubDomains = false,
+      this.allowInsecureConnections = false}) {
+    if (domain.length > 255 || !_domainMatcher.hasMatch(domain)) {
+      throw ArgumentError.value(domain, "domain", "Invalid domain name");
+    }
+  }
+
+  /// Calculates how well the policy matches to a given host string.
+  ///
+  /// A host matches a [policy] if it ends with its [domain].
+  ///
+  /// A score is given to such a match depending on the specificity of the
+  /// [domain]:
+  ///
+  /// * A longer domain receives a higher score.
+  /// * A domain that does not allow sub domains receives a higher score.
+  ///
+  /// Returns -1 if the policy does not match.
+  int matchScore(String host) {
+    final domainLength = domain.length;
+    final hostLength = host.length;
+    final lengthDelta = hostLength - domainLength;
+    if (host.endsWith(domain) &&
+        (lengthDelta == 0 ||
+            includesSubDomains && host.codeUnitAt(lengthDelta - 1) == 0x2e)) {
+      return domainLength * 2 + (includesSubDomains ? 0 : 1);
+    }
+    return -1;
+  }
+
+  /// Checks whether the [policy] to be added conflicts with existing policies.
+  ///
+  /// Returns [true] if policy is safe to add to existing policy set and [false]
+  ///     if policy can safely be ignored.
+  ///
+  /// Throws [ArgumentError] if a conflict is detected.
+  bool checkConflict(List<_DomainNetworkPolicy> existingPolicies) {
+    for (final existingPolicy in existingPolicies) {
+      if (includesSubDomains == existingPolicy.includesSubDomains &&
+          domain == existingPolicy.domain) {
+        if (allowInsecureConnections ==
+            existingPolicy.allowInsecureConnections) {
+          // This is a duplicate policy
+          return false;
+        }
+        throw StateError("Contradiction in the domain security policies: "
+            "'$this' contradicts '$existingPolicy'");
+      }
+    }
+    return true;
+  }
+
+  /// This is used for encoding information about the policy in user visible
+  /// errors.
+  @override
+  String toString() {
+    final subDomainPrefix = includesSubDomains ? '*.' : '';
+    final insecureConnectionPermission =
+        allowInsecureConnections ? 'Allows' : 'Disallows';
+    return "$subDomainPrefix$domain: "
+        "$insecureConnectionPermission insecure connections";
+  }
+}
+
+/// Finds the top [DomainNetworkPolicy] instance that match given a single
+/// [domain].
+///
+/// We order the policies according to how specific they are. The final policy
+/// for a given [domain] is determined by the top matching
+/// [DomainNetworkPolicy].
+///
+/// Returns null if there's no matching policy.
+_DomainNetworkPolicy? _findBestDomainNetworkPolicy(String domain) {
+  var topScore = 0;
+  _DomainNetworkPolicy? topPolicy;
+  for (final _DomainNetworkPolicy policy in _domainPolicies) {
+    final score = policy.matchScore(domain);
+    if (score > topScore) {
+      topScore = score;
+      topPolicy = policy;
+    }
+  }
+  return topPolicy;
+}
+
+/// Domain level policies that dart:io is enforcing.
+late List<_DomainNetworkPolicy> _domainPolicies =
+    _constructDomainPolicies(null);
+
+List<_DomainNetworkPolicy> _constructDomainPolicies(
+    String? domainPoliciesString) {
+  final domainPolicies = <_DomainNetworkPolicy>[];
+  domainPoliciesString ??= String.fromEnvironment(
+      "dart.library.io.domain_network_policies",
+      defaultValue: "");
+  if (domainPoliciesString.isNotEmpty) {
+    final List<dynamic> policiesJson = json.decode(domainPoliciesString);
+    for (final List<dynamic> policyJson in policiesJson) {
+      assert(policyJson.length == 3);
+      final policy = _DomainNetworkPolicy(
+        policyJson[0],
+        includesSubDomains: policyJson[1],
+        allowInsecureConnections: policyJson[2],
+      );
+      if (policy.checkConflict(domainPolicies)) {
+        domainPolicies.add(policy);
+      }
+    }
+  }
+  return domainPolicies;
+}
diff --git a/sdk/lib/io/platform.dart b/sdk/lib/io/platform.dart
index 412e258..c484461 100644
--- a/sdk/lib/io/platform.dart
+++ b/sdk/lib/io/platform.dart
@@ -58,12 +58,6 @@
  *         print('is not a Mac');
  *       }
  *     }
- *
- * ## Other resources
- *
- * [Dart by Example](https://www.dartlang.org/dart-by-example/#dart-io-and-command-line-apps)
- * provides additional task-oriented code samples that show how to use
- * various API from the [dart:io] library.
  */
 class Platform {
   static final _numberOfProcessors = _Platform.numberOfProcessors;
diff --git a/sdk/lib/io/process.dart b/sdk/lib/io/process.dart
index e0d0b15..d976baf 100644
--- a/sdk/lib/io/process.dart
+++ b/sdk/lib/io/process.dart
@@ -261,12 +261,6 @@
  *         });
  *       });
  *     }
- *
- * ## Other resources
- *
- * [Dart by Example](https://www.dartlang.org/dart-by-example/#dart-io-and-command-line-apps)
- * provides additional task-oriented code samples that show how to use
- * various API from the [dart:io] library.
  */
 abstract class Process {
   /**
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index b5e814f..10b1918 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -801,6 +801,12 @@
       {sourceAddress, Duration? timeout}) {
     final IOOverrides? overrides = IOOverrides.current;
     if (overrides == null) {
+      // TODO(b/162514236): This breaks internal device lab tests for Fuchsia.
+      //
+      // if (!isInsecureConnectionAllowed(host)) {
+      //   throw new SocketException(
+      //       "Insecure socket connections are disallowed by platform: $host");
+      // }
       return Socket._connect(host, port,
           sourceAddress: sourceAddress, timeout: timeout);
     }
@@ -815,6 +821,12 @@
       {sourceAddress}) {
     final IOOverrides? overrides = IOOverrides.current;
     if (overrides == null) {
+      // TODO(b/162514236): This breaks internal device lab tests for Fuchsia.
+      //
+      // if (!isInsecureConnectionAllowed(host)) {
+      //   throw new SocketException(
+      //       "Insecure socket connections are disallowed by platform: $host");
+      // }
       return Socket._startConnect(host, port, sourceAddress: sourceAddress);
     }
     return overrides.socketStartConnect(host, port,
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
index ebb9015..f016890 100644
--- a/sdk/lib/svg/dart2js/svg_dart2js.dart
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -58,7 +58,7 @@
 
   // From SVGURIReference
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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
@@ -82,19 +82,19 @@
 
   static const int SVG_ANGLETYPE_UNSPECIFIED = 1;
 
-  int get unitType native;
+  int? get unitType native;
 
-  num get value native;
+  num? get value native;
 
-  set value(num value) native;
+  set value(num? value) native;
 
-  String get valueAsString native;
+  String? get valueAsString native;
 
-  set valueAsString(String value) native;
+  set valueAsString(String? value) native;
 
-  num get valueInSpecifiedUnits native;
+  num? get valueInSpecifiedUnits native;
 
-  set valueInSpecifiedUnits(num value) native;
+  set valueInSpecifiedUnits(num? value) native;
 
   void convertToSpecifiedUnits(int unitType) native;
 
@@ -202,9 +202,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Angle get animVal native;
+  Angle? get animVal native;
 
-  Angle get baseVal native;
+  Angle? get baseVal native;
 }
 // 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
@@ -218,11 +218,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get animVal native;
+  bool? get animVal native;
 
-  bool get baseVal native;
+  bool? get baseVal native;
 
-  set baseVal(bool value) native;
+  set baseVal(bool? value) native;
 }
 // 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
@@ -236,11 +236,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get animVal native;
+  int? get animVal native;
 
-  int get baseVal native;
+  int? get baseVal native;
 
-  set baseVal(int value) native;
+  set baseVal(int? value) native;
 }
 // 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
@@ -254,11 +254,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get animVal native;
+  int? get animVal native;
 
-  int get baseVal native;
+  int? get baseVal native;
 
-  set baseVal(int value) native;
+  set baseVal(int? value) native;
 }
 // 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
@@ -272,9 +272,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Length get animVal native;
+  Length? get animVal native;
 
-  Length get baseVal native;
+  Length? get baseVal native;
 }
 // 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
@@ -288,9 +288,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  LengthList get animVal native;
+  LengthList? get animVal native;
 
-  LengthList get baseVal native;
+  LengthList? get baseVal native;
 }
 // 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
@@ -304,11 +304,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get animVal native;
+  num? get animVal native;
 
-  num get baseVal native;
+  num? get baseVal native;
 
-  set baseVal(num value) native;
+  set baseVal(num? value) native;
 }
 // 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
@@ -322,9 +322,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  NumberList get animVal native;
+  NumberList? get animVal native;
 
-  NumberList get baseVal native;
+  NumberList? get baseVal native;
 }
 // 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
@@ -338,9 +338,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  PreserveAspectRatio get animVal native;
+  PreserveAspectRatio? get animVal native;
 
-  PreserveAspectRatio get baseVal native;
+  PreserveAspectRatio? get baseVal native;
 }
 // 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
@@ -354,9 +354,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Rect get animVal native;
+  Rect? get animVal native;
 
-  Rect get baseVal native;
+  Rect? get baseVal native;
 }
 // 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
@@ -370,11 +370,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  String get animVal native;
+  String? get animVal native;
 
-  String get baseVal native;
+  String? get baseVal native;
 
-  set baseVal(String value) native;
+  set baseVal(String? value) native;
 }
 // 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
@@ -388,9 +388,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  TransformList get animVal native;
+  TransformList? get animVal native;
 
-  TransformList get baseVal native;
+  TransformList? get baseVal native;
 }
 // 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
@@ -414,7 +414,7 @@
    */
   AnimationElement.created() : super.created();
 
-  SvgElement get targetElement native;
+  SvgElement? get targetElement native;
 
   void beginElement() native;
 
@@ -432,9 +432,9 @@
 
   // From SVGTests
 
-  StringList get requiredExtensions native;
+  StringList? get requiredExtensions native;
 
-  StringList get systemLanguage native;
+  StringList? get systemLanguage native;
 }
 // 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
@@ -458,11 +458,11 @@
    */
   CircleElement.created() : super.created();
 
-  AnimatedLength get cx native;
+  AnimatedLength? get cx native;
 
-  AnimatedLength get cy native;
+  AnimatedLength? get cy native;
 
-  AnimatedLength get r native;
+  AnimatedLength? get r native;
 }
 // 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
@@ -486,7 +486,7 @@
    */
   ClipPathElement.created() : super.created();
 
-  AnimatedEnumeration get clipPathUnits native;
+  AnimatedEnumeration? get clipPathUnits native;
 }
 // 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
@@ -569,13 +569,13 @@
    */
   EllipseElement.created() : super.created();
 
-  AnimatedLength get cx native;
+  AnimatedLength? get cx native;
 
-  AnimatedLength get cy native;
+  AnimatedLength? get cy native;
 
-  AnimatedLength get rx native;
+  AnimatedLength? get rx native;
 
-  AnimatedLength get ry native;
+  AnimatedLength? get ry native;
 }
 // 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
@@ -621,23 +621,23 @@
 
   static const int SVG_FEBLEND_MODE_UNKNOWN = 0;
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
-  AnimatedString get in2 native;
+  AnimatedString? get in2 native;
 
-  AnimatedEnumeration get mode native;
+  AnimatedEnumeration? get mode native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -689,15 +689,15 @@
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -731,19 +731,19 @@
       SvgElement.isTagSupported('feComponentTransfer') &&
       (new SvgElement.tag('feComponentTransfer') is FEComponentTransferElement);
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -778,31 +778,31 @@
 
   static const int SVG_FECOMPOSITE_OPERATOR_XOR = 5;
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
-  AnimatedString get in2 native;
+  AnimatedString? get in2 native;
 
-  AnimatedNumber get k1 native;
+  AnimatedNumber? get k1 native;
 
-  AnimatedNumber get k2 native;
+  AnimatedNumber? get k2 native;
 
-  AnimatedNumber get k3 native;
+  AnimatedNumber? get k3 native;
 
-  AnimatedNumber get k4 native;
+  AnimatedNumber? get k4 native;
 
-  AnimatedEnumeration get operator native;
+  AnimatedEnumeration? get operator native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -844,41 +844,41 @@
 
   static const int SVG_EDGEMODE_WRAP = 2;
 
-  AnimatedNumber get bias native;
+  AnimatedNumber? get bias native;
 
-  AnimatedNumber get divisor native;
+  AnimatedNumber? get divisor native;
 
-  AnimatedEnumeration get edgeMode native;
+  AnimatedEnumeration? get edgeMode native;
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
-  AnimatedNumberList get kernelMatrix native;
+  AnimatedNumberList? get kernelMatrix native;
 
-  AnimatedNumber get kernelUnitLengthX native;
+  AnimatedNumber? get kernelUnitLengthX native;
 
-  AnimatedNumber get kernelUnitLengthY native;
+  AnimatedNumber? get kernelUnitLengthY native;
 
-  AnimatedInteger get orderX native;
+  AnimatedInteger? get orderX native;
 
-  AnimatedInteger get orderY native;
+  AnimatedInteger? get orderY native;
 
-  AnimatedBoolean get preserveAlpha native;
+  AnimatedBoolean? get preserveAlpha native;
 
-  AnimatedInteger get targetX native;
+  AnimatedInteger? get targetX native;
 
-  AnimatedInteger get targetY native;
+  AnimatedInteger? get targetY native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -912,27 +912,27 @@
       SvgElement.isTagSupported('feDiffuseLighting') &&
       (new SvgElement.tag('feDiffuseLighting') is FEDiffuseLightingElement);
 
-  AnimatedNumber get diffuseConstant native;
+  AnimatedNumber? get diffuseConstant native;
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
-  AnimatedNumber get kernelUnitLengthX native;
+  AnimatedNumber? get kernelUnitLengthX native;
 
-  AnimatedNumber get kernelUnitLengthY native;
+  AnimatedNumber? get kernelUnitLengthY native;
 
-  AnimatedNumber get surfaceScale native;
+  AnimatedNumber? get surfaceScale native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -976,27 +976,27 @@
 
   static const int SVG_CHANNEL_UNKNOWN = 0;
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
-  AnimatedString get in2 native;
+  AnimatedString? get in2 native;
 
-  AnimatedNumber get scale native;
+  AnimatedNumber? get scale native;
 
-  AnimatedEnumeration get xChannelSelector native;
+  AnimatedEnumeration? get xChannelSelector native;
 
-  AnimatedEnumeration get yChannelSelector native;
+  AnimatedEnumeration? get yChannelSelector native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1029,9 +1029,9 @@
       SvgElement.isTagSupported('feDistantLight') &&
       (new SvgElement.tag('feDistantLight') is FEDistantLightElement);
 
-  AnimatedNumber get azimuth native;
+  AnimatedNumber? get azimuth native;
 
-  AnimatedNumber get elevation native;
+  AnimatedNumber? get elevation native;
 }
 // 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
@@ -1067,15 +1067,15 @@
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1233,25 +1233,25 @@
       SvgElement.isTagSupported('feGaussianBlur') &&
       (new SvgElement.tag('feGaussianBlur') is FEGaussianBlurElement);
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
-  AnimatedNumber get stdDeviationX native;
+  AnimatedNumber? get stdDeviationX native;
 
-  AnimatedNumber get stdDeviationY native;
+  AnimatedNumber? get stdDeviationY native;
 
   void setStdDeviation(num stdDeviationX, num stdDeviationY) native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1285,23 +1285,23 @@
       SvgElement.isTagSupported('feImage') &&
       (new SvgElement.tag('feImage') is FEImageElement);
 
-  AnimatedPreserveAspectRatio get preserveAspectRatio native;
+  AnimatedPreserveAspectRatio? get preserveAspectRatio native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 
   // From SVGURIReference
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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
@@ -1337,15 +1337,15 @@
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1378,7 +1378,7 @@
       SvgElement.isTagSupported('feMergeNode') &&
       (new SvgElement.tag('feMergeNode') is FEMergeNodeElement);
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 }
 // 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
@@ -1409,25 +1409,25 @@
 
   static const int SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
-  AnimatedEnumeration get operator native;
+  AnimatedEnumeration? get operator native;
 
-  AnimatedNumber get radiusX native;
+  AnimatedNumber? get radiusX native;
 
-  AnimatedNumber get radiusY native;
+  AnimatedNumber? get radiusY native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1461,23 +1461,23 @@
       SvgElement.isTagSupported('feOffset') &&
       (new SvgElement.tag('feOffset') is FEOffsetElement);
 
-  AnimatedNumber get dx native;
+  AnimatedNumber? get dx native;
 
-  AnimatedNumber get dy native;
+  AnimatedNumber? get dy native;
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1510,11 +1510,11 @@
       SvgElement.isTagSupported('fePointLight') &&
       (new SvgElement.tag('fePointLight') is FEPointLightElement);
 
-  AnimatedNumber get x native;
+  AnimatedNumber? get x native;
 
-  AnimatedNumber get y native;
+  AnimatedNumber? get y native;
 
-  AnimatedNumber get z native;
+  AnimatedNumber? get z native;
 }
 // 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
@@ -1548,29 +1548,29 @@
       SvgElement.isTagSupported('feSpecularLighting') &&
       (new SvgElement.tag('feSpecularLighting') is FESpecularLightingElement);
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
-  AnimatedNumber get kernelUnitLengthX native;
+  AnimatedNumber? get kernelUnitLengthX native;
 
-  AnimatedNumber get kernelUnitLengthY native;
+  AnimatedNumber? get kernelUnitLengthY native;
 
-  AnimatedNumber get specularConstant native;
+  AnimatedNumber? get specularConstant native;
 
-  AnimatedNumber get specularExponent native;
+  AnimatedNumber? get specularExponent native;
 
-  AnimatedNumber get surfaceScale native;
+  AnimatedNumber? get surfaceScale native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1603,21 +1603,21 @@
       SvgElement.isTagSupported('feSpotLight') &&
       (new SvgElement.tag('feSpotLight') is FESpotLightElement);
 
-  AnimatedNumber get limitingConeAngle native;
+  AnimatedNumber? get limitingConeAngle native;
 
-  AnimatedNumber get pointsAtX native;
+  AnimatedNumber? get pointsAtX native;
 
-  AnimatedNumber get pointsAtY native;
+  AnimatedNumber? get pointsAtY native;
 
-  AnimatedNumber get pointsAtZ native;
+  AnimatedNumber? get pointsAtZ native;
 
-  AnimatedNumber get specularExponent native;
+  AnimatedNumber? get specularExponent native;
 
-  AnimatedNumber get x native;
+  AnimatedNumber? get x native;
 
-  AnimatedNumber get y native;
+  AnimatedNumber? get y native;
 
-  AnimatedNumber get z native;
+  AnimatedNumber? get z native;
 }
 // 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
@@ -1651,19 +1651,19 @@
       SvgElement.isTagSupported('feTile') &&
       (new SvgElement.tag('feTile') is FETileElement);
 
-  AnimatedString get in1 native;
+  AnimatedString? get in1 native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1709,29 +1709,29 @@
 
   static const int SVG_TURBULENCE_TYPE_UNKNOWN = 0;
 
-  AnimatedNumber get baseFrequencyX native;
+  AnimatedNumber? get baseFrequencyX native;
 
-  AnimatedNumber get baseFrequencyY native;
+  AnimatedNumber? get baseFrequencyY native;
 
-  AnimatedInteger get numOctaves native;
+  AnimatedInteger? get numOctaves native;
 
-  AnimatedNumber get seed native;
+  AnimatedNumber? get seed native;
 
-  AnimatedEnumeration get stitchTiles native;
+  AnimatedEnumeration? get stitchTiles native;
 
-  AnimatedEnumeration get type native;
+  AnimatedEnumeration? get type native;
 
   // From SVGFilterPrimitiveStandardAttributes
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1764,21 +1764,21 @@
       SvgElement.isTagSupported('filter') &&
       (new SvgElement.tag('filter') is FilterElement);
 
-  AnimatedEnumeration get filterUnits native;
+  AnimatedEnumeration? get filterUnits native;
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedEnumeration get primitiveUnits native;
+  AnimatedEnumeration? get primitiveUnits native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 
   // From SVGURIReference
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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
@@ -1791,15 +1791,15 @@
     throw new UnsupportedError("Not supported");
   }
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedString get result native;
+  AnimatedString? get result native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1812,9 +1812,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  AnimatedPreserveAspectRatio get preserveAspectRatio native;
+  AnimatedPreserveAspectRatio? get preserveAspectRatio native;
 
-  AnimatedRect get viewBox native;
+  AnimatedRect? get viewBox native;
 }
 // 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
@@ -1846,13 +1846,13 @@
       SvgElement.isTagSupported('foreignObject') &&
       (new SvgElement.tag('foreignObject') is ForeignObjectElement);
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -1892,7 +1892,7 @@
    */
   GeometryElement.created() : super.created();
 
-  AnimatedNumber get pathLength native;
+  AnimatedNumber? get pathLength native;
 
   Point getPointAtLength(num distance) native;
 
@@ -1919,11 +1919,11 @@
    */
   GraphicsElement.created() : super.created();
 
-  SvgElement get farthestViewportElement native;
+  SvgElement? get farthestViewportElement native;
 
-  SvgElement get nearestViewportElement native;
+  SvgElement? get nearestViewportElement native;
 
-  AnimatedTransformList get transform native;
+  AnimatedTransformList? get transform native;
 
   Rect getBBox() native;
 
@@ -1935,9 +1935,9 @@
 
   // From SVGTests
 
-  StringList get requiredExtensions native;
+  StringList? get requiredExtensions native;
 
-  StringList get systemLanguage native;
+  StringList? get systemLanguage native;
 }
 // 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
@@ -1960,25 +1960,25 @@
    */
   ImageElement.created() : super.created();
 
-  String get async native;
+  String? get async native;
 
-  set async(String value) native;
+  set async(String? value) native;
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedPreserveAspectRatio get preserveAspectRatio native;
+  AnimatedPreserveAspectRatio? get preserveAspectRatio native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 
   Future decode() => promiseToFuture(JS("", "#.decode()", this));
 
   // From SVGURIReference
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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
@@ -2014,19 +2014,19 @@
 
   static const int SVG_LENGTHTYPE_UNKNOWN = 0;
 
-  int get unitType native;
+  int? get unitType native;
 
-  num get value native;
+  num? get value native;
 
-  set value(num value) native;
+  set value(num? value) native;
 
-  String get valueAsString native;
+  String? get valueAsString native;
 
-  set valueAsString(String value) native;
+  set valueAsString(String? value) native;
 
-  num get valueInSpecifiedUnits native;
+  num? get valueInSpecifiedUnits native;
 
-  set valueInSpecifiedUnits(num value) native;
+  set valueInSpecifiedUnits(num? value) native;
 
   void convertToSpecifiedUnits(int unitType) native;
 
@@ -2048,7 +2048,7 @@
 
   int get length => JS("int", "#.length", this);
 
-  int get numberOfItems native;
+  int? get numberOfItems native;
 
   Length operator [](int index) {
     if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length))
@@ -2130,13 +2130,13 @@
    */
   LineElement.created() : super.created();
 
-  AnimatedLength get x1 native;
+  AnimatedLength? get x1 native;
 
-  AnimatedLength get x2 native;
+  AnimatedLength? get x2 native;
 
-  AnimatedLength get y1 native;
+  AnimatedLength? get y1 native;
 
-  AnimatedLength get y2 native;
+  AnimatedLength? get y2 native;
 }
 // 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
@@ -2160,13 +2160,13 @@
    */
   LinearGradientElement.created() : super.created();
 
-  AnimatedLength get x1 native;
+  AnimatedLength? get x1 native;
 
-  AnimatedLength get x2 native;
+  AnimatedLength? get x2 native;
 
-  AnimatedLength get y1 native;
+  AnimatedLength? get y1 native;
 
-  AnimatedLength get y2 native;
+  AnimatedLength? get y2 native;
 }
 // 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
@@ -2208,9 +2208,9 @@
 
   AnimatedLength get markerWidth native;
 
-  AnimatedAngle get orientAngle native;
+  AnimatedAngle? get orientAngle native;
 
-  AnimatedEnumeration get orientType native;
+  AnimatedEnumeration? get orientType native;
 
   AnimatedLength get refX native;
 
@@ -2222,9 +2222,9 @@
 
   // From SVGFitToViewBox
 
-  AnimatedPreserveAspectRatio get preserveAspectRatio native;
+  AnimatedPreserveAspectRatio? get preserveAspectRatio native;
 
-  AnimatedRect get viewBox native;
+  AnimatedRect? get viewBox native;
 }
 // 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
@@ -2247,23 +2247,23 @@
    */
   MaskElement.created() : super.created();
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedEnumeration get maskContentUnits native;
+  AnimatedEnumeration? get maskContentUnits native;
 
-  AnimatedEnumeration get maskUnits native;
+  AnimatedEnumeration? get maskUnits native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 
   // From SVGTests
 
-  StringList get requiredExtensions native;
+  StringList? get requiredExtensions native;
 
-  StringList get systemLanguage native;
+  StringList? get systemLanguage native;
 }
 // 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
@@ -2277,29 +2277,29 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get a native;
+  num? get a native;
 
-  set a(num value) native;
+  set a(num? value) native;
 
-  num get b native;
+  num? get b native;
 
-  set b(num value) native;
+  set b(num? value) native;
 
-  num get c native;
+  num? get c native;
 
-  set c(num value) native;
+  set c(num? value) native;
 
-  num get d native;
+  num? get d native;
 
-  set d(num value) native;
+  set d(num? value) native;
 
-  num get e native;
+  num? get e native;
 
-  set e(num value) native;
+  set e(num? value) native;
 
-  num get f native;
+  num? get f native;
 
-  set f(num value) native;
+  set f(num? value) native;
 
   Matrix flipX() native;
 
@@ -2353,9 +2353,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get value native;
+  num? get value native;
 
-  set value(num value) native;
+  set value(num? value) native;
 }
 // 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
@@ -2373,7 +2373,7 @@
 
   int get length => JS("int", "#.length", this);
 
-  int get numberOfItems native;
+  int? get numberOfItems native;
 
   Number operator [](int index) {
     if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length))
@@ -2478,35 +2478,35 @@
    */
   PatternElement.created() : super.created();
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedEnumeration get patternContentUnits native;
+  AnimatedEnumeration? get patternContentUnits native;
 
-  AnimatedTransformList get patternTransform native;
+  AnimatedTransformList? get patternTransform native;
 
-  AnimatedEnumeration get patternUnits native;
+  AnimatedEnumeration? get patternUnits native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 
   // From SVGFitToViewBox
 
-  AnimatedPreserveAspectRatio get preserveAspectRatio native;
+  AnimatedPreserveAspectRatio? get preserveAspectRatio native;
 
-  AnimatedRect get viewBox native;
+  AnimatedRect? get viewBox native;
 
   // From SVGTests
 
-  StringList get requiredExtensions native;
+  StringList? get requiredExtensions native;
 
-  StringList get systemLanguage native;
+  StringList? get systemLanguage native;
 
   // From SVGURIReference
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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
@@ -2520,13 +2520,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get x native;
+  num? get x native;
 
-  set x(num value) native;
+  set x(num? value) native;
 
-  num get y native;
+  num? get y native;
 
-  set y(num value) native;
+  set y(num? value) native;
 
   Point matrixTransform(Matrix matrix) native;
 }
@@ -2542,9 +2542,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get length native;
+  int? get length native;
 
-  int get numberOfItems native;
+  int? get numberOfItems native;
 
   void __setter__(int index, Point newItem) native;
 
@@ -2584,7 +2584,7 @@
    */
   PolygonElement.created() : super.created();
 
-  PointList get animatedPoints native;
+  PointList? get animatedPoints native;
 
   PointList get points native;
 }
@@ -2610,7 +2610,7 @@
    */
   PolylineElement.created() : super.created();
 
-  PointList get animatedPoints native;
+  PointList? get animatedPoints native;
 
   PointList get points native;
 }
@@ -2654,13 +2654,13 @@
 
   static const int SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
 
-  int get align native;
+  int? get align native;
 
-  set align(int value) native;
+  set align(int? value) native;
 
-  int get meetOrSlice native;
+  int? get meetOrSlice native;
 
-  set meetOrSlice(int value) native;
+  set meetOrSlice(int? value) native;
 }
 // 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
@@ -2684,17 +2684,17 @@
    */
   RadialGradientElement.created() : super.created();
 
-  AnimatedLength get cx native;
+  AnimatedLength? get cx native;
 
-  AnimatedLength get cy native;
+  AnimatedLength? get cy native;
 
-  AnimatedLength get fr native;
+  AnimatedLength? get fr native;
 
-  AnimatedLength get fx native;
+  AnimatedLength? get fx native;
 
-  AnimatedLength get fy native;
+  AnimatedLength? get fy native;
 
-  AnimatedLength get r native;
+  AnimatedLength? get r native;
 }
 // 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
@@ -2708,21 +2708,21 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get height native;
+  num? get height native;
 
-  set height(num value) native;
+  set height(num? value) native;
 
-  num get width native;
+  num? get width native;
 
-  set width(num value) native;
+  set width(num? value) native;
 
-  num get x native;
+  num? get x native;
 
-  set x(num value) native;
+  set x(num? value) native;
 
-  num get y native;
+  num? get y native;
 
-  set y(num value) native;
+  set y(num? value) native;
 }
 // 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
@@ -2745,17 +2745,17 @@
    */
   RectElement.created() : super.created();
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedLength get rx native;
+  AnimatedLength? get rx native;
 
-  AnimatedLength get ry native;
+  AnimatedLength? get ry native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 }
 // 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
@@ -2779,13 +2779,13 @@
    */
   ScriptElement.created() : super.created();
 
-  String get type native;
+  String? get type native;
 
-  set type(String value) native;
+  set type(String? value) native;
 
   // From SVGURIReference
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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
@@ -2856,7 +2856,7 @@
 
   int get length => JS("int", "#.length", this);
 
-  int get numberOfItems native;
+  int? get numberOfItems native;
 
   String operator [](int index) {
     if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length))
@@ -2937,23 +2937,23 @@
    */
   StyleElement.created() : super.created();
 
-  bool get disabled native;
+  bool? get disabled native;
 
-  set disabled(bool value) native;
+  set disabled(bool? value) native;
 
-  String get media native;
+  String? get media native;
 
-  set media(String value) native;
+  set media(String? value) native;
 
   StyleSheet? get sheet native;
 
   // Use implementation from Element.
-  // String get title native;
-  // void set title(String value) native;
+  // String? get title native;
+  // void set title(String? value) native;
 
-  String get type native;
+  String? get type native;
 
-  set type(String value) native;
+  set type(String? value) native;
 }
 // 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
@@ -3023,14 +3023,14 @@
     children.addAll(value);
   }
 
-  String get outerHtml {
+  String? get outerHtml {
     final container = new DivElement();
     final SvgElement cloned = this.clone(true) as SvgElement;
     container.children.add(cloned);
     return container.innerHtml;
   }
 
-  String get innerHtml {
+  String? get innerHtml {
     final container = new DivElement();
     final SvgElement cloned = this.clone(true) as SvgElement;
     container.children.addAll(cloned.children);
@@ -3293,8 +3293,8 @@
   // void set style(CssStyleDeclaration value) native;
 
   // Use implementation from Element.
-  // int get tabIndex native;
-  // void set tabIndex(int value) native;
+  // int? get tabIndex native;
+  // void set tabIndex(int? value) native;
 
   SvgElement? get viewportElement native;
 
@@ -3458,19 +3458,19 @@
    */
   SvgSvgElement.created() : super.created();
 
-  num get currentScale native;
+  num? get currentScale native;
 
-  set currentScale(num value) native;
+  set currentScale(num? value) native;
 
-  Point get currentTranslate native;
+  Point? get currentTranslate native;
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 
   bool animationsPaused() native;
 
@@ -3533,15 +3533,15 @@
 
   // From SVGFitToViewBox
 
-  AnimatedPreserveAspectRatio get preserveAspectRatio native;
+  AnimatedPreserveAspectRatio? get preserveAspectRatio native;
 
-  AnimatedRect get viewBox native;
+  AnimatedRect? get viewBox native;
 
   // From SVGZoomAndPan
 
-  int get zoomAndPan native;
+  int? get zoomAndPan native;
 
-  set zoomAndPan(int value) native;
+  set zoomAndPan(int? value) native;
 }
 // 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
@@ -3589,9 +3589,9 @@
 
   // From SVGFitToViewBox
 
-  AnimatedPreserveAspectRatio get preserveAspectRatio native;
+  AnimatedPreserveAspectRatio? get preserveAspectRatio native;
 
-  AnimatedRect get viewBox native;
+  AnimatedRect? get viewBox native;
 }
 // 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
@@ -3625,9 +3625,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  StringList get requiredExtensions native;
+  StringList? get requiredExtensions native;
 
-  StringList get systemLanguage native;
+  StringList? get systemLanguage native;
 }
 // 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
@@ -3653,9 +3653,9 @@
 
   static const int LENGTHADJUST_UNKNOWN = 0;
 
-  AnimatedEnumeration get lengthAdjust native;
+  AnimatedEnumeration? get lengthAdjust native;
 
-  AnimatedLength get textLength native;
+  AnimatedLength? get textLength native;
 
   int getCharNumAtPosition(Point point) native;
 
@@ -3726,15 +3726,15 @@
 
   static const int TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
 
-  AnimatedEnumeration get method native;
+  AnimatedEnumeration? get method native;
 
-  AnimatedEnumeration get spacing native;
+  AnimatedEnumeration? get spacing native;
 
-  AnimatedLength get startOffset native;
+  AnimatedLength? get startOffset native;
 
   // From SVGURIReference
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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
@@ -3754,15 +3754,15 @@
    */
   TextPositioningElement.created() : super.created();
 
-  AnimatedLengthList get dx native;
+  AnimatedLengthList? get dx native;
 
-  AnimatedLengthList get dy native;
+  AnimatedLengthList? get dy native;
 
-  AnimatedNumberList get rotate native;
+  AnimatedNumberList? get rotate native;
 
-  AnimatedLengthList get x native;
+  AnimatedLengthList? get x native;
 
-  AnimatedLengthList get y native;
+  AnimatedLengthList? get y native;
 }
 // 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
@@ -3811,11 +3811,11 @@
 
   static const int SVG_TRANSFORM_UNKNOWN = 0;
 
-  num get angle native;
+  num? get angle native;
 
-  Matrix get matrix native;
+  Matrix? get matrix native;
 
-  int get type native;
+  int? get type native;
 
   void setMatrix(Matrix matrix) native;
 
@@ -3845,7 +3845,7 @@
 
   int get length => JS("int", "#.length", this);
 
-  int get numberOfItems native;
+  int? get numberOfItems native;
 
   Transform operator [](int index) {
     if (JS("bool", "# >>> 0 !== # || # >= #", index, index, index, length))
@@ -3940,7 +3940,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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
@@ -3963,17 +3963,17 @@
    */
   UseElement.created() : super.created();
 
-  AnimatedLength get height native;
+  AnimatedLength? get height native;
 
-  AnimatedLength get width native;
+  AnimatedLength? get width native;
 
-  AnimatedLength get x native;
+  AnimatedLength? get x native;
 
-  AnimatedLength get y native;
+  AnimatedLength? get y native;
 
   // From SVGURIReference
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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
@@ -3998,15 +3998,15 @@
 
   // From SVGFitToViewBox
 
-  AnimatedPreserveAspectRatio get preserveAspectRatio native;
+  AnimatedPreserveAspectRatio? get preserveAspectRatio native;
 
-  AnimatedRect get viewBox native;
+  AnimatedRect? get viewBox native;
 
   // From SVGZoomAndPan
 
-  int get zoomAndPan native;
+  int? get zoomAndPan native;
 
-  set zoomAndPan(int value) native;
+  set zoomAndPan(int? value) native;
 }
 // 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
@@ -4025,9 +4025,9 @@
 
   static const int SVG_ZOOMANDPAN_UNKNOWN = 0;
 
-  int get zoomAndPan native;
+  int? get zoomAndPan native;
 
-  set zoomAndPan(int value) native;
+  set zoomAndPan(int? value) native;
 }
 // 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
@@ -4055,15 +4055,15 @@
 
   static const int SVG_SPREADMETHOD_UNKNOWN = 0;
 
-  AnimatedTransformList get gradientTransform native;
+  AnimatedTransformList? get gradientTransform native;
 
-  AnimatedEnumeration get gradientUnits native;
+  AnimatedEnumeration? get gradientUnits native;
 
-  AnimatedEnumeration get spreadMethod native;
+  AnimatedEnumeration? get spreadMethod native;
 
   // From SVGURIReference
 
-  AnimatedString get href native;
+  AnimatedString? get href native;
 }
 // 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/lib/typed_data/typed_data.dart b/sdk/lib/typed_data/typed_data.dart
index 8852ab8..eeafdc6 100644
--- a/sdk/lib/typed_data/typed_data.dart
+++ b/sdk/lib/typed_data/typed_data.dart
@@ -14,6 +14,8 @@
 
 import "dart:_internal" show Since, UnmodifiableListBase;
 
+export "dart:_internal" show BytesBuilder;
+
 part "unmodifiable_typed_data.dart";
 
 /**
diff --git a/sdk/lib/vmservice/vmservice.dart b/sdk/lib/vmservice/vmservice.dart
index 23f555b..840a6e0 100644
--- a/sdk/lib/vmservice/vmservice.dart
+++ b/sdk/lib/vmservice/vmservice.dart
@@ -219,6 +219,8 @@
 
   final devfs = DevFS();
 
+  Uri? vmServiceUri;
+
   Uri? get ddsUri => _ddsUri;
   Uri? _ddsUri;
 
@@ -344,6 +346,19 @@
     return encodeSuccess(message);
   }
 
+  String _getWebSocketTarget(Message message) {
+    Uri uri = ((_ddsUri != null) ? _ddsUri : vmServiceUri)!;
+    uri = uri.replace(scheme: 'ws', pathSegments: [
+      // Strip empty path segment which causes an extra / to be inserted.
+      ...uri.pathSegments.where((e) => e.isNotEmpty),
+      'ws',
+    ]);
+    return encodeResult(message, {
+      'type': 'WebSocketTarget',
+      'uri': uri.toString(),
+    });
+  }
+
   void _addClient(Client client) {
     assert(client.streams.isEmpty);
     assert(client.services.isEmpty);
@@ -764,6 +779,9 @@
       if (message.method == 'getSupportedProtocols') {
         return await _getSupportedProtocols(message);
       }
+      if (message.method == 'getWebSocketTarget') {
+        return _getWebSocketTarget(message);
+      }
       if (devfs.shouldHandleMessage(message)) {
         return await devfs.handleMessage(message);
       }
@@ -808,7 +826,12 @@
 void _onExit() native 'VMService_OnExit';
 
 /// Notify the VM that the server's address has changed.
-void onServerAddressChange(String? address)
+void onServerAddressChange(String? address) {
+  VMService().vmServiceUri = (address != null) ? Uri.parse(address) : null;
+  _onServerAddressChange(address);
+}
+
+void _onServerAddressChange(String? address)
     native 'VMService_OnServerAddressChange';
 
 /// Subscribe to a service stream.
diff --git a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
index 146e158..da12ab3 100644
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
@@ -50,23 +50,23 @@
   static AnalyserNode _create_2(context) =>
       JS('AnalyserNode', 'new AnalyserNode(#)', context);
 
-  int get fftSize native;
+  int? get fftSize native;
 
-  set fftSize(int value) native;
+  set fftSize(int? value) native;
 
-  int get frequencyBinCount native;
+  int? get frequencyBinCount native;
 
-  num get maxDecibels native;
+  num? get maxDecibels native;
 
-  set maxDecibels(num value) native;
+  set maxDecibels(num? value) native;
 
-  num get minDecibels native;
+  num? get minDecibels native;
 
-  set minDecibels(num value) native;
+  set minDecibels(num? value) native;
 
-  num get smoothingTimeConstant native;
+  num? get smoothingTimeConstant native;
 
-  set smoothingTimeConstant(num value) native;
+  set smoothingTimeConstant(num? value) native;
 
   void getByteFrequencyData(Uint8List array) native;
 
@@ -94,13 +94,13 @@
   static AudioBuffer _create_1(options) =>
       JS('AudioBuffer', 'new AudioBuffer(#)', options);
 
-  num get duration native;
+  num? get duration native;
 
-  int get length native;
+  int? get length native;
 
-  int get numberOfChannels native;
+  int? get numberOfChannels native;
 
-  num get sampleRate native;
+  num? get sampleRate native;
 
   void copyFromChannel(Float32List destination, int channelNumber,
       [int? startInChannel]) native;
@@ -142,21 +142,21 @@
 
   set buffer(AudioBuffer? value) native;
 
-  AudioParam get detune native;
+  AudioParam? get detune native;
 
-  bool get loop native;
+  bool? get loop native;
 
-  set loop(bool value) native;
+  set loop(bool? value) native;
 
-  num get loopEnd native;
+  num? get loopEnd native;
 
-  set loopEnd(num value) native;
+  set loopEnd(num? value) native;
 
-  num get loopStart native;
+  num? get loopStart native;
 
-  set loopStart(num value) native;
+  set loopStart(num? value) native;
 
-  AudioParam get playbackRate native;
+  AudioParam? get playbackRate native;
 
   void start([num? when, num? grainOffset, num? grainDuration]) native;
 }
@@ -177,7 +177,7 @@
   static bool get supported =>
       JS('bool', '!!(window.AudioContext || window.webkitAudioContext)');
 
-  num get baseLatency native;
+  num? get baseLatency native;
 
   Future close() => promiseToFuture(JS("", "#.close()", this));
 
@@ -261,7 +261,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get maxChannelCount native;
+  int? get maxChannelCount native;
 }
 // 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
@@ -274,23 +274,23 @@
     throw new UnsupportedError("Not supported");
   }
 
-  AudioParam get forwardX native;
+  AudioParam? get forwardX native;
 
-  AudioParam get forwardY native;
+  AudioParam? get forwardY native;
 
-  AudioParam get forwardZ native;
+  AudioParam? get forwardZ native;
 
-  AudioParam get positionX native;
+  AudioParam? get positionX native;
 
-  AudioParam get positionY native;
+  AudioParam? get positionY native;
 
-  AudioParam get positionZ native;
+  AudioParam? get positionZ native;
 
-  AudioParam get upX native;
+  AudioParam? get upX native;
 
-  AudioParam get upY native;
+  AudioParam? get upY native;
 
-  AudioParam get upZ native;
+  AudioParam? get upZ native;
 
   void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) native;
 
@@ -307,23 +307,23 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get channelCount native;
+  int? get channelCount native;
 
-  set channelCount(int value) native;
+  set channelCount(int? value) native;
 
-  String get channelCountMode native;
+  String? get channelCountMode native;
 
-  set channelCountMode(String value) native;
+  set channelCountMode(String? value) native;
 
-  String get channelInterpretation native;
+  String? get channelInterpretation native;
 
-  set channelInterpretation(String value) native;
+  set channelInterpretation(String? value) native;
 
-  BaseAudioContext get context native;
+  BaseAudioContext? get context native;
 
-  int get numberOfInputs native;
+  int? get numberOfInputs native;
 
-  int get numberOfOutputs native;
+  int? get numberOfOutputs native;
 
   @JSName('connect')
   AudioNode _connect(destination, [int? output, int? input]) native;
@@ -349,15 +349,15 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get defaultValue native;
+  num? get defaultValue native;
 
-  num get maxValue native;
+  num? get maxValue native;
 
-  num get minValue native;
+  num? get minValue native;
 
-  num get value native;
+  num? get value native;
 
-  set value(num value) native;
+  set value(num? value) native;
 
   AudioParam cancelAndHoldAtTime(num startTime) native;
 
@@ -463,11 +463,11 @@
       type,
       eventInitDict);
 
-  AudioBuffer get inputBuffer native;
+  AudioBuffer? get inputBuffer native;
 
-  AudioBuffer get outputBuffer native;
+  AudioBuffer? get outputBuffer native;
 
-  num get playbackTime native;
+  num? get playbackTime native;
 }
 // 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
@@ -501,17 +501,17 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get enabled native;
+  bool? get enabled native;
 
-  set enabled(bool value) native;
+  set enabled(bool? value) native;
 
-  String get id native;
+  String? get id native;
 
-  String get kind native;
+  String? get kind native;
 
-  String get label native;
+  String? get label native;
 
-  String get language native;
+  String? get language native;
 
   SourceBuffer? get sourceBuffer native;
 }
@@ -529,7 +529,7 @@
   static const EventStreamProvider<Event> changeEvent =
       const EventStreamProvider<Event>('change');
 
-  int get length native;
+  int? get length native;
 
   AudioTrack __getter__(int index) native;
 
@@ -548,9 +548,9 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get currentTime native;
+  num? get currentTime native;
 
-  num get sampleRate native;
+  num? get sampleRate native;
 
   void registerProcessor(String name, Object processorConstructor) native;
 }
@@ -582,7 +582,7 @@
   static AudioWorkletNode _create_2(context, name) =>
       JS('AudioWorkletNode', 'new AudioWorkletNode(#,#)', context, name);
 
-  AudioParamMap get parameters native;
+  AudioParamMap? get parameters native;
 }
 // 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
@@ -606,15 +606,15 @@
     throw new UnsupportedError("Not supported");
   }
 
-  num get currentTime native;
+  num? get currentTime native;
 
-  AudioDestinationNode get destination native;
+  AudioDestinationNode? get destination native;
 
-  AudioListener get listener native;
+  AudioListener? get listener native;
 
-  num get sampleRate native;
+  num? get sampleRate native;
 
-  String get state native;
+  String? get state native;
 
   AnalyserNode createAnalyser() native;
 
@@ -710,17 +710,17 @@
   static BiquadFilterNode _create_2(context) =>
       JS('BiquadFilterNode', 'new BiquadFilterNode(#)', context);
 
-  AudioParam get Q native;
+  AudioParam? get Q native;
 
-  AudioParam get detune native;
+  AudioParam? get detune native;
 
-  AudioParam get frequency native;
+  AudioParam? get frequency native;
 
-  AudioParam get gain native;
+  AudioParam? get gain native;
 
-  String get type native;
+  String? get type native;
 
-  set type(String value) native;
+  set type(String? value) native;
 
   void getFrequencyResponse(Float32List frequencyHz, Float32List magResponse,
       Float32List phaseResponse) native;
@@ -794,7 +794,7 @@
   static ConstantSourceNode _create_2(context) =>
       JS('ConstantSourceNode', 'new ConstantSourceNode(#)', context);
 
-  AudioParam get offset native;
+  AudioParam? get offset native;
 }
 // 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
@@ -823,9 +823,9 @@
 
   set buffer(AudioBuffer? value) native;
 
-  bool get normalize native;
+  bool? get normalize native;
 
-  set normalize(bool value) native;
+  set normalize(bool? value) native;
 }
 // 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
@@ -850,7 +850,7 @@
   static DelayNode _create_2(context) =>
       JS('DelayNode', 'new DelayNode(#)', context);
 
-  AudioParam get delayTime native;
+  AudioParam? get delayTime native;
 }
 // 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
@@ -878,17 +878,17 @@
   static DynamicsCompressorNode _create_2(context) =>
       JS('DynamicsCompressorNode', 'new DynamicsCompressorNode(#)', context);
 
-  AudioParam get attack native;
+  AudioParam? get attack native;
 
-  AudioParam get knee native;
+  AudioParam? get knee native;
 
-  AudioParam get ratio native;
+  AudioParam? get ratio native;
 
-  num get reduction native;
+  num? get reduction native;
 
-  AudioParam get release native;
+  AudioParam? get release native;
 
-  AudioParam get threshold native;
+  AudioParam? get threshold native;
 }
 // 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
@@ -913,7 +913,7 @@
   static GainNode _create_2(context) =>
       JS('GainNode', 'new GainNode(#)', context);
 
-  AudioParam get gain native;
+  AudioParam? get gain native;
 }
 // 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
@@ -957,7 +957,7 @@
       context,
       options);
 
-  MediaElement get mediaElement native;
+  MediaElement? get mediaElement native;
 }
 // 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
@@ -988,7 +988,7 @@
       'new MediaStreamAudioDestinationNode(#)',
       context);
 
-  MediaStream get stream native;
+  MediaStream? get stream native;
 }
 // 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
@@ -1011,7 +1011,7 @@
       context,
       options);
 
-  MediaStream get mediaStream native;
+  MediaStream? get mediaStream native;
 }
 // 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
@@ -1034,7 +1034,7 @@
       type,
       eventInitDict);
 
-  AudioBuffer get renderedBuffer native;
+  AudioBuffer? get renderedBuffer native;
 }
 // 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
@@ -1073,7 +1073,7 @@
       'new OfflineAudioContext(#)',
       numberOfChannels_OR_options);
 
-  int get length native;
+  int? get length native;
 
   Future<AudioBuffer> startRendering() =>
       promiseToFuture<AudioBuffer>(JS("", "#.startRendering()", this));
@@ -1105,13 +1105,13 @@
   static OscillatorNode _create_2(context) =>
       JS('OscillatorNode', 'new OscillatorNode(#)', context);
 
-  AudioParam get detune native;
+  AudioParam? get detune native;
 
-  AudioParam get frequency native;
+  AudioParam? get frequency native;
 
-  String get type native;
+  String? get type native;
 
-  set type(String value) native;
+  set type(String? value) native;
 
   void setPeriodicWave(PeriodicWave periodicWave) native;
 }
@@ -1138,49 +1138,49 @@
   static PannerNode _create_2(context) =>
       JS('PannerNode', 'new PannerNode(#)', context);
 
-  num get coneInnerAngle native;
+  num? get coneInnerAngle native;
 
-  set coneInnerAngle(num value) native;
+  set coneInnerAngle(num? value) native;
 
-  num get coneOuterAngle native;
+  num? get coneOuterAngle native;
 
-  set coneOuterAngle(num value) native;
+  set coneOuterAngle(num? value) native;
 
-  num get coneOuterGain native;
+  num? get coneOuterGain native;
 
-  set coneOuterGain(num value) native;
+  set coneOuterGain(num? value) native;
 
-  String get distanceModel native;
+  String? get distanceModel native;
 
-  set distanceModel(String value) native;
+  set distanceModel(String? value) native;
 
-  num get maxDistance native;
+  num? get maxDistance native;
 
-  set maxDistance(num value) native;
+  set maxDistance(num? value) native;
 
-  AudioParam get orientationX native;
+  AudioParam? get orientationX native;
 
-  AudioParam get orientationY native;
+  AudioParam? get orientationY native;
 
-  AudioParam get orientationZ native;
+  AudioParam? get orientationZ native;
 
-  String get panningModel native;
+  String? get panningModel native;
 
-  set panningModel(String value) native;
+  set panningModel(String? value) native;
 
-  AudioParam get positionX native;
+  AudioParam? get positionX native;
 
-  AudioParam get positionY native;
+  AudioParam? get positionY native;
 
-  AudioParam get positionZ native;
+  AudioParam? get positionZ native;
 
-  num get refDistance native;
+  num? get refDistance native;
 
-  set refDistance(num value) native;
+  set refDistance(num? value) native;
 
-  num get rolloffFactor native;
+  num? get rolloffFactor native;
 
-  set rolloffFactor(num value) native;
+  set rolloffFactor(num? value) native;
 
   void setOrientation(num x, num y, num z) native;
 
@@ -1229,7 +1229,7 @@
   static const EventStreamProvider<AudioProcessingEvent> audioProcessEvent =
       const EventStreamProvider<AudioProcessingEvent>('audioprocess');
 
-  int get bufferSize native;
+  int? get bufferSize native;
 
   void setEventListener(EventListener eventListener) native;
 
@@ -1267,7 +1267,7 @@
   static StereoPannerNode _create_2(context) =>
       JS('StereoPannerNode', 'new StereoPannerNode(#)', context);
 
-  AudioParam get pan native;
+  AudioParam? get pan native;
 }
 // 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
@@ -1296,7 +1296,7 @@
 
   set curve(Float32List? value) native;
 
-  String get oversample native;
+  String? get oversample native;
 
-  set oversample(String value) native;
+  set oversample(String? value) native;
 }
diff --git a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
index 53671df..072cfae 100644
--- a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
+++ b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
@@ -89,7 +89,7 @@
   CanvasElement get canvas native;
 
   @JSName('canvas')
-  OffscreenCanvas get offscreenCanvas native;
+  OffscreenCanvas? get offscreenCanvas native;
 }
 
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
@@ -727,9 +727,9 @@
 
   // From WebGLRenderingContextBase
 
-  int get drawingBufferHeight native;
+  int? get drawingBufferHeight native;
 
-  int get drawingBufferWidth native;
+  int? get drawingBufferWidth native;
 
   void activeTexture(int texture) native;
 
@@ -1363,7 +1363,7 @@
     throw new UnsupportedError("Not supported");
   }
 
-  Canvas get canvas native;
+  Canvas? get canvas native;
 
   // From WebGL2RenderingContextBase
 
@@ -2304,9 +2304,9 @@
 
   // From WebGLRenderingContextBase
 
-  int get drawingBufferHeight native;
+  int? get drawingBufferHeight native;
 
-  int get drawingBufferWidth native;
+  int? get drawingBufferWidth native;
 
   void activeTexture(int texture) native;
 
@@ -2890,13 +2890,13 @@
     throw new UnsupportedError("Not supported");
   }
 
-  bool get lastUploadedVideoFrameWasSkipped native;
+  bool? get lastUploadedVideoFrameWasSkipped native;
 
-  int get lastUploadedVideoHeight native;
+  int? get lastUploadedVideoHeight native;
 
-  num get lastUploadedVideoTimestamp native;
+  num? get lastUploadedVideoTimestamp native;
 
-  int get lastUploadedVideoWidth native;
+  int? get lastUploadedVideoWidth native;
 }
 // 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/lib/web_sql/dart2js/web_sql_dart2js.dart b/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
index f97b55e..4d7f936 100644
--- a/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
+++ b/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart
@@ -79,7 +79,7 @@
   /// Checks if this type is supported on the current platform.
   static bool get supported => JS('bool', '!!(window.openDatabase)');
 
-  String get version native;
+  String? get version native;
 
   @JSName('changeVersion')
   /**
@@ -185,9 +185,9 @@
 
   static const int VERSION_ERR = 2;
 
-  int get code native;
+  int? get code native;
 
-  String get message native;
+  String? get message native;
 }
 // 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
@@ -200,11 +200,11 @@
     throw new UnsupportedError("Not supported");
   }
 
-  int get insertId native;
+  int? get insertId native;
 
-  SqlResultSetRowList get rows native;
+  SqlResultSetRowList? get rows native;
 
-  int get rowsAffected native;
+  int? get rowsAffected native;
 }
 // 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 06dc3e8..2776011 100644
--- a/sdk_args.gni
+++ b/sdk_args.gni
@@ -34,6 +34,7 @@
                          [
                            "$_dart_root/tools/VERSION",
                            "$_dart_root/tools/utils.py",
+                           "$default_git_folder/logs/HEAD",
                          ])
 } else {
   sdk_hash = "0000000000"
diff --git a/tests/co19/co19-co19.status b/tests/co19/co19-co19.status
index 2176473..6740112 100644
--- a/tests/co19/co19-co19.status
+++ b/tests/co19/co19-co19.status
@@ -24,38 +24,8 @@
 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
-Language/Statements/Continue/*: Skip # Not migrated to NNBD
-Language/Statements/Do/*: Skip # Not migrated to NNBD
-Language/Statements/Expression_Statements/*: Skip # Not migrated to NNBD
-Language/Statements/For/*: Skip # Not migrated to NNBD
-Language/Statements/For/Asynchronous_For_in/*: Skip # Not migrated to NNBD
-Language/Statements/For/For_Loop/*: Skip # Not migrated to NNBD
-Language/Statements/For/For_in/*: Skip # Not migrated to NNBD
-Language/Statements/If/*: Skip # Not migrated to NNBD
-Language/Statements/Labels/*: Skip # Not migrated to NNBD
-Language/Statements/Local_Function_Declaration/*: Skip # Not migrated to NNBD
-Language/Statements/Local_Variable_Declaration/*: Skip # Not migrated to NNBD
-Language/Statements/Rethrow/*: Skip # Not migrated to NNBD
-Language/Statements/Return/*: Skip # Not migrated to NNBD
-Language/Statements/Switch/*: Skip # Not migrated to NNBD
-Language/Statements/Try/*: Skip # Not migrated to NNBD
-Language/Statements/While/*: Skip # Not migrated to NNBD
-Language/Statements/Yield_and_Yield_Each/*: Skip # Not migrated to NNBD
-Language/Statements/Yield_and_Yield_Each/Yield/*: Skip # Not migrated to NNBD
-Language/Statements/Yield_and_Yield_Each/Yield_Each/*: Skip # Not migrated to NNBD
-Language/Types/Dynamic_Type_System/*: Skip # Not migrated to NNBD
-Language/Types/Function_Types/*: Skip # Not migrated to NNBD
-Language/Types/Interface_Types/*: Skip # Not migrated to NNBD
-Language/Types/Parameterized_Types/*: Skip # Not migrated to NNBD
-Language/Types/Parameterized_Types/Actual_Type_of_Declaration/*: Skip # Not migrated to NNBD
-Language/Types/Static_Types/*: Skip # Not migrated to NNBD
-Language/Types/Type_Aliases/*: Skip # Not migrated to NNBD
-Language/Types/Type_Void/*: Skip # Not migrated to NNBD
-Language/Types/Type_dynamic/*: Skip # Not migrated to NNBD
-Language/Variables/*: Skip # Not migrated to NNBD
-Language/Variables/Evaluation_of_Implicit_Variable_Getters/*: Skip # Not migrated to NNBD
+Language/Statements/Expression_Statements/syntax_t06: Skip # Type aliases are not fully implemented
+Language/Types/Type_Aliases/built-in_types_t11: Skip # Triple shift is not implemented yet
 LanguageFeatures/Constant-update-2018/*: Skip # Not migrated to NNBD
 LanguageFeatures/Control-flow-collections/*: Skip # Not migrated to NNBD
 LanguageFeatures/Extension-methods/*: Skip # Not migrated to NNBD
@@ -80,43 +50,10 @@
 LanguageFeatures/Triple-Shift/*: Skip # Not migrated to NNBD
 LanguageFeatures/int-to-double/*: Skip # Not migrated to NNBD
 LanguageFeatures/regression/*: Skip # Not migrated to NNBD
-LibTest/async/Completer/*: Skip # Not migrated to NNBD
-LibTest/async/DeferredLibrary/*: Skip # Not migrated to NNBD
-LibTest/async/EventSink/*: Skip # Not migrated to NNBD
-LibTest/async/Future/*: Skip # Not migrated to NNBD
-LibTest/async/Stream/*: Skip # Not migrated to NNBD
-LibTest/async/StreamConsumer/*: Skip # Not migrated to NNBD
-LibTest/async/StreamController/*: Skip # Not migrated to NNBD
-LibTest/async/StreamIterator/*: Skip # Not migrated to NNBD
-LibTest/async/StreamSink/*: Skip # Not migrated to NNBD
-LibTest/async/StreamTransformer/*: Skip # Not migrated to NNBD
-LibTest/async/Timer/*: Skip # Not migrated to NNBD
-LibTest/async/Zone/*: Skip # Not migrated to NNBD
-LibTest/collection/DoubleLinkedQueue/*: Skip # Not migrated to NNBD
-LibTest/collection/DoubleLinkedQueueEntry/*: Skip # Not migrated to NNBD
-LibTest/collection/HasNextIterator/*: Skip # Not migrated to NNBD
-LibTest/collection/HashMap/*: Skip # Not migrated to NNBD
-LibTest/collection/HashSet/*: Skip # Not migrated to NNBD
-LibTest/collection/IterableBase/*: Skip # Not migrated to NNBD
-LibTest/collection/IterableMixin/*: Skip # Not migrated to NNBD
-LibTest/collection/LinkedHashMap/*: Skip # Not migrated to NNBD
-LibTest/collection/LinkedHashSet/*: Skip # Not migrated to NNBD
-LibTest/collection/LinkedList/*: Skip # Not migrated to NNBD
-LibTest/collection/LinkedListEntry/*: Skip # Not migrated to NNBD
 LibTest/collection/ListBase/*: Skip # Not migrated to NNBD
 LibTest/collection/ListMixin/*: Skip # Not migrated to NNBD
-LibTest/collection/ListQueue/*: Skip # Not migrated to NNBD
-LibTest/collection/MapBase/*: Skip # Not migrated to NNBD
-LibTest/collection/MapMixin/*: Skip # Not migrated to NNBD
-LibTest/collection/MapView/*: Skip # Not migrated to NNBD
-LibTest/collection/Queue/*: Skip # Not migrated to NNBD
-LibTest/collection/SetBase/*: Skip # Not migrated to NNBD
-LibTest/collection/SetMixin/*: Skip # Not migrated to NNBD
-LibTest/collection/SplayTreeMap/*: Skip # Not migrated to NNBD
-LibTest/collection/SplayTreeSet/*: Skip # Not migrated to NNBD
-LibTest/collection/UnmodifiableListView/*: Skip # Not migrated to NNBD
-LibTest/collection/UnmodifiableMapBase/*: Skip # Not migrated to NNBD
-LibTest/collection/UnmodifiableMapView/*: Skip # Not migrated to NNBD
+LibTest/core/CyclicInitializationError/*: Skip # Not migrated to NNBD
+LibTest/core/int/*: Skip # Not migrated to NNBD
 LibTest/convert/AsciiCodec/*: Skip # Not migrated to NNBD
 LibTest/convert/AsciiDecoder/*: Skip # Not migrated to NNBD
 LibTest/convert/AsciiEncoder/*: Skip # Not migrated to NNBD
@@ -141,55 +78,6 @@
 LibTest/convert/Utf8Codec/*: Skip # Not migrated to NNBD
 LibTest/convert/Utf8Decoder/*: Skip # Not migrated to NNBD
 LibTest/convert/Utf8Encoder/*: Skip # Not migrated to NNBD
-LibTest/core/AbstractClassInstantiationError/*: Skip # Not migrated to NNBD
-LibTest/core/ArgumentError/*: Skip # Not migrated to NNBD
-LibTest/core/AssertionError/*: Skip # Not migrated to NNBD
-LibTest/core/BidirectionalIterator/*: Skip # Not migrated to NNBD
-LibTest/core/CastError/*: Skip # Not migrated to NNBD
-LibTest/core/ConcurrentModificationError/*: Skip # Not migrated to NNBD
-LibTest/core/CyclicInitializationError/*: Skip # Not migrated to NNBD
-LibTest/core/DateTime/*: Skip # Not migrated to NNBD
-LibTest/core/Deprecated/*: Skip # Not migrated to NNBD
-LibTest/core/Duration/*: Skip # Not migrated to NNBD
-LibTest/core/Error/*: Skip # Not migrated to NNBD
-LibTest/core/Exception/*: Skip # Not migrated to NNBD
-LibTest/core/Expando/*: Skip # Not migrated to NNBD
-LibTest/core/FallThroughError/*: Skip # Not migrated to NNBD
-LibTest/core/FormatException/*: Skip # Not migrated to NNBD
-LibTest/core/Function/*: Skip # Not migrated to NNBD
-LibTest/core/IndexError/*: Skip # Not migrated to NNBD
-LibTest/core/IntegerDivisionByZeroException/*: Skip # Not migrated to NNBD
-LibTest/core/Invocation/*: Skip # Not migrated to NNBD
-LibTest/core/Iterable/*: Skip # Not migrated to NNBD
-LibTest/core/Iterator/*: Skip # Not migrated to NNBD
-LibTest/core/List/*: Skip # Not migrated to NNBD
-LibTest/core/Map/*: Skip # Not migrated to NNBD
-LibTest/core/Match/*: Skip # Not migrated to NNBD
-LibTest/core/NoSuchMethodError/*: Skip # Not migrated to NNBD
-LibTest/core/Null/*: Skip # Not migrated to NNBD
-LibTest/core/Object/*: Skip # Not migrated to NNBD
-LibTest/core/OutOfMemoryError/*: Skip # Not migrated to NNBD
-LibTest/core/RangeError/*: Skip # Not migrated to NNBD
-LibTest/core/RegExp/*: Skip # Not migrated to NNBD
-LibTest/core/RegExp/Pattern_semantics/*: Skip # Not migrated to NNBD
-LibTest/core/RuneIterator/*: Skip # Not migrated to NNBD
-LibTest/core/Runes/*: Skip # Not migrated to NNBD
-LibTest/core/Set/*: Skip # Not migrated to NNBD
-LibTest/core/StackOverflowError/*: Skip # Not migrated to NNBD
-LibTest/core/StackTrace/*: Skip # Not migrated to NNBD
-LibTest/core/StateError/*: Skip # Not migrated to NNBD
-LibTest/core/Stopwatch/*: Skip # Not migrated to NNBD
-LibTest/core/String/*: Skip # Not migrated to NNBD
-LibTest/core/StringBuffer/*: Skip # Not migrated to NNBD
-LibTest/core/Symbol/*: Skip # Not migrated to NNBD
-LibTest/core/TypeError/*: Skip # Not migrated to NNBD
-LibTest/core/UnimplementedError/*: Skip # Not migrated to NNBD
-LibTest/core/UnsupportedError/*: Skip # Not migrated to NNBD
-LibTest/core/Uri/*: Skip # Not migrated to NNBD
-LibTest/core/UriData/*: Skip # Not migrated to NNBD
-LibTest/core/bool/*: Skip # Not migrated to NNBD
-LibTest/core/double/*: Skip # Not migrated to NNBD
-LibTest/core/int/*: Skip # Not migrated to NNBD
 LibTest/html/CanvasRenderingContext2D/*: Skip # Not migrated to NNBD
 LibTest/html/Document/*: Skip # Not migrated to NNBD
 LibTest/html/Element/*: Skip # Not migrated to NNBD
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index d6f8c83..d591e6e 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -19,6 +19,17 @@
 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/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/microsecond_A01_t01: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/parse_A01_t03: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/to8601String_A01_t01: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/to8601String_A01_t02: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/to8601String_A01_t03: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/int/operator_remainder_A01_t03: SkipByDesign # Division by zero is not an error in JavaScript
+LibTest/core/int/operator_truncating_division_A01_t02: SkipByDesign # Division by zero is not an error in JavaScript
+LibTest/core/int/parse_A01_t02: SkipByDesign # big integers cannot be represented in JavaScript
+LibTest/core/int/remainder_A01_t03: SkipByDesign # Division by zero is not an error in JavaScript
 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 08f3b56..9adbeb6 100644
--- a/tests/co19/co19-dartdevc.status
+++ b/tests/co19/co19-dartdevc.status
@@ -72,6 +72,17 @@
 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/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/microsecond_A01_t01: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/parse_A01_t03: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/to8601String_A01_t01: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/to8601String_A01_t02: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/DateTime/to8601String_A01_t03: SkipByDesign # microseconds are not supported in JavaScript
+LibTest/core/int/operator_remainder_A01_t03: SkipByDesign # Division by zero is not an error in JavaScript
+LibTest/core/int/operator_truncating_division_A01_t02: SkipByDesign # Division by zero is not an error in JavaScript
+LibTest/core/int/parse_A01_t02: SkipByDesign # big integers cannot be represented in JavaScript
+LibTest/core/int/remainder_A01_t03: SkipByDesign # Division by zero is not an error in JavaScript
 LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Skip # Times out
 LibTest/html/Element/blur_A01_t01: Skip # Times out
 LibTest/html/Element/focus_A01_t01: Skip # Times out
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index c3ddffa..f34b3eb 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -6,6 +6,9 @@
 LibTest/core/Uri/hasEmptyPath_A01_t01: RuntimeError
 LibTest/core/Uri/parse_A05_t01: RuntimeError
 
+[ $arch == simarm64 && $runtime == dart_precompiled ]
+LibTest/async/Stream/Stream.periodic_all_t02: Skip # Issue 42898
+
 [ $compiler != dart2js && $runtime != none && $runtime != vm && !$checked ]
 LibTest/async/Future/catchError_A03_t05: RuntimeError
 
diff --git a/tests/corelib/cast_errors_test.dart b/tests/corelib/cast_errors_test.dart
index 0d75f28..b9aa936 100644
--- a/tests/corelib/cast_errors_test.dart
+++ b/tests/corelib/cast_errors_test.dart
@@ -17,7 +17,7 @@
   var newC = new C();
   dSet.add(newC);
   //       ^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'C' can't be assigned to the parameter type 'D?'.
 }
 
@@ -27,10 +27,10 @@
 
   dMap[c] = d;
   //   ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'C' can't be assigned to a variable of type 'D?'.
   dMap[d] = c;
   //        ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'C' can't be assigned to a variable of type 'D?'.
 }
diff --git a/tests/corelib/dynamic_nosuchmethod_test.dart b/tests/corelib/dynamic_nosuchmethod_test.dart
index 2577b48..14fce84 100644
--- a/tests/corelib/dynamic_nosuchmethod_test.dart
+++ b/tests/corelib/dynamic_nosuchmethod_test.dart
@@ -2,6 +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.
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import "package:expect/expect.dart";
 
 // Test that noSuchMethod calls behave as expected for dynamic object invocations.
diff --git a/tests/corelib/list_concurrent_modify_test.dart b/tests/corelib/list_concurrent_modify_test.dart
index df62919..9e8d338 100644
--- a/tests/corelib/list_concurrent_modify_test.dart
+++ b/tests/corelib/list_concurrent_modify_test.dart
@@ -34,8 +34,8 @@
   // Operations that change the length cause ConcurrentModificationError.
   void testModification(action()) {
     testIterator(int when) {
-      list.length = 4;
-      list.setAll(0, [0, 1, 2, 3]);
+      list.clear();
+      list.addAll([0, 1, 2, 3]);
       Expect.throws(() {
         for (var element in list) {
           if (element == when) action();
@@ -44,8 +44,8 @@
     }
 
     testForEach(int when) {
-      list.length = 4;
-      list.setAll(0, [0, 1, 2, 3]);
+      list.clear();
+      list.addAll([0, 1, 2, 3]);
       Expect.throws(() {
         list.forEach((var element) {
           if (element == when) action();
@@ -84,7 +84,10 @@
 }
 
 class MyList<E> extends ListBase<E> {
-  List<E> _source;
+  // TODO(42496): Use a nullable list because insert() is implemented in terms
+  // of length=. Change this back to `E` and remove the `as E` below when that
+  // issue is fixed.
+  List<E?> _source;
   MyList(this._source);
   int get length => _source.length;
   void set length(int length) {
@@ -95,7 +98,7 @@
     _source.add(element);
   }
 
-  E operator [](int index) => _source[index];
+  E operator [](int index) => _source[index] as E;
   void operator []=(int index, E value) {
     _source[index] = value;
   }
diff --git a/tests/corelib/list_removeat_test.dart b/tests/corelib/list_removeat_test.dart
index a1657c2..1cffceb 100644
--- a/tests/corelib/list_removeat_test.dart
+++ b/tests/corelib/list_removeat_test.dart
@@ -26,8 +26,8 @@
   Expect.throwsRangeError(() => l1.removeAt(-1), "negative");
   Expect.throwsRangeError(() => l1.removeAt(5), "too large");
   Expect.throws(() => l1.removeAt(null),
-      // With --null-safety a TypeError is thrown
-      // With --no-null-safety an ArgumentError is thrown
+      // With sound null safety a TypeError is thrown.
+      // Without sound null safety an ArgumentError is thrown.
       (e) => e is TypeError || e is ArgumentError, "is null");
 
   Expect.equals(2, l1.removeAt(2), "l1-remove2");
diff --git a/tests/corelib/list_test.dart b/tests/corelib/list_test.dart
index a6b746a..c38d6d1 100644
--- a/tests/corelib/list_test.dart
+++ b/tests/corelib/list_test.dart
@@ -546,7 +546,10 @@
 }
 
 class MyList<E> extends ListBase<E> {
-  List<E> _source;
+  // TODO(42496): Use a nullable list because insert() is implemented in terms
+  // of length=. Change this back to `E` and remove the `as E` below when that
+  // issue is fixed.
+  List<E?> _source;
   MyList(this._source);
   int get length => _source.length;
   void set length(int length) {
@@ -557,7 +560,7 @@
     _source.add(element);
   }
 
-  E operator [](int index) => _source[index];
+  E operator [](int index) => _source[index] as E;
   void operator []=(int index, E value) {
     _source[index] = value;
   }
diff --git a/tests/corelib/null_nosuchmethod_test.dart b/tests/corelib/null_nosuchmethod_test.dart
index 37ff417..4edf9cf 100644
--- a/tests/corelib/null_nosuchmethod_test.dart
+++ b/tests/corelib/null_nosuchmethod_test.dart
@@ -2,6 +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.
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import "package:expect/expect.dart";
 
 // Test that Null's noSuchMethod can be closurized and called directly.
diff --git a/tests/corelib_2/dynamic_nosuchmethod_test.dart b/tests/corelib_2/dynamic_nosuchmethod_test.dart
index 2577b48..14fce84 100644
--- a/tests/corelib_2/dynamic_nosuchmethod_test.dart
+++ b/tests/corelib_2/dynamic_nosuchmethod_test.dart
@@ -2,6 +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.
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import "package:expect/expect.dart";
 
 // Test that noSuchMethod calls behave as expected for dynamic object invocations.
diff --git a/tests/corelib_2/null_nosuchmethod_test.dart b/tests/corelib_2/null_nosuchmethod_test.dart
index 37ff417..4edf9cf 100644
--- a/tests/corelib_2/null_nosuchmethod_test.dart
+++ b/tests/corelib_2/null_nosuchmethod_test.dart
@@ -2,6 +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.
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import "package:expect/expect.dart";
 
 // Test that Null's noSuchMethod can be closurized and called directly.
diff --git a/tests/dart2js/18175_test.dart b/tests/dart2js/18175_test.dart
new file mode 100644
index 0000000..3ad422de
--- /dev/null
+++ b/tests/dart2js/18175_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.
+
+import 'package:expect/expect.dart';
+
+class A implements B<C> {}
+
+class B<E> {}
+
+class C {}
+
+main() {
+  Expect.isFalse(A() is B<bool>);
+  Expect.isFalse(A() is B<int>);
+  Expect.isFalse(A() is B<num>);
+  Expect.isFalse(A() is B<double>);
+  Expect.isFalse(A() is B<String>);
+  Expect.isFalse(A() is B<List>);
+}
diff --git a/tests/dart2js/41449c_test.dart b/tests/dart2js/41449c_test.dart
new file mode 100644
index 0000000..0831434
--- /dev/null
+++ b/tests/dart2js/41449c_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=-O4
+
+// 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/conditional_rewrite_test.dart b/tests/dart2js/conditional_rewrite_test.dart
index 57b0a42..12a1620 100644
--- a/tests/dart2js/conditional_rewrite_test.dart
+++ b/tests/dart2js/conditional_rewrite_test.dart
@@ -48,10 +48,10 @@
 }
 
 bool get isConditionCheckDisabled {
-  bool b = null;
+  bool? b = null;
   for (int i = 0; i < 3; i++) {
     try {
-      b = !b;
+      b = !(b as dynamic);
     } catch (e) {
       return false;
     }
diff --git a/tests/dart2js/conditional_send_test.dart b/tests/dart2js/conditional_send_test.dart
index d1a27c1..dd6d6b7 100644
--- a/tests/dart2js/conditional_send_test.dart
+++ b/tests/dart2js/conditional_send_test.dart
@@ -10,12 +10,12 @@
 confuse(x) => x;
 
 class A {
-  int x;
+  int? x;
   m() => "a";
 }
 
 main(args) {
   var a = confuse(true) ? null : new A();
   a?.x = 3;
-  Expect.throws(() => a.m());
+  Expect.throws(() => a!.m());
 }
diff --git a/tests/dart2js/consistent_add_error_test.dart b/tests/dart2js/consistent_add_error_test.dart
index fd5840f..4559ce4 100644
--- a/tests/dart2js/consistent_add_error_test.dart
+++ b/tests/dart2js/consistent_add_error_test.dart
@@ -11,10 +11,10 @@
 confuse(x) => x;
 
 void check2(String name, name1, f1, name2, f2) {
-  Error trap(part, f) {
+  Error? trap(part, f) {
     try {
       f();
-    } catch (e) {
+    } on Error catch (e) {
       return e;
     }
     Expect.fail('should throw: $name.$part');
@@ -50,7 +50,7 @@
   }
 
   static f4() {
-    return (confuse(1) as int) + null;
+    return (confuse(1) as int) + (null as dynamic);
   }
 
   static f5() {
@@ -60,11 +60,11 @@
 
   static f6() {
     var a = confuse(true) ? 1 : 2; // Small int with unknown value.
-    return a + null;
+    return a + (null as dynamic);
   }
 
   static f7() {
-    return 1 + null;
+    return 1 + (null as dynamic);
   }
 
   static test() {
@@ -78,7 +78,7 @@
   }
 
   static f2() {
-    return confuse('a') + null;
+    return confuse('a') + (null as dynamic);
   }
 
   static f3() {
@@ -86,7 +86,7 @@
   }
 
   static f4() {
-    return (confuse('a') as String) + null;
+    return (confuse('a') as String) + (null as dynamic);
   }
 
   static f5() {
@@ -96,11 +96,11 @@
 
   static f6() {
     var a = confuse(true) ? 'a' : 'bc';
-    return a + null;
+    return a + (null as dynamic);
   }
 
   static f7() {
-    return 'a' + null;
+    return 'a' + (null as dynamic);
   }
 
   static test() {
diff --git a/tests/dart2js/consistent_codeUnitAt_error_test.dart b/tests/dart2js/consistent_codeUnitAt_error_test.dart
index 536279b..b90a68a 100644
--- a/tests/dart2js/consistent_codeUnitAt_error_test.dart
+++ b/tests/dart2js/consistent_codeUnitAt_error_test.dart
@@ -12,10 +12,10 @@
 confuse(x) => x;
 
 void check2(String name, name1, f1, name2, f2) {
-  Error trap(part, f) {
+  Error? trap(part, f) {
     try {
       f();
-    } catch (e) {
+    } on Error catch (e) {
       return e;
     }
     Expect.fail('should throw: $name.$part');
diff --git a/tests/dart2js/consistent_null_add_error_test.dart b/tests/dart2js/consistent_null_add_error_test.dart
index 64ad07d..c1a57f0 100644
--- a/tests/dart2js/consistent_null_add_error_test.dart
+++ b/tests/dart2js/consistent_null_add_error_test.dart
@@ -13,10 +13,10 @@
 confuse(x) => x;
 
 void check2(String name, name1, f1, name2, f2) {
-  Error trap(part, f) {
+  Error? trap(part, f) {
     try {
       f();
-    } catch (e) {
+    } on Error catch (e) {
       return e;
     }
     Expect.fail('should throw: $name.$part');
diff --git a/tests/dart2js/consistent_subtract_error_test.dart b/tests/dart2js/consistent_subtract_error_test.dart
index a847937..a34f50f 100644
--- a/tests/dart2js/consistent_subtract_error_test.dart
+++ b/tests/dart2js/consistent_subtract_error_test.dart
@@ -13,10 +13,10 @@
 confuse(x) => x;
 
 void check2(String name, name1, f1, name2, f2) {
-  Error trap(part, f) {
+  Error? trap(part, f) {
     try {
       f();
-    } catch (e) {
+    } on Error catch (e) {
       return e;
     }
     Expect.fail('should throw: $name.$part');
@@ -52,7 +52,7 @@
   }
 
   static f4() {
-    return (confuse(1) as int) - null;
+    return (confuse(1) as int) - (null as dynamic);
   }
 
   static f5() {
@@ -62,11 +62,11 @@
 
   static f6() {
     var a = confuse(true) ? 1 : 2; // Small int with unknown value.
-    return a - null;
+    return a - (null as dynamic);
   }
 
   static f7() {
-    return 1 - null;
+    return 1 - (null as dynamic);
   }
 
   static test() {
diff --git a/tests/dart2js/constant_folding_test.dart b/tests/dart2js/constant_folding_test.dart
index b9b050b..97e2a4f 100644
--- a/tests/dart2js/constant_folding_test.dart
+++ b/tests/dart2js/constant_folding_test.dart
@@ -928,7 +928,7 @@
 ///   constant evaluation results in `0` or `0.0` and the other results in
 ///   `-0.0`. Therefore, we additionally check that both values have the same
 ///   sign in this case.
-void jsEquals(expected, actual, [String reason = null]) {
+void jsEquals(expected, actual, [String reason = ""]) {
   if (expected is num && actual is num) {
     if (expected.isNaN && actual.isNaN) return;
   }
@@ -941,7 +941,7 @@
         actual.isNegative,
         (reason == null ? "" : "$reason ") +
             "${expected.toString()} and "
-            "${actual.toString()} have different signs.");
+                "${actual.toString()} have different signs.");
   }
 }
 
diff --git a/tests/dart2js/dart2js_2.status b/tests/dart2js/dart2js.status
similarity index 100%
rename from tests/dart2js/dart2js_2.status
rename to tests/dart2js/dart2js.status
diff --git a/tests/dart2js/deferred/uninstantiated_type_variable_lib.dart b/tests/dart2js/deferred/uninstantiated_type_variable_lib.dart
index 2af788d..08933c9 100644
--- a/tests/dart2js/deferred/uninstantiated_type_variable_lib.dart
+++ b/tests/dart2js/deferred/uninstantiated_type_variable_lib.dart
@@ -8,7 +8,7 @@
 class A {}
 
 class Box<T> {
-  int value;
+  int? value;
 }
 
 class B<T> extends A {
diff --git a/tests/dart2js/effectively_constant_fields_test.dart b/tests/dart2js/effectively_constant_fields_test.dart
index 6c9c18b..bf04671 100644
--- a/tests/dart2js/effectively_constant_fields_test.dart
+++ b/tests/dart2js/effectively_constant_fields_test.dart
@@ -51,8 +51,8 @@
 }
 
 @pragma('dart2js:noInline')
-method6(Class1 c) {
-  return c.field1;
+method6(Class1? c) {
+  return c!.field1;
 }
 
 @pragma('dart2js:noInline')
@@ -70,5 +70,4 @@
   Expect.equals(0, method6(new Class1()));
   Expect.throws(() => method6(null));
   Expect.equals(4, method7(new Class1()));
-  Expect.throws(() => method7(null));
 }
diff --git a/tests/dart2js/fields_test.dart b/tests/dart2js/fields_test.dart
index 95c2ca3..fb4bafb 100644
--- a/tests/dart2js/fields_test.dart
+++ b/tests/dart2js/fields_test.dart
@@ -6,7 +6,7 @@
 
 class A {
   A() {}
-  int x;
+  int? x;
 
   foo() {
     x = 42;
@@ -24,7 +24,7 @@
   Expect.equals(0, a.x);
   a.x = 4;
   Expect.equals(4, a.x);
-  a.x += 1;
+  a.x = a.x! + 1;
   Expect.equals(5, a.x);
 
   B b = new B();
diff --git a/tests/dart2js/for_in_test.dart b/tests/dart2js/for_in_test.dart
index 8f0eb15..eca74b8 100644
--- a/tests/dart2js/for_in_test.dart
+++ b/tests/dart2js/for_in_test.dart
@@ -42,7 +42,10 @@
         index = -1;
 
   bool moveNext() => ++index < values.length;
-  T get current => (0 <= index && index < values.length) ? values[index] : null;
+  T get current {
+    assert(0 <= index && index < values.length);
+    return values[index];
+  }
 }
 
 void main() {
diff --git a/tests/dart2js/for_test.dart b/tests/dart2js/for_test.dart
index fc910be..2a4e668 100644
--- a/tests/dart2js/for_test.dart
+++ b/tests/dart2js/for_test.dart
@@ -46,7 +46,7 @@
   var i;
   var sum = 0;
   for (i = 0; i < 5; i++) {
-    sum += i;
+    sum += i as int;
   }
   Expect.equals(5, i);
   Expect.equals(10, sum);
diff --git a/tests/dart2js/generic_class_is_test.dart b/tests/dart2js/generic_class_is_test.dart
index 6026b8d..cc2efe4 100644
--- a/tests/dart2js/generic_class_is_test.dart
+++ b/tests/dart2js/generic_class_is_test.dart
@@ -20,6 +20,6 @@
 class C2 implements C {}
 
 main() {
-  Expect.isTrue(new B<List<A<C>>>().method(new List<A1>()));
-  Expect.isFalse(new B<List<A<C2>>>().method(new List<A1>()));
+  Expect.isTrue(B<List<A<C>>>().method(List<A1>.empty()));
+  Expect.isFalse(B<List<A<C2>>>().method(List<A1>.empty()));
 }
diff --git a/tests/dart2js/generic_instantiation1_test.dart b/tests/dart2js/generic_instantiation1_test.dart
index fcfb79f..c22d9c4 100644
--- a/tests/dart2js/generic_instantiation1_test.dart
+++ b/tests/dart2js/generic_instantiation1_test.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.
 
-// dart2jsOptions=--strong
-
-int f<T>(T a) => null;
+int f<T>(T a) => 0;
 
 typedef int F<R>(R a);
 
@@ -15,5 +13,5 @@
 }
 
 main() {
-  new B<int>().c(0);
+  B<int>().c(0);
 }
diff --git a/tests/dart2js/generic_instantiation2_test.dart b/tests/dart2js/generic_instantiation2_test.dart
index 047d221..c22d9c4 100644
--- a/tests/dart2js/generic_instantiation2_test.dart
+++ b/tests/dart2js/generic_instantiation2_test.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.
 
-// dart2jsOptions=--strong --omit-implicit-checks
-
-int f<T>(T a) => null;
+int f<T>(T a) => 0;
 
 typedef int F<R>(R a);
 
@@ -15,5 +13,5 @@
 }
 
 main() {
-  new B<int>().c(0);
+  B<int>().c(0);
 }
diff --git a/tests/dart2js/generic_type_error_message_test.dart b/tests/dart2js/generic_type_error_message_test.dart
index e9ff104..a7b8c8d 100644
--- a/tests/dart2js/generic_type_error_message_test.dart
+++ b/tests/dart2js/generic_type_error_message_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.
 
-// dart2jsOptions=--strong
-
 import 'package:expect/expect.dart';
 
 class Foo<T extends num> {}
@@ -21,14 +19,14 @@
   test(c as Baz<num>, Baz, expectTypeArguments: true);
 }
 
-void test(dynamic object, Type type, {bool expectTypeArguments}) {
+void test(dynamic object, Type type, {required bool expectTypeArguments}) {
   bool caught = false;
   try {
     print(type);
     object as List<String>;
   } catch (e) {
     String expected = '$type';
-    if (!expectTypeArguments) {
+    if (!expectTypeArguments!) {
       expected = expected.substring(0, expected.indexOf('<'));
     }
     expected = '$expected';
diff --git a/tests/dart2js/getters_setters_test.dart b/tests/dart2js/getters_setters_test.dart
index 139f366..d7b5d2d 100644
--- a/tests/dart2js/getters_setters_test.dart
+++ b/tests/dart2js/getters_setters_test.dart
@@ -5,7 +5,7 @@
 import "package:expect/expect.dart";
 
 class GettersSettersTest {
-  static int foo;
+  static int? foo;
 
   static get bar {
     return foo;
@@ -67,8 +67,8 @@
 
 class A {
   A();
-  int x_;
-  static int foo;
+  int? x_;
+  static int? foo;
 
   static get bar {
     return foo;
@@ -79,7 +79,7 @@
   }
 
   int get x {
-    return x_;
+    return x_!;
   }
 
   void set x(int value) {
@@ -91,7 +91,7 @@
   }
 
   int operator [](int index) {
-    return x_ + index;
+    return x_! + index;
   }
 
   void operator []=(int index, int value) {
@@ -99,7 +99,7 @@
   }
 
   int getX_() {
-    return x_;
+    return x_!;
   }
 }
 
@@ -108,14 +108,14 @@
 }
 
 class C extends A {
-  int y_;
+  int? y_;
 
   C() {
     this.x_ = 0;
   }
 
   int get x {
-    return y_;
+    return y_!;
   }
 
   void set x(int value) {
diff --git a/tests/dart2js/inferrer_is_int_test.dart b/tests/dart2js/inferrer_is_int_test.dart
index c1cb1af..f544578 100644
--- a/tests/dart2js/inferrer_is_int_test.dart
+++ b/tests/dart2js/inferrer_is_int_test.dart
@@ -6,7 +6,7 @@
 // literal might become an int at runtime.
 
 import "package:expect/expect.dart";
-import '../language_2/compiler_annotations.dart';
+import '../language/compiler_annotations.dart';
 
 @DontInline()
 callWithStringAndDouble(value) {
diff --git a/tests/dart2js/injected_cast_test.dart b/tests/dart2js/injected_cast_test.dart
index 3ab671c..4413de3 100644
--- a/tests/dart2js/injected_cast_test.dart
+++ b/tests/dart2js/injected_cast_test.dart
@@ -12,15 +12,20 @@
 }
 
 @pragma('dart2js:noInline')
-test1(dynamic c, num n) {
+test1(dynamic c, dynamic n) {
   if (c is Class) {
     c.method(field = 41, n, field = 42);
   }
 }
 
 @pragma('dart2js:noInline')
-test2(dynamic c, num n) {
+test2(dynamic c, dynamic n) {
   if (c is! Class) return;
+  c.method(field = 66, n, field = 67);
+}
+
+@pragma('dart2js:noInline')
+test3(dynamic c, dynamic n) {
   c.method(field = 86, n, field = 87);
 }
 
@@ -36,6 +41,14 @@
 
   try {
     test2(new Class(), 0.5);
+    field = 213;
+    field = 213;
+  } catch (e) {}
+  // See above comment.
+  Expect.equals(66, field);
+
+  try {
+    test3(new Class(), 0.5);
     field = 321;
     field = 321;
   } catch (e) {}
diff --git a/tests/dart2js/instantiation_stub_2_test.dart b/tests/dart2js/instantiation_stub_2_test.dart
index 1376011..99d7a6c 100644
--- a/tests/dart2js/instantiation_stub_2_test.dart
+++ b/tests/dart2js/instantiation_stub_2_test.dart
@@ -2,26 +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.
 
-
 import 'package:expect/expect.dart';
 
-List<T> foo<T>([T a1, T a2, T a3, T a4, T a5, T a6, T a7]) =>
-    <T>[a1, a2, a3, a4, a5, a6, a7];
+List<T?> foo<T>([T? a1, T? a2, T? a3, T? a4, T? a5, T? a6, T? a7]) =>
+    [a1, a2, a3, a4, a5, a6, a7];
 
 class CC {
-  List<T> bar<T, U, V>([T a1, T a2, T a3, T a4, T a5, T a6]) =>
-      <T>[a1, a2, a3, a4, a5, a6];
+  List<T?> bar<T, U, V>([T? a1, T? a2, T? a3, T? a4, T? a5, T? a6]) =>
+      [a1, a2, a3, a4, a5, a6];
 }
 
 main() {
   // We expect a call$1$5 entry for foo, accessed nowhere else in the program
   // except via the call$5 entry on the instantiation.
-  List<int> Function(int, int, int, int, int) f = foo;
+  List<int?> Function(int?, int?, int?, int?, int?) f = foo;
   Expect.equals(4, f(1, 2, 3, 4, 5)[3]);
 
   // We expect a bar$3$4 entry for bar, accessed nowhere else in the program
   // except via the call$4 entry on the instantiation.
-  var o = new CC();
-  List<String> Function(String, String, String, String) g = o.bar;
+  var o = CC();
+  List<String?> Function(String?, String?, String?, String?) g = o.bar;
   Expect.equals('abcdnullnull', g('a', 'b', 'c', 'd').join(''));
 }
diff --git a/tests/dart2js/internal/deferred/load_in_correct_order_lib4.dart b/tests/dart2js/internal/deferred/load_in_correct_order_lib4.dart
index 4d52cac..eed0c5b 100644
--- a/tests/dart2js/internal/deferred/load_in_correct_order_lib4.dart
+++ b/tests/dart2js/internal/deferred/load_in_correct_order_lib4.dart
@@ -1,6 +1,6 @@
 class C4 {
   final value = 499;
   const C4();
-
+}
 
 const c4 = const C4();
diff --git a/tests/dart2js/internal/deferred/load_in_correct_order_lib5.dart b/tests/dart2js/internal/deferred/load_in_correct_order_lib5.dart
index 2a97336..2212525 100644
--- a/tests/dart2js/internal/deferred/load_in_correct_order_lib5.dart
+++ b/tests/dart2js/internal/deferred/load_in_correct_order_lib5.dart
@@ -1,6 +1,6 @@
 class C5 {
   final value = 500;
   const C5();
-
+}
 
 const c5 = const C5();
diff --git a/tests/dart2js/internal/deferred/load_in_correct_order_lib6.dart b/tests/dart2js/internal/deferred/load_in_correct_order_lib6.dart
index 57fc252..8ee64e7 100644
--- a/tests/dart2js/internal/deferred/load_in_correct_order_lib6.dart
+++ b/tests/dart2js/internal/deferred/load_in_correct_order_lib6.dart
@@ -1,6 +1,6 @@
 class C6 {
   final value = 501;
   const C6();
-
+}
 
 const c6 = const C6();
diff --git a/tests/dart2js/internal/deferred/load_in_correct_order_lib7.dart b/tests/dart2js/internal/deferred/load_in_correct_order_lib7.dart
index 33794df..8c6f9b5 100644
--- a/tests/dart2js/internal/deferred/load_in_correct_order_lib7.dart
+++ b/tests/dart2js/internal/deferred/load_in_correct_order_lib7.dart
@@ -1,6 +1,6 @@
 class C7 {
   final value = 502;
   const C7();
-
+}
 
 const c7 = const C7();
diff --git a/tests/dart2js/internal/lax_runtime_type_closure_to_string7_test.dart b/tests/dart2js/internal/lax_runtime_type_closure_to_string7_test.dart
index 652ac67..9bb98e3 100644
--- a/tests/dart2js/internal/lax_runtime_type_closure_to_string7_test.dart
+++ b/tests/dart2js/internal/lax_runtime_type_closure_to_string7_test.dart
@@ -13,7 +13,7 @@
 
 @pragma('dart2js:noInline')
 test<Q>() {
-  Q local1(Q) {}
+  Q? local1(Q) {}
   local2(int i) => i;
 
   var toString = '${local1.runtimeType}';
diff --git a/tests/dart2js/internal/rti/bind_test.dart b/tests/dart2js/internal/rti/bind_test.dart
index 4e38ba6..907d271 100644
--- a/tests/dart2js/internal/rti/bind_test.dart
+++ b/tests/dart2js/internal/rti/bind_test.dart
@@ -5,13 +5,13 @@
 import 'dart:_rti' as rti;
 import "package:expect/expect.dart";
 
-void checkRtiIdentical(Object rti1, Object rti2) {
+void checkRtiIdentical(rti.Rti rti1, rti.Rti rti2) {
   var format = rti.testingRtiToString;
   Expect.isTrue(
       identical(rti1, rti2), 'identical(${format(rti1)}, ${format(rti2)}');
 }
 
-void checkToString(String expected, Object rti1) {
+void checkToString(String expected, rti.Rti rti1) {
   String result = rti.testingRtiToString(rti1);
   if (expected == result) return;
   Expect.equals(expected, result.replaceAll('minified:', ''));
diff --git a/tests/dart2js/internal/rti/bound_environment_test.dart b/tests/dart2js/internal/rti/bound_environment_test.dart
index 67f8ec3..6032e0b 100644
--- a/tests/dart2js/internal/rti/bound_environment_test.dart
+++ b/tests/dart2js/internal/rti/bound_environment_test.dart
@@ -5,13 +5,13 @@
 import 'dart:_rti' as rti;
 import "package:expect/expect.dart";
 
-void checkRtiIdentical(Object rti1, Object rti2) {
+void checkRtiIdentical(rti.Rti rti1, rti.Rti rti2) {
   var format = rti.testingRtiToString;
   Expect.isTrue(
       identical(rti1, rti2), 'identical(${format(rti1)}, ${format(rti2)}');
 }
 
-void checkToString(String expected, Object rti1) {
+void checkToString(String expected, rti.Rti rti1) {
   String result = rti.testingRtiToString(rti1);
   if (expected == result) return;
   Expect.equals(expected, result.replaceAll('minified:', ''));
diff --git a/tests/dart2js/internal/rti/class_environment_test.dart b/tests/dart2js/internal/rti/class_environment_test.dart
index 4cf7d9e..296333a3 100644
--- a/tests/dart2js/internal/rti/class_environment_test.dart
+++ b/tests/dart2js/internal/rti/class_environment_test.dart
@@ -5,13 +5,13 @@
 import 'dart:_rti' as rti;
 import "package:expect/expect.dart";
 
-void checkRtiIdentical(Object rti1, Object rti2) {
+void checkRtiIdentical(rti.Rti rti1, rti.Rti rti2) {
   var format = rti.testingRtiToString;
   Expect.isTrue(
       identical(rti1, rti2), 'identical(${format(rti1)}, ${format(rti2)}');
 }
 
-void checkToString(String expected, Object rti1) {
+void checkToString(String expected, rti.Rti rti1) {
   String result = rti.testingRtiToString(rti1);
   if (expected == result) return;
   Expect.equals(expected, result.replaceAll('minified:', ''));
diff --git a/tests/dart2js/internal/rti/required_named_parameters_test.dart b/tests/dart2js/internal/rti/required_named_parameters_test.dart
index 309a381..c07f7a4 100644
--- a/tests/dart2js/internal/rti/required_named_parameters_test.dart
+++ b/tests/dart2js/internal/rti/required_named_parameters_test.dart
@@ -51,11 +51,11 @@
 
   // Subtype may not redeclare optional parameters as required
   rti2 = rti.testingUniverseEval(universe, "@(A,{a!A,b!A,c!A})");
-  Expect.isFalse(rti.testingIsSubtype(universe, rti2, rti1));
+  Expect.equals(isWeakMode, rti.testingIsSubtype(universe, rti2, rti1));
 
   // Subtype may not declare new required named parameters
   rti2 = rti.testingUniverseEval(universe, "@(A,{a!A,b:A,c!A,d!A})");
-  Expect.isFalse(rti.testingIsSubtype(universe, rti2, rti1));
+  Expect.equals(isWeakMode, rti.testingIsSubtype(universe, rti2, rti1));
 
   // Rti.toString() appears as expected
   Expect.equals('(B, {required B a, B b, required B c}) => dynamic',
diff --git a/tests/dart2js/internal/rti/simple_2_test.dart b/tests/dart2js/internal/rti/simple_2_test.dart
index e195451..fd3da62 100644
--- a/tests/dart2js/internal/rti/simple_2_test.dart
+++ b/tests/dart2js/internal/rti/simple_2_test.dart
@@ -5,7 +5,7 @@
 import 'dart:_rti' as rti;
 import "package:expect/expect.dart";
 
-void checkToString(String expected, Object rti1) {
+void checkToString(String expected, rti.Rti rti1) {
   String result = rti.testingRtiToString(rti1);
   if (expected == result) return;
   Expect.equals(expected, result.replaceAll('minified:', ''));
diff --git a/tests/dart2js/is_check_instanceof_test.dart b/tests/dart2js/is_check_instanceof_test.dart
index 7e9c8a4..e219294 100644
--- a/tests/dart2js/is_check_instanceof_test.dart
+++ b/tests/dart2js/is_check_instanceof_test.dart
@@ -33,7 +33,7 @@
 }
 
 void main() {
-  var things = new List(3);
+  var things = []..length = 3;
   things.setRange(0, 3, [new INSTANTIATED(), 1, new Object()]);
 
   var checkX = new Check<INSTANTIATED>();
diff --git a/tests/dart2js/js_array_index_error_test.dart b/tests/dart2js/js_array_index_error_test.dart
index 8af893a..9998762 100644
--- a/tests/dart2js/js_array_index_error_test.dart
+++ b/tests/dart2js/js_array_index_error_test.dart
@@ -11,10 +11,10 @@
 @pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
-Error getError(action(), name, part) {
+Error? getError(action(), name, part) {
   try {
     action();
-  } catch (e) {
+  } on Error catch (e) {
     return e;
   }
   Expect.fail('must throw: $name: $part');
diff --git a/tests/dart2js/js_array_removeLast_error_test.dart b/tests/dart2js/js_array_removeLast_error_test.dart
index 5241f55..de5496b 100644
--- a/tests/dart2js/js_array_removeLast_error_test.dart
+++ b/tests/dart2js/js_array_removeLast_error_test.dart
@@ -11,11 +11,11 @@
 @pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
-Error getError(action()) {
+Error? getError(action()) {
   try {
     action();
     Expect.fail('must throw');
-  } catch (e) {
+  } on Error catch (e) {
     return e;
   }
 }
diff --git a/tests/dart2js/jsinterop_test.dart b/tests/dart2js/jsinterop_test.dart
index 07798e5..397f5e2 100644
--- a/tests/dart2js/jsinterop_test.dart
+++ b/tests/dart2js/jsinterop_test.dart
@@ -50,7 +50,7 @@
 
 class Class {
   Class.generative();
-  factory Class.fact() => null;
+  factory Class.fact() => null as dynamic;
 
   // NON_NATIVE_EXTERNAL               //# 08: compile-time error
   external Class.externalGenerative(); //# 08: continued
@@ -58,16 +58,16 @@
   // NON_NATIVE_EXTERNAL                 //# 09: compile-time error
   external factory Class.externalFact(); //# 09: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 10: compile-time error
+  @JS('a') // GENERIC, GENERIC  //# 10: compile-time error
   Class.jsInteropGenerative(); //# 10: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 11: compile-time error
+  @JS('a') // GENERIC  //# 11: compile-time error
   factory Class.jsInteropFact() => null; //# 11: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 12: compile-time error
+  @JS('a') // GENERIC  //# 12: compile-time error
   external Class.externalJsInteropGenerative(); //# 12: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 13: compile-time error
+  @JS('a') // GENERIC  //# 13: compile-time error
   external factory Class.externalJsInteropFact(); //# 13: continued
 
   var instanceField;
@@ -80,28 +80,28 @@
   static set staticSetter(_) {}
   static staticMethod() {}
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 14: compile-time error
+  @JS('a') // GENERIC  //# 14: compile-time error
   var instanceJsInteropField; //# 14: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 15: compile-time error
+  @JS('a') // GENERIC  //# 15: compile-time error
   get instanceJsInteropGetter => null; //# 15: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 16: compile-time error
+  @JS('a') // GENERIC  //# 16: compile-time error
   set instanceJsInteropSetter(_) {} //# 16: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 17: compile-time error
+  @JS('a') // GENERIC  //# 17: compile-time error
   instanceJsInteropMethod() {} //# 17: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 18: compile-time error
+  @JS('a') // GENERIC  //# 18: compile-time error
   static var staticJsInteropField; //# 18: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 19: compile-time error
+  @JS('a') // GENERIC  //# 19: compile-time error
   static get staticJsInteropGetter => null; //# 19: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 20: compile-time error
+  @JS('a') // GENERIC  //# 20: compile-time error
   static set staticJsInteropSetter(_) {} //# 20: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 21: compile-time error
+  @JS('a') // GENERIC  //# 21: compile-time error
   static staticJsInteropMethod() {} //# 21: continued
 
   // NON_NATIVE_EXTERNAL               //# 22: compile-time error
@@ -122,22 +122,22 @@
   // NON_NATIVE_EXTERNAL           //# 27: compile-time error
   external static externalStaticMethod(); //# 27: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 28: compile-time error
+  @JS('a') // GENERIC  //# 28: compile-time error
   external get externalInstanceJsInteropGetter; //# 28: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 29: compile-time error
+  @JS('a') // GENERIC  //# 29: compile-time error
   external set externalInstanceJsInteropSetter(_); //# 29: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 30: compile-time error
+  @JS('a') // GENERIC  //# 30: compile-time error
   external externalInstanceJsInteropMethod(); //# 30: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 31: compile-time error
+  @JS('a') // GENERIC  //# 31: compile-time error
   external static get externalStaticJsInteropGetter; //# 31: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 32: compile-time error
+  @JS('a') // GENERIC  //# 32: compile-time error
   external static set externalStaticJsInteropSetter(_); //# 32: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 33: compile-time error
+  @JS('a') // GENERIC  //# 33: compile-time error
   external static externalStaticJsInteropMethod(); //# 33: continued
 }
 
diff --git a/tests/dart2js/lax_runtime_type_closure_equals1_test.dart b/tests/dart2js/lax_runtime_type_closure_equals1_test.dart
index 8f9836f..3837a0c 100644
--- a/tests/dart2js/lax_runtime_type_closure_equals1_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_equals1_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// dart2jsOptions=--strong --omit-implicit-checks --lax-runtime-type-to-string
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string
 
 import 'package:expect/expect.dart';
 
diff --git a/tests/dart2js/lax_runtime_type_closure_equals2_test.dart b/tests/dart2js/lax_runtime_type_closure_equals2_test.dart
index 56afe25..6b62ae4 100644
--- a/tests/dart2js/lax_runtime_type_closure_equals2_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_equals2_test.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// dart2jsOptions=--strong --omit-implicit-checks --lax-runtime-type-to-string
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string
 
 import 'package:expect/expect.dart';
 
@@ -11,13 +11,13 @@
 }
 
 main() {
-  T local1a<T>() => null;
+  T local1a<T>() => throw 'unreachable';
 
-  T local1b<T>() => null;
+  T local1b<T>() => throw 'unreachable';
 
   T local2<T>(T t, String s) => t;
 
   Expect.isTrue(local1a.runtimeType == local1b.runtimeType);
   Expect.isFalse(local1a.runtimeType == local2.runtimeType);
-  new Class();
+  Class();
 }
diff --git a/tests/dart2js/lax_runtime_type_closure_equals3_test.dart b/tests/dart2js/lax_runtime_type_closure_equals3_test.dart
index 673211e..6f3d755 100644
--- a/tests/dart2js/lax_runtime_type_closure_equals3_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_equals3_test.dart
@@ -2,19 +2,19 @@
 // for 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 --omit-implicit-checks --lax-runtime-type-to-string
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string
 
 import 'package:expect/expect.dart';
 
-String method() => null;
+String method() => throw 'unreachable';
 
 class Class1<T> {
   Class1();
 
   method() {
-    T local1a() => null;
+    T local1a() => throw 'unreachable';
 
-    T local1b() => null;
+    T local1b() => throw 'unreachable';
 
     T local2(T t, String s) => t;
 
@@ -29,6 +29,6 @@
 }
 
 main() {
-  new Class1<int>().method();
-  new Class2<int>();
+  Class1<int>().method();
+  Class2<int>();
 }
diff --git a/tests/dart2js/lax_runtime_type_closure_equals4_test.dart b/tests/dart2js/lax_runtime_type_closure_equals4_test.dart
index 73b72b3..24004b5 100644
--- a/tests/dart2js/lax_runtime_type_closure_equals4_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_equals4_test.dart
@@ -2,16 +2,16 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// dart2jsOptions=--strong --omit-implicit-checks --lax-runtime-type-to-string
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string
 
 import 'package:expect/expect.dart';
 
 class Class1<T> {
   Class1();
 
-  method1a() => null;
+  method1a() => throw 'unreachable';
 
-  method1b() => null;
+  method1b() => throw 'unreachable';
 
   method2(t, s) => t;
 }
@@ -21,9 +21,9 @@
 }
 
 main() {
-  var c = new Class1<int>();
+  var c = Class1<int>();
 
   Expect.isTrue(c.method1a.runtimeType == c.method1b.runtimeType);
   Expect.isFalse(c.method1a.runtimeType == c.method2.runtimeType);
-  new Class2<int>();
+  Class2<int>();
 }
diff --git a/tests/dart2js/lax_runtime_type_closure_equals5_test.dart b/tests/dart2js/lax_runtime_type_closure_equals5_test.dart
index ecad991..cb6ab52 100644
--- a/tests/dart2js/lax_runtime_type_closure_equals5_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_equals5_test.dart
@@ -2,16 +2,16 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// dart2jsOptions=--strong --omit-implicit-checks --lax-runtime-type-to-string
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string
 
 import 'package:expect/expect.dart';
 
 class Class1<T> {
   Class1();
 
-  T method1a() => null;
+  T method1a() => throw 'unreachable';
 
-  T method1b() => null;
+  T method1b() => throw 'unreachable';
 
   T method2(T t, String s) => t;
 }
@@ -21,9 +21,9 @@
 }
 
 main() {
-  var c = new Class1<int>();
+  var c = Class1<int>();
 
   Expect.isTrue(c.method1a.runtimeType == c.method1b.runtimeType);
   Expect.isFalse(c.method1a.runtimeType == c.method2.runtimeType);
-  new Class2<int>();
+  Class2<int>();
 }
diff --git a/tests/dart2js/lax_runtime_type_closure_equals6_test.dart b/tests/dart2js/lax_runtime_type_closure_equals6_test.dart
index 23641eb..a0e7a3f 100644
--- a/tests/dart2js/lax_runtime_type_closure_equals6_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_equals6_test.dart
@@ -2,13 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// dart2jsOptions=--strong --omit-implicit-checks --lax-runtime-type-to-string
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string
 
 import 'package:expect/expect.dart';
 
-method1a() => null;
+method1a() => throw 'unreachable';
 
-method1b() => null;
+method1b() => throw 'unreachable';
 
 method2(t, s) => t;
 
@@ -19,5 +19,5 @@
 main() {
   Expect.isTrue(method1a.runtimeType == method1b.runtimeType);
   Expect.isFalse(method1a.runtimeType == method2.runtimeType);
-  new Class<int>();
+  Class<int>();
 }
diff --git a/tests/dart2js/lax_runtime_type_closure_equals7_test.dart b/tests/dart2js/lax_runtime_type_closure_equals7_test.dart
index 129dcca..1542dd1 100644
--- a/tests/dart2js/lax_runtime_type_closure_equals7_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_equals7_test.dart
@@ -2,13 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// dart2jsOptions=--strong --omit-implicit-checks --lax-runtime-type-to-string
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string
 
 import 'package:expect/expect.dart';
 
-T method1a<T>() => null;
+T method1a<T>() => throw 'unreachable';
 
-T method1b<T>() => null;
+T method1b<T>() => throw 'unreachable';
 
 T method2<T>(T t, String s) => t;
 
@@ -19,5 +19,5 @@
 main() {
   Expect.isTrue(method1a.runtimeType == method1b.runtimeType);
   Expect.isFalse(method1a.runtimeType == method2.runtimeType);
-  new Class<int>();
+  Class<int>();
 }
diff --git a/tests/dart2js/lax_runtime_type_closure_equals8_test.dart b/tests/dart2js/lax_runtime_type_closure_equals8_test.dart
index 7a1142d..c8dc561 100644
--- a/tests/dart2js/lax_runtime_type_closure_equals8_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_equals8_test.dart
@@ -2,16 +2,16 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// dart2jsOptions=--strong --omit-implicit-checks --lax-runtime-type-to-string
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string
 
 import 'package:expect/expect.dart';
 
 class Class1<S> {
   Class1();
 
-  T method1a<T>() => null;
+  T method1a<T>() => throw 'unreachable';
 
-  T method1b<T>() => null;
+  T method1b<T>() => throw 'unreachable';
 
   T method2<T>(T t, String s) => t;
 }
@@ -21,9 +21,9 @@
 }
 
 main() {
-  var c = new Class1<int>();
+  var c = Class1<int>();
 
   Expect.isTrue(c.method1a.runtimeType == c.method1b.runtimeType);
   Expect.isFalse(c.method1a.runtimeType == c.method2.runtimeType);
-  new Class2<int>();
+  Class2<int>();
 }
diff --git a/tests/dart2js/lax_runtime_type_closure_to_string3_test.dart b/tests/dart2js/lax_runtime_type_closure_to_string3_test.dart
index 1d244c0..5f0edff 100644
--- a/tests/dart2js/lax_runtime_type_closure_to_string3_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_to_string3_test.dart
@@ -2,14 +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.
 
-// dart2jsOptions=--strong --omit-implicit-checks --lax-runtime-type-to-string --experiment-new-rti
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string --experiment-new-rti
 
 import 'package:expect/expect.dart';
 
 class Class1<T> {
   Class1();
 
-  T method() => null;
+  T method() => throw 'unreachable';
 }
 
 class Class2<T> {
@@ -17,7 +17,7 @@
 }
 
 main() {
-  Class1<int> cls1 = new Class1<int>();
+  Class1<int> cls1 = Class1<int>();
   Expect.equals("() => erased", cls1.method.runtimeType.toString());
-  new Class2<int>();
+  Class2<int>();
 }
diff --git a/tests/dart2js/lax_runtime_type_closure_to_string4_test.dart b/tests/dart2js/lax_runtime_type_closure_to_string4_test.dart
index c95cf29..95db29e 100644
--- a/tests/dart2js/lax_runtime_type_closure_to_string4_test.dart
+++ b/tests/dart2js/lax_runtime_type_closure_to_string4_test.dart
@@ -2,14 +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.
 
-// dart2jsOptions=--strong --omit-implicit-checks --lax-runtime-type-to-string
+// dart2jsOptions=--omit-implicit-checks --lax-runtime-type-to-string
 
 import 'package:expect/expect.dart';
 
 class Class1 {
   Class1();
 
-  T method<T>() => null;
+  T method<T>() => throw 'unreachable';
 }
 
 class Class2<T> {
@@ -17,7 +17,7 @@
 }
 
 main() {
-  Class1 cls1 = new Class1();
+  Class1 cls1 = Class1();
   Expect.equals("<T1>() => T1", cls1.method.runtimeType.toString());
-  new Class2<int>();
+  Class2<int>();
 }
diff --git a/tests/dart2js/list_factory_test.dart b/tests/dart2js/list_factory_test.dart
index b58c925..3df2eb5 100644
--- a/tests/dart2js/list_factory_test.dart
+++ b/tests/dart2js/list_factory_test.dart
@@ -5,7 +5,7 @@
 import "package:expect/expect.dart";
 
 main() {
-  var a = new List(4);
+  var a = List.filled(4, 0);
   Expect.equals(4, a.length);
   a[0] = 42;
   a[1] = 43;
@@ -15,7 +15,7 @@
     Expect.equals(42 + i, a[i]);
   }
 
-  a = new List();
+  a = List.empty(growable: true);
   a.add(42);
   a.add(43);
   a.add(44);
diff --git a/tests/dart2js/local_function_signatures_strong_test.dart b/tests/dart2js/local_function_signatures_strong_test.dart
index f1df515..89b2c23 100644
--- a/tests/dart2js/local_function_signatures_strong_test.dart
+++ b/tests/dart2js/local_function_signatures_strong_test.dart
@@ -2,93 +2,91 @@
 // for 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
-
 import 'package:expect/expect.dart';
 
 class Class1 {
   method1() {
-    num local<T>(num n) => null;
+    num local<T>(num n) => null as dynamic;
     return local;
   }
 
   method2() {
-    num local<T>(int n) => null;
+    num local<T>(int n) => null as dynamic;
     return local;
   }
 
   method3() {
-    int local<T>(num n) => null;
+    int local<T>(num n) => null as dynamic;
     return local;
   }
 }
 
 class Class2 {
   method4<T>() {
-    num local(T n) => null;
+    num local(T n) => null as dynamic;
     return local;
   }
 }
 
 class Class3 {
   method5<T>() {
-    T local(num n) => null;
+    T local(num n) => null as dynamic;
     return local;
   }
 }
 
 class Class4 {
   method6<T>() {
-    num local(num n, T t) => null;
+    num local(num n, T t) => null as dynamic;
     return local;
   }
 }
 
 method7<T>() {
-  num local(T n) => null;
+  num local(T n) => null as dynamic;
   return local;
 }
 
 method8<T>() {
-  T local(num n) => null;
+  T local(num n) => null as dynamic;
   return local;
 }
 
 method9<T>() {
-  num local(num n, T t) => null;
+  num local(num n, T t) => null as dynamic;
   return local;
 }
 
 method10() {
-  num local<T>(T n) => null;
+  num local<T>(T n) => null as dynamic;
   return local;
 }
 
 method11() {
-  T local<T>(num n) => null;
+  T local<T>(num n) => null as dynamic;
   return local;
 }
 
 method12() {
-  num local<T>(num n, T t) => null;
+  num local<T>(num n, T t) => null as dynamic;
   return local;
 }
 
 num Function(num) //# 01: ok
     method13() {
-  num local<T>(num n) => null;
+  num local<T>(num n) => null as dynamic;
   return local;
 }
 
 num Function(num) //# 01: continued
     method14() {
-  num local<T>(T n) => null;
+  num local<T>(T n) => null as dynamic;
   return local;
 }
 
 num Function(num) //# 01: continued
     method15() {
-  T local<T>(num n) => null;
+  T local<T>(num n) => null as dynamic;
   return local;
 }
 
diff --git a/tests/dart2js/local_function_signatures_test.dart b/tests/dart2js/local_function_signatures_test.dart
index 11bfb83..303be77 100644
--- a/tests/dart2js/local_function_signatures_test.dart
+++ b/tests/dart2js/local_function_signatures_test.dart
@@ -2,44 +2,42 @@
 // for 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
-
 import 'package:expect/expect.dart';
 
 class Class1 {
   method1() {
-    num local(num n) => null;
+    num local(num n) => null as dynamic;
     return local;
   }
 
   method2() {
-    num local(int n) => null;
+    num local(int n) => null as dynamic;
     return local;
   }
 
   method3() {
-    Object local(num n) => null;
+    Object local(num n) => null as dynamic;
     return local;
   }
 }
 
 class Class2<T> {
   method4() {
-    num local(T n) => null;
+    num local(T n) => null as dynamic;
     return local;
   }
 }
 
 class Class3<T> {
   method5() {
-    T local(num n) => null;
+    T local(num n) => null as dynamic;
     return local;
   }
 }
 
 class Class4<T> {
   method6() {
-    num local(num n, T t) => null;
+    num local(num n, T t) => null as dynamic;
     return local;
   }
 }
diff --git a/tests/dart2js/member_namespace_test.dart b/tests/dart2js/member_namespace_test.dart
index ff65d20..43d265f 100644
--- a/tests/dart2js/member_namespace_test.dart
+++ b/tests/dart2js/member_namespace_test.dart
@@ -5,7 +5,7 @@
 import "package:expect/expect.dart";
 
 class A {
-  static int a;
+  static int? a;
   A();
   static foo() {
     // Make sure 'A' is not resolved to the constructor.
diff --git a/tests/dart2js/method_signatures_strong_test.dart b/tests/dart2js/method_signatures_strong_test.dart
index 3e3f256..b3be862 100644
--- a/tests/dart2js/method_signatures_strong_test.dart
+++ b/tests/dart2js/method_signatures_strong_test.dart
@@ -2,35 +2,33 @@
 // for 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
-
 import 'package:expect/expect.dart';
 
 class Class1 {
-  num method1<T>(num n) => null;
+  num method1<T>(num n) => throw 'unreachable';
 
-  num method2<T>(int n) => null;
+  num method2<T>(int n) => throw 'unreachable';
 
-  int method3<T>(num n) => null;
+  int method3<T>(num n) => throw 'unreachable';
 }
 
 class Class2 {
-  num method4<T>(T n) => null;
+  num method4<T>(T n) => throw 'unreachable';
 }
 
 class Class3 {
-  T method5<T>(num n) => null;
+  T method5<T>(num n) => throw 'unreachable';
 }
 
 class Class4 {
-  num method6<T>(num n, T t) => null;
+  num method6<T>(num n, T t) => throw 'unreachable';
 }
 
-num method7<T>(T n) => null;
+num method7<T>(T n) => throw 'unreachable';
 
-T method8<T>(num n) => null;
+T method8<T>(num n) => throw 'unreachable';
 
-num method9<T>(num n, T t) => null;
+num method9<T>(num n, T t) => throw 'unreachable';
 
 @pragma('dart2js:noInline')
 test(o) => o is num Function(num);
diff --git a/tests/dart2js/method_signatures_test.dart b/tests/dart2js/method_signatures_test.dart
index 79d0c7f..5c35561 100644
--- a/tests/dart2js/method_signatures_test.dart
+++ b/tests/dart2js/method_signatures_test.dart
@@ -2,35 +2,33 @@
 // for 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
-
 import 'package:expect/expect.dart';
 
 class Class1 {
-  num method1(num n) => null;
+  num method1(num n) => throw 'unreachable';
 
-  num method2(int n) => null;
+  num method2(int n) => throw 'unreachable';
 
-  Object method3(num n) => null;
+  Object method3(num n) => throw 'unreachable';
 }
 
 class Class2<T> {
-  num method4(T n) => null;
+  num method4(T n) => throw 'unreachable';
 }
 
 class Class3<T> {
-  T method5(num n) => null;
+  T method5(num n) => throw 'unreachable';
 }
 
 class Class4<T> {
-  num method6(num n, T t) => null;
+  num method6(num n, T t) => throw 'unreachable';
 }
 
-num method7(num n) => null;
+num method7(num n) => throw 'unreachable';
 
-num method8(int n) => null;
+num method8(int n) => throw 'unreachable';
 
-Object method9(num n) => null;
+Object method9(num n) => throw 'unreachable';
 
 @pragma('dart2js:noInline')
 test(o) => o is num Function(num);
diff --git a/tests/dart2js/minus_zero2_test.dart b/tests/dart2js/minus_zero2_test.dart
index 02cf9f0..a48b860 100644
--- a/tests/dart2js/minus_zero2_test.dart
+++ b/tests/dart2js/minus_zero2_test.dart
@@ -10,10 +10,10 @@
   // Dart2js must use "-0.0" as if it was 0. In particular, it must do its
   // range-analysis correctly.
   var list = [1, 2, 3];
-  if (new DateTime.now().millisecondsSinceEpoch == 42) list[1] = 4;
+  if (DateTime.now().millisecondsSinceEpoch == 42) list[1] = 4;
   int sum = 0;
   for (num i = -0.0; i < list.length; i++) {
-    sum += list[i];
+    sum += list[i as int];
   }
   Expect.equals(6, sum);
 }
diff --git a/tests/dart2js/minus_zero_test.dart b/tests/dart2js/minus_zero_test.dart
index bc3c0b6..705c62d 100644
--- a/tests/dart2js/minus_zero_test.dart
+++ b/tests/dart2js/minus_zero_test.dart
@@ -13,7 +13,7 @@
   // Dart2js must not infer that the type-intersection of int and -0.0 is empty.
   // It must get an interceptor for the addition (`i += 3`), or use the native
   // JS + operation.
-  int i = minusZero();
+  int i = minusZero() as int;
   i += 3;
   Expect.equals(3, i);
 }
diff --git a/tests/dart2js/mixin_type_variable_test.dart b/tests/dart2js/mixin_type_variable_test.dart
index 750e58d..5d7c69e 100644
--- a/tests/dart2js/mixin_type_variable_test.dart
+++ b/tests/dart2js/mixin_type_variable_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 abstract class Bar<C> {
-  final List<C> _one = new List<C>();
+  final List<C> _one = [];
 
   final bool _two = Foo is C;
 }
@@ -29,7 +29,7 @@
 }
 
 main() {
-  new Foo();
-  new C('e');
-  new F('e');
+  Foo();
+  C('e');
+  F('e');
 }
diff --git a/tests/dart2js/native/compute_this_script_test.dart b/tests/dart2js/native/compute_this_script_test.dart
index ee5c855..5b76bf5 100644
--- a/tests/dart2js/native/compute_this_script_test.dart
+++ b/tests/dart2js/native/compute_this_script_test.dart
@@ -10,7 +10,7 @@
   // This is somewhat brittle and relies on an implementation detail
   // of our test runner, but I can think of no other way to test this.
   // -- ahe
-  if (!thisScript.endsWith('/compute_this_script_test.js')) {
+  if (!thisScript!.endsWith('/compute_this_script_test.js')) {
     throw 'Unexpected script: "$thisScript"';
   }
 }
diff --git a/tests/dart2js/native/error_safeToString_test.dart b/tests/dart2js/native/error_safeToString_test.dart
index 115c908..022b53a 100644
--- a/tests/dart2js/native/error_safeToString_test.dart
+++ b/tests/dart2js/native/error_safeToString_test.dart
@@ -80,9 +80,11 @@
 expectTypeName(expectedName, s) {
   var m = new RegExp(r"Instance of '(.*)'").firstMatch(s);
   Expect.isNotNull(m);
-  var name = m.group(1);
+  var name = m!.group(1);
   Expect.isTrue(
-      expectedName == name || name.length <= 3 || name.startsWith('minified:'),
+      expectedName == name ||
+          name!.length <= 3 ||
+          name!.startsWith('minified:'),
       "Is '$expectedName' or minified: '$name'");
 }
 
diff --git a/tests/dart2js/native/field_type_test.dart b/tests/dart2js/native/field_type_test.dart
index e488855..8135cd5 100644
--- a/tests/dart2js/native/field_type_test.dart
+++ b/tests/dart2js/native/field_type_test.dart
@@ -12,11 +12,11 @@
 class Node {
   Node get parentNode native;
 
-  ModelSource _modelSource; // If null, inherited from parent.
+  ModelSource? _modelSource; // If null, inherited from parent.
 
-  ModelSource get modelSource {
+  ModelSource? get modelSource {
     for (Node node = this; node != null; node = node.parentNode) {
-      ModelSource source = node._modelSource;
+      ModelSource? source = node._modelSource;
       if (source != null) return source;
     }
     return null;
@@ -24,11 +24,11 @@
 
   // Copy of above code renamed with suffix '2'.
 
-  ModelSource _modelSource2; // If null, inherited from parent.
+  ModelSource? _modelSource2; // If null, inherited from parent.
 
-  ModelSource get modelSource2 {
+  ModelSource? get modelSource2 {
     for (Node node = this; node != null; node = node.parentNode) {
-      ModelSource source = node._modelSource2;
+      ModelSource? source = node._modelSource2;
       if (source != null) return source;
     }
     return null;
diff --git a/tests/dart2js/native/load_elim_refinement_test.dart b/tests/dart2js/native/load_elim_refinement_test.dart
index ee9dfee..4ec6adc 100644
--- a/tests/dart2js/native/load_elim_refinement_test.dart
+++ b/tests/dart2js/native/load_elim_refinement_test.dart
@@ -5,11 +5,11 @@
 import 'native_testing.dart';
 
 class A {
-  int a;
+  int? a;
 }
 
 class B extends A {
-  int b;
+  int? b;
 }
 
 @pragma('dart2js:noInline')
diff --git a/tests/dart2js/native/native_checked_fields_frog_test.dart b/tests/dart2js/native/native_checked_fields_frog_test.dart
index f9fdece..76d8902 100644
--- a/tests/dart2js/native/native_checked_fields_frog_test.dart
+++ b/tests/dart2js/native/native_checked_fields_frog_test.dart
@@ -4,16 +4,18 @@
 
 import 'native_testing.dart';
 
-// Test that type checks occur on assignment to fields of native methods.
+// Test that type checks occur on assignment to properties of native classes.
 
 @Native("A")
 class A {
-  int foo;
+  void set foo(int unused) native;
+  int get foo native;
 }
 
 @Native("B")
 class B {
-  String foo;
+  void set foo(String unused) native;
+  String get foo native;
 }
 
 A makeA() native;
@@ -79,7 +81,7 @@
   var a = stuff[0];
   // Detect whether we are using --omit-implicit-checks.
   try {
-    String s = a;
+    String s = a as dynamic;
     return false;
   } catch (e) {
     // Ignore.
diff --git a/tests/dart2js/native/native_class_fields_2_test.dart b/tests/dart2js/native/native_class_fields_2_test.dart
index 3b3d265..6529946 100644
--- a/tests/dart2js/native/native_class_fields_2_test.dart
+++ b/tests/dart2js/native/native_class_fields_2_test.dart
@@ -8,10 +8,14 @@
 // that are known from the DOM (like x, y, z).
 @Native("A")
 class A {
-  int x;
-  int y;
-  int z;
-  int gettersCalled;
+  void set x(int unused) native;
+  int get x native;
+  void set y(int unused) native;
+  int get y native;
+  void set z(int unused) native;
+  int get z native;
+  void set gettersCalled(int unused) native;
+  int get gettersCalled native;
 }
 
 void setup() {
diff --git a/tests/dart2js/native/native_class_fields_3_test.dart b/tests/dart2js/native/native_class_fields_3_test.dart
index 4812292..dd2824d 100644
--- a/tests/dart2js/native/native_class_fields_3_test.dart
+++ b/tests/dart2js/native/native_class_fields_3_test.dart
@@ -14,14 +14,22 @@
 // getters too if they have a property that has the same name.
 @Native("A")
 class A {
-  int bar;
-  int g;
-  int s;
-  int end;
-  int gend;
-  int send;
-  int gettersCalled;
-  int settersCalled;
+  void set bar(int unused) native;
+  int get bar native;
+  void set g(int unused) native;
+  int get g native;
+  void set s(int unused) native;
+  int get s native;
+  void set end(int unused) native;
+  int get end native;
+  void set gend(int unused) native;
+  int get gend native;
+  void set send(int unused) native;
+  int get send native;
+  void set gettersCalled(int unused) native;
+  int get gettersCalled native;
+  void set settersCalled(int unused) native;
+  int get settersCalled native;
 }
 
 void setup() {
diff --git a/tests/dart2js/native/native_class_fields_test.dart b/tests/dart2js/native/native_class_fields_test.dart
index e37adbe..64122ac 100644
--- a/tests/dart2js/native/native_class_fields_test.dart
+++ b/tests/dart2js/native/native_class_fields_test.dart
@@ -7,8 +7,10 @@
 // Verify that native fields on classes are not renamed by the minifier.
 @Native("A")
 class A {
-  int myLongPropertyName;
-  int getValue;
+  void set myLongPropertyName(int unused) native;
+  int get myLongPropertyName native;
+  void set getValue(int unused) native;
+  int get getValue native;
 
   int method(int z) => myLongPropertyName;
 }
diff --git a/tests/dart2js/native/native_exceptions1_frog_test.dart b/tests/dart2js/native/native_exceptions1_frog_test.dart
index fbef012..b9957e8 100644
--- a/tests/dart2js/native/native_exceptions1_frog_test.dart
+++ b/tests/dart2js/native/native_exceptions1_frog_test.dart
@@ -87,8 +87,8 @@
     var x = a.op(51);
   } catch (e) {
     threw = true;
-    Expect.equals(100, e.code);
     Expect.isTrue(e is E);
+    Expect.equals(100, (e as E).code);
   }
   Expect.isTrue(threw);
 
diff --git a/tests/dart2js/native/native_field_name_test.dart b/tests/dart2js/native/native_field_name_test.dart
index 66e25ac..89f401f 100644
--- a/tests/dart2js/native/native_field_name_test.dart
+++ b/tests/dart2js/native/native_field_name_test.dart
@@ -8,8 +8,10 @@
 
 @Native("A")
 class A {
-  int myLongPropertyName;
-  int getValue;
+  void set myLongPropertyName(int unused) native;
+  int get myLongPropertyName native;
+  void set getValue(int unused) native;
+  int get getValue native;
 
   int method(int z) => myLongPropertyName;
 }
diff --git a/tests/dart2js/native/native_field_rename_1_frog_test.dart b/tests/dart2js/native/native_field_rename_1_frog_test.dart
index 5fd6602..27b4710 100644
--- a/tests/dart2js/native/native_field_rename_1_frog_test.dart
+++ b/tests/dart2js/native/native_field_rename_1_frog_test.dart
@@ -10,7 +10,9 @@
 
 @Native("A")
 class A {
-  int key; //  jsname is 'key'
+  //  jsname is 'key'
+  void set key(int unused) native;
+  int get key native;
   int getKey() => key;
 }
 
diff --git a/tests/dart2js/native/native_field_rename_2_frog_test.dart b/tests/dart2js/native/native_field_rename_2_frog_test.dart
index 2c44d54..93fce23 100644
--- a/tests/dart2js/native/native_field_rename_2_frog_test.dart
+++ b/tests/dart2js/native/native_field_rename_2_frog_test.dart
@@ -9,19 +9,21 @@
 import 'native_testing.dart';
 
 abstract class I {
-  int key;
+  int? key;
 }
 
 @Native("A")
 class A implements I {
-  int key; //  jsname is 'key'
-  int getKey() => key;
+  //  jsname is 'key'
+  void set key(int? unused) native;
+  int? get key native;
+  int? getKey() => key;
 }
 
 class B implements I {
-  int key; //  jsname is not 'key'
+  int? key; //  jsname is not 'key'
   B([this.key = 222]);
-  int getKey() => key;
+  int? getKey() => key;
 }
 
 @Native("X")
@@ -72,8 +74,8 @@
 
 testPartial() {
   var things = [makeA(), new B(), makeX()];
-  I a = things[0];
-  I b = things[1];
+  I a = things[0] as I;
+  I b = things[1] as I;
 
   // All subtypes of I have a field 'key'. The compiler might be tempted to
   // generate a direct property access, but that will fail since one of the
diff --git a/tests/dart2js/native/native_null_closure_frog_test.dart b/tests/dart2js/native/native_null_closure_frog_test.dart
index 1768cac..f5fd85e 100644
--- a/tests/dart2js/native/native_null_closure_frog_test.dart
+++ b/tests/dart2js/native/native_null_closure_frog_test.dart
@@ -10,8 +10,8 @@
 
 @Native("A")
 class A {
-  setClosure(MyFunctionType f) native;
-  check(MyFunctionType f) native;
+  setClosure(MyFunctionType? f) native;
+  check(MyFunctionType? f) native;
   invoke() native;
 }
 
diff --git a/tests/dart2js/native/native_test.dart b/tests/dart2js/native/native_test.dart
index 0eb52d6..21c2bab 100644
--- a/tests/dart2js/native/native_test.dart
+++ b/tests/dart2js/native/native_test.dart
@@ -32,7 +32,7 @@
 
 class Class {
   Class.generative();
-  factory Class.fact() => null;
+  factory Class.fact() => null as dynamic;
 
   // NON_NATIVE_EXTERNAL               //# 08: compile-time error
   external Class.externalGenerative(); //# 08: continued
@@ -92,7 +92,7 @@
 class NativeClass {
   NativeClass.generative();
 
-  factory NativeClass.fact() => null;
+  factory NativeClass.fact() => null as dynamic;
 
   // NON_NATIVE_EXTERNAL                     //# 31: compile-time error
   external NativeClass.externalGenerative(); //# 31: continued
diff --git a/tests/dart2js/native/oddly_named_fields_test.dart b/tests/dart2js/native/oddly_named_fields_test.dart
index 54d9bd4..7a93c95 100644
--- a/tests/dart2js/native/oddly_named_fields_test.dart
+++ b/tests/dart2js/native/oddly_named_fields_test.dart
@@ -64,710 +64,710 @@
 @Native("NativeClassWithOddNames")
 class NativeClassWithOddNames {
   @JSName('break')
-  bool breakValue;
+  bool? breakValue;
   @JSName('case')
-  bool caseValue;
+  bool? caseValue;
   @JSName('catch')
-  bool catchValue;
+  bool? catchValue;
   @JSName('class')
-  bool classValue;
+  bool? classValue;
   @JSName('const')
-  bool constValue;
+  bool? constValue;
   @JSName('continue')
-  bool continueValue;
+  bool? continueValue;
   @JSName('debugger')
-  bool debuggerValue;
+  bool? debuggerValue;
   @JSName('default')
-  bool defaultValue;
+  bool? defaultValue;
   @JSName('delete')
-  bool deleteValue;
+  bool? deleteValue;
   @JSName('do')
-  bool doValue;
+  bool? doValue;
   @JSName('else')
-  bool elseValue;
+  bool? elseValue;
   @JSName('enum')
-  bool enumValue;
+  bool? enumValue;
   @JSName('export')
-  bool exportValue;
+  bool? exportValue;
   @JSName('extends')
-  bool extendsValue;
+  bool? extendsValue;
   @JSName('false')
-  bool falseValue;
+  bool? falseValue;
   @JSName('finally')
-  bool finallyValue;
+  bool? finallyValue;
   @JSName('for')
-  bool forValue;
+  bool? forValue;
   @JSName('function')
-  bool functionValue;
+  bool? functionValue;
   @JSName('if')
-  bool ifValue;
+  bool? ifValue;
   @JSName('implements')
-  bool implementsValue;
+  bool? implementsValue;
   @JSName('import')
-  bool importValue;
+  bool? importValue;
   @JSName('in')
-  bool inValue;
+  bool? inValue;
   @JSName('instanceof')
-  bool instanceofValue;
+  bool? instanceofValue;
   @JSName('interface')
-  bool interfaceValue;
+  bool? interfaceValue;
   @JSName('let')
-  bool letValue;
+  bool? letValue;
   @JSName('new')
-  bool newValue;
+  bool? newValue;
   @JSName('null')
-  bool nullValue;
+  bool? nullValue;
   @JSName('package')
-  bool packageValue;
+  bool? packageValue;
   @JSName('private')
-  bool privateValue;
+  bool? privateValue;
   @JSName('protected')
-  bool protectedValue;
+  bool? protectedValue;
   @JSName('public')
-  bool publicValue;
+  bool? publicValue;
   @JSName('return')
-  bool returnValue;
+  bool? returnValue;
   @JSName('static')
-  bool staticValue;
+  bool? staticValue;
   @JSName('super')
-  bool superValue;
+  bool? superValue;
   @JSName('switch')
-  bool switchValue;
+  bool? switchValue;
   @JSName('this')
-  bool thisValue;
+  bool? thisValue;
   @JSName('throw')
-  bool throwValue;
+  bool? throwValue;
   @JSName('true')
-  bool trueValue;
+  bool? trueValue;
   @JSName('try')
-  bool tryValue;
+  bool? tryValue;
   @JSName('typeof')
-  bool typeofValue;
+  bool? typeofValue;
   @JSName('var')
-  bool varValue;
+  bool? varValue;
   @JSName('void')
-  bool voidValue;
+  bool? voidValue;
   @JSName('while')
-  bool whileValue;
+  bool? whileValue;
   @JSName('with')
-  bool withValue;
+  bool? withValue;
   @JSName('yield')
-  bool yieldValue;
+  bool? yieldValue;
 
   void testMyFields() {
     if (breakValue != null) throw 'incorrect initialization of "breakValue"';
     breakValue = true;
-    if (!breakValue) throw 'incorrect value in "breakValue"';
+    if (!breakValue!) throw 'incorrect value in "breakValue"';
     breakValue = false;
-    if (breakValue) throw 'incorrect value in "breakValue"';
+    if (breakValue!) throw 'incorrect value in "breakValue"';
 
     if (caseValue != null) throw 'incorrect initialization of "caseValue"';
     caseValue = true;
-    if (!caseValue) throw 'incorrect value in "caseValue"';
+    if (!caseValue!) throw 'incorrect value in "caseValue"';
     caseValue = false;
-    if (caseValue) throw 'incorrect value in "caseValue"';
+    if (caseValue!) throw 'incorrect value in "caseValue"';
 
     if (catchValue != null) throw 'incorrect initialization of "catchValue"';
     catchValue = true;
-    if (!catchValue) throw 'incorrect value in "catchValue"';
+    if (!catchValue!) throw 'incorrect value in "catchValue"';
     catchValue = false;
-    if (catchValue) throw 'incorrect value in "catchValue"';
+    if (catchValue!) throw 'incorrect value in "catchValue"';
 
     if (classValue != null) throw 'incorrect initialization of "classValue"';
     classValue = true;
-    if (!classValue) throw 'incorrect value in "classValue"';
+    if (!classValue!) throw 'incorrect value in "classValue"';
     classValue = false;
-    if (classValue) throw 'incorrect value in "classValue"';
+    if (classValue!) throw 'incorrect value in "classValue"';
 
     if (constValue != null) throw 'incorrect initialization of "constValue"';
     constValue = true;
-    if (!constValue) throw 'incorrect value in "constValue"';
+    if (!constValue!) throw 'incorrect value in "constValue"';
     constValue = false;
-    if (constValue) throw 'incorrect value in "constValue"';
+    if (constValue!) throw 'incorrect value in "constValue"';
 
     if (continueValue != null)
       throw 'incorrect initialization of "continueValue"';
     continueValue = true;
-    if (!continueValue) throw 'incorrect value in "continueValue"';
+    if (!continueValue!) throw 'incorrect value in "continueValue"';
     continueValue = false;
-    if (continueValue) throw 'incorrect value in "continueValue"';
+    if (continueValue!) throw 'incorrect value in "continueValue"';
 
     if (debuggerValue != null)
       throw 'incorrect initialization of "debuggerValue"';
     debuggerValue = true;
-    if (!debuggerValue) throw 'incorrect value in "debuggerValue"';
+    if (!debuggerValue!) throw 'incorrect value in "debuggerValue"';
     debuggerValue = false;
-    if (debuggerValue) throw 'incorrect value in "debuggerValue"';
+    if (debuggerValue!) throw 'incorrect value in "debuggerValue"';
 
     if (defaultValue != null)
       throw 'incorrect initialization of "defaultValue"';
     defaultValue = true;
-    if (!defaultValue) throw 'incorrect value in "defaultValue"';
+    if (!defaultValue!) throw 'incorrect value in "defaultValue"';
     defaultValue = false;
-    if (defaultValue) throw 'incorrect value in "defaultValue"';
+    if (defaultValue!) throw 'incorrect value in "defaultValue"';
 
     if (deleteValue != null) throw 'incorrect initialization of "deleteValue"';
     deleteValue = true;
-    if (!deleteValue) throw 'incorrect value in "deleteValue"';
+    if (!deleteValue!) throw 'incorrect value in "deleteValue"';
     deleteValue = false;
-    if (deleteValue) throw 'incorrect value in "deleteValue"';
+    if (deleteValue!) throw 'incorrect value in "deleteValue"';
 
     if (doValue != null) throw 'incorrect initialization of "doValue"';
     doValue = true;
-    if (!doValue) throw 'incorrect value in "doValue"';
+    if (!doValue!) throw 'incorrect value in "doValue"';
     doValue = false;
-    if (doValue) throw 'incorrect value in "doValue"';
+    if (doValue!) throw 'incorrect value in "doValue"';
 
     if (elseValue != null) throw 'incorrect initialization of "elseValue"';
     elseValue = true;
-    if (!elseValue) throw 'incorrect value in "elseValue"';
+    if (!elseValue!) throw 'incorrect value in "elseValue"';
     elseValue = false;
-    if (elseValue) throw 'incorrect value in "elseValue"';
+    if (elseValue!) throw 'incorrect value in "elseValue"';
 
     if (enumValue != null) throw 'incorrect initialization of "enumValue"';
     enumValue = true;
-    if (!enumValue) throw 'incorrect value in "enumValue"';
+    if (!enumValue!) throw 'incorrect value in "enumValue"';
     enumValue = false;
-    if (enumValue) throw 'incorrect value in "enumValue"';
+    if (enumValue!) throw 'incorrect value in "enumValue"';
 
     if (exportValue != null) throw 'incorrect initialization of "exportValue"';
     exportValue = true;
-    if (!exportValue) throw 'incorrect value in "exportValue"';
+    if (!exportValue!) throw 'incorrect value in "exportValue"';
     exportValue = false;
-    if (exportValue) throw 'incorrect value in "exportValue"';
+    if (exportValue!) throw 'incorrect value in "exportValue"';
 
     if (extendsValue != null)
       throw 'incorrect initialization of "extendsValue"';
     extendsValue = true;
-    if (!extendsValue) throw 'incorrect value in "extendsValue"';
+    if (!extendsValue!) throw 'incorrect value in "extendsValue"';
     extendsValue = false;
-    if (extendsValue) throw 'incorrect value in "extendsValue"';
+    if (extendsValue!) throw 'incorrect value in "extendsValue"';
 
     if (falseValue != null) throw 'incorrect initialization of "falseValue"';
     falseValue = true;
-    if (!falseValue) throw 'incorrect value in "falseValue"';
+    if (!falseValue!) throw 'incorrect value in "falseValue"';
     falseValue = false;
-    if (falseValue) throw 'incorrect value in "falseValue"';
+    if (falseValue!) throw 'incorrect value in "falseValue"';
 
     if (finallyValue != null)
       throw 'incorrect initialization of "finallyValue"';
     finallyValue = true;
-    if (!finallyValue) throw 'incorrect value in "finallyValue"';
+    if (!finallyValue!) throw 'incorrect value in "finallyValue"';
     finallyValue = false;
-    if (finallyValue) throw 'incorrect value in "finallyValue"';
+    if (finallyValue!) throw 'incorrect value in "finallyValue"';
 
     if (forValue != null) throw 'incorrect initialization of "forValue"';
     forValue = true;
-    if (!forValue) throw 'incorrect value in "forValue"';
+    if (!forValue!) throw 'incorrect value in "forValue"';
     forValue = false;
-    if (forValue) throw 'incorrect value in "forValue"';
+    if (forValue!) throw 'incorrect value in "forValue"';
 
     if (functionValue != null)
       throw 'incorrect initialization of "functionValue"';
     functionValue = true;
-    if (!functionValue) throw 'incorrect value in "functionValue"';
+    if (!functionValue!) throw 'incorrect value in "functionValue"';
     functionValue = false;
-    if (functionValue) throw 'incorrect value in "functionValue"';
+    if (functionValue!) throw 'incorrect value in "functionValue"';
 
     if (ifValue != null) throw 'incorrect initialization of "ifValue"';
     ifValue = true;
-    if (!ifValue) throw 'incorrect value in "ifValue"';
+    if (!ifValue!) throw 'incorrect value in "ifValue"';
     ifValue = false;
-    if (ifValue) throw 'incorrect value in "ifValue"';
+    if (ifValue!) throw 'incorrect value in "ifValue"';
 
     if (implementsValue != null)
       throw 'incorrect initialization of "implementsValue"';
     implementsValue = true;
-    if (!implementsValue) throw 'incorrect value in "implementsValue"';
+    if (!implementsValue!) throw 'incorrect value in "implementsValue"';
     implementsValue = false;
-    if (implementsValue) throw 'incorrect value in "implementsValue"';
+    if (implementsValue!) throw 'incorrect value in "implementsValue"';
 
     if (importValue != null) throw 'incorrect initialization of "importValue"';
     importValue = true;
-    if (!importValue) throw 'incorrect value in "importValue"';
+    if (!importValue!) throw 'incorrect value in "importValue"';
     importValue = false;
-    if (importValue) throw 'incorrect value in "importValue"';
+    if (importValue!) throw 'incorrect value in "importValue"';
 
     if (inValue != null) throw 'incorrect initialization of "inValue"';
     inValue = true;
-    if (!inValue) throw 'incorrect value in "inValue"';
+    if (!inValue!) throw 'incorrect value in "inValue"';
     inValue = false;
-    if (inValue) throw 'incorrect value in "inValue"';
+    if (inValue!) throw 'incorrect value in "inValue"';
 
     if (instanceofValue != null)
       throw 'incorrect initialization of "instanceofValue"';
     instanceofValue = true;
-    if (!instanceofValue) throw 'incorrect value in "instanceofValue"';
+    if (!instanceofValue!) throw 'incorrect value in "instanceofValue"';
     instanceofValue = false;
-    if (instanceofValue) throw 'incorrect value in "instanceofValue"';
+    if (instanceofValue!) throw 'incorrect value in "instanceofValue"';
 
     if (interfaceValue != null)
       throw 'incorrect initialization of "interfaceValue"';
     interfaceValue = true;
-    if (!interfaceValue) throw 'incorrect value in "interfaceValue"';
+    if (!interfaceValue!) throw 'incorrect value in "interfaceValue"';
     interfaceValue = false;
-    if (interfaceValue) throw 'incorrect value in "interfaceValue"';
+    if (interfaceValue!) throw 'incorrect value in "interfaceValue"';
 
     if (letValue != null) throw 'incorrect initialization of "letValue"';
     letValue = true;
-    if (!letValue) throw 'incorrect value in "letValue"';
+    if (!letValue!) throw 'incorrect value in "letValue"';
     letValue = false;
-    if (letValue) throw 'incorrect value in "letValue"';
+    if (letValue!) throw 'incorrect value in "letValue"';
 
     if (newValue != null) throw 'incorrect initialization of "newValue"';
     newValue = true;
-    if (!newValue) throw 'incorrect value in "newValue"';
+    if (!newValue!) throw 'incorrect value in "newValue"';
     newValue = false;
-    if (newValue) throw 'incorrect value in "newValue"';
+    if (newValue!) throw 'incorrect value in "newValue"';
 
     if (nullValue != null) throw 'incorrect initialization of "nullValue"';
     nullValue = true;
-    if (!nullValue) throw 'incorrect value in "nullValue"';
+    if (!nullValue!) throw 'incorrect value in "nullValue"';
     nullValue = false;
-    if (nullValue) throw 'incorrect value in "nullValue"';
+    if (nullValue!) throw 'incorrect value in "nullValue"';
 
     if (packageValue != null)
       throw 'incorrect initialization of "packageValue"';
     packageValue = true;
-    if (!packageValue) throw 'incorrect value in "packageValue"';
+    if (!packageValue!) throw 'incorrect value in "packageValue"';
     packageValue = false;
-    if (packageValue) throw 'incorrect value in "packageValue"';
+    if (packageValue!) throw 'incorrect value in "packageValue"';
 
     if (privateValue != null)
       throw 'incorrect initialization of "privateValue"';
     privateValue = true;
-    if (!privateValue) throw 'incorrect value in "privateValue"';
+    if (!privateValue!) throw 'incorrect value in "privateValue"';
     privateValue = false;
-    if (privateValue) throw 'incorrect value in "privateValue"';
+    if (privateValue!) throw 'incorrect value in "privateValue"';
 
     if (protectedValue != null)
       throw 'incorrect initialization of "protectedValue"';
     protectedValue = true;
-    if (!protectedValue) throw 'incorrect value in "protectedValue"';
+    if (!protectedValue!) throw 'incorrect value in "protectedValue"';
     protectedValue = false;
-    if (protectedValue) throw 'incorrect value in "protectedValue"';
+    if (protectedValue!) throw 'incorrect value in "protectedValue"';
 
     if (publicValue != null) throw 'incorrect initialization of "publicValue"';
     publicValue = true;
-    if (!publicValue) throw 'incorrect value in "publicValue"';
+    if (!publicValue!) throw 'incorrect value in "publicValue"';
     publicValue = false;
-    if (publicValue) throw 'incorrect value in "publicValue"';
+    if (publicValue!) throw 'incorrect value in "publicValue"';
 
     if (returnValue != null) throw 'incorrect initialization of "returnValue"';
     returnValue = true;
-    if (!returnValue) throw 'incorrect value in "returnValue"';
+    if (!returnValue!) throw 'incorrect value in "returnValue"';
     returnValue = false;
-    if (returnValue) throw 'incorrect value in "returnValue"';
+    if (returnValue!) throw 'incorrect value in "returnValue"';
 
     if (staticValue != null) throw 'incorrect initialization of "staticValue"';
     staticValue = true;
-    if (!staticValue) throw 'incorrect value in "staticValue"';
+    if (!staticValue!) throw 'incorrect value in "staticValue"';
     staticValue = false;
-    if (staticValue) throw 'incorrect value in "staticValue"';
+    if (staticValue!) throw 'incorrect value in "staticValue"';
 
     if (superValue != null) throw 'incorrect initialization of "superValue"';
     superValue = true;
-    if (!superValue) throw 'incorrect value in "superValue"';
+    if (!superValue!) throw 'incorrect value in "superValue"';
     superValue = false;
-    if (superValue) throw 'incorrect value in "superValue"';
+    if (superValue!) throw 'incorrect value in "superValue"';
 
     if (switchValue != null) throw 'incorrect initialization of "switchValue"';
     switchValue = true;
-    if (!switchValue) throw 'incorrect value in "switchValue"';
+    if (!switchValue!) throw 'incorrect value in "switchValue"';
     switchValue = false;
-    if (switchValue) throw 'incorrect value in "switchValue"';
+    if (switchValue!) throw 'incorrect value in "switchValue"';
 
     if (thisValue != null) throw 'incorrect initialization of "thisValue"';
     thisValue = true;
-    if (!thisValue) throw 'incorrect value in "thisValue"';
+    if (!thisValue!) throw 'incorrect value in "thisValue"';
     thisValue = false;
-    if (thisValue) throw 'incorrect value in "thisValue"';
+    if (thisValue!) throw 'incorrect value in "thisValue"';
 
     if (throwValue != null) throw 'incorrect initialization of "throwValue"';
     throwValue = true;
-    if (!throwValue) throw 'incorrect value in "throwValue"';
+    if (!throwValue!) throw 'incorrect value in "throwValue"';
     throwValue = false;
-    if (throwValue) throw 'incorrect value in "throwValue"';
+    if (throwValue!) throw 'incorrect value in "throwValue"';
 
     if (trueValue != null) throw 'incorrect initialization of "trueValue"';
     trueValue = true;
-    if (!trueValue) throw 'incorrect value in "trueValue"';
+    if (!trueValue!) throw 'incorrect value in "trueValue"';
     trueValue = false;
-    if (trueValue) throw 'incorrect value in "trueValue"';
+    if (trueValue!) throw 'incorrect value in "trueValue"';
 
     if (tryValue != null) throw 'incorrect initialization of "tryValue"';
     tryValue = true;
-    if (!tryValue) throw 'incorrect value in "tryValue"';
+    if (!tryValue!) throw 'incorrect value in "tryValue"';
     tryValue = false;
-    if (tryValue) throw 'incorrect value in "tryValue"';
+    if (tryValue!) throw 'incorrect value in "tryValue"';
 
     if (typeofValue != null) throw 'incorrect initialization of "typeofValue"';
     typeofValue = true;
-    if (!typeofValue) throw 'incorrect value in "typeofValue"';
+    if (!typeofValue!) throw 'incorrect value in "typeofValue"';
     typeofValue = false;
-    if (typeofValue) throw 'incorrect value in "typeofValue"';
+    if (typeofValue!) throw 'incorrect value in "typeofValue"';
 
     if (varValue != null) throw 'incorrect initialization of "varValue"';
     varValue = true;
-    if (!varValue) throw 'incorrect value in "varValue"';
+    if (!varValue!) throw 'incorrect value in "varValue"';
     varValue = false;
-    if (varValue) throw 'incorrect value in "varValue"';
+    if (varValue!) throw 'incorrect value in "varValue"';
 
     if (voidValue != null) throw 'incorrect initialization of "voidValue"';
     voidValue = true;
-    if (!voidValue) throw 'incorrect value in "voidValue"';
+    if (!voidValue!) throw 'incorrect value in "voidValue"';
     voidValue = false;
-    if (voidValue) throw 'incorrect value in "voidValue"';
+    if (voidValue!) throw 'incorrect value in "voidValue"';
 
     if (whileValue != null) throw 'incorrect initialization of "whileValue"';
     whileValue = true;
-    if (!whileValue) throw 'incorrect value in "whileValue"';
+    if (!whileValue!) throw 'incorrect value in "whileValue"';
     whileValue = false;
-    if (whileValue) throw 'incorrect value in "whileValue"';
+    if (whileValue!) throw 'incorrect value in "whileValue"';
 
     if (withValue != null) throw 'incorrect initialization of "withValue"';
     withValue = true;
-    if (!withValue) throw 'incorrect value in "withValue"';
+    if (!withValue!) throw 'incorrect value in "withValue"';
     withValue = false;
-    if (withValue) throw 'incorrect value in "withValue"';
+    if (withValue!) throw 'incorrect value in "withValue"';
 
     if (yieldValue != null) throw 'incorrect initialization of "yieldValue"';
     yieldValue = true;
-    if (!yieldValue) throw 'incorrect value in "yieldValue"';
+    if (!yieldValue!) throw 'incorrect value in "yieldValue"';
     yieldValue = false;
-    if (yieldValue) throw 'incorrect value in "yieldValue"';
+    if (yieldValue!) throw 'incorrect value in "yieldValue"';
   }
 }
 
 class ClassWithOddNames {
-  bool breakValue;
-  bool caseValue;
-  bool catchValue;
-  bool classValue;
-  bool constValue;
-  bool continueValue;
-  bool debuggerValue;
-  bool defaultValue;
-  bool deleteValue;
-  bool doValue;
-  bool elseValue;
-  bool enumValue;
-  bool exportValue;
-  bool extendsValue;
-  bool falseValue;
-  bool finallyValue;
-  bool forValue;
-  bool functionValue;
-  bool ifValue;
-  bool implementsValue;
-  bool importValue;
-  bool inValue;
-  bool instanceofValue;
-  bool interfaceValue;
-  bool letValue;
-  bool newValue;
-  bool nullValue;
-  bool packageValue;
-  bool privateValue;
-  bool protectedValue;
-  bool publicValue;
-  bool returnValue;
-  bool staticValue;
-  bool superValue;
-  bool switchValue;
-  bool thisValue;
-  bool throwValue;
-  bool trueValue;
-  bool tryValue;
-  bool typeofValue;
-  bool varValue;
-  bool voidValue;
-  bool whileValue;
-  bool withValue;
-  bool yieldValue;
+  bool? breakValue;
+  bool? caseValue;
+  bool? catchValue;
+  bool? classValue;
+  bool? constValue;
+  bool? continueValue;
+  bool? debuggerValue;
+  bool? defaultValue;
+  bool? deleteValue;
+  bool? doValue;
+  bool? elseValue;
+  bool? enumValue;
+  bool? exportValue;
+  bool? extendsValue;
+  bool? falseValue;
+  bool? finallyValue;
+  bool? forValue;
+  bool? functionValue;
+  bool? ifValue;
+  bool? implementsValue;
+  bool? importValue;
+  bool? inValue;
+  bool? instanceofValue;
+  bool? interfaceValue;
+  bool? letValue;
+  bool? newValue;
+  bool? nullValue;
+  bool? packageValue;
+  bool? privateValue;
+  bool? protectedValue;
+  bool? publicValue;
+  bool? returnValue;
+  bool? staticValue;
+  bool? superValue;
+  bool? switchValue;
+  bool? thisValue;
+  bool? throwValue;
+  bool? trueValue;
+  bool? tryValue;
+  bool? typeofValue;
+  bool? varValue;
+  bool? voidValue;
+  bool? whileValue;
+  bool? withValue;
+  bool? yieldValue;
 
   void testMyFields() {
     if (breakValue != null) throw 'incorrect initialization of "breakValue"';
     breakValue = true;
-    if (!breakValue) throw 'incorrect value in "breakValue"';
+    if (!breakValue!) throw 'incorrect value in "breakValue"';
     breakValue = false;
-    if (breakValue) throw 'incorrect value in "breakValue"';
+    if (breakValue!) throw 'incorrect value in "breakValue"';
 
     if (caseValue != null) throw 'incorrect initialization of "caseValue"';
     caseValue = true;
-    if (!caseValue) throw 'incorrect value in "caseValue"';
+    if (!caseValue!) throw 'incorrect value in "caseValue"';
     caseValue = false;
-    if (caseValue) throw 'incorrect value in "caseValue"';
+    if (caseValue!) throw 'incorrect value in "caseValue"';
 
     if (catchValue != null) throw 'incorrect initialization of "catchValue"';
     catchValue = true;
-    if (!catchValue) throw 'incorrect value in "catchValue"';
+    if (!catchValue!) throw 'incorrect value in "catchValue"';
     catchValue = false;
-    if (catchValue) throw 'incorrect value in "catchValue"';
+    if (catchValue!) throw 'incorrect value in "catchValue"';
 
     if (classValue != null) throw 'incorrect initialization of "classValue"';
     classValue = true;
-    if (!classValue) throw 'incorrect value in "classValue"';
+    if (!classValue!) throw 'incorrect value in "classValue"';
     classValue = false;
-    if (classValue) throw 'incorrect value in "classValue"';
+    if (classValue!) throw 'incorrect value in "classValue"';
 
     if (constValue != null) throw 'incorrect initialization of "constValue"';
     constValue = true;
-    if (!constValue) throw 'incorrect value in "constValue"';
+    if (!constValue!) throw 'incorrect value in "constValue"';
     constValue = false;
-    if (constValue) throw 'incorrect value in "constValue"';
+    if (constValue!) throw 'incorrect value in "constValue"';
 
     if (continueValue != null)
       throw 'incorrect initialization of "continueValue"';
     continueValue = true;
-    if (!continueValue) throw 'incorrect value in "continueValue"';
+    if (!continueValue!) throw 'incorrect value in "continueValue"';
     continueValue = false;
-    if (continueValue) throw 'incorrect value in "continueValue"';
+    if (continueValue!) throw 'incorrect value in "continueValue"';
 
     if (debuggerValue != null)
       throw 'incorrect initialization of "debuggerValue"';
     debuggerValue = true;
-    if (!debuggerValue) throw 'incorrect value in "debuggerValue"';
+    if (!debuggerValue!) throw 'incorrect value in "debuggerValue"';
     debuggerValue = false;
-    if (debuggerValue) throw 'incorrect value in "debuggerValue"';
+    if (debuggerValue!) throw 'incorrect value in "debuggerValue"';
 
     if (defaultValue != null)
       throw 'incorrect initialization of "defaultValue"';
     defaultValue = true;
-    if (!defaultValue) throw 'incorrect value in "defaultValue"';
+    if (!defaultValue!) throw 'incorrect value in "defaultValue"';
     defaultValue = false;
-    if (defaultValue) throw 'incorrect value in "defaultValue"';
+    if (defaultValue!) throw 'incorrect value in "defaultValue"';
 
     if (deleteValue != null) throw 'incorrect initialization of "deleteValue"';
     deleteValue = true;
-    if (!deleteValue) throw 'incorrect value in "deleteValue"';
+    if (!deleteValue!) throw 'incorrect value in "deleteValue"';
     deleteValue = false;
-    if (deleteValue) throw 'incorrect value in "deleteValue"';
+    if (deleteValue!) throw 'incorrect value in "deleteValue"';
 
     if (doValue != null) throw 'incorrect initialization of "doValue"';
     doValue = true;
-    if (!doValue) throw 'incorrect value in "doValue"';
+    if (!doValue!) throw 'incorrect value in "doValue"';
     doValue = false;
-    if (doValue) throw 'incorrect value in "doValue"';
+    if (doValue!) throw 'incorrect value in "doValue"';
 
     if (elseValue != null) throw 'incorrect initialization of "elseValue"';
     elseValue = true;
-    if (!elseValue) throw 'incorrect value in "elseValue"';
+    if (!elseValue!) throw 'incorrect value in "elseValue"';
     elseValue = false;
-    if (elseValue) throw 'incorrect value in "elseValue"';
+    if (elseValue!) throw 'incorrect value in "elseValue"';
 
     if (enumValue != null) throw 'incorrect initialization of "enumValue"';
     enumValue = true;
-    if (!enumValue) throw 'incorrect value in "enumValue"';
+    if (!enumValue!) throw 'incorrect value in "enumValue"';
     enumValue = false;
-    if (enumValue) throw 'incorrect value in "enumValue"';
+    if (enumValue!) throw 'incorrect value in "enumValue"';
 
     if (exportValue != null) throw 'incorrect initialization of "exportValue"';
     exportValue = true;
-    if (!exportValue) throw 'incorrect value in "exportValue"';
+    if (!exportValue!) throw 'incorrect value in "exportValue"';
     exportValue = false;
-    if (exportValue) throw 'incorrect value in "exportValue"';
+    if (exportValue!) throw 'incorrect value in "exportValue"';
 
     if (extendsValue != null)
       throw 'incorrect initialization of "extendsValue"';
     extendsValue = true;
-    if (!extendsValue) throw 'incorrect value in "extendsValue"';
+    if (!extendsValue!) throw 'incorrect value in "extendsValue"';
     extendsValue = false;
-    if (extendsValue) throw 'incorrect value in "extendsValue"';
+    if (extendsValue!) throw 'incorrect value in "extendsValue"';
 
     if (falseValue != null) throw 'incorrect initialization of "falseValue"';
     falseValue = true;
-    if (!falseValue) throw 'incorrect value in "falseValue"';
+    if (!falseValue!) throw 'incorrect value in "falseValue"';
     falseValue = false;
-    if (falseValue) throw 'incorrect value in "falseValue"';
+    if (falseValue!) throw 'incorrect value in "falseValue"';
 
     if (finallyValue != null)
       throw 'incorrect initialization of "finallyValue"';
     finallyValue = true;
-    if (!finallyValue) throw 'incorrect value in "finallyValue"';
+    if (!finallyValue!) throw 'incorrect value in "finallyValue"';
     finallyValue = false;
-    if (finallyValue) throw 'incorrect value in "finallyValue"';
+    if (finallyValue!) throw 'incorrect value in "finallyValue"';
 
     if (forValue != null) throw 'incorrect initialization of "forValue"';
     forValue = true;
-    if (!forValue) throw 'incorrect value in "forValue"';
+    if (!forValue!) throw 'incorrect value in "forValue"';
     forValue = false;
-    if (forValue) throw 'incorrect value in "forValue"';
+    if (forValue!) throw 'incorrect value in "forValue"';
 
     if (functionValue != null)
       throw 'incorrect initialization of "functionValue"';
     functionValue = true;
-    if (!functionValue) throw 'incorrect value in "functionValue"';
+    if (!functionValue!) throw 'incorrect value in "functionValue"';
     functionValue = false;
-    if (functionValue) throw 'incorrect value in "functionValue"';
+    if (functionValue!) throw 'incorrect value in "functionValue"';
 
     if (ifValue != null) throw 'incorrect initialization of "ifValue"';
     ifValue = true;
-    if (!ifValue) throw 'incorrect value in "ifValue"';
+    if (!ifValue!) throw 'incorrect value in "ifValue"';
     ifValue = false;
-    if (ifValue) throw 'incorrect value in "ifValue"';
+    if (ifValue!) throw 'incorrect value in "ifValue"';
 
     if (implementsValue != null)
       throw 'incorrect initialization of "implementsValue"';
     implementsValue = true;
-    if (!implementsValue) throw 'incorrect value in "implementsValue"';
+    if (!implementsValue!) throw 'incorrect value in "implementsValue"';
     implementsValue = false;
-    if (implementsValue) throw 'incorrect value in "implementsValue"';
+    if (implementsValue!) throw 'incorrect value in "implementsValue"';
 
     if (importValue != null) throw 'incorrect initialization of "importValue"';
     importValue = true;
-    if (!importValue) throw 'incorrect value in "importValue"';
+    if (!importValue!) throw 'incorrect value in "importValue"';
     importValue = false;
-    if (importValue) throw 'incorrect value in "importValue"';
+    if (importValue!) throw 'incorrect value in "importValue"';
 
     if (inValue != null) throw 'incorrect initialization of "inValue"';
     inValue = true;
-    if (!inValue) throw 'incorrect value in "inValue"';
+    if (!inValue!) throw 'incorrect value in "inValue"';
     inValue = false;
-    if (inValue) throw 'incorrect value in "inValue"';
+    if (inValue!) throw 'incorrect value in "inValue"';
 
     if (instanceofValue != null)
       throw 'incorrect initialization of "instanceofValue"';
     instanceofValue = true;
-    if (!instanceofValue) throw 'incorrect value in "instanceofValue"';
+    if (!instanceofValue!) throw 'incorrect value in "instanceofValue"';
     instanceofValue = false;
-    if (instanceofValue) throw 'incorrect value in "instanceofValue"';
+    if (instanceofValue!) throw 'incorrect value in "instanceofValue"';
 
     if (interfaceValue != null)
       throw 'incorrect initialization of "interfaceValue"';
     interfaceValue = true;
-    if (!interfaceValue) throw 'incorrect value in "interfaceValue"';
+    if (!interfaceValue!) throw 'incorrect value in "interfaceValue"';
     interfaceValue = false;
-    if (interfaceValue) throw 'incorrect value in "interfaceValue"';
+    if (interfaceValue!) throw 'incorrect value in "interfaceValue"';
 
     if (letValue != null) throw 'incorrect initialization of "letValue"';
     letValue = true;
-    if (!letValue) throw 'incorrect value in "letValue"';
+    if (!letValue!) throw 'incorrect value in "letValue"';
     letValue = false;
-    if (letValue) throw 'incorrect value in "letValue"';
+    if (letValue!) throw 'incorrect value in "letValue"';
 
     if (newValue != null) throw 'incorrect initialization of "newValue"';
     newValue = true;
-    if (!newValue) throw 'incorrect value in "newValue"';
+    if (!newValue!) throw 'incorrect value in "newValue"';
     newValue = false;
-    if (newValue) throw 'incorrect value in "newValue"';
+    if (newValue!) throw 'incorrect value in "newValue"';
 
     if (nullValue != null) throw 'incorrect initialization of "nullValue"';
     nullValue = true;
-    if (!nullValue) throw 'incorrect value in "nullValue"';
+    if (!nullValue!) throw 'incorrect value in "nullValue"';
     nullValue = false;
-    if (nullValue) throw 'incorrect value in "nullValue"';
+    if (nullValue!) throw 'incorrect value in "nullValue"';
 
     if (packageValue != null)
       throw 'incorrect initialization of "packageValue"';
     packageValue = true;
-    if (!packageValue) throw 'incorrect value in "packageValue"';
+    if (!packageValue!) throw 'incorrect value in "packageValue"';
     packageValue = false;
-    if (packageValue) throw 'incorrect value in "packageValue"';
+    if (packageValue!) throw 'incorrect value in "packageValue"';
 
     if (privateValue != null)
       throw 'incorrect initialization of "privateValue"';
     privateValue = true;
-    if (!privateValue) throw 'incorrect value in "privateValue"';
+    if (!privateValue!) throw 'incorrect value in "privateValue"';
     privateValue = false;
-    if (privateValue) throw 'incorrect value in "privateValue"';
+    if (privateValue!) throw 'incorrect value in "privateValue"';
 
     if (protectedValue != null)
       throw 'incorrect initialization of "protectedValue"';
     protectedValue = true;
-    if (!protectedValue) throw 'incorrect value in "protectedValue"';
+    if (!protectedValue!) throw 'incorrect value in "protectedValue"';
     protectedValue = false;
-    if (protectedValue) throw 'incorrect value in "protectedValue"';
+    if (protectedValue!) throw 'incorrect value in "protectedValue"';
 
     if (publicValue != null) throw 'incorrect initialization of "publicValue"';
     publicValue = true;
-    if (!publicValue) throw 'incorrect value in "publicValue"';
+    if (!publicValue!) throw 'incorrect value in "publicValue"';
     publicValue = false;
-    if (publicValue) throw 'incorrect value in "publicValue"';
+    if (publicValue!) throw 'incorrect value in "publicValue"';
 
     if (returnValue != null) throw 'incorrect initialization of "returnValue"';
     returnValue = true;
-    if (!returnValue) throw 'incorrect value in "returnValue"';
+    if (!returnValue!) throw 'incorrect value in "returnValue"';
     returnValue = false;
-    if (returnValue) throw 'incorrect value in "returnValue"';
+    if (returnValue!) throw 'incorrect value in "returnValue"';
 
     if (staticValue != null) throw 'incorrect initialization of "staticValue"';
     staticValue = true;
-    if (!staticValue) throw 'incorrect value in "staticValue"';
+    if (!staticValue!) throw 'incorrect value in "staticValue"';
     staticValue = false;
-    if (staticValue) throw 'incorrect value in "staticValue"';
+    if (staticValue!) throw 'incorrect value in "staticValue"';
 
     if (superValue != null) throw 'incorrect initialization of "superValue"';
     superValue = true;
-    if (!superValue) throw 'incorrect value in "superValue"';
+    if (!superValue!) throw 'incorrect value in "superValue"';
     superValue = false;
-    if (superValue) throw 'incorrect value in "superValue"';
+    if (superValue!) throw 'incorrect value in "superValue"';
 
     if (switchValue != null) throw 'incorrect initialization of "switchValue"';
     switchValue = true;
-    if (!switchValue) throw 'incorrect value in "switchValue"';
+    if (!switchValue!) throw 'incorrect value in "switchValue"';
     switchValue = false;
-    if (switchValue) throw 'incorrect value in "switchValue"';
+    if (switchValue!) throw 'incorrect value in "switchValue"';
 
     if (thisValue != null) throw 'incorrect initialization of "thisValue"';
     thisValue = true;
-    if (!thisValue) throw 'incorrect value in "thisValue"';
+    if (!thisValue!) throw 'incorrect value in "thisValue"';
     thisValue = false;
-    if (thisValue) throw 'incorrect value in "thisValue"';
+    if (thisValue!) throw 'incorrect value in "thisValue"';
 
     if (throwValue != null) throw 'incorrect initialization of "throwValue"';
     throwValue = true;
-    if (!throwValue) throw 'incorrect value in "throwValue"';
+    if (!throwValue!) throw 'incorrect value in "throwValue"';
     throwValue = false;
-    if (throwValue) throw 'incorrect value in "throwValue"';
+    if (throwValue!) throw 'incorrect value in "throwValue"';
 
     if (trueValue != null) throw 'incorrect initialization of "trueValue"';
     trueValue = true;
-    if (!trueValue) throw 'incorrect value in "trueValue"';
+    if (!trueValue!) throw 'incorrect value in "trueValue"';
     trueValue = false;
-    if (trueValue) throw 'incorrect value in "trueValue"';
+    if (trueValue!) throw 'incorrect value in "trueValue"';
 
     if (tryValue != null) throw 'incorrect initialization of "tryValue"';
     tryValue = true;
-    if (!tryValue) throw 'incorrect value in "tryValue"';
+    if (!tryValue!) throw 'incorrect value in "tryValue"';
     tryValue = false;
-    if (tryValue) throw 'incorrect value in "tryValue"';
+    if (tryValue!) throw 'incorrect value in "tryValue"';
 
     if (typeofValue != null) throw 'incorrect initialization of "typeofValue"';
     typeofValue = true;
-    if (!typeofValue) throw 'incorrect value in "typeofValue"';
+    if (!typeofValue!) throw 'incorrect value in "typeofValue"';
     typeofValue = false;
-    if (typeofValue) throw 'incorrect value in "typeofValue"';
+    if (typeofValue!) throw 'incorrect value in "typeofValue"';
 
     if (varValue != null) throw 'incorrect initialization of "varValue"';
     varValue = true;
-    if (!varValue) throw 'incorrect value in "varValue"';
+    if (!varValue!) throw 'incorrect value in "varValue"';
     varValue = false;
-    if (varValue) throw 'incorrect value in "varValue"';
+    if (varValue!) throw 'incorrect value in "varValue"';
 
     if (voidValue != null) throw 'incorrect initialization of "voidValue"';
     voidValue = true;
-    if (!voidValue) throw 'incorrect value in "voidValue"';
+    if (!voidValue!) throw 'incorrect value in "voidValue"';
     voidValue = false;
-    if (voidValue) throw 'incorrect value in "voidValue"';
+    if (voidValue!) throw 'incorrect value in "voidValue"';
 
     if (whileValue != null) throw 'incorrect initialization of "whileValue"';
     whileValue = true;
-    if (!whileValue) throw 'incorrect value in "whileValue"';
+    if (!whileValue!) throw 'incorrect value in "whileValue"';
     whileValue = false;
-    if (whileValue) throw 'incorrect value in "whileValue"';
+    if (whileValue!) throw 'incorrect value in "whileValue"';
 
     if (withValue != null) throw 'incorrect initialization of "withValue"';
     withValue = true;
-    if (!withValue) throw 'incorrect value in "withValue"';
+    if (!withValue!) throw 'incorrect value in "withValue"';
     withValue = false;
-    if (withValue) throw 'incorrect value in "withValue"';
+    if (withValue!) throw 'incorrect value in "withValue"';
 
     if (yieldValue != null) throw 'incorrect initialization of "yieldValue"';
     yieldValue = true;
-    if (!yieldValue) throw 'incorrect value in "yieldValue"';
+    if (!yieldValue!) throw 'incorrect value in "yieldValue"';
     yieldValue = false;
-    if (yieldValue) throw 'incorrect value in "yieldValue"';
+    if (yieldValue!) throw 'incorrect value in "yieldValue"';
   }
 }
 
@@ -777,301 +777,301 @@
   if (object.breakValue == null)
     throw 'incorrect initialization of "breakValue"';
   object.breakValue = true;
-  if (!object.breakValue) throw 'incorrect value in "breakValue"';
+  if (!object.breakValue!) throw 'incorrect value in "breakValue"';
   object.breakValue = false;
-  if (object.breakValue) throw 'incorrect value in "breakValue"';
+  if (object.breakValue!) throw 'incorrect value in "breakValue"';
 
   if (object.caseValue == null) throw 'incorrect initialization of "caseValue"';
   object.caseValue = true;
-  if (!object.caseValue) throw 'incorrect value in "caseValue"';
+  if (!object.caseValue!) throw 'incorrect value in "caseValue"';
   object.caseValue = false;
-  if (object.caseValue) throw 'incorrect value in "caseValue"';
+  if (object.caseValue!) throw 'incorrect value in "caseValue"';
 
   if (object.catchValue == null)
     throw 'incorrect initialization of "catchValue"';
   object.catchValue = true;
-  if (!object.catchValue) throw 'incorrect value in "catchValue"';
+  if (!object.catchValue!) throw 'incorrect value in "catchValue"';
   object.catchValue = false;
-  if (object.catchValue) throw 'incorrect value in "catchValue"';
+  if (object.catchValue!) throw 'incorrect value in "catchValue"';
 
   if (object.classValue == null)
     throw 'incorrect initialization of "classValue"';
   object.classValue = true;
-  if (!object.classValue) throw 'incorrect value in "classValue"';
+  if (!object.classValue!) throw 'incorrect value in "classValue"';
   object.classValue = false;
-  if (object.classValue) throw 'incorrect value in "classValue"';
+  if (object.classValue!) throw 'incorrect value in "classValue"';
 
   if (object.constValue == null)
     throw 'incorrect initialization of "constValue"';
   object.constValue = true;
-  if (!object.constValue) throw 'incorrect value in "constValue"';
+  if (!object.constValue!) throw 'incorrect value in "constValue"';
   object.constValue = false;
-  if (object.constValue) throw 'incorrect value in "constValue"';
+  if (object.constValue!) throw 'incorrect value in "constValue"';
 
   if (object.continueValue == null)
     throw 'incorrect initialization of "continueValue"';
   object.continueValue = true;
-  if (!object.continueValue) throw 'incorrect value in "continueValue"';
+  if (!object.continueValue!) throw 'incorrect value in "continueValue"';
   object.continueValue = false;
-  if (object.continueValue) throw 'incorrect value in "continueValue"';
+  if (object.continueValue!) throw 'incorrect value in "continueValue"';
 
   if (object.debuggerValue == null)
     throw 'incorrect initialization of "debuggerValue"';
   object.debuggerValue = true;
-  if (!object.debuggerValue) throw 'incorrect value in "debuggerValue"';
+  if (!object.debuggerValue!) throw 'incorrect value in "debuggerValue"';
   object.debuggerValue = false;
-  if (object.debuggerValue) throw 'incorrect value in "debuggerValue"';
+  if (object.debuggerValue!) throw 'incorrect value in "debuggerValue"';
 
   if (object.defaultValue == null)
     throw 'incorrect initialization of "defaultValue"';
   object.defaultValue = true;
-  if (!object.defaultValue) throw 'incorrect value in "defaultValue"';
+  if (!object.defaultValue!) throw 'incorrect value in "defaultValue"';
   object.defaultValue = false;
-  if (object.defaultValue) throw 'incorrect value in "defaultValue"';
+  if (object.defaultValue!) throw 'incorrect value in "defaultValue"';
 
   if (object.deleteValue == null)
     throw 'incorrect initialization of "deleteValue"';
   object.deleteValue = true;
-  if (!object.deleteValue) throw 'incorrect value in "deleteValue"';
+  if (!object.deleteValue!) throw 'incorrect value in "deleteValue"';
   object.deleteValue = false;
-  if (object.deleteValue) throw 'incorrect value in "deleteValue"';
+  if (object.deleteValue!) throw 'incorrect value in "deleteValue"';
 
   if (object.doValue == null) throw 'incorrect initialization of "doValue"';
   object.doValue = true;
-  if (!object.doValue) throw 'incorrect value in "doValue"';
+  if (!object.doValue!) throw 'incorrect value in "doValue"';
   object.doValue = false;
-  if (object.doValue) throw 'incorrect value in "doValue"';
+  if (object.doValue!) throw 'incorrect value in "doValue"';
 
   if (object.elseValue == null) throw 'incorrect initialization of "elseValue"';
   object.elseValue = true;
-  if (!object.elseValue) throw 'incorrect value in "elseValue"';
+  if (!object.elseValue!) throw 'incorrect value in "elseValue"';
   object.elseValue = false;
-  if (object.elseValue) throw 'incorrect value in "elseValue"';
+  if (object.elseValue!) throw 'incorrect value in "elseValue"';
 
   if (object.enumValue == null) throw 'incorrect initialization of "enumValue"';
   object.enumValue = true;
-  if (!object.enumValue) throw 'incorrect value in "enumValue"';
+  if (!object.enumValue!) throw 'incorrect value in "enumValue"';
   object.enumValue = false;
-  if (object.enumValue) throw 'incorrect value in "enumValue"';
+  if (object.enumValue!) throw 'incorrect value in "enumValue"';
 
   if (object.exportValue == null)
     throw 'incorrect initialization of "exportValue"';
   object.exportValue = true;
-  if (!object.exportValue) throw 'incorrect value in "exportValue"';
+  if (!object.exportValue!) throw 'incorrect value in "exportValue"';
   object.exportValue = false;
-  if (object.exportValue) throw 'incorrect value in "exportValue"';
+  if (object.exportValue!) throw 'incorrect value in "exportValue"';
 
   if (object.extendsValue == null)
     throw 'incorrect initialization of "extendsValue"';
   object.extendsValue = true;
-  if (!object.extendsValue) throw 'incorrect value in "extendsValue"';
+  if (!object.extendsValue!) throw 'incorrect value in "extendsValue"';
   object.extendsValue = false;
-  if (object.extendsValue) throw 'incorrect value in "extendsValue"';
+  if (object.extendsValue!) throw 'incorrect value in "extendsValue"';
 
   if (object.falseValue == null)
     throw 'incorrect initialization of "falseValue"';
   object.falseValue = true;
-  if (!object.falseValue) throw 'incorrect value in "falseValue"';
+  if (!object.falseValue!) throw 'incorrect value in "falseValue"';
   object.falseValue = false;
-  if (object.falseValue) throw 'incorrect value in "falseValue"';
+  if (object.falseValue!) throw 'incorrect value in "falseValue"';
 
   if (object.finallyValue == null)
     throw 'incorrect initialization of "finallyValue"';
   object.finallyValue = true;
-  if (!object.finallyValue) throw 'incorrect value in "finallyValue"';
+  if (!object.finallyValue!) throw 'incorrect value in "finallyValue"';
   object.finallyValue = false;
-  if (object.finallyValue) throw 'incorrect value in "finallyValue"';
+  if (object.finallyValue!) throw 'incorrect value in "finallyValue"';
 
   if (object.forValue == null) throw 'incorrect initialization of "forValue"';
   object.forValue = true;
-  if (!object.forValue) throw 'incorrect value in "forValue"';
+  if (!object.forValue!) throw 'incorrect value in "forValue"';
   object.forValue = false;
-  if (object.forValue) throw 'incorrect value in "forValue"';
+  if (object.forValue!) throw 'incorrect value in "forValue"';
 
   if (object.functionValue == null)
     throw 'incorrect initialization of "functionValue"';
   object.functionValue = true;
-  if (!object.functionValue) throw 'incorrect value in "functionValue"';
+  if (!object.functionValue!) throw 'incorrect value in "functionValue"';
   object.functionValue = false;
-  if (object.functionValue) throw 'incorrect value in "functionValue"';
+  if (object.functionValue!) throw 'incorrect value in "functionValue"';
 
   if (object.ifValue == null) throw 'incorrect initialization of "ifValue"';
   object.ifValue = true;
-  if (!object.ifValue) throw 'incorrect value in "ifValue"';
+  if (!object.ifValue!) throw 'incorrect value in "ifValue"';
   object.ifValue = false;
-  if (object.ifValue) throw 'incorrect value in "ifValue"';
+  if (object.ifValue!) throw 'incorrect value in "ifValue"';
 
   if (object.implementsValue == null)
     throw 'incorrect initialization of "implementsValue"';
   object.implementsValue = true;
-  if (!object.implementsValue) throw 'incorrect value in "implementsValue"';
+  if (!object.implementsValue!) throw 'incorrect value in "implementsValue"';
   object.implementsValue = false;
-  if (object.implementsValue) throw 'incorrect value in "implementsValue"';
+  if (object.implementsValue!) throw 'incorrect value in "implementsValue"';
 
   if (object.importValue == null)
     throw 'incorrect initialization of "importValue"';
   object.importValue = true;
-  if (!object.importValue) throw 'incorrect value in "importValue"';
+  if (!object.importValue!) throw 'incorrect value in "importValue"';
   object.importValue = false;
-  if (object.importValue) throw 'incorrect value in "importValue"';
+  if (object.importValue!) throw 'incorrect value in "importValue"';
 
   if (object.inValue == null) throw 'incorrect initialization of "inValue"';
   object.inValue = true;
-  if (!object.inValue) throw 'incorrect value in "inValue"';
+  if (!object.inValue!) throw 'incorrect value in "inValue"';
   object.inValue = false;
-  if (object.inValue) throw 'incorrect value in "inValue"';
+  if (object.inValue!) throw 'incorrect value in "inValue"';
 
   if (object.instanceofValue == null)
     throw 'incorrect initialization of "instanceofValue"';
   object.instanceofValue = true;
-  if (!object.instanceofValue) throw 'incorrect value in "instanceofValue"';
+  if (!object.instanceofValue!) throw 'incorrect value in "instanceofValue"';
   object.instanceofValue = false;
-  if (object.instanceofValue) throw 'incorrect value in "instanceofValue"';
+  if (object.instanceofValue!) throw 'incorrect value in "instanceofValue"';
 
   if (object.interfaceValue == null)
     throw 'incorrect initialization of "interfaceValue"';
   object.interfaceValue = true;
-  if (!object.interfaceValue) throw 'incorrect value in "interfaceValue"';
+  if (!object.interfaceValue!) throw 'incorrect value in "interfaceValue"';
   object.interfaceValue = false;
-  if (object.interfaceValue) throw 'incorrect value in "interfaceValue"';
+  if (object.interfaceValue!) throw 'incorrect value in "interfaceValue"';
 
   if (object.letValue == null) throw 'incorrect initialization of "letValue"';
   object.letValue = true;
-  if (!object.letValue) throw 'incorrect value in "letValue"';
+  if (!object.letValue!) throw 'incorrect value in "letValue"';
   object.letValue = false;
-  if (object.letValue) throw 'incorrect value in "letValue"';
+  if (object.letValue!) throw 'incorrect value in "letValue"';
 
   if (object.newValue == null) throw 'incorrect initialization of "newValue"';
   object.newValue = true;
-  if (!object.newValue) throw 'incorrect value in "newValue"';
+  if (!object.newValue!) throw 'incorrect value in "newValue"';
   object.newValue = false;
-  if (object.newValue) throw 'incorrect value in "newValue"';
+  if (object.newValue!) throw 'incorrect value in "newValue"';
 
   if (object.nullValue == null) throw 'incorrect initialization of "nullValue"';
   object.nullValue = true;
-  if (!object.nullValue) throw 'incorrect value in "nullValue"';
+  if (!object.nullValue!) throw 'incorrect value in "nullValue"';
   object.nullValue = false;
-  if (object.nullValue) throw 'incorrect value in "nullValue"';
+  if (object.nullValue!) throw 'incorrect value in "nullValue"';
 
   if (object.packageValue == null)
     throw 'incorrect initialization of "packageValue"';
   object.packageValue = true;
-  if (!object.packageValue) throw 'incorrect value in "packageValue"';
+  if (!object.packageValue!) throw 'incorrect value in "packageValue"';
   object.packageValue = false;
-  if (object.packageValue) throw 'incorrect value in "packageValue"';
+  if (object.packageValue!) throw 'incorrect value in "packageValue"';
 
   if (object.privateValue == null)
     throw 'incorrect initialization of "privateValue"';
   object.privateValue = true;
-  if (!object.privateValue) throw 'incorrect value in "privateValue"';
+  if (!object.privateValue!) throw 'incorrect value in "privateValue"';
   object.privateValue = false;
-  if (object.privateValue) throw 'incorrect value in "privateValue"';
+  if (object.privateValue!) throw 'incorrect value in "privateValue"';
 
   if (object.protectedValue == null)
     throw 'incorrect initialization of "protectedValue"';
   object.protectedValue = true;
-  if (!object.protectedValue) throw 'incorrect value in "protectedValue"';
+  if (!object.protectedValue!) throw 'incorrect value in "protectedValue"';
   object.protectedValue = false;
-  if (object.protectedValue) throw 'incorrect value in "protectedValue"';
+  if (object.protectedValue!) throw 'incorrect value in "protectedValue"';
 
   if (object.publicValue == null)
     throw 'incorrect initialization of "publicValue"';
   object.publicValue = true;
-  if (!object.publicValue) throw 'incorrect value in "publicValue"';
+  if (!object.publicValue!) throw 'incorrect value in "publicValue"';
   object.publicValue = false;
-  if (object.publicValue) throw 'incorrect value in "publicValue"';
+  if (object.publicValue!) throw 'incorrect value in "publicValue"';
 
   if (object.returnValue == null)
     throw 'incorrect initialization of "returnValue"';
   object.returnValue = true;
-  if (!object.returnValue) throw 'incorrect value in "returnValue"';
+  if (!object.returnValue!) throw 'incorrect value in "returnValue"';
   object.returnValue = false;
-  if (object.returnValue) throw 'incorrect value in "returnValue"';
+  if (object.returnValue!) throw 'incorrect value in "returnValue"';
 
   if (object.staticValue == null)
     throw 'incorrect initialization of "staticValue"';
   object.staticValue = true;
-  if (!object.staticValue) throw 'incorrect value in "staticValue"';
+  if (!object.staticValue!) throw 'incorrect value in "staticValue"';
   object.staticValue = false;
-  if (object.staticValue) throw 'incorrect value in "staticValue"';
+  if (object.staticValue!) throw 'incorrect value in "staticValue"';
 
   if (object.superValue == null)
     throw 'incorrect initialization of "superValue"';
   object.superValue = true;
-  if (!object.superValue) throw 'incorrect value in "superValue"';
+  if (!object.superValue!) throw 'incorrect value in "superValue"';
   object.superValue = false;
-  if (object.superValue) throw 'incorrect value in "superValue"';
+  if (object.superValue!) throw 'incorrect value in "superValue"';
 
   if (object.switchValue == null)
     throw 'incorrect initialization of "switchValue"';
   object.switchValue = true;
-  if (!object.switchValue) throw 'incorrect value in "switchValue"';
+  if (!object.switchValue!) throw 'incorrect value in "switchValue"';
   object.switchValue = false;
-  if (object.switchValue) throw 'incorrect value in "switchValue"';
+  if (object.switchValue!) throw 'incorrect value in "switchValue"';
 
   if (object.thisValue == null) throw 'incorrect initialization of "thisValue"';
   object.thisValue = true;
-  if (!object.thisValue) throw 'incorrect value in "thisValue"';
+  if (!object.thisValue!) throw 'incorrect value in "thisValue"';
   object.thisValue = false;
-  if (object.thisValue) throw 'incorrect value in "thisValue"';
+  if (object.thisValue!) throw 'incorrect value in "thisValue"';
 
   if (object.throwValue == null)
     throw 'incorrect initialization of "throwValue"';
   object.throwValue = true;
-  if (!object.throwValue) throw 'incorrect value in "throwValue"';
+  if (!object.throwValue!) throw 'incorrect value in "throwValue"';
   object.throwValue = false;
-  if (object.throwValue) throw 'incorrect value in "throwValue"';
+  if (object.throwValue!) throw 'incorrect value in "throwValue"';
 
   if (object.trueValue == null) throw 'incorrect initialization of "trueValue"';
   object.trueValue = true;
-  if (!object.trueValue) throw 'incorrect value in "trueValue"';
+  if (!object.trueValue!) throw 'incorrect value in "trueValue"';
   object.trueValue = false;
-  if (object.trueValue) throw 'incorrect value in "trueValue"';
+  if (object.trueValue!) throw 'incorrect value in "trueValue"';
 
   if (object.tryValue == null) throw 'incorrect initialization of "tryValue"';
   object.tryValue = true;
-  if (!object.tryValue) throw 'incorrect value in "tryValue"';
+  if (!object.tryValue!) throw 'incorrect value in "tryValue"';
   object.tryValue = false;
-  if (object.tryValue) throw 'incorrect value in "tryValue"';
+  if (object.tryValue!) throw 'incorrect value in "tryValue"';
 
   if (object.typeofValue == null)
     throw 'incorrect initialization of "typeofValue"';
   object.typeofValue = true;
-  if (!object.typeofValue) throw 'incorrect value in "typeofValue"';
+  if (!object.typeofValue!) throw 'incorrect value in "typeofValue"';
   object.typeofValue = false;
-  if (object.typeofValue) throw 'incorrect value in "typeofValue"';
+  if (object.typeofValue!) throw 'incorrect value in "typeofValue"';
 
   if (object.varValue == null) throw 'incorrect initialization of "varValue"';
   object.varValue = true;
-  if (!object.varValue) throw 'incorrect value in "varValue"';
+  if (!object.varValue!) throw 'incorrect value in "varValue"';
   object.varValue = false;
-  if (object.varValue) throw 'incorrect value in "varValue"';
+  if (object.varValue!) throw 'incorrect value in "varValue"';
 
   if (object.voidValue == null) throw 'incorrect initialization of "voidValue"';
   object.voidValue = true;
-  if (!object.voidValue) throw 'incorrect value in "voidValue"';
+  if (!object.voidValue!) throw 'incorrect value in "voidValue"';
   object.voidValue = false;
-  if (object.voidValue) throw 'incorrect value in "voidValue"';
+  if (object.voidValue!) throw 'incorrect value in "voidValue"';
 
   if (object.whileValue == null)
     throw 'incorrect initialization of "whileValue"';
   object.whileValue = true;
-  if (!object.whileValue) throw 'incorrect value in "whileValue"';
+  if (!object.whileValue!) throw 'incorrect value in "whileValue"';
   object.whileValue = false;
-  if (object.whileValue) throw 'incorrect value in "whileValue"';
+  if (object.whileValue!) throw 'incorrect value in "whileValue"';
 
   if (object.withValue == null) throw 'incorrect initialization of "withValue"';
   object.withValue = true;
-  if (!object.withValue) throw 'incorrect value in "withValue"';
+  if (!object.withValue!) throw 'incorrect value in "withValue"';
   object.withValue = false;
-  if (object.withValue) throw 'incorrect value in "withValue"';
+  if (object.withValue!) throw 'incorrect value in "withValue"';
 
   if (object.yieldValue == null)
     throw 'incorrect initialization of "yieldValue"';
   object.yieldValue = true;
-  if (!object.yieldValue) throw 'incorrect value in "yieldValue"';
+  if (!object.yieldValue!) throw 'incorrect value in "yieldValue"';
   object.yieldValue = false;
-  if (object.yieldValue) throw 'incorrect value in "yieldValue"';
+  if (object.yieldValue!) throw 'incorrect value in "yieldValue"';
 }
 
 /// Called multiple times with arguments that are hard to track in type
@@ -1082,301 +1082,301 @@
   if (object.breakValue == null)
     throw 'incorrect initialization of "breakValue"';
   object.breakValue = true;
-  if (!object.breakValue) throw 'incorrect value in "breakValue"';
+  if (!object.breakValue!) throw 'incorrect value in "breakValue"';
   object.breakValue = false;
-  if (object.breakValue) throw 'incorrect value in "breakValue"';
+  if (object.breakValue!) throw 'incorrect value in "breakValue"';
 
   if (object.caseValue == null) throw 'incorrect initialization of "caseValue"';
   object.caseValue = true;
-  if (!object.caseValue) throw 'incorrect value in "caseValue"';
+  if (!object.caseValue!) throw 'incorrect value in "caseValue"';
   object.caseValue = false;
-  if (object.caseValue) throw 'incorrect value in "caseValue"';
+  if (object.caseValue!) throw 'incorrect value in "caseValue"';
 
   if (object.catchValue == null)
     throw 'incorrect initialization of "catchValue"';
   object.catchValue = true;
-  if (!object.catchValue) throw 'incorrect value in "catchValue"';
+  if (!object.catchValue!) throw 'incorrect value in "catchValue"';
   object.catchValue = false;
-  if (object.catchValue) throw 'incorrect value in "catchValue"';
+  if (object.catchValue!) throw 'incorrect value in "catchValue"';
 
   if (object.classValue == null)
     throw 'incorrect initialization of "classValue"';
   object.classValue = true;
-  if (!object.classValue) throw 'incorrect value in "classValue"';
+  if (!object.classValue!) throw 'incorrect value in "classValue"';
   object.classValue = false;
-  if (object.classValue) throw 'incorrect value in "classValue"';
+  if (object.classValue!) throw 'incorrect value in "classValue"';
 
   if (object.constValue == null)
     throw 'incorrect initialization of "constValue"';
   object.constValue = true;
-  if (!object.constValue) throw 'incorrect value in "constValue"';
+  if (!object.constValue!) throw 'incorrect value in "constValue"';
   object.constValue = false;
-  if (object.constValue) throw 'incorrect value in "constValue"';
+  if (object.constValue!) throw 'incorrect value in "constValue"';
 
   if (object.continueValue == null)
     throw 'incorrect initialization of "continueValue"';
   object.continueValue = true;
-  if (!object.continueValue) throw 'incorrect value in "continueValue"';
+  if (!object.continueValue!) throw 'incorrect value in "continueValue"';
   object.continueValue = false;
-  if (object.continueValue) throw 'incorrect value in "continueValue"';
+  if (object.continueValue!) throw 'incorrect value in "continueValue"';
 
   if (object.debuggerValue == null)
     throw 'incorrect initialization of "debuggerValue"';
   object.debuggerValue = true;
-  if (!object.debuggerValue) throw 'incorrect value in "debuggerValue"';
+  if (!object.debuggerValue!) throw 'incorrect value in "debuggerValue"';
   object.debuggerValue = false;
-  if (object.debuggerValue) throw 'incorrect value in "debuggerValue"';
+  if (object.debuggerValue!) throw 'incorrect value in "debuggerValue"';
 
   if (object.defaultValue == null)
     throw 'incorrect initialization of "defaultValue"';
   object.defaultValue = true;
-  if (!object.defaultValue) throw 'incorrect value in "defaultValue"';
+  if (!object.defaultValue!) throw 'incorrect value in "defaultValue"';
   object.defaultValue = false;
-  if (object.defaultValue) throw 'incorrect value in "defaultValue"';
+  if (object.defaultValue!) throw 'incorrect value in "defaultValue"';
 
   if (object.deleteValue == null)
     throw 'incorrect initialization of "deleteValue"';
   object.deleteValue = true;
-  if (!object.deleteValue) throw 'incorrect value in "deleteValue"';
+  if (!object.deleteValue!) throw 'incorrect value in "deleteValue"';
   object.deleteValue = false;
-  if (object.deleteValue) throw 'incorrect value in "deleteValue"';
+  if (object.deleteValue!) throw 'incorrect value in "deleteValue"';
 
   if (object.doValue == null) throw 'incorrect initialization of "doValue"';
   object.doValue = true;
-  if (!object.doValue) throw 'incorrect value in "doValue"';
+  if (!object.doValue!) throw 'incorrect value in "doValue"';
   object.doValue = false;
-  if (object.doValue) throw 'incorrect value in "doValue"';
+  if (object.doValue!) throw 'incorrect value in "doValue"';
 
   if (object.elseValue == null) throw 'incorrect initialization of "elseValue"';
   object.elseValue = true;
-  if (!object.elseValue) throw 'incorrect value in "elseValue"';
+  if (!object.elseValue!) throw 'incorrect value in "elseValue"';
   object.elseValue = false;
-  if (object.elseValue) throw 'incorrect value in "elseValue"';
+  if (object.elseValue!) throw 'incorrect value in "elseValue"';
 
   if (object.enumValue == null) throw 'incorrect initialization of "enumValue"';
   object.enumValue = true;
-  if (!object.enumValue) throw 'incorrect value in "enumValue"';
+  if (!object.enumValue!) throw 'incorrect value in "enumValue"';
   object.enumValue = false;
-  if (object.enumValue) throw 'incorrect value in "enumValue"';
+  if (object.enumValue!) throw 'incorrect value in "enumValue"';
 
   if (object.exportValue == null)
     throw 'incorrect initialization of "exportValue"';
   object.exportValue = true;
-  if (!object.exportValue) throw 'incorrect value in "exportValue"';
+  if (!object.exportValue!) throw 'incorrect value in "exportValue"';
   object.exportValue = false;
-  if (object.exportValue) throw 'incorrect value in "exportValue"';
+  if (object.exportValue!) throw 'incorrect value in "exportValue"';
 
   if (object.extendsValue == null)
     throw 'incorrect initialization of "extendsValue"';
   object.extendsValue = true;
-  if (!object.extendsValue) throw 'incorrect value in "extendsValue"';
+  if (!object.extendsValue!) throw 'incorrect value in "extendsValue"';
   object.extendsValue = false;
-  if (object.extendsValue) throw 'incorrect value in "extendsValue"';
+  if (object.extendsValue!) throw 'incorrect value in "extendsValue"';
 
   if (object.falseValue == null)
     throw 'incorrect initialization of "falseValue"';
   object.falseValue = true;
-  if (!object.falseValue) throw 'incorrect value in "falseValue"';
+  if (!object.falseValue!) throw 'incorrect value in "falseValue"';
   object.falseValue = false;
-  if (object.falseValue) throw 'incorrect value in "falseValue"';
+  if (object.falseValue!) throw 'incorrect value in "falseValue"';
 
   if (object.finallyValue == null)
     throw 'incorrect initialization of "finallyValue"';
   object.finallyValue = true;
-  if (!object.finallyValue) throw 'incorrect value in "finallyValue"';
+  if (!object.finallyValue!) throw 'incorrect value in "finallyValue"';
   object.finallyValue = false;
-  if (object.finallyValue) throw 'incorrect value in "finallyValue"';
+  if (object.finallyValue!) throw 'incorrect value in "finallyValue"';
 
   if (object.forValue == null) throw 'incorrect initialization of "forValue"';
   object.forValue = true;
-  if (!object.forValue) throw 'incorrect value in "forValue"';
+  if (!object.forValue!) throw 'incorrect value in "forValue"';
   object.forValue = false;
-  if (object.forValue) throw 'incorrect value in "forValue"';
+  if (object.forValue!) throw 'incorrect value in "forValue"';
 
   if (object.functionValue == null)
     throw 'incorrect initialization of "functionValue"';
   object.functionValue = true;
-  if (!object.functionValue) throw 'incorrect value in "functionValue"';
+  if (!object.functionValue!) throw 'incorrect value in "functionValue"';
   object.functionValue = false;
-  if (object.functionValue) throw 'incorrect value in "functionValue"';
+  if (object.functionValue!) throw 'incorrect value in "functionValue"';
 
   if (object.ifValue == null) throw 'incorrect initialization of "ifValue"';
   object.ifValue = true;
-  if (!object.ifValue) throw 'incorrect value in "ifValue"';
+  if (!object.ifValue!) throw 'incorrect value in "ifValue"';
   object.ifValue = false;
-  if (object.ifValue) throw 'incorrect value in "ifValue"';
+  if (object.ifValue!) throw 'incorrect value in "ifValue"';
 
   if (object.implementsValue == null)
     throw 'incorrect initialization of "implementsValue"';
   object.implementsValue = true;
-  if (!object.implementsValue) throw 'incorrect value in "implementsValue"';
+  if (!object.implementsValue!) throw 'incorrect value in "implementsValue"';
   object.implementsValue = false;
-  if (object.implementsValue) throw 'incorrect value in "implementsValue"';
+  if (object.implementsValue!) throw 'incorrect value in "implementsValue"';
 
   if (object.importValue == null)
     throw 'incorrect initialization of "importValue"';
   object.importValue = true;
-  if (!object.importValue) throw 'incorrect value in "importValue"';
+  if (!object.importValue!) throw 'incorrect value in "importValue"';
   object.importValue = false;
-  if (object.importValue) throw 'incorrect value in "importValue"';
+  if (object.importValue!) throw 'incorrect value in "importValue"';
 
   if (object.inValue == null) throw 'incorrect initialization of "inValue"';
   object.inValue = true;
-  if (!object.inValue) throw 'incorrect value in "inValue"';
+  if (!object.inValue!) throw 'incorrect value in "inValue"';
   object.inValue = false;
-  if (object.inValue) throw 'incorrect value in "inValue"';
+  if (object.inValue!) throw 'incorrect value in "inValue"';
 
   if (object.instanceofValue == null)
     throw 'incorrect initialization of "instanceofValue"';
   object.instanceofValue = true;
-  if (!object.instanceofValue) throw 'incorrect value in "instanceofValue"';
+  if (!object.instanceofValue!) throw 'incorrect value in "instanceofValue"';
   object.instanceofValue = false;
-  if (object.instanceofValue) throw 'incorrect value in "instanceofValue"';
+  if (object.instanceofValue!) throw 'incorrect value in "instanceofValue"';
 
   if (object.interfaceValue == null)
     throw 'incorrect initialization of "interfaceValue"';
   object.interfaceValue = true;
-  if (!object.interfaceValue) throw 'incorrect value in "interfaceValue"';
+  if (!object.interfaceValue!) throw 'incorrect value in "interfaceValue"';
   object.interfaceValue = false;
-  if (object.interfaceValue) throw 'incorrect value in "interfaceValue"';
+  if (object.interfaceValue!) throw 'incorrect value in "interfaceValue"';
 
   if (object.letValue == null) throw 'incorrect initialization of "letValue"';
   object.letValue = true;
-  if (!object.letValue) throw 'incorrect value in "letValue"';
+  if (!object.letValue!) throw 'incorrect value in "letValue"';
   object.letValue = false;
-  if (object.letValue) throw 'incorrect value in "letValue"';
+  if (object.letValue!) throw 'incorrect value in "letValue"';
 
   if (object.newValue == null) throw 'incorrect initialization of "newValue"';
   object.newValue = true;
-  if (!object.newValue) throw 'incorrect value in "newValue"';
+  if (!object.newValue!) throw 'incorrect value in "newValue"';
   object.newValue = false;
-  if (object.newValue) throw 'incorrect value in "newValue"';
+  if (object.newValue!) throw 'incorrect value in "newValue"';
 
   if (object.nullValue == null) throw 'incorrect initialization of "nullValue"';
   object.nullValue = true;
-  if (!object.nullValue) throw 'incorrect value in "nullValue"';
+  if (!object.nullValue!) throw 'incorrect value in "nullValue"';
   object.nullValue = false;
-  if (object.nullValue) throw 'incorrect value in "nullValue"';
+  if (object.nullValue!) throw 'incorrect value in "nullValue"';
 
   if (object.packageValue == null)
     throw 'incorrect initialization of "packageValue"';
   object.packageValue = true;
-  if (!object.packageValue) throw 'incorrect value in "packageValue"';
+  if (!object.packageValue!) throw 'incorrect value in "packageValue"';
   object.packageValue = false;
-  if (object.packageValue) throw 'incorrect value in "packageValue"';
+  if (object.packageValue!) throw 'incorrect value in "packageValue"';
 
   if (object.privateValue == null)
     throw 'incorrect initialization of "privateValue"';
   object.privateValue = true;
-  if (!object.privateValue) throw 'incorrect value in "privateValue"';
+  if (!object.privateValue!) throw 'incorrect value in "privateValue"';
   object.privateValue = false;
-  if (object.privateValue) throw 'incorrect value in "privateValue"';
+  if (object.privateValue!) throw 'incorrect value in "privateValue"';
 
   if (object.protectedValue == null)
     throw 'incorrect initialization of "protectedValue"';
   object.protectedValue = true;
-  if (!object.protectedValue) throw 'incorrect value in "protectedValue"';
+  if (!object.protectedValue!) throw 'incorrect value in "protectedValue"';
   object.protectedValue = false;
-  if (object.protectedValue) throw 'incorrect value in "protectedValue"';
+  if (object.protectedValue!) throw 'incorrect value in "protectedValue"';
 
   if (object.publicValue == null)
     throw 'incorrect initialization of "publicValue"';
   object.publicValue = true;
-  if (!object.publicValue) throw 'incorrect value in "publicValue"';
+  if (!object.publicValue!) throw 'incorrect value in "publicValue"';
   object.publicValue = false;
-  if (object.publicValue) throw 'incorrect value in "publicValue"';
+  if (object.publicValue!) throw 'incorrect value in "publicValue"';
 
   if (object.returnValue == null)
     throw 'incorrect initialization of "returnValue"';
   object.returnValue = true;
-  if (!object.returnValue) throw 'incorrect value in "returnValue"';
+  if (!object.returnValue!) throw 'incorrect value in "returnValue"';
   object.returnValue = false;
-  if (object.returnValue) throw 'incorrect value in "returnValue"';
+  if (object.returnValue!) throw 'incorrect value in "returnValue"';
 
   if (object.staticValue == null)
     throw 'incorrect initialization of "staticValue"';
   object.staticValue = true;
-  if (!object.staticValue) throw 'incorrect value in "staticValue"';
+  if (!object.staticValue!) throw 'incorrect value in "staticValue"';
   object.staticValue = false;
-  if (object.staticValue) throw 'incorrect value in "staticValue"';
+  if (object.staticValue!) throw 'incorrect value in "staticValue"';
 
   if (object.superValue == null)
     throw 'incorrect initialization of "superValue"';
   object.superValue = true;
-  if (!object.superValue) throw 'incorrect value in "superValue"';
+  if (!object.superValue!) throw 'incorrect value in "superValue"';
   object.superValue = false;
-  if (object.superValue) throw 'incorrect value in "superValue"';
+  if (object.superValue!) throw 'incorrect value in "superValue"';
 
   if (object.switchValue == null)
     throw 'incorrect initialization of "switchValue"';
   object.switchValue = true;
-  if (!object.switchValue) throw 'incorrect value in "switchValue"';
+  if (!object.switchValue!) throw 'incorrect value in "switchValue"';
   object.switchValue = false;
-  if (object.switchValue) throw 'incorrect value in "switchValue"';
+  if (object.switchValue!) throw 'incorrect value in "switchValue"';
 
   if (object.thisValue == null) throw 'incorrect initialization of "thisValue"';
   object.thisValue = true;
-  if (!object.thisValue) throw 'incorrect value in "thisValue"';
+  if (!object.thisValue!) throw 'incorrect value in "thisValue"';
   object.thisValue = false;
-  if (object.thisValue) throw 'incorrect value in "thisValue"';
+  if (object.thisValue!) throw 'incorrect value in "thisValue"';
 
   if (object.throwValue == null)
     throw 'incorrect initialization of "throwValue"';
   object.throwValue = true;
-  if (!object.throwValue) throw 'incorrect value in "throwValue"';
+  if (!object.throwValue!) throw 'incorrect value in "throwValue"';
   object.throwValue = false;
-  if (object.throwValue) throw 'incorrect value in "throwValue"';
+  if (object.throwValue!) throw 'incorrect value in "throwValue"';
 
   if (object.trueValue == null) throw 'incorrect initialization of "trueValue"';
   object.trueValue = true;
-  if (!object.trueValue) throw 'incorrect value in "trueValue"';
+  if (!object.trueValue!) throw 'incorrect value in "trueValue"';
   object.trueValue = false;
-  if (object.trueValue) throw 'incorrect value in "trueValue"';
+  if (object.trueValue!) throw 'incorrect value in "trueValue"';
 
   if (object.tryValue == null) throw 'incorrect initialization of "tryValue"';
   object.tryValue = true;
-  if (!object.tryValue) throw 'incorrect value in "tryValue"';
+  if (!object.tryValue!) throw 'incorrect value in "tryValue"';
   object.tryValue = false;
-  if (object.tryValue) throw 'incorrect value in "tryValue"';
+  if (object.tryValue!) throw 'incorrect value in "tryValue"';
 
   if (object.typeofValue == null)
     throw 'incorrect initialization of "typeofValue"';
   object.typeofValue = true;
-  if (!object.typeofValue) throw 'incorrect value in "typeofValue"';
+  if (!object.typeofValue!) throw 'incorrect value in "typeofValue"';
   object.typeofValue = false;
-  if (object.typeofValue) throw 'incorrect value in "typeofValue"';
+  if (object.typeofValue!) throw 'incorrect value in "typeofValue"';
 
   if (object.varValue == null) throw 'incorrect initialization of "varValue"';
   object.varValue = true;
-  if (!object.varValue) throw 'incorrect value in "varValue"';
+  if (!object.varValue!) throw 'incorrect value in "varValue"';
   object.varValue = false;
-  if (object.varValue) throw 'incorrect value in "varValue"';
+  if (object.varValue!) throw 'incorrect value in "varValue"';
 
   if (object.voidValue == null) throw 'incorrect initialization of "voidValue"';
   object.voidValue = true;
-  if (!object.voidValue) throw 'incorrect value in "voidValue"';
+  if (!object.voidValue!) throw 'incorrect value in "voidValue"';
   object.voidValue = false;
-  if (object.voidValue) throw 'incorrect value in "voidValue"';
+  if (object.voidValue!) throw 'incorrect value in "voidValue"';
 
   if (object.whileValue == null)
     throw 'incorrect initialization of "whileValue"';
   object.whileValue = true;
-  if (!object.whileValue) throw 'incorrect value in "whileValue"';
+  if (!object.whileValue!) throw 'incorrect value in "whileValue"';
   object.whileValue = false;
-  if (object.whileValue) throw 'incorrect value in "whileValue"';
+  if (object.whileValue!) throw 'incorrect value in "whileValue"';
 
   if (object.withValue == null) throw 'incorrect initialization of "withValue"';
   object.withValue = true;
-  if (!object.withValue) throw 'incorrect value in "withValue"';
+  if (!object.withValue!) throw 'incorrect value in "withValue"';
   object.withValue = false;
-  if (object.withValue) throw 'incorrect value in "withValue"';
+  if (object.withValue!) throw 'incorrect value in "withValue"';
 
   if (object.yieldValue == null)
     throw 'incorrect initialization of "yieldValue"';
   object.yieldValue = true;
-  if (!object.yieldValue) throw 'incorrect value in "yieldValue"';
+  if (!object.yieldValue!) throw 'incorrect value in "yieldValue"';
   object.yieldValue = false;
-  if (object.yieldValue) throw 'incorrect value in "yieldValue"';
+  if (object.yieldValue!) throw 'incorrect value in "yieldValue"';
 }
 
 NativeClassWithOddNames makeNativeClassWithOddNames() native;
diff --git a/tests/dart2js/native/subclassing_super_call_test.dart b/tests/dart2js/native/subclassing_super_call_test.dart
index 61e3fc1..b157933 100644
--- a/tests/dart2js/native/subclassing_super_call_test.dart
+++ b/tests/dart2js/native/subclassing_super_call_test.dart
@@ -15,13 +15,14 @@
 @Native("N2")
 class N2 extends N1 {
   N2.init();
-  String text;
+  void set text(String unused) native;
+  String get text native;
   foo() native;
 }
 
 class AA extends N2 {
   AA.init() : super.init();
-  String afield;
+  String? afield;
   afun() => 'afun:$afield';
 }
 
diff --git a/tests/dart2js/native/subclassing_type_test.dart b/tests/dart2js/native/subclassing_type_test.dart
index b99872e..ce52e5b 100644
--- a/tests/dart2js/native/subclassing_type_test.dart
+++ b/tests/dart2js/native/subclassing_type_test.dart
@@ -39,10 +39,10 @@
 })()""");
 }
 
-A gA;
-B gB;
-C gC;
-M gM;
+A? gA;
+B? gB;
+C? gC;
+M? gM;
 
 isA(x) => x is A;
 asA(x) => x as A;
diff --git a/tests/dart2js/native/type_error_decode_test.dart b/tests/dart2js/native/type_error_decode_test.dart
index ba97210..67f0174 100644
--- a/tests/dart2js/native/type_error_decode_test.dart
+++ b/tests/dart2js/native/type_error_decode_test.dart
@@ -35,11 +35,11 @@
 
 main() {
   dynamic x = null;
-  dynamic z = new Object();
-  dynamic v = new List(1)[0];
+  dynamic z = Object();
+  dynamic v = ([]..length = 1)[0];
   dynamic s = "Cannot call method 'foo' of null";
   dynamic nul = null;
-  dynamic f = new Foo();
+  dynamic f = Foo();
 
   expectThrows(() => x.fisk(), isNullError);
   expectThrows(() => v.fisk(), isNullError);
diff --git a/tests/dart2js/non_jsinterop_test.dart b/tests/dart2js/non_jsinterop_test.dart
index e66c5d5..68eebe7 100644
--- a/tests/dart2js/non_jsinterop_test.dart
+++ b/tests/dart2js/non_jsinterop_test.dart
@@ -52,7 +52,7 @@
 
 class Class {
   Class.generative();
-  factory Class.fact() => null;
+  factory Class.fact() => null as dynamic;
 
   // NON_NATIVE_EXTERNAL               //# 08: compile-time error
   external Class.externalGenerative(); //# 08: continued
@@ -60,16 +60,16 @@
   // NON_NATIVE_EXTERNAL                 //# 09: compile-time error
   external factory Class.externalFact(); //# 09: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 10: compile-time error
+  @JS('a') // GENERIC, GENERIC  //# 10: compile-time error
   Class.jsInteropGenerative(); //# 10: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 11: compile-time error
+  @JS('a') // GENERIC  //# 11: compile-time error
   factory Class.jsInteropFact() => null; //# 11: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 12: compile-time error
+  @JS('a') // GENERIC  //# 12: compile-time error
   external Class.externalJsInteropGenerative(); //# 12: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 13: compile-time error
+  @JS('a') // GENERIC  //# 13: compile-time error
   external factory Class.externalJsInteropFact(); //# 13: continued
 
   var instanceField;
@@ -82,28 +82,28 @@
   static set staticSetter(_) {}
   static staticMethod() {}
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 14: compile-time error
+  @JS('a') // GENERIC  //# 14: compile-time error
   var instanceJsInteropField; //# 14: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 15: compile-time error
+  @JS('a') // GENERIC  //# 15: compile-time error
   get instanceJsInteropGetter => null; //# 15: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 16: compile-time error
+  @JS('a') // GENERIC  //# 16: compile-time error
   set instanceJsInteropSetter(_) {} //# 16: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 17: compile-time error
+  @JS('a') // GENERIC  //# 17: compile-time error
   instanceJsInteropMethod() {} //# 17: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 18: compile-time error
+  @JS('a') // GENERIC  //# 18: compile-time error
   static var staticJsInteropField; //# 18: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 19: compile-time error
+  @JS('a') // GENERIC  //# 19: compile-time error
   static get staticJsInteropGetter => null; //# 19: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 20: compile-time error
+  @JS('a') // GENERIC  //# 20: compile-time error
   static set staticJsInteropSetter(_) {} //# 20: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 21: compile-time error
+  @JS('a') // GENERIC  //# 21: compile-time error
   static staticJsInteropMethod() {} //# 21: continued
 
   // NON_NATIVE_EXTERNAL               //# 22: compile-time error
@@ -124,22 +124,22 @@
   // NON_NATIVE_EXTERNAL           //# 27: compile-time error
   external static externalStaticMethod(); //# 27: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 28: compile-time error
+  @JS('a') // GENERIC  //# 28: compile-time error
   external get externalInstanceJsInteropGetter; //# 28: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 29: compile-time error
+  @JS('a') // GENERIC  //# 29: compile-time error
   external set externalInstanceJsInteropSetter(_); //# 29: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 30: compile-time error
+  @JS('a') // GENERIC  //# 30: compile-time error
   external externalInstanceJsInteropMethod(); //# 30: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 31: compile-time error
+  @JS('a') // GENERIC  //# 31: compile-time error
   external static get externalStaticJsInteropGetter; //# 31: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 32: compile-time error
+  @JS('a') // GENERIC  //# 32: compile-time error
   external static set externalStaticJsInteropSetter(_); //# 32: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 33: compile-time error
+  @JS('a') // GENERIC  //# 33: compile-time error
   external static externalStaticJsInteropMethod(); //# 33: continued
 }
 
diff --git a/tests/dart2js/panda_test.dart b/tests/dart2js/panda_test.dart
index 2afaee6..a7c324f 100644
--- a/tests/dart2js/panda_test.dart
+++ b/tests/dart2js/panda_test.dart
@@ -8,7 +8,7 @@
 import 'panda_lib.dart' as p;
 
 void main() {
-  p.Panda x = new p.Panda();
+  p.Panda? x = new p.Panda();
   Expect.isTrue(x is p.Panda);
   x = null;
   Expect.isFalse(x is p.Panda);
diff --git a/tests/dart2js/regress_40349_test.dart b/tests/dart2js/regress_40349_test.dart
index 796688d..83b8797 100644
--- a/tests/dart2js/regress_40349_test.dart
+++ b/tests/dart2js/regress_40349_test.dart
@@ -21,7 +21,7 @@
 
 class A<E> {
   int _foo = 0;
-  List<E> list = [null];
+  List<E?> list = [null];
 
   @pragma('dart2js:tryInline')
   void internalMethod(E value) {
diff --git a/tests/dart2js/regress_null_aware_test.dart b/tests/dart2js/regress_null_aware_test.dart
index 4ef8dc3..cc278b7 100644
--- a/tests/dart2js/regress_null_aware_test.dart
+++ b/tests/dart2js/regress_null_aware_test.dart
@@ -5,17 +5,11 @@
 // Regression test for failure on CFE null-aware encoding.
 
 class Class {
-  Map<String, Set<String>> map;
+  Map<String, Set<String>>? map;
 
-  List<String> method(String node, Set<String> set) =>
-      set.add(node)
-          ? [
-              node,
-              ...?map[node]
-                  ?.expand((node) => method(node, set))
-                  ?.toList()
-            ]
-          : [];
+  List<String> method(String node, Set<String> set) => set.add(node)
+      ? [node, ...?map![node]?.expand((node) => method(node, set))?.toList()]
+      : [];
 }
 
 main(args) {
diff --git a/tests/dart2js/return_setter_test.dart b/tests/dart2js/return_setter_test.dart
index a938b71..5cdb499 100644
--- a/tests/dart2js/return_setter_test.dart
+++ b/tests/dart2js/return_setter_test.dart
@@ -5,13 +5,13 @@
 import "package:expect/expect.dart";
 
 class A {
-  int foo;
+  int? foo;
 
-  static int invocations;
+  static int? invocations;
 
   static bar() {
     Expect.equals(0, invocations);
-    invocations++;
+    invocations = invocations! + 1;
     return 2;
   }
 }
diff --git a/tests/dart2js/runtime_type_closure_equals1_test.dart b/tests/dart2js/runtime_type_closure_equals1_test.dart
index 5defc5e..fb65f2a 100644
--- a/tests/dart2js/runtime_type_closure_equals1_test.dart
+++ b/tests/dart2js/runtime_type_closure_equals1_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.
 
-// dart2jsOptions=--strong
-
 import 'package:expect/expect.dart';
 
 class Class<T> {
@@ -19,5 +17,5 @@
 
   Expect.isTrue(local1a.runtimeType == local1b.runtimeType);
   Expect.isFalse(local1a.runtimeType == local2.runtimeType);
-  new Class();
+  Class();
 }
diff --git a/tests/dart2js/runtime_type_closure_equals2_test.dart b/tests/dart2js/runtime_type_closure_equals2_test.dart
index 86fe4b2..110520e 100644
--- a/tests/dart2js/runtime_type_closure_equals2_test.dart
+++ b/tests/dart2js/runtime_type_closure_equals2_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.
 
-// dart2jsOptions=--strong
-
 import 'package:expect/expect.dart';
 
 class Class<T> {
@@ -11,13 +9,13 @@
 }
 
 main() {
-  T local1a<T>() => null;
+  T local1a<T>() => throw 'unreachable';
 
-  T local1b<T>() => null;
+  T local1b<T>() => throw 'unreachable';
 
   T local2<T>(T t, String s) => t;
 
   Expect.isTrue(local1a.runtimeType == local1b.runtimeType);
   Expect.isFalse(local1a.runtimeType == local2.runtimeType);
-  new Class();
+  Class();
 }
diff --git a/tests/dart2js/runtime_type_closure_equals3_test.dart b/tests/dart2js/runtime_type_closure_equals3_test.dart
index ffcd03f..111ffda 100644
--- a/tests/dart2js/runtime_type_closure_equals3_test.dart
+++ b/tests/dart2js/runtime_type_closure_equals3_test.dart
@@ -2,19 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// dart2jsOptions=--strong
-
 import 'package:expect/expect.dart';
 
-String method() => null;
+String method() => throw 'unreachable';
 
 class Class1<T> {
   Class1();
 
   method() {
-    T local1a() => null;
+    T local1a() => throw 'unreachable';
 
-    T local1b() => null;
+    T local1b() => throw 'unreachable';
 
     T local2(T t, String s) => t;
 
@@ -29,6 +27,6 @@
 }
 
 main() {
-  new Class1<int>().method();
-  new Class2<int>();
+  Class1<int>().method();
+  Class2<int>();
 }
diff --git a/tests/dart2js/runtime_type_closure_equals4_test.dart b/tests/dart2js/runtime_type_closure_equals4_test.dart
index 967b5f6..f23c0c1 100644
--- a/tests/dart2js/runtime_type_closure_equals4_test.dart
+++ b/tests/dart2js/runtime_type_closure_equals4_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.
 
-// dart2jsOptions=--strong
-
 import 'package:expect/expect.dart';
 
 class Class1<T> {
@@ -21,9 +19,9 @@
 }
 
 main() {
-  var c = new Class1<int>();
+  var c = Class1<int>();
 
   Expect.isTrue(c.method1a.runtimeType == c.method1b.runtimeType);
   Expect.isFalse(c.method1a.runtimeType == c.method2.runtimeType);
-  new Class2<int>();
+  Class2<int>();
 }
diff --git a/tests/dart2js/runtime_type_closure_equals5_test.dart b/tests/dart2js/runtime_type_closure_equals5_test.dart
index 1b19f8d..c4d16a5 100644
--- a/tests/dart2js/runtime_type_closure_equals5_test.dart
+++ b/tests/dart2js/runtime_type_closure_equals5_test.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.
 
-// dart2jsOptions=--strong
-
 import 'package:expect/expect.dart';
 
 class Class1<T> {
   Class1();
 
-  T method1a() => null;
+  T method1a() => throw 'unreachable';
 
-  T method1b() => null;
+  T method1b() => throw 'unreachable';
 
   T method2(T t, String s) => t;
 }
@@ -21,9 +19,9 @@
 }
 
 main() {
-  var c = new Class1<int>();
+  var c = Class1<int>();
 
   Expect.isTrue(c.method1a.runtimeType == c.method1b.runtimeType);
   Expect.isFalse(c.method1a.runtimeType == c.method2.runtimeType);
-  new Class2<int>();
+  Class2<int>();
 }
diff --git a/tests/dart2js/runtime_type_closure_equals6_test.dart b/tests/dart2js/runtime_type_closure_equals6_test.dart
index 5090f04..84ed603 100644
--- a/tests/dart2js/runtime_type_closure_equals6_test.dart
+++ b/tests/dart2js/runtime_type_closure_equals6_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.
 
-// dart2jsOptions=--strong
-
 import 'package:expect/expect.dart';
 
 method1a() => null;
@@ -19,5 +17,5 @@
 main() {
   Expect.isTrue(method1a.runtimeType == method1b.runtimeType);
   Expect.isFalse(method1a.runtimeType == method2.runtimeType);
-  new Class<int>();
+  Class<int>();
 }
diff --git a/tests/dart2js/runtime_type_closure_equals7_test.dart b/tests/dart2js/runtime_type_closure_equals7_test.dart
index 73348c9..04d4246 100644
--- a/tests/dart2js/runtime_type_closure_equals7_test.dart
+++ b/tests/dart2js/runtime_type_closure_equals7_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
-
 import 'package:expect/expect.dart';
 
-T method1a<T>() => null;
+T method1a<T>() => throw 'unreachable';
 
-T method1b<T>() => null;
+T method1b<T>() => throw 'unreachable';
 
 T method2<T>(T t, String s) => t;
 
@@ -19,5 +17,5 @@
 main() {
   Expect.isTrue(method1a.runtimeType == method1b.runtimeType);
   Expect.isFalse(method1a.runtimeType == method2.runtimeType);
-  new Class<int>();
+  Class<int>();
 }
diff --git a/tests/dart2js/runtime_type_closure_equals8_test.dart b/tests/dart2js/runtime_type_closure_equals8_test.dart
index 5f03539..6416dba 100644
--- a/tests/dart2js/runtime_type_closure_equals8_test.dart
+++ b/tests/dart2js/runtime_type_closure_equals8_test.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.
 
-// dart2jsOptions=--strong
-
 import 'package:expect/expect.dart';
 
 class Class1<S> {
   Class1();
 
-  T method1a<T>() => null;
+  T method1a<T>() => throw 'unreachable';
 
-  T method1b<T>() => null;
+  T method1b<T>() => throw 'unreachable';
 
   T method2<T>(T t, String s) => t;
 }
@@ -21,9 +19,9 @@
 }
 
 main() {
-  var c = new Class1<int>();
+  var c = Class1<int>();
 
   Expect.isTrue(c.method1a.runtimeType == c.method1b.runtimeType);
   Expect.isFalse(c.method1a.runtimeType == c.method2.runtimeType);
-  new Class2<int>();
+  Class2<int>();
 }
diff --git a/tests/dart2js/static_field2_test.dart b/tests/dart2js/static_field2_test.dart
index d2f5cc7..c96589b 100644
--- a/tests/dart2js/static_field2_test.dart
+++ b/tests/dart2js/static_field2_test.dart
@@ -5,7 +5,7 @@
 import "package:expect/expect.dart";
 
 class A {
-  static int b;
+  static int? b;
 }
 
 main() {
diff --git a/tests/dart2js/static_field_test.dart b/tests/dart2js/static_field_test.dart
index 63c96af..f0f8d9b 100644
--- a/tests/dart2js/static_field_test.dart
+++ b/tests/dart2js/static_field_test.dart
@@ -5,7 +5,7 @@
 import "package:expect/expect.dart";
 
 class A {
-  static int b;
+  static int? b;
 
   setA(val) {
     b = val;
@@ -21,7 +21,7 @@
 }
 
 main() {
-  A a = new A();
+  A a = A();
   a.setA(42);
   Expect.equals(42, a.bar());
   Expect.equals(42, a.bar2());
diff --git a/tests/dart2js/static_var_no_initializer_test.dart b/tests/dart2js/static_var_no_initializer_test.dart
index e6cb720..8605621 100644
--- a/tests/dart2js/static_var_no_initializer_test.dart
+++ b/tests/dart2js/static_var_no_initializer_test.dart
@@ -4,8 +4,8 @@
 
 import "package:expect/expect.dart";
 
-int one;
-int x;
+int? one;
+int? x;
 
 void testOne() {
   Expect.equals(1, one);
@@ -16,7 +16,7 @@
 }
 
 void increaseX() {
-  x = x + 1;
+  x = x! + 1;
 }
 
 void main() {
@@ -26,7 +26,7 @@
   testOne();
   Expect.equals(5, x);
   testX(5);
-  x = x + 1;
+  x = x! + 1;
   Expect.equals(6, x);
   testX(6);
   increaseX();
diff --git a/tests/dart2js/string_interpolation_opt1_test.dart b/tests/dart2js/string_interpolation_opt1_test.dart
index 60e92d4..7332951 100644
--- a/tests/dart2js/string_interpolation_opt1_test.dart
+++ b/tests/dart2js/string_interpolation_opt1_test.dart
@@ -7,7 +7,7 @@
 
 // Test that String interpolation works in some optimized cases.
 
-bool get inscrutableFalse => new Random().nextDouble() > 2;
+bool get inscrutableFalse => Random().nextDouble() > 2;
 
 returnsNullOrString(x) {
   if (inscrutableFalse) return 'hi';
@@ -27,7 +27,7 @@
 }
 
 void testString() {
-  var a = new List(100); // 'null' values in here are JavaScript undefined.
+  var a = []..length = 100; // 'null' values in here are JavaScript undefined.
   spoil(a);
   var s = returnsNullOrString('hi');
   var x = a[2];
@@ -39,7 +39,7 @@
 }
 
 void testInt() {
-  var a = new List(100); // 'null' values in here are JavaScript undefined.
+  var a = []..length = 100; // 'null' values in here are JavaScript undefined.
   spoil(a);
   var s = returnsNullOrInt(123);
   var x = a[2];
diff --git a/tests/dart2js/super_constructor1_test.dart b/tests/dart2js/super_constructor1_test.dart
index a0aaf86..f177c57 100644
--- a/tests/dart2js/super_constructor1_test.dart
+++ b/tests/dart2js/super_constructor1_test.dart
@@ -4,7 +4,7 @@
 
 import "package:expect/expect.dart";
 
-String message;
+String? message;
 
 class A {
   int x;
@@ -33,7 +33,7 @@
 
 main() {
   message = '';
-  var c = new C(7);
+  var c = C(7);
   Expect.equals(27, c.x);
   Expect.equals(21, c.y);
   Expect.equals(7, c.z);
diff --git a/tests/dart2js/tear_off_types_test.dart b/tests/dart2js/tear_off_types_test.dart
index d7f6c41..daee27d 100644
--- a/tests/dart2js/tear_off_types_test.dart
+++ b/tests/dart2js/tear_off_types_test.dart
@@ -27,9 +27,9 @@
   Expect.isFalse(_test1(method1c));
 }
 
-B1 method1a() => null;
-A1<int> method1b() => null;
-A1<String> method1c() => null;
+B1 method1a() => throw 'unreachable';
+A1<int> method1b() => throw 'unreachable';
+A1<String> method1c() => throw 'unreachable';
 
 @pragma('dart2js:noInline')
 bool _test1(f) => f is A1<int> Function();
@@ -81,9 +81,9 @@
   Expect.isFalse(_test4(method4c));
 }
 
-B4 method4a() => null;
-A4<int> method4b() => null;
-A4<String> method4c() => null;
+B4 method4a() => throw 'unreachable';
+A4<int> method4b() => throw 'unreachable';
+A4<String> method4c() => throw 'unreachable';
 
 @pragma('dart4js:noInline')
 _test4(f) => f is B4 Function();
@@ -117,9 +117,9 @@
   Expect.isFalse(_test6(method6c));
 }
 
-void Function(B6) method6a() => null;
-void Function(A6<int>) method6b() => null;
-void Function(A6<String>) method6c() => null;
+void Function(B6) method6a() => throw 'unreachable';
+void Function(A6<int>) method6b() => throw 'unreachable';
+void Function(A6<String>) method6c() => throw 'unreachable';
 
 @pragma('dart6js:noInline')
 _test6(f) => f is void Function(B6) Function();
diff --git a/tests/dart2js/this_test.dart b/tests/dart2js/this_test.dart
index e0804e7..f797d88 100644
--- a/tests/dart2js/this_test.dart
+++ b/tests/dart2js/this_test.dart
@@ -5,7 +5,7 @@
 import "package:expect/expect.dart";
 
 class A {
-  int x;
+  int? x;
   getX() => this.x;
   setX(val) {
     this.x = val;
@@ -13,7 +13,7 @@
 }
 
 main() {
-  A a = new A();
+  A a = A();
   a.setX(42);
   Expect.equals(42, a.getX());
 }
diff --git a/tests/dart2js/type_argument_optimization_test.dart b/tests/dart2js/type_argument_optimization_test.dart
index 21b41c5..facb994 100644
--- a/tests/dart2js/type_argument_optimization_test.dart
+++ b/tests/dart2js/type_argument_optimization_test.dart
@@ -14,21 +14,21 @@
 class Widget {}
 
 abstract class ProxyWidget extends Widget {
-  final Widget child;
+  final Widget? child;
 
   ProxyWidget({this.child});
 }
 
 abstract class InheritedWidget extends ProxyWidget {
-  InheritedWidget({Widget child}) : super(child: child);
+  InheritedWidget({Widget? child}) : super(child: child);
 }
 
 class InheritedProvider<T> extends InheritedWidget {
-  final T _value;
-  final UpdateShouldNotify<T> _updateShouldNotify;
+  final T? _value;
+  final UpdateShouldNotify<T>? _updateShouldNotify;
 
   InheritedProvider(
-      {T value, UpdateShouldNotify<T> updateShouldNotify, Widget child})
+      {T? value, UpdateShouldNotify<T>? updateShouldNotify, Widget? child})
       : _value = value,
         _updateShouldNotify = updateShouldNotify,
         super(child: child);
@@ -73,15 +73,15 @@
 
 class ValueListenableProvider<T>
     extends ValueDelegateWidget<ValueListenable<T>> {
-  final Widget child;
+  final Widget? child;
 
-  final UpdateShouldNotify<T> updateShouldNotify;
+  final UpdateShouldNotify<T>? updateShouldNotify;
 
   ValueListenableProvider(ValueStateDelegate<ValueListenable<T>> delegate,
       this.updateShouldNotify, this.child)
       : super(delegate);
 
-  Widget build() {
+  ValueListenableBuilder<T> build() {
     return ValueListenableBuilder<T>(
       valueListenable: delegate.value,
       builder: (_, value, child) {
@@ -97,25 +97,25 @@
 }
 
 class ValueListenableBuilder<T> extends Widget {
-  final ValueListenable<T> valueListenable;
-  final ValueWidgetBuilder<T> builder;
-  final Widget child;
+  final ValueListenable<T>? valueListenable;
+  final ValueWidgetBuilder<T>? builder;
+  final Widget? child;
 
   ValueListenableBuilder({this.valueListenable, this.builder, this.child});
 }
 
 void main() {
-  print(create(42).valueListenable.value);
-  print(create('foo').valueListenable.value);
+  print(create(42).valueListenable!.value);
+  print(create('foo').valueListenable!.value);
 }
 
 ValueListenableBuilder<T> create<T>(T value) {
-  ValueListenableImpl<T> valueListenable = new ValueListenableImpl<T>(value);
+  ValueListenableImpl<T> valueListenable = ValueListenableImpl<T>(value);
   ValueStateDelegateImpl<ValueListenable<T>> valueStateDelegate =
-      new ValueStateDelegateImpl<ValueListenable<T>>(valueListenable);
+      ValueStateDelegateImpl<ValueListenable<T>>(valueListenable);
   ValueListenableProvider<T> valueListenableProvider =
-      new ValueListenableProvider<T>(valueStateDelegate, null, null);
-  Widget widget = valueListenableProvider.build();
+      ValueListenableProvider<T>(valueStateDelegate, null, null);
+  ValueListenableBuilder<T> widget = valueListenableProvider.build();
   print(value);
   return widget;
 }
diff --git a/tests/dart2js_2/41449c_test.dart b/tests/dart2js_2/41449c_test.dart
new file mode 100644
index 0000000..3b0ee51
--- /dev/null
+++ b/tests/dart2js_2/41449c_test.dart
@@ -0,0 +1,59 @@
+// 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=-O4
+
+// @dart = 2.7
+
+// 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_2/internal/deferred/load_in_correct_order_lib1.dart b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib1.dart
index 3b9163d..83f5706 100644
--- a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib1.dart
+++ b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib1.dart
@@ -1,9 +1,9 @@
+// @dart = 2.7
+
 import 'load_in_correct_order_lib4.dart';
 import 'load_in_correct_order_lib5.dart';
 import 'load_in_correct_order_lib7.dart';
 
-// @dart = 2.7
-
 class C1 {
   final a;
   final b;
diff --git a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib2.dart b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib2.dart
index 92b26b4..e1ed850 100644
--- a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib2.dart
+++ b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib2.dart
@@ -1,9 +1,9 @@
+// @dart = 2.7
+
 import 'load_in_correct_order_lib5.dart';
 import 'load_in_correct_order_lib6.dart';
 import 'load_in_correct_order_lib7.dart';
 
-// @dart = 2.7
-
 class C2 {
   final c;
   final d;
diff --git a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib3.dart b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib3.dart
index 1320396..0aa50ca 100644
--- a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib3.dart
+++ b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib3.dart
@@ -1,9 +1,9 @@
+// @dart = 2.7
+
 import 'load_in_correct_order_lib4.dart';
 import 'load_in_correct_order_lib6.dart';
 import 'load_in_correct_order_lib7.dart';
 
-// @dart = 2.7
-
 class C3 {
   final e;
   final f;
diff --git a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib4.dart b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib4.dart
index e94a037..2d06764 100644
--- a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib4.dart
+++ b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib4.dart
@@ -1,8 +1,8 @@
+// @dart = 2.7
+
 class C4 {
   final value = 499;
   const C4();
-
-// @dart = 2.7
 }
 
 const c4 = const C4();
diff --git a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib5.dart b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib5.dart
index ca4085f..db0345b 100644
--- a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib5.dart
+++ b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib5.dart
@@ -1,8 +1,8 @@
+// @dart = 2.7
+
 class C5 {
   final value = 500;
   const C5();
-
-// @dart = 2.7
 }
 
 const c5 = const C5();
diff --git a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib6.dart b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib6.dart
index 32f0093..a78e3ed 100644
--- a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib6.dart
+++ b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib6.dart
@@ -1,8 +1,8 @@
+// @dart = 2.7
+
 class C6 {
   final value = 501;
   const C6();
-
-// @dart = 2.7
 }
 
 const c6 = const C6();
diff --git a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib7.dart b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib7.dart
index 8056e2f..7359834 100644
--- a/tests/dart2js_2/internal/deferred/load_in_correct_order_lib7.dart
+++ b/tests/dart2js_2/internal/deferred/load_in_correct_order_lib7.dart
@@ -1,8 +1,8 @@
+// @dart = 2.7
+
 class C7 {
   final value = 502;
   const C7();
-
-// @dart = 2.7
 }
 
 const c7 = const C7();
diff --git a/tests/dart2js_2/internal/rti/required_named_parameters_test.dart b/tests/dart2js_2/internal/rti/required_named_parameters_test.dart
index 309a381..c07f7a4 100644
--- a/tests/dart2js_2/internal/rti/required_named_parameters_test.dart
+++ b/tests/dart2js_2/internal/rti/required_named_parameters_test.dart
@@ -51,11 +51,11 @@
 
   // Subtype may not redeclare optional parameters as required
   rti2 = rti.testingUniverseEval(universe, "@(A,{a!A,b!A,c!A})");
-  Expect.isFalse(rti.testingIsSubtype(universe, rti2, rti1));
+  Expect.equals(isWeakMode, rti.testingIsSubtype(universe, rti2, rti1));
 
   // Subtype may not declare new required named parameters
   rti2 = rti.testingUniverseEval(universe, "@(A,{a!A,b:A,c!A,d!A})");
-  Expect.isFalse(rti.testingIsSubtype(universe, rti2, rti1));
+  Expect.equals(isWeakMode, rti.testingIsSubtype(universe, rti2, rti1));
 
   // Rti.toString() appears as expected
   Expect.equals('(B, {required B a, B b, required B c}) => dynamic',
diff --git a/tests/dart2js_2/jsinterop_test.dart b/tests/dart2js_2/jsinterop_test.dart
index b9fb820..2db564c 100644
--- a/tests/dart2js_2/jsinterop_test.dart
+++ b/tests/dart2js_2/jsinterop_test.dart
@@ -60,16 +60,16 @@
   // NON_NATIVE_EXTERNAL                 //# 09: compile-time error
   external factory Class.externalFact(); //# 09: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 10: compile-time error
+  @JS('a') // GENERIC, GENERIC  //# 10: compile-time error
   Class.jsInteropGenerative(); //# 10: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 11: compile-time error
+  @JS('a') // GENERIC  //# 11: compile-time error
   factory Class.jsInteropFact() => null; //# 11: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 12: compile-time error
+  @JS('a') // GENERIC  //# 12: compile-time error
   external Class.externalJsInteropGenerative(); //# 12: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 13: compile-time error
+  @JS('a') // GENERIC  //# 13: compile-time error
   external factory Class.externalJsInteropFact(); //# 13: continued
 
   var instanceField;
@@ -82,28 +82,28 @@
   static set staticSetter(_) {}
   static staticMethod() {}
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 14: compile-time error
+  @JS('a') // GENERIC  //# 14: compile-time error
   var instanceJsInteropField; //# 14: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 15: compile-time error
+  @JS('a') // GENERIC  //# 15: compile-time error
   get instanceJsInteropGetter => null; //# 15: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 16: compile-time error
+  @JS('a') // GENERIC  //# 16: compile-time error
   set instanceJsInteropSetter(_) {} //# 16: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 17: compile-time error
+  @JS('a') // GENERIC  //# 17: compile-time error
   instanceJsInteropMethod() {} //# 17: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 18: compile-time error
+  @JS('a') // GENERIC  //# 18: compile-time error
   static var staticJsInteropField; //# 18: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 19: compile-time error
+  @JS('a') // GENERIC  //# 19: compile-time error
   static get staticJsInteropGetter => null; //# 19: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 20: compile-time error
+  @JS('a') // GENERIC  //# 20: compile-time error
   static set staticJsInteropSetter(_) {} //# 20: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 21: compile-time error
+  @JS('a') // GENERIC  //# 21: compile-time error
   static staticJsInteropMethod() {} //# 21: continued
 
   // NON_NATIVE_EXTERNAL               //# 22: compile-time error
@@ -124,22 +124,22 @@
   // NON_NATIVE_EXTERNAL           //# 27: compile-time error
   external static externalStaticMethod(); //# 27: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 28: compile-time error
+  @JS('a') // GENERIC  //# 28: compile-time error
   external get externalInstanceJsInteropGetter; //# 28: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 29: compile-time error
+  @JS('a') // GENERIC  //# 29: compile-time error
   external set externalInstanceJsInteropSetter(_); //# 29: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 30: compile-time error
+  @JS('a') // GENERIC  //# 30: compile-time error
   external externalInstanceJsInteropMethod(); //# 30: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 31: compile-time error
+  @JS('a') // GENERIC  //# 31: compile-time error
   external static get externalStaticJsInteropGetter; //# 31: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 32: compile-time error
+  @JS('a') // GENERIC  //# 32: compile-time error
   external static set externalStaticJsInteropSetter(_); //# 32: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 33: compile-time error
+  @JS('a') // GENERIC  //# 33: compile-time error
   external static externalStaticJsInteropMethod(); //# 33: continued
 }
 
diff --git a/tests/dart2js_2/non_jsinterop_test.dart b/tests/dart2js_2/non_jsinterop_test.dart
index abf7672..1bac858 100644
--- a/tests/dart2js_2/non_jsinterop_test.dart
+++ b/tests/dart2js_2/non_jsinterop_test.dart
@@ -62,16 +62,16 @@
   // NON_NATIVE_EXTERNAL                 //# 09: compile-time error
   external factory Class.externalFact(); //# 09: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 10: compile-time error
+  @JS('a') // GENERIC, GENERIC  //# 10: compile-time error
   Class.jsInteropGenerative(); //# 10: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 11: compile-time error
+  @JS('a') // GENERIC  //# 11: compile-time error
   factory Class.jsInteropFact() => null; //# 11: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 12: compile-time error
+  @JS('a') // GENERIC  //# 12: compile-time error
   external Class.externalJsInteropGenerative(); //# 12: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 13: compile-time error
+  @JS('a') // GENERIC  //# 13: compile-time error
   external factory Class.externalJsInteropFact(); //# 13: continued
 
   var instanceField;
@@ -84,28 +84,28 @@
   static set staticSetter(_) {}
   static staticMethod() {}
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 14: compile-time error
+  @JS('a') // GENERIC  //# 14: compile-time error
   var instanceJsInteropField; //# 14: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 15: compile-time error
+  @JS('a') // GENERIC  //# 15: compile-time error
   get instanceJsInteropGetter => null; //# 15: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 16: compile-time error
+  @JS('a') // GENERIC  //# 16: compile-time error
   set instanceJsInteropSetter(_) {} //# 16: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 17: compile-time error
+  @JS('a') // GENERIC  //# 17: compile-time error
   instanceJsInteropMethod() {} //# 17: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 18: compile-time error
+  @JS('a') // GENERIC  //# 18: compile-time error
   static var staticJsInteropField; //# 18: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 19: compile-time error
+  @JS('a') // GENERIC  //# 19: compile-time error
   static get staticJsInteropGetter => null; //# 19: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 20: compile-time error
+  @JS('a') // GENERIC  //# 20: compile-time error
   static set staticJsInteropSetter(_) {} //# 20: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 21: compile-time error
+  @JS('a') // GENERIC  //# 21: compile-time error
   static staticJsInteropMethod() {} //# 21: continued
 
   // NON_NATIVE_EXTERNAL               //# 22: compile-time error
@@ -126,22 +126,22 @@
   // NON_NATIVE_EXTERNAL           //# 27: compile-time error
   external static externalStaticMethod(); //# 27: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 28: compile-time error
+  @JS('a') // GENERIC  //# 28: compile-time error
   external get externalInstanceJsInteropGetter; //# 28: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 29: compile-time error
+  @JS('a') // GENERIC  //# 29: compile-time error
   external set externalInstanceJsInteropSetter(_); //# 29: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 30: compile-time error
+  @JS('a') // GENERIC  //# 30: compile-time error
   external externalInstanceJsInteropMethod(); //# 30: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 31: compile-time error
+  @JS('a') // GENERIC  //# 31: compile-time error
   external static get externalStaticJsInteropGetter; //# 31: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 32: compile-time error
+  @JS('a') // GENERIC  //# 32: compile-time error
   external static set externalStaticJsInteropSetter(_); //# 32: continued
 
-  @JS('a') // JS_INTEROP_MEMBER_IN_NON_JS_INTEROP_CLASS  //# 33: compile-time error
+  @JS('a') // GENERIC  //# 33: compile-time error
   external static externalStaticJsInteropMethod(); //# 33: continued
 }
 
diff --git a/tests/dartdevc/const_test.dart b/tests/dartdevc/const_test.dart
index b2dbf27..b39656d95 100644
--- a/tests/dartdevc/const_test.dart
+++ b/tests/dartdevc/const_test.dart
@@ -7,7 +7,7 @@
 import 'dart:_runtime' as dart;
 
 void main() {
-  var data = JS('', '[1, 2, 3, 4]');
+  dynamic data = JS('', '[1, 2, 3, 4]');
   Expect.isFalse(data is List<int>);
 
   var list = dart.constList(data, dart.unwrapType(int));
diff --git a/tests/dartdevc/hot_restart_timer_test.dart b/tests/dartdevc/hot_restart_timer_test.dart
index 9685f51..4bacc82 100644
--- a/tests/dartdevc/hot_restart_timer_test.dart
+++ b/tests/dartdevc/hot_restart_timer_test.dart
@@ -11,7 +11,7 @@
   await periodicTest();
 }
 
-void timeoutTest() async {
+Future<void> timeoutTest() async {
   bool beforeRestart = true;
   bool calledBeforeRestart = false;
   bool calledAfterRestart = false;
@@ -31,7 +31,7 @@
   Expect.isFalse(calledAfterRestart);
 }
 
-void periodicTest() async {
+Future<void> periodicTest() async {
   bool beforeRestart = true;
   bool calledBeforeRestart = false;
   bool calledAfterRestart = false;
diff --git a/tests/dartdevc/variance_subtype_test.dart b/tests/dartdevc/variance_subtype_test.dart
index 108ec64..7200987 100644
--- a/tests/dartdevc/variance_subtype_test.dart
+++ b/tests/dartdevc/variance_subtype_test.dart
@@ -43,17 +43,17 @@
   // Invariant<Middle> <: Invariant<Middle>
   checkSubtype(typeRep<Invariant<Middle>>(), typeRep<Invariant<Middle>>());
 
-  // Invariant<dynamic> <:> Invariant<Object>
+  // Invariant<dynamic> <:> Invariant<Object?>
   checkMutualSubtype(
-      typeRep<Invariant<dynamic>>(), typeRep<Invariant<Object>>());
+      typeRep<Invariant<dynamic>>(), typeRep<Invariant<Object?>>());
 
   // Invariant<FutureOr<dynamic>> <:> Invariant<dynamic>
   checkMutualSubtype(
       typeRep<Invariant<FutureOr<dynamic>>>(), typeRep<Invariant<dynamic>>());
 
-  // Invariant<FutureOr<Null>> <:> Invariant<Future<Null>>
+  // Invariant<FutureOr<Null>> <:> Invariant<Future<Null>?>
   checkMutualSubtype(
-      typeRep<Invariant<FutureOr<Null>>>(), typeRep<Invariant<Future<Null>>>());
+      typeRep<Invariant<FutureOr<Null>>>(), typeRep<Invariant<Future<Null>?>>());
 
   // LegacyCovariant<Lower> <: LegacyCovariant<Middle>
   checkProperSubtype(
diff --git a/tests/dartdevc/variance_test.dart b/tests/dartdevc/variance_test.dart
index 69c7679..f3bcf75 100644
--- a/tests/dartdevc/variance_test.dart
+++ b/tests/dartdevc/variance_test.dart
@@ -7,7 +7,7 @@
 // Tests the emission of explicit variance modifiers.
 
 import 'dart:_runtime'
-    show wrapType, unwrapType, getGenericArgVariances, Variance, typeRep;
+    show getGenericArgVariances, Variance, typeRep;
 
 import 'package:expect/expect.dart';
 
@@ -25,27 +25,27 @@
 
 class G<inout T> = Object with F<T>;
 
-List getVariances(Object t) {
-  // TODO(nshahan) Update to handle legacy wrapper when we unfork dart:_runtime.
-  var type = unwrapType(wrapType(t));
+List? getVariances(Object type) {
+  // TODO(nshahan) Revisit when we decide if getGenericArgVariances will handle
+  // legacy and nullable wrappers.
   return getGenericArgVariances(type);
 }
 
 main() {
-  Expect.listEquals([Variance.contravariant], getVariances(typeRep<A>()));
+  Expect.listEquals([Variance.contravariant], getVariances(typeRep<A>())!);
 
-  Expect.listEquals([Variance.covariant], getVariances(typeRep<B>()));
+  Expect.listEquals([Variance.covariant], getVariances(typeRep<B>())!);
 
-  Expect.listEquals([Variance.invariant], getVariances(typeRep<C>()));
+  Expect.listEquals([Variance.invariant], getVariances(typeRep<C>())!);
 
   // Implicit variance is not emitted into the generated code.
   Expect.isNull(getVariances(typeRep<D>()));
 
   Expect.listEquals(
       [Variance.invariant, Variance.covariant, Variance.contravariant],
-      getVariances(typeRep<E>()));
+      getVariances(typeRep<E>())!);
 
-  Expect.listEquals([Variance.contravariant], getVariances(typeRep<F>()));
+  Expect.listEquals([Variance.contravariant], getVariances(typeRep<F>())!);
 
-  Expect.listEquals([Variance.invariant], getVariances(typeRep<G>()));
+  Expect.listEquals([Variance.invariant], getVariances(typeRep<G>())!);
 }
diff --git a/tests/dartdevc_2/variance_test.dart b/tests/dartdevc_2/variance_test.dart
index ac2e683..6d84f2f 100644
--- a/tests/dartdevc_2/variance_test.dart
+++ b/tests/dartdevc_2/variance_test.dart
@@ -9,7 +9,7 @@
 // Tests the emission of explicit variance modifiers.
 
 import 'dart:_runtime'
-    show wrapType, unwrapType, getGenericArgVariances, Variance, typeRep;
+    show getGenericArgVariances, Variance, legacyTypeRep;
 
 import 'package:expect/expect.dart';
 
@@ -27,27 +27,27 @@
 
 class G<inout T> = Object with F<T>;
 
-List getVariances(Object t) {
-  // TODO(nshahan) Update to handle legacy wrapper when we unfork dart:_runtime.
-  var type = unwrapType(wrapType(t));
-  return getGenericArgVariances(type);
+List getVariances(dynamic type) {
+  // TODO(nshahan) Revisit when we decide if getGenericArgVariances will handle
+  // legacy and nullable wrappers.
+  return getGenericArgVariances(type.type);
 }
 
 main() {
-  Expect.listEquals([Variance.contravariant], getVariances(typeRep<A>()));
+  Expect.listEquals([Variance.contravariant], getVariances(legacyTypeRep<A>()));
 
-  Expect.listEquals([Variance.covariant], getVariances(typeRep<B>()));
+  Expect.listEquals([Variance.covariant], getVariances(legacyTypeRep<B>()));
 
-  Expect.listEquals([Variance.invariant], getVariances(typeRep<C>()));
+  Expect.listEquals([Variance.invariant], getVariances(legacyTypeRep<C>()));
 
   // Implicit variance is not emitted into the generated code.
-  Expect.isNull(getVariances(typeRep<D>()));
+  Expect.isNull(getVariances(legacyTypeRep<D>()));
 
   Expect.listEquals(
       [Variance.invariant, Variance.covariant, Variance.contravariant],
-      getVariances(typeRep<E>()));
+      getVariances(legacyTypeRep<E>()));
 
-  Expect.listEquals([Variance.contravariant], getVariances(typeRep<F>()));
+  Expect.listEquals([Variance.contravariant], getVariances(legacyTypeRep<F>()));
 
-  Expect.listEquals([Variance.invariant], getVariances(typeRep<G>()));
+  Expect.listEquals([Variance.invariant], getVariances(legacyTypeRep<G>()));
 }
diff --git a/tests/ffi/coordinate_nnbd_workaround.dart b/tests/ffi/coordinate_nnbd_workaround.dart
new file mode 100644
index 0000000..515badd
--- /dev/null
+++ b/tests/ffi/coordinate_nnbd_workaround.dart
@@ -0,0 +1,29 @@
+// 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.
+
+library FfiTest;
+
+import 'dart:ffi';
+import "package:ffi/ffi.dart";
+
+/// Sample struct for dart:ffi library.
+class Coordinate extends Struct {
+  @Double()
+  external double get x;
+  external set x(double v);
+
+  @Double()
+  external double get y;
+  external set y(double v);
+
+  external Pointer<Coordinate> get next;
+  external set next(Pointer<Coordinate> v);
+
+  factory Coordinate.allocate(double x, double y, Pointer<Coordinate> next) {
+    return allocate<Coordinate>().ref
+      ..x = x
+      ..y = y
+      ..next = next;
+  }
+}
diff --git a/tests/ffi/dylib_isolates_test.dart b/tests/ffi/dylib_isolates_test.dart
new file mode 100644
index 0000000..5eb73ef
--- /dev/null
+++ b/tests/ffi/dylib_isolates_test.dart
@@ -0,0 +1,41 @@
+// 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 for DynamicLibrary.open behavior on multiple isolates.
+//
+// SharedObjects=ffi_test_functions
+
+import 'dart:ffi';
+import 'dart:isolate';
+
+import "package:expect/expect.dart";
+
+import 'dylib_utils.dart';
+
+void main() async {
+  final dl = dlopenPlatformSpecific('ffi_test_functions');
+  final dl2 = dlopenPlatformSpecific('ffi_test_functions');
+  Expect.equals(dl, dl2);
+  Expect.isFalse(identical(dl, dl2));
+
+  final setGlobalVar = dl
+      .lookupFunction<Void Function(Int32), void Function(int)>('SetGlobalVar');
+  final getGlobalVar =
+      dl.lookupFunction<Int32 Function(), int Function()>('GetGlobalVar');
+  setGlobalVar(123);
+  Expect.equals(123, getGlobalVar());
+
+  final receivePort = ReceivePort();
+  Isolate.spawn(secondIsolateMain, receivePort.sendPort);
+  await receivePort.first;
+  Expect.equals(42, getGlobalVar());
+}
+
+void secondIsolateMain(SendPort sendPort) {
+  final dl = dlopenPlatformSpecific('ffi_test_functions');
+  final setGlobalVar = dl
+      .lookupFunction<Void Function(Int32), void Function(int)>('SetGlobalVar');
+  setGlobalVar(42);
+  sendPort.send('done');
+}
diff --git a/tests/ffi/structs_nnbd_workaround_test.dart b/tests/ffi/structs_nnbd_workaround_test.dart
new file mode 100644
index 0000000..6501faf
--- /dev/null
+++ b/tests/ffi/structs_nnbd_workaround_test.dart
@@ -0,0 +1,100 @@
+// 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 test program for testing dart:ffi struct pointers.
+//
+// VMOptions=--deterministic --optimization-counter-threshold=50
+
+import 'dart:ffi';
+
+import "package:expect/expect.dart";
+import "package:ffi/ffi.dart";
+
+import 'coordinate_nnbd_workaround.dart';
+
+void main() {
+  for (int i = 0; i < 100; i++) {
+    testStructAllocate();
+    testStructFromAddress();
+    testStructWithNulls();
+    testTypeTest();
+    testUtf8();
+  }
+}
+
+/// allocates each coordinate separately in c memory
+void testStructAllocate() {
+  Pointer<Coordinate> c1 = Coordinate.allocate(10.0, 10.0, nullptr).addressOf;
+  Pointer<Coordinate> c2 = Coordinate.allocate(20.0, 20.0, c1).addressOf;
+  Pointer<Coordinate> c3 = Coordinate.allocate(30.0, 30.0, c2).addressOf;
+  c1.ref.next = c3;
+
+  Coordinate currentCoordinate = c1.ref;
+  Expect.equals(10.0, currentCoordinate.x);
+  currentCoordinate = currentCoordinate.next.ref;
+  Expect.equals(30.0, currentCoordinate.x);
+  currentCoordinate = currentCoordinate.next.ref;
+  Expect.equals(20.0, currentCoordinate.x);
+  currentCoordinate = currentCoordinate.next.ref;
+  Expect.equals(10.0, currentCoordinate.x);
+
+  free(c1);
+  free(c2);
+  free(c3);
+}
+
+/// allocates coordinates consecutively in c memory
+void testStructFromAddress() {
+  Pointer<Coordinate> c1 = allocate(count: 3);
+  Pointer<Coordinate> c2 = c1.elementAt(1);
+  Pointer<Coordinate> c3 = c1.elementAt(2);
+  c1.ref
+    ..x = 10.0
+    ..y = 10.0
+    ..next = c3;
+  c2.ref
+    ..x = 20.0
+    ..y = 20.0
+    ..next = c1;
+  c3.ref
+    ..x = 30.0
+    ..y = 30.0
+    ..next = c2;
+
+  Coordinate currentCoordinate = c1.ref;
+  Expect.equals(10.0, currentCoordinate.x);
+  currentCoordinate = currentCoordinate.next.ref;
+  Expect.equals(30.0, currentCoordinate.x);
+  currentCoordinate = currentCoordinate.next.ref;
+  Expect.equals(20.0, currentCoordinate.x);
+  currentCoordinate = currentCoordinate.next.ref;
+  Expect.equals(10.0, currentCoordinate.x);
+
+  free(c1);
+}
+
+void testStructWithNulls() {
+  Pointer<Coordinate> coordinate =
+      Coordinate.allocate(10.0, 10.0, nullptr).addressOf;
+  Expect.equals(coordinate.ref.next, nullptr);
+  coordinate.ref.next = coordinate;
+  Expect.notEquals(coordinate.ref.next, nullptr);
+  coordinate.ref.next = nullptr;
+  Expect.equals(coordinate.ref.next, nullptr);
+  free(coordinate);
+}
+
+void testTypeTest() {
+  Coordinate c = Coordinate.allocate(10, 10, nullptr);
+  Expect.isTrue(c is Struct);
+  Expect.isTrue(c.addressOf is Pointer<Coordinate>);
+  free(c.addressOf);
+}
+
+void testUtf8() {
+  final String test = 'Hasta Mañana';
+  final Pointer<Utf8> medium = Utf8.toUtf8(test);
+  Expect.equals(test, Utf8.fromUtf8(medium));
+  free(medium);
+}
diff --git a/tests/ffi/vmspecific_handle_dynamically_linked_test.dart b/tests/ffi/vmspecific_handle_dynamically_linked_test.dart
index e2237e8..6422958 100644
--- a/tests/ffi/vmspecific_handle_dynamically_linked_test.dart
+++ b/tests/ffi/vmspecific_handle_dynamically_linked_test.dart
@@ -17,7 +17,7 @@
 
 void doDynamicLinking() {
   Expect.isTrue(NativeApi.majorVersion == 1);
-  Expect.isTrue(NativeApi.minorVersion >= 0);
+  Expect.isTrue(NativeApi.minorVersion >= 1);
   final initializeApi = testLibrary.lookupFunction<
       IntPtr Function(Pointer<Void>),
       int Function(Pointer<Void>)>("InitDartApiDL");
diff --git a/tests/ffi_2/dylib_isolates_test.dart b/tests/ffi_2/dylib_isolates_test.dart
new file mode 100644
index 0000000..5eb73ef
--- /dev/null
+++ b/tests/ffi_2/dylib_isolates_test.dart
@@ -0,0 +1,41 @@
+// 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 for DynamicLibrary.open behavior on multiple isolates.
+//
+// SharedObjects=ffi_test_functions
+
+import 'dart:ffi';
+import 'dart:isolate';
+
+import "package:expect/expect.dart";
+
+import 'dylib_utils.dart';
+
+void main() async {
+  final dl = dlopenPlatformSpecific('ffi_test_functions');
+  final dl2 = dlopenPlatformSpecific('ffi_test_functions');
+  Expect.equals(dl, dl2);
+  Expect.isFalse(identical(dl, dl2));
+
+  final setGlobalVar = dl
+      .lookupFunction<Void Function(Int32), void Function(int)>('SetGlobalVar');
+  final getGlobalVar =
+      dl.lookupFunction<Int32 Function(), int Function()>('GetGlobalVar');
+  setGlobalVar(123);
+  Expect.equals(123, getGlobalVar());
+
+  final receivePort = ReceivePort();
+  Isolate.spawn(secondIsolateMain, receivePort.sendPort);
+  await receivePort.first;
+  Expect.equals(42, getGlobalVar());
+}
+
+void secondIsolateMain(SendPort sendPort) {
+  final dl = dlopenPlatformSpecific('ffi_test_functions');
+  final setGlobalVar = dl
+      .lookupFunction<Void Function(Int32), void Function(int)>('SetGlobalVar');
+  setGlobalVar(42);
+  sendPort.send('done');
+}
diff --git a/tests/ffi_2/function_structs_test.dart b/tests/ffi_2/function_structs_test.dart
index 3738876..bf9ea5f 100644
--- a/tests/ffi_2/function_structs_test.dart
+++ b/tests/ffi_2/function_structs_test.dart
@@ -21,8 +21,8 @@
 
 void main() {
   testFunctionWithStruct();
-  // testFunctionWithStructArray();
-  // testFunctionWithVeryLargeStruct();
+  testFunctionWithStructArray();
+  testFunctionWithVeryLargeStruct();
 }
 
 DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions");
diff --git a/tests/ffi_2/vmspecific_handle_dynamically_linked_test.dart b/tests/ffi_2/vmspecific_handle_dynamically_linked_test.dart
index e2237e8..6422958 100644
--- a/tests/ffi_2/vmspecific_handle_dynamically_linked_test.dart
+++ b/tests/ffi_2/vmspecific_handle_dynamically_linked_test.dart
@@ -17,7 +17,7 @@
 
 void doDynamicLinking() {
   Expect.isTrue(NativeApi.majorVersion == 1);
-  Expect.isTrue(NativeApi.minorVersion >= 0);
+  Expect.isTrue(NativeApi.minorVersion >= 1);
   final initializeApi = testLibrary.lookupFunction<
       IntPtr Function(Pointer<Void>),
       int Function(Pointer<Void>)>("InitDartApiDL");
diff --git a/tests/language/abstract/exact_selector_test.dart b/tests/language/abstract/exact_selector_test.dart
index 4fea94c..0df1020 100644
--- a/tests/language/abstract/exact_selector_test.dart
+++ b/tests/language/abstract/exact_selector_test.dart
@@ -17,7 +17,7 @@
   (() => 42)();
   return new Foo();
   //         ^^^
-  // [analyzer] STATIC_WARNING.INSTANTIATE_ABSTRACT_CLASS
+  // [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS
   // [cfe] The class 'Foo' is abstract and can't be instantiated.
 }
 
diff --git a/tests/language/abstract/factory_constructor_test.dart b/tests/language/abstract/factory_constructor_test.dart
index bda6a23..810a3fa 100644
--- a/tests/language/abstract/factory_constructor_test.dart
+++ b/tests/language/abstract/factory_constructor_test.dart
@@ -26,7 +26,7 @@
   // Intentionally abstract method.
   method();
 //^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   A2.make() {}
 }
 
diff --git a/tests/language/abstract/getter_test.dart b/tests/language/abstract/getter_test.dart
index fe5acdf..74d51da 100644
--- a/tests/language/abstract/getter_test.dart
+++ b/tests/language/abstract/getter_test.dart
@@ -13,7 +13,7 @@
   // Intentionally abstract:
   get i;
 //^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 }
 
 class Bar {}
diff --git a/tests/language/abstract/syntax_test.dart b/tests/language/abstract/syntax_test.dart
index 1b617fd..a51480b 100644
--- a/tests/language/abstract/syntax_test.dart
+++ b/tests/language/abstract/syntax_test.dart
@@ -14,7 +14,7 @@
 // [cfe] The non-abstract class 'A' is missing implementations for these members:
   foo();
 //^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   static bar();
   //          ^
   // [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY
diff --git a/tests/language/argument/assignability_function_typed_test.dart b/tests/language/argument/assignability_function_typed_test.dart
index 5e1fb52..fe17a15 100644
--- a/tests/language/argument/assignability_function_typed_test.dart
+++ b/tests/language/argument/assignability_function_typed_test.dart
@@ -20,25 +20,25 @@
   // Unrelated types (not assignable).
   f(intToInt);
   //^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int Function(int)' can't be assigned to the parameter type 'num Function(num)'.
   f(objectToObject);
   //^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'Object Function(Object)' can't be assigned to the parameter type 'num Function(num)'.
 
   // Downcasts.
   f(intToObject);
   //^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The top level function has type 'Object Function(int)' that isn't of expected type 'num Function(num)'.
   f(intToNum);
   //^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The top level function has type 'num Function(int)' that isn't of expected type 'num Function(num)'.
   f(numToObject);
   //^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The top level function has type 'Object Function(num)' that isn't of expected type 'num Function(num)'.
 
   // Ok.
diff --git a/tests/language/assert/initializer_const_function_test.dart b/tests/language/assert/initializer_const_function_test.dart
index 27b99bd..b581c1d 100644
--- a/tests/language/assert/initializer_const_function_test.dart
+++ b/tests/language/assert/initializer_const_function_test.dart
@@ -11,7 +11,7 @@
   const C.bc01(this.x, y)
       : assert(staticTrue)
       //       ^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_EXPRESSION
+      // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_EXPRESSION
       // [cfe] A value of type 'bool Function()' can't be assigned to a variable of type 'bool'.
       ;
 }
diff --git a/tests/language/assign/static_type_test.dart b/tests/language/assign/static_type_test.dart
index d184bf4..2362a6f 100644
--- a/tests/language/assign/static_type_test.dart
+++ b/tests/language/assign/static_type_test.dart
@@ -7,28 +7,28 @@
 
 int a = "String";
 //      ^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 
 class A {
   static const int c = "String";
   //                   ^^^^^^^^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
+  // [analyzer] COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                   ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   final int d = "String";
   //            ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   int e = "String";
   //      ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   A() {
      int f = "String";
      //      ^^^^^^^^
-     // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+     // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
      // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   }
   method(
@@ -36,7 +36,7 @@
      int
       g = "String"]) {
       //  ^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
     return g;
   }
diff --git a/tests/language/assign/to_type_test.dart b/tests/language/assign/to_type_test.dart
index f6f8f29..44d4545 100644
--- a/tests/language/assign/to_type_test.dart
+++ b/tests/language/assign/to_type_test.dart
@@ -9,7 +9,7 @@
   f() {
     T = Null;
 //  ^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
   }
 }
@@ -24,14 +24,14 @@
   new C<D>().f();
   D = Null;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
   E = Null;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
   F = Null;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
 }
diff --git a/tests/language/async/congruence_local_test.dart b/tests/language/async/congruence_local_test.dart
index 6ea20da..15e27a2 100644
--- a/tests/language/async/congruence_local_test.dart
+++ b/tests/language/async/congruence_local_test.dart
@@ -100,7 +100,7 @@
     Future<Object> v1 = f_inferred_futureObject();
     Future<int> v2 = f_inferred_futureObject();
     //               ^^^^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                                      ^
     // [cfe] A value of type 'Future<Object>' can't be assigned to a variable of type 'Future<int>'.
 
@@ -110,7 +110,7 @@
     Future<A> v3 = f_inferred_A();
     Future<B> v4 = f_inferred_A();
     //             ^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                         ^
     // [cfe] A value of type 'Future<A>' can't be assigned to a variable of type 'Future<B>'.
   }
diff --git a/tests/language/async/congruence_method_test.dart b/tests/language/async/congruence_method_test.dart
index 5732013..663fdf4 100644
--- a/tests/language/async/congruence_method_test.dart
+++ b/tests/language/async/congruence_method_test.dart
@@ -78,7 +78,7 @@
   Future<A> v1 = c.f_inferred_A();
   Future<B> v2 = c.f_inferred_A();
   //             ^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //               ^
   // [cfe] A value of type 'Future<A>' can't be assigned to a variable of type 'Future<B>'.
 }
diff --git a/tests/language/async/congruence_unnamed_test.dart b/tests/language/async/congruence_unnamed_test.dart
index 274588b..0aef8ad 100644
--- a/tests/language/async/congruence_unnamed_test.dart
+++ b/tests/language/async/congruence_unnamed_test.dart
@@ -120,7 +120,7 @@
     Future<Object> v1 = f_inferred_futureObject();
     Future<int> v2 = f_inferred_futureObject();
     //               ^^^^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                                      ^
     // [cfe] A value of type 'Future<Object>' can't be assigned to a variable of type 'Future<int>'.
 
@@ -130,7 +130,7 @@
     Future<A> v3 = f_inferred_A();
     Future<B> v4 = f_inferred_A();
     //             ^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                         ^
     // [cfe] A value of type 'Future<A>' can't be assigned to a variable of type 'Future<B>'.
   }
diff --git a/tests/language/async/or_generator_return_type_stacktrace_test.dart b/tests/language/async/or_generator_return_type_stacktrace_test.dart
index 35f1f2d..317b537 100644
--- a/tests/language/async/or_generator_return_type_stacktrace_test.dart
+++ b/tests/language/async/or_generator_return_type_stacktrace_test.dart
@@ -6,17 +6,17 @@
 
 int badReturnTypeAsync() async => 0;
 // [error line 7, column 1, length 3]
-// [analyzer] STATIC_TYPE_WARNING.ILLEGAL_ASYNC_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_ASYNC_RETURN_TYPE
 //  ^
 // [cfe] Functions marked 'async' must have a return type assignable to 'Future'.
 int badReturnTypeAsyncStar() async* {}
 // [error line 12, column 1, length 3]
-// [analyzer] STATIC_TYPE_WARNING.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
 //  ^
 // [cfe] Functions marked 'async*' must have a return type assignable to 'Stream'.
 int badReturnTypeSyncStar() sync* {}
 // [error line 17, column 1, length 3]
-// [analyzer] STATIC_TYPE_WARNING.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
 //  ^
 // [cfe] Functions marked 'sync*' must have a return type assignable to 'Iterable'.
 
diff --git a/tests/language/async/return_types_test.dart b/tests/language/async/return_types_test.dart
index 20a3c22..f378549 100644
--- a/tests/language/async/return_types_test.dart
+++ b/tests/language/async/return_types_test.dart
@@ -18,13 +18,13 @@
 foo3() async {
   return "String";
   //     ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'FutureOr<int>'.
 }
 
 Future<int, String>
 // [error line 25, column 1, length 19]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 1 type arguments.
 foo4() async {
   return "String";
@@ -32,7 +32,7 @@
 
 int
 // [error line 33, column 1, length 3]
-// [analyzer] STATIC_TYPE_WARNING.ILLEGAL_ASYNC_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_ASYNC_RETURN_TYPE
 foo5() async {
 // [error line 36, column 1, length 3]
 // [cfe] Functions marked 'async' must have a return type assignable to 'Future'.
diff --git a/tests/language/async_star/void_async_star_test.dart b/tests/language/async_star/void_async_star_test.dart
new file mode 100644
index 0000000..8e3c77d
--- /dev/null
+++ b/tests/language/async_star/void_async_star_test.dart
@@ -0,0 +1,38 @@
+// 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.
+
+// It is an error for an `async*` function to have return type `void`.
+
+import 'dart:async';
+
+/*space*/ void f1() async* {
+  //      ^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class C {
+  static void f2() async* {
+    //   ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  /*space*/ void f3() async* {
+    //      ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
+
+void main() {
+  /*space*/ void f4() async* {
+    //      ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // No function literal: It is probably not possible to infer the
+  // return type `void` for a function literal marked `async*`.
+}
diff --git a/tests/language/call/closurization_test.dart b/tests/language/call/closurization_test.dart
index 683c229..102413b 100644
--- a/tests/language/call/closurization_test.dart
+++ b/tests/language/call/closurization_test.dart
@@ -3,6 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 // VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import "package:expect/expect.dart";
 
 main() {
diff --git a/tests/language/call/constructor_on_unresolvable_class_test.dart b/tests/language/call/constructor_on_unresolvable_class_test.dart
index 3b32987..6db90ed 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A'.
   new A.foo();
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A.foo'.
   new lib.A();
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'lib.A'.
 }
diff --git a/tests/language/call/method_implicit_tear_off_assignable_test.dart b/tests/language/call/method_implicit_tear_off_assignable_test.dart
index 791b083..c1e6f25 100644
--- a/tests/language/call/method_implicit_tear_off_assignable_test.dart
+++ b/tests/language/call/method_implicit_tear_off_assignable_test.dart
@@ -17,6 +17,6 @@
   // this is a static error.
   void Function([int]) f = i;
   //                       ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] unspecified
 }
diff --git a/tests/language/call/method_implicit_tear_off_nullable_test.dart b/tests/language/call/method_implicit_tear_off_nullable_test.dart
index da2fbce..c840804 100644
--- a/tests/language/call/method_implicit_tear_off_nullable_test.dart
+++ b/tests/language/call/method_implicit_tear_off_nullable_test.dart
@@ -19,6 +19,6 @@
   // Nullable types cannot have their `.call` method implicitly torn off.
   check(c);
   //    ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
 }
diff --git a/tests/language/call/non_method_field_test.dart b/tests/language/call/non_method_field_test.dart
index 6d30f27..bb5b843 100644
--- a/tests/language/call/non_method_field_test.dart
+++ b/tests/language/call/non_method_field_test.dart
@@ -14,14 +14,14 @@
   Fisk x1 = new Fisk();
   x1.i();
 //^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //    ^
 // [cfe] 'i' isn't a function or method and can't be invoked.
 
   Hest x2 = new Hest();
   x2.i();
 //^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //    ^
 // [cfe] 'i' isn't a function or method and can't be invoked.
 }
diff --git a/tests/language/call/nonexistent_constructor_test.dart b/tests/language/call/nonexistent_constructor_test.dart
index 4649f37..4c129d0 100644
--- a/tests/language/call/nonexistent_constructor_test.dart
+++ b/tests/language/call/nonexistent_constructor_test.dart
@@ -19,10 +19,10 @@
   new A.foo(42);
   new A.bar(foo());
   //    ^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'A.bar'.
   new A();
   //  ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
   // [cfe] Method not found: 'A'.
 }
diff --git a/tests/language/call/object_has_no_call_method_test.dart b/tests/language/call/object_has_no_call_method_test.dart
index dcb2a5c..d02b290 100644
--- a/tests/language/call/object_has_no_call_method_test.dart
+++ b/tests/language/call/object_has_no_call_method_test.dart
@@ -6,20 +6,20 @@
   d();
   o();
 //^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 // ^
 // [cfe] The method 'call' isn't defined for the class 'Object'.
   f();
   d.call;
   o.call;
   //^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'call' isn't defined for the class 'Object'.
   f.call;
   d.call();
   o.call();
   //^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'call' isn't defined for the class 'Object'.
   f.call();
 }
diff --git a/tests/language/call/through_getter_test.dart b/tests/language/call/through_getter_test.dart
index 2169e8c6..06e5af3 100644
--- a/tests/language/call/through_getter_test.dart
+++ b/tests/language/call/through_getter_test.dart
@@ -31,12 +31,12 @@
 
     TOP_LEVEL_CONST();
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                 ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
     (TOP_LEVEL_CONST)();
 //  ^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                   ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
diff --git a/tests/language/cascade/cascade_test.dart b/tests/language/cascade/cascade_test.dart
index 274b23bf..7e674f5 100644
--- a/tests/language/cascade/cascade_test.dart
+++ b/tests/language/cascade/cascade_test.dart
@@ -93,11 +93,11 @@
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
   // [cfe] Expected an identifier, but got '37'.
   // [error line 91, column 8, length 0]
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   a.."foo";
   // ^^^^^
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
   // [cfe] Expected an identifier, but got '"foo"'.
   // [error line 97, column 11, length 0]
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 }
diff --git a/tests/language/class/keyword_test.dart b/tests/language/class/keyword_test.dart
index 891c4a7..5a89f2e 100644
--- a/tests/language/class/keyword_test.dart
+++ b/tests/language/class/keyword_test.dart
@@ -12,14 +12,14 @@
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 //    ^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Expected an identifier, but got 'class'.
 //    ^^^^^
 // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
 // [cfe] Setter not found: 'class'.
   print("$class");
   //      ^^^^^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Expected an identifier, but got 'class'.
   //      ^^^^^
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
diff --git a/tests/language/class/variable_shadow_class_test.dart b/tests/language/class/variable_shadow_class_test.dart
index 5e24390..3fc29e4 100644
--- a/tests/language/class/variable_shadow_class_test.dart
+++ b/tests/language/class/variable_shadow_class_test.dart
@@ -15,9 +15,8 @@
     var Test;
     // Now this refers to the variable.
     var i = new Test.named(10);
-    //          ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
     //          ^^^^
+    // [analyzer] COMPILE_TIME_ERROR.PREFIX_SHADOWED_BY_LOCAL_DECLARATION
     // [cfe] Method not found: 'Test.named'.
     Expect.equals(10, i.field);
   }
diff --git a/tests/language/closure/internals_test.dart b/tests/language/closure/internals_test.dart
index 78f04ab..9efdda3 100644
--- a/tests/language/closure/internals_test.dart
+++ b/tests/language/closure/internals_test.dart
@@ -12,14 +12,14 @@
   var f = new C().foo;
   var target = f.target;
   //             ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'target' isn't defined for the class 'dynamic Function()'.
   var self = f.self;
   //           ^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'self' isn't defined for the class 'dynamic Function()'.
   var receiver = f.receiver;
   //               ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'receiver' isn't defined for the class 'dynamic Function()'.
 }
diff --git a/tests/language/compile_time_constant/p_test.dart b/tests/language/compile_time_constant/p_test.dart
index 5c41a46..031e929 100644
--- a/tests/language/compile_time_constant/p_test.dart
+++ b/tests/language/compile_time_constant/p_test.dart
@@ -8,7 +8,7 @@
   const A(
     this.x
     //   ^
-    // [analyzer] STATIC_WARNING.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
+    // [analyzer] COMPILE_TIME_ERROR.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
     // [cfe] 'x' is a final instance variable that has already been initialized.
     //   ^
     // [cfe] Cannot invoke a non-'const' constructor where a const expression is expected.
diff --git a/tests/language/compile_time_constant/static2_test.dart b/tests/language/compile_time_constant/static2_test.dart
index 2155448..73b9dc5 100644
--- a/tests/language/compile_time_constant/static2_test.dart
+++ b/tests/language/compile_time_constant/static2_test.dart
@@ -6,57 +6,55 @@
   final int x;
   const A.a1() : x = 'foo';
   //                 ^^^^^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                 ^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE
   const A.a2(this.x);
   const A.a3([this.x = 'foo']);
   //                   ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   const A.a4(String this.x);
   //         ^^^^^^^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.INVALID_PARAMETER_DECLARATION
-  //         ^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
   //                     ^
   // [cfe] The type of parameter 'x', 'String' is not a subtype of the corresponding field's type, 'int'.
   const A.a5(String x) : this.x = x;
   //                              ^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                              ^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE
   const A.a6(int x) : this.x = x;
 }
 
 const a1 = const A.a1();
 //         ^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 const a2 = const A.a2('foo');
 //                    ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 //                    ^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 const a3 = const A.a3();
 //         ^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 const a4 = const A.a4('foo');
 //                    ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 const a5 = const A.a5('foo');
 //         ^^^^^^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 const a6 = const A.a6('foo');
 //         ^^^^^^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 //                    ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 //                    ^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 
 main() {
   print(a1);
diff --git a/tests/language/compile_time_constant/static3_test.dart b/tests/language/compile_time_constant/static3_test.dart
index 3deabbb..fff2773 100644
--- a/tests/language/compile_time_constant/static3_test.dart
+++ b/tests/language/compile_time_constant/static3_test.dart
@@ -6,57 +6,55 @@
   final int x;
   const A.a1() : x = 'foo';
   //                 ^^^^^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                 ^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE
   const A.a2(this.x);
   const A.a3([this.x = 'foo']);
   //                   ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   const A.a4(String this.x);
   //         ^^^^^^^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.INVALID_PARAMETER_DECLARATION
-  //         ^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
   //                     ^
   // [cfe] The type of parameter 'x', 'String' is not a subtype of the corresponding field's type, 'int'.
   const A.a5(String x) : this.x = x;
   //                              ^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                              ^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE
   const A.a6(int x) : this.x = x;
 }
 
 var a1 = const A.a1();
 //       ^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 var a2 = const A.a2('foo');
 //                  ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 //                  ^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 var a3 = const A.a3();
 //       ^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 var a4 = const A.a4('foo');
 //                  ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 var a5 = const A.a5('foo');
 //       ^^^^^^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 var a6 = const A.a6('foo');
 //       ^^^^^^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 //                  ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 //                  ^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 
 main() {
   print(a1);
diff --git a/tests/language/compile_time_constant/static_test.dart b/tests/language/compile_time_constant/static_test.dart
index 288ffef..d5ebd13 100644
--- a/tests/language/compile_time_constant/static_test.dart
+++ b/tests/language/compile_time_constant/static_test.dart
@@ -4,17 +4,17 @@
 
 final int x = 'foo';
 //            ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 const int y = 'foo';
 //            ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 //            ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 int z = 'foo';
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 
 main() {
diff --git a/tests/language/const/conditional_test.dart b/tests/language/const/conditional_test.dart
index 33aec86..4943748 100644
--- a/tests/language/const/conditional_test.dart
+++ b/tests/language/const/conditional_test.dart
@@ -73,13 +73,13 @@
 // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 //            ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 const cond4a = zeroConst ? nonConst : const1;
 //             ^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 //             ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 //                         ^
 // [cfe] Not a constant expression.
 const cond4b = zeroConst ? const0 : nonConst;
@@ -87,7 +87,7 @@
 // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 //             ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 //                                  ^
 // [cfe] Not a constant expression.
 
diff --git a/tests/language/const/const_locals_constant_locals_test.dart b/tests/language/const/const_locals_constant_locals_test.dart
index 9f937df..472687b 100644
--- a/tests/language/const/const_locals_constant_locals_test.dart
+++ b/tests/language/const/const_locals_constant_locals_test.dart
@@ -10,8 +10,7 @@
   const c1;
   //    ^^
   // [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED
-  //      ^
-  // [cfe] The const variable ';' must be initialized.
+  // [cfe] The const variable 'c1' must be initialized.
   const c2 = 0;
   const c3 = field;
   //         ^^^^^
diff --git a/tests/language/const/constructor3_test.dart b/tests/language/const/constructor3_test.dart
index 54191d1..8ec85e0 100644
--- a/tests/language/const/constructor3_test.dart
+++ b/tests/language/const/constructor3_test.dart
@@ -15,10 +15,10 @@
 const c = const C(0.0);
 const d = const C(intValue);
 //                ^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'int' can't be assigned to the parameter type 'double'.
 //                ^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 const e = const D(0.0);
 const f = const D(intValue);
 //        ^^^^^^^^^^^^^^^^^
diff --git a/tests/language/const/constructor_syntax_test.dart b/tests/language/const/constructor_syntax_test.dart
index 99a420e..d214271 100644
--- a/tests/language/const/constructor_syntax_test.dart
+++ b/tests/language/const/constructor_syntax_test.dart
@@ -49,7 +49,7 @@
   const C3()
       : field = new C0()
       //^^^^^
-      // [analyzer] STATIC_WARNING.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
+      // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
       //      ^
       // [cfe] 'field' is a final instance variable that has already been initialized.
       //      ^
diff --git a/tests/language/const/init2_test.dart b/tests/language/const/init2_test.dart
index 7f5e1a3..65f0aa2 100644
--- a/tests/language/const/init2_test.dart
+++ b/tests/language/const/init2_test.dart
@@ -6,10 +6,10 @@
 const double c = 0.0;
 const double d = intValue;
 //               ^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'double'.
 //               ^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 
 main() {
   print(c);
diff --git a/tests/language/const/syntax_test.dart b/tests/language/const/syntax_test.dart
index e9ccc4e..d9eb889 100644
--- a/tests/language/const/syntax_test.dart
+++ b/tests/language/const/syntax_test.dart
@@ -95,15 +95,11 @@
 //    ^^
 // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_COMPILE_TIME_CONSTANT
 // [cfe] Can't infer the type of 'A2': circularity found during type inference.
-//         ^^
-// [analyzer] COMPILE_TIME_ERROR.TOP_LEVEL_CYCLE
 //            ^
 // [cfe] Constant evaluation error:
 const A3 = A2 + 1;
 //    ^^
 // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_COMPILE_TIME_CONSTANT
-//         ^^
-// [analyzer] COMPILE_TIME_ERROR.TOP_LEVEL_CYCLE
 
 class C0 {
   static const X = const C1();
@@ -115,7 +111,7 @@
   const C1()
       : x = C0.X
       //^
-      // [analyzer] STATIC_WARNING.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
+      // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
       //  ^
       // [cfe] 'x' is a final instance variable that has already been initialized.
       //  ^
@@ -132,7 +128,7 @@
 //         ^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_NUM
 //              ^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'num'.
 
 // Check identical.
diff --git a/tests/language/constructor/constructor9_test.dart b/tests/language/constructor/constructor9_test.dart
index 4c7b35d..607e164 100644
--- a/tests/language/constructor/constructor9_test.dart
+++ b/tests/language/constructor/constructor9_test.dart
@@ -8,7 +8,7 @@
 class Klass {
   Klass(var v) : field_ = v {}
 //^^^^^
-// [analyzer] STATIC_WARNING.FINAL_NOT_INITIALIZED_CONSTRUCTOR
+// [analyzer] COMPILE_TIME_ERROR.FINAL_NOT_INITIALIZED_CONSTRUCTOR
   final uninitializedFinalField_;
   //    ^
   // [cfe] Final field 'uninitializedFinalField_' is not initialized.
diff --git a/tests/language/constructor/default_factory_test.dart b/tests/language/constructor/default_factory_test.dart
index 43a93e8..1b69325 100644
--- a/tests/language/constructor/default_factory_test.dart
+++ b/tests/language/constructor/default_factory_test.dart
@@ -9,7 +9,7 @@
 abstract class Vehicle {
   factory Vehicle() = GoogleOne.Vehicle;
   //                  ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
   // [cfe] The constructor function type 'GoogleOne Function()' isn't a subtype of 'Vehicle Function()'.
 }
 
diff --git a/tests/language/constructor/missing_initializer_test.dart b/tests/language/constructor/missing_initializer_test.dart
new file mode 100644
index 0000000..3604aa8
--- /dev/null
+++ b/tests/language/constructor/missing_initializer_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.
+
+// Test that it is an error for a class with no generative constructors to
+// have a final instance variable without an initializing expression, except
+// if it is `abstract` or `external`. The latter also holds in a class with
+// generative constructors.
+
+// Has factory, hence no default, hence no generative constructors.
+abstract class A {
+  final dynamic n;
+  //            ^
+  // [analyzer] COMPILE_TIME_ERROR.FINAL_NOT_INITIALIZED
+  // [cfe] unspecified
+
+  // Uninitialized, but no errors.
+  abstract final int x1;
+  abstract final int? x2;
+  external final String x3;
+  external final String? x4;
+
+  factory A() = B;
+}
+
+class B implements A {
+  dynamic get n => 1;
+  int get x1 => 1;
+  int? get x2 => null;
+  String get x3 => "";
+  String? get x4 => null;
+}
+
+class C = Object with A;
+
+// Has a generative constructor: default.
+abstract class D {
+  // Uninitialized, but no errors.
+  abstract final int x1;
+  abstract final int? x2;
+  external final String x3;
+  external final String? x4;
+}
+
+void main() {
+  A();
+  C();
+  var _ = D;
+}
diff --git a/tests/language/constructor/named_constructor_test.dart b/tests/language/constructor/named_constructor_test.dart
index 12a58b1..3b8af32 100644
--- a/tests/language/constructor/named_constructor_test.dart
+++ b/tests/language/constructor/named_constructor_test.dart
@@ -24,35 +24,35 @@
   //        ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //             ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
 
   // 'Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new Class<int>.named<int>().value;
   //             ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
   new prefix.Class().value;
   // 'prefix' is not a type:
   new prefix<int>.Class().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
   new prefix.Class.named().value;
   // 'prefix<int>.Class.named' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class.named().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
@@ -64,23 +64,23 @@
   // 'prefix.Class.named<int>' doesn't fit the grammar syntax T.id:
   new prefix.Class.named<int>().value;
   //               ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
   // 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class<int>.named().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
 
   // 'prefix<int>.Class.named<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class.named<int>().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
@@ -90,15 +90,15 @@
   // 'prefix.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new prefix.Class<int>.named<int>().value;
   //                    ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
   // '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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 }
diff --git a/tests/language/constructor/reference_test.dart b/tests/language/constructor/reference_test.dart
index 7aab1ff..9246d2b 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //          ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   new Foo<int>();
@@ -23,25 +23,25 @@
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected '(' after this.
   //               ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
   new Foo.bar<int>();
   //      ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //         ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   new Foo.bar<int>.baz();
   //      ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //               ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   new Foo.bar.baz<int>();
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //          ^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //          ^
   // [cfe] Method not found: 'Foo.bar.baz'.
@@ -60,13 +60,13 @@
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected '(' after this.
   //                 ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
   const Foo.bar<int>();
   //        ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //           ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   const Foo.bar<int>.baz();
   //        ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
@@ -78,7 +78,7 @@
   //    ^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //            ^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //            ^
   // [cfe] Method not found: 'Foo.bar.baz'.
@@ -87,7 +87,7 @@
   Foo.bar();
   Foo.bar.baz();
   //  ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] Getter not found: 'bar'.
   Foo<int>();
   Foo<int>.bar();
@@ -96,22 +96,22 @@
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected '(' after this.
   //           ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
   Foo.bar<int>();
   //  ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //     ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   Foo.bar<int>.baz();
   //  ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 //^^^^^^^
-// [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //           ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   Foo.bar.baz<int>();
   //  ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] Getter not found: 'bar'.
 }
diff --git a/tests/language/constructor/unresolved_default_constructor_test.dart b/tests/language/constructor/unresolved_default_constructor_test.dart
index 07fdc72..b8b5338 100644
--- a/tests/language/constructor/unresolved_default_constructor_test.dart
+++ b/tests/language/constructor/unresolved_default_constructor_test.dart
@@ -15,6 +15,6 @@
   A.method();
   Expect.throws(() => new A());
   //                      ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
   // [cfe] Method not found: 'A'.
 }
diff --git a/tests/language/control_flow_collections/await_for_downcast_test.dart b/tests/language/control_flow_collections/await_for_downcast_test.dart
index be8aa65..5c6d3ff 100644
--- a/tests/language/control_flow_collections/await_for_downcast_test.dart
+++ b/tests/language/control_flow_collections/await_for_downcast_test.dart
@@ -17,7 +17,7 @@
   Object obj = stream([1, 2, 3, 4]);
   var a = <int>[await for (var n in obj) n];
   //                                ^^^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Stream<dynamic>'.
 
   // Downcast variable.
@@ -26,14 +26,14 @@
     //             ^
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
     //                  ^^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_ELEMENT_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_ELEMENT_TYPE
   ];
 
   // Downcast element.
   var c = <int>[
     await for (num n in numStream([1, 2, 3, 4])) n
     //                                           ^
-    // [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
   ];
 }
@@ -43,7 +43,7 @@
   Object obj = stream([1, 2, 3, 4]);
   var a = <int, int>{await for (var n in obj) n: n};
   //                                     ^^^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Stream<dynamic>'.
 
   // Downcast variable.
@@ -52,17 +52,17 @@
     //             ^
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
     //                  ^^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_ELEMENT_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_ELEMENT_TYPE
   };
 
   // Downcast element.
   var c = <int, int>{
     await for (num n in numStream([1, 2, 3, 4])) n: n
     //                                           ^
-    // [analyzer] STATIC_WARNING.MAP_KEY_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.MAP_KEY_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
     //                                              ^
-    // [analyzer] STATIC_WARNING.MAP_VALUE_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.MAP_VALUE_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
   };
 }
@@ -72,7 +72,7 @@
   Object obj = stream([1, 2, 3, 4]);
   var a = <int>{await for (var n in obj) n};
   //                                ^^^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Stream<dynamic>'.
 
   // Downcast variable.
@@ -81,14 +81,14 @@
     //             ^
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
     //                  ^^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_ELEMENT_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_ELEMENT_TYPE
   };
 
   // Downcast element.
   var c = <int>{
     await for (num n in numStream([1, 2, 3, 4])) n
     //                                           ^
-    // [analyzer] STATIC_WARNING.SET_ELEMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.SET_ELEMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
   };
 }
diff --git a/tests/language/control_flow_collections/await_for_null_test.dart b/tests/language/control_flow_collections/await_for_null_test.dart
index a8f4154..61fd04c 100644
--- a/tests/language/control_flow_collections/await_for_null_test.dart
+++ b/tests/language/control_flow_collections/await_for_null_test.dart
@@ -8,14 +8,14 @@
   Stream<int>? nullStream;
   var a = <int>[await for (var i in nullStream) 1];
   //                                ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] The type 'Stream<int>?' used in the 'for' loop must implement 'Stream<dynamic>'.
   var b = <int, int>{await for (var i in nullStream) 1: 1};
   //                                     ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] The type 'Stream<int>?' used in the 'for' loop must implement 'Stream<dynamic>'.
   var c = <int>{await for (var i in nullStream) 1};
   //                                ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] The type 'Stream<int>?' used in the 'for' loop must implement 'Stream<dynamic>'.
 }
diff --git a/tests/language/control_flow_collections/for_downcast_test.dart b/tests/language/control_flow_collections/for_downcast_test.dart
index f857295..a9eda1d 100644
--- a/tests/language/control_flow_collections/for_downcast_test.dart
+++ b/tests/language/control_flow_collections/for_downcast_test.dart
@@ -15,7 +15,7 @@
   Object obj = <int>[1, 2, 3, 4];
   var a = <int>[for (var n in obj) n];
   //                          ^^^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
 
   // Downcast variable.
@@ -24,21 +24,21 @@
     //       ^
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
     //            ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_ELEMENT_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_ELEMENT_TYPE
   ];
 
   // Downcast element.
   var c = <int>[
     for (num n in <num>[1, 2, 3, 4]) n
     //                               ^
-    // [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
   ];
 
   // Downcast condition.
   var d = <int>[for (var i = 1; (i < 2) as Object; i++) i];
   //                            ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   //                                    ^
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
@@ -48,7 +48,7 @@
   Object obj = <int>[1, 2, 3, 4];
   var a = <int, int>{for (var n in obj) n: n};
   //                               ^^^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
 
   // Downcast variable.
@@ -57,24 +57,24 @@
     //       ^
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
     //            ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_ELEMENT_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_ELEMENT_TYPE
   };
 
   // Downcast element.
   var c = <int, int>{
     for (num n in <num>[1, 2, 3, 4]) n: n
     //                               ^
-    // [analyzer] STATIC_WARNING.MAP_KEY_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.MAP_KEY_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
     //                                  ^
-    // [analyzer] STATIC_WARNING.MAP_VALUE_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.MAP_VALUE_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
   };
 
   // Downcast condition.
   var d = <int, int>{for (var i = 1; (i < 2) as Object; i++) i: i};
   //                                 ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   //                                         ^
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
@@ -84,7 +84,7 @@
   Object obj = <int>[1, 2, 3, 4];
   var a = <int>{for (var n in obj) n};
   //                          ^^^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
 
   // Downcast variable.
@@ -93,21 +93,21 @@
     //       ^
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
     //            ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_ELEMENT_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_ELEMENT_TYPE
   };
 
   // Downcast element.
   var c = <int>{
     for (num n in <num>[1, 2, 3, 4]) n
     //                               ^
-    // [analyzer] STATIC_WARNING.SET_ELEMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.SET_ELEMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
   };
 
   // Downcast condition.
   var d = <int>{for (var i = 1; (i < 2) as Object; i++) i};
   //                            ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   //                                    ^
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
@@ -117,14 +117,14 @@
   Iterable<int>? nullIterable = null;
   var a = <int>[for (var i in nullIterable) 1];
   //                          ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] The type 'Iterable<int>?' used in the 'for' loop must implement 'Iterable<dynamic>'.
   var b = {for (var i in nullIterable) 1: 1};
   //                     ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] The type 'Iterable<int>?' used in the 'for' loop must implement 'Iterable<dynamic>'.
   var c = <int>{for (var i in nullIterable) 1};
   //                          ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] The type 'Iterable<int>?' used in the 'for' loop must implement 'Iterable<dynamic>'.
 }
diff --git a/tests/language/control_flow_collections/for_null_condition_test.dart b/tests/language/control_flow_collections/for_null_condition_test.dart
index 31b02b9..ebddf4c 100644
--- a/tests/language/control_flow_collections/for_null_condition_test.dart
+++ b/tests/language/control_flow_collections/for_null_condition_test.dart
@@ -9,14 +9,14 @@
   bool? nullBool = null;
   var a = <int>[for (; nullBool;) 1];
   //                   ^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   var b = <int, int>{for (; nullBool;) 1: 1};
   //                        ^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   var c = <int>{for (; nullBool;) 1};
   //                   ^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/control_flow_collections/if_downcast_test.dart b/tests/language/control_flow_collections/if_downcast_test.dart
index 4150456..0acfbde 100644
--- a/tests/language/control_flow_collections/if_downcast_test.dart
+++ b/tests/language/control_flow_collections/if_downcast_test.dart
@@ -5,19 +5,19 @@
 void main() {
   var a = <int>[if (true as Object) 1];
   //                ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   //                     ^
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 
   var b = <int, int>{if (true as Object) 1: 1};
   //                     ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   //                          ^
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 
   var c = <int>{if (true as Object) 1};
   //                ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   //                     ^
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/control_flow_collections/if_null_condition_test.dart b/tests/language/control_flow_collections/if_null_condition_test.dart
index 667c6bd..bec649f 100644
--- a/tests/language/control_flow_collections/if_null_condition_test.dart
+++ b/tests/language/control_flow_collections/if_null_condition_test.dart
@@ -6,16 +6,16 @@
   bool? nullBool;
   var a = <int>[if (nullBool) 1];
   //                ^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
 
   var b = <int, int>{if (nullBool) 1: 1};
   //                     ^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
 
   var c = <int>{if (nullBool) 1};
   //                ^^^^^^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/covariant/return_type_test.dart b/tests/language/covariant/return_type_test.dart
index 43c6c9e..ae6ebae 100644
--- a/tests/language/covariant/return_type_test.dart
+++ b/tests/language/covariant/return_type_test.dart
@@ -7,7 +7,7 @@
 void main() {
   List<int> l = [1, 2, 3].where((x) => x.isEven).map((x) => x + 1);
   //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                             ^
   // [cfe] A value of type 'Iterable<int>' can't be assigned to a variable of type 'List<int>'.
 
@@ -21,7 +21,7 @@
     C<Object> c = C<Object>(1);
     List<bool Function(Object)> myList = c.f();
     //                                   ^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                                     ^
     // [cfe] A value of type 'Iterable<bool Function(Object)>' can't be assigned to a variable of type 'List<bool Function(Object)>'.
   }
@@ -30,7 +30,7 @@
     C<Object> c = C<int>(1);
     List<bool Function(Object)> myList = c.f();
     //                                   ^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                                     ^
     // [cfe] A value of type 'Iterable<bool Function(Object)>' can't be assigned to a variable of type 'List<bool Function(Object)>'.
   }
@@ -50,7 +50,7 @@
     C<Iterable<Object>> c = D<Object>([1]);
     List<bool Function(Iterable<Object>)> myList = c.f();
     //                                             ^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                                               ^
     // [cfe] A value of type 'Iterable<bool Function(Iterable<Object>)>' can't be assigned to a variable of type 'List<bool Function(Iterable<Object>)>'.
   }
diff --git a/tests/language/deferred/deferred_and_immediate_import_lib.dart b/tests/language/deferred/deferred_and_immediate_import_lib.dart
new file mode 100644
index 0000000..61eeb08
--- /dev/null
+++ b/tests/language/deferred/deferred_and_immediate_import_lib.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  print("Foo!");
+}
diff --git a/tests/language/deferred/deferred_and_immediate_import_test.dart b/tests/language/deferred/deferred_and_immediate_import_test.dart
new file mode 100644
index 0000000..d54ca7e
--- /dev/null
+++ b/tests/language/deferred/deferred_and_immediate_import_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.
+
+import "package:expect/expect.dart";
+
+import "deferred_and_immediate_import_lib.dart" as immediatePrefix;
+import "deferred_and_immediate_import_lib.dart" deferred as deferredPrefix;
+
+main() async {
+  immediatePrefix.foo();
+
+  Expect.throws(() {
+    deferredPrefix.foo();
+  });
+
+  await deferredPrefix.loadLibrary();
+  deferredPrefix.foo();
+}
diff --git a/tests/language/deferred/inheritance_constraints_test.dart b/tests/language/deferred/inheritance_constraints_test.dart
index 9dd18f2..2d9429b 100644
--- a/tests/language/deferred/inheritance_constraints_test.dart
+++ b/tests/language/deferred/inheritance_constraints_test.dart
@@ -27,7 +27,7 @@
   D();
   factory D.factory() = lib.Foo2;
 //                      ^^^^^^^^
-// [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
 // [cfe] The constructor function type 'Foo2 Function()' isn't a subtype of 'D Function()'.
 }
 
diff --git a/tests/language/deferred/super_dependency_test.dart b/tests/language/deferred/super_dependency_test.dart
index f49380c..5879e56 100644
--- a/tests/language/deferred/super_dependency_test.dart
+++ b/tests/language/deferred/super_dependency_test.dart
@@ -8,7 +8,7 @@
 
 import "package:expect/expect.dart";
 //        ^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_SETTER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_SETTER
 // [cfe] Superclass has no setter named 'foo'.
 import "super_dependency_lib.dart" deferred as lib;
 
diff --git a/tests/language/deferred/unreachable_loading_unit_deferred.dart b/tests/language/deferred/unreachable_loading_unit_deferred.dart
new file mode 100644
index 0000000..ca5f8bdc
--- /dev/null
+++ b/tests/language/deferred/unreachable_loading_unit_deferred.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  print("Foo");
+}
diff --git a/tests/language/deferred/unreachable_loading_unit_immediate.dart b/tests/language/deferred/unreachable_loading_unit_immediate.dart
new file mode 100644
index 0000000..a320045
--- /dev/null
+++ b/tests/language/deferred/unreachable_loading_unit_immediate.dart
@@ -0,0 +1,10 @@
+// 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 "unreachable_loading_unit_deferred.dart" deferred as lib;
+
+unreachable() async {
+  await lib.loadLibrary();
+  lib.foo();
+}
diff --git a/tests/language/deferred/unreachable_loading_unit_test.dart b/tests/language/deferred/unreachable_loading_unit_test.dart
new file mode 100644
index 0000000..8a66342
--- /dev/null
+++ b/tests/language/deferred/unreachable_loading_unit_test.dart
@@ -0,0 +1,9 @@
+// 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 "unreachable_loading_unit_immediate.dart";
+
+main() {
+  print("Okay");
+}
diff --git a/tests/language/double/to_string_as_exponential2_test.dart b/tests/language/double/to_string_as_exponential2_test.dart
index fbe03c4..8bb750a 100644
--- a/tests/language/double/to_string_as_exponential2_test.dart
+++ b/tests/language/double/to_string_as_exponential2_test.dart
@@ -11,14 +11,14 @@
   Expect.throwsRangeError(() => v.toStringAsExponential(21));
   v.toStringAsExponential(1.5);
   //                      ^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'double' can't be assigned to the parameter type 'int?'.
   v.toStringAsExponential("string");
   //                      ^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int?'.
   v.toStringAsExponential("3");
   //                      ^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int?'.
 }
diff --git a/tests/language/dynamic/field_test.dart b/tests/language/dynamic/field_test.dart
index ebe094e..23190e0 100644
--- a/tests/language/dynamic/field_test.dart
+++ b/tests/language/dynamic/field_test.dart
@@ -15,21 +15,21 @@
   foo() {
     print(a);
     //    ^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'a' isn't defined for the class 'C'.
     return a;
     //     ^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'a' isn't defined for the class 'C'.
   }
   bar() {
     print(b.a);
     //    ^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'b' isn't defined for the class 'C'.
     return b.a;
     //     ^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'b' isn't defined for the class 'C'.
   }
 }
diff --git a/tests/language/enum/private_test.dart b/tests/language/enum/private_test.dart
index bd99d84..a24fec3 100644
--- a/tests/language/enum/private_test.dart
+++ b/tests/language/enum/private_test.dart
@@ -20,6 +20,6 @@
   Expect.equals('Enum2._A,Enum2._B', Enum2.values.join(','));
   Expect.throwsNoSuchMethodError(() => Enum2._A);
   //                                         ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_ENUM_CONSTANT
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_ENUM_CONSTANT
   // [cfe] Getter not found: '_A'.
 }
diff --git a/tests/language/extension_methods/static_extension_bounds_error_test.dart b/tests/language/extension_methods/static_extension_bounds_error_test.dart
index 5424a7e..60ae8b7 100644
--- a/tests/language/extension_methods/static_extension_bounds_error_test.dart
+++ b/tests/language/extension_methods/static_extension_bounds_error_test.dart
@@ -32,7 +32,7 @@
   // Inferred type of String does not satisfy the bound.
   s.e1;
 //  ^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 // [cfe] The getter 'e1' isn't defined for the class 'String'.
   E1(s).e1;
 //^^
@@ -55,7 +55,7 @@
   // Inferred type of String does not satisfy the bound.
   s.e2;
 //  ^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 // [cfe] The getter 'e2' isn't defined for the class 'String'.
   E2(s).e2;
 //^^
@@ -121,7 +121,7 @@
   // Inferred super-bounded type is invalid as type argument
   superRec.e4;
 //         ^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 // [cfe] The getter 'e4' isn't defined for the class 'Rec<dynamic>'.
   E4(superRec).e4;
 //^^
diff --git a/tests/language/extension_methods/static_extension_deferred_import_resolution_error_test.dart b/tests/language/extension_methods/static_extension_deferred_import_resolution_error_test.dart
index 59920e7..8dc19f1 100644
--- a/tests/language/extension_methods/static_extension_deferred_import_resolution_error_test.dart
+++ b/tests/language/extension_methods/static_extension_deferred_import_resolution_error_test.dart
@@ -10,10 +10,10 @@
   Object o = 1;
   OnObject(o).onObject;
 //^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
 // [cfe] Method not found: 'OnObject'.
   o.onObject;
   //^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'onObject' isn't defined for the class 'Object'.
 }
diff --git a/tests/language/extension_methods/static_extension_getter_setter_conflicts_test.dart b/tests/language/extension_methods/static_extension_getter_setter_conflicts_test.dart
index a2af316..42c9c65 100644
--- a/tests/language/extension_methods/static_extension_getter_setter_conflicts_test.dart
+++ b/tests/language/extension_methods/static_extension_getter_setter_conflicts_test.dart
@@ -23,7 +23,7 @@
   c0.m1;
   c0.m1 = 0;
   // ^^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   // [cfe] The setter 'm1' isn't defined for the class 'C0'.
   E0(c0).m1 = 0;
   E0(c0).m1;
@@ -33,26 +33,26 @@
 
   c0.m1 += 0;
   // ^^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   // [cfe] The setter 'm1' isn't defined for the class 'C0'.
 
   c0.m1++;
   // ^^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   // [cfe] The setter 'm1' isn't defined for the class 'C0'.
 
   c0.m2 = 0;
   c0.m2;
   // ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm2' isn't defined for the class 'C0'.
   c0.m2 += 0;
   // ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm2' isn't defined for the class 'C0'.
   c0.m2++;
   // ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm2' isn't defined for the class 'C0'.
 
   E0(c0).m2;
@@ -60,7 +60,7 @@
   c0[0];
   c0[0] = 0;
   //^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C0'.
   E0(c0)[0];
   //    ^^^
@@ -70,11 +70,11 @@
 
   c0[0] += 0;
   //^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C0'.
   c0[0]++;
   //^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C0'.
 
   E0(c0)[0] += 0;
@@ -109,29 +109,29 @@
 
   c1a.m1 = 0;
   //  ^^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   // [cfe] The setter 'm1' isn't defined for the class 'C1<int>'.
 
   c1a.m2;
   //  ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm2' isn't defined for the class 'C1<int>'.
 
   c1a.m2 = 0;
 
   c1a[0] = 0;
   // ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C1<int>'.
 
   c1a[0] += 0;
   // ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C1<int>'.
 
   c1a[0]++;
   // ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C1<int>'.
 
   c1a[0];
@@ -195,12 +195,12 @@
 
   c1c.m1 = 0;
   //  ^^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   // [cfe] The setter 'm1' isn't defined for the class 'C1<Object>'.
 
   c1c.m2;
   //  ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm2' isn't defined for the class 'C1<Object>'.
 }
 
@@ -224,29 +224,29 @@
     this.m1;
     this.m1 = 0;
     //   ^^
-    // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
     // [cfe] The setter 'm1' isn't defined for the class 'C2'.
 
     this.m2 = 0;
     this.m2;
     //   ^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'm2' isn't defined for the class 'C2'.
 
     this[0] = 0;
     this[0];
     //  ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
     // [cfe] The operator '[]' isn't defined for the class 'C2'.
 
     this[0] += 0;
     //  ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
     // [cfe] The operator '[]' isn't defined for the class 'C2'.
 
     this[0]++;
     //  ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
     // [cfe] The operator '[]' isn't defined for the class 'C2'.
 
     // Check that `this.mc` refers to `C2.mc`.
diff --git a/tests/language/extension_methods/static_extension_import_hide_error_test.dart b/tests/language/extension_methods/static_extension_import_hide_error_test.dart
index 9a93aa0..25b0461 100644
--- a/tests/language/extension_methods/static_extension_import_hide_error_test.dart
+++ b/tests/language/extension_methods/static_extension_import_hide_error_test.dart
@@ -12,7 +12,7 @@
   Object o = i;
   i.onInt;
   //^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'onInt' isn't defined for the class 'int'.
   i.onObject;
   o.onObject;
diff --git a/tests/language/extension_methods/static_extension_import_prefixed_hide_error_test.dart b/tests/language/extension_methods/static_extension_import_prefixed_hide_error_test.dart
index 3c485e8..a146f12 100644
--- a/tests/language/extension_methods/static_extension_import_prefixed_hide_error_test.dart
+++ b/tests/language/extension_methods/static_extension_import_prefixed_hide_error_test.dart
@@ -12,7 +12,7 @@
   Object o = i;
   i.onInt;
   //^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'onInt' isn't defined for the class 'int'.
   i.onObject;
   o.onObject;
diff --git a/tests/language/extension_methods/static_extension_internal_basename_shadowing_error_test.dart b/tests/language/extension_methods/static_extension_internal_basename_shadowing_error_test.dart
index c7ce72e..86941be 100644
--- a/tests/language/extension_methods/static_extension_internal_basename_shadowing_error_test.dart
+++ b/tests/language/extension_methods/static_extension_internal_basename_shadowing_error_test.dart
@@ -23,35 +23,35 @@
     // The instance getter shadows the global setter
     topLevelSetter = topLevelSetter + 1;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
     topLevelSetter++;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
     topLevelSetter = 0;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
 
     // The instance getter shadows the global field setter
     topLevelField = topLevelField + 1;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
     topLevelField++;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
     topLevelField = 0;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
 
     // The instance getter shadows the global method
     topLevelMethod(4);
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
@@ -115,35 +115,35 @@
     // The static getter shadows the global setter
     topLevelSetter = topLevelSetter + 1;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
     topLevelSetter++;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
     topLevelSetter = 0;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
 
     // The static getter shadows the global field setter
     topLevelField = topLevelField + 1;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
     topLevelField++;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
     topLevelField = 0;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
 
     // The static getter shadows the global method
     topLevelMethod(4);
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                   ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
@@ -211,21 +211,21 @@
     // The instance getter shadows the other extension's setter
     extensionSetter = extensionSetter + 1;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter++;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter = 0;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
 
     // The instance getter shadows the other extensions method
     extensionMethod(4);
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                 ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
@@ -242,21 +242,21 @@
     // The instance getter shadows the other extension's setter
     extensionSetter = extensionSetter + 1;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] The setter 'extensionSetter' isn't defined for the class 'A7'.
     extensionSetter++;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] The setter 'extensionSetter' isn't defined for the class 'A7'.
     extensionSetter = 0;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] The setter 'extensionSetter' isn't defined for the class 'A7'.
 
     // The instance getter shadows the other extensions method
     extensionMethod(4);
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                 ^
 // [cfe] 'extensionMethod' isn't a function or method and can't be invoked.
   }
@@ -343,15 +343,15 @@
     // The static getter shadows the other extension's setter
     extensionSetter = extensionSetter + 1;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter++;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter = 0;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
 
     // The static field shadows the other extension's setter
@@ -371,7 +371,7 @@
     // The static getter shadows the other extensions method
     extensionMethod(4);
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                     ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
@@ -389,15 +389,15 @@
     // The static getter shadows the other extension's setter
     extensionSetter = extensionSetter + 1;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter++;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter = 0;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
 
     // The static field shadows the other extension's setter
@@ -417,7 +417,7 @@
     // The static getter shadows the other extensions method
     extensionMethod(4);
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                 ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
diff --git a/tests/language/extension_methods/static_extension_internal_resolution_4_error_test.dart b/tests/language/extension_methods/static_extension_internal_resolution_4_error_test.dart
index d1a4685..6f6944c 100644
--- a/tests/language/extension_methods/static_extension_internal_resolution_4_error_test.dart
+++ b/tests/language/extension_methods/static_extension_internal_resolution_4_error_test.dart
@@ -238,21 +238,21 @@
       // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
       // [cfe] The property 'fieldInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific.
       //        ^^^^^^^^^^^^^^^^^^^^^
-      // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
       checkExtensionValue(t0);
       bool t1 = getterInExtensionScope;
       //        ^^^^^^^^^^^^^^^^^^^^^^
       // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
       // [cfe] The property 'getterInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific.
       //        ^^^^^^^^^^^^^^^^^^^^^^
-      // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
       checkExtensionValue(t1);
       setterInExtensionScope = extensionValue;
 //    ^^^^^^^^^^^^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
 // [cfe] The property 'setterInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific.
 //    ^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
       bool t2 = methodInExtensionScope();
       //        ^^^^^^^^^^^^^^^^^^^^^^
       // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
diff --git a/tests/language/extension_methods/static_extension_internal_resolution_6_error_test.dart b/tests/language/extension_methods/static_extension_internal_resolution_6_error_test.dart
index 38191b8..dd18be3 100644
--- a/tests/language/extension_methods/static_extension_internal_resolution_6_error_test.dart
+++ b/tests/language/extension_methods/static_extension_internal_resolution_6_error_test.dart
@@ -29,7 +29,7 @@
   void shadowTypeParam<T>(T x) {
     T y = self;
     //    ^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     // [cfe] A value of type '#T' can't be assigned to a variable of type 'T'.
   }
 
diff --git a/tests/language/extension_methods/static_extension_resolution_failures_test.dart b/tests/language/extension_methods/static_extension_resolution_failures_test.dart
index 2856a18..ce822ac 100644
--- a/tests/language/extension_methods/static_extension_resolution_failures_test.dart
+++ b/tests/language/extension_methods/static_extension_resolution_failures_test.dart
@@ -39,7 +39,7 @@
   // No `i_num` extension declared.
   i_num.i_num;
   //    ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'i_num' isn't defined for the class 'Iterable<num>'.
 
   Expect.equals("Iterable<int>.i_num", ii.i_num);
diff --git a/tests/language/extension_methods/static_extension_setter_getter_assignability_error_test.dart b/tests/language/extension_methods/static_extension_setter_getter_assignability_error_test.dart
index e31cc30..e6e2b0b 100644
--- a/tests/language/extension_methods/static_extension_setter_getter_assignability_error_test.dart
+++ b/tests/language/extension_methods/static_extension_setter_getter_assignability_error_test.dart
@@ -10,7 +10,7 @@
   //     ^^
   // [cfe] unspecified
   //             ^^^^^^^^
-  // [analyzer] STATIC_WARNING.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
   static void set property(String value) {}
   //                       ^^
   // [cfe] unspecified
@@ -18,7 +18,7 @@
   //  ^^
   // [cfe] unspecified
   //      ^^^^^^^^^
-  // [analyzer] STATIC_WARNING.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
   void set property2(String x) {}
   //                 ^^
   // [cfe] unspecified
diff --git a/tests/language/external_abstract_fields/abstract_fields_error_test.dart b/tests/language/external_abstract_fields/abstract_fields_error_test.dart
index 317b8ca..ca9fb38 100644
--- a/tests/language/external_abstract_fields/abstract_fields_error_test.dart
+++ b/tests/language/external_abstract_fields/abstract_fields_error_test.dart
@@ -7,11 +7,13 @@
 
 // Check that abstract declarations are abstract.
 class Abstract1 {
+//    ^
+// [cfe] The non-abstract class 'Abstract1' is missing implementations for these members:
+
   // 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.
@@ -26,9 +28,10 @@
 
     // Cannot assign to final field.
     a.x = 42;
+    //^
+    // [cfe] The setter 'x' isn't defined for the class 'Abstract2'.
     //  ^
     // [analyzer] unspecified
-    // [cfe] unspecified
 
     String y = a.y;
     a.y = "ab";
@@ -37,7 +40,7 @@
     a.y = Object();
     //    ^^^^^^^^
     // [analyzer] unspecified
-    // [cfe] unspecified
+    // [cfe] A value of type 'Object' can't be assigned to a variable of type 'String'.
   }
 
   void test() {
@@ -45,9 +48,10 @@
 
     // Cannot assign to final field.
     this.x = 42;
+    //   ^
+    // [cfe] The setter 'x' isn't defined for the class 'Abstract2'.
     //     ^
     // [analyzer] unspecified
-    // [cfe] unspecified
 
     String y = this.y;
     this.y = "ab";
@@ -56,13 +60,13 @@
     this.y = Object();
     //       ^^^^^^^^
     // [analyzer] unspecified
-    // [cfe] unspecified
+    // [cfe] A value of type 'Object' can't be assigned to a variable of type 'String'.
   }
 }
 
-class Concrete2 implements Abstract2 {
-  final int x;
-  String y;
+class Concrete2 extends Abstract2 {
+  final int x = 0;
+  String y = '';
 }
 
 void main() {
diff --git a/tests/language/external_abstract_fields/abstract_fields_test.dart b/tests/language/external_abstract_fields/abstract_fields_test.dart
index 8deca66..c946ed7 100644
--- a/tests/language/external_abstract_fields/abstract_fields_test.dart
+++ b/tests/language/external_abstract_fields/abstract_fields_test.dart
@@ -66,7 +66,7 @@
   }
   int get y {
     lastName = #y;
-    return 0;
+    return _y;
   }
   set y(int value) {
     lastName = #y;
diff --git a/tests/language/external_abstract_fields/external_fields_test.dart b/tests/language/external_abstract_fields/external_fields_test.dart
index 58e792f..281fc97 100644
--- a/tests/language/external_abstract_fields/external_fields_test.dart
+++ b/tests/language/external_abstract_fields/external_fields_test.dart
@@ -3,7 +3,9 @@
 // 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.
+// No implementation at run-time, so it throws.
+
+import 'package:expect/expect.dart';
 
 // External variables cannot be abstract, const, late or have an initializer.
 
@@ -32,30 +34,32 @@
   external int instance6;
 }
 
-void main() {
-  top1;
-  top1 = 0;
-  top2;
-  top3;
-  top3 = 0;
-  top4;
+void shouldThrow(Function() f) => Expect.throwsNoSuchMethodError(f);
 
-  C.static1;
-  C.static1 = 0;
-  C.static2;
-  C.static3;
-  C.static3 = 0;
-  C.static4;
+void main() {
+  shouldThrow(() => top1);
+  shouldThrow(() => top1 = 0);
+  shouldThrow(() => top2);
+  shouldThrow(() => top3);
+  shouldThrow(() => top3 = 0);
+  shouldThrow(() => top4);
+
+  shouldThrow(() => C.static1);
+  shouldThrow(() => C.static1 = 0);
+  shouldThrow(() => C.static2);
+  shouldThrow(() => C.static3);
+  shouldThrow(() => C.static3 = 0);
+  shouldThrow(() => 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;
+  shouldThrow(() => c.instance1);
+  shouldThrow(() => c.instance1 = 0);
+  shouldThrow(() => c.instance2);
+  shouldThrow(() => c.instance3);
+  shouldThrow(() => c.instance3 = 0);
+  shouldThrow(() => c.instance4);
+  shouldThrow(() => c.instance5);
+  shouldThrow(() => c.instance5 = 0);
+  shouldThrow(() => c.instance6);
+  shouldThrow(() => c.instance6 = 0);
 }
diff --git a/tests/language/factory/factory4_test.dart b/tests/language/factory/factory4_test.dart
index 8aeb051..14e2b01 100644
--- a/tests/language/factory/factory4_test.dart
+++ b/tests/language/factory/factory4_test.dart
@@ -5,7 +5,7 @@
 abstract class Link<T> {
   factory Link.create() = LinkFactory.create;
   //                      ^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
   // [cfe] The constructor function type 'LinkFactory<dynamic> Function()' isn't a subtype of 'Link<T> Function()'.
 }
 
diff --git a/tests/language/factory/factory5_test.dart b/tests/language/factory/factory5_test.dart
index b06af33..aaf99e0 100644
--- a/tests/language/factory/factory5_test.dart
+++ b/tests/language/factory/factory5_test.dart
@@ -5,7 +5,7 @@
 abstract class Link<T> {
   factory Link.create() = LinkFactory<T>.create;
   //                      ^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
   // [cfe] The constructor function type 'LinkFactory<T> Function()' isn't a subtype of 'Link<T> Function()'.
 }
 
diff --git a/tests/language/factory/factory6_test.dart b/tests/language/factory/factory6_test.dart
index 7e36cb9..6084e82 100644
--- a/tests/language/factory/factory6_test.dart
+++ b/tests/language/factory/factory6_test.dart
@@ -7,7 +7,7 @@
 abstract class Link<T> {
   factory Link.Foo() = LinkFactory<T>.Foo;
   //                   ^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
   // [cfe] The constructor function type 'LinkFactory<T> Function()' isn't a subtype of 'Link<T> Function()'.
 }
 
diff --git a/tests/language/factory/factory_test.dart b/tests/language/factory/factory_test.dart
index 14a5983..7b0c2a8 100644
--- a/tests/language/factory/factory_test.dart
+++ b/tests/language/factory/factory_test.dart
@@ -36,10 +36,10 @@
 abstract class Link<T> {
   factory Link.create() = LinkFactory<T>.create;
   //                      ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 0 type arguments.
   //                      ^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
 }
 
 class LinkFactory {
diff --git a/tests/language/factory/redirection3_cyclic_test.dart b/tests/language/factory/redirection3_cyclic_test.dart
index ed352be..13dc39b 100644
--- a/tests/language/factory/redirection3_cyclic_test.dart
+++ b/tests/language/factory/redirection3_cyclic_test.dart
@@ -28,7 +28,7 @@
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
   // [cfe] Expected an identifier, but got '('.
   //                     ^^^
-  // [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+  // [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   C();
 }
 
diff --git a/tests/language/factory/return_type_checked_test.dart b/tests/language/factory/return_type_checked_test.dart
index c882f4f..0913da5 100644
--- a/tests/language/factory/return_type_checked_test.dart
+++ b/tests/language/factory/return_type_checked_test.dart
@@ -7,8 +7,8 @@
 class A {
   factory A() => 42;
   //             ^^
-  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
-  // [cfe] A value of type 'int' can't be assigned to a variable of type 'A'.
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
+  // [cfe] A value of type 'int' can't be returned from a function with return type 'A'.
 }
 
 main() {
diff --git a/tests/language/field/type_check_test.dart b/tests/language/field/type_check_test.dart
index 09b5507..34315c1 100644
--- a/tests/language/field/type_check_test.dart
+++ b/tests/language/field/type_check_test.dart
@@ -9,6 +9,6 @@
 void main() {
   new A().e = "String";
   //          ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 }
diff --git a/tests/language/final/attempt_reinitialization_test.dart b/tests/language/final/attempt_reinitialization_test.dart
index 009998b..2db5efe 100644
--- a/tests/language/final/attempt_reinitialization_test.dart
+++ b/tests/language/final/attempt_reinitialization_test.dart
@@ -5,7 +5,7 @@
 class Foo {
   Foo(this.x);
   //       ^
-  // [analyzer] STATIC_WARNING.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
   // [cfe] 'x' is a final instance variable that has already been initialized.
   final int x = 42;
 }
@@ -15,7 +15,7 @@
   CoffeeShop.name(String shopName)
       : this.shopName = shopName;
       //     ^^^^^^^^
-      // [analyzer] STATIC_WARNING.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
+      // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
       //              ^
       // [cfe] 'shopName' is a final instance variable that has already been initialized.
 }
diff --git a/tests/language/final/variable_assignment_test.dart b/tests/language/final/variable_assignment_test.dart
index f001d40..840f0e6 100644
--- a/tests/language/final/variable_assignment_test.dart
+++ b/tests/language/final/variable_assignment_test.dart
@@ -8,18 +8,18 @@
   final x = 30;
   x = 0;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
 // [cfe] Can't assign to the final variable 'x'.
   x += 1;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
 // [cfe] Can't assign to the final variable 'x'.
   ++x;
   //^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   // [cfe] Can't assign to the final variable 'x'.
   x++;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
 // [cfe] Can't assign to the final variable 'x'.
 }
diff --git a/tests/language/function/malformed_result_type_test.dart b/tests/language/function/malformed_result_type_test.dart
index 182258b..9f2223c 100644
--- a/tests/language/function/malformed_result_type_test.dart
+++ b/tests/language/function/malformed_result_type_test.dart
@@ -11,6 +11,6 @@
 main() {
   C<int> f() => throw "uncalled";
 //^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 2 type arguments.
 }
diff --git a/tests/language/function/type_call_getter2_test.dart b/tests/language/function/type_call_getter2_test.dart
index c52cb9e..789f22e 100644
--- a/tests/language/function/type_call_getter2_test.dart
+++ b/tests/language/function/type_call_getter2_test.dart
@@ -27,42 +27,42 @@
       Function
       a2 = a;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'A' can't be assigned to a variable of type 'Function'.
 
   final
       F
       a3 = a;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'A' can't be assigned to a variable of type 'int Function(String)'.
 
   final
       Function
       b2 = b;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'B' can't be assigned to a variable of type 'Function'.
 
   final
       F
       b3 = b;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'B' can't be assigned to a variable of type 'int Function(String)'.
 
   final
       Function
       c2 = c;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'C' can't be assigned to a variable of type 'Function'.
 
   final
       F
       c3 = c;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'C' can't be assigned to a variable of type 'int Function(String)'.
 
   Expect.throwsTypeError(() {
diff --git a/tests/language/generic/constructor_mixin2_test.dart b/tests/language/generic/constructor_mixin2_test.dart
index 6630e4e..88281e3 100644
--- a/tests/language/generic/constructor_mixin2_test.dart
+++ b/tests/language/generic/constructor_mixin2_test.dart
@@ -22,6 +22,6 @@
   checkNoDynamicTypeError(() => new D<int>(v));
   checkDynamicTypeError(() => new D<String>(v));
   //                                        ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'.
 }
diff --git a/tests/language/generic/constructor_mixin3_test.dart b/tests/language/generic/constructor_mixin3_test.dart
index 7a1a21a..04e86a1 100644
--- a/tests/language/generic/constructor_mixin3_test.dart
+++ b/tests/language/generic/constructor_mixin3_test.dart
@@ -21,6 +21,6 @@
   checkNoDynamicTypeError(() => new C1(v));
   checkDynamicTypeError(() => new C2(v));
   //                                 ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'.
 }
diff --git a/tests/language/generic/constructor_mixin_test.dart b/tests/language/generic/constructor_mixin_test.dart
index a2b828e..f79f865 100644
--- a/tests/language/generic/constructor_mixin_test.dart
+++ b/tests/language/generic/constructor_mixin_test.dart
@@ -20,6 +20,6 @@
   checkNoDynamicTypeError(() => new C<int>(v));
   checkDynamicTypeError(() => new C<String>(v));
   //                                        ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'.
 }
diff --git a/tests/language/generic/field_mixin6_test.dart b/tests/language/generic/field_mixin6_test.dart
index 47a3678..303df88 100644
--- a/tests/language/generic/field_mixin6_test.dart
+++ b/tests/language/generic/field_mixin6_test.dart
@@ -9,7 +9,7 @@
 class M<T> {
   T field1 = 0;
   //         ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'T'.
   T field2 = 0 as dynamic;
 }
diff --git a/tests/language/generic/function_bounds_test.dart b/tests/language/generic/function_bounds_test.dart
index 4ab11d3..d670e54 100644
--- a/tests/language/generic/function_bounds_test.dart
+++ b/tests/language/generic/function_bounds_test.dart
@@ -2,6 +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.
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import 'dart:math';
 import 'package:expect/expect.dart';
 
diff --git a/tests/language/generic/function_subtype_parametrized_typedef_test.dart b/tests/language/generic/function_subtype_parametrized_typedef_test.dart
index a1dd791..10775ef 100644
--- a/tests/language/generic/function_subtype_parametrized_typedef_test.dart
+++ b/tests/language/generic/function_subtype_parametrized_typedef_test.dart
@@ -17,30 +17,30 @@
   H<A> haa = ha;
   H<A> hab = hb;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends B>()' can't be assigned to a variable of type 'void Function<Y extends A>()'.
   H<A> hac = hc;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends C>()' can't be assigned to a variable of type 'void Function<Y extends A>()'.
 
   H<B> hba = ha;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends A>()' can't be assigned to a variable of type 'void Function<Y extends B>()'.
   H<B> hbb = hb;
   H<B> hbc = hc;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends C>()' can't be assigned to a variable of type 'void Function<Y extends B>()'.
 
   H<C> hca = ha;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends A>()' can't be assigned to a variable of type 'void Function<Y extends C>()'.
   H<C> hcb = hb;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends B>()' can't be assigned to a variable of type 'void Function<Y extends C>()'.
   H<C> hcc = hc;
 }
diff --git a/tests/language/generic/function_subtype_test.dart b/tests/language/generic/function_subtype_test.dart
index 28cb90a..d392f6d 100644
--- a/tests/language/generic/function_subtype_test.dart
+++ b/tests/language/generic/function_subtype_test.dart
@@ -14,12 +14,12 @@
   F1 f11 = f1;
   F1 f12 = f2;
   //       ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y2 extends String>()' can't be assigned to a variable of type 'void Function<X1 extends num>()'.
 
   F2 f21 = f1;
   //       ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y1 extends num>()' can't be assigned to a variable of type 'void Function<X2 extends String>()'.
   F2 f22 = f2;
 }
diff --git a/tests/language/generic/function_typedef2_test.dart b/tests/language/generic/function_typedef2_test.dart
index 6532988..0ad79c5 100644
--- a/tests/language/generic/function_typedef2_test.dart
+++ b/tests/language/generic/function_typedef2_test.dart
@@ -27,7 +27,7 @@
 // [cfe] Can't create typedef from non-function type.
 typedef K = Function(Function<A>(A<int>));
 //                               ^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Can't use type arguments with type variable 'A'.
 typedef L = Function({x});
 //                    ^
diff --git a/tests/language/generic/instantiate_tearoff_test.dart b/tests/language/generic/instantiate_tearoff_test.dart
index 6a551f6..dc1afd4 100644
--- a/tests/language/generic/instantiate_tearoff_test.dart
+++ b/tests/language/generic/instantiate_tearoff_test.dart
@@ -2,6 +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.
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import "package:expect/expect.dart";
 
 T f<T>(T x) => x;
diff --git a/tests/language/generic/instantiate_type_variable_test.dart b/tests/language/generic/instantiate_type_variable_test.dart
index e03c49f..486a95b 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.CREATION_WITH_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
     // [cfe] Method not found: 'T'.
   }
 }
diff --git a/tests/language/generic/reify_typevar_static_test.dart b/tests/language/generic/reify_typevar_static_test.dart
index b3c502b..c589aff 100644
--- a/tests/language/generic/reify_typevar_static_test.dart
+++ b/tests/language/generic/reify_typevar_static_test.dart
@@ -11,7 +11,7 @@
   static staticFunction(bool b) =>
     b ? T :
     //  ^
-    // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
     // [cfe] Type variables can't be used in static members.
       null;
   factory C.factoryConstructor(bool b) => new C(
diff --git a/tests/language/generic/wrong_number_type_arguments_test.dart b/tests/language/generic/wrong_number_type_arguments_test.dart
index dcc0d9a..160e331 100644
--- a/tests/language/generic/wrong_number_type_arguments_test.dart
+++ b/tests/language/generic/wrong_number_type_arguments_test.dart
@@ -5,18 +5,18 @@
 // Map takes 2 type arguments.
 Map<String> foo = {};
 // [error line 6, column 1, length 11]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 2 type arguments.
 Map<String> baz = {};
 // [error line 10, column 1, length 11]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 2 type arguments.
 
 main() {
   foo = {};
   var bar = new Map<String>();
   //            ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 2 type arguments.
   baz = new Map();
 }
diff --git a/tests/language/getter/no_setter2_test.dart b/tests/language/getter/no_setter2_test.dart
index 778ce8f..22ad07e 100644
--- a/tests/language/getter/no_setter2_test.dart
+++ b/tests/language/getter/no_setter2_test.dart
@@ -11,29 +11,29 @@
   Example() {
     nextVar++;
 //  ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'nextVar'.
     this.nextVar++;
     //   ^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
     // [cfe] The getter 'nextVar' isn't defined for the class 'Example'.
     //   ^^^^^^^
-    // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
     // [cfe] The setter 'nextVar' isn't defined for the class 'Example'.
   }
   static test() {
     nextVar++;
 //  ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'nextVar'.
     this.nextVar++;
 //  ^^^^
 // [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS
 // [cfe] Expected identifier, but got 'this'.
 //       ^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
 //       ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   }
 }
 
diff --git a/tests/language/getter/no_setter_test.dart b/tests/language/getter/no_setter_test.dart
index 8d84129..260b5fc 100644
--- a/tests/language/getter/no_setter_test.dart
+++ b/tests/language/getter/no_setter_test.dart
@@ -11,28 +11,28 @@
   Example() {
     nextVar = 1;
 //  ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'nextVar'.
     this.nextVar = 1;
     //   ^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
     // [cfe] The setter 'nextVar' isn't defined for the class 'Example'.
     //   ^^^^^^^
-    // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   }
   static test() {
     nextVar = 0;
 //  ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'nextVar'.
     this.nextVar = 0;
 //  ^^^^
 // [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS
 // [cfe] Expected identifier, but got 'this'.
 //       ^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
 //       ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   }
 }
 
diff --git a/tests/language/getter/setter2_test.dart b/tests/language/getter/setter2_test.dart
index 2e0a03c..0985ebe 100644
--- a/tests/language/getter/setter2_test.dart
+++ b/tests/language/getter/setter2_test.dart
@@ -24,7 +24,7 @@
   late A getterField;
   A get field {
   //    ^^^^^
-  // [analyzer] STATIC_WARNING.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
   // [cfe] unspecified
     return getterField;
   }
@@ -39,7 +39,7 @@
   late C setterField;
   A get field {
   //    ^^^^^
-  // [analyzer] STATIC_WARNING.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
   // [cfe] unspecified
     return getterField;
   }
@@ -57,7 +57,7 @@
   void set field(A arg) {
     getterField = arg;
     //            ^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
   }
 }
@@ -72,7 +72,7 @@
   Expect.throwsTypeError(() => instance1.field = new A() as dynamic);
   B resultB = instance1.field;
   //          ^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                    ^
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 
@@ -83,7 +83,7 @@
   // Type 'A' has no method named 'b'
   instance1.field.b();
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'b' isn't defined for the class 'A'.
 
   instance3.field = new B();
diff --git a/tests/language/getter/setter_type_test.dart b/tests/language/getter/setter_type_test.dart
index b5b5299..f9579d5 100644
--- a/tests/language/getter/setter_type_test.dart
+++ b/tests/language/getter/setter_type_test.dart
@@ -8,7 +8,7 @@
 
 int get foo => bar;
 //      ^^^
-// [analyzer] STATIC_WARNING.GETTER_NOT_SUBTYPE_SETTER_TYPES
+// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
 // [cfe] unspecified
 
 void set foo(String str) {
diff --git a/tests/language/getter/syntax_get_set_syntax_test.dart b/tests/language/getter/syntax_get_set_syntax_test.dart
index 9dcaac2..dbeaa85 100644
--- a/tests/language/getter/syntax_get_set_syntax_test.dart
+++ b/tests/language/getter/syntax_get_set_syntax_test.dart
@@ -73,7 +73,7 @@
 // [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE
 // [cfe] The return type can't be 'var'.
 //    ^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   var get b, c;
 //^^^
 // [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE
@@ -94,7 +94,7 @@
 // [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE
 // [cfe] The return type can't be 'var'.
 //    ^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 //        ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
@@ -141,9 +141,9 @@
   List? set;
   List set d;
 //^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 //^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 //         ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
@@ -153,7 +153,7 @@
 // [cfe] A setter should have exactly one formal parameter.
   List? set e, f;
 //^^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 //          ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
@@ -189,9 +189,9 @@
   List<int>? set;
   List<int> set d;
 //^^^^^^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 //^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 //              ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
@@ -201,7 +201,7 @@
 // [cfe] A setter should have exactly one formal parameter.
   List<int>? set e, f;
 //^^^^^^^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 //               ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
diff --git a/tests/language/identifier/known_prefix_error_test.dart b/tests/language/identifier/known_prefix_error_test.dart
index a104b53..06ec097 100644
--- a/tests/language/identifier/known_prefix_error_test.dart
+++ b/tests/language/identifier/known_prefix_error_test.dart
@@ -23,131 +23,131 @@
 
 async<dynamic> _async = new async.A();
 // [error line 24, column 1, length 5]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'async' isn't a type.
 // [error line 24, column 1]
 // [cfe] Expected 0 type arguments.
 await<dynamic> _await = new await.A();
 // [error line 30, column 1, length 5]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'await' isn't a type.
 // [error line 30, column 1]
 // [cfe] Expected 0 type arguments.
 hide<dynamic> _hide = new hide.A();
 // [error line 36, column 1, length 4]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'hide' isn't a type.
 // [error line 36, column 1]
 // [cfe] Expected 0 type arguments.
 of<dynamic> _of = new of.A();
 // [error line 42, column 1, length 2]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'of' isn't a type.
 // [error line 42, column 1]
 // [cfe] Expected 0 type arguments.
 on<dynamic> _on = new on.A();
 // [error line 48, column 1, length 2]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'on' isn't a type.
 // [error line 48, column 1]
 // [cfe] Expected 0 type arguments.
 show<dynamic> _show = new show.A();
 // [error line 54, column 1, length 4]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'show' isn't a type.
 // [error line 54, column 1]
 // [cfe] Expected 0 type arguments.
 sync<dynamic> _sync = new sync.A();
 // [error line 60, column 1, length 4]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'sync' isn't a type.
 // [error line 60, column 1]
 // [cfe] Expected 0 type arguments.
 yield<dynamic> _yield = new yield.A();
 // [error line 66, column 1, length 5]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'yield' isn't a type.
 // [error line 66, column 1]
 // [cfe] Expected 0 type arguments.
 
 async.B<async> _B_async = new async.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'async' isn't a type.
 await.B<await> _B_await = new await.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'await' isn't a type.
 hide.B<hide> _B_hide = new hide.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'hide' isn't a type.
 of.B<of> _B_of = new of.B();
 //   ^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'of' isn't a type.
 on.B<on> _B_on = new on.B();
 //   ^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'on' isn't a type.
 show.B<show> _B_show = new show.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'show' isn't a type.
 sync.B<sync> _B_sync = new sync.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'sync' isn't a type.
 yield.B<yield> _B_yield = new yield.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'yield' isn't a type.
 
 async.B<async<dynamic>> _B2_async = new async.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'async' isn't a type.
 //      ^
 // [cfe] Expected 0 type arguments.
 await.B<await<dynamic>> _B2_await = new await.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'await' isn't a type.
 //      ^
 // [cfe] Expected 0 type arguments.
 hide.B<hide<dynamic>> _B2_hide = new hide.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'hide' isn't a type.
 //     ^
 // [cfe] Expected 0 type arguments.
 of.B<of<dynamic>> _B2_of = new of.B();
 //   ^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'of' isn't a type.
 //   ^
 // [cfe] Expected 0 type arguments.
 on.B<on<dynamic>> _B2_on = new on.B();
 //   ^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'on' isn't a type.
 //   ^
 // [cfe] Expected 0 type arguments.
 show.B<show<dynamic>> _B2_show = new show.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'show' isn't a type.
 //     ^
 // [cfe] Expected 0 type arguments.
 sync.B<sync<dynamic>> _B2_sync = new sync.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'sync' isn't a type.
 //     ^
 // [cfe] Expected 0 type arguments.
 yield.B<yield<dynamic>> _B2_yield = new yield.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'yield' isn't a type.
 //      ^
 // [cfe] Expected 0 type arguments.
diff --git a/tests/language/if_null/assignment_behavior_test.dart b/tests/language/if_null/assignment_behavior_test.dart
index 6cdccc7..d83be71 100644
--- a/tests/language/if_null/assignment_behavior_test.dart
+++ b/tests/language/if_null/assignment_behavior_test.dart
@@ -122,10 +122,10 @@
     yGetValue = 1; check(1, () => v ??= y, ['$s.v', 'y', '$s.v=1']);
     finalOne ??= null;
 //  ^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL
 // [cfe] The setter 'finalOne' isn't defined for the class 'C'.
 //               ^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 //               ^^^^
 // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION
     yGetValue = 1;
@@ -169,18 +169,18 @@
   { var l; yGetValue = 1; check(1, () => l ??= y, ['y']); Expect.equals(1, l); }
   { final l = 1; l ??= null; }
   //             ^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   // [cfe] Can't assign to the final variable 'l'.
   //                   ^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                   ^^^^
   // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION
   C ??= null;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
 //      ^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 //      ^^^^
 // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION
   h ??= null;
@@ -228,11 +228,11 @@
   check(1, () => C?.x ??= bad(), ['C.x']);
   h.C.xgetValue = 1;
   //  ^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] Setter not found: 'xgetValue'.
   check(1, () => h.c?.x ??= bad(), ['h.C.x']);
   //               ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_PREFIXED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_PREFIXED_NAME
   // [cfe] Getter not found: 'c'.
   yGetValue = 1;
   check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']);
diff --git a/tests/language/if_null/precedence_test.dart b/tests/language/if_null/precedence_test.dart
index 2b11622..eeb9570 100644
--- a/tests/language/if_null/precedence_test.dart
+++ b/tests/language/if_null/precedence_test.dart
@@ -34,7 +34,7 @@
   // "(a ?? b) || c" would allow b to have any type provided that a is bool.
   falsity ?? 1 || true;
   //         ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 
   // "a || b ?? c" should parse as "(a || b) ?? c", therefore it is a static
@@ -42,7 +42,7 @@
   // "a || (b ?? c)" would allow b to have any type provided that c is bool.
   falsity || 1 ?? true;
 //           ^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 //                ^^^^
 // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION
@@ -51,7 +51,7 @@
   // error.
   Expect.throwsAssertionError(() => false || null ?? true);
   //                                         ^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
   // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
   //                                                 ^^^^
   // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION
diff --git a/tests/language/implicit_downcast_during/assert_initializer_test.dart b/tests/language/implicit_downcast_during/assert_initializer_test.dart
index dd8c975..ca323ad 100644
--- a/tests/language/implicit_downcast_during/assert_initializer_test.dart
+++ b/tests/language/implicit_downcast_during/assert_initializer_test.dart
@@ -5,11 +5,11 @@
 class C {
   C.oneArg(Object x) : assert(x);
   //                          ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_EXPRESSION
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
   C.twoArgs(Object x, Object y) : assert(x, y);
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_EXPRESSION
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
 
diff --git a/tests/language/implicit_downcast_during/assert_statement_test.dart b/tests/language/implicit_downcast_during/assert_statement_test.dart
index 9f0aa75..d32382e 100644
--- a/tests/language/implicit_downcast_during/assert_statement_test.dart
+++ b/tests/language/implicit_downcast_during/assert_statement_test.dart
@@ -6,11 +6,11 @@
   Object b = true;
   assert(b);
   //     ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_EXPRESSION
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
   assert(b, 'should not fail');
   //     ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_EXPRESSION
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
   assert(false, b);
   // OK, the message can have any type.
diff --git a/tests/language/implicit_downcast_during/assignment_test.dart b/tests/language/implicit_downcast_during/assignment_test.dart
index fe9f1e4..fe35a5c 100644
--- a/tests/language/implicit_downcast_during/assignment_test.dart
+++ b/tests/language/implicit_downcast_during/assignment_test.dart
@@ -11,6 +11,6 @@
   A a = new B();
   b = a;
   //  ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/combiner_test.dart b/tests/language/implicit_downcast_during/combiner_test.dart
index 840d2e8..f497779 100644
--- a/tests/language/implicit_downcast_during/combiner_test.dart
+++ b/tests/language/implicit_downcast_during/combiner_test.dart
@@ -15,6 +15,6 @@
   A a = new B();
   c += a;
   //   ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/compound_assignment_test.dart b/tests/language/implicit_downcast_during/compound_assignment_test.dart
index a927b55..3d092c4 100644
--- a/tests/language/implicit_downcast_during/compound_assignment_test.dart
+++ b/tests/language/implicit_downcast_during/compound_assignment_test.dart
@@ -15,16 +15,16 @@
   //^
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'B'.
   //   ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 
   ++b;
 //^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'B'.
 
   b++;
 //^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // ^
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/conditional_expression_test.dart b/tests/language/implicit_downcast_during/conditional_expression_test.dart
index 565f124..ce234c2 100644
--- a/tests/language/implicit_downcast_during/conditional_expression_test.dart
+++ b/tests/language/implicit_downcast_during/conditional_expression_test.dart
@@ -6,6 +6,6 @@
   Object b = true;
   b ? 1 : 2;
 //^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/implicit_downcast_during/constructor_initializer_test.dart b/tests/language/implicit_downcast_during/constructor_initializer_test.dart
index 2013e9f..05501f5 100644
--- a/tests/language/implicit_downcast_during/constructor_initializer_test.dart
+++ b/tests/language/implicit_downcast_during/constructor_initializer_test.dart
@@ -10,7 +10,7 @@
   B b;
   C(A a) : b = a;
   //           ^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
 
diff --git a/tests/language/implicit_downcast_during/constructor_invocation_test.dart b/tests/language/implicit_downcast_during/constructor_invocation_test.dart
index 97de4ce..f1714be 100644
--- a/tests/language/implicit_downcast_during/constructor_invocation_test.dart
+++ b/tests/language/implicit_downcast_during/constructor_invocation_test.dart
@@ -14,6 +14,6 @@
   A a = new B();
   new C(a);
   //    ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'A' can't be assigned to the parameter type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/do_test.dart b/tests/language/implicit_downcast_during/do_test.dart
index f4bebde..24aff94 100644
--- a/tests/language/implicit_downcast_during/do_test.dart
+++ b/tests/language/implicit_downcast_during/do_test.dart
@@ -6,6 +6,6 @@
   Object b = false;
   do {} while (b);
   //           ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/implicit_downcast_during/factory_constructor_invocation_test.dart b/tests/language/implicit_downcast_during/factory_constructor_invocation_test.dart
index 8e889a2..569c40c 100644
--- a/tests/language/implicit_downcast_during/factory_constructor_invocation_test.dart
+++ b/tests/language/implicit_downcast_during/factory_constructor_invocation_test.dart
@@ -15,6 +15,6 @@
   A a = new B();
   new C(a);
   //    ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'A' can't be assigned to the parameter type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/field_declaration_test.dart b/tests/language/implicit_downcast_during/field_declaration_test.dart
index 4f819a2..abcac19 100644
--- a/tests/language/implicit_downcast_during/field_declaration_test.dart
+++ b/tests/language/implicit_downcast_during/field_declaration_test.dart
@@ -9,18 +9,18 @@
 A a1 = new B();
 B b1 = a1;
 //     ^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 
 class C {
   static B b3 = a1;
   //            ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 
   B b5 = a1;
   //     ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
 
diff --git a/tests/language/implicit_downcast_during/for_condition_test.dart b/tests/language/implicit_downcast_during/for_condition_test.dart
index 645b943..a860b6a 100644
--- a/tests/language/implicit_downcast_during/for_condition_test.dart
+++ b/tests/language/implicit_downcast_during/for_condition_test.dart
@@ -6,6 +6,6 @@
   Object b = false;
   for (int i = 0; b; i++) {}
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/implicit_downcast_during/for_in_element_test.dart b/tests/language/implicit_downcast_during/for_in_element_test.dart
index 30273be..67be51e 100644
--- a/tests/language/implicit_downcast_during/for_in_element_test.dart
+++ b/tests/language/implicit_downcast_during/for_in_element_test.dart
@@ -11,21 +11,21 @@
   Object o = listOfA;
   for (B x in o) {}
   //          ^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
   for (B x in listOfA) {}
   //     ^
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
   //          ^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_ELEMENT_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_ELEMENT_TYPE
   B y;
   for (y in o) {}
   //        ^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
   for (y in listOfA) {}
   //     ^
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
   //        ^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_ELEMENT_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_ELEMENT_TYPE
 }
diff --git a/tests/language/implicit_downcast_during/for_in_iterable_test.dart b/tests/language/implicit_downcast_during/for_in_iterable_test.dart
index 09fd2cf..91ca2ca 100644
--- a/tests/language/implicit_downcast_during/for_in_iterable_test.dart
+++ b/tests/language/implicit_downcast_during/for_in_iterable_test.dart
@@ -10,15 +10,15 @@
   Object o = <A>[];
   for (var x in o) {}
   //            ^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
   for (B x in o) {}
   //          ^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
   B y;
   for (y in o) {}
   //        ^
-  // [analyzer] STATIC_TYPE_WARNING.FOR_IN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE
   // [cfe] The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
 }
diff --git a/tests/language/implicit_downcast_during/for_initializer_expression_test.dart b/tests/language/implicit_downcast_during/for_initializer_expression_test.dart
index 8c14537..98d8daf 100644
--- a/tests/language/implicit_downcast_during/for_initializer_expression_test.dart
+++ b/tests/language/implicit_downcast_during/for_initializer_expression_test.dart
@@ -7,6 +7,6 @@
   int i;
   for (i = b; i < 1; i++) {}
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'int'.
 }
diff --git a/tests/language/implicit_downcast_during/for_initializer_var_test.dart b/tests/language/implicit_downcast_during/for_initializer_var_test.dart
index 958c111..4b79c20 100644
--- a/tests/language/implicit_downcast_during/for_initializer_var_test.dart
+++ b/tests/language/implicit_downcast_during/for_initializer_var_test.dart
@@ -6,6 +6,6 @@
   Object b = 0;
   for (int i = b; i < 1; i++) {}
   //           ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'int'.
 }
diff --git a/tests/language/implicit_downcast_during/function_literal_arrow_test.dart b/tests/language/implicit_downcast_during/function_literal_arrow_test.dart
index 3f5950e..26f0836 100644
--- a/tests/language/implicit_downcast_during/function_literal_arrow_test.dart
+++ b/tests/language/implicit_downcast_during/function_literal_arrow_test.dart
@@ -10,6 +10,6 @@
   A a = new B();
   B Function(A) f = (A a) => a;
   //                         ^
-  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE_FROM_CLOSURE
-  // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE_FROM_CLOSURE
+  // [cfe] A value of type 'A' can't be returned from a function with return type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/function_literal_return_test.dart b/tests/language/implicit_downcast_during/function_literal_return_test.dart
index f7862a1..7c9acba 100644
--- a/tests/language/implicit_downcast_during/function_literal_return_test.dart
+++ b/tests/language/implicit_downcast_during/function_literal_return_test.dart
@@ -11,7 +11,7 @@
   B Function(A) f = (A a) {
     return a;
     //     ^
-    // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE_FROM_CLOSURE
-    // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
+    // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE_FROM_CLOSURE
+    // [cfe] A value of type 'A' can't be returned from a function with return type 'B'.
   };
 }
diff --git a/tests/language/implicit_downcast_during/if_null_assignment_test.dart b/tests/language/implicit_downcast_during/if_null_assignment_test.dart
index 09f1e97..7c91b32 100644
--- a/tests/language/implicit_downcast_during/if_null_assignment_test.dart
+++ b/tests/language/implicit_downcast_during/if_null_assignment_test.dart
@@ -11,6 +11,6 @@
   A? a = new B();
   b ??= a;
 //      ^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // [cfe] A value of type 'A?' can't be assigned to a variable of type 'B?'.
 }
diff --git a/tests/language/implicit_downcast_during/if_statement_test.dart b/tests/language/implicit_downcast_during/if_statement_test.dart
index fb46a9b..4389417 100644
--- a/tests/language/implicit_downcast_during/if_statement_test.dart
+++ b/tests/language/implicit_downcast_during/if_statement_test.dart
@@ -6,6 +6,6 @@
   Object b = true;
   if (b) {}
   //  ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/implicit_downcast_during/indexed_assignment_test.dart b/tests/language/implicit_downcast_during/indexed_assignment_test.dart
index 3f5ce05..1f6493c 100644
--- a/tests/language/implicit_downcast_during/indexed_assignment_test.dart
+++ b/tests/language/implicit_downcast_during/indexed_assignment_test.dart
@@ -15,9 +15,9 @@
   C c = new C();
   c[a] = a;
   //^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
   //     ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/indexed_compound_assignment_test.dart b/tests/language/implicit_downcast_during/indexed_compound_assignment_test.dart
index bf7a60b..b5c397c 100644
--- a/tests/language/implicit_downcast_during/indexed_compound_assignment_test.dart
+++ b/tests/language/implicit_downcast_during/indexed_compound_assignment_test.dart
@@ -22,10 +22,10 @@
   D d = new D();
   c[a] += 1;
   //^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
   d[a] += 1;
   //^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/indexed_get_test.dart b/tests/language/implicit_downcast_during/indexed_get_test.dart
index 790cbd4..ffeab4c 100644
--- a/tests/language/implicit_downcast_during/indexed_get_test.dart
+++ b/tests/language/implicit_downcast_during/indexed_get_test.dart
@@ -15,6 +15,6 @@
   C c = new C();
   c[a];
   //^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/indexed_if_null_assignment_test.dart b/tests/language/implicit_downcast_during/indexed_if_null_assignment_test.dart
index 5b7d5f1..2f439e8 100644
--- a/tests/language/implicit_downcast_during/indexed_if_null_assignment_test.dart
+++ b/tests/language/implicit_downcast_during/indexed_if_null_assignment_test.dart
@@ -28,18 +28,18 @@
   E e = new E();
   c[a] ??= 1;
   //^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
   d[a] ??= 1;
   //^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
   e[a] ??= 1;
   //^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
   c[a] ??= 1;
   //^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/invocation_test.dart b/tests/language/implicit_downcast_during/invocation_test.dart
index ed265bc..ecff881 100644
--- a/tests/language/implicit_downcast_during/invocation_test.dart
+++ b/tests/language/implicit_downcast_during/invocation_test.dart
@@ -12,6 +12,6 @@
   A a = new B();
   f(a);
   //^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'A' can't be assigned to the parameter type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/list_literal_test.dart b/tests/language/implicit_downcast_during/list_literal_test.dart
index 1edcd58..75d990d 100644
--- a/tests/language/implicit_downcast_during/list_literal_test.dart
+++ b/tests/language/implicit_downcast_during/list_literal_test.dart
@@ -10,6 +10,6 @@
   A a = new B();
   <B>[a];
   //  ^
-  // [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/logical_expression_test.dart b/tests/language/implicit_downcast_during/logical_expression_test.dart
index 8e73fa1..123fe62 100644
--- a/tests/language/implicit_downcast_during/logical_expression_test.dart
+++ b/tests/language/implicit_downcast_during/logical_expression_test.dart
@@ -6,17 +6,17 @@
   Object o = new Object();
   o || o;
 //^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 //     ^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 
   o && o;
 //^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 //     ^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/implicit_downcast_during/map_literal_test.dart b/tests/language/implicit_downcast_during/map_literal_test.dart
index e86fae3..01ae141 100644
--- a/tests/language/implicit_downcast_during/map_literal_test.dart
+++ b/tests/language/implicit_downcast_during/map_literal_test.dart
@@ -10,10 +10,10 @@
   A a = new B();
   <B, Object>{a: 1};
   //          ^
-  // [analyzer] STATIC_WARNING.MAP_KEY_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.MAP_KEY_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
   <Object, B>{1: a};
   //             ^
-  // [analyzer] STATIC_WARNING.MAP_VALUE_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.MAP_VALUE_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/method_invocation_test.dart b/tests/language/implicit_downcast_during/method_invocation_test.dart
index 47e66ce..635da52 100644
--- a/tests/language/implicit_downcast_during/method_invocation_test.dart
+++ b/tests/language/implicit_downcast_during/method_invocation_test.dart
@@ -15,6 +15,6 @@
   A a = new B();
   c.f(a);
   //  ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'A' can't be assigned to the parameter type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/not_test.dart b/tests/language/implicit_downcast_during/not_test.dart
index de8a43a..697e32b 100644
--- a/tests/language/implicit_downcast_during/not_test.dart
+++ b/tests/language/implicit_downcast_during/not_test.dart
@@ -6,6 +6,6 @@
   Object b = true;
   !b;
 // ^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_NEGATION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_NEGATION_EXPRESSION
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/implicit_downcast_during/null_aware_method_invocation_test.dart b/tests/language/implicit_downcast_during/null_aware_method_invocation_test.dart
index 0b1d404..535c7db 100644
--- a/tests/language/implicit_downcast_during/null_aware_method_invocation_test.dart
+++ b/tests/language/implicit_downcast_during/null_aware_method_invocation_test.dart
@@ -15,6 +15,6 @@
   A a = new B();
   c?.f(a);
 //     ^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] The argument type 'A' can't be assigned to the parameter type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/redirecting_initializer_test.dart b/tests/language/implicit_downcast_during/redirecting_initializer_test.dart
index bc6f7b3..595d51f 100644
--- a/tests/language/implicit_downcast_during/redirecting_initializer_test.dart
+++ b/tests/language/implicit_downcast_during/redirecting_initializer_test.dart
@@ -9,7 +9,7 @@
 class C {
   C(A a) : this._(a);
   //              ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'A' can't be assigned to the parameter type 'B'.
   C._(B b);
 }
diff --git a/tests/language/implicit_downcast_during/return_async_test.dart b/tests/language/implicit_downcast_during/return_async_test.dart
index a976d1e..b056db4 100644
--- a/tests/language/implicit_downcast_during/return_async_test.dart
+++ b/tests/language/implicit_downcast_during/return_async_test.dart
@@ -11,16 +11,16 @@
 Future<B> f1(A a) async {
   return a as FutureOr<A>;
   //     ^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
   //       ^
-  // [cfe] A value of type 'FutureOr<A>' can't be assigned to a variable of type 'B'.
+  // [cfe] A value of type 'FutureOr<A>' can't be returned from an async function with return type 'Future<B>'.
 }
 
 Future<B> f2(A a) async => a as FutureOr<A>;
 //                         ^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+// [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
 //                           ^
-// [cfe] A value of type 'FutureOr<A>' can't be assigned to a variable of type 'B'.
+// [cfe] A value of type 'FutureOr<A>' can't be returned from an async function with return type 'Future<B>'.
 
 main() async {
   Object b;
diff --git a/tests/language/implicit_downcast_during/return_test.dart b/tests/language/implicit_downcast_during/return_test.dart
index 3bbffe8..4a56921 100644
--- a/tests/language/implicit_downcast_during/return_test.dart
+++ b/tests/language/implicit_downcast_during/return_test.dart
@@ -9,14 +9,14 @@
 B f1(A a) {
   return a;
   //     ^
-  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
-  // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
+  // [cfe] A value of type 'A' can't be returned from a function with return type 'B'.
 }
 
 B f2(A a) => a;
 //           ^
-// [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
-// [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
+// [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
+// [cfe] A value of type 'A' can't be returned from a function with return type 'B'.
 
 void main() {
   Object b;
diff --git a/tests/language/implicit_downcast_during/static_method_invocation_test.dart b/tests/language/implicit_downcast_during/static_method_invocation_test.dart
index 4b6570c..62e6c2e 100644
--- a/tests/language/implicit_downcast_during/static_method_invocation_test.dart
+++ b/tests/language/implicit_downcast_during/static_method_invocation_test.dart
@@ -14,6 +14,6 @@
   A a = new B();
   C.f(a);
   //  ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'A' can't be assigned to the parameter type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/super_initializer_test.dart b/tests/language/implicit_downcast_during/super_initializer_test.dart
index 8931361..2cb7037 100644
--- a/tests/language/implicit_downcast_during/super_initializer_test.dart
+++ b/tests/language/implicit_downcast_during/super_initializer_test.dart
@@ -13,7 +13,7 @@
 class C extends Base {
   C(A a) : super(a);
   //             ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'A' can't be assigned to the parameter type 'B'.
 }
 
diff --git a/tests/language/implicit_downcast_during/super_method_invocation_test.dart b/tests/language/implicit_downcast_during/super_method_invocation_test.dart
index fe16df1..014422d 100644
--- a/tests/language/implicit_downcast_during/super_method_invocation_test.dart
+++ b/tests/language/implicit_downcast_during/super_method_invocation_test.dart
@@ -14,7 +14,7 @@
   void f(A a) {
     g(a);
     //^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'A' can't be assigned to the parameter type 'B'.
   }
 }
diff --git a/tests/language/implicit_downcast_during/variable_declaration_test.dart b/tests/language/implicit_downcast_during/variable_declaration_test.dart
index a44f239..216250c 100644
--- a/tests/language/implicit_downcast_during/variable_declaration_test.dart
+++ b/tests/language/implicit_downcast_during/variable_declaration_test.dart
@@ -10,6 +10,6 @@
   A a = new B();
   B b = a;
   //    ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
diff --git a/tests/language/implicit_downcast_during/while_statement_test.dart b/tests/language/implicit_downcast_during/while_statement_test.dart
index 3aa386b..6e4bdc9 100644
--- a/tests/language/implicit_downcast_during/while_statement_test.dart
+++ b/tests/language/implicit_downcast_during/while_statement_test.dart
@@ -6,6 +6,6 @@
   Object b = false;
   while (b) {}
   //     ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
 }
diff --git a/tests/language/implicit_downcast_during/yield_star_test.dart b/tests/language/implicit_downcast_during/yield_star_test.dart
index 990ec66..800b1c7 100644
--- a/tests/language/implicit_downcast_during/yield_star_test.dart
+++ b/tests/language/implicit_downcast_during/yield_star_test.dart
@@ -9,7 +9,7 @@
 Iterable<B> f(Iterable<A> a) sync* {
   yield* a;
   //     ^
-  // [analyzer] STATIC_TYPE_WARNING.YIELD_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.YIELD_OF_INVALID_TYPE
   // [cfe] A value of type 'Iterable<A>' can't be assigned to a variable of type 'Iterable<B>'.
 }
 
diff --git a/tests/language/implicit_downcast_during/yield_test.dart b/tests/language/implicit_downcast_during/yield_test.dart
index 8f98bd2..874ad7f 100644
--- a/tests/language/implicit_downcast_during/yield_test.dart
+++ b/tests/language/implicit_downcast_during/yield_test.dart
@@ -9,7 +9,7 @@
 Iterable<B> f(A a) sync* {
   yield a;
   //    ^
-  // [analyzer] STATIC_TYPE_WARNING.YIELD_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.YIELD_OF_INVALID_TYPE
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'B'.
 }
 
diff --git a/tests/language/import/combinators2_test.dart b/tests/language/import/combinators2_test.dart
index 47a2db0..c1ee2fb 100644
--- a/tests/language/import/combinators2_test.dart
+++ b/tests/language/import/combinators2_test.dart
@@ -14,6 +14,6 @@
   // Ugly is hidden.
   print(ugly);
   //    ^^^^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Getter not found: 'ugly'.
 }
diff --git a/tests/language/import/name_clash_lib1.dart b/tests/language/import/name_clash_lib1.dart
new file mode 100644
index 0000000..8fbfaf3
--- /dev/null
+++ b/tests/language/import/name_clash_lib1.dart
@@ -0,0 +1,5 @@
+// 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.
+
+library clashing.nonempty.name;
diff --git a/tests/language/import/name_clash_lib2.dart b/tests/language/import/name_clash_lib2.dart
new file mode 100644
index 0000000..8fbfaf3
--- /dev/null
+++ b/tests/language/import/name_clash_lib2.dart
@@ -0,0 +1,5 @@
+// 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.
+
+library clashing.nonempty.name;
diff --git a/tests/language/import/name_clash_test.dart b/tests/language/import/name_clash_test.dart
new file mode 100644
index 0000000..72d06a5
--- /dev/null
+++ b/tests/language/import/name_clash_test.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.
+
+// Check that a library name clash is not an error.
+
+import "name_clash_lib1.dart";
+import "name_clash_lib2.dart";
+
+export "name_clash_lib1.dart";
+export "name_clash_lib2.dart";
+
+main() {}
diff --git a/tests/language/import/self_test.dart b/tests/language/import/self_test.dart
index 1feeb88..f724a60 100644
--- a/tests/language/import/self_test.dart
+++ b/tests/language/import/self_test.dart
@@ -18,6 +18,6 @@
 main() {
   p._x;
   //^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_PREFIXED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_PREFIXED_NAME
   // [cfe] Getter not found: '_x'.
 }
diff --git a/tests/language/inference/accessor_ref_test.dart b/tests/language/inference/accessor_ref_test.dart
index 9d12c5c..f443785 100644
--- a/tests/language/inference/accessor_ref_test.dart
+++ b/tests/language/inference/accessor_ref_test.dart
@@ -35,14 +35,14 @@
   x = new E();
   x = new B();
   //  ^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //      ^
   // [cfe] A value of type 'B' can't be assigned to a variable of type 'C?'.
   y = new C();
   y = new E();
   y = new B();
   //  ^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //      ^
   // [cfe] A value of type 'B' can't be assigned to a variable of type 'C'.
 }
diff --git a/tests/language/inference/inconsistent_inheritance_test.dart b/tests/language/inference/inconsistent_inheritance_test.dart
index 79ba0fc..8ff26eb 100644
--- a/tests/language/inference/inconsistent_inheritance_test.dart
+++ b/tests/language/inference/inconsistent_inheritance_test.dart
@@ -16,7 +16,7 @@
     Object y = x;
     String z = x;
     //         ^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     // [cfe] A value of type 'Object' can't be assigned to a variable of type 'String'.
   }
 }
diff --git a/tests/language/initializing_formal/type_annotation_test.dart b/tests/language/initializing_formal/type_annotation_test.dart
index b15ad9a..6ca6548 100644
--- a/tests/language/initializing_formal/type_annotation_test.dart
+++ b/tests/language/initializing_formal/type_annotation_test.dart
@@ -10,14 +10,12 @@
   C.subType(int this.a);
   C.superType(dynamic this.a);
   //          ^^^^^^^^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.INVALID_PARAMETER_DECLARATION
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
   //                       ^
   // [cfe] The type of parameter 'a', 'dynamic' is not a subtype of the corresponding field's type, 'num'.
   C.unrelatedType(String this.a);
   //              ^^^^^^^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.INVALID_PARAMETER_DECLARATION
-  //              ^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
   //                          ^
   // [cfe] The type of parameter 'a', 'String' is not a subtype of the corresponding field's type, 'num'.
 }
diff --git a/tests/language/initializing_formal/type_test.dart b/tests/language/initializing_formal/type_test.dart
index 41a9f2a..b1f739d 100644
--- a/tests/language/initializing_formal/type_test.dart
+++ b/tests/language/initializing_formal/type_test.dart
@@ -10,7 +10,7 @@
   A(int this.x) : y = x { // OK.
     int z = x;
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
   }
 }
diff --git a/tests/language/interface/static_method_test.dart b/tests/language/interface/static_method_test.dart
index b07e7b9..63783ef 100644
--- a/tests/language/interface/static_method_test.dart
+++ b/tests/language/interface/static_method_test.dart
@@ -12,6 +12,6 @@
 main() {
   A();
 //^
-// [analyzer] STATIC_WARNING.INSTANTIATE_ABSTRACT_CLASS
+// [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS
 // [cfe] The class 'A' is abstract and can't be instantiated.
 }
diff --git a/tests/language/invalid_returns/async_invalid_return_00_test.dart b/tests/language/invalid_returns/async_invalid_return_00_test.dart
index 6df2790..b5e14e1 100644
--- a/tests/language/invalid_returns/async_invalid_return_00_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_00_test.dart
@@ -12,14 +12,14 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void async function.
 }
 
 Object? test2() async {
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void async function.
 }
 
 // Inferred return type of function literal is `Future<Null>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_01_test.dart b/tests/language/invalid_returns/async_invalid_return_01_test.dart
index e2b0e9b..a502d3f0 100644
--- a/tests/language/invalid_returns/async_invalid_return_01_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_01_test.dart
@@ -12,14 +12,14 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void async function.
 }
 
 Future<int> Function() test2 = () async {
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void async function.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_02_test.dart b/tests/language/invalid_returns/async_invalid_return_02_test.dart
index 1b36160..ad814cf 100644
--- a/tests/language/invalid_returns/async_invalid_return_02_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_02_test.dart
@@ -12,14 +12,14 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void async function.
 }
 
 FutureOr<int> Function() test2 = () async {
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void async function.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_03_test.dart b/tests/language/invalid_returns/async_invalid_return_03_test.dart
index 7845404..4b42e26 100644
--- a/tests/language/invalid_returns/async_invalid_return_03_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_03_test.dart
@@ -12,7 +12,7 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void async function.
 }
 
 // Inferred return type of function literal is `Future<Null>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_04_test.dart b/tests/language/invalid_returns/async_invalid_return_04_test.dart
index 4c0b193..648a1af 100644
--- a/tests/language/invalid_returns/async_invalid_return_04_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_04_test.dart
@@ -12,7 +12,7 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void async function.
 }
 
 // Inferred return type of function literal is `Future<Null>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_05_test.dart b/tests/language/invalid_returns/async_invalid_return_05_test.dart
index d11a4b5..5ef7b9a 100644
--- a/tests/language/invalid_returns/async_invalid_return_05_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_05_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'void'.
 }
 
-// Inferred return type of function literal is `Future<int>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 void Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_08_test.dart b/tests/language/invalid_returns/async_invalid_return_08_test.dart
index 09950ac..e8f283d 100644
--- a/tests/language/invalid_returns/async_invalid_return_08_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_08_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Object' can't be returned from an async function with return type 'void'.
 }
 
-// Inferred return type of function literal is `Future<Object>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 void Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'Object' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_11_test.dart b/tests/language/invalid_returns/async_invalid_return_11_test.dart
index b85f731..f0fc113 100644
--- a/tests/language/invalid_returns/async_invalid_return_11_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_11_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>?' can't be returned from an async function with return type 'void'.
 }
 
-// Inferred return type of function literal is `Future<int?>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 void Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'Future<int>?' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_14_test.dart b/tests/language/invalid_returns/async_invalid_return_14_test.dart
index 3eaa715..77458a8 100644
--- a/tests/language/invalid_returns/async_invalid_return_14_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_14_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<int>' can't be returned from an async function with return type 'void'.
 }
 
-// Inferred return type of function literal is `Future<int>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 void Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'FutureOr<int>' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_17_test.dart b/tests/language/invalid_returns/async_invalid_return_17_test.dart
index f347a21..0cac976 100644
--- a/tests/language/invalid_returns/async_invalid_return_17_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_17_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<Object>' can't be returned from an async function with return type 'void'.
 }
 
-// Inferred return type of function literal is `Future<Object>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 void Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'Future<Object>' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_20_test.dart b/tests/language/invalid_returns/async_invalid_return_20_test.dart
index 5b54f78..ef44111 100644
--- a/tests/language/invalid_returns/async_invalid_return_20_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_20_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<Object>' can't be returned from an async function with return type 'void'.
 }
 
-// Inferred return type of function literal is `Future<Object>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 void Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'FutureOr<Object>' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_23_test.dart b/tests/language/invalid_returns/async_invalid_return_23_test.dart
index f496a74..37b6fdb 100644
--- a/tests/language/invalid_returns/async_invalid_return_23_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_23_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from an async function with return type 'Object'.
 }
 
 Object? test2() async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from an async function with return type 'Object?'.
 }
 
 // Inferred return type of function literal is `Future<void>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_24_test.dart b/tests/language/invalid_returns/async_invalid_return_24_test.dart
index 1ccbca7..1a57405 100644
--- a/tests/language/invalid_returns/async_invalid_return_24_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_24_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>?' can't be returned from an async function with return type 'Object'.
 }
 
 Object? test2() async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>?' can't be returned from an async function with return type 'Object?'.
 }
 
 // Inferred return type of function literal is `Future<void?>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_25_test.dart b/tests/language/invalid_returns/async_invalid_return_25_test.dart
index 5991e70..c080c43 100644
--- a/tests/language/invalid_returns/async_invalid_return_25_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_25_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'Object'.
 }
 
 Object? test2() async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'Object?'.
 }
 
 // Inferred return type of function literal is `Future<void>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_26_test.dart b/tests/language/invalid_returns/async_invalid_return_26_test.dart
index d99d60c..1fbc602 100644
--- a/tests/language/invalid_returns/async_invalid_return_26_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_26_test.dart
@@ -17,8 +17,8 @@
 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.
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
+  // [cfe] A value of type 'void' can't be returned from an async function with return type 'Future<int>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_27_test.dart b/tests/language/invalid_returns/async_invalid_return_27_test.dart
index 6b2faba..f3fb9f0 100644
--- a/tests/language/invalid_returns/async_invalid_return_27_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_27_test.dart
@@ -16,8 +16,8 @@
 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.
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'Future<int>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_28_test.dart b/tests/language/invalid_returns/async_invalid_return_28_test.dart
index 416b127..d6c195d 100644
--- a/tests/language/invalid_returns/async_invalid_return_28_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_28_test.dart
@@ -16,8 +16,8 @@
 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.
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'Future<int>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_29_test.dart b/tests/language/invalid_returns/async_invalid_return_29_test.dart
index dd8a9e2..9c92415 100644
--- a/tests/language/invalid_returns/async_invalid_return_29_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_29_test.dart
@@ -17,8 +17,8 @@
 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.
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
+  // [cfe] A value of type 'void' can't be returned from an async function with return type 'FutureOr<int>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_30_test.dart b/tests/language/invalid_returns/async_invalid_return_30_test.dart
index 605f4c9..c97fd4f 100644
--- a/tests/language/invalid_returns/async_invalid_return_30_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_30_test.dart
@@ -16,8 +16,8 @@
 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.
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'FutureOr<int>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_31_test.dart b/tests/language/invalid_returns/async_invalid_return_31_test.dart
index 9d5ac6c..2470925 100644
--- a/tests/language/invalid_returns/async_invalid_return_31_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_31_test.dart
@@ -16,8 +16,8 @@
 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.
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'FutureOr<int>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_32_test.dart b/tests/language/invalid_returns/async_invalid_return_32_test.dart
index eaac876..0c2f96d 100644
--- a/tests/language/invalid_returns/async_invalid_return_32_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_32_test.dart
@@ -15,7 +15,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from an async function with return type 'Future<Object?>'.
 }
 
 // Inferred return type of function literal is `Future<void>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_33_test.dart b/tests/language/invalid_returns/async_invalid_return_33_test.dart
index 971b4aa..30c61e6 100644
--- a/tests/language/invalid_returns/async_invalid_return_33_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_33_test.dart
@@ -15,7 +15,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'Future<Object?>'.
 }
 
 // Inferred return type of function literal is `Future<void>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_34_test.dart b/tests/language/invalid_returns/async_invalid_return_34_test.dart
index 5815421..d538239 100644
--- a/tests/language/invalid_returns/async_invalid_return_34_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_34_test.dart
@@ -15,7 +15,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'Future<Object?>'.
 }
 
 // Inferred return type of function literal is `Future<void>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_35_test.dart b/tests/language/invalid_returns/async_invalid_return_35_test.dart
index b9ddf70..8776631 100644
--- a/tests/language/invalid_returns/async_invalid_return_35_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_35_test.dart
@@ -15,7 +15,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from an async function with return type 'FutureOr<Object?>'.
 }
 
 // Inferred return type of function literal is `Future<void>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_36_test.dart b/tests/language/invalid_returns/async_invalid_return_36_test.dart
index 7586e9a..d79404d 100644
--- a/tests/language/invalid_returns/async_invalid_return_36_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_36_test.dart
@@ -15,21 +15,21 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'FutureOr<Object>'.
 }
 
 FutureOr<Object?> test2() async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'FutureOr<Object?>'.
 }
 
 FutureOr<Object> Function() test3 = () async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'Future<Object>'.
 };
 
 // Inferred return type of function literal is `Future<void>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_37_test.dart b/tests/language/invalid_returns/async_invalid_return_37_test.dart
index 6b0496d..da078a4 100644
--- a/tests/language/invalid_returns/async_invalid_return_37_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_37_test.dart
@@ -15,7 +15,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'FutureOr<Object?>'.
 }
 
 // Inferred return type of function literal is `Future<void>`, no error.
diff --git a/tests/language/invalid_returns/async_invalid_return_38_test.dart b/tests/language/invalid_returns/async_invalid_return_38_test.dart
index 3f18592..09a761b 100644
--- a/tests/language/invalid_returns/async_invalid_return_38_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_38_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'Future<String>'.
 }
 
 Future<String> Function() test2 = () async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'Future<String>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_39_test.dart b/tests/language/invalid_returns/async_invalid_return_39_test.dart
index 80deb7f..03879e4 100644
--- a/tests/language/invalid_returns/async_invalid_return_39_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_39_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from an async function with return type 'Future<String>'.
 }
 
 Future<String> Function() test2 = () async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from an async function with return type 'Future<String>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_40_test.dart b/tests/language/invalid_returns/async_invalid_return_40_test.dart
index 71589c8..9fc9eb0 100644
--- a/tests/language/invalid_returns/async_invalid_return_40_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_40_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<num>' can't be returned from an async function with return type 'Future<int>'.
 }
 
 Future<int> Function() test2 = () async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<num>' can't be returned from an async function with return type 'Future<int>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_41_test.dart b/tests/language/invalid_returns/async_invalid_return_41_test.dart
index d68b8ef..819d0df 100644
--- a/tests/language/invalid_returns/async_invalid_return_41_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_41_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<Future<String>>' can't be returned from an async function with return type 'Future<String>'.
 }
 
 Future<String> Function() test2 = () async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<Future<String>>' can't be returned from an async function with return type 'Future<String>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_42_test.dart b/tests/language/invalid_returns/async_invalid_return_42_test.dart
index 0988253..1c5e414 100644
--- a/tests/language/invalid_returns/async_invalid_return_42_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_42_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'FutureOr<String>'.
 }
 
 FutureOr<String> Function() test2 = () async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'Future<String>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_43_test.dart b/tests/language/invalid_returns/async_invalid_return_43_test.dart
index dbb5b1d..0ae4774 100644
--- a/tests/language/invalid_returns/async_invalid_return_43_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_43_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from an async function with return type 'FutureOr<String>'.
 }
 
 FutureOr<String> Function() test2 = () async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from an async function with return type 'Future<String>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_44_test.dart b/tests/language/invalid_returns/async_invalid_return_44_test.dart
index c9adfeb..56a1092 100644
--- a/tests/language/invalid_returns/async_invalid_return_44_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_44_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<int>' can't be returned from an async function with return type 'FutureOr<String>'.
 }
 
 FutureOr<String> Function() test2 = () async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<int>' can't be returned from an async function with return type 'Future<String>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_45_test.dart b/tests/language/invalid_returns/async_invalid_return_45_test.dart
index bf75dc2..5811b57 100644
--- a/tests/language/invalid_returns/async_invalid_return_45_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_45_test.dart
@@ -15,14 +15,14 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<Future<String>>' can't be returned from an async function with return type 'FutureOr<String>'.
 }
 
 FutureOr<String> Function() test2 = () async {
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<Future<String>>' can't be returned from an async function with return type 'Future<String>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_47_test.dart b/tests/language/invalid_returns/async_invalid_return_47_test.dart
index e39b36c..0ee1f2b 100644
--- a/tests/language/invalid_returns/async_invalid_return_47_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_47_test.dart
@@ -15,7 +15,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'Future<Null>'.
 }
 
 // Inferred return type of function literal is `Future<Null>`.
@@ -23,7 +23,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'Future<Null>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_48_test.dart b/tests/language/invalid_returns/async_invalid_return_48_test.dart
index d60f948..b97e745 100644
--- a/tests/language/invalid_returns/async_invalid_return_48_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_48_test.dart
@@ -15,7 +15,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'Future<Null>'.
 }
 
 // Inferred return type of function literal is `Future<Null>`.
@@ -23,7 +23,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'Future<Null>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_50_test.dart b/tests/language/invalid_returns/async_invalid_return_50_test.dart
index 236f512..0169b9e 100644
--- a/tests/language/invalid_returns/async_invalid_return_50_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_50_test.dart
@@ -15,7 +15,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'FutureOr<Null>'.
 }
 
 // Inferred return type of function literal is `Future<Null>`.
@@ -23,7 +23,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<void>' can't be returned from an async function with return type 'Future<Null>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_51_test.dart b/tests/language/invalid_returns/async_invalid_return_51_test.dart
index 3448c14..d8c0cf9 100644
--- a/tests/language/invalid_returns/async_invalid_return_51_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_51_test.dart
@@ -15,7 +15,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'FutureOr<Null>'.
 }
 
 // Inferred return type of function literal is `Future<Null>`.
@@ -23,7 +23,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<void>' can't be returned from an async function with return type 'Future<Null>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_52_test.dart b/tests/language/invalid_returns/async_invalid_return_52_test.dart
index 8f086b2..4c951e9 100644
--- a/tests/language/invalid_returns/async_invalid_return_52_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_52_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'Future<void>'.
 }
 
-// Inferred return type of function literal is `Future<int>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 Future<void> Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_53_test.dart b/tests/language/invalid_returns/async_invalid_return_53_test.dart
index d51ae11..5647bdb 100644
--- a/tests/language/invalid_returns/async_invalid_return_53_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_53_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Object' can't be returned from an async function with return type 'Future<void>'.
 }
 
-// Inferred return type of function literal is `Future<Object>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 Future<void> Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'Object' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_54_test.dart b/tests/language/invalid_returns/async_invalid_return_54_test.dart
index 4dd661a..a85a38a 100644
--- a/tests/language/invalid_returns/async_invalid_return_54_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_54_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<int>' can't be returned from an async function with return type 'Future<void>'.
 }
 
-// Inferred return type of function literal is `Future<int>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 Future<void> Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'FutureOr<int>' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_55_test.dart b/tests/language/invalid_returns/async_invalid_return_55_test.dart
index 72f9440..ea710ad 100644
--- a/tests/language/invalid_returns/async_invalid_return_55_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_55_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from an async function with return type 'Future<void>'.
 }
 
-// Inferred return type of function literal is `Future<int>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 Future<void> Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_56_test.dart b/tests/language/invalid_returns/async_invalid_return_56_test.dart
index 9443436..ee25201 100644
--- a/tests/language/invalid_returns/async_invalid_return_56_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_56_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'FutureOr<void>'.
 }
 
-// Inferred return type of function literal is `Future<int>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 FutureOr<void> Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'int' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_57_test.dart b/tests/language/invalid_returns/async_invalid_return_57_test.dart
index 633be93..5c243f7 100644
--- a/tests/language/invalid_returns/async_invalid_return_57_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_57_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Object' can't be returned from an async function with return type 'FutureOr<void>'.
 }
 
-// Inferred return type of function literal is `Future<Object>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 FutureOr<void> Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'Object' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_58_test.dart b/tests/language/invalid_returns/async_invalid_return_58_test.dart
index 4d508eb..f0e387e7b 100644
--- a/tests/language/invalid_returns/async_invalid_return_58_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_58_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<int>' can't be returned from an async function with return type 'FutureOr<void>'.
 }
 
-// Inferred return type of function literal is `Future<int>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 FutureOr<void> Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'FutureOr<int>' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/async_invalid_return_59_test.dart b/tests/language/invalid_returns/async_invalid_return_59_test.dart
index 95399b9..4e52a29 100644
--- a/tests/language/invalid_returns/async_invalid_return_59_test.dart
+++ b/tests/language/invalid_returns/async_invalid_return_59_test.dart
@@ -15,12 +15,15 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from an async function with return type 'FutureOr<void>'.
 }
 
-// Inferred return type of function literal is `Future<int>`, no error.
+// Inferred return type of function literal is `Future<void>`.
 FutureOr<void> Function() test2 = () async {
   return v;
+  //     ^
+  // [analyzer] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from an async function with return type 'Future<void>'.
 };
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_00_test.dart b/tests/language/invalid_returns/sync_invalid_return_00_test.dart
index 1c368e0..2519193 100644
--- a/tests/language/invalid_returns/sync_invalid_return_00_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_00_test.dart
@@ -11,7 +11,7 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_01_test.dart b/tests/language/invalid_returns/sync_invalid_return_01_test.dart
index a290916..2e04fe8 100644
--- a/tests/language/invalid_returns/sync_invalid_return_01_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_01_test.dart
@@ -11,7 +11,7 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_02_test.dart b/tests/language/invalid_returns/sync_invalid_return_02_test.dart
index 05db4f2..3009f48 100644
--- a/tests/language/invalid_returns/sync_invalid_return_02_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_02_test.dart
@@ -11,7 +11,7 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_03_test.dart b/tests/language/invalid_returns/sync_invalid_return_03_test.dart
index 4116191..d031ecfa 100644
--- a/tests/language/invalid_returns/sync_invalid_return_03_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_03_test.dart
@@ -11,7 +11,7 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_04_test.dart b/tests/language/invalid_returns/sync_invalid_return_04_test.dart
index 1a80d62..6e26a3a 100644
--- a/tests/language/invalid_returns/sync_invalid_return_04_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_04_test.dart
@@ -11,7 +11,7 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_05_test.dart b/tests/language/invalid_returns/sync_invalid_return_05_test.dart
index 27daec4..1c3d43c 100644
--- a/tests/language/invalid_returns/sync_invalid_return_05_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_05_test.dart
@@ -11,7 +11,7 @@
   return;
 //^
 // [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] A value must be explicitly returned from a non-void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_06_test.dart b/tests/language/invalid_returns/sync_invalid_return_06_test.dart
index e7530f1..b5b41c3 100644
--- a/tests/language/invalid_returns/sync_invalid_return_06_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_06_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] Can't return a value from a void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_07_test.dart b/tests/language/invalid_returns/sync_invalid_return_07_test.dart
index 691cf5d..6a03677 100644
--- a/tests/language/invalid_returns/sync_invalid_return_07_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_07_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] Can't return a value from a void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_08_test.dart b/tests/language/invalid_returns/sync_invalid_return_08_test.dart
index 94067eb..762714b 100644
--- a/tests/language/invalid_returns/sync_invalid_return_08_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_08_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] Can't return a value from a void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_09_test.dart b/tests/language/invalid_returns/sync_invalid_return_09_test.dart
index b4bca3e..b7a8981 100644
--- a/tests/language/invalid_returns/sync_invalid_return_09_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_09_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] Can't return a value from a void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_10_test.dart b/tests/language/invalid_returns/sync_invalid_return_10_test.dart
index 26508b3..f57003b 100644
--- a/tests/language/invalid_returns/sync_invalid_return_10_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_10_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] Can't return a value from a void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_11_test.dart b/tests/language/invalid_returns/sync_invalid_return_11_test.dart
index cfdef54..2d9cf3e 100644
--- a/tests/language/invalid_returns/sync_invalid_return_11_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_11_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] Can't return a value from a void function.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_12_test.dart b/tests/language/invalid_returns/sync_invalid_return_12_test.dart
index 23b45a4..e6ace80 100644
--- a/tests/language/invalid_returns/sync_invalid_return_12_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_12_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from a function with return type 'int'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_13_test.dart b/tests/language/invalid_returns/sync_invalid_return_13_test.dart
index cadaa24..5abb52b 100644
--- a/tests/language/invalid_returns/sync_invalid_return_13_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_13_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from a function with return type 'Object?'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_14_test.dart b/tests/language/invalid_returns/sync_invalid_return_14_test.dart
index 0082e8e..8cd50e2 100644
--- a/tests/language/invalid_returns/sync_invalid_return_14_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_14_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from a function with return type 'Future<int>?'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_15_test.dart b/tests/language/invalid_returns/sync_invalid_return_15_test.dart
index 0bbb367..b586861 100644
--- a/tests/language/invalid_returns/sync_invalid_return_15_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_15_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from a function with return type 'FutureOr<int?>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_16_test.dart b/tests/language/invalid_returns/sync_invalid_return_16_test.dart
index d2a2cd9..897f5a9 100644
--- a/tests/language/invalid_returns/sync_invalid_return_16_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_16_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from a function with return type 'Future<Object>?'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_17_test.dart b/tests/language/invalid_returns/sync_invalid_return_17_test.dart
index 4834cd6..493faf0 100644
--- a/tests/language/invalid_returns/sync_invalid_return_17_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_17_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from a function with return type 'FutureOr<Object?>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_18_test.dart b/tests/language/invalid_returns/sync_invalid_return_18_test.dart
index 24abec0..de1f9a2 100644
--- a/tests/language/invalid_returns/sync_invalid_return_18_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_18_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from a function with return type 'String'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_19_test.dart b/tests/language/invalid_returns/sync_invalid_return_19_test.dart
index 7e0d3df..613cadc 100644
--- a/tests/language/invalid_returns/sync_invalid_return_19_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_19_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from a function with return type 'String'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_20_test.dart b/tests/language/invalid_returns/sync_invalid_return_20_test.dart
index a057f8f..928168c 100644
--- a/tests/language/invalid_returns/sync_invalid_return_20_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_20_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<int?>' can't be returned from a function with return type 'String'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_21_test.dart b/tests/language/invalid_returns/sync_invalid_return_21_test.dart
index 140508e..fc1c898 100644
--- a/tests/language/invalid_returns/sync_invalid_return_21_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_21_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from a function with return type 'Future<String>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_22_test.dart b/tests/language/invalid_returns/sync_invalid_return_22_test.dart
index b1e2dc7..47a2401 100644
--- a/tests/language/invalid_returns/sync_invalid_return_22_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_22_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from a function with return type 'Future<String>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_23_test.dart b/tests/language/invalid_returns/sync_invalid_return_23_test.dart
index 2b9a833..a9d4ab7 100644
--- a/tests/language/invalid_returns/sync_invalid_return_23_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_23_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<int>' can't be returned from a function with return type 'Future<String>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_24_test.dart b/tests/language/invalid_returns/sync_invalid_return_24_test.dart
index 5606fd4..cbc5b15 100644
--- a/tests/language/invalid_returns/sync_invalid_return_24_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_24_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'int' can't be returned from a function with return type 'FutureOr<String>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_25_test.dart b/tests/language/invalid_returns/sync_invalid_return_25_test.dart
index 90014c9..ac9c262 100644
--- a/tests/language/invalid_returns/sync_invalid_return_25_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_25_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'Future<int>' can't be returned from a function with return type 'FutureOr<String>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_26_test.dart b/tests/language/invalid_returns/sync_invalid_return_26_test.dart
index 1ea644f..ec1ff2e 100644
--- a/tests/language/invalid_returns/sync_invalid_return_26_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_26_test.dart
@@ -13,7 +13,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'FutureOr<int?>' can't be returned from a function with return type 'FutureOr<String>'.
 }
 
 void main() {
diff --git a/tests/language/invalid_returns/sync_invalid_return_27_test.dart b/tests/language/invalid_returns/sync_invalid_return_27_test.dart
index 0361ee2..d3d6999 100644
--- a/tests/language/invalid_returns/sync_invalid_return_27_test.dart
+++ b/tests/language/invalid_returns/sync_invalid_return_27_test.dart
@@ -14,7 +14,7 @@
   return v;
   //     ^
   // [analyzer] unspecified
-  // [cfe] unspecified
+  // [cfe] A value of type 'void' can't be returned from a function with return type 'Null'.
 }
 
 void main() {
diff --git a/tests/language/is/isnot_malformed_type_test.dart b/tests/language/is/isnot_malformed_type_test.dart
index 11715e2..c81c644 100644
--- a/tests/language/is/isnot_malformed_type_test.dart
+++ b/tests/language/is/isnot_malformed_type_test.dart
@@ -8,7 +8,7 @@
   // 'Baz' is not loaded, throws a type error on test.
   return (obj is! Baz);
   //              ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   // [cfe] 'Baz' isn't a type.
 }
 
diff --git a/tests/language/is/malformed_type_test.dart b/tests/language/is/malformed_type_test.dart
index d54d4de..9628aa8 100644
--- a/tests/language/is/malformed_type_test.dart
+++ b/tests/language/is/malformed_type_test.dart
@@ -14,7 +14,7 @@
   // malformed type.
     if (e is Undefined) Expect.fail("unreachable");
     //       ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -23,7 +23,7 @@
   // malformed type.
     if (e as Undefined) Expect.fail("unreachable");
     //       ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -33,7 +33,7 @@
     // Regression test for issue 16985.
     if (e is Undefined && testEval(e)) Expect.fail("unreachable");
     //       ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -43,7 +43,7 @@
     // Regression test for issue 16985.
     if (e as Undefined && testEval(e)) Expect.fail("unreachable");
     //       ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -52,7 +52,7 @@
   // runtime error is thrown.
     if (testEval(e) is Undefined) Expect.fail("unreachable");
     //                 ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -61,7 +61,7 @@
   // runtime error is thrown.
     if (testEval(e) as Undefined) Expect.fail("unreachable");
     //                 ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
     // [cfe] 'Undefined' isn't a type.
 }
 
diff --git a/tests/language/is/not_class1_test.dart b/tests/language/is/not_class1_test.dart
index 6de8f8b..bb9a756 100644
--- a/tests/language/is/not_class1_test.dart
+++ b/tests/language/is/not_class1_test.dart
@@ -9,7 +9,7 @@
   var a = A();
   if (a is "A") return 0;
   // [error line 10, column 12, length 0]
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   // [cfe] Expected ')' before this.
   //       ^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language/is/not_class2_test.dart b/tests/language/is/not_class2_test.dart
index 9073117..9e82ec1 100644
--- a/tests/language/is/not_class2_test.dart
+++ b/tests/language/is/not_class2_test.dart
@@ -18,7 +18,7 @@
 
     if (a is aa) {
     //       ^^
-    // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
     // [cfe] 'aa' isn't a type.
       return 0;
     }
diff --git a/tests/language/label/label8_test.dart b/tests/language/label/label8_test.dart
index e17e3b1..89c6efb6 100644
--- a/tests/language/label/label8_test.dart
+++ b/tests/language/label/label8_test.dart
@@ -13,7 +13,7 @@
   {
     case 111:
 //  ^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Expected ';' after this.
 //  ^^^^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language/language.status b/tests/language/language.status
index 266988d..3764b4c 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -35,6 +35,9 @@
 stack_trace/demangle_ctors_test: SkipByDesign # Names are not scrubbed.
 type/checks_in_factory_method_test: SkipByDesign # Requires checked mode.
 
+[ $compiler != dart2analyzer && $compiler != fasta ]
+identifier/built_in_type_annotation_test/*: SkipByDesign # Analyzer/CFE only tests.
+
 [ $compiler != dart2js && $compiler != dartdevc && !$checked ]
 function_type/*: Skip # Needs checked mode.
 
diff --git a/tests/language/lazy/static8_test.dart b/tests/language/lazy/static8_test.dart
index 953129c..de313a8 100644
--- a/tests/language/lazy/static8_test.dart
+++ b/tests/language/lazy/static8_test.dart
@@ -8,7 +8,7 @@
 
 var trace;
 
-final foo = bar;
+var foo = bar;
 
 var recursionDepth = 0;
 
@@ -40,7 +40,7 @@
 }
 
 class X {
-  static final foo = X.bar;
+  static var foo = X.bar;
 
   static get bar {
     if (recursionDepth > 3) throw "recursed";
diff --git a/tests/language/least_upper_bound/expansive_test.dart b/tests/language/least_upper_bound/expansive_test.dart
index 21663df..78276e5 100644
--- a/tests/language/least_upper_bound/expansive_test.dart
+++ b/tests/language/least_upper_bound/expansive_test.dart
@@ -42,37 +42,37 @@
     // Is least upper bound dynamic?
     (z ? a : b).z;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'z' isn't defined for the class 'Object'.
 
     // Is least upper bound N<...> ?
     (z ? a : b).n;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound C1<...> ?
     (z ? a : b).c1;
     //          ^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c1' isn't defined for the class 'Object'.
 
     // Is least upper bound N<dynamic> ?
     (z ? a : b).n.z;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound N<N<...>> ?
     (z ? a : b).n.n;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound N<C1<...>> ?
     (z ? a : b).n.c1;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
   }
 }
@@ -106,37 +106,37 @@
     // Is least upper bound dynamic?
     (z ? a : b).z;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'z' isn't defined for the class 'Object'.
 
     // Is least upper bound N<...> ?
     (z ? a : b).n;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound C2<...> ?
     (z ? a : b).c2;
     //          ^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c2' isn't defined for the class 'Object'.
 
     // Is least upper bound N<dynamic> ?
     (z ? a : b).n.z;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound N<N<...>> ?
     (z ? a : b).n.n;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound N<C2<...>> ?
     (z ? a : b).n.c2;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
   }
 }
diff --git a/tests/language/least_upper_bound/least_upper_bound_test.dart b/tests/language/least_upper_bound/least_upper_bound_test.dart
index eaf0697..562aca3 100644
--- a/tests/language/least_upper_bound/least_upper_bound_test.dart
+++ b/tests/language/least_upper_bound/least_upper_bound_test.dart
@@ -45,21 +45,21 @@
 void testAB(A a, B b) {
   A r1 = true ? a : b;
   //     ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //          ^
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'A'.
   B r2 = false ? a : b;
   //     ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //           ^
   // [cfe] A value of type 'Object' can't be assigned to a variable of type 'B'.
   (true ? a : b).a = 0;
   //             ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'a' isn't defined for the class 'Object'.
   (false ? a : b).b = 0;
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'b' isn't defined for the class 'Object'.
   var c = new C();
   (true ? a as dynamic : c).a = 0;
@@ -70,13 +70,13 @@
   B r1 = true ? b : c;
   C r2 = false ? b : c;
   //     ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //           ^
   // [cfe] A value of type 'B' can't be assigned to a variable of type 'C'.
   (true ? b : c).b = 0;
   (false ? b : c).c = 0;
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'c' isn't defined for the class 'B'.
   var a = null;
   (true ? b : a).b = 0;
@@ -88,23 +88,23 @@
 void testCD(C c, D d) {
   C r1 = true ? c : d;
   //     ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //          ^
   // [cfe] A value of type 'B' can't be assigned to a variable of type 'C'.
   D r2 = false ? c : d;
   //     ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //           ^
   // [cfe] A value of type 'B' can't be assigned to a variable of type 'D'.
   (true ? c : d).b = 0;
   (false ? c : d).b = 0;
   (true ? c : d).c = 0;
   //             ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'c' isn't defined for the class 'B'.
   (false ? c : d).d = 0;
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'd' isn't defined for the class 'B'.
 }
 
@@ -113,17 +113,17 @@
   E<B> r1 = true ? e : f;
   F<C> r2 = false ? e : f;
   //        ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //              ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'F<C>'.
   A r3 = true ? e : f;
   //     ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //          ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'A'.
   B r4 = false ? e : f;
   //     ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //           ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'B'.
   (true ? e : f).e = C();
@@ -135,23 +135,23 @@
   E<B> r1 = true ? e : f;
   F<C> r2 = false ? e : f;
   //        ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //              ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'F<C>'.
   A r3 = true ? e : f;
   //     ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //          ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'A'.
   B r4 = false ? e : f;
   //     ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //           ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'B'.
   var r5;
   r5 = (true ? e : f).e;
   r5 = (false ? e : f).f;
   //                   ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'f' isn't defined for the class 'E<B>'.
 }
diff --git a/tests/language/list/literal1_test.dart b/tests/language/list/literal1_test.dart
index f8db7b2..cd54906 100644
--- a/tests/language/list/literal1_test.dart
+++ b/tests/language/list/literal1_test.dart
@@ -9,9 +9,9 @@
       <String>
       [0, 1];
 //     ^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
 //        ^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
 }
diff --git a/tests/language/malformed/inheritance_test.dart b/tests/language/malformed/inheritance_test.dart
index 55154d7..8eed858 100644
--- a/tests/language/malformed/inheritance_test.dart
+++ b/tests/language/malformed/inheritance_test.dart
@@ -18,7 +18,7 @@
 class C1
     extends A<Unresolved>
     //        ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -36,7 +36,7 @@
 class C3
     extends Object with A<Unresolved>
     //                    ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -52,7 +52,7 @@
 class C5
     implements A<Unresolved>
     //           ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -63,7 +63,7 @@
     // [analyzer] COMPILE_TIME_ERROR.EXTENDS_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //      ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     {
 }
 
@@ -73,9 +73,9 @@
     // [analyzer] COMPILE_TIME_ERROR.EXTENDS_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //      ^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     //        ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -88,7 +88,7 @@
     // [analyzer] COMPILE_TIME_ERROR.MIXIN_OF_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //                  ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     {
 }
 
@@ -100,9 +100,9 @@
     // [analyzer] COMPILE_TIME_ERROR.MIXIN_OF_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //                  ^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     //                    ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -113,7 +113,7 @@
     // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //         ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     {
 }
 
@@ -123,9 +123,9 @@
     // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //         ^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     //           ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
diff --git a/tests/language/malformed/malformed_test.dart b/tests/language/malformed/malformed_test.dart
index 54b6a7c..e4b59a9 100644
--- a/tests/language/malformed/malformed_test.dart
+++ b/tests/language/malformed/malformed_test.dart
@@ -8,20 +8,20 @@
 checkIsUnresolved(var v) {
   v is Unresolved;
   //   ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   // [cfe] 'Unresolved' isn't a type.
   v is Unresolved<int>;
   //   ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   // [cfe] 'Unresolved' isn't a type.
   v is prefix.Unresolved;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   //          ^
   // [cfe] 'Unresolved' isn't a type.
   v is prefix.Unresolved<int>;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   //          ^
   // [cfe] 'Unresolved' isn't a type.
 }
@@ -29,45 +29,45 @@
 checkIsListUnresolved(var v) {
   v is List<Unresolved>;
   //        ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   // [cfe] 'Unresolved' isn't a type.
   v is List<Unresolved<int>>;
   //        ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   // [cfe] 'Unresolved' isn't a type.
   v is List<prefix.Unresolved>;
   //        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   //               ^
   // [cfe] 'Unresolved' isn't a type.
   v is List<prefix.Unresolved<int>>;
   //        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   //               ^
   // [cfe] 'Unresolved' isn't a type.
   v is List<int, String>;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 1 type arguments.
 }
 
 checkAsUnresolved(var v) {
   v as Unresolved;
   //   ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   // [cfe] 'Unresolved' isn't a type.
   v as Unresolved<int>;
   //   ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   // [cfe] 'Unresolved' isn't a type.
   v as prefix.Unresolved;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   //          ^
   // [cfe] 'Unresolved' isn't a type.
   v as prefix.Unresolved<int>;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   //          ^
   // [cfe] 'Unresolved' isn't a type.
 }
@@ -75,25 +75,25 @@
 checkAsListUnresolved(var v) {
   v as List<Unresolved>;
   //        ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   // [cfe] 'Unresolved' isn't a type.
   v as List<Unresolved<int>>;
   //        ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   // [cfe] 'Unresolved' isn't a type.
   v as List<prefix.Unresolved>;
   //        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   //               ^
   // [cfe] 'Unresolved' isn't a type.
   v as List<prefix.Unresolved<int>>;
   //        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   //               ^
   // [cfe] 'Unresolved' isn't a type.
   v as List<int, String>;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 1 type arguments.
 }
 
@@ -105,11 +105,11 @@
 
   new undeclared_prefix.Unresolved();
   //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'undeclared_prefix.Unresolved'.
   new undeclared_prefix.Unresolved<int>();
   //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'undeclared_prefix.Unresolved'.
 
   try {
@@ -117,7 +117,7 @@
   }
     on Unresolved
     // ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     // [cfe] 'Unresolved' isn't a type.
     catch (e) {
   }
@@ -127,7 +127,7 @@
   }
     on Unresolved<int>
     // ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     // [cfe] 'Unresolved' isn't a type.
     catch (e) {
   }
@@ -137,7 +137,7 @@
   }
     on prefix.Unresolved
     // ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     //        ^
     // [cfe] 'Unresolved' isn't a type.
     catch (e) {
@@ -148,7 +148,7 @@
   }
     on prefix.Unresolved<int>
     // ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     //        ^
     // [cfe] 'Unresolved' isn't a type.
     catch (e) {
@@ -159,7 +159,7 @@
   }
     on undeclared_prefix.Unresolved<int>
     // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     // [cfe] 'undeclared_prefix.Unresolved' can't be used as a type because 'undeclared_prefix' isn't defined.
     catch (e) {
   }
diff --git a/tests/language/map/literal13_test.dart b/tests/language/map/literal13_test.dart
index ec5e0be..08f06e4 100644
--- a/tests/language/map/literal13_test.dart
+++ b/tests/language/map/literal13_test.dart
@@ -7,7 +7,7 @@
 main() {
   var map = new Map<int>{ "a": 1, "b": 2, "c": 3 };
   //            ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 2 type arguments.
   //                   ^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language/map/literal1_test.dart b/tests/language/map/literal1_test.dart
index 71c4e8e..49aa5fa 100644
--- a/tests/language/map/literal1_test.dart
+++ b/tests/language/map/literal1_test.dart
@@ -9,6 +9,6 @@
       <String, String>
     {"a": 0};
     //    ^
-    // [analyzer] STATIC_WARNING.MAP_VALUE_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.MAP_VALUE_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
 }
diff --git a/tests/language/method/not_found_test.dart b/tests/language/method/not_found_test.dart
index 4755cba..883cd6f 100644
--- a/tests/language/method/not_found_test.dart
+++ b/tests/language/method/not_found_test.dart
@@ -7,7 +7,7 @@
 // [cfe] The non-abstract class 'A' is missing implementations for these members:
   B();
 //^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   static const field = const B();
   //                         ^
   // [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER
diff --git a/tests/language/mixin/illegal_constructor_test.dart b/tests/language/mixin/illegal_constructor_test.dart
index bf84e07..864889f 100644
--- a/tests/language/mixin/illegal_constructor_test.dart
+++ b/tests/language/mixin/illegal_constructor_test.dart
@@ -102,7 +102,7 @@
   // [cfe] Too many positional arguments: 0 allowed, but 3 found.
   new C0.named();
   //     ^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'C0.named'.
   new D0(1,2,3);
   //    ^^^^^^^
@@ -110,6 +110,6 @@
   // [cfe] Too many positional arguments: 0 allowed, but 3 found.
   new D0.named();
   //     ^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'D0.named'.
 }
diff --git a/tests/language/mixin/illegal_static_access_test.dart b/tests/language/mixin/illegal_static_access_test.dart
index 21e2348..8cd792d 100644
--- a/tests/language/mixin/illegal_static_access_test.dart
+++ b/tests/language/mixin/illegal_static_access_test.dart
@@ -20,10 +20,10 @@
 
   Expect.throwsNoSuchMethodError(() => C.foo());
   //                                     ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.foo'.
   Expect.throwsNoSuchMethodError(() => C.bar());
   //                                     ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.bar'.
 }
diff --git a/tests/language/mixin/illegal_super_use_test.dart b/tests/language/mixin/illegal_super_use_test.dart
index 89c3a76..ca47645 100644
--- a/tests/language/mixin/illegal_super_use_test.dart
+++ b/tests/language/mixin/illegal_super_use_test.dart
@@ -11,22 +11,22 @@
     super.toString();
     super.foo();
     //    ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_METHOD
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_METHOD
     // [cfe] Superclass has no method named 'foo'.
     super.bar = 100;
     //    ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_SETTER
     // [cfe] Superclass has no setter named 'bar'.
 
     void inner() {
       super.toString();
       super.foo();
       //    ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_METHOD
       // [cfe] Superclass has no method named 'foo'.
       super.bar = 100;
       //    ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_SETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_SETTER
       // [cfe] Superclass has no setter named 'bar'.
     }
     inner();
@@ -35,11 +35,11 @@
       super.toString();
       super.foo();
       //    ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_METHOD
       // [cfe] Superclass has no method named 'foo'.
       super.bar = 100;
       //    ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_SETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_SETTER
       // [cfe] Superclass has no setter named 'bar'.
     })();
 
diff --git a/tests/language/mixin/method_override_test.dart b/tests/language/mixin/method_override_test.dart
index 01428b6..166599e 100644
--- a/tests/language/mixin/method_override_test.dart
+++ b/tests/language/mixin/method_override_test.dart
@@ -302,7 +302,7 @@
 // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
 class G5 = GTTnum with CII;
 //    ^^
-// [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
 // [cfe] The mixin application class 'G5' introduces an erroneous override of 'id'.
 //    ^
 // [cfe] The non-abstract class 'G5' is missing implementations for these members:
diff --git a/tests/language/mixin/type_parameters_errors_test.dart b/tests/language/mixin/type_parameters_errors_test.dart
index 2988b2f..25e99b6 100644
--- a/tests/language/mixin/type_parameters_errors_test.dart
+++ b/tests/language/mixin/type_parameters_errors_test.dart
@@ -11,11 +11,11 @@
 //    ^
 // [cfe] The type 'M<U, V>' can't be mixed in.
 //                           ^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 1 type arguments.
 class C<A, B> extends S<A, int> with M { }
 //                    ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 1 type arguments.
 
 class F<X> = S<X> with M<X>;
@@ -23,7 +23,7 @@
 //    ^
 // [cfe] The type 'M<double, double>' can't be mixed in.
 //                    ^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 1 type arguments.
 
 main() {
@@ -32,11 +32,11 @@
   a = new A<int>();
   a = new A<String, String>();
   //      ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 1 type arguments.
   a = new F<int>();
   a = new F<int, String>();
   //      ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 1 type arguments.
 }
diff --git a/tests/language/new/create_unresolved_type_test.dart b/tests/language/new/create_unresolved_type_test.dart
index 6d215ab..16fb7a6 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.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 b32f0e1..da303e3 100644
--- a/tests/language/new/expression_type_args_test.dart
+++ b/tests/language/new/expression_type_args_test.dart
@@ -7,20 +7,20 @@
   // Can't instantiate type parameter (within static or instance method).
   m1() => new T();
   //          ^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'T'.
   static m2() => new T();
   //                 ^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'T'.
   //                 ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
 
   // OK when used within instance method, but not in static method.
   m3() => new A<T>();
   static m4() => new A<T>();
   //                   ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
 }
 
diff --git a/tests/language/new/prefix_test.dart b/tests/language/new/prefix_test.dart
index bef0d69..8e5c7bc 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix'.
 }
diff --git a/tests/language/nnbd/boolean_conversion/boolean_conversion_error_test.dart b/tests/language/nnbd/boolean_conversion/boolean_conversion_error_test.dart
index 695dfa3..a0bdcf7 100644
--- a/tests/language/nnbd/boolean_conversion/boolean_conversion_error_test.dart
+++ b/tests/language/nnbd/boolean_conversion/boolean_conversion_error_test.dart
@@ -56,141 +56,141 @@
     // Check that values of type `Null` are not usable as booleans.
     if (nil) {}
     //  ^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     [if (nil) 3];
     //   ^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     nil ? 3 : 4;
 //  ^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     while (nil) {}
     //     ^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     do {} while (nil);
     //           ^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     nil || true;
 //  ^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     nil && true;
 //  ^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     true || nil;
     //      ^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
     // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     true && nil;
     //      ^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
     // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     for (int i = 0; nil; i++) {}
     //              ^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
     [for (int i = 0; nil; i++) 3];
     //               ^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Null' can't be assigned to a variable of type 'bool'.
   }
   {
     // Check that values of type `Object` are not usable as booleans.
     if (object) {}
     //  ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     [if (object) 3];
     //   ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     object ? 3 : 4;
 //  ^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     while (object) {}
     //     ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     do {} while (object);
     //           ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     object || true;
 //  ^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     object && true;
 //  ^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     true || object;
     //      ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
     // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     true && object;
     //      ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
     // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     for (int i = 0; object; i++) {}
     //              ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
     [for (int i = 0; object; i++) 3];
     //               ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object' can't be assigned to a variable of type 'bool'.
   }
   {
     // Check that values of type `Object?` are not usable as booleans.
     if (objectOrNull) {}
     //  ^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     [if (objectOrNull) 3];
     //   ^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     objectOrNull ? 3 : 4;
 //  ^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     while (objectOrNull) {}
     //     ^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     do {} while (objectOrNull);
     //           ^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     objectOrNull || true;
 //  ^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     objectOrNull && true;
 //  ^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
 // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     true || objectOrNull;
     //      ^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
     // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     true && objectOrNull;
     //      ^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
     // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     for (int i = 0; objectOrNull; i++) {}
     //              ^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
     [for (int i = 0; objectOrNull; i++) 3];
     //               ^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+    // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
     // [cfe] A value of type 'Object?' can't be assigned to a variable of type 'bool'.
   }
 }
diff --git a/tests/language/nnbd/constant_null_safety_mode_test.dart b/tests/language/nnbd/constant_null_safety_mode_test.dart
index 1383449..131a2ff 100644
--- a/tests/language/nnbd/constant_null_safety_mode_test.dart
+++ b/tests/language/nnbd/constant_null_safety_mode_test.dart
@@ -7,4 +7,18 @@
 main() {
   const trueInWeakMode = <Null>[] is List<int>;
   Expect.equals(isWeakMode, trueInWeakMode);
+
+  // The following tests use the Uri.pathSegments() to access a constant list
+  // that is defined in the SDK and verify the type associated with it does not
+  // allow null when running with sound null safety.
+  var emptyUri = Uri(pathSegments: []);
+  dynamic stringList = emptyUri.pathSegments.toList();
+  if (isStrongMode) {
+    Expect.throwsTypeError(() {
+      stringList.add(null);
+    });
+  } else {
+    stringList.add(null);
+    Expect.listEquals([null], stringList);
+  }
 }
diff --git a/tests/language/nnbd/extreme_bounds/superinterfaces_in_order_error_test.dart b/tests/language/nnbd/extreme_bounds/superinterfaces_in_order_error_test.dart
new file mode 100644
index 0000000..2efea2d
--- /dev/null
+++ b/tests/language/nnbd/extreme_bounds/superinterfaces_in_order_error_test.dart
@@ -0,0 +1,332 @@
+// 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.
+
+// Requirements=nnbd-weak
+
+// @dart = 2.8
+
+// Test that upper bound computations which rely on the computations of the
+// cardinality of the superinterface sets define those sets using
+// `LEGACY_ERASURE` when called from an opted out library.
+
+import 'superinterfaces_null_safe_lib.dart';
+import 'superinterfaces_legacy_lib.dart';
+
+/// Test that `Legacy()` has the super-interface sets:
+/// {Legacy}, {Generic<int*>}, {Root}
+/// and that `NonNullable()` has the super-interface sets:
+/// {NonNullable}, {Generic<int*>}, {Root} (due to LEGACY_ERASURE)
+/// And hence that the highest shared super-interface set of cardinality one
+/// is {Generic<int*>}.
+/// As a result, the upper bound of `Legacy()` and `NonNullable()` should
+/// be computed as `Generic<int*>`.
+void testLegacyNonNullable(bool b) {
+  // Test in the presence of a downward context
+  {
+    Generic<int> x0 = b ? Legacy() : NonNullable();
+
+    // The type of the conditional is Generic<int>
+    Generic<int> x1 = (b ? Legacy() : NonNullable())..genericMethod();
+
+    // The type of the conditional not inferred as Legacy, nor dynamic
+    Generic<int> x2 = (b ? Legacy() : NonNullable())..legacyMethod();
+    //                                                ^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // The type of the conditional is not inferred as NonNullable, nor dynamic
+    Generic<int> x3 = (b ? Legacy() : NonNullable())..nonNullableMethod();
+    //                                                ^^^^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // Test without a context
+  {
+    var x = b ? Legacy() : NonNullable();
+
+    // x is inferred to be Generic<int>
+    x.genericMethod().isEven;
+
+    // x is not inferred to be Generic<dynamic>
+    x.genericMethod().isVeryOdd;
+    //                ^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as Legacy, nor dynamic
+    x.legacyMethod();
+    //^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as NonNullable, nor dynamic
+    x.nonNullableMethod();
+    //^^^^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // Test using instances
+
+  // Test in the presence of a downward context
+  {
+    Generic<int> x0 = b ? legacy : nonNullable;
+
+    // The type of the conditional is Generic<int>
+    Generic<int> x1 = (b ? legacy : nonNullable)..genericMethod();
+
+    // The type of the conditional not inferred as Legacy, nor dynamic
+    Generic<int> x2 = (b ? legacy : nonNullable)..legacyMethod();
+    //  ^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // The type of the conditional is not inferred as NonNullable, nor dynamic
+    Generic<int> x3 = (b ? legacy : nonNullable)..nonNullableMethod();
+    //  ^^^^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // Test without a context
+  {
+    var x = b ? legacy : nonNullable;
+
+    // x is inferred to be Generic<int>
+    x.genericMethod().isEven;
+
+    // x is not inferred to be Generic<dynamic>
+    x.genericMethod().isVeryOdd;
+    //                ^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as Legacy, nor dynamic
+    x.legacyMethod();
+    //^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as NonNullable, nor dynamic
+    x.nonNullableMethod();
+    //^^^^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
+
+/// Test that `Legacy()` has the super-interface sets:
+/// {Legacy}, {Generic<int*>}, {Root}
+/// and that `Nullable()` has the super-interface sets:
+/// {Nullable}, {Generic<int*>}, {Root} (due to LEGACY_ERASURE)
+/// And hence that the highest shared super-interface set of cardinality one
+/// is {Generic<int*>}.
+/// As a result, the upper bound of `Legacy()` and `Nullable()` should
+/// be computed as `Generic<int*>`.
+void testLegacyNullable(bool b) {
+  // Test in the presence of a downward context
+  {
+    Generic<int> x0 = b ? Legacy() : Nullable();
+
+    // The type of the conditional is Generic<int>
+    Generic<int> x1 = (b ? Legacy() : Nullable())..genericMethod();
+
+    // The type of the conditional not inferred as Legacy, nor dynamic
+    Generic<int> x2 = (b ? Legacy() : Nullable())..legacyMethod();
+    //                                             ^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // The type of the conditional is not inferred as Nullable, nor dynamic
+    Generic<int> x3 = (b ? Legacy() : Nullable())..nullableMethod();
+    //                                             ^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // Test without a context
+  {
+    var x = b ? Legacy() : Nullable();
+
+    // x is inferred to be Generic<int>
+    x.genericMethod().isEven;
+
+    // x is not inferred to be Generic<dynamic>
+    x.genericMethod().isVeryOdd;
+    //                ^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as Legacy, nor dynamic
+    x.legacyMethod();
+    //^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as Nullable, nor dynamic
+    x.nullableMethod();
+    //^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // Test using instances
+
+  // Test in the presence of a downward context
+  {
+    Generic<int> x0 = b ? legacy : nullable;
+
+    // The type of the conditional is Generic<int>
+    Generic<int> x1 = (b ? legacy : nullable)..genericMethod();
+
+    // The type of the conditional not inferred as Legacy, nor dynamic
+    Generic<int> x2 = (b ? legacy : nullable)..legacyMethod();
+    //                                                         ^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // The type of the conditional is not inferred as Nullable, nor dynamic
+    Generic<int> x3 = (b ? legacy : nullable)..nullableMethod();
+    //                                                         ^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // Test without a context
+  {
+    var x = b ? legacy : nullable;
+
+    // x is inferred to be Generic<int>
+    x.genericMethod().isEven;
+
+    // x is not inferred to be Generic<dynamic>
+    x.genericMethod().isVeryOdd;
+    //                ^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as Legacy, nor dynamic
+    x.legacyMethod();
+    //^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as Nullable, nor dynamic
+    x.nullableMethod();
+    //^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
+
+/// Test that `Nullable()` has the super-interface sets:
+/// {Nullable}, {Generic<int*>}, {Root} (due to LEGACY_ERASURE)
+/// and that `NonNullable()` has the super-interface sets:
+/// {NonNullable}, {Generic<int>}, {Root}
+/// And hence that the highest shared super-interface set of cardinality one
+/// is {Generic<int*>}.
+/// As a result, the upper bound of `Nullable()` and `NonNullable()` should
+/// be computed as `Generic<int*>`.
+void testNullableNonNullable(bool b) {
+  // Test in the presence of a downward context
+  {
+    Generic<int> x0 = b ? Nullable() : NonNullable();
+
+    // The type of the conditional is Generic<int>
+    Generic<int> x1 = (b ? Nullable() : NonNullable())..genericMethod();
+
+    // The type of the conditional not inferred as Nullable, nor dynamic
+    Generic<int> x2 = (b ? Nullable() : NonNullable())..nullableMethod();
+    //                                                  ^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // The type of the conditional is not inferred as NonNullable, nor dynamic
+    Generic<int> x3 = (b ? Nullable() : NonNullable())..nonNullableMethod();
+    //                                                  ^^^^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // Test without a context
+  {
+    var x = b ? Nullable() : NonNullable();
+
+    // x is inferred to be Generic<int>
+    x.genericMethod().isEven;
+
+    // x is not inferred to be Generic<dynamic>
+    x.genericMethod().isVeryOdd;
+    //                ^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as Nullable, nor dynamic
+    x.nullableMethod();
+    //^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as NonNullable, nor dynamic
+    x.nonNullableMethod();
+    //^^^^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // Test using instances
+
+  // Test in the presence of a downward context
+  {
+    Generic<int> x0 = b ? nullable : nonNullable;
+
+    // The type of the conditional is Generic<int>
+    Generic<int> x1 = (b ? nullable : nonNullable)..genericMethod();
+
+    // The type of the conditional not inferred as Nullable, nor dynamic
+    Generic<int> x2 = (b ? nullable : nonNullable)..nullableMethod();
+    //  ^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // The type of the conditional is not inferred as NonNullable, nor dynamic
+    Generic<int> x3 = (b ? nullable : nonNullable)..nonNullableMethod();
+    //  ^^^^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // Test without a context
+  {
+    var x = b ? nullable : nonNullable;
+
+    // x is inferred to be Generic<int>
+    x.genericMethod().isEven;
+
+    // x is not inferred to be Generic<dynamic>
+    x.genericMethod().isVeryOdd;
+    //                ^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as Nullable, nor dynamic
+    x.nullableMethod();
+    //^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    // x is not inferred as NonNullable, nor dynamic
+    x.nonNullableMethod();
+    //^^^^^^^^^^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
+
+void main() {
+  testLegacyNonNullable(true);
+  testLegacyNullable(true);
+  testNullableNonNullable(true);
+}
diff --git a/tests/language/nnbd/extreme_bounds/superinterfaces_legacy_lib.dart b/tests/language/nnbd/extreme_bounds/superinterfaces_legacy_lib.dart
new file mode 100644
index 0000000..7372893
--- /dev/null
+++ b/tests/language/nnbd/extreme_bounds/superinterfaces_legacy_lib.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.
+
+// @dart = 2.8
+
+// This library creates a legacy class which extends the generic class hierarchy
+// defined in the imported library.  This is used to test how upper bounds
+// behave when some super-interfaces come from opted in libraries and some from
+// legacy libraries.
+
+import 'superinterfaces_null_safe_lib.dart';
+
+class Legacy extends Generic<int> {
+  int legacyMethod() => 3;
+}
+
+var legacy = Legacy();
diff --git a/tests/language/nnbd/extreme_bounds/superinterfaces_null_safe_lib.dart b/tests/language/nnbd/extreme_bounds/superinterfaces_null_safe_lib.dart
new file mode 100644
index 0000000..93e4ad2
--- /dev/null
+++ b/tests/language/nnbd/extreme_bounds/superinterfaces_null_safe_lib.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.
+
+// @dart = 2.10
+
+// This library establishes an opted in class hierarchy which has a single
+// non-generic top element, with a generic element below it, and a null safety
+// specific instantantiation of the generic below that.  This is used to test
+// how upper bounds behave when some super-interfaces come from opted in
+// libraries and some from legacy libraries.
+
+class Root {
+  Object? rootMethod() => 3;
+}
+
+class Generic<T> extends Root {
+  T genericMethod() => throw "Unreachable";
+}
+
+class NonNullable extends Generic<int> {
+  int nonNullableMethod() => 3;
+}
+
+class Nullable extends Generic<int?> {
+  int nullableMethod() => 3;
+}
+
+var nonNullable = NonNullable();
+var nullable = Nullable();
diff --git a/tests/language/nnbd/extreme_bounds/superinterfaces_out_of_order_error_test.dart b/tests/language/nnbd/extreme_bounds/superinterfaces_out_of_order_error_test.dart
new file mode 100644
index 0000000..50e53c2
--- /dev/null
+++ b/tests/language/nnbd/extreme_bounds/superinterfaces_out_of_order_error_test.dart
@@ -0,0 +1,455 @@
+// 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.
+
+// Requirements=nnbd-weak
+
+// @dart = 2.10
+
+// Test that upper bound computations which rely on the computations of the
+// cardinality of the superinterface sets define those sets without erasing or
+// modifying the superinterfaces.
+
+import 'superinterfaces_legacy_lib.dart';
+import 'superinterfaces_null_safe_lib.dart';
+
+/// Test that `Legacy()` has the super-interface sets:
+/// {Legacy}, {Generic<int*>}, {Root}
+/// and that `NonNullable()` has the super-interface sets:
+/// {NonNullable}, {Generic<int>}, {Root}
+/// And hence that the highest shared super-interface set of cardinality one
+/// is {Root}.
+/// As a result, the upper bound of `Legacy()` and `NonNullable()` should
+/// be computed as `Root`.
+void testLegacyNonNullable(bool b) {
+  // Test in the presence of a downward context
+  {
+    // The type of the conditional is not Generic
+    Generic<int> x0 = b ? Legacy() : NonNullable();
+    //                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                  ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+
+    // The type of the conditional is not inferred as Generic
+    Generic<int> x1 = (b ? Legacy() : NonNullable())..genericMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                                ^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional not inferred as Legacy, nor dynamic
+    Generic<int> x2 = (b ? Legacy() : NonNullable())..legacyMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                                ^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'legacyMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional is not inferred as NonNullable, nor dynamic
+    Generic<int> x3 = (b ? Legacy() : NonNullable())..nonNullableMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                                ^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nonNullableMethod' isn't defined for the class 'Root'.
+  }
+
+  // Test without a context
+  {
+    var x = b ? Legacy() : NonNullable();
+
+    // x is inferred to be Root
+    x.rootMethod();
+
+    // x is not inferred to be Generic
+    x.genericMethod();
+    //^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as Legacy, nor dynamic
+    x.legacyMethod();
+    //^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'legacyMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as NonNullable, nor dynamic
+    x.nonNullableMethod();
+    //^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nonNullableMethod' isn't defined for the class 'Root'.
+  }
+
+  // Test using instances
+
+  // Test in the presence of a downward context
+  {
+    // The type of the conditional is not Generic
+    Generic<int> x0 = b ? legacy : nonNullable;
+    //                ^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                  ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+
+    // The type of the conditional is not inferred as Generic
+    Generic<int> x1 = (b ? legacy : nonNullable)..genericMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                            ^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional not inferred as Legacy, nor dynamic
+    Generic<int> x2 = (b ? legacy : nonNullable)..legacyMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                            ^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'legacyMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional is not inferred as NonNullable, nor dynamic
+    Generic<int> x3 = (b ? legacy : nonNullable)..nonNullableMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                            ^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nonNullableMethod' isn't defined for the class 'Root'.
+
+  }
+
+  // Test without a context
+  {
+    var x = b ? legacy : nonNullable;
+
+    // x is inferred to be Root
+    x.rootMethod();
+
+    // x is not inferred to be Generic
+    x.genericMethod();
+    //^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as Legacy, nor dynamic
+    x.legacyMethod();
+    //^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'legacyMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as NonNullable, nor dynamic
+    x.nonNullableMethod();
+    //^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nonNullableMethod' isn't defined for the class 'Root'.
+  }
+}
+
+/// Test that `Legacy()` has the super-interface sets:
+/// {Legacy}, {Generic<int*>}, {Root}
+/// and that `Nullable()` has the super-interface sets:
+/// {Nullable}, {Generic<int?>}, {Root}
+/// And hence that the highest shared super-interface set of cardinality one
+/// is {Root}.
+/// As a result, the upper bound of `Legacy()` and `Nullable()` should
+/// be computed as `Root`.
+void testLegacyNullable(bool b) {
+  // Test in the presence of a downward context
+  {
+    // The type of the conditional is not Generic
+    Generic<int> x0 = b ? Legacy() : Nullable();
+    //                ^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                  ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+
+    // The type of the conditional is not inferred as Generic
+    Generic<int> x1 = (b ? Legacy() : Nullable())..genericMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                             ^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional not inferred as Legacy, nor dynamic
+    Generic<int> x2 = (b ? Legacy() : Nullable())..legacyMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                             ^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'legacyMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional is not inferred as Nullable, nor dynamic
+    Generic<int> x3 = (b ? Legacy() : Nullable())..nullableMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                             ^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nullableMethod' isn't defined for the class 'Root'.
+  }
+
+  // Test without a context
+  {
+    var x = b ? Legacy() : Nullable();
+
+    // x is inferred to be Root
+    x.rootMethod();
+
+    // x is not inferred to be Generic
+    x.genericMethod();
+    //^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as Legacy, nor dynamic
+    x.legacyMethod();
+    //^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'legacyMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as Nullable, nor dynamic
+    x.nullableMethod();
+    //^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nullableMethod' isn't defined for the class 'Root'.
+  }
+
+  // Test using instances
+
+  // Test in the presence of a downward context
+  {
+    // The type of the conditional is not Generic
+    Generic<int> x0 = b ? legacy : nullable;
+    //                ^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                  ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+
+    // The type of the conditional is not inferred as Generic
+    Generic<int> x1 = (b ? legacy : nullable)..genericMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                         ^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional not inferred as Legacy, nor dynamic
+    Generic<int> x2 = (b ? legacy : nullable)..legacyMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                         ^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'legacyMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional is not inferred as Nullable, nor dynamic
+    Generic<int> x3 = (b ? legacy : nullable)..nullableMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                         ^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nullableMethod' isn't defined for the class 'Root'.
+  }
+
+  // Test without a context
+  {
+    var x = b ? legacy : nullable;
+
+    // x is inferred to be Root
+    x.rootMethod();
+
+    // x is not inferred to be Generic
+    x.genericMethod();
+    //^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as Legacy, nor dynamic
+    x.legacyMethod();
+    //^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'legacyMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as Nullable, nor dynamic
+    x.nullableMethod();
+    //^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nullableMethod' isn't defined for the class 'Root'.
+  }
+}
+
+/// Test that `Nullable()` has the super-interface sets:
+/// {Nullable}, {Generic<int?>}, {Root}
+/// and that `NonNullable()` has the super-interface sets:
+/// {NonNullable}, {Generic<int>}, {Root}
+/// And hence that the highest shared super-interface set of cardinality one
+/// is {Root}.
+/// As a result, the upper bound of `Nullable()` and `NonNullable()` should
+/// be computed as `Root`.
+void testNullableNonNullable(bool b) {
+  // Test in the presence of a downward context
+  {
+    // The type of the conditional is not Generic
+    Generic<int> x0 = b ? Nullable() : NonNullable();
+    //                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                  ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+
+    // The type of the conditional is Generic<int>
+    Generic<int> x1 = (b ? Nullable() : NonNullable())..genericMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                                  ^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional not inferred as Nullable, nor dynamic
+    Generic<int> x2 = (b ? Nullable() : NonNullable())..nullableMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                                  ^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nullableMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional is not inferred as NonNullable, nor dynamic
+    Generic<int> x3 = (b ? Nullable() : NonNullable())..nonNullableMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                                  ^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nonNullableMethod' isn't defined for the class 'Root'.
+
+  }
+
+  // Test without a context
+  {
+    var x = b ? Nullable() : NonNullable();
+
+    // x is inferred to be Root
+    x.rootMethod();
+
+    // x is not inferred to be Generic, nor dynamic
+    x.genericMethod();
+    //^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as Nullable, nor dynamic
+    x.nullableMethod();
+    //^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nullableMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as NonNullable, nor dynamic
+    x.nonNullableMethod();
+    //^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nonNullableMethod' isn't defined for the class 'Root'.
+  }
+
+  // Test using instances
+
+  // Test in the presence of a downward context
+  {
+    // The type of the conditional is not Generic
+    Generic<int> x0 = b ? nullable : nonNullable;
+    //                ^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                  ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+
+    // The type of the conditional is Generic<int>
+    Generic<int> x1 = (b ? nullable : nonNullable)..genericMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                              ^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional not inferred as Nullable, nor dynamic
+    Generic<int> x2 = (b ? nullable : nonNullable)..nullableMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                              ^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nullableMethod' isn't defined for the class 'Root'.
+
+    // The type of the conditional is not inferred as NonNullable, nor dynamic
+    Generic<int> x3 = (b ? nullable : nonNullable)..nonNullableMethod();
+    //                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //                   ^
+    // [cfe] A value of type 'Root' can't be assigned to a variable of type 'Generic<int>'.
+    //                                              ^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nonNullableMethod' isn't defined for the class 'Root'.
+
+  }
+
+  // Test without a context
+  {
+    var x = b ? nullable : nonNullable;
+
+    // x is inferred to be Root
+    x.rootMethod();
+
+    // x is not inferred to be Generic, nor dynamic
+    x.genericMethod();
+    //^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'genericMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as Nullable, nor dynamic
+    x.nullableMethod();
+    //^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nullableMethod' isn't defined for the class 'Root'.
+
+    // x is not inferred as NonNullable, nor dynamic
+    x.nonNullableMethod();
+    //^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+    // [cfe] The method 'nonNullableMethod' isn't defined for the class 'Root'.
+  }
+}
+
+void main() {
+  testLegacyNonNullable(true);
+  testLegacyNullable(true);
+  testNullableNonNullable(true);
+}
diff --git a/tests/language/nnbd/flow_analysis/issue41981_error_test.dart b/tests/language/nnbd/flow_analysis/issue41981_error_test.dart
new file mode 100644
index 0000000..1ff4339
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/issue41981_error_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.
+
+// This test verifies that a block of code that results from promotion to the
+// `Never` type cannot affect the "definitely unassigned" state of a late
+// variable, because promotion to `Never` causes the code to be considered
+// unreachable.
+
+// SharedOptions=--enable-experiment=non-nullable
+
+main() {
+  late int i;
+  Null n = null;
+  if (n != null) {
+    // n has type `Never`, so this code is unreachable.
+    i = 42;
+  }
+  i; // Variable is definitely unassigned
+//^
+// [analyzer] COMPILE_TIME_ERROR.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE
+// [cfe] Non-nullable late variable 'i' without initializer is definitely unassigned.
+}
diff --git a/tests/language/nnbd/flow_analysis/late_var_assigned_in_try_test.dart b/tests/language/nnbd/flow_analysis/late_var_assigned_in_try_test.dart
new file mode 100644
index 0000000..f0fca1a
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/late_var_assigned_in_try_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.
+
+// This test verifies that when a late variable is assigned in a try block and
+// read in a catch or finally block, that there is no compile-time error,
+// because the assignment might happen prior to the exception occurring.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+void tryCatch() {
+  late int x;
+  try {
+    x = 10;
+    throw 'foo';
+  } catch (_) {
+    Expect.equals(x, 10);
+  }
+}
+
+void tryFinally() {
+  late int x;
+  try {
+    x = 10;
+  } finally {
+    Expect.equals(x, 10);
+  }
+}
+
+main() {
+  tryCatch();
+  tryFinally();
+}
diff --git a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_local_function_ok_test.dart b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_local_function_ok_test.dart
new file mode 100644
index 0000000..aaf6a87
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_local_function_ok_test.dart
@@ -0,0 +1,60 @@
+// 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 verifies that when a late variable might be read prior to its first
+// assignment, but the semantics of local functions allow for the possibility
+// that the assignment might occur before the read, that there is no
+// compile-time error.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+// First scenario: the variable is written inside the function, and the read
+// happens after the function is created.
+void writeInFunction() {
+  late int x;
+  void f() {
+    x = 10;
+  }
+
+  f();
+  Expect.equals(x, 10);
+}
+
+void writeInClosure() {
+  late int x;
+  var f = () {
+    x = 10;
+  };
+  f();
+  Expect.equals(x, 10);
+}
+
+// Second scenario: the variable is written outside the function, and the read
+// happens inside the function.
+void readInFunction() {
+  late int x;
+  void f() {
+    Expect.equals(x, 10);
+  }
+
+  x = 10;
+  f();
+}
+
+void readInClosure() {
+  late int x;
+  var f = () {
+    Expect.equals(x, 10);
+  };
+  x = 10;
+  f();
+}
+
+main() {
+  writeInFunction();
+  writeInClosure();
+  readInFunction();
+  readInClosure();
+}
diff --git a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_loop_test.dart b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_loop_test.dart
new file mode 100644
index 0000000..09eef1c
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_loop_test.dart
@@ -0,0 +1,70 @@
+// 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 verifies that when a late variable is read prior to its first
+// assignment, but the read and the assignment occur within the body of a loop,
+// that there is no compile-time error, because the assignment may happen in an
+// earlier iteration than the read.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+void forLoop() {
+  late int x;
+  for (int i = 0; i < 2; i++) {
+    if (i == 1) {
+      Expect.equals(x, 10);
+    }
+    if (i == 0) {
+      x = 10;
+    }
+  }
+}
+
+void forEach() {
+  late int x;
+  for (bool b in [false, true]) {
+    if (b) {
+      Expect.equals(x, 10);
+    }
+    if (!b) {
+      x = 10;
+    }
+  }
+}
+
+void whileLoop() {
+  late int x;
+  int i = 0;
+  while (i < 2) {
+    if (i == 1) {
+      Expect.equals(x, 10);
+    }
+    if (i == 0) {
+      x = 10;
+    }
+    i++;
+  }
+}
+
+void doLoop() {
+  late int x;
+  int i = 0;
+  do {
+    if (i == 1) {
+      Expect.equals(x, 10);
+    }
+    if (i == 0) {
+      x = 10;
+    }
+    i++;
+  } while (i < 2);
+}
+
+main() {
+  forLoop();
+  forEach();
+  whileLoop();
+  doLoop();
+}
diff --git a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_error_test.dart b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_error_test.dart
new file mode 100644
index 0000000..59b5a20
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_error_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.
+
+// This test verifies that when a late variable is read prior to its first
+// assignment, and the read occurs within the body of an unlabelled case block,
+// and the assignment occurs elsewhere in the switch, that there is a
+// compile-time error, because the variable is unassigned on all possible
+// control flow paths to the read.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+void switchBad(int value) {
+  late int x;
+  switch (value) {
+    case 0:
+      Expect.equals(x, 10);
+      //            ^
+      // [analyzer] COMPILE_TIME_ERROR.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE
+      // [cfe] Non-nullable late variable 'x' without initializer is definitely unassigned.
+      break;
+    case 1:
+      x = 10;
+      break;
+  }
+}
+
+main() {
+  switchBad(1);
+}
diff --git a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_test.dart b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_test.dart
new file mode 100644
index 0000000..edb6b6e
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_test.dart
@@ -0,0 +1,28 @@
+// 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 verifies that when a late variable is read prior to its first
+// assignment, but the read occurs within the body of a labelled case block, and
+// the assignment occurs somewhere in the switch, that there is no compile-time
+// error, because the assignment may happen prior to a branch to the label.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+void switchOk(int one) {
+  late int x;
+  switch (one) {
+    L:
+    case 0:
+      Expect.equals(x, 10);
+      break;
+    case 1:
+      x = 10;
+      continue L;
+  }
+}
+
+main() {
+  switchOk(1);
+}
diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_error_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_error_test.dart
new file mode 100644
index 0000000..c7aaf26
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_error_test.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.
+
+// This test verifies that if a read is performed on a getter whose type is
+// `Never?`, the resulting code block is considered reachable by flow analysis.
+
+// SharedOptions=--enable-experiment=non-nullable
+
+Never? get neverQuestionGetter => null;
+
+void explicitNeverQuestionType(Object x, bool b) {
+  if (x is! int) {
+    if (b) {
+      neverQuestionGetter;
+    } else {
+      return;
+    }
+  }
+  // Since the read of `neverQuestionGetter` was reachable, `x` is not promoted
+  // to `int`.
+  x.isEven;
+//  ^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+// [cfe] unspecified
+}
+
+main() {
+  explicitNeverQuestionType(0, true);
+}
diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_test.dart
new file mode 100644
index 0000000..af54180
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_test.dart
@@ -0,0 +1,46 @@
+// 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 verifies that if a read is performed on a getter whose type is
+// `Never`, the resulting code block is considered unreachable by flow analysis.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+Never get neverGetter => throw 'x';
+
+void explicitNeverType(Object x, bool b) {
+  if (x is! int) {
+    if (b) {
+      neverGetter; // Unreachable
+    } else {
+      return;
+    }
+  }
+  // Since the read of `neverGetter` was unreachable, `x` is now promoted to
+  // `int`.
+  Expect.isTrue(x.isEven);
+}
+
+class TypeVarExtendsNever<T extends Never> {
+  T get tGetter => throw 'x';
+
+  void test(Object x, bool b) {
+    if (x is! int) {
+      if (b) {
+        tGetter; // Unreachable
+      } else {
+        return;
+      }
+    }
+    // Since the read of `tGetter` was unreachable, `x` is now promoted to
+    // `int`.
+    Expect.isTrue(x.isEven);
+  }
+}
+
+main() {
+  explicitNeverType(0, false);
+  TypeVarExtendsNever<Never>().test(0, false);
+}
diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_invocation_error_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_invocation_error_test.dart
new file mode 100644
index 0000000..8cd5ce7
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/unreachable_via_invocation_error_test.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.
+
+// This test verifies that if a method is invoked whose return type is `Never?`,
+// the resulting code block is considered reachable by flow analysis.
+
+// SharedOptions=--enable-experiment=non-nullable
+
+Never? neverQuestionFunction() => null;
+
+void explicitNeverQuestionType(Object x, bool b) {
+  if (x is! int) {
+    if (b) {
+      neverQuestionFunction();
+    } else {
+      return;
+    }
+  }
+  // Since completion of `neverQuestionFunction` was reachable, `x` is not
+  // promoted to `int`.
+  x.isEven;
+//  ^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+// [cfe] unspecified
+}
+
+main() {
+  explicitNeverQuestionType(0, true);
+}
diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_invocation_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_invocation_test.dart
new file mode 100644
index 0000000..d059c4d
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/unreachable_via_invocation_test.dart
@@ -0,0 +1,46 @@
+// 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 verifies that if a method is invoked whose return type is `Never`,
+// the resulting code block is considered unreachable by flow analysis.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+Never neverFunction() => throw 'x';
+
+void explicitNeverType(Object x, bool b) {
+  if (x is! int) {
+    if (b) {
+      neverFunction(); // Unreachable
+    } else {
+      return;
+    }
+  }
+  // Since completion of `neverFunction` was unreachable, `x` is now promoted to
+  // `int`.
+  Expect.isTrue(x.isEven);
+}
+
+class TypeVarExtendsNever<T extends Never> {
+  T tMethod() => throw 'x';
+
+  void test(Object x, bool b) {
+    if (x is! int) {
+      if (b) {
+        tMethod(); // Unreachable
+      } else {
+        return;
+      }
+    }
+    // Since completion of `tMethod` was unreachable, `x` is now promoted to
+    // `int`.
+    Expect.isTrue(x.isEven);
+  }
+}
+
+main() {
+  explicitNeverType(0, false);
+  TypeVarExtendsNever<Never>().test(0, false);
+}
diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_promotion_error_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_promotion_error_test.dart
new file mode 100644
index 0000000..4687597
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/unreachable_via_promotion_error_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.
+
+// This test verifies that when a variable's type is promoted to `Never?`, the
+// resulting code block is considered reachable by flow analysis.  This is in
+// contrast to promotion to `Never`, which is considered unreachable.
+
+// SharedOptions=--enable-experiment=non-nullable
+void promoteViaIsCheck(Object x, Object? y) {
+  if (x is! int) {
+    if (y is Never?) {
+      // Reachable
+    } else {
+      return;
+    }
+  }
+  // Since the `y is Never?` branch was reachable, `x` is not promoted to `int`.
+  x.isEven;
+//  ^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+// [cfe] unspecified
+}
+
+main() {
+  promoteViaIsCheck(0, null);
+}
diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_promotion_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_promotion_test.dart
new file mode 100644
index 0000000..3bcc228
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/unreachable_via_promotion_test.dart
@@ -0,0 +1,70 @@
+// 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 verifies that when a variable's type is promoted to `Never` (either
+// via an explicit `is` check or a comparison to `null`), the resulting code
+// block is considered unreachable by flow analysis.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+void promoteViaIsCheck(Object x, Object? y) {
+  if (x is! int) {
+    if (y is Never) {
+      // Unreachable
+    } else {
+      return;
+    }
+  }
+  // Since the `y is Never` branch was unreachable, `x` is now promoted to
+  // `int`.
+  Expect.isTrue(x.isEven);
+}
+
+void promoteViaIsCheck_typeVarExtendsNever<T extends Never>(
+    Object x, Object? y) {
+  if (x is! int) {
+    if (y is T) {
+      // Unreachable
+    } else {
+      return;
+    }
+  }
+  // Since the `y is Never` branch was unreachable, `x` is now promoted to
+  // `int`.
+  Expect.isTrue(x.isEven);
+}
+
+void promoteViaIsCheck_typeVarPromotedToNever<T>(Object x, T y) {
+  if (x is! int) {
+    if (y is Never) {
+      // Unreachable
+    } else {
+      return;
+    }
+  }
+  // Since the `y is Never` branch was unreachable, `x` is now promoted to
+  // `int`.
+  Expect.isTrue(x.isEven);
+}
+
+void promoteViaNullCheck(Object x, Null y) {
+  if (x is! int) {
+    if (y != null) {
+      // Unreachable
+    } else {
+      return;
+    }
+  }
+  // Since the `y != null` branch was unreachable, `x` is now promoted to
+  // `int`.
+  Expect.isTrue(x.isEven);
+}
+
+main() {
+  promoteViaIsCheck(0, 'foo');
+  promoteViaIsCheck_typeVarExtendsNever<Never>(0, 'foo');
+  promoteViaIsCheck_typeVarPromotedToNever<Object?>(0, 'foo');
+  promoteViaNullCheck(0, null);
+}
diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_error_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_error_test.dart
new file mode 100644
index 0000000..aa97c73
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_error_test.dart
@@ -0,0 +1,28 @@
+// 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 verifies that if a read is performed on a variable whose type is
+// `Never?`, the resulting code block is considered reachable by flow analysis.
+
+// SharedOptions=--enable-experiment=non-nullable
+
+void explicitNeverQuestionType(Object x, bool b) {
+  Never? y = null;
+  if (x is! int) {
+    if (b) {
+      y;
+    } else {
+      return;
+    }
+  }
+  // Since the read of `y` was reachable, `x` is not promoted to `int`.
+  x.isEven;
+//  ^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+// [cfe] unspecified
+}
+
+main() {
+  explicitNeverQuestionType(0, true);
+}
diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_test.dart
new file mode 100644
index 0000000..3330292
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_test.dart
@@ -0,0 +1,53 @@
+// 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 verifies that if a read is performed on a variable whose type is
+// `Never`, the resulting code block is considered unreachable by flow analysis.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+void explicitNeverType(Never Function() f, Object x, bool b1, bool b2) {
+  late Never y;
+  // Loop so that flow analysis no longer can tell that y is definitely
+  // unassigned
+  while (true) {
+    if (x is! int) {
+      if (b1) {
+        y; // Unreachable
+      } else {
+        return;
+      }
+    }
+    // Since the read of `y` was unreachable, `x` is now promoted to `int`.
+    Expect.isTrue(x.isEven);
+    if (b2) return;
+    y = f();
+  }
+}
+
+void typeVarExtendsNever<T extends Never>(
+    T Function() f, Object x, bool b1, bool b2) {
+  late T y;
+  // Loop so that flow analysis no longer can tell that y is definitely
+  // unassigned
+  while (true) {
+    if (x is! int) {
+      if (b1) {
+        y; // Unreachable
+      } else {
+        return;
+      }
+    }
+    // Since the read of `y` was unreachable, `x` is now promoted to `int`.
+    Expect.isTrue(x.isEven);
+    if (b2) return;
+    y = f();
+  }
+}
+
+main() {
+  explicitNeverType(() => throw 'x', 0, false, true);
+  typeVarExtendsNever<Never>(() => throw 'x', 0, false, true);
+}
diff --git a/tests/language/nnbd/flow_analysis/write_promoted_value_in_closure_error_test.dart b/tests/language/nnbd/flow_analysis/write_promoted_value_in_closure_error_test.dart
new file mode 100644
index 0000000..7fd85a5
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/write_promoted_value_in_closure_error_test.dart
@@ -0,0 +1,44 @@
+// 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.
+
+// Verifies that variables assigned in closures and local functions are
+// de-promoted at the top of the closure, since the closure may be invoked
+// multiple times.
+
+void functionExpression(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    var f = () {
+      // The assignment to x does de-promote because it happens after the top of
+      // the closure, so flow analysis cannot check that the assigned value is
+      // an int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+      x = 0;
+    };
+  }
+}
+
+void localFunction(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    f() {
+      // The assignment to x does de-promote because it happens after the top of
+      // the closure, so flow analysis cannot check that the assigned value is
+      // an int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+      x = 0;
+    }
+  }
+}
+
+main() {
+  functionExpression(0);
+  localFunction(0);
+}
diff --git a/tests/language/nnbd/flow_analysis/write_promoted_value_in_loop_error_test.dart b/tests/language/nnbd/flow_analysis/write_promoted_value_in_loop_error_test.dart
new file mode 100644
index 0000000..9df5cad
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/write_promoted_value_in_loop_error_test.dart
@@ -0,0 +1,141 @@
+// 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.
+
+// Verifies that variables assigned in loops are de-promoted at the top of the
+// loop body, since the loop body be executed multiple times.
+
+void forLoopAssignInCondition(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    for (; 0 == 0 ? (x = 0) == 0 : true;) {
+      // The assignment to x does de-promote because it happens after the top of
+      // the loop, so flow analysis cannot check that the assigned value is an
+      // int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+    }
+  }
+}
+
+void forLoopAssignInUpdater(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    for (;; x = 0) {
+      // The assignment to x does de-promote because it happens after the top of
+      // the loop, so flow analysis cannot check that the assigned value is an
+      // int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+    }
+  }
+}
+
+void forLoopAssignInBody(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    for (;;) {
+      // The assignment to x does de-promote because it happens after the top of
+      // the loop, so flow analysis cannot check that the assigned value is an
+      // int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+      x = 0;
+    }
+  }
+}
+
+void forEachAssignInBody(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    for (var y in [0]) {
+      // The assignment to x does de-promote because it happens after the top of
+      // the loop, so flow analysis cannot check that the assigned value is an
+      // int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+      x = 0;
+    }
+  }
+}
+
+void whileAssignInCondition(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    while (0 == 0 ? (x = 0) == 0 : true) {
+      // The assignment to x does de-promote because it happens after the top of
+      // the loop, so flow analysis cannot check that the assigned value is an
+      // int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+    }
+  }
+}
+
+void whileAssignInBody(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    while (true) {
+      // The assignment to x does de-promote because it happens after the top of
+      // the loop, so flow analysis cannot check that the assigned value is an
+      // int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+      x = 0;
+    }
+  }
+}
+
+void doAssignInCondition(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    do {
+      // The assignment to x does de-promote because it happens after the top of
+      // the loop, so flow analysis cannot check that the assigned value is an
+      // int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+    } while ((x = 0) == 0);
+  }
+}
+
+void doAssignInBody(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    do {
+      // The assignment to x does de-promote because it happens after the top of
+      // the loop, so flow analysis cannot check that the assigned value is an
+      // int at the time de-promotion occurs.
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+      x = 0;
+    } while (true);
+  }
+}
+
+main() {
+  forLoopAssignInCondition(0);
+  forLoopAssignInUpdater(0);
+  forLoopAssignInBody(0);
+  forEachAssignInBody(0);
+  whileAssignInCondition(0);
+  whileAssignInBody(0);
+  doAssignInCondition(0);
+  doAssignInBody(0);
+}
diff --git a/tests/language/nnbd/flow_analysis/write_promoted_value_in_loop_test.dart b/tests/language/nnbd/flow_analysis/write_promoted_value_in_loop_test.dart
new file mode 100644
index 0000000..a385715
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/write_promoted_value_in_loop_test.dart
@@ -0,0 +1,76 @@
+// 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.
+
+// Verifies that variables assigned in initialization parts of loops are not
+// de-promoted, since loop initialization only executes once.
+
+void forLoopWithoutDecl(Object x) {
+  if (x is int) {
+    for (x = 0;;) {
+      // The assignment to x does not de-promote x because it happens before the
+      // top of the loop, and it assigns an int (which is compatible with the
+      // promoted type).
+      x.isEven;
+      break;
+    }
+  }
+}
+
+void forLoopWithoutDeclAssignInRHS(Object x) {
+  if (x is int) {
+    int y;
+    for (y = (x = 0);;) {
+      // The assignment to x does not de-promote x because it happens before the
+      // top of the loop, and it assigns an int (which is compatible with the
+      // promoted type).
+      x.isEven;
+      break;
+    }
+  }
+}
+
+void forLoopWithDeclAssignInRHS(Object x) {
+  if (x is int) {
+    for (int y = (x = 0);;) {
+      // The assignment to x does not de-promote x because it happens before the
+      // top of the loop, and it assigns an int (which is compatible with the
+      // promoted type).
+      x.isEven;
+      break;
+    }
+  }
+}
+
+void forEachWithoutDecl(Object x) {
+  if (x is int) {
+    int y;
+    for (y in [x = 0]) {
+      // The assignment to x does not de-promote x because it happens before the
+      // top of the loop, and it assigns an int (which is compatible with the
+      // promoted type).
+      x.isEven;
+      break;
+    }
+  }
+}
+
+void forEachWithDecl(Object x) {
+  if (x is int) {
+    for (int y in [x = 0]) {
+      // The assignment to x does not de-promote x because it happens before the
+      // top of the loop, and it assigns an int (which is compatible with the
+      // promoted type).
+      x.isEven;
+      break;
+    }
+  }
+}
+
+main() {
+  forLoopWithoutDecl(0);
+  forLoopWithoutDeclAssignInRHS(0);
+  forLoopWithDeclAssignInRHS(0);
+  forEachWithoutDecl(0);
+  forEachWithDecl(0);
+}
diff --git a/tests/language/nnbd/flow_analysis/write_promoted_value_in_switch_error_test.dart b/tests/language/nnbd/flow_analysis/write_promoted_value_in_switch_error_test.dart
new file mode 100644
index 0000000..ee60537
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/write_promoted_value_in_switch_error_test.dart
@@ -0,0 +1,54 @@
+// 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.
+
+// Verifies that variables assigned in switch statement bodies are de-promoted
+// at the top of labelled case blocks, since the assignment may occur before a
+// branch to the labelled case block.
+
+void switchWithLabelAssignInCase(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    switch (x) {
+      case 1:
+        continue L;
+      L:
+      case 0:
+        // The assignment to x does de-promote because it happens after the
+        // label, so flow analysis cannot check that the assigned value is an
+        // int at the time de-promotion occurs.
+        print(x.isEven);
+        //      ^^^^^^
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+        // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+        x = 0;
+        break;
+    }
+  }
+}
+
+void switchWithLabelAssignInDefault(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    switch (x) {
+      case 1:
+        continue L;
+      L:
+      default:
+        // The assignment to x does de-promote because it happens after the
+        // label, so flow analysis cannot check that the assigned value is an
+        // int at the time de-promotion occurs.
+        print(x.isEven);
+        //      ^^^^^^
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+        // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+        x = 0;
+        break;
+    }
+  }
+}
+
+main() {
+  switchWithLabelAssignInCase(0);
+  switchWithLabelAssignInDefault(0);
+}
diff --git a/tests/language/nnbd/flow_analysis/write_promoted_value_in_switch_test.dart b/tests/language/nnbd/flow_analysis/write_promoted_value_in_switch_test.dart
new file mode 100644
index 0000000..c8cfc47ef
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/write_promoted_value_in_switch_test.dart
@@ -0,0 +1,99 @@
+// 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.
+
+// Verifies that variables assigned in switch statements are not de-promoted if
+// the assignment cannot possibly happen prior to the read.
+
+void switchDefaultWithoutLabel(Object x) {
+  if (x is int) {
+    switch (x = 0) {
+      case 1:
+        break;
+      default:
+        // The assignment to x does not de-promote x because there is no label,
+        // and it assigns an int (which is compatible with the promoted type).
+        x.isEven;
+        break;
+    }
+  }
+}
+
+void switchCaseWithoutLabel(Object x) {
+  if (x is int) {
+    switch (x = 0) {
+      case 1:
+        break;
+      case 0:
+        // The assignment to x does not de-promote x because there is no label,
+        // and it assigns an int (which is compatible with the promoted type).
+        x.isEven;
+        break;
+    }
+  }
+}
+
+void switchDefaultWithoutLabelAssignInDefault(Object x) {
+  if (x is int) {
+    switch (x) {
+      default:
+        // The assignment to x does not de-promote x because there is no label.
+        x.isEven;
+        x = 0;
+        break;
+    }
+  }
+}
+
+void switchCaseWithoutLabelAssignInCase(Object x) {
+  if (x is int) {
+    switch (x) {
+      case 0:
+        // The assignment to x does not de-promote x because there is no label.
+        x.isEven;
+        x = 0;
+        break;
+    }
+  }
+}
+
+void switchDefaultWithLabel(Object x) {
+  if (x is int) {
+    switch (x = 0) {
+      case 1:
+        continue L;
+      L:
+      default:
+        // The assignment to x does not de-promote x because it happens before
+        // the label, and it assigns an int (which is compatible with the
+        // promoted type).
+        x.isEven;
+        break;
+    }
+  }
+}
+
+void switchCaseWithLabel(Object x) {
+  if (x is int) {
+    switch (x = 0) {
+      case 1:
+        continue L;
+      L:
+      case 0:
+        // The assignment to x does not de-promote x because it happens before
+        // the label, and it assigns an int (which is compatible with the
+        // promoted type).
+        x.isEven;
+        break;
+    }
+  }
+}
+
+main() {
+  switchDefaultWithoutLabel(0);
+  switchCaseWithoutLabel(0);
+  switchDefaultWithoutLabelAssignInDefault(0);
+  switchCaseWithoutLabelAssignInCase(0);
+  switchDefaultWithLabel(0);
+  switchCaseWithLabel(0);
+}
diff --git a/tests/language/nnbd/flow_analysis/write_promoted_value_in_try_error_test.dart b/tests/language/nnbd/flow_analysis/write_promoted_value_in_try_error_test.dart
new file mode 100644
index 0000000..6368e1d
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/write_promoted_value_in_try_error_test.dart
@@ -0,0 +1,48 @@
+// 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.
+
+// Verifies that variables assigned in try blocks are de-promoted in catch and
+// finally blocks, since the catch or finally block may execute after the
+// assignment.
+
+void tryCatchAssignInBody(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    try {
+      x = 0;
+    } catch (e) {
+      // The assignment to x does de-promote because flow analysis does a
+      // conservative estimate of the flow model resulting from a caught
+      // exception (using the same logic it uses for loops, which doesn't
+      // account for RHS types)
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+    }
+  }
+}
+
+void tryFinallyAssignInBody(Object x) {
+  if (x is int) {
+    print(x.isEven); // Verify that promotion occurred
+    try {
+      x = 0;
+    } finally {
+      // The assignment to x does de-promote because flow analysis does a
+      // conservative estimate of the flow model resulting from a caught
+      // exception (using the same logic it uses for loops, which doesn't
+      // account for RHS types)
+      print(x.isEven);
+      //      ^^^^^^
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
+      // [cfe] The getter 'isEven' isn't defined for the class 'Object'.
+    }
+  }
+}
+
+main() {
+  tryCatchAssignInBody(0);
+  tryFinallyAssignInBody(0);
+}
diff --git a/tests/language/nnbd/flow_analysis/write_promoted_value_in_try_test.dart b/tests/language/nnbd/flow_analysis/write_promoted_value_in_try_test.dart
new file mode 100644
index 0000000..5ddcaf3
--- /dev/null
+++ b/tests/language/nnbd/flow_analysis/write_promoted_value_in_try_test.dart
@@ -0,0 +1,33 @@
+// 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.
+
+// Verifies that variables assigned in catch and finally are not de-promoted,
+// since the catch or finally block only executes once.
+
+void tryCatchAssignInCatch(Object x) {
+  if (x is int) {
+    try {} catch (e) {
+      // The assignment to x does not de-promote because the assignment is
+      // outside the scope of the try block
+      x.isEven;
+      x = '';
+    }
+  }
+}
+
+void tryFinallyAssignInBody(Object x) {
+  if (x is int) {
+    try {} finally {
+      // The assignment to x does not de-promote because the assignment is
+      // outside the scope of the try block
+      x.isEven;
+      x = 0;
+    }
+  }
+}
+
+main() {
+  tryCatchAssignInCatch(0);
+  tryFinallyAssignInBody(0);
+}
diff --git a/tests/language/nnbd/is_type_test/null_is_test.dart b/tests/language/nnbd/is_type_test/null_is_test.dart
new file mode 100644
index 0000000..d3a9f22
--- /dev/null
+++ b/tests/language/nnbd/is_type_test/null_is_test.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.
+
+import 'package:expect/expect.dart';
+
+// Type tests (is checks) located in a null safe library.
+main() {
+  Expect.isFalse(null is Never);
+  Expect.isTrue(null is Never?);
+  Expect.isTrue(null is Null);
+  Expect.isFalse(null is Object);
+  Expect.isTrue(null is Object?);
+  Expect.isTrue(null is dynamic);
+
+  // Testing all built in types because of a regression that caused them to be
+  // handled differently https://github.com/dart-lang/sdk/issues/42851.
+  Expect.isFalse(null is bool);
+  Expect.isTrue(null is bool?);
+  Expect.isFalse(null is num);
+  Expect.isTrue(null is num?);
+  Expect.isFalse(null is int);
+  Expect.isTrue(null is int?);
+  Expect.isFalse(null is double);
+  Expect.isTrue(null is double?);
+  Expect.isFalse(null is String);
+  Expect.isTrue(null is String?);
+  Expect.isFalse(null is List);
+  Expect.isTrue(null is List?);
+  Expect.isFalse(null is Set);
+  Expect.isTrue(null is Set?);
+  Expect.isFalse(null is Map);
+  Expect.isTrue(null is Map?);
+  Expect.isFalse(null is Symbol);
+  Expect.isTrue(null is Symbol?);
+}
diff --git a/tests/language/nnbd/is_type_test/null_is_type_in_legacy_lib_test.dart b/tests/language/nnbd/is_type_test/null_is_type_in_legacy_lib_test.dart
index ddf79bd..9a92566 100644
--- a/tests/language/nnbd/is_type_test/null_is_type_in_legacy_lib_test.dart
+++ b/tests/language/nnbd/is_type_test/null_is_type_in_legacy_lib_test.dart
@@ -18,13 +18,48 @@
   // `null is Never?`
   Expect.isTrue(legacyIsNullable<Never>(null));
   Expect.isTrue(null is Null);
-  // `null is int*`
-  Expect.isFalse(null is int);
-  // `null is int?`
-  Expect.isTrue(legacyIsNullable<int>(null));
   // `null is Object*`
   Expect.isTrue(null is Object);
   // `null is Object?`
   Expect.isTrue(legacyIsNullable<Object>(null));
   Expect.isTrue(null is dynamic);
+
+  // Testing all built in types because of a regression that caused them to be
+  // handled differently https://github.com/dart-lang/sdk/issues/42851.
+  // `null is bool*`
+  Expect.isFalse(null is bool);
+  // `null is bool?`
+  Expect.isTrue(legacyIsNullable<bool>(null));
+  // `null is num*`
+  Expect.isFalse(null is num);
+  // `null is num?`
+  Expect.isTrue(legacyIsNullable<num>(null));
+  // `null is int*`
+  Expect.isFalse(null is int);
+  // `null is int?`
+  Expect.isTrue(legacyIsNullable<int>(null));
+  // `null is double*`
+  Expect.isFalse(null is double);
+  // `null is double?`
+  Expect.isTrue(legacyIsNullable<double>(null));
+  // `null is String*`
+  Expect.isFalse(null is String);
+  // `null is String?`
+  Expect.isTrue(legacyIsNullable<String>(null));
+  // `null is List*`
+  Expect.isFalse(null is List);
+  // `null is List?
+  Expect.isTrue(legacyIsNullable<List>(null));
+  // `null is Set*`
+  Expect.isFalse(null is Set);
+  // `null is Set?
+  Expect.isTrue(legacyIsNullable<Set>(null));
+  // `null is Map*`
+  Expect.isFalse(null is Map);
+  // `null is Map?
+  Expect.isTrue(legacyIsNullable<Map>(null));
+  // `null is Symbol*`
+  Expect.isFalse(null is Symbol);
+  // `null is Symbol?
+  Expect.isTrue(legacyIsNullable<Symbol>(null));
 }
diff --git a/tests/language/nnbd/is_type_test/null_is_type_in_null_safe_lib_test.dart b/tests/language/nnbd/is_type_test/null_is_type_in_null_safe_lib_test.dart
index 3721c69..a126342 100644
--- a/tests/language/nnbd/is_type_test/null_is_type_in_null_safe_lib_test.dart
+++ b/tests/language/nnbd/is_type_test/null_is_type_in_null_safe_lib_test.dart
@@ -15,13 +15,48 @@
   Expect.isTrue(nullSafeIsLegacy<Never>(null));
   Expect.isTrue(null is Never?);
   Expect.isTrue(null is Null);
-  Expect.isFalse(null is int);
-  // `null is int*`
-  Expect.isFalse(nullSafeIsLegacy<int>(null));
-  Expect.isTrue(null is int?);
   Expect.isFalse(null is Object);
   // `null is Object*`
   Expect.isTrue(nullSafeIsLegacy<Object>(null));
   Expect.isTrue(null is Object?);
   Expect.isTrue(null is dynamic);
+
+  // Testing all built in types because of a regression that caused them to be
+  // handled differently https://github.com/dart-lang/sdk/issues/42851.
+  Expect.isFalse(null is bool);
+  // `null is bool*`
+  Expect.isFalse(nullSafeIsLegacy<bool>(null));
+  Expect.isTrue(null is bool?);
+  Expect.isFalse(null is num);
+  // `null is num*`
+  Expect.isFalse(nullSafeIsLegacy<num>(null));
+  Expect.isTrue(null is num?);
+  Expect.isFalse(null is int);
+  // `null is int*`
+  Expect.isFalse(nullSafeIsLegacy<int>(null));
+  Expect.isTrue(null is int?);
+  Expect.isFalse(null is double);
+  // `null is double*`
+  Expect.isFalse(nullSafeIsLegacy<double>(null));
+  Expect.isTrue(null is double?);
+  Expect.isFalse(null is String);
+  // `null is String*`
+  Expect.isFalse(nullSafeIsLegacy<String>(null));
+  Expect.isTrue(null is String?);
+  Expect.isFalse(null is List);
+  // `null is List*`
+  Expect.isFalse(nullSafeIsLegacy<List>(null));
+  Expect.isTrue(null is List?);
+  Expect.isFalse(null is Set);
+  // `null is Set*`
+  Expect.isFalse(nullSafeIsLegacy<Set>(null));
+  Expect.isTrue(null is Set?);
+  Expect.isFalse(null is Map);
+  // `null is Map*`
+  Expect.isFalse(nullSafeIsLegacy<Map>(null));
+  Expect.isTrue(null is Map?);
+  Expect.isFalse(null is Symbol);
+  // `null is Symbol*`
+  Expect.isFalse(nullSafeIsLegacy<Symbol>(null));
+  Expect.isTrue(null is Symbol?);
 }
diff --git a/tests/language/nnbd/mixed_inheritance/legacy_resolves_conflict_3_error_test.dart b/tests/language/nnbd/mixed_inheritance/legacy_resolves_conflict_3_error_test.dart
index bda8280..e429b2f 100644
--- a/tests/language/nnbd/mixed_inheritance/legacy_resolves_conflict_3_error_test.dart
+++ b/tests/language/nnbd/mixed_inheritance/legacy_resolves_conflict_3_error_test.dart
@@ -232,62 +232,62 @@
   List<List<int? Function(int?)>> xsBq = [
     DwB0().a,
 //  ^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBO0().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwB1().a,
 //  ^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBO1().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwB2().a,
 //  ^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBO2().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwB3().a,
 //  ^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBO3().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwB4().a,
 //  ^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBO4().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwB5().a,
 //  ^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBO5().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
   ];
 
@@ -295,62 +295,62 @@
   List<List<int Function(int)>> xsB = [
     DwBq0().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBqOq0().a,
 //  ^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwBq1().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBqOq1().a,
 //  ^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwBq2().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBqOq2().a,
 //  ^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwBq3().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBqOq3().a,
 //  ^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwBq4().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBqOq4().a,
 //  ^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DwBq5().a,
 //  ^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 
     DiBqOq5().a,
 //  ^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
   ];
 }
diff --git a/tests/language/nnbd/never/never_null_assignability_error_test.dart b/tests/language/nnbd/never/never_null_assignability_error_test.dart
index 5c745a6..a598dfd 100644
--- a/tests/language/nnbd/never/never_null_assignability_error_test.dart
+++ b/tests/language/nnbd/never/never_null_assignability_error_test.dart
@@ -27,7 +27,7 @@
   {
     takesNever(nil);
     //         ^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'Null' can't be assigned to the parameter type 'Never'.
     takesNever(never);
     takesNever(3 as dynamic);
@@ -39,7 +39,7 @@
     takesInt(3);
     takesInt(nil);
     //       ^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'Null' can't be assigned to the parameter type 'int'.
     takesInt(nil as dynamic);
     (takesInt as dynamic)(nil);
@@ -51,7 +51,7 @@
     takesObject(3);
     takesObject(nil);
     //          ^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'Null' can't be assigned to the parameter type 'Object'.
     takesObject(nil as dynamic);
     (takesObject as dynamic)(nil);
@@ -73,17 +73,17 @@
     applyTakesNull(takesNull, nil);
     applyTakesNull(takesNever, nil);
     //             ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNull(takesAny, nil);
 
     applyTakesNull(takesInt, nil);
     //             ^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNull(takesObject, nil);
     //             ^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)'.
   }
 
@@ -94,15 +94,15 @@
     applyTakesNull(takesNull, 3);
     applyTakesNull(takesNever, 3);
     //             ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNull(takesInt, 3);
     //             ^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNull(takesObject, 3);
     //             ^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNull(takesAny, 3);
   }
@@ -138,16 +138,16 @@
     applyTakesNullDynamically(takesNull, nil);
     applyTakesNullDynamically(takesNever, nil);
     //                        ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNullDynamically(takesAny, nil);
     applyTakesNullDynamically(takesInt, nil);
     //                        ^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNullDynamically(takesObject, nil);
     //                        ^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)'.
   }
 
@@ -158,19 +158,19 @@
     applyTakesNullDynamically(takesNull, 3);
     applyTakesNullDynamically(takesNever, 3);
     //                        ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(Never)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNullDynamically(takesInt, 3);
     //                        ^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNullDynamically(takesInt, "hello");
     //                        ^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(int)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNullDynamically(takesObject, 3);
     //                        ^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(Null)'.
     applyTakesNullDynamically(takesAny, 3);
   }
diff --git a/tests/language/nnbd/null_assertions/parameter_checks_test.dart b/tests/language/nnbd/null_assertions/parameter_checks_test.dart
index c6f9cc6..9376a63 100644
--- a/tests/language/nnbd/null_assertions/parameter_checks_test.dart
+++ b/tests/language/nnbd/null_assertions/parameter_checks_test.dart
@@ -5,7 +5,9 @@
 // Test for null assertions for parameters in NNBD weak mode.
 
 // Requirements=nnbd-weak
-// VMOptions=--enable-asserts --null-assertions
+// VMOptions=--enable-asserts
+// dart2jsOptions=--enable-asserts -DcheckString=false
+// SharedOptions=--null-assertions
 
 // Opt out of Null Safety:
 // @dart = 2.6
@@ -14,32 +16,40 @@
 
 import 'parameter_checks_opted_in.dart';
 
+bool Function(Object) asserted(String name) {
+  if (const bool.fromEnvironment('checkString', defaultValue: true)) {
+    return (e) => e is AssertionError && e.toString().contains("$name != null");
+  } else {
+    return (e) => e is AssertionError;
+  }
+}
+
 main() {
   Expect.throws(() {
     foo1(null);
-  }, (e) => e is AssertionError && e.toString().contains("a != null"));
+  }, asserted("a"));
   Expect.throws(() {
     foo2(1, null);
-  }, (e) => e is AssertionError && e.toString().contains("b != null"));
+  }, asserted("b"));
   Expect.throws(() {
     foo3();
-  }, (e) => e is AssertionError && e.toString().contains("b != null"));
+  }, asserted("b"));
   Expect.throws(() {
     foo3(b: null);
-  }, (e) => e is AssertionError && e.toString().contains("b != null"));
+  }, asserted("b"));
   foo4a<int>(null);
   Expect.throws(() {
     foo4b<int>(null);
-  }, (e) => e is AssertionError && e.toString().contains("a != null"));
+  }, asserted("a"));
   foo5a<int>(null);
   Expect.throws(() {
     foo5b<int>(null);
-  }, (e) => e is AssertionError && e.toString().contains("a != null"));
+  }, asserted("a"));
   foo6a<int, int, int>(null);
   Expect.throws(() {
     foo6b<int, int, int>(null);
-  }, (e) => e is AssertionError && e.toString().contains("a != null"));
+  }, asserted("a"));
   Expect.throws(() {
     bar().call(null);
-  }, (e) => e is AssertionError && e.toString().contains("x != null"));
+  }, asserted("x"));
 }
diff --git a/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart b/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart
index 43472fd..e7bf5b2 100644
--- a/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart
+++ b/tests/language/nnbd/resolution/null_aware_subscript_produces_nullable_type_test.dart
@@ -19,41 +19,41 @@
 void f2(NotGeneric? x) {
   x?[0] + 1;
 //^^^^^
-// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+// [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
 // [cfe] unspecified
   x?[0] = 1;
   useNonNullable(x?[0] = 1);
 //               ^^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
   x?[0] += 1;
   useNonNullable(x?[0] += 1);
 //               ^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
   x?[0]++;
   useNonNullable(x?[0]++);
 //               ^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
   ++x?[0];
   useNonNullable(++x?[0]);
 //               ^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] unspecified
 }
 
 void f3<T extends num>(Generic<T>? x) {
   x?[0] + 1;
 //^^^^^
-// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+// [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
 // [cfe] unspecified
 }
 
 void f4<T extends num>(Generic<T?> x) {
   x[0] + 1;
 //^^^^
-// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+// [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
 // [cfe] unspecified
 }
 
diff --git a/tests/language/nnbd/resolution/question_question_lub_test.dart b/tests/language/nnbd/resolution/question_question_lub_test.dart
index 830c848..73dab4a 100644
--- a/tests/language/nnbd/resolution/question_question_lub_test.dart
+++ b/tests/language/nnbd/resolution/question_question_lub_test.dart
@@ -16,13 +16,13 @@
   (nullableInt ?? nonNullInt) + 1;
   (nullableInt ?? nullableInt) + 1;
 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+// [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
 // [cfe] unspecified
   (nonNullInt ?? nullableInt) + 1;
 //               ^^^^^^^^^^^
 // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION
 //^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+// [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
 // [cfe] unspecified
   (nonNullInt ?? nonNullInt) + 1;
 //               ^^^^^^^^^^
diff --git a/tests/language/nnbd/static_errors/local_function_inference.dart b/tests/language/nnbd/static_errors/local_function_inference.dart
index 9cb6a37..af81145 100644
--- a/tests/language/nnbd/static_errors/local_function_inference.dart
+++ b/tests/language/nnbd/static_errors/local_function_inference.dart
@@ -12,7 +12,7 @@
 
   f().arglebargle;
   //  ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'arglebargle' isn't defined for the class 'int'.
   f().isEven; // Inferred type is int
 
diff --git a/tests/language/nnbd/static_errors/super_equals_allows_null_test.dart b/tests/language/nnbd/static_errors/super_equals_allows_null_test.dart
new file mode 100644
index 0000000..507a146
--- /dev/null
+++ b/tests/language/nnbd/static_errors/super_equals_allows_null_test.dart
@@ -0,0 +1,97 @@
+// 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";
+
+// SharedOptions=--enable-experiment=non-nullable
+
+// Test that `super == x` is allowed when `x` has a nullable type, even if the
+// targeted definition of `operator==` has a parameter with a non-nullable type,
+// as per this spec text (from
+// accepted/future-releases/nnbd/feature-specification.md):
+//
+//     Similarly, consider an expression `e` of the form `super == e2` that
+//     occurs in a class whose superclass is `C`, where the static type of `e2`
+//     is `T2`. Let `S` be the formal parameter type of the concrete declaration
+//     of `operator ==` found by method lookup in `C` (_if that search succeeds,
+//     otherwise it is a compile-time error_).  It is a compile-time error
+//     unless `T2` is assignable to `S?`.
+//
+// Also test that `super == null` evaluates to `false` without calling
+// `super.operator==`, as per this spec text (from section "Equality"):
+//
+//     Evaluation of an equality expression ee of the form super == e proceeds
+//     as follows:
+//     - The expression e is evaluated to an object o.
+//     - If either this or o is the null object (16.4), then ee evaluates to
+//       evaluates to true if both this and o are the null object and to false
+//       otherwise.  Otherwise,
+//     - evaluation of ee is equivalent to the method invocation super.==(o).
+
+MapEntry<dynamic, dynamic>? _call = null;
+
+class BaseObject {
+  bool operator ==(Object other) {
+    Expect.isNull(_call);
+    _call = MapEntry(this, other);
+    return false;
+  }
+}
+
+class DerivedObject extends BaseObject {
+  void test() {
+    Object? nullAsObjectQuestion = null;
+    Object? nonNullAsObjectQuestion = 0;
+    dynamic nullAsDynamic = null;
+    dynamic nonNullAsDynamic = 1;
+    Expect.isFalse(super == nullAsObjectQuestion);
+    Expect.isNull(_call);
+    Expect.isFalse(super == nonNullAsObjectQuestion);
+    Expect.identical(_call!.key, this);
+    Expect.identical(_call!.value, nonNullAsObjectQuestion);
+    _call = null;
+    Expect.isFalse(super == nullAsDynamic);
+    Expect.isNull(_call);
+    Expect.isFalse(super == nonNullAsDynamic);
+    Expect.identical(_call!.key, this);
+    Expect.identical(_call!.value, nonNullAsDynamic);
+    _call = null;
+  }
+}
+
+class BaseNum {
+  bool operator ==(covariant num other) {
+    Expect.isNull(_call);
+    _call = MapEntry(this, other);
+    return false;
+  }
+}
+
+class DerivedNum extends BaseNum {
+  void test() {
+    num? nullAsNumQuestion = null;
+    num? nonNullAsNumQuestion = 0;
+    dynamic nullAsDynamic = null;
+    dynamic nonNullAsDynamic = 1;
+    dynamic nonNumAsDynamic = 'foo';
+    Expect.isFalse(super == nullAsNumQuestion);
+    Expect.isNull(_call);
+    Expect.isFalse(super == nonNullAsNumQuestion);
+    Expect.identical(_call!.key, this);
+    Expect.identical(_call!.value, nonNullAsNumQuestion);
+    _call = null;
+    Expect.isFalse(super == nullAsDynamic);
+    Expect.isNull(_call);
+    Expect.isFalse(super == nonNullAsDynamic);
+    Expect.identical(_call!.key, this);
+    Expect.identical(_call!.value, nonNullAsDynamic);
+    _call = null;
+    Expect.throwsTypeError(() => super == nonNumAsDynamic);
+    Expect.isNull(_call);
+  }
+}
+
+main() {
+  DerivedObject().test();
+  DerivedNum().test();
+}
diff --git a/tests/language/nnbd/static_errors/super_equals_disallows_non_matching_type_error_test.dart b/tests/language/nnbd/static_errors/super_equals_disallows_non_matching_type_error_test.dart
new file mode 100644
index 0000000..4366065
--- /dev/null
+++ b/tests/language/nnbd/static_errors/super_equals_disallows_non_matching_type_error_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";
+
+// SharedOptions=--enable-experiment=non-nullable
+
+// Test that `super == x` is properly type checked against the target
+// `operator==` method.  That is, the special allowance in the following spec
+// text (from accepted/future-releases/nnbd/feature-specification.md) allows `x`
+// to be nullable, but still requires that the type otherwise matches:
+//
+//     Similarly, consider an expression `e` of the form `super == e2` that
+//     occurs in a class whose superclass is `C`, where the static type of `e2`
+//     is `T2`. Let `S` be the formal parameter type of the concrete declaration
+//     of `operator ==` found by method lookup in `C` (_if that search succeeds,
+//     otherwise it is a compile-time error_).  It is a compile-time error
+//     unless `T2` is assignable to `S?`.
+
+class Base {
+  bool operator ==(covariant num other) => false;
+}
+
+class Derived extends Base {
+  void test() {
+    String string = 'foo';
+    String? stringQuestion = 'foo';
+    super == string;
+    //       ^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [cfe] The argument type 'String' can't be assigned to the parameter type 'num?'.
+    super == stringQuestion;
+    //       ^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [cfe] The argument type 'String?' can't be assigned to the parameter type 'num?'.
+  }
+}
diff --git a/tests/language/nnbd/syntax/class_member_declarations_error_test.dart b/tests/language/nnbd/syntax/class_member_declarations_error_test.dart
index 2229199..d06b113 100644
--- a/tests/language/nnbd/syntax/class_member_declarations_error_test.dart
+++ b/tests/language/nnbd/syntax/class_member_declarations_error_test.dart
@@ -31,7 +31,7 @@
   // [analyzer] SYNTACTIC_ERROR.MODIFIER_OUT_OF_ORDER
   // [cfe] The modifier 'late' should be before the modifier 'final'.
   //                        ^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 
   covariant late x15;
   //        ^^^^
diff --git a/tests/language/nnbd/try_catch/default_catch_type_error_test.dart b/tests/language/nnbd/try_catch/default_catch_type_error_test.dart
index 73b3b94..03017a6 100644
--- a/tests/language/nnbd/try_catch/default_catch_type_error_test.dart
+++ b/tests/language/nnbd/try_catch/default_catch_type_error_test.dart
@@ -6,7 +6,7 @@
   try {} catch (error) {
     error.notAMethodOnObject();
     //    ^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
     // [cfe] The method 'notAMethodOnObject' isn't defined for the class 'Object'.
     _takesObject(error);
   }
diff --git a/tests/language/nnbd/type_promotion/downwards_inference_error_test.dart b/tests/language/nnbd/type_promotion/downwards_inference_error_test.dart
index d54b522..0906219 100644
--- a/tests/language/nnbd/type_promotion/downwards_inference_error_test.dart
+++ b/tests/language/nnbd/type_promotion/downwards_inference_error_test.dart
@@ -40,18 +40,18 @@
       // x still has type C<String>
       x.dMethod1("hello");
       //^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
       // [cfe] The method 'dMethod1' isn't defined for the class 'C<String>'.
       x.dMethod2(3);
       //^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
       // [cfe] The method 'dMethod2' isn't defined for the class 'C<String>'.
 
       var t0 = x.cMethod("hello");
       t0.length;
       t0.arglebargle; // t0 is not dynamic
       // ^^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'arglebargle' isn't defined for the class 'String'.
 
       // y has type D<String, int>
@@ -59,13 +59,13 @@
       t1.length;
       t1.arglebargle; // t1 is not dynamic
       // ^^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'arglebargle' isn't defined for the class 'String'.
       var t2 = y.dMethod2(3);
       t2.isEven;
       t2.arglebargle; // t2 is not dynamic
       // ^^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'arglebargle' isn't defined for the class 'int'.
     }
 
@@ -83,13 +83,13 @@
       t0.length;
       t0.arglebargle; // t0 is not dynamic
       // ^^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'arglebargle' isn't defined for the class 'String'.
       var t1 = x.dMethod2(3);
       t1.isEven;
       t1.arglebargle; // t1 is not dynamic
       // ^^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'arglebargle' isn't defined for the class 'int'.
 
       // y has type D<String, int>
@@ -97,13 +97,13 @@
       t2.length;
       t2.arglebargle; // t2 is not dynamic
       // ^^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'arglebargle' isn't defined for the class 'String'.
       var t3 = y.dMethod2(3);
       t3.isEven;
       t3.arglebargle; // t3 is not dynamic
       // ^^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'arglebargle' isn't defined for the class 'int'.
     }
 
@@ -118,34 +118,34 @@
       // x has type C<String>, and not D<String, int>
       x.dMethod1("hello");
       //^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
       // [cfe] The method 'dMethod1' isn't defined for the class 'C<String>'.
       x.dMethod2(3);
       //^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
       // [cfe] The method 'dMethod2' isn't defined for the class 'C<String>'.
 
       var t0 = x.cMethod("hello");
       t0.length;
       t0.arglebargle; // t0 is not dynamic
       // ^^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'arglebargle' isn't defined for the class 'String'.
 
       // C<String>, and not D<String, int>
       y.dMethod1("hello");
       //^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
       // [cfe] The method 'dMethod1' isn't defined for the class 'C<String>'.
       y.dMethod2(3);
       //^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
       // [cfe] The method 'dMethod2' isn't defined for the class 'C<String>'.
       var t1 = y.cMethod("hello");
       t1.length;
       t1.arglebargle; // t0 is not dynamic
       // ^^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'arglebargle' isn't defined for the class 'String'.
     }
   }
diff --git a/tests/language/nnbd/typedef/typedef_error_test.dart b/tests/language/nnbd/typedef/typedef_error_test.dart
index f1bed37..17488a5 100644
--- a/tests/language/nnbd/typedef/typedef_error_test.dart
+++ b/tests/language/nnbd/typedef/typedef_error_test.dart
@@ -13,7 +13,7 @@
 void main() {
   F f = null; // typedefs from opted out libraries are treated as non-nullable
   //    ^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'Null' can't be assigned to a variable of type 'int Function(int)'.
 
   f = takesNonNullable; // F is int* Function(int*)
diff --git a/tests/language/null/checked_null_test.dart b/tests/language/null/checked_null_test.dart
index b4fa1f2..9d57242 100644
--- a/tests/language/null/checked_null_test.dart
+++ b/tests/language/null/checked_null_test.dart
@@ -25,6 +25,6 @@
   // crash.
   new A().a?.foo();
   //         ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'foo' isn't defined for the class 'Map<dynamic, dynamic>'.
 }
diff --git a/tests/language/null_aware/access_test.dart b/tests/language/null_aware/access_test.dart
index deaa991..4ee967e 100644
--- a/tests/language/null_aware/access_test.dart
+++ b/tests/language/null_aware/access_test.dart
@@ -39,7 +39,7 @@
   // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
   { String? s = new C(null)?.v; Expect.equals(null, s); }
   //            ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                ^
   // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'.
   //                       ^^
@@ -48,12 +48,12 @@
   { h.C.staticInt = 1; int? i = h.C?.staticInt; Expect.equals(1, i); }
   { C.staticInt = null; String? s = C?.staticInt; Expect.equals(null, s); }
   //                                ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                   ^
   // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'.
   { h.C.staticNullable = null; String? s = h.C?.staticNullable; Expect.equals(null, s); }
   //                                       ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                            ^
   // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'.
 
@@ -62,11 +62,11 @@
   // generated in the case of e1?.id.
   Expect.equals(null, nullC()?.bad);
   //                           ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'bad' isn't defined for the class 'C'.
   { B? b = new C(1); Expect.equals(1, b?.v); }
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'v' isn't defined for the class 'B'.
 
   // '?.' cannot be used to access toplevel properties in libraries imported via
@@ -79,10 +79,10 @@
   // Nor can it be used to access the hashCode getter on the class Type.
   Expect.throwsNoSuchMethodError(() => C?.hashCode);
   //                                      ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] Getter not found: 'hashCode'.
   Expect.throwsNoSuchMethodError(() => h.C?.hashCode);
   //                                        ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] Getter not found: 'hashCode'.
 }
diff --git a/tests/language/null_aware/assignment_test.dart b/tests/language/null_aware/assignment_test.dart
index 4b5f5de..79f566c 100644
--- a/tests/language/null_aware/assignment_test.dart
+++ b/tests/language/null_aware/assignment_test.dart
@@ -59,20 +59,20 @@
   // The static type of e1?.v = e2 is the static type of e2.
   { D? d = new D(new E()); G g = new G(); F? f = (d?.v = g); Expect.identical(f, g); }
   { D? d = new D(new E()); E e = new G(); F? f = (d?.v = e); }
-  //                                             ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                              ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                              ^
   // [cfe] A value of type 'E?' can't be assigned to a variable of type 'F?'.
   { D.staticE = new E(); G g = new G(); F? f = (D?.staticE = g); Expect.identical(f, g); }
   { h.D.staticE = new h.E(); h.G g = new h.G(); h.F? f = (h.D?.staticE = g); Expect.identical(f, g); }
   { D.staticE = new E(); E e = new G(); F? f = (D?.staticE = e); }
-  //                                           ^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                            ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                               ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F?'.
   { h.D.staticE = new h.E(); h.E e = new h.G(); h.F f = (h.D?.staticE = e); }
-  //                                                    ^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                                     ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                                          ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
 
@@ -80,13 +80,13 @@
   // also generated in the case of e1?.v = e2.
   Expect.equals(null, nullC()?.bad = bad());
   //                           ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'bad' isn't defined for the class 'C'.
   { B b = new C(1); Expect.equals(2, b?.v = 2); }
   //                                  ^^
   // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
   //                                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'v' isn't defined for the class 'B'.
 
   // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
@@ -110,46 +110,46 @@
   // also generated in the case of e1?.v op= e2.
   nullC()?.bad = bad();
   //       ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'bad' isn't defined for the class 'C'.
   { B b = new C(1); b?.v += 2; }
   //                 ^^
   // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
   //                   ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'v' isn't defined for the class 'B'.
   //                   ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'v' isn't defined for the class 'B'.
   { D d = new D(new E()); F? f = (d?.v += nullC()); }
   //                               ^^
   // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
   //                                      ^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'C?' can't be assigned to a variable of type 'int'.
   { D d = new D(new E()); H? h = (d?.v += 1); }
-  //                             ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                              ^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                              ^
   // [cfe] A value of type 'G?' can't be assigned to a variable of type 'H?'.
   //                               ^^
   // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
   { D.staticE = new E(); F? f = (D?.staticE += nullC()); }
   //                                           ^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'C?' can't be assigned to a variable of type 'int'.
   { h.D.staticE = new h.E(); h.F? f = (h.D?.staticE += h.nullC()); }
   //                                                   ^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'C?' can't be assigned to a variable of type 'int'.
   { D.staticE = new E(); H? h = (D?.staticE += 1); }
-  //                            ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                             ^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H?'.
   { h.D.staticE = new h.E(); h.H? hh = (h.D?.staticE += 1); }
-  //                                   ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                    ^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                         ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H?'.
 
diff --git a/tests/language/null_aware/increment_decrement_test.dart b/tests/language/null_aware/increment_decrement_test.dart
index 1a5ea4e..0b620fc 100644
--- a/tests/language/null_aware/increment_decrement_test.dart
+++ b/tests/language/null_aware/increment_decrement_test.dart
@@ -52,18 +52,18 @@
   { E e1 = new E(); D? d = new D(e1); E? e2 = d?.v++; Expect.identical(e1, e2); }
   { G g = new G(); D? d = new D(g); F? f = d?.v++; Expect.identical(f, g); }
   //                                       ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'E?' can't be assigned to a variable of type 'F?'.
   { E e1 = new E(); D.staticE = e1; E? e2 = D?.staticE++; Expect.identical(e1, e2); }
   { h.E e1 = new h.E(); h.D.staticE = e1; h.E? e2 = h.D?.staticE++; Expect.identical(e1, e2); }
   { G g = new G(); D.staticE = g; F? f = D?.staticE++; Expect.identical(f, g); }
   //                                     ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                               ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F?'.
   { h.G g = new h.G(); h.D.staticE = g; h.F? f = h.D?.staticE++; Expect.identical(f, g); }
   //                                             ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                                         ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F?'.
 
@@ -79,18 +79,18 @@
   { E e1 = new E(); D? d = new D(e1); E? e2 = d?.v--; Expect.identical(e1, e2); }
   { G g = new G(); D? d = new D(g); F? f = d?.v--; Expect.identical(f, g); }
   //                                       ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'E?' can't be assigned to a variable of type 'F?'.
   { E e1 = new E(); D.staticE = e1; E? e2 = D?.staticE--; Expect.identical(e1, e2); }
   { h.E e1 = new h.E(); h.D.staticE = e1; h.E? e2 = h.D?.staticE--; Expect.identical(e1, e2); }
   { G g = new G(); D.staticE = g; F? f = D?.staticE--; Expect.identical(f, g); }
   //                                     ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                               ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F?'.
   { h.G g = new h.G(); h.D.staticE = g; h.F? f = h.D?.staticE--; Expect.identical(f, g); }
   //                                             ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                                         ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F?'.
 
@@ -106,19 +106,19 @@
   { D? d = new D(new E()); F? f = ++d?.v; Expect.identical(d!.v, f); }
   { D? d = new D(new E()); H? h = ++d?.v; Expect.identical(d!.v, h); }
   //                              ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                ^
   // [cfe] A value of type 'G?' can't be assigned to a variable of type 'H?'.
   { D.staticE = new E(); F? f = ++D?.staticE; Expect.identical(D.staticE, f); }
   { h.D.staticE = new h.E(); h.F? f = ++h.D?.staticE; Expect.identical(h.D.staticE, f); }
   { D.staticE = new E(); H? h = ++D?.staticE; Expect.identical(D.staticE, h); }
   //                            ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                 ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H?'.
   { h.D.staticE = new h.E(); h.H? hh = ++h.D?.staticE; Expect.identical(h.D.staticE, hh); }
   //                                   ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                          ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H?'.
 
@@ -134,19 +134,19 @@
   { D? d = new D(new E()); F? f = --d?.v; Expect.identical(d!.v, f); }
   { D? d = new D(new E()); H? h = --d?.v; Expect.identical(d!.v, h); }
   //                              ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                ^
   // [cfe] A value of type 'G?' can't be assigned to a variable of type 'H?'.
   { D.staticE = new E(); F? f = --D?.staticE; Expect.identical(D.staticE, f); }
   { h.D.staticE = new h.E(); h.F? f = --h.D?.staticE; Expect.identical(h.D.staticE, f); }
   { D.staticE = new E(); H? h = --D?.staticE; Expect.identical(D.staticE, h); }
   //                            ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                 ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H?'.
   { h.D.staticE = new h.E(); h.H? hh = --h.D?.staticE; Expect.identical(h.D.staticE, hh); }
   //                                   ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                          ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H?'.
 }
diff --git a/tests/language/null_aware/invocation_test.dart b/tests/language/null_aware/invocation_test.dart
index 4131cdf..a1515fa 100644
--- a/tests/language/null_aware/invocation_test.dart
+++ b/tests/language/null_aware/invocation_test.dart
@@ -43,23 +43,23 @@
   { int? i = c?.g(() => 1); Expect.equals(1, i); }
   { String? s = nullC()?.g(bad()); Expect.equals(null, s); }
   //            ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'.
   { String? s = c?.g(() => null); Expect.equals(null, s); }
   //            ^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //            ^
   // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'.
   { int? i = C?.staticG(() => 1); Expect.equals(1, i); }
   { int? i = h.C?.staticG(() => 1); Expect.equals(1, i); }
   { String? s = C?.staticG(() => null); Expect.equals(null, s); }
   //            ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //               ^
   // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'.
   { String? s = h.C?.staticG(() => null); Expect.equals(null, s); }
   //            ^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                 ^
   // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'.
 
@@ -68,11 +68,11 @@
   // generated in the case of o?.m(...).
   { B? b = new C(); Expect.equals(1, b?.f(() => 1)); }
   //                                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'f' isn't defined for the class 'B'.
   { int? i = 1; Expect.equals(null, nullC()?.f(i)); }
   //                                           ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int?' can't be assigned to the parameter type 'dynamic Function()?'.
 
   // '?.' can't be used to access toplevel functions in libraries imported via
@@ -85,10 +85,10 @@
   // Nor can it be used to access the toString method on the class Type.
   Expect.throwsNoSuchMethodError(() => C?.toString());
   //                                      ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.toString'.
   Expect.throwsNoSuchMethodError(() => h.C?.toString());
   //                                        ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.toString'.
 }
diff --git a/tests/language/number/identifier_test.dart b/tests/language/number/identifier_test.dart
index ce91927..d66bf6b 100644
--- a/tests/language/number/identifier_test.dart
+++ b/tests/language/number/identifier_test.dart
@@ -10,32 +10,32 @@
   //                 ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                 ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
   Expect.equals(2, 2 as int);
   //                    ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                    ^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   Expect.isTrue(-2 is int);
   //                  ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                  ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
   Expect.equals(-2, -2 as int);
   //                      ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                      ^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   Expect.isTrue(0x10 is int);
   //                    ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                    ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
   Expect.isTrue(-0x10 is int);
   //                     ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                     ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
 
   // "a" will be part of hex literal, the following "s" is an error.
   0x10as int;
@@ -68,43 +68,43 @@
   Expect.equals(1e+2, 1e+2 as double);
   Expect.throwsNoSuchMethodError(() => 1.e+2);
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'e' isn't defined for the class 'int'.
   1d;
 //^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 // ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'd'.
   1D;
 //^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 // ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'D'.
   Expect.throwsNoSuchMethodError(() => 1.d+2);
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'int'.
   Expect.throwsNoSuchMethodError(() => 1.D+2);
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'D' isn't defined for the class 'int'.
   1.1d;
 //^^^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 //   ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'd'.
   1.1D;
 //^^^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 //   ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'D'.
   1e;
 //^
@@ -116,6 +116,6 @@
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 // ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'x'.
 }
diff --git a/tests/language/operator/equality_static_test.dart b/tests/language/operator/equality_static_test.dart
index e1508b6..d2de3fb 100644
--- a/tests/language/operator/equality_static_test.dart
+++ b/tests/language/operator/equality_static_test.dart
@@ -56,7 +56,7 @@
   null == voidListVar;
   null == voidVar;
   //      ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   true == null;
@@ -73,7 +73,7 @@
   true == voidListVar;
   true == voidVar;
   //      ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   <int>{} == null;
@@ -90,7 +90,7 @@
   <int>{} == voidListVar;
   <int>{} == voidVar;
   //         ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   numVar == null;
@@ -107,7 +107,7 @@
   numVar == voidListVar;
   numVar == voidVar;
   //        ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   aVar == null;
@@ -124,51 +124,51 @@
   aVar == voidListVar;
   aVar == voidVar;
   //      ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   covar1Var == null;
   covar1Var == true;
   //           ^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1Var == <int>{};
   //           ^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1Var == numVar;
   //           ^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1Var == aVar;
   //           ^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1Var == covar1Var;
   covar1Var == aNullableVar;
   //           ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1Var == covar1NullableVar;
   covar1Var == futureOrNullableIntVar;
   //           ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1Var == futureOrCovar1Var;
   //           ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1Var == const AbstractCovar2();
   //           ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1Var == voidListVar;
   //           ^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1Var == voidVar;
   //           ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   aNullableVar == null;
@@ -185,51 +185,51 @@
   aNullableVar == voidListVar;
   aNullableVar == voidVar;
   //              ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   covar1NullableVar == null;
   covar1NullableVar == true;
   //                   ^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1NullableVar == <int>{};
   //                   ^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1NullableVar == numVar;
   //                   ^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1NullableVar == aVar;
   //                   ^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1NullableVar == covar1Var;
   covar1NullableVar == aNullableVar;
   //                   ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1NullableVar == covar1NullableVar;
   covar1NullableVar == futureOrNullableIntVar;
   //                   ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1NullableVar == futureOrCovar1Var;
   //                   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1NullableVar == const AbstractCovar2();
   //                   ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1NullableVar == voidListVar;
   //                   ^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   covar1NullableVar == voidVar;
   //                   ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   futureOrNullableIntVar == null;
@@ -246,7 +246,7 @@
   futureOrNullableIntVar == voidListVar;
   futureOrNullableIntVar == voidVar;
   //                        ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   futureOrCovar1Var == null;
@@ -263,54 +263,54 @@
   futureOrCovar1Var == voidListVar;
   futureOrCovar1Var == voidVar;
   //                   ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   const AbstractCovar2() == null;
   const AbstractCovar2() == true;
   //                        ^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == <int>{};
   //                        ^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == numVar;
   //                        ^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == aVar;
   //                        ^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == covar1Var;
   //                        ^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == aNullableVar;
   //                        ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == covar1NullableVar;
   //                        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == futureOrNullableIntVar;
   //                        ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == futureOrCovar1Var;
   //                        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == const AbstractCovar2();
   const AbstractCovar2() == voidListVar;
   //                        ^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] unspecified
   const AbstractCovar2() == voidVar;
   //                        ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   voidListVar == null;
@@ -327,59 +327,59 @@
   voidListVar == voidListVar;
   voidListVar == voidVar;
   //             ^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 
   voidVar == null;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == true;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == <int>{};
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == numVar;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == aVar;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == covar1Var;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == aNullableVar;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == covar1NullableVar;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == futureOrNullableIntVar;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == futureOrCovar1Var;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == voidListVar;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] unspecified
   voidVar == voidVar;
 //^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] This expression has type 'void' and can't be used.
 //           ^^^^^^^
-// [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+// [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
 // [cfe] This expression has type 'void' and can't be used.
 
   void fun<X extends Covar1, Y extends Covar1?, Z extends FutureOr<Covar1>>(
@@ -387,89 +387,89 @@
     covar1Var == null;
     covar1Var == true;
     //           ^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1Var == <int>{};
     //           ^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1Var == numVar;
     //           ^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1Var == aVar;
     //           ^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1Var == covar1Var;
     covar1Var == aNullableVar;
     //           ^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1Var == covar1NullableVar;
     covar1Var == futureOrNullableIntVar;
     //           ^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1Var == futureOrCovar1Var;
     //           ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1Var == const AbstractCovar2();
     //           ^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1Var == voidListVar;
     //           ^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1Var == voidVar;
     //           ^^^^^^^
-    // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+    // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
     // [cfe] This expression has type 'void' and can't be used.
 
     covar1NullableVar == null;
     covar1NullableVar == true;
     //                   ^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1NullableVar == <int>{};
     //                   ^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1NullableVar == numVar;
     //                   ^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1NullableVar == aVar;
     //                   ^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1NullableVar == covar1Var;
     covar1NullableVar == aNullableVar;
     //                   ^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1NullableVar == covar1NullableVar;
     covar1NullableVar == futureOrNullableIntVar;
     //                   ^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1NullableVar == futureOrCovar1Var;
     //                   ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1NullableVar == const AbstractCovar2();
     //                   ^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1NullableVar == voidListVar;
     //                   ^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] unspecified
     covar1NullableVar == voidVar;
     //                   ^^^^^^^
-    // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+    // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
     // [cfe] This expression has type 'void' and can't be used.
 
     futureOrCovar1Var == null;
@@ -486,7 +486,7 @@
     futureOrCovar1Var == voidListVar;
     futureOrCovar1Var == voidVar;
     //                   ^^^^^^^
-    // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+    // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
     // [cfe] This expression has type 'void' and can't be used.
   }
 }
diff --git a/tests/language/operator/invalid_assignment_to_postfix_increment_test.dart b/tests/language/operator/invalid_assignment_to_postfix_increment_test.dart
index b26b284..751c947 100644
--- a/tests/language/operator/invalid_assignment_to_postfix_increment_test.dart
+++ b/tests/language/operator/invalid_assignment_to_postfix_increment_test.dart
@@ -19,7 +19,7 @@
 // [cfe] Illegal assignment to non-assignable expression.
   z++ ??= y;
 //^
-// [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+// [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
 //^^^
 // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
 //^^^
diff --git a/tests/language/operator/invalid_operators_test.dart b/tests/language/operator/invalid_operators_test.dart
index 4e90b5b..52eae80 100644
--- a/tests/language/operator/invalid_operators_test.dart
+++ b/tests/language/operator/invalid_operators_test.dart
@@ -9,6 +9,7 @@
   // [cfe] Operator '==' should have exactly one parameter.
   //       ^^
   // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
+  // [cfe] The method 'Operators1.==' has fewer positional arguments than those of overridden method 'Object.=='.
   operator <() => true;
   //       ^
   // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
@@ -86,6 +87,7 @@
   // [cfe] Operator '==' should have exactly one parameter.
   //       ^^
   // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
+  // [cfe] The method 'Operators2.==' has more required arguments than those of overridden method 'Object.=='.
   operator <(a, b) => true;
   //       ^
   // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
@@ -249,6 +251,7 @@
   operator ==({a}) => true;
   //       ^^
   // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  // [cfe] The method 'Operators4.==' has fewer positional arguments than those of overridden method 'Object.=='.
   //           ^
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
   // [cfe] An operator can't have optional parameters.
@@ -569,6 +572,9 @@
   operator ==<T>(a) => true;
   //       ^^
   // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  // [cfe] Declared type variables of 'Operators7.==' doesn't match those on overridden method 'Object.=='.
+  //       ^
+  // [cfe] The return type of the method 'Operators7.==' is 'dynamic', which does not match the return type, 'bool', of the overridden method, 'Object.=='.
   //         ^^^
   // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
   //          ^
@@ -665,4 +671,11 @@
   // [cfe] Types parameters aren't allowed when defining an operator.
 }
 
+class Operators8 {
+  /*space*/ int operator []=(a, b) => 1;
+  //        ^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_OPERATOR
+  // [cfe] unspecified
+}
+
 main() {}
diff --git a/tests/language/operator/number_operator_context_test.dart b/tests/language/operator/number_operator_context_test.dart
new file mode 100644
index 0000000..898f139
--- /dev/null
+++ b/tests/language/operator/number_operator_context_test.dart
@@ -0,0 +1,177 @@
+// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file
+// for 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 the new context type rules for number operators,
+// as modified by Null Safety
+import "static_type_helper.dart";
+
+// The context rules for `e` of the form:
+// For e1 + e2, e1 - e2, e1 * e2, e1 % e2 or e1.remainder(e2),,
+// if the static type of e1 is a non-`Never` subtype of `int`,
+// and the context type of the entire expression is `int`,
+// then the context type of e2 is `int`.
+// If the static type of e1 is a non-`Never` subtype of `num`
+// that is not a subtype of `double`,
+// and the context type of the entire expression is `double`,
+// then the context type of e2 is `double`.
+
+// If the context type of `e1.clamp(e2, e3)`, *C*,
+// and the  the static type of `e1`, *T*,
+// are both is a non-`Never` subtypes of `num`,
+// then the context types of `e2` and `e3` are both *C*.
+// Otherwise the context types of `e2` and `e3` are `num`.
+
+void main() {
+  testIntContext<int, Object>(1, 1);
+  testDoubleContext<int, double, num, Object>(1, 1.1, 1.1, 1.1);
+  testNumContext<num, Object>(1, 1);
+}
+
+void testIntContext<I extends int, O extends Object>(I i, O o) {
+  context<int>(1 + (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(1 - (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(1 * (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(1 % (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(1.remainder(contextType(1)..expectStaticType<Exactly<int>>()));
+
+  context<int>(i + (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(i - (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(i * (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(i % (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(i.remainder(contextType(1)..expectStaticType<Exactly<int>>()));
+
+  context<num>(1 + (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(1 - (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(1 * (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(1 % (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(1.remainder(contextType(1)..expectStaticType<Exactly<num>>()));
+
+  O oi = 1 as O;
+  if (oi is! int) throw "promote oi to O&int";
+  context<int>(oi + (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(oi - (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(oi * (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(oi % (contextType(1)..expectStaticType<Exactly<int>>()));
+  context<int>(oi.remainder(contextType(1)..expectStaticType<Exactly<int>>()));
+
+  int ii = 0;
+  ii += contextType(1)..expectStaticType<Exactly<int>>();
+  ii -= contextType(1)..expectStaticType<Exactly<int>>();
+  ii *= contextType(1)..expectStaticType<Exactly<int>>();
+  ii %= contextType(1)..expectStaticType<Exactly<int>>();
+  if (ii != 0) throw "use ii";
+
+  context<int>(1.clamp(contextType(1)..expectStaticType<Exactly<int>>(),
+      contextType(1)..expectStaticType<Exactly<int>>()));
+
+  context<int>(i.clamp(contextType(1)..expectStaticType<Exactly<int>>(),
+      contextType(1)..expectStaticType<Exactly<int>>()));
+
+  context<int>(oi.clamp(contextType(1)..expectStaticType<Exactly<int>>(),
+      contextType(1)..expectStaticType<Exactly<int>>()));
+}
+
+void testDoubleContext<I extends int, D extends double, N extends num,
+    O extends Object>(I i, D d, N n, O o) {
+  context<double>(1 + (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(1 - (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(1 * (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(1 % (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(
+      1.remainder(contextType(1.0)..expectStaticType<Exactly<double>>()));
+
+  context<double>(n + (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(n - (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(n * (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(n % (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(
+      n.remainder(contextType(1.0)..expectStaticType<Exactly<double>>()));
+
+  context<double>(i + (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(i - (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(i * (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(i % (contextType(1.0)..expectStaticType<Exactly<double>>()));
+  context<double>(
+      i.remainder(contextType(1.0)..expectStaticType<Exactly<double>>()));
+
+  context<double>(d + (contextType(1.0)..expectStaticType<Exactly<num>>()));
+  context<double>(d - (contextType(1.0)..expectStaticType<Exactly<num>>()));
+  context<double>(d * (contextType(1.0)..expectStaticType<Exactly<num>>()));
+  context<double>(d % (contextType(1.0)..expectStaticType<Exactly<num>>()));
+  context<double>(
+      d.remainder(contextType(1.0)..expectStaticType<Exactly<num>>()));
+
+  var od = (1.0 as O);
+  if (od is! double) throw "promote od to O&double";
+  context<double>(od + (contextType(1.0)..expectStaticType<Exactly<num>>()));
+  context<double>(od - (contextType(1.0)..expectStaticType<Exactly<num>>()));
+  context<double>(od * (contextType(1.0)..expectStaticType<Exactly<num>>()));
+  context<double>(od % (contextType(1.0)..expectStaticType<Exactly<num>>()));
+  context<double>(
+      od.remainder(contextType(1.0)..expectStaticType<Exactly<num>>()));
+
+  // The context type also causes double literals.
+  context<double>(1 + (1..expectStaticType<Exactly<double>>()));
+  context<double>(1 - (1..expectStaticType<Exactly<double>>()));
+  context<double>(1 * (1..expectStaticType<Exactly<double>>()));
+  context<double>(1 % (1..expectStaticType<Exactly<double>>()));
+  context<double>(1.remainder(1..expectStaticType<Exactly<double>>()));
+
+  double dd = 0.0;
+  dd += contextType(1)..expectStaticType<Exactly<num>>();
+  dd -= contextType(1)..expectStaticType<Exactly<num>>();
+  dd *= contextType(1)..expectStaticType<Exactly<num>>();
+  dd %= contextType(2)..expectStaticType<Exactly<num>>();
+
+  context<double>(1.1.clamp(
+      contextType(1.0)..expectStaticType<Exactly<double>>(),
+      contextType(1.0)..expectStaticType<Exactly<double>>()));
+
+  context<double>(d.clamp(contextType(1.0)..expectStaticType<Exactly<double>>(),
+      contextType(1.0)..expectStaticType<Exactly<double>>()));
+
+  context<double>(od.clamp(
+      contextType(1.0)..expectStaticType<Exactly<double>>(),
+      contextType(1.0)..expectStaticType<Exactly<double>>()));
+}
+
+void testNumContext<N extends num, O extends Object>(N n, O o) {
+  var i1 = 1;
+  var d1 = 1.0;
+  num n1 = 1;
+  if (o is! num) throw "promote o to O&num";
+
+  context<num>(i1 + (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(i1 - (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(i1 * (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(i1 % (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(i1.remainder(contextType(1)..expectStaticType<Exactly<num>>()));
+
+  context<num>(d1 + (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(d1 - (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(d1 * (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(d1 % (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(d1.remainder(contextType(1)..expectStaticType<Exactly<num>>()));
+
+  context<num>(n1 + (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(n1 - (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(n1 * (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(n1 % (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(n1.remainder(contextType(1)..expectStaticType<Exactly<num>>()));
+
+  context<num>(n + (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(n - (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(n * (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(n % (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(n.remainder(contextType(1)..expectStaticType<Exactly<num>>()));
+
+  context<num>(o + (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(o - (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(o * (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(o % (contextType(1)..expectStaticType<Exactly<num>>()));
+  context<num>(o.remainder(contextType(1)..expectStaticType<Exactly<num>>()));
+
+  context<num>(o.clamp(contextType(1)..expectStaticType<Exactly<num>>(),
+      contextType(1)..expectStaticType<Exactly<num>>()));
+}
diff --git a/tests/language/operator/number_operator_error_test.dart b/tests/language/operator/number_operator_error_test.dart
new file mode 100644
index 0000000..90e4cf0
--- /dev/null
+++ b/tests/language/operator/number_operator_error_test.dart
@@ -0,0 +1,246 @@
+// Copyright (c) 2021, the Dart project authors.  Please see the AUTHORS file
+// for 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 the new context type rules for number operators,
+import "static_type_helper.dart";
+
+// as modified by Null Safety
+void main() {
+  testTypes<int, double, num, Object>(1, 1.0, 1, 1);
+}
+
+void
+    testTypes<I extends int, D extends double, N extends num, O extends Object>(
+        I ti, D td, N tn, O to) {
+  int i = 1;
+  double d = 1.0;
+  num n = cast(1);
+  O oi = cast(1);
+  if (oi is! int) throw "promote oi to O&int";
+  checkIntersectionType<O, int>(oi, oi, oi);
+  O od = cast(1.0);
+  if (od is! double) throw "promote od to O&double";
+  checkIntersectionType<O, double>(od, od, od);
+  O on = cast(1);
+  if (on is! num) throw "promote on to I&num";
+  checkIntersectionType<O, num>(on, on, on);
+  dynamic dyn = cast(1);
+  late never = throw "unreachable";
+
+  /* indent */ i + "string";
+  //               ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [cfe] A value of type 'String' can't be assigned to a variable of type 'num'.
+
+  i += d;
+  //   ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  //^^
+  // [cfe] A value of type 'double' can't be assigned to a variable of type 'int'.
+
+  i += n;
+  //   ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  //^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
+
+  i += never;
+  //   ^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  //^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
+
+  i += dyn; // type of `i + dyn` is `num`, not assignable to `int`.
+  //   ^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  //^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
+
+  ti += i; // Type of expression is `int`, not `I`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'int' can't be assigned to a variable of type 'I'.
+
+  ti += d; // Type of expression is `num`, not `I`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'double' can't be assigned to a variable of type 'I'.
+
+  ti += n; // Type of expression is `num`, not `I`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'I'.
+
+  ti += never; // Type of expression is `num`, not `I`.
+  //    ^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'I'.
+
+  ti += dyn; // type of `i + dyn` is `num`, not assignable to `int`.
+  //    ^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'I'.
+
+  td += i; // Type of expression is `double`, not `D`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
+
+  td += d; // Type of expression is `double`, not `D`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
+
+  td += n; // Type of expression is `double`, not `D`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
+
+  td += dyn; // Type of expression is `double`, not `D`.
+  //    ^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
+
+  td += never; // Type of expression is `double`, not `D`.
+  //    ^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
+
+  tn += i; // Type of expression is `num`, not `N`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
+
+  tn += d; // Type of expression is `num`, not `N`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
+
+  tn += n; // Type of expression is `num`, not `N`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
+
+  tn += dyn; // Type of expression is `num`, not `N`.
+  //    ^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
+
+  tn += never; // Type of expression is `num`, not `N`.
+  //    ^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
+
+  O oi1 = to; // New variable to avoid demoting `oi`.
+  if (oi1 is int) {
+    // Promote oi1 to O&int
+    oi1 + d; // Valid
+    oi1 += d;
+    //     ^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //  ^^
+    // [cfe] A value of type 'double' can't be assigned to a variable of type 'O'.
+  }
+
+  O oi2 = to;
+  if (oi2 is int) {
+    // Promote oi2 to O&int.
+    oi2 + n; // Valid
+    oi2 += n;
+    //     ^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //  ^^
+    // [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
+  }
+
+  O oi3 = to;
+  if (oi3 is int) {
+    // Promote oi3 to O&int.
+    oi3 + dyn; // Valid
+    oi3 += dyn;
+    //     ^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //  ^^
+    // [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
+  }
+
+  O oi4 = to;
+  if (oi4 is int) {
+    // Promote oi4 to O&int.
+    oi4 + never; // Valid.
+    oi4 += never;
+    //     ^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //  ^^
+    // [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
+  }
+
+  context<D>(i + td); // Type of expression is `double`, not `D`.
+  //         ^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  //           ^
+  // [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
+
+  context<D>(n + td); // Type of expression is `double`, not `D`.
+  //         ^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  //           ^
+  // [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
+
+  context<D>(1.0 + td); // Type of expression is `double`, not `D`.
+  //         ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  //             ^
+  // [cfe] The argument type 'double' can't be assigned to the parameter type 'D'.
+
+  tn += n; // Type of expression is `num`, not `N`.
+  //    ^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
+
+  tn += dyn;
+  //    ^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+  // ^^
+  // [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
+
+  O on1 = to;
+  if (on1 is num) {
+    // Promote on1 to O&num.
+    on1 += n; // Type of expression is `num`, not `N` or `O`.
+    //     ^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //  ^^
+    // [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
+  }
+
+  O on2 = to;
+  if (on2 is num) {
+    // Promote on2 to O&num.
+    on2 += dyn; // Type of expression is `num`, not `N` or `O`.
+    //     ^^^
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
+    //  ^^
+    // [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
+  }
+}
+
+// The value as the context type, without risking any assignment promotion.
+T cast<T>(Object value) => value as T;
diff --git a/tests/language/operator/number_operator_typing_test.dart b/tests/language/operator/number_operator_typing_test.dart
new file mode 100644
index 0000000..62e452a
--- /dev/null
+++ b/tests/language/operator/number_operator_typing_test.dart
@@ -0,0 +1,927 @@
+// Copyright (c) 2026, the Dart project authors.  Please see the AUTHORS file
+// for 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 the rules for static types of number operators,
+// as modified by Null Safety
+import "static_type_helper.dart";
+
+// ignore_for_file: receiver_of_type_never
+
+// The typing rules for `e` of the form:
+// * `e1 op e2` (op in `+`, `-`, `*` or `%`), or
+// * `e1.remainder(e2)`,
+//
+// where *T* is the static type of `e1`, *S* is the static type of `e2`
+// and *T* is a non-`Never` subtype of `num` and *S* is assignable to `num`.
+//
+// * If *T* <: `double` then the static type of `e` is `double`.
+// * Otherwise, if *S* <: `double` and not *S* <: `Never`,
+//   then the static type of `e` is `double`.
+// * Otherwise, if *T* <: `int`, *S* <: `int` and not *S* <: `Never`,
+//   then the static type of `e` is `int`.
+// * Otherwise the static type of *e* is `num`.
+//
+// For `e1.clamp(e2, e3)` where
+// *T1* is the static type of `e1`, *T1* a non-`Never` subtype of `num`,
+// *T2* is the static type of `e2`, and
+// *T3* is the static type of `e3`:
+//
+// * If all of *T1*, *T2* and *T3* are non-`Never` subtypes of `int`,
+//   then the static type of `e` is `int`.
+// * If all of *T1*, *T2* and *T3* are non-`Never` subtypes of `double`,
+//   then the static type of `e` is `double`.
+// * Otherwise the static type of `e` is num`.
+
+main() {
+  testPlainVariables(1, 1.0, 1);
+  testPromotedVariables(1, 1.0, 1);
+  testTypeVariables<int, double, int>(1, 1.0, 1);
+  testPromotedTypeVariables<Object>(1, 1.0, 1);
+  const TestConst<int, double, num>(1, 1.0, 1);
+}
+
+final num n1 = 1;
+final num n2 = 2;
+final int i1 = 1;
+final int i2 = 2;
+final dynamic dyn1 = 1;
+final dynamic dyn2 = 2;
+late final Never never = throw "unreachable"; // Only used for static tests.
+
+// Check the static type of operations on plain variables.
+void testPlainVariables(int i, double d, num n) {
+  (i + i).expectStaticType<Exactly<int>>();
+  (i - i).expectStaticType<Exactly<int>>();
+  (i * i).expectStaticType<Exactly<int>>();
+  (i % i).expectStaticType<Exactly<int>>();
+  i.remainder(i).expectStaticType<Exactly<int>>();
+
+  (i + d).expectStaticType<Exactly<double>>();
+  (i - d).expectStaticType<Exactly<double>>();
+  (i * d).expectStaticType<Exactly<double>>();
+  (i % d).expectStaticType<Exactly<double>>();
+  i.remainder(d).expectStaticType<Exactly<double>>();
+
+  (i + n).expectStaticType<Exactly<num>>();
+  (i - n).expectStaticType<Exactly<num>>();
+  (i * n).expectStaticType<Exactly<num>>();
+  (i % n).expectStaticType<Exactly<num>>();
+  i.remainder(n).expectStaticType<Exactly<num>>();
+
+  (i + dyn1).expectStaticType<Exactly<num>>();
+  (i - dyn1).expectStaticType<Exactly<num>>();
+  (i * dyn1).expectStaticType<Exactly<num>>();
+  (i % dyn1).expectStaticType<Exactly<num>>();
+  i.remainder(dyn1).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    // Only for the static checks
+    // since we have sub-expressions of type Never.
+    (i + never).expectStaticType<Exactly<num>>();
+    (i - never).expectStaticType<Exactly<num>>();
+    (i * never).expectStaticType<Exactly<num>>();
+    (i % never).expectStaticType<Exactly<num>>();
+    i.remainder(never).expectStaticType<Exactly<num>>();
+  }
+
+  (d + i).expectStaticType<Exactly<double>>();
+  (d - i).expectStaticType<Exactly<double>>();
+  (d * i).expectStaticType<Exactly<double>>();
+  (d % i).expectStaticType<Exactly<double>>();
+  d.remainder(i).expectStaticType<Exactly<double>>();
+
+  (d + d).expectStaticType<Exactly<double>>();
+  (d - d).expectStaticType<Exactly<double>>();
+  (d * d).expectStaticType<Exactly<double>>();
+  (d % d).expectStaticType<Exactly<double>>();
+  d.remainder(d).expectStaticType<Exactly<double>>();
+
+  (d + n).expectStaticType<Exactly<double>>();
+  (d - n).expectStaticType<Exactly<double>>();
+  (d * n).expectStaticType<Exactly<double>>();
+  (d % n).expectStaticType<Exactly<double>>();
+  d.remainder(n).expectStaticType<Exactly<double>>();
+
+  (d + dyn1).expectStaticType<Exactly<double>>();
+  (d - dyn1).expectStaticType<Exactly<double>>();
+  (d * dyn1).expectStaticType<Exactly<double>>();
+  (d % dyn1).expectStaticType<Exactly<double>>();
+  d.remainder(dyn1).expectStaticType<Exactly<double>>();
+
+  if (false) {
+    (d + never).expectStaticType<Exactly<double>>();
+    (d - never).expectStaticType<Exactly<double>>();
+    (d * never).expectStaticType<Exactly<double>>();
+    (d % never).expectStaticType<Exactly<double>>();
+    d.remainder(never).expectStaticType<Exactly<double>>();
+  }
+
+  (n + i).expectStaticType<Exactly<num>>();
+  (n - i).expectStaticType<Exactly<num>>();
+  (n * i).expectStaticType<Exactly<num>>();
+  (n % i).expectStaticType<Exactly<num>>();
+  n.remainder(i).expectStaticType<Exactly<num>>();
+
+  (n + d).expectStaticType<Exactly<double>>();
+  (n - d).expectStaticType<Exactly<double>>();
+  (n * d).expectStaticType<Exactly<double>>();
+  (n % d).expectStaticType<Exactly<double>>();
+  n.remainder(d).expectStaticType<Exactly<double>>();
+
+  (n + n).expectStaticType<Exactly<num>>();
+  (n - n).expectStaticType<Exactly<num>>();
+  (n * n).expectStaticType<Exactly<num>>();
+  (n % n).expectStaticType<Exactly<num>>();
+  n.remainder(n).expectStaticType<Exactly<num>>();
+
+  (n + dyn1).expectStaticType<Exactly<num>>();
+  (n - dyn1).expectStaticType<Exactly<num>>();
+  (n * dyn1).expectStaticType<Exactly<num>>();
+  (n % dyn1).expectStaticType<Exactly<num>>();
+  n.remainder(dyn1).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    (n + never).expectStaticType<Exactly<num>>();
+    (n - never).expectStaticType<Exactly<num>>();
+    (n * never).expectStaticType<Exactly<num>>();
+    (n % never).expectStaticType<Exactly<num>>();
+    n.remainder(never).expectStaticType<Exactly<num>>();
+  }
+
+  (dyn1 + d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 - d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 * d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 % d).expectStaticType<Exactly<dynamic>>();
+  dyn1.remainder(d).expectStaticType<Exactly<dynamic>>();
+
+  if (false) {
+    (never + d).expectStaticType<Exactly<Never>>();
+    (never - d).expectStaticType<Exactly<Never>>();
+    (never * d).expectStaticType<Exactly<Never>>();
+    (never % d).expectStaticType<Exactly<Never>>();
+    never.remainder(d).expectStaticType<Exactly<Never>>();
+  }
+
+  i.clamp(i, i).expectStaticType<Exactly<int>>();
+  d.clamp(d, d).expectStaticType<Exactly<double>>();
+
+  i.clamp(i, d).expectStaticType<Exactly<num>>();
+  i.clamp(d, i).expectStaticType<Exactly<num>>();
+  d.clamp(i, i).expectStaticType<Exactly<num>>();
+  i.clamp(d, d).expectStaticType<Exactly<num>>();
+  d.clamp(i, d).expectStaticType<Exactly<num>>();
+  d.clamp(d, i).expectStaticType<Exactly<num>>();
+
+  i.clamp(i, n).expectStaticType<Exactly<num>>();
+  i.clamp(n, i).expectStaticType<Exactly<num>>();
+  n.clamp(i, i).expectStaticType<Exactly<num>>();
+  d.clamp(d, n).expectStaticType<Exactly<num>>();
+  d.clamp(n, d).expectStaticType<Exactly<num>>();
+  n.clamp(d, d).expectStaticType<Exactly<num>>();
+
+  i.clamp(i, dyn1).expectStaticType<Exactly<num>>();
+  i.clamp(dyn1, i).expectStaticType<Exactly<num>>();
+  d.clamp(d, dyn1).expectStaticType<Exactly<num>>();
+  d.clamp(dyn1, d).expectStaticType<Exactly<num>>();
+  n.clamp(n, dyn1).expectStaticType<Exactly<num>>();
+  n.clamp(dyn1, n).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    i.clamp(i, never).expectStaticType<Exactly<num>>();
+    d.clamp(d, never).expectStaticType<Exactly<num>>();
+    n.clamp(n, never).expectStaticType<Exactly<num>>();
+    never.clamp(i, i).expectStaticType<Exactly<Never>>();
+  }
+
+  (i += i1).expectStaticType<Exactly<int>>();
+  (i -= i1).expectStaticType<Exactly<int>>();
+  (i *= i1).expectStaticType<Exactly<int>>();
+  (i %= i2).expectStaticType<Exactly<int>>();
+  (i++).expectStaticType<Exactly<int>>();
+  (i--).expectStaticType<Exactly<int>>();
+  (++i).expectStaticType<Exactly<int>>();
+  (--i).expectStaticType<Exactly<int>>();
+
+  (d += i1).expectStaticType<Exactly<double>>();
+  (d -= i1).expectStaticType<Exactly<double>>();
+  (d *= i1).expectStaticType<Exactly<double>>();
+  (d %= i2).expectStaticType<Exactly<double>>();
+  (d += 1.0).expectStaticType<Exactly<double>>();
+  (d -= 1.0).expectStaticType<Exactly<double>>();
+  (d *= 1.0).expectStaticType<Exactly<double>>();
+  (d %= 1.0).expectStaticType<Exactly<double>>();
+  (d += n1).expectStaticType<Exactly<double>>();
+  (d -= n1).expectStaticType<Exactly<double>>();
+  (d *= n1).expectStaticType<Exactly<double>>();
+  (d %= n2).expectStaticType<Exactly<double>>();
+  (d += dyn1).expectStaticType<Exactly<double>>();
+  (d -= dyn1).expectStaticType<Exactly<double>>();
+  (d *= dyn1).expectStaticType<Exactly<double>>();
+  (d %= dyn2).expectStaticType<Exactly<double>>();
+  (d++).expectStaticType<Exactly<double>>();
+  (d--).expectStaticType<Exactly<double>>();
+  (++d).expectStaticType<Exactly<double>>();
+  (--d).expectStaticType<Exactly<double>>();
+
+  (n += i1).expectStaticType<Exactly<num>>();
+  (n -= i1).expectStaticType<Exactly<num>>();
+  (n *= i1).expectStaticType<Exactly<num>>();
+  (n %= i2).expectStaticType<Exactly<num>>();
+  (n += 1.0).expectStaticType<Exactly<double>>();
+  (n -= 1.0).expectStaticType<Exactly<double>>();
+  (n *= 1.0).expectStaticType<Exactly<double>>();
+  (n %= 1.0).expectStaticType<Exactly<double>>();
+  (n += n1).expectStaticType<Exactly<num>>();
+  (n -= n1).expectStaticType<Exactly<num>>();
+  (n *= n1).expectStaticType<Exactly<num>>();
+  (n %= n2).expectStaticType<Exactly<num>>();
+  (n += dyn1).expectStaticType<Exactly<num>>();
+  (n -= dyn1).expectStaticType<Exactly<num>>();
+  (n *= dyn1).expectStaticType<Exactly<num>>();
+  (n %= dyn2).expectStaticType<Exactly<num>>();
+  (n++).expectStaticType<Exactly<num>>();
+  (n--).expectStaticType<Exactly<num>>();
+  (++n).expectStaticType<Exactly<num>>();
+  (--n).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    (d += never).expectStaticType<Exactly<double>>();
+    (n += never).expectStaticType<Exactly<num>>();
+  }
+}
+
+// Check the static type of operations on promoted variables.
+void testPromotedVariables(Object i, Object d, Object n) {
+  if (i is! int) throw "promote i to int";
+  if (d is! double) throw "promote d to double";
+  if (n is! num) throw "promote n to num";
+  i.expectStaticType<Exactly<int>>();
+  d.expectStaticType<Exactly<double>>();
+  n.expectStaticType<Exactly<num>>();
+
+  (i + i).expectStaticType<Exactly<int>>();
+  (i - i).expectStaticType<Exactly<int>>();
+  (i * i).expectStaticType<Exactly<int>>();
+  (i % i).expectStaticType<Exactly<int>>();
+  i.remainder(i).expectStaticType<Exactly<int>>();
+
+  (i + d).expectStaticType<Exactly<double>>();
+  (i - d).expectStaticType<Exactly<double>>();
+  (i * d).expectStaticType<Exactly<double>>();
+  (i % d).expectStaticType<Exactly<double>>();
+  i.remainder(d).expectStaticType<Exactly<double>>();
+
+  (i + n).expectStaticType<Exactly<num>>();
+  (i - n).expectStaticType<Exactly<num>>();
+  (i * n).expectStaticType<Exactly<num>>();
+  (i % n).expectStaticType<Exactly<num>>();
+  i.remainder(n).expectStaticType<Exactly<num>>();
+
+  (i + dyn1).expectStaticType<Exactly<num>>();
+  (i - dyn1).expectStaticType<Exactly<num>>();
+  (i * dyn1).expectStaticType<Exactly<num>>();
+  (i % dyn1).expectStaticType<Exactly<num>>();
+  i.remainder(dyn1).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    (i + never).expectStaticType<Exactly<num>>();
+    (i - never).expectStaticType<Exactly<num>>();
+    (i * never).expectStaticType<Exactly<num>>();
+    (i % never).expectStaticType<Exactly<num>>();
+    i.remainder(never).expectStaticType<Exactly<num>>();
+  }
+
+  (d + i).expectStaticType<Exactly<double>>();
+  (d - i).expectStaticType<Exactly<double>>();
+  (d * i).expectStaticType<Exactly<double>>();
+  (d % i).expectStaticType<Exactly<double>>();
+  d.remainder(i).expectStaticType<Exactly<double>>();
+
+  (d + d).expectStaticType<Exactly<double>>();
+  (d - d).expectStaticType<Exactly<double>>();
+  (d * d).expectStaticType<Exactly<double>>();
+  (d % d).expectStaticType<Exactly<double>>();
+  d.remainder(d).expectStaticType<Exactly<double>>();
+
+  (d + n).expectStaticType<Exactly<double>>();
+  (d - n).expectStaticType<Exactly<double>>();
+  (d * n).expectStaticType<Exactly<double>>();
+  (d % n).expectStaticType<Exactly<double>>();
+  d.remainder(n).expectStaticType<Exactly<double>>();
+
+  (d + dyn1).expectStaticType<Exactly<double>>();
+  (d - dyn1).expectStaticType<Exactly<double>>();
+  (d * dyn1).expectStaticType<Exactly<double>>();
+  (d % dyn1).expectStaticType<Exactly<double>>();
+  d.remainder(dyn1).expectStaticType<Exactly<double>>();
+
+  if (false) {
+    (d + never).expectStaticType<Exactly<double>>();
+    (d - never).expectStaticType<Exactly<double>>();
+    (d * never).expectStaticType<Exactly<double>>();
+    (d % never).expectStaticType<Exactly<double>>();
+    d.remainder(never).expectStaticType<Exactly<double>>();
+  }
+
+  (n + i).expectStaticType<Exactly<num>>();
+  (n - i).expectStaticType<Exactly<num>>();
+  (n * i).expectStaticType<Exactly<num>>();
+  (n % i).expectStaticType<Exactly<num>>();
+  n.remainder(i).expectStaticType<Exactly<num>>();
+
+  (n + d).expectStaticType<Exactly<double>>();
+  (n - d).expectStaticType<Exactly<double>>();
+  (n * d).expectStaticType<Exactly<double>>();
+  (n % d).expectStaticType<Exactly<double>>();
+  n.remainder(d).expectStaticType<Exactly<double>>();
+
+  (n + n).expectStaticType<Exactly<num>>();
+  (n - n).expectStaticType<Exactly<num>>();
+  (n * n).expectStaticType<Exactly<num>>();
+  (n % n).expectStaticType<Exactly<num>>();
+  n.remainder(n).expectStaticType<Exactly<num>>();
+
+  (n + dyn1).expectStaticType<Exactly<num>>();
+  (n - dyn1).expectStaticType<Exactly<num>>();
+  (n * dyn1).expectStaticType<Exactly<num>>();
+  (n % dyn1).expectStaticType<Exactly<num>>();
+  n.remainder(dyn1).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    (n + never).expectStaticType<Exactly<num>>();
+    (n - never).expectStaticType<Exactly<num>>();
+    (n * never).expectStaticType<Exactly<num>>();
+    (n % never).expectStaticType<Exactly<num>>();
+    n.remainder(never).expectStaticType<Exactly<num>>();
+  }
+
+  (dyn1 + d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 - d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 * d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 % d).expectStaticType<Exactly<dynamic>>();
+  dyn1.remainder(d).expectStaticType<Exactly<dynamic>>();
+
+  if (false) {
+    (never + d).expectStaticType<Exactly<Never>>();
+    (never - d).expectStaticType<Exactly<Never>>();
+    (never * d).expectStaticType<Exactly<Never>>();
+    (never % d).expectStaticType<Exactly<Never>>();
+    never.remainder(d).expectStaticType<Exactly<Never>>();
+  }
+
+  i.clamp(i, i).expectStaticType<Exactly<int>>();
+  d.clamp(d, d).expectStaticType<Exactly<double>>();
+
+  i.clamp(i, d).expectStaticType<Exactly<num>>();
+  i.clamp(d, i).expectStaticType<Exactly<num>>();
+  d.clamp(i, i).expectStaticType<Exactly<num>>();
+  i.clamp(d, d).expectStaticType<Exactly<num>>();
+  d.clamp(i, d).expectStaticType<Exactly<num>>();
+  d.clamp(d, i).expectStaticType<Exactly<num>>();
+
+  i.clamp(i, n).expectStaticType<Exactly<num>>();
+  i.clamp(n, i).expectStaticType<Exactly<num>>();
+  n.clamp(i, i).expectStaticType<Exactly<num>>();
+  d.clamp(d, n).expectStaticType<Exactly<num>>();
+  d.clamp(n, d).expectStaticType<Exactly<num>>();
+  n.clamp(d, d).expectStaticType<Exactly<num>>();
+
+  i.clamp(i, dyn1).expectStaticType<Exactly<num>>();
+  i.clamp(dyn1, i).expectStaticType<Exactly<num>>();
+  d.clamp(d, dyn1).expectStaticType<Exactly<num>>();
+  d.clamp(dyn1, d).expectStaticType<Exactly<num>>();
+  n.clamp(n, dyn1).expectStaticType<Exactly<num>>();
+  n.clamp(dyn1, n).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    i.clamp(i, never).expectStaticType<Exactly<num>>();
+    d.clamp(d, never).expectStaticType<Exactly<num>>();
+    n.clamp(n, never).expectStaticType<Exactly<num>>();
+    never.clamp(i, i).expectStaticType<Exactly<Never>>();
+  }
+
+  (i += i1).expectStaticType<Exactly<int>>();
+  (i -= i1).expectStaticType<Exactly<int>>();
+  (i *= i1).expectStaticType<Exactly<int>>();
+  (i %= i2).expectStaticType<Exactly<int>>();
+  (i++).expectStaticType<Exactly<int>>();
+  (i--).expectStaticType<Exactly<int>>();
+  (++i).expectStaticType<Exactly<int>>();
+  (--i).expectStaticType<Exactly<int>>();
+
+  (d += i1).expectStaticType<Exactly<double>>();
+  (d -= i1).expectStaticType<Exactly<double>>();
+  (d *= i1).expectStaticType<Exactly<double>>();
+  (d %= i2).expectStaticType<Exactly<double>>();
+  (d += 1.0).expectStaticType<Exactly<double>>();
+  (d -= 1.0).expectStaticType<Exactly<double>>();
+  (d *= 1.0).expectStaticType<Exactly<double>>();
+  (d %= 1.0).expectStaticType<Exactly<double>>();
+  (d += n1).expectStaticType<Exactly<double>>();
+  (d -= n1).expectStaticType<Exactly<double>>();
+  (d *= n1).expectStaticType<Exactly<double>>();
+  (d %= n2).expectStaticType<Exactly<double>>();
+  (d += dyn1).expectStaticType<Exactly<double>>();
+  (d -= dyn1).expectStaticType<Exactly<double>>();
+  (d *= dyn1).expectStaticType<Exactly<double>>();
+  (d %= dyn2).expectStaticType<Exactly<double>>();
+  (d++).expectStaticType<Exactly<double>>();
+  (d--).expectStaticType<Exactly<double>>();
+  (++d).expectStaticType<Exactly<double>>();
+  (--d).expectStaticType<Exactly<double>>();
+
+  (n += i1).expectStaticType<Exactly<num>>();
+  (n -= i1).expectStaticType<Exactly<num>>();
+  (n *= i1).expectStaticType<Exactly<num>>();
+  (n %= i2).expectStaticType<Exactly<num>>();
+  (n += 1.0).expectStaticType<Exactly<double>>();
+  (n -= 1.0).expectStaticType<Exactly<double>>();
+  (n *= 1.0).expectStaticType<Exactly<double>>();
+  (n %= 1.0).expectStaticType<Exactly<double>>();
+  (n += n1).expectStaticType<Exactly<num>>();
+  (n -= n1).expectStaticType<Exactly<num>>();
+  (n *= n1).expectStaticType<Exactly<num>>();
+  (n %= n2).expectStaticType<Exactly<num>>();
+  (n += dyn1).expectStaticType<Exactly<num>>();
+  (n -= dyn1).expectStaticType<Exactly<num>>();
+  (n *= dyn1).expectStaticType<Exactly<num>>();
+  (n %= dyn2).expectStaticType<Exactly<num>>();
+  (n++).expectStaticType<Exactly<num>>();
+  (n--).expectStaticType<Exactly<num>>();
+  (++n).expectStaticType<Exactly<num>>();
+  (--n).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    (d += never).expectStaticType<Exactly<double>>();
+    (n += never).expectStaticType<Exactly<num>>();
+  }
+}
+
+// Check the static type of operations on promoted variables.
+void testTypeVariables<I extends int, D extends double, N extends num>(
+    I i, D d, N n) {
+  int ii = i; // Actual int type.
+
+  (ii + i).expectStaticType<Exactly<int>>();
+  (ii - i).expectStaticType<Exactly<int>>();
+  (ii * i).expectStaticType<Exactly<int>>();
+  (ii % i).expectStaticType<Exactly<int>>();
+  ii.remainder(i).expectStaticType<Exactly<int>>();
+
+  (i + ii).expectStaticType<Exactly<int>>();
+  (i - ii).expectStaticType<Exactly<int>>();
+  (i * ii).expectStaticType<Exactly<int>>();
+  (i % ii).expectStaticType<Exactly<int>>();
+  i.remainder(ii).expectStaticType<Exactly<int>>();
+
+  (i + i).expectStaticType<Exactly<int>>();
+  (i - i).expectStaticType<Exactly<int>>();
+  (i * i).expectStaticType<Exactly<int>>();
+  (i % i).expectStaticType<Exactly<int>>();
+  i.remainder(i).expectStaticType<Exactly<int>>();
+
+  (i + d).expectStaticType<Exactly<double>>();
+  (i - d).expectStaticType<Exactly<double>>();
+  (i * d).expectStaticType<Exactly<double>>();
+  (i % d).expectStaticType<Exactly<double>>();
+  i.remainder(d).expectStaticType<Exactly<double>>();
+
+  (i + n).expectStaticType<Exactly<num>>();
+  (i - n).expectStaticType<Exactly<num>>();
+  (i * n).expectStaticType<Exactly<num>>();
+  (i % n).expectStaticType<Exactly<num>>();
+  i.remainder(n).expectStaticType<Exactly<num>>();
+
+  (i + dyn1).expectStaticType<Exactly<num>>();
+  (i - dyn1).expectStaticType<Exactly<num>>();
+  (i * dyn1).expectStaticType<Exactly<num>>();
+  (i % dyn1).expectStaticType<Exactly<num>>();
+  i.remainder(dyn1).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    (i + never).expectStaticType<Exactly<num>>();
+    (i - never).expectStaticType<Exactly<num>>();
+    (i * never).expectStaticType<Exactly<num>>();
+    (i % never).expectStaticType<Exactly<num>>();
+    i.remainder(never).expectStaticType<Exactly<num>>();
+  }
+
+  (d + i).expectStaticType<Exactly<double>>();
+  (d - i).expectStaticType<Exactly<double>>();
+  (d * i).expectStaticType<Exactly<double>>();
+  (d % i).expectStaticType<Exactly<double>>();
+  d.remainder(i).expectStaticType<Exactly<double>>();
+
+  double dd = d; // Actual double type.
+
+  (dd + d).expectStaticType<Exactly<double>>();
+  (dd - d).expectStaticType<Exactly<double>>();
+  (dd * d).expectStaticType<Exactly<double>>();
+  (dd % d).expectStaticType<Exactly<double>>();
+  dd.remainder(d).expectStaticType<Exactly<double>>();
+
+  (d + dd).expectStaticType<Exactly<double>>();
+  (d - dd).expectStaticType<Exactly<double>>();
+  (d * dd).expectStaticType<Exactly<double>>();
+  (d % dd).expectStaticType<Exactly<double>>();
+  d.remainder(dd).expectStaticType<Exactly<double>>();
+
+  (d + d).expectStaticType<Exactly<double>>();
+  (d - d).expectStaticType<Exactly<double>>();
+  (d * d).expectStaticType<Exactly<double>>();
+  (d % d).expectStaticType<Exactly<double>>();
+  d.remainder(d).expectStaticType<Exactly<double>>();
+
+  (d + n).expectStaticType<Exactly<double>>();
+  (d - n).expectStaticType<Exactly<double>>();
+  (d * n).expectStaticType<Exactly<double>>();
+  (d % n).expectStaticType<Exactly<double>>();
+  d.remainder(n).expectStaticType<Exactly<double>>();
+
+  (d + dyn1).expectStaticType<Exactly<double>>();
+  (d - dyn1).expectStaticType<Exactly<double>>();
+  (d * dyn1).expectStaticType<Exactly<double>>();
+  (d % dyn1).expectStaticType<Exactly<double>>();
+  d.remainder(dyn1).expectStaticType<Exactly<double>>();
+
+  if (false) {
+    (d + never).expectStaticType<Exactly<double>>();
+    (d - never).expectStaticType<Exactly<double>>();
+    (d * never).expectStaticType<Exactly<double>>();
+    (d % never).expectStaticType<Exactly<double>>();
+    d.remainder(never).expectStaticType<Exactly<double>>();
+  }
+
+  (n + i).expectStaticType<Exactly<num>>();
+  (n - i).expectStaticType<Exactly<num>>();
+  (n * i).expectStaticType<Exactly<num>>();
+  (n % i).expectStaticType<Exactly<num>>();
+  n.remainder(i).expectStaticType<Exactly<num>>();
+
+  (n + d).expectStaticType<Exactly<double>>();
+  (n - d).expectStaticType<Exactly<double>>();
+  (n * d).expectStaticType<Exactly<double>>();
+  (n % d).expectStaticType<Exactly<double>>();
+  n.remainder(d).expectStaticType<Exactly<double>>();
+
+  num nn = n; // Actual num type.
+
+  (nn + n).expectStaticType<Exactly<num>>();
+  (nn - n).expectStaticType<Exactly<num>>();
+  (nn * n).expectStaticType<Exactly<num>>();
+  (nn % n).expectStaticType<Exactly<num>>();
+  nn.remainder(n).expectStaticType<Exactly<num>>();
+
+  (n + nn).expectStaticType<Exactly<num>>();
+  (n - nn).expectStaticType<Exactly<num>>();
+  (n * nn).expectStaticType<Exactly<num>>();
+  (n % nn).expectStaticType<Exactly<num>>();
+  n.remainder(nn).expectStaticType<Exactly<num>>();
+
+  (n + n).expectStaticType<Exactly<num>>();
+  (n - n).expectStaticType<Exactly<num>>();
+  (n * n).expectStaticType<Exactly<num>>();
+  (n % n).expectStaticType<Exactly<num>>();
+  n.remainder(n).expectStaticType<Exactly<num>>();
+
+  (n + dyn1).expectStaticType<Exactly<num>>();
+  (n - dyn1).expectStaticType<Exactly<num>>();
+  (n * dyn1).expectStaticType<Exactly<num>>();
+  (n % dyn1).expectStaticType<Exactly<num>>();
+  n.remainder(dyn1).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    (n + never).expectStaticType<Exactly<num>>();
+    (n - never).expectStaticType<Exactly<num>>();
+    (n * never).expectStaticType<Exactly<num>>();
+    (n % never).expectStaticType<Exactly<num>>();
+    n.remainder(never).expectStaticType<Exactly<num>>();
+  }
+
+  (dyn1 + d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 - d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 * d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 % d).expectStaticType<Exactly<dynamic>>();
+  dyn1.remainder(d).expectStaticType<Exactly<dynamic>>();
+
+  if (false) {
+    (never + d).expectStaticType<Exactly<Never>>();
+    (never - d).expectStaticType<Exactly<Never>>();
+    (never * d).expectStaticType<Exactly<Never>>();
+    (never % d).expectStaticType<Exactly<Never>>();
+    never.remainder(d).expectStaticType<Exactly<Never>>();
+  }
+
+  i.clamp(i, i).expectStaticType<Exactly<int>>();
+  i.clamp(i, ii).expectStaticType<Exactly<int>>();
+  i.clamp(ii, i).expectStaticType<Exactly<int>>();
+  ii.clamp(i, i).expectStaticType<Exactly<int>>();
+
+  d.clamp(d, d).expectStaticType<Exactly<double>>();
+  d.clamp(d, dd).expectStaticType<Exactly<double>>();
+  d.clamp(dd, d).expectStaticType<Exactly<double>>();
+  dd.clamp(d, d).expectStaticType<Exactly<double>>();
+
+  n.clamp(n, n).expectStaticType<Exactly<num>>();
+  n.clamp(n, nn).expectStaticType<Exactly<num>>();
+  n.clamp(nn, n).expectStaticType<Exactly<num>>();
+  nn.clamp(n, n).expectStaticType<Exactly<num>>();
+
+  i.clamp(i, d).expectStaticType<Exactly<num>>();
+  i.clamp(d, i).expectStaticType<Exactly<num>>();
+  d.clamp(i, i).expectStaticType<Exactly<num>>();
+  i.clamp(d, d).expectStaticType<Exactly<num>>();
+  d.clamp(i, d).expectStaticType<Exactly<num>>();
+  d.clamp(d, i).expectStaticType<Exactly<num>>();
+
+  i.clamp(i, n).expectStaticType<Exactly<num>>();
+  i.clamp(n, i).expectStaticType<Exactly<num>>();
+  n.clamp(i, i).expectStaticType<Exactly<num>>();
+  d.clamp(d, n).expectStaticType<Exactly<num>>();
+  d.clamp(n, d).expectStaticType<Exactly<num>>();
+  n.clamp(d, d).expectStaticType<Exactly<num>>();
+
+  i.clamp(i, dyn1).expectStaticType<Exactly<num>>();
+  i.clamp(dyn1, i).expectStaticType<Exactly<num>>();
+  d.clamp(d, dyn1).expectStaticType<Exactly<num>>();
+  d.clamp(dyn1, d).expectStaticType<Exactly<num>>();
+  n.clamp(i, dyn1).expectStaticType<Exactly<num>>();
+  n.clamp(dyn1, d).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    i.clamp(i, never).expectStaticType<Exactly<num>>();
+    d.clamp(d, never).expectStaticType<Exactly<num>>();
+    n.clamp(n, never).expectStaticType<Exactly<num>>();
+    never.clamp(i, i).expectStaticType<Exactly<Never>>();
+  }
+
+  Object on = 1;
+  if (on is! N) throw "promote on to O&N";
+  var onn = on;
+  if (onn is! num) throw "promote onn O&N&num";
+
+  // With three different type variable types,
+  // still pick num.
+  n.clamp(on, onn).expectStaticType<Exactly<num>>();
+  on.clamp(n, onn).expectStaticType<Exactly<num>>();
+  onn.clamp(on, n).expectStaticType<Exactly<num>>();
+}
+
+// Check the static type of operations on promoted type variables.
+void testPromotedTypeVariables<T>(T i, T d, T n) {
+  if (i is! int) throw "promote i to T & int";
+  if (d is! double) throw "promote d to T & double";
+  if (n is! num) throw "promote n to T & num";
+  // We cannot pass intersection types to type parameters,
+  // so we need to check them in-place.
+  // We check that the value is assignable to both types,
+  // and are not dynamic (assignable to `Object`).
+  checkIntersectionType<int, T>(i, i, i);
+  checkIntersectionType<double, T>(d, d, d);
+  checkIntersectionType<num, T>(n, n, n);
+
+  int ii = i; // Actual integer type.
+
+  (ii + i).expectStaticType<Exactly<int>>();
+  (ii - i).expectStaticType<Exactly<int>>();
+  (ii * i).expectStaticType<Exactly<int>>();
+  (ii % i).expectStaticType<Exactly<int>>();
+  ii.remainder(i).expectStaticType<Exactly<int>>();
+
+  (i + i).expectStaticType<Exactly<int>>();
+  (i - i).expectStaticType<Exactly<int>>();
+  (i * i).expectStaticType<Exactly<int>>();
+  (i % i).expectStaticType<Exactly<int>>();
+  i.remainder(i).expectStaticType<Exactly<int>>();
+
+  (i + ii).expectStaticType<Exactly<int>>();
+  (i - ii).expectStaticType<Exactly<int>>();
+  (i * ii).expectStaticType<Exactly<int>>();
+  (i % ii).expectStaticType<Exactly<int>>();
+  i.remainder(ii).expectStaticType<Exactly<int>>();
+
+  (i + d).expectStaticType<Exactly<double>>();
+  (i - d).expectStaticType<Exactly<double>>();
+  (i * d).expectStaticType<Exactly<double>>();
+  (i % d).expectStaticType<Exactly<double>>();
+  i.remainder(d).expectStaticType<Exactly<double>>();
+
+  (i + n).expectStaticType<Exactly<num>>();
+  (i - n).expectStaticType<Exactly<num>>();
+  (i * n).expectStaticType<Exactly<num>>();
+  (i % n).expectStaticType<Exactly<num>>();
+  i.remainder(n).expectStaticType<Exactly<num>>();
+
+  (i + dyn1).expectStaticType<Exactly<num>>();
+  (i - dyn1).expectStaticType<Exactly<num>>();
+  (i * dyn1).expectStaticType<Exactly<num>>();
+  (i % dyn1).expectStaticType<Exactly<num>>();
+  i.remainder(dyn1).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    (i + never).expectStaticType<Exactly<num>>();
+    (i - never).expectStaticType<Exactly<num>>();
+    (i * never).expectStaticType<Exactly<num>>();
+    (i % never).expectStaticType<Exactly<num>>();
+    i.remainder(never).expectStaticType<Exactly<num>>();
+  }
+
+  (d + i).expectStaticType<Exactly<double>>();
+  (d - i).expectStaticType<Exactly<double>>();
+  (d * i).expectStaticType<Exactly<double>>();
+  (d % i).expectStaticType<Exactly<double>>();
+  d.remainder(i).expectStaticType<Exactly<double>>();
+
+  double dd = d; // Actual double type.
+
+  (dd + d).expectStaticType<Exactly<double>>();
+  (dd - d).expectStaticType<Exactly<double>>();
+  (dd * d).expectStaticType<Exactly<double>>();
+  (dd % d).expectStaticType<Exactly<double>>();
+  dd.remainder(d).expectStaticType<Exactly<double>>();
+
+  // Result type T&double;
+  (d + dd).expectStaticType<Exactly<double>>();
+  (d - dd).expectStaticType<Exactly<double>>();
+  (d * dd).expectStaticType<Exactly<double>>();
+  (d % dd).expectStaticType<Exactly<double>>();
+  d.remainder(dd).expectStaticType<Exactly<double>>();
+
+  (d + d).expectStaticType<Exactly<double>>();
+  (d - d).expectStaticType<Exactly<double>>();
+  (d * d).expectStaticType<Exactly<double>>();
+  (d % d).expectStaticType<Exactly<double>>();
+  d.remainder(d).expectStaticType<Exactly<double>>();
+
+  (d + n).expectStaticType<Exactly<double>>();
+  (d - n).expectStaticType<Exactly<double>>();
+  (d * n).expectStaticType<Exactly<double>>();
+  (d % n).expectStaticType<Exactly<double>>();
+  d.remainder(n).expectStaticType<Exactly<double>>();
+
+  (d + dyn1).expectStaticType<Exactly<double>>();
+  (d - dyn1).expectStaticType<Exactly<double>>();
+  (d * dyn1).expectStaticType<Exactly<double>>();
+  (d % dyn1).expectStaticType<Exactly<double>>();
+  d.remainder(dyn1).expectStaticType<Exactly<double>>();
+
+  if (false) {
+    d + never.expectStaticType<Exactly<double>>();
+    d - never.expectStaticType<Exactly<double>>();
+    d * never.expectStaticType<Exactly<double>>();
+    d % never.expectStaticType<Exactly<double>>();
+    d.remainder(never).expectStaticType<Exactly<double>>();
+  }
+
+  (n + i).expectStaticType<Exactly<num>>();
+  (n - i).expectStaticType<Exactly<num>>();
+  (n * i).expectStaticType<Exactly<num>>();
+  (n % i).expectStaticType<Exactly<num>>();
+  n.remainder(i).expectStaticType<Exactly<num>>();
+
+  (n + d).expectStaticType<Exactly<double>>();
+  (n - d).expectStaticType<Exactly<double>>();
+  (n * d).expectStaticType<Exactly<double>>();
+  (n % d).expectStaticType<Exactly<double>>();
+  n.remainder(d).expectStaticType<Exactly<double>>();
+
+  num nn = n; // Actual num-typed value.
+
+  (nn + n).expectStaticType<Exactly<num>>();
+  (nn - n).expectStaticType<Exactly<num>>();
+  (nn * n).expectStaticType<Exactly<num>>();
+  (nn % n).expectStaticType<Exactly<num>>();
+  nn.remainder(n).expectStaticType<Exactly<num>>();
+
+  (nn + dyn1).expectStaticType<Exactly<num>>();
+  (nn - dyn1).expectStaticType<Exactly<num>>();
+  (nn * dyn1).expectStaticType<Exactly<num>>();
+  (nn % dyn1).expectStaticType<Exactly<num>>();
+  nn.remainder(dyn1).expectStaticType<Exactly<num>>();
+
+  (n + nn).expectStaticType<Exactly<num>>();
+  (n - nn).expectStaticType<Exactly<num>>();
+  (n * nn).expectStaticType<Exactly<num>>();
+  (n % nn).expectStaticType<Exactly<num>>();
+  n.remainder(nn).expectStaticType<Exactly<num>>();
+
+  (n + n).expectStaticType<Exactly<num>>();
+  (n - n).expectStaticType<Exactly<num>>();
+  (n * n).expectStaticType<Exactly<num>>();
+  (n % n).expectStaticType<Exactly<num>>();
+  n.remainder(n).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    (n + never).expectStaticType<Exactly<num>>();
+    (n - never).expectStaticType<Exactly<num>>();
+    (n * never).expectStaticType<Exactly<num>>();
+    (n % never).expectStaticType<Exactly<num>>();
+    n.remainder(never).expectStaticType<Exactly<num>>();
+  }
+
+  (dyn1 + d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 - d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 * d).expectStaticType<Exactly<dynamic>>();
+  (dyn1 % d).expectStaticType<Exactly<dynamic>>();
+  dyn1.remainder(d).expectStaticType<Exactly<dynamic>>();
+
+  if (false) {
+    (never + d).expectStaticType<Exactly<Never>>();
+    (never - d).expectStaticType<Exactly<Never>>();
+    (never * d).expectStaticType<Exactly<Never>>();
+    (never % d).expectStaticType<Exactly<Never>>();
+    never.remainder(d).expectStaticType<Exactly<Never>>();
+  }
+
+  i.clamp(i, i).expectStaticType<Exactly<int>>();
+  i.clamp(i, ii).expectStaticType<Exactly<int>>();
+  i.clamp(ii, i).expectStaticType<Exactly<int>>();
+  ii.clamp(i, i).expectStaticType<Exactly<int>>();
+
+  d.clamp(d, d).expectStaticType<Exactly<double>>();
+  d.clamp(d, dd).expectStaticType<Exactly<double>>();
+  d.clamp(dd, d).expectStaticType<Exactly<double>>();
+  dd.clamp(d, d).expectStaticType<Exactly<double>>();
+
+  n.clamp(n, n).expectStaticType<Exactly<num>>();
+  n.clamp(n, nn).expectStaticType<Exactly<num>>();
+  n.clamp(nn, n).expectStaticType<Exactly<num>>();
+  nn.clamp(n, n).expectStaticType<Exactly<num>>();
+
+  i.clamp(i, d).expectStaticType<Exactly<num>>();
+  i.clamp(d, i).expectStaticType<Exactly<num>>();
+  d.clamp(i, i).expectStaticType<Exactly<num>>();
+  i.clamp(d, d).expectStaticType<Exactly<num>>();
+  d.clamp(i, d).expectStaticType<Exactly<num>>();
+  d.clamp(d, i).expectStaticType<Exactly<num>>();
+
+  i.clamp(i, dyn1).expectStaticType<Exactly<num>>();
+  i.clamp(dyn1, i).expectStaticType<Exactly<num>>();
+  d.clamp(d, dyn1).expectStaticType<Exactly<num>>();
+  d.clamp(dyn1, d).expectStaticType<Exactly<num>>();
+  n.clamp(n, dyn1).expectStaticType<Exactly<num>>();
+  n.clamp(dyn1, n).expectStaticType<Exactly<num>>();
+
+  // The type T&num is a supertype of T&int/T&double, so it is the result type.
+  i.clamp(i, n).expectStaticType<Exactly<num>>();
+  i.clamp(n, i).expectStaticType<Exactly<num>>();
+  n.clamp(i, i).expectStaticType<Exactly<num>>();
+  d.clamp(d, n).expectStaticType<Exactly<num>>();
+  d.clamp(n, d).expectStaticType<Exactly<num>>();
+  n.clamp(d, d).expectStaticType<Exactly<num>>();
+  i.clamp(d, n).expectStaticType<Exactly<num>>();
+  d.clamp(i, n).expectStaticType<Exactly<num>>();
+  n.clamp(i, d).expectStaticType<Exactly<num>>();
+
+  if (false) {
+    i.clamp(i, never).expectStaticType<Exactly<num>>();
+    d.clamp(d, never).expectStaticType<Exactly<num>>();
+    n.clamp(n, never).expectStaticType<Exactly<num>>();
+    never.clamp(i, i).expectStaticType<Exactly<Never>>();
+  }
+}
+
+/// Perform constant operations and check that they are still valid.
+class TestConst<I extends int, D extends double, N extends num> {
+  static const dynamic dyn = 1;
+  final int int1;
+  final int int2;
+  final int int3;
+  final int int4;
+  final double dbl1;
+  final double dbl2;
+  final double dbl3;
+  final double dbl4;
+  final double dbl5;
+  final double dbl6;
+  final double dbl7;
+  final double dbl8;
+  final double dbl9;
+  final double dbl10;
+  final num num1;
+  final num num2;
+  final num num3;
+  final num num4;
+  final num num5;
+  const TestConst(I i, D d, N n)
+      : int1 = 1 + i,
+        int2 = i + 1,
+        int3 = i + 1,
+        int4 = i + i,
+        dbl1 = 1.0 + i,
+        dbl2 = 1.0 + d,
+        dbl3 = 1.0 + n,
+        dbl4 = 1.0 + dyn,
+        dbl5 = 1 + 1, // Checking context type of "double = int + _".
+        dbl6 = n + 1, // Checking context type of "double = num + _".
+        dbl7 = d + i,
+        dbl8 = d + d,
+        dbl9 = d + n,
+        dbl10 = d + dyn,
+        num1 = i + n,
+        num2 = n + d,
+        num3 = n + n,
+        num4 = n + i,
+        num5 = n + dyn;
+}
diff --git a/tests/language/operator/static_type_helper.dart b/tests/language/operator/static_type_helper.dart
new file mode 100644
index 0000000..50cdace
--- /dev/null
+++ b/tests/language/operator/static_type_helper.dart
@@ -0,0 +1,70 @@
+// 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.
+
+// Ensures a context type of [T] for the operand.
+void context<T>(T x) {}
+
+/// Captures the context type of the call and returns the same type.
+///
+/// Can be used to check the context type as:
+/// ```dart
+/// int x = contextType(1 /* valid value */)..expectStaticType<Exactly<int>>;
+/// ```
+T contextType<T>(Object result) => result as T;
+
+extension StaticType<T> on T {
+  /// Check the static type.
+  ///
+  /// Use as follows (assuming `e` has static type `num`):
+  /// ```dart
+  ///   e.expectStaticType<Exactly<num>>()  // No context type.
+  ///   e.expectStaticType<SubtypeOf<Object>>()  // No context type.
+  ///   e.expectStaticType<SupertypeOf<int>>()  // No context type.
+  /// ```
+  /// or
+  /// ```dart
+  ///   e..expectStaticType<Exactly<num>>()  // Preserve context type.
+  ///   e..expectStaticType<SubtypeOf<Object>>()  // Preserve context type.
+  ///   e..expectStaticType<SupertypeOf<int>>()  // Preserve context type.
+  /// ```
+  /// This will be a *compile-time error* if the static type is not
+  /// as required by the constraints type (the one passed to [Exactly],
+  /// [SubtypeOf] or [SupertypeOf].)
+  T expectStaticType<R extends Exactly<T>>() {
+    return this;
+  }
+}
+
+/// Use with [StaticType.expectStaticType] to expect precisely the type [T].
+///
+/// Example use:
+/// ```dart
+/// "abc".expectStaticType<Exactly<String>>();
+/// ```
+typedef Exactly<T> = T Function(T);
+
+/// Use with [StaticType.expectStaticType] to expect a subtype of [T].
+///
+/// Example use:
+/// ```dart
+/// num x = 1;
+/// x.expectStaticType<SubtypeOf<Object>>();
+/// ```
+typedef SubtypeOf<T> = Never Function(T);
+
+/// Use with [StaticType.expectStaticType] to expect a supertype of [T].
+///
+/// Example use:
+/// ```dart
+/// num x = 1;
+/// x.expectStaticType<SupertypeOf<int>>();
+/// ```
+typedef SupertypeOf<T> = T Function(Object?);
+
+/// Checks that an expression is assignable to [T1], [T2] and [Object].
+///
+/// This ensures that the type of the expression is a non-`dynamic`
+/// type assignable to both [T1] and [T2], and if those are unrelated,
+/// it must be an intersection type.
+void checkIntersectionType<T1, T2>(T1 v1, T2 v2, Object v3) {}
diff --git a/tests/language/optimize/inferrer_constructor5_test.dart b/tests/language/optimize/inferrer_constructor5_test.dart
index 7221fea..186b3c9 100644
--- a/tests/language/optimize/inferrer_constructor5_test.dart
+++ b/tests/language/optimize/inferrer_constructor5_test.dart
@@ -8,7 +8,7 @@
   A() {
     print(field + 42);
     //    ^^^^^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'field' isn't defined for the class 'A'.
   }
 }
diff --git a/tests/language/override/inheritance_abstract_test.dart b/tests/language/override/inheritance_abstract_test.dart
index 9218fab..5808673 100644
--- a/tests/language/override/inheritance_abstract_test.dart
+++ b/tests/language/override/inheritance_abstract_test.dart
@@ -46,18 +46,18 @@
 
 class Class extends A implements I, J {
 //    ^^^^^
-// [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
 // [cfe] The non-abstract class 'Class' is missing implementations for these members:
   method1() {}
   method2();
 //^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   get getter3;
 //^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   set setter4(_);
 //^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   method5() {}
   method6([a]) {}
   set field13(_) {}
diff --git a/tests/language/override/method_with_field_test.dart b/tests/language/override/method_with_field_test.dart
index edd17fd..7d31ba2 100644
--- a/tests/language/override/method_with_field_test.dart
+++ b/tests/language/override/method_with_field_test.dart
@@ -31,7 +31,7 @@
   Expect.equals(42, s.superInstanceMethod());
   Expect.equals(42, sup.superInstanceMethod());
   //                    ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'superInstanceMethod' isn't defined for the class 'Super'.
   Expect.equals(42, sub.superInstanceMethod());
 }
diff --git a/tests/language/parameter/named_type_test.dart b/tests/language/parameter/named_type_test.dart
index f246025..8ae1f6c 100644
--- a/tests/language/parameter/named_type_test.dart
+++ b/tests/language/parameter/named_type_test.dart
@@ -23,14 +23,14 @@
   acceptFunNumOptBool(funNumOptBool);
   acceptFunNumOptBool(funNum);
   //                  ^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'void Function(num)' can't be assigned to the parameter type 'void Function(num, {bool b})'.
   acceptFunNumOptBool(funNumBool);
   //                  ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'void Function(num, bool)' can't be assigned to the parameter type 'void Function(num, {bool b})'.
   acceptFunNumOptBool(funNumOptBoolX);
   //                  ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'void Function(num, {bool x})' can't be assigned to the parameter type 'void Function(num, {bool b})'.
 }
diff --git a/tests/language/parameter/positional_type_test.dart b/tests/language/parameter/positional_type_test.dart
index 5920e68..d43cd41 100644
--- a/tests/language/parameter/positional_type_test.dart
+++ b/tests/language/parameter/positional_type_test.dart
@@ -20,10 +20,10 @@
   acceptFunNumOptBool(funNumOptBoolX);
   acceptFunNumOptBool(funNum);
   //                  ^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'void Function(num)' can't be assigned to the parameter type 'void Function(num, [bool])'.
   acceptFunNumOptBool(funNumBool);
   //                  ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'void Function(num, bool)' can't be assigned to the parameter type 'void Function(num, [bool])'.
 }
diff --git a/tests/language/prefix/import_collision_test.dart b/tests/language/prefix/import_collision_test.dart
index 6ad50cb..0f561f8 100644
--- a/tests/language/prefix/import_collision_test.dart
+++ b/tests/language/prefix/import_collision_test.dart
@@ -11,6 +11,6 @@
 main() {
   lib2.foo = 1;
   //   ^^^
-  // [analyzer] STATIC_WARNING.AMBIGUOUS_IMPORT
+  // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_IMPORT
   // [cfe] Setter not found: 'foo'.
 }
diff --git a/tests/language/prefix/shadow_test.dart b/tests/language/prefix/shadow_test.dart
index 4a5bdc2..1af4c58 100644
--- a/tests/language/prefix/shadow_test.dart
+++ b/tests/language/prefix/shadow_test.dart
@@ -11,6 +11,8 @@
 class P<T> {
   test() {
     new T.Library10(10);
+    //  ^
+    // [analyzer] COMPILE_TIME_ERROR.PREFIX_SHADOWED_BY_LOCAL_DECLARATION
     //    ^
     // [cfe] Method not found: 'T.Library10'.
   }
@@ -25,7 +27,7 @@
     var result = 0;
     result = lib10.Library10.static_fld;
     //             ^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'Library10' isn't defined for the class 'int'.
     Expect.equals(4, result);
   }
diff --git a/tests/language/prefix/transitive_import_prefix_test.dart b/tests/language/prefix/transitive_import_prefix_test.dart
index 34c3020..3365f2f 100644
--- a/tests/language/prefix/transitive_import_prefix_test.dart
+++ b/tests/language/prefix/transitive_import_prefix_test.dart
@@ -7,14 +7,14 @@
   // Library prefixes in the imported libraries should not be visible here.
   new lib11.Library11(1);
   //  ^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'lib11.Library11'.
   lib11.Library11.static_func();
 //^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'lib11'.
   lib11.Library11.static_fld;
 //^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'lib11'.
 }
diff --git a/tests/language/prefix/transitive_import_test.dart b/tests/language/prefix/transitive_import_test.dart
index 256894c..ef53584 100644
--- a/tests/language/prefix/transitive_import_test.dart
+++ b/tests/language/prefix/transitive_import_test.dart
@@ -10,12 +10,12 @@
   // Class should not be visible.
   new lib12.Library11(1);
   //        ^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'Library11'.
 
   // Variable should not be visible.
   lib12.top_level11;
   //    ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_PREFIXED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_PREFIXED_NAME
   // [cfe] Getter not found: 'top_level11'.
 }
diff --git a/tests/language/private/access_test.dart b/tests/language/private/access_test.dart
index 016e4dc..6e10558 100644
--- a/tests/language/private/access_test.dart
+++ b/tests/language/private/access_test.dart
@@ -10,28 +10,28 @@
 main() {
   _function();
 //^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
 // [cfe] Method not found: '_function'.
   private._function();
 //^
 // [cfe] Method not found: '_function'.
 //        ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
   new _Class();
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: '_Class'.
   private._Class();
 //^
 // [cfe] Method not found: '_Class'.
 //        ^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
   new Class._constructor();
   //        ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'Class._constructor'.
   new private.Class._constructor();
   //                ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'Class._constructor'.
 }
diff --git a/tests/language/private/member1_test.dart b/tests/language/private/member1_test.dart
index a542e48..415bd25 100644
--- a/tests/language/private/member1_test.dart
+++ b/tests/language/private/member1_test.dart
@@ -10,7 +10,7 @@
   test() {
     _instanceField = true;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] The setter '_instanceField' isn't defined for the class 'Test'.
   }
 }
diff --git a/tests/language/private/member2_test.dart b/tests/language/private/member2_test.dart
index 7c86d12..6851ad7 100644
--- a/tests/language/private/member2_test.dart
+++ b/tests/language/private/member2_test.dart
@@ -10,7 +10,7 @@
   test() {
     _staticField = true;
 //  ^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] The setter '_staticField' isn't defined for the class 'Test'.
   }
 }
diff --git a/tests/language/private/member3_test.dart b/tests/language/private/member3_test.dart
index eba3211..557a9e6 100644
--- a/tests/language/private/member3_test.dart
+++ b/tests/language/private/member3_test.dart
@@ -10,7 +10,7 @@
   test() {
     _fun();
 //  ^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
 // [cfe] The method '_fun' isn't defined for the class 'Test'.
   }
 }
diff --git a/tests/language/redirecting/factory_default_values_test.dart b/tests/language/redirecting/factory_default_values_test.dart
index 0b24876..84a7d17 100644
--- a/tests/language/redirecting/factory_default_values_test.dart
+++ b/tests/language/redirecting/factory_default_values_test.dart
@@ -20,7 +20,7 @@
   //                         ^
   // [cfe] Can't have a default value here because any default values of 'A' would be used instead.
   //                               ^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_FUNCTION_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_FUNCTION_TYPE
   // [cfe] The constructor function type 'A Function(int, [int])' isn't a subtype of 'A Function(int, {int b})'.
 
   int a;
diff --git a/tests/language/redirecting/factory_incompatible_signature_test.dart b/tests/language/redirecting/factory_incompatible_signature_test.dart
index 7a77f18..7c0253a 100644
--- a/tests/language/redirecting/factory_incompatible_signature_test.dart
+++ b/tests/language/redirecting/factory_incompatible_signature_test.dart
@@ -11,7 +11,7 @@
   A(a, b);
   factory A.f() = A;
   //              ^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_FUNCTION_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_FUNCTION_TYPE
   // [cfe] The constructor function type 'A Function(dynamic, dynamic)' isn't a subtype of 'A Function()'.
 }
 
diff --git a/tests/language/regress/regress11724_test.dart b/tests/language/regress/regress11724_test.dart
index ddf3925..a408da1 100644
--- a/tests/language/regress/regress11724_test.dart
+++ b/tests/language/regress/regress11724_test.dart
@@ -7,6 +7,6 @@
 void main() {
   method(<int>[]);
 //^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
 // [cfe] Method not found: 'method'.
 }
diff --git a/tests/language/regress/regress1363_test.dart b/tests/language/regress/regress1363_test.dart
index a6cab7b..812e571 100644
--- a/tests/language/regress/regress1363_test.dart
+++ b/tests/language/regress/regress1363_test.dart
@@ -24,7 +24,7 @@
     C contents = myCup.getContents(); // expect no warning or error
     contents = libCup.getContents();
     //         ^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                ^
     // [cfe] A value of type 'C/*1*/' can't be assigned to a variable of type 'C/*2*/'.
   }
diff --git a/tests/language/regress/regress15606_test.dart b/tests/language/regress/regress15606_test.dart
index 3891202..f367e9e 100644
--- a/tests/language/regress/regress15606_test.dart
+++ b/tests/language/regress/regress15606_test.dart
@@ -15,7 +15,7 @@
     var foo =
       Unresolved.
 //    ^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'Unresolved'.
         bar(
       // Make dart2js generate a call to setRuntimeTypeInfo.
diff --git a/tests/language/regress/regress18628_1_test.dart b/tests/language/regress/regress18628_1_test.dart
index 3f2bef3..214f9aa 100644
--- a/tests/language/regress/regress18628_1_test.dart
+++ b/tests/language/regress/regress18628_1_test.dart
@@ -13,7 +13,7 @@
   // line just doesn't make sense without this line.
   T t = int;
   //    ^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'Type' can't be assigned to a variable of type 'T'.
 }
 
diff --git a/tests/language/regress/regress21793_test.dart b/tests/language/regress/regress21793_test.dart
index 26d9ff6d..e4fec2e 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A'.
 }
diff --git a/tests/language/regress/regress21912_test.dart b/tests/language/regress/regress21912_test.dart
index 6ba343ca5..7d261d3 100644
--- a/tests/language/regress/regress21912_test.dart
+++ b/tests/language/regress/regress21912_test.dart
@@ -19,11 +19,11 @@
       Function2<Function2<int, double>, Function2<int, double>> left) {
     left = t1;
     //     ^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     // [cfe] A value of type 'A Function(B) Function(B Function(A))' can't be assigned to a variable of type 'double Function(int) Function(double Function(int))'.
     left = t2;
     //     ^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     // [cfe] A value of type 'A Function(B) Function(B Function(A))' can't be assigned to a variable of type 'double Function(int) Function(double Function(int))'.
   }
 }
diff --git a/tests/language/regress/regress22976_test.dart b/tests/language/regress/regress22976_test.dart
index 63180f8..de83e9b 100644
--- a/tests/language/regress/regress22976_test.dart
+++ b/tests/language/regress/regress22976_test.dart
@@ -20,7 +20,7 @@
   A<int> a0 = c1;
   A<int> a1 = c2;
   //          ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //          ^
   // [cfe] A value of type 'C<String, int>' can't be assigned to a variable of type 'A<int>'.
 }
diff --git a/tests/language/regress/regress23408a_test.dart b/tests/language/regress/regress23408a_test.dart
index b8fd7a4..453d161 100644
--- a/tests/language/regress/regress23408a_test.dart
+++ b/tests/language/regress/regress23408a_test.dart
@@ -16,7 +16,7 @@
   C();
   factory C.l() = A<lib.K>;
   //                ^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_ANNOTATION_DEFERRED_CLASS
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ANNOTATION_DEFERRED_CLASS
   // [cfe] unspecified
   get t => null;
 }
diff --git a/tests/language/regress/regress31436_test.dart b/tests/language/regress/regress31436_test.dart
index 84abe5c..08c9a0f 100644
--- a/tests/language/regress/regress31436_test.dart
+++ b/tests/language/regress/regress31436_test.dart
@@ -9,15 +9,15 @@
   g = () {
     return [3];
   };
-  assert(g is List<Object> Function());
-  assert(g is! List<int> Function());
+  Expect.isTrue(g is List<Object> Function());
+  Expect.isFalse(g is List<int> Function());
   g().add("hello"); // No runtime error
   List<int> l = [3];
   g = () {
     return l;
   };
-  assert(g is List<Object> Function());
-  assert(g is List<int> Function());
+  Expect.isTrue(g is List<Object> Function());
+  Expect.isTrue(g is List<int> Function());
   Expect.throwsTypeError(() {
     g().add("hello"); // runtime error
   });
@@ -25,9 +25,9 @@
   g = () {
     return o;
   }; // No implicit downcast on the assignment, implicit downcast on the return
-  assert(g is List<Object> Function());
-  assert(g is! List<int> Function());
-  assert(g is Object Function());
+  Expect.isTrue(g is List<Object> Function());
+  Expect.isFalse(g is List<int> Function());
+  Expect.isTrue(g is Object Function());
   g(); // No runtime error;
   o = 3;
   Expect.throwsTypeError(() {
@@ -38,22 +38,22 @@
 void arrow_test() {
   List<Object> Function() g;
   g = () => [3];
-  assert(g is List<Object> Function());
-  assert(g is! List<int> Function());
+  Expect.isTrue(g is List<Object> Function());
+  Expect.isFalse(g is List<int> Function());
   g().add("hello"); // No runtime error
   List<int> l = [3];
   g = () => l;
-  assert(g is List<Object> Function());
-  assert(g is List<int> Function());
+  Expect.isTrue(g is List<Object> Function());
+  Expect.isTrue(g is List<int> Function());
   Expect.throwsTypeError(() {
     g().add("hello"); // runtime error
   });
   dynamic o = l;
   g = () =>
       o; // No implicit downcast on the assignment, implicit downcast on the return
-  assert(g is List<Object> Function());
-  assert(g is! List<int> Function());
-  assert(g is Object Function());
+  Expect.isTrue(g is List<Object> Function());
+  Expect.isFalse(g is List<int> Function());
+  Expect.isTrue(g is Object Function());
   g(); // No runtime error;
   o = 3;
   Expect.throwsTypeError(() {
diff --git a/tests/language/regress/regress31596_super_test.dart b/tests/language/regress/regress31596_super_test.dart
index 636ef98..75a8105 100644
--- a/tests/language/regress/regress31596_super_test.dart
+++ b/tests/language/regress/regress31596_super_test.dart
@@ -39,7 +39,7 @@
     // not ok since B2 is not assignable to B
     super.f(b2);
     //      ^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'B2?' can't be assigned to the parameter type 'B?'.
 
     var superF = super.f; // Inferred static type: void Function(B)
@@ -50,7 +50,7 @@
     // not ok since B2 is not assignable to B
     superF(b2);
     //     ^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'B2?' can't be assigned to the parameter type 'B?'.
 
     // Should pass since superF's runtime type is void Function(Object)
diff --git a/tests/language/regress/regress31596_test.dart b/tests/language/regress/regress31596_test.dart
index 44b8c8c..e7b9ee0 100644
--- a/tests/language/regress/regress31596_test.dart
+++ b/tests/language/regress/regress31596_test.dart
@@ -36,7 +36,7 @@
   B2? b2 = null;
   d.f(b2, b);
   //  ^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'B2?' can't be assigned to the parameter type 'B?'.
   i.f(b2, b); // Ok since B2 assignable to A
   void Function(Object, B) g = d.f as dynamic; // Ok; D.f reified as (Object, B) -> void
diff --git a/tests/language/regress/regress33479_test.dart b/tests/language/regress/regress33479_test.dart
index 0ede9fb..f1e8336 100644
--- a/tests/language/regress/regress33479_test.dart
+++ b/tests/language/regress/regress33479_test.dart
@@ -19,7 +19,7 @@
 //     ^
 // [cfe] A generic function type can't be used as a type argument.
 //            ^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 //                ^^^^
 // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
 // [cfe] Generic function type 'void Function<TypeY>()' inferred as a type argument.
diff --git a/tests/language/regress/regress34488_test.dart b/tests/language/regress/regress34488_test.dart
index ca3ac7b..d41f9407 100644
--- a/tests/language/regress/regress34488_test.dart
+++ b/tests/language/regress/regress34488_test.dart
@@ -25,27 +25,27 @@
   var d = new Derived();
   d.f('bad');
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
   d.g('bad');
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
   d.h(i: 'bad');
   //  ^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   //     ^
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
   Object x = d.f(1);
   //           ^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
   Object y = d.g(1);
   //           ^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
   Object z = d.h(i: 1);
   //           ^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 }
diff --git a/tests/language/regress/regress34489_test.dart b/tests/language/regress/regress34489_test.dart
index a29cab8..7fba3cb 100644
--- a/tests/language/regress/regress34489_test.dart
+++ b/tests/language/regress/regress34489_test.dart
@@ -9,6 +9,6 @@
 main() {
   new C().field = 'bad';
   //              ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'Type'.
 }
diff --git a/tests/language/regress/regress34495_test.dart b/tests/language/regress/regress34495_test.dart
index f33f4c5..2e69b38 100644
--- a/tests/language/regress/regress34495_test.dart
+++ b/tests/language/regress/regress34495_test.dart
@@ -4,10 +4,10 @@
 
 final foo = A<B>.foo();
 //          ^
-// [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
 // [cfe] Method not found: 'A'.
 //            ^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'B' isn't a type.
 
 main() {}
diff --git a/tests/language/regress/regress35043_test.dart b/tests/language/regress/regress35043_test.dart
index 884f707..d8c1b75 100644
--- a/tests/language/regress/regress35043_test.dart
+++ b/tests/language/regress/regress35043_test.dart
@@ -4,7 +4,7 @@
 
 final foo = Map<int>();
 //          ^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 2 type arguments.
 
 main() {}
diff --git a/tests/language/regress/regress35258_test.dart b/tests/language/regress/regress35258_test.dart
index f28bada..d36f45f 100644
--- a/tests/language/regress/regress35258_test.dart
+++ b/tests/language/regress/regress35258_test.dart
@@ -17,7 +17,7 @@
 
   C() {}
 //^
-// [analyzer] STATIC_WARNING.FINAL_NOT_INITIALIZED_CONSTRUCTOR
+// [analyzer] COMPILE_TIME_ERROR.FINAL_NOT_INITIALIZED_CONSTRUCTOR
   C(this.d) {}
 //^
 // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_CONSTRUCTOR
diff --git a/tests/language/regress/regress42954_test.dart b/tests/language/regress/regress42954_test.dart
new file mode 100644
index 0000000..93c5d2b
--- /dev/null
+++ b/tests/language/regress/regress42954_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.
+
+import "package:expect/expect.dart";
+
+class A<T> {
+  Type get type => T;
+}
+
+class B extends A<B> {}
+
+void main() {
+  var first = B;
+  var second = B().type;
+
+  Expect.equals(first, second);
+  Expect.equals(second, first);
+  Expect.equals(first.hashCode, second.hashCode);
+}
diff --git a/tests/language/rewrite/implicit_this_test.dart b/tests/language/rewrite/implicit_this_test.dart
index e0e4c41..28adbcf 100644
--- a/tests/language/rewrite/implicit_this_test.dart
+++ b/tests/language/rewrite/implicit_this_test.dart
@@ -12,7 +12,7 @@
   easy(z) {
         return x + y + z;
         //         ^
-        // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -20,7 +20,7 @@
   shadow_y_parameter(y) {
         return x + this.y + y;
         //              ^
-        // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -28,7 +28,7 @@
     var y = z;
         return x + this.y + y;
         //              ^
-        // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -37,7 +37,7 @@
     foo() {
             return x + this.y + y;
             //              ^
-            // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
     return foo();
@@ -47,7 +47,7 @@
     foo(y) {
             return x + this.y + y;
             //              ^
-            // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
     return foo(z);
@@ -58,7 +58,7 @@
       var y = z;
             return x + this.y + y;
             //              ^
-            // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
 
@@ -69,7 +69,7 @@
   shadow_x_parameter(x) {
         return this.x + y + x;
         //              ^
-        // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -77,7 +77,7 @@
     var x = z;
         return this.x + y + x;
         //              ^
-        // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -86,7 +86,7 @@
     foo() {
             return this.x + y + x;
             //              ^
-            // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
     return foo();
@@ -96,7 +96,7 @@
     foo(x) {
             return this.x + y + x;
             //              ^
-            // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
     return foo(z);
@@ -107,7 +107,7 @@
       var x = z;
             return this.x + y + x;
             //              ^
-            // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
 
@@ -117,10 +117,10 @@
   shadow_x_toplevel() {
         return x + this.y + toplevel + this.toplevel;
         //              ^
-        // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
         //                                  ^^^^^^^^
-        // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
         // [cfe] The getter 'toplevel' isn't defined for the class 'Foo'.
   }
 }
diff --git a/tests/language/setter/declaration_test.dart b/tests/language/setter/declaration_test.dart
index cc5e6a7..617fc2c 100644
--- a/tests/language/setter/declaration_test.dart
+++ b/tests/language/setter/declaration_test.dart
@@ -2,7 +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.
 
-/// Test that a setter has a single argument.
+// Test that a setter has a single argument.
+
+import 'dart:async';
 
 set tooFew() {}
 //  ^^^^^^
@@ -16,7 +18,153 @@
 //         ^
 // [cfe] A setter should have exactly one formal parameter.
 
+/*space*/ int? set wrongReturnType1(_) => 1;
+//        ^^^^
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+// [cfe] unspecified
+
+/*space*/ FutureOr<void> set wrongReturnType2(_) {}
+//        ^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+// [cfe] unspecified
+
+/*space*/ Never set wrongReturnType3(_) => throw 1;
+//        ^^^^^
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+// [cfe] unspecified
+
+int get nonSubtypes1 => 1;
+//      ^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+// [cfe] unspecified
+set nonSubtypes1(String _) {}
+
+int? get nonSubtypes2 => 1;
+//       ^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+// [cfe] unspecified
+set nonSubtypes2(int _) {}
+
+FutureOr<int> get nonSubtypes3 => 1;
+//                ^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+// [cfe] unspecified
+set nonSubtypes3(int _) {}
+
+dynamic get nonSubtypes4 => 1;
+//          ^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+// [cfe] unspecified
+set nonSubtypes4(int _) {}
+
+class C {
+  static int? set staticWrongReturnType1(_) => 1;
+  //     ^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  static FutureOr<void> set staticWrongReturnType2(_) {}
+  //     ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  static Never set staticWrongReturnType3(_) => throw 1;
+  //     ^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  /*space*/ int? set wrongReturnType1(_) => 1;
+  //        ^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  /*space*/ FutureOr<void> set wrongReturnType2(_) {}
+  //        ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  /*space*/ Never set wrongReturnType3(_) => throw 1;
+  //        ^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  static int get staticNonSubtypes1 => 1;
+  //             ^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [cfe] unspecified
+  static set staticNonSubtypes1(String _) {}
+
+  static int? get staticNonSubtypes2 => 1;
+  //              ^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [cfe] unspecified
+  static set staticNonSubtypes2(int _) {}
+
+  static FutureOr<int> get staticNonSubtypes3 => 1;
+  //                       ^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [cfe] unspecified
+  static set staticNonSubtypes3(int _) {}
+
+  static dynamic get staticNonSubtypes4 => 1;
+  //                 ^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [cfe] unspecified
+  static set staticNonSubtypes4(int _) {}
+
+  int get nonSubtypes1 => 1;
+  //      ^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [cfe] unspecified
+  set nonSubtypes1(String _) {}
+
+  int? get nonSubtypes2 => 1;
+  //       ^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [cfe] unspecified
+  set nonSubtypes2(int _) {}
+
+  FutureOr<int> get nonSubtypes3 => 1;
+  //                ^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [cfe] unspecified
+  set nonSubtypes3(int _) {}
+
+  dynamic get nonSubtypes4 => 1;
+  //          ^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
+  // [cfe] unspecified
+  set nonSubtypes4(int _) {}
+}
+
 main() {
   tooFew = 1;
-  tooMany = 2;
+  tooMany = 1;
+  wrongReturnType1 = 1;
+  wrongReturnType2 = 1;
+  wrongReturnType3 = 1;
+  C.staticWrongReturnType1 = 1;
+  C.staticWrongReturnType2 = 1;
+  C.staticWrongReturnType3 = 1;
+  C().wrongReturnType1 = 1;
+  C().wrongReturnType2 = 1;
+  C().wrongReturnType3 = 1;
+  var x1 = C.staticNonSubtypes1;
+  C.staticNonSubtypes1 = '' as dynamic;
+  var x2 = C.staticNonSubtypes2;
+  C.staticNonSubtypes2 = 1 as dynamic;
+  var x3 = C.staticNonSubtypes3;
+  C.staticNonSubtypes3 = 1 as dynamic;
+  var y1 = nonSubtypes1;
+  nonSubtypes1 = '' as dynamic;
+  var y2 = nonSubtypes2;
+  nonSubtypes2 = 1 as dynamic;
+  var y3 = nonSubtypes3;
+  nonSubtypes3 = 1 as dynamic;
+  var z1 = C().nonSubtypes1;
+  C().nonSubtypes1 = '' as dynamic;
+  var z2 = C().nonSubtypes2;
+  C().nonSubtypes2 = 1 as dynamic;
+  var z3 = C().nonSubtypes3;
+  C().nonSubtypes3 = 1 as dynamic;
 }
diff --git a/tests/language/setter/no_getter_call_test.dart b/tests/language/setter/no_getter_call_test.dart
index 77b06dc..a49d8e4 100644
--- a/tests/language/setter/no_getter_call_test.dart
+++ b/tests/language/setter/no_getter_call_test.dart
@@ -23,7 +23,7 @@
 
   x = topLevel(3);
   //  ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
   // [cfe] Getter not found: 'topLevel'.
   Expect.equals(6, x);
 }
diff --git a/tests/language/setter/no_getter_test.dart b/tests/language/setter/no_getter_test.dart
index f2ea3e3..53c8b58 100644
--- a/tests/language/setter/no_getter_test.dart
+++ b/tests/language/setter/no_getter_test.dart
@@ -17,6 +17,6 @@
   Example ex = new Example();
   print(ex.foo++);
   //       ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'foo' isn't defined for the class 'Example'.
 }
diff --git a/tests/language/setter/setter3_test.dart b/tests/language/setter/setter3_test.dart
index bd71750..3dedec6 100644
--- a/tests/language/setter/setter3_test.dart
+++ b/tests/language/setter/setter3_test.dart
@@ -11,10 +11,10 @@
   void set bar(x) {}
   dynamic set baz(x) {}
 //^^^^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
   bool set bob(x) {}
 //^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 //         ^^^
 // [analyzer] COMPILE_TIME_ERROR.BODY_MIGHT_COMPLETE_NORMALLY
 // [cfe] A non-null value must be returned since the return type 'bool' doesn't allow null.
diff --git a/tests/language/spread_collections/null_spread_test.dart b/tests/language/spread_collections/null_spread_test.dart
new file mode 100644
index 0000000..777378d
--- /dev/null
+++ b/tests/language/spread_collections/null_spread_test.dart
@@ -0,0 +1,99 @@
+// 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 that the inferred element type, key type, and value type of a spread
+// element of the form `...?e` where `e` has type `Null` or a potentially
+// nullable subtype thereof is `Never`; and the element, key, and value types
+// are also `Never` for `...e` where the type of `e` is a subtype of `Never`.
+
+import 'package:expect/expect.dart';
+
+Function f = uncalled; // Do not optimize away `uncalled`.
+Never myNever = throw 1;
+
+void uncalled<X extends Null>(X x) {
+  // Test empty collection, involving only type `Never`.
+  var l1 = [...?x];
+  List<Never> l1b = l1;
+  var l2 = [...myNever];
+  List<Never> l2b = l2;
+  var l3 = [...?myNever];
+  //        ^^^^
+  // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
+  List<Never> l3b = l3;
+  var s1 = {...?x, if (false) throw 1};
+  Set<Never> s1b = s1;
+  var s2 = {...myNever, if (false) throw 1};
+  Set<Never> s2b = s2;
+  var s3 = {...?myNever, if (false) throw 1};
+  //        ^^^^
+  // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
+  Set<Never> s3b = s3;
+  var m1 = {...?x, if (false) throw 1: throw 1};
+  Map<Never, Never> m1b = m1;
+  var m2 = {...myNever, if (false) throw 1: throw 1};
+  Map<Never, Never> m2b = m2;
+  var m3 = {...?myNever, if (false) throw 1: throw 1};
+  //        ^^^^
+  // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
+  Map<Never, Never> m3b = m3;
+
+  // Test non-empty collection of `Never` and `int`.
+  var li1 = [...?x, 1];
+  List<int> li1b = li1;
+  var li2 = [...myNever, 1];
+  List<int> li2b = li2;
+  var li3 = [...?myNever, 1];
+  //         ^^^^
+  // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
+  List<int> li3b = li3;
+  var si1 = {1, ...?x};
+  Set<int> si1b = si1;
+  var si2 = {1, ...myNever};
+  Set<int> si2b = si2;
+  var si3 = {1, ...?myNever};
+  //            ^^^^
+  // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
+  Set<int> si3b = si3;
+  var mi1 = {1: 1, ...?x};
+  Map<int, int> mi1b = mi1;
+  var mi2 = {1: 1, ...myNever};
+  Map<int, int> mi2b = mi2;
+  var mi3 = {1: 1, ...?myNever};
+  //               ^^^^
+  // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
+  Map<int, int> mi3b = mi3;
+}
+
+void main() {
+  Null myNull = null;
+
+  // Test empty collection, involving only type `Never`.
+  var l1 = [...?null];
+  List<Never> l1b = l1;
+  var l2 = [...?myNull];
+  List<Never> l2b = l2;
+  var s1 = {...?null, if (false) throw 1};
+  Set<Never> s1b = s1;
+  var s2 = {if (false) throw 1, ...?myNull};
+  Set<Never> s2b = s2;
+  var m1 = {...?null, if (false) throw 1: throw 1};
+  Map<Never, Never> m1b = m1;
+  var m2 = {if (false) throw 1: throw 1, ...?myNull};
+  Map<Never, Never> m2b = m2;
+
+  // Test non-empty collection of `Never` and `int`.
+  var li1 = [...?null, 1];
+  List<int> li1b = li1;
+  var li2 = [1, ...?myNull];
+  List<int> li2b = li2;
+  var si1 = {1, ...?null};
+  Set<int> si1b = si1;
+  var si2 = {...?myNull, 1};
+  Set<int> si2b = si2;
+  var mi1 = {1: 1, ...?null};
+  Map<int, int> mi1b = mi1;
+  var mi2 = {...?myNull, 1: 1};
+  Map<int, int> mi2b = mi2;
+}
diff --git a/tests/language/static/field1_test.dart b/tests/language/static/field1_test.dart
index e4e1472..7c3c338 100644
--- a/tests/language/static/field1_test.dart
+++ b/tests/language/static/field1_test.dart
@@ -14,7 +14,7 @@
       var foo = new Foo();
       var x = foo.x;
       //          ^
-      // [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+      // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
       // [cfe] The getter 'x' isn't defined for the class 'Foo'.
     }
   }
diff --git a/tests/language/static/field1a_test.dart b/tests/language/static/field1a_test.dart
index 9d7f2f2..27a336d 100644
--- a/tests/language/static/field1a_test.dart
+++ b/tests/language/static/field1a_test.dart
@@ -14,7 +14,7 @@
       var foo = new Foo();
       var m = foo.m;
       //          ^
-      // [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+      // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
       // [cfe] The getter 'm' isn't defined for the class 'Foo'.
     }
   }
diff --git a/tests/language/static/field3_test.dart b/tests/language/static/field3_test.dart
index 7436df1..f794e68 100644
--- a/tests/language/static/field3_test.dart
+++ b/tests/language/static/field3_test.dart
@@ -13,19 +13,19 @@
   if (false) {
     var x = Foo.x;
     //          ^
-    // [analyzer] STATIC_WARNING.STATIC_ACCESS_TO_INSTANCE_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
     // [cfe] Getter not found: 'x'.
     var m = Foo.m;
     //          ^
-    // [analyzer] STATIC_WARNING.STATIC_ACCESS_TO_INSTANCE_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
     // [cfe] Getter not found: 'm'.
     Foo.m = 1;
     //  ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
     // [cfe] Setter not found: 'm'.
     Foo.x = 1;
     //  ^
-    // [analyzer] STATIC_WARNING.STATIC_ACCESS_TO_INSTANCE_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
     // [cfe] Setter not found: 'x'.
   }
 }
diff --git a/tests/language/static/final_field2_test.dart b/tests/language/static/final_field2_test.dart
index 0755461..6430471 100644
--- a/tests/language/static/final_field2_test.dart
+++ b/tests/language/static/final_field2_test.dart
@@ -20,7 +20,7 @@
 main() {
   A.x = 2;
 //^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_CONST
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_CONST
 //  ^
 // [cfe] Setter not found: 'x'.
   new B();
diff --git a/tests/language/static/getter_no_setter1_test.dart b/tests/language/static/getter_no_setter1_test.dart
index a173b2f..dd307ec 100644
--- a/tests/language/static/getter_no_setter1_test.dart
+++ b/tests/language/static/getter_no_setter1_test.dart
@@ -10,7 +10,7 @@
   method() {
     getter++;
 //  ^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'getter'.
   }
 }
diff --git a/tests/language/static/getter_no_setter2_test.dart b/tests/language/static/getter_no_setter2_test.dart
index d10cedb..e84b2b8 100644
--- a/tests/language/static/getter_no_setter2_test.dart
+++ b/tests/language/static/getter_no_setter2_test.dart
@@ -10,7 +10,7 @@
   method() {
     getter++;
 //  ^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'getter'.
   }
 
diff --git a/tests/language/static/setter_get_test.dart b/tests/language/static/setter_get_test.dart
index 44796cc..0a16b53 100644
--- a/tests/language/static/setter_get_test.dart
+++ b/tests/language/static/setter_get_test.dart
@@ -8,7 +8,7 @@
   static set o(_) {}
   m() => o;
   //     ^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Getter not found: 'o'.
   noSuchMethod(_) => 42;
 }
diff --git a/tests/language/string/interpolate1_test.dart b/tests/language/string/interpolate1_test.dart
index 1bc80c0..12bf4af 100644
--- a/tests/language/string/interpolate1_test.dart
+++ b/tests/language/string/interpolate1_test.dart
@@ -11,6 +11,6 @@
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
   // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}).
   //                  ^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Getter not found: 'x'.
 }
diff --git a/tests/language/string/interpolation_test.dart b/tests/language/string/interpolation_test.dart
index 50968b0..2b0f4e5 100644
--- a/tests/language/string/interpolation_test.dart
+++ b/tests/language/string/interpolation_test.dart
@@ -60,7 +60,7 @@
     if (alwaysFalse) {
       "${i.toHorse()}";
       //   ^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
       // [cfe] The method 'toHorse' isn't defined for the class 'int'.
     }
 
diff --git a/tests/language/string/multiline_newline_test.dart b/tests/language/string/multiline_newline_test.dart
index 37ef0c7..75bf78c 100644
--- a/tests/language/string/multiline_newline_test.dart
+++ b/tests/language/string/multiline_newline_test.dart
@@ -68,37 +68,37 @@
 
   const c4 = c1 ? 1 : 2;
   //         ^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   Expect.equals(1, c4);
 
   const c5 = c2 ? 2 : 3;
   //         ^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   Expect.equals(2, c5);
 
   const c6 = c3 ? 3 : 4;
   //         ^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   Expect.equals(3, c6);
 
   const c4r = c1r ? 1 : 2;
   //          ^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   Expect.equals(1, c4r);
 
   const c5r = c2r ? 2 : 3;
   //          ^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   Expect.equals(2, c5r);
 
   const c6r = c3r ? 3 : 4;
   //          ^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   Expect.equals(3, c6r);
 
@@ -138,36 +138,36 @@
   // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   //          ^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   const c11 = c8 ? 2 : 3;
   //          ^^
   // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   //          ^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   const c12 = c9 ? 3 : 4;
   //          ^^
   // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   //          ^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
 
   const c10r = c7r ? 1 : 2;
   //           ^^^
   // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   //           ^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   const c11r = c8r ? 2 : 3;
   //           ^^^
   // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   //           ^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
   const c12r = c9r ? 3 : 4;
   //           ^^^
   // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
   // [cfe] A value of type 'bool?' can't be assigned to a variable of type 'bool'.
   //           ^^^
-  // [analyzer] STATIC_WARNING.UNCHECKED_USE_OF_NULLABLE_VALUE
+  // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
 }
diff --git a/tests/language/string/no_operator_test.dart b/tests/language/string/no_operator_test.dart
index e6da249..a7eabf7 100644
--- a/tests/language/string/no_operator_test.dart
+++ b/tests/language/string/no_operator_test.dart
@@ -9,66 +9,66 @@
   var y = "y";
   Expect.throws(() => x < y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '<' isn't defined for the class 'String'.
   Expect.throws(() => x <= y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '<=' isn't defined for the class 'String'.
   Expect.throws(() => x > y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '>' isn't defined for the class 'String'.
   Expect.throws(() => x >= y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '>=' isn't defined for the class 'String'.
   Expect.throws(() => x - y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '-' isn't defined for the class 'String'.
   Expect.throws(() => x * y);
   //                      ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   Expect.throws(() => x / y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '/' isn't defined for the class 'String'.
   Expect.throws(() => x ~/ y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '~/' isn't defined for the class 'String'.
   Expect.throws(() => x % y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '%' isn't defined for the class 'String'.
   Expect.throws(() => x >> y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '>>' isn't defined for the class 'String'.
   Expect.throws(() => x << y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '<<' isn't defined for the class 'String'.
   Expect.throws(() => x & y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '&' isn't defined for the class 'String'.
   Expect.throws(() => x | y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '|' isn't defined for the class 'String'.
   Expect.throws(() => x ^ y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '^' isn't defined for the class 'String'.
   Expect.throws(() => -x);
   //                  ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator 'unary-' isn't defined for the class 'String'.
   Expect.throws(() => ~x);
   //                  ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '~' isn't defined for the class 'String'.
 }
diff --git a/tests/language/string/string_test.dart b/tests/language/string/string_test.dart
index 1ab3f92..dfe4447 100644
--- a/tests/language/string/string_test.dart
+++ b/tests/language/string/string_test.dart
@@ -31,7 +31,7 @@
     String a = "Hello";
     a[1] = 12;
 //   ^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
 // [cfe] The operator '[]=' isn't defined for the class 'String'.
   }
 
diff --git a/tests/language/string/substring_test.dart b/tests/language/string/substring_test.dart
index bf2ce99..6f33829 100644
--- a/tests/language/string/substring_test.dart
+++ b/tests/language/string/substring_test.dart
@@ -9,10 +9,10 @@
   try {
     print("abcdef".substring(1.5, 3.5));
     //                       ^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'.
     //                            ^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'.
     Expect.fail("Should have thrown an exception");
   } on TypeError catch (e) {
diff --git a/tests/language/super/assign_test.dart b/tests/language/super/assign_test.dart
index bfb2c38..9c09982 100644
--- a/tests/language/super/assign_test.dart
+++ b/tests/language/super/assign_test.dart
@@ -17,6 +17,6 @@
   a.x = 37;
   a.setX(42);
   //^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'setX' isn't defined for the class 'A'.
 }
diff --git a/tests/language/super/conditional_operator_test.dart b/tests/language/super/conditional_operator_test.dart
index 7f09c55..1c47348 100644
--- a/tests/language/super/conditional_operator_test.dart
+++ b/tests/language/super/conditional_operator_test.dart
@@ -50,7 +50,7 @@
     // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER
     1 * super?.field;
     //  ^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     //       ^^
     // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
     // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null.
@@ -70,7 +70,7 @@
     // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER
     !super?.field;
 //   ^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_NEGATION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_NEGATION_EXPRESSION
 //        ^^
 // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
 // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null.
diff --git a/tests/language/switch/case_expression_with_assignment_test.dart b/tests/language/switch/case_expression_with_assignment_test.dart
index 115cb94..5ab2dbd 100644
--- a/tests/language/switch/case_expression_with_assignment_test.dart
+++ b/tests/language/switch/case_expression_with_assignment_test.dart
@@ -15,7 +15,7 @@
       return "ERROR_A";
     case ERROR_B = 1:
     //   ^^^^^^^
-    // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_CONST
+    // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_CONST
     //   ^^^^^^^^^^^
     // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_CASE_EXPRESSION
     //           ^
diff --git a/tests/language/symbol/literal_test.dart b/tests/language/symbol/literal_test.dart
index 268b610..976158f 100644
--- a/tests/language/symbol/literal_test.dart
+++ b/tests/language/symbol/literal_test.dart
@@ -46,7 +46,7 @@
   // Tries to call the symbol literal #a.toString
   Expect.throwsNoSuchMethodError(() => #a.toString());
   //                                   ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
   //                                              ^
   // [cfe] The method 'call' isn't defined for the class 'Symbol'.
 }
diff --git a/tests/language/sync_star/generator1_test.dart b/tests/language/sync_star/generator1_test.dart
index 79b294d..ef6bd9b 100644
--- a/tests/language/sync_star/generator1_test.dart
+++ b/tests/language/sync_star/generator1_test.dart
@@ -48,7 +48,7 @@
   // Throws type error: yielded object is not an iterable.
   yield* 3;
   //     ^
-  // [analyzer] STATIC_TYPE_WARNING.YIELD_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.YIELD_OF_INVALID_TYPE
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'Iterable<dynamic>'.
 }
 
diff --git a/tests/language/sync_star/void_sync_star_test.dart b/tests/language/sync_star/void_sync_star_test.dart
new file mode 100644
index 0000000..4c387f3
--- /dev/null
+++ b/tests/language/sync_star/void_sync_star_test.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.
+
+// It is an error for a `sync*` function to have return type `void`.
+
+/*space*/ void f1() sync* {
+  //      ^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class C {
+  static void f2() sync* {
+    //   ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  /*space*/ void f3() sync* {
+    //      ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
+
+void main() {
+  /*space*/ void f4() sync* {
+    //      ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // No function literal: It is probably not possible to infer the
+  // return type `void` for a function literal marked `sync*`.
+}
diff --git a/tests/language/this/conditional_operator_runtime_test.dart b/tests/language/this/conditional_operator_runtime_test.dart
index eb56244..cf48394 100644
--- a/tests/language/this/conditional_operator_runtime_test.dart
+++ b/tests/language/this/conditional_operator_runtime_test.dart
@@ -20,9 +20,17 @@
 
   test() {
     this?.field = 1;
+    //  ^^
+    // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
     this?.field += 1;
+    //  ^^
+    // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
     this?.field;
+    //  ^^
+    // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
     this?.method();
+    //  ^^
+    // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
   }
 }
 
diff --git a/tests/language/this/conditional_operator_test.dart b/tests/language/this/conditional_operator_test.dart
index 85060a5..5254ea2 100644
--- a/tests/language/this/conditional_operator_test.dart
+++ b/tests/language/this/conditional_operator_test.dart
@@ -21,7 +21,7 @@
     //^^^^^^^^^^^^^^^^^^^^^^^^
     // [analyzer] COMPILE_TIME_ERROR.INITIALIZER_FOR_NON_EXISTENT_FIELD
     // [error line 15, column 11, length 0]
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] Expected '.' before this.
     //    ^^
     // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language/this/implicit_this_test.dart b/tests/language/this/implicit_this_test.dart
index 3500c9a..0cbcfa8 100644
--- a/tests/language/this/implicit_this_test.dart
+++ b/tests/language/this/implicit_this_test.dart
@@ -17,7 +17,7 @@
 // abstract.
 class SubAbstract1 extends Abstract {}
 //    ^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
 // [cfe] The non-abstract class 'SubAbstract1' is missing implementations for these members:
 
 // This class does not implement "x", but is itself abstract, so that's OK.
@@ -29,7 +29,7 @@
 // abstract.
 class SubSubAbstract2 extends SubAbstract2 {}
 //    ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
 // [cfe] The non-abstract class 'SubSubAbstract2' is missing implementations for these members:
 
 class Concrete extends Abstract {
@@ -44,7 +44,7 @@
 void main() {
   new Abstract();
   //  ^^^^^^^^
-  // [analyzer] STATIC_WARNING.INSTANTIATE_ABSTRACT_CLASS
+  // [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS
   // [cfe] The class 'Abstract' is abstract and can't be instantiated.
   Expect.equals('7', new Concrete().toString());
   Expect.equals('42', new SubConcrete(42).toString());
diff --git a/tests/language/type/checks_in_factory_method_test.dart b/tests/language/type/checks_in_factory_method_test.dart
index cae8f04..3be4613 100644
--- a/tests/language/type/checks_in_factory_method_test.dart
+++ b/tests/language/type/checks_in_factory_method_test.dart
@@ -22,7 +22,7 @@
 
     func("Hello World!");
     //   ^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'String' can't be assigned to the parameter type 'T'.
     return new Bar<T>();
   }
diff --git a/tests/language/type/implicit_error_test.dart b/tests/language/type/implicit_error_test.dart
index 1c42842..5adad76 100644
--- a/tests/language/type/implicit_error_test.dart
+++ b/tests/language/type/implicit_error_test.dart
@@ -29,7 +29,6 @@
 
   Expect.throws<TypeError>(() {
     int x = wrap(noToString); // Implicit cast should throw
-    return x;
   }, (e) {
     e.toString(); // Should not throw.
     return true;
diff --git a/tests/language/type_object/first_class_types_literals_test.dart b/tests/language/type_object/first_class_types_literals_test.dart
index aa02a4d..663e516 100644
--- a/tests/language/type_object/first_class_types_literals_test.dart
+++ b/tests/language/type_object/first_class_types_literals_test.dart
@@ -51,49 +51,49 @@
   // Test that operator calls on class literals go to Type.
   Expect.throwsNoSuchMethodError(() => C = 1);
   //                                   ^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
   // [cfe] Can't assign to a type literal.
   //                                       ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   Expect.throwsNoSuchMethodError(() => C++);
   //                                   ^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
   // [cfe] Can't assign to a type literal.
   //                                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   Expect.throwsNoSuchMethodError(() => C + 1);
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '+' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => C[2]);
   //                                    ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => C[2] = 'hest');
   //                                    ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => dynamic = 1);
   //                                   ^
   // [cfe] Can't assign to a type literal.
   //                                             ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   Expect.throwsNoSuchMethodError(() => dynamic++);
   //                                   ^
   // [cfe] Can't assign to a type literal.
   //                                          ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   Expect.throwsNoSuchMethodError(() => dynamic + 1);
   //                                           ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '+' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => dynamic[2]);
   //                                          ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => dynamic[2] = 'hest');
   //                                          ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'Type'.
 
   Expect.equals((dynamic).toString(), 'dynamic');
diff --git a/tests/language/type_promotion/assign_test.dart b/tests/language/type_promotion/assign_test.dart
index 737a750..74c1322 100644
--- a/tests/language/type_promotion/assign_test.dart
+++ b/tests/language/type_promotion/assign_test.dart
@@ -39,7 +39,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
   if (a is B) {
@@ -51,7 +51,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
diff --git a/tests/language/type_promotion/closure_test.dart b/tests/language/type_promotion/closure_test.dart
index 17246dc..7606728 100644
--- a/tests/language/type_promotion/closure_test.dart
+++ b/tests/language/type_promotion/closure_test.dart
@@ -70,7 +70,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
@@ -85,7 +85,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
     void foo() {
       a = new D();
@@ -94,7 +94,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
@@ -109,7 +109,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
     void foo() {
       a = new D();
@@ -118,7 +118,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
@@ -137,7 +137,7 @@
   if (a is B) {
     func(() => a.b);
     //           ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
     print(a.a);
   }
@@ -178,7 +178,7 @@
   if (a is B
       && func(() => a.b)
       //              ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       ) {
     print(a.a);
@@ -190,7 +190,7 @@
   A a = new E();
   var b = a is B ? func(() => a.b) : false;
   //                            ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   a = A();
 }
@@ -220,7 +220,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
   a = A();
diff --git a/tests/language/type_promotion/functions_test.dart b/tests/language/type_promotion/functions_test.dart
index 1e0b4ae..4aecc3b 100644
--- a/tests/language/type_promotion/functions_test.dart
+++ b/tests/language/type_promotion/functions_test.dart
@@ -43,7 +43,7 @@
   b = funcAtoDyn(new B());
   c = funcAtoDyn(new C());
   //             ^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   //                 ^
   // [cfe] The argument type 'C' can't be assigned to the parameter type 'A'.
 
@@ -76,7 +76,7 @@
     // Returned value has type `void`, usage is restricted.
     Object o = funcDynToDyn(null);
     //         ^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+    // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
     //                     ^
     // [cfe] This expression has type 'void' and can't be used.
   }
@@ -87,7 +87,7 @@
     b = funcDynToDyn(new B()) as B;
     c = funcDynToDyn(new C());
     //  ^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //              ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
   }
@@ -97,17 +97,17 @@
   FuncDynToVoid funcDynToVoid = func;
   a = funcDynToVoid(new A());
   //  ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   //               ^
   // [cfe] This expression has type 'void' and can't be used.
   b = funcDynToVoid(new B());
   //  ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   //               ^
   // [cfe] This expression has type 'void' and can't be used.
   c = funcDynToVoid(new C());
   //  ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   //               ^
   // [cfe] This expression has type 'void' and can't be used.
 
@@ -124,7 +124,7 @@
     b = funcDynToVoid(new B()) as B;
     c = funcDynToVoid(new C());
     //  ^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //               ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
   }
@@ -136,7 +136,7 @@
   b = funcDynToA(new B()) as B;
   c = funcDynToA(new C());
   //  ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //            ^
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
 
@@ -146,7 +146,7 @@
     b = funcDynToA(new B()) as B;
     c = funcDynToA(new C());
     //  ^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //            ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
   }
@@ -157,7 +157,7 @@
     b = funcDynToA(new B()) as B;
     c = funcDynToA(new C());
     //  ^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //            ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
   }
diff --git a/tests/language/type_promotion/local_test.dart b/tests/language/type_promotion/local_test.dart
index c0fe87d..85b0386 100644
--- a/tests/language/type_promotion/local_test.dart
+++ b/tests/language/type_promotion/local_test.dart
@@ -32,15 +32,15 @@
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a is B) {
@@ -48,11 +48,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
 
     if (a is C) {
@@ -61,7 +61,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
 
@@ -69,11 +69,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if (a is C) {
@@ -82,7 +82,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
 
     if (a is B) {
@@ -91,7 +91,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
     if (a is D) {
@@ -100,7 +100,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
 
@@ -109,33 +109,33 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
 
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a is D) {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
@@ -143,15 +143,15 @@
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   var o1 = a is B
@@ -159,24 +159,24 @@
               '${a.b}'
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'B'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'B'.
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -186,20 +186,20 @@
               '${a.c}'
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -207,25 +207,25 @@
           ? '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'D'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'D'.
               '${a.d}'
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -234,11 +234,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if (a is B && a is C) {
@@ -247,7 +247,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is C && a is B) {
@@ -256,7 +256,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is C && a is D) {
@@ -265,18 +265,18 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is D && a is C) {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
diff --git a/tests/language/type_promotion/more_specific_test.dart b/tests/language/type_promotion/more_specific_test.dart
index 21392a3..cf95b4a 100644
--- a/tests/language/type_promotion/more_specific_test.dart
+++ b/tests/language/type_promotion/more_specific_test.dart
@@ -48,7 +48,7 @@
     // No promotion C !<< A.
     x = a.c;
     //    ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'A'.
   }
   B b = new B();
@@ -60,7 +60,7 @@
     // Promotion A << dynamic.
     y = x.b;
     //    ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
@@ -78,12 +78,12 @@
     // Promotion: E<A> << D.
     int a = d1.d;
     //      ^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //         ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'int'.
     String b = d1.d;
     //         ^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //            ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'String'.
     x = d1.e;
@@ -94,7 +94,7 @@
     // No promotion: E !<< D<A>
     x = d2.e;
     //     ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'e' isn't defined for the class 'D<A>'.
   }
 
diff --git a/tests/language/type_promotion/multiple_test.dart b/tests/language/type_promotion/multiple_test.dart
index 8410597..21a2f7d 100644
--- a/tests/language/type_promotion/multiple_test.dart
+++ b/tests/language/type_promotion/multiple_test.dart
@@ -36,29 +36,29 @@
   print(a1.a);
   print(a1.b);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a1.c);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a1.d);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   print(a2.a);
   print(a2.b);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a2.c);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a2.d);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a1 is B && a2 is C) {
@@ -66,11 +66,11 @@
     print(a1.b);
     print(a1.c);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a1.d);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
 
     print(a2.a);
@@ -78,7 +78,7 @@
     print(a2.c);
     print(a2.d);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
 
     if (a1 is C && a2 is D) {
@@ -87,7 +87,7 @@
       print(a1.c);
       print(a1.d);
       //       ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
 
       print(a2.a);
@@ -95,7 +95,7 @@
       print(a2.c);
       print(a2.d);
       //       ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
   }
@@ -105,44 +105,44 @@
               '${a1.b}'
       '${a1.c}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'B'.
       '${a1.d}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'B'.
               '${a2.a}'
               '${a2.b}'
               '${a2.c}'
       '${a2.d}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
           : '${a1.a}'
       '${a1.b}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a1.c}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a1.d}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
           '${a2.a}'
       '${a2.b}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a2.c}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a2.d}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -152,7 +152,7 @@
     print(a1.c);
     print(a1.d);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
 
     print(a2.a);
@@ -160,7 +160,7 @@
     print(a2.c);
     print(a2.d);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
 }
diff --git a/tests/language/type_promotion/parameter_test.dart b/tests/language/type_promotion/parameter_test.dart
index b93d764..7ce7119 100644
--- a/tests/language/type_promotion/parameter_test.dart
+++ b/tests/language/type_promotion/parameter_test.dart
@@ -35,15 +35,15 @@
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a is B) {
@@ -51,11 +51,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
 
     if (a is C) {
@@ -64,7 +64,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
 
@@ -72,11 +72,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if (a is C) {
@@ -85,7 +85,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
 
     if (a is B) {
@@ -94,7 +94,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
     if (a is D) {
@@ -103,7 +103,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
 
@@ -112,33 +112,33 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
 
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a is D) {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
@@ -146,15 +146,15 @@
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   var o1 = a is B
@@ -162,24 +162,24 @@
               '${a.b}'
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'B'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'B'.
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -189,20 +189,20 @@
               '${a.c}'
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -210,25 +210,25 @@
           ? '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'D'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'D'.
               '${a.d}'
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -237,11 +237,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if (a is B && a is C) {
@@ -250,7 +250,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is C && a is B) {
@@ -259,7 +259,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is C && a is D) {
@@ -268,18 +268,18 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is D && a is C) {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
@@ -287,37 +287,37 @@
       a.a == ""
       && a.b == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'D'.
       && a.c == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'D'.
       &&
       a.d == "") {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
   if (a.a == ""
       && a.b == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       && a.c == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       && a.d == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
           &&
           a is B &&
@@ -325,11 +325,11 @@
           a.b == ""
       && a.c == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'B'.
       && a.d == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'B'.
           &&
           a is C &&
@@ -338,7 +338,7 @@
           a.c == ""
       && a.d == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
       ) {
     print(a.a);
@@ -346,7 +346,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if ((a is B)) {
@@ -354,11 +354,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if ((a is B && (a) is C) && a is B) {
@@ -367,7 +367,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
 }
diff --git a/tests/language/type_variable/bound_access_test.dart b/tests/language/type_variable/bound_access_test.dart
index 77f8594..39d52ea 100644
--- a/tests/language/type_variable/bound_access_test.dart
+++ b/tests/language/type_variable/bound_access_test.dart
@@ -21,7 +21,7 @@
 
   num method2() => field1 + field2.length;
   //                               ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'length' isn't defined for the class 'num'.
 }
 
diff --git a/tests/language/type_variable/conflict2_test.dart b/tests/language/type_variable/conflict2_test.dart
index 4a03e01..f43e609 100644
--- a/tests/language/type_variable/conflict2_test.dart
+++ b/tests/language/type_variable/conflict2_test.dart
@@ -14,42 +14,42 @@
   // This is equivalent to (T).call(). See issue 19725
   foo() => T();
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION
   // [cfe] Method not found: 'T'.
 
   // T is in scope, even in static context. Compile-time error to call this.T().
   static bar() => T();
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION
   // [cfe] Method not found: 'T'.
   //              ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
 
   // X is not in scope. NoSuchMethodError.
   static baz() => X();
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'X'.
 
   // Class 'C' has no static method 'T': NoSuchMethodError.
   static qux() => C.T();
   //                ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.T'.
 
   // Class '_Type' has no instance method 'call': NoSuchMethodError.
   quux() => (T)();
   //        ^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
   //           ^
   // [cfe] The method 'call' isn't defined for the class 'Type'.
 
   // Runtime type T not accessible from static context. Compile-time error.
   static corge() => (T)();
   //                ^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
   //                 ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
   //                   ^
   // [cfe] The method 'call' isn't defined for the class 'Type'.
@@ -57,31 +57,31 @@
   // Class '_Type' has no [] operator: NoSuchMethodError.
   grault() => T[0];
   //           ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]' isn't defined for the class 'Type'.
 
   // Runtime type T not accessible from static context. Compile-time error.
   static garply() => T[0];
   //                 ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
   //                  ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]' isn't defined for the class 'Type'.
 
   // Class '_Type' has no member m: NoSuchMethodError.
   waldo() => T.m;
   //           ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm' isn't defined for the class 'Type'.
 
   // Runtime type T not accessible from static context. Compile-time error.
   static fred() => T.m;
   //               ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
   //                 ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm' isn't defined for the class 'Type'.
 }
 
diff --git a/tests/language/type_variable/scope_test.dart b/tests/language/type_variable/scope_test.dart
index 9930d68..3be94a3 100644
--- a/tests/language/type_variable/scope_test.dart
+++ b/tests/language/type_variable/scope_test.dart
@@ -10,24 +10,24 @@
   static
   Foo<T>
   //  ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
       m(
 //    ^
 // [cfe] Can only use type variables in instance methods.
     Foo<T>
     //  ^
-    // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
     // [cfe] Type variables can't be used in static members.
           f) {
     Foo<T> x = new Foo<String>();
     //  ^
-    // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
     // [cfe] Type variables can't be used in static members.
     //         ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     return new Foo<String>();
     //     ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
   }
 
   // T is in scope for a factory method.
@@ -39,7 +39,7 @@
   // T is not in scope for a static field.
   static late Foo<T> f1;
   //              ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
   //                 ^
   // [cfe] Verification of the generated program failed:
@@ -47,13 +47,13 @@
   static
   Foo<T>
   //  ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
       get f {
       //  ^
       // [cfe] Can only use type variables in instance methods.
     return new Foo<String>();
     //     ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
   }
 
   static void set f(
@@ -61,7 +61,7 @@
   // [cfe] Can only use type variables in instance methods.
                     Foo<T>
                     //  ^
-                    // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+                    // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
                     // [cfe] Type variables can't be used in static members.
       value) {}
 }
@@ -73,11 +73,11 @@
 main() {
   Foo.m(new Foo<String>());
   //    ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   new I(new Foo<String>());
   Foo.f1 = new Foo<String>();
   //       ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //           ^
   // [cfe] A value of type 'Foo<String>' can't be assigned to a variable of type 'Foo<T>'.
   var x = Foo.f;
diff --git a/tests/language/unsorted/callable_test.dart b/tests/language/unsorted/callable_test.dart
index 75ff4c2..16dde13 100644
--- a/tests/language/unsorted/callable_test.dart
+++ b/tests/language/unsorted/callable_test.dart
@@ -42,12 +42,12 @@
   //^
   // [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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 
   Expect.equals(f(), 42);
   Expect.equals(g(100), 187);
diff --git a/tests/language/unsorted/checked_method_error_order_test.dart b/tests/language/unsorted/checked_method_error_order_test.dart
index b8ebfe6..8689027 100644
--- a/tests/language/unsorted/checked_method_error_order_test.dart
+++ b/tests/language/unsorted/checked_method_error_order_test.dart
@@ -35,9 +35,9 @@
     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'") ||
+        return m.contains("is not a subtype of type 'int?'") ||
             m.contains(
-                "Expected a value of type 'int', but got one of type 'String'");
+                "Expected a value of type 'int?', but got one of type 'String'");
       }
       return false;
     });
diff --git a/tests/language/unsorted/external_test.dart b/tests/language/unsorted/external_test.dart
index b1008e1..4cddabc 100644
--- a/tests/language/unsorted/external_test.dart
+++ b/tests/language/unsorted/external_test.dart
@@ -13,6 +13,10 @@
   f() {}
 
   Foo() : x = 0;
+//^^^
+// [analyzer] COMPILE_TIME_ERROR.NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD
+//^^^
+// [analyzer] COMPILE_TIME_ERROR.NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD
 
   // fields can't be declared external
   external var x01;
@@ -41,7 +45,7 @@
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected ';' after this.
   //           ^^^^^^
-  // [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+  // [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 
   external Foo.n21(val) : x = 1;
   //                    ^
@@ -65,18 +69,18 @@
   // [analyzer] SYNTACTIC_ERROR.EXTERNAL_FACTORY_REDIRECTION
   // [cfe] A redirecting factory can't be external.
   //                              ^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.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]
+// [error line 76, 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]
+// [error line 82, column 1, length 8]
 // [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY
 // [cfe] An external or native method can't have a body.
 //                         ^
diff --git a/tests/language/unsorted/flatten_test.dart b/tests/language/unsorted/flatten_test.dart
index 2ff13e9..0d27daf 100644
--- a/tests/language/unsorted/flatten_test.dart
+++ b/tests/language/unsorted/flatten_test.dart
@@ -33,7 +33,7 @@
   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
+  Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())(); //# 12: compile-time error
 }
 
 main() {
diff --git a/tests/language/unsorted/invalid_cast_test.dart b/tests/language/unsorted/invalid_cast_test.dart
index c3b7747..86666e7 100644
--- a/tests/language/unsorted/invalid_cast_test.dart
+++ b/tests/language/unsorted/invalid_cast_test.dart
@@ -19,47 +19,47 @@
   void localFunction(int i) {}
   List<int> a = <Object>[];
   //            ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function(int)' can't be assigned to a variable of type 'void Function(Object)'.
 }
 
diff --git a/tests/language/unsorted/invalid_type_argument_count_test.dart b/tests/language/unsorted/invalid_type_argument_count_test.dart
index 3a93da2..cf9619d 100644
--- a/tests/language/unsorted/invalid_type_argument_count_test.dart
+++ b/tests/language/unsorted/invalid_type_argument_count_test.dart
@@ -5,14 +5,14 @@
 // Test top level field.
 dynamic<int> x1 = 42;
 // [error line 6, column 1, length 12]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.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
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 0 type arguments.
 
   Foo() {
@@ -28,7 +28,7 @@
   // Test local variable.
   dynamic<int> x3 = 42;
 // [error line 29, column 3, length 12]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 0 type arguments.
   print(x3);
 
@@ -38,7 +38,7 @@
 // Test parameter.
 void foo(dynamic<int> x4) {
 // [error line 39, column 10, length 12]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 0 type arguments.
   print(x4);
 }
diff --git a/tests/language/variable/illegal_initializer_test.dart b/tests/language/variable/illegal_initializer_test.dart
index 1b99406..6924b69 100644
--- a/tests/language/variable/illegal_initializer_test.dart
+++ b/tests/language/variable/illegal_initializer_test.dart
@@ -24,7 +24,7 @@
       //   ^^^^^^^^
       // [analyzer] COMPILE_TIME_ERROR.INITIALIZER_FOR_NON_EXISTENT_FIELD
       //        ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 
   B.c3() : super;
   //            ^
@@ -45,7 +45,7 @@
       //   ^^^^
       // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNMENT_IN_INITIALIZER
       // [error line 39, column 16, length 0]
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] Expected '.' before this.
       //       ^
       // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language/variable/ref_before_declaration_test.dart b/tests/language/variable/ref_before_declaration_test.dart
index 53f42bc..ee9ebc2 100644
--- a/tests/language/variable/ref_before_declaration_test.dart
+++ b/tests/language/variable/ref_before_declaration_test.dart
@@ -76,7 +76,7 @@
     //                   ^
     // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
     //                   ^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   }
 
   test() {
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
index 28c1add..e3e51d3 100644
--- a/tests/language/variance/syntax/variance_type_parameter_error_syntax_test.dart
+++ b/tests/language/variance/syntax/variance_type_parameter_error_syntax_test.dart
@@ -17,19 +17,19 @@
 // [cfe] Expected ')' before this.
   List<out String> bar;
   //  ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '<' isn't defined for the class 'Type'.
   //   ^^^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Expected ';' after this.
   //   ^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Getter not found: 'out'.
   //             ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '>' isn't defined for the class 'Type'.
   //               ^^^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Getter not found: 'bar'.
 }
 
diff --git a/tests/language/variance/variance_in_inference_error_test.dart b/tests/language/variance/variance_in_inference_error_test.dart
index 2c220ab..d73f8b0 100644
--- a/tests/language/variance/variance_in_inference_error_test.dart
+++ b/tests/language/variance/variance_in_inference_error_test.dart
@@ -32,7 +32,7 @@
   var inferredMiddle = inferContraContra(Contravariant<Upper>(), Contravariant<Middle>());
   upper = inferredMiddle;
   //      ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -40,7 +40,7 @@
   var inferredLower = inferContraContra(Contravariant<Upper>(), Contravariant<Lower>());
   upper = inferredLower;
   //      ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -48,7 +48,7 @@
 //^^^^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
 //                                 ^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.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.
@@ -56,7 +56,7 @@
 //^^^^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
 //                                    ^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.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
@@ -88,7 +88,7 @@
   var inferredContraUpper = inferContraBound(ContraBound(Lower(), (Upper x) {}));
   lower = inferredContraUpper;
   //      ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -96,6 +96,6 @@
   var inferredContraMiddle = inferContraBound(ContraBound(Lower(), (Middle x) {}));
   lower = inferredContraMiddle;
   //      ^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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_subtyping_error_test.dart b/tests/language/variance/variance_in_subtyping_error_test.dart
index d5697c7..4271fd0 100644
--- a/tests/language/variance/variance_in_subtyping_error_test.dart
+++ b/tests/language/variance/variance_in_subtyping_error_test.dart
@@ -70,11 +70,11 @@
   List<Contravariant<Lower>> listLower = [new Contravariant<Lower>()];
   iterableMiddle = listLower;
   //               ^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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_inout_inference_error_test.dart b/tests/language/variance/variance_inout_inference_error_test.dart
index 76326580..8bf485f 100644
--- a/tests/language/variance/variance_inout_inference_error_test.dart
+++ b/tests/language/variance/variance_inout_inference_error_test.dart
@@ -24,22 +24,22 @@
   // Middle <: T <: Middle and int <: T <: int are not valid constraints.
   inferInvInv(Invariant<Middle>(), Invariant<int>());
 //            ^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.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
+// [analyzer] COMPILE_TIME_ERROR.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
+// [analyzer] COMPILE_TIME_ERROR.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
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] The argument type 'Invariant<Lower>' can't be assigned to the parameter type 'Invariant<Middle>'.
 
   // Upper <: T
@@ -47,7 +47,7 @@
   // Upper <: T <: Middle is not a valid constraint.
   inferInvCov(Invariant<Middle>(), Covariant<Upper>());
 //            ^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] The argument type 'Invariant<Middle>' can't be assigned to the parameter type 'Invariant<Upper>'.
 
   // T <: Lower
@@ -55,6 +55,6 @@
   // Middle <: T <: Lower is not a valid constraint
   inferInvContra(Invariant<Middle>(), Contravariant<Lower>());
 //                                    ^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.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_subtyping_error_test.dart b/tests/language/variance/variance_inout_subtyping_error_test.dart
index d06f336..d994e6c 100644
--- a/tests/language/variance/variance_inout_subtyping_error_test.dart
+++ b/tests/language/variance/variance_inout_subtyping_error_test.dart
@@ -108,23 +108,23 @@
   List<Invariant<Middle>> listMiddle = [new Invariant<Middle>()];
   iterableLower = listMiddle;
   //              ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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_out_inference_error_test.dart b/tests/language/variance/variance_out_inference_error_test.dart
index 809cdfb..ccce0d1 100644
--- a/tests/language/variance/variance_out_inference_error_test.dart
+++ b/tests/language/variance/variance_out_inference_error_test.dart
@@ -31,7 +31,7 @@
   var inferredMiddle = inferCovCov(Covariant<Lower>(), Covariant<Middle>());
   lower = inferredMiddle;
   //      ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'Exactly<Middle>' can't be assigned to a variable of type 'Exactly<Lower>'.
 
   // Lower <: T <: Upper.
@@ -39,7 +39,7 @@
   var inferredUpper = inferCovCov(Covariant<Lower>(), Covariant<Upper>());
   lower = inferredUpper;
   //      ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -47,7 +47,7 @@
   var inferredCovLower = inferCovBound(CovBound(Lower(), (Upper x) {}));
   upper = inferredCovLower;
   //      ^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -55,6 +55,6 @@
   var inferredCovLower2 = inferCovBound(CovBound(Lower(), (Middle x) {}));
   middle = inferredCovLower2;
   //       ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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_subtyping_error_test.dart b/tests/language/variance/variance_out_subtyping_error_test.dart
index a85f4cb..2ddcd3e 100644
--- a/tests/language/variance/variance_out_subtyping_error_test.dart
+++ b/tests/language/variance/variance_out_subtyping_error_test.dart
@@ -70,11 +70,11 @@
   List<Covariant<Middle>> listMiddle = [new Covariant<Middle>()];
   iterableLower = listMiddle;
   //              ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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_upper_lower_bounds_error_test.dart b/tests/language/variance/variance_upper_lower_bounds_error_test.dart
index 2c69097..a8e1f25 100644
--- a/tests/language/variance/variance_upper_lower_bounds_error_test.dart
+++ b/tests/language/variance/variance_upper_lower_bounds_error_test.dart
@@ -28,39 +28,39 @@
       exactly(condition ? Contravariant<Upper>() : Contravariant<Lower>());
   Exactly<Contravariant<Upper>> contraUpperExpected = contraLowerActual;
   //                                                  ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'Exactly<Object>' can't be assigned to a variable of type 'Exactly<Invariant<Upper>>'.
 
   var legacyCovMiddleActual =
@@ -68,14 +68,14 @@
   Exactly<LegacyCovariant<Lower>> legacyCovLowerExpected =
       legacyCovMiddleActual;
   //  ^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
@@ -83,20 +83,20 @@
       : Multi<Lower, Middle, Lower>());
   Exactly<Multi<Lower, Middle, Lower>> multiExpected = multiActual;
   //                                                   ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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/vm/bool_check_stack_traces_test.dart b/tests/language/vm/bool_check_stack_traces_test.dart
index 71ef230..bdc9ce5 100644
--- a/tests/language/vm/bool_check_stack_traces_test.dart
+++ b/tests/language/vm/bool_check_stack_traces_test.dart
@@ -81,8 +81,15 @@
     print(stacktrace);
     print('-----------------------------');
 
-    Expect.isTrue(e is TypeError);
-    Expect.equals("type 'Null' is not a subtype of type 'bool'", e.toString());
+    if (isStrongMode) {
+      Expect.isTrue(e is TypeError);
+      Expect.equals(
+          "type 'Null' is not a subtype of type 'bool'", e.toString());
+    } else {
+      Expect.isTrue(e is AssertionError);
+      Expect.equals('Failed assertion: boolean expression must not be null',
+          e.toString());
+    }
 
     final String st = stacktrace.toString();
     for (int lineNum in lineNumbers) {
diff --git a/tests/language/vm/deopt_during_field_init_test.dart b/tests/language/vm/deopt_during_field_init_test.dart
new file mode 100644
index 0000000..6fb6f78
--- /dev/null
+++ b/tests/language/vm/deopt_during_field_init_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.
+// Test that we don't hit unbalanced stack after deoptimization from LoadField
+// back to getter call.
+
+// VMOptions=--no-use-osr --optimization-counter-threshold=10 --no-background-compilation
+
+int counter = 0;
+
+class A {
+  late final Object field = init();
+
+  @pragma('vm:never-inline')
+  int init() {
+    counter++;
+    if (counter > 20) {
+      finalizeB();
+    }
+    return counter;
+  }
+}
+
+class B extends A {
+  final Object field = "Foo";
+}
+
+@pragma('vm:never-inline')
+finalizeB() {
+  print(new B().field);
+}
+
+@pragma('vm:never-inline')
+test(A a) {
+  print(a.field);
+}
+
+main() {
+  for (var i = 0; i < 100; i++) {
+    test(new A());
+  }
+}
diff --git a/tests/language_2/abstract/exact_selector_test.dart b/tests/language_2/abstract/exact_selector_test.dart
index b40ccb8..222da8a 100644
--- a/tests/language_2/abstract/exact_selector_test.dart
+++ b/tests/language_2/abstract/exact_selector_test.dart
@@ -18,7 +18,7 @@
   (() => 42)();
   return new Foo();
   //         ^^^
-  // [analyzer] STATIC_WARNING.INSTANTIATE_ABSTRACT_CLASS
+  // [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS
   // [cfe] The class 'Foo' is abstract and can't be instantiated.
 }
 
diff --git a/tests/language_2/abstract/factory_constructor_test.dart b/tests/language_2/abstract/factory_constructor_test.dart
index bda6a23..810a3fa 100644
--- a/tests/language_2/abstract/factory_constructor_test.dart
+++ b/tests/language_2/abstract/factory_constructor_test.dart
@@ -26,7 +26,7 @@
   // Intentionally abstract method.
   method();
 //^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   A2.make() {}
 }
 
diff --git a/tests/language_2/abstract/getter_test.dart b/tests/language_2/abstract/getter_test.dart
index fe5acdf..74d51da 100644
--- a/tests/language_2/abstract/getter_test.dart
+++ b/tests/language_2/abstract/getter_test.dart
@@ -13,7 +13,7 @@
   // Intentionally abstract:
   get i;
 //^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 }
 
 class Bar {}
diff --git a/tests/language_2/abstract/syntax_test.dart b/tests/language_2/abstract/syntax_test.dart
index 1b617fd..a51480b 100644
--- a/tests/language_2/abstract/syntax_test.dart
+++ b/tests/language_2/abstract/syntax_test.dart
@@ -14,7 +14,7 @@
 // [cfe] The non-abstract class 'A' is missing implementations for these members:
   foo();
 //^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   static bar();
   //          ^
   // [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY
diff --git a/tests/language_2/argument/assignability_function_typed_test.dart b/tests/language_2/argument/assignability_function_typed_test.dart
index 7e17271..de2ebff 100644
--- a/tests/language_2/argument/assignability_function_typed_test.dart
+++ b/tests/language_2/argument/assignability_function_typed_test.dart
@@ -20,11 +20,11 @@
   // Unrelated types (not assignable)
   f(intToInt);
   //^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int Function(int)' can't be assigned to the parameter type 'num Function(num)'.
   f(objectToObject);
   //^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'Object Function(Object)' can't be assigned to the parameter type 'num Function(num)'.
 
   // Assignable but fails at runtime.
diff --git a/tests/language_2/assert/initializer_const_function_test.dart b/tests/language_2/assert/initializer_const_function_test.dart
index 27b99bd..b581c1d 100644
--- a/tests/language_2/assert/initializer_const_function_test.dart
+++ b/tests/language_2/assert/initializer_const_function_test.dart
@@ -11,7 +11,7 @@
   const C.bc01(this.x, y)
       : assert(staticTrue)
       //       ^^^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_EXPRESSION
+      // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_EXPRESSION
       // [cfe] A value of type 'bool Function()' can't be assigned to a variable of type 'bool'.
       ;
 }
diff --git a/tests/language_2/assign/static_type_test.dart b/tests/language_2/assign/static_type_test.dart
index d184bf4..2362a6f 100644
--- a/tests/language_2/assign/static_type_test.dart
+++ b/tests/language_2/assign/static_type_test.dart
@@ -7,28 +7,28 @@
 
 int a = "String";
 //      ^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 
 class A {
   static const int c = "String";
   //                   ^^^^^^^^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
+  // [analyzer] COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                   ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   final int d = "String";
   //            ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   int e = "String";
   //      ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   A() {
      int f = "String";
      //      ^^^^^^^^
-     // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+     // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
      // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   }
   method(
@@ -36,7 +36,7 @@
      int
       g = "String"]) {
       //  ^^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
     return g;
   }
diff --git a/tests/language_2/assign/to_type_test.dart b/tests/language_2/assign/to_type_test.dart
index 0fc076a..277012a 100644
--- a/tests/language_2/assign/to_type_test.dart
+++ b/tests/language_2/assign/to_type_test.dart
@@ -9,7 +9,7 @@
   f() {
     T = null;
 //  ^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
   }
 }
@@ -24,14 +24,14 @@
   new C<D>().f();
   D = null;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
   E = null;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
   F = null;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
 }
diff --git a/tests/language_2/async/congruence_local_test.dart b/tests/language_2/async/congruence_local_test.dart
index 8d8a03d..de5fbaa 100644
--- a/tests/language_2/async/congruence_local_test.dart
+++ b/tests/language_2/async/congruence_local_test.dart
@@ -102,7 +102,7 @@
     Future<int> v1 = f_inferred_futureObject();
     int v2 = f_inferred_futureObject();
     //       ^^^^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                              ^
     // [cfe] A value of type 'Future<Object>' can't be assigned to a variable of type 'int'.
 
@@ -112,7 +112,7 @@
     Future<B2> v3 = f_inferred_A();
     Future<int> v4 = f_inferred_A();
     //               ^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                           ^
     // [cfe] A value of type 'Future<A>' can't be assigned to a variable of type 'Future<int>'.
   }
diff --git a/tests/language_2/async/congruence_method_test.dart b/tests/language_2/async/congruence_method_test.dart
index 69f63d7..e951103 100644
--- a/tests/language_2/async/congruence_method_test.dart
+++ b/tests/language_2/async/congruence_method_test.dart
@@ -80,7 +80,7 @@
   Future<B2> v1 = c.f_inferred_A();
   Future<int> v2 = c.f_inferred_A();
   //               ^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                 ^
   // [cfe] A value of type 'Future<A>' can't be assigned to a variable of type 'Future<int>'.
 }
diff --git a/tests/language_2/async/congruence_unnamed_test.dart b/tests/language_2/async/congruence_unnamed_test.dart
index 5e5ccd2..ecc2964 100644
--- a/tests/language_2/async/congruence_unnamed_test.dart
+++ b/tests/language_2/async/congruence_unnamed_test.dart
@@ -122,7 +122,7 @@
     Future<int> v1 = f_inferred_futureObject();
     int v2 = f_inferred_futureObject();
     //       ^^^^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                              ^
     // [cfe] A value of type 'Future<Object>' can't be assigned to a variable of type 'int'.
 
@@ -132,7 +132,7 @@
     Future<B2> v3 = f_inferred_A();
     Future<int> v4 = f_inferred_A();
     //               ^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                           ^
     // [cfe] A value of type 'Future<A>' can't be assigned to a variable of type 'Future<int>'.
   }
diff --git a/tests/language_2/async/or_generator_return_type_stacktrace_test.dart b/tests/language_2/async/or_generator_return_type_stacktrace_test.dart
index 39fdb56..a6de936 100644
--- a/tests/language_2/async/or_generator_return_type_stacktrace_test.dart
+++ b/tests/language_2/async/or_generator_return_type_stacktrace_test.dart
@@ -6,17 +6,17 @@
 
 int badReturnTypeAsync() async {}
 // [error line 7, column 1, length 3]
-// [analyzer] STATIC_TYPE_WARNING.ILLEGAL_ASYNC_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_ASYNC_RETURN_TYPE
 //  ^
 // [cfe] Functions marked 'async' must have a return type assignable to 'Future'.
 int badReturnTypeAsyncStar() async* {}
 // [error line 12, column 1, length 3]
-// [analyzer] STATIC_TYPE_WARNING.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
 //  ^
 // [cfe] Functions marked 'async*' must have a return type assignable to 'Stream'.
 int badReturnTypeSyncStar() sync* {}
 // [error line 17, column 1, length 3]
-// [analyzer] STATIC_TYPE_WARNING.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
 //  ^
 // [cfe] Functions marked 'sync*' must have a return type assignable to 'Iterable'.
 
diff --git a/tests/language_2/async/return_types_test.dart b/tests/language_2/async/return_types_test.dart
index 4ecd5b4..66853a7 100644
--- a/tests/language_2/async/return_types_test.dart
+++ b/tests/language_2/async/return_types_test.dart
@@ -18,13 +18,13 @@
 foo3() async {
   return "String";
   //     ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
   // [cfe] A value of type 'Future<String>' can't be assigned to a variable of type 'FutureOr<int>'.
 }
 
 Future<int, String>
 // [error line 25, column 1, length 19]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 1 type arguments.
 foo4() async {
   return "String";
@@ -32,7 +32,7 @@
 
 int
 // [error line 33, column 1, length 3]
-// [analyzer] STATIC_TYPE_WARNING.ILLEGAL_ASYNC_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_ASYNC_RETURN_TYPE
 foo5() async {
 // [error line 36, column 1]
 // [cfe] Functions marked 'async' must have a return type assignable to 'Future'.
@@ -48,7 +48,7 @@
 foo7() async {
   return new Future<int>.value(3);
   //     ^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
 }
 
 Iterable<int> foo8() sync* {
diff --git a/tests/language_2/async_star/void_async_star_test.dart b/tests/language_2/async_star/void_async_star_test.dart
new file mode 100644
index 0000000..8e3c77d
--- /dev/null
+++ b/tests/language_2/async_star/void_async_star_test.dart
@@ -0,0 +1,38 @@
+// 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.
+
+// It is an error for an `async*` function to have return type `void`.
+
+import 'dart:async';
+
+/*space*/ void f1() async* {
+  //      ^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class C {
+  static void f2() async* {
+    //   ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  /*space*/ void f3() async* {
+    //      ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
+
+void main() {
+  /*space*/ void f4() async* {
+    //      ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // No function literal: It is probably not possible to infer the
+  // return type `void` for a function literal marked `async*`.
+}
diff --git a/tests/language_2/call/closurization_test.dart b/tests/language_2/call/closurization_test.dart
index 683c229..102413b 100644
--- a/tests/language_2/call/closurization_test.dart
+++ b/tests/language_2/call/closurization_test.dart
@@ -3,6 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 // VMOptions=--optimization_counter_threshold=10 --no-background_compilation
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import "package:expect/expect.dart";
 
 main() {
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 3b32987..6db90ed 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A'.
   new A.foo();
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A.foo'.
   new lib.A();
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'lib.A'.
 }
diff --git a/tests/language_2/call/non_method_field_test.dart b/tests/language_2/call/non_method_field_test.dart
index 8fbd2a9..8656cbf 100644
--- a/tests/language_2/call/non_method_field_test.dart
+++ b/tests/language_2/call/non_method_field_test.dart
@@ -14,14 +14,14 @@
   Fisk x1 = new Fisk();
   x1.i();
 //^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //    ^
 // [cfe] 'i' isn't a function or method and can't be invoked.
 
   Hest x2 = new Hest();
   x2.i();
 //^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //    ^
 // [cfe] 'i' isn't a function or method and can't be invoked.
 }
diff --git a/tests/language_2/call/nonexistent_constructor_test.dart b/tests/language_2/call/nonexistent_constructor_test.dart
index 4649f37..4c129d0 100644
--- a/tests/language_2/call/nonexistent_constructor_test.dart
+++ b/tests/language_2/call/nonexistent_constructor_test.dart
@@ -19,10 +19,10 @@
   new A.foo(42);
   new A.bar(foo());
   //    ^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'A.bar'.
   new A();
   //  ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
   // [cfe] Method not found: 'A'.
 }
diff --git a/tests/language_2/call/object_has_no_call_method_test.dart b/tests/language_2/call/object_has_no_call_method_test.dart
index dcb2a5c..d02b290 100644
--- a/tests/language_2/call/object_has_no_call_method_test.dart
+++ b/tests/language_2/call/object_has_no_call_method_test.dart
@@ -6,20 +6,20 @@
   d();
   o();
 //^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 // ^
 // [cfe] The method 'call' isn't defined for the class 'Object'.
   f();
   d.call;
   o.call;
   //^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'call' isn't defined for the class 'Object'.
   f.call;
   d.call();
   o.call();
   //^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'call' isn't defined for the class 'Object'.
   f.call();
 }
diff --git a/tests/language_2/call/through_getter_test.dart b/tests/language_2/call/through_getter_test.dart
index 2169e8c6..06e5af3 100644
--- a/tests/language_2/call/through_getter_test.dart
+++ b/tests/language_2/call/through_getter_test.dart
@@ -31,12 +31,12 @@
 
     TOP_LEVEL_CONST();
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                 ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
     (TOP_LEVEL_CONST)();
 //  ^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                   ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
diff --git a/tests/language_2/cascade/cascade_test.dart b/tests/language_2/cascade/cascade_test.dart
index 274b23bf..7e674f5 100644
--- a/tests/language_2/cascade/cascade_test.dart
+++ b/tests/language_2/cascade/cascade_test.dart
@@ -93,11 +93,11 @@
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
   // [cfe] Expected an identifier, but got '37'.
   // [error line 91, column 8, length 0]
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   a.."foo";
   // ^^^^^
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
   // [cfe] Expected an identifier, but got '"foo"'.
   // [error line 97, column 11, length 0]
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 }
diff --git a/tests/language_2/class/keyword_test.dart b/tests/language_2/class/keyword_test.dart
index 891c4a7..5a89f2e 100644
--- a/tests/language_2/class/keyword_test.dart
+++ b/tests/language_2/class/keyword_test.dart
@@ -12,14 +12,14 @@
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 //    ^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Expected an identifier, but got 'class'.
 //    ^^^^^
 // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
 // [cfe] Setter not found: 'class'.
   print("$class");
   //      ^^^^^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Expected an identifier, but got 'class'.
   //      ^^^^^
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
diff --git a/tests/language_2/class/variable_shadow_class_test.dart b/tests/language_2/class/variable_shadow_class_test.dart
index 5e24390..3fc29e4 100644
--- a/tests/language_2/class/variable_shadow_class_test.dart
+++ b/tests/language_2/class/variable_shadow_class_test.dart
@@ -15,9 +15,8 @@
     var Test;
     // Now this refers to the variable.
     var i = new Test.named(10);
-    //          ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
     //          ^^^^
+    // [analyzer] COMPILE_TIME_ERROR.PREFIX_SHADOWED_BY_LOCAL_DECLARATION
     // [cfe] Method not found: 'Test.named'.
     Expect.equals(10, i.field);
   }
diff --git a/tests/language_2/closure/internals_test.dart b/tests/language_2/closure/internals_test.dart
index 78f04ab..9efdda3 100644
--- a/tests/language_2/closure/internals_test.dart
+++ b/tests/language_2/closure/internals_test.dart
@@ -12,14 +12,14 @@
   var f = new C().foo;
   var target = f.target;
   //             ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'target' isn't defined for the class 'dynamic Function()'.
   var self = f.self;
   //           ^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'self' isn't defined for the class 'dynamic Function()'.
   var receiver = f.receiver;
   //               ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'receiver' isn't defined for the class 'dynamic Function()'.
 }
diff --git a/tests/language_2/compile_time_constant/p_test.dart b/tests/language_2/compile_time_constant/p_test.dart
index 5c41a46..031e929 100644
--- a/tests/language_2/compile_time_constant/p_test.dart
+++ b/tests/language_2/compile_time_constant/p_test.dart
@@ -8,7 +8,7 @@
   const A(
     this.x
     //   ^
-    // [analyzer] STATIC_WARNING.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
+    // [analyzer] COMPILE_TIME_ERROR.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
     // [cfe] 'x' is a final instance variable that has already been initialized.
     //   ^
     // [cfe] Cannot invoke a non-'const' constructor where a const expression is expected.
diff --git a/tests/language_2/compile_time_constant/static2_test.dart b/tests/language_2/compile_time_constant/static2_test.dart
index 2155448..73b9dc5 100644
--- a/tests/language_2/compile_time_constant/static2_test.dart
+++ b/tests/language_2/compile_time_constant/static2_test.dart
@@ -6,57 +6,55 @@
   final int x;
   const A.a1() : x = 'foo';
   //                 ^^^^^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                 ^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE
   const A.a2(this.x);
   const A.a3([this.x = 'foo']);
   //                   ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   const A.a4(String this.x);
   //         ^^^^^^^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.INVALID_PARAMETER_DECLARATION
-  //         ^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
   //                     ^
   // [cfe] The type of parameter 'x', 'String' is not a subtype of the corresponding field's type, 'int'.
   const A.a5(String x) : this.x = x;
   //                              ^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                              ^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE
   const A.a6(int x) : this.x = x;
 }
 
 const a1 = const A.a1();
 //         ^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 const a2 = const A.a2('foo');
 //                    ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 //                    ^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 const a3 = const A.a3();
 //         ^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 const a4 = const A.a4('foo');
 //                    ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 const a5 = const A.a5('foo');
 //         ^^^^^^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 const a6 = const A.a6('foo');
 //         ^^^^^^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 //                    ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 //                    ^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 
 main() {
   print(a1);
diff --git a/tests/language_2/compile_time_constant/static3_test.dart b/tests/language_2/compile_time_constant/static3_test.dart
index 3deabbb..fff2773 100644
--- a/tests/language_2/compile_time_constant/static3_test.dart
+++ b/tests/language_2/compile_time_constant/static3_test.dart
@@ -6,57 +6,55 @@
   final int x;
   const A.a1() : x = 'foo';
   //                 ^^^^^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                 ^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE
   const A.a2(this.x);
   const A.a3([this.x = 'foo']);
   //                   ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   const A.a4(String this.x);
   //         ^^^^^^^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.INVALID_PARAMETER_DECLARATION
-  //         ^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
   //                     ^
   // [cfe] The type of parameter 'x', 'String' is not a subtype of the corresponding field's type, 'int'.
   const A.a5(String x) : this.x = x;
   //                              ^
-  // [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   //                              ^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZER_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE
   const A.a6(int x) : this.x = x;
 }
 
 var a1 = const A.a1();
 //       ^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 var a2 = const A.a2('foo');
 //                  ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 //                  ^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 var a3 = const A.a3();
 //       ^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 var a4 = const A.a4('foo');
 //                  ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 var a5 = const A.a5('foo');
 //       ^^^^^^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 var a6 = const A.a6('foo');
 //       ^^^^^^^^^^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
 //                  ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 //                  ^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 
 main() {
   print(a1);
diff --git a/tests/language_2/compile_time_constant/static_test.dart b/tests/language_2/compile_time_constant/static_test.dart
index 288ffef..d5ebd13 100644
--- a/tests/language_2/compile_time_constant/static_test.dart
+++ b/tests/language_2/compile_time_constant/static_test.dart
@@ -4,17 +4,17 @@
 
 final int x = 'foo';
 //            ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 const int y = 'foo';
 //            ^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 //            ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 int z = 'foo';
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 
 main() {
diff --git a/tests/language_2/const/conditional_test.dart b/tests/language_2/const/conditional_test.dart
index 33aec86..4943748 100644
--- a/tests/language_2/const/conditional_test.dart
+++ b/tests/language_2/const/conditional_test.dart
@@ -73,13 +73,13 @@
 // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 //            ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 const cond4a = zeroConst ? nonConst : const1;
 //             ^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 //             ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 //                         ^
 // [cfe] Not a constant expression.
 const cond4b = zeroConst ? const0 : nonConst;
@@ -87,7 +87,7 @@
 // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 //             ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_CONDITION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION
 //                                  ^
 // [cfe] Not a constant expression.
 
diff --git a/tests/language_2/const/const_locals_constant_locals_test.dart b/tests/language_2/const/const_locals_constant_locals_test.dart
index 9f937df..472687b 100644
--- a/tests/language_2/const/const_locals_constant_locals_test.dart
+++ b/tests/language_2/const/const_locals_constant_locals_test.dart
@@ -10,8 +10,7 @@
   const c1;
   //    ^^
   // [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED
-  //      ^
-  // [cfe] The const variable ';' must be initialized.
+  // [cfe] The const variable 'c1' must be initialized.
   const c2 = 0;
   const c3 = field;
   //         ^^^^^
diff --git a/tests/language_2/const/constructor3_test.dart b/tests/language_2/const/constructor3_test.dart
index 54191d1..8ec85e0 100644
--- a/tests/language_2/const/constructor3_test.dart
+++ b/tests/language_2/const/constructor3_test.dart
@@ -15,10 +15,10 @@
 const c = const C(0.0);
 const d = const C(intValue);
 //                ^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
 // [cfe] The argument type 'int' can't be assigned to the parameter type 'double'.
 //                ^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 const e = const D(0.0);
 const f = const D(intValue);
 //        ^^^^^^^^^^^^^^^^^
diff --git a/tests/language_2/const/constructor_syntax_test.dart b/tests/language_2/const/constructor_syntax_test.dart
index 99a420e..d214271 100644
--- a/tests/language_2/const/constructor_syntax_test.dart
+++ b/tests/language_2/const/constructor_syntax_test.dart
@@ -49,7 +49,7 @@
   const C3()
       : field = new C0()
       //^^^^^
-      // [analyzer] STATIC_WARNING.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
+      // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
       //      ^
       // [cfe] 'field' is a final instance variable that has already been initialized.
       //      ^
diff --git a/tests/language_2/const/init2_test.dart b/tests/language_2/const/init2_test.dart
index 7f5e1a3..65f0aa2 100644
--- a/tests/language_2/const/init2_test.dart
+++ b/tests/language_2/const/init2_test.dart
@@ -6,10 +6,10 @@
 const double c = 0.0;
 const double d = intValue;
 //               ^^^^^^^^
-// [analyzer] CHECKED_MODE_COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
+// [analyzer] COMPILE_TIME_ERROR.VARIABLE_TYPE_MISMATCH
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'double'.
 //               ^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 
 main() {
   print(c);
diff --git a/tests/language_2/const/switch2_test.dart b/tests/language_2/const/switch2_test.dart
index ce1dea9..f1daf0c 100644
--- a/tests/language_2/const/switch2_test.dart
+++ b/tests/language_2/const/switch2_test.dart
@@ -8,7 +8,7 @@
   var a = [1, 2, 3][2];
   switch (a) {
   //      ^
-  // [analyzer] STATIC_WARNING.SWITCH_EXPRESSION_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.SWITCH_EXPRESSION_NOT_ASSIGNABLE
     case 0.0:
     //   ^
     // [cfe] Type 'int' of the switch expression isn't assignable to the type 'double' of this case expression.
diff --git a/tests/language_2/const/syntax_test.dart b/tests/language_2/const/syntax_test.dart
index 3682988..375fb6a 100644
--- a/tests/language_2/const/syntax_test.dart
+++ b/tests/language_2/const/syntax_test.dart
@@ -9,14 +9,12 @@
   const f1;
   //    ^^
   // [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED
-  //      ^
-  // [cfe] The const variable ';' must be initialized.
+  // [cfe] The const variable 'f1' must be initialized.
   const int f2 = 87;
   const int f3;
   //        ^^
   // [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED
-  //          ^
-  // [cfe] The const variable ';' must be initialized.
+  // [cfe] The const variable 'f3' must be initialized.
   Expect.equals(42, f0);
   Expect.equals(87, f2);
 
@@ -94,15 +92,11 @@
 //    ^^
 // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_COMPILE_TIME_CONSTANT
 // [cfe] Can't infer the type of 'A2': circularity found during type inference.
-//         ^^
-// [analyzer] COMPILE_TIME_ERROR.TOP_LEVEL_CYCLE
 //            ^
 // [cfe] Constant evaluation error:
 const A3 = A2 + 1;
 //    ^^
 // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_COMPILE_TIME_CONSTANT
-//         ^^
-// [analyzer] COMPILE_TIME_ERROR.TOP_LEVEL_CYCLE
 
 class C0 {
   static const X = const C1();
@@ -114,7 +108,7 @@
   const C1()
       : x = C0.X
       //^
-      // [analyzer] STATIC_WARNING.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
+      // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
       //  ^
       // [cfe] 'x' is a final instance variable that has already been initialized.
       //  ^
@@ -131,7 +125,7 @@
 //         ^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_NUM
 //              ^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] A value of type 'String' can't be assigned to a variable of type 'num'.
 
 // Check identical.
diff --git a/tests/language_2/constructor/constructor9_test.dart b/tests/language_2/constructor/constructor9_test.dart
index 4c7b35d..607e164 100644
--- a/tests/language_2/constructor/constructor9_test.dart
+++ b/tests/language_2/constructor/constructor9_test.dart
@@ -8,7 +8,7 @@
 class Klass {
   Klass(var v) : field_ = v {}
 //^^^^^
-// [analyzer] STATIC_WARNING.FINAL_NOT_INITIALIZED_CONSTRUCTOR
+// [analyzer] COMPILE_TIME_ERROR.FINAL_NOT_INITIALIZED_CONSTRUCTOR
   final uninitializedFinalField_;
   //    ^
   // [cfe] Final field 'uninitializedFinalField_' is not initialized.
diff --git a/tests/language_2/constructor/default_factory_test.dart b/tests/language_2/constructor/default_factory_test.dart
index 43a93e8..1b69325 100644
--- a/tests/language_2/constructor/default_factory_test.dart
+++ b/tests/language_2/constructor/default_factory_test.dart
@@ -9,7 +9,7 @@
 abstract class Vehicle {
   factory Vehicle() = GoogleOne.Vehicle;
   //                  ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
   // [cfe] The constructor function type 'GoogleOne Function()' isn't a subtype of 'Vehicle Function()'.
 }
 
diff --git a/tests/language_2/constructor/named_constructor_test.dart b/tests/language_2/constructor/named_constructor_test.dart
index 12a58b1..3b8af32 100644
--- a/tests/language_2/constructor/named_constructor_test.dart
+++ b/tests/language_2/constructor/named_constructor_test.dart
@@ -24,35 +24,35 @@
   //        ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //             ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
 
   // 'Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new Class<int>.named<int>().value;
   //             ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
   new prefix.Class().value;
   // 'prefix' is not a type:
   new prefix<int>.Class().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
   new prefix.Class.named().value;
   // 'prefix<int>.Class.named' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class.named().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
@@ -64,23 +64,23 @@
   // 'prefix.Class.named<int>' doesn't fit the grammar syntax T.id:
   new prefix.Class.named<int>().value;
   //               ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
   // 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class<int>.named().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
 
   // 'prefix<int>.Class.named<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class.named<int>().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
@@ -90,15 +90,15 @@
   // 'prefix.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new prefix.Class<int>.named<int>().value;
   //                    ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 
   // '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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 }
diff --git a/tests/language_2/constructor/reference_test.dart b/tests/language_2/constructor/reference_test.dart
index 7aab1ff..9246d2b 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //          ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   new Foo<int>();
@@ -23,25 +23,25 @@
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected '(' after this.
   //               ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
   new Foo.bar<int>();
   //      ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //         ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   new Foo.bar<int>.baz();
   //      ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //               ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   new Foo.bar.baz<int>();
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //          ^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //          ^
   // [cfe] Method not found: 'Foo.bar.baz'.
@@ -60,13 +60,13 @@
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected '(' after this.
   //                 ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
   const Foo.bar<int>();
   //        ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //           ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   const Foo.bar<int>.baz();
   //        ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
@@ -78,7 +78,7 @@
   //    ^^^^^^^
   // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //            ^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //            ^
   // [cfe] Method not found: 'Foo.bar.baz'.
@@ -87,7 +87,7 @@
   Foo.bar();
   Foo.bar.baz();
   //  ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] Getter not found: 'bar'.
   Foo<int>();
   Foo<int>.bar();
@@ -96,22 +96,22 @@
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected '(' after this.
   //           ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
   Foo.bar<int>();
   //  ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //     ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   Foo.bar<int>.baz();
   //  ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 //^^^^^^^
-// [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //           ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   Foo.bar.baz<int>();
   //  ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] Getter not found: 'bar'.
 }
diff --git a/tests/language_2/constructor/unresolved_default_constructor_test.dart b/tests/language_2/constructor/unresolved_default_constructor_test.dart
index 07fdc72..b8b5338 100644
--- a/tests/language_2/constructor/unresolved_default_constructor_test.dart
+++ b/tests/language_2/constructor/unresolved_default_constructor_test.dart
@@ -15,6 +15,6 @@
   A.method();
   Expect.throws(() => new A());
   //                      ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
   // [cfe] Method not found: 'A'.
 }
diff --git a/tests/language_2/deferred/deferred_and_immediate_import_lib.dart b/tests/language_2/deferred/deferred_and_immediate_import_lib.dart
new file mode 100644
index 0000000..61eeb08
--- /dev/null
+++ b/tests/language_2/deferred/deferred_and_immediate_import_lib.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  print("Foo!");
+}
diff --git a/tests/language_2/deferred/deferred_and_immediate_import_test.dart b/tests/language_2/deferred/deferred_and_immediate_import_test.dart
new file mode 100644
index 0000000..d54ca7e
--- /dev/null
+++ b/tests/language_2/deferred/deferred_and_immediate_import_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.
+
+import "package:expect/expect.dart";
+
+import "deferred_and_immediate_import_lib.dart" as immediatePrefix;
+import "deferred_and_immediate_import_lib.dart" deferred as deferredPrefix;
+
+main() async {
+  immediatePrefix.foo();
+
+  Expect.throws(() {
+    deferredPrefix.foo();
+  });
+
+  await deferredPrefix.loadLibrary();
+  deferredPrefix.foo();
+}
diff --git a/tests/language_2/deferred/inheritance_constraints_test.dart b/tests/language_2/deferred/inheritance_constraints_test.dart
index 9dd18f2..2d9429b 100644
--- a/tests/language_2/deferred/inheritance_constraints_test.dart
+++ b/tests/language_2/deferred/inheritance_constraints_test.dart
@@ -27,7 +27,7 @@
   D();
   factory D.factory() = lib.Foo2;
 //                      ^^^^^^^^
-// [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
 // [cfe] The constructor function type 'Foo2 Function()' isn't a subtype of 'D Function()'.
 }
 
diff --git a/tests/language_2/deferred/super_dependency_test.dart b/tests/language_2/deferred/super_dependency_test.dart
index f49380c..5879e56 100644
--- a/tests/language_2/deferred/super_dependency_test.dart
+++ b/tests/language_2/deferred/super_dependency_test.dart
@@ -8,7 +8,7 @@
 
 import "package:expect/expect.dart";
 //        ^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_SETTER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_SETTER
 // [cfe] Superclass has no setter named 'foo'.
 import "super_dependency_lib.dart" deferred as lib;
 
diff --git a/tests/language_2/deferred/unreachable_loading_unit_deferred.dart b/tests/language_2/deferred/unreachable_loading_unit_deferred.dart
new file mode 100644
index 0000000..ca5f8bdc
--- /dev/null
+++ b/tests/language_2/deferred/unreachable_loading_unit_deferred.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  print("Foo");
+}
diff --git a/tests/language_2/deferred/unreachable_loading_unit_immediate.dart b/tests/language_2/deferred/unreachable_loading_unit_immediate.dart
new file mode 100644
index 0000000..a320045
--- /dev/null
+++ b/tests/language_2/deferred/unreachable_loading_unit_immediate.dart
@@ -0,0 +1,10 @@
+// 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 "unreachable_loading_unit_deferred.dart" deferred as lib;
+
+unreachable() async {
+  await lib.loadLibrary();
+  lib.foo();
+}
diff --git a/tests/language_2/deferred/unreachable_loading_unit_test.dart b/tests/language_2/deferred/unreachable_loading_unit_test.dart
new file mode 100644
index 0000000..8a66342
--- /dev/null
+++ b/tests/language_2/deferred/unreachable_loading_unit_test.dart
@@ -0,0 +1,9 @@
+// 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 "unreachable_loading_unit_immediate.dart";
+
+main() {
+  print("Okay");
+}
diff --git a/tests/language_2/double/to_string_as_exponential2_test.dart b/tests/language_2/double/to_string_as_exponential2_test.dart
index 13e461b..6fa5cc2 100644
--- a/tests/language_2/double/to_string_as_exponential2_test.dart
+++ b/tests/language_2/double/to_string_as_exponential2_test.dart
@@ -11,14 +11,14 @@
   Expect.throwsRangeError(() => v.toStringAsExponential(21));
   v.toStringAsExponential(1.5);
   //                      ^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'.
   v.toStringAsExponential("string");
   //                      ^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
   v.toStringAsExponential("3");
   //                      ^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 }
diff --git a/tests/language_2/double/to_string_as_fixed2_test.dart b/tests/language_2/double/to_string_as_fixed2_test.dart
index 3040a30..885d9fc 100644
--- a/tests/language_2/double/to_string_as_fixed2_test.dart
+++ b/tests/language_2/double/to_string_as_fixed2_test.dart
@@ -16,14 +16,14 @@
   Expect.throwsArgumentError(() => v.toStringAsFixed(null));
   v.toStringAsFixed(1.5);
   //                ^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'.
   v.toStringAsFixed("string");
   //                ^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
   v.toStringAsFixed("3");
   //                ^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 }
diff --git a/tests/language_2/double/to_string_as_precision2_test.dart b/tests/language_2/double/to_string_as_precision2_test.dart
index 4ce0c34..6df4222 100644
--- a/tests/language_2/double/to_string_as_precision2_test.dart
+++ b/tests/language_2/double/to_string_as_precision2_test.dart
@@ -16,14 +16,14 @@
   Expect.throwsArgumentError(() => v.toStringAsPrecision(null));
   v.toStringAsPrecision(1.5);
   //                    ^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'.
   v.toStringAsPrecision("string");
   //                    ^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
   v.toStringAsPrecision("3");
   //                    ^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
 }
diff --git a/tests/language_2/dynamic/field_test.dart b/tests/language_2/dynamic/field_test.dart
index ebe094e..23190e0 100644
--- a/tests/language_2/dynamic/field_test.dart
+++ b/tests/language_2/dynamic/field_test.dart
@@ -15,21 +15,21 @@
   foo() {
     print(a);
     //    ^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'a' isn't defined for the class 'C'.
     return a;
     //     ^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'a' isn't defined for the class 'C'.
   }
   bar() {
     print(b.a);
     //    ^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'b' isn't defined for the class 'C'.
     return b.a;
     //     ^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'b' isn't defined for the class 'C'.
   }
 }
diff --git a/tests/language_2/enum/private_test.dart b/tests/language_2/enum/private_test.dart
index bd99d84..a24fec3 100644
--- a/tests/language_2/enum/private_test.dart
+++ b/tests/language_2/enum/private_test.dart
@@ -20,6 +20,6 @@
   Expect.equals('Enum2._A,Enum2._B', Enum2.values.join(','));
   Expect.throwsNoSuchMethodError(() => Enum2._A);
   //                                         ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_ENUM_CONSTANT
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_ENUM_CONSTANT
   // [cfe] Getter not found: '_A'.
 }
diff --git a/tests/language_2/extension_methods/static_extension_bounds_error_test.dart b/tests/language_2/extension_methods/static_extension_bounds_error_test.dart
index 5e8ae34..2dc6ba0 100644
--- a/tests/language_2/extension_methods/static_extension_bounds_error_test.dart
+++ b/tests/language_2/extension_methods/static_extension_bounds_error_test.dart
@@ -32,7 +32,7 @@
   // Inferred type of String does not satisfy the bound.
   s.e1;
 //  ^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 // [cfe] The getter 'e1' isn't defined for the class 'String'.
   E1(s).e1;
 //^^
@@ -56,7 +56,7 @@
   // Inferred type of String does not satisfy the bound.
   s.e2;
 //  ^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 // [cfe] The getter 'e2' isn't defined for the class 'String'.
   E2(s).e2;
 //^^
@@ -123,7 +123,7 @@
   // Inferred super-bounded type is invalid as type argument
   superRec.e4;
 //         ^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 // [cfe] The getter 'e4' isn't defined for the class 'Rec<dynamic>'.
   E4(superRec).e4;
 //^^
diff --git a/tests/language_2/extension_methods/static_extension_deferred_import_resolution_error_test.dart b/tests/language_2/extension_methods/static_extension_deferred_import_resolution_error_test.dart
index 59920e7..8dc19f1 100644
--- a/tests/language_2/extension_methods/static_extension_deferred_import_resolution_error_test.dart
+++ b/tests/language_2/extension_methods/static_extension_deferred_import_resolution_error_test.dart
@@ -10,10 +10,10 @@
   Object o = 1;
   OnObject(o).onObject;
 //^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
 // [cfe] Method not found: 'OnObject'.
   o.onObject;
   //^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'onObject' isn't defined for the class 'Object'.
 }
diff --git a/tests/language_2/extension_methods/static_extension_getter_setter_conflicts_test.dart b/tests/language_2/extension_methods/static_extension_getter_setter_conflicts_test.dart
index 1d4b4db..4986f45 100644
--- a/tests/language_2/extension_methods/static_extension_getter_setter_conflicts_test.dart
+++ b/tests/language_2/extension_methods/static_extension_getter_setter_conflicts_test.dart
@@ -23,7 +23,7 @@
   c0.m1;
   c0.m1 = 0;
   // ^^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   // [cfe] The setter 'm1' isn't defined for the class 'C0'.
   E0(c0).m1 = 0;
   E0(c0).m1;
@@ -33,26 +33,26 @@
 
   c0.m1 += 0;
   // ^^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   // [cfe] The setter 'm1' isn't defined for the class 'C0'.
 
   c0.m1++;
   // ^^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   // [cfe] The setter 'm1' isn't defined for the class 'C0'.
 
   c0.m2 = 0;
   c0.m2;
   // ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm2' isn't defined for the class 'C0'.
   c0.m2 += 0;
   // ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm2' isn't defined for the class 'C0'.
   c0.m2++;
   // ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm2' isn't defined for the class 'C0'.
 
   E0(c0).m2;
@@ -60,7 +60,7 @@
   c0[0];
   c0[0] = 0;
   //^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C0'.
   E0(c0)[0];
   //    ^^^
@@ -70,11 +70,11 @@
 
   c0[0] += 0;
   //^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C0'.
   c0[0]++;
   //^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C0'.
 
   E0(c0)[0] += 0;
@@ -109,29 +109,29 @@
 
   c1a.m1 = 0;
   //  ^^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   // [cfe] The setter 'm1' isn't defined for the class 'C1<int>'.
 
   c1a.m2;
   //  ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm2' isn't defined for the class 'C1<int>'.
 
   c1a.m2 = 0;
 
   c1a[0] = 0;
   // ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C1<int>'.
 
   c1a[0] += 0;
   // ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C1<int>'.
 
   c1a[0]++;
   // ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'C1<int>'.
 
   c1a[0];
@@ -212,29 +212,29 @@
     this.m1;
     this.m1 = 0;
     //   ^^
-    // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
     // [cfe] The setter 'm1' isn't defined for the class 'C2'.
 
     this.m2 = 0;
     this.m2;
     //   ^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'm2' isn't defined for the class 'C2'.
 
     this[0] = 0;
     this[0];
     //  ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
     // [cfe] The operator '[]' isn't defined for the class 'C2'.
 
     this[0] += 0;
     //  ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
     // [cfe] The operator '[]' isn't defined for the class 'C2'.
 
     this[0]++;
     //  ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
     // [cfe] The operator '[]' isn't defined for the class 'C2'.
 
     // Check that `this.mc` refers to `C2.mc`.
diff --git a/tests/language_2/extension_methods/static_extension_import_hide_error_test.dart b/tests/language_2/extension_methods/static_extension_import_hide_error_test.dart
index 9a93aa0..25b0461 100644
--- a/tests/language_2/extension_methods/static_extension_import_hide_error_test.dart
+++ b/tests/language_2/extension_methods/static_extension_import_hide_error_test.dart
@@ -12,7 +12,7 @@
   Object o = i;
   i.onInt;
   //^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'onInt' isn't defined for the class 'int'.
   i.onObject;
   o.onObject;
diff --git a/tests/language_2/extension_methods/static_extension_import_prefixed_hide_error_test.dart b/tests/language_2/extension_methods/static_extension_import_prefixed_hide_error_test.dart
index 3c485e8..a146f12 100644
--- a/tests/language_2/extension_methods/static_extension_import_prefixed_hide_error_test.dart
+++ b/tests/language_2/extension_methods/static_extension_import_prefixed_hide_error_test.dart
@@ -12,7 +12,7 @@
   Object o = i;
   i.onInt;
   //^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'onInt' isn't defined for the class 'int'.
   i.onObject;
   o.onObject;
diff --git a/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_error_test.dart
index c7ce72e..86941be 100644
--- a/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_error_test.dart
+++ b/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_error_test.dart
@@ -23,35 +23,35 @@
     // The instance getter shadows the global setter
     topLevelSetter = topLevelSetter + 1;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
     topLevelSetter++;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
     topLevelSetter = 0;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
 
     // The instance getter shadows the global field setter
     topLevelField = topLevelField + 1;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
     topLevelField++;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
     topLevelField = 0;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
 
     // The instance getter shadows the global method
     topLevelMethod(4);
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
@@ -115,35 +115,35 @@
     // The static getter shadows the global setter
     topLevelSetter = topLevelSetter + 1;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
     topLevelSetter++;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
     topLevelSetter = 0;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelSetter'.
 
     // The static getter shadows the global field setter
     topLevelField = topLevelField + 1;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
     topLevelField++;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
     topLevelField = 0;
 //  ^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'topLevelField'.
 
     // The static getter shadows the global method
     topLevelMethod(4);
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                   ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
@@ -211,21 +211,21 @@
     // The instance getter shadows the other extension's setter
     extensionSetter = extensionSetter + 1;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter++;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter = 0;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
 
     // The instance getter shadows the other extensions method
     extensionMethod(4);
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                 ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
@@ -242,21 +242,21 @@
     // The instance getter shadows the other extension's setter
     extensionSetter = extensionSetter + 1;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] The setter 'extensionSetter' isn't defined for the class 'A7'.
     extensionSetter++;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] The setter 'extensionSetter' isn't defined for the class 'A7'.
     extensionSetter = 0;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] The setter 'extensionSetter' isn't defined for the class 'A7'.
 
     // The instance getter shadows the other extensions method
     extensionMethod(4);
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                 ^
 // [cfe] 'extensionMethod' isn't a function or method and can't be invoked.
   }
@@ -343,15 +343,15 @@
     // The static getter shadows the other extension's setter
     extensionSetter = extensionSetter + 1;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter++;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter = 0;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
 
     // The static field shadows the other extension's setter
@@ -371,7 +371,7 @@
     // The static getter shadows the other extensions method
     extensionMethod(4);
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                     ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
@@ -389,15 +389,15 @@
     // The static getter shadows the other extension's setter
     extensionSetter = extensionSetter + 1;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter++;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
     extensionSetter = 0;
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'extensionSetter'.
 
     // The static field shadows the other extension's setter
@@ -417,7 +417,7 @@
     // The static getter shadows the other extensions method
     extensionMethod(4);
 //  ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 //                 ^
 // [cfe] The method 'call' isn't defined for the class 'int'.
   }
diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart
index d1a4685..6f6944c 100644
--- a/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart
+++ b/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart
@@ -238,21 +238,21 @@
       // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
       // [cfe] The property 'fieldInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific.
       //        ^^^^^^^^^^^^^^^^^^^^^
-      // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
       checkExtensionValue(t0);
       bool t1 = getterInExtensionScope;
       //        ^^^^^^^^^^^^^^^^^^^^^^
       // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
       // [cfe] The property 'getterInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific.
       //        ^^^^^^^^^^^^^^^^^^^^^^
-      // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
       checkExtensionValue(t1);
       setterInExtensionScope = extensionValue;
 //    ^^^^^^^^^^^^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
 // [cfe] The property 'setterInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific.
 //    ^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
       bool t2 = methodInExtensionScope();
       //        ^^^^^^^^^^^^^^^^^^^^^^
       // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_6_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_6_error_test.dart
index 38191b8..dd18be3 100644
--- a/tests/language_2/extension_methods/static_extension_internal_resolution_6_error_test.dart
+++ b/tests/language_2/extension_methods/static_extension_internal_resolution_6_error_test.dart
@@ -29,7 +29,7 @@
   void shadowTypeParam<T>(T x) {
     T y = self;
     //    ^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     // [cfe] A value of type '#T' can't be assigned to a variable of type 'T'.
   }
 
diff --git a/tests/language_2/extension_methods/static_extension_resolution_failures_test.dart b/tests/language_2/extension_methods/static_extension_resolution_failures_test.dart
index 2856a18..ce822ac 100644
--- a/tests/language_2/extension_methods/static_extension_resolution_failures_test.dart
+++ b/tests/language_2/extension_methods/static_extension_resolution_failures_test.dart
@@ -39,7 +39,7 @@
   // No `i_num` extension declared.
   i_num.i_num;
   //    ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'i_num' isn't defined for the class 'Iterable<num>'.
 
   Expect.equals("Iterable<int>.i_num", ii.i_num);
diff --git a/tests/language_2/extension_methods/static_extension_setter_getter_assignability_error_test.dart b/tests/language_2/extension_methods/static_extension_setter_getter_assignability_error_test.dart
index 8784f92..8b05ada 100644
--- a/tests/language_2/extension_methods/static_extension_setter_getter_assignability_error_test.dart
+++ b/tests/language_2/extension_methods/static_extension_setter_getter_assignability_error_test.dart
@@ -10,7 +10,7 @@
   //     ^^
   // [cfe] unspecified
   //             ^^^^^^^^
-  // [analyzer] STATIC_WARNING.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
   static void set property(String value) {}
   //                       ^^
   // [cfe] unspecified
@@ -18,7 +18,7 @@
   //  ^^
   // [cfe] unspecified
   //      ^^^^^^^^^
-  // [analyzer] STATIC_WARNING.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
   void set property2(String x) {}
   //                 ^^
   // [cfe] unspecified
diff --git a/tests/language_2/factory/factory4_test.dart b/tests/language_2/factory/factory4_test.dart
index 660b103..ad2dd27 100644
--- a/tests/language_2/factory/factory4_test.dart
+++ b/tests/language_2/factory/factory4_test.dart
@@ -5,7 +5,7 @@
 abstract class Link<T> {
   factory Link.create() = LinkFactory.create;
   //                      ^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
   // [cfe] The constructor function type 'LinkFactory<dynamic> Function()' isn't a subtype of 'Link<T> Function()'.
 }
 
diff --git a/tests/language_2/factory/factory5_test.dart b/tests/language_2/factory/factory5_test.dart
index c1b5028..ee187a5 100644
--- a/tests/language_2/factory/factory5_test.dart
+++ b/tests/language_2/factory/factory5_test.dart
@@ -5,7 +5,7 @@
 abstract class Link<T> {
   factory Link.create() = LinkFactory<T>.create;
   //                      ^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
   // [cfe] The constructor function type 'LinkFactory<T> Function()' isn't a subtype of 'Link<T> Function()'.
 }
 
diff --git a/tests/language_2/factory/factory6_test.dart b/tests/language_2/factory/factory6_test.dart
index 7e36cb9..6084e82 100644
--- a/tests/language_2/factory/factory6_test.dart
+++ b/tests/language_2/factory/factory6_test.dart
@@ -7,7 +7,7 @@
 abstract class Link<T> {
   factory Link.Foo() = LinkFactory<T>.Foo;
   //                   ^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
   // [cfe] The constructor function type 'LinkFactory<T> Function()' isn't a subtype of 'Link<T> Function()'.
 }
 
diff --git a/tests/language_2/factory/factory_test.dart b/tests/language_2/factory/factory_test.dart
index 9d4301c..5431241 100644
--- a/tests/language_2/factory/factory_test.dart
+++ b/tests/language_2/factory/factory_test.dart
@@ -36,10 +36,10 @@
 abstract class Link<T> {
   factory Link.create() = LinkFactory<T>.create;
   //                      ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 0 type arguments.
   //                      ^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
 }
 
 class LinkFactory {
diff --git a/tests/language_2/factory/redirection3_cyclic_test.dart b/tests/language_2/factory/redirection3_cyclic_test.dart
index ed352be..13dc39b 100644
--- a/tests/language_2/factory/redirection3_cyclic_test.dart
+++ b/tests/language_2/factory/redirection3_cyclic_test.dart
@@ -28,7 +28,7 @@
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
   // [cfe] Expected an identifier, but got '('.
   //                     ^^^
-  // [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+  // [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   C();
 }
 
diff --git a/tests/language_2/factory/return_type_checked_test.dart b/tests/language_2/factory/return_type_checked_test.dart
index c882f4f..76e6f3a 100644
--- a/tests/language_2/factory/return_type_checked_test.dart
+++ b/tests/language_2/factory/return_type_checked_test.dart
@@ -7,7 +7,7 @@
 class A {
   factory A() => 42;
   //             ^^
-  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'A'.
 }
 
diff --git a/tests/language_2/field/type_check_test.dart b/tests/language_2/field/type_check_test.dart
index 51f03fc..c27d3d5 100644
--- a/tests/language_2/field/type_check_test.dart
+++ b/tests/language_2/field/type_check_test.dart
@@ -9,6 +9,6 @@
 int main() {
   new A().e = "String";
   //          ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
 }
diff --git a/tests/language_2/final/attempt_reinitialization_test.dart b/tests/language_2/final/attempt_reinitialization_test.dart
index 009998b..2db5efe 100644
--- a/tests/language_2/final/attempt_reinitialization_test.dart
+++ b/tests/language_2/final/attempt_reinitialization_test.dart
@@ -5,7 +5,7 @@
 class Foo {
   Foo(this.x);
   //       ^
-  // [analyzer] STATIC_WARNING.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
   // [cfe] 'x' is a final instance variable that has already been initialized.
   final int x = 42;
 }
@@ -15,7 +15,7 @@
   CoffeeShop.name(String shopName)
       : this.shopName = shopName;
       //     ^^^^^^^^
-      // [analyzer] STATIC_WARNING.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
+      // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
       //              ^
       // [cfe] 'shopName' is a final instance variable that has already been initialized.
 }
diff --git a/tests/language_2/final/variable_assignment_test.dart b/tests/language_2/final/variable_assignment_test.dart
index f001d40..840f0e6 100644
--- a/tests/language_2/final/variable_assignment_test.dart
+++ b/tests/language_2/final/variable_assignment_test.dart
@@ -8,18 +8,18 @@
   final x = 30;
   x = 0;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
 // [cfe] Can't assign to the final variable 'x'.
   x += 1;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
 // [cfe] Can't assign to the final variable 'x'.
   ++x;
   //^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   // [cfe] Can't assign to the final variable 'x'.
   x++;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
 // [cfe] Can't assign to the final variable 'x'.
 }
diff --git a/tests/language_2/function/malformed_result_type_test.dart b/tests/language_2/function/malformed_result_type_test.dart
index 3b0257b..d149be5 100644
--- a/tests/language_2/function/malformed_result_type_test.dart
+++ b/tests/language_2/function/malformed_result_type_test.dart
@@ -11,6 +11,6 @@
 main() {
   C<int> f() => null;
 //^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 2 type arguments.
 }
diff --git a/tests/language_2/function/type_call_getter2_test.dart b/tests/language_2/function/type_call_getter2_test.dart
index c52cb9e..789f22e 100644
--- a/tests/language_2/function/type_call_getter2_test.dart
+++ b/tests/language_2/function/type_call_getter2_test.dart
@@ -27,42 +27,42 @@
       Function
       a2 = a;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'A' can't be assigned to a variable of type 'Function'.
 
   final
       F
       a3 = a;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'A' can't be assigned to a variable of type 'int Function(String)'.
 
   final
       Function
       b2 = b;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'B' can't be assigned to a variable of type 'Function'.
 
   final
       F
       b3 = b;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'B' can't be assigned to a variable of type 'int Function(String)'.
 
   final
       Function
       c2 = c;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'C' can't be assigned to a variable of type 'Function'.
 
   final
       F
       c3 = c;
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+      // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
       // [cfe] A value of type 'C' can't be assigned to a variable of type 'int Function(String)'.
 
   Expect.throwsTypeError(() {
diff --git a/tests/language_2/generic/constructor_mixin2_test.dart b/tests/language_2/generic/constructor_mixin2_test.dart
index 6630e4e..88281e3 100644
--- a/tests/language_2/generic/constructor_mixin2_test.dart
+++ b/tests/language_2/generic/constructor_mixin2_test.dart
@@ -22,6 +22,6 @@
   checkNoDynamicTypeError(() => new D<int>(v));
   checkDynamicTypeError(() => new D<String>(v));
   //                                        ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'.
 }
diff --git a/tests/language_2/generic/constructor_mixin3_test.dart b/tests/language_2/generic/constructor_mixin3_test.dart
index 7a1a21a..04e86a1 100644
--- a/tests/language_2/generic/constructor_mixin3_test.dart
+++ b/tests/language_2/generic/constructor_mixin3_test.dart
@@ -21,6 +21,6 @@
   checkNoDynamicTypeError(() => new C1(v));
   checkDynamicTypeError(() => new C2(v));
   //                                 ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'.
 }
diff --git a/tests/language_2/generic/constructor_mixin_test.dart b/tests/language_2/generic/constructor_mixin_test.dart
index a2b828e..f79f865 100644
--- a/tests/language_2/generic/constructor_mixin_test.dart
+++ b/tests/language_2/generic/constructor_mixin_test.dart
@@ -20,6 +20,6 @@
   checkNoDynamicTypeError(() => new C<int>(v));
   checkDynamicTypeError(() => new C<String>(v));
   //                                        ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'.
 }
diff --git a/tests/language_2/generic/field_mixin6_test.dart b/tests/language_2/generic/field_mixin6_test.dart
index 47a3678..303df88 100644
--- a/tests/language_2/generic/field_mixin6_test.dart
+++ b/tests/language_2/generic/field_mixin6_test.dart
@@ -9,7 +9,7 @@
 class M<T> {
   T field1 = 0;
   //         ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'T'.
   T field2 = 0 as dynamic;
 }
diff --git a/tests/language_2/generic/function_bounds_test.dart b/tests/language_2/generic/function_bounds_test.dart
index ad7f17d..f361f64 100644
--- a/tests/language_2/generic/function_bounds_test.dart
+++ b/tests/language_2/generic/function_bounds_test.dart
@@ -2,6 +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.
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import 'dart:math';
 import 'package:expect/expect.dart';
 
diff --git a/tests/language_2/generic/function_subtype_parametrized_typedef_test.dart b/tests/language_2/generic/function_subtype_parametrized_typedef_test.dart
index a1dd791..10775ef 100644
--- a/tests/language_2/generic/function_subtype_parametrized_typedef_test.dart
+++ b/tests/language_2/generic/function_subtype_parametrized_typedef_test.dart
@@ -17,30 +17,30 @@
   H<A> haa = ha;
   H<A> hab = hb;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends B>()' can't be assigned to a variable of type 'void Function<Y extends A>()'.
   H<A> hac = hc;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends C>()' can't be assigned to a variable of type 'void Function<Y extends A>()'.
 
   H<B> hba = ha;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends A>()' can't be assigned to a variable of type 'void Function<Y extends B>()'.
   H<B> hbb = hb;
   H<B> hbc = hc;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends C>()' can't be assigned to a variable of type 'void Function<Y extends B>()'.
 
   H<C> hca = ha;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends A>()' can't be assigned to a variable of type 'void Function<Y extends C>()'.
   H<C> hcb = hb;
   //         ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y extends B>()' can't be assigned to a variable of type 'void Function<Y extends C>()'.
   H<C> hcc = hc;
 }
diff --git a/tests/language_2/generic/function_subtype_test.dart b/tests/language_2/generic/function_subtype_test.dart
index 28cb90a..d392f6d 100644
--- a/tests/language_2/generic/function_subtype_test.dart
+++ b/tests/language_2/generic/function_subtype_test.dart
@@ -14,12 +14,12 @@
   F1 f11 = f1;
   F1 f12 = f2;
   //       ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y2 extends String>()' can't be assigned to a variable of type 'void Function<X1 extends num>()'.
 
   F2 f21 = f1;
   //       ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'void Function<Y1 extends num>()' can't be assigned to a variable of type 'void Function<X2 extends String>()'.
   F2 f22 = f2;
 }
diff --git a/tests/language_2/generic/function_typedef2_test.dart b/tests/language_2/generic/function_typedef2_test.dart
index 5a3207f..704a824 100644
--- a/tests/language_2/generic/function_typedef2_test.dart
+++ b/tests/language_2/generic/function_typedef2_test.dart
@@ -27,7 +27,7 @@
 // [cfe] Can't create typedef from non-function type.
 typedef K = Function(Function<A>(A<int>));
 //                               ^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Can't use type arguments with type variable 'A'.
 typedef L = Function({x});
 //                    ^
diff --git a/tests/language_2/generic/instantiate_tearoff_test.dart b/tests/language_2/generic/instantiate_tearoff_test.dart
index 6a551f6..dc1afd4 100644
--- a/tests/language_2/generic/instantiate_tearoff_test.dart
+++ b/tests/language_2/generic/instantiate_tearoff_test.dart
@@ -2,6 +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.
 
+// VMOptions=--lazy-dispatchers
+// VMOptions=--no-lazy-dispatchers
+
 import "package:expect/expect.dart";
 
 T f<T>(T x) => x;
diff --git a/tests/language_2/generic/instantiate_type_variable_test.dart b/tests/language_2/generic/instantiate_type_variable_test.dart
index 7fb503d..8eb9c7a 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.CREATION_WITH_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
     // [cfe] Method not found: 'T'.
   }
 }
diff --git a/tests/language_2/generic/reify_typevar_static_test.dart b/tests/language_2/generic/reify_typevar_static_test.dart
index b3c502b..c589aff 100644
--- a/tests/language_2/generic/reify_typevar_static_test.dart
+++ b/tests/language_2/generic/reify_typevar_static_test.dart
@@ -11,7 +11,7 @@
   static staticFunction(bool b) =>
     b ? T :
     //  ^
-    // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
     // [cfe] Type variables can't be used in static members.
       null;
   factory C.factoryConstructor(bool b) => new C(
diff --git a/tests/language_2/generic/wrong_number_type_arguments_test.dart b/tests/language_2/generic/wrong_number_type_arguments_test.dart
index 69a0b68..53e9627 100644
--- a/tests/language_2/generic/wrong_number_type_arguments_test.dart
+++ b/tests/language_2/generic/wrong_number_type_arguments_test.dart
@@ -5,18 +5,18 @@
 // Map takes 2 type arguments.
 Map<String> foo;
 // [error line 6, column 1, length 11]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 2 type arguments.
 Map<String> baz;
 // [error line 10, column 1, length 11]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 2 type arguments.
 
 main() {
   foo = null;
   var bar = new Map<String>();
   //            ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 2 type arguments.
   baz = new Map();
 }
diff --git a/tests/language_2/getter/no_setter2_test.dart b/tests/language_2/getter/no_setter2_test.dart
index 778ce8f..22ad07e 100644
--- a/tests/language_2/getter/no_setter2_test.dart
+++ b/tests/language_2/getter/no_setter2_test.dart
@@ -11,29 +11,29 @@
   Example() {
     nextVar++;
 //  ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'nextVar'.
     this.nextVar++;
     //   ^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
     // [cfe] The getter 'nextVar' isn't defined for the class 'Example'.
     //   ^^^^^^^
-    // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
     // [cfe] The setter 'nextVar' isn't defined for the class 'Example'.
   }
   static test() {
     nextVar++;
 //  ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'nextVar'.
     this.nextVar++;
 //  ^^^^
 // [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS
 // [cfe] Expected identifier, but got 'this'.
 //       ^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
 //       ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   }
 }
 
diff --git a/tests/language_2/getter/no_setter_test.dart b/tests/language_2/getter/no_setter_test.dart
index 8d84129..260b5fc 100644
--- a/tests/language_2/getter/no_setter_test.dart
+++ b/tests/language_2/getter/no_setter_test.dart
@@ -11,28 +11,28 @@
   Example() {
     nextVar = 1;
 //  ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'nextVar'.
     this.nextVar = 1;
     //   ^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
     // [cfe] The setter 'nextVar' isn't defined for the class 'Example'.
     //   ^^^^^^^
-    // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   }
   static test() {
     nextVar = 0;
 //  ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'nextVar'.
     this.nextVar = 0;
 //  ^^^^
 // [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS
 // [cfe] Expected identifier, but got 'this'.
 //       ^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
 //       ^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
   }
 }
 
diff --git a/tests/language_2/getter/setter2_test.dart b/tests/language_2/getter/setter2_test.dart
index de9bc28..a533c41 100644
--- a/tests/language_2/getter/setter2_test.dart
+++ b/tests/language_2/getter/setter2_test.dart
@@ -37,7 +37,7 @@
   C setterField;
   A get field {
   //    ^^^^^
-  // [analyzer] STATIC_WARNING.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
     return getterField;
   }
 
@@ -74,7 +74,7 @@
   // Type 'A' has no method named 'b'
   instance1.field.b();
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'b' isn't defined for the class 'A'.
 
   instance3.field = new B();
diff --git a/tests/language_2/getter/setter_type_test.dart b/tests/language_2/getter/setter_type_test.dart
index e108848..a7caee4 100644
--- a/tests/language_2/getter/setter_type_test.dart
+++ b/tests/language_2/getter/setter_type_test.dart
@@ -10,7 +10,7 @@
 
 int get foo => bar;
 //      ^^^
-// [analyzer] STATIC_WARNING.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
+// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
 
 void set foo(String str) {
   bar = str.length;
diff --git a/tests/language_2/getter/syntax_get_set_syntax_test.dart b/tests/language_2/getter/syntax_get_set_syntax_test.dart
index e9789c6..9ccbab1 100644
--- a/tests/language_2/getter/syntax_get_set_syntax_test.dart
+++ b/tests/language_2/getter/syntax_get_set_syntax_test.dart
@@ -73,7 +73,7 @@
 // [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE
 // [cfe] The return type can't be 'var'.
 //    ^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   var get b, c;
 //^^^
 // [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE
@@ -94,7 +94,7 @@
 // [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE
 // [cfe] The return type can't be 'var'.
 //    ^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 //        ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
@@ -141,9 +141,9 @@
   List set;
   List set d;
 //^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 //^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 //         ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
@@ -153,7 +153,7 @@
 // [cfe] A setter should have exactly one formal parameter.
   List set e, f;
 //^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 //         ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
@@ -189,9 +189,9 @@
   List<int> set;
   List<int> set d;
 //^^^^^^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 //^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 //              ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
@@ -201,7 +201,7 @@
 // [cfe] A setter should have exactly one formal parameter.
   List<int> set e, f;
 //^^^^^^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 //              ^
 // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
 // [cfe] A method declaration needs an explicit list of parameters.
diff --git a/tests/language_2/identifier/known_prefix_error_test.dart b/tests/language_2/identifier/known_prefix_error_test.dart
index a104b53..06ec097 100644
--- a/tests/language_2/identifier/known_prefix_error_test.dart
+++ b/tests/language_2/identifier/known_prefix_error_test.dart
@@ -23,131 +23,131 @@
 
 async<dynamic> _async = new async.A();
 // [error line 24, column 1, length 5]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'async' isn't a type.
 // [error line 24, column 1]
 // [cfe] Expected 0 type arguments.
 await<dynamic> _await = new await.A();
 // [error line 30, column 1, length 5]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'await' isn't a type.
 // [error line 30, column 1]
 // [cfe] Expected 0 type arguments.
 hide<dynamic> _hide = new hide.A();
 // [error line 36, column 1, length 4]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'hide' isn't a type.
 // [error line 36, column 1]
 // [cfe] Expected 0 type arguments.
 of<dynamic> _of = new of.A();
 // [error line 42, column 1, length 2]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'of' isn't a type.
 // [error line 42, column 1]
 // [cfe] Expected 0 type arguments.
 on<dynamic> _on = new on.A();
 // [error line 48, column 1, length 2]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'on' isn't a type.
 // [error line 48, column 1]
 // [cfe] Expected 0 type arguments.
 show<dynamic> _show = new show.A();
 // [error line 54, column 1, length 4]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'show' isn't a type.
 // [error line 54, column 1]
 // [cfe] Expected 0 type arguments.
 sync<dynamic> _sync = new sync.A();
 // [error line 60, column 1, length 4]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'sync' isn't a type.
 // [error line 60, column 1]
 // [cfe] Expected 0 type arguments.
 yield<dynamic> _yield = new yield.A();
 // [error line 66, column 1, length 5]
-// [analyzer] STATIC_WARNING.NOT_A_TYPE
+// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
 // [cfe] 'yield' isn't a type.
 // [error line 66, column 1]
 // [cfe] Expected 0 type arguments.
 
 async.B<async> _B_async = new async.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'async' isn't a type.
 await.B<await> _B_await = new await.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'await' isn't a type.
 hide.B<hide> _B_hide = new hide.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'hide' isn't a type.
 of.B<of> _B_of = new of.B();
 //   ^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'of' isn't a type.
 on.B<on> _B_on = new on.B();
 //   ^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'on' isn't a type.
 show.B<show> _B_show = new show.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'show' isn't a type.
 sync.B<sync> _B_sync = new sync.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'sync' isn't a type.
 yield.B<yield> _B_yield = new yield.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'yield' isn't a type.
 
 async.B<async<dynamic>> _B2_async = new async.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'async' isn't a type.
 //      ^
 // [cfe] Expected 0 type arguments.
 await.B<await<dynamic>> _B2_await = new await.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'await' isn't a type.
 //      ^
 // [cfe] Expected 0 type arguments.
 hide.B<hide<dynamic>> _B2_hide = new hide.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'hide' isn't a type.
 //     ^
 // [cfe] Expected 0 type arguments.
 of.B<of<dynamic>> _B2_of = new of.B();
 //   ^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'of' isn't a type.
 //   ^
 // [cfe] Expected 0 type arguments.
 on.B<on<dynamic>> _B2_on = new on.B();
 //   ^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'on' isn't a type.
 //   ^
 // [cfe] Expected 0 type arguments.
 show.B<show<dynamic>> _B2_show = new show.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'show' isn't a type.
 //     ^
 // [cfe] Expected 0 type arguments.
 sync.B<sync<dynamic>> _B2_sync = new sync.B();
 //     ^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'sync' isn't a type.
 //     ^
 // [cfe] Expected 0 type arguments.
 yield.B<yield<dynamic>> _B2_yield = new yield.B();
 //      ^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'yield' isn't a type.
 //      ^
 // [cfe] Expected 0 type arguments.
diff --git a/tests/language_2/if_null/assignment_behavior_test.dart b/tests/language_2/if_null/assignment_behavior_test.dart
index a95aa57..6b02779 100644
--- a/tests/language_2/if_null/assignment_behavior_test.dart
+++ b/tests/language_2/if_null/assignment_behavior_test.dart
@@ -122,7 +122,7 @@
     yGetValue = 1; check(1, () => v ??= y, ['$s.v', 'y', '$s.v=1']);
     finalOne ??= null;
 //  ^^^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL
 // [cfe] The setter 'finalOne' isn't defined for the class 'C'.
     yGetValue = 1;
   }
@@ -163,11 +163,11 @@
   { var l; yGetValue = 1; check(1, () => l ??= y, ['y']); Expect.equals(1, l); }
   { final l = 1; l ??= null; }
   //             ^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_LOCAL
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL
   // [cfe] Can't assign to the final variable 'l'.
   C ??= null;
 //^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
 // [cfe] Can't assign to a type literal.
   h ??= null;
 //^
@@ -214,11 +214,11 @@
   check(1, () => C?.x ??= bad(), ['C.x']);
   h.C.xgetValue = 1;
   //  ^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] Setter not found: 'xgetValue'.
   check(1, () => h.c?.x ??= bad(), ['h.C.x']);
   //               ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_PREFIXED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_PREFIXED_NAME
   // [cfe] Getter not found: 'c'.
   yGetValue = 1;
   check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']);
diff --git a/tests/language_2/if_null/precedence_test.dart b/tests/language_2/if_null/precedence_test.dart
index cb419fc..224238f 100644
--- a/tests/language_2/if_null/precedence_test.dart
+++ b/tests/language_2/if_null/precedence_test.dart
@@ -29,7 +29,7 @@
   // "(a ?? b) || c" would allow b to have any type provided that a is bool.
   false ?? 1 || true;
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 
   // "a || b ?? c" should parse as "(a || b) ?? c", therefore it is a static
@@ -37,7 +37,7 @@
   // "a || (b ?? c)" would allow b to have any type provided that c is bool.
   false || 1 ?? true;
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.NON_BOOL_OPERAND
+  // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'.
 
   // An incorrect parse of "a || (b ?? c)" would result in no checked-mode
diff --git a/tests/language_2/import/combinators2_test.dart b/tests/language_2/import/combinators2_test.dart
index 47a2db0..c1ee2fb 100644
--- a/tests/language_2/import/combinators2_test.dart
+++ b/tests/language_2/import/combinators2_test.dart
@@ -14,6 +14,6 @@
   // Ugly is hidden.
   print(ugly);
   //    ^^^^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Getter not found: 'ugly'.
 }
diff --git a/tests/language_2/import/name_clash_lib1.dart b/tests/language_2/import/name_clash_lib1.dart
new file mode 100644
index 0000000..8fbfaf3
--- /dev/null
+++ b/tests/language_2/import/name_clash_lib1.dart
@@ -0,0 +1,5 @@
+// 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.
+
+library clashing.nonempty.name;
diff --git a/tests/language_2/import/name_clash_lib2.dart b/tests/language_2/import/name_clash_lib2.dart
new file mode 100644
index 0000000..8fbfaf3
--- /dev/null
+++ b/tests/language_2/import/name_clash_lib2.dart
@@ -0,0 +1,5 @@
+// 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.
+
+library clashing.nonempty.name;
diff --git a/tests/language_2/import/name_clash_test.dart b/tests/language_2/import/name_clash_test.dart
new file mode 100644
index 0000000..72d06a5
--- /dev/null
+++ b/tests/language_2/import/name_clash_test.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.
+
+// Check that a library name clash is not an error.
+
+import "name_clash_lib1.dart";
+import "name_clash_lib2.dart";
+
+export "name_clash_lib1.dart";
+export "name_clash_lib2.dart";
+
+main() {}
diff --git a/tests/language_2/import/self_test.dart b/tests/language_2/import/self_test.dart
index 1feeb88..f724a60 100644
--- a/tests/language_2/import/self_test.dart
+++ b/tests/language_2/import/self_test.dart
@@ -18,6 +18,6 @@
 main() {
   p._x;
   //^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_PREFIXED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_PREFIXED_NAME
   // [cfe] Getter not found: '_x'.
 }
diff --git a/tests/language_2/inference/accessor_ref_test.dart b/tests/language_2/inference/accessor_ref_test.dart
index 8f16f8b..ec80b14 100644
--- a/tests/language_2/inference/accessor_ref_test.dart
+++ b/tests/language_2/inference/accessor_ref_test.dart
@@ -35,14 +35,14 @@
   x = new E();
   x = new B();
   //  ^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //      ^
   // [cfe] A value of type 'B' can't be assigned to a variable of type 'C'.
   y = new C();
   y = new E();
   y = new B();
   //  ^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //      ^
   // [cfe] A value of type 'B' can't be assigned to a variable of type 'C'.
 }
diff --git a/tests/language_2/initializing_formal/type_annotation_test.dart b/tests/language_2/initializing_formal/type_annotation_test.dart
index b15ad9a..6ca6548 100644
--- a/tests/language_2/initializing_formal/type_annotation_test.dart
+++ b/tests/language_2/initializing_formal/type_annotation_test.dart
@@ -10,14 +10,12 @@
   C.subType(int this.a);
   C.superType(dynamic this.a);
   //          ^^^^^^^^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.INVALID_PARAMETER_DECLARATION
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
   //                       ^
   // [cfe] The type of parameter 'a', 'dynamic' is not a subtype of the corresponding field's type, 'num'.
   C.unrelatedType(String this.a);
   //              ^^^^^^^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.INVALID_PARAMETER_DECLARATION
-  //              ^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE
   //                          ^
   // [cfe] The type of parameter 'a', 'String' is not a subtype of the corresponding field's type, 'num'.
 }
diff --git a/tests/language_2/interface/static_method_test.dart b/tests/language_2/interface/static_method_test.dart
index b07e7b9..63783ef 100644
--- a/tests/language_2/interface/static_method_test.dart
+++ b/tests/language_2/interface/static_method_test.dart
@@ -12,6 +12,6 @@
 main() {
   A();
 //^
-// [analyzer] STATIC_WARNING.INSTANTIATE_ABSTRACT_CLASS
+// [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS
 // [cfe] The class 'A' is abstract and can't be instantiated.
 }
diff --git a/tests/language_2/is/isnot_malformed_type_test.dart b/tests/language_2/is/isnot_malformed_type_test.dart
index 11715e2..c81c644 100644
--- a/tests/language_2/is/isnot_malformed_type_test.dart
+++ b/tests/language_2/is/isnot_malformed_type_test.dart
@@ -8,7 +8,7 @@
   // 'Baz' is not loaded, throws a type error on test.
   return (obj is! Baz);
   //              ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   // [cfe] 'Baz' isn't a type.
 }
 
diff --git a/tests/language_2/is/malformed_type_test.dart b/tests/language_2/is/malformed_type_test.dart
index d54d4de..9628aa8 100644
--- a/tests/language_2/is/malformed_type_test.dart
+++ b/tests/language_2/is/malformed_type_test.dart
@@ -14,7 +14,7 @@
   // malformed type.
     if (e is Undefined) Expect.fail("unreachable");
     //       ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -23,7 +23,7 @@
   // malformed type.
     if (e as Undefined) Expect.fail("unreachable");
     //       ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -33,7 +33,7 @@
     // Regression test for issue 16985.
     if (e is Undefined && testEval(e)) Expect.fail("unreachable");
     //       ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -43,7 +43,7 @@
     // Regression test for issue 16985.
     if (e as Undefined && testEval(e)) Expect.fail("unreachable");
     //       ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -52,7 +52,7 @@
   // runtime error is thrown.
     if (testEval(e) is Undefined) Expect.fail("unreachable");
     //                 ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
     // [cfe] 'Undefined' isn't a type.
 }
 
@@ -61,7 +61,7 @@
   // runtime error is thrown.
     if (testEval(e) as Undefined) Expect.fail("unreachable");
     //                 ^^^^^^^^^
-    // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
     // [cfe] 'Undefined' isn't a type.
 }
 
diff --git a/tests/language_2/is/not_class1_test.dart b/tests/language_2/is/not_class1_test.dart
index 6de8f8b..bb9a756 100644
--- a/tests/language_2/is/not_class1_test.dart
+++ b/tests/language_2/is/not_class1_test.dart
@@ -9,7 +9,7 @@
   var a = A();
   if (a is "A") return 0;
   // [error line 10, column 12, length 0]
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   // [cfe] Expected ')' before this.
   //       ^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language_2/is/not_class2_test.dart b/tests/language_2/is/not_class2_test.dart
index 9073117..9e82ec1 100644
--- a/tests/language_2/is/not_class2_test.dart
+++ b/tests/language_2/is/not_class2_test.dart
@@ -18,7 +18,7 @@
 
     if (a is aa) {
     //       ^^
-    // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
     // [cfe] 'aa' isn't a type.
       return 0;
     }
diff --git a/tests/language_2/label/label8_test.dart b/tests/language_2/label/label8_test.dart
index df4f1b8..a40c1b7 100644
--- a/tests/language_2/label/label8_test.dart
+++ b/tests/language_2/label/label8_test.dart
@@ -13,7 +13,7 @@
   {
     case 111:
 //  ^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Expected ';' after this.
 //  ^^^^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status
index 72e60ac..c602c82 100644
--- a/tests/language_2/language_2.status
+++ b/tests/language_2/language_2.status
@@ -35,6 +35,9 @@
 stack_trace/demangle_ctors_test: SkipByDesign # Names are not scrubbed.
 type/checks_in_factory_method_test: SkipByDesign # Requires checked mode.
 
+[ $compiler != dart2analyzer && $compiler != fasta ]
+identifier/built_in_type_annotation_test/*: SkipByDesign # Analyzer/CFE only tests.
+
 [ $compiler != dart2js && $compiler != dartdevc && !$checked ]
 function_type/*: Skip # Needs checked mode.
 
diff --git a/tests/language_2/least_upper_bound/expansive_test.dart b/tests/language_2/least_upper_bound/expansive_test.dart
index d798b15..970b685 100644
--- a/tests/language_2/least_upper_bound/expansive_test.dart
+++ b/tests/language_2/least_upper_bound/expansive_test.dart
@@ -42,37 +42,37 @@
     // Is least upper bound dynamic?
     (z ? a : b).z;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'z' isn't defined for the class 'Object'.
 
     // Is least upper bound N<...> ?
     (z ? a : b).n;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound C1<...> ?
     (z ? a : b).c1;
     //          ^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c1' isn't defined for the class 'Object'.
 
     // Is least upper bound N<dynamic> ?
     (z ? a : b).n.z;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound N<N<...>> ?
     (z ? a : b).n.n;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound N<C1<...>> ?
     (z ? a : b).n.c1;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
   }
 }
@@ -106,37 +106,37 @@
     // Is least upper bound dynamic?
     (z ? a : b).z;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'z' isn't defined for the class 'Object'.
 
     // Is least upper bound N<...> ?
     (z ? a : b).n;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound C2<...> ?
     (z ? a : b).c2;
     //          ^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c2' isn't defined for the class 'Object'.
 
     // Is least upper bound N<dynamic> ?
     (z ? a : b).n.z;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound N<N<...>> ?
     (z ? a : b).n.n;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
 
     // Is least upper bound N<C2<...>> ?
     (z ? a : b).n.c2;
     //          ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'n' isn't defined for the class 'Object'.
   }
 }
diff --git a/tests/language_2/least_upper_bound/least_upper_bound_test.dart b/tests/language_2/least_upper_bound/least_upper_bound_test.dart
index 4815316..4a7a784 100644
--- a/tests/language_2/least_upper_bound/least_upper_bound_test.dart
+++ b/tests/language_2/least_upper_bound/least_upper_bound_test.dart
@@ -47,11 +47,11 @@
   B r2 = false ? a : b;
   (true ? a : b).a = 0;
   //             ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'a' isn't defined for the class 'Object'.
   (false ? a : b).b = 0;
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'b' isn't defined for the class 'Object'.
   var c = new C();
   (true ? a as dynamic : c).a = 0;
@@ -64,7 +64,7 @@
   (true ? b : c).b = 0;
   (false ? b : c).c = 0;
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'c' isn't defined for the class 'B'.
   var a = null;
   (true ? b : a).b = 0;
@@ -80,11 +80,11 @@
   (false ? c : d).b = 0;
   (true ? c : d).c = 0;
   //             ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'c' isn't defined for the class 'B'.
   (false ? c : d).d = 0;
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'd' isn't defined for the class 'B'.
 }
 
@@ -94,12 +94,12 @@
   F<C> r2 = false ? e : f;
   A r3 = true ? e : f;
   //     ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //          ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'A'.
   B r4 = false ? e : f;
   //     ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //           ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'B'.
   (true ? e : f).e = null;
@@ -112,18 +112,18 @@
   F<C> r2 = false ? e : f;
   A r3 = true ? e : f;
   //     ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //          ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'A'.
   B r4 = false ? e : f;
   //     ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //           ^
   // [cfe] A value of type 'E<B>' can't be assigned to a variable of type 'B'.
   var r5;
   r5 = (true ? e : f).e;
   r5 = (false ? e : f).f;
   //                   ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'f' isn't defined for the class 'E<B>'.
 }
diff --git a/tests/language_2/list/literal1_test.dart b/tests/language_2/list/literal1_test.dart
index f8db7b2..cd54906 100644
--- a/tests/language_2/list/literal1_test.dart
+++ b/tests/language_2/list/literal1_test.dart
@@ -9,9 +9,9 @@
       <String>
       [0, 1];
 //     ^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
 //        ^
-// [analyzer] STATIC_WARNING.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
 // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
 }
diff --git a/tests/language_2/malformed/inheritance_test.dart b/tests/language_2/malformed/inheritance_test.dart
index 55154d7..8eed858 100644
--- a/tests/language_2/malformed/inheritance_test.dart
+++ b/tests/language_2/malformed/inheritance_test.dart
@@ -18,7 +18,7 @@
 class C1
     extends A<Unresolved>
     //        ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -36,7 +36,7 @@
 class C3
     extends Object with A<Unresolved>
     //                    ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -52,7 +52,7 @@
 class C5
     implements A<Unresolved>
     //           ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -63,7 +63,7 @@
     // [analyzer] COMPILE_TIME_ERROR.EXTENDS_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //      ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     {
 }
 
@@ -73,9 +73,9 @@
     // [analyzer] COMPILE_TIME_ERROR.EXTENDS_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //      ^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     //        ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -88,7 +88,7 @@
     // [analyzer] COMPILE_TIME_ERROR.MIXIN_OF_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //                  ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     {
 }
 
@@ -100,9 +100,9 @@
     // [analyzer] COMPILE_TIME_ERROR.MIXIN_OF_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //                  ^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     //                    ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
@@ -113,7 +113,7 @@
     // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //         ^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     {
 }
 
@@ -123,9 +123,9 @@
     // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS
     // [cfe] Can't use type arguments with type variable 'A'.
     //         ^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+    // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
     //           ^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
     // [cfe] Type 'Unresolved' not found.
     {
 }
diff --git a/tests/language_2/malformed/malformed_test.dart b/tests/language_2/malformed/malformed_test.dart
index 119001c..7f51c3d 100644
--- a/tests/language_2/malformed/malformed_test.dart
+++ b/tests/language_2/malformed/malformed_test.dart
@@ -8,20 +8,20 @@
 checkIsUnresolved(var v) {
   v is Unresolved;
   //   ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   // [cfe] 'Unresolved' isn't a type.
   v is Unresolved<int>;
   //   ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   // [cfe] 'Unresolved' isn't a type.
   v is prefix.Unresolved;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   //          ^
   // [cfe] 'Unresolved' isn't a type.
   v is prefix.Unresolved<int>;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_UNDEFINED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME
   //          ^
   // [cfe] 'Unresolved' isn't a type.
 }
@@ -29,45 +29,45 @@
 checkIsListUnresolved(var v) {
   v is List<Unresolved>;
   //        ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   // [cfe] 'Unresolved' isn't a type.
   v is List<Unresolved<int>>;
   //        ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   // [cfe] 'Unresolved' isn't a type.
   v is List<prefix.Unresolved>;
   //        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   //               ^
   // [cfe] 'Unresolved' isn't a type.
   v is List<prefix.Unresolved<int>>;
   //        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   //               ^
   // [cfe] 'Unresolved' isn't a type.
   v is List<int, String>;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 1 type arguments.
 }
 
 checkAsUnresolved(var v) {
   v as Unresolved;
   //   ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   // [cfe] 'Unresolved' isn't a type.
   v as Unresolved<int>;
   //   ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   // [cfe] 'Unresolved' isn't a type.
   v as prefix.Unresolved;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   //          ^
   // [cfe] 'Unresolved' isn't a type.
   v as prefix.Unresolved<int>;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   //          ^
   // [cfe] 'Unresolved' isn't a type.
 }
@@ -75,25 +75,25 @@
 checkAsListUnresolved(var v) {
   v as List<Unresolved>;
   //        ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   // [cfe] 'Unresolved' isn't a type.
   v as List<Unresolved<int>>;
   //        ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   // [cfe] 'Unresolved' isn't a type.
   v as List<prefix.Unresolved>;
   //        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   //               ^
   // [cfe] 'Unresolved' isn't a type.
   v as List<prefix.Unresolved<int>>;
   //        ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+  // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
   //               ^
   // [cfe] 'Unresolved' isn't a type.
   v as List<int, String>;
   //   ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 1 type arguments.
 }
 
@@ -105,11 +105,11 @@
 
   new undeclared_prefix.Unresolved();
   //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'undeclared_prefix.Unresolved'.
   new undeclared_prefix.Unresolved<int>();
   //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'undeclared_prefix.Unresolved'.
 
   try {
@@ -117,7 +117,7 @@
   }
     on Unresolved
     // ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     // [cfe] 'Unresolved' isn't a type.
     catch (e) {
   }
@@ -127,7 +127,7 @@
   }
     on Unresolved<int>
     // ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     // [cfe] 'Unresolved' isn't a type.
     catch (e) {
   }
@@ -137,7 +137,7 @@
   }
     on prefix.Unresolved
     // ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     //        ^
     // [cfe] 'Unresolved' isn't a type.
     catch (e) {
@@ -148,7 +148,7 @@
   }
     on prefix.Unresolved<int>
     // ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     //        ^
     // [cfe] 'Unresolved' isn't a type.
     catch (e) {
@@ -159,7 +159,7 @@
   }
     on undeclared_prefix.Unresolved<int>
     // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NON_TYPE_IN_CATCH_CLAUSE
+    // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE
     // [cfe] 'undeclared_prefix.Unresolved' can't be used as a type because 'undeclared_prefix' isn't defined.
     catch (e) {
   }
diff --git a/tests/language_2/map/literal13_test.dart b/tests/language_2/map/literal13_test.dart
index ec5e0be..08f06e4 100644
--- a/tests/language_2/map/literal13_test.dart
+++ b/tests/language_2/map/literal13_test.dart
@@ -7,7 +7,7 @@
 main() {
   var map = new Map<int>{ "a": 1, "b": 2, "c": 3 };
   //            ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 2 type arguments.
   //                   ^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language_2/map/literal1_test.dart b/tests/language_2/map/literal1_test.dart
index 71c4e8e..49aa5fa 100644
--- a/tests/language_2/map/literal1_test.dart
+++ b/tests/language_2/map/literal1_test.dart
@@ -9,6 +9,6 @@
       <String, String>
     {"a": 0};
     //    ^
-    // [analyzer] STATIC_WARNING.MAP_VALUE_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.MAP_VALUE_TYPE_NOT_ASSIGNABLE
     // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
 }
diff --git a/tests/language_2/method/not_found_test.dart b/tests/language_2/method/not_found_test.dart
index 4755cba..883cd6f 100644
--- a/tests/language_2/method/not_found_test.dart
+++ b/tests/language_2/method/not_found_test.dart
@@ -7,7 +7,7 @@
 // [cfe] The non-abstract class 'A' is missing implementations for these members:
   B();
 //^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   static const field = const B();
   //                         ^
   // [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER
diff --git a/tests/language_2/mixin/illegal_constructor_test.dart b/tests/language_2/mixin/illegal_constructor_test.dart
index b6df547..b70f764 100644
--- a/tests/language_2/mixin/illegal_constructor_test.dart
+++ b/tests/language_2/mixin/illegal_constructor_test.dart
@@ -102,7 +102,7 @@
   // [cfe] Too many positional arguments: 0 allowed, but 3 found.
   new C0.named();
   //     ^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'C0.named'.
   new D0(1,2,3);
   //    ^^^^^^^
@@ -110,6 +110,6 @@
   // [cfe] Too many positional arguments: 0 allowed, but 3 found.
   new D0.named();
   //     ^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'D0.named'.
 }
diff --git a/tests/language_2/mixin/illegal_static_access_test.dart b/tests/language_2/mixin/illegal_static_access_test.dart
index 21e2348..8cd792d 100644
--- a/tests/language_2/mixin/illegal_static_access_test.dart
+++ b/tests/language_2/mixin/illegal_static_access_test.dart
@@ -20,10 +20,10 @@
 
   Expect.throwsNoSuchMethodError(() => C.foo());
   //                                     ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.foo'.
   Expect.throwsNoSuchMethodError(() => C.bar());
   //                                     ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.bar'.
 }
diff --git a/tests/language_2/mixin/illegal_super_use_test.dart b/tests/language_2/mixin/illegal_super_use_test.dart
index 89c3a76..ca47645 100644
--- a/tests/language_2/mixin/illegal_super_use_test.dart
+++ b/tests/language_2/mixin/illegal_super_use_test.dart
@@ -11,22 +11,22 @@
     super.toString();
     super.foo();
     //    ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_METHOD
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_METHOD
     // [cfe] Superclass has no method named 'foo'.
     super.bar = 100;
     //    ^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_SETTER
     // [cfe] Superclass has no setter named 'bar'.
 
     void inner() {
       super.toString();
       super.foo();
       //    ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_METHOD
       // [cfe] Superclass has no method named 'foo'.
       super.bar = 100;
       //    ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_SETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_SETTER
       // [cfe] Superclass has no setter named 'bar'.
     }
     inner();
@@ -35,11 +35,11 @@
       super.toString();
       super.foo();
       //    ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_METHOD
       // [cfe] Superclass has no method named 'foo'.
       super.bar = 100;
       //    ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SUPER_SETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_SETTER
       // [cfe] Superclass has no setter named 'bar'.
     })();
 
diff --git a/tests/language_2/mixin/method_override_test.dart b/tests/language_2/mixin/method_override_test.dart
index 3987455..137156e 100644
--- a/tests/language_2/mixin/method_override_test.dart
+++ b/tests/language_2/mixin/method_override_test.dart
@@ -302,7 +302,7 @@
 // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
 class G5 = GTTnum with CII;
 //    ^^
-// [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
 // [cfe] The mixin application class 'G5' introduces an erroneous override of 'id'.
 //    ^
 // [cfe] The non-abstract class 'G5' is missing implementations for these members:
diff --git a/tests/language_2/mixin/type_parameters_errors_test.dart b/tests/language_2/mixin/type_parameters_errors_test.dart
index 2988b2f..25e99b6 100644
--- a/tests/language_2/mixin/type_parameters_errors_test.dart
+++ b/tests/language_2/mixin/type_parameters_errors_test.dart
@@ -11,11 +11,11 @@
 //    ^
 // [cfe] The type 'M<U, V>' can't be mixed in.
 //                           ^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 1 type arguments.
 class C<A, B> extends S<A, int> with M { }
 //                    ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 1 type arguments.
 
 class F<X> = S<X> with M<X>;
@@ -23,7 +23,7 @@
 //    ^
 // [cfe] The type 'M<double, double>' can't be mixed in.
 //                    ^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 1 type arguments.
 
 main() {
@@ -32,11 +32,11 @@
   a = new A<int>();
   a = new A<String, String>();
   //      ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 1 type arguments.
   a = new F<int>();
   a = new F<int, String>();
   //      ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
   // [cfe] Expected 1 type arguments.
 }
diff --git a/tests/language_2/new/create_unresolved_type_test.dart b/tests/language_2/new/create_unresolved_type_test.dart
index 6d215ab..16fb7a6 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.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 b32f0e1..da303e3 100644
--- a/tests/language_2/new/expression_type_args_test.dart
+++ b/tests/language_2/new/expression_type_args_test.dart
@@ -7,20 +7,20 @@
   // Can't instantiate type parameter (within static or instance method).
   m1() => new T();
   //          ^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'T'.
   static m2() => new T();
   //                 ^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'T'.
   //                 ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
 
   // OK when used within instance method, but not in static method.
   m3() => new A<T>();
   static m4() => new A<T>();
   //                   ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
 }
 
diff --git a/tests/language_2/new/prefix_test.dart b/tests/language_2/new/prefix_test.dart
index bef0d69..8e5c7bc 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix'.
 }
diff --git a/tests/language_2/null/checked_null_test.dart b/tests/language_2/null/checked_null_test.dart
index f6187cc..f33227b 100644
--- a/tests/language_2/null/checked_null_test.dart
+++ b/tests/language_2/null/checked_null_test.dart
@@ -25,6 +25,6 @@
   // crash.
   new A().a.foo();
   //        ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'foo' isn't defined for the class 'Map<dynamic, dynamic>'.
 }
diff --git a/tests/language_2/null_aware/access_test.dart b/tests/language_2/null_aware/access_test.dart
index 4965ccb..7a216c9 100644
--- a/tests/language_2/null_aware/access_test.dart
+++ b/tests/language_2/null_aware/access_test.dart
@@ -35,19 +35,19 @@
   { int i = new C(1)?.v; Expect.equals(1, i); }
   { String s = new C(null)?.v; Expect.equals(null, s); }
   //           ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //               ^
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
   { C.staticInt = 1; int i = C?.staticInt; Expect.equals(1, i); }
   { h.C.staticInt = 1; int i = h.C?.staticInt; Expect.equals(1, i); }
   { C.staticInt = null; String s = C?.staticInt; Expect.equals(null, s); }
   //                               ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                  ^
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
   { h.C.staticInt = null; String s = h.C?.staticInt; Expect.equals(null, s); }
   //                                 ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                      ^
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
 
@@ -56,11 +56,11 @@
   // generated in the case of e1?.id.
   Expect.equals(null, nullC()?.bad);
   //                           ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'bad' isn't defined for the class 'C'.
   { B b = new C(1); Expect.equals(1, b?.v); }
   //                                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'v' isn't defined for the class 'B'.
 
   // '?.' cannot be used to access toplevel properties in libraries imported via
@@ -73,10 +73,10 @@
   // Nor can it be used to access the hashCode getter on the class Type.
   Expect.throwsNoSuchMethodError(() => C?.hashCode);
   //                                      ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] Getter not found: 'hashCode'.
   Expect.throwsNoSuchMethodError(() => h.C?.hashCode);
   //                                        ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] Getter not found: 'hashCode'.
 }
diff --git a/tests/language_2/null_aware/assignment_test.dart b/tests/language_2/null_aware/assignment_test.dart
index adbe290..22bde4f 100644
--- a/tests/language_2/null_aware/assignment_test.dart
+++ b/tests/language_2/null_aware/assignment_test.dart
@@ -56,20 +56,20 @@
   // The static type of e1?.v = e2 is the static type of e2.
   { D d = new D(new E()); G g = new G(); F f = (d?.v = g); Expect.identical(f, g); }
   { D d = new D(new E()); E e = new G(); F f = (d?.v = e); }
-  //                                           ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                            ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                            ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
   { D.staticE = new E(); G g = new G(); F f = (D?.staticE = g); Expect.identical(f, g); }
   { h.D.staticE = new h.E(); h.G g = new h.G(); h.F f = (h.D?.staticE = g); Expect.identical(f, g); }
   { D.staticE = new E(); E e = new G(); F f = (D?.staticE = e); }
-  //                                          ^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                           ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                              ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
   { h.D.staticE = new h.E(); h.E e = new h.G(); h.F f = (h.D?.staticE = e); }
-  //                                                    ^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                                     ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                                          ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
 
@@ -77,11 +77,11 @@
   // also generated in the case of e1?.v = e2.
   Expect.equals(null, nullC()?.bad = bad());
   //                           ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'bad' isn't defined for the class 'C'.
   { B b = new C(1); Expect.equals(2, b?.v = 2); }
   //                                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'v' isn't defined for the class 'B'.
 
   // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
@@ -101,40 +101,40 @@
   // also generated in the case of e1?.v op= e2.
   nullC()?.bad = bad();
   //       ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'bad' isn't defined for the class 'C'.
   { B b = new C(1); b?.v += 2; }
   //                   ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'v' isn't defined for the class 'B'.
   //                   ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
   // [cfe] The setter 'v' isn't defined for the class 'B'.
   { D d = new D(new E()); F f = (d?.v += nullC()); }
   //                                     ^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'C' can't be assigned to a variable of type 'int'.
   { D d = new D(new E()); H h = (d?.v += 1); }
-  //                            ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                             ^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                             ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
   { D.staticE = new E(); F f = (D?.staticE += nullC()); }
   //                                          ^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'C' can't be assigned to a variable of type 'int'.
   { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += h.nullC()); }
   //                                                  ^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'C' can't be assigned to a variable of type 'int'.
   { D.staticE = new E(); H h = (D?.staticE += 1); }
-  //                           ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                            ^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                               ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
   { h.D.staticE = new h.E(); h.H hh = (h.D?.staticE += 1); }
-  //                                  ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                   ^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                        ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
 
diff --git a/tests/language_2/null_aware/increment_decrement_test.dart b/tests/language_2/null_aware/increment_decrement_test.dart
index 2341f98..4e7796e 100644
--- a/tests/language_2/null_aware/increment_decrement_test.dart
+++ b/tests/language_2/null_aware/increment_decrement_test.dart
@@ -52,18 +52,18 @@
   { E e1 = new E(); D d = new D(e1); E e2 = d?.v++; Expect.identical(e1, e2); }
   { G g = new G(); D d = new D(g); F f = d?.v++; Expect.identical(f, g); }
   //                                     ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
   { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE++; Expect.identical(e1, e2); }
   { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE++; Expect.identical(e1, e2); }
   { G g = new G(); D.staticE = g; F f = D?.staticE++; Expect.identical(f, g); }
   //                                    ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                              ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
   { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE++; Expect.identical(f, g); }
   //                                            ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                                        ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
 
@@ -79,18 +79,18 @@
   { E e1 = new E(); D d = new D(e1); E e2 = d?.v--; Expect.identical(e1, e2); }
   { G g = new G(); D d = new D(g); F f = d?.v--; Expect.identical(f, g); }
   //                                     ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
   { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE--; Expect.identical(e1, e2); }
   { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE--; Expect.identical(e1, e2); }
   { G g = new G(); D.staticE = g; F f = D?.staticE--; Expect.identical(f, g); }
   //                                    ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                              ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
   { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE--; Expect.identical(f, g); }
   //                                            ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                                        ^
   // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'.
 
@@ -106,19 +106,19 @@
   { D d = new D(new E()); F f = ++d?.v; Expect.identical(d.v, f); }
   { D d = new D(new E()); H h = ++d?.v; Expect.identical(d.v, h); }
   //                            ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                              ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
   { D.staticE = new E(); F f = ++D?.staticE; Expect.identical(D.staticE, f); }
   { h.D.staticE = new h.E(); h.F f = ++h.D?.staticE; Expect.identical(h.D.staticE, f); }
   { D.staticE = new E(); H h = ++D?.staticE; Expect.identical(D.staticE, h); }
   //                           ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
   { h.D.staticE = new h.E(); h.H hh = ++h.D?.staticE; Expect.identical(h.D.staticE, hh); }
   //                                  ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                         ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
 
@@ -134,19 +134,19 @@
   { D d = new D(new E()); F f = --d?.v; Expect.identical(d.v, f); }
   { D d = new D(new E()); H h = --d?.v; Expect.identical(d.v, h); }
   //                            ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                              ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
   { D.staticE = new E(); F f = --D?.staticE; Expect.identical(D.staticE, f); }
   { h.D.staticE = new h.E(); h.F f = --h.D?.staticE; Expect.identical(h.D.staticE, f); }
   { D.staticE = new E(); H h = --D?.staticE; Expect.identical(D.staticE, h); }
   //                           ^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
   { h.D.staticE = new h.E(); h.H hh = --h.D?.staticE; Expect.identical(h.D.staticE, hh); }
   //                                  ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                                         ^
   // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'.
 }
diff --git a/tests/language_2/null_aware/invocation_test.dart b/tests/language_2/null_aware/invocation_test.dart
index 1d729d7..e882353 100644
--- a/tests/language_2/null_aware/invocation_test.dart
+++ b/tests/language_2/null_aware/invocation_test.dart
@@ -41,23 +41,23 @@
   { int i = new C()?.g(() => 1); Expect.equals(1, i); }
   { String s = nullC()?.g(bad()); Expect.equals(null, s); }
   //           ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
   { String s = new C()?.g(() => null); Expect.equals(null, s); }
   //           ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //               ^
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
   { int i = C?.staticG(() => 1); Expect.equals(1, i); }
   { int i = h.C?.staticG(() => 1); Expect.equals(1, i); }
   { String s = C?.staticG(() => null); Expect.equals(null, s); }
   //           ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //              ^
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
   { String s = h.C?.staticG(() => null); Expect.equals(null, s); }
   //           ^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //                ^
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'.
 
@@ -66,11 +66,11 @@
   // generated in the case of o?.m(...).
   { B b = new C(); Expect.equals(1, b?.f(() => 1)); }
   //                                   ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'f' isn't defined for the class 'B'.
   { int i = 1; Expect.equals(null, nullC()?.f(i)); }
   //                                          ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'int' can't be assigned to the parameter type 'dynamic Function()'.
 
   // '?.' can't be used to access toplevel functions in libraries imported via
@@ -83,10 +83,10 @@
   // Nor can it be used to access the toString method on the class Type.
   Expect.throwsNoSuchMethodError(() => C?.toString());
   //                                      ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.toString'.
   Expect.throwsNoSuchMethodError(() => h.C?.toString());
   //                                        ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.toString'.
 }
diff --git a/tests/language_2/number/identifier_test.dart b/tests/language_2/number/identifier_test.dart
index ce91927..d66bf6b 100644
--- a/tests/language_2/number/identifier_test.dart
+++ b/tests/language_2/number/identifier_test.dart
@@ -10,32 +10,32 @@
   //                 ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                 ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
   Expect.equals(2, 2 as int);
   //                    ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                    ^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   Expect.isTrue(-2 is int);
   //                  ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                  ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
   Expect.equals(-2, -2 as int);
   //                      ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                      ^^^
-  // [analyzer] STATIC_WARNING.CAST_TO_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
   Expect.isTrue(0x10 is int);
   //                    ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                    ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
   Expect.isTrue(-0x10 is int);
   //                     ^^^
   // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
   //                     ^^^
-  // [analyzer] STATIC_WARNING.TYPE_TEST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
 
   // "a" will be part of hex literal, the following "s" is an error.
   0x10as int;
@@ -68,43 +68,43 @@
   Expect.equals(1e+2, 1e+2 as double);
   Expect.throwsNoSuchMethodError(() => 1.e+2);
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'e' isn't defined for the class 'int'.
   1d;
 //^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 // ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'd'.
   1D;
 //^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 // ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'D'.
   Expect.throwsNoSuchMethodError(() => 1.d+2);
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'int'.
   Expect.throwsNoSuchMethodError(() => 1.D+2);
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'D' isn't defined for the class 'int'.
   1.1d;
 //^^^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 //   ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'd'.
   1.1D;
 //^^^
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 //   ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'D'.
   1e;
 //^
@@ -116,6 +116,6 @@
 // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
 // [cfe] Expected ';' after this.
 // ^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'x'.
 }
diff --git a/tests/language_2/operator/invalid_operators_test.dart b/tests/language_2/operator/invalid_operators_test.dart
index d0ec7e4..f8acc82 100644
--- a/tests/language_2/operator/invalid_operators_test.dart
+++ b/tests/language_2/operator/invalid_operators_test.dart
@@ -9,6 +9,7 @@
   // [cfe] Operator '==' should have exactly one parameter.
   //       ^^
   // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
+  // [cfe] The method 'Operators1.==' has fewer positional arguments than those of overridden method 'Object.=='.
   operator <() => true;
   //       ^
   // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
@@ -86,6 +87,7 @@
   // [cfe] Operator '==' should have exactly one parameter.
   //       ^^
   // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
+  // [cfe] The method 'Operators2.==' has more required arguments than those of overridden method 'Object.=='.
   operator <(a, b) => true;
   //       ^
   // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
@@ -248,6 +250,7 @@
   operator ==({a}) => true;
   //       ^^
   // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  // [cfe] The method 'Operators4.==' has fewer positional arguments than those of overridden method 'Object.=='.
   //           ^
   // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR
   // [cfe] An operator can't have optional parameters.
@@ -568,6 +571,9 @@
   operator ==<T>(a) => true;
   //       ^^
   // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  // [cfe] Declared type variables of 'Operators7.==' doesn't match those on overridden method 'Object.=='.
+  //       ^
+  // [cfe] The return type of the method 'Operators7.==' is 'dynamic', which does not match the return type, 'bool', of the overridden method, 'Object.=='.
   //         ^^^
   // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETERS_ON_OPERATOR
   //          ^
@@ -664,4 +670,11 @@
   // [cfe] Types parameters aren't allowed when defining an operator.
 }
 
+class Operators8 {
+  /*space*/ int operator []=(a, b) {}
+  //        ^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_OPERATOR
+  // [cfe] unspecified
+}
+
 main() {}
diff --git a/tests/language_2/optimize/inferrer_constructor5_test.dart b/tests/language_2/optimize/inferrer_constructor5_test.dart
index 7221fea..186b3c9 100644
--- a/tests/language_2/optimize/inferrer_constructor5_test.dart
+++ b/tests/language_2/optimize/inferrer_constructor5_test.dart
@@ -8,7 +8,7 @@
   A() {
     print(field + 42);
     //    ^^^^^
-    // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
     // [cfe] The getter 'field' isn't defined for the class 'A'.
   }
 }
diff --git a/tests/language_2/override/inheritance_abstract_test.dart b/tests/language_2/override/inheritance_abstract_test.dart
index 9218fab..5808673 100644
--- a/tests/language_2/override/inheritance_abstract_test.dart
+++ b/tests/language_2/override/inheritance_abstract_test.dart
@@ -46,18 +46,18 @@
 
 class Class extends A implements I, J {
 //    ^^^^^
-// [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
 // [cfe] The non-abstract class 'Class' is missing implementations for these members:
   method1() {}
   method2();
 //^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   get getter3;
 //^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   set setter4(_);
 //^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   method5() {}
   method6([a]) {}
   set field13(_) {}
diff --git a/tests/language_2/override/method_with_field_test.dart b/tests/language_2/override/method_with_field_test.dart
index edd17fd..7d31ba2 100644
--- a/tests/language_2/override/method_with_field_test.dart
+++ b/tests/language_2/override/method_with_field_test.dart
@@ -31,7 +31,7 @@
   Expect.equals(42, s.superInstanceMethod());
   Expect.equals(42, sup.superInstanceMethod());
   //                    ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'superInstanceMethod' isn't defined for the class 'Super'.
   Expect.equals(42, sub.superInstanceMethod());
 }
diff --git a/tests/language_2/parameter/named_type_test.dart b/tests/language_2/parameter/named_type_test.dart
index 0f82274..7cb2cdf 100644
--- a/tests/language_2/parameter/named_type_test.dart
+++ b/tests/language_2/parameter/named_type_test.dart
@@ -27,10 +27,10 @@
   // [cfe] The local function has type 'void Function(num)' that isn't of expected type 'void Function(num, {bool b})'.
   acceptFunNumOptBool(funNumBool);
   //                  ^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'void Function(num, bool)' can't be assigned to the parameter type 'void Function(num, {bool b})'.
   acceptFunNumOptBool(funNumOptBoolX);
   //                  ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'void Function(num, {bool x})' can't be assigned to the parameter type 'void Function(num, {bool b})'.
 }
diff --git a/tests/language_2/prefix/import_collision_test.dart b/tests/language_2/prefix/import_collision_test.dart
index 6ad50cb..0f561f8 100644
--- a/tests/language_2/prefix/import_collision_test.dart
+++ b/tests/language_2/prefix/import_collision_test.dart
@@ -11,6 +11,6 @@
 main() {
   lib2.foo = 1;
   //   ^^^
-  // [analyzer] STATIC_WARNING.AMBIGUOUS_IMPORT
+  // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_IMPORT
   // [cfe] Setter not found: 'foo'.
 }
diff --git a/tests/language_2/prefix/shadow_test.dart b/tests/language_2/prefix/shadow_test.dart
index 4a5bdc2..1af4c58 100644
--- a/tests/language_2/prefix/shadow_test.dart
+++ b/tests/language_2/prefix/shadow_test.dart
@@ -11,6 +11,8 @@
 class P<T> {
   test() {
     new T.Library10(10);
+    //  ^
+    // [analyzer] COMPILE_TIME_ERROR.PREFIX_SHADOWED_BY_LOCAL_DECLARATION
     //    ^
     // [cfe] Method not found: 'T.Library10'.
   }
@@ -25,7 +27,7 @@
     var result = 0;
     result = lib10.Library10.static_fld;
     //             ^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'Library10' isn't defined for the class 'int'.
     Expect.equals(4, result);
   }
diff --git a/tests/language_2/prefix/transitive_import_prefix_test.dart b/tests/language_2/prefix/transitive_import_prefix_test.dart
index 34c3020..3365f2f 100644
--- a/tests/language_2/prefix/transitive_import_prefix_test.dart
+++ b/tests/language_2/prefix/transitive_import_prefix_test.dart
@@ -7,14 +7,14 @@
   // Library prefixes in the imported libraries should not be visible here.
   new lib11.Library11(1);
   //  ^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'lib11.Library11'.
   lib11.Library11.static_func();
 //^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'lib11'.
   lib11.Library11.static_fld;
 //^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'lib11'.
 }
diff --git a/tests/language_2/prefix/transitive_import_test.dart b/tests/language_2/prefix/transitive_import_test.dart
index 256894c..ef53584 100644
--- a/tests/language_2/prefix/transitive_import_test.dart
+++ b/tests/language_2/prefix/transitive_import_test.dart
@@ -10,12 +10,12 @@
   // Class should not be visible.
   new lib12.Library11(1);
   //        ^^^^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'Library11'.
 
   // Variable should not be visible.
   lib12.top_level11;
   //    ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_PREFIXED_NAME
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_PREFIXED_NAME
   // [cfe] Getter not found: 'top_level11'.
 }
diff --git a/tests/language_2/private/access_test.dart b/tests/language_2/private/access_test.dart
index 016e4dc..6e10558 100644
--- a/tests/language_2/private/access_test.dart
+++ b/tests/language_2/private/access_test.dart
@@ -10,28 +10,28 @@
 main() {
   _function();
 //^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
 // [cfe] Method not found: '_function'.
   private._function();
 //^
 // [cfe] Method not found: '_function'.
 //        ^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
   new _Class();
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: '_Class'.
   private._Class();
 //^
 // [cfe] Method not found: '_Class'.
 //        ^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
   new Class._constructor();
   //        ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'Class._constructor'.
   new private.Class._constructor();
   //                ^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR
+  // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR
   // [cfe] Method not found: 'Class._constructor'.
 }
diff --git a/tests/language_2/private/member1_test.dart b/tests/language_2/private/member1_test.dart
index a542e48..415bd25 100644
--- a/tests/language_2/private/member1_test.dart
+++ b/tests/language_2/private/member1_test.dart
@@ -10,7 +10,7 @@
   test() {
     _instanceField = true;
 //  ^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] The setter '_instanceField' isn't defined for the class 'Test'.
   }
 }
diff --git a/tests/language_2/private/member2_test.dart b/tests/language_2/private/member2_test.dart
index 7c86d12..6851ad7 100644
--- a/tests/language_2/private/member2_test.dart
+++ b/tests/language_2/private/member2_test.dart
@@ -10,7 +10,7 @@
   test() {
     _staticField = true;
 //  ^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] The setter '_staticField' isn't defined for the class 'Test'.
   }
 }
diff --git a/tests/language_2/private/member3_test.dart b/tests/language_2/private/member3_test.dart
index eba3211..557a9e6 100644
--- a/tests/language_2/private/member3_test.dart
+++ b/tests/language_2/private/member3_test.dart
@@ -10,7 +10,7 @@
   test() {
     _fun();
 //  ^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
 // [cfe] The method '_fun' isn't defined for the class 'Test'.
   }
 }
diff --git a/tests/language_2/redirecting/factory_default_values_test.dart b/tests/language_2/redirecting/factory_default_values_test.dart
index 0b24876..84a7d17 100644
--- a/tests/language_2/redirecting/factory_default_values_test.dart
+++ b/tests/language_2/redirecting/factory_default_values_test.dart
@@ -20,7 +20,7 @@
   //                         ^
   // [cfe] Can't have a default value here because any default values of 'A' would be used instead.
   //                               ^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_FUNCTION_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_FUNCTION_TYPE
   // [cfe] The constructor function type 'A Function(int, [int])' isn't a subtype of 'A Function(int, {int b})'.
 
   int a;
diff --git a/tests/language_2/redirecting/factory_incompatible_signature_test.dart b/tests/language_2/redirecting/factory_incompatible_signature_test.dart
index 7a77f18..7c0253a 100644
--- a/tests/language_2/redirecting/factory_incompatible_signature_test.dart
+++ b/tests/language_2/redirecting/factory_incompatible_signature_test.dart
@@ -11,7 +11,7 @@
   A(a, b);
   factory A.f() = A;
   //              ^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_FUNCTION_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_FUNCTION_TYPE
   // [cfe] The constructor function type 'A Function(dynamic, dynamic)' isn't a subtype of 'A Function()'.
 }
 
diff --git a/tests/language_2/regress/regress11724_test.dart b/tests/language_2/regress/regress11724_test.dart
index ddf3925..a408da1 100644
--- a/tests/language_2/regress/regress11724_test.dart
+++ b/tests/language_2/regress/regress11724_test.dart
@@ -7,6 +7,6 @@
 void main() {
   method(<int>[]);
 //^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
 // [cfe] Method not found: 'method'.
 }
diff --git a/tests/language_2/regress/regress1363_test.dart b/tests/language_2/regress/regress1363_test.dart
index cd7df8f..27f02c2 100644
--- a/tests/language_2/regress/regress1363_test.dart
+++ b/tests/language_2/regress/regress1363_test.dart
@@ -24,7 +24,7 @@
     C contents = myCup.getContents(); // expect no warning or error
     contents = libCup.getContents();
     //         ^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //                ^
     // [cfe] A value of type 'C/*1*/' can't be assigned to a variable of type 'C/*2*/'.
   }
diff --git a/tests/language_2/regress/regress15606_test.dart b/tests/language_2/regress/regress15606_test.dart
index 3891202..f367e9e 100644
--- a/tests/language_2/regress/regress15606_test.dart
+++ b/tests/language_2/regress/regress15606_test.dart
@@ -15,7 +15,7 @@
     var foo =
       Unresolved.
 //    ^^^^^^^^^^
-// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
 // [cfe] Getter not found: 'Unresolved'.
         bar(
       // Make dart2js generate a call to setRuntimeTypeInfo.
diff --git a/tests/language_2/regress/regress18628_1_test.dart b/tests/language_2/regress/regress18628_1_test.dart
index 3f2bef3..214f9aa 100644
--- a/tests/language_2/regress/regress18628_1_test.dart
+++ b/tests/language_2/regress/regress18628_1_test.dart
@@ -13,7 +13,7 @@
   // line just doesn't make sense without this line.
   T t = int;
   //    ^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'Type' can't be assigned to a variable of type 'T'.
 }
 
diff --git a/tests/language_2/regress/regress21793_test.dart b/tests/language_2/regress/regress21793_test.dart
index 26d9ff6d..e4fec2e 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.CREATION_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A'.
 }
diff --git a/tests/language_2/regress/regress21912_test.dart b/tests/language_2/regress/regress21912_test.dart
index 46e6e58..eaacaad 100644
--- a/tests/language_2/regress/regress21912_test.dart
+++ b/tests/language_2/regress/regress21912_test.dart
@@ -19,11 +19,11 @@
     Function2<Function2<int, double>, Function2<int, double>> left;
     left = t1;
     //     ^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     // [cfe] A value of type 'A Function(B) Function(B Function(A))' can't be assigned to a variable of type 'double Function(int) Function(double Function(int))'.
     left = t2;
     //     ^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     // [cfe] A value of type 'A Function(B) Function(B Function(A))' can't be assigned to a variable of type 'double Function(int) Function(double Function(int))'.
   }
 }
diff --git a/tests/language_2/regress/regress22976_test.dart b/tests/language_2/regress/regress22976_test.dart
index 63180f8..de83e9b 100644
--- a/tests/language_2/regress/regress22976_test.dart
+++ b/tests/language_2/regress/regress22976_test.dart
@@ -20,7 +20,7 @@
   A<int> a0 = c1;
   A<int> a1 = c2;
   //          ^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //          ^
   // [cfe] A value of type 'C<String, int>' can't be assigned to a variable of type 'A<int>'.
 }
diff --git a/tests/language_2/regress/regress23408a_test.dart b/tests/language_2/regress/regress23408a_test.dart
index b8fd7a4..453d161 100644
--- a/tests/language_2/regress/regress23408a_test.dart
+++ b/tests/language_2/regress/regress23408a_test.dart
@@ -16,7 +16,7 @@
   C();
   factory C.l() = A<lib.K>;
   //                ^^^^^
-  // [analyzer] STATIC_WARNING.TYPE_ANNOTATION_DEFERRED_CLASS
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ANNOTATION_DEFERRED_CLASS
   // [cfe] unspecified
   get t => null;
 }
diff --git a/tests/language_2/regress/regress31596_super_test.dart b/tests/language_2/regress/regress31596_super_test.dart
index 657bace..edf7e93 100644
--- a/tests/language_2/regress/regress31596_super_test.dart
+++ b/tests/language_2/regress/regress31596_super_test.dart
@@ -40,7 +40,7 @@
     // not ok since B2 is not assignable to B
     super.f(b2);
     //      ^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'B2' can't be assigned to the parameter type 'B'.
 
     var superF = super.f; // Inferred static type: void Function(B)
@@ -52,7 +52,7 @@
     // not ok since B2 is not assignable to B
     superF(b2);
     //     ^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'B2' can't be assigned to the parameter type 'B'.
 
     // Should pass since superF's runtime type is void Function(Object)
diff --git a/tests/language_2/regress/regress31596_test.dart b/tests/language_2/regress/regress31596_test.dart
index d65dee2..b70f62a 100644
--- a/tests/language_2/regress/regress31596_test.dart
+++ b/tests/language_2/regress/regress31596_test.dart
@@ -36,7 +36,7 @@
   B2 b2 = null;
   d.f(b2, b);
   //  ^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'B2' can't be assigned to the parameter type 'B'.
   i.f(b2, b); // Ok since B2 assignable to A
   // TODO: Downcast will be a compile-time error with NNBD. Consider using
diff --git a/tests/language_2/regress/regress34488_test.dart b/tests/language_2/regress/regress34488_test.dart
index 3375997..0930f68 100644
--- a/tests/language_2/regress/regress34488_test.dart
+++ b/tests/language_2/regress/regress34488_test.dart
@@ -25,27 +25,27 @@
   var d = new Derived();
   d.f('bad');
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
   d.g('bad');
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
   d.h(i: 'bad');
   //  ^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   //     ^
   // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'.
   Object x = d.f(1);
   //           ^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
   Object y = d.g(1);
   //           ^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
   Object z = d.h(i: 1);
   //           ^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   // [cfe] This expression has type 'void' and can't be used.
 }
diff --git a/tests/language_2/regress/regress34489_test.dart b/tests/language_2/regress/regress34489_test.dart
index a29cab8..7fba3cb 100644
--- a/tests/language_2/regress/regress34489_test.dart
+++ b/tests/language_2/regress/regress34489_test.dart
@@ -9,6 +9,6 @@
 main() {
   new C().field = 'bad';
   //              ^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'Type'.
 }
diff --git a/tests/language_2/regress/regress34495_test.dart b/tests/language_2/regress/regress34495_test.dart
index f33f4c5..2e69b38 100644
--- a/tests/language_2/regress/regress34495_test.dart
+++ b/tests/language_2/regress/regress34495_test.dart
@@ -4,10 +4,10 @@
 
 final foo = A<B>.foo();
 //          ^
-// [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
+// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
 // [cfe] Method not found: 'A'.
 //            ^
-// [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
+// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
 // [cfe] 'B' isn't a type.
 
 main() {}
diff --git a/tests/language_2/regress/regress35043_test.dart b/tests/language_2/regress/regress35043_test.dart
index 884f707..d8c1b75 100644
--- a/tests/language_2/regress/regress35043_test.dart
+++ b/tests/language_2/regress/regress35043_test.dart
@@ -4,7 +4,7 @@
 
 final foo = Map<int>();
 //          ^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 2 type arguments.
 
 main() {}
diff --git a/tests/language_2/regress/regress35258_test.dart b/tests/language_2/regress/regress35258_test.dart
index f28bada..d36f45f 100644
--- a/tests/language_2/regress/regress35258_test.dart
+++ b/tests/language_2/regress/regress35258_test.dart
@@ -17,7 +17,7 @@
 
   C() {}
 //^
-// [analyzer] STATIC_WARNING.FINAL_NOT_INITIALIZED_CONSTRUCTOR
+// [analyzer] COMPILE_TIME_ERROR.FINAL_NOT_INITIALIZED_CONSTRUCTOR
   C(this.d) {}
 //^
 // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_CONSTRUCTOR
diff --git a/tests/language_2/regress/regress42946_test.dart b/tests/language_2/regress/regress42946_test.dart
new file mode 100644
index 0000000..008793f
--- /dev/null
+++ b/tests/language_2/regress/regress42946_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.
+
+import 'package:expect/expect.dart';
+
+/// https://github.com/dart-lang/sdk/issues/42946
+void main() {
+  // fix bug in constant eval
+  const x = (2.0 == 2);
+  const a = (2.0 == 2.0);
+  const b = (0.0 == 0.0);
+  const c = (double.nan == double.nan);
+  const d = (2.0 == 1.0);
+
+  Expect.isTrue(x);
+  Expect.isTrue(a);
+  Expect.isTrue(b);
+  Expect.isFalse(c);
+  Expect.isFalse(d);
+}
diff --git a/tests/language_2/regress/regress42954_test.dart b/tests/language_2/regress/regress42954_test.dart
new file mode 100644
index 0000000..93c5d2b
--- /dev/null
+++ b/tests/language_2/regress/regress42954_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.
+
+import "package:expect/expect.dart";
+
+class A<T> {
+  Type get type => T;
+}
+
+class B extends A<B> {}
+
+void main() {
+  var first = B;
+  var second = B().type;
+
+  Expect.equals(first, second);
+  Expect.equals(second, first);
+  Expect.equals(first.hashCode, second.hashCode);
+}
diff --git a/tests/language_2/rewrite/implicit_this_test.dart b/tests/language_2/rewrite/implicit_this_test.dart
index e0e4c41..28adbcf 100644
--- a/tests/language_2/rewrite/implicit_this_test.dart
+++ b/tests/language_2/rewrite/implicit_this_test.dart
@@ -12,7 +12,7 @@
   easy(z) {
         return x + y + z;
         //         ^
-        // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -20,7 +20,7 @@
   shadow_y_parameter(y) {
         return x + this.y + y;
         //              ^
-        // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -28,7 +28,7 @@
     var y = z;
         return x + this.y + y;
         //              ^
-        // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -37,7 +37,7 @@
     foo() {
             return x + this.y + y;
             //              ^
-            // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
     return foo();
@@ -47,7 +47,7 @@
     foo(y) {
             return x + this.y + y;
             //              ^
-            // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
     return foo(z);
@@ -58,7 +58,7 @@
       var y = z;
             return x + this.y + y;
             //              ^
-            // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
 
@@ -69,7 +69,7 @@
   shadow_x_parameter(x) {
         return this.x + y + x;
         //              ^
-        // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -77,7 +77,7 @@
     var x = z;
         return this.x + y + x;
         //              ^
-        // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
   }
 
@@ -86,7 +86,7 @@
     foo() {
             return this.x + y + x;
             //              ^
-            // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
     return foo();
@@ -96,7 +96,7 @@
     foo(x) {
             return this.x + y + x;
             //              ^
-            // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
     return foo(z);
@@ -107,7 +107,7 @@
       var x = z;
             return this.x + y + x;
             //              ^
-            // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+            // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
             // [cfe] The getter 'y' isn't defined for the class 'Foo'.
     }
 
@@ -117,10 +117,10 @@
   shadow_x_toplevel() {
         return x + this.y + toplevel + this.toplevel;
         //              ^
-        // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
         // [cfe] The getter 'y' isn't defined for the class 'Foo'.
         //                                  ^^^^^^^^
-        // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+        // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
         // [cfe] The getter 'toplevel' isn't defined for the class 'Foo'.
   }
 }
diff --git a/tests/language_2/setter/declaration_test.dart b/tests/language_2/setter/declaration_test.dart
index cc5e6a7..84893b0 100644
--- a/tests/language_2/setter/declaration_test.dart
+++ b/tests/language_2/setter/declaration_test.dart
@@ -2,7 +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.
 
-/// Test that a setter has a single argument.
+// Test that a setter has a single argument.
+
+import 'dart:async';
 
 set tooFew() {}
 //  ^^^^^^
@@ -16,7 +18,109 @@
 //         ^
 // [cfe] A setter should have exactly one formal parameter.
 
+/*space*/ int set wrongReturnType1(_) {}
+//        ^^^
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+// [cfe] unspecified
+
+/*space*/ FutureOr<void> set wrongReturnType2(_) {}
+//        ^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+// [cfe] unspecified
+
+/*space*/ Never set wrongReturnType3(_) {}
+//        ^^^^^
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+// [cfe] unspecified
+
+class C {
+  static int set staticWrongReturnType1(_) => 1;
+  //     ^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  static FutureOr<void> set staticWrongReturnType2(_) {}
+  //     ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  static Never set staticWrongReturnType3(_) => throw 1;
+  //     ^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  /*space*/ int set wrongReturnType1(_) {}
+  //        ^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  /*space*/ FutureOr<void> set wrongReturnType2(_) {}
+  //        ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  /*space*/ Never set wrongReturnType3(_) => throw 1;
+  //        ^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
+  // [cfe] unspecified
+
+  static int get staticNonAssignableTypes1 => 1;
+  //             ^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
+  // [cfe] unspecified
+  static set staticNonAssignableTypes1(String _) {}
+
+  static num get staticAssignableTypes1 => 1;
+  static set staticAssignableTypes1(int _) {}
+
+  static FutureOr<int> get staticAssignableTypes2 => 1;
+  static set staticAssignableTypes2(int _) {}
+
+  static dynamic get staticAssignableTypes3 => 1;
+  static set staticAssignableTypes3(int _) {}
+
+  int get nonAssignableTypes1 => 1;
+  //      ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES
+  // [cfe] unspecified
+  set nonAssignableTypes1(String _) {}
+
+  num get assignableTypes1 => 1;
+  set assignableTypes1(int _) {}
+
+  FutureOr<int> get assignableTypes2 => 1;
+  set assignableTypes2(int _) {}
+
+  dynamic get assignableTypes3 => 1;
+  set assignableTypes3(int _) {}
+}
+
 main() {
   tooFew = 1;
-  tooMany = 2;
+  tooMany = 1;
+  wrongReturnType1 = 1;
+  wrongReturnType2 = 1;
+  wrongReturnType3 = 1;
+  C.staticWrongReturnType1 = 4;
+  C.staticWrongReturnType2 = 4;
+  C.staticWrongReturnType3 = 4;
+  C().wrongReturnType1 = 5;
+  C().wrongReturnType2 = 5;
+  C().wrongReturnType3 = 5;
+  var x1 = C.staticNonAssignableTypes1;
+  C.staticNonAssignableTypes1 = '' as dynamic;
+  var y1 = C.staticAssignableTypes1;
+  C.staticAssignableTypes1 = '' as dynamic;
+  var y2 = C.staticAssignableTypes2;
+  C.staticAssignableTypes2 = '' as dynamic;
+  var y3 = C.staticAssignableTypes3;
+  C.staticAssignableTypes3 = '' as dynamic;
+  var z1 = C().nonAssignableTypes1;
+  C().nonAssignableTypes1 = '' as dynamic;
+  var w1 = C().assignableTypes1;
+  C().assignableTypes1 = '' as dynamic;
+  var w2 = C().assignableTypes2;
+  C().assignableTypes2 = '' as dynamic;
+  var w3 = C().assignableTypes3;
+  C().assignableTypes3 = '' as dynamic;
 }
diff --git a/tests/language_2/setter/no_getter_call_test.dart b/tests/language_2/setter/no_getter_call_test.dart
index 77b06dc..a49d8e4 100644
--- a/tests/language_2/setter/no_getter_call_test.dart
+++ b/tests/language_2/setter/no_getter_call_test.dart
@@ -23,7 +23,7 @@
 
   x = topLevel(3);
   //  ^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION
   // [cfe] Getter not found: 'topLevel'.
   Expect.equals(6, x);
 }
diff --git a/tests/language_2/setter/no_getter_test.dart b/tests/language_2/setter/no_getter_test.dart
index f2ea3e3..53c8b58 100644
--- a/tests/language_2/setter/no_getter_test.dart
+++ b/tests/language_2/setter/no_getter_test.dart
@@ -17,6 +17,6 @@
   Example ex = new Example();
   print(ex.foo++);
   //       ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'foo' isn't defined for the class 'Example'.
 }
diff --git a/tests/language_2/setter/setter3_test.dart b/tests/language_2/setter/setter3_test.dart
index 916a807..194ae1c 100644
--- a/tests/language_2/setter/setter3_test.dart
+++ b/tests/language_2/setter/setter3_test.dart
@@ -11,10 +11,10 @@
   void set bar(x) {}
   dynamic set baz(x) {}
 //^^^^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
   bool set bob(x) {}
 //^^^^
-// [analyzer] STATIC_WARNING.NON_VOID_RETURN_FOR_SETTER
+// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER
 }
 
 main() {
diff --git a/tests/language_2/static/field1_test.dart b/tests/language_2/static/field1_test.dart
index e4e1472..7c3c338 100644
--- a/tests/language_2/static/field1_test.dart
+++ b/tests/language_2/static/field1_test.dart
@@ -14,7 +14,7 @@
       var foo = new Foo();
       var x = foo.x;
       //          ^
-      // [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+      // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
       // [cfe] The getter 'x' isn't defined for the class 'Foo'.
     }
   }
diff --git a/tests/language_2/static/field1a_test.dart b/tests/language_2/static/field1a_test.dart
index 9d7f2f2..27a336d 100644
--- a/tests/language_2/static/field1a_test.dart
+++ b/tests/language_2/static/field1a_test.dart
@@ -14,7 +14,7 @@
       var foo = new Foo();
       var m = foo.m;
       //          ^
-      // [analyzer] STATIC_TYPE_WARNING.INSTANCE_ACCESS_TO_STATIC_MEMBER
+      // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER
       // [cfe] The getter 'm' isn't defined for the class 'Foo'.
     }
   }
diff --git a/tests/language_2/static/field3_test.dart b/tests/language_2/static/field3_test.dart
index 7436df1..f794e68 100644
--- a/tests/language_2/static/field3_test.dart
+++ b/tests/language_2/static/field3_test.dart
@@ -13,19 +13,19 @@
   if (false) {
     var x = Foo.x;
     //          ^
-    // [analyzer] STATIC_WARNING.STATIC_ACCESS_TO_INSTANCE_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
     // [cfe] Getter not found: 'x'.
     var m = Foo.m;
     //          ^
-    // [analyzer] STATIC_WARNING.STATIC_ACCESS_TO_INSTANCE_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
     // [cfe] Getter not found: 'm'.
     Foo.m = 1;
     //  ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_SETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
     // [cfe] Setter not found: 'm'.
     Foo.x = 1;
     //  ^
-    // [analyzer] STATIC_WARNING.STATIC_ACCESS_TO_INSTANCE_MEMBER
+    // [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
     // [cfe] Setter not found: 'x'.
   }
 }
diff --git a/tests/language_2/static/final_field2_test.dart b/tests/language_2/static/final_field2_test.dart
index 0755461..6430471 100644
--- a/tests/language_2/static/final_field2_test.dart
+++ b/tests/language_2/static/final_field2_test.dart
@@ -20,7 +20,7 @@
 main() {
   A.x = 2;
 //^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_CONST
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_CONST
 //  ^
 // [cfe] Setter not found: 'x'.
   new B();
diff --git a/tests/language_2/static/getter_no_setter1_test.dart b/tests/language_2/static/getter_no_setter1_test.dart
index a173b2f..dd307ec 100644
--- a/tests/language_2/static/getter_no_setter1_test.dart
+++ b/tests/language_2/static/getter_no_setter1_test.dart
@@ -10,7 +10,7 @@
   method() {
     getter++;
 //  ^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'getter'.
   }
 }
diff --git a/tests/language_2/static/getter_no_setter2_test.dart b/tests/language_2/static/getter_no_setter2_test.dart
index d10cedb..e84b2b8 100644
--- a/tests/language_2/static/getter_no_setter2_test.dart
+++ b/tests/language_2/static/getter_no_setter2_test.dart
@@ -10,7 +10,7 @@
   method() {
     getter++;
 //  ^^^^^^
-// [analyzer] STATIC_WARNING.ASSIGNMENT_TO_FINAL_NO_SETTER
+// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER
 // [cfe] Setter not found: 'getter'.
   }
 
diff --git a/tests/language_2/static/setter_get_test.dart b/tests/language_2/static/setter_get_test.dart
index 44796cc..0a16b53 100644
--- a/tests/language_2/static/setter_get_test.dart
+++ b/tests/language_2/static/setter_get_test.dart
@@ -8,7 +8,7 @@
   static set o(_) {}
   m() => o;
   //     ^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Getter not found: 'o'.
   noSuchMethod(_) => 42;
 }
diff --git a/tests/language_2/string/interpolate1_test.dart b/tests/language_2/string/interpolate1_test.dart
index 1bc80c0..12bf4af 100644
--- a/tests/language_2/string/interpolate1_test.dart
+++ b/tests/language_2/string/interpolate1_test.dart
@@ -11,6 +11,6 @@
   // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
   // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}).
   //                  ^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Getter not found: 'x'.
 }
diff --git a/tests/language_2/string/interpolation_test.dart b/tests/language_2/string/interpolation_test.dart
index 8fd6fac..debcbf3 100644
--- a/tests/language_2/string/interpolation_test.dart
+++ b/tests/language_2/string/interpolation_test.dart
@@ -60,7 +60,7 @@
     if (alwaysFalse) {
       "${i.toHorse()}";
       //   ^^^^^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
       // [cfe] The method 'toHorse' isn't defined for the class 'int'.
     }
 
diff --git a/tests/language_2/string/no_operator_test.dart b/tests/language_2/string/no_operator_test.dart
index e6da249..a7eabf7 100644
--- a/tests/language_2/string/no_operator_test.dart
+++ b/tests/language_2/string/no_operator_test.dart
@@ -9,66 +9,66 @@
   var y = "y";
   Expect.throws(() => x < y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '<' isn't defined for the class 'String'.
   Expect.throws(() => x <= y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '<=' isn't defined for the class 'String'.
   Expect.throws(() => x > y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '>' isn't defined for the class 'String'.
   Expect.throws(() => x >= y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '>=' isn't defined for the class 'String'.
   Expect.throws(() => x - y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '-' isn't defined for the class 'String'.
   Expect.throws(() => x * y);
   //                      ^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'.
   Expect.throws(() => x / y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '/' isn't defined for the class 'String'.
   Expect.throws(() => x ~/ y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '~/' isn't defined for the class 'String'.
   Expect.throws(() => x % y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '%' isn't defined for the class 'String'.
   Expect.throws(() => x >> y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '>>' isn't defined for the class 'String'.
   Expect.throws(() => x << y);
   //                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '<<' isn't defined for the class 'String'.
   Expect.throws(() => x & y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '&' isn't defined for the class 'String'.
   Expect.throws(() => x | y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '|' isn't defined for the class 'String'.
   Expect.throws(() => x ^ y);
   //                    ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '^' isn't defined for the class 'String'.
   Expect.throws(() => -x);
   //                  ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator 'unary-' isn't defined for the class 'String'.
   Expect.throws(() => ~x);
   //                  ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '~' isn't defined for the class 'String'.
 }
diff --git a/tests/language_2/string/string_test.dart b/tests/language_2/string/string_test.dart
index da6d40a..68cca75 100644
--- a/tests/language_2/string/string_test.dart
+++ b/tests/language_2/string/string_test.dart
@@ -33,7 +33,7 @@
     String a = "Hello";
     a[1] = 12;
 //   ^^^
-// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
 // [cfe] The operator '[]=' isn't defined for the class 'String'.
   }
 
diff --git a/tests/language_2/string/substring_test.dart b/tests/language_2/string/substring_test.dart
index bf2ce99..6f33829 100644
--- a/tests/language_2/string/substring_test.dart
+++ b/tests/language_2/string/substring_test.dart
@@ -9,10 +9,10 @@
   try {
     print("abcdef".substring(1.5, 3.5));
     //                       ^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'.
     //                            ^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'.
     Expect.fail("Should have thrown an exception");
   } on TypeError catch (e) {
diff --git a/tests/language_2/super/assign_test.dart b/tests/language_2/super/assign_test.dart
index d3c1b90..3e77ef5 100644
--- a/tests/language_2/super/assign_test.dart
+++ b/tests/language_2/super/assign_test.dart
@@ -17,6 +17,6 @@
   a.x = 37;
   a.setX(42);
   //^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] The method 'setX' isn't defined for the class 'A'.
 }
diff --git a/tests/language_2/super/conditional_operator_test.dart b/tests/language_2/super/conditional_operator_test.dart
index cd2d498..5c41ab4 100644
--- a/tests/language_2/super/conditional_operator_test.dart
+++ b/tests/language_2/super/conditional_operator_test.dart
@@ -52,7 +52,7 @@
     // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null.
     !super?.field;
 //   ^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.NON_BOOL_NEGATION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_NEGATION_EXPRESSION
 //        ^^
 // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER
 // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null.
diff --git a/tests/language_2/switch/case_expression_with_assignment_test.dart b/tests/language_2/switch/case_expression_with_assignment_test.dart
index 115cb94..5ab2dbd 100644
--- a/tests/language_2/switch/case_expression_with_assignment_test.dart
+++ b/tests/language_2/switch/case_expression_with_assignment_test.dart
@@ -15,7 +15,7 @@
       return "ERROR_A";
     case ERROR_B = 1:
     //   ^^^^^^^
-    // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_CONST
+    // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_CONST
     //   ^^^^^^^^^^^
     // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_CASE_EXPRESSION
     //           ^
diff --git a/tests/language_2/switch/fallthru_test.dart b/tests/language_2/switch/fallthru_test.dart
index aabb2ca..16e23fe 100644
--- a/tests/language_2/switch/fallthru_test.dart
+++ b/tests/language_2/switch/fallthru_test.dart
@@ -13,7 +13,7 @@
       break;
     case 1:
 //  ^^^^
-// [analyzer] STATIC_WARNING.CASE_BLOCK_NOT_TERMINATED
+// [analyzer] COMPILE_TIME_ERROR.CASE_BLOCK_NOT_TERMINATED
 // [cfe] Switch case may fall through to the next case.
       result = "one";
   // fall-through, error if case is non-empty
diff --git a/tests/language_2/symbol/literal_test.dart b/tests/language_2/symbol/literal_test.dart
index 268b610..976158f 100644
--- a/tests/language_2/symbol/literal_test.dart
+++ b/tests/language_2/symbol/literal_test.dart
@@ -46,7 +46,7 @@
   // Tries to call the symbol literal #a.toString
   Expect.throwsNoSuchMethodError(() => #a.toString());
   //                                   ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
   //                                              ^
   // [cfe] The method 'call' isn't defined for the class 'Symbol'.
 }
diff --git a/tests/language_2/sync_star/generator1_test.dart b/tests/language_2/sync_star/generator1_test.dart
index 79b294d..ef6bd9b 100644
--- a/tests/language_2/sync_star/generator1_test.dart
+++ b/tests/language_2/sync_star/generator1_test.dart
@@ -48,7 +48,7 @@
   // Throws type error: yielded object is not an iterable.
   yield* 3;
   //     ^
-  // [analyzer] STATIC_TYPE_WARNING.YIELD_OF_INVALID_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.YIELD_OF_INVALID_TYPE
   // [cfe] A value of type 'int' can't be assigned to a variable of type 'Iterable<dynamic>'.
 }
 
diff --git a/tests/language_2/sync_star/void_sync_star_test.dart b/tests/language_2/sync_star/void_sync_star_test.dart
new file mode 100644
index 0000000..4c387f3
--- /dev/null
+++ b/tests/language_2/sync_star/void_sync_star_test.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.
+
+// It is an error for a `sync*` function to have return type `void`.
+
+/*space*/ void f1() sync* {
+  //      ^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class C {
+  static void f2() sync* {
+    //   ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  /*space*/ void f3() sync* {
+    //      ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
+
+void main() {
+  /*space*/ void f4() sync* {
+    //      ^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  // No function literal: It is probably not possible to infer the
+  // return type `void` for a function literal marked `sync*`.
+}
diff --git a/tests/language_2/this/conditional_operator_test.dart b/tests/language_2/this/conditional_operator_test.dart
index 75f711c..9ccddb2 100644
--- a/tests/language_2/this/conditional_operator_test.dart
+++ b/tests/language_2/this/conditional_operator_test.dart
@@ -21,7 +21,7 @@
     //^^^^^^^^^^^^^^^^^^^^^^^^
     // [analyzer] COMPILE_TIME_ERROR.INITIALIZER_FOR_NON_EXISTENT_FIELD
     // [error line 15, column 11, length 0]
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] Expected '.' before this.
     //    ^^
     // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language_2/this/implicit_this_test.dart b/tests/language_2/this/implicit_this_test.dart
index 3500c9a..0cbcfa8 100644
--- a/tests/language_2/this/implicit_this_test.dart
+++ b/tests/language_2/this/implicit_this_test.dart
@@ -17,7 +17,7 @@
 // abstract.
 class SubAbstract1 extends Abstract {}
 //    ^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
 // [cfe] The non-abstract class 'SubAbstract1' is missing implementations for these members:
 
 // This class does not implement "x", but is itself abstract, so that's OK.
@@ -29,7 +29,7 @@
 // abstract.
 class SubSubAbstract2 extends SubAbstract2 {}
 //    ^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
 // [cfe] The non-abstract class 'SubSubAbstract2' is missing implementations for these members:
 
 class Concrete extends Abstract {
@@ -44,7 +44,7 @@
 void main() {
   new Abstract();
   //  ^^^^^^^^
-  // [analyzer] STATIC_WARNING.INSTANTIATE_ABSTRACT_CLASS
+  // [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS
   // [cfe] The class 'Abstract' is abstract and can't be instantiated.
   Expect.equals('7', new Concrete().toString());
   Expect.equals('42', new SubConcrete(42).toString());
diff --git a/tests/language_2/type/checks_in_factory_method_test.dart b/tests/language_2/type/checks_in_factory_method_test.dart
index cae8f04..3be4613 100644
--- a/tests/language_2/type/checks_in_factory_method_test.dart
+++ b/tests/language_2/type/checks_in_factory_method_test.dart
@@ -22,7 +22,7 @@
 
     func("Hello World!");
     //   ^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
     // [cfe] The argument type 'String' can't be assigned to the parameter type 'T'.
     return new Bar<T>();
   }
diff --git a/tests/language_2/type_object/first_class_types_literals_test.dart b/tests/language_2/type_object/first_class_types_literals_test.dart
index aa02a4d..663e516 100644
--- a/tests/language_2/type_object/first_class_types_literals_test.dart
+++ b/tests/language_2/type_object/first_class_types_literals_test.dart
@@ -51,49 +51,49 @@
   // Test that operator calls on class literals go to Type.
   Expect.throwsNoSuchMethodError(() => C = 1);
   //                                   ^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
   // [cfe] Can't assign to a type literal.
   //                                       ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   Expect.throwsNoSuchMethodError(() => C++);
   //                                   ^
-  // [analyzer] STATIC_WARNING.ASSIGNMENT_TO_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE
   // [cfe] Can't assign to a type literal.
   //                                    ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   Expect.throwsNoSuchMethodError(() => C + 1);
   //                                     ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '+' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => C[2]);
   //                                    ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => C[2] = 'hest');
   //                                    ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => dynamic = 1);
   //                                   ^
   // [cfe] Can't assign to a type literal.
   //                                             ^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   Expect.throwsNoSuchMethodError(() => dynamic++);
   //                                   ^
   // [cfe] Can't assign to a type literal.
   //                                          ^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   Expect.throwsNoSuchMethodError(() => dynamic + 1);
   //                                           ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '+' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => dynamic[2]);
   //                                          ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]' isn't defined for the class 'Type'.
   Expect.throwsNoSuchMethodError(() => dynamic[2] = 'hest');
   //                                          ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]=' isn't defined for the class 'Type'.
 
   Expect.equals((dynamic).toString(), 'dynamic');
diff --git a/tests/language_2/type_promotion/assign_test.dart b/tests/language_2/type_promotion/assign_test.dart
index 38f8f55..35d99d8 100644
--- a/tests/language_2/type_promotion/assign_test.dart
+++ b/tests/language_2/type_promotion/assign_test.dart
@@ -33,7 +33,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
     a = null;
   }
@@ -42,14 +42,14 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
   if (a is B) {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
     {
       a = null;
@@ -57,7 +57,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
diff --git a/tests/language_2/type_promotion/closure_test.dart b/tests/language_2/type_promotion/closure_test.dart
index 9fb7568..2e6fec9 100644
--- a/tests/language_2/type_promotion/closure_test.dart
+++ b/tests/language_2/type_promotion/closure_test.dart
@@ -55,7 +55,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
   void foo() {
@@ -73,7 +73,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
@@ -88,7 +88,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
     void foo() {
       a = new D();
@@ -97,7 +97,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
@@ -112,7 +112,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
     void foo() {
       a = new D();
@@ -121,7 +121,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
@@ -140,7 +140,7 @@
   if (a is B) {
     func(() => a.b);
     //           ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
     print(a.a);
   }
@@ -154,7 +154,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
   a = null;
@@ -167,7 +167,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
   a = null;
@@ -187,7 +187,7 @@
   if (a is B
       && func(() => a.b)
       //              ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       ) {
     print(a.a);
@@ -199,7 +199,7 @@
   A a = new E();
   var b = a is B ? func(() => a.b) : false;
   //                            ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   a = null;
 }
@@ -210,7 +210,7 @@
     func(() => a[0]);
     print(a[0].b);
     //         ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
   a = null;
@@ -222,7 +222,7 @@
     func(() => a[0] = null);
     print(a[0].b);
     //         ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
   a = null;
@@ -235,7 +235,7 @@
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
   a = null;
diff --git a/tests/language_2/type_promotion/functions_test.dart b/tests/language_2/type_promotion/functions_test.dart
index ab78d11..30de4c1 100644
--- a/tests/language_2/type_promotion/functions_test.dart
+++ b/tests/language_2/type_promotion/functions_test.dart
@@ -43,7 +43,7 @@
   b = funcAtoDyn(new B());
   c = funcAtoDyn(new C());
   //             ^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   //                 ^
   // [cfe] The argument type 'C' can't be assigned to the parameter type 'A'.
 
@@ -76,7 +76,7 @@
     // Returned value has type `void`, usage is restricted.
     Object o = funcDynToDyn(null);
     //         ^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+    // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
     //                     ^
     // [cfe] This expression has type 'void' and can't be used.
   }
@@ -87,7 +87,7 @@
     b = funcDynToDyn(new B());
     c = funcDynToDyn(new C());
     //  ^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //              ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
   }
@@ -97,17 +97,17 @@
   FuncDynToVoid funcDynToVoid = func;
   a = funcDynToVoid(new A());
   //  ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   //               ^
   // [cfe] This expression has type 'void' and can't be used.
   b = funcDynToVoid(new B());
   //  ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   //               ^
   // [cfe] This expression has type 'void' and can't be used.
   c = funcDynToVoid(new C());
   //  ^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.USE_OF_VOID_RESULT
+  // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT
   //               ^
   // [cfe] This expression has type 'void' and can't be used.
 
@@ -124,7 +124,7 @@
     b = funcDynToVoid(new B());
     c = funcDynToVoid(new C());
     //  ^^^^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //               ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
   }
@@ -136,7 +136,7 @@
   b = funcDynToA(new B());
   c = funcDynToA(new C());
   //  ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //            ^
   // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
 
@@ -146,7 +146,7 @@
     b = funcDynToA(new B());
     c = funcDynToA(new C());
     //  ^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //            ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
   }
@@ -157,7 +157,7 @@
     b = funcDynToA(new B());
     c = funcDynToA(new C());
     //  ^^^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //            ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'.
   }
diff --git a/tests/language_2/type_promotion/local_test.dart b/tests/language_2/type_promotion/local_test.dart
index c0fe87d..85b0386 100644
--- a/tests/language_2/type_promotion/local_test.dart
+++ b/tests/language_2/type_promotion/local_test.dart
@@ -32,15 +32,15 @@
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a is B) {
@@ -48,11 +48,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
 
     if (a is C) {
@@ -61,7 +61,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
 
@@ -69,11 +69,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if (a is C) {
@@ -82,7 +82,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
 
     if (a is B) {
@@ -91,7 +91,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
     if (a is D) {
@@ -100,7 +100,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
 
@@ -109,33 +109,33 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
 
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a is D) {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
@@ -143,15 +143,15 @@
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   var o1 = a is B
@@ -159,24 +159,24 @@
               '${a.b}'
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'B'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'B'.
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -186,20 +186,20 @@
               '${a.c}'
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -207,25 +207,25 @@
           ? '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'D'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'D'.
               '${a.d}'
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -234,11 +234,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if (a is B && a is C) {
@@ -247,7 +247,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is C && a is B) {
@@ -256,7 +256,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is C && a is D) {
@@ -265,18 +265,18 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is D && a is C) {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
diff --git a/tests/language_2/type_promotion/logical_and_test.dart b/tests/language_2/type_promotion/logical_and_test.dart
index 7dc5b2b..79945ba 100644
--- a/tests/language_2/type_promotion/logical_and_test.dart
+++ b/tests/language_2/type_promotion/logical_and_test.dart
@@ -33,19 +33,19 @@
   if (a is D && ((a = new D()) != null)) {
     b = a.d;
     //    ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   }
   if (a is D && (b = a.d)) {
     b = a.d;
     //    ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'A'.
     a = null;
   }
   if ((((a) is D) && (b = (a).d))) {
     b = a.d;
     //    ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'A'.
     a = null;
   }
diff --git a/tests/language_2/type_promotion/more_specific_test.dart b/tests/language_2/type_promotion/more_specific_test.dart
index ec19e52..2e7d840 100644
--- a/tests/language_2/type_promotion/more_specific_test.dart
+++ b/tests/language_2/type_promotion/more_specific_test.dart
@@ -48,7 +48,7 @@
     // No promotion C !<< A.
     x = a.c;
     //    ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'A'.
   }
   B b = new B();
@@ -60,7 +60,7 @@
     // Promotion A << dynamic.
     y = x.b;
     //    ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'A'.
   }
 }
@@ -78,12 +78,12 @@
     // Promotion: E<A> << D.
     int a = d1.d;
     //      ^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //         ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'int'.
     String b = d1.d;
     //         ^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     //            ^
     // [cfe] A value of type 'A' can't be assigned to a variable of type 'String'.
     x = d1.e;
@@ -94,7 +94,7 @@
     // No promotion: E !<< D<A>
     x = d2.e;
     //     ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'e' isn't defined for the class 'D<A>'.
   }
 
diff --git a/tests/language_2/type_promotion/multiple_test.dart b/tests/language_2/type_promotion/multiple_test.dart
index 8410597..21a2f7d 100644
--- a/tests/language_2/type_promotion/multiple_test.dart
+++ b/tests/language_2/type_promotion/multiple_test.dart
@@ -36,29 +36,29 @@
   print(a1.a);
   print(a1.b);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a1.c);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a1.d);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   print(a2.a);
   print(a2.b);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a2.c);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a2.d);
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a1 is B && a2 is C) {
@@ -66,11 +66,11 @@
     print(a1.b);
     print(a1.c);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a1.d);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
 
     print(a2.a);
@@ -78,7 +78,7 @@
     print(a2.c);
     print(a2.d);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
 
     if (a1 is C && a2 is D) {
@@ -87,7 +87,7 @@
       print(a1.c);
       print(a1.d);
       //       ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
 
       print(a2.a);
@@ -95,7 +95,7 @@
       print(a2.c);
       print(a2.d);
       //       ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
   }
@@ -105,44 +105,44 @@
               '${a1.b}'
       '${a1.c}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'B'.
       '${a1.d}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'B'.
               '${a2.a}'
               '${a2.b}'
               '${a2.c}'
       '${a2.d}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
           : '${a1.a}'
       '${a1.b}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a1.c}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a1.d}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
           '${a2.a}'
       '${a2.b}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a2.c}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a2.d}'
       //    ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -152,7 +152,7 @@
     print(a1.c);
     print(a1.d);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
 
     print(a2.a);
@@ -160,7 +160,7 @@
     print(a2.c);
     print(a2.d);
     //       ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
 }
diff --git a/tests/language_2/type_promotion/parameter_test.dart b/tests/language_2/type_promotion/parameter_test.dart
index b93d764..7ce7119 100644
--- a/tests/language_2/type_promotion/parameter_test.dart
+++ b/tests/language_2/type_promotion/parameter_test.dart
@@ -35,15 +35,15 @@
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a is B) {
@@ -51,11 +51,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
 
     if (a is C) {
@@ -64,7 +64,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
 
@@ -72,11 +72,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if (a is C) {
@@ -85,7 +85,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
 
     if (a is B) {
@@ -94,7 +94,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
     if (a is D) {
@@ -103,7 +103,7 @@
       print(a.c);
       print(a.d);
       //      ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
     }
 
@@ -112,33 +112,33 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
 
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   if (a is D) {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
@@ -146,15 +146,15 @@
   print(a.a);
   print(a.b);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'b' isn't defined for the class 'A'.
   print(a.c);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'c' isn't defined for the class 'A'.
   print(a.d);
   //      ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'd' isn't defined for the class 'A'.
 
   var o1 = a is B
@@ -162,24 +162,24 @@
               '${a.b}'
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'B'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'B'.
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -189,20 +189,20 @@
               '${a.c}'
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -210,25 +210,25 @@
           ? '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'D'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'D'.
               '${a.d}'
           : '${a.a}'
       '${a.b}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       '${a.c}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       '${a.d}'
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
       ;
 
@@ -237,11 +237,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if (a is B && a is C) {
@@ -250,7 +250,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is C && a is B) {
@@ -259,7 +259,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is C && a is D) {
@@ -268,18 +268,18 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if (a is D && a is C) {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
@@ -287,37 +287,37 @@
       a.a == ""
       && a.b == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'D'.
       && a.c == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'D'.
       &&
       a.d == "") {
     print(a.a);
     print(a.b);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'b' isn't defined for the class 'D'.
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'D'.
     print(a.d);
   }
   if (a.a == ""
       && a.b == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'b' isn't defined for the class 'A'.
       && a.c == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'A'.
       && a.d == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'A'.
           &&
           a is B &&
@@ -325,11 +325,11 @@
           a.b == ""
       && a.c == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'c' isn't defined for the class 'B'.
       && a.d == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'B'.
           &&
           a is C &&
@@ -338,7 +338,7 @@
           a.c == ""
       && a.d == ""
       //   ^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] The getter 'd' isn't defined for the class 'C'.
       ) {
     print(a.a);
@@ -346,7 +346,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
   if ((a is B)) {
@@ -354,11 +354,11 @@
     print(a.b);
     print(a.c);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'c' isn't defined for the class 'B'.
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'B'.
   }
   if ((a is B && (a) is C) && a is B) {
@@ -367,7 +367,7 @@
     print(a.c);
     print(a.d);
     //      ^
-    // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+    // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
     // [cfe] The getter 'd' isn't defined for the class 'C'.
   }
 }
diff --git a/tests/language_2/type_variable/bound_access_test.dart b/tests/language_2/type_variable/bound_access_test.dart
index 77f8594..39d52ea 100644
--- a/tests/language_2/type_variable/bound_access_test.dart
+++ b/tests/language_2/type_variable/bound_access_test.dart
@@ -21,7 +21,7 @@
 
   num method2() => field1 + field2.length;
   //                               ^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'length' isn't defined for the class 'num'.
 }
 
diff --git a/tests/language_2/type_variable/conflict2_test.dart b/tests/language_2/type_variable/conflict2_test.dart
index 4a03e01..f43e609 100644
--- a/tests/language_2/type_variable/conflict2_test.dart
+++ b/tests/language_2/type_variable/conflict2_test.dart
@@ -14,42 +14,42 @@
   // This is equivalent to (T).call(). See issue 19725
   foo() => T();
   //       ^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION
   // [cfe] Method not found: 'T'.
 
   // T is in scope, even in static context. Compile-time error to call this.T().
   static bar() => T();
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION
   // [cfe] Method not found: 'T'.
   //              ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
 
   // X is not in scope. NoSuchMethodError.
   static baz() => X();
   //              ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'X'.
 
   // Class 'C' has no static method 'T': NoSuchMethodError.
   static qux() => C.T();
   //                ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
   // [cfe] Method not found: 'C.T'.
 
   // Class '_Type' has no instance method 'call': NoSuchMethodError.
   quux() => (T)();
   //        ^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
   //           ^
   // [cfe] The method 'call' isn't defined for the class 'Type'.
 
   // Runtime type T not accessible from static context. Compile-time error.
   static corge() => (T)();
   //                ^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+  // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
   //                 ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
   //                   ^
   // [cfe] The method 'call' isn't defined for the class 'Type'.
@@ -57,31 +57,31 @@
   // Class '_Type' has no [] operator: NoSuchMethodError.
   grault() => T[0];
   //           ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]' isn't defined for the class 'Type'.
 
   // Runtime type T not accessible from static context. Compile-time error.
   static garply() => T[0];
   //                 ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
   //                  ^^^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '[]' isn't defined for the class 'Type'.
 
   // Class '_Type' has no member m: NoSuchMethodError.
   waldo() => T.m;
   //           ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm' isn't defined for the class 'Type'.
 
   // Runtime type T not accessible from static context. Compile-time error.
   static fred() => T.m;
   //               ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
   //                 ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
   // [cfe] The getter 'm' isn't defined for the class 'Type'.
 }
 
diff --git a/tests/language_2/type_variable/scope_test.dart b/tests/language_2/type_variable/scope_test.dart
index 10051d0..febaa5d 100644
--- a/tests/language_2/type_variable/scope_test.dart
+++ b/tests/language_2/type_variable/scope_test.dart
@@ -10,24 +10,24 @@
   static
   Foo<T>
   //  ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
       m(
 //    ^
 // [cfe] Can only use type variables in instance methods.
     Foo<T>
     //  ^
-    // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
     // [cfe] Type variables can't be used in static members.
           f) {
     Foo<T> x = new Foo<String>();
     //  ^
-    // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
     // [cfe] Type variables can't be used in static members.
     //         ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
     return new Foo<String>();
     //     ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
   }
 
   // T is in scope for a factory method.
@@ -38,7 +38,7 @@
   // T is not in scope for a static field.
   static Foo<T> f1;
   //         ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
   // [cfe] Type variables can't be used in static members.
   //            ^
   // [cfe] Verification of the generated program failed:
@@ -46,13 +46,13 @@
   static
   Foo<T>
   //  ^
-  // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
       get f {
       //  ^
       // [cfe] Can only use type variables in instance methods.
     return new Foo<String>();
     //     ^^^^^^^^^^^^^^^^^
-    // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+    // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE
   }
 
   static void set f(
@@ -60,7 +60,7 @@
   // [cfe] Can only use type variables in instance methods.
                     Foo<T>
                     //  ^
-                    // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
+                    // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC
                     // [cfe] Type variables can't be used in static members.
       value) {}
 }
@@ -72,11 +72,11 @@
 main() {
   Foo.m(new Foo<String>());
   //    ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   new I(new Foo<String>());
   Foo.f1 = new Foo<String>();
   //       ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   //           ^
   // [cfe] A value of type 'Foo<String>' can't be assigned to a variable of type 'Foo<T>'.
   var x = Foo.f;
diff --git a/tests/language_2/unsorted/callable_test.dart b/tests/language_2/unsorted/callable_test.dart
index 75ff4c2..16dde13 100644
--- a/tests/language_2/unsorted/callable_test.dart
+++ b/tests/language_2/unsorted/callable_test.dart
@@ -42,12 +42,12 @@
   //^
   // [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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
 
   Expect.equals(f(), 42);
   Expect.equals(g(100), 187);
diff --git a/tests/language_2/unsorted/external_test.dart b/tests/language_2/unsorted/external_test.dart
index 1f71b6d..7d2f2af 100644
--- a/tests/language_2/unsorted/external_test.dart
+++ b/tests/language_2/unsorted/external_test.dart
@@ -43,7 +43,7 @@
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Expected ';' after this.
   //           ^^^^^^
-  // [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+  // [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
 
   external Foo.n21(val) : x = 1;
   //                    ^
@@ -67,7 +67,7 @@
   // [analyzer] SYNTACTIC_ERROR.EXTERNAL_FACTORY_REDIRECTION
   // [cfe] A redirecting factory can't be external.
   //                              ^^^
-  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
   // [cfe] The constructor function type 'Bar Function(dynamic)' isn't a subtype of 'Foo Function(dynamic)'.
 }
 
diff --git a/tests/language_2/unsorted/invalid_type_argument_count_test.dart b/tests/language_2/unsorted/invalid_type_argument_count_test.dart
index 3a93da2..cf9619d 100644
--- a/tests/language_2/unsorted/invalid_type_argument_count_test.dart
+++ b/tests/language_2/unsorted/invalid_type_argument_count_test.dart
@@ -5,14 +5,14 @@
 // Test top level field.
 dynamic<int> x1 = 42;
 // [error line 6, column 1, length 12]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.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
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 0 type arguments.
 
   Foo() {
@@ -28,7 +28,7 @@
   // Test local variable.
   dynamic<int> x3 = 42;
 // [error line 29, column 3, length 12]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 0 type arguments.
   print(x3);
 
@@ -38,7 +38,7 @@
 // Test parameter.
 void foo(dynamic<int> x4) {
 // [error line 39, column 10, length 12]
-// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
 // [cfe] Expected 0 type arguments.
   print(x4);
 }
diff --git a/tests/language_2/variable/illegal_initializer_test.dart b/tests/language_2/variable/illegal_initializer_test.dart
index 1b99406..6924b69 100644
--- a/tests/language_2/variable/illegal_initializer_test.dart
+++ b/tests/language_2/variable/illegal_initializer_test.dart
@@ -24,7 +24,7 @@
       //   ^^^^^^^^
       // [analyzer] COMPILE_TIME_ERROR.INITIALIZER_FOR_NON_EXISTENT_FIELD
       //        ^^^
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
 
   B.c3() : super;
   //            ^
@@ -45,7 +45,7 @@
       //   ^^^^
       // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNMENT_IN_INITIALIZER
       // [error line 39, column 16, length 0]
-      // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_GETTER
+      // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
       // [cfe] Expected '.' before this.
       //       ^
       // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language_2/variable/ref_before_declaration_test.dart b/tests/language_2/variable/ref_before_declaration_test.dart
index 53f42bc..ee9ebc2 100644
--- a/tests/language_2/variable/ref_before_declaration_test.dart
+++ b/tests/language_2/variable/ref_before_declaration_test.dart
@@ -76,7 +76,7 @@
     //                   ^
     // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
     //                   ^
-    // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+    // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   }
 
   test() {
diff --git a/tests/language_2/variance/syntax/variance_type_parameter_error_syntax_test.dart b/tests/language_2/variance/syntax/variance_type_parameter_error_syntax_test.dart
index 28c1add..e3e51d3 100644
--- a/tests/language_2/variance/syntax/variance_type_parameter_error_syntax_test.dart
+++ b/tests/language_2/variance/syntax/variance_type_parameter_error_syntax_test.dart
@@ -17,19 +17,19 @@
 // [cfe] Expected ')' before this.
   List<out String> bar;
   //  ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '<' isn't defined for the class 'Type'.
   //   ^^^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Expected ';' after this.
   //   ^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
   // [cfe] Getter not found: 'out'.
   //             ^
-  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR
   // [cfe] The operator '>' isn't defined for the class 'Type'.
   //               ^^^
-  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
   // [cfe] Getter not found: 'bar'.
 }
 
diff --git a/tests/language_2/variance/variance_in_inference_error_test.dart b/tests/language_2/variance/variance_in_inference_error_test.dart
index b481d4dd..f7ab3d4 100644
--- a/tests/language_2/variance/variance_in_inference_error_test.dart
+++ b/tests/language_2/variance/variance_in_inference_error_test.dart
@@ -32,7 +32,7 @@
   var inferredMiddle = inferContraContra(Contravariant<Upper>(), Contravariant<Middle>());
   upper = inferredMiddle;
   //      ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -40,7 +40,7 @@
   var inferredLower = inferContraContra(Contravariant<Upper>(), Contravariant<Lower>());
   upper = inferredLower;
   //      ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -48,7 +48,7 @@
 //^^^^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
 //                                 ^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.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.
@@ -56,7 +56,7 @@
 //^^^^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
 //                                    ^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [analyzer] COMPILE_TIME_ERROR.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
@@ -88,7 +88,7 @@
   var inferredContraUpper = inferContraBound(ContraBound(Lower(), (Upper x) {}));
   lower = inferredContraUpper;
   //      ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -96,6 +96,6 @@
   var inferredContraMiddle = inferContraBound(ContraBound(Lower(), (Middle x) {}));
   lower = inferredContraMiddle;
   //      ^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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_2/variance/variance_in_subtyping_error_test.dart b/tests/language_2/variance/variance_in_subtyping_error_test.dart
index d5697c7..4271fd0 100644
--- a/tests/language_2/variance/variance_in_subtyping_error_test.dart
+++ b/tests/language_2/variance/variance_in_subtyping_error_test.dart
@@ -70,11 +70,11 @@
   List<Contravariant<Lower>> listLower = [new Contravariant<Lower>()];
   iterableMiddle = listLower;
   //               ^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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_2/variance/variance_inout_inference_error_test.dart b/tests/language_2/variance/variance_inout_inference_error_test.dart
index ce4109f..4aab0b7 100644
--- a/tests/language_2/variance/variance_inout_inference_error_test.dart
+++ b/tests/language_2/variance/variance_inout_inference_error_test.dart
@@ -26,10 +26,10 @@
 //^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
   //          ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -37,7 +37,7 @@
 //^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
   //          ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -45,7 +45,7 @@
 //^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
   //                               ^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'Invariant<Lower>' can't be assigned to the parameter type 'Invariant<Middle>'.
 
   // Upper <: T
@@ -55,7 +55,7 @@
 //^^^^^^^^^^^
 // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
   //          ^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
   // [cfe] The argument type 'Invariant<Middle>' can't be assigned to the parameter type 'Invariant<Upper>'.
 
   // T <: Lower
diff --git a/tests/language_2/variance/variance_inout_subtyping_error_test.dart b/tests/language_2/variance/variance_inout_subtyping_error_test.dart
index d06f336..d994e6c 100644
--- a/tests/language_2/variance/variance_inout_subtyping_error_test.dart
+++ b/tests/language_2/variance/variance_inout_subtyping_error_test.dart
@@ -108,23 +108,23 @@
   List<Invariant<Middle>> listMiddle = [new Invariant<Middle>()];
   iterableLower = listMiddle;
   //              ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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_2/variance/variance_out_inference_error_test.dart b/tests/language_2/variance/variance_out_inference_error_test.dart
index 809cdfb..ccce0d1 100644
--- a/tests/language_2/variance/variance_out_inference_error_test.dart
+++ b/tests/language_2/variance/variance_out_inference_error_test.dart
@@ -31,7 +31,7 @@
   var inferredMiddle = inferCovCov(Covariant<Lower>(), Covariant<Middle>());
   lower = inferredMiddle;
   //      ^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'Exactly<Middle>' can't be assigned to a variable of type 'Exactly<Lower>'.
 
   // Lower <: T <: Upper.
@@ -39,7 +39,7 @@
   var inferredUpper = inferCovCov(Covariant<Lower>(), Covariant<Upper>());
   lower = inferredUpper;
   //      ^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -47,7 +47,7 @@
   var inferredCovLower = inferCovBound(CovBound(Lower(), (Upper x) {}));
   upper = inferredCovLower;
   //      ^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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.
@@ -55,6 +55,6 @@
   var inferredCovLower2 = inferCovBound(CovBound(Lower(), (Middle x) {}));
   middle = inferredCovLower2;
   //       ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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_2/variance/variance_out_subtyping_error_test.dart b/tests/language_2/variance/variance_out_subtyping_error_test.dart
index a85f4cb..2ddcd3e 100644
--- a/tests/language_2/variance/variance_out_subtyping_error_test.dart
+++ b/tests/language_2/variance/variance_out_subtyping_error_test.dart
@@ -70,11 +70,11 @@
   List<Covariant<Middle>> listMiddle = [new Covariant<Middle>()];
   iterableLower = listMiddle;
   //              ^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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_2/variance/variance_upper_lower_bounds_error_test.dart b/tests/language_2/variance/variance_upper_lower_bounds_error_test.dart
index 2c69097..a8e1f25 100644
--- a/tests/language_2/variance/variance_upper_lower_bounds_error_test.dart
+++ b/tests/language_2/variance/variance_upper_lower_bounds_error_test.dart
@@ -28,39 +28,39 @@
       exactly(condition ? Contravariant<Upper>() : Contravariant<Lower>());
   Exactly<Contravariant<Upper>> contraUpperExpected = contraLowerActual;
   //                                                  ^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
   // [cfe] A value of type 'Exactly<Object>' can't be assigned to a variable of type 'Exactly<Invariant<Upper>>'.
 
   var legacyCovMiddleActual =
@@ -68,14 +68,14 @@
   Exactly<LegacyCovariant<Lower>> legacyCovLowerExpected =
       legacyCovMiddleActual;
   //  ^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
@@ -83,20 +83,20 @@
       : Multi<Lower, Middle, Lower>());
   Exactly<Multi<Lower, Middle, Lower>> multiExpected = multiActual;
   //                                                   ^^^^^^^^^^^
-  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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
+  // [analyzer] COMPILE_TIME_ERROR.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/lib/html/cache_test.dart b/tests/lib/html/cache_test.dart
index 2e0991b..3fde2d2 100644
--- a/tests/lib/html/cache_test.dart
+++ b/tests/lib/html/cache_test.dart
@@ -17,8 +17,8 @@
     test('ApplicationCache', () {
       var expectation = ApplicationCache.supported ? returnsNormally : throws;
       expect(() {
-        ApplicationCache appCache = window.applicationCache;
-        expect(cacheStatusToString(appCache.status), "UNCACHED");
+        ApplicationCache appCache = window.applicationCache!;
+        expect(cacheStatusToString(appCache.status!), "UNCACHED");
       }, expectation);
     });
   });
diff --git a/tests/lib/html/callback_list_test.dart b/tests/lib/html/callback_list_test.dart
index d6390b1..f61dee8 100644
--- a/tests/lib/html/callback_list_test.dart
+++ b/tests/lib/html/callback_list_test.dart
@@ -27,7 +27,7 @@
 }
 
 void main() async {
-  window.navigator.persistentStorage.requestQuota(1024 * 1024, _quotaHandler);
+  window.navigator.persistentStorage!.requestQuota(1024 * 1024, _quotaHandler);
 
   await waitUntilCallbackDone(isCallbackDone);
   expect(true, isCallbackDone());
@@ -36,7 +36,7 @@
 Future _quotaHandler(int byteCount) async {
   FileSystem filesystem =
       await window.requestFileSystem(1024 * 1024, persistent: true);
-  DirectoryEntry dir = await filesystem.root;
+  DirectoryEntry dir = await filesystem.root!;
   DirectoryReader dirReader = dir.createReader();
   await dirReader.readEntries();
   List<Entry> secondEntries = await dirReader.readEntries();
diff --git a/tests/lib/html/crypto_test.dart b/tests/lib/html/crypto_test.dart
index 9cb63ab..b398f2d 100644
--- a/tests/lib/html/crypto_test.dart
+++ b/tests/lib/html/crypto_test.dart
@@ -24,7 +24,7 @@
       });
 
       test('successful call', () {
-        var crypto = window.crypto;
+        var crypto = window.crypto!;
         var data = new Uint8List(100);
         expect(data.every((e) => e == 0), isTrue);
         crypto.getRandomValues(data);
@@ -35,7 +35,7 @@
       });
 
       test('type mismatch', () {
-        var crypto = window.crypto;
+        var crypto = window.crypto!;
         var data = new Float32List(100);
         expect(() {
           crypto.getRandomValues(data);
diff --git a/tests/lib/html/css_rule_list_test.dart b/tests/lib/html/css_rule_list_test.dart
index 596e2d8..f994bc4 100644
--- a/tests/lib/html/css_rule_list_test.dart
+++ b/tests/lib/html/css_rule_list_test.dart
@@ -11,7 +11,7 @@
       predicate((x) => x is List<CssRule>, 'is a List<CssRule>');
 
   test("ClientRectList test", () {
-    var sheet = document.styleSheets[0] as CssStyleSheet;
+    var sheet = document.styleSheets![0] as CssStyleSheet;
     List<CssRule> rulesList = sheet.cssRules;
     expect(rulesList, isCssRuleList);
   });
diff --git a/tests/lib/html/cssstyledeclaration_test.dart b/tests/lib/html/cssstyledeclaration_test.dart
index aa8a5d4..d18ff33 100644
--- a/tests/lib/html/cssstyledeclaration_test.dart
+++ b/tests/lib/html/cssstyledeclaration_test.dart
@@ -23,7 +23,7 @@
 
   test('default constructor is empty', () {
     var style = new CssStyleDeclaration();
-    expect(style.cssText.isEmpty, isTrue);
+    expect(style.cssText!.isEmpty, isTrue);
     expect(style.getPropertyPriority('color').isEmpty, isTrue);
     expect(style.item(0).isEmpty, isTrue);
     expect(style.length, 0);
@@ -46,7 +46,7 @@
   test('removeProperty is wrapped', () {
     var style = createTestStyle();
     style.removeProperty("width");
-    expect(style.cssText.trim(), equals("color: blue;"));
+    expect(style.cssText!.trim(), equals("color: blue;"));
   });
 
   test('CSS property empty getters and setters', () {
diff --git a/tests/lib/html/custom/element_upgrade_failure_test.dart b/tests/lib/html/custom/element_upgrade_failure_test.dart
index 947af1c..16469cf 100644
--- a/tests/lib/html/custom/element_upgrade_failure_test.dart
+++ b/tests/lib/html/custom/element_upgrade_failure_test.dart
@@ -41,13 +41,13 @@
     expect(() {
       upgrader.upgrade(new HtmlElementInterface());
       //                   ^^^^^^^^^^^^^^^^^^^^
-      // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
+      // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
     }, throws);
   });
 }
 
 class HtmlElementInterface implements HtmlElement {
   //  ^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+  // [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
   HtmlElementInterface.created();
 }
diff --git a/tests/lib/html/custom/entered_left_view/entered_left_view_util.dart b/tests/lib/html/custom/entered_left_view/entered_left_view_util.dart
index d5f6e7d..d34222d 100644
--- a/tests/lib/html/custom/entered_left_view/entered_left_view_util.dart
+++ b/tests/lib/html/custom/entered_left_view/entered_left_view_util.dart
@@ -62,7 +62,7 @@
 }
 
 var docA = document;
-var docB = document.implementation.createHtmlDocument('');
+var docB = document.implementation!.createHtmlDocument('');
 var nullSanitizer = new NullTreeSanitizer();
 
 setupFunc() {
diff --git a/tests/lib/html/datalistelement_test.dart b/tests/lib/html/datalistelement_test.dart
index 2a9396d..767d97a 100644
--- a/tests/lib/html/datalistelement_test.dart
+++ b/tests/lib/html/datalistelement_test.dart
@@ -53,7 +53,7 @@
   test('options', () {
     try {
       var options =
-          (document.querySelector('#browsers') as DataListElement).options;
+          (document.querySelector('#browsers') as DataListElement).options!;
       expect(options.length, 5);
     } catch (e) {
       expect(DataListElement.supported, false);
diff --git a/tests/lib/html/document_test.dart b/tests/lib/html/document_test.dart
index 334f67e..f9e480b 100644
--- a/tests/lib/html/document_test.dart
+++ b/tests/lib/html/document_test.dart
@@ -48,7 +48,7 @@
 
     test('adoptNode', () {
       var div = new Element.html('<div><div id="foo">bar</div></div>');
-      var doc = document.implementation.createHtmlDocument('');
+      var doc = document.implementation!.createHtmlDocument('');
       expect(doc.adoptNode(div), div);
       expect(div.ownerDocument, doc);
       doc.body!.nodes.add(div);
@@ -57,7 +57,7 @@
 
     test('importNode', () {
       var div = new Element.html('<div><div id="foo">bar</div></div>');
-      var doc = document.implementation.createHtmlDocument('');
+      var doc = document.implementation!.createHtmlDocument('');
       var div2 = doc.importNode(div, true);
       expect(div2, notEquals(div));
       expect(div2.ownerDocument, doc);
@@ -70,7 +70,7 @@
       var doc1 = document;
       expect(doc1 is HtmlDocument, true);
       expect(inscrutable(doc1) is HtmlDocument, true);
-      var doc2 = document.implementation.createHtmlDocument('');
+      var doc2 = document.implementation!.createHtmlDocument('');
       expect(doc2 is HtmlDocument, true);
       expect(inscrutable(doc2) is HtmlDocument, true);
     });
@@ -78,7 +78,7 @@
     test('typeTest2', () {
       inscrutable = inscrutable(inscrutable);
       // XML document.
-      var doc3 = document.implementation.createDocument(null, 'report', null);
+      var doc3 = document.implementation!.createDocument(null, 'report', null);
       expect(doc3 is HtmlDocument, false);
       expect(inscrutable(doc3) is HtmlDocument, false);
     });
diff --git a/tests/lib/html/element_classes_svg_test.dart b/tests/lib/html/element_classes_svg_test.dart
index cc05a21..12520b7 100644
--- a/tests/lib/html/element_classes_svg_test.dart
+++ b/tests/lib/html/element_classes_svg_test.dart
@@ -89,7 +89,7 @@
 
 main() {
   Set<String> extractClasses(Element el) {
-    final match = new RegExp('class="([^"]+)"').firstMatch(el.outerHtml)!;
+    final match = new RegExp('class="([^"]+)"').firstMatch(el.outerHtml!)!;
     return new LinkedHashSet.from(match[1]!.split(' '));
   }
 
diff --git a/tests/lib/html/element_classes_test.dart b/tests/lib/html/element_classes_test.dart
index 0345692..322efb7 100644
--- a/tests/lib/html/element_classes_test.dart
+++ b/tests/lib/html/element_classes_test.dart
@@ -46,7 +46,7 @@
 
 main() {
   Set<String> extractClasses(Element el) {
-    final match = new RegExp('class="([^"]+)"').firstMatch(el.outerHtml)!;
+    final match = new RegExp('class="([^"]+)"').firstMatch(el.outerHtml!)!;
     return new LinkedHashSet.from(match[1]!.split(' '));
   }
 
diff --git a/tests/lib/html/element_constructor_1_test.dart b/tests/lib/html/element_constructor_1_test.dart
index bd265b4..b5a7cfc 100644
--- a/tests/lib/html/element_constructor_1_test.dart
+++ b/tests/lib/html/element_constructor_1_test.dart
@@ -31,7 +31,7 @@
   test('anchor2', () {
     var e = new AnchorElement(href: '#blah');
     expect(e, isAnchorElement);
-    expect(e.href.endsWith('#blah'), isTrue);
+    expect(e.href!.endsWith('#blah'), isTrue);
   });
 
   test('area', () {
diff --git a/tests/lib/html/file_sample_test.dart b/tests/lib/html/file_sample_test.dart
index 15d36f4..59f6930 100644
--- a/tests/lib/html/file_sample_test.dart
+++ b/tests/lib/html/file_sample_test.dart
@@ -59,7 +59,7 @@
   var fs = await fileSystem;
 
   _myDirectory =
-      await fs.root.createDirectory('my_directory') as DirectoryEntry;
+      await fs.root!.createDirectory('my_directory') as DirectoryEntry;
 
   FileEntry fileEntry = await _myDirectory.createFile('log.txt') as FileEntry;
 
@@ -122,7 +122,7 @@
   FileEntry fileEntry = await createFile();
   expect(fileEntry.name, 'log.txt');
 
-  List<Entry> entries = await readEntries(fs.root);
+  List<Entry> entries = await readEntries(fs.root!);
   expect(entries.length > 0, true);
   expect(entries[0].isDirectory, true);
   expect(entries[0].name, 'my_directory');
diff --git a/tests/lib/html/fileapi_directory_reader_test.dart b/tests/lib/html/fileapi_directory_reader_test.dart
index 7468759..12a7244 100644
--- a/tests/lib/html/fileapi_directory_reader_test.dart
+++ b/tests/lib/html/fileapi_directory_reader_test.dart
@@ -28,8 +28,8 @@
   Future doDirSetup(String testName) async {
     await getFileSystem();
 
-    var file = await fs.root.createFile('file_$testName') as FileEntry;
-    var dir = await fs.root.createDirectory('dir_$testName') as DirectoryEntry;
+    var file = await fs.root!.createFile('file_$testName') as FileEntry;
+    var dir = await fs.root!.createDirectory('dir_$testName') as DirectoryEntry;
     return new Future.value(new FileAndDir(file, dir));
   }
 
diff --git a/tests/lib/html/fileapi_directory_test.dart b/tests/lib/html/fileapi_directory_test.dart
index 9b4ee72..da24c78 100644
--- a/tests/lib/html/fileapi_directory_test.dart
+++ b/tests/lib/html/fileapi_directory_test.dart
@@ -28,14 +28,14 @@
 
     test('directoryDoesntExist', () async {
       try {
-        await fs.root.getDirectory('directory2');
+        await fs.root!.getDirectory('directory2');
       } on DomException catch (error) {
         expect(DomException.NOT_FOUND, error.name);
       }
     });
 
     test('directoryCreate', () async {
-      var entry = await fs.root.createDirectory('directory3');
+      var entry = await fs.root!.createDirectory('directory3');
       expect(entry.name, equals('directory3'));
     });
   }
diff --git a/tests/lib/html/fileapi_entry_test.dart b/tests/lib/html/fileapi_entry_test.dart
index fd0e303..ae700a1 100644
--- a/tests/lib/html/fileapi_entry_test.dart
+++ b/tests/lib/html/fileapi_entry_test.dart
@@ -30,8 +30,8 @@
   Future doDirSetup(String testName) async {
     await getFileSystem();
 
-    var file = await fs.root.createFile('file_$testName') as FileEntry;
-    var dir = await fs.root.createDirectory('dir_$testName') as DirectoryEntry;
+    var file = await fs.root!.createFile('file_$testName') as FileEntry;
+    var dir = await fs.root!.createDirectory('dir_$testName') as DirectoryEntry;
     return new Future.value(new FileAndDir(file, dir));
   }
 
@@ -56,7 +56,7 @@
       expect(entry.fullPath, '/dir_moveTo/movedFile');
 
       try {
-        entry = await fs.root.getFile('file4');
+        entry = await fs.root!.getFile('file4');
         fail("File file4 should not exist.");
       } on DomException catch (error) {
         expect(DomException.NOT_FOUND, error.name);
diff --git a/tests/lib/html/fileapi_file_entry_test.dart b/tests/lib/html/fileapi_file_entry_test.dart
index 1789003..d8bf7b6 100644
--- a/tests/lib/html/fileapi_file_entry_test.dart
+++ b/tests/lib/html/fileapi_file_entry_test.dart
@@ -28,8 +28,8 @@
   Future doDirSetup(String testName) async {
     await getFileSystem();
 
-    var file = await fs.root.createFile('file_$testName') as FileEntry;
-    var dir = await fs.root.createDirectory('dir_$testName') as DirectoryEntry;
+    var file = await fs.root!.createFile('file_$testName') as FileEntry;
+    var dir = await fs.root!.createDirectory('dir_$testName') as DirectoryEntry;
     return new Future.value(new FileAndDir(file, dir));
   }
 
diff --git a/tests/lib/html/fileapi_file_test.dart b/tests/lib/html/fileapi_file_test.dart
index 8eb644b..1503213 100644
--- a/tests/lib/html/fileapi_file_test.dart
+++ b/tests/lib/html/fileapi_file_test.dart
@@ -28,7 +28,7 @@
 
     test('fileDoesntExist', () async {
       try {
-        var fileObj = await fs.root.getFile('file2');
+        var fileObj = await fs.root!.getFile('file2');
         fail("file found");
       } on DomException catch (error) {
         expect(DomException.NOT_FOUND, error.name);
@@ -36,7 +36,7 @@
     });
 
     test('fileCreate', () async {
-      var fileObj = await fs.root.createFile('file4');
+      var fileObj = await fs.root!.createFile('file4');
       expect(fileObj.name, equals('file4'));
       expect(fileObj.isFile, isTrue);
 
diff --git a/tests/lib/html/fontface_loaded_test.dart b/tests/lib/html/fontface_loaded_test.dart
index ef07061..5a889f4 100644
--- a/tests/lib/html/fontface_loaded_test.dart
+++ b/tests/lib/html/fontface_loaded_test.dart
@@ -34,7 +34,7 @@
   test('document fonts - temporary', () async {
     var atLeastOneFont = false;
     var loaded = <Future<FontFace>>[];
-    document.fonts.forEach((FontFace fontFace, _, __) async {
+    document.fonts!.forEach((FontFace fontFace, _, __) async {
       atLeastOneFont = true;
       var f1 = fontFace.loaded;
       var f2 = fontFace.loaded;
@@ -44,14 +44,14 @@
     });
     expect(atLeastOneFont, isTrue);
     return Future.wait(loaded).then(expectAsync((_) async {
-      document.fonts.forEach((fontFace, _, __) {
+      document.fonts!.forEach((fontFace, _, __) {
         expect(fontFace.status, 'loaded');
       });
       expect(loaded.length, 3);
       for (var loadedEntry in loaded) {
         var fontFace = await loadedEntry;
         expect(fontFace.status, 'loaded');
-        var fontFamily = fontFace.family;
+        var fontFamily = fontFace.family!;
         if (fontFamily.startsWith('"')) {
           // FF wraps family in quotes - remove the quotes.
           fontFamily = fontFamily.substring(1, fontFamily.length - 1);
diff --git a/tests/lib/html/form_data_test.dart b/tests/lib/html/form_data_test.dart
index 03592e2..b142676 100644
--- a/tests/lib/html/form_data_test.dart
+++ b/tests/lib/html/form_data_test.dart
@@ -68,7 +68,7 @@
             '${window.location.protocol}//${window.location.host}/echo');
 
         xhr.onLoad.listen(expectAsync((e) {
-          expect(xhr.responseText.contains(blobString), isTrue);
+          expect(xhr.responseText!.contains(blobString), isTrue);
         }));
         xhr.onError.listen((e) {
           fail('$e');
diff --git a/tests/lib/html/html_mock_test.dart b/tests/lib/html/html_mock_test.dart
index 94c016d..ed3e85b 100644
--- a/tests/lib/html/html_mock_test.dart
+++ b/tests/lib/html/html_mock_test.dart
@@ -35,7 +35,7 @@
 class MockWindow extends Mock with _EventListeners implements Window {
   Stream<Event> get onBeforeUnload => new Stream.fromIterable([]);
 
-  String name = "MOCK_NAME";
+  String? name = "MOCK_NAME";
 }
 
 @proxy
diff --git a/tests/lib/html/htmlcollection_test.dart b/tests/lib/html/htmlcollection_test.dart
index e0d60e3..fe81626 100644
--- a/tests/lib/html/htmlcollection_test.dart
+++ b/tests/lib/html/htmlcollection_test.dart
@@ -6,8 +6,8 @@
 
 import 'package:expect/minitest.dart';
 
-bool isChecked(Element e) => (e as CheckboxInputElement).checked;
-bool isUnchecked(Element e) => !(e as CheckboxInputElement).checked;
+bool isChecked(Element e) => (e as CheckboxInputElement).checked!;
+bool isUnchecked(Element e) => !(e as CheckboxInputElement).checked!;
 
 // Test that List<Element> implements List<T>
 main() {
diff --git a/tests/lib/html/interactive_geolocation_test.dart b/tests/lib/html/interactive_geolocation_test.dart
index 1ad3a13..133079c 100644
--- a/tests/lib/html/interactive_geolocation_test.dart
+++ b/tests/lib/html/interactive_geolocation_test.dart
@@ -12,16 +12,18 @@
 
 Future testGetCurrentPosition() async {
   var position = await window.navigator.geolocation.getCurrentPosition();
-  Expect.isNotNull(position.coords.latitude);
-  Expect.isNotNull(position.coords.longitude);
-  Expect.isNotNull(position.coords.accuracy);
+  var coords = position.coords!;
+  Expect.isNotNull(coords.latitude);
+  Expect.isNotNull(coords.longitude);
+  Expect.isNotNull(coords.accuracy);
 }
 
 Future testWatchPosition() async {
   var position = await window.navigator.geolocation.watchPosition().first;
-  Expect.isNotNull(position.coords.latitude);
-  Expect.isNotNull(position.coords.longitude);
-  Expect.isNotNull(position.coords.accuracy);
+  var coords = position.coords!;
+  Expect.isNotNull(coords.latitude);
+  Expect.isNotNull(coords.longitude);
+  Expect.isNotNull(coords.accuracy);
 }
 
 main() {
diff --git a/tests/lib/html/interactive_media_test.dart b/tests/lib/html/interactive_media_test.dart
index 5a816aea..997d376 100644
--- a/tests/lib/html/interactive_media_test.dart
+++ b/tests/lib/html/interactive_media_test.dart
@@ -17,7 +17,7 @@
     var mediaStream = await userMediaFuture;
     expect(mediaStream, isNotNull);
     expect(mediaStream is MediaStream, true);
-    var devices = window.navigator.mediaDevices;
+    var devices = window.navigator.mediaDevices!;
     var enumDevices = await devices.enumerateDevices();
     expect(enumDevices.length > 1, true);
     for (var device in enumDevices) {
@@ -65,14 +65,14 @@
       await testUserMediaAudio(window.navigator
           .getUserMedia(audio: true)); // Deprecated way to get a media stream.
       await testUserMediaAudio(
-          window.navigator.mediaDevices.getUserMedia({'audio': true}));
+          window.navigator.mediaDevices!.getUserMedia({'audio': true}));
     });
 
     test('getUserMedia', () async {
       await testUserMediaVideo(window.navigator
           .getUserMedia(video: true)); // Deprecated way to get a media stream.
       await testUserMediaVideo(
-          window.navigator.mediaDevices.getUserMedia({'video': true}));
+          window.navigator.mediaDevices!.getUserMedia({'video': true}));
     });
 
     test('getUserMediaComplexConstructor', () async {
@@ -86,7 +86,7 @@
       await testUserMediaVideo(window.navigator.getUserMedia(
           video: videoOptions)); // Deprecated way to get a media stream.
       await testUserMediaVideo(
-          window.navigator.mediaDevices.getUserMedia({'video': videoOptions}));
+          window.navigator.mediaDevices!.getUserMedia({'video': videoOptions}));
     });
   }
 }
diff --git a/tests/lib/html/js_function_getter_trust_types/compile_test.dart b/tests/lib/html/js_function_getter_trust_types/compile_test.dart
index 9cbbe1f..e7481d1 100644
--- a/tests/lib/html/js_function_getter_trust_types/compile_test.dart
+++ b/tests/lib/html/js_function_getter_trust_types/compile_test.dart
@@ -18,25 +18,25 @@
 //        ^
 // [cfe] Error: 'nonFunctionStatic' isn't a function or method and can't be invoked.
 //^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 
   foo.bar.nonFunctionStatic(0);
 //        ^
 // [cfe] Error: 'nonFunctionStatic' isn't a function or method and can't be invoked.
 //^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 
   foo.bar.nonFunctionStatic(0, 0);
 //        ^
 // [cfe] Error: 'nonFunctionStatic' isn't a function or method and can't be invoked.
 //^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 
   foo.bar.nonFunctionStatic(0, 0, 0, 0, 0, 0);
 //        ^
 // [cfe] Error: 'nonFunctionStatic' isn't a function or method and can't be invoked.
 //^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 
   foo.bar.add(4);
   //         ^
diff --git a/tests/lib/html/js_typed_interop_type_test.dart b/tests/lib/html/js_typed_interop_type_test.dart
index c3967b5..a7195ab 100644
--- a/tests/lib/html/js_typed_interop_type_test.dart
+++ b/tests/lib/html/js_typed_interop_type_test.dart
@@ -26,7 +26,7 @@
 @JS()
 @anonymous
 class C {
-  late final foo;
+  external get foo;
 
   external factory C({foo});
 }
@@ -34,7 +34,7 @@
 @JS()
 @anonymous
 class D {
-  late final foo;
+  external get foo;
 
   external factory D({foo});
 }
diff --git a/tests/lib/html/mediadevices_test.dart b/tests/lib/html/mediadevices_test.dart
index abc803a..2b4331c 100644
--- a/tests/lib/html/mediadevices_test.dart
+++ b/tests/lib/html/mediadevices_test.dart
@@ -9,7 +9,7 @@
 import 'package:expect/expect.dart';
 
 test() async {
-  var list = await window.navigator.mediaDevices.enumerateDevices();
+  var list = await window.navigator.mediaDevices!.enumerateDevices();
   Expect.isTrue(list is List<dynamic>, "Expected list to be List<dynamic>");
 }
 
diff --git a/tests/lib/html/mutationobserver_test.dart b/tests/lib/html/mutationobserver_test.dart
index 7ee71fe..a41709b 100644
--- a/tests/lib/html/mutationobserver_test.dart
+++ b/tests/lib/html/mutationobserver_test.dart
@@ -24,7 +24,8 @@
 
   callback(mutations, observer) {
     for (MutationRecord mutation in mutations) {
-      for (Node node in mutation.addedNodes) {
+      var addedNodes = mutation.addedNodes!;
+      for (Node node in addedNodes) {
         nodes.add(node);
       }
     }
diff --git a/tests/lib/html/node_validator_important_if_you_suppress_make_the_bug_critical_test.dart b/tests/lib/html/node_validator_important_if_you_suppress_make_the_bug_critical_test.dart
index 0faaf09..5a3d0f2 100644
--- a/tests/lib/html/node_validator_important_if_you_suppress_make_the_bug_critical_test.dart
+++ b/tests/lib/html/node_validator_important_if_you_suppress_make_the_bug_critical_test.dart
@@ -117,7 +117,7 @@
       var expectedContent = document.body!.createFragment('<div></div>'
           '<img/>');
 
-      validateNodeTree(template.content, expectedContent);
+      validateNodeTree(template.content!, expectedContent);
     });
 
     test("appendHtml is sanitized", () {
diff --git a/tests/lib/html/notification_test.dart b/tests/lib/html/notification_test.dart
index 283dc5b..31bc58d 100644
--- a/tests/lib/html/notification_test.dart
+++ b/tests/lib/html/notification_test.dart
@@ -34,7 +34,7 @@
         expect(allSpecified.title, "Deluxe notification");
         expect(allSpecified.dir, "rtl");
         expect(allSpecified.body, "All parameters set");
-        var icon = allSpecified.icon;
+        var icon = allSpecified.icon!;
         var tail = Uri.parse(icon).pathSegments.last;
         expect(tail, "icon.png");
         expect(allSpecified.tag, "tag");
diff --git a/tests/lib/html/storage_promise_test.dart b/tests/lib/html/storage_promise_test.dart
index 4c8e54d..0910e0c 100644
--- a/tests/lib/html/storage_promise_test.dart
+++ b/tests/lib/html/storage_promise_test.dart
@@ -18,7 +18,7 @@
   test('Basic Promise Test', () async {
     try {
       thenEstimateBefore = true;
-      window.navigator.storage.estimate().then((value) {
+      window.navigator.storage!.estimate().then((value) {
         thenEstimate = value!;
         thenEstimateDone = true;
       });
@@ -27,7 +27,7 @@
       fail("StorageManger failed: $msg");
     }
 
-    Map estimate = await window.navigator.storage.estimate() as Map;
+    Map estimate = await window.navigator.storage!.estimate() as Map;
 
     expect(thenEstimate['usage'] >= 0, true);
     expect(thenEstimate['quota'] > 1, true);
diff --git a/tests/lib/html/streams_test.dart b/tests/lib/html/streams_test.dart
index 2d5c210..5f8bd88 100644
--- a/tests/lib/html/streams_test.dart
+++ b/tests/lib/html/streams_test.dart
@@ -15,7 +15,7 @@
   }
 
   Element get element => _a;
-  Stream<Event?> get stream => _a.onFocus;
+  Stream<Event> get stream => _a.onFocus;
 
   // Causes an event on a to be fired.
   void pulse() {
@@ -193,7 +193,7 @@
   });
 
   test('reduce', () {
-    stream.reduce((a, b) => null).then((_) {});
+    stream.reduce((a, b) => a).then((_) {});
   });
 
   test('fold', () {
diff --git a/tests/lib/html/svg_test.dart b/tests/lib/html/svg_test.dart
index 1e9a282..fecb2ee 100644
--- a/tests/lib/html/svg_test.dart
+++ b/tests/lib/html/svg_test.dart
@@ -24,11 +24,11 @@
       expect(e, isNotNull);
 
       svg.RectElement r = document.querySelector('#rect1') as svg.RectElement;
-      expect(r.x.baseVal.value, 10);
-      expect(r.y.baseVal.value, 20);
-      expect(r.height.baseVal.value, 40);
-      expect(r.width.baseVal.value, 130);
-      expect(r.rx.baseVal.value, 5);
+      expect(r.x!.baseVal!.value, 10);
+      expect(r.y!.baseVal!.value, 20);
+      expect(r.height!.baseVal!.value, 40);
+      expect(r.width!.baseVal!.value, 130);
+      expect(r.rx!.baseVal!.value, 5);
     });
 
     test('trailing newline', () {
diff --git a/tests/lib/html/track_element_constructor_test.dart b/tests/lib/html/track_element_constructor_test.dart
index 9fa006b..e2643b6 100644
--- a/tests/lib/html/track_element_constructor_test.dart
+++ b/tests/lib/html/track_element_constructor_test.dart
@@ -18,11 +18,11 @@
     if (!TrackElement.supported) return;
     document.body!.append(new TrackElement()..defaultValue = true);
     var trackElement = document.querySelector('track') as TrackElement;
-    if (!trackElement.defaultValue) {
+    if (!trackElement.defaultValue!) {
       throw 'Expected default value to be true';
     }
     trackElement.defaultValue = false;
-    if (trackElement.defaultValue) {
+    if (trackElement.defaultValue!) {
       throw 'Expected default value to be false';
     }
   });
diff --git a/tests/lib/html/trusted_html_tree_sanitizer_test.dart b/tests/lib/html/trusted_html_tree_sanitizer_test.dart
index a0d92ed..80c7738 100644
--- a/tests/lib/html/trusted_html_tree_sanitizer_test.dart
+++ b/tests/lib/html/trusted_html_tree_sanitizer_test.dart
@@ -43,7 +43,7 @@
     });
 
     test("appendHtml", () {
-      var oldStuff = document.body!.innerHtml;
+      var oldStuff = document.body!.innerHtml!;
       var newStuff = '<div rumplestiltskin="value">content</div>';
       document.body!
           .appendHtml(newStuff, treeSanitizer: NodeTreeSanitizer.trusted);
diff --git a/tests/lib/html/typing_test.dart b/tests/lib/html/typing_test.dart
index 9fa3628..6a93e4e 100644
--- a/tests/lib/html/typing_test.dart
+++ b/tests/lib/html/typing_test.dart
@@ -27,11 +27,11 @@
 
   test('StyleSheetList', () {
     var document = window.document as HtmlDocument;
-    List<StyleSheet> asList = document.styleSheets;
+    List<StyleSheet> asList = document.styleSheets!;
     expect(asList, isStyleSheetList);
     // Check it's Iterable.
     int counter = 0;
-    for (StyleSheet styleSheet in document.styleSheets) {
+    for (StyleSheet styleSheet in asList) {
       counter++;
     }
 
diff --git a/tests/lib/html/websql_test.dart b/tests/lib/html/websql_test.dart
index 7d88a91..3445764 100644
--- a/tests/lib/html/websql_test.dart
+++ b/tests/lib/html/websql_test.dart
@@ -105,8 +105,8 @@
       expect(tx, isNotNull, reason: "Transaction not ready");
       try {
         SqlResultSet queryResult = await queryTable(tx, tableName);
-        expect(queryResult.rows.length, 1);
-        expect(queryResult.rows[0]['test_data'], "Some text data");
+        expect(queryResult.rows!.length, 1);
+        expect(queryResult.rows![0]['test_data'], "Some text data");
       } on DomException catch (error) {
         expect(false, true, reason: "queryTable failed - ${error.message}");
       }
diff --git a/tests/lib/html/wheelevent_test.dart b/tests/lib/html/wheelevent_test.dart
index 2614ae0..0491868 100644
--- a/tests/lib/html/wheelevent_test.dart
+++ b/tests/lib/html/wheelevent_test.dart
@@ -44,7 +44,7 @@
       expect(e.deltaX, 0);
       expect(e.deltaY, 0);
       expect(e.screen.x, 0);
-      expect(e.deltaZ.toDouble(), 1.0);
+      expect(e.deltaZ!.toDouble(), 1.0);
       done.complete();
     } catch (e) {
       done.completeError(e);
diff --git a/tests/lib/html/xhr_cross_origin_test.dart b/tests/lib/html/xhr_cross_origin_test.dart
index 7bc0a20..dc0e34d 100644
--- a/tests/lib/html/xhr_cross_origin_test.dart
+++ b/tests/lib/html/xhr_cross_origin_test.dart
@@ -17,7 +17,7 @@
 // TODO(efortuna): If we need to use this function frequently, make a
 // url_analyzer library that is part of test.dart that these tests can import.
 int get crossOriginPort {
-  var searchUrl = window.location.search;
+  var searchUrl = window.location.search!;
   var crossOriginStr = 'crossOriginPort=';
   var index = searchUrl.indexOf(crossOriginStr);
   var nextArg = searchUrl.indexOf('&', index);
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
index 00b936c..6d510b8 100644
--- 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
@@ -4,12 +4,12 @@
     {
       "name": "foo",
       "rootUri": "../packages/foo",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "bar",
       "rootUri": "../packages/bar",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     }
   ]
 }
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
index 581db8e..740a2dd 100644
--- 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
@@ -4,12 +4,12 @@
     {
       "name": "foo",
       "rootUri": "../foo_package",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "bar",
       "rootUri": "../bar1_package",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     }
   ]
 }
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
index daf3199..e4dc783 100644
--- a/tests/lib/isolate/scenarios/package_relative_spec/bar1_package/package.config
+++ b/tests/lib/isolate/scenarios/package_relative_spec/bar1_package/package.config
@@ -4,12 +4,12 @@
     {
       "name": "foo",
       "rootUri": "../foo_package",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     },
     {
       "name": "bar",
       "rootUri": "../bar2_package",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     }
   ]
 }
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
index f77884c..c043659 100644
--- a/tests/lib/isolate/scenarios/short_package/.dart_tool/package_config.json
+++ b/tests/lib/isolate/scenarios/short_package/.dart_tool/package_config.json
@@ -4,7 +4,7 @@
     {
       "name": "flu",
       "rootUri": "../flu_package",
-      "languageVersion": "2.9"
+      "languageVersion": "2.10"
     }
   ]
 }
diff --git a/tests/lib/js/constructor_parameters_static_test.dart b/tests/lib/js/constructor_parameters_static_test.dart
new file mode 100644
index 0000000..3efa2a2
--- /dev/null
+++ b/tests/lib/js/constructor_parameters_static_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.
+
+// TODO(srujzs): Fix this test once web static error testing is supported.
+
+// Checks for static errors related to parameters for constructors and
+// factories.
+
+@JS()
+library js_constructor_parameters_static_test;
+
+import 'package:js/js.dart';
+import 'package:expect/expect.dart';
+
+@JS()
+class Foo {
+  external Foo({int? a});
+  //                 ^
+  // [web] TODO(srujzs): Add error once supported.
+  external factory Foo.fooFactory({int? a});
+  //                                ^
+  // [web] TODO(srujzs): Add error once supported.
+}
+
+@JS()
+@anonymous
+class Bar {
+  external Bar({int? a});
+  //                 ^
+  // [web] TODO(srujzs): Add error once supported.
+
+  // Factories of an anonymous class can only contain named parameters.
+  external factory Bar.barFactoryPositional(int? a);
+  //                                             ^
+  // [web] TODO(srujzs): Add error once supported.
+  external factory Bar.barFactoryOptional([int? a]);
+  //                                            ^
+  // [web] TODO(srujzs): Add error once supported.
+  external factory Bar.barFactoryMixedOptional(int? a, [int? b]);
+  //                                                ^
+  // [web] TODO(srujzs): Add error once supported.
+  external factory Bar.barFactoryMixedNamed(int? a, {int? b});
+  //                                             ^
+  // [web] TODO(srujzs): Add error once supported.
+
+  // Named parameters are okay only for factories of an anonymous class.
+  external factory Bar.barFactoryNamed({int? a});
+}
+
+@JS()
+abstract class Baz {
+  external Baz({int? a});
+  //                 ^
+  // [web] TODO(srujzs): Add error once supported.
+  external factory Baz.bazFactory({int? a});
+  //                                ^
+  // [web] TODO(srujzs): Add error once supported.
+}
+
+main() {}
diff --git a/tests/lib/js/is_check_and_as_cast_test.dart b/tests/lib/js/is_check_and_as_cast_test.dart
new file mode 100644
index 0000000..ef48137
--- /dev/null
+++ b/tests/lib/js/is_check_and_as_cast_test.dart
@@ -0,0 +1,122 @@
+// 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.
+
+// Tests `is` checks and `as` casts between various JS objects. Currently, all
+// checks and casts should be allowed between JS objects.
+
+@JS()
+library is_check_and_as_cast_test;
+
+import 'package:js/js.dart';
+import 'package:expect/minitest.dart';
+
+@JS()
+external void eval(String code);
+
+@JS()
+class Foo {
+  external Foo(int a);
+  external int get a;
+}
+
+// Class with same structure as Foo but separate JS class.
+@JS()
+class Bar {
+  external Bar(int a);
+  external int get a;
+}
+
+@JS('Bar')
+class BarCopy {
+  external BarCopy(int a);
+  external int get a;
+}
+
+@JS()
+class Baz {
+  external Baz(int a, int b);
+  external int get a;
+  external int get b;
+}
+
+// JS object literals
+@JS()
+@anonymous
+class LiteralA {
+  external int get x;
+}
+
+@JS()
+@anonymous
+class LiteralB {
+  external int get y;
+}
+
+// Library is annotated with JS so we don't need the annotation here.
+external LiteralA get a;
+external LiteralB get b;
+
+void main() {
+  eval(r"""
+    function Foo(a) {
+      this.a = a;
+    }
+    function Bar(a) {
+      this.a = a;
+    }
+    function Baz(a, b) {
+      Foo.call(this, a);
+      this.b = b;
+    }
+    Baz.prototype.__proto__ = Foo.prototype;
+    var a = {
+      x: 1,
+    };
+    var b = {
+      y: 2,
+    };
+      """);
+
+  // JS class object can be checked and casted with itself.
+  var foo = Foo(42);
+  expect(foo is Foo, isTrue);
+  expect(() => (foo as Foo), returnsNormally);
+
+  // Try it with dynamic.
+  dynamic d = Foo(42);
+  expect(d is Foo, isTrue);
+  expect(() => (d as Foo), returnsNormally);
+
+  // Casts are allowed between any JS class objects.
+  expect(foo is Bar, isTrue);
+  expect(d is Bar, isTrue);
+  expect(() => (foo as Bar), returnsNormally);
+  expect(() => (d as Bar), returnsNormally);
+
+  // Type-checking and casting works regardless of the inheritance chain.
+  var baz = Baz(42, 43);
+  expect(baz is Foo, isTrue);
+  expect(() => (baz as Foo), returnsNormally);
+  expect(foo is Baz, isTrue);
+  expect(() => (foo as Baz), returnsNormally);
+
+  // BarCopy is the same JS class as Bar.
+  var barCopy = BarCopy(42);
+  expect(barCopy is Bar, isTrue);
+  expect(() => (barCopy as Bar), returnsNormally);
+
+  // JS object literal can be checked and casted with itself.
+  expect(a is LiteralA, isTrue);
+  expect(() => (a as LiteralA), returnsNormally);
+
+  // Like class objects, casts are allowed between any object literals.
+  expect(a is LiteralB, isTrue);
+  expect(() => (a as LiteralB), returnsNormally);
+
+  // Similarly, casts are allowed between any class objects and object literals.
+  expect(foo is LiteralB, isTrue);
+  expect(() => (foo as LiteralB), returnsNormally);
+  expect(a is Foo, isTrue);
+  expect(() => (a as Foo), returnsNormally);
+}
diff --git a/tests/lib/js/js_annotation_static_test.dart b/tests/lib/js/js_annotation_static_test.dart
new file mode 100644
index 0000000..ef7dc40
--- /dev/null
+++ b/tests/lib/js/js_annotation_static_test.dart
@@ -0,0 +1,46 @@
+// 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.
+
+// TODO(srujzs): Fix this test once web static error testing is supported.
+
+// Tests static errors for incorrect JS annotations.
+
+@JS()
+library js_annotation_static_test;
+
+import 'package:js/js.dart';
+
+class Foo {
+  //  ^^^
+  // [web] TODO(srujzs): Test context once supported.
+  @JS()
+  external Foo(int bar);
+  //       ^
+  // [web] TODO(srujzs): Add error once supported.
+  @JS()
+  external factory Foo.fooFactory();
+  //               ^
+  // [web] TODO(srujzs): Add error once supported.
+  @JS()
+  external int get bar;
+  //               ^^^
+  // [web] TODO(srujzs): Add error once supported.
+  @JS()
+  external set bar(int val);
+  //           ^^^
+  // [web] TODO(srujzs): Add error once supported.
+  @JS()
+  external int baz();
+  //           ^^^
+  // [web] TODO(srujzs): Add error once supported.
+  @JS()
+  external static int bazStatic();
+  //                  ^^^^^^^^^
+  // [web] TODO(srujzs): Add error once supported.
+}
+
+@JS()
+external int qux();
+
+main() {}
diff --git a/tests/lib/js/method_call_on_object_test.dart b/tests/lib/js/method_call_on_object_test.dart
new file mode 100644
index 0000000..b8eba441
--- /dev/null
+++ b/tests/lib/js/method_call_on_object_test.dart
@@ -0,0 +1,65 @@
+// 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.
+
+// Tests method calls (typed and dynamic) on various forms of JS objects.
+
+@JS()
+library js_parameters_test;
+
+import 'package:js/js.dart';
+import 'package:expect/expect.dart';
+
+@JS()
+external void eval(String code);
+
+@JS()
+class Foo {
+  external Foo();
+  external dynamic method(int x);
+}
+
+@JS()
+external Foo makeFooLiteral();
+
+@JS()
+external Foo makeFooObjectCreate();
+
+main() {
+  // These examples from based on benchmarks-internal/js
+  eval(r'''
+self.Foo = function Foo() {}
+self.Foo.prototype.method = function(x) { return x + 1; }
+
+self.makeFooLiteral = function() {
+  return {
+    method: function(x) { return x + 1; }
+  }
+}
+
+// Objects created in this way have no prototype.
+self.makeFooObjectCreate = function() {
+  var o = Object.create(null);
+  o.method = function(x) { return x + 1; }
+  return o;
+}
+''');
+
+  var foo = Foo();
+  Expect.equals(2, foo.method(1));
+
+  foo = makeFooLiteral();
+  Expect.equals(2, foo.method(1));
+
+  foo = makeFooObjectCreate();
+  Expect.equals(2, foo.method(1));
+
+  dynamic dynamicFoo = Foo();
+  Expect.equals(2, dynamicFoo.method(1));
+
+  dynamicFoo = makeFooLiteral();
+  Expect.equals(2, dynamicFoo.method(1));
+
+  dynamicFoo = makeFooObjectCreate();
+  Expect.equals(2, dynamicFoo.method(1));
+}
diff --git a/tests/lib/js/parameters_static_test.dart b/tests/lib/js/parameters_static_test.dart
new file mode 100644
index 0000000..0928ca5
--- /dev/null
+++ b/tests/lib/js/parameters_static_test.dart
@@ -0,0 +1,63 @@
+// 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.
+
+// TODO(srujzs): Fix this test once web static error testing is supported.
+
+// Checks for static errors related to parameters for methods.
+
+@JS()
+library js_parameters_static_test;
+
+import 'package:js/js.dart';
+import 'package:expect/expect.dart';
+
+@JS()
+class Foo {
+  external int singleNamedArg({int? a});
+  //                                ^
+  // [web] TODO(srujzs): Add error once supported.
+  external int mixedNamedArgs(int a, {int? b});
+  //                                       ^
+  // [web] TODO(srujzs): Add error once supported.
+}
+
+@JS()
+class Bar {
+  external static int singleNamedArg({int? a});
+  //                                       ^
+  // [web] TODO(srujzs): Add error once supported.
+  external static int mixedNamedArgs(int a, {int? b});
+  //                                              ^
+  // [web] TODO(srujzs): Add error once supported.
+}
+
+external int singleNamedArg({int? a});
+//                                ^
+// [web] TODO(srujzs): Add error once supported.
+external int mixedNamedArgs(int a, {int? b});
+//                                       ^
+// [web] TODO(srujzs): Add error once supported.
+
+@JS()
+@anonymous
+class Baz {
+  external int singleNamedArg({int? a});
+  //                                ^
+  // [web] TODO(srujzs): Add error once supported.
+  external int mixedNamedArgs(int a, {int? b});
+  //                                       ^
+  // [web] TODO(srujzs): Add error once supported.
+}
+
+@JS()
+abstract class Qux {
+  external int singleNamedArg({int? a});
+  //                                ^
+  // [web] TODO(srujzs): Add error once supported.
+  external int mixedNamedArgs(int a, {int? b});
+  //                                       ^
+  // [web] TODO(srujzs): Add error once supported.
+}
+
+main() {}
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index 87f57d3..8d88c56 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -36,6 +36,7 @@
 [ $csp ]
 isolate/deferred_in_isolate2_test: Skip # Issue 16898. Deferred loading does not work from an isolate in CSP-mode
 js/instanceof_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
+js/method_call_on_object_test: SkipByDesign # Issue 42085.
 js/parameters_test: SkipByDesign # Issue 42085.
 
 [ $compiler != dart2js && $compiler != dartdevk ]
diff --git a/tests/lib/mirrors/null_test.dart b/tests/lib/mirrors/null_test.dart
index 21ae2d8..0d58539 100644
--- a/tests/lib/mirrors/null_test.dart
+++ b/tests/lib/mirrors/null_test.dart
@@ -18,20 +18,35 @@
 
   InstanceMirror im1 = reflect(null);
   Expect.equals(cm, im1.type);
-  Expect.isTrue(im1.invoke(const Symbol("=="), [null]).reflectee);
+  if (isStrongMode) {
+    Expect.throwsTypeError(() => im1.invoke(const Symbol("=="), [null]),
+        'null not assignable to Object');
+  } else {
+    Expect.isTrue(im1.invoke(const Symbol("=="), [null]).reflectee);
+  }
   Expect.isFalse(im1.invoke(const Symbol("=="), [42]).reflectee);
 
   var obj = confuse(null); // Null value that isn't known at compile-time.
   InstanceMirror im2 = reflect(obj);
   Expect.equals(cm, im2.type);
-  Expect.isTrue(im2.invoke(const Symbol("=="), [null]).reflectee);
+  if (isStrongMode) {
+    Expect.throwsTypeError(() => im2.invoke(const Symbol("=="), [null]),
+        'null not assignable to Object');
+  } else {
+    Expect.isTrue(im2.invoke(const Symbol("=="), [null]).reflectee);
+  }
   Expect.isFalse(im2.invoke(const Symbol("=="), [42]).reflectee);
 
   InstanceMirror nullMirror = reflect(null);
   Expect.isTrue(nullMirror.getField(#hashCode).reflectee is int);
   Expect.equals(null.hashCode, nullMirror.getField(#hashCode).reflectee);
   Expect.equals('Null', nullMirror.getField(#runtimeType).reflectee.toString());
-  Expect.isTrue(nullMirror.invoke(#==, [null]).reflectee);
+  if (isStrongMode) {
+    Expect.throwsTypeError(
+        () => nullMirror.invoke(#==, [null]), 'null not assignable to Object');
+  } else {
+    Expect.isTrue(nullMirror.invoke(#==, [null]).reflectee);
+  }
   Expect.isFalse(nullMirror.invoke(#==, [new Object()]).reflectee);
   Expect.equals('null', nullMirror.invoke(#toString, []).reflectee);
   Expect.throwsNoSuchMethodError(
diff --git a/tests/lib/typed_data/bytes_builder_test.dart b/tests/lib/typed_data/bytes_builder_test.dart
new file mode 100644
index 0000000..5c1dd69
--- /dev/null
+++ b/tests/lib/typed_data/bytes_builder_test.dart
@@ -0,0 +1,63 @@
+// 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:typed_data";
+import "package:expect/expect.dart";
+
+main() {
+  for (var copying in [true, false]) {
+    var b;
+    testLength(n) {
+      Expect.equals(n, b.length);
+      if (n == 0) {
+        Expect.isTrue(b.isEmpty, "isEmpty: #${b.length}");
+        Expect.isFalse(b.isNotEmpty, "isNotEmpty: #${b.length}");
+      } else {
+        Expect.isTrue(b.isNotEmpty, "isNotEmpty: #${b.length}");
+        Expect.isFalse(b.isEmpty, "isEmpty: #${b.length}");
+      }
+    }
+
+    b = new BytesBuilder(copy: copying);
+    testLength(0);
+
+    b.addByte(0);
+    testLength(1);
+
+    b.add([1, 2, 3]);
+    testLength(4);
+
+    b.add(<int>[4, 5, 6]);
+    testLength(7);
+
+    b.add(new Uint8List.fromList([7, 8, 9]));
+    testLength(10);
+
+    b.add(new Uint16List.fromList([10, 11, 12]));
+    testLength(13);
+
+    var bytes = b.toBytes();
+    Expect.isTrue(bytes is Uint8List);
+    Expect.listEquals([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], bytes);
+    testLength(13);
+
+    b.add("\x0d\x0e\x0f".codeUnits);
+    testLength(16);
+
+    bytes = b.takeBytes();
+    testLength(0);
+    Expect.isTrue(bytes is Uint8List);
+    Expect.listEquals(
+        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], bytes);
+
+    b.addByte(0);
+    testLength(1);
+
+    b.clear();
+    testLength(0);
+
+    b.addByte(0);
+    testLength(1);
+  }
+}
diff --git a/tests/lib_2/html/custom/element_upgrade_failure_test.dart b/tests/lib_2/html/custom/element_upgrade_failure_test.dart
index 28248ca..db46df5 100644
--- a/tests/lib_2/html/custom/element_upgrade_failure_test.dart
+++ b/tests/lib_2/html/custom/element_upgrade_failure_test.dart
@@ -43,14 +43,14 @@
     expect(() {
       upgrader.upgrade(new HtmlElementInterface());
       //                   ^^^^^^^^^^^^^^^^^^^^
-      // [analyzer] STATIC_WARNING.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
+      // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT
     }, throws);
   });
 }
 
 class HtmlElementInterface implements HtmlElement {
   //  ^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
+  // [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
   HtmlElementInterface.created();
 }
 
diff --git a/tests/lib_2/html/js_function_getter_trust_types/compile_test.dart b/tests/lib_2/html/js_function_getter_trust_types/compile_test.dart
index 9cbbe1f..e7481d1 100644
--- a/tests/lib_2/html/js_function_getter_trust_types/compile_test.dart
+++ b/tests/lib_2/html/js_function_getter_trust_types/compile_test.dart
@@ -18,25 +18,25 @@
 //        ^
 // [cfe] Error: 'nonFunctionStatic' isn't a function or method and can't be invoked.
 //^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 
   foo.bar.nonFunctionStatic(0);
 //        ^
 // [cfe] Error: 'nonFunctionStatic' isn't a function or method and can't be invoked.
 //^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 
   foo.bar.nonFunctionStatic(0, 0);
 //        ^
 // [cfe] Error: 'nonFunctionStatic' isn't a function or method and can't be invoked.
 //^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 
   foo.bar.nonFunctionStatic(0, 0, 0, 0, 0, 0);
 //        ^
 // [cfe] Error: 'nonFunctionStatic' isn't a function or method and can't be invoked.
 //^^^^^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] STATIC_TYPE_WARNING.INVOCATION_OF_NON_FUNCTION_EXPRESSION
+// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION
 
   foo.bar.add(4);
   //         ^
diff --git a/tests/lib_2/html/streams_test.dart b/tests/lib_2/html/streams_test.dart
index 63c4bd7..713a6e6 100644
--- a/tests/lib_2/html/streams_test.dart
+++ b/tests/lib_2/html/streams_test.dart
@@ -189,7 +189,7 @@
   });
 
   test('reduce', () {
-    stream.reduce((a, b) => null).then((_) {});
+    stream.reduce((a, b) => a).then((_) {});
   });
 
   test('fold', () {
diff --git a/tests/lib_2/js/method_call_on_object_test.dart b/tests/lib_2/js/method_call_on_object_test.dart
new file mode 100644
index 0000000..b8eba441
--- /dev/null
+++ b/tests/lib_2/js/method_call_on_object_test.dart
@@ -0,0 +1,65 @@
+// 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.
+
+// Tests method calls (typed and dynamic) on various forms of JS objects.
+
+@JS()
+library js_parameters_test;
+
+import 'package:js/js.dart';
+import 'package:expect/expect.dart';
+
+@JS()
+external void eval(String code);
+
+@JS()
+class Foo {
+  external Foo();
+  external dynamic method(int x);
+}
+
+@JS()
+external Foo makeFooLiteral();
+
+@JS()
+external Foo makeFooObjectCreate();
+
+main() {
+  // These examples from based on benchmarks-internal/js
+  eval(r'''
+self.Foo = function Foo() {}
+self.Foo.prototype.method = function(x) { return x + 1; }
+
+self.makeFooLiteral = function() {
+  return {
+    method: function(x) { return x + 1; }
+  }
+}
+
+// Objects created in this way have no prototype.
+self.makeFooObjectCreate = function() {
+  var o = Object.create(null);
+  o.method = function(x) { return x + 1; }
+  return o;
+}
+''');
+
+  var foo = Foo();
+  Expect.equals(2, foo.method(1));
+
+  foo = makeFooLiteral();
+  Expect.equals(2, foo.method(1));
+
+  foo = makeFooObjectCreate();
+  Expect.equals(2, foo.method(1));
+
+  dynamic dynamicFoo = Foo();
+  Expect.equals(2, dynamicFoo.method(1));
+
+  dynamicFoo = makeFooLiteral();
+  Expect.equals(2, dynamicFoo.method(1));
+
+  dynamicFoo = makeFooObjectCreate();
+  Expect.equals(2, dynamicFoo.method(1));
+}
diff --git a/tests/lib_2/lib_2.status b/tests/lib_2/lib_2.status
index d17a636..843b50a 100644
--- a/tests/lib_2/lib_2.status
+++ b/tests/lib_2/lib_2.status
@@ -36,6 +36,7 @@
 [ $csp ]
 isolate/deferred_in_isolate2_test: Skip # Issue 16898. Deferred loading does not work from an isolate in CSP-mode
 js/instanceof_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
+js/method_call_on_object_test: SkipByDesign # Issue 42085.
 js/parameters_test: SkipByDesign # Issue 42085.
 
 [ $compiler != dart2js && $compiler != dartdevk ]
diff --git a/tests/lib_2/typed_data/bytes_builder_test.dart b/tests/lib_2/typed_data/bytes_builder_test.dart
new file mode 100644
index 0000000..5c1dd69
--- /dev/null
+++ b/tests/lib_2/typed_data/bytes_builder_test.dart
@@ -0,0 +1,63 @@
+// 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:typed_data";
+import "package:expect/expect.dart";
+
+main() {
+  for (var copying in [true, false]) {
+    var b;
+    testLength(n) {
+      Expect.equals(n, b.length);
+      if (n == 0) {
+        Expect.isTrue(b.isEmpty, "isEmpty: #${b.length}");
+        Expect.isFalse(b.isNotEmpty, "isNotEmpty: #${b.length}");
+      } else {
+        Expect.isTrue(b.isNotEmpty, "isNotEmpty: #${b.length}");
+        Expect.isFalse(b.isEmpty, "isEmpty: #${b.length}");
+      }
+    }
+
+    b = new BytesBuilder(copy: copying);
+    testLength(0);
+
+    b.addByte(0);
+    testLength(1);
+
+    b.add([1, 2, 3]);
+    testLength(4);
+
+    b.add(<int>[4, 5, 6]);
+    testLength(7);
+
+    b.add(new Uint8List.fromList([7, 8, 9]));
+    testLength(10);
+
+    b.add(new Uint16List.fromList([10, 11, 12]));
+    testLength(13);
+
+    var bytes = b.toBytes();
+    Expect.isTrue(bytes is Uint8List);
+    Expect.listEquals([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], bytes);
+    testLength(13);
+
+    b.add("\x0d\x0e\x0f".codeUnits);
+    testLength(16);
+
+    bytes = b.takeBytes();
+    testLength(0);
+    Expect.isTrue(bytes is Uint8List);
+    Expect.listEquals(
+        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], bytes);
+
+    b.addByte(0);
+    testLength(1);
+
+    b.clear();
+    testLength(0);
+
+    b.addByte(0);
+    testLength(1);
+  }
+}
diff --git a/tests/standalone/check_for_aot_snapshot_jit_test.dart b/tests/standalone/check_for_aot_snapshot_jit_test.dart
new file mode 100644
index 0000000..851dc0c5
--- /dev/null
+++ b/tests/standalone/check_for_aot_snapshot_jit_test.dart
@@ -0,0 +1,59 @@
+// 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:expect/expect.dart';
+import 'package:path/path.dart' as path;
+
+main() {
+  final buildDir = path.dirname(Platform.executable);
+  final sdkDir = path.dirname(path.dirname(buildDir));
+  final platformDill = path.join(buildDir, 'vm_platform_strong.dill');
+  final genSnapshot = path.join(buildDir, 'gen_snapshot');
+
+  final exePath = Platform.resolvedExecutable;
+  final genSnapshotPath =
+      Uri.parse(Platform.executable).resolve('gen_snapshot').path;
+  final powTest = Platform.script.resolve('pow_test.dart').path;
+  final d = Directory.systemTemp.createTempSync('aot_tmp');
+  final kernelOutput = d.uri.resolve('pow_test.dill').path;
+  final aotOutput = d.uri.resolve('pow_test.aot').path;
+
+  final genKernelResult = Process.runSync(
+    'pkg/vm/tool/gen_kernel',
+    [
+      '--aot',
+      '--platform=$platformDill',
+      '-o',
+      kernelOutput,
+      powTest,
+    ],
+  );
+  Expect.equals(genKernelResult.exitCode, 0);
+
+  final genAotResult = Process.runSync(
+    genSnapshot,
+    [
+      '--snapshot_kind=app-aot-elf',
+      '--elf=$aotOutput',
+      kernelOutput,
+    ],
+  );
+  Expect.equals(genAotResult.exitCode, 0);
+
+  final runAotResult = Process.runSync(
+    exePath,
+    [
+      'run',
+      aotOutput,
+    ],
+  );
+  Expect.equals(runAotResult.exitCode, 255);
+  Expect.stringContainsInOrder(
+    runAotResult.stderr,
+    [
+      "pow_test.aot is an AOT snapshot and should be run with 'dartaotruntime'",
+    ],
+  );
+}
diff --git a/tests/standalone/fragmentation_deferred_load_lib1.dart b/tests/standalone/fragmentation_deferred_load_lib1.dart
new file mode 100644
index 0000000..c561f14
--- /dev/null
+++ b/tests/standalone/fragmentation_deferred_load_lib1.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  return "one!";
+}
diff --git a/tests/standalone/fragmentation_deferred_load_lib2.dart b/tests/standalone/fragmentation_deferred_load_lib2.dart
new file mode 100644
index 0000000..1f01b0f
--- /dev/null
+++ b/tests/standalone/fragmentation_deferred_load_lib2.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  return "two!";
+}
diff --git a/tests/standalone/fragmentation_deferred_load_lib3.dart b/tests/standalone/fragmentation_deferred_load_lib3.dart
new file mode 100644
index 0000000..77d3264
--- /dev/null
+++ b/tests/standalone/fragmentation_deferred_load_lib3.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  return "three!";
+}
diff --git a/tests/standalone/fragmentation_deferred_load_test.dart b/tests/standalone/fragmentation_deferred_load_test.dart
new file mode 100644
index 0000000..b84a09c
--- /dev/null
+++ b/tests/standalone/fragmentation_deferred_load_test.dart
@@ -0,0 +1,40 @@
+// 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=--use_compactor
+
+// Each loading unit creates more image pages in the heap, which unfortunately
+// cannot be aligned stronger than virtual memory page alignment, so the
+// compactor must detect references to these image pages separately. Before
+// these loading units were implemented, the compactor could assume a small
+// upper bound on the number of image pages.
+
+import "package:expect/expect.dart";
+import "fragmentation_deferred_load_lib1.dart" deferred as lib1;
+import "fragmentation_deferred_load_lib2.dart" deferred as lib2;
+import "fragmentation_deferred_load_lib3.dart" deferred as lib3;
+
+main() async {
+  await lib1.loadLibrary();
+  Expect.equals("one!", lib1.foo());
+  await lib2.loadLibrary();
+  Expect.equals("two!", lib2.foo());
+  await lib3.loadLibrary();
+  Expect.equals("three!", lib3.foo());
+
+  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/io/bytes_builder_test.dart b/tests/standalone/io/bytes_builder_test.dart
deleted file mode 100644
index 5b6a6b9..0000000
--- a/tests/standalone/io/bytes_builder_test.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// 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:typed_data";
-import "package:expect/expect.dart";
-
-main() {
-  for (var copying in [true, false]) {
-    var b;
-    testLength(n) {
-      Expect.equals(n, b.length);
-      if (n == 0) {
-        Expect.isTrue(b.isEmpty, "isEmpty: #${b.length}");
-        Expect.isFalse(b.isNotEmpty, "isNotEmpty: #${b.length}");
-      } else {
-        Expect.isTrue(b.isNotEmpty, "isNotEmpty: #${b.length}");
-        Expect.isFalse(b.isEmpty, "isEmpty: #${b.length}");
-      }
-    }
-
-    b = new BytesBuilder(copy: copying);
-    testLength(0);
-
-    b.addByte(0);
-    testLength(1);
-
-    b.add([1, 2, 3]);
-    testLength(4);
-
-    b.add(<int>[4, 5, 6]);
-    testLength(7);
-
-    b.add(new Uint8List.fromList([7, 8, 9]));
-    testLength(10);
-
-    b.add(new Uint16List.fromList([10, 11, 12]));
-    testLength(13);
-
-    var bytes = b.toBytes();
-    Expect.isTrue(bytes is Uint8List);
-    Expect.listEquals([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], bytes);
-    testLength(13);
-
-    b.add("\x0d\x0e\x0f".codeUnits);
-    testLength(16);
-
-    bytes = b.takeBytes();
-    testLength(0);
-    Expect.isTrue(bytes is Uint8List);
-    Expect.listEquals(
-        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], bytes);
-
-    b.addByte(0);
-    testLength(1);
-
-    b.clear();
-    testLength(0);
-
-    b.addByte(0);
-    testLength(1);
-  }
-}
diff --git a/tests/standalone/io/file_copy_test.dart b/tests/standalone/io/file_copy_test.dart
index 2302a4a..b1c0723 100644
--- a/tests/standalone/io/file_copy_test.dart
+++ b/tests/standalone/io/file_copy_test.dart
@@ -30,6 +30,14 @@
   Expect.equals(FILE_CONTENT2, file1.readAsStringSync());
   Expect.equals(FILE_CONTENT2, file2.readAsStringSync());
 
+  // Check there is no temporary files existing.
+  var list = tmp.listSync();
+  Expect.equals(2, list.length);
+  for (var file in list) {
+    final fileName = file.path.toString();
+    Expect.isTrue(fileName.contains("file1") || fileName.contains("file2"));
+  }
+
   // Fail when coping to directory.
   var dir = new Directory('${tmp.path}/dir')..createSync();
   Expect.throws(() => file1.copySync(dir.path));
@@ -38,6 +46,28 @@
   tmp.deleteSync(recursive: true);
 }
 
+void testWithForwardSlashes() {
+  if (Platform.isWindows) {
+    final tmp = Directory.systemTemp.createTempSync('dart-file-copy');
+
+    final file1 = File('${tmp.path}/file1');
+    file1.writeAsStringSync(FILE_CONTENT1);
+    Expect.equals(FILE_CONTENT1, file1.readAsStringSync());
+
+    // Test with a path contains only forward slashes.
+    final dest = tmp.path.toString().replaceAll("\\", "/");
+    final file2 = file1.copySync('${dest}/file2');
+    Expect.equals(FILE_CONTENT1, file2.readAsStringSync());
+
+    // Test with a path mixing both forward and backward slashes.
+    final file3 = file1.copySync('${dest}\\file3');
+    Expect.equals(FILE_CONTENT1, file3.readAsStringSync());
+
+    // Clean up the directory
+    tmp.deleteSync(recursive: true);
+  }
+}
+
 void testCopy() {
   asyncStart();
   var tmp = Directory.systemTemp.createTempSync('dart-file-copy');
@@ -76,4 +106,6 @@
 main() {
   testCopySync();
   testCopy();
+  // This is Windows only test.
+  testWithForwardSlashes();
 }
diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
index 1ba41eb..38fd51b 100644
--- a/tests/standalone/io/file_test.dart
+++ b/tests/standalone/io/file_test.dart
@@ -1602,6 +1602,53 @@
     }
   }
 
+  static void testAbsolute() {
+    var currentDirectory = Directory.current;
+    Directory.current = tempDirectory;
+    var file = File("temp.txt");
+    Expect.isFalse(file.isAbsolute);
+    file.writeAsStringSync("content");
+
+    var absFile = file.absolute;
+    Expect.isTrue(absFile.isAbsolute);
+    Expect.isTrue(absFile.path.startsWith(tempDirectory.path));
+
+    Expect.equals("content", absFile.readAsStringSync());
+
+    if (Platform.isWindows &&
+        tempDirectory.path.startsWith(RegExp(r"^[a-zA-Z]:"))) {
+      var driveRelativeFile = File(absFile.path.substring(2));
+      Expect.isFalse(driveRelativeFile.isAbsolute);
+      Expect.equals("content", driveRelativeFile.readAsStringSync());
+
+      var absFile3 = driveRelativeFile.absolute;
+      Expect.isTrue(absFile3.isAbsolute);
+      Expect.equals(absFile.path, absFile3.path);
+      Expect.equals("content", absFile3.readAsStringSync());
+
+      // Convert CWD from X:\path to \\localhost\X$\path.
+      var uncPath = r"\\localhost\" +
+          tempDirectory.path[0] +
+          r"$" +
+          tempDirectory.path.substring(2);
+      Directory.current = uncPath;
+      Expect.equals("content", file.readAsStringSync());
+
+      var absFile4 = file.absolute;
+      Expect.isTrue(absFile4.isAbsolute);
+      Expect.equals("content", absFile4.readAsStringSync());
+
+      Expect.equals("content", driveRelativeFile.readAsStringSync());
+
+      var absFile5 = driveRelativeFile.absolute;
+      Expect.isTrue(absFile5.isAbsolute);
+      Expect.isTrue(absFile5.path.startsWith(uncPath));
+      Expect.equals("content", absFile5.readAsStringSync());
+    }
+    file.deleteSync();
+    Directory.current = currentDirectory;
+  }
+
   static String getFilename(String path) {
     return Platform.script.resolve(path).toFilePath();
   }
@@ -1677,6 +1724,7 @@
       testSetLastAccessedSync();
       testSetLastAccessedSyncDirectory();
       testDoubleAsyncOperation();
+      testAbsolute();
       asyncEnd();
     });
   }
diff --git a/tests/standalone/io/http_ban_http_embedder_test.dart b/tests/standalone/io/http_ban_http_embedder_test.dart
deleted file mode 100644
index 7fd3cb3..0000000
--- a/tests/standalone/io/http_ban_http_embedder_test.dart
+++ /dev/null
@@ -1,69 +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.
-
-// SharedOptions=-Ddart.library.io.allow_http=false
-
-import 'dart:async';
-import 'dart:io';
-
-import "package:async_helper/async_helper.dart";
-
-import 'http_ban_http_normal_test.dart';
-import 'http_bind_test.dart';
-
-Future<void> testWithHostname() async {
-  await testBanHttp(await getLocalHostIP(), (httpClient, httpUri) async {
-    asyncExpectThrows(
-        () async => await httpClient.getUrl(httpUri), (e) => e is StateError);
-    asyncExpectThrows(
-        () async => await runZoned(() => httpClient.getUrl(httpUri),
-            zoneValues: {#dart.library.io.allow_http: 'foo'}),
-        (e) => e is StateError);
-    asyncExpectThrows(
-        () async => await runZoned(() => httpClient.getUrl(httpUri),
-            zoneValues: {#dart.library.io.allow_http: false}),
-        (e) => e is StateError);
-    await asyncTest(() => runZoned(() => httpClient.getUrl(httpUri),
-        zoneValues: {#dart.library.io.allow_http: true}));
-  });
-}
-
-Future<void> testWithLoopback() async {
-  await testBanHttp("127.0.0.1", (httpClient, uri) async {
-    await asyncTest(
-        () => httpClient.getUrl(Uri.parse('http://localhost:${uri.port}')));
-    await asyncTest(
-        () => httpClient.getUrl(Uri.parse('http://127.0.0.1:${uri.port}')));
-  });
-}
-
-Future<void> testWithIPv6() async {
-  if (await supportsIPV6()) {
-    await testBanHttp("::1", (httpClient, uri) async {
-      await asyncTest(() => httpClient.getUrl(uri));
-    });
-  }
-}
-
-Future<void> testWithHTTPS() async {
-  await testBanHttp(await getLocalHostIP(), (httpClient, uri) async {
-    asyncExpectThrows(
-        () => httpClient.getUrl(Uri(
-              scheme: 'https',
-              host: uri.host,
-              port: uri.port,
-            )),
-        (e) => e is SocketException || e is HandshakeException);
-  });
-}
-
-main() {
-  asyncStart();
-  Future.wait(<Future>[
-    testWithHostname(),
-    testWithLoopback(),
-    testWithIPv6(),
-    testWithHTTPS(),
-  ]).then((_) => asyncEnd());
-}
diff --git a/tests/standalone/io/http_ban_http_normal_test.dart b/tests/standalone/io/http_ban_http_normal_test.dart
deleted file mode 100644
index 118dd4c..0000000
--- a/tests/standalone/io/http_ban_http_normal_test.dart
+++ /dev/null
@@ -1,44 +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 'dart:async';
-import 'dart:io';
-
-import "package:async_helper/async_helper.dart";
-
-Future<String> getLocalHostIP() async {
-  final interfaces = await NetworkInterface.list(
-      includeLoopback: false, type: InternetAddressType.IPv4);
-  return interfaces.first.addresses.first.address;
-}
-
-Future<void> testBanHttp(String serverHost,
-    Future<void> testCode(HttpClient client, Uri uri)) async {
-  final httpClient = new HttpClient();
-  final server = await HttpServer.bind(serverHost, 0);
-  final uri = Uri(scheme: 'http', host: serverHost, port: server.port);
-  try {
-    await testCode(httpClient, uri);
-  } finally {
-    httpClient.close(force: true);
-    await server.close();
-  }
-}
-
-main() async {
-  await asyncTest(() async {
-    final host = await getLocalHostIP();
-    // Normal HTTP request succeeds.
-    await testBanHttp(host, (httpClient, uri) async {
-      await asyncTest(() => httpClient.getUrl(uri));
-    });
-    // We can ban HTTP explicitly.
-    await testBanHttp(host, (httpClient, uri) async {
-      asyncExpectThrows(
-          () async => await runZoned(() => httpClient.getUrl(uri),
-              zoneValues: {#dart.library.io.allow_http: false}),
-          (e) => e is StateError);
-    });
-  });
-}
diff --git a/tests/standalone/io/http_linklocal_ipv6_test.dart b/tests/standalone/io/http_linklocal_ipv6_test.dart
index ea4e54d..e99162b 100644
--- a/tests/standalone/io/http_linklocal_ipv6_test.dart
+++ b/tests/standalone/io/http_linklocal_ipv6_test.dart
@@ -16,8 +16,13 @@
   //    ip address show
   asyncStart();
   try {
-    // Make sure the address here is the same as what it shows in "ip address show"
-    var ipv6 = 'fe80:1::10%tap0';
+    // Make sure the address here is the same as what it shows in
+    // "ip address show"
+    var ipv6 = 'fe80:1::1%tap0';
+
+    // Parses a Link-local address on Linux and Windows will throw an exception.
+    InternetAddress(ipv6);
+
     HttpServer.bind(ipv6, 0).then((server) {
       server.listen((request) {
         var timer = new Timer.periodic(const Duration(milliseconds: 0), (_) {
diff --git a/tests/standalone/io/network_policy_configuration_test.dart b/tests/standalone/io/network_policy_configuration_test.dart
new file mode 100644
index 0000000..6ee1bf0
--- /dev/null
+++ b/tests/standalone/io/network_policy_configuration_test.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.
+
+// SharedOptions=-Ddart.library.io.domain_network_policies=[["foobar.com",true,true],["foobar.com",true,true],["baz.foobar.com",true,true],["baz.foobar.com",false,false]] -Ddart.library.io.may_insecurely_connect_to_all_domains=false
+
+import 'dart:io';
+
+import "package:expect/expect.dart";
+
+void _checkAllows(List<String> domains) {
+  for (final domain in domains) {
+    Expect.isTrue(
+        isInsecureConnectionAllowed(domain), "$domain should be allowed.");
+  }
+}
+
+void _checkDenies(List<String> domains) {
+  for (final domain in domains) {
+    Expect.isFalse(
+        isInsecureConnectionAllowed(domain), "$domain should not be allowed.");
+  }
+}
+
+void main() {
+  // These have no policy but the default is false.
+  _checkDenies(["mailfoobar.com", "abc.com", "oobar.com", "foobar.co"]);
+  // These are explicitly denied.
+  _checkDenies(["baz.foobar.com"]);
+  _checkAllows(
+      ["foobar.com", "test.baz.foobar.com", "test2.test.baz.foobar.com"]);
+}
diff --git a/tests/standalone/io/network_policy_invalid_domain_test.dart b/tests/standalone/io/network_policy_invalid_domain_test.dart
new file mode 100644
index 0000000..971996c
--- /dev/null
+++ b/tests/standalone/io/network_policy_invalid_domain_test.dart
@@ -0,0 +1,15 @@
+// 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=-Ddart.library.io.domain_network_policies=[["com",true,true]]
+
+import 'dart:io';
+
+import "package:expect/expect.dart";
+
+// This test passes in an invalid domain as a network policy and checks that
+// loading the policies throws.
+void main() {
+  Expect.throwsArgumentError(() => isInsecureConnectionAllowed("test.com"));
+}
diff --git a/tests/standalone/io/network_policy_tie_breaker_test.dart b/tests/standalone/io/network_policy_tie_breaker_test.dart
new file mode 100644
index 0000000..c25d3ac
--- /dev/null
+++ b/tests/standalone/io/network_policy_tie_breaker_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.
+
+// SharedOptions=-Ddart.library.io.domain_network_policies=[["baz.foobar.com",true,true],["baz.foobar.com",false,false]]
+
+import 'dart:io';
+
+import "package:expect/expect.dart";
+
+void main() {
+  Expect.isFalse(isInsecureConnectionAllowed("baz.foobar.com"));
+  Expect.isTrue(isInsecureConnectionAllowed("test.baz.foobar.com"));
+}
diff --git a/tests/standalone/io/socket_network_policy_localhost_test.dart b/tests/standalone/io/socket_network_policy_localhost_test.dart
new file mode 100644
index 0000000..957f894
--- /dev/null
+++ b/tests/standalone/io/socket_network_policy_localhost_test.dart
@@ -0,0 +1,48 @@
+// 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 whether localhost connection succeeds even when insecure connections
+// are banned by default.
+// SharedOptions=-Ddart.library.io.may_insecurely_connect_to_all_domains=false
+
+import 'dart:async';
+import 'dart:io';
+
+import "package:async_helper/async_helper.dart";
+
+void testDisallowedConnectionByDefault() {
+  asyncExpectThrows(
+      () async => await Socket.connect("domain.invalid", 80),
+      (e) =>
+          e is SocketException &&
+          e.message.contains(
+              "Insecure socket connections are disallowed by platform"));
+}
+
+Future<void> testLocalhostConnection() async {
+  ServerSocket server =
+      await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
+  Socket? socket;
+  try {
+    server.listen((_) {});
+    socket = await Socket.connect(InternetAddress.loopbackIPv4, server.port);
+  } finally {
+    server.close();
+    if (socket != null) {
+      socket.close();
+      await socket.done;
+      socket.destroy();
+    }
+  }
+}
+
+Future<void> test() async {
+  testDisallowedConnectionByDefault();
+  await testLocalhostConnection();
+}
+
+void main() {
+  asyncStart();
+  test().whenComplete(() => asyncEnd());
+}
diff --git a/tests/standalone/io/socket_network_policy_test.dart b/tests/standalone/io/socket_network_policy_test.dart
new file mode 100644
index 0000000..f476d67
--- /dev/null
+++ b/tests/standalone/io/socket_network_policy_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.
+
+// SharedOptions=-Ddart.library.io.domain_network_policies=[["notallowed.domain.invalid",true,false]]
+
+import 'dart:io';
+
+import "package:async_helper/async_helper.dart";
+
+void testDisallowedConnection() {
+  asyncExpectThrows(
+      () async => await Socket.connect("foo.notallowed.domain.invalid", 12345),
+      (e) {
+    print((e as SocketException).message);
+    return e is SocketException &&
+        e.message.startsWith(
+            "Insecure socket connections are disallowed by platform");
+  });
+}
+
+void testAllowedConnection() {
+  asyncExpectThrows(
+      () async => await Socket.connect("allowed.domain.invalid", 12345),
+      (e) =>
+          e is SocketException &&
+          !e.message.startsWith(
+              "Insecure socket connections are disallowed by platform"));
+}
+
+void main() {
+  testDisallowedConnection();
+  testAllowedConnection();
+}
diff --git a/tests/standalone/io/unix_socket_test.dart b/tests/standalone/io/unix_socket_test.dart
index 0193a5c..05f672c 100644
--- a/tests/standalone/io/unix_socket_test.dart
+++ b/tests/standalone/io/unix_socket_test.dart
@@ -216,6 +216,7 @@
       Expect.fail("Unexpected exception $e is thrown");
     } else {
       Expect.isTrue(e is SocketException);
+      Expect.isTrue(e.toString().contains('not available'));
     }
   }
 }
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/.dart_tool/package_config.json b/tests/standalone/package/scenarios/both_dir_and_file/.dart_tool/package_config.json
new file mode 100644
index 0000000..23e4838
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/.dart_tool/package_config.json
@@ -0,0 +1,15 @@
+{
+  "copyright": [
+    "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."
+  ],
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": "../foo",
+      "languageVersion": "2.10"
+    }
+  ]
+}
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
index 5b5156e..898a519 100644
--- 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
@@ -6,6 +6,6 @@
 
 library empty_packages_file_discovery_test;
 
-import 'package:foo/foo.dart';
+import 'package:foo/foo.dart'; //# 01: compile-time error
 
 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
index 010f5f3..fbde79f 100644
--- 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
@@ -6,6 +6,6 @@
 
 library empty_packages_file_option_test;
 
-import 'package:foo/foo.dart';
+import 'package:foo/foo.dart'; //# 01: compile-time error
 
 main() {}
diff --git a/tests/standalone/package/scenarios/packages_file_in_parent/.dart_tool/package_config.json b/tests/standalone/package/scenarios/packages_file_in_parent/.dart_tool/package_config.json
new file mode 100644
index 0000000..23e4838
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_in_parent/.dart_tool/package_config.json
@@ -0,0 +1,15 @@
+{
+  "copyright": [
+    "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."
+  ],
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": "../foo",
+      "languageVersion": "2.10"
+    }
+  ]
+}
diff --git a/tests/standalone/package/scenarios/packages_file_only/.dart_tool/package_config.json b/tests/standalone/package/scenarios/packages_file_only/.dart_tool/package_config.json
new file mode 100644
index 0000000..23e4838
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_only/.dart_tool/package_config.json
@@ -0,0 +1,15 @@
+{
+  "copyright": [
+    "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."
+  ],
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": "../foo",
+      "languageVersion": "2.10"
+    }
+  ]
+}
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
index 665597a..1b77992 100644
--- 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
@@ -4,6 +4,10 @@
 
 // Packages=empty_lines.packages
 
+// This test verifies handling of legacy .packages file and cannot be run in
+// null safety (strong) mode as strong mode needs new package_config.json.
+// Requirements=nnbd-weak
+
 library empty_lines_test;
 
 import 'package:foo/foo.dart' as 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
index 97cded4..b908cbf 100644
--- 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
@@ -4,12 +4,16 @@
 
 // Packages=empty_package_dir.packages
 
+// This test verifies handling of legacy .packages file and cannot be run in
+// null safety (strong) mode as strong mode needs new package_config.json.
+// Requirements=nnbd-weak
+
 // 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';
+import 'package:foo/foo.dart'; //# 01: compile-time error
 
 main() {}
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
index 3e9ec48..b41423a 100644
--- 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
@@ -4,6 +4,10 @@
 
 // Packages=mixed_line_ends.packages
 
+// This test verifies handling of legacy .packages file and cannot be run in
+// null safety (strong) mode as strong mode needs new package_config.json.
+// Requirements=nnbd-weak
+
 library mixed_line_ends_test;
 
 import 'package:foo/foo.dart' as foo;
diff --git a/tests/standalone/package/scenarios/packages_option_only/sub/.dart_tool/package_config.json b/tests/standalone/package/scenarios/packages_option_only/sub/.dart_tool/package_config.json
new file mode 100644
index 0000000..23e4838
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_option_only/sub/.dart_tool/package_config.json
@@ -0,0 +1,15 @@
+{
+  "copyright": [
+    "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."
+  ],
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": "../foo",
+      "languageVersion": "2.10"
+    }
+  ]
+}
diff --git a/tests/standalone/regress_41329_absolute_test.dart b/tests/standalone/regress_41329_absolute_test.dart
index cc2a402..e35e126 100644
--- a/tests/standalone/regress_41329_absolute_test.dart
+++ b/tests/standalone/regress_41329_absolute_test.dart
@@ -4,8 +4,6 @@
 
 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 {
diff --git a/tests/standalone/regress_41329_relative_test.dart b/tests/standalone/regress_41329_relative_test.dart
index cc2a402..e35e126 100644
--- a/tests/standalone/regress_41329_relative_test.dart
+++ b/tests/standalone/regress_41329_relative_test.dart
@@ -4,8 +4,6 @@
 
 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 {
diff --git a/tests/standalone/standalone_kernel.status b/tests/standalone/standalone_kernel.status
index 01f6276..a45b3d0 100644
--- a/tests/standalone/standalone_kernel.status
+++ b/tests/standalone/standalone_kernel.status
@@ -7,14 +7,18 @@
 fragmentation_test: Pass, Slow # GC heavy
 fragmentation_typed_data_test: Pass, Slow # GC heavy
 io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence.
+io/socket_network_policy_test: Skip # Temporarily disabled.
+io/socket_network_policy_localhost_test: Skip # Temporarily disabled.
 
 [ $compiler == dartkb ]
 no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers
 
 [ $system == android ]
 entrypoints_verification_test: Skip # Requires shared objects which the test script doesn't "adb push".
-io/http_ban_http_embedder_test: Skip # Requires http server bound to non-loopback; not provided by system.
-io/http_ban_http_normal_test: Skip # Requires http server bound to non-loopback; not provided by system.
+io/network_policy_configuration_test: Skip # Can't pass -D params containing quotes to adb.
+io/network_policy_invalid_domain_test: Skip # Can't pass -D params containing quotes to adb.
+io/network_policy_tie_breaker_test: Skip # Can't pass -D params containing quotes to adb.
+io/socket_network_policy_test: Skip # Can't pass -D params containing quotes to adb.
 
 [ $arch == ia32 && $builder_tag == optimization_counter_threshold ]
 io/file_lock_test: SkipSlow # Timeout
diff --git a/tests/standalone/standalone_precompiled.status b/tests/standalone/standalone_precompiled.status
index 672a30e..6953302 100644
--- a/tests/standalone/standalone_precompiled.status
+++ b/tests/standalone/standalone_precompiled.status
@@ -6,6 +6,7 @@
 dwarf_stack_trace_test: Pass, RuntimeError # Issue 35563
 
 [ $runtime == dart_precompiled ]
+check_for_aot_snapshot_jit_test: SkipByDesign
 http_launch_test: Skip
 io/addlatexhash_test: Skip
 io/dart_std_io_pipe_test: Skip
diff --git a/tests/standalone_2/check_for_aot_snapshot_jit_test.dart b/tests/standalone_2/check_for_aot_snapshot_jit_test.dart
new file mode 100644
index 0000000..851dc0c5
--- /dev/null
+++ b/tests/standalone_2/check_for_aot_snapshot_jit_test.dart
@@ -0,0 +1,59 @@
+// 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:expect/expect.dart';
+import 'package:path/path.dart' as path;
+
+main() {
+  final buildDir = path.dirname(Platform.executable);
+  final sdkDir = path.dirname(path.dirname(buildDir));
+  final platformDill = path.join(buildDir, 'vm_platform_strong.dill');
+  final genSnapshot = path.join(buildDir, 'gen_snapshot');
+
+  final exePath = Platform.resolvedExecutable;
+  final genSnapshotPath =
+      Uri.parse(Platform.executable).resolve('gen_snapshot').path;
+  final powTest = Platform.script.resolve('pow_test.dart').path;
+  final d = Directory.systemTemp.createTempSync('aot_tmp');
+  final kernelOutput = d.uri.resolve('pow_test.dill').path;
+  final aotOutput = d.uri.resolve('pow_test.aot').path;
+
+  final genKernelResult = Process.runSync(
+    'pkg/vm/tool/gen_kernel',
+    [
+      '--aot',
+      '--platform=$platformDill',
+      '-o',
+      kernelOutput,
+      powTest,
+    ],
+  );
+  Expect.equals(genKernelResult.exitCode, 0);
+
+  final genAotResult = Process.runSync(
+    genSnapshot,
+    [
+      '--snapshot_kind=app-aot-elf',
+      '--elf=$aotOutput',
+      kernelOutput,
+    ],
+  );
+  Expect.equals(genAotResult.exitCode, 0);
+
+  final runAotResult = Process.runSync(
+    exePath,
+    [
+      'run',
+      aotOutput,
+    ],
+  );
+  Expect.equals(runAotResult.exitCode, 255);
+  Expect.stringContainsInOrder(
+    runAotResult.stderr,
+    [
+      "pow_test.aot is an AOT snapshot and should be run with 'dartaotruntime'",
+    ],
+  );
+}
diff --git a/tests/standalone_2/fragmentation_deferred_load_lib1.dart b/tests/standalone_2/fragmentation_deferred_load_lib1.dart
new file mode 100644
index 0000000..c561f14
--- /dev/null
+++ b/tests/standalone_2/fragmentation_deferred_load_lib1.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  return "one!";
+}
diff --git a/tests/standalone_2/fragmentation_deferred_load_lib2.dart b/tests/standalone_2/fragmentation_deferred_load_lib2.dart
new file mode 100644
index 0000000..1f01b0f
--- /dev/null
+++ b/tests/standalone_2/fragmentation_deferred_load_lib2.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  return "two!";
+}
diff --git a/tests/standalone_2/fragmentation_deferred_load_lib3.dart b/tests/standalone_2/fragmentation_deferred_load_lib3.dart
new file mode 100644
index 0000000..77d3264
--- /dev/null
+++ b/tests/standalone_2/fragmentation_deferred_load_lib3.dart
@@ -0,0 +1,7 @@
+// 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.
+
+foo() {
+  return "three!";
+}
diff --git a/tests/standalone_2/fragmentation_deferred_load_test.dart b/tests/standalone_2/fragmentation_deferred_load_test.dart
new file mode 100644
index 0000000..8e0ecc3
--- /dev/null
+++ b/tests/standalone_2/fragmentation_deferred_load_test.dart
@@ -0,0 +1,40 @@
+// 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=--use_compactor
+
+// Each loading unit creates more image pages in the heap, which unfortunately
+// cannot be aligned stronger than virtual memory page alignment, so the
+// compactor must detect references to these image pages separately. Before
+// these loading units were implemented, the compactor could assume a small
+// upper bound on the number of image pages.
+
+import "package:expect/expect.dart";
+import "fragmentation_deferred_load_lib1.dart" deferred as lib1;
+import "fragmentation_deferred_load_lib2.dart" deferred as lib2;
+import "fragmentation_deferred_load_lib3.dart" deferred as lib3;
+
+main() async {
+  await lib1.loadLibrary();
+  Expect.equals("one!", lib1.foo());
+  await lib2.loadLibrary();
+  Expect.equals("two!", lib2.foo());
+  await lib3.loadLibrary();
+  Expect.equals("three!", lib3.foo());
+
+  final List<List> arrays = [];
+  // Fill up heap with alternate large-small items.
+  for (int i = 0; i < 500000; i++) {
+    arrays.add(new List(260));
+    arrays.add(new List(1));
+  }
+  // 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(300));
+  }
+}
diff --git a/tests/standalone_2/io/bytes_builder_test.dart b/tests/standalone_2/io/bytes_builder_test.dart
deleted file mode 100644
index 5b6a6b9..0000000
--- a/tests/standalone_2/io/bytes_builder_test.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// 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:typed_data";
-import "package:expect/expect.dart";
-
-main() {
-  for (var copying in [true, false]) {
-    var b;
-    testLength(n) {
-      Expect.equals(n, b.length);
-      if (n == 0) {
-        Expect.isTrue(b.isEmpty, "isEmpty: #${b.length}");
-        Expect.isFalse(b.isNotEmpty, "isNotEmpty: #${b.length}");
-      } else {
-        Expect.isTrue(b.isNotEmpty, "isNotEmpty: #${b.length}");
-        Expect.isFalse(b.isEmpty, "isEmpty: #${b.length}");
-      }
-    }
-
-    b = new BytesBuilder(copy: copying);
-    testLength(0);
-
-    b.addByte(0);
-    testLength(1);
-
-    b.add([1, 2, 3]);
-    testLength(4);
-
-    b.add(<int>[4, 5, 6]);
-    testLength(7);
-
-    b.add(new Uint8List.fromList([7, 8, 9]));
-    testLength(10);
-
-    b.add(new Uint16List.fromList([10, 11, 12]));
-    testLength(13);
-
-    var bytes = b.toBytes();
-    Expect.isTrue(bytes is Uint8List);
-    Expect.listEquals([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], bytes);
-    testLength(13);
-
-    b.add("\x0d\x0e\x0f".codeUnits);
-    testLength(16);
-
-    bytes = b.takeBytes();
-    testLength(0);
-    Expect.isTrue(bytes is Uint8List);
-    Expect.listEquals(
-        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], bytes);
-
-    b.addByte(0);
-    testLength(1);
-
-    b.clear();
-    testLength(0);
-
-    b.addByte(0);
-    testLength(1);
-  }
-}
diff --git a/tests/standalone_2/io/file_copy_test.dart b/tests/standalone_2/io/file_copy_test.dart
index 2302a4a..b1c0723 100644
--- a/tests/standalone_2/io/file_copy_test.dart
+++ b/tests/standalone_2/io/file_copy_test.dart
@@ -30,6 +30,14 @@
   Expect.equals(FILE_CONTENT2, file1.readAsStringSync());
   Expect.equals(FILE_CONTENT2, file2.readAsStringSync());
 
+  // Check there is no temporary files existing.
+  var list = tmp.listSync();
+  Expect.equals(2, list.length);
+  for (var file in list) {
+    final fileName = file.path.toString();
+    Expect.isTrue(fileName.contains("file1") || fileName.contains("file2"));
+  }
+
   // Fail when coping to directory.
   var dir = new Directory('${tmp.path}/dir')..createSync();
   Expect.throws(() => file1.copySync(dir.path));
@@ -38,6 +46,28 @@
   tmp.deleteSync(recursive: true);
 }
 
+void testWithForwardSlashes() {
+  if (Platform.isWindows) {
+    final tmp = Directory.systemTemp.createTempSync('dart-file-copy');
+
+    final file1 = File('${tmp.path}/file1');
+    file1.writeAsStringSync(FILE_CONTENT1);
+    Expect.equals(FILE_CONTENT1, file1.readAsStringSync());
+
+    // Test with a path contains only forward slashes.
+    final dest = tmp.path.toString().replaceAll("\\", "/");
+    final file2 = file1.copySync('${dest}/file2');
+    Expect.equals(FILE_CONTENT1, file2.readAsStringSync());
+
+    // Test with a path mixing both forward and backward slashes.
+    final file3 = file1.copySync('${dest}\\file3');
+    Expect.equals(FILE_CONTENT1, file3.readAsStringSync());
+
+    // Clean up the directory
+    tmp.deleteSync(recursive: true);
+  }
+}
+
 void testCopy() {
   asyncStart();
   var tmp = Directory.systemTemp.createTempSync('dart-file-copy');
@@ -76,4 +106,6 @@
 main() {
   testCopySync();
   testCopy();
+  // This is Windows only test.
+  testWithForwardSlashes();
 }
diff --git a/tests/standalone_2/io/file_test.dart b/tests/standalone_2/io/file_test.dart
index 3b0901d..0d73ef9 100644
--- a/tests/standalone_2/io/file_test.dart
+++ b/tests/standalone_2/io/file_test.dart
@@ -1601,6 +1601,53 @@
     }
   }
 
+  static void testAbsolute() {
+    var currentDirectory = Directory.current;
+    Directory.current = tempDirectory;
+    var file = File("temp.txt");
+    Expect.isFalse(file.isAbsolute);
+    file.writeAsStringSync("content");
+
+    var absFile = file.absolute;
+    Expect.isTrue(absFile.isAbsolute);
+    Expect.isTrue(absFile.path.startsWith(tempDirectory.path));
+
+    Expect.equals("content", absFile.readAsStringSync());
+
+    if (Platform.isWindows &&
+        tempDirectory.path.startsWith(RegExp(r"^[a-zA-Z]:"))) {
+      var driveRelativeFile = File(absFile.path.substring(2));
+      Expect.isFalse(driveRelativeFile.isAbsolute);
+      Expect.equals("content", driveRelativeFile.readAsStringSync());
+
+      var absFile3 = driveRelativeFile.absolute;
+      Expect.isTrue(absFile3.isAbsolute);
+      Expect.equals(absFile.path, absFile3.path);
+      Expect.equals("content", absFile3.readAsStringSync());
+
+      // Convert CWD from X:\path to \\localhost\X$\path.
+      var uncPath = r"\\localhost\" +
+          tempDirectory.path[0] +
+          r"$" +
+          tempDirectory.path.substring(2);
+      Directory.current = uncPath;
+      Expect.equals("content", file.readAsStringSync());
+
+      var absFile4 = file.absolute;
+      Expect.isTrue(absFile4.isAbsolute);
+      Expect.equals("content", absFile4.readAsStringSync());
+
+      Expect.equals("content", driveRelativeFile.readAsStringSync());
+
+      var absFile5 = driveRelativeFile.absolute;
+      Expect.isTrue(absFile5.isAbsolute);
+      Expect.isTrue(absFile5.path.startsWith(uncPath));
+      Expect.equals("content", absFile5.readAsStringSync());
+    }
+    file.deleteSync();
+    Directory.current = currentDirectory;
+  }
+
   static String getFilename(String path) {
     return Platform.script.resolve(path).toFilePath();
   }
@@ -1676,6 +1723,7 @@
       testSetLastAccessedSync();
       testSetLastAccessedSyncDirectory();
       testDoubleAsyncOperation();
+      testAbsolute();
       asyncEnd();
     });
   }
diff --git a/tests/standalone_2/io/http_ban_http_embedder_test.dart b/tests/standalone_2/io/http_ban_http_embedder_test.dart
deleted file mode 100644
index 7fd3cb3..0000000
--- a/tests/standalone_2/io/http_ban_http_embedder_test.dart
+++ /dev/null
@@ -1,69 +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.
-
-// SharedOptions=-Ddart.library.io.allow_http=false
-
-import 'dart:async';
-import 'dart:io';
-
-import "package:async_helper/async_helper.dart";
-
-import 'http_ban_http_normal_test.dart';
-import 'http_bind_test.dart';
-
-Future<void> testWithHostname() async {
-  await testBanHttp(await getLocalHostIP(), (httpClient, httpUri) async {
-    asyncExpectThrows(
-        () async => await httpClient.getUrl(httpUri), (e) => e is StateError);
-    asyncExpectThrows(
-        () async => await runZoned(() => httpClient.getUrl(httpUri),
-            zoneValues: {#dart.library.io.allow_http: 'foo'}),
-        (e) => e is StateError);
-    asyncExpectThrows(
-        () async => await runZoned(() => httpClient.getUrl(httpUri),
-            zoneValues: {#dart.library.io.allow_http: false}),
-        (e) => e is StateError);
-    await asyncTest(() => runZoned(() => httpClient.getUrl(httpUri),
-        zoneValues: {#dart.library.io.allow_http: true}));
-  });
-}
-
-Future<void> testWithLoopback() async {
-  await testBanHttp("127.0.0.1", (httpClient, uri) async {
-    await asyncTest(
-        () => httpClient.getUrl(Uri.parse('http://localhost:${uri.port}')));
-    await asyncTest(
-        () => httpClient.getUrl(Uri.parse('http://127.0.0.1:${uri.port}')));
-  });
-}
-
-Future<void> testWithIPv6() async {
-  if (await supportsIPV6()) {
-    await testBanHttp("::1", (httpClient, uri) async {
-      await asyncTest(() => httpClient.getUrl(uri));
-    });
-  }
-}
-
-Future<void> testWithHTTPS() async {
-  await testBanHttp(await getLocalHostIP(), (httpClient, uri) async {
-    asyncExpectThrows(
-        () => httpClient.getUrl(Uri(
-              scheme: 'https',
-              host: uri.host,
-              port: uri.port,
-            )),
-        (e) => e is SocketException || e is HandshakeException);
-  });
-}
-
-main() {
-  asyncStart();
-  Future.wait(<Future>[
-    testWithHostname(),
-    testWithLoopback(),
-    testWithIPv6(),
-    testWithHTTPS(),
-  ]).then((_) => asyncEnd());
-}
diff --git a/tests/standalone_2/io/http_ban_http_normal_test.dart b/tests/standalone_2/io/http_ban_http_normal_test.dart
deleted file mode 100644
index 118dd4c..0000000
--- a/tests/standalone_2/io/http_ban_http_normal_test.dart
+++ /dev/null
@@ -1,44 +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 'dart:async';
-import 'dart:io';
-
-import "package:async_helper/async_helper.dart";
-
-Future<String> getLocalHostIP() async {
-  final interfaces = await NetworkInterface.list(
-      includeLoopback: false, type: InternetAddressType.IPv4);
-  return interfaces.first.addresses.first.address;
-}
-
-Future<void> testBanHttp(String serverHost,
-    Future<void> testCode(HttpClient client, Uri uri)) async {
-  final httpClient = new HttpClient();
-  final server = await HttpServer.bind(serverHost, 0);
-  final uri = Uri(scheme: 'http', host: serverHost, port: server.port);
-  try {
-    await testCode(httpClient, uri);
-  } finally {
-    httpClient.close(force: true);
-    await server.close();
-  }
-}
-
-main() async {
-  await asyncTest(() async {
-    final host = await getLocalHostIP();
-    // Normal HTTP request succeeds.
-    await testBanHttp(host, (httpClient, uri) async {
-      await asyncTest(() => httpClient.getUrl(uri));
-    });
-    // We can ban HTTP explicitly.
-    await testBanHttp(host, (httpClient, uri) async {
-      asyncExpectThrows(
-          () async => await runZoned(() => httpClient.getUrl(uri),
-              zoneValues: {#dart.library.io.allow_http: false}),
-          (e) => e is StateError);
-    });
-  });
-}
diff --git a/tests/standalone_2/io/http_linklocal_ipv6_test.dart b/tests/standalone_2/io/http_linklocal_ipv6_test.dart
index ea4e54d..e99162b 100644
--- a/tests/standalone_2/io/http_linklocal_ipv6_test.dart
+++ b/tests/standalone_2/io/http_linklocal_ipv6_test.dart
@@ -16,8 +16,13 @@
   //    ip address show
   asyncStart();
   try {
-    // Make sure the address here is the same as what it shows in "ip address show"
-    var ipv6 = 'fe80:1::10%tap0';
+    // Make sure the address here is the same as what it shows in
+    // "ip address show"
+    var ipv6 = 'fe80:1::1%tap0';
+
+    // Parses a Link-local address on Linux and Windows will throw an exception.
+    InternetAddress(ipv6);
+
     HttpServer.bind(ipv6, 0).then((server) {
       server.listen((request) {
         var timer = new Timer.periodic(const Duration(milliseconds: 0), (_) {
diff --git a/tests/standalone_2/io/network_policy_configuration_test.dart b/tests/standalone_2/io/network_policy_configuration_test.dart
new file mode 100644
index 0000000..6ee1bf0
--- /dev/null
+++ b/tests/standalone_2/io/network_policy_configuration_test.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.
+
+// SharedOptions=-Ddart.library.io.domain_network_policies=[["foobar.com",true,true],["foobar.com",true,true],["baz.foobar.com",true,true],["baz.foobar.com",false,false]] -Ddart.library.io.may_insecurely_connect_to_all_domains=false
+
+import 'dart:io';
+
+import "package:expect/expect.dart";
+
+void _checkAllows(List<String> domains) {
+  for (final domain in domains) {
+    Expect.isTrue(
+        isInsecureConnectionAllowed(domain), "$domain should be allowed.");
+  }
+}
+
+void _checkDenies(List<String> domains) {
+  for (final domain in domains) {
+    Expect.isFalse(
+        isInsecureConnectionAllowed(domain), "$domain should not be allowed.");
+  }
+}
+
+void main() {
+  // These have no policy but the default is false.
+  _checkDenies(["mailfoobar.com", "abc.com", "oobar.com", "foobar.co"]);
+  // These are explicitly denied.
+  _checkDenies(["baz.foobar.com"]);
+  _checkAllows(
+      ["foobar.com", "test.baz.foobar.com", "test2.test.baz.foobar.com"]);
+}
diff --git a/tests/standalone_2/io/network_policy_invalid_domain_test.dart b/tests/standalone_2/io/network_policy_invalid_domain_test.dart
new file mode 100644
index 0000000..971996c
--- /dev/null
+++ b/tests/standalone_2/io/network_policy_invalid_domain_test.dart
@@ -0,0 +1,15 @@
+// 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=-Ddart.library.io.domain_network_policies=[["com",true,true]]
+
+import 'dart:io';
+
+import "package:expect/expect.dart";
+
+// This test passes in an invalid domain as a network policy and checks that
+// loading the policies throws.
+void main() {
+  Expect.throwsArgumentError(() => isInsecureConnectionAllowed("test.com"));
+}
diff --git a/tests/standalone_2/io/network_policy_tie_breaker_test.dart b/tests/standalone_2/io/network_policy_tie_breaker_test.dart
new file mode 100644
index 0000000..c25d3ac
--- /dev/null
+++ b/tests/standalone_2/io/network_policy_tie_breaker_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.
+
+// SharedOptions=-Ddart.library.io.domain_network_policies=[["baz.foobar.com",true,true],["baz.foobar.com",false,false]]
+
+import 'dart:io';
+
+import "package:expect/expect.dart";
+
+void main() {
+  Expect.isFalse(isInsecureConnectionAllowed("baz.foobar.com"));
+  Expect.isTrue(isInsecureConnectionAllowed("test.baz.foobar.com"));
+}
diff --git a/tests/standalone_2/io/socket_network_policy_localhost_test.dart b/tests/standalone_2/io/socket_network_policy_localhost_test.dart
new file mode 100644
index 0000000..e531815
--- /dev/null
+++ b/tests/standalone_2/io/socket_network_policy_localhost_test.dart
@@ -0,0 +1,48 @@
+// 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 whether localhost connection succeeds even when insecure connections
+// are banned by default.
+// SharedOptions=-Ddart.library.io.may_insecurely_connect_to_all_domains=false
+
+import 'dart:async';
+import 'dart:io';
+
+import "package:async_helper/async_helper.dart";
+
+void testDisallowedConnectionByDefault() {
+  asyncExpectThrows(
+      () async => await Socket.connect("domain.invalid", 80),
+      (e) =>
+          e is SocketException &&
+          e.message.contains(
+              "Insecure socket connections are disallowed by platform"));
+}
+
+Future<void> testLocalhostConnection() async {
+  ServerSocket server =
+      await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
+  Socket socket;
+  try {
+    server.listen((_) {});
+    socket = await Socket.connect(InternetAddress.loopbackIPv4, server.port);
+  } finally {
+    server.close();
+    if (socket != null) {
+      socket.close();
+      await socket.done;
+      socket.destroy();
+    }
+  }
+}
+
+Future<void> test() async {
+  testDisallowedConnectionByDefault();
+  await testLocalhostConnection();
+}
+
+void main() {
+  asyncStart();
+  test().whenComplete(() => asyncEnd());
+}
diff --git a/tests/standalone_2/io/socket_network_policy_test.dart b/tests/standalone_2/io/socket_network_policy_test.dart
new file mode 100644
index 0000000..f476d67
--- /dev/null
+++ b/tests/standalone_2/io/socket_network_policy_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.
+
+// SharedOptions=-Ddart.library.io.domain_network_policies=[["notallowed.domain.invalid",true,false]]
+
+import 'dart:io';
+
+import "package:async_helper/async_helper.dart";
+
+void testDisallowedConnection() {
+  asyncExpectThrows(
+      () async => await Socket.connect("foo.notallowed.domain.invalid", 12345),
+      (e) {
+    print((e as SocketException).message);
+    return e is SocketException &&
+        e.message.startsWith(
+            "Insecure socket connections are disallowed by platform");
+  });
+}
+
+void testAllowedConnection() {
+  asyncExpectThrows(
+      () async => await Socket.connect("allowed.domain.invalid", 12345),
+      (e) =>
+          e is SocketException &&
+          !e.message.startsWith(
+              "Insecure socket connections are disallowed by platform"));
+}
+
+void main() {
+  testDisallowedConnection();
+  testAllowedConnection();
+}
diff --git a/tests/standalone_2/io/unix_socket_test.dart b/tests/standalone_2/io/unix_socket_test.dart
index 0193a5c..05f672c 100644
--- a/tests/standalone_2/io/unix_socket_test.dart
+++ b/tests/standalone_2/io/unix_socket_test.dart
@@ -216,6 +216,7 @@
       Expect.fail("Unexpected exception $e is thrown");
     } else {
       Expect.isTrue(e is SocketException);
+      Expect.isTrue(e.toString().contains('not available'));
     }
   }
 }
diff --git a/tests/standalone_2/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart b/tests/standalone_2/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart
index 5b5156e..898a519 100644
--- a/tests/standalone_2/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart
+++ b/tests/standalone_2/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart
@@ -6,6 +6,6 @@
 
 library empty_packages_file_discovery_test;
 
-import 'package:foo/foo.dart';
+import 'package:foo/foo.dart'; //# 01: compile-time error
 
 main() {}
diff --git a/tests/standalone_2/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart b/tests/standalone_2/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart
index 010f5f3..fbde79f 100644
--- a/tests/standalone_2/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart
+++ b/tests/standalone_2/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart
@@ -6,6 +6,6 @@
 
 library empty_packages_file_option_test;
 
-import 'package:foo/foo.dart';
+import 'package:foo/foo.dart'; //# 01: compile-time error
 
 main() {}
diff --git a/tests/standalone_2/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart b/tests/standalone_2/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart
index 97cded4..2cf07c9 100644
--- a/tests/standalone_2/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart
+++ b/tests/standalone_2/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart
@@ -10,6 +10,6 @@
 // `import 'package:foo/foo.dart'` is equivalent to `import '/foo.dart'`.
 library empty_package_dir_test;
 
-import 'package:foo/foo.dart';
+import 'package:foo/foo.dart'; //# 01: compile-time error
 
 main() {}
diff --git a/tests/standalone_2/regress_41329_absolute_test.dart b/tests/standalone_2/regress_41329_absolute_test.dart
index cc2a402..e35e126 100644
--- a/tests/standalone_2/regress_41329_absolute_test.dart
+++ b/tests/standalone_2/regress_41329_absolute_test.dart
@@ -4,8 +4,6 @@
 
 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 {
diff --git a/tests/standalone_2/regress_41329_relative_test.dart b/tests/standalone_2/regress_41329_relative_test.dart
index cc2a402..e35e126 100644
--- a/tests/standalone_2/regress_41329_relative_test.dart
+++ b/tests/standalone_2/regress_41329_relative_test.dart
@@ -4,8 +4,6 @@
 
 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 {
diff --git a/tests/standalone_2/standalone_2.status b/tests/standalone_2/standalone_2.status
index e9477e1..f99d678 100644
--- a/tests/standalone_2/standalone_2.status
+++ b/tests/standalone_2/standalone_2.status
@@ -60,6 +60,15 @@
 io/wait_for_test: SkipByDesign # Uses mirrors.
 verbose_gc_to_bmu_test: Skip # Attempts to spawn dart using Platform.executable
 
+[ $system == fuchsia ] # Fuchsia test runner doesn't support multi-tests yet.
+deny_listed_test: Skip
+io/dart_std_io_pipe_test: Skip
+io/platform_resolved_executable_test: Skip
+io/signals_exception_test: Skip
+io/socket_ipv6_test: Skip
+package/invalid_uri_test: Skip
+regress_29350_test: Skip
+
 [ $builder_tag == swarming && $system == macos ]
 io/*: Skip # Issue 30618
 
diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status
index 01f6276..a45b3d0 100644
--- a/tests/standalone_2/standalone_2_kernel.status
+++ b/tests/standalone_2/standalone_2_kernel.status
@@ -7,14 +7,18 @@
 fragmentation_test: Pass, Slow # GC heavy
 fragmentation_typed_data_test: Pass, Slow # GC heavy
 io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence.
+io/socket_network_policy_test: Skip # Temporarily disabled.
+io/socket_network_policy_localhost_test: Skip # Temporarily disabled.
 
 [ $compiler == dartkb ]
 no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers
 
 [ $system == android ]
 entrypoints_verification_test: Skip # Requires shared objects which the test script doesn't "adb push".
-io/http_ban_http_embedder_test: Skip # Requires http server bound to non-loopback; not provided by system.
-io/http_ban_http_normal_test: Skip # Requires http server bound to non-loopback; not provided by system.
+io/network_policy_configuration_test: Skip # Can't pass -D params containing quotes to adb.
+io/network_policy_invalid_domain_test: Skip # Can't pass -D params containing quotes to adb.
+io/network_policy_tie_breaker_test: Skip # Can't pass -D params containing quotes to adb.
+io/socket_network_policy_test: Skip # Can't pass -D params containing quotes to adb.
 
 [ $arch == ia32 && $builder_tag == optimization_counter_threshold ]
 io/file_lock_test: SkipSlow # Timeout
diff --git a/tests/standalone_2/standalone_2_precompiled.status b/tests/standalone_2/standalone_2_precompiled.status
index 417ed1d..829aafc 100644
--- a/tests/standalone_2/standalone_2_precompiled.status
+++ b/tests/standalone_2/standalone_2_precompiled.status
@@ -3,6 +3,7 @@
 # BSD-style license that can be found in the LICENSE file.
 
 [ $runtime == dart_precompiled ]
+check_for_aot_snapshot_jit_test: SkipByDesign
 http_launch_test: Skip
 io/addlatexhash_test: Skip
 io/dart_std_io_pipe_test: Skip
diff --git a/tools/FAKE_COMMITS b/tools/FAKE_COMMITS
index 286b4b7..2a622d1 100644
--- a/tools/FAKE_COMMITS
+++ b/tools/FAKE_COMMITS
@@ -25,6 +25,7 @@
 Force build after DEPS format revert
 Force build while trybots are broken, to check builders for brokenness.
 Force build to test recipe changes
+Force build to test recipe changes
 
 Analyzer branch commits:
 Force build on new analyzer-branch linux build with new workflow
diff --git a/tools/VERSION b/tools/VERSION
index 40e02d0..6ee8dfe 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -23,17 +23,9 @@
 #  * Making cherry-picks to stable channel
 #     - increase PATCH by 1
 #
-#  * Making a change to the ABI:
-#     - increase ABI_VERSION by 1
-#
-#  * Deprecating an old ABI version:
-#     - increase OLDEST_SUPPORTED_ABI_VERSION to the version that is supported.
-#
 CHANNEL beta
 MAJOR 2
-MINOR 9
+MINOR 10
 PATCH 0
-PRERELEASE 21
-PRERELEASE_PATCH 10
-ABI_VERSION 38
-OLDEST_SUPPORTED_ABI_VERSION 38
+PRERELEASE 7
+PRERELEASE_PATCH 1
diff --git a/tools/bots/bot.py b/tools/bots/bot.py
index 8c23405..74aa8e2 100644
--- a/tools/bots/bot.py
+++ b/tools/bots/bot.py
@@ -44,7 +44,6 @@
   - dart2js_full: Boolean indicating whether this builder will run dart2js
     on several different runtimes.
   - builder_tag: A tag indicating a special builder setup.
-  - cps_ir: Run the compiler with the cps based backend
   """
 
     def __init__(self,
@@ -63,8 +62,7 @@
                  arch=None,
                  dart2js_full=False,
                  builder_tag=None,
-                 batch=False,
-                 cps_ir=False):
+                 batch=False):
         self.compiler = compiler
         self.runtime = runtime
         self.mode = mode
@@ -80,7 +78,6 @@
         self.dart2js_full = dart2js_full
         self.builder_tag = builder_tag
         self.batch = batch
-        self.cps_ir = cps_ir
         if (arch == None):
             self.arch = 'ia32'
         else:
diff --git a/tools/bots/compare_results.dart b/tools/bots/compare_results.dart
index b6f0ce4..ef74e02 100755
--- a/tools/bots/compare_results.dart
+++ b/tools/bots/compare_results.dart
@@ -11,31 +11,7 @@
 import 'dart:io';
 
 import 'package:args/args.dart';
-
-import 'results.dart';
-
-class Result {
-  final String configuration;
-  final String name;
-  final String outcome;
-  final String expectation;
-  final bool matches;
-  final bool flaked;
-
-  Result(this.configuration, this.name, this.outcome, this.expectation,
-      this.matches, this.flaked);
-
-  Result.fromMap(Map<String, dynamic> map, Map<String, dynamic> flakinessData)
-      : configuration = map["configuration"],
-        name = map["name"],
-        outcome = map["result"],
-        expectation = map["expected"],
-        matches = map["matches"],
-        flaked = flakinessData != null &&
-            flakinessData["outcomes"].contains(map["result"]);
-
-  String get key => "$configuration:$name";
-}
+import 'package:test_runner/bot_results.dart';
 
 class Event {
   final Result before;
diff --git a/tools/bots/extend_results.dart b/tools/bots/extend_results.dart
index f8ba5c1..859c02b 100644
--- a/tools/bots/extend_results.dart
+++ b/tools/bots/extend_results.dart
@@ -8,7 +8,7 @@
 import 'dart:convert';
 import 'dart:io';
 
-import 'results.dart';
+import 'package:test_runner/bot_results.dart';
 
 const skipped = 'skipped';
 
diff --git a/tools/bots/get_builder_status.dart b/tools/bots/get_builder_status.dart
index 725c9f4..e464abc 100755
--- a/tools/bots/get_builder_status.dart
+++ b/tools/bots/get_builder_status.dart
@@ -17,8 +17,15 @@
 
 const numAttempts = 20;
 const failuresPerConfiguration = 20;
-const queryUrl = 'https://firestore.googleapis.com/v1/'
-    'projects/dart-ci/databases/(default)/documents:runQuery';
+
+bool useStagingDatabase;
+
+String get queryUrl {
+  var project = useStagingDatabase ? "dart-ci-staging" : "dart-ci";
+  return 'https://firestore.googleapis.com/v1/'
+      'projects/$project/databases/(default)/documents:runQuery';
+}
+
 String builder;
 String builderBase;
 int buildNumber;
@@ -46,6 +53,11 @@
   exit(1);
 }
 
+Future<String> readGcloudAuthToken(String path) async {
+  String token = await File(path).readAsString();
+  return token.split("\n").first;
+}
+
 main(List<String> args) async {
   final parser = new ArgParser();
   parser.addFlag('help', help: 'Show the program usage.', negatable: false);
@@ -53,16 +65,23 @@
       abbr: 'a', help: 'Authorization token with cloud-platform scope');
   parser.addOption('builder', abbr: 'b', help: 'The builder name');
   parser.addOption('build_number', abbr: 'n', help: 'The build number');
+  parser.addFlag('staging',
+      abbr: 's', help: 'use staging database', defaultsTo: false);
 
   final options = parser.parse(args);
   if (options['help']) {
     usage(parser);
   }
 
+  useStagingDatabase = options['staging'];
   builder = options['builder'];
   buildNumber = int.parse(options['build_number']);
   builderBase = builder.replaceFirst(RegExp('-try\$'), '');
-  token = await File(options['auth_token']).readAsString();
+  if (options['auth_token'] == null) {
+    print('Option "--auth_token (-a)" is required\n');
+    usage(parser);
+  }
+  token = await readGcloudAuthToken(options['auth_token']);
   client = http.Client();
   for (int count = 0; count < numAttempts; ++count) {
     if (count > 0) {
@@ -104,7 +123,7 @@
           ].join(' '));
         }
       } else {
-        print('No results recieved for build $buildNumber of $builder');
+        print('No results received for build $buildNumber of $builder');
       }
     } else {
       print('HTTP status ${response.statusCode} received '
diff --git a/tools/bots/lib/src/firestore.dart b/tools/bots/lib/src/firestore.dart
new file mode 100644
index 0000000..6e8cc47
--- /dev/null
+++ b/tools/bots/lib/src/firestore.dart
@@ -0,0 +1,217 @@
+// 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:convert' show jsonDecode, jsonEncode;
+import 'dart:io' show File, HttpStatus;
+
+import 'package:http/http.dart' as http;
+
+Future<String> readGcloudAuthToken(String path) async {
+  String token = await File(path).readAsString();
+  return token.split("\n").first;
+}
+
+/// Helper class to access the Firestore REST API.
+///
+/// This class is not a complete implementation of the Firestore REST protocol
+/// and is only meant to support the operations required by scripts in
+/// tools/bots.
+class FirestoreDatabase {
+  final http.Client _client = http.Client();
+  final String _authToken;
+  final String _project;
+
+  /// The current transaction ID in base64 (or `null`)
+  String _currentTransaction;
+
+  /// Returns the current transaction escaped to be useable as part of a URI.
+  String get _escapedCurrentTransaction {
+    return Uri.encodeFull(_currentTransaction)
+        // The Firestore API does not accept '+' in URIs
+        .replaceAll("+", "%2B");
+  }
+
+  FirestoreDatabase(this._project, this._authToken);
+
+  static const apiUrl = 'https://firestore.googleapis.com/v1beta1';
+
+  String get projectUrl => '$apiUrl/projects/$_project';
+
+  String get documentsUrl => '$projectUrl/databases/(default)/documents';
+
+  String get queryUrl => '$documentsUrl:runQuery';
+
+  Map<String, String> get _headers {
+    return {
+      'Authorization': 'Bearer $_authToken',
+      'Accept': 'application/json',
+      'Content-Type': 'application/json'
+    };
+  }
+
+  Future<List> runQuery(Query query) async {
+    var body = jsonEncode(query.data);
+    var response = await _client.post(queryUrl, headers: _headers, body: body);
+    if (response.statusCode == HttpStatus.ok) {
+      return jsonDecode(response.body);
+    } else {
+      throw _error(response);
+    }
+  }
+
+  Future<Object> getDocument(String collectionName, String documentName) async {
+    var url = '$documentsUrl/$collectionName/$documentName';
+    if (_currentTransaction != null) {
+      url = '$url?transaction=${_escapedCurrentTransaction}';
+    }
+    var response = await _client.get(url, headers: _headers);
+    if (response.statusCode == HttpStatus.ok) {
+      return jsonDecode(response.body);
+    } else {
+      throw _error(response);
+    }
+  }
+
+  Future<Object> updateField(Map document, String field) async {
+    var url = '$apiUrl/${document["name"]}?updateMask.fieldPaths=$field';
+    var response =
+        await _client.patch(url, headers: _headers, body: jsonEncode(document));
+    if (response.statusCode == HttpStatus.ok) {
+      return jsonDecode(response.body);
+    } else {
+      throw _error(response);
+    }
+  }
+
+  void beginTransaction() async {
+    if (_currentTransaction != null) {
+      throw Exception('Error: nested transactions');
+    }
+    var url = '$documentsUrl:beginTransaction';
+    var body = '{"options": {}}';
+    var response = await _client.post(url, headers: _headers, body: body);
+    if (response.statusCode == HttpStatus.ok) {
+      var result = jsonDecode(response.body);
+      _currentTransaction = result['transaction'] as String;
+      if (_currentTransaction == null) {
+        throw Exception("Call returned no transaction identifier");
+      }
+    } else {
+      throw _error(response, message: 'Could not start transaction:');
+    }
+  }
+
+  Future<bool> commit([List<Write> writes]) async {
+    if (_currentTransaction == null) {
+      throw Exception('"commit" called without transaction');
+    }
+    var body = jsonEncode({
+      "writes": writes.map((write) => write.data).toList(),
+      "transaction": "$_currentTransaction"
+    });
+    var url = '$documentsUrl:commit';
+    var response = await _client.post(url, headers: _headers, body: body);
+    _currentTransaction = null;
+    if (response.statusCode == HttpStatus.conflict) {
+      // This HTTP status code corresponds to the ABORTED error code, see
+      // https://cloud.google.com/datastore/docs/concepts/errors and
+      // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto#L137
+      return false;
+    }
+    if (response.statusCode != HttpStatus.ok) {
+      throw _error(response);
+    }
+    return true;
+  }
+
+  Exception _error(http.Response response, {String message: 'Error'}) {
+    throw Exception('$message: ${response.statusCode}: '
+        '${response.reasonPhrase}:\n${response.body}');
+  }
+
+  /// Closes the underlying HTTP client.
+  void closeClient() => _client.close();
+}
+
+abstract class Write {
+  Map get data;
+}
+
+class Update implements Write {
+  final Map data;
+  Update(List<String> updateMask, Map document, {String updateTime})
+      : data = {
+          if (updateTime != null) "currentDocument": {"updateTime": updateTime},
+          "updateMask": {"fieldPaths": updateMask},
+          "update": document
+        };
+}
+
+class Query {
+  final Map data;
+  Query(String collection, Filter filter, {int limit})
+      : data = {
+          'structuredQuery': {
+            'from': [
+              {'collectionId': collection}
+            ],
+            if (limit != null) 'limit': limit,
+            'where': filter.data,
+          }
+        };
+}
+
+class Filter {
+  final Map data;
+  Filter(this.data);
+}
+
+class FieldFilter extends Filter {
+  FieldFilter(String field, String op, String type, Object value)
+      : super({
+          'fieldFilter': {
+            'field': {'fieldPath': field},
+            'op': op,
+            'value': {'$type': value},
+          }
+        });
+}
+
+class Field {
+  final String name;
+  Field(this.name);
+  FieldFilter equals(Value value) {
+    return FieldFilter(name, 'EQUAL', value.type, value.value);
+  }
+
+  FieldFilter greaterOrEqual(Value value) {
+    return FieldFilter(name, 'GREATER_THAN_OR_EQUAL', value.type, value.value);
+  }
+
+  FieldFilter lessOrEqual(Value value) {
+    return FieldFilter(name, 'LESS_THAN_OR_EQUAL', value.type, value.value);
+  }
+
+  FieldFilter contains(Value value) {
+    return FieldFilter(name, 'ARRAY_CONTAINS', value.type, value.value);
+  }
+}
+
+class Value {
+  final String type;
+  final Object value;
+  Value.boolean(bool this.value) : type = 'booleanValue';
+  Value.string(String this.value) : type = 'stringValue';
+  Value.integer(int this.value) : type = 'integerValue';
+}
+
+class CompositeFilter extends Filter {
+  CompositeFilter(String op, List<Filter> parts)
+      : super({
+          'compositeFilter': {
+            'op': op,
+            'filters': parts.map((part) => part.data).toList(),
+          }
+        });
+}
diff --git a/tools/bots/results.dart b/tools/bots/results.dart
deleted file mode 100644
index d3707f4..0000000
--- a/tools/bots/results.dart
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// results.json and flaky.json parser.
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io';
-import 'dart:math';
-
-import 'package:pool/pool.dart';
-
-/// The path to the gsutil script.
-String gsutilPy;
-
-/// Cloud storage location containing results.
-const testResultsStoragePath = "gs://dart-test-results/builders";
-
-/// Limit the number of concurrent subprocesses by half the number of cores.
-final gsutilPool = new Pool(max(1, Platform.numberOfProcessors ~/ 2));
-
-/// Runs gsutil with the provided [arguments] and returns the standard output.
-/// Returns null if the requested URL didn't exist.
-Future<String> runGsutil(List<String> arguments) async {
-  return gsutilPool.withResource(() async {
-    final processResult = await Process.run(
-        "python", [gsutilPy]..addAll(arguments),
-        runInShell: Platform.isWindows);
-    if (processResult.exitCode != 0) {
-      if (processResult.exitCode == 1 &&
-              processResult.stderr.contains("No URLs matched") ||
-          processResult.stderr
-              .contains("One or more URLs matched no objects")) {
-        return null;
-      }
-      String error = "Failed to run: python $gsutilPy $arguments\n"
-          "exitCode: ${processResult.exitCode}\n"
-          "stdout:\n${processResult.stdout}\n"
-          "stderr:\n${processResult.stderr}";
-      if (processResult.exitCode == 1 &&
-          processResult.stderr.contains("401 Anonymous caller")) {
-        error =
-            "\n\nYou need to authenticate by running:\npython $gsutilPy config\n";
-      }
-      throw new Exception(error);
-    }
-    return processResult.stdout;
-  });
-}
-
-/// Returns the contents of the provided cloud storage [path], or null if it
-/// didn't exist.
-Future<String> catGsutil(String path) => runGsutil(["cat", path]);
-
-/// Returns the files and directories in the provided cloud storage [directory],
-/// or null if it didn't exist.
-Future<Iterable<String>> lsGsutil(String directory) async {
-  final contents = await runGsutil(["ls", directory]);
-  if (contents == null) {
-    return null;
-  }
-  return LineSplitter.split(contents).map((String path) {
-    final elements = path.split("/");
-    if (elements[elements.length - 1].isEmpty) {
-      return elements[elements.length - 2];
-    } else {
-      return elements[elements.length - 1];
-    }
-  });
-}
-
-/// Copies a file to or from cloud storage.
-Future cpGsutil(String source, String destination) =>
-    runGsutil(["cp", source, destination]);
-
-/// Copies a directory recursively to or from cloud strorage.
-Future cpRecursiveGsutil(String source, String destination) =>
-    runGsutil(["-m", "cp", "-r", "-Z", source, destination]);
-
-/// Lists the bots in cloud storage.
-Future<Iterable<String>> listBots() => lsGsutil("$testResultsStoragePath");
-
-/// Returns the cloud storage path for the [bot].
-String botCloudPath(String bot) => "$testResultsStoragePath/$bot";
-
-/// Returns the cloud storage path to the [build] on the [bot].
-String buildCloudPath(String bot, String build) =>
-    "${botCloudPath(bot)}/$build";
-
-/// Returns the cloud storage path to the [file] inside the [bot]'s directory.
-String fileCloudPath(String bot, String file) => "${botCloudPath(bot)}/$file";
-
-/// Reads the contents of the [file] inside the [bot]'s cloud storage.
-Future<String> readFile(String bot, String file) =>
-    catGsutil(fileCloudPath(bot, file));
-
-/// Returns the cloud storage path to the [file] inside the [build] on the
-/// [bot].
-String buildFileCloudPath(String bot, String build, String file) =>
-    "${buildCloudPath(bot, build)}/$file";
-
-/// Reads the contents of the [file] inside the [build] in the [bot]'s cloud
-/// storage.
-Future<String> readBuildFile(String bot, String build, String file) =>
-    catGsutil(buildFileCloudPath(bot, build, file));
-
-List<Map<String, dynamic>> parseResults(String contents) {
-  return LineSplitter.split(contents)
-      .map(jsonDecode)
-      .toList()
-      .cast<Map<String, dynamic>>();
-}
-
-Future<List<Map<String, dynamic>>> loadResults(String path) async {
-  final results = <Map<String, dynamic>>[];
-  final lines = new File(path)
-      .openRead()
-      .cast<List<int>>()
-      .transform(utf8.decoder)
-      .transform(new LineSplitter());
-  await for (final line in lines) {
-    final Map<String, dynamic> map = jsonDecode(line);
-    results.add(map);
-  }
-  return results;
-}
-
-Map<String, Map<String, dynamic>> createResultsMap(
-    List<Map<String, dynamic>> results) {
-  Map<String, Map<String, dynamic>> result = {};
-  for (Map<String, dynamic> map in results) {
-    var key = "${map["configuration"]}:${map["name"]}";
-    result.putIfAbsent(key, () => map);
-  }
-  return result;
-}
-
-Map<String, Map<String, dynamic>> parseResultsMap(String contents) =>
-    createResultsMap(parseResults(contents));
-
-Future<Map<String, Map<String, dynamic>>> loadResultsMap(String path) async =>
-    createResultsMap(await loadResults(path));
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index fcb7636..556782f 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -313,6 +313,7 @@
       "third_party/android_tools/sdk/platform-tools/adb",
       "third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip",
       "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip",
+      "third_party/webdriver/",
       "third_party/pkg/",
       "third_party/pkg_tested/",
       "tests/.dart_tool/package_config.json",
@@ -391,16 +392,16 @@
       }
     },
     "unittest-weak-asserts-no-sdk-(linux|mac|win)": {
-       "options": {
-         "compiler": "dartk",
-         "enable-asserts": true,
-         "mode": "release",
-         "runtime": "vm",
-         "timeout": 240,
-         "enable-experiment": [
-           "non-nullable"
-         ]
-       }
+      "options": {
+        "compiler": "dartk",
+        "enable-asserts": true,
+        "mode": "release",
+        "runtime": "vm",
+        "timeout": 240,
+        "enable-experiment": [
+          "non-nullable"
+        ]
+      }
     },
     "analyzer-unittest-asserts-(debug|product|release)-(linux|mac|win)": {
       "options": {
@@ -700,6 +701,7 @@
       }
     },
     "dartk-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {},
+    "dartk-fuchsia-(debug|product|release)-x64": {},
     "dartk-linux-debug-(ia32|x64)-canary": {
       "options": {
         "builder-tag": "canary"
@@ -710,28 +712,44 @@
         "enable-experiment": [
           "non-nullable"
         ],
-	"gen-kernel-options": [
-          "--no-null-safety"
+        "gen-kernel-options": [
+          "--no-sound-null-safety"
         ],
         "enable-asserts": true,
-	"vm-options": [
-          "--no-null-safety"
+        "vm-options": [
+          "--no-sound-null-safety"
         ],
         "builder-tag": "vm_nnbd"
       }
     },
-    "dartkp-weak-asserts-win-(debug|product|release)-x64": {
+    "dartkp-weak-asserts-(linux|mac)-(debug|product|release)-simarm64": {
       "options": {
         "enable-experiment": [
           "non-nullable"
         ],
-	"gen-kernel-options": [
-          "--no-null-safety"
+        "gen-kernel-options": [
+          "--no-sound-null-safety"
         ],
         "enable-asserts": true,
         "use-elf": true,
-	"vm-options": [
-          "--no-null-safety"
+        "vm-options": [
+          "--no-sound-null-safety"
+        ],
+        "builder-tag": "vm_nnbd"
+      }
+    },
+    "dartkp-weak-asserts-win-(debug|product|release)-(simarm64|x64)": {
+      "options": {
+        "enable-experiment": [
+          "non-nullable"
+        ],
+        "gen-kernel-options": [
+          "--no-sound-null-safety"
+        ],
+        "enable-asserts": true,
+        "use-elf": true,
+        "vm-options": [
+          "--no-sound-null-safety"
         ],
         "builder-tag": "vm_nnbd"
       }
@@ -742,8 +760,8 @@
           "non-nullable"
         ],
         "enable-asserts": true,
-	"vm-options": [
-          "--no-null-safety"
+        "vm-options": [
+          "--no-sound-null-safety"
         ],
         "builder-tag": "vm_nnbd"
       }
@@ -754,7 +772,7 @@
           "non-nullable"
         ],
         "vm-options": [
-          "--null-safety"
+          "--sound-null-safety"
         ],
         "builder-tag": "vm_nnbd"
       }
@@ -765,25 +783,40 @@
           "non-nullable"
         ],
         "gen-kernel-options": [
-          "--null-safety"
+          "--sound-null-safety"
         ],
         "vm-options": [
-          "--null-safety"
+          "--sound-null-safety"
         ],
         "builder-tag": "vm_nnbd"
       }
     },
-    "dartkp-strong-win-(debug|product|release)-x64": {
+    "dartkp-strong-(linux|mac)-(debug|product|release)-simarm64": {
+      "options": {
+        "enable-experiment": [
+          "non-nullable"
+        ],
+        "gen-kernel-options": [
+          "--sound-null-safety"
+        ],
+        "use-elf": true,
+        "vm-options": [
+          "--sound-null-safety"
+        ],
+        "builder-tag": "vm_nnbd"
+      }
+    },
+    "dartkp-strong-win-(debug|product|release)-(simarm64|x64)": {
       "options": {
         "use-elf": true,
         "enable-experiment": [
           "non-nullable"
         ],
         "gen-kernel-options": [
-          "--null-safety"
+          "--sound-null-safety"
         ],
         "vm-options": [
-          "--null-safety"
+          "--sound-null-safety"
         ],
         "builder-tag": "vm_nnbd"
       }
@@ -911,9 +944,6 @@
         ]
       }
     },
-    "dartkb-abi-linux-release-x64": {
-      "__comment__": "This configuration is only used for a custom test runner. If it conflicts with a new configuration you are adding, you can make this configuration more specific by adding options."
-    },
     "dartdevk-checked-(linux|mac|win)-(debug|product|release)-(chrome|firefox)": {
       "options": {
         "checked": true,
@@ -1120,18 +1150,10 @@
       },
       "steps": [
         {
-          "name": "configure dart",
-          "script": "tools/gn.py",
-          "arguments": [
-            "--mode=${mode}",
-            "--arch=${arch}",
-            "--bytecode"
-          ]
-        },
-        {
           "name": "build dart",
           "script": "tools/build.py",
           "arguments": [
+            "--bytecode",
             "runtime"
           ]
         },
@@ -1274,16 +1296,10 @@
       },
       "steps": [
         {
-          "name": "configure dart",
-          "script": "tools/gn.py",
-          "arguments": [
-            "--use-qemu"
-          ]
-        },
-        {
           "name": "build dart",
           "script": "tools/build.py",
           "arguments": [
+            "--use-qemu",
             "dart_precompiled_runtime",
             "runtime_kernel"
           ]
@@ -1307,6 +1323,7 @@
     },
     {
       "builders": [
+        "vm-kernel-precomp-nnbd-linux-release-simarm64",
         "vm-kernel-precomp-nnbd-linux-release-x64"
       ],
       "meta": {
@@ -1322,24 +1339,6 @@
           ]
         },
         {
-          "name": "co19 nnbd tests in weak mode with asserts",
-          "arguments": [
-            "-ndartkp-weak-asserts-${system}-${mode}-${arch}",
-            "co19"
-          ],
-          "fileset": "vm-kernel",
-          "shards": 2
-        },
-        {
-          "name": "co19 nnbd tests in strong mode",
-          "arguments": [
-            "-ndartkp-strong-${system}-${mode}-${arch}",
-            "co19"
-          ],
-          "fileset": "vm-kernel",
-          "shards": 2
-        },
-        {
           "name": "vm nnbd tests in weak mode with asserts",
           "arguments": [
             "-ndartkp-weak-asserts-${system}-${mode}-${arch}",
@@ -1351,7 +1350,7 @@
             "vm"
           ],
           "fileset": "vm-kernel",
-          "shards": 3
+          "shards": 4
         },
         {
           "name": "vm nnbd tests in strong mode",
@@ -1363,7 +1362,27 @@
             "lib",
             "standalone/io",
             "vm"
-          ]
+          ],
+          "fileset": "vm-kernel",
+          "shards": 4
+        },
+        {
+          "name": "co19 nnbd tests in strong mode",
+          "arguments": [
+            "-ndartkp-strong-${system}-${mode}-${arch}",
+            "co19"
+          ],
+          "fileset": "vm-kernel",
+          "shards": 4
+        },
+        {
+          "name": "co19 nnbd tests in weak mode with asserts",
+          "arguments": [
+            "-ndartkp-weak-asserts-${system}-${mode}-${arch}",
+            "co19"
+          ],
+          "fileset": "vm-kernel",
+          "shards": 4
         }
       ]
     },
@@ -1527,11 +1546,6 @@
       },
       "steps": [
         {
-          "name": "configure dart",
-          "script": "tools/gn.py",
-          "arguments": []
-        },
-        {
           "name": "build dart",
           "script": "tools/build.py",
           "arguments": [
@@ -1555,11 +1569,6 @@
       },
       "steps": [
         {
-          "name": "configure dart",
-          "script": "tools/gn.py",
-          "arguments": []
-        },
-        {
           "name": "build dart",
           "script": "tools/build.py",
           "arguments": [
@@ -1587,11 +1596,6 @@
       },
       "steps": [
         {
-          "name": "configure dart",
-          "script": "tools/gn.py",
-          "arguments": []
-        },
-        {
           "name": "build dart",
           "script": "tools/build.py",
           "arguments": [
@@ -1618,11 +1622,6 @@
       },
       "steps": [
         {
-          "name": "configure dart",
-          "script": "tools/gn.py",
-          "arguments": []
-        },
-        {
           "name": "build dart",
           "script": "tools/build.py",
           "arguments": [
@@ -1648,21 +1647,13 @@
       },
       "steps": [
         {
-          "name": "configure dart",
-          "script": "tools/gn.py",
-          "arguments": [
-            "--mode=all",
-            "--arch=all",
-            "--no-clang",
-            "--no-goma"
-          ]
-        },
-        {
           "name": "build dart",
           "script": "tools/build.py",
           "arguments": [
             "--mode=all",
             "--arch=all",
+            "--no-clang",
+            "--no-goma",
             "runtime"
           ]
         }
@@ -2580,20 +2571,28 @@
           ]
         },
         {
-          "name": "dart2js nnbd weak tests",
+          "name": "dart2js nnbd weak d8 tests",
           "arguments": [
             "-ndart2js-hostasserts-weak-linux-x64-d8",
             "--dart2js-batch",
             "language",
-            "corelib",
-            "dart2js",
-            "kernel"
+            "corelib"
           ],
           "shards": 6,
           "fileset": "web_platform_hostasserts_nnbd"
         },
         {
-          "name": "dart2js legacy weak lib tests",
+          "name": "dart2js nnbd weak chrome tests",
+          "arguments": [
+            "-ndart2js-hostasserts-weak-linux-x64-chrome",
+            "--dart2js-batch",
+            "dart2js"
+          ],
+          "shards": 3,
+          "fileset": "web_platform_hostasserts_nnbd"
+        },
+        {
+          "name": "dart2js nnbd weak lib tests",
           "arguments": [
             "-ndart2js-hostasserts-weak-linux-x64-chrome",
             "--dart2js-batch",
@@ -2603,7 +2602,7 @@
           "fileset": "web_platform_hostasserts_nnbd"
         },
         {
-          "name": "dart2js legacy weak co19 tests",
+          "name": "dart2js nnbd weak co19 tests",
           "arguments": [
             "-ndart2js-hostasserts-weak-linux-x64-chrome",
             "--dart2js-batch",
@@ -2613,19 +2612,27 @@
           "fileset": "web_platform_hostasserts_nnbd"
         },
         {
-          "name": "dart2js nnbd strong tests",
+          "name": "dart2js nnbd strong d8 tests",
           "arguments": [
             "-ndart2js-hostasserts-strong-linux-x64-d8",
             "--dart2js-batch",
             "language",
-            "corelib",
-            "dart2js",
-            "kernel"
+            "corelib"
           ],
           "shards": 6,
           "fileset": "web_platform_hostasserts_nnbd"
         },
         {
+          "name": "dart2js nnbd strong chrome tests",
+          "arguments": [
+            "-ndart2js-hostasserts-strong-linux-x64-chrome",
+            "--dart2js-batch",
+            "dart2js"
+          ],
+          "shards": 3,
+          "fileset": "web_platform_hostasserts_nnbd"
+        },
+        {
           "name": "dart2js nnbd strong lib tests",
           "arguments": [
             "-ndart2js-hostasserts-strong-linux-x64-chrome",
@@ -2688,14 +2695,6 @@
           "arguments": [
             "api_docs"
           ]
-        },
-        {
-          "name": "upload abi dills",
-          "script": "tools/upload_abi_dills.sh",
-          "arguments": [
-            "tools/VERSION",
-            "out/ReleaseX64"
-          ]
         }
       ]
     },
@@ -2714,7 +2713,10 @@
             "--arch=x64",
             "--mode=release",
             "create_sdk"
-          ]
+          ],
+          "environment": {
+            "DART_GN_ARGS": "mac_use_goma_rbe=true"
+          }
         },
         {
           "name": "upload sdk",
@@ -3323,7 +3325,8 @@
             "--mode=release",
             "--arch=ia32",
             "create_sdk",
-            "runtime"
+            "runtime",
+            "kernel-service.dart.snapshot"
           ]
         },
         {
@@ -3356,7 +3359,9 @@
             "create_sdk",
             "runtime",
             "gen_snapshot",
-            "dart_precompiled_runtime"
+            "dart_precompiled_runtime",
+            "kernel-service.dart.snapshot",
+            "dartdevc_test"
           ]
         },
         {
@@ -3477,40 +3482,6 @@
     },
     {
       "builders": [
-        "vm-dartkb-linux-release-x64-abi"
-      ],
-      "meta": {
-        "description": "This configuration runs tests for each supported ABI version."
-      },
-      "steps": [
-        {
-          "name": "configure dart",
-          "script": "tools/gn.py",
-          "arguments": [
-            "--mode=release",
-            "--arch=x64",
-            "--bytecode"
-          ]
-        },
-        {
-          "name": "build dart",
-          "script": "tools/build.py",
-          "arguments": [
-            "--mode=release",
-            "--arch=x64",
-            "create_sdk_with_abi_versions"
-          ]
-        },
-        {
-          "name": "run tests",
-          "script": "tools/run_abi_tests.py",
-          "testRunner": true,
-          "arguments": ["-ndartkb-abi-linux-release-x64"]
-        }
-      ]
-    },
-    {
-      "builders": [
         "vm-kernel-precomp-linux-debug-simarm_x64",
         "vm-kernel-precomp-linux-release-simarm_x64"
       ],
@@ -3519,29 +3490,10 @@
       },
       "steps": [
         {
-          "name": "configure dart for simarm_x64",
-          "script": "tools/gn.py",
-          "arguments": [
-            "--mode=${mode}",
-            "--arch=simarm_x64",
-            "--bytecode"
-          ]
-        },
-        {
-          "name": "configure dart for simarm",
-          "script": "tools/gn.py",
-          "arguments": [
-            "--mode=${mode}",
-            "--arch=simarm",
-            "--bytecode"
-          ]
-        },
-        {
           "name": "build dart for simarm_x64",
           "script": "tools/build.py",
           "arguments": [
-            "--mode=${mode}",
-            "--arch=simarm_x64",
+            "--bytecode",
             "gen_snapshot"
           ]
         },
@@ -3549,8 +3501,8 @@
           "name": "build dart for simarm",
           "script": "tools/build.py",
           "arguments": [
-            "--mode=${mode}",
             "--arch=simarm",
+            "--bytecode",
             "dart_precompiled_runtime",
             "vm_platform"
           ]
diff --git a/tools/bots/try_benchmarks.sh b/tools/bots/try_benchmarks.sh
index aaf6d55..920e30a 100755
--- a/tools/bots/try_benchmarks.sh
+++ b/tools/bots/try_benchmarks.sh
@@ -75,8 +75,7 @@
     rm -f linux-x64_profile.tar.gz
   elif [ "$command" = linux-ia32-build ]; then
     # NOTE: These are duplicated in tools/bots/test_matrix.json, keep in sync.
-    ./tools/build.py --mode=release --arch=ia32 create_sdk
-    ./tools/build.py --mode=release --arch=ia32 runtime
+    ./tools/build.py --mode=release --arch=ia32 create_sdk runtime kernel-service.dart.snapshot
   elif [ "$command" = linux-ia32-archive ]; then
     strip -w \
       -K 'kDartVmSnapshotData' \
@@ -151,6 +150,7 @@
       out/ReleaseIA32/dart \
       out/ReleaseIA32/gen_snapshot \
       out/ReleaseIA32/gen_kernel_bytecode.dill \
+      out/ReleaseIA32/kernel-service.dart.snapshot \
       out/ReleaseIA32/run_vm_tests \
       sdk \
       samples-dev/swarm \
@@ -174,36 +174,34 @@
 }
 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 --sound-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/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot InitialRSS
+    out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable InitialRSS
+    out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot GenKernelKernelLoadKernel
+    out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable GenKernelKernelLoadKernel
+    out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot KernelServiceCompileAll
+    out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable KernelServiceCompileAll
+    out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot UseDartApi
+    out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable UseDartApi
     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 --sound-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 --sound-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 --sound-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 --sound-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
+    out/ReleaseIA32/dart --sound-null-safety --enable-experiment=non-nullable benchmarks/FfiStruct/dart/FfiStruct.dart
     cd ..
     rm -rf tmp
   elif [ "$command" = linux-x64-build ]; then
     # NOTE: These are duplicated in tools/bots/test_matrix.json, keep in sync.
-    ./tools/build.py --mode=release --arch=x64 create_sdk
-    ./tools/build.py --mode=release --arch=x64 runtime
-    ./tools/build.py --mode=release --arch=x64 gen_snapshot
-    ./tools/build.py --mode=release --arch=x64 dart_precompiled_runtime
+    ./tools/build.py --mode=release --arch=x64 create_sdk runtime gen_snapshot dart_precompiled_runtime kernel-service.dart.snapshot dartdevc_test
   elif [ "$command" = linux-x64-archive ]; then
     strip -w \
       -K 'kDartVmSnapshotData' \
@@ -296,10 +294,15 @@
       out/ReleaseX64/dart \
       out/ReleaseX64/gen_snapshot \
       out/ReleaseX64/gen_kernel_bytecode.dill \
+      out/ReleaseX64/kernel-service.dart.snapshot \
       out/ReleaseX64/run_vm_tests \
       third_party/d8/linux/x64 \
       third_party/firefox_jsshell/linux/ \
       out/ReleaseX64/dart_precompiled_runtime \
+      out/ReleaseX64/gen/utils/dartdevc/kernel/ \
+      out/ReleaseX64/ddc_outline.dill \
+      out/ReleaseX64/gen/utils/dartdevc/sound/ \
+      out/ReleaseX64/ddc_outline_sound.dill \
       sdk \
       samples-dev/swarm \
       third_party/pkg \
@@ -322,11 +325,11 @@
 }
 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
+    out/ReleaseX64/dart --sound-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
+    DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/precompiler2 --sound-null-safety --enable-experiment=non-nullable --packages=.packages hello.dart blob.bin
+    DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/dart_precompiled_runtime2 --profile-period=10000 blob.bin
     out/ReleaseX64/dart --profile-period=10000 --packages=.packages --optimization-counter-threshold=-1 hello.dart
     out/ReleaseX64/dart-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
@@ -342,26 +345,29 @@
     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
     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
+    out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 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 hello.dart
+    out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --enable-experiment=non-nullable --sound-null-safety --debug hello.dart
+    out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --enable-experiment=non-nullable --sound-null-safety --debug --mode=compile --compile-vm-options=--print-metrics --packages=.packages --out out.js hello.dart
     out/ReleaseX64/dart pkg/front_end/tool/perf.dart parse hello.dart
     out/ReleaseX64/dart pkg/front_end/tool/perf.dart scan hello.dart
     out/ReleaseX64/dart pkg/front_end/tool/fasta_perf.dart kernel_gen_e2e hello.dart
     out/ReleaseX64/dart pkg/front_end/tool/fasta_perf.dart scan hello.dart
-    out/ReleaseX64/dart pkg/analysis_server/benchmark/benchmarks.dart run --quick --repeat 1 analysis-server-cold
-    out/ReleaseX64/dart --print_metrics pkg/analyzer_cli/bin/analyzer.dart --dart-sdk=sdk hello.dart
+    out/ReleaseX64/dart-sdk/bin/dart pkg/analysis_server/benchmark/benchmarks.dart run --quick --repeat 1 analysis-server-cold
     echo '[{"name":"foo","edits":[["pkg/compiler/lib/src/dart2js.dart","2016","2017"],["pkg/compiler/lib/src/options.dart","2016","2017"]]}]' > appjit_train_edits.json
     out/ReleaseX64/dart --background-compilation=false --snapshot-kind=app-jit --snapshot=pkg/front_end/tool/incremental_perf.dart.appjit pkg/front_end/tool/incremental_perf.dart --target=vm --sdk-summary=out/ReleaseX64/vm_platform_strong.dill --sdk-library-specification=sdk/lib/libraries.json pkg/compiler/lib/src/dart2js.dart appjit_train_edits.json
     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/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot InitialRSS
+    out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable InitialRSS
+    out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot GenKernelKernelLoadKernel
+    out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable GenKernelKernelLoadKernel
+    out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot KernelServiceCompileAll
+    out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable KernelServiceCompileAll
+    out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot UseDartApi
+    out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable UseDartApi
     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
+    out/ReleaseX64/dart --sound-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/bots/update_blamelists.dart b/tools/bots/update_blamelists.dart
new file mode 100644
index 0000000..3fb3c9d
--- /dev/null
+++ b/tools/bots/update_blamelists.dart
@@ -0,0 +1,188 @@
+// 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 script is used by the bisection mechanism to update the blamelists
+// of active, non-approved failures which include the commit of the current
+// bisection build.
+
+import 'dart:io';
+
+import 'package:args/args.dart';
+
+import 'lib/src/firestore.dart';
+import 'package:test_runner/bot_results.dart';
+
+const newTest = 'new test';
+const skippedTest = 'skipped';
+
+const maxAttempts = 20;
+
+FirestoreDatabase database;
+
+class ResultRecord {
+  final data;
+
+  ResultRecord(this.data);
+
+  Map field(String name) => data['fields'][name];
+
+  int get blamelistStartIndex {
+    return int.parse(field('blamelist_start_index')['integerValue']);
+  }
+
+  void set blamelistStartIndex(int index) {
+    field('blamelist_start_index')['integerValue'] = '$index';
+  }
+
+  int get blamelistEndIndex {
+    return int.parse(field('blamelist_end_index')['integerValue']);
+  }
+
+  String get result => field('result')['stringValue'];
+
+  String get previousResult => field('previous_result')['stringValue'];
+
+  String get name => field('name')['stringValue'];
+
+  String get updateTime => data['updateTime'];
+}
+
+Query unapprovedActiveFailuresQuery(String configuration) {
+  return Query(
+      'results',
+      CompositeFilter('AND', [
+        Field('approved').equals(Value.boolean(false)),
+        // TODO(karlklose): also search for inactive failures?
+        Field('active_configurations').contains(Value.string(configuration)),
+        // TODO(karlklose): add index to check for blamelist_start_index < ?
+      ]));
+}
+
+Future<int> getCommitIndex(String commit) async {
+  try {
+    Map document = await database.getDocument('commits', commit);
+    var index = document['fields']['index'];
+    if (index['integerValue'] == null) {
+      throw Exception('Expected an integer, but got "$index"');
+    }
+    return int.parse(index['integerValue']);
+  } catch (exception) {
+    print('Could not retrieve index for commit "$commit".\n');
+    rethrow;
+  }
+}
+
+/// Compute if the record should be updated based on the outcomes in the
+/// result record and the new test result.
+bool shouldUpdateRecord(ResultRecord resultRecord, Result testResult) {
+  if (testResult == null || !testResult.matches) {
+    return false;
+  }
+  var baseline = testResult.expectation.toLowerCase();
+  if (resultRecord.previousResult.toLowerCase() != baseline) {
+    // Currently we only support the case where a bisection run improves the
+    // accuracy of a "Green" -> "Red" result record.
+    return false;
+  }
+  if (resultRecord.result.toLowerCase() == newTest ||
+      resultRecord.result.toLowerCase() == skippedTest) {
+    // Skipped tests are often configuration dependent, so it could be wrong
+    // to generalize their effect for the result record to different
+    // configurations.
+    return false;
+  }
+  return true;
+}
+
+void updateBlameLists(
+    String configuration, String commit, Map<String, Map> testResults) async {
+  int commitIndex = await getCommitIndex(commit);
+  var query = unapprovedActiveFailuresQuery(configuration);
+  bool needsRetry;
+  int attempts = 0;
+  do {
+    needsRetry = false;
+    var documents = (await database.runQuery(query))
+        .where((result) => result['document'] != null)
+        .map((result) => result['document']['name']);
+    for (var documentPath in documents) {
+      await database.beginTransaction();
+      var documentName = documentPath.split('/').last;
+      var result =
+          ResultRecord(await database.getDocument('results', documentName));
+      if (commitIndex < result.blamelistStartIndex ||
+          commitIndex >= result.blamelistEndIndex) {
+        continue;
+      }
+      String name = result.name;
+      var testResultData = testResults['$configuration:$name'];
+      var testResult =
+          testResultData != null ? Result.fromMap(testResultData) : null;
+      if (!shouldUpdateRecord(result, testResult)) {
+        continue;
+      }
+      print('Found result record: $configuration:${result.name}: '
+          '${result.previousResult} -> ${result.result} '
+          'in ${result.blamelistStartIndex}..${result.blamelistEndIndex} '
+          'to update with ${testResult.outcome} at $commitIndex.');
+      // We found a result representation for this test and configuration whose
+      // blamelist includes this results' commit but whose outcome is different
+      // then the outcome in the provided test results.
+      // This means that this commit should not be part of the result
+      // representation and we can update the lower bound of the commit range
+      // and the previous result.
+      var newStartIndex = commitIndex + 1;
+      if (newStartIndex > result.blamelistEndIndex) {
+        print('internal error: inconsistent results; skipping results entry');
+        continue;
+      }
+      result.blamelistStartIndex = newStartIndex;
+      var updateIndex = Update(['blamelist_start_index'], result.data);
+      if (!await database.commit([updateIndex])) {
+        // Commiting the change to the database had a conflict, retry.
+        needsRetry = true;
+        if (++attempts == maxAttempts) {
+          throw Exception('Exceeded maximum retry attempts ($maxAttempts).');
+        }
+        print('Transaction failed, trying again!');
+      }
+    }
+  } while (needsRetry);
+}
+
+main(List<String> arguments) async {
+  var parser = ArgParser()
+    ..addOption('auth-token',
+        abbr: 'a',
+        help: 'path to a file containing the gcloud auth token (required)')
+    ..addOption('results',
+        abbr: 'r',
+        help: 'path to a file containing the test results (required)')
+    ..addFlag('staging',
+        abbr: 's',
+        help: 'use staging database',
+        defaultsTo: true,
+        negatable: true);
+  var options = parser.parse(arguments);
+  if (options.rest.isNotEmpty ||
+      options['results'] == null ||
+      options['auth-token'] == null) {
+    print(parser.usage);
+    exit(1);
+  }
+  var results = await loadResultsMap(options['results']);
+  if (results.isEmpty) {
+    print("No test results provided, nothing to update.");
+    return;
+  }
+  // Pick an arbitrary result entry to find configuration and commit hash.
+  var firstResult = Result.fromMap(results.values.first);
+  var commit = firstResult.commitHash;
+  var configuration = firstResult.configuration;
+  var project = options['staging'] ? 'dart-ci-staging' : 'dart-ci';
+  database = FirestoreDatabase(
+      project, await readGcloudAuthToken(options['auth-token']));
+  await updateBlameLists(configuration, commit, results);
+  database.closeClient();
+}
diff --git a/tools/bots/update_flakiness.dart b/tools/bots/update_flakiness.dart
index abf1aa8..71bf402 100755
--- a/tools/bots/update_flakiness.dart
+++ b/tools/bots/update_flakiness.dart
@@ -10,7 +10,7 @@
 
 import 'package:args/args.dart';
 
-import 'results.dart';
+import 'package:test_runner/bot_results.dart';
 
 main(List<String> args) async {
   final parser = new ArgParser();
diff --git a/tools/build.py b/tools/build.py
index 6321be1..6b78ddc 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -4,16 +4,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 argparse
 import io
 import json
 import multiprocessing
-import optparse
 import os
 import subprocess
 import sys
 import time
 import utils
 
+import gn as gn_py
+
 HOST_OS = utils.GuessOS()
 HOST_CPUS = utils.GuessCpus()
 SCRIPT_DIR = os.path.dirname(sys.argv[0])
@@ -26,128 +28,36 @@
 This script invokes ninja to build Dart.
 """
 
-
 def BuildOptions():
-    result = optparse.OptionParser(usage=usage)
-    result.add_option(
-        "-a",
-        "--arch",
-        help='Target architectures (comma-separated).',
-        metavar='[all,' + ','.join(AVAILABLE_ARCHS) + ']',
-        default=utils.GuessArchitecture())
-    result.add_option(
-        "-b",
-        "--bytecode",
-        help='Build with the kernel bytecode interpreter. DEPRECATED.',
-        default=False,
-        action='store_true')
-    result.add_option(
-        "-j", type=int, help='Ninja -j option for Goma builds.', default=1000)
-    result.add_option(
-        "-l", type=int, help='Ninja -l option for Goma builds.', default=64)
-    result.add_option(
-        "-m",
-        "--mode",
-        help='Build variants (comma-separated).',
-        metavar='[all,debug,release,product]',
-        default='debug')
-    result.add_option(
-        "--no-start-goma",
-        help="Don't try to start goma",
-        default=False,
-        action='store_true')
-    result.add_option(
-        "--os",
-        help='Target OSs (comma-separated).',
-        metavar='[all,host,android,fuchsia]',
-        default='host')
-    result.add_option(
-        "--sanitizer",
-        type=str,
-        help='Build variants (comma-separated).',
-        metavar='[all,none,asan,lsan,msan,tsan,ubsan]',
-        default='none')
-    result.add_option(
-        "-v",
-        "--verbose",
-        help='Verbose output.',
-        default=False,
-        action="store_true")
-    return result
+    parser = argparse.ArgumentParser(
+        description='Runs GN (if ncecessary) followed by ninja',
+        formatter_class=argparse.ArgumentDefaultsHelpFormatter)
 
+    config_group = parser.add_argument_group('Configuration Related Arguments')
+    gn_py.AddCommonConfigurationArgs(config_group)
 
-def ProcessOsOption(os_name):
-    if os_name == 'host':
-        return HOST_OS
-    return os_name
+    gn_group = parser.add_argument_group('GN Related Arguments')
+    gn_py.AddCommonGnOptionArgs(gn_group)
 
+    other_group = parser.add_argument_group('Other Arguments')
+    gn_py.AddOtherArgs(other_group)
 
-def ProcessOptions(options, args):
-    if options.arch == 'all':
-        options.arch = 'ia32,x64,simarm,simarm64'
-    if options.mode == 'all':
-        options.mode = 'debug,release,product'
-    if options.os == 'all':
-        options.os = 'host,android,fuchsia'
-    if options.sanitizer == 'all':
-        options.sanitizer = 'none,asan,lsan,msan,tsan,ubsan'
-    options.mode = options.mode.split(',')
-    options.arch = options.arch.split(',')
-    options.os = options.os.split(',')
-    options.sanitizer = options.sanitizer.split(',')
-    for mode in options.mode:
-        if not mode in ['debug', 'release', 'product']:
-            print("Unknown mode %s" % mode)
-            return False
-    for i, arch in enumerate(options.arch):
-        if not arch in AVAILABLE_ARCHS:
-            # Normalise to lower case form to make it less case-picky.
-            arch_lower = arch.lower()
-            if arch_lower in AVAILABLE_ARCHS:
-                options.arch[i] = arch_lower
-                continue
-            print("Unknown arch %s" % arch)
-            return False
-    options.os = [ProcessOsOption(os_name) for os_name in options.os]
-    for os_name in options.os:
-        if not os_name in [
-                'android', 'freebsd', 'linux', 'macos', 'win32', 'fuchsia'
-        ]:
-            print("Unknown os %s" % os_name)
-            return False
-        if os_name == 'android':
-            if not HOST_OS in ['linux', 'macos']:
-                print("Cross-compilation to %s is not supported on host os %s."
-                      % (os_name, HOST_OS))
-                return False
-            if not arch in [
-                    'ia32', 'x64', 'arm', 'arm_x64', 'armv6', 'arm64'
-            ]:
-                print(
-                    "Cross-compilation to %s is not supported for architecture %s."
-                    % (os_name, arch))
-                return False
-            # We have not yet tweaked the v8 dart build to work with the Android
-            # NDK/SDK, so don't try to build it.
-            if not args:
-                print(
-                    "For android builds you must specify a target, such as 'runtime'."
-                )
-                return False
-        elif os_name == 'fuchsia':
-            if HOST_OS != 'linux':
-                print("Cross-compilation to %s is not supported on host os %s."
-                      % (os_name, HOST_OS))
-                return False
-            if arch != 'x64':
-                print(
-                    "Cross-compilation to %s is not supported for architecture %s."
-                    % (os_name, arch))
-                return False
-        elif os_name != HOST_OS:
-            print("Unsupported target os %s" % os_name)
-            return False
-    return True
+    other_group.add_argument("-j",
+                             type=int,
+                             help='Ninja -j option for Goma builds.',
+                             default=1000)
+    other_group.add_argument("-l",
+                             type=int,
+                             help='Ninja -l option for Goma builds.',
+                             default=64)
+    other_group.add_argument("--no-start-goma",
+                             help="Don't try to start goma",
+                             default=False,
+                             action='store_true')
+
+    parser.add_argument('build_targets', nargs='*')
+
+    return parser
 
 
 def NotifyBuildDone(build_config, success, start):
@@ -205,49 +115,6 @@
         # Ignore return code, if this command fails, it doesn't matter.
         os.system(command)
 
-
-def GenerateBuildfilesIfNeeded():
-    if os.path.exists(utils.GetBuildDir(HOST_OS)):
-        return True
-    command = [
-        'python',
-        os.path.join(DART_ROOT, 'tools', 'generate_buildfiles.py')
-    ]
-    print("Running " + ' '.join(command))
-    process = subprocess.Popen(command)
-    process.wait()
-    if process.returncode != 0:
-        print("Tried to generate missing buildfiles, but failed. "
-              "Try running manually:\n\t$ " + ' '.join(command))
-        return False
-    return True
-
-
-def RunGNIfNeeded(out_dir, target_os, mode, arch, sanitizer):
-    if os.path.isfile(os.path.join(out_dir, 'args.gn')):
-        return
-    gn_os = 'host' if target_os == HOST_OS else target_os
-    gn_command = [
-        'python',
-        os.path.join(DART_ROOT, 'tools', 'gn.py'),
-        '--sanitizer',
-        sanitizer,
-        '-m',
-        mode,
-        '-a',
-        arch,
-        '--os',
-        gn_os,
-        '-v',
-    ]
-
-    process = subprocess.Popen(gn_command)
-    process.wait()
-    if process.returncode != 0:
-        print("Tried to run GN, but it failed. Try running it manually: \n\t$ "
-              + ' '.join(gn_command))
-
-
 def UseGoma(out_dir):
     args_gn = os.path.join(out_dir, 'args.gn')
     return 'use_goma = true' in open(args_gn, 'r').read()
@@ -296,9 +163,6 @@
     build_config = utils.GetBuildConf(mode, arch, target_os, sanitizer)
     out_dir = utils.GetBuildRoot(HOST_OS, mode, arch, target_os, sanitizer)
     using_goma = False
-    # TODO(zra): Remove auto-run of gn, replace with prompt for user to run
-    # gn.py manually.
-    RunGNIfNeeded(out_dir, target_os, mode, arch, sanitizer)
     command = ['ninja', '-C', out_dir]
     if options.verbose:
         command += ['-v']
@@ -362,17 +226,14 @@
     starttime = time.time()
     # Parse the options.
     parser = BuildOptions()
-    (options, args) = parser.parse_args()
-    if not ProcessOptions(options, args):
-        parser.print_help()
-        return 1
-    # Determine which targets to build. By default we build the "all" target.
-    if len(args) == 0:
-        targets = ['all']
-    else:
-        targets = args
+    options = parser.parse_args()
 
-    if not GenerateBuildfilesIfNeeded():
+    targets = options.build_targets
+    if len(targets) == 0:
+        targets = ['all']
+
+    if not gn_py.ProcessOptions(options):
+        parser.print_help()
         return 1
 
     # If binaries are built with sanitizers we should use those flags.
@@ -381,6 +242,9 @@
     env = dict(os.environ)
     env.update(SanitizerEnvironmentVariables())
 
+    # Always run GN before building.
+    gn_py.RunGnOnConfiguredConfigurations(options)
+
     # Build all targets for each requested configuration.
     configs = []
     for target_os in options.os:
diff --git a/tools/dom/scripts/css_code_generator.py b/tools/dom/scripts/css_code_generator.py
index 2d7ac7b..9b5ccc5 100644
--- a/tools/dom/scripts/css_code_generator.py
+++ b/tools/dom/scripts/css_code_generator.py
@@ -17,6 +17,7 @@
 
 # These are the properties that are supported on all Dart project supported
 # browsers as camelCased names on the CssStyleDeclaration.
+# Note that we do not use the MDN for compatibility info here.
 BROWSER_PATHS = [
     'cssProperties.CSS21.txt',  # Remove when we have samples from all browsers.
     'cssProperties.ie9.txt',
diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
index f7797fd..08c65a8 100644
--- a/tools/dom/scripts/htmldartgenerator.py
+++ b/tools/dom/scripts/htmldartgenerator.py
@@ -16,6 +16,7 @@
     removed_html_members
 from generator import TypeOrVar
 import logging
+from mdnreader import MDNReader
 import monitored
 import sys
 
@@ -49,6 +50,7 @@
         self._renamer = options.renamer
         self._metadata = options.metadata
         self._library_name = self._renamer.GetLibraryName(self._interface)
+        self._mdn_reader = MDNReader()
         _logger.setLevel(logger.level)
 
     def EmitSupportCheck(self):
@@ -318,10 +320,7 @@
             attribute.type.nullable = True
 
         if declare_only:
-            self.DeclareAttribute(attribute,
-                                  self.SecureOutputType(attribute.type.id,
-                                    nullable=attribute.type.nullable),
-                                  attr_name, read_only)
+            self.DeclareAttribute(attribute, attr_name, read_only)
         else:
             self.EmitAttribute(attribute, attr_name, read_only)
 
@@ -824,7 +823,7 @@
                 'throw new UnsupportedError("Not supported"); }\n',
                 CLASSNAME=self._interface_type_info.implementation_name())
 
-    def DeclareAttribute(self, attribute, type_name, attr_name, read_only):
+    def DeclareAttribute(self, attribute, attr_name, read_only):
         """ Declares an attribute but does not include the code to invoke it.
     """
         if read_only:
@@ -837,9 +836,16 @@
                 template = '\n  $TYPE get $NAME;\n'
         else:
             template = '\n  $TYPE get $NAME native;\n' \
-                       '\n  void set $NAME native;\n'
+                       '\n  set $NAME($TYPE value) native;\n'
 
-        self._members_emitter.Emit(template, NAME=attr_name, TYPE=type_name)
+        # Nullability is determined by attribute compatibility.
+        is_compat = self._mdn_reader.is_compatible(attribute)
+        nullable = attribute.type.nullable or not is_compat
+
+        self._members_emitter.Emit(template,
+                                   NAME=attr_name,
+                                   TYPE=self.SecureOutputType(
+                                       attribute.type.id, nullable=nullable))
 
     def DeclareOperation(self, operation, return_type_name, method_name):
         """ Declares an operation but does not include the code to invoke it.
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index 623f5e9..014e811 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -387,7 +387,6 @@
         # Not prefixed but requires custom implementation for cross-browser compatibility.
         'Document.visibilityState',
         'Element.animate',
-        'Element.children',
         'Element.childElementCount',
         'Element.firstElementChild',
         'Element.getClientRects',
@@ -791,6 +790,7 @@
         'DOMException.WRONG_DOCUMENT_ERR',
         'Element.accessKey',
         'Element.append',
+        'Element.children',
         'Element.dataset',
         'Element.get:classList',
         'Element.getAttributeNode',
diff --git a/tools/dom/scripts/idlnode.py b/tools/dom/scripts/idlnode.py
index 6ce89a5..475b759 100644
--- a/tools/dom/scripts/idlnode.py
+++ b/tools/dom/scripts/idlnode.py
@@ -55,7 +55,6 @@
     '__delete__': "Deleter",
 }
 
-
 class IDLNode(object):
     """Base class for all IDL elements.
   IDLNode may contain various child nodes, and have properties. Examples
@@ -825,7 +824,7 @@
        void forEach(any callback, optional any thisArg);
        boolean has(FontFace fontFace);
        boolean has(FontFace fontFace);
-  
+
   if setlike is not read-only these operations are generated:
 
            FontFaceSet add(FontFace value);
@@ -837,10 +836,10 @@
   Need to create a typedef for a function callback e.g.,
   a setlike will need a callback that has the proper args in FontFaceSet that is
   three arguments, etc.
-  
+
       typedef void FontFaceSetForEachCallback(
         FontFace fontFace, FontFace fontFaceAgain, FontFaceSet set);
-    
+
       void forEach(FontFaceSetForEachCallback callback, [Object thisArg]);
   """
     callback_name = '%sForEachCallback' % interface.id
@@ -1046,7 +1045,6 @@
             a.type for a in operation.arguments
         ]
 
-
 class IDLAttribute(IDLMember):
     """IDLNode specialization for 'attribute type name' declarations."""
 
diff --git a/tools/dom/scripts/mdnreader.py b/tools/dom/scripts/mdnreader.py
new file mode 100644
index 0000000..b748d1f
--- /dev/null
+++ b/tools/dom/scripts/mdnreader.py
@@ -0,0 +1,189 @@
+#!/usr/bin/python
+# 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 json
+import os.path
+import sys
+
+
+def _get_browser_compat_data():
+    current_dir = os.path.dirname(__file__)
+
+    browser_compat_folder = os.path.abspath(
+        os.path.join(current_dir, '..', '..', '..', 'third_party', 'mdn',
+                     'browser-compat-data', 'src'))
+
+    if not os.path.exists(browser_compat_folder):
+        raise RuntimeError('Browser compatibility data not found at %s' %
+                           browser_compat_folder)
+
+    browser_compat_data = {}
+
+    INCLUDE_DIRS = [
+        'api',
+        'html',
+        'svg',
+        # TODO(srujzs): add more if needed
+    ]
+
+    # Transform to absolute paths
+    INCLUDE_DIRS = [
+        os.path.join(browser_compat_folder, dir) for dir in INCLUDE_DIRS
+    ]
+
+    def process_json_dict(json_dict):
+        # Returns a tuple of the interface name and the metadata corresponding
+        # to it.
+        if 'api' in json_dict:
+            # Get the interface name
+            api_dict = json_dict['api']
+            interface_name = api_dict.keys()[0]
+            return (interface_name, api_dict[interface_name])
+        elif 'html' in json_dict:
+            html_dict = json_dict['html']
+            if 'elements' in html_dict:
+                elements_dict = html_dict['elements']
+                element_name = elements_dict.keys()[0]
+                # Convert to WebCore name
+                interface = str('HTML' + element_name + 'Element')
+                return (interface, elements_dict[element_name])
+        elif 'svg' in json_dict:
+            svg_dict = json_dict['svg']
+            if 'elements' in svg_dict:
+                elements_dict = svg_dict['elements']
+                element_name = elements_dict.keys()[0]
+                # Convert to WebCore name
+                interface = str('SVG' + element_name + 'Element')
+                return (interface, elements_dict[element_name])
+        return (None, None)
+
+    def visitor(arg, dir_path, names):
+
+        def should_process_dir(dir_path):
+            if os.path.abspath(dir_path) == browser_compat_folder:
+                return True
+            for dir in INCLUDE_DIRS:
+                if dir_path.startswith(dir):
+                    return True
+            return False
+
+        if should_process_dir(dir_path):
+            for name in names:
+                file_name = os.path.join(dir_path, name)
+                (interface_path, ext) = os.path.splitext(file_name)
+                if ext == '.json':
+                    with open(file_name) as src:
+                        json_dict = json.load(src)
+                        interface, metadata = process_json_dict(json_dict)
+                        if not interface is None:
+                            # Note: interface and member names do not
+                            # necessarily have the same capitalization as
+                            # WebCore, so we keep them all lowercase for easier
+                            # matching later.
+                            interface = interface.lower()
+                            metadata = {
+                                member.lower(): info
+                                for member, info in metadata.items()
+                            }
+
+                            if interface in browser_compat_data:
+                                browser_compat_data[interface].update(metadata)
+                            else:
+                                browser_compat_data[interface] = metadata
+        else:
+            names[:] = []  # Do not go underneath
+
+    os.path.walk(browser_compat_folder, visitor, browser_compat_folder)
+
+    return browser_compat_data
+
+
+class MDNReader(object):
+    # Statically initialize and treat as constant.
+    _BROWSER_COMPAT_DATA = _get_browser_compat_data()
+
+    def __init__(self):
+        self._compat_overrides = {}
+
+    def _get_attr_compatibility(self, compat_data):
+        # Parse schema syntax of MDN data:
+        # https://github.com/mdn/browser-compat-data/blob/master/schemas/compat-data.schema.json
+
+        # For now, we will require support for browsers since the last IDL roll.
+        # TODO(srujzs): Determine if this is too conservative.
+        browser_version_map = {
+            'chrome': 63,
+            'firefox': 57,
+            'safari': 11,
+            # We still support the latest version of IE.
+            'ie': 11,
+            'opera': 50,
+        }
+        version_key = 'version_added'
+        for browser in browser_version_map.keys():
+            support_data = compat_data['support']
+            if browser not in support_data:
+                return False
+            support_statement = support_data[browser]
+            if isinstance(support_statement, list):  # array_support_statement
+                # TODO(srujzs): Parse this list to determine compatibility. Will
+                # likely require parsing for 'version_removed' keys. Notes about
+                # which browser version enabled this attribute for which
+                # platform also complicates things. For now, we assume it's not
+                # compatible.
+                return False
+            if len(support_statement.keys()) > 1:
+                # If it's anything more complicated than 'version_added', like
+                # 'notes' that specify platform versions, we assume it's not
+                # compatible.
+                return False
+            version = support_statement[version_key]
+            if not version or browser_version_map[browser] < float(version):
+                # simple_support_statement
+                return False
+            # If the attribute is experimental, we assume it's not compatible.
+            status_data = compat_data['status']
+            experimental_key = 'experimental'
+            if experimental_key in status_data and \
+                status_data[experimental_key]:
+                return False
+        return True
+
+    def is_compatible(self, attribute):
+        # Since capitalization isn't consistent across MDN and WebCore, we
+        # compare lowercase equivalents for interface and attribute names.
+        interface = attribute.doc_js_interface_name.lower()
+        if interface in self._BROWSER_COMPAT_DATA and attribute.id and len(
+                attribute.id) > 0:
+            interface_dict = self._BROWSER_COMPAT_DATA[interface]
+            id_name = attribute.id.lower()
+            secure_context_key = 'isSecureContext'
+            if interface in self._compat_overrides and id_name in self._compat_overrides[
+                    interface]:
+                return self._compat_overrides[interface][id_name]
+            elif secure_context_key in interface_dict:
+                # If the interface requires a secure context, all attributes are
+                # implicitly incompatible.
+                return False
+            elif id_name in interface_dict:
+                id_data = interface_dict[id_name]
+                return self._get_attr_compatibility(id_data['__compat'])
+            else:
+                # Might be an attribute that is defined in a parent interface.
+                # We defer until attribute emitting to determine if this is the
+                # case. Otherwise, return None.
+                pass
+        return None
+
+    def set_compatible(self, attribute, compatible):
+        # Override value in the MDN browser compatibility data.
+        if not compatible in [True, False, None]:
+            raise ValueError('Cannot set a non-boolean object for compatible')
+        interface = attribute.doc_js_interface_name.lower()
+        if not interface in self._compat_overrides:
+            self._compat_overrides[interface] = {}
+        if attribute.id and len(attribute.id) > 0:
+            id_name = attribute.id.lower()
+            self._compat_overrides[interface][id_name] = compatible
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index 5948de3..0761fe6 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -1141,6 +1141,22 @@
         return promise_attributes[interface_operation]
     return None
 
+# Compatibility is used to help determine attribute nullability i.e. if the
+# attribute is not compatible across all browsers, the getter/setter is marked
+# as nullable. There are cases where the attribute belongs to a class that
+# implements an interface whose methods are not in the IDL, however.
+# Since attribute getters need to match their overridden method declaration,
+# there are conflicts when the overriding method is not compatible, the
+# overriding method is, and they're not already nullable. This dict marks the
+# attributes where there is a conflict that cannot be resolved with code
+# generation or within src/template files.
+compat_conflicts = {
+    # These interfaces implement Rectangle, which is a Dart interface. In order
+    # to match the interface of Rectangle, they must be marked as non-nullable.
+    'DOMRectReadOnly': ['bottom', 'height', 'left', 'right', 'top', 'width'],
+    'DOMRect': ['height', 'width'],
+}
+
 
 class Dart2JSBackend(HtmlDartGenerator):
     """Generates a dart2js class for the dart:html library from a DOM IDL
@@ -1394,6 +1410,8 @@
         metadata = self._Metadata(attribute.type.id, attribute.id, output_type,
             attribute.type.nullable)
 
+        is_compat = self._mdn_reader.is_compatible(attribute)
+
         # If the attribute is shadowing, we can't generate a shadowing
         # getter or setter (Issue 1633).
         # TODO(sra): _FindShadowedAttribute does not take into account the html
@@ -1406,10 +1424,18 @@
          super_attribute_interface) = self._FindShadowedAttribute(attribute)
 
         if super_attribute:
+            if is_compat is None:
+                # If there is no compatibility info on this attribute, we use
+                # the parent attribute's compatibility info.
+                is_compat = self._mdn_reader.is_compatible(super_attribute)
+                self._mdn_reader.set_compatible(attribute, is_compat)
             if read_only or self._SafeToIgnoreShadowingMember(html_name):
                 if attribute.type.id == super_attribute.type.id:
                     # Compatible attribute, use the superclass property.  This
                     # works because JavaScript will do its own dynamic dispatch.
+
+                    # Nullability is determined by attribute compatibility.
+                    nullable = not is_compat or attribute.type.nullable
                     self._members_emitter.Emit(
                         '\n'
                         '  // Use implementation from $SUPER.\n'
@@ -1419,10 +1445,10 @@
                         NAME=html_name,
                         GET_TYPE=self.SecureOutputType(attribute.type.id,
                             can_narrow_type=read_only,
-                            nullable=attribute.type.nullable),
+                            nullable=nullable),
                         SET_TYPE=self.SecureOutputType(attribute.type.id,
                             can_narrow_type=read_only,
-                            nullable=attribute.type.nullable or \
+                            nullable=nullable or \
                                 'TreatNullAs' in attribute.ext_attrs))
                     return
             self._members_emitter.Emit('\n  // Shadowing definition.')
@@ -1452,7 +1478,7 @@
             return
 
         input_type = self._NarrowInputType(attribute.type.id)
-        if attribute.type.nullable:
+        if attribute.type.nullable or not is_compat:
             input_type += '?'
         if not read_only:
             if attribute.type.id == 'Promise':
@@ -1519,6 +1545,20 @@
                     self._AddAttributeUsingProperties(attribute, html_name,
                         read_only, rename, metadata)
 
+    def _IsACompatibilityConflict(self, interface, attr):
+        if interface in compat_conflicts and attr.id in compat_conflicts[
+                interface]:
+            is_compat = self._mdn_reader.is_compatible(attr)
+            if is_compat or attr.type.nullable:
+                # Only attributes that are not compatible and not nullable
+                # belong in this list.
+                raise ValueError(
+                    interface + '.' + attr.id +
+                    ' has no conflict between compatibility and nullability.')
+            else:
+                return True
+        return False
+
     def _AddAttributeUsingProperties(self, attribute, html_name, read_only,
                                      rename=None, metadata=None):
         self._AddRenamingGetter(attribute, html_name, rename, metadata)
@@ -1530,18 +1570,38 @@
         conversion = self._OutputConversion(attr.type.id, attr.id)
         if conversion:
             return self._AddConvertingGetter(attr, html_name, conversion)
+        # If the attribute is incompatible, it must be marked nullable.
+        is_compat = self._mdn_reader.is_compatible(attr)
         return_type = self.SecureOutputType(attr.type.id,
-            nullable=attr.type.nullable)
-        self._members_emitter.Emit(
-            '\n  $RENAME'
-            '\n  $METADATA'
-            '\n  $STATIC $TYPE get $HTML_NAME native;'
-            '\n',
-            RENAME=rename if rename else '',
-            METADATA=metadata if metadata else '',
-            HTML_NAME=html_name,
-            STATIC='static' if attr.is_static else '',
-            TYPE=return_type)
+                                            nullable=(not is_compat) or
+                                            attr.type.nullable)
+        native_type = self._NarrowToImplementationType(attr.type.id)
+        non_null_return_type = self.SecureOutputType(attr.type.id,
+                                                     nullable=False)
+        if self._IsACompatibilityConflict(self._interface.id, attr):
+            if not rename:
+                rename = '@JSName(\'%s\')' % html_name
+            template = """\n
+                // The following getter is incompatible with some browsers but
+                // must be made non-nullable to match the overridden method.
+                \n  $RENAME
+                \n  $METADATA
+                \n  $STATIC $TYPE get _$HTML_NAME native;
+                \n
+                \n  $STATIC $NONNULLTYPE get $HTML_NAME => _$HTML_NAME$NULLASSERT;"""
+        else:
+            template = """\n  $RENAME
+                \n  $METADATA
+                \n  $STATIC $TYPE get $HTML_NAME native;
+                \n"""
+        self._members_emitter.Emit(template,
+                                   RENAME=rename if rename else '',
+                                   METADATA=metadata if metadata else '',
+                                   HTML_NAME=html_name,
+                                   STATIC='static' if attr.is_static else '',
+                                   TYPE=return_type,
+                                   NULLASSERT='!',
+                                   NONNULLTYPE=non_null_return_type)
 
     def _AddRenamingSetter(self, attr, html_name, rename):
         conversion = self._InputConversion(attr.type.id, attr.id)
@@ -1552,8 +1612,13 @@
         # converting getter. We need to make sure the setter type matches the
         # getter type.
         conversion = self._OutputConversion(attr.type.id, attr.id)
-        if conversion and conversion.nullable_output:
+        # If the attribute is incompatible, it must be marked nullable.
+        is_compat = self._mdn_reader.is_compatible(attr)
+        if (conversion and conversion.nullable_output) or not is_compat:
             nullable_type = True
+        if self._IsACompatibilityConflict(self._interface.id, attr):
+            # Force non-nullable if it's a manual conflict.
+            nullable_type = False
         self._members_emitter.Emit(
             '\n  $RENAME'
             '\n  $STATIC set $HTML_NAME($TYPE value) native;'
@@ -1564,10 +1629,12 @@
             TYPE=self.SecureOutputType(attr.type.id, nullable=nullable_type))
 
     def _AddConvertingGetter(self, attr, html_name, conversion):
+        # dynamic should not be marked with ?
         nullable_out = conversion.nullable_output and \
             not conversion.output_type == 'dynamic'
-        # If the attribute is nullable, the getter should be nullable.
-        nullable_in = attr.type.nullable and \
+        # Nullability is determined by attribute compatibility.
+        is_compat = self._mdn_reader.is_compatible(attr)
+        nullable_in = (not is_compat or attr.type.nullable) and \
             not conversion.input_type == 'dynamic'
         self._members_emitter.Emit(
             '\n  $(METADATA)$RETURN_TYPE$NULLABLE_OUT get $HTML_NAME => '
@@ -1591,9 +1658,11 @@
                 not conversion.nullable_input else '')
 
     def _AddConvertingSetter(self, attr, html_name, conversion):
+        # If the attribute is incompatible, it must be marked nullable.
+        is_compat = self._mdn_reader.is_compatible(attr)
         # If the attribute is nullable, the setter should be nullable.
-        nullable_in = (attr.type.nullable or 'TreatNullAs' in attr.ext_attrs) \
-            and not conversion.input_type == 'dynamic'
+        nullable_in = ((attr.type.nullable or 'TreatNullAs' in attr.ext_attrs) \
+            and not conversion.input_type == 'dynamic') or not is_compat
         nullable_out = conversion.nullable_output and \
             not conversion.output_type == 'dynamic'
         self._members_emitter.Emit(
diff --git a/tools/dom/src/AttributeMap.dart b/tools/dom/src/AttributeMap.dart
index 88f3bd4..2dfccca 100644
--- a/tools/dom/src/AttributeMap.dart
+++ b/tools/dom/src/AttributeMap.dart
@@ -47,12 +47,12 @@
 
   Iterable<String> get keys {
     // TODO: generate a lazy collection instead.
-    var attributes = _element._attributes;
+    var attributes = _element._attributes!;
     var keys = <String>[];
     for (int i = 0, len = attributes.length; i < len; i++) {
       _Attr attr = attributes[i] as _Attr;
       if (_matches(attr)) {
-        keys.add(attr.name);
+        keys.add(attr.name!);
       }
     }
     return keys;
@@ -60,12 +60,12 @@
 
   Iterable<String> get values {
     // TODO: generate a lazy collection instead.
-    var attributes = _element._attributes;
+    var attributes = _element._attributes!;
     var values = <String>[];
     for (int i = 0, len = attributes.length; i < len; i++) {
       _Attr attr = attributes[i] as _Attr;
       if (_matches(attr)) {
-        values.add(attr.value);
+        values.add(attr.value!);
       }
     }
     return values;
diff --git a/tools/dom/src/CrossFrameTypes.dart b/tools/dom/src/CrossFrameTypes.dart
index 7d210a3..72113cf 100644
--- a/tools/dom/src/CrossFrameTypes.dart
+++ b/tools/dom/src/CrossFrameTypes.dart
@@ -51,8 +51,11 @@
    *     print(window.closed); // 'false'
    *     window.close();
    *     print(window.closed); // 'true'
+   *
+   * MDN does not have compatibility info on this attribute, and therefore is
+   * marked nullable.
    */
-  bool get closed;
+  bool? get closed;
 
   /**
    * A reference to the window that opened this one.
diff --git a/tools/dom/src/Validators.dart b/tools/dom/src/Validators.dart
index a498da9..0c45b8c 100644
--- a/tools/dom/src/Validators.dart
+++ b/tools/dom/src/Validators.dart
@@ -299,7 +299,7 @@
 
     if (element is TemplateElement) {
       TemplateElement template = element;
-      sanitizeTree(template.content);
+      sanitizeTree(template.content!);
     }
   }
 
diff --git a/tools/dom/src/dart2js_KeyEvent.dart b/tools/dom/src/dart2js_KeyEvent.dart
index 422c7ad..368ebf0 100644
--- a/tools/dom/src/dart2js_KeyEvent.dart
+++ b/tools/dom/src/dart2js_KeyEvent.dart
@@ -188,12 +188,12 @@
   static EventStreamProvider<KeyEvent> keyPressEvent =
       new _KeyboardEventHandler('keypress');
 
-  String get code => _parent.code;
+  String get code => _parent.code!;
   /** True if the ctrl key is pressed during this event. */
   bool get ctrlKey => _parent.ctrlKey;
-  int get detail => _parent.detail;
-  bool get isComposing => _parent.isComposing;
-  String get key => _parent.key;
+  int get detail => _parent.detail!;
+  bool get isComposing => _parent.isComposing!;
+  String get key => _parent.key!;
   /**
    * Accessor to the part of the keyboard that the key was pressed from (one of
    * KeyLocation.STANDARD, KeyLocation.RIGHT, KeyLocation.LEFT,
diff --git a/tools/dom/src/dart2js_WrappedEvent.dart b/tools/dom/src/dart2js_WrappedEvent.dart
index dff9e38..e9fb697 100644
--- a/tools/dom/src/dart2js_WrappedEvent.dart
+++ b/tools/dom/src/dart2js_WrappedEvent.dart
@@ -15,11 +15,11 @@
 
   _WrappedEvent(this.wrapped);
 
-  bool get bubbles => wrapped.bubbles;
+  bool get bubbles => wrapped.bubbles!;
 
-  bool get cancelable => wrapped.cancelable;
+  bool get cancelable => wrapped.cancelable!;
 
-  bool get composed => wrapped.composed;
+  bool get composed => wrapped.composed!;
 
   EventTarget? get currentTarget => wrapped.currentTarget;
 
@@ -27,7 +27,7 @@
 
   int get eventPhase => wrapped.eventPhase;
 
-  bool get isTrusted => wrapped.isTrusted;
+  bool get isTrusted => wrapped.isTrusted!;
 
   EventTarget? get target => wrapped.target;
 
diff --git a/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate b/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
index aa5f3e1..db348f6 100644
--- a/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
@@ -67,6 +67,6 @@
 
   int get charCode native;
 
-  int get which => _which;
+  int$NULLABLE get which => _which;
 $!MEMBERS
 }
diff --git a/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate b/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
index d847db4..921abae 100644
--- a/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
@@ -27,7 +27,7 @@
 
   @SupportedBrowser(SupportedBrowser.CHROME)
   @SupportedBrowser(SupportedBrowser.FIREFOX)
-  Point get movement => new Point(_movementX, _movementY);
+  Point get movement => new Point(_movementX$NULLASSERT, _movementY$NULLASSERT);
 
   /**
    * The coordinates of the mouse pointer in target node coordinates.
@@ -55,9 +55,9 @@
 
   Point get screen => new Point(_screenX, _screenY);
 
-  Point get layer => new Point(_layerX, _layerY);
+  Point get layer => new Point(_layerX$NULLASSERT, _layerY$NULLASSERT);
 
-  Point get page => new Point(_pageX, _pageY);
+  Point get page => new Point(_pageX$NULLASSERT, _pageY$NULLASSERT);
 
   DataTransfer get dataTransfer => JS('DataTransfer', "#['dataTransfer']", this);
 
diff --git a/tools/dom/templates/html/impl/impl_DataTransferItem.darttemplate b/tools/dom/templates/html/impl/impl_DataTransferItem.darttemplate
index a74989b..ca64994 100644
--- a/tools/dom/templates/html/impl/impl_DataTransferItem.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DataTransferItem.darttemplate
@@ -9,9 +9,9 @@
   Entry getAsEntry() {
     Entry entry = _webkitGetAsEntry() $#NULLSAFECAST(as Entry);
 
-    if (entry.isFile)
+    if (entry.isFile$NULLASSERT)
       applyExtension('FileEntry', entry);
-    else if (entry.isDirectory)
+    else if (entry.isDirectory$NULLASSERT)
       applyExtension('DirectoryEntry', entry);
     else
       applyExtension('Entry', entry);
diff --git a/tools/dom/templates/html/impl/impl_DirectoryReader.darttemplate b/tools/dom/templates/html/impl/impl_DirectoryReader.darttemplate
index 06eba12..b643159 100644
--- a/tools/dom/templates/html/impl/impl_DirectoryReader.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DirectoryReader.darttemplate
@@ -12,10 +12,10 @@
     _readEntries((values) {
       values.forEach((value) {
         applyExtension('Entry', value);
-        Entry entry = value as Entry;  
-        if (entry.isFile)
+        Entry entry = value as Entry;
+        if (entry.isFile$NULLASSERT)
           applyExtension('FileEntry', entry);
-        else if (entry.isDirectory)
+        else if (entry.isDirectory$NULLASSERT)
           applyExtension('DirectoryEntry', entry);
       });
       completer.complete(new List<Entry>.from(values));
diff --git a/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate b/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate
index 22b74d9..6a219f3 100644
--- a/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate
@@ -60,7 +60,12 @@
   ElementList<T> querySelectorAll<T extends Element>(String selectors) =>
     new _FrozenElementList<T>._wrap(_querySelectorAll(selectors));
 
-  String get innerHtml {
+$if NNBD
+  // innerHtml is marked as nullable, even though it is guaranteed to return a
+  // non-nullable, because ShadowRoot.innerHtml overrides it and can be
+  // incompatible.
+$endif
+  String$NULLABLE get innerHtml {
     final e = new DivElement();
     e.append(this.clone(true));
     return e.innerHtml;
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index bdca7ed..935f5d8 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -46,6 +46,10 @@
   Iterator<Element> get iterator => toList().iterator;
 
   void addAll(Iterable<Element> iterable) {
+    _addAll(_element, iterable);
+  }
+
+  static void _addAll(Element _element, Iterable<Element> iterable) {
     if (iterable is _ChildNodeListLazy) {
       iterable = new List.from(iterable);
     }
@@ -99,6 +103,10 @@
   }
 
   bool remove(Object$NULLABLE object) {
+    return _remove(_element, object);
+  }
+
+  static bool _remove(Element _element, Object$NULLABLE object) {
     if (object is Element) {
       Element element = object;
       if (identical(element.parentNode, _element)) {
@@ -149,7 +157,10 @@
     return result;
   }
 
-  Element get first {
+  Element get first => _first(_element);
+
+  @pragma('dart2js:noInline')
+  static Element _first(Element _element) {
     Element$NULLABLE result = _element._firstElementChild;
     if (result == null) throw new StateError("No elements");
     return result;
@@ -667,6 +678,15 @@
    */
   List<Element> get children => new _ChildrenElementList._wrap(this);
 
+  List<Node> get _children =>
+      // Element.children always returns the same list-like object which is a
+      // live view on the underlying DOM tree. So we can GVN it and remove it if
+      // unused.
+      JS('returns:HtmlCollection;creates:HtmlCollection;'
+             'depends:none;effects:none;gvn:true',
+         '#.children',
+         this);
+
   set children(List<Element> value) {
     // Copy list first since we don't want liveness during iteration.
     var copy = value.toList();
@@ -805,8 +825,8 @@
   /**
    * Gets the position of this element relative to the client area of the page.
    */
-  Rectangle get client => new Rectangle(clientLeft, clientTop, clientWidth,
-      clientHeight);
+  Rectangle get client => new Rectangle(clientLeft$NULLASSERT,
+      clientTop$NULLASSERT, clientWidth, clientHeight);
 
   /**
    * Gets the offset of this element relative to its offsetParent.
@@ -1346,14 +1366,14 @@
     }
 
     if (_parseDocument == null) {
-      _parseDocument = document.implementation.createHtmlDocument('');
+      _parseDocument = document.implementation$NULLASSERT.createHtmlDocument('');
       _parseRange = _parseDocument$NULLASSERT.createRange();
 
       // Workaround for Safari bug. Was also previously Chrome bug 229142
       // - URIs are not resolved in new doc.
       BaseElement base =
           _parseDocument$NULLASSERT.createElement('base') $#NULLSAFECAST(as BaseElement);
-      base.href = document.baseUri;
+      base.href = document.baseUri$NULLASSERT;
       _parseDocument$NULLASSERT.head$NULLASSERT.append(base);
     }
 
@@ -1456,7 +1476,7 @@
           treeSanitizer: treeSanitizer));
     }
   }
-  String get innerHtml => _innerHtml;
+  String$NULLABLE get innerHtml => _innerHtml;
 
   @JSName('innerText')
   String get innerText native;
diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
index 5da7c9b..4f2bd81 100644
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
@@ -24,7 +24,7 @@
 
   HeadElement$NULLABLE get head => _head;
 
-  String get lastModified => _lastModified;
+  String$NULLABLE get lastModified => _lastModified;
 
   String$NULLABLE get preferredStylesheetSet => _preferredStylesheetSet;
 
@@ -35,7 +35,7 @@
     _selectedStylesheetSet = value;
   }
 
-  List<StyleSheet> get styleSheets => _styleSheets;
+  List<StyleSheet>$NULLABLE get styleSheets => _styleSheets;
 
   String get title => _title;
 
diff --git a/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate
index f2005af..19aa838 100644
--- a/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate
@@ -53,22 +53,22 @@
   bool get autofocus;
   set autofocus(bool value);
 
-  bool get disabled;
-  set disabled(bool value);
+  bool$NULLABLE get disabled;
+  set disabled(bool$NULLABLE value);
 
-  bool get incremental;
-  set incremental(bool value);
+  bool$NULLABLE get incremental;
+  set incremental(bool$NULLABLE value);
 
-  bool get indeterminate;
-  set indeterminate(bool value);
+  bool$NULLABLE get indeterminate;
+  set indeterminate(bool$NULLABLE value);
 
-  String get name;
-  set name(String value);
+  String$NULLABLE get name;
+  set name(String$NULLABLE value);
 
-  String get value;
+  String$NULLABLE get value;
   set value(String$NULLABLE value);
 
-  List<Node> get labels;
+  List<Node>$NULLABLE get labels;
 
   String get validationMessage;
 
@@ -96,8 +96,8 @@
   String get autocomplete;
   set autocomplete(String value);
 
-  int get maxLength;
-  set maxLength(int value);
+  int$NULLABLE get maxLength;
+  set maxLength(int$NULLABLE value);
 
   String get pattern;
   set pattern(String value);
@@ -105,14 +105,14 @@
   String get placeholder;
   set placeholder(String value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool$NULLABLE get readOnly;
+  set readOnly(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
 
-  int get size;
-  set size(int value);
+  int$NULLABLE get size;
+  set size(int$NULLABLE value);
 
   void select();
 
@@ -141,8 +141,8 @@
 abstract class SearchInputElement implements TextInputElementBase {
   factory SearchInputElement() => new InputElement(type: 'search');
 
-  String get dirName;
-  set dirName(String value);
+  String$NULLABLE get dirName;
+  set dirName(String$NULLABLE value);
 
   Element$NULLABLE get list;
 
@@ -158,8 +158,8 @@
 abstract class TextInputElement implements TextInputElementBase {
   factory TextInputElement() => new InputElement(type: 'text');
 
-  String get dirName;
-  set dirName(String value);
+  String$NULLABLE get dirName;
+  set dirName(String$NULLABLE value);
 
   Element$NULLABLE get list;
 }
@@ -227,11 +227,11 @@
 
   Element$NULLABLE get list;
 
-  int get maxLength;
-  set maxLength(int value);
+  int$NULLABLE get maxLength;
+  set maxLength(int$NULLABLE value);
 
-  bool get multiple;
-  set multiple(bool value);
+  bool$NULLABLE get multiple;
+  set multiple(bool$NULLABLE value);
 
   String get pattern;
   set pattern(String value);
@@ -239,14 +239,14 @@
   String get placeholder;
   set placeholder(String value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool$NULLABLE get readOnly;
+  set readOnly(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
 
-  int get size;
-  set size(int value);
+  int$NULLABLE get size;
+  set size(int$NULLABLE value);
 
   /// Returns true if this input type is supported on the current platform.
   static bool get supported {
@@ -268,17 +268,17 @@
 
   Element$NULLABLE get list;
 
-  String get max;
-  set max(String value);
+  String$NULLABLE get max;
+  set max(String$NULLABLE value);
 
-  String get min;
-  set min(String value);
+  String$NULLABLE get min;
+  set min(String$NULLABLE value);
 
-  String get step;
-  set step(String value);
+  String$NULLABLE get step;
+  set step(String$NULLABLE value);
 
-  num get valueAsNumber;
-  set valueAsNumber(num value);
+  num$NULLABLE get valueAsNumber;
+  set valueAsNumber(num$NULLABLE value);
 
   void stepDown([int$NULLABLE n]);
 
@@ -297,8 +297,8 @@
   DateTime get valueAsDate;
   set valueAsDate(DateTime value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool$NULLABLE get readOnly;
+  set readOnly(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
@@ -321,8 +321,8 @@
   DateTime get valueAsDate;
   set valueAsDate(DateTime value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool$NULLABLE get readOnly;
+  set readOnly(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
@@ -345,8 +345,8 @@
   DateTime get valueAsDate;
   set valueAsDate(DateTime value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool$NULLABLE get readOnly;
+  set readOnly(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
@@ -369,8 +369,8 @@
   DateTime get valueAsDate;
   set valueAsDate(DateTime value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool$NULLABLE get readOnly;
+  set readOnly(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
@@ -392,8 +392,8 @@
   factory LocalDateTimeInputElement() =>
       new InputElement(type: 'datetime-local');
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool$NULLABLE get readOnly;
+  set readOnly(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
@@ -416,8 +416,8 @@
   String get placeholder;
   set placeholder(String value);
 
-  bool get readOnly;
-  set readOnly(bool value);
+  bool$NULLABLE get readOnly;
+  set readOnly(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
@@ -454,8 +454,8 @@
 abstract class CheckboxInputElement implements InputElementBase {
   factory CheckboxInputElement() => new InputElement(type: 'checkbox');
 
-  bool get checked;
-  set checked(bool value);
+  bool$NULLABLE get checked;
+  set checked(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
@@ -476,8 +476,8 @@
 abstract class RadioButtonInputElement implements InputElementBase {
   factory RadioButtonInputElement() => new InputElement(type: 'radio');
 
-  bool get checked;
-  set checked(bool value);
+  bool$NULLABLE get checked;
+  set checked(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
@@ -489,11 +489,11 @@
 abstract class FileUploadInputElement implements InputElementBase {
   factory FileUploadInputElement() => new InputElement(type: 'file');
 
-  String get accept;
-  set accept(String value);
+  String$NULLABLE get accept;
+  set accept(String$NULLABLE value);
 
-  bool get multiple;
-  set multiple(bool value);
+  bool$NULLABLE get multiple;
+  set multiple(bool$NULLABLE value);
 
   bool get required;
   set required(bool value);
@@ -530,8 +530,8 @@
 abstract class ImageButtonInputElement implements InputElementBase {
   factory ImageButtonInputElement() => new InputElement(type: 'image');
 
-  String get alt;
-  set alt(String value);
+  String$NULLABLE get alt;
+  set alt(String$NULLABLE value);
 
   String get formAction;
   set formAction(String value);
@@ -548,14 +548,14 @@
   String get formTarget;
   set formTarget(String value);
 
-  int get height;
-  set height(int value);
+  int$NULLABLE get height;
+  set height(int$NULLABLE value);
 
-  String get src;
-  set src(String value);
+  String$NULLABLE get src;
+  set src(String$NULLABLE value);
 
-  int get width;
-  set width(int value);
+  int$NULLABLE get width;
+  set width(int$NULLABLE value);
 }
 
 /**
diff --git a/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate
index 0cb5c45..59cedcb 100644
--- a/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate
@@ -16,11 +16,11 @@
 
   List<OptionElement> get selectedOptions {
     // IE does not change the selected flag for single-selection items.
-    if (this.multiple) {
+    if (this.multiple$NULLASSERT) {
       var options = this.options.where((o) => o.selected).toList();
       return new UnmodifiableListView(options);
     } else {
-      return [this.options[this.selectedIndex]];
+      return [this.options[this.selectedIndex$NULLASSERT]];
     }
   }
 }
diff --git a/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate
index d030d27..3d9b2af 100644
--- a/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate
@@ -20,10 +20,10 @@
     {NodeValidator$NULLABLE validator,
      NodeTreeSanitizer$NULLABLE treeSanitizer}) {
     text = null;
-    content.nodes.clear();
+    content$NULLASSERT.nodes.clear();
     var fragment = createFragment(html, validator: validator,
         treeSanitizer: treeSanitizer);
 
-    content.append(fragment);
+    content$NULLASSERT.append(fragment);
   }
 }
diff --git a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
index ca93287..7445a9b 100644
--- a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
@@ -68,14 +68,14 @@
     children.addAll(value);
   }
 
-  String get outerHtml {
+  String$NULLABLE get outerHtml {
     final container = new DivElement();
     final SvgElement cloned = this.clone(true) $#NULLSAFECAST(as SvgElement);
     container.children.add(cloned);
     return container.innerHtml;
   }
 
-  String get innerHtml {
+  String$NULLABLE get innerHtml {
     final container = new DivElement();
     final SvgElement cloned = this.clone(true) $#NULLSAFECAST(as SvgElement);
     container.children.addAll(cloned.children);
diff --git a/tools/dom/templates/html/impl/impl_Screen.darttemplate b/tools/dom/templates/html/impl/impl_Screen.darttemplate
index e31aed5..3cf35ae 100644
--- a/tools/dom/templates/html/impl/impl_Screen.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Screen.darttemplate
@@ -6,6 +6,6 @@
 
 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
 
-  Rectangle get available => new Rectangle(_availLeft, _availTop, _availWidth,
-      _availHeight);
+  Rectangle get available => new Rectangle(_availLeft$NULLASSERT,
+	_availTop$NULLASSERT, _availWidth$NULLASSERT, _availHeight$NULLASSERT);
 $!MEMBERS}
diff --git a/tools/dom/templates/html/impl/impl_WebGLCanvas.darttemplate b/tools/dom/templates/html/impl/impl_WebGLCanvas.darttemplate
index 2909b4d..272f693 100644
--- a/tools/dom/templates/html/impl/impl_WebGLCanvas.darttemplate
+++ b/tools/dom/templates/html/impl/impl_WebGLCanvas.darttemplate
@@ -11,6 +11,6 @@
   CanvasElement get canvas native;
 
   @JSName('canvas')
-  OffscreenCanvas get offscreenCanvas native;
+  OffscreenCanvas$NULLABLE get offscreenCanvas native;
 }
 
diff --git a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
index 43b0062..01d0da5 100644
--- a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
@@ -56,12 +56,10 @@
    * * [WheelEvent.deltaY](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-WheelEvent-deltaY) from the W3C.
    */
   num get deltaY {
-    if (JS('bool', '#.deltaY !== undefined', this)) {
-      // W3C WheelEvent
-      return this._deltaY;
-    }
-    throw new UnsupportedError(
-        'deltaY is not supported');
+    // deltaY may be missing or undefined.
+    num? value = JS('', '#.deltaY', this);
+    if (value != null) return value;
+    throw new UnsupportedError('deltaY is not supported');
   }
 
   /**
@@ -73,12 +71,10 @@
    * * [WheelEvent.deltaX](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-WheelEvent-deltaX) from the W3C.
    */
   num get deltaX {
-    if (JS('bool', '#.deltaX !== undefined', this)) {
-      // W3C WheelEvent
-      return this._deltaX;
-    }
-    throw new UnsupportedError(
-        'deltaX is not supported');
+    // deltaX may be missing or undefined.
+    num? value = JS('', '#.deltaX', this);
+    if (value != null) return value;
+    throw new UnsupportedError('deltaX is not supported');
   }
 
   int get deltaMode {
diff --git a/tools/dom/templates/html/impl/impl_Window.darttemplate b/tools/dom/templates/html/impl/impl_Window.darttemplate
index bfd09a4..0c35a8b 100644
--- a/tools/dom/templates/html/impl/impl_Window.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Window.darttemplate
@@ -287,8 +287,9 @@
 
   String get returnValue => _returnValue;
 
-  set returnValue(String value) {
-    _returnValue = value;
+  set returnValue(String$NULLABLE value) {
+    // Typed as nullable only to be compatible with the overriden method.
+    _returnValue = value$NULLASSERT;
     // FF and IE use the value as the return value, Chrome will return this from
     // the event callback function.
     if (JS<bool>('bool', '("returnValue" in #)', wrapped)) {
diff --git a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
index eab360a..f61c75d 100644
--- a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
+++ b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
@@ -75,7 +75,8 @@
   static Future<String> getString(String url,
       {bool$NULLABLE withCredentials, void onProgress(ProgressEvent e)$NULLABLE}) {
     return request(url, withCredentials: withCredentials,
-        onProgress: onProgress).then((HttpRequest xhr) => xhr.responseText);
+        onProgress: onProgress).then(
+            (HttpRequest xhr) => xhr.responseText$NULLASSERT);
   }
 
   /**
@@ -217,15 +218,16 @@
     }
 
     xhr.onLoad.listen((e) {
-      var accepted = xhr.status >= 200 && xhr.status < 300;
-      var fileUri = xhr.status == 0; // file:// URIs have status of 0.
-      var notModified = xhr.status == 304;
+      var status = xhr.status$NULLASSERT;
+      var accepted = status >= 200 && status < 300;
+      var fileUri = status == 0; // file:// URIs have status of 0.
+      var notModified = status == 304;
       // Redirect status is specified up to 307, but others have been used in
       // practice. Notably Google Drive uses 308 Resume Incomplete for
       // resumable uploads, and it's also been used as a redirect. The
       // redirect case will be handled by the browser before it gets to us,
       // so if we see it we should pass it through to the user.
-      var unknownRedirect = xhr.status > 307 && xhr.status < 400;
+      var unknownRedirect = status > 307 && status < 400;
 
       if (accepted || fileUri || notModified || unknownRedirect) {
         completer.complete(xhr);
@@ -292,7 +294,7 @@
       {String$NULLABLE method, String$NULLABLE sendData}) {
     if (supportsCrossOrigin) {
       return request(url, method: method, sendData: sendData).then((xhr) {
-        return xhr.responseText;
+        return xhr.responseText$NULLASSERT;
       });
     }
     var completer = new Completer<String>();
diff --git a/tools/download_abi_dills.py b/tools/download_abi_dills.py
deleted file mode 100644
index 7ad544c..0000000
--- a/tools/download_abi_dills.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# Downloads dill files from CIPD for each supported ABI version.
-
-import os
-import subprocess
-import sys
-import utils
-
-
-def procWait(p):
-    while p.returncode is None:
-        p.communicate()
-        p.poll()
-    return p.returncode
-
-
-def findAbiVersion(version):
-    cmd = ['cipd', 'instances', 'dart/abiversions/%d' % version]
-    p = subprocess.Popen(
-        cmd,
-        stdout=subprocess.PIPE,
-        stderr=subprocess.PIPE,
-        shell=utils.IsWindows(),
-        cwd=utils.DART_DIR)
-    return procWait(p) == 0
-
-
-def main():
-    abi_version = int(utils.GetAbiVersion())
-    oldest_abi_version = int(utils.GetOldestSupportedAbiVersion())
-    cmd = ['cipd', 'ensure', '-root', 'tools/abiversions', '-ensure-file', '-']
-    ensure_file = ''
-    for i in range(oldest_abi_version, abi_version + 1):
-        if findAbiVersion(i):
-            ensure_file += '@Subdir %d\ndart/abiversions/%d latest\n\n' % (i, i)
-    if not ensure_file:
-        return 0
-    p = subprocess.Popen(
-        cmd,
-        stdin=subprocess.PIPE,
-        stdout=subprocess.PIPE,
-        stderr=subprocess.PIPE,
-        shell=utils.IsWindows(),
-        cwd=utils.DART_DIR)
-    p.communicate(ensure_file)
-    p.stdin.close()
-    return procWait(p)
-
-
-if __name__ == '__main__':
-    sys.exit(main())
diff --git a/tools/experimental_features.yaml b/tools/experimental_features.yaml
index a680662..e9b21ba 100644
--- a/tools/experimental_features.yaml
+++ b/tools/experimental_features.yaml
@@ -85,7 +85,7 @@
 # default 'language' "category" with code generated for both CFE and Analyzer,
 # while other categories can be tailored more specifically.
 
-current-version: 2.9
+current-version: '2.10.0'
 
 features:
   non-nullable:
@@ -104,6 +104,8 @@
     help: "Alternative invalidation strategy for incremental compilation"
     category: "CFE"
 
+  value-class:
+    help: "Value class"
 #
 # Flags below this line are shipped, retired, or rejected, cannot be specified
 # on the command line, and will eventually be removed.
diff --git a/tools/fuchsia/find_resources.py b/tools/fuchsia/find_resources.py
new file mode 100755
index 0000000..9d38053
--- /dev/null
+++ b/tools/fuchsia/find_resources.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+#
+# 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.
+#
+
+# Finds files in the given directories and their subdirectories, and prints them
+# in the json format expected by GN fuchsia_component's resources arg:
+# [
+#   {
+#     "path": "path/to/file.dart",
+#     "dest": "data/path/to/file.dart"
+#   },
+#   ...
+# ]
+
+import sys
+import os
+
+from os.path import join, abspath, relpath
+
+DART_DIR = abspath(join(__file__, '..', '..', '..'))
+
+
+def listFiles(path):
+  allFiles = []
+  for dirpath, dirs, files in os.walk(join(DART_DIR, path)):
+    allFiles += [relpath(abspath(join(dirpath, p)), DART_DIR) for p in files]
+  return allFiles
+
+
+def printOutput(files):
+  print('[')
+  print(',\n'.join([
+    '  {\n    "path": "%s",\n    "dest": "data/%s"\n  }' % (f, f) for f in files
+  ]))
+  print(']')
+
+
+def main():
+  if len(sys.argv) < 2:
+    print('Expected at least 1 arg, the paths to search.')
+    return 1
+  allFiles = []
+  for directory in sys.argv[1:]:
+    files = listFiles(directory)
+    if len(files) == 0:
+      print('Did not find any files in the directory: ' + directory)
+      return 2
+    allFiles += files
+  printOutput(sorted(allFiles))
+  return 0
+
+
+if __name__ == '__main__':
+  sys.exit(main())
diff --git a/tools/generate_package_config.dart b/tools/generate_package_config.dart
index 169fbbc..0caf03b 100755
--- a/tools/generate_package_config.dart
+++ b/tools/generate_package_config.dart
@@ -34,9 +34,25 @@
     packageDirectory('pkg/front_end/testcases/nonfunction_type_aliases/'),
   ];
 
+  var feAnalyzerSharedPackageDirs = [
+    packageDirectory(
+        'pkg/_fe_analyzer_shared/test/flow_analysis/assigned_variables/'),
+    packageDirectory(
+        'pkg/_fe_analyzer_shared/test/flow_analysis/definite_assignment/'),
+    packageDirectory(
+        'pkg/_fe_analyzer_shared/test/flow_analysis/definite_unassignment/'),
+    packageDirectory('pkg/_fe_analyzer_shared/test/flow_analysis/nullability/'),
+    packageDirectory(
+        'pkg/_fe_analyzer_shared/test/flow_analysis/reachability/'),
+    packageDirectory(
+        'pkg/_fe_analyzer_shared/test/flow_analysis/type_promotion/'),
+    packageDirectory('pkg/_fe_analyzer_shared/test/inheritance/'),
+  ];
+
   var packages = [
     ...makePackageConfigs(packageDirs),
-    ...makeCfePackageConfigs(cfePackageDirs)
+    ...makeCfePackageConfigs(cfePackageDirs),
+    ...makeFeAnalyzerSharedPackageConfigs(feAnalyzerSharedPackageDirs)
   ];
   packages.sort((a, b) => a["name"].compareTo(b["name"]));
 
@@ -107,6 +123,21 @@
   }
 }
 
+/// Generates package configurations for the special pseudo-packages used by
+/// the _fe_analyzer_shared id tests.
+Iterable<Map<String, String>> makeFeAnalyzerSharedPackageConfigs(
+    List<String> packageDirs) sync* {
+  for (var packageDir in packageDirs) {
+    yield {
+      'name': '_fe_analyzer_shared_${p.basename(packageDir)}',
+      'rootUri': p
+          .toUri(p.relative(packageDir, from: p.dirname(configFilePath)))
+          .toString(),
+      'packageUri': '.nonexisting/',
+    };
+  }
+}
+
 /// Generates a path to [relativePath] within the repo.
 String packageDirectory(String relativePath) => p.join(repoRoot, relativePath);
 
diff --git a/tools/git_cl_try.sh b/tools/git_cl_try.sh
new file mode 100644
index 0000000..573465d
--- /dev/null
+++ b/tools/git_cl_try.sh
@@ -0,0 +1,94 @@
+
+function git-cl-try-vm-jit-app {
+  echo "git-cl-try-vm-jit-app"
+  git cl try -B dart/try                                     \
+     -b app-kernel-linux-debug-x64-try                       \
+     -b app-kernel-linux-product-x64-try                     \
+     -b app-kernel-linux-release-x64-try
+}
+function git-cl-try-vm-jit-dartkb {
+  echo "git-cl-try-vm-jit-dartkb"
+  git cl try -B dart/try                                     \
+     -b vm-dartkb-linux-release-simarm64-try                 \
+     -b vm-dartkb-linux-release-x64-abi-try                  \
+     -b vm-dartkb-linux-release-x64-try
+}
+function git-cl-try-vm-jit-reload {
+  echo "git-cl-try-vm-jit-reload"
+  git cl try -B dart/try                                     \
+   -b vm-kernel-reload-linux-debug-x64-try                   \
+   -b vm-kernel-reload-linux-release-x64-try                 \
+   -b vm-kernel-reload-rollback-linux-debug-x64-try          \
+   -b vm-kernel-reload-rollback-linux-release-x64-try
+}
+function git-cl-try-vm-jit-rest {
+  echo "git-cl-try-vm-jit-rest"
+  git cl try -B dart/try                                     \
+   -b vm-kernel-checked-linux-release-x64-try                \
+   -b vm-kernel-linux-debug-ia32-try                         \
+   -b vm-kernel-linux-debug-x64-try                          \
+   -b vm-kernel-linux-product-x64-try                        \
+   -b vm-kernel-linux-release-ia32-try                       \
+   -b vm-kernel-linux-release-simarm-try                     \
+   -b vm-kernel-linux-release-simarm64-try                   \
+   -b vm-kernel-linux-release-x64-try                        \
+   -b vm-kernel-mac-debug-x64-try                            \
+   -b vm-kernel-mac-product-x64-try                          \
+   -b vm-kernel-mac-release-x64-try                          \
+   -b vm-kernel-nnbd-linux-debug-x64-try                     \
+   -b vm-kernel-nnbd-linux-release-x64-try                   \
+   -b vm-kernel-optcounter-threshold-linux-release-ia32-try  \
+   -b vm-kernel-optcounter-threshold-linux-release-x64-try   \
+   -b vm-kernel-win-debug-ia32-try                           \
+   -b vm-kernel-win-debug-x64-try                            \
+   -b vm-kernel-win-product-x64-try                          \
+   -b vm-kernel-win-release-ia32-try                         \
+   -b vm-kernel-win-release-x64-try
+}
+function git-cl-try-vm-ffi {
+  echo "git-cl-try-vm-ffi"
+  git cl try -B dart/try                                     \
+     -b vm-ffi-android-debug-arm-try                         \
+     -b vm-ffi-android-debug-arm64-try                       \
+     -b vm-ffi-android-product-arm-try                       \
+     -b vm-ffi-android-product-arm64-try                     \
+     -b vm-ffi-android-release-arm-try                       \
+     -b vm-ffi-android-release-arm64-try
+}
+function git-cl-try-vm-precomp {
+  echo "git-cl-try-vm-precomp"
+  git cl try -B dart/try                                     \
+     -b vm-kernel-precomp-android-release-arm64-try          \
+     -b vm-kernel-precomp-android-release-arm_x64-try        \
+     -b vm-kernel-precomp-linux-debug-simarm_x64-try         \
+     -b vm-kernel-precomp-linux-debug-x64-try                \
+     -b vm-kernel-precomp-linux-product-x64-try              \
+     -b vm-kernel-precomp-linux-release-simarm-try           \
+     -b vm-kernel-precomp-linux-release-simarm64-try         \
+     -b vm-kernel-precomp-linux-release-simarm_x64-try       \
+     -b vm-kernel-precomp-linux-release-x64-try              \
+     -b vm-kernel-precomp-mac-release-simarm64-try           \
+     -b vm-kernel-precomp-obfuscate-linux-release-x64-try    \
+     -b vm-kernel-precomp-win-release-x64-try                \
+     -b vm-precomp-ffi-qemu-linux-release-arm-try
+}
+function git-cl-try-vm-san {
+  echo "git-cl-try-vm-jit-san"
+  git cl try -B dart/try                                     \
+   -b vm-kernel-asan-linux-release-x64-try                   \
+   -b vm-kernel-msan-linux-release-x64-try                   \
+   -b vm-kernel-tsan-linux-release-x64-try                   \
+   -b vm-kernel-precomp-asan-linux-release-x64-try           \
+   -b vm-kernel-precomp-msan-linux-release-x64-try           \
+   -b vm-kernel-precomp-tsan-linux-release-x64-try           \
+}
+function git-cl-try-vm-all {
+  echo "git-cl-try-vm-all"
+  git-cl-try-vm-jit-app
+  git-cl-try-vm-jit-dartkb
+  git-cl-try-vm-jit-reload
+  git-cl-try-vm-jit-rest
+  git-cl-try-vm-ffi
+  git-cl-try-vm-precomp
+  git-cl-try-vm-san
+}
diff --git a/tools/gn.py b/tools/gn.py
index 4bd29b4..14929d6 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -16,6 +16,7 @@
 HOST_ARCH = utils.GuessArchitecture()
 SCRIPT_DIR = os.path.dirname(sys.argv[0])
 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
+AVAILABLE_ARCHS = utils.ARCH_FAMILY.keys()
 GN = os.path.join(DART_ROOT, 'buildtools', 'gn')
 
 # Environment variables for default settings.
@@ -286,12 +287,13 @@
         if not mode in ['debug', 'release', 'product']:
             print("Unknown mode %s" % mode)
             return False
-    for arch in args.arch:
-        archs = [
-            'ia32', 'x64', 'simarm', 'arm', 'arm_x64', 'simarmv6', 'armv6',
-            'simarm64', 'arm64', 'simarm_x64'
-        ]
-        if not arch in archs:
+    for i, arch in enumerate(args.arch):
+        if not arch in AVAILABLE_ARCHS:
+            # Normalise to lower case form to make it less case-picky.
+            arch_lower = arch.lower()
+            if arch_lower in AVAILABLE_ARCHS:
+                args.arch[i] = arch_lower
+                continue
             print("Unknown arch %s" % arch)
             return False
     oses = [ProcessOsOption(os_name) for os_name in args.os]
@@ -345,133 +347,153 @@
         return '--ide=json'
 
 
+def AddCommonGnOptionArgs(parser):
+    """Adds arguments that will change the default GN arguments."""
+
+    parser.add_argument('--goma', help='Use goma', action='store_true')
+    parser.add_argument('--no-goma',
+                        help='Disable goma',
+                        dest='goma',
+                        action='store_false')
+    parser.set_defaults(goma=True)
+
+    parser.add_argument('--verify-sdk-hash',
+                        help='Enable SDK hash checks (default)',
+                        dest='verify_sdk_hash',
+                        action='store_true')
+    parser.add_argument('-nvh',
+                        '--no-verify-sdk-hash',
+                        help='Disable SDK hash checks',
+                        dest='verify_sdk_hash',
+                        action='store_false')
+    parser.set_defaults(verify_sdk_hash=True)
+
+    parser.add_argument('--bytecode',
+                        '-b',
+                        help='Use bytecode in Dart VM',
+                        dest='bytecode',
+                        action="store_true")
+    parser.add_argument('--no-bytecode',
+                        help='Disable bytecode in Dart VM',
+                        dest='bytecode',
+                        action="store_false")
+    parser.set_defaults(bytecode=False)
+
+    parser.add_argument('--clang', help='Use Clang', action='store_true')
+    parser.add_argument('--no-clang',
+                        help='Disable Clang',
+                        dest='clang',
+                        action='store_false')
+    parser.set_defaults(clang=True)
+
+    parser.add_argument(
+        '--platform-sdk',
+        help='Directs the create_sdk target to create a smaller "Platform" SDK',
+        default=MakePlatformSDK(),
+        action='store_true')
+    parser.add_argument('--use-crashpad',
+                        default=False,
+                        dest='use_crashpad',
+                        action='store_true')
+    parser.add_argument('--use-qemu',
+                        default=False,
+                        dest='use_qemu',
+                        action='store_true')
+    parser.add_argument('--exclude-kernel-service',
+                        help='Exclude the kernel service.',
+                        default=False,
+                        dest='exclude_kernel_service',
+                        action='store_true')
+    parser.add_argument('--arm-float-abi',
+                        type=str,
+                        help='The ARM float ABI (soft, softfp, hard)',
+                        metavar='[soft,softfp,hard]',
+                        default='')
+
+    parser.add_argument('--code-coverage',
+                        help='Enable code coverage for the standalone VM',
+                        default=False,
+                        dest="code_coverage",
+                        action='store_true')
+    parser.add_argument('--debug-opt-level',
+                        '-d',
+                        help='The optimization level to use for debug builds',
+                        type=str)
+    parser.add_argument('--gn-args',
+                        help='Set extra GN args',
+                        dest='gn_args',
+                        action='append')
+    parser.add_argument(
+        '--toolchain-prefix',
+        '-t',
+        type=str,
+        help='Comma-separated list of arch=/path/to/toolchain-prefix mappings')
+    parser.add_argument('--ide',
+                        help='Generate an IDE file.',
+                        default=os_has_ide(HOST_OS),
+                        action='store_true')
+    parser.add_argument(
+        '--target-sysroot',
+        '-s',
+        type=str,
+        help='Comma-separated list of arch=/path/to/sysroot mappings')
+
+
+def AddCommonConfigurationArgs(parser):
+    """Adds arguments that influence which configuration will be built."""
+    parser.add_argument("-a",
+                        "--arch",
+                        type=str,
+                        help='Target architectures (comma-separated).',
+                        metavar='[all,' + ','.join(AVAILABLE_ARCHS) + ']',
+                        default=utils.GuessArchitecture())
+    parser.add_argument('--mode',
+                        '-m',
+                        type=str,
+                        help='Build variants (comma-separated).',
+                        metavar='[all,debug,release,product]',
+                        default='debug')
+    parser.add_argument('--os',
+                        type=str,
+                        help='Target OSs (comma-separated).',
+                        metavar='[all,host,android,fuchsia]',
+                        default='host')
+    parser.add_argument('--sanitizer',
+                        type=str,
+                        help='Build variants (comma-separated).',
+                        metavar='[all,none,asan,lsan,msan,tsan,ubsan]',
+                        default='none')
+
+
+def AddOtherArgs(parser):
+    """Adds miscellaneous arguments to the parser."""
+    parser.add_argument('--workers',
+                        '-w',
+                        type=int,
+                        help='Number of simultaneous GN invocations',
+                        dest='workers',
+                        default=multiprocessing.cpu_count())
+    parser.add_argument("-v",
+                        "--verbose",
+                        help='Verbose output.',
+                        default=False,
+                        action="store_true")
+
+
 def parse_args(args):
     args = args[1:]
     parser = argparse.ArgumentParser(
         description='A script to run `gn gen`.',
         formatter_class=argparse.ArgumentDefaultsHelpFormatter)
-    common_group = parser.add_argument_group('Common Arguments')
+
+    config_group = parser.add_argument_group('Configuration Related Arguments')
+    AddCommonConfigurationArgs(config_group)
+
+    gn_group = parser.add_argument_group('GN Related Arguments')
+    AddCommonGnOptionArgs(gn_group)
+
     other_group = parser.add_argument_group('Other Arguments')
-
-    common_group.add_argument(
-        '--arch',
-        '-a',
-        type=str,
-        help='Target architectures (comma-separated).',
-        metavar='[all,ia32,x64,simarm,arm,arm_x64,simarmv6,armv6,'
-        'simarm64,arm64,simarm_x64]',
-        default='x64')
-    common_group.add_argument(
-        '--mode',
-        '-m',
-        type=str,
-        help='Build variants (comma-separated).',
-        metavar='[all,debug,release,product]',
-        default='debug')
-    common_group.add_argument(
-        '--os',
-        type=str,
-        help='Target OSs (comma-separated).',
-        metavar='[all,host,android,fuchsia]',
-        default='host')
-    common_group.add_argument(
-        '--sanitizer',
-        type=str,
-        help='Build variants (comma-separated).',
-        metavar='[all,none,asan,lsan,msan,tsan,ubsan]',
-        default='none')
-    common_group.add_argument(
-        "-v",
-        "--verbose",
-        help='Verbose output.',
-        default=False,
-        action="store_true")
-
-    other_group.add_argument(
-        '--arm-float-abi',
-        type=str,
-        help='The ARM float ABI (soft, softfp, hard)',
-        metavar='[soft,softfp,hard]',
-        default='')
-    other_group.add_argument(
-        '--bytecode',
-        '-b',
-        help='Use bytecode in Dart VM',
-        default=False,
-        action="store_true")
-    other_group.add_argument(
-        '--no-bytecode',
-        help='Disable bytecode in Dart VM',
-        dest='bytecode',
-        action="store_false")
-    other_group.add_argument(
-        '--clang', help='Use Clang', default=True, action='store_true')
-    other_group.add_argument(
-        '--no-clang', help='Disable Clang', dest='clang', action='store_false')
-    other_group.add_argument(
-        '--code-coverage',
-        help='Enable code coverage for the standalone VM',
-        default=False,
-        dest="code_coverage",
-        action='store_true')
-    other_group.add_argument(
-        '--debug-opt-level',
-        '-d',
-        help='The optimization level to use for debug builds',
-        type=str)
-    other_group.add_argument(
-        '--goma', help='Use goma', default=True, action='store_true')
-    other_group.add_argument(
-        '--no-goma', help='Disable goma', dest='goma', action='store_false')
-    other_group.add_argument(
-        '--ide',
-        help='Generate an IDE file.',
-        default=os_has_ide(HOST_OS),
-        action='store_true')
-    other_group.add_argument(
-        '--exclude-kernel-service',
-        help='Exclude the kernel service.',
-        default=False,
-        dest='exclude_kernel_service',
-        action='store_true')
-    other_group.add_argument(
-        '--gn-args', help='Set extra GN args', dest='gn_args', action='append')
-    other_group.add_argument(
-        '--platform-sdk',
-        help='Directs the create_sdk target to create a smaller "Platform" SDK',
-        default=MakePlatformSDK(),
-        action='store_true')
-    other_group.add_argument(
-        '--target-sysroot',
-        '-s',
-        type=str,
-        help='Comma-separated list of arch=/path/to/sysroot mappings')
-    other_group.add_argument(
-        '--toolchain-prefix',
-        '-t',
-        type=str,
-        help='Comma-separated list of arch=/path/to/toolchain-prefix mappings')
-    other_group.add_argument(
-        '--workers',
-        '-w',
-        type=int,
-        help='Number of simultaneous GN invocations',
-        dest='workers',
-        default=multiprocessing.cpu_count())
-    other_group.add_argument(
-        '--use-crashpad',
-        default=False,
-        dest='use_crashpad',
-        action='store_true')
-    other_group.add_argument(
-        '--use-qemu',
-        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')
+    AddOtherArgs(other_group)
 
     options = parser.parse_args(args)
     if not ProcessOptions(options):
@@ -491,36 +513,39 @@
         return ("Command failed: " + ' '.join(command) + "\n" + "output: " +
                 e.output)
 
-def Main(argv):
-    starttime = time.time()
-    args = parse_args(argv)
 
+def BuildGnCommand(args, mode, arch, target_os, sanitizer, out_dir):
     gn = os.path.join(DART_ROOT, 'buildtools',
                       'gn.exe' if utils.IsWindows() else 'gn')
     if not os.path.isfile(gn):
-        print("Couldn't find the gn binary at path: " + gn)
-        return 1
+        raise Exception("Couldn't find the gn binary at path: " + gn)
 
+    # TODO(infra): Re-enable --check. Many targets fail to use
+    # public_deps to re-expose header files to their dependents.
+    # See dartbug.com/32364
+    command = [gn, 'gen', out_dir]
+    gn_args = ToCommandLine(
+        ToGnArgs(args, mode, arch, target_os, sanitizer, args.verify_sdk_hash))
+    gn_args += GetGNArgs(args)
+    if args.ide:
+        command.append(ide_switch(HOST_OS))
+    command.append('--args=%s' % ' '.join(gn_args))
+
+    return command
+
+
+def RunGnOnConfiguredConfigurations(args):
     commands = []
     for target_os in args.os:
         for mode in args.mode:
             for arch in args.arch:
                 for sanitizer in args.sanitizer:
                     out_dir = GetOutDir(mode, arch, target_os, sanitizer)
-                    # TODO(infra): Re-enable --check. Many targets fail to use
-                    # public_deps to re-expose header files to their dependents.
-                    # See dartbug.com/32364
-                    command = [gn, 'gen', out_dir]
-                    gn_args = ToCommandLine(
-                        ToGnArgs(args, mode, arch, target_os, sanitizer,
-                                 not args.no_verify_sdk_hash))
-                    gn_args += GetGNArgs(args)
+                    commands.append(
+                        BuildGnCommand(args, mode, arch, target_os, sanitizer,
+                                       out_dir))
                     if args.verbose:
                         print("gn gen --check in %s" % out_dir)
-                    if args.ide:
-                        command.append(ide_switch(HOST_OS))
-                    command.append('--args=%s' % ' '.join(gn_args))
-                    commands.append(command)
 
     pool = multiprocessing.Pool(args.workers)
     results = pool.map(RunCommand, commands, chunksize=1)
@@ -529,6 +554,13 @@
             print(r.strip())
             return 1
 
+
+def Main(argv):
+    starttime = time.time()
+    args = parse_args(argv)
+
+    RunGnOnConfiguredConfigurations(args)
+
     endtime = time.time()
     if args.verbose:
         print("GN Time: %.3f seconds" % (endtime - starttime))
diff --git a/tools/make_version.py b/tools/make_version.py
index f8356f8..1dc0dbe 100755
--- a/tools/make_version.py
+++ b/tools/make_version.py
@@ -108,14 +108,6 @@
         version_time = 'Unknown timestamp'
     version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8'))
 
-    abi_version = utils.GetAbiVersion(version_file)
-    version = version.replace('{{ABI_VERSION}}', abi_version)
-
-    oldest_supported_abi_version = utils.GetOldestSupportedAbiVersion(
-        version_file)
-    version = version.replace('{{OLDEST_SUPPORTED_ABI_VERSION}}',
-                              oldest_supported_abi_version)
-
     snapshot_hash = MakeSnapshotHashString()
     version = version.replace('{{SNAPSHOT_HASH}}', snapshot_hash)
 
diff --git a/tools/patches/flutter-engine/a3815b659047cfc6b63d41d180aa1ca1b781ee68.patch b/tools/patches/flutter-engine/a3815b659047cfc6b63d41d180aa1ca1b781ee68.patch
new file mode 100644
index 0000000..94120c0
--- /dev/null
+++ b/tools/patches/flutter-engine/a3815b659047cfc6b63d41d180aa1ca1b781ee68.patch
@@ -0,0 +1,596 @@
+diff --git a/DEPS b/DEPS
+index 01113f340..e55da1cff 100644
+--- a/DEPS
++++ b/DEPS
+@@ -34,14 +34,14 @@ vars = {
+   # Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS.
+   # You can use //tools/dart/create_updated_flutter_deps.py to produce
+   # updated revision list of existing dependencies.
+   'dart_revision': 'a3815b659047cfc6b63d41d180aa1ca1b781ee68',
+ 
+   # WARNING: DO NOT EDIT MANUALLY
+   # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
+   'dart_args_tag': '1.6.0',
+   'dart_boringssl_gen_rev': '429ccb1877f7987a6f3988228bc2440e61293499',
+   'dart_boringssl_rev': '4dfd5af70191b068aebe567b8e29ce108cee85ce',
+-  'dart_collection_rev': '80f5b6de8a8d8d584732a71bb59912da3e44883b',
++  'dart_collection_rev': '583693680fc067e34ca5b72503df25e8b80579f9',
+   'dart_dart2js_info_tag': '0.6.0',
+   'dart_dart_style_tag': '1.3.6',
+   'dart_http_retry_tag': '0.1.1',
+@@ -49,7 +49,6 @@ vars = {
+   'dart_intl_tag': '0.16.1',
+   'dart_linter_tag': '0.1.117',
+   'dart_oauth2_tag': '1.6.0',
+-  'dart_pedantic_tag': 'v1.9.0',
+   'dart_protobuf_rev': '3746c8fd3f2b0147623a8e3db89c3ff4330de760',
+   'dart_pub_rev': '04b054b62cc437cf23451785fdc50e49cd9de139',
+   'dart_pub_semver_tag': 'v1.4.4',
+@@ -61,15 +60,13 @@ vars = {
+   'dart_shelf_static_rev': 'v0.2.8',
+   'dart_shelf_tag': '0.7.3+3',
+   'dart_shelf_web_socket_tag': '0.2.2+3',
+-  'dart_source_map_stack_trace_tag': '2.0.0',
+-  'dart_source_span_tag': '1.7.0',
+   'dart_sse_tag': 'e5cf68975e8e87171a3dc297577aa073454a91dc',
+-  'dart_stack_trace_tag': '56811dbb2530d823b764fe167ec335879a4adb32',
++  'dart_stack_trace_tag': 'd3813ca0a77348e0faf0d6af0cc17913e36afa39',
+   'dart_stagehand_tag': 'v3.3.9',
+-  'dart_stream_channel_tag': '70433d577be02c48cb16d72d65654f3b4d82c6ed',
++  'dart_stream_channel_tag': 'c446774fd077c9bdbd6235a7aadc661ef60a9727',
+   'dart_test_reflective_loader_tag': '0.1.9',
+   'dart_tflite_native_rev': '3c777c40608a2a9f1427bfe0028ab48e7116b4c1',
+-  'dart_typed_data_tag': '0c369b73a9b7ebf042c06512951bfe5b52b84a5f',
++  'dart_typed_data_tag': 'f94fc57b8e8c0e4fe4ff6cfd8290b94af52d3719',
+   'dart_usage_tag': '3.4.0',
+   'dart_watcher_rev': 'fc3c9aae5d31d707b3013b42634dde8d8a1161b4',
+ 
+@@ -171,13 +168,13 @@ deps = {
+    Var('dart_git') + '/args.git' + '@' + Var('dart_args_tag'),
+ 
+   'src/third_party/dart/third_party/pkg/async':
+-   Var('dart_git') + '/async.git@6b90f4557f330e1ead021f501ee7f1d8b0e77815',
++   Var('dart_git') + '/async.git@128c461a97dbdbd9336ba000ba5a5c02e79b8651',
+ 
+   'src/third_party/dart/third_party/pkg/bazel_worker':
+    Var('dart_git') + '/bazel_worker.git@26680d5e249b249c7216ab2fed0ac8ed4ee285c5',
+ 
+   'src/third_party/dart/third_party/pkg/boolean_selector':
+-   Var('dart_git') + '/boolean_selector.git@1309eabed510cc3b7536fd4367d39b97ebee3d69',
++   Var('dart_git') + '/boolean_selector.git@665e6921ab246569420376f827bff4585dff0b14',
+ 
+   'src/third_party/dart/third_party/pkg/charcode':
+    Var('dart_git') + '/charcode.git@af1e2d59a9c383da94f99ea51dac4b93fb0626c4',
+@@ -207,7 +204,7 @@ deps = {
+    Var('dart_git') + '/ffi.git@454ab0f9ea6bd06942a983238d8a6818b1357edb',
+ 
+   'src/third_party/dart/third_party/pkg/fixnum':
+-   Var('dart_git') + '/fixnum.git@9b38f49f6679654d66a363e69e48173cca07e882',
++   Var('dart_git') + '/fixnum.git@300c3f025e94a72b7b6770e15f76a4de15f77668',
+ 
+   'src/third_party/dart/third_party/pkg/glob':
+    Var('dart_git') + '/glob.git@e9f4e6b7ae8abe5071461cf8f47191bb19cf7ef6',
+@@ -246,7 +243,7 @@ deps = {
+    Var('dart_git') + '/markdown.git@dd150bb64c5f3b41d31f20f399ae2a855f7f8c00',
+ 
+   'src/third_party/dart/third_party/pkg/matcher':
+-   Var('dart_git') + '/matcher.git@8f8d965933c94a489b1a39e20d558a32841bfa5b',
++   Var('dart_git') + '/matcher.git@9cae8faa7868bf3a88a7ba45eb0bd128e66ac515',
+ 
+   'src/third_party/dart/third_party/pkg/mime':
+    Var('dart_git') + '/mime.git@179b5e6a88f4b63f36dc1b8fcbc1e83e5e0cd3a7',
+@@ -261,13 +258,13 @@ deps = {
+    Var('dart_git') + '/oauth2.git' + '@' + Var('dart_oauth2_tag'),
+ 
+   'src/third_party/dart/third_party/pkg/path':
+-   Var('dart_git') + '/path.git@4f3bb71843fe5493ba490828a1721821d7b33746',
++   Var('dart_git') + '/path.git@62ecd5a78ffe5734d14ed0df76d20309084cd04a',
+ 
+   'src/third_party/dart/third_party/pkg/pedantic':
+-   Var('dart_git') + '/pedantic.git' + '@' + Var('dart_pedantic_tag'),
++   Var('dart_git') + '/pedantic.git@24b38df72430d7e21cb4257828580becb9a39c72',
+ 
+   'src/third_party/dart/third_party/pkg/pool':
+-   Var('dart_git') + '/pool.git@86fbb2cde9bbc66c8d159909d2f65a5981ea5b50',
++   Var('dart_git') + '/pool.git@eedbd5fde84f9a1a8da643b475305a81841da599',
+ 
+   'src/third_party/dart/third_party/pkg/protobuf':
+    Var('dart_git') + '/protobuf.git' + '@' + Var('dart_protobuf_rev'),
+@@ -300,13 +297,13 @@ deps = {
+    Var('dart_git') + '/shelf_web_socket.git' + '@' + Var('dart_shelf_web_socket_tag'),
+ 
+   'src/third_party/dart/third_party/pkg/source_map_stack_trace':
+-   Var('dart_git') + '/source_map_stack_trace.git' + '@' + Var('dart_source_map_stack_trace_tag'),
++   Var('dart_git') + '/source_map_stack_trace.git@1c3026f69d9771acf2f8c176a1ab750463309cce',
+ 
+   'src/third_party/dart/third_party/pkg/source_maps':
+-   Var('dart_git') + '/source_maps.git@87b4fd9027378bbd51b02e9d7df794eee8a82b7a',
++   Var('dart_git') + '/source_maps.git@53eb92ccfe6e64924054f83038a534b959b12b3e',
+ 
+   'src/third_party/dart/third_party/pkg/source_span':
+-   Var('dart_git') + '/source_span.git' + '@' + Var('dart_source_span_tag'),
++   Var('dart_git') + '/source_span.git@94833d6cbf4552ebe5d2aa6714acecd93834e53a',
+ 
+   'src/third_party/dart/third_party/pkg/sse':
+    Var('dart_git') + '/sse.git' + '@' + Var('dart_sse_tag'),
+@@ -321,13 +318,13 @@ deps = {
+    Var('dart_git') + '/stream_channel.git' + '@' + Var('dart_stream_channel_tag'),
+ 
+   'src/third_party/dart/third_party/pkg/string_scanner':
+-   Var('dart_git') + '/string_scanner.git@a918e7371af6b6e73bfd534ff9da6084741c1f99',
++   Var('dart_git') + '/string_scanner.git@1b63e6e5db5933d7be0a45da6e1129fe00262734',
+ 
+   'src/third_party/dart/third_party/pkg/term_glyph':
+-   Var('dart_git') + '/term_glyph.git@b3da31e9684a99cfe5f192b89914492018b44da7',
++   Var('dart_git') + '/term_glyph.git@6a0f9b6fb645ba75e7a00a4e20072678327a0347',
+ 
+   'src/third_party/dart/third_party/pkg/test':
+-   Var('dart_git') + '/test.git@718fe6f93c4655208460f28e89d887c5ef4144c5',
++   Var('dart_git') + '/test.git@c6b3fe63eda87da1687580071cad1eefd575f851',
+ 
+   'src/third_party/dart/third_party/pkg/test_reflective_loader':
+    Var('dart_git') + '/test_reflective_loader.git' + '@' + Var('dart_test_reflective_loader_tag'),
+@@ -357,7 +354,7 @@ deps = {
+    Var('dart_git') + '/package_config.git@9c586d04bd26fef01215fd10e7ab96a3050cfa64',
+ 
+   'src/third_party/dart/tools/sdks':
+-   {'packages': [{'version': 'version:2.9.0-21.0.dev', 'package': 'dart/dart-sdk/${{platform}}'}], 'dep_type': 'cipd'},
++   {'packages': [{'version': 'version:2.10.0-0.2-preview', 'package': 'dart/dart-sdk/${{platform}}'}], 'dep_type': 'cipd'},
+ 
+   # WARNING: end of dart dependencies list that is cleaned up automatically - see create_updated_flutter_deps.py.
+ 
+diff --git a/lib/ui/annotations.dart b/lib/ui/annotations.dart
+index 45d8ca6cc..b300af073 100644
+--- a/lib/ui/annotations.dart
++++ b/lib/ui/annotations.dart
+@@ -4,7 +4,7 @@
+ 
+ // TODO(dnfield): Remove unused_import ignores when https://github.com/dart-lang/sdk/issues/35164 is resolved.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/channel_buffers.dart b/lib/ui/channel_buffers.dart
+index cb32c4581..39d31d271 100644
+--- a/lib/ui/channel_buffers.dart
++++ b/lib/ui/channel_buffers.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/compositing.dart b/lib/ui/compositing.dart
+index ea3c0b714..4e0553936 100644
+--- a/lib/ui/compositing.dart
++++ b/lib/ui/compositing.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/geometry.dart b/lib/ui/geometry.dart
+index 2739048e7..a7404996c 100644
+--- a/lib/ui/geometry.dart
++++ b/lib/ui/geometry.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/hash_codes.dart b/lib/ui/hash_codes.dart
+index a6ede7849..7da175a27 100644
+--- a/lib/ui/hash_codes.dart
++++ b/lib/ui/hash_codes.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/hooks.dart b/lib/ui/hooks.dart
+index ff2dcaa12..39bab1240 100644
+--- a/lib/ui/hooks.dart
++++ b/lib/ui/hooks.dart
+@@ -4,7 +4,7 @@
+ 
+ // TODO(dnfield): Remove unused_import ignores when https://github.com/dart-lang/sdk/issues/35164 is resolved.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/isolate_name_server.dart b/lib/ui/isolate_name_server.dart
+index d976e0ac2..4b5c2c84d 100644
+--- a/lib/ui/isolate_name_server.dart
++++ b/lib/ui/isolate_name_server.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/lerp.dart b/lib/ui/lerp.dart
+index db9f7b2ec..0bb0a08b7 100644
+--- a/lib/ui/lerp.dart
++++ b/lib/ui/lerp.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/natives.dart b/lib/ui/natives.dart
+index ce29fe15c..0f2939592 100644
+--- a/lib/ui/natives.dart
++++ b/lib/ui/natives.dart
+@@ -4,7 +4,7 @@
+ 
+ // TODO(dnfield): remove unused_element ignores when https://github.com/dart-lang/sdk/issues/35164 is resolved.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart
+index 992db71cf..2599f90e2 100644
+--- a/lib/ui/painting.dart
++++ b/lib/ui/painting.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/plugins.dart b/lib/ui/plugins.dart
+index 64eca6e04..9622852fd 100644
+--- a/lib/ui/plugins.dart
++++ b/lib/ui/plugins.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/pointer.dart b/lib/ui/pointer.dart
+index 3c12cb971..3c8ffefaf 100644
+--- a/lib/ui/pointer.dart
++++ b/lib/ui/pointer.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/semantics.dart b/lib/ui/semantics.dart
+index bee542328..518a69412 100644
+--- a/lib/ui/semantics.dart
++++ b/lib/ui/semantics.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/text.dart b/lib/ui/text.dart
+index 8bdc0f05d..c246731d8 100644
+--- a/lib/ui/text.dart
++++ b/lib/ui/text.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ 
+ part of dart.ui;
+ 
+diff --git a/lib/ui/ui.dart b/lib/ui/ui.dart
+index 7612cf509..fe0e4fa16 100644
+--- a/lib/ui/ui.dart
++++ b/lib/ui/ui.dart
+@@ -9,7 +9,7 @@
+ /// This library exposes the lowest-level services that Flutter frameworks use
+ /// to bootstrap applications, such as classes for driving the input, graphics
+ /// text, layout, and rendering subsystems.
+-// @dart = 2.9
++// @dart = 2.10
+ library dart.ui;
+ 
+ import 'dart:_internal' hide Symbol; // ignore: unused_import
+diff --git a/lib/ui/window.dart b/lib/ui/window.dart
+index 815bee5a1..22f9ed0c3 100644
+--- a/lib/ui/window.dart
++++ b/lib/ui/window.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of dart.ui;
+ 
+ /// Signature of callbacks that have no arguments and return no data.
+diff --git a/lib/web_ui/lib/src/ui/annotations.dart b/lib/web_ui/lib/src/ui/annotations.dart
+index 977ca70ca..7dac0c567 100644
+--- a/lib/web_ui/lib/src/ui/annotations.dart
++++ b/lib/web_ui/lib/src/ui/annotations.dart
+@@ -4,7 +4,7 @@
+ 
+ // TODO(dnfield): Remove unused_import ignores when https://github.com/dart-lang/sdk/issues/35164 is resolved.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ // TODO(dnfield): Update this if/when we default this to on in the tool,
+diff --git a/lib/web_ui/lib/src/ui/canvas.dart b/lib/web_ui/lib/src/ui/canvas.dart
+index 1061ab718..ee185ef29 100644
+--- a/lib/web_ui/lib/src/ui/canvas.dart
++++ b/lib/web_ui/lib/src/ui/canvas.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// Defines how a list of points is interpreted when drawing a set of points.
+diff --git a/lib/web_ui/lib/src/ui/channel_buffers.dart b/lib/web_ui/lib/src/ui/channel_buffers.dart
+index 5d3db5da5..6ce0bc962 100644
+--- a/lib/web_ui/lib/src/ui/channel_buffers.dart
++++ b/lib/web_ui/lib/src/ui/channel_buffers.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// A saved platform message for a channel with its callback.
+diff --git a/lib/web_ui/lib/src/ui/compositing.dart b/lib/web_ui/lib/src/ui/compositing.dart
+index 635dd7261..11a0e1199 100644
+--- a/lib/web_ui/lib/src/ui/compositing.dart
++++ b/lib/web_ui/lib/src/ui/compositing.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// An opaque object representing a composited scene.
+diff --git a/lib/web_ui/lib/src/ui/geometry.dart b/lib/web_ui/lib/src/ui/geometry.dart
+index 904cec065..c528c8c73 100644
+--- a/lib/web_ui/lib/src/ui/geometry.dart
++++ b/lib/web_ui/lib/src/ui/geometry.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// Base class for [Size] and [Offset], which are both ways to describe
+diff --git a/lib/web_ui/lib/src/ui/hash_codes.dart b/lib/web_ui/lib/src/ui/hash_codes.dart
+index 69aeb33bb..e91fb1cc5 100644
+--- a/lib/web_ui/lib/src/ui/hash_codes.dart
++++ b/lib/web_ui/lib/src/ui/hash_codes.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ class _HashEnd { const _HashEnd(); }
+diff --git a/lib/web_ui/lib/src/ui/initialization.dart b/lib/web_ui/lib/src/ui/initialization.dart
+index 2749fa9e5..6865da812 100644
+--- a/lib/web_ui/lib/src/ui/initialization.dart
++++ b/lib/web_ui/lib/src/ui/initialization.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// Initializes the platform.
+diff --git a/lib/web_ui/lib/src/ui/lerp.dart b/lib/web_ui/lib/src/ui/lerp.dart
+index bcc278f8a..5cd4c8ac1 100644
+--- a/lib/web_ui/lib/src/ui/lerp.dart
++++ b/lib/web_ui/lib/src/ui/lerp.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// Linearly interpolate between two numbers.
+diff --git a/lib/web_ui/lib/src/ui/natives.dart b/lib/web_ui/lib/src/ui/natives.dart
+index e4bf1a2f5..4763db34e 100644
+--- a/lib/web_ui/lib/src/ui/natives.dart
++++ b/lib/web_ui/lib/src/ui/natives.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ // Corelib 'print' implementation.
+diff --git a/lib/web_ui/lib/src/ui/painting.dart b/lib/web_ui/lib/src/ui/painting.dart
+index a9bd10662..67da1842f 100644
+--- a/lib/web_ui/lib/src/ui/painting.dart
++++ b/lib/web_ui/lib/src/ui/painting.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ // ignore: unused_element, Used in Shader assert.
+diff --git a/lib/web_ui/lib/src/ui/path.dart b/lib/web_ui/lib/src/ui/path.dart
+index 18e351f53..1514d2432 100644
+--- a/lib/web_ui/lib/src/ui/path.dart
++++ b/lib/web_ui/lib/src/ui/path.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// A complex, one-dimensional subset of a plane.
+diff --git a/lib/web_ui/lib/src/ui/path_metrics.dart b/lib/web_ui/lib/src/ui/path_metrics.dart
+index 6d54888c2..b65e2b928 100644
+--- a/lib/web_ui/lib/src/ui/path_metrics.dart
++++ b/lib/web_ui/lib/src/ui/path_metrics.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// An iterable collection of [PathMetric] objects describing a [Path].
+diff --git a/lib/web_ui/lib/src/ui/pointer.dart b/lib/web_ui/lib/src/ui/pointer.dart
+index 698badcc4..e2f351caf 100644
+--- a/lib/web_ui/lib/src/ui/pointer.dart
++++ b/lib/web_ui/lib/src/ui/pointer.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// How the pointer has changed since the last report.
+diff --git a/lib/web_ui/lib/src/ui/semantics.dart b/lib/web_ui/lib/src/ui/semantics.dart
+index c6dffe2fc..a0fde9a5b 100644
+--- a/lib/web_ui/lib/src/ui/semantics.dart
++++ b/lib/web_ui/lib/src/ui/semantics.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// The possible actions that can be conveyed from the operating system
+diff --git a/lib/web_ui/lib/src/ui/test_embedding.dart b/lib/web_ui/lib/src/ui/test_embedding.dart
+index f72a5c75e..955dbfe53 100644
+--- a/lib/web_ui/lib/src/ui/test_embedding.dart
++++ b/lib/web_ui/lib/src/ui/test_embedding.dart
+@@ -4,7 +4,7 @@
+ 
+ // TODO(flutter_web): the Web-only API below need to be cleaned up.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// Used to track when the platform is initialized. This ensures the test fonts
+diff --git a/lib/web_ui/lib/src/ui/text.dart b/lib/web_ui/lib/src/ui/text.dart
+index ec9a45943..58698d862 100644
+--- a/lib/web_ui/lib/src/ui/text.dart
++++ b/lib/web_ui/lib/src/ui/text.dart
+@@ -3,7 +3,7 @@
+ // found in the LICENSE file.
+ // Synced 2019-05-30T14:20:57.833907.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// Whether to slant the glyphs in the font
+diff --git a/lib/web_ui/lib/src/ui/tile_mode.dart b/lib/web_ui/lib/src/ui/tile_mode.dart
+index 8fd24ae58..9ce9ddf3c 100644
+--- a/lib/web_ui/lib/src/ui/tile_mode.dart
++++ b/lib/web_ui/lib/src/ui/tile_mode.dart
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// Defines what happens at the edge of the gradient.
+diff --git a/lib/web_ui/lib/src/ui/window.dart b/lib/web_ui/lib/src/ui/window.dart
+index 557e6aa84..fd9e66740 100644
+--- a/lib/web_ui/lib/src/ui/window.dart
++++ b/lib/web_ui/lib/src/ui/window.dart
+@@ -3,7 +3,7 @@
+ // found in the LICENSE file.
+ // Synced 2019-05-30T14:20:57.841444.
+ 
+-// @dart = 2.9
++// @dart = 2.10
+ part of ui;
+ 
+ /// Signature of callbacks that have no arguments and return no data.
+diff --git a/lib/web_ui/lib/ui.dart b/lib/web_ui/lib/ui.dart
+index 49217e14a..13d5ee281 100644
+--- a/lib/web_ui/lib/ui.dart
++++ b/lib/web_ui/lib/ui.dart
+@@ -5,7 +5,7 @@
+ /// This library defines the web equivalent of the native dart:ui.
+ ///
+ /// All types in this library are public.
+-// @dart = 2.9
++// @dart = 2.10
+ library ui;
+ 
+ import 'dart:async';
diff --git a/tools/run_abi_tests.py b/tools/run_abi_tests.py
deleted file mode 100644
index 1810df8..0000000
--- a/tools/run_abi_tests.py
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Runs tests with old ABI versions and check if the results differ from the
-# current results.
-
-import argparse
-import json
-import os
-import subprocess
-import sys
-import time
-import utils
-
-scriptDir = os.path.dirname(os.path.realpath(__file__))
-outDir = os.path.join(scriptDir, '..', 'out', 'ReleaseX64')
-abiDir = os.path.join(outDir, 'dart-sdk', 'lib', '_internal', 'abiversions')
-
-
-# Parse command line args to flags.
-def parseArgs():
-    parser = argparse.ArgumentParser(
-        'Runs test.py on all supported ABI versions')
-    parser.add_argument(
-        '--output-directory',
-        default=os.path.join(outDir, 'logs'),
-        metavar='DIR',
-        dest='logDir',
-        help='Directory to output results.json and logs.json to.')
-    parser.add_argument(
-        '-n',
-        metavar='NAME',
-        dest='configuration_name',
-        help='Name of the configuration to use in the results.')
-    return parser.parse_args()
-
-
-# Info about a running test.
-class Test:
-
-    def __init__(self, cmd, resultFile, logFile, version):
-        self.cmd = cmd  # The test command.
-        self.resultFile = resultFile  # The expected location of the result file.
-        self.logFile = logFile  # The expected location of the log file.
-        self.version = version  # The ABI version, or None.
-
-
-# Recursively make directories for the path.
-def makeDirs(path):
-    try:
-        os.makedirs(path)
-    except OSError:
-        pass
-
-
-# Build a Test object for the given version (or None).
-def buildTest(version):
-    testDir = os.path.join(outDir,
-                           'test%s' % ('' if version is None else str(version)))
-    logDir = os.path.join(testDir, 'logs')
-    makeDirs(logDir)
-
-    vm_options = ['--enable-interpreter']
-    if version is not None:
-        vm_options += ['--use-abi-version=%d' % version]
-    cmd = [
-        'python',
-        os.path.join(scriptDir, 'test.py'),
-        '--compiler=dartkb',
-        '--mode=release',
-        '--write-results',
-        '--write-logs',
-        '--output_directory=%s' % logDir,
-        '--vm-options=%s' % ' '.join(vm_options),
-        'lib_2',
-    ]
-
-    resultFile = os.path.join(logDir, 'results.json')
-    logFile = os.path.join(logDir, 'logs.json')
-    return Test(cmd, resultFile, logFile, version)
-
-
-# Returns whether the dill files exist for an ABI version.
-def abiVersionExists(version):
-    return os.path.isdir(os.path.join(abiDir, str(version)))
-
-
-# Build tests for every supported version, and return a list of Test objects.
-def buildAllTests():
-    abi_version = int(utils.GetAbiVersion())
-    oldest_abi_version = int(utils.GetOldestSupportedAbiVersion())
-    tests = [buildTest(None)]
-    for version in xrange(oldest_abi_version, abi_version + 1):
-        if abiVersionExists(version):
-            tests.append(buildTest(version))
-    return tests
-
-
-# Run all tests, one by one, and wait for them all to complete.
-def runAllTests(tests):
-    for test in tests:
-        print('\n\n\n=== Running tests %s ===' % (
-            ('for ABI version %d' % test.version)
-            if test.version is not None else ('without an ABI version')))
-        print(subprocess.list2cmdline(test.cmd) + '\n\n')
-        proc = subprocess.Popen(test.cmd)
-        while proc.returncode is None:
-            time.sleep(1)
-            proc.communicate()
-            proc.poll()
-
-
-# Read a test result file or log file and convert JSON lines to a dictionary of
-# JSON records indexed by name. Assumes result and log files both use name key.
-def readTestFile(fileName):
-    with open(fileName, 'r') as f:
-        return {r['name']: r for r in [json.loads(line) for line in f]}
-
-
-# Read the test result or log files for every version and return a dict like:
-# {name: {version: resultJson, ...}, ...}
-def readAllTestFiles(tests, nameGetter):
-    allRecords = {}
-    for test in tests:
-        records = readTestFile(nameGetter(test))
-        for name, result in records.items():
-            if name not in allRecords:
-                allRecords[name] = {}
-            allRecords[name][test.version] = result
-    return allRecords
-
-
-# Pick any element of the dictionary, favoring the None key if it exists.
-def pickOne(d):
-    if None in d:
-        return d[None]
-    for v in d.values():
-        return v
-    return None
-
-
-# Diff the results of a test for each version and construct a new test result
-# that reports whether the test results match for each version.
-def diffResults(results, configuration_name):
-    outResult = pickOne(results)
-    exp = results[None]['result'] if None in results else None
-    outResult['configuration'] = configuration_name
-    outResult['expected'] = exp
-    outResult['result'] = exp
-    outResult['matches'] = True
-    diffs = []
-    for version, result in results.items():
-        if version is not None:
-            act = result['result']
-            if exp != act:
-                diffs.append(version)
-                outResult[
-                    'result'] = act  # May be overwritten by other versions.
-                outResult['matches'] = False
-    return outResult, diffs
-
-
-# Create a log entry for a test that has diffs. Concatenate all the log records
-# and include which tests failed.
-def makeLog(diffs, results, logRecords, configuration_name):
-    result = pickOne(results)
-    logs = ["%s: %s" % (str(v), l['log']) for v, l in logRecords.items()]
-    log = ('This test fails if there is a difference in the test results\n'
-           'between ABI versions. The expected result is the result on the\n'
-           'current ABI: %s\n'
-           'These ABI versions reported a different result: %s\n\n'
-           'These are the logs of the test runs on different ABI versions.\n'
-           'There are no logs for versions where the test passed.\n\n%s' %
-           (result['result'], repr(diffs), '\n\n\n'.join(logs)))
-    return {
-        'name': result['name'],
-        'configuration': configuration_name,
-        'result': result['result'],
-        'log': log,
-    }
-
-
-# Diff the results of all the tests and create the merged result and log files.
-def diffAllResults(tests, flags):
-    allResults = readAllTestFiles(tests, lambda test: test.resultFile)
-    allLogs = readAllTestFiles(tests, lambda test: test.logFile)
-    makeDirs(flags.logDir)
-    resultFileName = os.path.join(flags.logDir, 'results.json')
-    logFileName = os.path.join(flags.logDir, 'logs.json')
-    with open(resultFileName, 'w') as resultFile:
-        with open(logFileName, 'w') as logFile:
-            for name, results in allResults.items():
-                outResult, diffs = diffResults(results,
-                                               flags.configuration_name)
-                resultFile.write(json.dumps(outResult) + '\n')
-                if diffs:
-                    logRecords = allLogs[name] if name in allLogs else []
-                    logFile.write(
-                        json.dumps(
-                            makeLog(diffs, results, logRecords, flags.
-                                    configuration_name)) + '\n')
-    print('Log files emitted to %s and %s' % (resultFileName, logFileName))
-
-
-def main():
-    flags = parseArgs()
-    tests = buildAllTests()
-    runAllTests(tests)
-    diffAllResults(tests, flags)
-    return 0
-
-
-if __name__ == '__main__':
-    sys.exit(main())
diff --git a/tools/run_offsets_extractor.sh b/tools/run_offsets_extractor.sh
index c55cc24..8675fea 100755
--- a/tools/run_offsets_extractor.sh
+++ b/tools/run_offsets_extractor.sh
@@ -25,7 +25,6 @@
 
 # Run offsets_extractor for every architecture and append the results.
 run() {
-  tools/gn.py --mode=$1 --arch=$2
   tools/build.py --mode=$1 --arch=$2 offsets_extractor offsets_extractor_precompiled_runtime
   echo "" >>"$TEMP_JIT"
   out/$3/offsets_extractor >>"$TEMP_JIT"
diff --git a/tools/test.dart b/tools/test.dart
index dfcbf5d..000a4ccc5 100755
--- a/tools/test.dart
+++ b/tools/test.dart
@@ -1,592 +1,10 @@
 #!/usr/bin/env dart
+
 // Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+import 'package:test_runner/test_runner.dart';
 
-// Run tests like on the given builder and/or named configuration.
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io';
-
-import 'package:args/args.dart';
-import 'package:smith/smith.dart';
-
-import 'bots/results.dart';
-
-const int deflakingCount = 5;
-
-/// Quotes a string in shell single quote mode. This function produces a single
-/// shell argument that evaluates to the exact string provided, handling any
-/// special characters in the input string. Shell single quote mode works uses
-/// the single quote character as the delimiter and uses the characters
-/// in-between verbatim without any special processing. To insert the single
-/// quote character itself, escape single quote mode, insert an escaped single
-/// quote, and then return to single quote mode.
-///
-/// Examples:
-///   foo becomes 'foo'
-///   foo bar becomes 'foo bar'
-///   foo\ bar becomes 'foo\ bar'
-///   foo's bar becomes 'foo '\''s bar'
-///   foo "b"ar becomes 'foo "b"'
-///   foo
-///   bar becomes 'foo
-///   bar'
-String shellSingleQuote(String string) {
-  return "'${string.replaceAll("'", "'\\''")}'";
-}
-
-/// Like [shellSingleQuote], but if the string only contains safe ASCII
-/// characters, don't quote it. Note that it's not always safe to omit the
-/// quotes even if the string only has safe characters, as doing so might match
-/// a shell keyword or a shell builtin in the first argument in a command. It
-/// should be safe to use this for the second argument onwards in a command.
-String simpleShellSingleQuote(String string) {
-  return new RegExp(r"^[a-zA-Z0-9%+,./:_-]*$").hasMatch(string)
-      ? string
-      : shellSingleQuote(string);
-}
-
-/// Runs a process and exits likewise if the process exits non-zero.
-Future<ProcessResult> runProcess(String executable, List<String> arguments,
-    {bool runInShell = false}) async {
-  final processResult =
-      await Process.run(executable, arguments, runInShell: runInShell);
-  if (processResult.exitCode != 0) {
-    final command =
-        [executable, ...arguments].map(simpleShellSingleQuote).join(" ");
-    throw new Exception("Command exited ${processResult.exitCode}: $command\n"
-        "${processResult.stdout}\n${processResult.stderr}");
-  }
-  return processResult;
-}
-
-/// Runs a process and exits likewise if the process exits non-zero, but let the
-/// child process inherit out stdio handles.
-Future<ProcessResult> runProcessInheritStdio(
-    String executable, List<String> arguments,
-    {bool runInShell = false}) async {
-  final process = await Process.start(executable, arguments,
-      mode: ProcessStartMode.inheritStdio, runInShell: runInShell);
-  final exitCode = await process.exitCode;
-  final processResult = new ProcessResult(process.pid, exitCode, "", "");
-  if (processResult.exitCode != 0) {
-    final command =
-        [executable, ...arguments].map(simpleShellSingleQuote).join(" ");
-    throw new Exception("Command exited ${processResult.exitCode}: $command");
-  }
-  return processResult;
-}
-
-/// Finds the branch of a builder given the list of branches.
-String branchOfBuilder(String builder, List<String> branches) {
-  return branches.where((branch) => branch != "master").firstWhere(
-      (branch) => builder.endsWith("-$branch"),
-      orElse: () => "master");
-}
-
-/// Finds the named configuration to test according to the test matrix
-/// information and the command line options.
-Map<String, Set<Builder>> resolveNamedConfigurations(
-    TestMatrix testMatrix,
-    String requestedBranch,
-    List<String> requestedNamedConfigurations,
-    String requestedBuilder) {
-  assert(requestedBranch != null);
-  final testedConfigurations = <String, Set<Builder>>{};
-  var foundBuilder = false;
-  for (final builder in testMatrix.builders) {
-    if (requestedBuilder != null && builder.name != requestedBuilder) {
-      continue;
-    }
-    final branch = branchOfBuilder(builder.name, testMatrix.branches);
-    if (branch != requestedBranch) {
-      if (requestedBuilder == null) {
-        continue;
-      }
-      stderr.writeln("error: Builder $requestedBuilder is on branch $branch "
-          "rather than $requestedBranch");
-      stderr.writeln("error: To compare with that branch, use: -B $branch");
-      return null;
-    }
-    foundBuilder = true;
-    for (final step in builder.steps.where((step) => step.isTestStep)) {
-      final testedConfiguration = step.testedConfiguration;
-      if (testedConfiguration == null) {
-        // This test step does not use a configuration; for example,
-        // because it is a simple script that does not produce results.
-        continue;
-      }
-      final namedConfiguration = testedConfiguration.name;
-      if (requestedNamedConfigurations.isEmpty ||
-          requestedNamedConfigurations.contains(namedConfiguration)) {
-        testedConfigurations
-            .putIfAbsent(namedConfiguration, () => {})
-            .add(builder);
-      }
-    }
-  }
-  if (requestedBuilder != null && !foundBuilder) {
-    stderr.writeln("error: Builder $requestedBuilder doesn't exist");
-    return null;
-  }
-  if (requestedBuilder != null &&
-      requestedNamedConfigurations.isEmpty &&
-      testedConfigurations.isEmpty) {
-    stderr.writeln("error: Builder $requestedBuilder isn't testing any named "
-        "configurations");
-    return null;
-  }
-  if (requestedNamedConfigurations.isNotEmpty) {
-    var hasUntestedConfiguration = false;
-    for (final requestedConfiguration in requestedNamedConfigurations) {
-      if (!testedConfigurations.containsKey(requestedConfiguration)) {
-        final builder = requestedBuilder != null
-            ? "builder $requestedBuilder"
-            : "any builder";
-        stderr.writeln("error: The named configuration "
-            "$requestedConfiguration isn't tested on $builder");
-        hasUntestedConfiguration = true;
-      }
-    }
-    if (hasUntestedConfiguration) {
-      return null;
-    }
-  }
-
-  return testedConfigurations;
-}
-
-/// Locates the merge base between head and the [branch] on the given [remote].
-Future<String> findMergeBase(String remote, String branch) async {
-  final arguments = ["merge-base", "$remote/$branch", "HEAD"];
-  final result =
-      await Process.run("git", arguments, runInShell: Platform.isWindows);
-  if (result.exitCode != 0) {
-    throw new Exception("Failed to run: git ${arguments.join(' ')}\n"
-        "stdout:\n${result.stdout}\n"
-        "stderr:\n${result.stderr}\n");
-  }
-  return LineSplitter.split(result.stdout).first;
-}
-
-/// Exception thrown when looking up the build for a commit failed.
-class CommitNotBuiltException implements Exception {
-  final String reason;
-
-  CommitNotBuiltException(this.reason);
-
-  String toString() => reason;
-}
-
-/// The result after searching for a build of a commit.
-class BuildSearchResult {
-  final int build;
-  final String commit;
-
-  BuildSearchResult(this.build, this.commit);
-}
-
-/// Locates the build number of the [commit] on the [builder], or throws an
-/// exception if the builder hasn't built the commit.
-Future<BuildSearchResult> searchForBuild(String builder, String commit) async {
-  final requestUrl = Uri.parse(
-      "https://cr-buildbucket.appspot.com/_ah/api/buildbucket/v1/search"
-      "?bucket=luci.dart.ci.sandbox"
-      "&tag=builder%3A$builder"
-      "&tag=buildset%3Acommit%2Fgit%2F$commit"
-      "&fields=builds(status%2Ctags%2Curl)");
-  final client = new HttpClient();
-  final request = await client.getUrl(requestUrl);
-  final response = await request.close();
-  final Map<String, dynamic> object = await response
-      .cast<List<int>>()
-      .transform(new Utf8Decoder())
-      .transform(new JsonDecoder())
-      .first;
-  client.close();
-  final builds = object["builds"];
-  if (builds == null || builds.isEmpty) {
-    throw new CommitNotBuiltException(
-        "Builder $builder hasn't built commit $commit");
-  }
-  final build = builds.last;
-  final tags = (build["tags"] as List).cast<String>();
-  final buildAddressTag =
-      tags.firstWhere((tag) => tag.startsWith("build_address:"));
-  final buildAddress = buildAddressTag.substring("build_address:".length);
-  if (build["status"] != "COMPLETED") {
-    throw new CommitNotBuiltException(
-        "Build $buildAddress isn't completed yet");
-  }
-  return new BuildSearchResult(int.parse(buildAddress.split("/").last), commit);
-}
-
-Future<BuildSearchResult> searchForApproximateBuild(
-    String builder, String commit) async {
-  try {
-    return await searchForBuild(builder, commit);
-  } on CommitNotBuiltException catch (e) {
-    print("Warning: $e, searching for an inexact previous build...");
-    final int limit = 25;
-    final arguments = [
-      "rev-list",
-      "$commit~$limit..$commit~1",
-      "--first-parent",
-      "--topo-order"
-    ];
-    final processResult = await Process.run("git", arguments, runInShell: true);
-    if (processResult.exitCode != 0) {
-      throw new Exception("Failed to list potential commits: git $arguments\n"
-          "exitCode: ${processResult.exitCode}\n"
-          "stdout: ${processResult.stdout}\n"
-          "stdout: ${processResult.stderr}\n");
-    }
-    for (final fallbackCommit in LineSplitter.split(processResult.stdout)) {
-      try {
-        return await searchForBuild(builder, fallbackCommit);
-      } catch (e) {
-        print(
-            "Warning: Searching for inexact baseline build: $e, continuing...");
-      }
-    }
-    throw new CommitNotBuiltException(
-        "Failed to locate approximate baseline results for "
-        "$commit in past $limit commits");
-  }
-}
-
-void overrideConfiguration(Map<String, Map<String, dynamic>> results,
-    String configuration, String newConfiguration) {
-  results.forEach((String key, Map<String, dynamic> result) {
-    if (result["configuration"] == configuration) {
-      result["configuration"] = newConfiguration;
-    }
-  });
-}
-
-void printUsage(ArgParser parser, {String error, bool printOptions: false}) {
-  if (error != null) {
-    print("$error\n");
-    exitCode = 1;
-  }
-  print("""
-Usage: test.dart -b [BUILDER] -n [CONFIGURATION] [OPTION]... [--]
-                 [TEST.PY OPTION]... [SELECTOR]...
-
-Run tests and compare with the results on the given builder. Either the -n or
-the -b option, or both, must be used. Any options following -- and non-option
-arguments will be forwarded to test.py invocations. The specified named
-configuration's results will be downloaded from the specified builder. If only a
-named configuration is specified, the results are downloaded from the
-appropriate builders. If only a builder is specified, the default named
-configuration is used if the builder only has a single named configuration.
-Otherwise the available named configurations are listed.
-
-See the documentation at https://goto.google.com/dart-status-file-free-workflow
-""");
-  if (printOptions) {
-    print(parser.usage);
-  } else {
-    print("Run test.dart --help to see all options.");
-  }
-}
-
-void main(List<String> args) async {
-  final parser = new ArgParser();
-  parser.addOption("builder",
-      abbr: "b", help: "Run tests like on the given builder");
-  parser.addOption("branch",
-      abbr: "B",
-      help: "Select the builders building this branch",
-      defaultsTo: "master");
-  parser.addOption("commit", abbr: "C", help: "Compare with this commit");
-  parser.addFlag("deflake",
-      help: "Re-run failing newly tests $deflakingCount times.");
-  parser.addFlag("report-flakes",
-      help: "Report test failures for tests known to be flaky.\n"
-          "This ignores all flakiness data from CI but flakes\n"
-          "detected by --deflake will remain hidden");
-  parser.addFlag("list-configurations",
-      help: "Output list of configurations.", negatable: false);
-  parser.addMultiOption("named-configuration",
-      abbr: "n",
-      help: "The named test configuration(s) that supplies the\nvalues for all "
-          "test options, specifying how tests\nshould be run.");
-  parser.addOption("local-configuration",
-      abbr: "N",
-      help: "Use a different named configuration for local\ntesting than the "
-          "named configuration the baseline\nresults were downloaded for. The "
-          "results may be\ninexact if the baseline configuration is "
-          "different.");
-  parser.addOption("remote",
-      abbr: "R",
-      help: "Compare with this remote and git branch",
-      defaultsTo: "origin");
-  parser.addFlag("help", help: "Show the program usage.", negatable: false);
-
-  ArgResults options;
-  try {
-    options = parser.parse(args);
-  } on FormatException catch (exception) {
-    printUsage(parser, error: exception.message);
-    return;
-  }
-
-  if (options["help"]) {
-    printUsage(parser, printOptions: true);
-    return;
-  }
-
-  if (options["list-configurations"]) {
-    final process = await Process.start(
-        "python", ["tools/test.py", "--list-configurations"],
-        mode: ProcessStartMode.inheritStdio, runInShell: Platform.isWindows);
-    exitCode = await process.exitCode;
-    return;
-  }
-
-  final requestedBuilder = options["builder"];
-  final requestedNamedConfigurations =
-      (options["named-configuration"] as List).cast<String>();
-  final localConfiguration = options["local-configuration"] as String;
-
-  if (requestedBuilder == null && requestedNamedConfigurations.isEmpty) {
-    printUsage(parser,
-        error: "Please specify either a configuration (-n) or "
-            "a builder (-b)");
-    return;
-  }
-
-  if (localConfiguration != null && requestedNamedConfigurations.length > 1) {
-    printUsage(parser,
-        error: "Local configuration (-N) can only be used with a"
-            " single named configuration (-n)");
-    return;
-  }
-
-  // Locate gsutil.py.
-  gsutilPy =
-      Platform.script.resolve("../third_party/gsutil/gsutil.py").toFilePath();
-
-  // Load the test matrix.
-  final testMatrixPath = Platform.script.resolve("bots/test_matrix.json");
-  final testMatrix = TestMatrix.fromPath(testMatrixPath.toFilePath());
-  // Determine what named configuration to run and which builders to download
-  // existing results from.
-  final testedConfigurations = resolveNamedConfigurations(testMatrix,
-      options["branch"], requestedNamedConfigurations, requestedBuilder);
-  if (testedConfigurations == null) {
-    // No valid configuration could be found. The error has already been
-    // reported by [resolveConfigurations].
-    exitCode = 1;
-    return;
-  }
-  final namedConfigurations = testedConfigurations.keys.toSet();
-  final builders =
-      testedConfigurations.values.expand((builders) => builders).toSet();
-  // Print information about the resolved builders to compare with.
-  for (final namedConfiguration in namedConfigurations) {
-    final testedBuilders = testedConfigurations[namedConfiguration];
-    final onWhichBuilders = testedBuilders.length == 1
-        ? "builder ${testedBuilders.single.name}"
-        : "builders${testedBuilders.map((b) => "\n  ${b.name}").join()}";
-    if (localConfiguration != null) {
-      print("Testing named configuration $localConfiguration "
-          "compared with configuration ${namedConfiguration} "
-          "on $onWhichBuilders");
-    } else {
-      print("Testing named configuration $namedConfiguration "
-          "compared with $onWhichBuilders");
-    }
-  }
-  // Use given commit or find out where the current HEAD branched.
-  final commit = options["commit"] ??
-      await findMergeBase(options["remote"], options["branch"]);
-  print("Base commit is $commit");
-  // Store the downloaded results and our test results in a temporary directory.
-  final outDirectory = await Directory.systemTemp.createTemp("test.dart.");
-  try {
-    final tasks = <Future>[];
-    bool needsConfigurationOverride = localConfiguration != null &&
-        localConfiguration != namedConfigurations.single;
-    bool needsMerge = builders.length > 1;
-    final inexactBuilds = <String, String>{};
-    var previousFileName = "previous.json";
-    var flakyFileName = "flaky.json";
-    var downloadNumber = 0;
-    // Download the previous results and flakiness info from cloud storage.
-    for (final builder in builders) {
-      final builderName = builder.name;
-      if (needsMerge) {
-        previousFileName = "previous-$downloadNumber.json";
-        flakyFileName = "flaky-$downloadNumber.json";
-        downloadNumber++;
-      }
-      print("Finding build on builder $builderName to compare with...");
-      // Use the buildbucket API to search for builds of the right commit.
-      final buildSearchResult =
-          await searchForApproximateBuild(builderName, commit);
-      if (buildSearchResult.commit != commit) {
-        print("Warning: Using commit ${buildSearchResult.commit} "
-            "as baseline instead of $commit for $builderName");
-        inexactBuilds[builderName] = buildSearchResult.commit;
-      }
-      final buildNumber = buildSearchResult.build.toString();
-      print("Downloading results from builder $builderName "
-          "build $buildNumber...");
-      tasks.add(cpGsutil(
-          buildFileCloudPath(builderName, buildNumber, "results.json"),
-          "${outDirectory.path}/$previousFileName"));
-      if (!options["report-flakes"]) {
-        tasks.add(cpGsutil(
-            buildFileCloudPath(builderName, buildNumber, "flaky.json"),
-            "${outDirectory.path}/$flakyFileName"));
-      }
-    }
-    // Run the tests.
-    final configurationsToRun = localConfiguration != null
-        ? <String>[localConfiguration]
-        : namedConfigurations;
-    print("".padLeft(80, "="));
-    print("Running tests");
-    print("".padLeft(80, "="));
-    await runProcessInheritStdio(
-        "python",
-        [
-          "tools/test.py",
-          "--named-configuration=${configurationsToRun.join(",")}",
-          "--output-directory=${outDirectory.path}",
-          "--clean-exit",
-          "--silent-failures",
-          "--write-results",
-          "--write-logs",
-          ...options.rest,
-        ],
-        runInShell: Platform.isWindows);
-    // Wait for the downloads and the test run to complete.
-    await Future.wait(tasks);
-    // Merge the results and flaky data downloaded from the builders.
-    final mergedResults = <String, Map<String, dynamic>>{};
-    final mergedFlaky = <String, Map<String, dynamic>>{};
-    if (needsMerge || needsConfigurationOverride) {
-      for (int i = 0; i < downloadNumber; ++i) {
-        previousFileName = needsMerge ? "previous-$i.json" : "previous.json";
-        var results =
-            await loadResultsMap("${outDirectory.path}/$previousFileName");
-        if (needsConfigurationOverride) {
-          overrideConfiguration(
-              results, namedConfigurations.single, localConfiguration);
-        }
-        mergedResults.addAll(results);
-        if (!options["report-flakes"]) {
-          flakyFileName = needsMerge ? "flaky-$i.json" : "flaky.json";
-          var flakyTests =
-              await loadResultsMap("${outDirectory.path}/$flakyFileName");
-          if (needsConfigurationOverride) {
-            overrideConfiguration(
-                flakyTests, namedConfigurations.single, localConfiguration);
-          }
-          mergedFlaky.addAll(flakyTests);
-        }
-      }
-    }
-    // Write out the merged results for the builders.
-    if (needsMerge || needsConfigurationOverride) {
-      await new File("${outDirectory.path}/previous.json").writeAsString(
-          mergedResults.values.map((data) => jsonEncode(data) + "\n").join(""));
-    }
-    // Ensure that there is a flaky.json even if it wasn't downloaded.
-    if (needsMerge || needsConfigurationOverride || options["report-flakes"]) {
-      await new File("${outDirectory.path}/flaky.json").writeAsString(
-          mergedFlaky.values.map((data) => jsonEncode(data) + "\n").join(""));
-    }
-    // Deflake results of the tests if required.
-    if (options["deflake"]) {
-      await deflake(outDirectory, configurationsToRun, options.rest);
-    }
-    // Write out the final comparison.
-    print("".padLeft(80, "="));
-    print("Test Results");
-    print("".padLeft(80, "="));
-    final compareOutput = await runProcess(Platform.resolvedExecutable, [
-      "tools/bots/compare_results.dart",
-      "--human",
-      "--verbose",
-      "--changed",
-      "--failing",
-      "--passing",
-      "--flakiness-data=${outDirectory.path}/flaky.json",
-      "--logs=${outDirectory.path}/logs.json",
-      "${outDirectory.path}/previous.json",
-      "${outDirectory.path}/results.json",
-    ]);
-    if (compareOutput.stdout == "") {
-      print("There were no test failures.");
-    } else {
-      stdout.write(compareOutput.stdout);
-    }
-    if (inexactBuilds.isNotEmpty) {
-      print("");
-      final builders = inexactBuilds.keys.toList()..sort();
-      for (var builder in builders) {
-        final inexactCommit = inexactBuilds[builder];
-        print("Warning: Results may be inexact because commit ${inexactCommit} "
-            "was used as the baseline for $builder instead of $commit");
-      }
-    }
-  } finally {
-    await outDirectory.delete(recursive: true);
-  }
-}
-
-void deflake(Directory outDirectory, List<String> configurations,
-    List<String> testPyArgs) async {
-  // Find the list of tests to deflake.
-  final deflakeListOutput = await runProcess(Platform.resolvedExecutable, [
-    "tools/bots/compare_results.dart",
-    "--changed",
-    "--failing",
-    "--passing",
-    "--flakiness-data=${outDirectory.path}/flaky.json",
-    "${outDirectory.path}/previous.json",
-    "${outDirectory.path}/results.json",
-  ]);
-  final deflakeListPath = "${outDirectory.path}/deflake.list";
-  final deflakeListFile = new File(deflakeListPath);
-  await deflakeListFile.writeAsString(deflakeListOutput.stdout);
-
-  // Deflake the changed tests.
-  final deflakingResultsPaths = <String>[];
-  for (int i = 1; deflakeListOutput.stdout != "" && i <= deflakingCount; i++) {
-    print("".padLeft(80, "="));
-    print("Running deflaking iteration $i");
-    print("".padLeft(80, "="));
-    final deflakeDirectory = new Directory("${outDirectory.path}/$i");
-    await deflakeDirectory.create();
-    final deflakeArguments = <String>[
-      "--named-configuration=${configurations.join(",")}",
-      "--output-directory=${deflakeDirectory.path}",
-      "--clean-exit",
-      "--silent-failures",
-      "--write-results",
-      "--test-list=$deflakeListPath",
-      ...testPyArgs,
-    ];
-    await runProcessInheritStdio(
-        "python", ["tools/test.py", ...deflakeArguments],
-        runInShell: Platform.isWindows);
-    deflakingResultsPaths.add("${deflakeDirectory.path}/results.json");
-  }
-
-  // Update the flakiness information based on what we've learned.
-  print("Updating flakiness information...");
-  await runProcess(Platform.resolvedExecutable, [
-    "tools/bots/update_flakiness.dart",
-    "--input=${outDirectory.path}/flaky.json",
-    "--output=${outDirectory.path}/flaky.json",
-    "${outDirectory.path}/results.json",
-    ...deflakingResultsPaths,
-  ]);
+void main(List<String> args) {
+  runTests(args);
 }
diff --git a/tools/upload_abi_dills.sh b/tools/upload_abi_dills.sh
deleted file mode 100755
index 28d3627..0000000
--- a/tools/upload_abi_dills.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Uploads the following dill files to CIPD, indexed by the current ABI version:
-#   $build_dir/vm_platform_strong.dill
-#   $build_dir/gen/kernel_service.dill
-#   $build_dir/gen_kernel_bytecode.dill
-# This script is a no-op unless $BUILDBOT_BUILDERNAME is "dart-sdk-linux-be".
-# It's also a no-op if dill files were already uploaded today.
-#
-# If the ABI was modified, the ABI_VERSION in tools/VERSIONS should be manually
-# incremented accordingly.
-set -e
-set -x
-
-if [ -z "$2" ]; then
-  echo "Usage: upload_abi_dills.sh version_file build_dir"
-  exit 1
-fi
-
-if [ "$BUILDBOT_BUILDERNAME" != "dart-sdk-linux-be" ]; then
-  echo "This script only works on the dart-sdk-linux-be buildbot"
-  exit 0
-fi
-
-abi_version=$(sed -n "s/^ABI_VERSION \([0-9]*\)$/\1/p" "$1")
-git_revision=$(git rev-parse HEAD)
-current_date=$(date +%F)
-search_results=$(cipd search \
-  "dart/abiversions/$abi_version" \
-  -tag "date:$current_date" | grep "Instances:" || echo "")
-
-if [ ! -z "$search_results" ]; then
-  exit 0
-fi
-
-sdk_dir=$(pwd)
-tmpdir=$(mktemp -d)
-chmod 755 $tmpdir
-cleanup() {
-  rm -rf "$tmpdir"
-}
-trap cleanup EXIT HUP INT QUIT TERM PIPE
-pushd "$tmpdir"
-
-mkdir abiversions
-cp "$sdk_dir/$2/vm_platform_strong.dill" "abiversions/vm_platform_strong.dill"
-cp "$sdk_dir/$2/gen/kernel_service.dill" "abiversions/kernel_service.dill"
-cp "$sdk_dir/$2/gen_kernel_bytecode.dill" "abiversions/gen_kernel_bytecode.dill"
-
-cipd create \
-  -name dart/abiversions/$abi_version \
-  -in abiversions \
-  -install-mode copy \
-  -tag version:$abi_version \
-  -tag date:$current_date \
-  -tag git_revision:$git_revision \
-  -ref latest \
-  -ref version_$abi_version
-
-popd
diff --git a/tools/utils.py b/tools/utils.py
index 23c8812..cbd1759 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -114,15 +114,13 @@
 class Version(object):
 
     def __init__(self, channel, major, minor, patch, prerelease,
-                 prerelease_patch, abi_version, oldest_supported_abi_version):
+                 prerelease_patch):
         self.channel = channel
         self.major = major
         self.minor = minor
         self.patch = patch
         self.prerelease = prerelease
         self.prerelease_patch = prerelease_patch
-        self.abi_version = abi_version
-        self.oldest_supported_abi_version = oldest_supported_abi_version
 
 
 # Try to guess the host operating system.
@@ -410,16 +408,6 @@
     return os.environ.get(key, '')
 
 
-def GetAbiVersion(version_file=None):
-    version = ReadVersionFile(version_file)
-    return version.abi_version
-
-
-def GetOldestSupportedAbiVersion(version_file=None):
-    version = ReadVersionFile(version_file)
-    return version.oldest_supported_abi_version
-
-
 def ReadVersionFile(version_file=None):
 
     def match_against(pattern, file_content):
@@ -445,15 +433,10 @@
     patch = match_against('^PATCH (\d+)$', content)
     prerelease = match_against('^PRERELEASE (\d+)$', content)
     prerelease_patch = match_against('^PRERELEASE_PATCH (\d+)$', content)
-    abi_version = match_against('^ABI_VERSION (\d+)$', content)
-    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):
         return Version(channel, major, minor, patch, prerelease,
-                       prerelease_patch, abi_version,
-                       oldest_supported_abi_version)
+                       prerelease_patch)
 
     print('Warning: VERSION file ({}) has wrong format'.format(version_file))
     return None
diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni
index 7d981bd..81ec5ee 100644
--- a/utils/application_snapshot.gni
+++ b/utils/application_snapshot.gni
@@ -134,6 +134,7 @@
     args += [ rebase_path(main_dart) ]
   }
 
+  # Create a snapshot from kernel built above.
   dart_action(target_name) {
     deps = extra_deps + [ ":${target_name}_dill" ]
     depfile = "$output.d"
@@ -144,6 +145,10 @@
 
     outputs = [ output ]
 
+    # Explicitly set DFE so Dart doesn't implicitly depend on the kernel service
+    # snapshot (creating a circular dep. for kernel-service_snapshot).
+    dfe = "$_dart_root/pkg/vm/bin/kernel_service.dart"
+
     abs_depfile = rebase_path(depfile)
     abs_output = rebase_path(output, root_build_dir)
 
diff --git a/utils/compiler/create_snapshot_entry.dart b/utils/compiler/create_snapshot_entry.dart
index 633667c..d915d4d 100644
--- a/utils/compiler/create_snapshot_entry.dart
+++ b/utils/compiler/create_snapshot_entry.dart
@@ -10,10 +10,9 @@
 import 'dart:async';
 
 Future<String> getVersion(var rootPath) {
-  var suffix = Platform.operatingSystem == 'windows' ? '.exe' : '';
   var printVersionScript = rootPath.resolve("tools/make_version.py");
   return Process.run(
-          "python$suffix", [printVersionScript.toFilePath(), "--quiet"])
+          "python", [printVersionScript.toFilePath(), "--quiet"], runInShell:true)
       .then((result) {
     if (result.exitCode != 0) {
       throw "Could not generate version";
diff --git a/utils/dartanalyzer/BUILD.gn b/utils/dartanalyzer/BUILD.gn
index 48c9dcf..78c84b0 100644
--- a/utils/dartanalyzer/BUILD.gn
+++ b/utils/dartanalyzer/BUILD.gn
@@ -38,7 +38,11 @@
                             ],
                             "list lines")
 
-prebuilt_dart_action("generate_summary_strong") {
+dart_action("generate_summary_strong") {
+  deps = [
+    "../../sdk:copy_libraries",
+    "../../sdk:write_version_file",
+  ]
   script = "../../pkg/analyzer/tool/summary/build_sdk_summaries.dart"
   packages = "../../.packages"
   inputs = sdk_lib_files + analyzer_files
@@ -48,6 +52,6 @@
   args = [
     "build",
     rebase_path(output),
-    rebase_path("../../sdk"),
+    rebase_path("$root_out_dir/dart-sdk"),
   ]
 }
diff --git a/utils/dartdev/BUILD.gn b/utils/dartdev/BUILD.gn
index 45a52ca..b7ed0c2 100644
--- a/utils/dartdev/BUILD.gn
+++ b/utils/dartdev/BUILD.gn
@@ -17,21 +17,13 @@
                               rebase_path("../../pkg/dartfix"),
                             ],
                             "list lines")
-
-dds_files = exec_script("../../tools/list_dart_files.py",
-                        [
-                          "absolute",
-                          rebase_path("../../pkg/dds"),
-                        ],
-                        "list lines")
-
 group("dartdev") {
-  deps = [ ":copy_dartdev_snapshot" ]
+  public_deps = [ ":copy_dartdev_snapshot" ]
 }
 
 copy("copy_dartdev_snapshot") {
   visibility = [ ":dartdev" ]
-  deps = [ ":generate_dartdev_snapshot" ]
+  public_deps = [ ":generate_dartdev_snapshot" ]
   sources = [ "$root_gen_dir/dartdev.dart.snapshot" ]
   outputs = [ "$root_out_dir/dartdev.dart.snapshot" ]
 }
@@ -39,6 +31,7 @@
 application_snapshot("generate_dartdev_snapshot") {
   main_dart = "../../pkg/dartdev/bin/dartdev.dart"
   training_args = [ "--help" ]
-  inputs = dartdev_files + dartfix_files + dds_files
+  deps = [ "../dds:dds" ]
+  inputs = dartdev_files + dartfix_files
   output = "$root_gen_dir/dartdev.dart.snapshot"
 }
diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn
index c9ff655..254af29 100644
--- a/utils/dartdevc/BUILD.gn
+++ b/utils/dartdevc/BUILD.gn
@@ -99,39 +99,6 @@
   out = "$root_out_dir/dev_compiler/build/web/dart_stack_trace_mapper.js"
 }
 
-# Apply dev_compiler's patch files to create the Dart version of the dartdevc
-# SDK.
-prebuilt_dart_action("dartdevc_patch_sdk") {
-  deps = [
-    ":dartdevc_files_stamp",
-    ":dartdevc_sdk_patch_stamp",
-
-    # The patch script uses several packages, including analyzer, so consider
-    # it dirty if any of those change.
-    "../../pkg:pkg_files_stamp",
-  ]
-
-  script = "../../pkg/dev_compiler/tool/patch_sdk.dart"
-
-  inputs = sdk_lib_files
-
-  # Arbitrarily use the version file as a token file to check against to see if
-  # the sources have changed.
-  # 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"),
-    "--target",
-    "dartdevc",
-    "--out",
-    rebase_path("$patched_sdk_dir/"),
-  ]
-}
-
 # Builds everything needed to run dartdevc tests using test.dart.
 group("dartdevc_test") {
   deps = [
@@ -141,10 +108,6 @@
     ":dartdevc_test_kernel_pkg",
     "../..:create_sdk",
   ]
-
-  # TODO(nshahan) Temporarily here until we decide if we are going to include
-  # in the create_sdk target.
-  deps += [ "../../sdk:copy_dev_compiler_outline_sound" ]
 }
 
 # Builds everything needed to run dartdevc tests locally using test.dart without
@@ -208,7 +171,7 @@
   #     named `${name}_js` must exist.
   #   * args: additional args to pass to dartdevc
 
-  dart_action(target_name) {
+  prebuilt_dart_action(target_name) {
     script = "../../pkg/dev_compiler/bin/dartdevc.dart"
     module = invoker.package
     out_dir = rebase_path("$js_gen_dir")
diff --git a/utils/dds/BUILD.gn b/utils/dds/BUILD.gn
new file mode 100644
index 0000000..dd76925
--- /dev/null
+++ b/utils/dds/BUILD.gn
@@ -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.
+
+import("../application_snapshot.gni")
+
+dds_files = exec_script("../../tools/list_dart_files.py",
+                        [
+                          "absolute",
+                          rebase_path("../../pkg/dds"),
+                        ],
+                        "list lines")
+
+group("dds") {
+  public_deps = [ ":copy_dds_snapshot" ]
+}
+
+copy("copy_dds_snapshot") {
+  visibility = [ ":dds" ]
+  public_deps = [ ":generate_dds_snapshot" ]
+  sources = [ "$root_gen_dir/dds.dart.snapshot" ]
+  outputs = [ "$root_out_dir/dds.dart.snapshot" ]
+}
+
+application_snapshot("generate_dds_snapshot") {
+  main_dart = "../../pkg/dds/bin/dds.dart"
+  training_args = []
+  inputs = dds_files
+  output = "$root_gen_dir/dds.dart.snapshot"
+}